ngraph-gtk-6.09.05/0000755000175000017500000000000014143613332010736 500000000000000ngraph-gtk-6.09.05/NEWS0000644000175000017500000000200113070106167011347 00000000000000ngraph-gtk 6.03.48.gtk-26 2009/06/07 ngraph-gtk 6.03.48.gtk-25 2009/05/23 ngraph-gtk 6.03.48.gtk-24 2009/04/26 ngraph-gtk 6.03.48.gtk-23 2009/04/11 ngraph-gtk 6.03.47.gtk-22 2009/03/29 ngraph-gtk 6.03.47.gtk-21 2009/03/21 ngraph-gtk 6.03.47.gtk-20 2009/03/07 ngraph-gtk 6.03.47.gtk-19 2009/02/21 ngraph-gtk 6.03.47.gtk-18 2009/01/24 ngraph-gtk 6.03.47.gtk-17 2009/01/17 ngraph-gtk 6.03.47.gtk-16 2009/01/10 ngraph-gtk 6.03.47.gtk-15 2008/12/27 ngraph-gtk 6.03.47.gtk-14 2008/12/20 ngraph-gtk 6.03.47.gtk-13 2008/12/06 ngraph-gtk 6.03.47.gtk-12 2008/11/22 ngraph-gtk 6.03.47.gtk-11 2008/11/16 ngraph-gtk 6.03.47.gtk-10 2008/11/15 ngraph-gtk 6.03.47.gtk-09 2008/11/08 ngraph-gtk 6.03.47.gtk-08 2008/10/12 ngraph-gtk 6.03.47.gtk-07 2008/09/14 ngraph-gtk 6.03.47.gtk-06 2008/08/31 ngraph-gtk 6.03.47.gtk-05 2008/08/17 ngraph-gtk 6.03.30.gtk-04 2008/08/04 ngraph-gtk 6.03.30.gtk-03 2008/07/13 ngraph-gtk 6.03.30.gtk-02 2008/06/28 ngraph-gtk 6.03.30.gtk-01 2008/06/23 ngraph-gtk initial version 2008/06/08ngraph-gtk-6.09.05/demo/0000755000175000017500000000000014143613315011663 500000000000000ngraph-gtk-6.09.05/demo/demo5d.ngp0000644000175000017500000000121213626716040013466 00000000000000#! ngraph # new text text::x=3000 text::y=6500 text::font="Sans-serif" text::style=1 text::text="Demo #5D: CURVE" # STYLE="" drawcurve() { for i in `seq 0 10` do new path type=curve put path points:"3000 2000 10000 2000 15000 11000 20000 6000 \ 15000 1000 10000 10000 3000 10000" put path R:$R G:$G B:$B put path interpolation:$INTP put path style:"$STYLE" put path width:20 exe path move:"0 7000+${i}*500" done } # R=0 G=256 B=256 INTP=spline drawcurve R=0 G=128 B=256 INTP=spline_close drawcurve STYLE="300 50 50 50" R=0 G=64 B=256 INTP=bspline drawcurve R=0 G=0 B=256 INTP=bspline_close drawcurve # new gra ngraph-gtk-6.09.05/demo/demo3.ngp0000644000175000017500000004441514142161772013334 00000000000000#!ngraph #%creator: Ngraph #%version: 6.09.04 new axis name:fX1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=4500 axis::y=17500 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:4' axis::gauge=left axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=no_zero axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fY1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.7 axis::max=1.1 axis::inc=0.1 axis::div=5 axis::type=linear axis::x=4500 axis::y=17500 axis::direction=9000 axis::baseline=true axis::length=8000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=begin axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.71 axis::gauge_max=2 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fU1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=4500 axis::y=9500 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fR1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=18500 axis::y=17500 axis::direction=9000 axis::baseline=true axis::length=8000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=begin axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=left axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 1 0 1 2 3 new axis name:fX2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=6.8 axis::inc=1 axis::div=0 axis::type=linear axis::x=4500 axis::y=20500 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=no_zero axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fY2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0.15 axis::inc=0.1 axis::div=5 axis::type=linear axis::x=4500 axis::y=20500 axis::direction=9000 axis::baseline=true axis::length=2700 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=end axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=no_zero axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fU2 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=4500 axis::y=17800 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:4' axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fR2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=18500 axis::y=20500 axis::direction=9000 axis::baseline=true axis::length=2700 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=end axis::wave_length=300 axis::wave_width=40 axis::reference='axis:5' axis::gauge=left axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 1 4 5 6 7 new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=2 data::y=3 data::type=line data::interpolation=bspline data::fit= data::math_x= data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=100 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo3.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=2 data::y=3 data::type=mark data::interpolation=spline data::fit= data::math_x='if (%0 > 2, dir = -45); text_align(0, 1); text_size(18); draw_text($col[1], x + 0.1, y, dir); x;' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=30 data::mark_size=400 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo3.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=2 data::y=3 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=100 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:5' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo3.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=2 data::y=3 data::type=mark data::interpolation=spline data::fit= data::math_x='if (%0 > 2, dir = -45); text_align(0, 1); text_size(18); draw_text($col[1], x + 0.1, y, dir); x;' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=30 data::mark_size=400 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:5' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo3.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x= data::math_y='y = 1.05; if(%0 == 3, { text_align(0, 0.5); draw_text("critical value", x + 0.1, y); draw_line(0, y, 1, y, 2, 4); });' data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=0 data::line_width=80 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=0 data::range_max=1 data::range_div=2 data::array= data::file= new rectangle rectangle::hidden=false rectangle::clip=true rectangle::redraw_flag=true rectangle::x1=11000 rectangle::y1=14600 rectangle::x2=18400 rectangle::y2=20300 rectangle::stroke_R=0 rectangle::stroke_G=0 rectangle::stroke_B=0 rectangle::stroke_A=255 rectangle::fill_R=0 rectangle::fill_G=0 rectangle::fill_B=0 rectangle::fill_A=64 rectangle::fill=true rectangle::stroke=false rectangle::width=40 rectangle::style= new rectangle rectangle::hidden=false rectangle::clip=true rectangle::redraw_flag=true rectangle::x1=10700 rectangle::y1=14300 rectangle::x2=18100 rectangle::y2=20000 rectangle::stroke_R=0 rectangle::stroke_G=0 rectangle::stroke_B=0 rectangle::stroke_A=255 rectangle::fill_R=128 rectangle::fill_G=255 rectangle::fill_B=255 rectangle::fill_A=255 rectangle::fill=true rectangle::stroke=true rectangle::width=40 rectangle::style= new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='0' text::x=4000 text::y=21000 text::pt=2000 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='%{file:0:column:1 0}\n%{file:0:column:2 0}\n%{file:0:column:3 0}\n%{file:0:column:4 0}\n%{file:0:column:5 0}\n%{file:0:column:6 0}\n%{file:0:column:7 0}' text::x=11000 text::y=15300 text::pt=2000 text::font='Monospace' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Demo #3: AXIS DIVISION' text::x=2500 text::y=7500 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Sample length (μm)' text::x=9000 text::y=22000 text::pt=2000 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Resistance (KΩ)' text::x=3000 text::y=17000 text::pt=2000 text::font='Sans-serif' text::style=0 text::space=0 text::direction=9000 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::decimalsign=period gra::draw_obj='rectangle axisgrid axis data merge legend arc path mark text' ngraph-gtk-6.09.05/demo/demo.ngp0000644000175000017500000000323714117677552013260 00000000000000#! ngraph set +e ID=${gra:viewer:id} cd "${system::data_dir}/demo/" new sarray name="FILE" for demo in demo1 demo2 demo3 demo4 demo5a demo5b demo5c demo5d demo5e demo6 demo7 demo8 demo9 do sarray::add $demo done new sarray name="CAPTION" sarray::add "Demo #_1: color(), rgb(), hsb() and marksize() FUNCTION" sarray::add "Demo #_2: LEAST SQUARE FIT" sarray::add "Demo #_3: AXIS DIVISION" sarray::add "Demo #_4: MULTI GRAPH" sarray::add "Demo #5_A: ARROW" sarray::add "Demo #5_B: MARK" sarray::add "Demo #5_C: TEXT" sarray::add "Demo #5_D: CURVE" sarray::add "Demo #5_E: AXIS" sarray::add "Demo #_6: POLYGON PLOT" sarray::add "Demo #_7: FUNCTION PLOT" sarray::add 'Demo #_8: draw__rect(), draw__line() and col[]' sarray::add 'Demo #_9: draw__rect() and draw__arc() FUNCTION' sarray::add "_Quit demonstration" caption="'${sarray::join="' '"}'" caption_num="${sarray:CAPTION:num}" del sarray:CAPTION new dialog dialog::title="demo" dialog::caption="select demonstration" dialog::select="0" while true do FILE_INDEX=`get dialog: -field radio:"$caption"` if [ -z "$FILE_INDEX" ] then break fi if [ "$FILE_INDEX" -ge ${sarray:FILE:num} ] then break fi demo=`get sarray:FILE -field get:$FILE_INDEX` for drawrable in `derive -instance draw parameter` do del ${drawrable}:0-! done gra:$ID:clear . ./${demo}.ngp ID2=${gra::id} if [ $ID != $ID2 ] then gra:$ID:close for field in top_margin left_margin zoom draw_obj decimalsign do cpy gra:$ID2,$ID $field done gra:$ID:open del gra:$ID2 fi menu::draw dialog::select=`iexpr "($FILE_INDEX + 1) \\ $caption_num"` done del dialog del sarray:FILE set -e ngraph-gtk-6.09.05/demo/demo5e.ngp0000644000175000017500000000174613070106167013477 00000000000000#! ngraph # new text text::x=3000 text::y=6500 text::font="Sans-serif" text::style=1 text::text="Demo #5E: AXIS" # for i in `seq 0 3000 15000` do new axis name:axis${i} axis::min=0.0 axis::max=0.145 axis::inc=0.01 axis::type=linear axis::x=11000 axis::y=15000 axis::direction=$i axis::length=8000 axis::gauge=both axis::num=left axis::num_align=center axis::num_direction=normal axis::num_shift_n=300 axis::num_log_pow=TRUE axis::num_format="%g" axis::num_no_zero=true axis::num_pt=1200 axis::arrow=end done # for i in `seq 18000 3000 33000` do new axis name:axis${i} axis::min=0.0 axis::max=0.145 axis::inc=0.01 axis::type=linear axis::x=11000 axis::y=15000 axis::direction=$i axis::length=8000 axis::gauge=both axis::num=left axis::num_align=center axis::num_direction=parallel2 axis::num_shift_n=300 axis::num_log_pow=TRUE axis::num_format="%g" axis::num_no_zero=true axis::num_pt=1200 axis::arrow=end done # new gra ngraph-gtk-6.09.05/demo/Makefile.in0000644000175000017500000003777614143146775013707 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = demo ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_demo_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(demodir)" DATA = $(dist_demo_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ demodir = $(pkgdatadir)/demo dist_demo_DATA = demo1.dat demo2.dat demo3.dat demo6.dat demo8.dat \ demo9.dat demo.ngp demo1.ngp demo2.ngp demo3.ngp demo4.ngp \ demo5a.ngp demo5b.ngp demo5c.ngp demo5d.ngp demo5e.ngp \ demo6.ngp demo7.ngp demo8.ngp demo9.ngp all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu demo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu demo/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_demoDATA: $(dist_demo_DATA) @$(NORMAL_INSTALL) @list='$(dist_demo_DATA)'; test -n "$(demodir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(demodir)'"; \ $(MKDIR_P) "$(DESTDIR)$(demodir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(demodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(demodir)" || exit $$?; \ done uninstall-dist_demoDATA: @$(NORMAL_UNINSTALL) @list='$(dist_demo_DATA)'; test -n "$(demodir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(demodir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(demodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_demoDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_demoDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_demoDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_demoDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/demo/demo5b.ngp0000644000175000017500000000060013626716040013464 00000000000000#! ngraph # new text text::x=3000 text::y=6500 text::font="Sans-serif" text::style=1 text::text="Demo #5B: MARK" # for i in `seq 0 8` do for j in `seq 0 9` do new mark x:"2500+${j}*1800" y:"8000+${i}*1800" put mark R:0 G:0 B:0 R2:0 G2:128 B2:128 put mark size:1600 put mark style: put mark width:100 put mark type:`iexpr $i\*10+$j` done done # new gra ngraph-gtk-6.09.05/demo/demo8.dat0000644000175000017500000240000013230344424013303 000000000000005.005E-03 4.634E-03 4.261E-03 3.891E-03 3.524E-03 3.164E-03 2.813E-03 2.473E-03 2.145E-03 1.834E-03 1.540E-03 1.265E-03 1.013E-03 7.841E-04 5.812E-04 4.060E-04 2.601E-04 1.451E-04 6.260E-05 1.389E-05 2.521E-07 2.278E-05 8.243E-05 1.800E-04 3.162E-04 4.916E-04 7.064E-04 9.609E-04 1.255E-03 1.589E-03 1.963E-03 2.375E-03 2.826E-03 3.314E-03 3.840E-03 4.402E-03 4.998E-03 5.628E-03 6.291E-03 6.984E-03 7.707E-03 8.458E-03 9.234E-03 1.004E-02 1.086E-02 1.170E-02 1.257E-02 1.344E-02 1.434E-02 1.525E-02 1.616E-02 1.709E-02 1.802E-02 1.896E-02 1.989E-02 2.083E-02 2.177E-02 2.270E-02 2.363E-02 2.455E-02 2.547E-02 2.637E-02 2.726E-02 2.814E-02 2.900E-02 2.985E-02 3.067E-02 3.148E-02 3.227E-02 3.304E-02 3.379E-02 3.452E-02 3.522E-02 3.590E-02 3.656E-02 3.719E-02 3.779E-02 3.838E-02 3.893E-02 3.946E-02 3.997E-02 4.045E-02 4.091E-02 4.134E-02 4.175E-02 4.213E-02 4.250E-02 4.283E-02 4.315E-02 4.344E-02 4.372E-02 4.397E-02 4.420E-02 4.442E-02 4.462E-02 4.479E-02 4.496E-02 4.510E-02 4.524E-02 4.535E-02 4.546E-02 4.555E-02 4.563E-02 4.570E-02 4.576E-02 4.581E-02 4.585E-02 4.589E-02 4.591E-02 4.593E-02 4.595E-02 4.596E-02 4.597E-02 4.597E-02 4.597E-02 4.597E-02 4.596E-02 4.596E-02 4.595E-02 4.594E-02 4.594E-02 4.593E-02 4.592E-02 4.592E-02 4.591E-02 4.591E-02 4.590E-02 4.590E-02 4.590E-02 4.590E-02 4.590E-02 4.591E-02 4.591E-02 4.592E-02 4.592E-02 4.593E-02 4.594E-02 4.594E-02 4.595E-02 4.596E-02 4.596E-02 4.597E-02 4.597E-02 4.597E-02 4.597E-02 4.596E-02 4.595E-02 4.593E-02 4.591E-02 4.589E-02 4.585E-02 4.581E-02 4.576E-02 4.570E-02 4.563E-02 4.555E-02 4.546E-02 4.535E-02 4.524E-02 4.510E-02 4.496E-02 4.479E-02 4.462E-02 4.442E-02 4.420E-02 4.397E-02 4.372E-02 4.344E-02 4.315E-02 4.283E-02 4.250E-02 4.213E-02 4.175E-02 4.134E-02 4.091E-02 4.045E-02 3.997E-02 3.946E-02 3.893E-02 3.838E-02 3.779E-02 3.719E-02 3.656E-02 3.590E-02 3.522E-02 3.452E-02 3.379E-02 3.304E-02 3.227E-02 3.148E-02 3.067E-02 2.985E-02 2.900E-02 2.814E-02 2.726E-02 2.637E-02 2.547E-02 2.455E-02 2.363E-02 2.270E-02 2.177E-02 2.083E-02 1.989E-02 1.896E-02 1.802E-02 1.709E-02 1.616E-02 1.525E-02 1.434E-02 1.344E-02 1.257E-02 1.170E-02 1.086E-02 1.004E-02 9.234E-03 8.458E-03 7.707E-03 6.984E-03 6.291E-03 5.628E-03 4.998E-03 4.402E-03 3.840E-03 3.314E-03 2.826E-03 2.375E-03 1.963E-03 1.589E-03 1.255E-03 9.609E-04 7.064E-04 4.916E-04 3.162E-04 1.800E-04 8.243E-05 2.278E-05 2.521E-07 1.389E-05 6.260E-05 1.451E-04 2.601E-04 4.060E-04 5.812E-04 7.841E-04 1.013E-03 1.265E-03 1.540E-03 1.834E-03 2.145E-03 2.473E-03 2.813E-03 3.164E-03 3.524E-03 3.891E-03 4.261E-03 4.634E-03 4.634E-03 4.258E-03 3.885E-03 3.516E-03 3.153E-03 2.799E-03 2.456E-03 2.127E-03 1.813E-03 1.518E-03 1.243E-03 9.900E-04 7.617E-04 5.598E-04 3.863E-04 2.428E-04 1.312E-04 5.282E-05 9.190E-06 1.565E-06 3.108E-05 9.874E-05 2.054E-04 3.517E-04 5.381E-04 7.652E-04 1.033E-03 1.342E-03 1.691E-03 2.081E-03 2.511E-03 2.980E-03 3.488E-03 4.033E-03 4.616E-03 5.234E-03 5.887E-03 6.573E-03 7.290E-03 8.037E-03 8.813E-03 9.614E-03 1.044E-02 1.129E-02 1.216E-02 1.305E-02 1.395E-02 1.487E-02 1.580E-02 1.674E-02 1.769E-02 1.865E-02 1.961E-02 2.057E-02 2.153E-02 2.249E-02 2.344E-02 2.439E-02 2.533E-02 2.626E-02 2.717E-02 2.808E-02 2.897E-02 2.984E-02 3.069E-02 3.153E-02 3.235E-02 3.314E-02 3.391E-02 3.466E-02 3.539E-02 3.609E-02 3.676E-02 3.741E-02 3.804E-02 3.864E-02 3.921E-02 3.975E-02 4.027E-02 4.076E-02 4.123E-02 4.167E-02 4.208E-02 4.247E-02 4.283E-02 4.317E-02 4.349E-02 4.378E-02 4.405E-02 4.430E-02 4.452E-02 4.473E-02 4.492E-02 4.508E-02 4.523E-02 4.537E-02 4.548E-02 4.559E-02 4.567E-02 4.575E-02 4.581E-02 4.586E-02 4.590E-02 4.593E-02 4.595E-02 4.597E-02 4.597E-02 4.597E-02 4.597E-02 4.595E-02 4.594E-02 4.592E-02 4.590E-02 4.588E-02 4.585E-02 4.583E-02 4.580E-02 4.578E-02 4.575E-02 4.573E-02 4.571E-02 4.569E-02 4.567E-02 4.565E-02 4.564E-02 4.563E-02 4.562E-02 4.562E-02 4.561E-02 4.562E-02 4.562E-02 4.563E-02 4.564E-02 4.565E-02 4.567E-02 4.569E-02 4.571E-02 4.573E-02 4.575E-02 4.578E-02 4.580E-02 4.583E-02 4.585E-02 4.588E-02 4.590E-02 4.592E-02 4.594E-02 4.595E-02 4.597E-02 4.597E-02 4.597E-02 4.597E-02 4.595E-02 4.593E-02 4.590E-02 4.586E-02 4.581E-02 4.575E-02 4.567E-02 4.559E-02 4.548E-02 4.537E-02 4.523E-02 4.508E-02 4.492E-02 4.473E-02 4.452E-02 4.430E-02 4.405E-02 4.378E-02 4.349E-02 4.317E-02 4.283E-02 4.247E-02 4.208E-02 4.167E-02 4.123E-02 4.076E-02 4.027E-02 3.975E-02 3.921E-02 3.864E-02 3.804E-02 3.741E-02 3.676E-02 3.609E-02 3.539E-02 3.466E-02 3.391E-02 3.314E-02 3.235E-02 3.153E-02 3.069E-02 2.984E-02 2.897E-02 2.808E-02 2.717E-02 2.626E-02 2.533E-02 2.439E-02 2.344E-02 2.249E-02 2.153E-02 2.057E-02 1.961E-02 1.865E-02 1.769E-02 1.674E-02 1.580E-02 1.487E-02 1.395E-02 1.305E-02 1.216E-02 1.129E-02 1.044E-02 9.614E-03 8.813E-03 8.037E-03 7.290E-03 6.573E-03 5.887E-03 5.234E-03 4.616E-03 4.033E-03 3.488E-03 2.980E-03 2.511E-03 2.081E-03 1.691E-03 1.342E-03 1.033E-03 7.652E-04 5.381E-04 3.517E-04 2.054E-04 9.874E-05 3.108E-05 1.565E-06 9.190E-06 5.282E-05 1.312E-04 2.428E-04 3.863E-04 5.598E-04 7.617E-04 9.900E-04 1.243E-03 1.518E-03 1.813E-03 2.127E-03 2.456E-03 2.799E-03 3.153E-03 3.516E-03 3.885E-03 4.258E-03 4.261E-03 3.885E-03 3.513E-03 3.147E-03 2.790E-03 2.445E-03 2.113E-03 1.798E-03 1.501E-03 1.225E-03 9.715E-04 7.432E-04 5.419E-04 3.697E-04 2.283E-04 1.195E-04 4.486E-05 5.812E-06 3.699E-06 3.969E-05 1.148E-04 2.299E-04 3.858E-04 5.828E-04 8.215E-04 1.102E-03 1.424E-03 1.789E-03 2.194E-03 2.641E-03 3.128E-03 3.654E-03 4.220E-03 4.823E-03 5.463E-03 6.137E-03 6.846E-03 7.586E-03 8.357E-03 9.157E-03 9.983E-03 1.083E-02 1.171E-02 1.260E-02 1.352E-02 1.445E-02 1.539E-02 1.635E-02 1.731E-02 1.828E-02 1.926E-02 2.024E-02 2.123E-02 2.221E-02 2.318E-02 2.416E-02 2.512E-02 2.608E-02 2.702E-02 2.795E-02 2.887E-02 2.977E-02 3.065E-02 3.151E-02 3.235E-02 3.317E-02 3.397E-02 3.474E-02 3.549E-02 3.622E-02 3.691E-02 3.758E-02 3.822E-02 3.884E-02 3.943E-02 3.999E-02 4.052E-02 4.102E-02 4.149E-02 4.194E-02 4.236E-02 4.275E-02 4.312E-02 4.346E-02 4.377E-02 4.406E-02 4.433E-02 4.457E-02 4.479E-02 4.498E-02 4.516E-02 4.531E-02 4.545E-02 4.557E-02 4.567E-02 4.575E-02 4.582E-02 4.588E-02 4.592E-02 4.595E-02 4.596E-02 4.597E-02 4.597E-02 4.596E-02 4.594E-02 4.591E-02 4.588E-02 4.585E-02 4.581E-02 4.576E-02 4.572E-02 4.567E-02 4.562E-02 4.557E-02 4.552E-02 4.547E-02 4.542E-02 4.538E-02 4.533E-02 4.529E-02 4.526E-02 4.522E-02 4.519E-02 4.517E-02 4.515E-02 4.513E-02 4.512E-02 4.511E-02 4.511E-02 4.511E-02 4.512E-02 4.513E-02 4.515E-02 4.517E-02 4.519E-02 4.522E-02 4.526E-02 4.529E-02 4.533E-02 4.538E-02 4.542E-02 4.547E-02 4.552E-02 4.557E-02 4.562E-02 4.567E-02 4.572E-02 4.576E-02 4.581E-02 4.585E-02 4.588E-02 4.591E-02 4.594E-02 4.596E-02 4.597E-02 4.597E-02 4.596E-02 4.595E-02 4.592E-02 4.588E-02 4.582E-02 4.575E-02 4.567E-02 4.557E-02 4.545E-02 4.531E-02 4.516E-02 4.498E-02 4.479E-02 4.457E-02 4.433E-02 4.406E-02 4.377E-02 4.346E-02 4.312E-02 4.275E-02 4.236E-02 4.194E-02 4.149E-02 4.102E-02 4.052E-02 3.999E-02 3.943E-02 3.884E-02 3.822E-02 3.758E-02 3.691E-02 3.622E-02 3.549E-02 3.474E-02 3.397E-02 3.317E-02 3.235E-02 3.151E-02 3.065E-02 2.977E-02 2.887E-02 2.795E-02 2.702E-02 2.608E-02 2.512E-02 2.416E-02 2.318E-02 2.221E-02 2.123E-02 2.024E-02 1.926E-02 1.828E-02 1.731E-02 1.635E-02 1.539E-02 1.445E-02 1.352E-02 1.260E-02 1.171E-02 1.083E-02 9.983E-03 9.157E-03 8.357E-03 7.586E-03 6.846E-03 6.137E-03 5.463E-03 4.823E-03 4.220E-03 3.654E-03 3.128E-03 2.641E-03 2.194E-03 1.789E-03 1.424E-03 1.102E-03 8.215E-04 5.828E-04 3.858E-04 2.299E-04 1.148E-04 3.969E-05 3.699E-06 5.812E-06 4.486E-05 1.195E-04 2.283E-04 3.697E-04 5.419E-04 7.432E-04 9.715E-04 1.225E-03 1.501E-03 1.798E-03 2.113E-03 2.445E-03 2.790E-03 3.147E-03 3.513E-03 3.885E-03 3.891E-03 3.516E-03 3.147E-03 2.787E-03 2.440E-03 2.106E-03 1.788E-03 1.489E-03 1.212E-03 9.572E-04 7.285E-04 5.275E-04 3.562E-04 2.164E-04 1.099E-04 3.847E-05 3.484E-06 6.341E-06 4.826E-05 1.303E-04 2.533E-04 4.181E-04 6.251E-04 8.748E-04 1.167E-03 1.503E-03 1.881E-03 2.302E-03 2.765E-03 3.269E-03 3.814E-03 4.398E-03 5.021E-03 5.682E-03 6.378E-03 7.108E-03 7.871E-03 8.665E-03 9.488E-03 1.034E-02 1.121E-02 1.211E-02 1.303E-02 1.397E-02 1.492E-02 1.589E-02 1.687E-02 1.786E-02 1.886E-02 1.986E-02 2.086E-02 2.186E-02 2.286E-02 2.386E-02 2.485E-02 2.583E-02 2.680E-02 2.776E-02 2.870E-02 2.963E-02 3.054E-02 3.143E-02 3.229E-02 3.314E-02 3.396E-02 3.476E-02 3.553E-02 3.628E-02 3.700E-02 3.769E-02 3.835E-02 3.899E-02 3.959E-02 4.016E-02 4.071E-02 4.122E-02 4.171E-02 4.216E-02 4.259E-02 4.299E-02 4.336E-02 4.370E-02 4.401E-02 4.430E-02 4.456E-02 4.479E-02 4.500E-02 4.519E-02 4.535E-02 4.550E-02 4.562E-02 4.572E-02 4.580E-02 4.587E-02 4.592E-02 4.595E-02 4.597E-02 4.597E-02 4.596E-02 4.595E-02 4.592E-02 4.588E-02 4.583E-02 4.578E-02 4.572E-02 4.565E-02 4.558E-02 4.551E-02 4.543E-02 4.536E-02 4.528E-02 4.520E-02 4.512E-02 4.504E-02 4.497E-02 4.489E-02 4.483E-02 4.476E-02 4.470E-02 4.464E-02 4.459E-02 4.454E-02 4.450E-02 4.446E-02 4.443E-02 4.441E-02 4.439E-02 4.438E-02 4.438E-02 4.438E-02 4.439E-02 4.441E-02 4.443E-02 4.446E-02 4.450E-02 4.454E-02 4.459E-02 4.464E-02 4.470E-02 4.476E-02 4.483E-02 4.489E-02 4.497E-02 4.504E-02 4.512E-02 4.520E-02 4.528E-02 4.536E-02 4.543E-02 4.551E-02 4.558E-02 4.565E-02 4.572E-02 4.578E-02 4.583E-02 4.588E-02 4.592E-02 4.595E-02 4.596E-02 4.597E-02 4.597E-02 4.595E-02 4.592E-02 4.587E-02 4.580E-02 4.572E-02 4.562E-02 4.550E-02 4.535E-02 4.519E-02 4.500E-02 4.479E-02 4.456E-02 4.430E-02 4.401E-02 4.370E-02 4.336E-02 4.299E-02 4.259E-02 4.216E-02 4.171E-02 4.122E-02 4.071E-02 4.016E-02 3.959E-02 3.899E-02 3.835E-02 3.769E-02 3.700E-02 3.628E-02 3.553E-02 3.476E-02 3.396E-02 3.314E-02 3.229E-02 3.143E-02 3.054E-02 2.963E-02 2.870E-02 2.776E-02 2.680E-02 2.583E-02 2.485E-02 2.386E-02 2.286E-02 2.186E-02 2.086E-02 1.986E-02 1.886E-02 1.786E-02 1.687E-02 1.589E-02 1.492E-02 1.397E-02 1.303E-02 1.211E-02 1.121E-02 1.034E-02 9.488E-03 8.665E-03 7.871E-03 7.108E-03 6.378E-03 5.682E-03 5.021E-03 4.398E-03 3.814E-03 3.269E-03 2.765E-03 2.302E-03 1.881E-03 1.503E-03 1.167E-03 8.748E-04 6.251E-04 4.181E-04 2.533E-04 1.303E-04 4.826E-05 6.341E-06 3.484E-06 3.847E-05 1.099E-04 2.164E-04 3.562E-04 5.275E-04 7.285E-04 9.572E-04 1.212E-03 1.489E-03 1.788E-03 2.106E-03 2.440E-03 2.787E-03 3.147E-03 3.516E-03 3.524E-03 3.153E-03 2.790E-03 2.440E-03 2.103E-03 1.783E-03 1.482E-03 1.203E-03 9.471E-04 7.176E-04 5.164E-04 3.455E-04 2.068E-04 1.022E-04 3.344E-05 1.956E-06 9.211E-06 5.645E-05 1.448E-04 2.751E-04 4.481E-04 6.645E-04 9.246E-04 1.229E-03 1.577E-03 1.969E-03 2.404E-03 2.882E-03 3.403E-03 3.965E-03 4.568E-03 5.210E-03 5.891E-03 6.608E-03 7.359E-03 8.145E-03 8.961E-03 9.807E-03 1.068E-02 1.158E-02 1.250E-02 1.344E-02 1.441E-02 1.538E-02 1.638E-02 1.738E-02 1.839E-02 1.941E-02 2.043E-02 2.145E-02 2.247E-02 2.349E-02 2.451E-02 2.551E-02 2.651E-02 2.750E-02 2.847E-02 2.942E-02 3.036E-02 3.127E-02 3.217E-02 3.304E-02 3.389E-02 3.472E-02 3.552E-02 3.629E-02 3.703E-02 3.774E-02 3.843E-02 3.908E-02 3.970E-02 4.029E-02 4.085E-02 4.138E-02 4.187E-02 4.234E-02 4.277E-02 4.318E-02 4.355E-02 4.389E-02 4.420E-02 4.449E-02 4.474E-02 4.497E-02 4.518E-02 4.535E-02 4.551E-02 4.563E-02 4.574E-02 4.583E-02 4.589E-02 4.593E-02 4.596E-02 4.597E-02 4.597E-02 4.594E-02 4.591E-02 4.586E-02 4.581E-02 4.574E-02 4.566E-02 4.558E-02 4.548E-02 4.539E-02 4.528E-02 4.518E-02 4.507E-02 4.496E-02 4.485E-02 4.473E-02 4.462E-02 4.451E-02 4.440E-02 4.430E-02 4.420E-02 4.410E-02 4.401E-02 4.392E-02 4.384E-02 4.377E-02 4.370E-02 4.364E-02 4.359E-02 4.354E-02 4.350E-02 4.347E-02 4.345E-02 4.344E-02 4.343E-02 4.344E-02 4.345E-02 4.347E-02 4.350E-02 4.354E-02 4.359E-02 4.364E-02 4.370E-02 4.377E-02 4.384E-02 4.392E-02 4.401E-02 4.410E-02 4.420E-02 4.430E-02 4.440E-02 4.451E-02 4.462E-02 4.473E-02 4.485E-02 4.496E-02 4.507E-02 4.518E-02 4.528E-02 4.539E-02 4.548E-02 4.558E-02 4.566E-02 4.574E-02 4.581E-02 4.586E-02 4.591E-02 4.594E-02 4.597E-02 4.597E-02 4.596E-02 4.593E-02 4.589E-02 4.583E-02 4.574E-02 4.563E-02 4.551E-02 4.535E-02 4.518E-02 4.497E-02 4.474E-02 4.449E-02 4.420E-02 4.389E-02 4.355E-02 4.318E-02 4.277E-02 4.234E-02 4.187E-02 4.138E-02 4.085E-02 4.029E-02 3.970E-02 3.908E-02 3.843E-02 3.774E-02 3.703E-02 3.629E-02 3.552E-02 3.472E-02 3.389E-02 3.304E-02 3.217E-02 3.127E-02 3.036E-02 2.942E-02 2.847E-02 2.750E-02 2.651E-02 2.551E-02 2.451E-02 2.349E-02 2.247E-02 2.145E-02 2.043E-02 1.941E-02 1.839E-02 1.738E-02 1.638E-02 1.538E-02 1.441E-02 1.344E-02 1.250E-02 1.158E-02 1.068E-02 9.807E-03 8.961E-03 8.145E-03 7.359E-03 6.608E-03 5.891E-03 5.210E-03 4.568E-03 3.965E-03 3.403E-03 2.882E-03 2.404E-03 1.969E-03 1.577E-03 1.229E-03 9.246E-04 6.645E-04 4.481E-04 2.751E-04 1.448E-04 5.645E-05 9.211E-06 1.956E-06 3.344E-05 1.022E-04 2.068E-04 3.455E-04 5.164E-04 7.176E-04 9.471E-04 1.203E-03 1.482E-03 1.783E-03 2.103E-03 2.440E-03 2.790E-03 3.153E-03 3.164E-03 2.799E-03 2.445E-03 2.106E-03 1.783E-03 1.480E-03 1.198E-03 9.410E-04 7.104E-04 5.085E-04 3.376E-04 1.995E-04 9.628E-05 2.957E-05 1.016E-06 1.206E-05 6.401E-05 1.580E-04 2.949E-04 4.756E-04 7.007E-04 9.705E-04 1.285E-03 1.645E-03 2.050E-03 2.499E-03 2.992E-03 3.529E-03 4.108E-03 4.729E-03 5.389E-03 6.089E-03 6.826E-03 7.599E-03 8.405E-03 9.244E-03 1.011E-02 1.101E-02 1.193E-02 1.288E-02 1.384E-02 1.483E-02 1.583E-02 1.684E-02 1.787E-02 1.890E-02 1.994E-02 2.098E-02 2.202E-02 2.307E-02 2.410E-02 2.513E-02 2.616E-02 2.717E-02 2.816E-02 2.915E-02 3.011E-02 3.106E-02 3.198E-02 3.288E-02 3.376E-02 3.461E-02 3.544E-02 3.623E-02 3.700E-02 3.774E-02 3.844E-02 3.912E-02 3.976E-02 4.037E-02 4.094E-02 4.148E-02 4.199E-02 4.247E-02 4.291E-02 4.332E-02 4.370E-02 4.405E-02 4.436E-02 4.464E-02 4.490E-02 4.512E-02 4.531E-02 4.548E-02 4.562E-02 4.574E-02 4.583E-02 4.590E-02 4.594E-02 4.597E-02 4.597E-02 4.596E-02 4.593E-02 4.588E-02 4.582E-02 4.574E-02 4.565E-02 4.555E-02 4.544E-02 4.532E-02 4.520E-02 4.506E-02 4.492E-02 4.478E-02 4.464E-02 4.449E-02 4.434E-02 4.419E-02 4.404E-02 4.390E-02 4.375E-02 4.361E-02 4.347E-02 4.334E-02 4.321E-02 4.309E-02 4.298E-02 4.287E-02 4.277E-02 4.268E-02 4.260E-02 4.252E-02 4.246E-02 4.240E-02 4.236E-02 4.232E-02 4.230E-02 4.228E-02 4.227E-02 4.228E-02 4.230E-02 4.232E-02 4.236E-02 4.240E-02 4.246E-02 4.252E-02 4.260E-02 4.268E-02 4.277E-02 4.287E-02 4.298E-02 4.309E-02 4.321E-02 4.334E-02 4.347E-02 4.361E-02 4.375E-02 4.390E-02 4.404E-02 4.419E-02 4.434E-02 4.449E-02 4.464E-02 4.478E-02 4.492E-02 4.506E-02 4.520E-02 4.532E-02 4.544E-02 4.555E-02 4.565E-02 4.574E-02 4.582E-02 4.588E-02 4.593E-02 4.596E-02 4.597E-02 4.597E-02 4.594E-02 4.590E-02 4.583E-02 4.574E-02 4.562E-02 4.548E-02 4.531E-02 4.512E-02 4.490E-02 4.464E-02 4.436E-02 4.405E-02 4.370E-02 4.332E-02 4.291E-02 4.247E-02 4.199E-02 4.148E-02 4.094E-02 4.037E-02 3.976E-02 3.912E-02 3.844E-02 3.774E-02 3.700E-02 3.623E-02 3.544E-02 3.461E-02 3.376E-02 3.288E-02 3.198E-02 3.106E-02 3.011E-02 2.915E-02 2.816E-02 2.717E-02 2.616E-02 2.513E-02 2.410E-02 2.307E-02 2.202E-02 2.098E-02 1.994E-02 1.890E-02 1.787E-02 1.684E-02 1.583E-02 1.483E-02 1.384E-02 1.288E-02 1.193E-02 1.101E-02 1.011E-02 9.244E-03 8.405E-03 7.599E-03 6.826E-03 6.089E-03 5.389E-03 4.729E-03 4.108E-03 3.529E-03 2.992E-03 2.499E-03 2.050E-03 1.645E-03 1.285E-03 9.705E-04 7.007E-04 4.756E-04 2.949E-04 1.580E-04 6.401E-05 1.206E-05 1.016E-06 2.957E-05 9.628E-05 1.995E-04 3.376E-04 5.085E-04 7.104E-04 9.410E-04 1.198E-03 1.480E-03 1.783E-03 2.106E-03 2.445E-03 2.799E-03 2.813E-03 2.456E-03 2.113E-03 1.788E-03 1.482E-03 1.198E-03 9.390E-04 7.068E-04 5.038E-04 3.324E-04 1.944E-04 9.192E-05 2.673E-05 4.832E-07 1.469E-05 7.067E-05 1.696E-04 3.125E-04 5.001E-04 7.331E-04 1.012E-03 1.337E-03 1.708E-03 2.124E-03 2.587E-03 3.094E-03 3.646E-03 4.241E-03 4.879E-03 5.557E-03 6.276E-03 7.032E-03 7.825E-03 8.652E-03 9.512E-03 1.040E-02 1.132E-02 1.226E-02 1.323E-02 1.422E-02 1.523E-02 1.625E-02 1.729E-02 1.833E-02 1.939E-02 2.045E-02 2.151E-02 2.257E-02 2.363E-02 2.469E-02 2.573E-02 2.677E-02 2.780E-02 2.881E-02 2.980E-02 3.077E-02 3.173E-02 3.266E-02 3.356E-02 3.444E-02 3.530E-02 3.612E-02 3.691E-02 3.767E-02 3.840E-02 3.910E-02 3.976E-02 4.039E-02 4.099E-02 4.154E-02 4.207E-02 4.256E-02 4.301E-02 4.343E-02 4.381E-02 4.416E-02 4.448E-02 4.476E-02 4.501E-02 4.523E-02 4.542E-02 4.558E-02 4.571E-02 4.581E-02 4.589E-02 4.594E-02 4.597E-02 4.597E-02 4.595E-02 4.591E-02 4.586E-02 4.578E-02 4.569E-02 4.558E-02 4.546E-02 4.533E-02 4.518E-02 4.503E-02 4.487E-02 4.470E-02 4.452E-02 4.434E-02 4.416E-02 4.397E-02 4.378E-02 4.359E-02 4.340E-02 4.321E-02 4.303E-02 4.285E-02 4.267E-02 4.250E-02 4.233E-02 4.217E-02 4.202E-02 4.187E-02 4.174E-02 4.161E-02 4.149E-02 4.138E-02 4.128E-02 4.120E-02 4.112E-02 4.106E-02 4.100E-02 4.096E-02 4.093E-02 4.091E-02 4.091E-02 4.091E-02 4.093E-02 4.096E-02 4.100E-02 4.106E-02 4.112E-02 4.120E-02 4.128E-02 4.138E-02 4.149E-02 4.161E-02 4.174E-02 4.187E-02 4.202E-02 4.217E-02 4.233E-02 4.250E-02 4.267E-02 4.285E-02 4.303E-02 4.321E-02 4.340E-02 4.359E-02 4.378E-02 4.397E-02 4.416E-02 4.434E-02 4.452E-02 4.470E-02 4.487E-02 4.503E-02 4.518E-02 4.533E-02 4.546E-02 4.558E-02 4.569E-02 4.578E-02 4.586E-02 4.591E-02 4.595E-02 4.597E-02 4.597E-02 4.594E-02 4.589E-02 4.581E-02 4.571E-02 4.558E-02 4.542E-02 4.523E-02 4.501E-02 4.476E-02 4.448E-02 4.416E-02 4.381E-02 4.343E-02 4.301E-02 4.256E-02 4.207E-02 4.154E-02 4.099E-02 4.039E-02 3.976E-02 3.910E-02 3.840E-02 3.767E-02 3.691E-02 3.612E-02 3.530E-02 3.444E-02 3.356E-02 3.266E-02 3.173E-02 3.077E-02 2.980E-02 2.881E-02 2.780E-02 2.677E-02 2.573E-02 2.469E-02 2.363E-02 2.257E-02 2.151E-02 2.045E-02 1.939E-02 1.833E-02 1.729E-02 1.625E-02 1.523E-02 1.422E-02 1.323E-02 1.226E-02 1.132E-02 1.040E-02 9.512E-03 8.652E-03 7.825E-03 7.032E-03 6.276E-03 5.557E-03 4.879E-03 4.241E-03 3.646E-03 3.094E-03 2.587E-03 2.124E-03 1.708E-03 1.337E-03 1.012E-03 7.331E-04 5.001E-04 3.125E-04 1.696E-04 7.067E-05 1.469E-05 4.832E-07 2.673E-05 9.192E-05 1.944E-04 3.324E-04 5.038E-04 7.068E-04 9.390E-04 1.198E-03 1.482E-03 1.788E-03 2.113E-03 2.456E-03 2.473E-03 2.127E-03 1.798E-03 1.489E-03 1.203E-03 9.410E-04 7.068E-04 5.023E-04 3.298E-04 1.913E-04 8.907E-05 2.478E-05 2.117E-07 1.691E-05 7.626E-05 1.795E-04 3.276E-04 5.214E-04 7.616E-04 1.049E-03 1.383E-03 1.764E-03 2.192E-03 2.667E-03 3.188E-03 3.754E-03 4.364E-03 5.018E-03 5.714E-03 6.450E-03 7.225E-03 8.037E-03 8.884E-03 9.765E-03 1.068E-02 1.162E-02 1.258E-02 1.357E-02 1.458E-02 1.561E-02 1.666E-02 1.771E-02 1.878E-02 1.986E-02 2.094E-02 2.202E-02 2.310E-02 2.418E-02 2.525E-02 2.631E-02 2.736E-02 2.840E-02 2.942E-02 3.042E-02 3.141E-02 3.237E-02 3.330E-02 3.421E-02 3.509E-02 3.594E-02 3.676E-02 3.755E-02 3.831E-02 3.903E-02 3.972E-02 4.037E-02 4.098E-02 4.156E-02 4.210E-02 4.260E-02 4.307E-02 4.350E-02 4.389E-02 4.425E-02 4.457E-02 4.485E-02 4.510E-02 4.532E-02 4.550E-02 4.566E-02 4.578E-02 4.587E-02 4.593E-02 4.596E-02 4.597E-02 4.595E-02 4.591E-02 4.585E-02 4.577E-02 4.566E-02 4.554E-02 4.540E-02 4.525E-02 4.508E-02 4.490E-02 4.471E-02 4.451E-02 4.430E-02 4.409E-02 4.386E-02 4.364E-02 4.341E-02 4.318E-02 4.295E-02 4.271E-02 4.248E-02 4.225E-02 4.203E-02 4.181E-02 4.159E-02 4.138E-02 4.118E-02 4.098E-02 4.080E-02 4.062E-02 4.045E-02 4.029E-02 4.015E-02 4.001E-02 3.988E-02 3.977E-02 3.967E-02 3.958E-02 3.951E-02 3.945E-02 3.940E-02 3.937E-02 3.935E-02 3.934E-02 3.935E-02 3.937E-02 3.940E-02 3.945E-02 3.951E-02 3.958E-02 3.967E-02 3.977E-02 3.988E-02 4.001E-02 4.015E-02 4.029E-02 4.045E-02 4.062E-02 4.080E-02 4.098E-02 4.118E-02 4.138E-02 4.159E-02 4.181E-02 4.203E-02 4.225E-02 4.248E-02 4.271E-02 4.295E-02 4.318E-02 4.341E-02 4.364E-02 4.386E-02 4.409E-02 4.430E-02 4.451E-02 4.471E-02 4.490E-02 4.508E-02 4.525E-02 4.540E-02 4.554E-02 4.566E-02 4.577E-02 4.585E-02 4.591E-02 4.595E-02 4.597E-02 4.596E-02 4.593E-02 4.587E-02 4.578E-02 4.566E-02 4.550E-02 4.532E-02 4.510E-02 4.485E-02 4.457E-02 4.425E-02 4.389E-02 4.350E-02 4.307E-02 4.260E-02 4.210E-02 4.156E-02 4.098E-02 4.037E-02 3.972E-02 3.903E-02 3.831E-02 3.755E-02 3.676E-02 3.594E-02 3.509E-02 3.421E-02 3.330E-02 3.237E-02 3.141E-02 3.042E-02 2.942E-02 2.840E-02 2.736E-02 2.631E-02 2.525E-02 2.418E-02 2.310E-02 2.202E-02 2.094E-02 1.986E-02 1.878E-02 1.771E-02 1.666E-02 1.561E-02 1.458E-02 1.357E-02 1.258E-02 1.162E-02 1.068E-02 9.765E-03 8.884E-03 8.037E-03 7.225E-03 6.450E-03 5.714E-03 5.018E-03 4.364E-03 3.754E-03 3.188E-03 2.667E-03 2.192E-03 1.764E-03 1.383E-03 1.049E-03 7.616E-04 5.214E-04 3.276E-04 1.795E-04 7.626E-05 1.691E-05 2.117E-07 2.478E-05 8.907E-05 1.913E-04 3.298E-04 5.023E-04 7.068E-04 9.410E-04 1.203E-03 1.489E-03 1.798E-03 2.127E-03 2.145E-03 1.813E-03 1.501E-03 1.212E-03 9.471E-04 7.104E-04 5.038E-04 3.298E-04 1.903E-04 8.765E-05 2.365E-05 9.200E-08 1.859E-05 8.059E-05 1.873E-04 3.399E-04 5.391E-04 7.858E-04 1.080E-03 1.423E-03 1.813E-03 2.252E-03 2.738E-03 3.272E-03 3.852E-03 4.477E-03 5.146E-03 5.858E-03 6.611E-03 7.404E-03 8.235E-03 9.102E-03 1.000E-02 1.093E-02 1.189E-02 1.288E-02 1.389E-02 1.492E-02 1.597E-02 1.704E-02 1.812E-02 1.921E-02 2.030E-02 2.140E-02 2.250E-02 2.360E-02 2.469E-02 2.578E-02 2.686E-02 2.792E-02 2.897E-02 3.001E-02 3.102E-02 3.201E-02 3.297E-02 3.391E-02 3.482E-02 3.571E-02 3.656E-02 3.737E-02 3.816E-02 3.890E-02 3.962E-02 4.029E-02 4.093E-02 4.153E-02 4.209E-02 4.261E-02 4.309E-02 4.353E-02 4.393E-02 4.430E-02 4.463E-02 4.492E-02 4.517E-02 4.538E-02 4.556E-02 4.571E-02 4.582E-02 4.590E-02 4.595E-02 4.597E-02 4.596E-02 4.593E-02 4.586E-02 4.578E-02 4.567E-02 4.554E-02 4.538E-02 4.521E-02 4.503E-02 4.483E-02 4.461E-02 4.438E-02 4.414E-02 4.389E-02 4.363E-02 4.337E-02 4.310E-02 4.283E-02 4.255E-02 4.227E-02 4.200E-02 4.172E-02 4.145E-02 4.117E-02 4.091E-02 4.064E-02 4.039E-02 4.014E-02 3.990E-02 3.967E-02 3.944E-02 3.923E-02 3.903E-02 3.884E-02 3.866E-02 3.849E-02 3.834E-02 3.820E-02 3.807E-02 3.796E-02 3.786E-02 3.778E-02 3.771E-02 3.765E-02 3.762E-02 3.759E-02 3.758E-02 3.759E-02 3.762E-02 3.765E-02 3.771E-02 3.778E-02 3.786E-02 3.796E-02 3.807E-02 3.820E-02 3.834E-02 3.849E-02 3.866E-02 3.884E-02 3.903E-02 3.923E-02 3.944E-02 3.967E-02 3.990E-02 4.014E-02 4.039E-02 4.064E-02 4.091E-02 4.117E-02 4.145E-02 4.172E-02 4.200E-02 4.227E-02 4.255E-02 4.283E-02 4.310E-02 4.337E-02 4.363E-02 4.389E-02 4.414E-02 4.438E-02 4.461E-02 4.483E-02 4.503E-02 4.521E-02 4.538E-02 4.554E-02 4.567E-02 4.578E-02 4.586E-02 4.593E-02 4.596E-02 4.597E-02 4.595E-02 4.590E-02 4.582E-02 4.571E-02 4.556E-02 4.538E-02 4.517E-02 4.492E-02 4.463E-02 4.430E-02 4.393E-02 4.353E-02 4.309E-02 4.261E-02 4.209E-02 4.153E-02 4.093E-02 4.029E-02 3.962E-02 3.890E-02 3.816E-02 3.737E-02 3.656E-02 3.571E-02 3.482E-02 3.391E-02 3.297E-02 3.201E-02 3.102E-02 3.001E-02 2.897E-02 2.792E-02 2.686E-02 2.578E-02 2.469E-02 2.360E-02 2.250E-02 2.140E-02 2.030E-02 1.921E-02 1.812E-02 1.704E-02 1.597E-02 1.492E-02 1.389E-02 1.288E-02 1.189E-02 1.093E-02 1.000E-02 9.102E-03 8.235E-03 7.404E-03 6.611E-03 5.858E-03 5.146E-03 4.477E-03 3.852E-03 3.272E-03 2.738E-03 2.252E-03 1.813E-03 1.423E-03 1.080E-03 7.858E-04 5.391E-04 3.399E-04 1.873E-04 8.059E-05 1.859E-05 9.200E-08 2.365E-05 8.765E-05 1.903E-04 3.298E-04 5.038E-04 7.104E-04 9.471E-04 1.212E-03 1.501E-03 1.813E-03 1.834E-03 1.518E-03 1.225E-03 9.572E-04 7.176E-04 5.085E-04 3.324E-04 1.913E-04 8.765E-05 2.328E-05 5.057E-08 1.964E-05 8.354E-05 1.931E-04 3.493E-04 5.532E-04 8.054E-04 1.106E-03 1.457E-03 1.856E-03 2.304E-03 2.801E-03 3.347E-03 3.939E-03 4.578E-03 5.262E-03 5.989E-03 6.759E-03 7.569E-03 8.418E-03 9.303E-03 1.022E-02 1.117E-02 1.215E-02 1.316E-02 1.419E-02 1.525E-02 1.632E-02 1.740E-02 1.850E-02 1.961E-02 2.072E-02 2.184E-02 2.296E-02 2.408E-02 2.519E-02 2.629E-02 2.738E-02 2.846E-02 2.952E-02 3.056E-02 3.158E-02 3.258E-02 3.355E-02 3.449E-02 3.541E-02 3.629E-02 3.713E-02 3.795E-02 3.872E-02 3.946E-02 4.016E-02 4.083E-02 4.145E-02 4.203E-02 4.257E-02 4.307E-02 4.353E-02 4.394E-02 4.432E-02 4.466E-02 4.495E-02 4.521E-02 4.543E-02 4.561E-02 4.575E-02 4.585E-02 4.593E-02 4.596E-02 4.597E-02 4.594E-02 4.589E-02 4.581E-02 4.570E-02 4.556E-02 4.540E-02 4.522E-02 4.502E-02 4.480E-02 4.457E-02 4.431E-02 4.405E-02 4.377E-02 4.348E-02 4.318E-02 4.287E-02 4.256E-02 4.224E-02 4.192E-02 4.159E-02 4.127E-02 4.094E-02 4.062E-02 4.030E-02 3.998E-02 3.967E-02 3.937E-02 3.907E-02 3.878E-02 3.850E-02 3.823E-02 3.796E-02 3.772E-02 3.748E-02 3.725E-02 3.704E-02 3.684E-02 3.666E-02 3.649E-02 3.633E-02 3.619E-02 3.607E-02 3.596E-02 3.587E-02 3.579E-02 3.573E-02 3.569E-02 3.567E-02 3.566E-02 3.567E-02 3.569E-02 3.573E-02 3.579E-02 3.587E-02 3.596E-02 3.607E-02 3.619E-02 3.633E-02 3.649E-02 3.666E-02 3.684E-02 3.704E-02 3.725E-02 3.748E-02 3.772E-02 3.796E-02 3.823E-02 3.850E-02 3.878E-02 3.907E-02 3.937E-02 3.967E-02 3.998E-02 4.030E-02 4.062E-02 4.094E-02 4.127E-02 4.159E-02 4.192E-02 4.224E-02 4.256E-02 4.287E-02 4.318E-02 4.348E-02 4.377E-02 4.405E-02 4.431E-02 4.457E-02 4.480E-02 4.502E-02 4.522E-02 4.540E-02 4.556E-02 4.570E-02 4.581E-02 4.589E-02 4.594E-02 4.597E-02 4.596E-02 4.593E-02 4.585E-02 4.575E-02 4.561E-02 4.543E-02 4.521E-02 4.495E-02 4.466E-02 4.432E-02 4.394E-02 4.353E-02 4.307E-02 4.257E-02 4.203E-02 4.145E-02 4.083E-02 4.016E-02 3.946E-02 3.872E-02 3.795E-02 3.713E-02 3.629E-02 3.541E-02 3.449E-02 3.355E-02 3.258E-02 3.158E-02 3.056E-02 2.952E-02 2.846E-02 2.738E-02 2.629E-02 2.519E-02 2.408E-02 2.296E-02 2.184E-02 2.072E-02 1.961E-02 1.850E-02 1.740E-02 1.632E-02 1.525E-02 1.419E-02 1.316E-02 1.215E-02 1.117E-02 1.022E-02 9.303E-03 8.418E-03 7.569E-03 6.759E-03 5.989E-03 5.262E-03 4.578E-03 3.939E-03 3.347E-03 2.801E-03 2.304E-03 1.856E-03 1.457E-03 1.106E-03 8.054E-04 5.532E-04 3.493E-04 1.931E-04 8.354E-05 1.964E-05 5.057E-08 2.328E-05 8.765E-05 1.913E-04 3.324E-04 5.085E-04 7.176E-04 9.572E-04 1.225E-03 1.518E-03 1.540E-03 1.243E-03 9.715E-04 7.285E-04 5.164E-04 3.376E-04 1.944E-04 8.907E-05 2.365E-05 5.057E-08 2.000E-05 8.504E-05 1.965E-04 3.556E-04 5.633E-04 8.203E-04 1.127E-03 1.484E-03 1.891E-03 2.348E-03 2.855E-03 3.411E-03 4.016E-03 4.667E-03 5.365E-03 6.108E-03 6.893E-03 7.720E-03 8.586E-03 9.488E-03 1.043E-02 1.140E-02 1.240E-02 1.342E-02 1.447E-02 1.555E-02 1.664E-02 1.774E-02 1.886E-02 1.999E-02 2.112E-02 2.226E-02 2.340E-02 2.453E-02 2.565E-02 2.677E-02 2.788E-02 2.897E-02 3.004E-02 3.109E-02 3.212E-02 3.312E-02 3.410E-02 3.504E-02 3.596E-02 3.684E-02 3.768E-02 3.849E-02 3.926E-02 3.999E-02 4.067E-02 4.132E-02 4.193E-02 4.249E-02 4.301E-02 4.349E-02 4.392E-02 4.431E-02 4.466E-02 4.496E-02 4.523E-02 4.545E-02 4.563E-02 4.577E-02 4.587E-02 4.594E-02 4.597E-02 4.596E-02 4.592E-02 4.585E-02 4.575E-02 4.562E-02 4.546E-02 4.528E-02 4.507E-02 4.484E-02 4.458E-02 4.431E-02 4.402E-02 4.372E-02 4.340E-02 4.307E-02 4.273E-02 4.238E-02 4.202E-02 4.165E-02 4.128E-02 4.091E-02 4.054E-02 4.016E-02 3.979E-02 3.942E-02 3.905E-02 3.869E-02 3.834E-02 3.799E-02 3.765E-02 3.731E-02 3.699E-02 3.668E-02 3.638E-02 3.609E-02 3.582E-02 3.556E-02 3.531E-02 3.508E-02 3.486E-02 3.466E-02 3.447E-02 3.430E-02 3.415E-02 3.402E-02 3.390E-02 3.380E-02 3.372E-02 3.365E-02 3.361E-02 3.358E-02 3.357E-02 3.358E-02 3.361E-02 3.365E-02 3.372E-02 3.380E-02 3.390E-02 3.402E-02 3.415E-02 3.430E-02 3.447E-02 3.466E-02 3.486E-02 3.508E-02 3.531E-02 3.556E-02 3.582E-02 3.609E-02 3.638E-02 3.668E-02 3.699E-02 3.731E-02 3.765E-02 3.799E-02 3.834E-02 3.869E-02 3.905E-02 3.942E-02 3.979E-02 4.016E-02 4.054E-02 4.091E-02 4.128E-02 4.165E-02 4.202E-02 4.238E-02 4.273E-02 4.307E-02 4.340E-02 4.372E-02 4.402E-02 4.431E-02 4.458E-02 4.484E-02 4.507E-02 4.528E-02 4.546E-02 4.562E-02 4.575E-02 4.585E-02 4.592E-02 4.596E-02 4.597E-02 4.594E-02 4.587E-02 4.577E-02 4.563E-02 4.545E-02 4.523E-02 4.496E-02 4.466E-02 4.431E-02 4.392E-02 4.349E-02 4.301E-02 4.249E-02 4.193E-02 4.132E-02 4.067E-02 3.999E-02 3.926E-02 3.849E-02 3.768E-02 3.684E-02 3.596E-02 3.504E-02 3.410E-02 3.312E-02 3.212E-02 3.109E-02 3.004E-02 2.897E-02 2.788E-02 2.677E-02 2.565E-02 2.453E-02 2.340E-02 2.226E-02 2.112E-02 1.999E-02 1.886E-02 1.774E-02 1.664E-02 1.555E-02 1.447E-02 1.342E-02 1.240E-02 1.140E-02 1.043E-02 9.488E-03 8.586E-03 7.720E-03 6.893E-03 6.108E-03 5.365E-03 4.667E-03 4.016E-03 3.411E-03 2.855E-03 2.348E-03 1.891E-03 1.484E-03 1.127E-03 8.203E-04 5.633E-04 3.556E-04 1.965E-04 8.504E-05 2.000E-05 5.057E-08 2.365E-05 8.907E-05 1.944E-04 3.376E-04 5.164E-04 7.285E-04 9.715E-04 1.243E-03 1.265E-03 9.900E-04 7.432E-04 5.275E-04 3.455E-04 1.995E-04 9.192E-05 2.478E-05 9.200E-08 1.964E-05 8.504E-05 1.977E-04 3.588E-04 5.694E-04 8.303E-04 1.142E-03 1.505E-03 1.919E-03 2.384E-03 2.900E-03 3.466E-03 4.081E-03 4.745E-03 5.456E-03 6.212E-03 7.012E-03 7.854E-03 8.737E-03 9.657E-03 1.061E-02 1.160E-02 1.262E-02 1.366E-02 1.473E-02 1.583E-02 1.694E-02 1.806E-02 1.920E-02 2.035E-02 2.150E-02 2.265E-02 2.381E-02 2.495E-02 2.610E-02 2.723E-02 2.835E-02 2.945E-02 3.053E-02 3.159E-02 3.262E-02 3.363E-02 3.461E-02 3.556E-02 3.647E-02 3.735E-02 3.819E-02 3.899E-02 3.975E-02 4.047E-02 4.115E-02 4.178E-02 4.237E-02 4.291E-02 4.341E-02 4.386E-02 4.427E-02 4.463E-02 4.495E-02 4.523E-02 4.545E-02 4.564E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.596E-02 4.591E-02 4.582E-02 4.570E-02 4.555E-02 4.537E-02 4.516E-02 4.492E-02 4.466E-02 4.438E-02 4.408E-02 4.375E-02 4.341E-02 4.305E-02 4.268E-02 4.230E-02 4.190E-02 4.150E-02 4.109E-02 4.067E-02 4.025E-02 3.983E-02 3.940E-02 3.898E-02 3.856E-02 3.814E-02 3.772E-02 3.731E-02 3.691E-02 3.652E-02 3.613E-02 3.576E-02 3.539E-02 3.504E-02 3.470E-02 3.437E-02 3.406E-02 3.376E-02 3.348E-02 3.321E-02 3.296E-02 3.273E-02 3.251E-02 3.231E-02 3.213E-02 3.197E-02 3.183E-02 3.170E-02 3.159E-02 3.151E-02 3.144E-02 3.139E-02 3.136E-02 3.135E-02 3.136E-02 3.139E-02 3.144E-02 3.151E-02 3.159E-02 3.170E-02 3.183E-02 3.197E-02 3.213E-02 3.231E-02 3.251E-02 3.273E-02 3.296E-02 3.321E-02 3.348E-02 3.376E-02 3.406E-02 3.437E-02 3.470E-02 3.504E-02 3.539E-02 3.576E-02 3.613E-02 3.652E-02 3.691E-02 3.731E-02 3.772E-02 3.814E-02 3.856E-02 3.898E-02 3.940E-02 3.983E-02 4.025E-02 4.067E-02 4.109E-02 4.150E-02 4.190E-02 4.230E-02 4.268E-02 4.305E-02 4.341E-02 4.375E-02 4.408E-02 4.438E-02 4.466E-02 4.492E-02 4.516E-02 4.537E-02 4.555E-02 4.570E-02 4.582E-02 4.591E-02 4.596E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.564E-02 4.545E-02 4.523E-02 4.495E-02 4.463E-02 4.427E-02 4.386E-02 4.341E-02 4.291E-02 4.237E-02 4.178E-02 4.115E-02 4.047E-02 3.975E-02 3.899E-02 3.819E-02 3.735E-02 3.647E-02 3.556E-02 3.461E-02 3.363E-02 3.262E-02 3.159E-02 3.053E-02 2.945E-02 2.835E-02 2.723E-02 2.610E-02 2.495E-02 2.381E-02 2.265E-02 2.150E-02 2.035E-02 1.920E-02 1.806E-02 1.694E-02 1.583E-02 1.473E-02 1.366E-02 1.262E-02 1.160E-02 1.061E-02 9.657E-03 8.737E-03 7.854E-03 7.012E-03 6.212E-03 5.456E-03 4.745E-03 4.081E-03 3.466E-03 2.900E-03 2.384E-03 1.919E-03 1.505E-03 1.142E-03 8.303E-04 5.694E-04 3.588E-04 1.977E-04 8.504E-05 1.964E-05 9.200E-08 2.478E-05 9.192E-05 1.995E-04 3.455E-04 5.275E-04 7.432E-04 9.900E-04 1.013E-03 7.617E-04 5.419E-04 3.562E-04 2.068E-04 9.628E-05 2.673E-05 2.117E-07 1.859E-05 8.354E-05 1.965E-04 3.588E-04 5.715E-04 8.353E-04 1.151E-03 1.519E-03 1.939E-03 2.411E-03 2.935E-03 3.510E-03 4.135E-03 4.810E-03 5.533E-03 6.302E-03 7.116E-03 7.973E-03 8.871E-03 9.807E-03 1.078E-02 1.179E-02 1.282E-02 1.389E-02 1.497E-02 1.609E-02 1.721E-02 1.836E-02 1.951E-02 2.068E-02 2.185E-02 2.302E-02 2.419E-02 2.535E-02 2.651E-02 2.766E-02 2.879E-02 2.990E-02 3.099E-02 3.206E-02 3.310E-02 3.412E-02 3.510E-02 3.605E-02 3.696E-02 3.783E-02 3.867E-02 3.946E-02 4.022E-02 4.092E-02 4.159E-02 4.220E-02 4.277E-02 4.330E-02 4.377E-02 4.420E-02 4.458E-02 4.492E-02 4.520E-02 4.544E-02 4.564E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.595E-02 4.589E-02 4.579E-02 4.566E-02 4.549E-02 4.529E-02 4.506E-02 4.480E-02 4.451E-02 4.420E-02 4.386E-02 4.350E-02 4.312E-02 4.273E-02 4.232E-02 4.189E-02 4.145E-02 4.100E-02 4.054E-02 4.008E-02 3.961E-02 3.914E-02 3.866E-02 3.819E-02 3.772E-02 3.724E-02 3.678E-02 3.631E-02 3.586E-02 3.541E-02 3.497E-02 3.454E-02 3.413E-02 3.372E-02 3.333E-02 3.295E-02 3.258E-02 3.223E-02 3.189E-02 3.157E-02 3.127E-02 3.099E-02 3.072E-02 3.047E-02 3.024E-02 3.003E-02 2.984E-02 2.967E-02 2.951E-02 2.938E-02 2.927E-02 2.918E-02 2.910E-02 2.905E-02 2.902E-02 2.901E-02 2.902E-02 2.905E-02 2.910E-02 2.918E-02 2.927E-02 2.938E-02 2.951E-02 2.967E-02 2.984E-02 3.003E-02 3.024E-02 3.047E-02 3.072E-02 3.099E-02 3.127E-02 3.157E-02 3.189E-02 3.223E-02 3.258E-02 3.295E-02 3.333E-02 3.372E-02 3.413E-02 3.454E-02 3.497E-02 3.541E-02 3.586E-02 3.631E-02 3.678E-02 3.724E-02 3.772E-02 3.819E-02 3.866E-02 3.914E-02 3.961E-02 4.008E-02 4.054E-02 4.100E-02 4.145E-02 4.189E-02 4.232E-02 4.273E-02 4.312E-02 4.350E-02 4.386E-02 4.420E-02 4.451E-02 4.480E-02 4.506E-02 4.529E-02 4.549E-02 4.566E-02 4.579E-02 4.589E-02 4.595E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.564E-02 4.544E-02 4.520E-02 4.492E-02 4.458E-02 4.420E-02 4.377E-02 4.330E-02 4.277E-02 4.220E-02 4.159E-02 4.092E-02 4.022E-02 3.946E-02 3.867E-02 3.783E-02 3.696E-02 3.605E-02 3.510E-02 3.412E-02 3.310E-02 3.206E-02 3.099E-02 2.990E-02 2.879E-02 2.766E-02 2.651E-02 2.535E-02 2.419E-02 2.302E-02 2.185E-02 2.068E-02 1.951E-02 1.836E-02 1.721E-02 1.609E-02 1.497E-02 1.389E-02 1.282E-02 1.179E-02 1.078E-02 9.807E-03 8.871E-03 7.973E-03 7.116E-03 6.302E-03 5.533E-03 4.810E-03 4.135E-03 3.510E-03 2.935E-03 2.411E-03 1.939E-03 1.519E-03 1.151E-03 8.353E-04 5.715E-04 3.588E-04 1.965E-04 8.354E-05 1.859E-05 2.117E-07 2.673E-05 9.628E-05 2.068E-04 3.562E-04 5.419E-04 7.617E-04 7.841E-04 5.598E-04 3.697E-04 2.164E-04 1.022E-04 2.957E-05 4.832E-07 1.691E-05 8.059E-05 1.931E-04 3.556E-04 5.694E-04 8.353E-04 1.154E-03 1.526E-03 1.951E-03 2.429E-03 2.960E-03 3.543E-03 4.177E-03 4.862E-03 5.596E-03 6.378E-03 7.205E-03 8.076E-03 8.988E-03 9.940E-03 1.093E-02 1.195E-02 1.300E-02 1.409E-02 1.519E-02 1.632E-02 1.747E-02 1.863E-02 1.981E-02 2.099E-02 2.217E-02 2.336E-02 2.455E-02 2.573E-02 2.690E-02 2.806E-02 2.920E-02 3.032E-02 3.143E-02 3.250E-02 3.355E-02 3.457E-02 3.555E-02 3.650E-02 3.741E-02 3.829E-02 3.912E-02 3.990E-02 4.065E-02 4.134E-02 4.199E-02 4.259E-02 4.314E-02 4.364E-02 4.410E-02 4.450E-02 4.485E-02 4.516E-02 4.541E-02 4.562E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.595E-02 4.588E-02 4.578E-02 4.563E-02 4.545E-02 4.523E-02 4.498E-02 4.470E-02 4.438E-02 4.404E-02 4.368E-02 4.328E-02 4.287E-02 4.244E-02 4.199E-02 4.152E-02 4.104E-02 4.054E-02 4.004E-02 3.953E-02 3.901E-02 3.849E-02 3.796E-02 3.744E-02 3.691E-02 3.639E-02 3.587E-02 3.535E-02 3.484E-02 3.434E-02 3.385E-02 3.336E-02 3.289E-02 3.243E-02 3.198E-02 3.155E-02 3.113E-02 3.072E-02 3.033E-02 2.996E-02 2.961E-02 2.927E-02 2.895E-02 2.865E-02 2.837E-02 2.811E-02 2.787E-02 2.765E-02 2.744E-02 2.726E-02 2.710E-02 2.697E-02 2.685E-02 2.675E-02 2.668E-02 2.662E-02 2.659E-02 2.658E-02 2.659E-02 2.662E-02 2.668E-02 2.675E-02 2.685E-02 2.697E-02 2.710E-02 2.726E-02 2.744E-02 2.765E-02 2.787E-02 2.811E-02 2.837E-02 2.865E-02 2.895E-02 2.927E-02 2.961E-02 2.996E-02 3.033E-02 3.072E-02 3.113E-02 3.155E-02 3.198E-02 3.243E-02 3.289E-02 3.336E-02 3.385E-02 3.434E-02 3.484E-02 3.535E-02 3.587E-02 3.639E-02 3.691E-02 3.744E-02 3.796E-02 3.849E-02 3.901E-02 3.953E-02 4.004E-02 4.054E-02 4.104E-02 4.152E-02 4.199E-02 4.244E-02 4.287E-02 4.328E-02 4.368E-02 4.404E-02 4.438E-02 4.470E-02 4.498E-02 4.523E-02 4.545E-02 4.563E-02 4.578E-02 4.588E-02 4.595E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.562E-02 4.541E-02 4.516E-02 4.485E-02 4.450E-02 4.410E-02 4.364E-02 4.314E-02 4.259E-02 4.199E-02 4.134E-02 4.065E-02 3.990E-02 3.912E-02 3.829E-02 3.741E-02 3.650E-02 3.555E-02 3.457E-02 3.355E-02 3.250E-02 3.143E-02 3.032E-02 2.920E-02 2.806E-02 2.690E-02 2.573E-02 2.455E-02 2.336E-02 2.217E-02 2.099E-02 1.981E-02 1.863E-02 1.747E-02 1.632E-02 1.519E-02 1.409E-02 1.300E-02 1.195E-02 1.093E-02 9.940E-03 8.988E-03 8.076E-03 7.205E-03 6.378E-03 5.596E-03 4.862E-03 4.177E-03 3.543E-03 2.960E-03 2.429E-03 1.951E-03 1.526E-03 1.154E-03 8.353E-04 5.694E-04 3.556E-04 1.931E-04 8.059E-05 1.691E-05 4.832E-07 2.957E-05 1.022E-04 2.164E-04 3.697E-04 5.598E-04 5.812E-04 3.863E-04 2.283E-04 1.099E-04 3.344E-05 1.016E-06 1.469E-05 7.626E-05 1.873E-04 3.493E-04 5.633E-04 8.303E-04 1.151E-03 1.526E-03 1.955E-03 2.438E-03 2.975E-03 3.565E-03 4.208E-03 4.902E-03 5.646E-03 6.439E-03 7.278E-03 8.162E-03 9.088E-03 1.005E-02 1.106E-02 1.210E-02 1.317E-02 1.427E-02 1.539E-02 1.654E-02 1.770E-02 1.888E-02 2.007E-02 2.127E-02 2.247E-02 2.368E-02 2.488E-02 2.608E-02 2.726E-02 2.843E-02 2.959E-02 3.072E-02 3.183E-02 3.292E-02 3.397E-02 3.499E-02 3.598E-02 3.693E-02 3.784E-02 3.871E-02 3.953E-02 4.031E-02 4.104E-02 4.173E-02 4.236E-02 4.294E-02 4.348E-02 4.396E-02 4.439E-02 4.476E-02 4.509E-02 4.536E-02 4.558E-02 4.575E-02 4.587E-02 4.595E-02 4.597E-02 4.595E-02 4.588E-02 4.577E-02 4.562E-02 4.543E-02 4.519E-02 4.492E-02 4.462E-02 4.429E-02 4.392E-02 4.352E-02 4.310E-02 4.266E-02 4.219E-02 4.170E-02 4.119E-02 4.067E-02 4.013E-02 3.958E-02 3.903E-02 3.846E-02 3.789E-02 3.731E-02 3.674E-02 3.616E-02 3.558E-02 3.501E-02 3.444E-02 3.387E-02 3.332E-02 3.277E-02 3.223E-02 3.170E-02 3.118E-02 3.068E-02 3.019E-02 2.972E-02 2.926E-02 2.882E-02 2.839E-02 2.798E-02 2.759E-02 2.722E-02 2.687E-02 2.654E-02 2.622E-02 2.593E-02 2.566E-02 2.541E-02 2.518E-02 2.497E-02 2.479E-02 2.462E-02 2.448E-02 2.436E-02 2.426E-02 2.418E-02 2.413E-02 2.409E-02 2.408E-02 2.409E-02 2.413E-02 2.418E-02 2.426E-02 2.436E-02 2.448E-02 2.462E-02 2.479E-02 2.497E-02 2.518E-02 2.541E-02 2.566E-02 2.593E-02 2.622E-02 2.654E-02 2.687E-02 2.722E-02 2.759E-02 2.798E-02 2.839E-02 2.882E-02 2.926E-02 2.972E-02 3.019E-02 3.068E-02 3.118E-02 3.170E-02 3.223E-02 3.277E-02 3.332E-02 3.387E-02 3.444E-02 3.501E-02 3.558E-02 3.616E-02 3.674E-02 3.731E-02 3.789E-02 3.846E-02 3.903E-02 3.958E-02 4.013E-02 4.067E-02 4.119E-02 4.170E-02 4.219E-02 4.266E-02 4.310E-02 4.352E-02 4.392E-02 4.429E-02 4.462E-02 4.492E-02 4.519E-02 4.543E-02 4.562E-02 4.577E-02 4.588E-02 4.595E-02 4.597E-02 4.595E-02 4.587E-02 4.575E-02 4.558E-02 4.536E-02 4.509E-02 4.476E-02 4.439E-02 4.396E-02 4.348E-02 4.294E-02 4.236E-02 4.173E-02 4.104E-02 4.031E-02 3.953E-02 3.871E-02 3.784E-02 3.693E-02 3.598E-02 3.499E-02 3.397E-02 3.292E-02 3.183E-02 3.072E-02 2.959E-02 2.843E-02 2.726E-02 2.608E-02 2.488E-02 2.368E-02 2.247E-02 2.127E-02 2.007E-02 1.888E-02 1.770E-02 1.654E-02 1.539E-02 1.427E-02 1.317E-02 1.210E-02 1.106E-02 1.005E-02 9.088E-03 8.162E-03 7.278E-03 6.439E-03 5.646E-03 4.902E-03 4.208E-03 3.565E-03 2.975E-03 2.438E-03 1.955E-03 1.526E-03 1.151E-03 8.303E-04 5.633E-04 3.493E-04 1.873E-04 7.626E-05 1.469E-05 1.016E-06 3.344E-05 1.099E-04 2.283E-04 3.863E-04 4.060E-04 2.428E-04 1.195E-04 3.847E-05 1.956E-06 1.206E-05 7.067E-05 1.795E-04 3.399E-04 5.532E-04 8.203E-04 1.142E-03 1.519E-03 1.951E-03 2.438E-03 2.980E-03 3.576E-03 4.226E-03 4.928E-03 5.682E-03 6.484E-03 7.335E-03 8.231E-03 9.170E-03 1.015E-02 1.117E-02 1.222E-02 1.331E-02 1.442E-02 1.556E-02 1.673E-02 1.791E-02 1.911E-02 2.031E-02 2.153E-02 2.275E-02 2.397E-02 2.519E-02 2.640E-02 2.760E-02 2.878E-02 2.995E-02 3.109E-02 3.221E-02 3.330E-02 3.436E-02 3.539E-02 3.638E-02 3.733E-02 3.824E-02 3.910E-02 3.992E-02 4.069E-02 4.141E-02 4.208E-02 4.270E-02 4.327E-02 4.378E-02 4.424E-02 4.464E-02 4.499E-02 4.529E-02 4.553E-02 4.572E-02 4.585E-02 4.594E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.562E-02 4.542E-02 4.518E-02 4.489E-02 4.458E-02 4.422E-02 4.383E-02 4.341E-02 4.296E-02 4.248E-02 4.198E-02 4.146E-02 4.091E-02 4.035E-02 3.977E-02 3.918E-02 3.858E-02 3.796E-02 3.735E-02 3.672E-02 3.609E-02 3.546E-02 3.483E-02 3.421E-02 3.358E-02 3.296E-02 3.235E-02 3.175E-02 3.115E-02 3.057E-02 3.000E-02 2.944E-02 2.890E-02 2.837E-02 2.786E-02 2.736E-02 2.688E-02 2.642E-02 2.598E-02 2.555E-02 2.515E-02 2.477E-02 2.440E-02 2.406E-02 2.374E-02 2.344E-02 2.316E-02 2.290E-02 2.267E-02 2.245E-02 2.226E-02 2.210E-02 2.195E-02 2.183E-02 2.172E-02 2.164E-02 2.159E-02 2.155E-02 2.154E-02 2.155E-02 2.159E-02 2.164E-02 2.172E-02 2.183E-02 2.195E-02 2.210E-02 2.226E-02 2.245E-02 2.267E-02 2.290E-02 2.316E-02 2.344E-02 2.374E-02 2.406E-02 2.440E-02 2.477E-02 2.515E-02 2.555E-02 2.598E-02 2.642E-02 2.688E-02 2.736E-02 2.786E-02 2.837E-02 2.890E-02 2.944E-02 3.000E-02 3.057E-02 3.115E-02 3.175E-02 3.235E-02 3.296E-02 3.358E-02 3.421E-02 3.483E-02 3.546E-02 3.609E-02 3.672E-02 3.735E-02 3.796E-02 3.858E-02 3.918E-02 3.977E-02 4.035E-02 4.091E-02 4.146E-02 4.198E-02 4.248E-02 4.296E-02 4.341E-02 4.383E-02 4.422E-02 4.458E-02 4.489E-02 4.518E-02 4.542E-02 4.562E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.594E-02 4.585E-02 4.572E-02 4.553E-02 4.529E-02 4.499E-02 4.464E-02 4.424E-02 4.378E-02 4.327E-02 4.270E-02 4.208E-02 4.141E-02 4.069E-02 3.992E-02 3.910E-02 3.824E-02 3.733E-02 3.638E-02 3.539E-02 3.436E-02 3.330E-02 3.221E-02 3.109E-02 2.995E-02 2.878E-02 2.760E-02 2.640E-02 2.519E-02 2.397E-02 2.275E-02 2.153E-02 2.031E-02 1.911E-02 1.791E-02 1.673E-02 1.556E-02 1.442E-02 1.331E-02 1.222E-02 1.117E-02 1.015E-02 9.170E-03 8.231E-03 7.335E-03 6.484E-03 5.682E-03 4.928E-03 4.226E-03 3.576E-03 2.980E-03 2.438E-03 1.951E-03 1.519E-03 1.142E-03 8.203E-04 5.532E-04 3.399E-04 1.795E-04 7.067E-05 1.206E-05 1.956E-06 3.847E-05 1.195E-04 2.428E-04 2.601E-04 1.312E-04 4.486E-05 3.484E-06 9.211E-06 6.401E-05 1.696E-04 3.276E-04 5.391E-04 8.054E-04 1.127E-03 1.505E-03 1.939E-03 2.429E-03 2.975E-03 3.576E-03 4.232E-03 4.942E-03 5.703E-03 6.515E-03 7.376E-03 8.283E-03 9.234E-03 1.023E-02 1.126E-02 1.233E-02 1.343E-02 1.456E-02 1.572E-02 1.689E-02 1.809E-02 1.931E-02 2.053E-02 2.176E-02 2.300E-02 2.424E-02 2.547E-02 2.669E-02 2.790E-02 2.910E-02 3.028E-02 3.143E-02 3.256E-02 3.366E-02 3.472E-02 3.575E-02 3.675E-02 3.770E-02 3.860E-02 3.946E-02 4.028E-02 4.104E-02 4.175E-02 4.241E-02 4.301E-02 4.356E-02 4.405E-02 4.449E-02 4.487E-02 4.519E-02 4.546E-02 4.567E-02 4.582E-02 4.592E-02 4.597E-02 4.596E-02 4.590E-02 4.579E-02 4.564E-02 4.543E-02 4.518E-02 4.489E-02 4.456E-02 4.419E-02 4.378E-02 4.334E-02 4.286E-02 4.236E-02 4.182E-02 4.127E-02 4.069E-02 4.009E-02 3.947E-02 3.884E-02 3.819E-02 3.753E-02 3.686E-02 3.619E-02 3.551E-02 3.483E-02 3.415E-02 3.347E-02 3.280E-02 3.212E-02 3.146E-02 3.080E-02 3.015E-02 2.951E-02 2.889E-02 2.828E-02 2.768E-02 2.709E-02 2.653E-02 2.598E-02 2.544E-02 2.493E-02 2.443E-02 2.396E-02 2.350E-02 2.307E-02 2.266E-02 2.226E-02 2.189E-02 2.154E-02 2.122E-02 2.091E-02 2.063E-02 2.037E-02 2.013E-02 1.991E-02 1.972E-02 1.955E-02 1.940E-02 1.928E-02 1.918E-02 1.910E-02 1.904E-02 1.901E-02 1.900E-02 1.901E-02 1.904E-02 1.910E-02 1.918E-02 1.928E-02 1.940E-02 1.955E-02 1.972E-02 1.991E-02 2.013E-02 2.037E-02 2.063E-02 2.091E-02 2.122E-02 2.154E-02 2.189E-02 2.226E-02 2.266E-02 2.307E-02 2.350E-02 2.396E-02 2.443E-02 2.493E-02 2.544E-02 2.598E-02 2.653E-02 2.709E-02 2.768E-02 2.828E-02 2.889E-02 2.951E-02 3.015E-02 3.080E-02 3.146E-02 3.212E-02 3.280E-02 3.347E-02 3.415E-02 3.483E-02 3.551E-02 3.619E-02 3.686E-02 3.753E-02 3.819E-02 3.884E-02 3.947E-02 4.009E-02 4.069E-02 4.127E-02 4.182E-02 4.236E-02 4.286E-02 4.334E-02 4.378E-02 4.419E-02 4.456E-02 4.489E-02 4.518E-02 4.543E-02 4.564E-02 4.579E-02 4.590E-02 4.596E-02 4.597E-02 4.592E-02 4.582E-02 4.567E-02 4.546E-02 4.519E-02 4.487E-02 4.449E-02 4.405E-02 4.356E-02 4.301E-02 4.241E-02 4.175E-02 4.104E-02 4.028E-02 3.946E-02 3.860E-02 3.770E-02 3.675E-02 3.575E-02 3.472E-02 3.366E-02 3.256E-02 3.143E-02 3.028E-02 2.910E-02 2.790E-02 2.669E-02 2.547E-02 2.424E-02 2.300E-02 2.176E-02 2.053E-02 1.931E-02 1.809E-02 1.689E-02 1.572E-02 1.456E-02 1.343E-02 1.233E-02 1.126E-02 1.023E-02 9.234E-03 8.283E-03 7.376E-03 6.515E-03 5.703E-03 4.942E-03 4.232E-03 3.576E-03 2.975E-03 2.429E-03 1.939E-03 1.505E-03 1.127E-03 8.054E-04 5.391E-04 3.276E-04 1.696E-04 6.401E-05 9.211E-06 3.484E-06 4.486E-05 1.312E-04 1.451E-04 5.282E-05 5.812E-06 6.341E-06 5.645E-05 1.580E-04 3.125E-04 5.214E-04 7.858E-04 1.106E-03 1.484E-03 1.919E-03 2.411E-03 2.960E-03 3.565E-03 4.226E-03 4.942E-03 5.710E-03 6.530E-03 7.400E-03 8.318E-03 9.280E-03 1.029E-02 1.133E-02 1.241E-02 1.353E-02 1.467E-02 1.584E-02 1.704E-02 1.825E-02 1.948E-02 2.072E-02 2.197E-02 2.322E-02 2.448E-02 2.572E-02 2.696E-02 2.818E-02 2.939E-02 3.058E-02 3.175E-02 3.288E-02 3.399E-02 3.506E-02 3.609E-02 3.709E-02 3.804E-02 3.894E-02 3.980E-02 4.061E-02 4.136E-02 4.206E-02 4.270E-02 4.329E-02 4.382E-02 4.430E-02 4.471E-02 4.507E-02 4.536E-02 4.560E-02 4.578E-02 4.590E-02 4.596E-02 4.597E-02 4.592E-02 4.582E-02 4.567E-02 4.547E-02 4.521E-02 4.492E-02 4.458E-02 4.419E-02 4.377E-02 4.331E-02 4.281E-02 4.228E-02 4.172E-02 4.113E-02 4.052E-02 3.988E-02 3.923E-02 3.856E-02 3.787E-02 3.717E-02 3.645E-02 3.573E-02 3.501E-02 3.428E-02 3.355E-02 3.281E-02 3.209E-02 3.136E-02 3.064E-02 2.993E-02 2.923E-02 2.854E-02 2.786E-02 2.719E-02 2.654E-02 2.590E-02 2.528E-02 2.468E-02 2.409E-02 2.353E-02 2.298E-02 2.245E-02 2.195E-02 2.146E-02 2.100E-02 2.056E-02 2.014E-02 1.974E-02 1.937E-02 1.902E-02 1.869E-02 1.838E-02 1.810E-02 1.784E-02 1.760E-02 1.739E-02 1.719E-02 1.702E-02 1.688E-02 1.675E-02 1.665E-02 1.657E-02 1.652E-02 1.648E-02 1.647E-02 1.648E-02 1.652E-02 1.657E-02 1.665E-02 1.675E-02 1.688E-02 1.702E-02 1.719E-02 1.739E-02 1.760E-02 1.784E-02 1.810E-02 1.838E-02 1.869E-02 1.902E-02 1.937E-02 1.974E-02 2.014E-02 2.056E-02 2.100E-02 2.146E-02 2.195E-02 2.245E-02 2.298E-02 2.353E-02 2.409E-02 2.468E-02 2.528E-02 2.590E-02 2.654E-02 2.719E-02 2.786E-02 2.854E-02 2.923E-02 2.993E-02 3.064E-02 3.136E-02 3.209E-02 3.281E-02 3.355E-02 3.428E-02 3.501E-02 3.573E-02 3.645E-02 3.717E-02 3.787E-02 3.856E-02 3.923E-02 3.988E-02 4.052E-02 4.113E-02 4.172E-02 4.228E-02 4.281E-02 4.331E-02 4.377E-02 4.419E-02 4.458E-02 4.492E-02 4.521E-02 4.547E-02 4.567E-02 4.582E-02 4.592E-02 4.597E-02 4.596E-02 4.590E-02 4.578E-02 4.560E-02 4.536E-02 4.507E-02 4.471E-02 4.430E-02 4.382E-02 4.329E-02 4.270E-02 4.206E-02 4.136E-02 4.061E-02 3.980E-02 3.894E-02 3.804E-02 3.709E-02 3.609E-02 3.506E-02 3.399E-02 3.288E-02 3.175E-02 3.058E-02 2.939E-02 2.818E-02 2.696E-02 2.572E-02 2.448E-02 2.322E-02 2.197E-02 2.072E-02 1.948E-02 1.825E-02 1.704E-02 1.584E-02 1.467E-02 1.353E-02 1.241E-02 1.133E-02 1.029E-02 9.280E-03 8.318E-03 7.400E-03 6.530E-03 5.710E-03 4.942E-03 4.226E-03 3.565E-03 2.960E-03 2.411E-03 1.919E-03 1.484E-03 1.106E-03 7.858E-04 5.214E-04 3.125E-04 1.580E-04 5.645E-05 6.341E-06 5.812E-06 5.282E-05 6.260E-05 9.190E-06 3.699E-06 4.826E-05 1.448E-04 2.949E-04 5.001E-04 7.616E-04 1.080E-03 1.457E-03 1.891E-03 2.384E-03 2.935E-03 3.543E-03 4.208E-03 4.928E-03 5.703E-03 6.530E-03 7.409E-03 8.335E-03 9.308E-03 1.032E-02 1.138E-02 1.248E-02 1.360E-02 1.476E-02 1.595E-02 1.716E-02 1.839E-02 1.963E-02 2.089E-02 2.215E-02 2.342E-02 2.469E-02 2.595E-02 2.720E-02 2.844E-02 2.966E-02 3.086E-02 3.203E-02 3.318E-02 3.429E-02 3.537E-02 3.641E-02 3.740E-02 3.835E-02 3.926E-02 4.011E-02 4.091E-02 4.165E-02 4.234E-02 4.298E-02 4.355E-02 4.406E-02 4.451E-02 4.491E-02 4.524E-02 4.550E-02 4.571E-02 4.586E-02 4.594E-02 4.597E-02 4.594E-02 4.585E-02 4.571E-02 4.551E-02 4.527E-02 4.497E-02 4.462E-02 4.423E-02 4.379E-02 4.332E-02 4.280E-02 4.225E-02 4.167E-02 4.106E-02 4.041E-02 3.975E-02 3.905E-02 3.834E-02 3.762E-02 3.687E-02 3.612E-02 3.535E-02 3.458E-02 3.380E-02 3.302E-02 3.224E-02 3.146E-02 3.068E-02 2.991E-02 2.915E-02 2.839E-02 2.765E-02 2.691E-02 2.619E-02 2.549E-02 2.480E-02 2.413E-02 2.347E-02 2.284E-02 2.222E-02 2.162E-02 2.105E-02 2.049E-02 1.996E-02 1.945E-02 1.896E-02 1.850E-02 1.805E-02 1.763E-02 1.724E-02 1.687E-02 1.652E-02 1.619E-02 1.588E-02 1.560E-02 1.535E-02 1.511E-02 1.490E-02 1.471E-02 1.454E-02 1.440E-02 1.428E-02 1.418E-02 1.410E-02 1.404E-02 1.401E-02 1.400E-02 1.401E-02 1.404E-02 1.410E-02 1.418E-02 1.428E-02 1.440E-02 1.454E-02 1.471E-02 1.490E-02 1.511E-02 1.535E-02 1.560E-02 1.588E-02 1.619E-02 1.652E-02 1.687E-02 1.724E-02 1.763E-02 1.805E-02 1.850E-02 1.896E-02 1.945E-02 1.996E-02 2.049E-02 2.105E-02 2.162E-02 2.222E-02 2.284E-02 2.347E-02 2.413E-02 2.480E-02 2.549E-02 2.619E-02 2.691E-02 2.765E-02 2.839E-02 2.915E-02 2.991E-02 3.068E-02 3.146E-02 3.224E-02 3.302E-02 3.380E-02 3.458E-02 3.535E-02 3.612E-02 3.687E-02 3.762E-02 3.834E-02 3.905E-02 3.975E-02 4.041E-02 4.106E-02 4.167E-02 4.225E-02 4.280E-02 4.332E-02 4.379E-02 4.423E-02 4.462E-02 4.497E-02 4.527E-02 4.551E-02 4.571E-02 4.585E-02 4.594E-02 4.597E-02 4.594E-02 4.586E-02 4.571E-02 4.550E-02 4.524E-02 4.491E-02 4.451E-02 4.406E-02 4.355E-02 4.298E-02 4.234E-02 4.165E-02 4.091E-02 4.011E-02 3.926E-02 3.835E-02 3.740E-02 3.641E-02 3.537E-02 3.429E-02 3.318E-02 3.203E-02 3.086E-02 2.966E-02 2.844E-02 2.720E-02 2.595E-02 2.469E-02 2.342E-02 2.215E-02 2.089E-02 1.963E-02 1.839E-02 1.716E-02 1.595E-02 1.476E-02 1.360E-02 1.248E-02 1.138E-02 1.032E-02 9.308E-03 8.335E-03 7.409E-03 6.530E-03 5.703E-03 4.928E-03 4.208E-03 3.543E-03 2.935E-03 2.384E-03 1.891E-03 1.457E-03 1.080E-03 7.616E-04 5.001E-04 2.949E-04 1.448E-04 4.826E-05 3.699E-06 9.190E-06 1.389E-05 1.565E-06 3.969E-05 1.303E-04 2.751E-04 4.756E-04 7.331E-04 1.049E-03 1.423E-03 1.856E-03 2.348E-03 2.900E-03 3.510E-03 4.177E-03 4.902E-03 5.682E-03 6.515E-03 7.400E-03 8.335E-03 9.317E-03 1.034E-02 1.141E-02 1.252E-02 1.366E-02 1.483E-02 1.603E-02 1.726E-02 1.850E-02 1.976E-02 2.103E-02 2.231E-02 2.359E-02 2.487E-02 2.615E-02 2.741E-02 2.867E-02 2.990E-02 3.111E-02 3.229E-02 3.345E-02 3.457E-02 3.565E-02 3.669E-02 3.769E-02 3.864E-02 3.954E-02 4.039E-02 4.119E-02 4.192E-02 4.260E-02 4.322E-02 4.378E-02 4.428E-02 4.471E-02 4.508E-02 4.538E-02 4.562E-02 4.580E-02 4.592E-02 4.597E-02 4.596E-02 4.589E-02 4.576E-02 4.558E-02 4.534E-02 4.504E-02 4.470E-02 4.430E-02 4.386E-02 4.337E-02 4.285E-02 4.228E-02 4.168E-02 4.104E-02 4.037E-02 3.967E-02 3.895E-02 3.820E-02 3.744E-02 3.666E-02 3.586E-02 3.505E-02 3.423E-02 3.341E-02 3.258E-02 3.175E-02 3.092E-02 3.009E-02 2.927E-02 2.845E-02 2.765E-02 2.685E-02 2.606E-02 2.529E-02 2.453E-02 2.379E-02 2.307E-02 2.236E-02 2.168E-02 2.101E-02 2.037E-02 1.974E-02 1.914E-02 1.856E-02 1.801E-02 1.748E-02 1.697E-02 1.648E-02 1.602E-02 1.558E-02 1.517E-02 1.478E-02 1.441E-02 1.407E-02 1.375E-02 1.345E-02 1.317E-02 1.292E-02 1.269E-02 1.249E-02 1.230E-02 1.214E-02 1.200E-02 1.189E-02 1.179E-02 1.171E-02 1.166E-02 1.163E-02 1.162E-02 1.163E-02 1.166E-02 1.171E-02 1.179E-02 1.189E-02 1.200E-02 1.214E-02 1.230E-02 1.249E-02 1.269E-02 1.292E-02 1.317E-02 1.345E-02 1.375E-02 1.407E-02 1.441E-02 1.478E-02 1.517E-02 1.558E-02 1.602E-02 1.648E-02 1.697E-02 1.748E-02 1.801E-02 1.856E-02 1.914E-02 1.974E-02 2.037E-02 2.101E-02 2.168E-02 2.236E-02 2.307E-02 2.379E-02 2.453E-02 2.529E-02 2.606E-02 2.685E-02 2.765E-02 2.845E-02 2.927E-02 3.009E-02 3.092E-02 3.175E-02 3.258E-02 3.341E-02 3.423E-02 3.505E-02 3.586E-02 3.666E-02 3.744E-02 3.820E-02 3.895E-02 3.967E-02 4.037E-02 4.104E-02 4.168E-02 4.228E-02 4.285E-02 4.337E-02 4.386E-02 4.430E-02 4.470E-02 4.504E-02 4.534E-02 4.558E-02 4.576E-02 4.589E-02 4.596E-02 4.597E-02 4.592E-02 4.580E-02 4.562E-02 4.538E-02 4.508E-02 4.471E-02 4.428E-02 4.378E-02 4.322E-02 4.260E-02 4.192E-02 4.119E-02 4.039E-02 3.954E-02 3.864E-02 3.769E-02 3.669E-02 3.565E-02 3.457E-02 3.345E-02 3.229E-02 3.111E-02 2.990E-02 2.867E-02 2.741E-02 2.615E-02 2.487E-02 2.359E-02 2.231E-02 2.103E-02 1.976E-02 1.850E-02 1.726E-02 1.603E-02 1.483E-02 1.366E-02 1.252E-02 1.141E-02 1.034E-02 9.317E-03 8.335E-03 7.400E-03 6.515E-03 5.682E-03 4.902E-03 4.177E-03 3.510E-03 2.900E-03 2.348E-03 1.856E-03 1.423E-03 1.049E-03 7.331E-04 4.756E-04 2.751E-04 1.303E-04 3.969E-05 1.565E-06 2.521E-07 3.108E-05 1.148E-04 2.533E-04 4.481E-04 7.007E-04 1.012E-03 1.383E-03 1.813E-03 2.304E-03 2.855E-03 3.466E-03 4.135E-03 4.862E-03 5.646E-03 6.484E-03 7.376E-03 8.318E-03 9.308E-03 1.034E-02 1.142E-02 1.254E-02 1.369E-02 1.488E-02 1.609E-02 1.733E-02 1.859E-02 1.986E-02 2.115E-02 2.244E-02 2.374E-02 2.503E-02 2.632E-02 2.760E-02 2.887E-02 3.011E-02 3.133E-02 3.253E-02 3.369E-02 3.482E-02 3.591E-02 3.695E-02 3.795E-02 3.890E-02 3.980E-02 4.065E-02 4.144E-02 4.217E-02 4.284E-02 4.344E-02 4.399E-02 4.447E-02 4.488E-02 4.523E-02 4.551E-02 4.572E-02 4.587E-02 4.595E-02 4.597E-02 4.593E-02 4.582E-02 4.565E-02 4.542E-02 4.514E-02 4.480E-02 4.441E-02 4.396E-02 4.347E-02 4.294E-02 4.236E-02 4.174E-02 4.108E-02 4.039E-02 3.967E-02 3.891E-02 3.814E-02 3.734E-02 3.652E-02 3.568E-02 3.483E-02 3.397E-02 3.310E-02 3.223E-02 3.135E-02 3.047E-02 2.960E-02 2.872E-02 2.786E-02 2.700E-02 2.615E-02 2.531E-02 2.449E-02 2.368E-02 2.289E-02 2.212E-02 2.136E-02 2.063E-02 1.991E-02 1.922E-02 1.855E-02 1.791E-02 1.728E-02 1.668E-02 1.611E-02 1.556E-02 1.503E-02 1.453E-02 1.405E-02 1.360E-02 1.317E-02 1.277E-02 1.239E-02 1.204E-02 1.170E-02 1.139E-02 1.111E-02 1.085E-02 1.060E-02 1.039E-02 1.019E-02 1.001E-02 9.859E-03 9.726E-03 9.614E-03 9.522E-03 9.451E-03 9.401E-03 9.370E-03 9.360E-03 9.370E-03 9.401E-03 9.451E-03 9.522E-03 9.614E-03 9.726E-03 9.859E-03 1.001E-02 1.019E-02 1.039E-02 1.060E-02 1.085E-02 1.111E-02 1.139E-02 1.170E-02 1.204E-02 1.239E-02 1.277E-02 1.317E-02 1.360E-02 1.405E-02 1.453E-02 1.503E-02 1.556E-02 1.611E-02 1.668E-02 1.728E-02 1.791E-02 1.855E-02 1.922E-02 1.991E-02 2.063E-02 2.136E-02 2.212E-02 2.289E-02 2.368E-02 2.449E-02 2.531E-02 2.615E-02 2.700E-02 2.786E-02 2.872E-02 2.960E-02 3.047E-02 3.135E-02 3.223E-02 3.310E-02 3.397E-02 3.483E-02 3.568E-02 3.652E-02 3.734E-02 3.814E-02 3.891E-02 3.967E-02 4.039E-02 4.108E-02 4.174E-02 4.236E-02 4.294E-02 4.347E-02 4.396E-02 4.441E-02 4.480E-02 4.514E-02 4.542E-02 4.565E-02 4.582E-02 4.593E-02 4.597E-02 4.595E-02 4.587E-02 4.572E-02 4.551E-02 4.523E-02 4.488E-02 4.447E-02 4.399E-02 4.344E-02 4.284E-02 4.217E-02 4.144E-02 4.065E-02 3.980E-02 3.890E-02 3.795E-02 3.695E-02 3.591E-02 3.482E-02 3.369E-02 3.253E-02 3.133E-02 3.011E-02 2.887E-02 2.760E-02 2.632E-02 2.503E-02 2.374E-02 2.244E-02 2.115E-02 1.986E-02 1.859E-02 1.733E-02 1.609E-02 1.488E-02 1.369E-02 1.254E-02 1.142E-02 1.034E-02 9.308E-03 8.318E-03 7.376E-03 6.484E-03 5.646E-03 4.862E-03 4.135E-03 3.466E-03 2.855E-03 2.304E-03 1.813E-03 1.383E-03 1.012E-03 7.007E-04 4.481E-04 2.533E-04 1.148E-04 3.108E-05 2.278E-05 9.874E-05 2.299E-04 4.181E-04 6.645E-04 9.705E-04 1.337E-03 1.764E-03 2.252E-03 2.801E-03 3.411E-03 4.081E-03 4.810E-03 5.596E-03 6.439E-03 7.335E-03 8.283E-03 9.280E-03 1.032E-02 1.141E-02 1.254E-02 1.370E-02 1.490E-02 1.613E-02 1.738E-02 1.865E-02 1.994E-02 2.124E-02 2.255E-02 2.386E-02 2.517E-02 2.647E-02 2.776E-02 2.904E-02 3.030E-02 3.153E-02 3.273E-02 3.391E-02 3.504E-02 3.614E-02 3.719E-02 3.819E-02 3.914E-02 4.004E-02 4.088E-02 4.167E-02 4.239E-02 4.305E-02 4.364E-02 4.417E-02 4.463E-02 4.503E-02 4.535E-02 4.561E-02 4.580E-02 4.592E-02 4.597E-02 4.595E-02 4.587E-02 4.573E-02 4.552E-02 4.525E-02 4.492E-02 4.454E-02 4.410E-02 4.361E-02 4.307E-02 4.248E-02 4.185E-02 4.118E-02 4.047E-02 3.973E-02 3.895E-02 3.814E-02 3.731E-02 3.646E-02 3.559E-02 3.470E-02 3.380E-02 3.289E-02 3.197E-02 3.105E-02 3.012E-02 2.920E-02 2.828E-02 2.736E-02 2.645E-02 2.555E-02 2.467E-02 2.379E-02 2.294E-02 2.210E-02 2.127E-02 2.047E-02 1.969E-02 1.893E-02 1.819E-02 1.748E-02 1.679E-02 1.612E-02 1.548E-02 1.487E-02 1.428E-02 1.371E-02 1.317E-02 1.266E-02 1.218E-02 1.171E-02 1.128E-02 1.087E-02 1.048E-02 1.012E-02 9.777E-03 9.461E-03 9.169E-03 8.898E-03 8.650E-03 8.424E-03 8.218E-03 8.034E-03 7.870E-03 7.726E-03 7.602E-03 7.498E-03 7.413E-03 7.347E-03 7.300E-03 7.272E-03 7.262E-03 7.272E-03 7.300E-03 7.347E-03 7.413E-03 7.498E-03 7.602E-03 7.726E-03 7.870E-03 8.034E-03 8.218E-03 8.424E-03 8.650E-03 8.898E-03 9.169E-03 9.461E-03 9.777E-03 1.012E-02 1.048E-02 1.087E-02 1.128E-02 1.171E-02 1.218E-02 1.266E-02 1.317E-02 1.371E-02 1.428E-02 1.487E-02 1.548E-02 1.612E-02 1.679E-02 1.748E-02 1.819E-02 1.893E-02 1.969E-02 2.047E-02 2.127E-02 2.210E-02 2.294E-02 2.379E-02 2.467E-02 2.555E-02 2.645E-02 2.736E-02 2.828E-02 2.920E-02 3.012E-02 3.105E-02 3.197E-02 3.289E-02 3.380E-02 3.470E-02 3.559E-02 3.646E-02 3.731E-02 3.814E-02 3.895E-02 3.973E-02 4.047E-02 4.118E-02 4.185E-02 4.248E-02 4.307E-02 4.361E-02 4.410E-02 4.454E-02 4.492E-02 4.525E-02 4.552E-02 4.573E-02 4.587E-02 4.595E-02 4.597E-02 4.592E-02 4.580E-02 4.561E-02 4.535E-02 4.503E-02 4.463E-02 4.417E-02 4.364E-02 4.305E-02 4.239E-02 4.167E-02 4.088E-02 4.004E-02 3.914E-02 3.819E-02 3.719E-02 3.614E-02 3.504E-02 3.391E-02 3.273E-02 3.153E-02 3.030E-02 2.904E-02 2.776E-02 2.647E-02 2.517E-02 2.386E-02 2.255E-02 2.124E-02 1.994E-02 1.865E-02 1.738E-02 1.613E-02 1.490E-02 1.370E-02 1.254E-02 1.141E-02 1.032E-02 9.280E-03 8.283E-03 7.335E-03 6.439E-03 5.596E-03 4.810E-03 4.081E-03 3.411E-03 2.801E-03 2.252E-03 1.764E-03 1.337E-03 9.705E-04 6.645E-04 4.181E-04 2.299E-04 9.874E-05 8.243E-05 2.054E-04 3.858E-04 6.251E-04 9.246E-04 1.285E-03 1.708E-03 2.192E-03 2.738E-03 3.347E-03 4.016E-03 4.745E-03 5.533E-03 6.378E-03 7.278E-03 8.231E-03 9.234E-03 1.029E-02 1.138E-02 1.252E-02 1.369E-02 1.490E-02 1.614E-02 1.740E-02 1.869E-02 1.999E-02 2.130E-02 2.263E-02 2.395E-02 2.527E-02 2.659E-02 2.790E-02 2.919E-02 3.046E-02 3.170E-02 3.292E-02 3.410E-02 3.524E-02 3.634E-02 3.740E-02 3.840E-02 3.936E-02 4.026E-02 4.110E-02 4.187E-02 4.259E-02 4.324E-02 4.382E-02 4.434E-02 4.478E-02 4.516E-02 4.546E-02 4.570E-02 4.586E-02 4.595E-02 4.597E-02 4.592E-02 4.581E-02 4.562E-02 4.538E-02 4.507E-02 4.470E-02 4.427E-02 4.378E-02 4.324E-02 4.266E-02 4.202E-02 4.134E-02 4.061E-02 3.985E-02 3.905E-02 3.823E-02 3.737E-02 3.649E-02 3.558E-02 3.466E-02 3.372E-02 3.277E-02 3.181E-02 3.084E-02 2.987E-02 2.890E-02 2.793E-02 2.697E-02 2.601E-02 2.506E-02 2.413E-02 2.320E-02 2.230E-02 2.141E-02 2.054E-02 1.969E-02 1.886E-02 1.805E-02 1.727E-02 1.652E-02 1.578E-02 1.508E-02 1.440E-02 1.375E-02 1.312E-02 1.252E-02 1.195E-02 1.140E-02 1.089E-02 1.040E-02 9.931E-03 9.492E-03 9.078E-03 8.690E-03 8.326E-03 7.986E-03 7.669E-03 7.375E-03 7.104E-03 6.854E-03 6.625E-03 6.417E-03 6.229E-03 6.061E-03 5.911E-03 5.780E-03 5.668E-03 5.573E-03 5.496E-03 5.437E-03 5.395E-03 5.369E-03 5.361E-03 5.369E-03 5.395E-03 5.437E-03 5.496E-03 5.573E-03 5.668E-03 5.780E-03 5.911E-03 6.061E-03 6.229E-03 6.417E-03 6.625E-03 6.854E-03 7.104E-03 7.375E-03 7.669E-03 7.986E-03 8.326E-03 8.690E-03 9.078E-03 9.492E-03 9.931E-03 1.040E-02 1.089E-02 1.140E-02 1.195E-02 1.252E-02 1.312E-02 1.375E-02 1.440E-02 1.508E-02 1.578E-02 1.652E-02 1.727E-02 1.805E-02 1.886E-02 1.969E-02 2.054E-02 2.141E-02 2.230E-02 2.320E-02 2.413E-02 2.506E-02 2.601E-02 2.697E-02 2.793E-02 2.890E-02 2.987E-02 3.084E-02 3.181E-02 3.277E-02 3.372E-02 3.466E-02 3.558E-02 3.649E-02 3.737E-02 3.823E-02 3.905E-02 3.985E-02 4.061E-02 4.134E-02 4.202E-02 4.266E-02 4.324E-02 4.378E-02 4.427E-02 4.470E-02 4.507E-02 4.538E-02 4.562E-02 4.581E-02 4.592E-02 4.597E-02 4.595E-02 4.586E-02 4.570E-02 4.546E-02 4.516E-02 4.478E-02 4.434E-02 4.382E-02 4.324E-02 4.259E-02 4.187E-02 4.110E-02 4.026E-02 3.936E-02 3.840E-02 3.740E-02 3.634E-02 3.524E-02 3.410E-02 3.292E-02 3.170E-02 3.046E-02 2.919E-02 2.790E-02 2.659E-02 2.527E-02 2.395E-02 2.263E-02 2.130E-02 1.999E-02 1.869E-02 1.740E-02 1.614E-02 1.490E-02 1.369E-02 1.252E-02 1.138E-02 1.029E-02 9.234E-03 8.231E-03 7.278E-03 6.378E-03 5.533E-03 4.745E-03 4.016E-03 3.347E-03 2.738E-03 2.192E-03 1.708E-03 1.285E-03 9.246E-04 6.251E-04 3.858E-04 2.054E-04 1.800E-04 3.517E-04 5.828E-04 8.748E-04 1.229E-03 1.645E-03 2.124E-03 2.667E-03 3.272E-03 3.939E-03 4.667E-03 5.456E-03 6.302E-03 7.205E-03 8.162E-03 9.170E-03 1.023E-02 1.133E-02 1.248E-02 1.366E-02 1.488E-02 1.613E-02 1.740E-02 1.870E-02 2.001E-02 2.134E-02 2.268E-02 2.402E-02 2.535E-02 2.668E-02 2.800E-02 2.931E-02 3.059E-02 3.184E-02 3.307E-02 3.426E-02 3.541E-02 3.652E-02 3.758E-02 3.859E-02 3.955E-02 4.045E-02 4.128E-02 4.206E-02 4.277E-02 4.341E-02 4.398E-02 4.449E-02 4.492E-02 4.527E-02 4.556E-02 4.577E-02 4.590E-02 4.597E-02 4.596E-02 4.588E-02 4.573E-02 4.551E-02 4.522E-02 4.487E-02 4.446E-02 4.399E-02 4.346E-02 4.287E-02 4.223E-02 4.155E-02 4.082E-02 4.004E-02 3.923E-02 3.838E-02 3.750E-02 3.659E-02 3.566E-02 3.470E-02 3.373E-02 3.274E-02 3.174E-02 3.073E-02 2.972E-02 2.870E-02 2.769E-02 2.668E-02 2.567E-02 2.468E-02 2.369E-02 2.272E-02 2.177E-02 2.083E-02 1.991E-02 1.902E-02 1.815E-02 1.730E-02 1.647E-02 1.567E-02 1.490E-02 1.415E-02 1.344E-02 1.275E-02 1.209E-02 1.146E-02 1.086E-02 1.028E-02 9.736E-03 9.219E-03 8.729E-03 8.267E-03 7.832E-03 7.422E-03 7.039E-03 6.680E-03 6.345E-03 6.034E-03 5.746E-03 5.479E-03 5.234E-03 5.010E-03 4.805E-03 4.620E-03 4.453E-03 4.304E-03 4.173E-03 4.058E-03 3.959E-03 3.877E-03 3.809E-03 3.758E-03 3.721E-03 3.699E-03 3.691E-03 3.699E-03 3.721E-03 3.758E-03 3.809E-03 3.877E-03 3.959E-03 4.058E-03 4.173E-03 4.304E-03 4.453E-03 4.620E-03 4.805E-03 5.010E-03 5.234E-03 5.479E-03 5.746E-03 6.034E-03 6.345E-03 6.680E-03 7.039E-03 7.422E-03 7.832E-03 8.267E-03 8.729E-03 9.219E-03 9.736E-03 1.028E-02 1.086E-02 1.146E-02 1.209E-02 1.275E-02 1.344E-02 1.415E-02 1.490E-02 1.567E-02 1.647E-02 1.730E-02 1.815E-02 1.902E-02 1.991E-02 2.083E-02 2.177E-02 2.272E-02 2.369E-02 2.468E-02 2.567E-02 2.668E-02 2.769E-02 2.870E-02 2.972E-02 3.073E-02 3.174E-02 3.274E-02 3.373E-02 3.470E-02 3.566E-02 3.659E-02 3.750E-02 3.838E-02 3.923E-02 4.004E-02 4.082E-02 4.155E-02 4.223E-02 4.287E-02 4.346E-02 4.399E-02 4.446E-02 4.487E-02 4.522E-02 4.551E-02 4.573E-02 4.588E-02 4.596E-02 4.597E-02 4.590E-02 4.577E-02 4.556E-02 4.527E-02 4.492E-02 4.449E-02 4.398E-02 4.341E-02 4.277E-02 4.206E-02 4.128E-02 4.045E-02 3.955E-02 3.859E-02 3.758E-02 3.652E-02 3.541E-02 3.426E-02 3.307E-02 3.184E-02 3.059E-02 2.931E-02 2.800E-02 2.668E-02 2.535E-02 2.402E-02 2.268E-02 2.134E-02 2.001E-02 1.870E-02 1.740E-02 1.613E-02 1.488E-02 1.366E-02 1.248E-02 1.133E-02 1.023E-02 9.170E-03 8.162E-03 7.205E-03 6.302E-03 5.456E-03 4.667E-03 3.939E-03 3.272E-03 2.667E-03 2.124E-03 1.645E-03 1.229E-03 8.748E-04 5.828E-04 3.517E-04 3.162E-04 5.381E-04 8.215E-04 1.167E-03 1.577E-03 2.050E-03 2.587E-03 3.188E-03 3.852E-03 4.578E-03 5.365E-03 6.212E-03 7.116E-03 8.076E-03 9.088E-03 1.015E-02 1.126E-02 1.241E-02 1.360E-02 1.483E-02 1.609E-02 1.738E-02 1.869E-02 2.001E-02 2.136E-02 2.270E-02 2.406E-02 2.541E-02 2.675E-02 2.808E-02 2.940E-02 3.069E-02 3.196E-02 3.320E-02 3.440E-02 3.556E-02 3.668E-02 3.774E-02 3.876E-02 3.972E-02 4.062E-02 4.145E-02 4.222E-02 4.293E-02 4.356E-02 4.413E-02 4.462E-02 4.503E-02 4.537E-02 4.563E-02 4.582E-02 4.593E-02 4.597E-02 4.593E-02 4.582E-02 4.564E-02 4.538E-02 4.506E-02 4.467E-02 4.422E-02 4.370E-02 4.312E-02 4.249E-02 4.181E-02 4.107E-02 4.029E-02 3.947E-02 3.861E-02 3.771E-02 3.678E-02 3.582E-02 3.483E-02 3.383E-02 3.280E-02 3.177E-02 3.072E-02 2.967E-02 2.861E-02 2.755E-02 2.649E-02 2.544E-02 2.440E-02 2.337E-02 2.235E-02 2.135E-02 2.037E-02 1.940E-02 1.846E-02 1.754E-02 1.665E-02 1.578E-02 1.494E-02 1.413E-02 1.335E-02 1.260E-02 1.187E-02 1.118E-02 1.052E-02 9.890E-03 9.290E-03 8.719E-03 8.179E-03 7.669E-03 7.188E-03 6.735E-03 6.309E-03 5.911E-03 5.539E-03 5.193E-03 4.871E-03 4.572E-03 4.296E-03 4.042E-03 3.809E-03 3.596E-03 3.402E-03 3.227E-03 3.068E-03 2.927E-03 2.801E-03 2.690E-03 2.594E-03 2.512E-03 2.443E-03 2.388E-03 2.345E-03 2.314E-03 2.296E-03 2.290E-03 2.296E-03 2.314E-03 2.345E-03 2.388E-03 2.443E-03 2.512E-03 2.594E-03 2.690E-03 2.801E-03 2.927E-03 3.068E-03 3.227E-03 3.402E-03 3.596E-03 3.809E-03 4.042E-03 4.296E-03 4.572E-03 4.871E-03 5.193E-03 5.539E-03 5.911E-03 6.309E-03 6.735E-03 7.188E-03 7.669E-03 8.179E-03 8.719E-03 9.290E-03 9.890E-03 1.052E-02 1.118E-02 1.187E-02 1.260E-02 1.335E-02 1.413E-02 1.494E-02 1.578E-02 1.665E-02 1.754E-02 1.846E-02 1.940E-02 2.037E-02 2.135E-02 2.235E-02 2.337E-02 2.440E-02 2.544E-02 2.649E-02 2.755E-02 2.861E-02 2.967E-02 3.072E-02 3.177E-02 3.280E-02 3.383E-02 3.483E-02 3.582E-02 3.678E-02 3.771E-02 3.861E-02 3.947E-02 4.029E-02 4.107E-02 4.181E-02 4.249E-02 4.312E-02 4.370E-02 4.422E-02 4.467E-02 4.506E-02 4.538E-02 4.564E-02 4.582E-02 4.593E-02 4.597E-02 4.593E-02 4.582E-02 4.563E-02 4.537E-02 4.503E-02 4.462E-02 4.413E-02 4.356E-02 4.293E-02 4.222E-02 4.145E-02 4.062E-02 3.972E-02 3.876E-02 3.774E-02 3.668E-02 3.556E-02 3.440E-02 3.320E-02 3.196E-02 3.069E-02 2.940E-02 2.808E-02 2.675E-02 2.541E-02 2.406E-02 2.270E-02 2.136E-02 2.001E-02 1.869E-02 1.738E-02 1.609E-02 1.483E-02 1.360E-02 1.241E-02 1.126E-02 1.015E-02 9.088E-03 8.076E-03 7.116E-03 6.212E-03 5.365E-03 4.578E-03 3.852E-03 3.188E-03 2.587E-03 2.050E-03 1.577E-03 1.167E-03 8.215E-04 5.381E-04 4.916E-04 7.652E-04 1.102E-03 1.503E-03 1.969E-03 2.499E-03 3.094E-03 3.754E-03 4.477E-03 5.262E-03 6.108E-03 7.012E-03 7.973E-03 8.988E-03 1.005E-02 1.117E-02 1.233E-02 1.353E-02 1.476E-02 1.603E-02 1.733E-02 1.865E-02 1.999E-02 2.134E-02 2.270E-02 2.407E-02 2.543E-02 2.679E-02 2.814E-02 2.947E-02 3.077E-02 3.205E-02 3.330E-02 3.451E-02 3.568E-02 3.681E-02 3.788E-02 3.890E-02 3.986E-02 4.076E-02 4.160E-02 4.237E-02 4.307E-02 4.370E-02 4.425E-02 4.473E-02 4.513E-02 4.545E-02 4.570E-02 4.587E-02 4.596E-02 4.597E-02 4.590E-02 4.576E-02 4.554E-02 4.525E-02 4.489E-02 4.446E-02 4.397E-02 4.341E-02 4.279E-02 4.211E-02 4.138E-02 4.060E-02 3.977E-02 3.890E-02 3.799E-02 3.704E-02 3.606E-02 3.505E-02 3.402E-02 3.296E-02 3.189E-02 3.081E-02 2.972E-02 2.862E-02 2.752E-02 2.642E-02 2.532E-02 2.424E-02 2.316E-02 2.210E-02 2.105E-02 2.002E-02 1.901E-02 1.802E-02 1.706E-02 1.612E-02 1.521E-02 1.433E-02 1.348E-02 1.266E-02 1.187E-02 1.112E-02 1.040E-02 9.706E-03 9.048E-03 8.424E-03 7.832E-03 7.272E-03 6.744E-03 6.247E-03 5.780E-03 5.344E-03 4.936E-03 4.556E-03 4.203E-03 3.877E-03 3.575E-03 3.296E-03 3.041E-03 2.807E-03 2.594E-03 2.400E-03 2.224E-03 2.066E-03 1.924E-03 1.797E-03 1.684E-03 1.585E-03 1.499E-03 1.424E-03 1.361E-03 1.309E-03 1.266E-03 1.234E-03 1.211E-03 1.197E-03 1.193E-03 1.197E-03 1.211E-03 1.234E-03 1.266E-03 1.309E-03 1.361E-03 1.424E-03 1.499E-03 1.585E-03 1.684E-03 1.797E-03 1.924E-03 2.066E-03 2.224E-03 2.400E-03 2.594E-03 2.807E-03 3.041E-03 3.296E-03 3.575E-03 3.877E-03 4.203E-03 4.556E-03 4.936E-03 5.344E-03 5.780E-03 6.247E-03 6.744E-03 7.272E-03 7.832E-03 8.424E-03 9.048E-03 9.706E-03 1.040E-02 1.112E-02 1.187E-02 1.266E-02 1.348E-02 1.433E-02 1.521E-02 1.612E-02 1.706E-02 1.802E-02 1.901E-02 2.002E-02 2.105E-02 2.210E-02 2.316E-02 2.424E-02 2.532E-02 2.642E-02 2.752E-02 2.862E-02 2.972E-02 3.081E-02 3.189E-02 3.296E-02 3.402E-02 3.505E-02 3.606E-02 3.704E-02 3.799E-02 3.890E-02 3.977E-02 4.060E-02 4.138E-02 4.211E-02 4.279E-02 4.341E-02 4.397E-02 4.446E-02 4.489E-02 4.525E-02 4.554E-02 4.576E-02 4.590E-02 4.597E-02 4.596E-02 4.587E-02 4.570E-02 4.545E-02 4.513E-02 4.473E-02 4.425E-02 4.370E-02 4.307E-02 4.237E-02 4.160E-02 4.076E-02 3.986E-02 3.890E-02 3.788E-02 3.681E-02 3.568E-02 3.451E-02 3.330E-02 3.205E-02 3.077E-02 2.947E-02 2.814E-02 2.679E-02 2.543E-02 2.407E-02 2.270E-02 2.134E-02 1.999E-02 1.865E-02 1.733E-02 1.603E-02 1.476E-02 1.353E-02 1.233E-02 1.117E-02 1.005E-02 8.988E-03 7.973E-03 7.012E-03 6.108E-03 5.262E-03 4.477E-03 3.754E-03 3.094E-03 2.499E-03 1.969E-03 1.503E-03 1.102E-03 7.652E-04 7.064E-04 1.033E-03 1.424E-03 1.881E-03 2.404E-03 2.992E-03 3.646E-03 4.364E-03 5.146E-03 5.989E-03 6.893E-03 7.854E-03 8.871E-03 9.940E-03 1.106E-02 1.222E-02 1.343E-02 1.467E-02 1.595E-02 1.726E-02 1.859E-02 1.994E-02 2.130E-02 2.268E-02 2.406E-02 2.543E-02 2.681E-02 2.816E-02 2.951E-02 3.083E-02 3.212E-02 3.338E-02 3.460E-02 3.578E-02 3.691E-02 3.799E-02 3.902E-02 3.999E-02 4.089E-02 4.173E-02 4.250E-02 4.319E-02 4.381E-02 4.436E-02 4.483E-02 4.522E-02 4.553E-02 4.575E-02 4.590E-02 4.597E-02 4.595E-02 4.586E-02 4.569E-02 4.544E-02 4.512E-02 4.472E-02 4.425E-02 4.372E-02 4.312E-02 4.246E-02 4.174E-02 4.096E-02 4.013E-02 3.926E-02 3.834E-02 3.738E-02 3.638E-02 3.535E-02 3.429E-02 3.321E-02 3.211E-02 3.100E-02 2.987E-02 2.873E-02 2.759E-02 2.645E-02 2.531E-02 2.418E-02 2.306E-02 2.195E-02 2.085E-02 1.978E-02 1.872E-02 1.769E-02 1.668E-02 1.571E-02 1.475E-02 1.383E-02 1.295E-02 1.209E-02 1.127E-02 1.048E-02 9.726E-03 9.008E-03 8.326E-03 7.678E-03 7.066E-03 6.489E-03 5.946E-03 5.437E-03 4.961E-03 4.516E-03 4.103E-03 3.721E-03 3.367E-03 3.041E-03 2.742E-03 2.468E-03 2.218E-03 1.991E-03 1.786E-03 1.601E-03 1.434E-03 1.285E-03 1.152E-03 1.035E-03 9.309E-04 8.399E-04 7.605E-04 6.919E-04 6.330E-04 5.831E-04 5.414E-04 5.072E-04 4.801E-04 4.594E-04 4.450E-04 4.364E-04 4.335E-04 4.364E-04 4.450E-04 4.594E-04 4.801E-04 5.072E-04 5.414E-04 5.831E-04 6.330E-04 6.919E-04 7.605E-04 8.399E-04 9.309E-04 1.035E-03 1.152E-03 1.285E-03 1.434E-03 1.601E-03 1.786E-03 1.991E-03 2.218E-03 2.468E-03 2.742E-03 3.041E-03 3.367E-03 3.721E-03 4.103E-03 4.516E-03 4.961E-03 5.437E-03 5.946E-03 6.489E-03 7.066E-03 7.678E-03 8.326E-03 9.008E-03 9.726E-03 1.048E-02 1.127E-02 1.209E-02 1.295E-02 1.383E-02 1.475E-02 1.571E-02 1.668E-02 1.769E-02 1.872E-02 1.978E-02 2.085E-02 2.195E-02 2.306E-02 2.418E-02 2.531E-02 2.645E-02 2.759E-02 2.873E-02 2.987E-02 3.100E-02 3.211E-02 3.321E-02 3.429E-02 3.535E-02 3.638E-02 3.738E-02 3.834E-02 3.926E-02 4.013E-02 4.096E-02 4.174E-02 4.246E-02 4.312E-02 4.372E-02 4.425E-02 4.472E-02 4.512E-02 4.544E-02 4.569E-02 4.586E-02 4.595E-02 4.597E-02 4.590E-02 4.575E-02 4.553E-02 4.522E-02 4.483E-02 4.436E-02 4.381E-02 4.319E-02 4.250E-02 4.173E-02 4.089E-02 3.999E-02 3.902E-02 3.799E-02 3.691E-02 3.578E-02 3.460E-02 3.338E-02 3.212E-02 3.083E-02 2.951E-02 2.816E-02 2.681E-02 2.543E-02 2.406E-02 2.268E-02 2.130E-02 1.994E-02 1.859E-02 1.726E-02 1.595E-02 1.467E-02 1.343E-02 1.222E-02 1.106E-02 9.940E-03 8.871E-03 7.854E-03 6.893E-03 5.989E-03 5.146E-03 4.364E-03 3.646E-03 2.992E-03 2.404E-03 1.881E-03 1.424E-03 1.033E-03 9.609E-04 1.342E-03 1.789E-03 2.302E-03 2.882E-03 3.529E-03 4.241E-03 5.018E-03 5.858E-03 6.759E-03 7.720E-03 8.737E-03 9.807E-03 1.093E-02 1.210E-02 1.331E-02 1.456E-02 1.584E-02 1.716E-02 1.850E-02 1.986E-02 2.124E-02 2.263E-02 2.402E-02 2.541E-02 2.679E-02 2.816E-02 2.952E-02 3.085E-02 3.216E-02 3.343E-02 3.466E-02 3.585E-02 3.699E-02 3.808E-02 3.912E-02 4.009E-02 4.100E-02 4.183E-02 4.260E-02 4.330E-02 4.391E-02 4.445E-02 4.491E-02 4.529E-02 4.559E-02 4.580E-02 4.593E-02 4.597E-02 4.593E-02 4.582E-02 4.562E-02 4.534E-02 4.498E-02 4.455E-02 4.405E-02 4.347E-02 4.283E-02 4.213E-02 4.137E-02 4.054E-02 3.967E-02 3.875E-02 3.778E-02 3.678E-02 3.573E-02 3.466E-02 3.355E-02 3.243E-02 3.128E-02 3.012E-02 2.895E-02 2.777E-02 2.659E-02 2.541E-02 2.424E-02 2.307E-02 2.192E-02 2.078E-02 1.965E-02 1.855E-02 1.748E-02 1.643E-02 1.540E-02 1.441E-02 1.345E-02 1.252E-02 1.163E-02 1.077E-02 9.951E-03 9.169E-03 8.424E-03 7.717E-03 7.048E-03 6.417E-03 5.824E-03 5.268E-03 4.749E-03 4.265E-03 3.817E-03 3.402E-03 3.021E-03 2.671E-03 2.351E-03 2.060E-03 1.797E-03 1.559E-03 1.347E-03 1.157E-03 9.884E-04 8.399E-04 7.096E-04 5.962E-04 4.981E-04 4.139E-04 3.421E-04 2.815E-04 2.307E-04 1.886E-04 1.541E-04 1.261E-04 1.036E-04 8.587E-05 7.214E-05 6.178E-05 5.426E-05 4.919E-05 4.626E-05 4.531E-05 4.626E-05 4.919E-05 5.426E-05 6.178E-05 7.214E-05 8.587E-05 1.036E-04 1.261E-04 1.541E-04 1.886E-04 2.307E-04 2.815E-04 3.421E-04 4.139E-04 4.981E-04 5.962E-04 7.096E-04 8.399E-04 9.884E-04 1.157E-03 1.347E-03 1.559E-03 1.797E-03 2.060E-03 2.351E-03 2.671E-03 3.021E-03 3.402E-03 3.817E-03 4.265E-03 4.749E-03 5.268E-03 5.824E-03 6.417E-03 7.048E-03 7.717E-03 8.424E-03 9.169E-03 9.951E-03 1.077E-02 1.163E-02 1.252E-02 1.345E-02 1.441E-02 1.540E-02 1.643E-02 1.748E-02 1.855E-02 1.965E-02 2.078E-02 2.192E-02 2.307E-02 2.424E-02 2.541E-02 2.659E-02 2.777E-02 2.895E-02 3.012E-02 3.128E-02 3.243E-02 3.355E-02 3.466E-02 3.573E-02 3.678E-02 3.778E-02 3.875E-02 3.967E-02 4.054E-02 4.137E-02 4.213E-02 4.283E-02 4.347E-02 4.405E-02 4.455E-02 4.498E-02 4.534E-02 4.562E-02 4.582E-02 4.593E-02 4.597E-02 4.593E-02 4.580E-02 4.559E-02 4.529E-02 4.491E-02 4.445E-02 4.391E-02 4.330E-02 4.260E-02 4.183E-02 4.100E-02 4.009E-02 3.912E-02 3.808E-02 3.699E-02 3.585E-02 3.466E-02 3.343E-02 3.216E-02 3.085E-02 2.952E-02 2.816E-02 2.679E-02 2.541E-02 2.402E-02 2.263E-02 2.124E-02 1.986E-02 1.850E-02 1.716E-02 1.584E-02 1.456E-02 1.331E-02 1.210E-02 1.093E-02 9.807E-03 8.737E-03 7.720E-03 6.759E-03 5.858E-03 5.018E-03 4.241E-03 3.529E-03 2.882E-03 2.302E-03 1.789E-03 1.342E-03 1.255E-03 1.691E-03 2.194E-03 2.765E-03 3.403E-03 4.108E-03 4.879E-03 5.714E-03 6.611E-03 7.569E-03 8.586E-03 9.657E-03 1.078E-02 1.195E-02 1.317E-02 1.442E-02 1.572E-02 1.704E-02 1.839E-02 1.976E-02 2.115E-02 2.255E-02 2.395E-02 2.535E-02 2.675E-02 2.814E-02 2.951E-02 3.085E-02 3.217E-02 3.345E-02 3.470E-02 3.590E-02 3.705E-02 3.815E-02 3.919E-02 4.017E-02 4.108E-02 4.192E-02 4.269E-02 4.339E-02 4.400E-02 4.453E-02 4.499E-02 4.535E-02 4.564E-02 4.583E-02 4.594E-02 4.597E-02 4.591E-02 4.577E-02 4.554E-02 4.523E-02 4.485E-02 4.438E-02 4.384E-02 4.323E-02 4.255E-02 4.181E-02 4.100E-02 4.014E-02 3.922E-02 3.826E-02 3.724E-02 3.619E-02 3.510E-02 3.398E-02 3.283E-02 3.166E-02 3.047E-02 2.927E-02 2.806E-02 2.684E-02 2.562E-02 2.440E-02 2.319E-02 2.199E-02 2.081E-02 1.964E-02 1.850E-02 1.737E-02 1.628E-02 1.521E-02 1.418E-02 1.317E-02 1.221E-02 1.128E-02 1.039E-02 9.533E-03 8.719E-03 7.947E-03 7.216E-03 6.525E-03 5.876E-03 5.268E-03 4.700E-03 4.173E-03 3.684E-03 3.234E-03 2.820E-03 2.443E-03 2.101E-03 1.791E-03 1.514E-03 1.266E-03 1.047E-03 8.554E-04 6.883E-04 5.445E-04 4.223E-04 3.197E-04 2.350E-04 1.664E-04 1.123E-04 7.095E-05 4.068E-05 1.993E-05 7.209E-06 1.084E-06 2.162E-07 3.357E-06 9.360E-06 1.718E-05 2.589E-05 3.466E-05 4.280E-05 4.974E-05 5.502E-05 5.831E-05 5.944E-05 5.831E-05 5.502E-05 4.974E-05 4.280E-05 3.466E-05 2.589E-05 1.718E-05 9.360E-06 3.357E-06 2.162E-07 1.084E-06 7.209E-06 1.993E-05 4.068E-05 7.095E-05 1.123E-04 1.664E-04 2.350E-04 3.197E-04 4.223E-04 5.445E-04 6.883E-04 8.554E-04 1.047E-03 1.266E-03 1.514E-03 1.791E-03 2.101E-03 2.443E-03 2.820E-03 3.234E-03 3.684E-03 4.173E-03 4.700E-03 5.268E-03 5.876E-03 6.525E-03 7.216E-03 7.947E-03 8.719E-03 9.533E-03 1.039E-02 1.128E-02 1.221E-02 1.317E-02 1.418E-02 1.521E-02 1.628E-02 1.737E-02 1.850E-02 1.964E-02 2.081E-02 2.199E-02 2.319E-02 2.440E-02 2.562E-02 2.684E-02 2.806E-02 2.927E-02 3.047E-02 3.166E-02 3.283E-02 3.398E-02 3.510E-02 3.619E-02 3.724E-02 3.826E-02 3.922E-02 4.014E-02 4.100E-02 4.181E-02 4.255E-02 4.323E-02 4.384E-02 4.438E-02 4.485E-02 4.523E-02 4.554E-02 4.577E-02 4.591E-02 4.597E-02 4.594E-02 4.583E-02 4.564E-02 4.535E-02 4.499E-02 4.453E-02 4.400E-02 4.339E-02 4.269E-02 4.192E-02 4.108E-02 4.017E-02 3.919E-02 3.815E-02 3.705E-02 3.590E-02 3.470E-02 3.345E-02 3.217E-02 3.085E-02 2.951E-02 2.814E-02 2.675E-02 2.535E-02 2.395E-02 2.255E-02 2.115E-02 1.976E-02 1.839E-02 1.704E-02 1.572E-02 1.442E-02 1.317E-02 1.195E-02 1.078E-02 9.657E-03 8.586E-03 7.569E-03 6.611E-03 5.714E-03 4.879E-03 4.108E-03 3.403E-03 2.765E-03 2.194E-03 1.691E-03 1.589E-03 2.081E-03 2.641E-03 3.269E-03 3.965E-03 4.729E-03 5.557E-03 6.450E-03 7.404E-03 8.418E-03 9.488E-03 1.061E-02 1.179E-02 1.300E-02 1.427E-02 1.556E-02 1.689E-02 1.825E-02 1.963E-02 2.103E-02 2.244E-02 2.386E-02 2.527E-02 2.668E-02 2.808E-02 2.947E-02 3.083E-02 3.216E-02 3.345E-02 3.471E-02 3.593E-02 3.709E-02 3.820E-02 3.925E-02 4.023E-02 4.115E-02 4.199E-02 4.277E-02 4.346E-02 4.407E-02 4.460E-02 4.505E-02 4.541E-02 4.568E-02 4.586E-02 4.596E-02 4.596E-02 4.588E-02 4.572E-02 4.547E-02 4.513E-02 4.471E-02 4.422E-02 4.364E-02 4.300E-02 4.228E-02 4.150E-02 4.065E-02 3.975E-02 3.879E-02 3.778E-02 3.672E-02 3.562E-02 3.449E-02 3.333E-02 3.213E-02 3.092E-02 2.969E-02 2.844E-02 2.719E-02 2.593E-02 2.468E-02 2.343E-02 2.218E-02 2.096E-02 1.974E-02 1.855E-02 1.739E-02 1.625E-02 1.513E-02 1.405E-02 1.301E-02 1.200E-02 1.103E-02 1.011E-02 9.219E-03 8.375E-03 7.574E-03 6.817E-03 6.105E-03 5.437E-03 4.814E-03 4.234E-03 3.699E-03 3.206E-03 2.755E-03 2.345E-03 1.974E-03 1.642E-03 1.347E-03 1.086E-03 8.593E-04 6.639E-04 4.981E-04 3.601E-04 2.478E-04 1.593E-04 9.249E-05 4.531E-05 1.574E-05 1.762E-06 1.402E-06 1.271E-05 3.381E-05 6.286E-05 9.812E-05 1.379E-04 1.807E-04 2.249E-04 2.693E-04 3.124E-04 3.533E-04 3.908E-04 4.241E-04 4.524E-04 4.751E-04 4.916E-04 5.017E-04 5.051E-04 5.017E-04 4.916E-04 4.751E-04 4.524E-04 4.241E-04 3.908E-04 3.533E-04 3.124E-04 2.693E-04 2.249E-04 1.807E-04 1.379E-04 9.812E-05 6.286E-05 3.381E-05 1.271E-05 1.402E-06 1.762E-06 1.574E-05 4.531E-05 9.249E-05 1.593E-04 2.478E-04 3.601E-04 4.981E-04 6.639E-04 8.593E-04 1.086E-03 1.347E-03 1.642E-03 1.974E-03 2.345E-03 2.755E-03 3.206E-03 3.699E-03 4.234E-03 4.814E-03 5.437E-03 6.105E-03 6.817E-03 7.574E-03 8.375E-03 9.219E-03 1.011E-02 1.103E-02 1.200E-02 1.301E-02 1.405E-02 1.513E-02 1.625E-02 1.739E-02 1.855E-02 1.974E-02 2.096E-02 2.218E-02 2.343E-02 2.468E-02 2.593E-02 2.719E-02 2.844E-02 2.969E-02 3.092E-02 3.213E-02 3.333E-02 3.449E-02 3.562E-02 3.672E-02 3.778E-02 3.879E-02 3.975E-02 4.065E-02 4.150E-02 4.228E-02 4.300E-02 4.364E-02 4.422E-02 4.471E-02 4.513E-02 4.547E-02 4.572E-02 4.588E-02 4.596E-02 4.596E-02 4.586E-02 4.568E-02 4.541E-02 4.505E-02 4.460E-02 4.407E-02 4.346E-02 4.277E-02 4.199E-02 4.115E-02 4.023E-02 3.925E-02 3.820E-02 3.709E-02 3.593E-02 3.471E-02 3.345E-02 3.216E-02 3.083E-02 2.947E-02 2.808E-02 2.668E-02 2.527E-02 2.386E-02 2.244E-02 2.103E-02 1.963E-02 1.825E-02 1.689E-02 1.556E-02 1.427E-02 1.300E-02 1.179E-02 1.061E-02 9.488E-03 8.418E-03 7.404E-03 6.450E-03 5.557E-03 4.729E-03 3.965E-03 3.269E-03 2.641E-03 2.081E-03 1.963E-03 2.511E-03 3.128E-03 3.814E-03 4.568E-03 5.389E-03 6.276E-03 7.225E-03 8.235E-03 9.303E-03 1.043E-02 1.160E-02 1.282E-02 1.409E-02 1.539E-02 1.673E-02 1.809E-02 1.948E-02 2.089E-02 2.231E-02 2.374E-02 2.517E-02 2.659E-02 2.800E-02 2.940E-02 3.077E-02 3.212E-02 3.343E-02 3.470E-02 3.593E-02 3.710E-02 3.822E-02 3.928E-02 4.027E-02 4.120E-02 4.205E-02 4.282E-02 4.352E-02 4.413E-02 4.466E-02 4.510E-02 4.545E-02 4.571E-02 4.588E-02 4.596E-02 4.596E-02 4.586E-02 4.567E-02 4.539E-02 4.503E-02 4.458E-02 4.406E-02 4.345E-02 4.277E-02 4.202E-02 4.120E-02 4.031E-02 3.937E-02 3.837E-02 3.731E-02 3.622E-02 3.508E-02 3.390E-02 3.269E-02 3.146E-02 3.020E-02 2.893E-02 2.765E-02 2.635E-02 2.506E-02 2.377E-02 2.249E-02 2.122E-02 1.996E-02 1.872E-02 1.751E-02 1.632E-02 1.517E-02 1.404E-02 1.296E-02 1.191E-02 1.090E-02 9.931E-03 9.008E-03 8.131E-03 7.300E-03 6.516E-03 5.780E-03 5.093E-03 4.453E-03 3.862E-03 3.318E-03 2.820E-03 2.369E-03 1.963E-03 1.601E-03 1.280E-03 1.001E-03 7.605E-04 5.573E-04 3.892E-04 2.544E-04 1.507E-04 7.576E-05 2.751E-05 3.609E-06 1.764E-06 1.967E-05 5.502E-05 1.055E-04 1.690E-04 2.431E-04 3.258E-04 4.149E-04 5.085E-04 6.046E-04 7.014E-04 7.971E-04 8.902E-04 9.791E-04 1.062E-03 1.139E-03 1.208E-03 1.267E-03 1.317E-03 1.357E-03 1.386E-03 1.403E-03 1.409E-03 1.403E-03 1.386E-03 1.357E-03 1.317E-03 1.267E-03 1.208E-03 1.139E-03 1.062E-03 9.791E-04 8.902E-04 7.971E-04 7.014E-04 6.046E-04 5.085E-04 4.149E-04 3.258E-04 2.431E-04 1.690E-04 1.055E-04 5.502E-05 1.967E-05 1.764E-06 3.609E-06 2.751E-05 7.576E-05 1.507E-04 2.544E-04 3.892E-04 5.573E-04 7.605E-04 1.001E-03 1.280E-03 1.601E-03 1.963E-03 2.369E-03 2.820E-03 3.318E-03 3.862E-03 4.453E-03 5.093E-03 5.780E-03 6.516E-03 7.300E-03 8.131E-03 9.008E-03 9.931E-03 1.090E-02 1.191E-02 1.296E-02 1.404E-02 1.517E-02 1.632E-02 1.751E-02 1.872E-02 1.996E-02 2.122E-02 2.249E-02 2.377E-02 2.506E-02 2.635E-02 2.765E-02 2.893E-02 3.020E-02 3.146E-02 3.269E-02 3.390E-02 3.508E-02 3.622E-02 3.731E-02 3.837E-02 3.937E-02 4.031E-02 4.120E-02 4.202E-02 4.277E-02 4.345E-02 4.406E-02 4.458E-02 4.503E-02 4.539E-02 4.567E-02 4.586E-02 4.596E-02 4.596E-02 4.588E-02 4.571E-02 4.545E-02 4.510E-02 4.466E-02 4.413E-02 4.352E-02 4.282E-02 4.205E-02 4.120E-02 4.027E-02 3.928E-02 3.822E-02 3.710E-02 3.593E-02 3.470E-02 3.343E-02 3.212E-02 3.077E-02 2.940E-02 2.800E-02 2.659E-02 2.517E-02 2.374E-02 2.231E-02 2.089E-02 1.948E-02 1.809E-02 1.673E-02 1.539E-02 1.409E-02 1.282E-02 1.160E-02 1.043E-02 9.303E-03 8.235E-03 7.225E-03 6.276E-03 5.389E-03 4.568E-03 3.814E-03 3.128E-03 2.511E-03 2.375E-03 2.980E-03 3.654E-03 4.398E-03 5.210E-03 6.089E-03 7.032E-03 8.037E-03 9.102E-03 1.022E-02 1.140E-02 1.262E-02 1.389E-02 1.519E-02 1.654E-02 1.791E-02 1.931E-02 2.072E-02 2.215E-02 2.359E-02 2.503E-02 2.647E-02 2.790E-02 2.931E-02 3.069E-02 3.205E-02 3.338E-02 3.466E-02 3.590E-02 3.709E-02 3.822E-02 3.929E-02 4.029E-02 4.122E-02 4.208E-02 4.286E-02 4.356E-02 4.417E-02 4.470E-02 4.514E-02 4.548E-02 4.574E-02 4.590E-02 4.597E-02 4.594E-02 4.583E-02 4.562E-02 4.532E-02 4.494E-02 4.446E-02 4.391E-02 4.327E-02 4.256E-02 4.177E-02 4.091E-02 3.999E-02 3.901E-02 3.796E-02 3.687E-02 3.573E-02 3.455E-02 3.333E-02 3.209E-02 3.081E-02 2.951E-02 2.820E-02 2.688E-02 2.555E-02 2.423E-02 2.290E-02 2.159E-02 2.029E-02 1.901E-02 1.775E-02 1.652E-02 1.531E-02 1.414E-02 1.301E-02 1.192E-02 1.087E-02 9.859E-03 8.898E-03 7.986E-03 7.122E-03 6.309E-03 5.548E-03 4.838E-03 4.180E-03 3.575E-03 3.021E-03 2.518E-03 2.066E-03 1.663E-03 1.309E-03 1.001E-03 7.385E-04 5.195E-04 3.421E-04 2.042E-04 1.036E-04 3.801E-05 5.093E-06 2.384E-06 2.738E-05 7.755E-05 1.503E-04 2.431E-04 3.533E-04 4.784E-04 6.158E-04 7.631E-04 9.178E-04 1.078E-03 1.240E-03 1.403E-03 1.565E-03 1.723E-03 1.875E-03 2.021E-03 2.157E-03 2.284E-03 2.399E-03 2.501E-03 2.589E-03 2.662E-03 2.720E-03 2.761E-03 2.786E-03 2.795E-03 2.786E-03 2.761E-03 2.720E-03 2.662E-03 2.589E-03 2.501E-03 2.399E-03 2.284E-03 2.157E-03 2.021E-03 1.875E-03 1.723E-03 1.565E-03 1.403E-03 1.240E-03 1.078E-03 9.178E-04 7.631E-04 6.158E-04 4.784E-04 3.533E-04 2.431E-04 1.503E-04 7.755E-05 2.738E-05 2.384E-06 5.093E-06 3.801E-05 1.036E-04 2.042E-04 3.421E-04 5.195E-04 7.385E-04 1.001E-03 1.309E-03 1.663E-03 2.066E-03 2.518E-03 3.021E-03 3.575E-03 4.180E-03 4.838E-03 5.548E-03 6.309E-03 7.122E-03 7.986E-03 8.898E-03 9.859E-03 1.087E-02 1.192E-02 1.301E-02 1.414E-02 1.531E-02 1.652E-02 1.775E-02 1.901E-02 2.029E-02 2.159E-02 2.290E-02 2.423E-02 2.555E-02 2.688E-02 2.820E-02 2.951E-02 3.081E-02 3.209E-02 3.333E-02 3.455E-02 3.573E-02 3.687E-02 3.796E-02 3.901E-02 3.999E-02 4.091E-02 4.177E-02 4.256E-02 4.327E-02 4.391E-02 4.446E-02 4.494E-02 4.532E-02 4.562E-02 4.583E-02 4.594E-02 4.597E-02 4.590E-02 4.574E-02 4.548E-02 4.514E-02 4.470E-02 4.417E-02 4.356E-02 4.286E-02 4.208E-02 4.122E-02 4.029E-02 3.929E-02 3.822E-02 3.709E-02 3.590E-02 3.466E-02 3.338E-02 3.205E-02 3.069E-02 2.931E-02 2.790E-02 2.647E-02 2.503E-02 2.359E-02 2.215E-02 2.072E-02 1.931E-02 1.791E-02 1.654E-02 1.519E-02 1.389E-02 1.262E-02 1.140E-02 1.022E-02 9.102E-03 8.037E-03 7.032E-03 6.089E-03 5.210E-03 4.398E-03 3.654E-03 2.980E-03 2.826E-03 3.488E-03 4.220E-03 5.021E-03 5.891E-03 6.826E-03 7.825E-03 8.884E-03 1.000E-02 1.117E-02 1.240E-02 1.366E-02 1.497E-02 1.632E-02 1.770E-02 1.911E-02 2.053E-02 2.197E-02 2.342E-02 2.487E-02 2.632E-02 2.776E-02 2.919E-02 3.059E-02 3.196E-02 3.330E-02 3.460E-02 3.585E-02 3.705E-02 3.820E-02 3.928E-02 4.029E-02 4.123E-02 4.210E-02 4.289E-02 4.359E-02 4.420E-02 4.473E-02 4.517E-02 4.551E-02 4.576E-02 4.591E-02 4.597E-02 4.593E-02 4.580E-02 4.558E-02 4.526E-02 4.485E-02 4.435E-02 4.377E-02 4.310E-02 4.236E-02 4.154E-02 4.064E-02 3.969E-02 3.866E-02 3.758E-02 3.645E-02 3.527E-02 3.405E-02 3.280E-02 3.151E-02 3.019E-02 2.886E-02 2.751E-02 2.615E-02 2.479E-02 2.343E-02 2.207E-02 2.073E-02 1.940E-02 1.810E-02 1.682E-02 1.557E-02 1.435E-02 1.317E-02 1.204E-02 1.094E-02 9.890E-03 8.888E-03 7.937E-03 7.039E-03 6.193E-03 5.403E-03 4.668E-03 3.989E-03 3.367E-03 2.801E-03 2.290E-03 1.835E-03 1.434E-03 1.086E-03 7.903E-04 5.445E-04 3.472E-04 1.963E-04 8.981E-05 2.532E-05 4.667E-07 1.271E-05 5.944E-05 1.379E-04 2.454E-04 3.791E-04 5.360E-04 7.135E-04 9.085E-04 1.118E-03 1.340E-03 1.571E-03 1.808E-03 2.049E-03 2.291E-03 2.532E-03 2.770E-03 3.001E-03 3.224E-03 3.437E-03 3.639E-03 3.826E-03 3.998E-03 4.153E-03 4.291E-03 4.409E-03 4.506E-03 4.583E-03 4.639E-03 4.672E-03 4.683E-03 4.672E-03 4.639E-03 4.583E-03 4.506E-03 4.409E-03 4.291E-03 4.153E-03 3.998E-03 3.826E-03 3.639E-03 3.437E-03 3.224E-03 3.001E-03 2.770E-03 2.532E-03 2.291E-03 2.049E-03 1.808E-03 1.571E-03 1.340E-03 1.118E-03 9.085E-04 7.135E-04 5.360E-04 3.791E-04 2.454E-04 1.379E-04 5.944E-05 1.271E-05 4.667E-07 2.532E-05 8.981E-05 1.963E-04 3.472E-04 5.445E-04 7.903E-04 1.086E-03 1.434E-03 1.835E-03 2.290E-03 2.801E-03 3.367E-03 3.989E-03 4.668E-03 5.403E-03 6.193E-03 7.039E-03 7.937E-03 8.888E-03 9.890E-03 1.094E-02 1.204E-02 1.317E-02 1.435E-02 1.557E-02 1.682E-02 1.810E-02 1.940E-02 2.073E-02 2.207E-02 2.343E-02 2.479E-02 2.615E-02 2.751E-02 2.886E-02 3.019E-02 3.151E-02 3.280E-02 3.405E-02 3.527E-02 3.645E-02 3.758E-02 3.866E-02 3.969E-02 4.064E-02 4.154E-02 4.236E-02 4.310E-02 4.377E-02 4.435E-02 4.485E-02 4.526E-02 4.558E-02 4.580E-02 4.593E-02 4.597E-02 4.591E-02 4.576E-02 4.551E-02 4.517E-02 4.473E-02 4.420E-02 4.359E-02 4.289E-02 4.210E-02 4.123E-02 4.029E-02 3.928E-02 3.820E-02 3.705E-02 3.585E-02 3.460E-02 3.330E-02 3.196E-02 3.059E-02 2.919E-02 2.776E-02 2.632E-02 2.487E-02 2.342E-02 2.197E-02 2.053E-02 1.911E-02 1.770E-02 1.632E-02 1.497E-02 1.366E-02 1.240E-02 1.117E-02 1.000E-02 8.884E-03 7.825E-03 6.826E-03 5.891E-03 5.021E-03 4.220E-03 3.488E-03 3.314E-03 4.033E-03 4.823E-03 5.682E-03 6.608E-03 7.599E-03 8.652E-03 9.765E-03 1.093E-02 1.215E-02 1.342E-02 1.473E-02 1.609E-02 1.747E-02 1.888E-02 2.031E-02 2.176E-02 2.322E-02 2.469E-02 2.615E-02 2.760E-02 2.904E-02 3.046E-02 3.184E-02 3.320E-02 3.451E-02 3.578E-02 3.699E-02 3.815E-02 3.925E-02 4.027E-02 4.122E-02 4.210E-02 4.289E-02 4.360E-02 4.422E-02 4.475E-02 4.519E-02 4.553E-02 4.578E-02 4.592E-02 4.597E-02 4.592E-02 4.578E-02 4.554E-02 4.520E-02 4.477E-02 4.425E-02 4.364E-02 4.295E-02 4.217E-02 4.132E-02 4.039E-02 3.940E-02 3.834E-02 3.723E-02 3.606E-02 3.484E-02 3.358E-02 3.229E-02 3.096E-02 2.961E-02 2.823E-02 2.685E-02 2.545E-02 2.406E-02 2.267E-02 2.128E-02 1.991E-02 1.856E-02 1.724E-02 1.594E-02 1.468E-02 1.345E-02 1.226E-02 1.112E-02 1.002E-02 8.978E-03 7.986E-03 7.048E-03 6.167E-03 5.344E-03 4.580E-03 3.877E-03 3.234E-03 2.651E-03 2.130E-03 1.668E-03 1.266E-03 9.228E-04 6.364E-04 4.056E-04 2.286E-04 1.036E-04 2.826E-05 2.914E-07 1.718E-05 7.627E-05 1.748E-04 3.098E-04 4.784E-04 6.775E-04 9.039E-04 1.155E-03 1.426E-03 1.716E-03 2.021E-03 2.337E-03 2.662E-03 2.992E-03 3.325E-03 3.658E-03 3.988E-03 4.312E-03 4.628E-03 4.933E-03 5.225E-03 5.502E-03 5.762E-03 6.003E-03 6.223E-03 6.421E-03 6.595E-03 6.745E-03 6.869E-03 6.966E-03 7.036E-03 7.078E-03 7.092E-03 7.078E-03 7.036E-03 6.966E-03 6.869E-03 6.745E-03 6.595E-03 6.421E-03 6.223E-03 6.003E-03 5.762E-03 5.502E-03 5.225E-03 4.933E-03 4.628E-03 4.312E-03 3.988E-03 3.658E-03 3.325E-03 2.992E-03 2.662E-03 2.337E-03 2.021E-03 1.716E-03 1.426E-03 1.155E-03 9.039E-04 6.775E-04 4.784E-04 3.098E-04 1.748E-04 7.627E-05 1.718E-05 2.914E-07 2.826E-05 1.036E-04 2.286E-04 4.056E-04 6.364E-04 9.228E-04 1.266E-03 1.668E-03 2.130E-03 2.651E-03 3.234E-03 3.877E-03 4.580E-03 5.344E-03 6.167E-03 7.048E-03 7.986E-03 8.978E-03 1.002E-02 1.112E-02 1.226E-02 1.345E-02 1.468E-02 1.594E-02 1.724E-02 1.856E-02 1.991E-02 2.128E-02 2.267E-02 2.406E-02 2.545E-02 2.685E-02 2.823E-02 2.961E-02 3.096E-02 3.229E-02 3.358E-02 3.484E-02 3.606E-02 3.723E-02 3.834E-02 3.940E-02 4.039E-02 4.132E-02 4.217E-02 4.295E-02 4.364E-02 4.425E-02 4.477E-02 4.520E-02 4.554E-02 4.578E-02 4.592E-02 4.597E-02 4.592E-02 4.578E-02 4.553E-02 4.519E-02 4.475E-02 4.422E-02 4.360E-02 4.289E-02 4.210E-02 4.122E-02 4.027E-02 3.925E-02 3.815E-02 3.699E-02 3.578E-02 3.451E-02 3.320E-02 3.184E-02 3.046E-02 2.904E-02 2.760E-02 2.615E-02 2.469E-02 2.322E-02 2.176E-02 2.031E-02 1.888E-02 1.747E-02 1.609E-02 1.473E-02 1.342E-02 1.215E-02 1.093E-02 9.765E-03 8.652E-03 7.599E-03 6.608E-03 5.682E-03 4.823E-03 4.033E-03 3.840E-03 4.616E-03 5.463E-03 6.378E-03 7.359E-03 8.405E-03 9.512E-03 1.068E-02 1.189E-02 1.316E-02 1.447E-02 1.583E-02 1.721E-02 1.863E-02 2.007E-02 2.153E-02 2.300E-02 2.448E-02 2.595E-02 2.741E-02 2.887E-02 3.030E-02 3.170E-02 3.307E-02 3.440E-02 3.568E-02 3.691E-02 3.808E-02 3.919E-02 4.023E-02 4.120E-02 4.208E-02 4.289E-02 4.360E-02 4.423E-02 4.476E-02 4.520E-02 4.554E-02 4.579E-02 4.593E-02 4.597E-02 4.591E-02 4.576E-02 4.550E-02 4.515E-02 4.470E-02 4.416E-02 4.352E-02 4.280E-02 4.200E-02 4.112E-02 4.016E-02 3.914E-02 3.805E-02 3.690E-02 3.569E-02 3.444E-02 3.314E-02 3.181E-02 3.044E-02 2.905E-02 2.765E-02 2.622E-02 2.480E-02 2.337E-02 2.195E-02 2.054E-02 1.914E-02 1.777E-02 1.643E-02 1.511E-02 1.383E-02 1.260E-02 1.140E-02 1.026E-02 9.169E-03 8.131E-03 7.150E-03 6.229E-03 5.369E-03 4.572E-03 3.839E-03 3.171E-03 2.568E-03 2.031E-03 1.559E-03 1.152E-03 8.092E-04 5.289E-04 3.099E-04 1.507E-04 4.919E-05 3.342E-06 1.073E-05 6.879E-05 1.748E-04 3.258E-04 5.187E-04 7.505E-04 1.018E-03 1.317E-03 1.646E-03 2.000E-03 2.375E-03 2.770E-03 3.179E-03 3.600E-03 4.029E-03 4.463E-03 4.898E-03 5.332E-03 5.762E-03 6.184E-03 6.595E-03 6.994E-03 7.376E-03 7.741E-03 8.084E-03 8.406E-03 8.703E-03 8.973E-03 9.215E-03 9.428E-03 9.611E-03 9.762E-03 9.880E-03 9.965E-03 1.002E-02 1.003E-02 1.002E-02 9.965E-03 9.880E-03 9.762E-03 9.611E-03 9.428E-03 9.215E-03 8.973E-03 8.703E-03 8.406E-03 8.084E-03 7.741E-03 7.376E-03 6.994E-03 6.595E-03 6.184E-03 5.762E-03 5.332E-03 4.898E-03 4.463E-03 4.029E-03 3.600E-03 3.179E-03 2.770E-03 2.375E-03 2.000E-03 1.646E-03 1.317E-03 1.018E-03 7.505E-04 5.187E-04 3.258E-04 1.748E-04 6.879E-05 1.073E-05 3.342E-06 4.919E-05 1.507E-04 3.099E-04 5.289E-04 8.092E-04 1.152E-03 1.559E-03 2.031E-03 2.568E-03 3.171E-03 3.839E-03 4.572E-03 5.369E-03 6.229E-03 7.150E-03 8.131E-03 9.169E-03 1.026E-02 1.140E-02 1.260E-02 1.383E-02 1.511E-02 1.643E-02 1.777E-02 1.914E-02 2.054E-02 2.195E-02 2.337E-02 2.480E-02 2.622E-02 2.765E-02 2.905E-02 3.044E-02 3.181E-02 3.314E-02 3.444E-02 3.569E-02 3.690E-02 3.805E-02 3.914E-02 4.016E-02 4.112E-02 4.200E-02 4.280E-02 4.352E-02 4.416E-02 4.470E-02 4.515E-02 4.550E-02 4.576E-02 4.591E-02 4.597E-02 4.593E-02 4.579E-02 4.554E-02 4.520E-02 4.476E-02 4.423E-02 4.360E-02 4.289E-02 4.208E-02 4.120E-02 4.023E-02 3.919E-02 3.808E-02 3.691E-02 3.568E-02 3.440E-02 3.307E-02 3.170E-02 3.030E-02 2.887E-02 2.741E-02 2.595E-02 2.448E-02 2.300E-02 2.153E-02 2.007E-02 1.863E-02 1.721E-02 1.583E-02 1.447E-02 1.316E-02 1.189E-02 1.068E-02 9.512E-03 8.405E-03 7.359E-03 6.378E-03 5.463E-03 4.616E-03 4.402E-03 5.234E-03 6.137E-03 7.108E-03 8.145E-03 9.244E-03 1.040E-02 1.162E-02 1.288E-02 1.419E-02 1.555E-02 1.694E-02 1.836E-02 1.981E-02 2.127E-02 2.275E-02 2.424E-02 2.572E-02 2.720E-02 2.867E-02 3.011E-02 3.153E-02 3.292E-02 3.426E-02 3.556E-02 3.681E-02 3.799E-02 3.912E-02 4.017E-02 4.115E-02 4.205E-02 4.286E-02 4.359E-02 4.422E-02 4.476E-02 4.521E-02 4.555E-02 4.579E-02 4.593E-02 4.597E-02 4.591E-02 4.574E-02 4.547E-02 4.510E-02 4.464E-02 4.408E-02 4.342E-02 4.268E-02 4.185E-02 4.094E-02 3.996E-02 3.890E-02 3.778E-02 3.659E-02 3.535E-02 3.406E-02 3.273E-02 3.136E-02 2.996E-02 2.854E-02 2.709E-02 2.564E-02 2.418E-02 2.272E-02 2.127E-02 1.984E-02 1.842E-02 1.702E-02 1.566E-02 1.433E-02 1.304E-02 1.180E-02 1.060E-02 9.461E-03 8.375E-03 7.347E-03 6.381E-03 5.479E-03 4.644E-03 3.877E-03 3.178E-03 2.550E-03 1.991E-03 1.504E-03 1.086E-03 7.385E-04 4.594E-04 2.478E-04 1.022E-04 2.057E-05 9.375E-07 4.092E-05 1.379E-04 2.892E-04 4.916E-04 7.422E-04 1.038E-03 1.374E-03 1.749E-03 2.157E-03 2.597E-03 3.063E-03 3.552E-03 4.060E-03 4.583E-03 5.119E-03 5.662E-03 6.210E-03 6.759E-03 7.304E-03 7.844E-03 8.375E-03 8.893E-03 9.396E-03 9.880E-03 1.034E-02 1.078E-02 1.120E-02 1.158E-02 1.194E-02 1.226E-02 1.255E-02 1.280E-02 1.302E-02 1.319E-02 1.333E-02 1.344E-02 1.350E-02 1.352E-02 1.350E-02 1.344E-02 1.333E-02 1.319E-02 1.302E-02 1.280E-02 1.255E-02 1.226E-02 1.194E-02 1.158E-02 1.120E-02 1.078E-02 1.034E-02 9.880E-03 9.396E-03 8.893E-03 8.375E-03 7.844E-03 7.304E-03 6.759E-03 6.210E-03 5.662E-03 5.119E-03 4.583E-03 4.060E-03 3.552E-03 3.063E-03 2.597E-03 2.157E-03 1.749E-03 1.374E-03 1.038E-03 7.422E-04 4.916E-04 2.892E-04 1.379E-04 4.092E-05 9.375E-07 2.057E-05 1.022E-04 2.478E-04 4.594E-04 7.385E-04 1.086E-03 1.504E-03 1.991E-03 2.550E-03 3.178E-03 3.877E-03 4.644E-03 5.479E-03 6.381E-03 7.347E-03 8.375E-03 9.461E-03 1.060E-02 1.180E-02 1.304E-02 1.433E-02 1.566E-02 1.702E-02 1.842E-02 1.984E-02 2.127E-02 2.272E-02 2.418E-02 2.564E-02 2.709E-02 2.854E-02 2.996E-02 3.136E-02 3.273E-02 3.406E-02 3.535E-02 3.659E-02 3.778E-02 3.890E-02 3.996E-02 4.094E-02 4.185E-02 4.268E-02 4.342E-02 4.408E-02 4.464E-02 4.510E-02 4.547E-02 4.574E-02 4.591E-02 4.597E-02 4.593E-02 4.579E-02 4.555E-02 4.521E-02 4.476E-02 4.422E-02 4.359E-02 4.286E-02 4.205E-02 4.115E-02 4.017E-02 3.912E-02 3.799E-02 3.681E-02 3.556E-02 3.426E-02 3.292E-02 3.153E-02 3.011E-02 2.867E-02 2.720E-02 2.572E-02 2.424E-02 2.275E-02 2.127E-02 1.981E-02 1.836E-02 1.694E-02 1.555E-02 1.419E-02 1.288E-02 1.162E-02 1.040E-02 9.244E-03 8.145E-03 7.108E-03 6.137E-03 5.234E-03 4.998E-03 5.887E-03 6.846E-03 7.871E-03 8.961E-03 1.011E-02 1.132E-02 1.258E-02 1.389E-02 1.525E-02 1.664E-02 1.806E-02 1.951E-02 2.099E-02 2.247E-02 2.397E-02 2.547E-02 2.696E-02 2.844E-02 2.990E-02 3.133E-02 3.273E-02 3.410E-02 3.541E-02 3.668E-02 3.788E-02 3.902E-02 4.009E-02 4.108E-02 4.199E-02 4.282E-02 4.356E-02 4.420E-02 4.475E-02 4.520E-02 4.555E-02 4.579E-02 4.593E-02 4.597E-02 4.590E-02 4.573E-02 4.545E-02 4.507E-02 4.459E-02 4.401E-02 4.334E-02 4.257E-02 4.172E-02 4.079E-02 3.977E-02 3.869E-02 3.753E-02 3.631E-02 3.504E-02 3.372E-02 3.235E-02 3.095E-02 2.951E-02 2.806E-02 2.658E-02 2.509E-02 2.360E-02 2.212E-02 2.064E-02 1.918E-02 1.774E-02 1.632E-02 1.494E-02 1.360E-02 1.230E-02 1.106E-02 9.859E-03 8.719E-03 7.640E-03 6.625E-03 5.677E-03 4.797E-03 3.989E-03 3.254E-03 2.594E-03 2.008E-03 1.499E-03 1.065E-03 7.061E-04 4.223E-04 2.122E-04 7.455E-05 7.597E-06 9.360E-06 7.755E-05 2.096E-04 4.028E-04 6.540E-04 9.600E-04 1.317E-03 1.723E-03 2.172E-03 2.662E-03 3.188E-03 3.746E-03 4.333E-03 4.944E-03 5.576E-03 6.223E-03 6.882E-03 7.550E-03 8.221E-03 8.893E-03 9.561E-03 1.022E-02 1.087E-02 1.151E-02 1.212E-02 1.272E-02 1.329E-02 1.384E-02 1.436E-02 1.484E-02 1.529E-02 1.571E-02 1.608E-02 1.642E-02 1.671E-02 1.697E-02 1.717E-02 1.734E-02 1.745E-02 1.752E-02 1.755E-02 1.752E-02 1.745E-02 1.734E-02 1.717E-02 1.697E-02 1.671E-02 1.642E-02 1.608E-02 1.571E-02 1.529E-02 1.484E-02 1.436E-02 1.384E-02 1.329E-02 1.272E-02 1.212E-02 1.151E-02 1.087E-02 1.022E-02 9.561E-03 8.893E-03 8.221E-03 7.550E-03 6.882E-03 6.223E-03 5.576E-03 4.944E-03 4.333E-03 3.746E-03 3.188E-03 2.662E-03 2.172E-03 1.723E-03 1.317E-03 9.600E-04 6.540E-04 4.028E-04 2.096E-04 7.755E-05 9.360E-06 7.597E-06 7.455E-05 2.122E-04 4.223E-04 7.061E-04 1.065E-03 1.499E-03 2.008E-03 2.594E-03 3.254E-03 3.989E-03 4.797E-03 5.677E-03 6.625E-03 7.640E-03 8.719E-03 9.859E-03 1.106E-02 1.230E-02 1.360E-02 1.494E-02 1.632E-02 1.774E-02 1.918E-02 2.064E-02 2.212E-02 2.360E-02 2.509E-02 2.658E-02 2.806E-02 2.951E-02 3.095E-02 3.235E-02 3.372E-02 3.504E-02 3.631E-02 3.753E-02 3.869E-02 3.977E-02 4.079E-02 4.172E-02 4.257E-02 4.334E-02 4.401E-02 4.459E-02 4.507E-02 4.545E-02 4.573E-02 4.590E-02 4.597E-02 4.593E-02 4.579E-02 4.555E-02 4.520E-02 4.475E-02 4.420E-02 4.356E-02 4.282E-02 4.199E-02 4.108E-02 4.009E-02 3.902E-02 3.788E-02 3.668E-02 3.541E-02 3.410E-02 3.273E-02 3.133E-02 2.990E-02 2.844E-02 2.696E-02 2.547E-02 2.397E-02 2.247E-02 2.099E-02 1.951E-02 1.806E-02 1.664E-02 1.525E-02 1.389E-02 1.258E-02 1.132E-02 1.011E-02 8.961E-03 7.871E-03 6.846E-03 5.887E-03 5.628E-03 6.573E-03 7.586E-03 8.665E-03 9.807E-03 1.101E-02 1.226E-02 1.357E-02 1.492E-02 1.632E-02 1.774E-02 1.920E-02 2.068E-02 2.217E-02 2.368E-02 2.519E-02 2.669E-02 2.818E-02 2.966E-02 3.111E-02 3.253E-02 3.391E-02 3.524E-02 3.652E-02 3.774E-02 3.890E-02 3.999E-02 4.100E-02 4.192E-02 4.277E-02 4.352E-02 4.417E-02 4.473E-02 4.519E-02 4.554E-02 4.579E-02 4.593E-02 4.597E-02 4.590E-02 4.572E-02 4.543E-02 4.504E-02 4.455E-02 4.396E-02 4.327E-02 4.248E-02 4.161E-02 4.065E-02 3.961E-02 3.850E-02 3.731E-02 3.607E-02 3.476E-02 3.341E-02 3.201E-02 3.057E-02 2.910E-02 2.761E-02 2.611E-02 2.459E-02 2.307E-02 2.155E-02 2.005E-02 1.856E-02 1.710E-02 1.567E-02 1.428E-02 1.292E-02 1.162E-02 1.036E-02 9.169E-03 8.034E-03 6.964E-03 5.964E-03 5.035E-03 4.180E-03 3.402E-03 2.703E-03 2.083E-03 1.544E-03 1.086E-03 7.096E-04 4.139E-04 1.983E-04 6.178E-05 2.840E-06 1.967E-05 1.101E-04 2.717E-04 5.017E-04 7.971E-04 1.155E-03 1.571E-03 2.042E-03 2.564E-03 3.134E-03 3.746E-03 4.398E-03 5.084E-03 5.800E-03 6.541E-03 7.304E-03 8.084E-03 8.877E-03 9.678E-03 1.048E-02 1.129E-02 1.209E-02 1.288E-02 1.366E-02 1.442E-02 1.516E-02 1.588E-02 1.658E-02 1.724E-02 1.787E-02 1.847E-02 1.903E-02 1.955E-02 2.002E-02 2.045E-02 2.084E-02 2.117E-02 2.146E-02 2.170E-02 2.188E-02 2.201E-02 2.209E-02 2.212E-02 2.209E-02 2.201E-02 2.188E-02 2.170E-02 2.146E-02 2.117E-02 2.084E-02 2.045E-02 2.002E-02 1.955E-02 1.903E-02 1.847E-02 1.787E-02 1.724E-02 1.658E-02 1.588E-02 1.516E-02 1.442E-02 1.366E-02 1.288E-02 1.209E-02 1.129E-02 1.048E-02 9.678E-03 8.877E-03 8.084E-03 7.304E-03 6.541E-03 5.800E-03 5.084E-03 4.398E-03 3.746E-03 3.134E-03 2.564E-03 2.042E-03 1.571E-03 1.155E-03 7.971E-04 5.017E-04 2.717E-04 1.101E-04 1.967E-05 2.840E-06 6.178E-05 1.983E-04 4.139E-04 7.096E-04 1.086E-03 1.544E-03 2.083E-03 2.703E-03 3.402E-03 4.180E-03 5.035E-03 5.964E-03 6.964E-03 8.034E-03 9.169E-03 1.036E-02 1.162E-02 1.292E-02 1.428E-02 1.567E-02 1.710E-02 1.856E-02 2.005E-02 2.155E-02 2.307E-02 2.459E-02 2.611E-02 2.761E-02 2.910E-02 3.057E-02 3.201E-02 3.341E-02 3.476E-02 3.607E-02 3.731E-02 3.850E-02 3.961E-02 4.065E-02 4.161E-02 4.248E-02 4.327E-02 4.396E-02 4.455E-02 4.504E-02 4.543E-02 4.572E-02 4.590E-02 4.597E-02 4.593E-02 4.579E-02 4.554E-02 4.519E-02 4.473E-02 4.417E-02 4.352E-02 4.277E-02 4.192E-02 4.100E-02 3.999E-02 3.890E-02 3.774E-02 3.652E-02 3.524E-02 3.391E-02 3.253E-02 3.111E-02 2.966E-02 2.818E-02 2.669E-02 2.519E-02 2.368E-02 2.217E-02 2.068E-02 1.920E-02 1.774E-02 1.632E-02 1.492E-02 1.357E-02 1.226E-02 1.101E-02 9.807E-03 8.665E-03 7.586E-03 6.573E-03 6.291E-03 7.290E-03 8.357E-03 9.488E-03 1.068E-02 1.193E-02 1.323E-02 1.458E-02 1.597E-02 1.740E-02 1.886E-02 2.035E-02 2.185E-02 2.336E-02 2.488E-02 2.640E-02 2.790E-02 2.939E-02 3.086E-02 3.229E-02 3.369E-02 3.504E-02 3.634E-02 3.758E-02 3.876E-02 3.986E-02 4.089E-02 4.183E-02 4.269E-02 4.346E-02 4.413E-02 4.470E-02 4.517E-02 4.553E-02 4.579E-02 4.593E-02 4.597E-02 4.590E-02 4.572E-02 4.543E-02 4.503E-02 4.452E-02 4.392E-02 4.321E-02 4.241E-02 4.152E-02 4.054E-02 3.948E-02 3.834E-02 3.713E-02 3.585E-02 3.452E-02 3.313E-02 3.170E-02 3.023E-02 2.873E-02 2.721E-02 2.567E-02 2.413E-02 2.258E-02 2.104E-02 1.951E-02 1.800E-02 1.652E-02 1.507E-02 1.366E-02 1.229E-02 1.098E-02 9.726E-03 8.532E-03 7.403E-03 6.345E-03 5.361E-03 4.453E-03 3.625E-03 2.880E-03 2.218E-03 1.642E-03 1.152E-03 7.495E-04 4.335E-04 2.042E-04 6.067E-05 1.762E-06 2.589E-05 1.311E-04 3.151E-04 5.752E-04 9.085E-04 1.312E-03 1.782E-03 2.314E-03 2.906E-03 3.552E-03 4.248E-03 4.991E-03 5.774E-03 6.595E-03 7.448E-03 8.329E-03 9.232E-03 1.015E-02 1.109E-02 1.203E-02 1.298E-02 1.392E-02 1.486E-02 1.580E-02 1.671E-02 1.762E-02 1.849E-02 1.935E-02 2.017E-02 2.097E-02 2.172E-02 2.244E-02 2.312E-02 2.375E-02 2.434E-02 2.487E-02 2.536E-02 2.579E-02 2.617E-02 2.650E-02 2.676E-02 2.697E-02 2.712E-02 2.721E-02 2.724E-02 2.721E-02 2.712E-02 2.697E-02 2.676E-02 2.650E-02 2.617E-02 2.579E-02 2.536E-02 2.487E-02 2.434E-02 2.375E-02 2.312E-02 2.244E-02 2.172E-02 2.097E-02 2.017E-02 1.935E-02 1.849E-02 1.762E-02 1.671E-02 1.580E-02 1.486E-02 1.392E-02 1.298E-02 1.203E-02 1.109E-02 1.015E-02 9.232E-03 8.329E-03 7.448E-03 6.595E-03 5.774E-03 4.991E-03 4.248E-03 3.552E-03 2.906E-03 2.314E-03 1.782E-03 1.312E-03 9.085E-04 5.752E-04 3.151E-04 1.311E-04 2.589E-05 1.762E-06 6.067E-05 2.042E-04 4.335E-04 7.495E-04 1.152E-03 1.642E-03 2.218E-03 2.880E-03 3.625E-03 4.453E-03 5.361E-03 6.345E-03 7.403E-03 8.532E-03 9.726E-03 1.098E-02 1.229E-02 1.366E-02 1.507E-02 1.652E-02 1.800E-02 1.951E-02 2.104E-02 2.258E-02 2.413E-02 2.567E-02 2.721E-02 2.873E-02 3.023E-02 3.170E-02 3.313E-02 3.452E-02 3.585E-02 3.713E-02 3.834E-02 3.948E-02 4.054E-02 4.152E-02 4.241E-02 4.321E-02 4.392E-02 4.452E-02 4.503E-02 4.543E-02 4.572E-02 4.590E-02 4.597E-02 4.593E-02 4.579E-02 4.553E-02 4.517E-02 4.470E-02 4.413E-02 4.346E-02 4.269E-02 4.183E-02 4.089E-02 3.986E-02 3.876E-02 3.758E-02 3.634E-02 3.504E-02 3.369E-02 3.229E-02 3.086E-02 2.939E-02 2.790E-02 2.640E-02 2.488E-02 2.336E-02 2.185E-02 2.035E-02 1.886E-02 1.740E-02 1.597E-02 1.458E-02 1.323E-02 1.193E-02 1.068E-02 9.488E-03 8.357E-03 7.290E-03 6.984E-03 8.037E-03 9.157E-03 1.034E-02 1.158E-02 1.288E-02 1.422E-02 1.561E-02 1.704E-02 1.850E-02 1.999E-02 2.150E-02 2.302E-02 2.455E-02 2.608E-02 2.760E-02 2.910E-02 3.058E-02 3.203E-02 3.345E-02 3.482E-02 3.614E-02 3.740E-02 3.859E-02 3.972E-02 4.076E-02 4.173E-02 4.260E-02 4.339E-02 4.407E-02 4.466E-02 4.514E-02 4.551E-02 4.578E-02 4.593E-02 4.597E-02 4.590E-02 4.572E-02 4.543E-02 4.502E-02 4.451E-02 4.390E-02 4.318E-02 4.236E-02 4.145E-02 4.045E-02 3.937E-02 3.820E-02 3.697E-02 3.567E-02 3.430E-02 3.289E-02 3.143E-02 2.993E-02 2.840E-02 2.685E-02 2.528E-02 2.370E-02 2.213E-02 2.056E-02 1.901E-02 1.748E-02 1.597E-02 1.451E-02 1.309E-02 1.171E-02 1.040E-02 9.139E-03 7.947E-03 6.826E-03 5.780E-03 4.814E-03 3.929E-03 3.130E-03 2.418E-03 1.797E-03 1.266E-03 8.283E-04 4.831E-04 2.307E-04 7.095E-05 2.840E-06 2.515E-05 1.362E-04 3.339E-04 6.158E-04 9.791E-04 1.421E-03 1.937E-03 2.524E-03 3.179E-03 3.896E-03 4.672E-03 5.502E-03 6.381E-03 7.304E-03 8.267E-03 9.264E-03 1.029E-02 1.134E-02 1.241E-02 1.350E-02 1.459E-02 1.569E-02 1.678E-02 1.787E-02 1.896E-02 2.002E-02 2.107E-02 2.209E-02 2.309E-02 2.406E-02 2.499E-02 2.588E-02 2.673E-02 2.754E-02 2.830E-02 2.900E-02 2.966E-02 3.026E-02 3.080E-02 3.128E-02 3.170E-02 3.206E-02 3.236E-02 3.259E-02 3.275E-02 3.285E-02 3.288E-02 3.285E-02 3.275E-02 3.259E-02 3.236E-02 3.206E-02 3.170E-02 3.128E-02 3.080E-02 3.026E-02 2.966E-02 2.900E-02 2.830E-02 2.754E-02 2.673E-02 2.588E-02 2.499E-02 2.406E-02 2.309E-02 2.209E-02 2.107E-02 2.002E-02 1.896E-02 1.787E-02 1.678E-02 1.569E-02 1.459E-02 1.350E-02 1.241E-02 1.134E-02 1.029E-02 9.264E-03 8.267E-03 7.304E-03 6.381E-03 5.502E-03 4.672E-03 3.896E-03 3.179E-03 2.524E-03 1.937E-03 1.421E-03 9.791E-04 6.158E-04 3.339E-04 1.362E-04 2.515E-05 2.840E-06 7.095E-05 2.307E-04 4.831E-04 8.283E-04 1.266E-03 1.797E-03 2.418E-03 3.130E-03 3.929E-03 4.814E-03 5.780E-03 6.826E-03 7.947E-03 9.139E-03 1.040E-02 1.171E-02 1.309E-02 1.451E-02 1.597E-02 1.748E-02 1.901E-02 2.056E-02 2.213E-02 2.370E-02 2.528E-02 2.685E-02 2.840E-02 2.993E-02 3.143E-02 3.289E-02 3.430E-02 3.567E-02 3.697E-02 3.820E-02 3.937E-02 4.045E-02 4.145E-02 4.236E-02 4.318E-02 4.390E-02 4.451E-02 4.502E-02 4.543E-02 4.572E-02 4.590E-02 4.597E-02 4.593E-02 4.578E-02 4.551E-02 4.514E-02 4.466E-02 4.407E-02 4.339E-02 4.260E-02 4.173E-02 4.076E-02 3.972E-02 3.859E-02 3.740E-02 3.614E-02 3.482E-02 3.345E-02 3.203E-02 3.058E-02 2.910E-02 2.760E-02 2.608E-02 2.455E-02 2.302E-02 2.150E-02 1.999E-02 1.850E-02 1.704E-02 1.561E-02 1.422E-02 1.288E-02 1.158E-02 1.034E-02 9.157E-03 8.037E-03 7.707E-03 8.813E-03 9.983E-03 1.121E-02 1.250E-02 1.384E-02 1.523E-02 1.666E-02 1.812E-02 1.961E-02 2.112E-02 2.265E-02 2.419E-02 2.573E-02 2.726E-02 2.878E-02 3.028E-02 3.175E-02 3.318E-02 3.457E-02 3.591E-02 3.719E-02 3.840E-02 3.955E-02 4.062E-02 4.160E-02 4.250E-02 4.330E-02 4.400E-02 4.460E-02 4.510E-02 4.548E-02 4.576E-02 4.592E-02 4.597E-02 4.591E-02 4.573E-02 4.543E-02 4.503E-02 4.451E-02 4.389E-02 4.316E-02 4.233E-02 4.141E-02 4.039E-02 3.928E-02 3.810E-02 3.684E-02 3.551E-02 3.413E-02 3.268E-02 3.119E-02 2.967E-02 2.811E-02 2.653E-02 2.493E-02 2.333E-02 2.172E-02 2.013E-02 1.855E-02 1.700E-02 1.548E-02 1.400E-02 1.256E-02 1.118E-02 9.859E-03 8.601E-03 7.413E-03 6.300E-03 5.268E-03 4.320E-03 3.459E-03 2.690E-03 2.014E-03 1.434E-03 9.513E-04 5.669E-04 2.815E-04 9.521E-05 7.597E-06 1.779E-05 1.244E-04 3.258E-04 6.196E-04 1.003E-03 1.474E-03 2.028E-03 2.662E-03 3.372E-03 4.153E-03 5.002E-03 5.913E-03 6.882E-03 7.904E-03 8.973E-03 1.008E-02 1.123E-02 1.241E-02 1.362E-02 1.484E-02 1.608E-02 1.734E-02 1.859E-02 1.985E-02 2.110E-02 2.233E-02 2.356E-02 2.476E-02 2.594E-02 2.709E-02 2.820E-02 2.928E-02 3.032E-02 3.131E-02 3.226E-02 3.315E-02 3.399E-02 3.477E-02 3.549E-02 3.616E-02 3.675E-02 3.728E-02 3.775E-02 3.814E-02 3.847E-02 3.872E-02 3.890E-02 3.901E-02 3.905E-02 3.901E-02 3.890E-02 3.872E-02 3.847E-02 3.814E-02 3.775E-02 3.728E-02 3.675E-02 3.616E-02 3.549E-02 3.477E-02 3.399E-02 3.315E-02 3.226E-02 3.131E-02 3.032E-02 2.928E-02 2.820E-02 2.709E-02 2.594E-02 2.476E-02 2.356E-02 2.233E-02 2.110E-02 1.985E-02 1.859E-02 1.734E-02 1.608E-02 1.484E-02 1.362E-02 1.241E-02 1.123E-02 1.008E-02 8.973E-03 7.904E-03 6.882E-03 5.913E-03 5.002E-03 4.153E-03 3.372E-03 2.662E-03 2.028E-03 1.474E-03 1.003E-03 6.196E-04 3.258E-04 1.244E-04 1.779E-05 7.597E-06 9.521E-05 2.815E-04 5.669E-04 9.513E-04 1.434E-03 2.014E-03 2.690E-03 3.459E-03 4.320E-03 5.268E-03 6.300E-03 7.413E-03 8.601E-03 9.859E-03 1.118E-02 1.256E-02 1.400E-02 1.548E-02 1.700E-02 1.855E-02 2.013E-02 2.172E-02 2.333E-02 2.493E-02 2.653E-02 2.811E-02 2.967E-02 3.119E-02 3.268E-02 3.413E-02 3.551E-02 3.684E-02 3.810E-02 3.928E-02 4.039E-02 4.141E-02 4.233E-02 4.316E-02 4.389E-02 4.451E-02 4.503E-02 4.543E-02 4.573E-02 4.591E-02 4.597E-02 4.592E-02 4.576E-02 4.548E-02 4.510E-02 4.460E-02 4.400E-02 4.330E-02 4.250E-02 4.160E-02 4.062E-02 3.955E-02 3.840E-02 3.719E-02 3.591E-02 3.457E-02 3.318E-02 3.175E-02 3.028E-02 2.878E-02 2.726E-02 2.573E-02 2.419E-02 2.265E-02 2.112E-02 1.961E-02 1.812E-02 1.666E-02 1.523E-02 1.384E-02 1.250E-02 1.121E-02 9.983E-03 8.813E-03 8.458E-03 9.614E-03 1.083E-02 1.211E-02 1.344E-02 1.483E-02 1.625E-02 1.771E-02 1.921E-02 2.072E-02 2.226E-02 2.381E-02 2.535E-02 2.690E-02 2.843E-02 2.995E-02 3.143E-02 3.288E-02 3.429E-02 3.565E-02 3.695E-02 3.819E-02 3.936E-02 4.045E-02 4.145E-02 4.237E-02 4.319E-02 4.391E-02 4.453E-02 4.505E-02 4.545E-02 4.574E-02 4.591E-02 4.597E-02 4.591E-02 4.574E-02 4.545E-02 4.504E-02 4.452E-02 4.390E-02 4.316E-02 4.232E-02 4.138E-02 4.035E-02 3.923E-02 3.802E-02 3.674E-02 3.539E-02 3.398E-02 3.251E-02 3.100E-02 2.944E-02 2.786E-02 2.625E-02 2.462E-02 2.299E-02 2.136E-02 1.974E-02 1.815E-02 1.657E-02 1.503E-02 1.354E-02 1.209E-02 1.070E-02 9.370E-03 8.111E-03 6.928E-03 5.824E-03 4.805E-03 3.877E-03 3.041E-03 2.302E-03 1.663E-03 1.126E-03 6.919E-04 3.627E-04 1.389E-04 2.057E-05 7.280E-06 9.812E-05 2.917E-04 5.861E-04 9.791E-04 1.468E-03 2.049E-03 2.720E-03 3.475E-03 4.312E-03 5.225E-03 6.210E-03 7.262E-03 8.375E-03 9.544E-03 1.076E-02 1.203E-02 1.333E-02 1.467E-02 1.604E-02 1.743E-02 1.883E-02 2.025E-02 2.167E-02 2.309E-02 2.451E-02 2.591E-02 2.730E-02 2.866E-02 3.000E-02 3.131E-02 3.259E-02 3.382E-02 3.501E-02 3.616E-02 3.725E-02 3.829E-02 3.927E-02 4.019E-02 4.104E-02 4.183E-02 4.255E-02 4.320E-02 4.378E-02 4.429E-02 4.472E-02 4.507E-02 4.535E-02 4.554E-02 4.566E-02 4.570E-02 4.566E-02 4.554E-02 4.535E-02 4.507E-02 4.472E-02 4.429E-02 4.378E-02 4.320E-02 4.255E-02 4.183E-02 4.104E-02 4.019E-02 3.927E-02 3.829E-02 3.725E-02 3.616E-02 3.501E-02 3.382E-02 3.259E-02 3.131E-02 3.000E-02 2.866E-02 2.730E-02 2.591E-02 2.451E-02 2.309E-02 2.167E-02 2.025E-02 1.883E-02 1.743E-02 1.604E-02 1.467E-02 1.333E-02 1.203E-02 1.076E-02 9.544E-03 8.375E-03 7.262E-03 6.210E-03 5.225E-03 4.312E-03 3.475E-03 2.720E-03 2.049E-03 1.468E-03 9.791E-04 5.861E-04 2.917E-04 9.812E-05 7.280E-06 2.057E-05 1.389E-04 3.627E-04 6.919E-04 1.126E-03 1.663E-03 2.302E-03 3.041E-03 3.877E-03 4.805E-03 5.824E-03 6.928E-03 8.111E-03 9.370E-03 1.070E-02 1.209E-02 1.354E-02 1.503E-02 1.657E-02 1.815E-02 1.974E-02 2.136E-02 2.299E-02 2.462E-02 2.625E-02 2.786E-02 2.944E-02 3.100E-02 3.251E-02 3.398E-02 3.539E-02 3.674E-02 3.802E-02 3.923E-02 4.035E-02 4.138E-02 4.232E-02 4.316E-02 4.390E-02 4.452E-02 4.504E-02 4.545E-02 4.574E-02 4.591E-02 4.597E-02 4.591E-02 4.574E-02 4.545E-02 4.505E-02 4.453E-02 4.391E-02 4.319E-02 4.237E-02 4.145E-02 4.045E-02 3.936E-02 3.819E-02 3.695E-02 3.565E-02 3.429E-02 3.288E-02 3.143E-02 2.995E-02 2.843E-02 2.690E-02 2.535E-02 2.381E-02 2.226E-02 2.072E-02 1.921E-02 1.771E-02 1.625E-02 1.483E-02 1.344E-02 1.211E-02 1.083E-02 9.614E-03 9.234E-03 1.044E-02 1.171E-02 1.303E-02 1.441E-02 1.583E-02 1.729E-02 1.878E-02 2.030E-02 2.184E-02 2.340E-02 2.495E-02 2.651E-02 2.806E-02 2.959E-02 3.109E-02 3.256E-02 3.399E-02 3.537E-02 3.669E-02 3.795E-02 3.914E-02 4.026E-02 4.128E-02 4.222E-02 4.307E-02 4.381E-02 4.445E-02 4.499E-02 4.541E-02 4.571E-02 4.590E-02 4.597E-02 4.592E-02 4.576E-02 4.547E-02 4.507E-02 4.455E-02 4.392E-02 4.318E-02 4.233E-02 4.138E-02 4.034E-02 3.920E-02 3.798E-02 3.668E-02 3.531E-02 3.387E-02 3.238E-02 3.084E-02 2.926E-02 2.765E-02 2.601E-02 2.436E-02 2.270E-02 2.105E-02 1.940E-02 1.778E-02 1.619E-02 1.463E-02 1.312E-02 1.166E-02 1.026E-02 8.928E-03 7.669E-03 6.489E-03 5.395E-03 4.390E-03 3.481E-03 2.671E-03 1.963E-03 1.361E-03 8.671E-04 4.831E-04 2.102E-04 4.919E-05 2.162E-07 6.286E-05 2.362E-04 5.187E-04 9.085E-04 1.403E-03 2.000E-03 2.695E-03 3.485E-03 4.365E-03 5.332E-03 6.381E-03 7.506E-03 8.703E-03 9.965E-03 1.129E-02 1.266E-02 1.409E-02 1.555E-02 1.706E-02 1.859E-02 2.015E-02 2.172E-02 2.331E-02 2.490E-02 2.650E-02 2.808E-02 2.966E-02 3.122E-02 3.275E-02 3.426E-02 3.574E-02 3.718E-02 3.857E-02 3.993E-02 4.123E-02 4.248E-02 4.367E-02 4.480E-02 4.586E-02 4.686E-02 4.779E-02 4.864E-02 4.943E-02 5.013E-02 5.076E-02 5.130E-02 5.177E-02 5.215E-02 5.244E-02 5.266E-02 5.279E-02 5.283E-02 5.279E-02 5.266E-02 5.244E-02 5.215E-02 5.177E-02 5.130E-02 5.076E-02 5.013E-02 4.943E-02 4.864E-02 4.779E-02 4.686E-02 4.586E-02 4.480E-02 4.367E-02 4.248E-02 4.123E-02 3.993E-02 3.857E-02 3.718E-02 3.574E-02 3.426E-02 3.275E-02 3.122E-02 2.966E-02 2.808E-02 2.650E-02 2.490E-02 2.331E-02 2.172E-02 2.015E-02 1.859E-02 1.706E-02 1.555E-02 1.409E-02 1.266E-02 1.129E-02 9.965E-03 8.703E-03 7.506E-03 6.381E-03 5.332E-03 4.365E-03 3.485E-03 2.695E-03 2.000E-03 1.403E-03 9.085E-04 5.187E-04 2.362E-04 6.286E-05 2.162E-07 4.919E-05 2.102E-04 4.831E-04 8.671E-04 1.361E-03 1.963E-03 2.671E-03 3.481E-03 4.390E-03 5.395E-03 6.489E-03 7.669E-03 8.928E-03 1.026E-02 1.166E-02 1.312E-02 1.463E-02 1.619E-02 1.778E-02 1.940E-02 2.105E-02 2.270E-02 2.436E-02 2.601E-02 2.765E-02 2.926E-02 3.084E-02 3.238E-02 3.387E-02 3.531E-02 3.668E-02 3.798E-02 3.920E-02 4.034E-02 4.138E-02 4.233E-02 4.318E-02 4.392E-02 4.455E-02 4.507E-02 4.547E-02 4.576E-02 4.592E-02 4.597E-02 4.590E-02 4.571E-02 4.541E-02 4.499E-02 4.445E-02 4.381E-02 4.307E-02 4.222E-02 4.128E-02 4.026E-02 3.914E-02 3.795E-02 3.669E-02 3.537E-02 3.399E-02 3.256E-02 3.109E-02 2.959E-02 2.806E-02 2.651E-02 2.495E-02 2.340E-02 2.184E-02 2.030E-02 1.878E-02 1.729E-02 1.583E-02 1.441E-02 1.303E-02 1.171E-02 1.044E-02 1.004E-02 1.129E-02 1.260E-02 1.397E-02 1.538E-02 1.684E-02 1.833E-02 1.986E-02 2.140E-02 2.296E-02 2.453E-02 2.610E-02 2.766E-02 2.920E-02 3.072E-02 3.221E-02 3.366E-02 3.506E-02 3.641E-02 3.769E-02 3.890E-02 4.004E-02 4.110E-02 4.206E-02 4.293E-02 4.370E-02 4.436E-02 4.491E-02 4.535E-02 4.568E-02 4.588E-02 4.597E-02 4.593E-02 4.578E-02 4.550E-02 4.510E-02 4.459E-02 4.396E-02 4.321E-02 4.236E-02 4.141E-02 4.035E-02 3.920E-02 3.796E-02 3.665E-02 3.526E-02 3.380E-02 3.229E-02 3.072E-02 2.911E-02 2.748E-02 2.581E-02 2.414E-02 2.245E-02 2.078E-02 1.911E-02 1.747E-02 1.585E-02 1.428E-02 1.275E-02 1.128E-02 9.869E-03 8.532E-03 7.272E-03 6.096E-03 5.010E-03 4.020E-03 3.130E-03 2.345E-03 1.668E-03 1.104E-03 6.535E-04 3.197E-04 1.036E-04 6.105E-06 2.738E-05 1.670E-04 4.241E-04 7.971E-04 1.284E-03 1.882E-03 2.589E-03 3.400E-03 4.312E-03 5.320E-03 6.421E-03 7.608E-03 8.877E-03 1.022E-02 1.164E-02 1.312E-02 1.465E-02 1.624E-02 1.787E-02 1.955E-02 2.125E-02 2.298E-02 2.473E-02 2.650E-02 2.826E-02 3.003E-02 3.180E-02 3.355E-02 3.529E-02 3.700E-02 3.868E-02 4.033E-02 4.194E-02 4.351E-02 4.503E-02 4.650E-02 4.791E-02 4.926E-02 5.055E-02 5.177E-02 5.291E-02 5.399E-02 5.499E-02 5.591E-02 5.674E-02 5.750E-02 5.817E-02 5.875E-02 5.925E-02 5.966E-02 5.998E-02 6.021E-02 6.034E-02 6.039E-02 6.034E-02 6.021E-02 5.998E-02 5.966E-02 5.925E-02 5.875E-02 5.817E-02 5.750E-02 5.674E-02 5.591E-02 5.499E-02 5.399E-02 5.291E-02 5.177E-02 5.055E-02 4.926E-02 4.791E-02 4.650E-02 4.503E-02 4.351E-02 4.194E-02 4.033E-02 3.868E-02 3.700E-02 3.529E-02 3.355E-02 3.180E-02 3.003E-02 2.826E-02 2.650E-02 2.473E-02 2.298E-02 2.125E-02 1.955E-02 1.787E-02 1.624E-02 1.465E-02 1.312E-02 1.164E-02 1.022E-02 8.877E-03 7.608E-03 6.421E-03 5.320E-03 4.312E-03 3.400E-03 2.589E-03 1.882E-03 1.284E-03 7.971E-04 4.241E-04 1.670E-04 2.738E-05 6.105E-06 1.036E-04 3.197E-04 6.535E-04 1.104E-03 1.668E-03 2.345E-03 3.130E-03 4.020E-03 5.010E-03 6.096E-03 7.272E-03 8.532E-03 9.869E-03 1.128E-02 1.275E-02 1.428E-02 1.585E-02 1.747E-02 1.911E-02 2.078E-02 2.245E-02 2.414E-02 2.581E-02 2.748E-02 2.911E-02 3.072E-02 3.229E-02 3.380E-02 3.526E-02 3.665E-02 3.796E-02 3.920E-02 4.035E-02 4.141E-02 4.236E-02 4.321E-02 4.396E-02 4.459E-02 4.510E-02 4.550E-02 4.578E-02 4.593E-02 4.597E-02 4.588E-02 4.568E-02 4.535E-02 4.491E-02 4.436E-02 4.370E-02 4.293E-02 4.206E-02 4.110E-02 4.004E-02 3.890E-02 3.769E-02 3.641E-02 3.506E-02 3.366E-02 3.221E-02 3.072E-02 2.920E-02 2.766E-02 2.610E-02 2.453E-02 2.296E-02 2.140E-02 1.986E-02 1.833E-02 1.684E-02 1.538E-02 1.397E-02 1.260E-02 1.129E-02 1.086E-02 1.216E-02 1.352E-02 1.492E-02 1.638E-02 1.787E-02 1.939E-02 2.094E-02 2.250E-02 2.408E-02 2.565E-02 2.723E-02 2.879E-02 3.032E-02 3.183E-02 3.330E-02 3.472E-02 3.609E-02 3.740E-02 3.864E-02 3.980E-02 4.088E-02 4.187E-02 4.277E-02 4.356E-02 4.425E-02 4.483E-02 4.529E-02 4.564E-02 4.586E-02 4.596E-02 4.594E-02 4.580E-02 4.554E-02 4.515E-02 4.464E-02 4.401E-02 4.327E-02 4.241E-02 4.145E-02 4.039E-02 3.923E-02 3.798E-02 3.665E-02 3.524E-02 3.376E-02 3.223E-02 3.064E-02 2.901E-02 2.735E-02 2.566E-02 2.396E-02 2.225E-02 2.055E-02 1.886E-02 1.719E-02 1.556E-02 1.397E-02 1.242E-02 1.094E-02 9.522E-03 8.179E-03 6.918E-03 5.746E-03 4.668E-03 3.691E-03 2.820E-03 2.060E-03 1.414E-03 8.868E-04 4.801E-04 1.963E-04 3.715E-05 3.357E-06 9.524E-05 3.124E-04 6.540E-04 1.118E-03 1.703E-03 2.406E-03 3.224E-03 4.153E-03 5.189E-03 6.328E-03 7.564E-03 8.893E-03 1.031E-02 1.180E-02 1.337E-02 1.501E-02 1.671E-02 1.847E-02 2.027E-02 2.212E-02 2.400E-02 2.591E-02 2.784E-02 2.978E-02 3.173E-02 3.369E-02 3.563E-02 3.757E-02 3.949E-02 4.138E-02 4.324E-02 4.507E-02 4.686E-02 4.860E-02 5.030E-02 5.193E-02 5.351E-02 5.503E-02 5.648E-02 5.786E-02 5.916E-02 6.039E-02 6.154E-02 6.260E-02 6.358E-02 6.447E-02 6.528E-02 6.599E-02 6.661E-02 6.714E-02 6.757E-02 6.791E-02 6.815E-02 6.830E-02 6.835E-02 6.830E-02 6.815E-02 6.791E-02 6.757E-02 6.714E-02 6.661E-02 6.599E-02 6.528E-02 6.447E-02 6.358E-02 6.260E-02 6.154E-02 6.039E-02 5.916E-02 5.786E-02 5.648E-02 5.503E-02 5.351E-02 5.193E-02 5.030E-02 4.860E-02 4.686E-02 4.507E-02 4.324E-02 4.138E-02 3.949E-02 3.757E-02 3.563E-02 3.369E-02 3.173E-02 2.978E-02 2.784E-02 2.591E-02 2.400E-02 2.212E-02 2.027E-02 1.847E-02 1.671E-02 1.501E-02 1.337E-02 1.180E-02 1.031E-02 8.893E-03 7.564E-03 6.328E-03 5.189E-03 4.153E-03 3.224E-03 2.406E-03 1.703E-03 1.118E-03 6.540E-04 3.124E-04 9.524E-05 3.357E-06 3.715E-05 1.963E-04 4.801E-04 8.868E-04 1.414E-03 2.060E-03 2.820E-03 3.691E-03 4.668E-03 5.746E-03 6.918E-03 8.179E-03 9.522E-03 1.094E-02 1.242E-02 1.397E-02 1.556E-02 1.719E-02 1.886E-02 2.055E-02 2.225E-02 2.396E-02 2.566E-02 2.735E-02 2.901E-02 3.064E-02 3.223E-02 3.376E-02 3.524E-02 3.665E-02 3.798E-02 3.923E-02 4.039E-02 4.145E-02 4.241E-02 4.327E-02 4.401E-02 4.464E-02 4.515E-02 4.554E-02 4.580E-02 4.594E-02 4.596E-02 4.586E-02 4.564E-02 4.529E-02 4.483E-02 4.425E-02 4.356E-02 4.277E-02 4.187E-02 4.088E-02 3.980E-02 3.864E-02 3.740E-02 3.609E-02 3.472E-02 3.330E-02 3.183E-02 3.032E-02 2.879E-02 2.723E-02 2.565E-02 2.408E-02 2.250E-02 2.094E-02 1.939E-02 1.787E-02 1.638E-02 1.492E-02 1.352E-02 1.216E-02 1.170E-02 1.305E-02 1.445E-02 1.589E-02 1.738E-02 1.890E-02 2.045E-02 2.202E-02 2.360E-02 2.519E-02 2.677E-02 2.835E-02 2.990E-02 3.143E-02 3.292E-02 3.436E-02 3.575E-02 3.709E-02 3.835E-02 3.954E-02 4.065E-02 4.167E-02 4.259E-02 4.341E-02 4.413E-02 4.473E-02 4.522E-02 4.559E-02 4.583E-02 4.596E-02 4.596E-02 4.583E-02 4.558E-02 4.520E-02 4.470E-02 4.408E-02 4.334E-02 4.248E-02 4.152E-02 4.045E-02 3.928E-02 3.802E-02 3.668E-02 3.526E-02 3.376E-02 3.221E-02 3.060E-02 2.895E-02 2.726E-02 2.555E-02 2.383E-02 2.210E-02 2.037E-02 1.866E-02 1.697E-02 1.531E-02 1.370E-02 1.214E-02 1.065E-02 9.219E-03 7.870E-03 6.607E-03 5.437E-03 4.367E-03 3.402E-03 2.550E-03 1.813E-03 1.197E-03 7.061E-04 3.421E-04 1.079E-04 5.093E-06 3.466E-05 1.969E-04 4.916E-04 9.178E-04 1.474E-03 2.157E-03 2.966E-03 3.896E-03 4.944E-03 6.106E-03 7.376E-03 8.750E-03 1.022E-02 1.179E-02 1.344E-02 1.516E-02 1.697E-02 1.883E-02 2.076E-02 2.274E-02 2.476E-02 2.682E-02 2.891E-02 3.102E-02 3.315E-02 3.529E-02 3.743E-02 3.956E-02 4.168E-02 4.378E-02 4.586E-02 4.791E-02 4.992E-02 5.189E-02 5.382E-02 5.569E-02 5.750E-02 5.925E-02 6.094E-02 6.255E-02 6.410E-02 6.556E-02 6.695E-02 6.825E-02 6.947E-02 7.060E-02 7.163E-02 7.258E-02 7.343E-02 7.418E-02 7.484E-02 7.539E-02 7.585E-02 7.621E-02 7.646E-02 7.661E-02 7.666E-02 7.661E-02 7.646E-02 7.621E-02 7.585E-02 7.539E-02 7.484E-02 7.418E-02 7.343E-02 7.258E-02 7.163E-02 7.060E-02 6.947E-02 6.825E-02 6.695E-02 6.556E-02 6.410E-02 6.255E-02 6.094E-02 5.925E-02 5.750E-02 5.569E-02 5.382E-02 5.189E-02 4.992E-02 4.791E-02 4.586E-02 4.378E-02 4.168E-02 3.956E-02 3.743E-02 3.529E-02 3.315E-02 3.102E-02 2.891E-02 2.682E-02 2.476E-02 2.274E-02 2.076E-02 1.883E-02 1.697E-02 1.516E-02 1.344E-02 1.179E-02 1.022E-02 8.750E-03 7.376E-03 6.106E-03 4.944E-03 3.896E-03 2.966E-03 2.157E-03 1.474E-03 9.178E-04 4.916E-04 1.969E-04 3.466E-05 5.093E-06 1.079E-04 3.421E-04 7.061E-04 1.197E-03 1.813E-03 2.550E-03 3.402E-03 4.367E-03 5.437E-03 6.607E-03 7.870E-03 9.219E-03 1.065E-02 1.214E-02 1.370E-02 1.531E-02 1.697E-02 1.866E-02 2.037E-02 2.210E-02 2.383E-02 2.555E-02 2.726E-02 2.895E-02 3.060E-02 3.221E-02 3.376E-02 3.526E-02 3.668E-02 3.802E-02 3.928E-02 4.045E-02 4.152E-02 4.248E-02 4.334E-02 4.408E-02 4.470E-02 4.520E-02 4.558E-02 4.583E-02 4.596E-02 4.596E-02 4.583E-02 4.559E-02 4.522E-02 4.473E-02 4.413E-02 4.341E-02 4.259E-02 4.167E-02 4.065E-02 3.954E-02 3.835E-02 3.709E-02 3.575E-02 3.436E-02 3.292E-02 3.143E-02 2.990E-02 2.835E-02 2.677E-02 2.519E-02 2.360E-02 2.202E-02 2.045E-02 1.890E-02 1.738E-02 1.589E-02 1.445E-02 1.305E-02 1.257E-02 1.395E-02 1.539E-02 1.687E-02 1.839E-02 1.994E-02 2.151E-02 2.310E-02 2.469E-02 2.629E-02 2.788E-02 2.945E-02 3.099E-02 3.250E-02 3.397E-02 3.539E-02 3.675E-02 3.804E-02 3.926E-02 4.039E-02 4.144E-02 4.239E-02 4.324E-02 4.398E-02 4.462E-02 4.513E-02 4.553E-02 4.580E-02 4.594E-02 4.596E-02 4.586E-02 4.562E-02 4.526E-02 4.477E-02 4.416E-02 4.342E-02 4.257E-02 4.161E-02 4.054E-02 3.937E-02 3.810E-02 3.674E-02 3.531E-02 3.380E-02 3.223E-02 3.060E-02 2.893E-02 2.722E-02 2.549E-02 2.374E-02 2.198E-02 2.023E-02 1.850E-02 1.679E-02 1.511E-02 1.348E-02 1.191E-02 1.040E-02 8.958E-03 7.602E-03 6.336E-03 5.168E-03 4.103E-03 3.150E-03 2.314E-03 1.601E-03 1.014E-03 5.573E-04 2.350E-04 4.919E-05 1.764E-06 9.381E-05 3.258E-04 6.974E-04 1.208E-03 1.855E-03 2.637E-03 3.552E-03 4.594E-03 5.762E-03 7.050E-03 8.452E-03 9.965E-03 1.158E-02 1.329E-02 1.510E-02 1.699E-02 1.896E-02 2.099E-02 2.309E-02 2.525E-02 2.745E-02 2.969E-02 3.196E-02 3.426E-02 3.658E-02 3.890E-02 4.123E-02 4.355E-02 4.586E-02 4.815E-02 5.042E-02 5.266E-02 5.486E-02 5.701E-02 5.912E-02 6.117E-02 6.316E-02 6.509E-02 6.695E-02 6.874E-02 7.045E-02 7.208E-02 7.363E-02 7.509E-02 7.646E-02 7.774E-02 7.893E-02 8.002E-02 8.101E-02 8.190E-02 8.269E-02 8.338E-02 8.396E-02 8.444E-02 8.481E-02 8.508E-02 8.524E-02 8.529E-02 8.524E-02 8.508E-02 8.481E-02 8.444E-02 8.396E-02 8.338E-02 8.269E-02 8.190E-02 8.101E-02 8.002E-02 7.893E-02 7.774E-02 7.646E-02 7.509E-02 7.363E-02 7.208E-02 7.045E-02 6.874E-02 6.695E-02 6.509E-02 6.316E-02 6.117E-02 5.912E-02 5.701E-02 5.486E-02 5.266E-02 5.042E-02 4.815E-02 4.586E-02 4.355E-02 4.123E-02 3.890E-02 3.658E-02 3.426E-02 3.196E-02 2.969E-02 2.745E-02 2.525E-02 2.309E-02 2.099E-02 1.896E-02 1.699E-02 1.510E-02 1.329E-02 1.158E-02 9.965E-03 8.452E-03 7.050E-03 5.762E-03 4.594E-03 3.552E-03 2.637E-03 1.855E-03 1.208E-03 6.974E-04 3.258E-04 9.381E-05 1.764E-06 4.919E-05 2.350E-04 5.573E-04 1.014E-03 1.601E-03 2.314E-03 3.150E-03 4.103E-03 5.168E-03 6.336E-03 7.602E-03 8.958E-03 1.040E-02 1.191E-02 1.348E-02 1.511E-02 1.679E-02 1.850E-02 2.023E-02 2.198E-02 2.374E-02 2.549E-02 2.722E-02 2.893E-02 3.060E-02 3.223E-02 3.380E-02 3.531E-02 3.674E-02 3.810E-02 3.937E-02 4.054E-02 4.161E-02 4.257E-02 4.342E-02 4.416E-02 4.477E-02 4.526E-02 4.562E-02 4.586E-02 4.596E-02 4.594E-02 4.580E-02 4.553E-02 4.513E-02 4.462E-02 4.398E-02 4.324E-02 4.239E-02 4.144E-02 4.039E-02 3.926E-02 3.804E-02 3.675E-02 3.539E-02 3.397E-02 3.250E-02 3.099E-02 2.945E-02 2.788E-02 2.629E-02 2.469E-02 2.310E-02 2.151E-02 1.994E-02 1.839E-02 1.687E-02 1.539E-02 1.395E-02 1.344E-02 1.487E-02 1.635E-02 1.786E-02 1.941E-02 2.098E-02 2.257E-02 2.418E-02 2.578E-02 2.738E-02 2.897E-02 3.053E-02 3.206E-02 3.355E-02 3.499E-02 3.638E-02 3.770E-02 3.894E-02 4.011E-02 4.119E-02 4.217E-02 4.305E-02 4.382E-02 4.449E-02 4.503E-02 4.545E-02 4.575E-02 4.593E-02 4.597E-02 4.588E-02 4.567E-02 4.532E-02 4.485E-02 4.425E-02 4.352E-02 4.268E-02 4.172E-02 4.065E-02 3.948E-02 3.820E-02 3.684E-02 3.539E-02 3.387E-02 3.229E-02 3.064E-02 2.895E-02 2.722E-02 2.547E-02 2.369E-02 2.192E-02 2.014E-02 1.838E-02 1.665E-02 1.496E-02 1.331E-02 1.171E-02 1.019E-02 8.739E-03 7.375E-03 6.105E-03 4.936E-03 3.877E-03 2.933E-03 2.112E-03 1.419E-03 8.593E-04 4.364E-04 1.541E-04 1.518E-05 2.164E-05 1.748E-04 4.751E-04 9.224E-04 1.516E-03 2.254E-03 3.134E-03 4.153E-03 5.308E-03 6.595E-03 8.009E-03 9.544E-03 1.120E-02 1.296E-02 1.482E-02 1.678E-02 1.883E-02 2.097E-02 2.317E-02 2.545E-02 2.778E-02 3.016E-02 3.259E-02 3.505E-02 3.753E-02 4.004E-02 4.255E-02 4.507E-02 4.759E-02 5.009E-02 5.257E-02 5.503E-02 5.745E-02 5.984E-02 6.218E-02 6.447E-02 6.671E-02 6.888E-02 7.099E-02 7.303E-02 7.499E-02 7.687E-02 7.867E-02 8.038E-02 8.200E-02 8.353E-02 8.497E-02 8.631E-02 8.755E-02 8.868E-02 8.972E-02 9.065E-02 9.147E-02 9.218E-02 9.279E-02 9.329E-02 9.367E-02 9.395E-02 9.412E-02 9.417E-02 9.412E-02 9.395E-02 9.367E-02 9.329E-02 9.279E-02 9.218E-02 9.147E-02 9.065E-02 8.972E-02 8.868E-02 8.755E-02 8.631E-02 8.497E-02 8.353E-02 8.200E-02 8.038E-02 7.867E-02 7.687E-02 7.499E-02 7.303E-02 7.099E-02 6.888E-02 6.671E-02 6.447E-02 6.218E-02 5.984E-02 5.745E-02 5.503E-02 5.257E-02 5.009E-02 4.759E-02 4.507E-02 4.255E-02 4.004E-02 3.753E-02 3.505E-02 3.259E-02 3.016E-02 2.778E-02 2.545E-02 2.317E-02 2.097E-02 1.883E-02 1.678E-02 1.482E-02 1.296E-02 1.120E-02 9.544E-03 8.009E-03 6.595E-03 5.308E-03 4.153E-03 3.134E-03 2.254E-03 1.516E-03 9.224E-04 4.751E-04 1.748E-04 2.164E-05 1.518E-05 1.541E-04 4.364E-04 8.593E-04 1.419E-03 2.112E-03 2.933E-03 3.877E-03 4.936E-03 6.105E-03 7.375E-03 8.739E-03 1.019E-02 1.171E-02 1.331E-02 1.496E-02 1.665E-02 1.838E-02 2.014E-02 2.192E-02 2.369E-02 2.547E-02 2.722E-02 2.895E-02 3.064E-02 3.229E-02 3.387E-02 3.539E-02 3.684E-02 3.820E-02 3.948E-02 4.065E-02 4.172E-02 4.268E-02 4.352E-02 4.425E-02 4.485E-02 4.532E-02 4.567E-02 4.588E-02 4.597E-02 4.593E-02 4.575E-02 4.545E-02 4.503E-02 4.449E-02 4.382E-02 4.305E-02 4.217E-02 4.119E-02 4.011E-02 3.894E-02 3.770E-02 3.638E-02 3.499E-02 3.355E-02 3.206E-02 3.053E-02 2.897E-02 2.738E-02 2.578E-02 2.418E-02 2.257E-02 2.098E-02 1.941E-02 1.786E-02 1.635E-02 1.487E-02 1.434E-02 1.580E-02 1.731E-02 1.886E-02 2.043E-02 2.202E-02 2.363E-02 2.525E-02 2.686E-02 2.846E-02 3.004E-02 3.159E-02 3.310E-02 3.457E-02 3.598E-02 3.733E-02 3.860E-02 3.980E-02 4.091E-02 4.192E-02 4.284E-02 4.364E-02 4.434E-02 4.492E-02 4.537E-02 4.570E-02 4.590E-02 4.597E-02 4.591E-02 4.572E-02 4.539E-02 4.494E-02 4.435E-02 4.364E-02 4.280E-02 4.185E-02 4.079E-02 3.961E-02 3.834E-02 3.697E-02 3.551E-02 3.398E-02 3.238E-02 3.072E-02 2.901E-02 2.726E-02 2.549E-02 2.369E-02 2.189E-02 2.010E-02 1.832E-02 1.656E-02 1.484E-02 1.317E-02 1.156E-02 1.002E-02 8.561E-03 7.188E-03 5.911E-03 4.741E-03 3.684E-03 2.748E-03 1.940E-03 1.266E-03 7.312E-04 3.396E-04 9.521E-05 1.084E-06 5.944E-05 2.717E-04 6.386E-04 1.160E-03 1.835E-03 2.662E-03 3.639E-03 4.762E-03 6.028E-03 7.434E-03 8.973E-03 1.064E-02 1.243E-02 1.434E-02 1.635E-02 1.847E-02 2.068E-02 2.298E-02 2.536E-02 2.781E-02 3.032E-02 3.288E-02 3.549E-02 3.814E-02 4.082E-02 4.351E-02 4.622E-02 4.893E-02 5.164E-02 5.433E-02 5.701E-02 5.966E-02 6.228E-02 6.485E-02 6.738E-02 6.986E-02 7.228E-02 7.463E-02 7.692E-02 7.913E-02 8.127E-02 8.332E-02 8.529E-02 8.717E-02 8.896E-02 9.065E-02 9.224E-02 9.373E-02 9.512E-02 9.640E-02 9.758E-02 9.865E-02 9.961E-02 1.005E-01 1.012E-01 1.018E-01 1.023E-01 1.027E-01 1.030E-01 1.032E-01 1.033E-01 1.032E-01 1.030E-01 1.027E-01 1.023E-01 1.018E-01 1.012E-01 1.005E-01 9.961E-02 9.865E-02 9.758E-02 9.640E-02 9.512E-02 9.373E-02 9.224E-02 9.065E-02 8.896E-02 8.717E-02 8.529E-02 8.332E-02 8.127E-02 7.913E-02 7.692E-02 7.463E-02 7.228E-02 6.986E-02 6.738E-02 6.485E-02 6.228E-02 5.966E-02 5.701E-02 5.433E-02 5.164E-02 4.893E-02 4.622E-02 4.351E-02 4.082E-02 3.814E-02 3.549E-02 3.288E-02 3.032E-02 2.781E-02 2.536E-02 2.298E-02 2.068E-02 1.847E-02 1.635E-02 1.434E-02 1.243E-02 1.064E-02 8.973E-03 7.434E-03 6.028E-03 4.762E-03 3.639E-03 2.662E-03 1.835E-03 1.160E-03 6.386E-04 2.717E-04 5.944E-05 1.084E-06 9.521E-05 3.396E-04 7.312E-04 1.266E-03 1.940E-03 2.748E-03 3.684E-03 4.741E-03 5.911E-03 7.188E-03 8.561E-03 1.002E-02 1.156E-02 1.317E-02 1.484E-02 1.656E-02 1.832E-02 2.010E-02 2.189E-02 2.369E-02 2.549E-02 2.726E-02 2.901E-02 3.072E-02 3.238E-02 3.398E-02 3.551E-02 3.697E-02 3.834E-02 3.961E-02 4.079E-02 4.185E-02 4.280E-02 4.364E-02 4.435E-02 4.494E-02 4.539E-02 4.572E-02 4.591E-02 4.597E-02 4.590E-02 4.570E-02 4.537E-02 4.492E-02 4.434E-02 4.364E-02 4.284E-02 4.192E-02 4.091E-02 3.980E-02 3.860E-02 3.733E-02 3.598E-02 3.457E-02 3.310E-02 3.159E-02 3.004E-02 2.846E-02 2.686E-02 2.525E-02 2.363E-02 2.202E-02 2.043E-02 1.886E-02 1.731E-02 1.580E-02 1.525E-02 1.674E-02 1.828E-02 1.986E-02 2.145E-02 2.307E-02 2.469E-02 2.631E-02 2.792E-02 2.952E-02 3.109E-02 3.262E-02 3.412E-02 3.555E-02 3.693E-02 3.824E-02 3.946E-02 4.061E-02 4.165E-02 4.260E-02 4.344E-02 4.417E-02 4.478E-02 4.527E-02 4.563E-02 4.587E-02 4.597E-02 4.593E-02 4.577E-02 4.547E-02 4.503E-02 4.446E-02 4.377E-02 4.295E-02 4.200E-02 4.094E-02 3.977E-02 3.850E-02 3.713E-02 3.567E-02 3.413E-02 3.251E-02 3.084E-02 2.911E-02 2.735E-02 2.555E-02 2.374E-02 2.192E-02 2.010E-02 1.829E-02 1.652E-02 1.478E-02 1.309E-02 1.146E-02 9.900E-03 8.424E-03 7.039E-03 5.754E-03 4.580E-03 3.524E-03 2.594E-03 1.797E-03 1.139E-03 6.262E-04 2.633E-04 5.426E-05 2.384E-06 1.101E-04 3.791E-04 8.101E-04 1.403E-03 2.157E-03 3.071E-03 4.143E-03 5.369E-03 6.745E-03 8.267E-03 9.931E-03 1.173E-02 1.366E-02 1.571E-02 1.787E-02 2.015E-02 2.252E-02 2.499E-02 2.754E-02 3.016E-02 3.285E-02 3.560E-02 3.839E-02 4.123E-02 4.409E-02 4.698E-02 4.988E-02 5.279E-02 5.569E-02 5.857E-02 6.144E-02 6.429E-02 6.709E-02 6.986E-02 7.258E-02 7.524E-02 7.784E-02 8.038E-02 8.285E-02 8.524E-02 8.755E-02 8.977E-02 9.191E-02 9.395E-02 9.590E-02 9.775E-02 9.950E-02 1.011E-01 1.027E-01 1.041E-01 1.054E-01 1.067E-01 1.078E-01 1.087E-01 1.096E-01 1.104E-01 1.110E-01 1.115E-01 1.120E-01 1.122E-01 1.124E-01 1.125E-01 1.124E-01 1.122E-01 1.120E-01 1.115E-01 1.110E-01 1.104E-01 1.096E-01 1.087E-01 1.078E-01 1.067E-01 1.054E-01 1.041E-01 1.027E-01 1.011E-01 9.950E-02 9.775E-02 9.590E-02 9.395E-02 9.191E-02 8.977E-02 8.755E-02 8.524E-02 8.285E-02 8.038E-02 7.784E-02 7.524E-02 7.258E-02 6.986E-02 6.709E-02 6.429E-02 6.144E-02 5.857E-02 5.569E-02 5.279E-02 4.988E-02 4.698E-02 4.409E-02 4.123E-02 3.839E-02 3.560E-02 3.285E-02 3.016E-02 2.754E-02 2.499E-02 2.252E-02 2.015E-02 1.787E-02 1.571E-02 1.366E-02 1.173E-02 9.931E-03 8.267E-03 6.745E-03 5.369E-03 4.143E-03 3.071E-03 2.157E-03 1.403E-03 8.101E-04 3.791E-04 1.101E-04 2.384E-06 5.426E-05 2.633E-04 6.262E-04 1.139E-03 1.797E-03 2.594E-03 3.524E-03 4.580E-03 5.754E-03 7.039E-03 8.424E-03 9.900E-03 1.146E-02 1.309E-02 1.478E-02 1.652E-02 1.829E-02 2.010E-02 2.192E-02 2.374E-02 2.555E-02 2.735E-02 2.911E-02 3.084E-02 3.251E-02 3.413E-02 3.567E-02 3.713E-02 3.850E-02 3.977E-02 4.094E-02 4.200E-02 4.295E-02 4.377E-02 4.446E-02 4.503E-02 4.547E-02 4.577E-02 4.593E-02 4.597E-02 4.587E-02 4.563E-02 4.527E-02 4.478E-02 4.417E-02 4.344E-02 4.260E-02 4.165E-02 4.061E-02 3.946E-02 3.824E-02 3.693E-02 3.555E-02 3.412E-02 3.262E-02 3.109E-02 2.952E-02 2.792E-02 2.631E-02 2.469E-02 2.307E-02 2.145E-02 1.986E-02 1.828E-02 1.674E-02 1.616E-02 1.769E-02 1.926E-02 2.086E-02 2.247E-02 2.410E-02 2.573E-02 2.736E-02 2.897E-02 3.056E-02 3.212E-02 3.363E-02 3.510E-02 3.650E-02 3.784E-02 3.910E-02 4.028E-02 4.136E-02 4.234E-02 4.322E-02 4.399E-02 4.463E-02 4.516E-02 4.556E-02 4.582E-02 4.596E-02 4.595E-02 4.582E-02 4.554E-02 4.513E-02 4.458E-02 4.391E-02 4.310E-02 4.217E-02 4.112E-02 3.996E-02 3.869E-02 3.731E-02 3.585E-02 3.430E-02 3.268E-02 3.100E-02 2.926E-02 2.748E-02 2.566E-02 2.383E-02 2.198E-02 2.014E-02 1.832E-02 1.652E-02 1.475E-02 1.304E-02 1.139E-02 9.818E-03 8.326E-03 6.928E-03 5.634E-03 4.453E-03 3.395E-03 2.468E-03 1.679E-03 1.035E-03 5.414E-04 2.042E-04 2.751E-05 1.486E-05 1.690E-04 4.916E-04 9.839E-04 1.646E-03 2.477E-03 3.475E-03 4.639E-03 5.964E-03 7.448E-03 9.086E-03 1.087E-02 1.280E-02 1.486E-02 1.706E-02 1.937E-02 2.180E-02 2.434E-02 2.697E-02 2.969E-02 3.249E-02 3.536E-02 3.829E-02 4.127E-02 4.429E-02 4.734E-02 5.042E-02 5.351E-02 5.661E-02 5.971E-02 6.279E-02 6.585E-02 6.888E-02 7.188E-02 7.484E-02 7.774E-02 8.059E-02 8.338E-02 8.609E-02 8.874E-02 9.130E-02 9.379E-02 9.618E-02 9.848E-02 1.007E-01 1.028E-01 1.048E-01 1.067E-01 1.085E-01 1.102E-01 1.118E-01 1.132E-01 1.146E-01 1.158E-01 1.170E-01 1.180E-01 1.189E-01 1.196E-01 1.203E-01 1.208E-01 1.212E-01 1.215E-01 1.217E-01 1.218E-01 1.217E-01 1.215E-01 1.212E-01 1.208E-01 1.203E-01 1.196E-01 1.189E-01 1.180E-01 1.170E-01 1.158E-01 1.146E-01 1.132E-01 1.118E-01 1.102E-01 1.085E-01 1.067E-01 1.048E-01 1.028E-01 1.007E-01 9.848E-02 9.618E-02 9.379E-02 9.130E-02 8.874E-02 8.609E-02 8.338E-02 8.059E-02 7.774E-02 7.484E-02 7.188E-02 6.888E-02 6.585E-02 6.279E-02 5.971E-02 5.661E-02 5.351E-02 5.042E-02 4.734E-02 4.429E-02 4.127E-02 3.829E-02 3.536E-02 3.249E-02 2.969E-02 2.697E-02 2.434E-02 2.180E-02 1.937E-02 1.706E-02 1.486E-02 1.280E-02 1.087E-02 9.086E-03 7.448E-03 5.964E-03 4.639E-03 3.475E-03 2.477E-03 1.646E-03 9.839E-04 4.916E-04 1.690E-04 1.486E-05 2.751E-05 2.042E-04 5.414E-04 1.035E-03 1.679E-03 2.468E-03 3.395E-03 4.453E-03 5.634E-03 6.928E-03 8.326E-03 9.818E-03 1.139E-02 1.304E-02 1.475E-02 1.652E-02 1.832E-02 2.014E-02 2.198E-02 2.383E-02 2.566E-02 2.748E-02 2.926E-02 3.100E-02 3.268E-02 3.430E-02 3.585E-02 3.731E-02 3.869E-02 3.996E-02 4.112E-02 4.217E-02 4.310E-02 4.391E-02 4.458E-02 4.513E-02 4.554E-02 4.582E-02 4.595E-02 4.596E-02 4.582E-02 4.556E-02 4.516E-02 4.463E-02 4.399E-02 4.322E-02 4.234E-02 4.136E-02 4.028E-02 3.910E-02 3.784E-02 3.650E-02 3.510E-02 3.363E-02 3.212E-02 3.056E-02 2.897E-02 2.736E-02 2.573E-02 2.410E-02 2.247E-02 2.086E-02 1.926E-02 1.769E-02 1.709E-02 1.865E-02 2.024E-02 2.186E-02 2.349E-02 2.513E-02 2.677E-02 2.840E-02 3.001E-02 3.158E-02 3.312E-02 3.461E-02 3.605E-02 3.741E-02 3.871E-02 3.992E-02 4.104E-02 4.206E-02 4.298E-02 4.378E-02 4.447E-02 4.503E-02 4.546E-02 4.577E-02 4.593E-02 4.597E-02 4.586E-02 4.562E-02 4.523E-02 4.471E-02 4.406E-02 4.327E-02 4.236E-02 4.132E-02 4.016E-02 3.890E-02 3.753E-02 3.607E-02 3.452E-02 3.289E-02 3.119E-02 2.944E-02 2.765E-02 2.581E-02 2.396E-02 2.210E-02 2.023E-02 1.838E-02 1.656E-02 1.478E-02 1.304E-02 1.137E-02 9.777E-03 8.267E-03 6.854E-03 5.548E-03 4.359E-03 3.296E-03 2.369E-03 1.585E-03 9.513E-04 4.741E-04 1.593E-04 1.154E-05 3.466E-05 2.316E-04 6.046E-04 1.155E-03 1.882E-03 2.786E-03 3.866E-03 5.119E-03 6.541E-03 8.130E-03 9.880E-03 1.179E-02 1.384E-02 1.604E-02 1.837E-02 2.084E-02 2.342E-02 2.611E-02 2.891E-02 3.180E-02 3.477E-02 3.782E-02 4.093E-02 4.409E-02 4.730E-02 5.055E-02 5.382E-02 5.710E-02 6.039E-02 6.367E-02 6.695E-02 7.020E-02 7.343E-02 7.661E-02 7.976E-02 8.285E-02 8.588E-02 8.885E-02 9.174E-02 9.456E-02 9.730E-02 9.995E-02 1.025E-01 1.050E-01 1.073E-01 1.096E-01 1.118E-01 1.138E-01 1.158E-01 1.176E-01 1.193E-01 1.209E-01 1.224E-01 1.238E-01 1.251E-01 1.262E-01 1.272E-01 1.281E-01 1.289E-01 1.296E-01 1.301E-01 1.305E-01 1.308E-01 1.310E-01 1.311E-01 1.310E-01 1.308E-01 1.305E-01 1.301E-01 1.296E-01 1.289E-01 1.281E-01 1.272E-01 1.262E-01 1.251E-01 1.238E-01 1.224E-01 1.209E-01 1.193E-01 1.176E-01 1.158E-01 1.138E-01 1.118E-01 1.096E-01 1.073E-01 1.050E-01 1.025E-01 9.995E-02 9.730E-02 9.456E-02 9.174E-02 8.885E-02 8.588E-02 8.285E-02 7.976E-02 7.661E-02 7.343E-02 7.020E-02 6.695E-02 6.367E-02 6.039E-02 5.710E-02 5.382E-02 5.055E-02 4.730E-02 4.409E-02 4.093E-02 3.782E-02 3.477E-02 3.180E-02 2.891E-02 2.611E-02 2.342E-02 2.084E-02 1.837E-02 1.604E-02 1.384E-02 1.179E-02 9.880E-03 8.130E-03 6.541E-03 5.119E-03 3.866E-03 2.786E-03 1.882E-03 1.155E-03 6.046E-04 2.316E-04 3.466E-05 1.154E-05 1.593E-04 4.741E-04 9.513E-04 1.585E-03 2.369E-03 3.296E-03 4.359E-03 5.548E-03 6.854E-03 8.267E-03 9.777E-03 1.137E-02 1.304E-02 1.478E-02 1.656E-02 1.838E-02 2.023E-02 2.210E-02 2.396E-02 2.581E-02 2.765E-02 2.944E-02 3.119E-02 3.289E-02 3.452E-02 3.607E-02 3.753E-02 3.890E-02 4.016E-02 4.132E-02 4.236E-02 4.327E-02 4.406E-02 4.471E-02 4.523E-02 4.562E-02 4.586E-02 4.597E-02 4.593E-02 4.577E-02 4.546E-02 4.503E-02 4.447E-02 4.378E-02 4.298E-02 4.206E-02 4.104E-02 3.992E-02 3.871E-02 3.741E-02 3.605E-02 3.461E-02 3.312E-02 3.158E-02 3.001E-02 2.840E-02 2.677E-02 2.513E-02 2.349E-02 2.186E-02 2.024E-02 1.865E-02 1.802E-02 1.961E-02 2.123E-02 2.286E-02 2.451E-02 2.616E-02 2.780E-02 2.942E-02 3.102E-02 3.258E-02 3.410E-02 3.556E-02 3.696E-02 3.829E-02 3.953E-02 4.069E-02 4.175E-02 4.270E-02 4.355E-02 4.428E-02 4.488E-02 4.535E-02 4.570E-02 4.590E-02 4.597E-02 4.590E-02 4.569E-02 4.534E-02 4.485E-02 4.422E-02 4.345E-02 4.256E-02 4.154E-02 4.039E-02 3.914E-02 3.778E-02 3.631E-02 3.476E-02 3.313E-02 3.143E-02 2.967E-02 2.786E-02 2.601E-02 2.414E-02 2.225E-02 2.037E-02 1.850E-02 1.665E-02 1.484E-02 1.309E-02 1.139E-02 9.777E-03 8.248E-03 6.817E-03 5.496E-03 4.296E-03 3.227E-03 2.296E-03 1.514E-03 8.868E-04 4.223E-04 1.261E-04 3.342E-06 5.831E-05 2.943E-04 7.135E-04 1.317E-03 2.107E-03 3.080E-03 4.237E-03 5.576E-03 7.092E-03 8.782E-03 1.064E-02 1.266E-02 1.484E-02 1.717E-02 1.965E-02 2.225E-02 2.499E-02 2.784E-02 3.080E-02 3.385E-02 3.700E-02 4.022E-02 4.351E-02 4.686E-02 5.025E-02 5.369E-02 5.714E-02 6.062E-02 6.410E-02 6.757E-02 7.104E-02 7.448E-02 7.790E-02 8.127E-02 8.460E-02 8.787E-02 9.108E-02 9.423E-02 9.730E-02 1.003E-01 1.032E-01 1.060E-01 1.087E-01 1.114E-01 1.139E-01 1.163E-01 1.186E-01 1.208E-01 1.229E-01 1.249E-01 1.267E-01 1.285E-01 1.301E-01 1.316E-01 1.330E-01 1.343E-01 1.354E-01 1.364E-01 1.374E-01 1.381E-01 1.388E-01 1.393E-01 1.398E-01 1.401E-01 1.402E-01 1.403E-01 1.402E-01 1.401E-01 1.398E-01 1.393E-01 1.388E-01 1.381E-01 1.374E-01 1.364E-01 1.354E-01 1.343E-01 1.330E-01 1.316E-01 1.301E-01 1.285E-01 1.267E-01 1.249E-01 1.229E-01 1.208E-01 1.186E-01 1.163E-01 1.139E-01 1.114E-01 1.087E-01 1.060E-01 1.032E-01 1.003E-01 9.730E-02 9.423E-02 9.108E-02 8.787E-02 8.460E-02 8.127E-02 7.790E-02 7.448E-02 7.104E-02 6.757E-02 6.410E-02 6.062E-02 5.714E-02 5.369E-02 5.025E-02 4.686E-02 4.351E-02 4.022E-02 3.700E-02 3.385E-02 3.080E-02 2.784E-02 2.499E-02 2.225E-02 1.965E-02 1.717E-02 1.484E-02 1.266E-02 1.064E-02 8.782E-03 7.092E-03 5.576E-03 4.237E-03 3.080E-03 2.107E-03 1.317E-03 7.135E-04 2.943E-04 5.831E-05 3.342E-06 1.261E-04 4.223E-04 8.868E-04 1.514E-03 2.296E-03 3.227E-03 4.296E-03 5.496E-03 6.817E-03 8.248E-03 9.777E-03 1.139E-02 1.309E-02 1.484E-02 1.665E-02 1.850E-02 2.037E-02 2.225E-02 2.414E-02 2.601E-02 2.786E-02 2.967E-02 3.143E-02 3.313E-02 3.476E-02 3.631E-02 3.778E-02 3.914E-02 4.039E-02 4.154E-02 4.256E-02 4.345E-02 4.422E-02 4.485E-02 4.534E-02 4.569E-02 4.590E-02 4.597E-02 4.590E-02 4.570E-02 4.535E-02 4.488E-02 4.428E-02 4.355E-02 4.270E-02 4.175E-02 4.069E-02 3.953E-02 3.829E-02 3.696E-02 3.556E-02 3.410E-02 3.258E-02 3.102E-02 2.942E-02 2.780E-02 2.616E-02 2.451E-02 2.286E-02 2.123E-02 1.961E-02 1.896E-02 2.057E-02 2.221E-02 2.386E-02 2.551E-02 2.717E-02 2.881E-02 3.042E-02 3.201E-02 3.355E-02 3.504E-02 3.647E-02 3.783E-02 3.912E-02 4.031E-02 4.141E-02 4.241E-02 4.329E-02 4.406E-02 4.471E-02 4.523E-02 4.561E-02 4.586E-02 4.597E-02 4.593E-02 4.576E-02 4.544E-02 4.498E-02 4.438E-02 4.364E-02 4.277E-02 4.177E-02 4.064E-02 3.940E-02 3.805E-02 3.659E-02 3.504E-02 3.341E-02 3.170E-02 2.993E-02 2.811E-02 2.625E-02 2.436E-02 2.245E-02 2.055E-02 1.866E-02 1.679E-02 1.496E-02 1.317E-02 1.146E-02 9.818E-03 8.267E-03 6.817E-03 5.479E-03 4.265E-03 3.185E-03 2.248E-03 1.464E-03 8.399E-04 3.839E-04 1.022E-04 2.914E-07 8.280E-05 3.533E-04 8.144E-04 1.468E-03 2.314E-03 3.353E-03 4.583E-03 6.003E-03 7.608E-03 9.396E-03 1.136E-02 1.350E-02 1.580E-02 1.825E-02 2.086E-02 2.361E-02 2.650E-02 2.950E-02 3.262E-02 3.584E-02 3.916E-02 4.255E-02 4.602E-02 4.955E-02 5.313E-02 5.674E-02 6.039E-02 6.405E-02 6.772E-02 7.139E-02 7.504E-02 7.867E-02 8.227E-02 8.583E-02 8.934E-02 9.279E-02 9.618E-02 9.950E-02 1.027E-01 1.059E-01 1.090E-01 1.120E-01 1.148E-01 1.176E-01 1.203E-01 1.228E-01 1.253E-01 1.276E-01 1.299E-01 1.320E-01 1.340E-01 1.358E-01 1.376E-01 1.392E-01 1.407E-01 1.421E-01 1.434E-01 1.445E-01 1.456E-01 1.465E-01 1.472E-01 1.479E-01 1.484E-01 1.489E-01 1.492E-01 1.493E-01 1.494E-01 1.493E-01 1.492E-01 1.489E-01 1.484E-01 1.479E-01 1.472E-01 1.465E-01 1.456E-01 1.445E-01 1.434E-01 1.421E-01 1.407E-01 1.392E-01 1.376E-01 1.358E-01 1.340E-01 1.320E-01 1.299E-01 1.276E-01 1.253E-01 1.228E-01 1.203E-01 1.176E-01 1.148E-01 1.120E-01 1.090E-01 1.059E-01 1.027E-01 9.950E-02 9.618E-02 9.279E-02 8.934E-02 8.583E-02 8.227E-02 7.867E-02 7.504E-02 7.139E-02 6.772E-02 6.405E-02 6.039E-02 5.674E-02 5.313E-02 4.955E-02 4.602E-02 4.255E-02 3.916E-02 3.584E-02 3.262E-02 2.950E-02 2.650E-02 2.361E-02 2.086E-02 1.825E-02 1.580E-02 1.350E-02 1.136E-02 9.396E-03 7.608E-03 6.003E-03 4.583E-03 3.353E-03 2.314E-03 1.468E-03 8.144E-04 3.533E-04 8.280E-05 2.914E-07 1.022E-04 3.839E-04 8.399E-04 1.464E-03 2.248E-03 3.185E-03 4.265E-03 5.479E-03 6.817E-03 8.267E-03 9.818E-03 1.146E-02 1.317E-02 1.496E-02 1.679E-02 1.866E-02 2.055E-02 2.245E-02 2.436E-02 2.625E-02 2.811E-02 2.993E-02 3.170E-02 3.341E-02 3.504E-02 3.659E-02 3.805E-02 3.940E-02 4.064E-02 4.177E-02 4.277E-02 4.364E-02 4.438E-02 4.498E-02 4.544E-02 4.576E-02 4.593E-02 4.597E-02 4.586E-02 4.561E-02 4.523E-02 4.471E-02 4.406E-02 4.329E-02 4.241E-02 4.141E-02 4.031E-02 3.912E-02 3.783E-02 3.647E-02 3.504E-02 3.355E-02 3.201E-02 3.042E-02 2.881E-02 2.717E-02 2.551E-02 2.386E-02 2.221E-02 2.057E-02 1.989E-02 2.153E-02 2.318E-02 2.485E-02 2.651E-02 2.816E-02 2.980E-02 3.141E-02 3.297E-02 3.449E-02 3.596E-02 3.735E-02 3.867E-02 3.990E-02 4.104E-02 4.208E-02 4.301E-02 4.382E-02 4.451E-02 4.508E-02 4.551E-02 4.580E-02 4.595E-02 4.596E-02 4.582E-02 4.554E-02 4.512E-02 4.455E-02 4.384E-02 4.300E-02 4.202E-02 4.091E-02 3.969E-02 3.834E-02 3.690E-02 3.535E-02 3.372E-02 3.201E-02 3.023E-02 2.840E-02 2.653E-02 2.462E-02 2.270E-02 2.078E-02 1.886E-02 1.697E-02 1.511E-02 1.331E-02 1.156E-02 9.900E-03 8.326E-03 6.854E-03 5.496E-03 4.265E-03 3.171E-03 2.224E-03 1.434E-03 8.092E-04 3.575E-04 8.587E-05 2.162E-07 1.055E-04 4.058E-04 9.039E-04 1.602E-03 2.501E-03 3.600E-03 4.898E-03 6.394E-03 8.084E-03 9.965E-03 1.203E-02 1.427E-02 1.669E-02 1.927E-02 2.201E-02 2.490E-02 2.793E-02 3.109E-02 3.436E-02 3.775E-02 4.123E-02 4.480E-02 4.844E-02 5.215E-02 5.591E-02 5.971E-02 6.353E-02 6.738E-02 7.124E-02 7.509E-02 7.893E-02 8.274E-02 8.652E-02 9.026E-02 9.395E-02 9.758E-02 1.011E-01 1.046E-01 1.080E-01 1.114E-01 1.146E-01 1.177E-01 1.208E-01 1.237E-01 1.265E-01 1.292E-01 1.318E-01 1.343E-01 1.366E-01 1.389E-01 1.410E-01 1.430E-01 1.448E-01 1.466E-01 1.482E-01 1.497E-01 1.511E-01 1.523E-01 1.535E-01 1.545E-01 1.554E-01 1.562E-01 1.568E-01 1.573E-01 1.578E-01 1.580E-01 1.582E-01 1.583E-01 1.582E-01 1.580E-01 1.578E-01 1.573E-01 1.568E-01 1.562E-01 1.554E-01 1.545E-01 1.535E-01 1.523E-01 1.511E-01 1.497E-01 1.482E-01 1.466E-01 1.448E-01 1.430E-01 1.410E-01 1.389E-01 1.366E-01 1.343E-01 1.318E-01 1.292E-01 1.265E-01 1.237E-01 1.208E-01 1.177E-01 1.146E-01 1.114E-01 1.080E-01 1.046E-01 1.011E-01 9.758E-02 9.395E-02 9.026E-02 8.652E-02 8.274E-02 7.893E-02 7.509E-02 7.124E-02 6.738E-02 6.353E-02 5.971E-02 5.591E-02 5.215E-02 4.844E-02 4.480E-02 4.123E-02 3.775E-02 3.436E-02 3.109E-02 2.793E-02 2.490E-02 2.201E-02 1.927E-02 1.669E-02 1.427E-02 1.203E-02 9.965E-03 8.084E-03 6.394E-03 4.898E-03 3.600E-03 2.501E-03 1.602E-03 9.039E-04 4.058E-04 1.055E-04 2.162E-07 8.587E-05 3.575E-04 8.092E-04 1.434E-03 2.224E-03 3.171E-03 4.265E-03 5.496E-03 6.854E-03 8.326E-03 9.900E-03 1.156E-02 1.331E-02 1.511E-02 1.697E-02 1.886E-02 2.078E-02 2.270E-02 2.462E-02 2.653E-02 2.840E-02 3.023E-02 3.201E-02 3.372E-02 3.535E-02 3.690E-02 3.834E-02 3.969E-02 4.091E-02 4.202E-02 4.300E-02 4.384E-02 4.455E-02 4.512E-02 4.554E-02 4.582E-02 4.596E-02 4.595E-02 4.580E-02 4.551E-02 4.508E-02 4.451E-02 4.382E-02 4.301E-02 4.208E-02 4.104E-02 3.990E-02 3.867E-02 3.735E-02 3.596E-02 3.449E-02 3.297E-02 3.141E-02 2.980E-02 2.816E-02 2.651E-02 2.485E-02 2.318E-02 2.153E-02 2.083E-02 2.249E-02 2.416E-02 2.583E-02 2.750E-02 2.915E-02 3.077E-02 3.237E-02 3.391E-02 3.541E-02 3.684E-02 3.819E-02 3.946E-02 4.065E-02 4.173E-02 4.270E-02 4.356E-02 4.430E-02 4.491E-02 4.538E-02 4.572E-02 4.592E-02 4.597E-02 4.588E-02 4.564E-02 4.525E-02 4.472E-02 4.405E-02 4.323E-02 4.228E-02 4.120E-02 3.999E-02 3.866E-02 3.723E-02 3.569E-02 3.406E-02 3.235E-02 3.057E-02 2.873E-02 2.685E-02 2.493E-02 2.299E-02 2.105E-02 1.911E-02 1.719E-02 1.531E-02 1.348E-02 1.171E-02 1.002E-02 8.424E-03 6.928E-03 5.548E-03 4.296E-03 3.185E-03 2.224E-03 1.424E-03 7.941E-04 3.421E-04 7.576E-05 1.402E-06 1.244E-04 4.492E-04 9.791E-04 1.716E-03 2.662E-03 3.816E-03 5.178E-03 6.745E-03 8.514E-03 1.048E-02 1.264E-02 1.499E-02 1.752E-02 2.022E-02 2.309E-02 2.611E-02 2.928E-02 3.259E-02 3.602E-02 3.956E-02 4.320E-02 4.694E-02 5.076E-02 5.464E-02 5.857E-02 6.255E-02 6.657E-02 7.060E-02 7.463E-02 7.867E-02 8.269E-02 8.668E-02 9.065E-02 9.456E-02 9.843E-02 1.022E-01 1.060E-01 1.096E-01 1.132E-01 1.167E-01 1.200E-01 1.233E-01 1.265E-01 1.296E-01 1.325E-01 1.354E-01 1.381E-01 1.407E-01 1.431E-01 1.455E-01 1.477E-01 1.498E-01 1.518E-01 1.537E-01 1.554E-01 1.570E-01 1.585E-01 1.598E-01 1.611E-01 1.622E-01 1.632E-01 1.640E-01 1.648E-01 1.654E-01 1.659E-01 1.663E-01 1.666E-01 1.668E-01 1.669E-01 1.668E-01 1.666E-01 1.663E-01 1.659E-01 1.654E-01 1.648E-01 1.640E-01 1.632E-01 1.622E-01 1.611E-01 1.598E-01 1.585E-01 1.570E-01 1.554E-01 1.537E-01 1.518E-01 1.498E-01 1.477E-01 1.455E-01 1.431E-01 1.407E-01 1.381E-01 1.354E-01 1.325E-01 1.296E-01 1.265E-01 1.233E-01 1.200E-01 1.167E-01 1.132E-01 1.096E-01 1.060E-01 1.022E-01 9.843E-02 9.456E-02 9.065E-02 8.668E-02 8.269E-02 7.867E-02 7.463E-02 7.060E-02 6.657E-02 6.255E-02 5.857E-02 5.464E-02 5.076E-02 4.694E-02 4.320E-02 3.956E-02 3.602E-02 3.259E-02 2.928E-02 2.611E-02 2.309E-02 2.022E-02 1.752E-02 1.499E-02 1.264E-02 1.048E-02 8.514E-03 6.745E-03 5.178E-03 3.816E-03 2.662E-03 1.716E-03 9.791E-04 4.492E-04 1.244E-04 1.402E-06 7.576E-05 3.421E-04 7.941E-04 1.424E-03 2.224E-03 3.185E-03 4.296E-03 5.548E-03 6.928E-03 8.424E-03 1.002E-02 1.171E-02 1.348E-02 1.531E-02 1.719E-02 1.911E-02 2.105E-02 2.299E-02 2.493E-02 2.685E-02 2.873E-02 3.057E-02 3.235E-02 3.406E-02 3.569E-02 3.723E-02 3.866E-02 3.999E-02 4.120E-02 4.228E-02 4.323E-02 4.405E-02 4.472E-02 4.525E-02 4.564E-02 4.588E-02 4.597E-02 4.592E-02 4.572E-02 4.538E-02 4.491E-02 4.430E-02 4.356E-02 4.270E-02 4.173E-02 4.065E-02 3.946E-02 3.819E-02 3.684E-02 3.541E-02 3.391E-02 3.237E-02 3.077E-02 2.915E-02 2.750E-02 2.583E-02 2.416E-02 2.249E-02 2.177E-02 2.344E-02 2.512E-02 2.680E-02 2.847E-02 3.011E-02 3.173E-02 3.330E-02 3.482E-02 3.629E-02 3.768E-02 3.899E-02 4.022E-02 4.134E-02 4.236E-02 4.327E-02 4.405E-02 4.471E-02 4.524E-02 4.562E-02 4.587E-02 4.597E-02 4.592E-02 4.573E-02 4.538E-02 4.489E-02 4.425E-02 4.347E-02 4.255E-02 4.150E-02 4.031E-02 3.901E-02 3.758E-02 3.606E-02 3.444E-02 3.273E-02 3.095E-02 2.910E-02 2.721E-02 2.528E-02 2.333E-02 2.136E-02 1.940E-02 1.747E-02 1.556E-02 1.370E-02 1.191E-02 1.019E-02 8.561E-03 7.039E-03 5.634E-03 4.359E-03 3.227E-03 2.248E-03 1.434E-03 7.941E-04 3.371E-04 7.095E-05 2.612E-06 1.379E-04 4.817E-04 1.038E-03 1.808E-03 2.795E-03 3.998E-03 5.417E-03 7.050E-03 8.893E-03 1.094E-02 1.319E-02 1.564E-02 1.828E-02 2.110E-02 2.408E-02 2.724E-02 3.054E-02 3.399E-02 3.757E-02 4.127E-02 4.507E-02 4.897E-02 5.296E-02 5.701E-02 6.112E-02 6.528E-02 6.947E-02 7.368E-02 7.790E-02 8.211E-02 8.631E-02 9.048E-02 9.462E-02 9.871E-02 1.027E-01 1.067E-01 1.106E-01 1.144E-01 1.181E-01 1.218E-01 1.253E-01 1.287E-01 1.320E-01 1.352E-01 1.383E-01 1.413E-01 1.441E-01 1.468E-01 1.494E-01 1.519E-01 1.542E-01 1.564E-01 1.585E-01 1.604E-01 1.622E-01 1.639E-01 1.655E-01 1.669E-01 1.682E-01 1.694E-01 1.705E-01 1.715E-01 1.723E-01 1.731E-01 1.737E-01 1.742E-01 1.746E-01 1.749E-01 1.750E-01 1.751E-01 1.750E-01 1.749E-01 1.746E-01 1.742E-01 1.737E-01 1.731E-01 1.723E-01 1.715E-01 1.705E-01 1.694E-01 1.682E-01 1.669E-01 1.655E-01 1.639E-01 1.622E-01 1.604E-01 1.585E-01 1.564E-01 1.542E-01 1.519E-01 1.494E-01 1.468E-01 1.441E-01 1.413E-01 1.383E-01 1.352E-01 1.320E-01 1.287E-01 1.253E-01 1.218E-01 1.181E-01 1.144E-01 1.106E-01 1.067E-01 1.027E-01 9.871E-02 9.462E-02 9.048E-02 8.631E-02 8.211E-02 7.790E-02 7.368E-02 6.947E-02 6.528E-02 6.112E-02 5.701E-02 5.296E-02 4.897E-02 4.507E-02 4.127E-02 3.757E-02 3.399E-02 3.054E-02 2.724E-02 2.408E-02 2.110E-02 1.828E-02 1.564E-02 1.319E-02 1.094E-02 8.893E-03 7.050E-03 5.417E-03 3.998E-03 2.795E-03 1.808E-03 1.038E-03 4.817E-04 1.379E-04 2.612E-06 7.095E-05 3.371E-04 7.941E-04 1.434E-03 2.248E-03 3.227E-03 4.359E-03 5.634E-03 7.039E-03 8.561E-03 1.019E-02 1.191E-02 1.370E-02 1.556E-02 1.747E-02 1.940E-02 2.136E-02 2.333E-02 2.528E-02 2.721E-02 2.910E-02 3.095E-02 3.273E-02 3.444E-02 3.606E-02 3.758E-02 3.901E-02 4.031E-02 4.150E-02 4.255E-02 4.347E-02 4.425E-02 4.489E-02 4.538E-02 4.573E-02 4.592E-02 4.597E-02 4.587E-02 4.562E-02 4.524E-02 4.471E-02 4.405E-02 4.327E-02 4.236E-02 4.134E-02 4.022E-02 3.899E-02 3.768E-02 3.629E-02 3.482E-02 3.330E-02 3.173E-02 3.011E-02 2.847E-02 2.680E-02 2.512E-02 2.344E-02 2.270E-02 2.439E-02 2.608E-02 2.776E-02 2.942E-02 3.106E-02 3.266E-02 3.421E-02 3.571E-02 3.713E-02 3.849E-02 3.975E-02 4.092E-02 4.199E-02 4.294E-02 4.378E-02 4.449E-02 4.507E-02 4.550E-02 4.580E-02 4.595E-02 4.595E-02 4.581E-02 4.551E-02 4.506E-02 4.446E-02 4.372E-02 4.283E-02 4.181E-02 4.065E-02 3.937E-02 3.796E-02 3.645E-02 3.484E-02 3.314E-02 3.136E-02 2.951E-02 2.761E-02 2.567E-02 2.370E-02 2.172E-02 1.974E-02 1.778E-02 1.585E-02 1.397E-02 1.214E-02 1.040E-02 8.739E-03 7.188E-03 5.754E-03 4.453E-03 3.296E-03 2.296E-03 1.464E-03 8.092E-04 3.421E-04 7.095E-05 3.098E-06 1.449E-04 5.017E-04 1.078E-03 1.875E-03 2.897E-03 4.143E-03 5.613E-03 7.304E-03 9.215E-03 1.134E-02 1.368E-02 1.622E-02 1.896E-02 2.188E-02 2.499E-02 2.826E-02 3.170E-02 3.529E-02 3.901E-02 4.286E-02 4.682E-02 5.088E-02 5.503E-02 5.925E-02 6.353E-02 6.786E-02 7.223E-02 7.661E-02 8.101E-02 8.540E-02 8.977E-02 9.412E-02 9.843E-02 1.027E-01 1.069E-01 1.110E-01 1.151E-01 1.190E-01 1.229E-01 1.267E-01 1.304E-01 1.339E-01 1.374E-01 1.407E-01 1.439E-01 1.469E-01 1.499E-01 1.527E-01 1.554E-01 1.579E-01 1.603E-01 1.626E-01 1.648E-01 1.668E-01 1.687E-01 1.705E-01 1.721E-01 1.736E-01 1.750E-01 1.763E-01 1.775E-01 1.785E-01 1.794E-01 1.802E-01 1.809E-01 1.815E-01 1.820E-01 1.824E-01 1.826E-01 1.828E-01 1.829E-01 1.828E-01 1.826E-01 1.824E-01 1.820E-01 1.815E-01 1.809E-01 1.802E-01 1.794E-01 1.785E-01 1.775E-01 1.763E-01 1.750E-01 1.736E-01 1.721E-01 1.705E-01 1.687E-01 1.668E-01 1.648E-01 1.626E-01 1.603E-01 1.579E-01 1.554E-01 1.527E-01 1.499E-01 1.469E-01 1.439E-01 1.407E-01 1.374E-01 1.339E-01 1.304E-01 1.267E-01 1.229E-01 1.190E-01 1.151E-01 1.110E-01 1.069E-01 1.027E-01 9.843E-02 9.412E-02 8.977E-02 8.540E-02 8.101E-02 7.661E-02 7.223E-02 6.786E-02 6.353E-02 5.925E-02 5.503E-02 5.088E-02 4.682E-02 4.286E-02 3.901E-02 3.529E-02 3.170E-02 2.826E-02 2.499E-02 2.188E-02 1.896E-02 1.622E-02 1.368E-02 1.134E-02 9.215E-03 7.304E-03 5.613E-03 4.143E-03 2.897E-03 1.875E-03 1.078E-03 5.017E-04 1.449E-04 3.098E-06 7.095E-05 3.421E-04 8.092E-04 1.464E-03 2.296E-03 3.296E-03 4.453E-03 5.754E-03 7.188E-03 8.739E-03 1.040E-02 1.214E-02 1.397E-02 1.585E-02 1.778E-02 1.974E-02 2.172E-02 2.370E-02 2.567E-02 2.761E-02 2.951E-02 3.136E-02 3.314E-02 3.484E-02 3.645E-02 3.796E-02 3.937E-02 4.065E-02 4.181E-02 4.283E-02 4.372E-02 4.446E-02 4.506E-02 4.551E-02 4.581E-02 4.595E-02 4.595E-02 4.580E-02 4.550E-02 4.507E-02 4.449E-02 4.378E-02 4.294E-02 4.199E-02 4.092E-02 3.975E-02 3.849E-02 3.713E-02 3.571E-02 3.421E-02 3.266E-02 3.106E-02 2.942E-02 2.776E-02 2.608E-02 2.439E-02 2.363E-02 2.533E-02 2.702E-02 2.870E-02 3.036E-02 3.198E-02 3.356E-02 3.509E-02 3.656E-02 3.795E-02 3.926E-02 4.047E-02 4.159E-02 4.259E-02 4.348E-02 4.424E-02 4.487E-02 4.536E-02 4.571E-02 4.592E-02 4.597E-02 4.587E-02 4.562E-02 4.522E-02 4.467E-02 4.397E-02 4.312E-02 4.213E-02 4.100E-02 3.975E-02 3.837E-02 3.687E-02 3.527E-02 3.358E-02 3.181E-02 2.996E-02 2.806E-02 2.611E-02 2.413E-02 2.213E-02 2.013E-02 1.815E-02 1.619E-02 1.428E-02 1.242E-02 1.065E-02 8.958E-03 7.375E-03 5.911E-03 4.580E-03 3.395E-03 2.369E-03 1.514E-03 8.399E-04 3.575E-04 7.576E-05 2.612E-06 1.449E-04 5.085E-04 1.098E-03 1.916E-03 2.966E-03 4.248E-03 5.762E-03 7.506E-03 9.478E-03 1.167E-02 1.409E-02 1.671E-02 1.955E-02 2.258E-02 2.579E-02 2.919E-02 3.275E-02 3.647E-02 4.033E-02 4.433E-02 4.844E-02 5.266E-02 5.697E-02 6.135E-02 6.580E-02 7.030E-02 7.484E-02 7.939E-02 8.396E-02 8.852E-02 9.307E-02 9.758E-02 1.021E-01 1.065E-01 1.108E-01 1.151E-01 1.193E-01 1.234E-01 1.275E-01 1.314E-01 1.352E-01 1.389E-01 1.424E-01 1.459E-01 1.492E-01 1.523E-01 1.554E-01 1.583E-01 1.611E-01 1.637E-01 1.662E-01 1.685E-01 1.708E-01 1.728E-01 1.748E-01 1.766E-01 1.783E-01 1.799E-01 1.814E-01 1.827E-01 1.839E-01 1.850E-01 1.860E-01 1.869E-01 1.876E-01 1.883E-01 1.889E-01 1.893E-01 1.897E-01 1.899E-01 1.901E-01 1.901E-01 1.901E-01 1.899E-01 1.897E-01 1.893E-01 1.889E-01 1.883E-01 1.876E-01 1.869E-01 1.860E-01 1.850E-01 1.839E-01 1.827E-01 1.814E-01 1.799E-01 1.783E-01 1.766E-01 1.748E-01 1.728E-01 1.708E-01 1.685E-01 1.662E-01 1.637E-01 1.611E-01 1.583E-01 1.554E-01 1.523E-01 1.492E-01 1.459E-01 1.424E-01 1.389E-01 1.352E-01 1.314E-01 1.275E-01 1.234E-01 1.193E-01 1.151E-01 1.108E-01 1.065E-01 1.021E-01 9.758E-02 9.307E-02 8.852E-02 8.396E-02 7.939E-02 7.484E-02 7.030E-02 6.580E-02 6.135E-02 5.697E-02 5.266E-02 4.844E-02 4.433E-02 4.033E-02 3.647E-02 3.275E-02 2.919E-02 2.579E-02 2.258E-02 1.955E-02 1.671E-02 1.409E-02 1.167E-02 9.478E-03 7.506E-03 5.762E-03 4.248E-03 2.966E-03 1.916E-03 1.098E-03 5.085E-04 1.449E-04 2.612E-06 7.576E-05 3.575E-04 8.399E-04 1.514E-03 2.369E-03 3.395E-03 4.580E-03 5.911E-03 7.375E-03 8.958E-03 1.065E-02 1.242E-02 1.428E-02 1.619E-02 1.815E-02 2.013E-02 2.213E-02 2.413E-02 2.611E-02 2.806E-02 2.996E-02 3.181E-02 3.358E-02 3.527E-02 3.687E-02 3.837E-02 3.975E-02 4.100E-02 4.213E-02 4.312E-02 4.397E-02 4.467E-02 4.522E-02 4.562E-02 4.587E-02 4.597E-02 4.592E-02 4.571E-02 4.536E-02 4.487E-02 4.424E-02 4.348E-02 4.259E-02 4.159E-02 4.047E-02 3.926E-02 3.795E-02 3.656E-02 3.509E-02 3.356E-02 3.198E-02 3.036E-02 2.870E-02 2.702E-02 2.533E-02 2.455E-02 2.626E-02 2.795E-02 2.963E-02 3.127E-02 3.288E-02 3.444E-02 3.594E-02 3.737E-02 3.872E-02 3.999E-02 4.115E-02 4.220E-02 4.314E-02 4.396E-02 4.464E-02 4.519E-02 4.560E-02 4.586E-02 4.597E-02 4.593E-02 4.573E-02 4.538E-02 4.487E-02 4.422E-02 4.341E-02 4.246E-02 4.137E-02 4.014E-02 3.879E-02 3.731E-02 3.573E-02 3.405E-02 3.229E-02 3.044E-02 2.854E-02 2.658E-02 2.459E-02 2.258E-02 2.056E-02 1.855E-02 1.657E-02 1.463E-02 1.275E-02 1.094E-02 9.219E-03 7.602E-03 6.105E-03 4.741E-03 3.524E-03 2.468E-03 1.585E-03 8.868E-04 3.839E-04 8.587E-05 1.402E-06 1.379E-04 5.017E-04 1.098E-03 1.930E-03 3.001E-03 4.312E-03 5.863E-03 7.652E-03 9.678E-03 1.194E-02 1.442E-02 1.713E-02 2.005E-02 2.317E-02 2.650E-02 3.000E-02 3.369E-02 3.753E-02 4.153E-02 4.566E-02 4.992E-02 5.429E-02 5.875E-02 6.330E-02 6.791E-02 7.258E-02 7.728E-02 8.200E-02 8.674E-02 9.147E-02 9.618E-02 1.009E-01 1.055E-01 1.101E-01 1.146E-01 1.190E-01 1.234E-01 1.276E-01 1.318E-01 1.358E-01 1.398E-01 1.436E-01 1.472E-01 1.508E-01 1.542E-01 1.575E-01 1.606E-01 1.636E-01 1.664E-01 1.691E-01 1.717E-01 1.741E-01 1.764E-01 1.785E-01 1.805E-01 1.824E-01 1.841E-01 1.857E-01 1.872E-01 1.886E-01 1.899E-01 1.910E-01 1.920E-01 1.929E-01 1.938E-01 1.945E-01 1.951E-01 1.956E-01 1.960E-01 1.963E-01 1.966E-01 1.967E-01 1.968E-01 1.967E-01 1.966E-01 1.963E-01 1.960E-01 1.956E-01 1.951E-01 1.945E-01 1.938E-01 1.929E-01 1.920E-01 1.910E-01 1.899E-01 1.886E-01 1.872E-01 1.857E-01 1.841E-01 1.824E-01 1.805E-01 1.785E-01 1.764E-01 1.741E-01 1.717E-01 1.691E-01 1.664E-01 1.636E-01 1.606E-01 1.575E-01 1.542E-01 1.508E-01 1.472E-01 1.436E-01 1.398E-01 1.358E-01 1.318E-01 1.276E-01 1.234E-01 1.190E-01 1.146E-01 1.101E-01 1.055E-01 1.009E-01 9.618E-02 9.147E-02 8.674E-02 8.200E-02 7.728E-02 7.258E-02 6.791E-02 6.330E-02 5.875E-02 5.429E-02 4.992E-02 4.566E-02 4.153E-02 3.753E-02 3.369E-02 3.000E-02 2.650E-02 2.317E-02 2.005E-02 1.713E-02 1.442E-02 1.194E-02 9.678E-03 7.652E-03 5.863E-03 4.312E-03 3.001E-03 1.930E-03 1.098E-03 5.017E-04 1.379E-04 1.402E-06 8.587E-05 3.839E-04 8.868E-04 1.585E-03 2.468E-03 3.524E-03 4.741E-03 6.105E-03 7.602E-03 9.219E-03 1.094E-02 1.275E-02 1.463E-02 1.657E-02 1.855E-02 2.056E-02 2.258E-02 2.459E-02 2.658E-02 2.854E-02 3.044E-02 3.229E-02 3.405E-02 3.573E-02 3.731E-02 3.879E-02 4.014E-02 4.137E-02 4.246E-02 4.341E-02 4.422E-02 4.487E-02 4.538E-02 4.573E-02 4.593E-02 4.597E-02 4.586E-02 4.560E-02 4.519E-02 4.464E-02 4.396E-02 4.314E-02 4.220E-02 4.115E-02 3.999E-02 3.872E-02 3.737E-02 3.594E-02 3.444E-02 3.288E-02 3.127E-02 2.963E-02 2.795E-02 2.626E-02 2.547E-02 2.717E-02 2.887E-02 3.054E-02 3.217E-02 3.376E-02 3.530E-02 3.676E-02 3.816E-02 3.946E-02 4.067E-02 4.178E-02 4.277E-02 4.364E-02 4.439E-02 4.499E-02 4.546E-02 4.578E-02 4.594E-02 4.596E-02 4.582E-02 4.552E-02 4.507E-02 4.446E-02 4.370E-02 4.279E-02 4.174E-02 4.054E-02 3.922E-02 3.778E-02 3.622E-02 3.455E-02 3.280E-02 3.096E-02 2.905E-02 2.709E-02 2.509E-02 2.307E-02 2.104E-02 1.901E-02 1.700E-02 1.503E-02 1.312E-02 1.128E-02 9.522E-03 7.870E-03 6.336E-03 4.936E-03 3.684E-03 2.594E-03 1.679E-03 9.513E-04 4.223E-04 1.022E-04 2.162E-07 1.244E-04 4.817E-04 1.078E-03 1.916E-03 3.001E-03 4.333E-03 5.913E-03 7.741E-03 9.812E-03 1.212E-02 1.467E-02 1.745E-02 2.045E-02 2.367E-02 2.709E-02 3.070E-02 3.450E-02 3.847E-02 4.259E-02 4.686E-02 5.126E-02 5.577E-02 6.039E-02 6.509E-02 6.986E-02 7.468E-02 7.955E-02 8.444E-02 8.934E-02 9.423E-02 9.910E-02 1.039E-01 1.087E-01 1.135E-01 1.181E-01 1.227E-01 1.272E-01 1.316E-01 1.359E-01 1.401E-01 1.441E-01 1.480E-01 1.518E-01 1.554E-01 1.589E-01 1.623E-01 1.655E-01 1.685E-01 1.714E-01 1.742E-01 1.768E-01 1.793E-01 1.816E-01 1.838E-01 1.858E-01 1.877E-01 1.895E-01 1.911E-01 1.926E-01 1.940E-01 1.953E-01 1.964E-01 1.975E-01 1.984E-01 1.993E-01 2.000E-01 2.007E-01 2.012E-01 2.017E-01 2.021E-01 2.024E-01 2.026E-01 2.027E-01 2.027E-01 2.027E-01 2.026E-01 2.024E-01 2.021E-01 2.017E-01 2.012E-01 2.007E-01 2.000E-01 1.993E-01 1.984E-01 1.975E-01 1.964E-01 1.953E-01 1.940E-01 1.926E-01 1.911E-01 1.895E-01 1.877E-01 1.858E-01 1.838E-01 1.816E-01 1.793E-01 1.768E-01 1.742E-01 1.714E-01 1.685E-01 1.655E-01 1.623E-01 1.589E-01 1.554E-01 1.518E-01 1.480E-01 1.441E-01 1.401E-01 1.359E-01 1.316E-01 1.272E-01 1.227E-01 1.181E-01 1.135E-01 1.087E-01 1.039E-01 9.910E-02 9.423E-02 8.934E-02 8.444E-02 7.955E-02 7.468E-02 6.986E-02 6.509E-02 6.039E-02 5.577E-02 5.126E-02 4.686E-02 4.259E-02 3.847E-02 3.450E-02 3.070E-02 2.709E-02 2.367E-02 2.045E-02 1.745E-02 1.467E-02 1.212E-02 9.812E-03 7.741E-03 5.913E-03 4.333E-03 3.001E-03 1.916E-03 1.078E-03 4.817E-04 1.244E-04 2.162E-07 1.022E-04 4.223E-04 9.513E-04 1.679E-03 2.594E-03 3.684E-03 4.936E-03 6.336E-03 7.870E-03 9.522E-03 1.128E-02 1.312E-02 1.503E-02 1.700E-02 1.901E-02 2.104E-02 2.307E-02 2.509E-02 2.709E-02 2.905E-02 3.096E-02 3.280E-02 3.455E-02 3.622E-02 3.778E-02 3.922E-02 4.054E-02 4.174E-02 4.279E-02 4.370E-02 4.446E-02 4.507E-02 4.552E-02 4.582E-02 4.596E-02 4.594E-02 4.578E-02 4.546E-02 4.499E-02 4.439E-02 4.364E-02 4.277E-02 4.178E-02 4.067E-02 3.946E-02 3.816E-02 3.676E-02 3.530E-02 3.376E-02 3.217E-02 3.054E-02 2.887E-02 2.717E-02 2.637E-02 2.808E-02 2.977E-02 3.143E-02 3.304E-02 3.461E-02 3.612E-02 3.755E-02 3.890E-02 4.016E-02 4.132E-02 4.237E-02 4.330E-02 4.410E-02 4.476E-02 4.529E-02 4.567E-02 4.590E-02 4.597E-02 4.589E-02 4.565E-02 4.525E-02 4.470E-02 4.399E-02 4.312E-02 4.211E-02 4.096E-02 3.967E-02 3.826E-02 3.672E-02 3.508E-02 3.333E-02 3.151E-02 2.961E-02 2.765E-02 2.564E-02 2.360E-02 2.155E-02 1.951E-02 1.748E-02 1.548E-02 1.354E-02 1.166E-02 9.869E-03 8.179E-03 6.607E-03 5.168E-03 3.877E-03 2.748E-03 1.797E-03 1.035E-03 4.741E-04 1.261E-04 2.914E-07 1.055E-04 4.492E-04 1.038E-03 1.875E-03 2.966E-03 4.312E-03 5.913E-03 7.770E-03 9.880E-03 1.224E-02 1.484E-02 1.769E-02 2.076E-02 2.406E-02 2.757E-02 3.128E-02 3.518E-02 3.927E-02 4.351E-02 4.791E-02 5.244E-02 5.710E-02 6.186E-02 6.671E-02 7.163E-02 7.661E-02 8.164E-02 8.668E-02 9.174E-02 9.680E-02 1.018E-01 1.068E-01 1.118E-01 1.167E-01 1.215E-01 1.262E-01 1.308E-01 1.354E-01 1.398E-01 1.441E-01 1.482E-01 1.522E-01 1.561E-01 1.598E-01 1.634E-01 1.668E-01 1.701E-01 1.732E-01 1.761E-01 1.789E-01 1.816E-01 1.841E-01 1.864E-01 1.886E-01 1.906E-01 1.926E-01 1.943E-01 1.960E-01 1.975E-01 1.989E-01 2.001E-01 2.013E-01 2.024E-01 2.033E-01 2.042E-01 2.049E-01 2.056E-01 2.062E-01 2.066E-01 2.071E-01 2.074E-01 2.077E-01 2.078E-01 2.079E-01 2.080E-01 2.079E-01 2.078E-01 2.077E-01 2.074E-01 2.071E-01 2.066E-01 2.062E-01 2.056E-01 2.049E-01 2.042E-01 2.033E-01 2.024E-01 2.013E-01 2.001E-01 1.989E-01 1.975E-01 1.960E-01 1.943E-01 1.926E-01 1.906E-01 1.886E-01 1.864E-01 1.841E-01 1.816E-01 1.789E-01 1.761E-01 1.732E-01 1.701E-01 1.668E-01 1.634E-01 1.598E-01 1.561E-01 1.522E-01 1.482E-01 1.441E-01 1.398E-01 1.354E-01 1.308E-01 1.262E-01 1.215E-01 1.167E-01 1.118E-01 1.068E-01 1.018E-01 9.680E-02 9.174E-02 8.668E-02 8.164E-02 7.661E-02 7.163E-02 6.671E-02 6.186E-02 5.710E-02 5.244E-02 4.791E-02 4.351E-02 3.927E-02 3.518E-02 3.128E-02 2.757E-02 2.406E-02 2.076E-02 1.769E-02 1.484E-02 1.224E-02 9.880E-03 7.770E-03 5.913E-03 4.312E-03 2.966E-03 1.875E-03 1.038E-03 4.492E-04 1.055E-04 2.914E-07 1.261E-04 4.741E-04 1.035E-03 1.797E-03 2.748E-03 3.877E-03 5.168E-03 6.607E-03 8.179E-03 9.869E-03 1.166E-02 1.354E-02 1.548E-02 1.748E-02 1.951E-02 2.155E-02 2.360E-02 2.564E-02 2.765E-02 2.961E-02 3.151E-02 3.333E-02 3.508E-02 3.672E-02 3.826E-02 3.967E-02 4.096E-02 4.211E-02 4.312E-02 4.399E-02 4.470E-02 4.525E-02 4.565E-02 4.589E-02 4.597E-02 4.590E-02 4.567E-02 4.529E-02 4.476E-02 4.410E-02 4.330E-02 4.237E-02 4.132E-02 4.016E-02 3.890E-02 3.755E-02 3.612E-02 3.461E-02 3.304E-02 3.143E-02 2.977E-02 2.808E-02 2.726E-02 2.897E-02 3.065E-02 3.229E-02 3.389E-02 3.544E-02 3.691E-02 3.831E-02 3.962E-02 4.083E-02 4.193E-02 4.291E-02 4.377E-02 4.450E-02 4.509E-02 4.553E-02 4.582E-02 4.596E-02 4.594E-02 4.576E-02 4.542E-02 4.492E-02 4.427E-02 4.346E-02 4.249E-02 4.138E-02 4.013E-02 3.875E-02 3.724E-02 3.562E-02 3.390E-02 3.209E-02 3.019E-02 2.823E-02 2.622E-02 2.418E-02 2.212E-02 2.005E-02 1.800E-02 1.597E-02 1.400E-02 1.209E-02 1.026E-02 8.532E-03 6.918E-03 5.437E-03 4.103E-03 2.933E-03 1.940E-03 1.139E-03 5.414E-04 1.593E-04 3.342E-06 8.280E-05 4.058E-04 9.791E-04 1.808E-03 2.897E-03 4.248E-03 5.863E-03 7.741E-03 9.880E-03 1.228E-02 1.493E-02 1.783E-02 2.097E-02 2.434E-02 2.793E-02 3.173E-02 3.574E-02 3.993E-02 4.429E-02 4.881E-02 5.347E-02 5.826E-02 6.316E-02 6.815E-02 7.323E-02 7.836E-02 8.353E-02 8.874E-02 9.395E-02 9.916E-02 1.043E-01 1.095E-01 1.146E-01 1.196E-01 1.246E-01 1.294E-01 1.342E-01 1.389E-01 1.434E-01 1.478E-01 1.520E-01 1.562E-01 1.601E-01 1.639E-01 1.676E-01 1.710E-01 1.744E-01 1.775E-01 1.805E-01 1.833E-01 1.860E-01 1.885E-01 1.908E-01 1.930E-01 1.951E-01 1.970E-01 1.987E-01 2.004E-01 2.019E-01 2.032E-01 2.045E-01 2.056E-01 2.066E-01 2.076E-01 2.084E-01 2.092E-01 2.098E-01 2.104E-01 2.109E-01 2.113E-01 2.116E-01 2.119E-01 2.121E-01 2.123E-01 2.124E-01 2.124E-01 2.124E-01 2.123E-01 2.121E-01 2.119E-01 2.116E-01 2.113E-01 2.109E-01 2.104E-01 2.098E-01 2.092E-01 2.084E-01 2.076E-01 2.066E-01 2.056E-01 2.045E-01 2.032E-01 2.019E-01 2.004E-01 1.987E-01 1.970E-01 1.951E-01 1.930E-01 1.908E-01 1.885E-01 1.860E-01 1.833E-01 1.805E-01 1.775E-01 1.744E-01 1.710E-01 1.676E-01 1.639E-01 1.601E-01 1.562E-01 1.520E-01 1.478E-01 1.434E-01 1.389E-01 1.342E-01 1.294E-01 1.246E-01 1.196E-01 1.146E-01 1.095E-01 1.043E-01 9.916E-02 9.395E-02 8.874E-02 8.353E-02 7.836E-02 7.323E-02 6.815E-02 6.316E-02 5.826E-02 5.347E-02 4.881E-02 4.429E-02 3.993E-02 3.574E-02 3.173E-02 2.793E-02 2.434E-02 2.097E-02 1.783E-02 1.493E-02 1.228E-02 9.880E-03 7.741E-03 5.863E-03 4.248E-03 2.897E-03 1.808E-03 9.791E-04 4.058E-04 8.280E-05 3.342E-06 1.593E-04 5.414E-04 1.139E-03 1.940E-03 2.933E-03 4.103E-03 5.437E-03 6.918E-03 8.532E-03 1.026E-02 1.209E-02 1.400E-02 1.597E-02 1.800E-02 2.005E-02 2.212E-02 2.418E-02 2.622E-02 2.823E-02 3.019E-02 3.209E-02 3.390E-02 3.562E-02 3.724E-02 3.875E-02 4.013E-02 4.138E-02 4.249E-02 4.346E-02 4.427E-02 4.492E-02 4.542E-02 4.576E-02 4.594E-02 4.596E-02 4.582E-02 4.553E-02 4.509E-02 4.450E-02 4.377E-02 4.291E-02 4.193E-02 4.083E-02 3.962E-02 3.831E-02 3.691E-02 3.544E-02 3.389E-02 3.229E-02 3.065E-02 2.897E-02 2.814E-02 2.984E-02 3.151E-02 3.314E-02 3.472E-02 3.623E-02 3.767E-02 3.903E-02 4.029E-02 4.145E-02 4.249E-02 4.341E-02 4.420E-02 4.485E-02 4.536E-02 4.572E-02 4.592E-02 4.597E-02 4.585E-02 4.558E-02 4.514E-02 4.454E-02 4.378E-02 4.287E-02 4.181E-02 4.060E-02 3.926E-02 3.778E-02 3.619E-02 3.449E-02 3.269E-02 3.081E-02 2.886E-02 2.685E-02 2.480E-02 2.272E-02 2.064E-02 1.856E-02 1.652E-02 1.451E-02 1.256E-02 1.070E-02 8.928E-03 7.272E-03 5.746E-03 4.367E-03 3.150E-03 2.112E-03 1.266E-03 6.262E-04 2.042E-04 1.154E-05 5.831E-05 3.533E-04 9.039E-04 1.716E-03 2.795E-03 4.143E-03 5.762E-03 7.652E-03 9.812E-03 1.224E-02 1.493E-02 1.787E-02 2.107E-02 2.451E-02 2.817E-02 3.206E-02 3.616E-02 4.044E-02 4.491E-02 4.955E-02 5.433E-02 5.925E-02 6.429E-02 6.942E-02 7.463E-02 7.991E-02 8.524E-02 9.059E-02 9.596E-02 1.013E-01 1.067E-01 1.120E-01 1.172E-01 1.224E-01 1.275E-01 1.325E-01 1.374E-01 1.421E-01 1.468E-01 1.513E-01 1.556E-01 1.598E-01 1.639E-01 1.677E-01 1.714E-01 1.750E-01 1.783E-01 1.815E-01 1.845E-01 1.874E-01 1.901E-01 1.926E-01 1.949E-01 1.971E-01 1.991E-01 2.010E-01 2.027E-01 2.043E-01 2.057E-01 2.071E-01 2.083E-01 2.094E-01 2.103E-01 2.112E-01 2.120E-01 2.127E-01 2.133E-01 2.139E-01 2.144E-01 2.148E-01 2.151E-01 2.154E-01 2.156E-01 2.158E-01 2.159E-01 2.160E-01 2.160E-01 2.160E-01 2.159E-01 2.158E-01 2.156E-01 2.154E-01 2.151E-01 2.148E-01 2.144E-01 2.139E-01 2.133E-01 2.127E-01 2.120E-01 2.112E-01 2.103E-01 2.094E-01 2.083E-01 2.071E-01 2.057E-01 2.043E-01 2.027E-01 2.010E-01 1.991E-01 1.971E-01 1.949E-01 1.926E-01 1.901E-01 1.874E-01 1.845E-01 1.815E-01 1.783E-01 1.750E-01 1.714E-01 1.677E-01 1.639E-01 1.598E-01 1.556E-01 1.513E-01 1.468E-01 1.421E-01 1.374E-01 1.325E-01 1.275E-01 1.224E-01 1.172E-01 1.120E-01 1.067E-01 1.013E-01 9.596E-02 9.059E-02 8.524E-02 7.991E-02 7.463E-02 6.942E-02 6.429E-02 5.925E-02 5.433E-02 4.955E-02 4.491E-02 4.044E-02 3.616E-02 3.206E-02 2.817E-02 2.451E-02 2.107E-02 1.787E-02 1.493E-02 1.224E-02 9.812E-03 7.652E-03 5.762E-03 4.143E-03 2.795E-03 1.716E-03 9.039E-04 3.533E-04 5.831E-05 1.154E-05 2.042E-04 6.262E-04 1.266E-03 2.112E-03 3.150E-03 4.367E-03 5.746E-03 7.272E-03 8.928E-03 1.070E-02 1.256E-02 1.451E-02 1.652E-02 1.856E-02 2.064E-02 2.272E-02 2.480E-02 2.685E-02 2.886E-02 3.081E-02 3.269E-02 3.449E-02 3.619E-02 3.778E-02 3.926E-02 4.060E-02 4.181E-02 4.287E-02 4.378E-02 4.454E-02 4.514E-02 4.558E-02 4.585E-02 4.597E-02 4.592E-02 4.572E-02 4.536E-02 4.485E-02 4.420E-02 4.341E-02 4.249E-02 4.145E-02 4.029E-02 3.903E-02 3.767E-02 3.623E-02 3.472E-02 3.314E-02 3.151E-02 2.984E-02 2.900E-02 3.069E-02 3.235E-02 3.396E-02 3.552E-02 3.700E-02 3.840E-02 3.972E-02 4.093E-02 4.203E-02 4.301E-02 4.386E-02 4.458E-02 4.516E-02 4.558E-02 4.585E-02 4.597E-02 4.592E-02 4.571E-02 4.534E-02 4.480E-02 4.410E-02 4.324E-02 4.223E-02 4.107E-02 3.977E-02 3.834E-02 3.678E-02 3.510E-02 3.333E-02 3.146E-02 2.951E-02 2.751E-02 2.545E-02 2.337E-02 2.127E-02 1.918E-02 1.710E-02 1.507E-02 1.309E-02 1.118E-02 9.370E-03 7.669E-03 6.096E-03 4.668E-03 3.402E-03 2.314E-03 1.419E-03 7.312E-04 2.633E-04 2.751E-05 3.466E-05 2.943E-04 8.144E-04 1.602E-03 2.662E-03 3.998E-03 5.613E-03 7.506E-03 9.678E-03 1.212E-02 1.484E-02 1.783E-02 2.107E-02 2.456E-02 2.830E-02 3.226E-02 3.644E-02 4.082E-02 4.539E-02 5.013E-02 5.503E-02 6.007E-02 6.523E-02 7.050E-02 7.585E-02 8.127E-02 8.674E-02 9.224E-02 9.775E-02 1.033E-01 1.087E-01 1.142E-01 1.196E-01 1.249E-01 1.301E-01 1.352E-01 1.402E-01 1.451E-01 1.499E-01 1.545E-01 1.589E-01 1.632E-01 1.673E-01 1.713E-01 1.750E-01 1.786E-01 1.820E-01 1.852E-01 1.882E-01 1.911E-01 1.938E-01 1.962E-01 1.986E-01 2.007E-01 2.027E-01 2.045E-01 2.062E-01 2.077E-01 2.091E-01 2.104E-01 2.115E-01 2.125E-01 2.135E-01 2.143E-01 2.150E-01 2.156E-01 2.162E-01 2.167E-01 2.171E-01 2.175E-01 2.178E-01 2.180E-01 2.182E-01 2.184E-01 2.185E-01 2.186E-01 2.187E-01 2.187E-01 2.187E-01 2.186E-01 2.185E-01 2.184E-01 2.182E-01 2.180E-01 2.178E-01 2.175E-01 2.171E-01 2.167E-01 2.162E-01 2.156E-01 2.150E-01 2.143E-01 2.135E-01 2.125E-01 2.115E-01 2.104E-01 2.091E-01 2.077E-01 2.062E-01 2.045E-01 2.027E-01 2.007E-01 1.986E-01 1.962E-01 1.938E-01 1.911E-01 1.882E-01 1.852E-01 1.820E-01 1.786E-01 1.750E-01 1.713E-01 1.673E-01 1.632E-01 1.589E-01 1.545E-01 1.499E-01 1.451E-01 1.402E-01 1.352E-01 1.301E-01 1.249E-01 1.196E-01 1.142E-01 1.087E-01 1.033E-01 9.775E-02 9.224E-02 8.674E-02 8.127E-02 7.585E-02 7.050E-02 6.523E-02 6.007E-02 5.503E-02 5.013E-02 4.539E-02 4.082E-02 3.644E-02 3.226E-02 2.830E-02 2.456E-02 2.107E-02 1.783E-02 1.484E-02 1.212E-02 9.678E-03 7.506E-03 5.613E-03 3.998E-03 2.662E-03 1.602E-03 8.144E-04 2.943E-04 3.466E-05 2.751E-05 2.633E-04 7.312E-04 1.419E-03 2.314E-03 3.402E-03 4.668E-03 6.096E-03 7.669E-03 9.370E-03 1.118E-02 1.309E-02 1.507E-02 1.710E-02 1.918E-02 2.127E-02 2.337E-02 2.545E-02 2.751E-02 2.951E-02 3.146E-02 3.333E-02 3.510E-02 3.678E-02 3.834E-02 3.977E-02 4.107E-02 4.223E-02 4.324E-02 4.410E-02 4.480E-02 4.534E-02 4.571E-02 4.592E-02 4.597E-02 4.585E-02 4.558E-02 4.516E-02 4.458E-02 4.386E-02 4.301E-02 4.203E-02 4.093E-02 3.972E-02 3.840E-02 3.700E-02 3.552E-02 3.396E-02 3.235E-02 3.069E-02 2.985E-02 3.153E-02 3.317E-02 3.476E-02 3.629E-02 3.774E-02 3.910E-02 4.037E-02 4.153E-02 4.257E-02 4.349E-02 4.427E-02 4.492E-02 4.541E-02 4.575E-02 4.594E-02 4.596E-02 4.582E-02 4.551E-02 4.504E-02 4.441E-02 4.361E-02 4.266E-02 4.155E-02 4.029E-02 3.890E-02 3.738E-02 3.573E-02 3.398E-02 3.213E-02 3.020E-02 2.820E-02 2.615E-02 2.406E-02 2.195E-02 1.984E-02 1.774E-02 1.567E-02 1.366E-02 1.171E-02 9.859E-03 8.111E-03 6.489E-03 5.010E-03 3.691E-03 2.550E-03 1.601E-03 8.593E-04 3.396E-04 5.426E-05 1.486E-05 2.316E-04 7.135E-04 1.468E-03 2.501E-03 3.816E-03 5.417E-03 7.304E-03 9.478E-03 1.194E-02 1.467E-02 1.769E-02 2.097E-02 2.451E-02 2.830E-02 3.232E-02 3.658E-02 4.104E-02 4.570E-02 5.055E-02 5.555E-02 6.071E-02 6.599E-02 7.139E-02 7.687E-02 8.243E-02 8.803E-02 9.367E-02 9.933E-02 1.050E-01 1.106E-01 1.162E-01 1.217E-01 1.272E-01 1.325E-01 1.378E-01 1.429E-01 1.479E-01 1.528E-01 1.575E-01 1.620E-01 1.663E-01 1.705E-01 1.745E-01 1.783E-01 1.820E-01 1.854E-01 1.886E-01 1.916E-01 1.945E-01 1.971E-01 1.996E-01 2.019E-01 2.040E-01 2.059E-01 2.077E-01 2.093E-01 2.107E-01 2.120E-01 2.132E-01 2.143E-01 2.152E-01 2.160E-01 2.167E-01 2.174E-01 2.179E-01 2.184E-01 2.188E-01 2.191E-01 2.194E-01 2.197E-01 2.199E-01 2.200E-01 2.201E-01 2.202E-01 2.203E-01 2.204E-01 2.204E-01 2.204E-01 2.204E-01 2.204E-01 2.203E-01 2.202E-01 2.201E-01 2.200E-01 2.199E-01 2.197E-01 2.194E-01 2.191E-01 2.188E-01 2.184E-01 2.179E-01 2.174E-01 2.167E-01 2.160E-01 2.152E-01 2.143E-01 2.132E-01 2.120E-01 2.107E-01 2.093E-01 2.077E-01 2.059E-01 2.040E-01 2.019E-01 1.996E-01 1.971E-01 1.945E-01 1.916E-01 1.886E-01 1.854E-01 1.820E-01 1.783E-01 1.745E-01 1.705E-01 1.663E-01 1.620E-01 1.575E-01 1.528E-01 1.479E-01 1.429E-01 1.378E-01 1.325E-01 1.272E-01 1.217E-01 1.162E-01 1.106E-01 1.050E-01 9.933E-02 9.367E-02 8.803E-02 8.243E-02 7.687E-02 7.139E-02 6.599E-02 6.071E-02 5.555E-02 5.055E-02 4.570E-02 4.104E-02 3.658E-02 3.232E-02 2.830E-02 2.451E-02 2.097E-02 1.769E-02 1.467E-02 1.194E-02 9.478E-03 7.304E-03 5.417E-03 3.816E-03 2.501E-03 1.468E-03 7.135E-04 2.316E-04 1.486E-05 5.426E-05 3.396E-04 8.593E-04 1.601E-03 2.550E-03 3.691E-03 5.010E-03 6.489E-03 8.111E-03 9.859E-03 1.171E-02 1.366E-02 1.567E-02 1.774E-02 1.984E-02 2.195E-02 2.406E-02 2.615E-02 2.820E-02 3.020E-02 3.213E-02 3.398E-02 3.573E-02 3.738E-02 3.890E-02 4.029E-02 4.155E-02 4.266E-02 4.361E-02 4.441E-02 4.504E-02 4.551E-02 4.582E-02 4.596E-02 4.594E-02 4.575E-02 4.541E-02 4.492E-02 4.427E-02 4.349E-02 4.257E-02 4.153E-02 4.037E-02 3.910E-02 3.774E-02 3.629E-02 3.476E-02 3.317E-02 3.153E-02 3.067E-02 3.235E-02 3.397E-02 3.553E-02 3.703E-02 3.844E-02 3.976E-02 4.098E-02 4.209E-02 4.307E-02 4.392E-02 4.463E-02 4.520E-02 4.562E-02 4.587E-02 4.597E-02 4.590E-02 4.567E-02 4.527E-02 4.470E-02 4.396E-02 4.307E-02 4.202E-02 4.082E-02 3.947E-02 3.799E-02 3.638E-02 3.466E-02 3.283E-02 3.092E-02 2.893E-02 2.688E-02 2.479E-02 2.267E-02 2.054E-02 1.842E-02 1.632E-02 1.428E-02 1.229E-02 1.040E-02 8.601E-03 6.928E-03 5.395E-03 4.020E-03 2.820E-03 1.813E-03 1.014E-03 4.364E-04 9.521E-05 2.384E-06 1.690E-04 6.046E-04 1.317E-03 2.314E-03 3.600E-03 5.178E-03 7.050E-03 9.215E-03 1.167E-02 1.442E-02 1.745E-02 2.076E-02 2.434E-02 2.817E-02 3.226E-02 3.658E-02 4.112E-02 4.586E-02 5.080E-02 5.591E-02 6.117E-02 6.657E-02 7.208E-02 7.769E-02 8.338E-02 8.912E-02 9.490E-02 1.007E-01 1.065E-01 1.122E-01 1.180E-01 1.236E-01 1.292E-01 1.347E-01 1.401E-01 1.453E-01 1.504E-01 1.554E-01 1.602E-01 1.648E-01 1.692E-01 1.735E-01 1.775E-01 1.814E-01 1.850E-01 1.884E-01 1.917E-01 1.947E-01 1.975E-01 2.001E-01 2.026E-01 2.048E-01 2.068E-01 2.087E-01 2.104E-01 2.119E-01 2.133E-01 2.145E-01 2.155E-01 2.165E-01 2.173E-01 2.180E-01 2.186E-01 2.191E-01 2.196E-01 2.199E-01 2.202E-01 2.204E-01 2.206E-01 2.208E-01 2.209E-01 2.210E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.210E-01 2.209E-01 2.208E-01 2.206E-01 2.204E-01 2.202E-01 2.199E-01 2.196E-01 2.191E-01 2.186E-01 2.180E-01 2.173E-01 2.165E-01 2.155E-01 2.145E-01 2.133E-01 2.119E-01 2.104E-01 2.087E-01 2.068E-01 2.048E-01 2.026E-01 2.001E-01 1.975E-01 1.947E-01 1.917E-01 1.884E-01 1.850E-01 1.814E-01 1.775E-01 1.735E-01 1.692E-01 1.648E-01 1.602E-01 1.554E-01 1.504E-01 1.453E-01 1.401E-01 1.347E-01 1.292E-01 1.236E-01 1.180E-01 1.122E-01 1.065E-01 1.007E-01 9.490E-02 8.912E-02 8.338E-02 7.769E-02 7.208E-02 6.657E-02 6.117E-02 5.591E-02 5.080E-02 4.586E-02 4.112E-02 3.658E-02 3.226E-02 2.817E-02 2.434E-02 2.076E-02 1.745E-02 1.442E-02 1.167E-02 9.215E-03 7.050E-03 5.178E-03 3.600E-03 2.314E-03 1.317E-03 6.046E-04 1.690E-04 2.384E-06 9.521E-05 4.364E-04 1.014E-03 1.813E-03 2.820E-03 4.020E-03 5.395E-03 6.928E-03 8.601E-03 1.040E-02 1.229E-02 1.428E-02 1.632E-02 1.842E-02 2.054E-02 2.267E-02 2.479E-02 2.688E-02 2.893E-02 3.092E-02 3.283E-02 3.466E-02 3.638E-02 3.799E-02 3.947E-02 4.082E-02 4.202E-02 4.307E-02 4.396E-02 4.470E-02 4.527E-02 4.567E-02 4.590E-02 4.597E-02 4.587E-02 4.562E-02 4.520E-02 4.463E-02 4.392E-02 4.307E-02 4.209E-02 4.098E-02 3.976E-02 3.844E-02 3.703E-02 3.553E-02 3.397E-02 3.235E-02 3.148E-02 3.314E-02 3.474E-02 3.628E-02 3.774E-02 3.912E-02 4.039E-02 4.156E-02 4.261E-02 4.353E-02 4.431E-02 4.495E-02 4.544E-02 4.578E-02 4.595E-02 4.595E-02 4.579E-02 4.547E-02 4.497E-02 4.430E-02 4.347E-02 4.248E-02 4.134E-02 4.004E-02 3.861E-02 3.704E-02 3.535E-02 3.355E-02 3.166E-02 2.969E-02 2.765E-02 2.555E-02 2.343E-02 2.128E-02 1.914E-02 1.702E-02 1.494E-02 1.292E-02 1.098E-02 9.139E-03 7.413E-03 5.824E-03 4.390E-03 3.130E-03 2.060E-03 1.197E-03 5.573E-04 1.541E-04 1.084E-06 1.101E-04 4.916E-04 1.155E-03 2.107E-03 3.353E-03 4.898E-03 6.745E-03 8.893E-03 1.134E-02 1.409E-02 1.713E-02 2.045E-02 2.406E-02 2.793E-02 3.206E-02 3.644E-02 4.104E-02 4.586E-02 5.088E-02 5.608E-02 6.144E-02 6.695E-02 7.258E-02 7.831E-02 8.412E-02 8.999E-02 9.590E-02 1.018E-01 1.078E-01 1.137E-01 1.195E-01 1.253E-01 1.310E-01 1.366E-01 1.421E-01 1.475E-01 1.527E-01 1.578E-01 1.626E-01 1.673E-01 1.718E-01 1.761E-01 1.802E-01 1.841E-01 1.878E-01 1.912E-01 1.945E-01 1.975E-01 2.003E-01 2.029E-01 2.052E-01 2.074E-01 2.094E-01 2.111E-01 2.127E-01 2.141E-01 2.154E-01 2.165E-01 2.174E-01 2.182E-01 2.189E-01 2.195E-01 2.200E-01 2.203E-01 2.206E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.210E-01 2.209E-01 2.209E-01 2.208E-01 2.208E-01 2.208E-01 2.208E-01 2.208E-01 2.209E-01 2.209E-01 2.210E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.206E-01 2.203E-01 2.200E-01 2.195E-01 2.189E-01 2.182E-01 2.174E-01 2.165E-01 2.154E-01 2.141E-01 2.127E-01 2.111E-01 2.094E-01 2.074E-01 2.052E-01 2.029E-01 2.003E-01 1.975E-01 1.945E-01 1.912E-01 1.878E-01 1.841E-01 1.802E-01 1.761E-01 1.718E-01 1.673E-01 1.626E-01 1.578E-01 1.527E-01 1.475E-01 1.421E-01 1.366E-01 1.310E-01 1.253E-01 1.195E-01 1.137E-01 1.078E-01 1.018E-01 9.590E-02 8.999E-02 8.412E-02 7.831E-02 7.258E-02 6.695E-02 6.144E-02 5.608E-02 5.088E-02 4.586E-02 4.104E-02 3.644E-02 3.206E-02 2.793E-02 2.406E-02 2.045E-02 1.713E-02 1.409E-02 1.134E-02 8.893E-03 6.745E-03 4.898E-03 3.353E-03 2.107E-03 1.155E-03 4.916E-04 1.101E-04 1.084E-06 1.541E-04 5.573E-04 1.197E-03 2.060E-03 3.130E-03 4.390E-03 5.824E-03 7.413E-03 9.139E-03 1.098E-02 1.292E-02 1.494E-02 1.702E-02 1.914E-02 2.128E-02 2.343E-02 2.555E-02 2.765E-02 2.969E-02 3.166E-02 3.355E-02 3.535E-02 3.704E-02 3.861E-02 4.004E-02 4.134E-02 4.248E-02 4.347E-02 4.430E-02 4.497E-02 4.547E-02 4.579E-02 4.595E-02 4.595E-02 4.578E-02 4.544E-02 4.495E-02 4.431E-02 4.353E-02 4.261E-02 4.156E-02 4.039E-02 3.912E-02 3.774E-02 3.628E-02 3.474E-02 3.314E-02 3.227E-02 3.391E-02 3.549E-02 3.700E-02 3.843E-02 3.976E-02 4.099E-02 4.210E-02 4.309E-02 4.394E-02 4.466E-02 4.523E-02 4.564E-02 4.589E-02 4.597E-02 4.589E-02 4.564E-02 4.521E-02 4.462E-02 4.386E-02 4.294E-02 4.185E-02 4.061E-02 3.923E-02 3.771E-02 3.606E-02 3.429E-02 3.243E-02 3.047E-02 2.844E-02 2.635E-02 2.423E-02 2.207E-02 1.991E-02 1.777E-02 1.566E-02 1.360E-02 1.162E-02 9.726E-03 7.947E-03 6.300E-03 4.805E-03 3.481E-03 2.345E-03 1.414E-03 7.061E-04 2.350E-04 1.518E-05 5.944E-05 3.791E-04 9.839E-04 1.882E-03 3.080E-03 4.583E-03 6.394E-03 8.514E-03 1.094E-02 1.368E-02 1.671E-02 2.005E-02 2.367E-02 2.757E-02 3.173E-02 3.616E-02 4.082E-02 4.570E-02 5.080E-02 5.608E-02 6.154E-02 6.714E-02 7.288E-02 7.872E-02 8.465E-02 9.065E-02 9.668E-02 1.027E-01 1.088E-01 1.148E-01 1.208E-01 1.267E-01 1.326E-01 1.383E-01 1.439E-01 1.494E-01 1.547E-01 1.599E-01 1.648E-01 1.696E-01 1.742E-01 1.786E-01 1.827E-01 1.866E-01 1.903E-01 1.938E-01 1.970E-01 2.000E-01 2.027E-01 2.053E-01 2.076E-01 2.097E-01 2.116E-01 2.132E-01 2.147E-01 2.160E-01 2.171E-01 2.181E-01 2.189E-01 2.195E-01 2.201E-01 2.205E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.207E-01 2.205E-01 2.203E-01 2.201E-01 2.200E-01 2.198E-01 2.197E-01 2.196E-01 2.195E-01 2.195E-01 2.195E-01 2.195E-01 2.195E-01 2.196E-01 2.197E-01 2.198E-01 2.200E-01 2.201E-01 2.203E-01 2.205E-01 2.207E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.205E-01 2.201E-01 2.195E-01 2.189E-01 2.181E-01 2.171E-01 2.160E-01 2.147E-01 2.132E-01 2.116E-01 2.097E-01 2.076E-01 2.053E-01 2.027E-01 2.000E-01 1.970E-01 1.938E-01 1.903E-01 1.866E-01 1.827E-01 1.786E-01 1.742E-01 1.696E-01 1.648E-01 1.599E-01 1.547E-01 1.494E-01 1.439E-01 1.383E-01 1.326E-01 1.267E-01 1.208E-01 1.148E-01 1.088E-01 1.027E-01 9.668E-02 9.065E-02 8.465E-02 7.872E-02 7.288E-02 6.714E-02 6.154E-02 5.608E-02 5.080E-02 4.570E-02 4.082E-02 3.616E-02 3.173E-02 2.757E-02 2.367E-02 2.005E-02 1.671E-02 1.368E-02 1.094E-02 8.514E-03 6.394E-03 4.583E-03 3.080E-03 1.882E-03 9.839E-04 3.791E-04 5.944E-05 1.518E-05 2.350E-04 7.061E-04 1.414E-03 2.345E-03 3.481E-03 4.805E-03 6.300E-03 7.947E-03 9.726E-03 1.162E-02 1.360E-02 1.566E-02 1.777E-02 1.991E-02 2.207E-02 2.423E-02 2.635E-02 2.844E-02 3.047E-02 3.243E-02 3.429E-02 3.606E-02 3.771E-02 3.923E-02 4.061E-02 4.185E-02 4.294E-02 4.386E-02 4.462E-02 4.521E-02 4.564E-02 4.589E-02 4.597E-02 4.589E-02 4.564E-02 4.523E-02 4.466E-02 4.394E-02 4.309E-02 4.210E-02 4.099E-02 3.976E-02 3.843E-02 3.700E-02 3.549E-02 3.391E-02 3.304E-02 3.466E-02 3.622E-02 3.769E-02 3.908E-02 4.037E-02 4.154E-02 4.260E-02 4.353E-02 4.432E-02 4.496E-02 4.545E-02 4.578E-02 4.595E-02 4.595E-02 4.578E-02 4.543E-02 4.492E-02 4.423E-02 4.337E-02 4.236E-02 4.118E-02 3.985E-02 3.838E-02 3.678E-02 3.505E-02 3.321E-02 3.128E-02 2.927E-02 2.719E-02 2.506E-02 2.290E-02 2.073E-02 1.856E-02 1.643E-02 1.433E-02 1.230E-02 1.036E-02 8.532E-03 6.826E-03 5.268E-03 3.877E-03 2.671E-03 1.668E-03 8.868E-04 3.421E-04 4.919E-05 2.164E-05 2.717E-04 8.101E-04 1.646E-03 2.786E-03 4.237E-03 6.003E-03 8.084E-03 1.048E-02 1.319E-02 1.622E-02 1.955E-02 2.317E-02 2.709E-02 3.128E-02 3.574E-02 4.044E-02 4.539E-02 5.055E-02 5.591E-02 6.144E-02 6.714E-02 7.298E-02 7.893E-02 8.497E-02 9.108E-02 9.724E-02 1.034E-01 1.096E-01 1.158E-01 1.219E-01 1.279E-01 1.339E-01 1.398E-01 1.455E-01 1.511E-01 1.565E-01 1.618E-01 1.668E-01 1.717E-01 1.763E-01 1.807E-01 1.849E-01 1.889E-01 1.926E-01 1.960E-01 1.992E-01 2.022E-01 2.049E-01 2.074E-01 2.096E-01 2.116E-01 2.134E-01 2.150E-01 2.164E-01 2.175E-01 2.185E-01 2.193E-01 2.200E-01 2.204E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.209E-01 2.207E-01 2.205E-01 2.202E-01 2.198E-01 2.195E-01 2.192E-01 2.188E-01 2.185E-01 2.182E-01 2.179E-01 2.176E-01 2.174E-01 2.173E-01 2.171E-01 2.171E-01 2.171E-01 2.171E-01 2.171E-01 2.173E-01 2.174E-01 2.176E-01 2.179E-01 2.182E-01 2.185E-01 2.188E-01 2.192E-01 2.195E-01 2.198E-01 2.202E-01 2.205E-01 2.207E-01 2.209E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.204E-01 2.200E-01 2.193E-01 2.185E-01 2.175E-01 2.164E-01 2.150E-01 2.134E-01 2.116E-01 2.096E-01 2.074E-01 2.049E-01 2.022E-01 1.992E-01 1.960E-01 1.926E-01 1.889E-01 1.849E-01 1.807E-01 1.763E-01 1.717E-01 1.668E-01 1.618E-01 1.565E-01 1.511E-01 1.455E-01 1.398E-01 1.339E-01 1.279E-01 1.219E-01 1.158E-01 1.096E-01 1.034E-01 9.724E-02 9.108E-02 8.497E-02 7.893E-02 7.298E-02 6.714E-02 6.144E-02 5.591E-02 5.055E-02 4.539E-02 4.044E-02 3.574E-02 3.128E-02 2.709E-02 2.317E-02 1.955E-02 1.622E-02 1.319E-02 1.048E-02 8.084E-03 6.003E-03 4.237E-03 2.786E-03 1.646E-03 8.101E-04 2.717E-04 2.164E-05 4.919E-05 3.421E-04 8.868E-04 1.668E-03 2.671E-03 3.877E-03 5.268E-03 6.826E-03 8.532E-03 1.036E-02 1.230E-02 1.433E-02 1.643E-02 1.856E-02 2.073E-02 2.290E-02 2.506E-02 2.719E-02 2.927E-02 3.128E-02 3.321E-02 3.505E-02 3.678E-02 3.838E-02 3.985E-02 4.118E-02 4.236E-02 4.337E-02 4.423E-02 4.492E-02 4.543E-02 4.578E-02 4.595E-02 4.595E-02 4.578E-02 4.545E-02 4.496E-02 4.432E-02 4.353E-02 4.260E-02 4.154E-02 4.037E-02 3.908E-02 3.769E-02 3.622E-02 3.466E-02 3.379E-02 3.539E-02 3.691E-02 3.835E-02 3.970E-02 4.094E-02 4.207E-02 4.307E-02 4.393E-02 4.466E-02 4.523E-02 4.564E-02 4.589E-02 4.597E-02 4.588E-02 4.562E-02 4.518E-02 4.458E-02 4.379E-02 4.285E-02 4.174E-02 4.047E-02 3.905E-02 3.750E-02 3.582E-02 3.402E-02 3.211E-02 3.012E-02 2.806E-02 2.593E-02 2.377E-02 2.159E-02 1.940E-02 1.724E-02 1.511E-02 1.304E-02 1.106E-02 9.169E-03 7.403E-03 5.780E-03 4.320E-03 3.041E-03 1.963E-03 1.104E-03 4.801E-04 1.079E-04 1.764E-06 1.748E-04 6.386E-04 1.403E-03 2.477E-03 3.866E-03 5.576E-03 7.608E-03 9.965E-03 1.264E-02 1.564E-02 1.896E-02 2.258E-02 2.650E-02 3.070E-02 3.518E-02 3.993E-02 4.491E-02 5.013E-02 5.555E-02 6.117E-02 6.695E-02 7.288E-02 7.893E-02 8.508E-02 9.130E-02 9.758E-02 1.039E-01 1.102E-01 1.165E-01 1.227E-01 1.289E-01 1.350E-01 1.410E-01 1.468E-01 1.525E-01 1.580E-01 1.634E-01 1.685E-01 1.735E-01 1.782E-01 1.826E-01 1.869E-01 1.908E-01 1.946E-01 1.980E-01 2.012E-01 2.042E-01 2.068E-01 2.093E-01 2.114E-01 2.133E-01 2.150E-01 2.165E-01 2.177E-01 2.187E-01 2.196E-01 2.202E-01 2.207E-01 2.210E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.206E-01 2.202E-01 2.198E-01 2.193E-01 2.188E-01 2.182E-01 2.177E-01 2.171E-01 2.166E-01 2.161E-01 2.156E-01 2.152E-01 2.148E-01 2.144E-01 2.141E-01 2.139E-01 2.137E-01 2.136E-01 2.136E-01 2.136E-01 2.137E-01 2.139E-01 2.141E-01 2.144E-01 2.148E-01 2.152E-01 2.156E-01 2.161E-01 2.166E-01 2.171E-01 2.177E-01 2.182E-01 2.188E-01 2.193E-01 2.198E-01 2.202E-01 2.206E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.210E-01 2.207E-01 2.202E-01 2.196E-01 2.187E-01 2.177E-01 2.165E-01 2.150E-01 2.133E-01 2.114E-01 2.093E-01 2.068E-01 2.042E-01 2.012E-01 1.980E-01 1.946E-01 1.908E-01 1.869E-01 1.826E-01 1.782E-01 1.735E-01 1.685E-01 1.634E-01 1.580E-01 1.525E-01 1.468E-01 1.410E-01 1.350E-01 1.289E-01 1.227E-01 1.165E-01 1.102E-01 1.039E-01 9.758E-02 9.130E-02 8.508E-02 7.893E-02 7.288E-02 6.695E-02 6.117E-02 5.555E-02 5.013E-02 4.491E-02 3.993E-02 3.518E-02 3.070E-02 2.650E-02 2.258E-02 1.896E-02 1.564E-02 1.264E-02 9.965E-03 7.608E-03 5.576E-03 3.866E-03 2.477E-03 1.403E-03 6.386E-04 1.748E-04 1.764E-06 1.079E-04 4.801E-04 1.104E-03 1.963E-03 3.041E-03 4.320E-03 5.780E-03 7.403E-03 9.169E-03 1.106E-02 1.304E-02 1.511E-02 1.724E-02 1.940E-02 2.159E-02 2.377E-02 2.593E-02 2.806E-02 3.012E-02 3.211E-02 3.402E-02 3.582E-02 3.750E-02 3.905E-02 4.047E-02 4.174E-02 4.285E-02 4.379E-02 4.458E-02 4.518E-02 4.562E-02 4.588E-02 4.597E-02 4.589E-02 4.564E-02 4.523E-02 4.466E-02 4.393E-02 4.307E-02 4.207E-02 4.094E-02 3.970E-02 3.835E-02 3.691E-02 3.539E-02 3.452E-02 3.609E-02 3.758E-02 3.899E-02 4.029E-02 4.148E-02 4.256E-02 4.350E-02 4.430E-02 4.495E-02 4.545E-02 4.578E-02 4.595E-02 4.595E-02 4.577E-02 4.542E-02 4.489E-02 4.419E-02 4.332E-02 4.228E-02 4.108E-02 3.973E-02 3.823E-02 3.659E-02 3.483E-02 3.296E-02 3.100E-02 2.895E-02 2.684E-02 2.468E-02 2.249E-02 2.029E-02 1.810E-02 1.594E-02 1.383E-02 1.180E-02 9.859E-03 8.034E-03 6.345E-03 4.814E-03 3.459E-03 2.302E-03 1.361E-03 6.535E-04 1.963E-04 5.093E-06 9.381E-05 4.751E-04 1.160E-03 2.157E-03 3.475E-03 5.119E-03 7.092E-03 9.396E-03 1.203E-02 1.499E-02 1.828E-02 2.188E-02 2.579E-02 3.000E-02 3.450E-02 3.927E-02 4.429E-02 4.955E-02 5.503E-02 6.071E-02 6.657E-02 7.258E-02 7.872E-02 8.497E-02 9.130E-02 9.769E-02 1.041E-01 1.105E-01 1.170E-01 1.233E-01 1.296E-01 1.358E-01 1.419E-01 1.479E-01 1.537E-01 1.593E-01 1.648E-01 1.700E-01 1.750E-01 1.798E-01 1.843E-01 1.886E-01 1.926E-01 1.963E-01 1.998E-01 2.030E-01 2.059E-01 2.085E-01 2.109E-01 2.130E-01 2.148E-01 2.164E-01 2.177E-01 2.188E-01 2.197E-01 2.203E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.209E-01 2.206E-01 2.201E-01 2.196E-01 2.190E-01 2.183E-01 2.176E-01 2.169E-01 2.161E-01 2.153E-01 2.145E-01 2.138E-01 2.130E-01 2.124E-01 2.117E-01 2.111E-01 2.106E-01 2.101E-01 2.097E-01 2.094E-01 2.092E-01 2.091E-01 2.090E-01 2.091E-01 2.092E-01 2.094E-01 2.097E-01 2.101E-01 2.106E-01 2.111E-01 2.117E-01 2.124E-01 2.130E-01 2.138E-01 2.145E-01 2.153E-01 2.161E-01 2.169E-01 2.176E-01 2.183E-01 2.190E-01 2.196E-01 2.201E-01 2.206E-01 2.209E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.203E-01 2.197E-01 2.188E-01 2.177E-01 2.164E-01 2.148E-01 2.130E-01 2.109E-01 2.085E-01 2.059E-01 2.030E-01 1.998E-01 1.963E-01 1.926E-01 1.886E-01 1.843E-01 1.798E-01 1.750E-01 1.700E-01 1.648E-01 1.593E-01 1.537E-01 1.479E-01 1.419E-01 1.358E-01 1.296E-01 1.233E-01 1.170E-01 1.105E-01 1.041E-01 9.769E-02 9.130E-02 8.497E-02 7.872E-02 7.258E-02 6.657E-02 6.071E-02 5.503E-02 4.955E-02 4.429E-02 3.927E-02 3.450E-02 3.000E-02 2.579E-02 2.188E-02 1.828E-02 1.499E-02 1.203E-02 9.396E-03 7.092E-03 5.119E-03 3.475E-03 2.157E-03 1.160E-03 4.751E-04 9.381E-05 5.093E-06 1.963E-04 6.535E-04 1.361E-03 2.302E-03 3.459E-03 4.814E-03 6.345E-03 8.034E-03 9.859E-03 1.180E-02 1.383E-02 1.594E-02 1.810E-02 2.029E-02 2.249E-02 2.468E-02 2.684E-02 2.895E-02 3.100E-02 3.296E-02 3.483E-02 3.659E-02 3.823E-02 3.973E-02 4.108E-02 4.228E-02 4.332E-02 4.419E-02 4.489E-02 4.542E-02 4.577E-02 4.595E-02 4.595E-02 4.578E-02 4.545E-02 4.495E-02 4.430E-02 4.350E-02 4.256E-02 4.148E-02 4.029E-02 3.899E-02 3.758E-02 3.609E-02 3.522E-02 3.676E-02 3.822E-02 3.959E-02 4.085E-02 4.199E-02 4.301E-02 4.389E-02 4.463E-02 4.521E-02 4.563E-02 4.589E-02 4.597E-02 4.588E-02 4.562E-02 4.518E-02 4.456E-02 4.377E-02 4.280E-02 4.168E-02 4.039E-02 3.895E-02 3.737E-02 3.566E-02 3.383E-02 3.189E-02 2.987E-02 2.777E-02 2.562E-02 2.343E-02 2.122E-02 1.901E-02 1.682E-02 1.468E-02 1.260E-02 1.060E-02 8.719E-03 6.964E-03 5.361E-03 3.929E-03 2.690E-03 1.663E-03 8.671E-04 3.197E-04 3.715E-05 3.466E-05 3.258E-04 9.224E-04 1.835E-03 3.071E-03 4.639E-03 6.541E-03 8.782E-03 1.136E-02 1.427E-02 1.752E-02 2.110E-02 2.499E-02 2.919E-02 3.369E-02 3.847E-02 4.351E-02 4.881E-02 5.433E-02 6.007E-02 6.599E-02 7.208E-02 7.831E-02 8.465E-02 9.108E-02 9.758E-02 1.041E-01 1.107E-01 1.172E-01 1.237E-01 1.301E-01 1.364E-01 1.427E-01 1.487E-01 1.547E-01 1.604E-01 1.659E-01 1.713E-01 1.764E-01 1.812E-01 1.858E-01 1.901E-01 1.941E-01 1.979E-01 2.014E-01 2.045E-01 2.074E-01 2.100E-01 2.123E-01 2.143E-01 2.160E-01 2.175E-01 2.187E-01 2.196E-01 2.203E-01 2.208E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.203E-01 2.198E-01 2.191E-01 2.183E-01 2.174E-01 2.165E-01 2.155E-01 2.145E-01 2.135E-01 2.124E-01 2.114E-01 2.104E-01 2.094E-01 2.085E-01 2.076E-01 2.068E-01 2.060E-01 2.054E-01 2.048E-01 2.043E-01 2.040E-01 2.037E-01 2.035E-01 2.035E-01 2.035E-01 2.037E-01 2.040E-01 2.043E-01 2.048E-01 2.054E-01 2.060E-01 2.068E-01 2.076E-01 2.085E-01 2.094E-01 2.104E-01 2.114E-01 2.124E-01 2.135E-01 2.145E-01 2.155E-01 2.165E-01 2.174E-01 2.183E-01 2.191E-01 2.198E-01 2.203E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.208E-01 2.203E-01 2.196E-01 2.187E-01 2.175E-01 2.160E-01 2.143E-01 2.123E-01 2.100E-01 2.074E-01 2.045E-01 2.014E-01 1.979E-01 1.941E-01 1.901E-01 1.858E-01 1.812E-01 1.764E-01 1.713E-01 1.659E-01 1.604E-01 1.547E-01 1.487E-01 1.427E-01 1.364E-01 1.301E-01 1.237E-01 1.172E-01 1.107E-01 1.041E-01 9.758E-02 9.108E-02 8.465E-02 7.831E-02 7.208E-02 6.599E-02 6.007E-02 5.433E-02 4.881E-02 4.351E-02 3.847E-02 3.369E-02 2.919E-02 2.499E-02 2.110E-02 1.752E-02 1.427E-02 1.136E-02 8.782E-03 6.541E-03 4.639E-03 3.071E-03 1.835E-03 9.224E-04 3.258E-04 3.466E-05 3.715E-05 3.197E-04 8.671E-04 1.663E-03 2.690E-03 3.929E-03 5.361E-03 6.964E-03 8.719E-03 1.060E-02 1.260E-02 1.468E-02 1.682E-02 1.901E-02 2.122E-02 2.343E-02 2.562E-02 2.777E-02 2.987E-02 3.189E-02 3.383E-02 3.566E-02 3.737E-02 3.895E-02 4.039E-02 4.168E-02 4.280E-02 4.377E-02 4.456E-02 4.518E-02 4.562E-02 4.588E-02 4.597E-02 4.589E-02 4.563E-02 4.521E-02 4.463E-02 4.389E-02 4.301E-02 4.199E-02 4.085E-02 3.959E-02 3.822E-02 3.676E-02 3.590E-02 3.741E-02 3.884E-02 4.016E-02 4.138E-02 4.247E-02 4.343E-02 4.425E-02 4.492E-02 4.543E-02 4.577E-02 4.595E-02 4.595E-02 4.578E-02 4.543E-02 4.489E-02 4.419E-02 4.331E-02 4.225E-02 4.104E-02 3.967E-02 3.814E-02 3.649E-02 3.470E-02 3.280E-02 3.081E-02 2.873E-02 2.659E-02 2.440E-02 2.218E-02 1.996E-02 1.775E-02 1.557E-02 1.345E-02 1.140E-02 9.461E-03 7.640E-03 5.964E-03 4.453E-03 3.130E-03 2.014E-03 1.126E-03 4.831E-04 1.036E-04 3.357E-06 1.969E-04 6.974E-04 1.516E-03 2.662E-03 4.143E-03 5.964E-03 8.130E-03 1.064E-02 1.350E-02 1.669E-02 2.022E-02 2.408E-02 2.826E-02 3.275E-02 3.753E-02 4.259E-02 4.791E-02 5.347E-02 5.925E-02 6.523E-02 7.139E-02 7.769E-02 8.412E-02 9.065E-02 9.724E-02 1.039E-01 1.105E-01 1.172E-01 1.238E-01 1.304E-01 1.368E-01 1.431E-01 1.493E-01 1.554E-01 1.612E-01 1.669E-01 1.723E-01 1.775E-01 1.824E-01 1.870E-01 1.914E-01 1.955E-01 1.992E-01 2.027E-01 2.058E-01 2.087E-01 2.112E-01 2.135E-01 2.154E-01 2.170E-01 2.184E-01 2.194E-01 2.202E-01 2.208E-01 2.211E-01 2.211E-01 2.210E-01 2.207E-01 2.202E-01 2.195E-01 2.187E-01 2.177E-01 2.167E-01 2.155E-01 2.143E-01 2.130E-01 2.117E-01 2.104E-01 2.091E-01 2.078E-01 2.065E-01 2.052E-01 2.040E-01 2.029E-01 2.018E-01 2.008E-01 2.000E-01 1.992E-01 1.985E-01 1.979E-01 1.975E-01 1.972E-01 1.970E-01 1.969E-01 1.970E-01 1.972E-01 1.975E-01 1.979E-01 1.985E-01 1.992E-01 2.000E-01 2.008E-01 2.018E-01 2.029E-01 2.040E-01 2.052E-01 2.065E-01 2.078E-01 2.091E-01 2.104E-01 2.117E-01 2.130E-01 2.143E-01 2.155E-01 2.167E-01 2.177E-01 2.187E-01 2.195E-01 2.202E-01 2.207E-01 2.210E-01 2.211E-01 2.211E-01 2.208E-01 2.202E-01 2.194E-01 2.184E-01 2.170E-01 2.154E-01 2.135E-01 2.112E-01 2.087E-01 2.058E-01 2.027E-01 1.992E-01 1.955E-01 1.914E-01 1.870E-01 1.824E-01 1.775E-01 1.723E-01 1.669E-01 1.612E-01 1.554E-01 1.493E-01 1.431E-01 1.368E-01 1.304E-01 1.238E-01 1.172E-01 1.105E-01 1.039E-01 9.724E-02 9.065E-02 8.412E-02 7.769E-02 7.139E-02 6.523E-02 5.925E-02 5.347E-02 4.791E-02 4.259E-02 3.753E-02 3.275E-02 2.826E-02 2.408E-02 2.022E-02 1.669E-02 1.350E-02 1.064E-02 8.130E-03 5.964E-03 4.143E-03 2.662E-03 1.516E-03 6.974E-04 1.969E-04 3.357E-06 1.036E-04 4.831E-04 1.126E-03 2.014E-03 3.130E-03 4.453E-03 5.964E-03 7.640E-03 9.461E-03 1.140E-02 1.345E-02 1.557E-02 1.775E-02 1.996E-02 2.218E-02 2.440E-02 2.659E-02 2.873E-02 3.081E-02 3.280E-02 3.470E-02 3.649E-02 3.814E-02 3.967E-02 4.104E-02 4.225E-02 4.331E-02 4.419E-02 4.489E-02 4.543E-02 4.578E-02 4.595E-02 4.595E-02 4.577E-02 4.543E-02 4.492E-02 4.425E-02 4.343E-02 4.247E-02 4.138E-02 4.016E-02 3.884E-02 3.741E-02 3.656E-02 3.804E-02 3.943E-02 4.071E-02 4.187E-02 4.291E-02 4.381E-02 4.457E-02 4.517E-02 4.561E-02 4.587E-02 4.597E-02 4.589E-02 4.563E-02 4.519E-02 4.458E-02 4.378E-02 4.281E-02 4.167E-02 4.037E-02 3.891E-02 3.731E-02 3.558E-02 3.373E-02 3.177E-02 2.972E-02 2.759E-02 2.541E-02 2.319E-02 2.096E-02 1.872E-02 1.652E-02 1.435E-02 1.226E-02 1.026E-02 8.375E-03 6.625E-03 5.035E-03 3.625E-03 2.418E-03 1.434E-03 6.919E-04 2.102E-04 6.105E-06 9.524E-05 4.916E-04 1.208E-03 2.254E-03 3.639E-03 5.369E-03 7.448E-03 9.880E-03 1.266E-02 1.580E-02 1.927E-02 2.309E-02 2.724E-02 3.170E-02 3.647E-02 4.153E-02 4.686E-02 5.244E-02 5.826E-02 6.429E-02 7.050E-02 7.687E-02 8.338E-02 8.999E-02 9.668E-02 1.034E-01 1.102E-01 1.170E-01 1.237E-01 1.304E-01 1.369E-01 1.434E-01 1.497E-01 1.559E-01 1.618E-01 1.676E-01 1.731E-01 1.783E-01 1.833E-01 1.880E-01 1.925E-01 1.966E-01 2.004E-01 2.038E-01 2.070E-01 2.098E-01 2.123E-01 2.145E-01 2.163E-01 2.179E-01 2.191E-01 2.200E-01 2.207E-01 2.210E-01 2.211E-01 2.210E-01 2.207E-01 2.201E-01 2.193E-01 2.184E-01 2.173E-01 2.161E-01 2.148E-01 2.133E-01 2.118E-01 2.103E-01 2.086E-01 2.070E-01 2.054E-01 2.038E-01 2.022E-01 2.006E-01 1.991E-01 1.977E-01 1.963E-01 1.951E-01 1.940E-01 1.929E-01 1.920E-01 1.912E-01 1.906E-01 1.901E-01 1.897E-01 1.895E-01 1.894E-01 1.895E-01 1.897E-01 1.901E-01 1.906E-01 1.912E-01 1.920E-01 1.929E-01 1.940E-01 1.951E-01 1.963E-01 1.977E-01 1.991E-01 2.006E-01 2.022E-01 2.038E-01 2.054E-01 2.070E-01 2.086E-01 2.103E-01 2.118E-01 2.133E-01 2.148E-01 2.161E-01 2.173E-01 2.184E-01 2.193E-01 2.201E-01 2.207E-01 2.210E-01 2.211E-01 2.210E-01 2.207E-01 2.200E-01 2.191E-01 2.179E-01 2.163E-01 2.145E-01 2.123E-01 2.098E-01 2.070E-01 2.038E-01 2.004E-01 1.966E-01 1.925E-01 1.880E-01 1.833E-01 1.783E-01 1.731E-01 1.676E-01 1.618E-01 1.559E-01 1.497E-01 1.434E-01 1.369E-01 1.304E-01 1.237E-01 1.170E-01 1.102E-01 1.034E-01 9.668E-02 8.999E-02 8.338E-02 7.687E-02 7.050E-02 6.429E-02 5.826E-02 5.244E-02 4.686E-02 4.153E-02 3.647E-02 3.170E-02 2.724E-02 2.309E-02 1.927E-02 1.580E-02 1.266E-02 9.880E-03 7.448E-03 5.369E-03 3.639E-03 2.254E-03 1.208E-03 4.916E-04 9.524E-05 6.105E-06 2.102E-04 6.919E-04 1.434E-03 2.418E-03 3.625E-03 5.035E-03 6.625E-03 8.375E-03 1.026E-02 1.226E-02 1.435E-02 1.652E-02 1.872E-02 2.096E-02 2.319E-02 2.541E-02 2.759E-02 2.972E-02 3.177E-02 3.373E-02 3.558E-02 3.731E-02 3.891E-02 4.037E-02 4.167E-02 4.281E-02 4.378E-02 4.458E-02 4.519E-02 4.563E-02 4.589E-02 4.597E-02 4.587E-02 4.561E-02 4.517E-02 4.457E-02 4.381E-02 4.291E-02 4.187E-02 4.071E-02 3.943E-02 3.804E-02 3.719E-02 3.864E-02 3.999E-02 4.122E-02 4.234E-02 4.332E-02 4.416E-02 4.485E-02 4.538E-02 4.575E-02 4.594E-02 4.596E-02 4.579E-02 4.545E-02 4.492E-02 4.422E-02 4.334E-02 4.228E-02 4.106E-02 3.967E-02 3.814E-02 3.646E-02 3.466E-02 3.274E-02 3.072E-02 2.862E-02 2.645E-02 2.424E-02 2.199E-02 1.974E-02 1.751E-02 1.531E-02 1.317E-02 1.112E-02 9.169E-03 7.347E-03 5.677E-03 4.180E-03 2.880E-03 1.797E-03 9.513E-04 3.627E-04 4.919E-05 2.738E-05 3.124E-04 9.178E-04 1.855E-03 3.134E-03 4.762E-03 6.745E-03 9.086E-03 1.179E-02 1.484E-02 1.825E-02 2.201E-02 2.611E-02 3.054E-02 3.529E-02 4.033E-02 4.566E-02 5.126E-02 5.710E-02 6.316E-02 6.942E-02 7.585E-02 8.243E-02 8.912E-02 9.590E-02 1.027E-01 1.096E-01 1.165E-01 1.233E-01 1.301E-01 1.368E-01 1.434E-01 1.498E-01 1.561E-01 1.622E-01 1.680E-01 1.736E-01 1.790E-01 1.841E-01 1.889E-01 1.933E-01 1.975E-01 2.013E-01 2.048E-01 2.079E-01 2.107E-01 2.132E-01 2.153E-01 2.171E-01 2.185E-01 2.196E-01 2.204E-01 2.209E-01 2.211E-01 2.211E-01 2.207E-01 2.202E-01 2.194E-01 2.183E-01 2.171E-01 2.158E-01 2.143E-01 2.126E-01 2.109E-01 2.091E-01 2.072E-01 2.053E-01 2.033E-01 2.014E-01 1.994E-01 1.975E-01 1.956E-01 1.938E-01 1.921E-01 1.904E-01 1.889E-01 1.875E-01 1.861E-01 1.850E-01 1.839E-01 1.830E-01 1.823E-01 1.817E-01 1.813E-01 1.811E-01 1.810E-01 1.811E-01 1.813E-01 1.817E-01 1.823E-01 1.830E-01 1.839E-01 1.850E-01 1.861E-01 1.875E-01 1.889E-01 1.904E-01 1.921E-01 1.938E-01 1.956E-01 1.975E-01 1.994E-01 2.014E-01 2.033E-01 2.053E-01 2.072E-01 2.091E-01 2.109E-01 2.126E-01 2.143E-01 2.158E-01 2.171E-01 2.183E-01 2.194E-01 2.202E-01 2.207E-01 2.211E-01 2.211E-01 2.209E-01 2.204E-01 2.196E-01 2.185E-01 2.171E-01 2.153E-01 2.132E-01 2.107E-01 2.079E-01 2.048E-01 2.013E-01 1.975E-01 1.933E-01 1.889E-01 1.841E-01 1.790E-01 1.736E-01 1.680E-01 1.622E-01 1.561E-01 1.498E-01 1.434E-01 1.368E-01 1.301E-01 1.233E-01 1.165E-01 1.096E-01 1.027E-01 9.590E-02 8.912E-02 8.243E-02 7.585E-02 6.942E-02 6.316E-02 5.710E-02 5.126E-02 4.566E-02 4.033E-02 3.529E-02 3.054E-02 2.611E-02 2.201E-02 1.825E-02 1.484E-02 1.179E-02 9.086E-03 6.745E-03 4.762E-03 3.134E-03 1.855E-03 9.178E-04 3.124E-04 2.738E-05 4.919E-05 3.627E-04 9.513E-04 1.797E-03 2.880E-03 4.180E-03 5.677E-03 7.347E-03 9.169E-03 1.112E-02 1.317E-02 1.531E-02 1.751E-02 1.974E-02 2.199E-02 2.424E-02 2.645E-02 2.862E-02 3.072E-02 3.274E-02 3.466E-02 3.646E-02 3.814E-02 3.967E-02 4.106E-02 4.228E-02 4.334E-02 4.422E-02 4.492E-02 4.545E-02 4.579E-02 4.596E-02 4.594E-02 4.575E-02 4.538E-02 4.485E-02 4.416E-02 4.332E-02 4.234E-02 4.122E-02 3.999E-02 3.864E-02 3.779E-02 3.921E-02 4.052E-02 4.171E-02 4.277E-02 4.370E-02 4.448E-02 4.510E-02 4.556E-02 4.585E-02 4.597E-02 4.591E-02 4.566E-02 4.523E-02 4.462E-02 4.383E-02 4.286E-02 4.172E-02 4.041E-02 3.895E-02 3.734E-02 3.559E-02 3.372E-02 3.174E-02 2.967E-02 2.752E-02 2.531E-02 2.307E-02 2.081E-02 1.855E-02 1.632E-02 1.414E-02 1.204E-02 1.002E-02 8.131E-03 6.381E-03 4.797E-03 3.402E-03 2.218E-03 1.266E-03 5.669E-04 1.389E-04 2.162E-07 1.670E-04 6.540E-04 1.474E-03 2.637E-03 4.153E-03 6.028E-03 8.267E-03 1.087E-02 1.384E-02 1.717E-02 2.086E-02 2.490E-02 2.928E-02 3.399E-02 3.901E-02 4.433E-02 4.992E-02 5.577E-02 6.186E-02 6.815E-02 7.463E-02 8.127E-02 8.803E-02 9.490E-02 1.018E-01 1.088E-01 1.158E-01 1.227E-01 1.296E-01 1.364E-01 1.431E-01 1.497E-01 1.561E-01 1.623E-01 1.682E-01 1.740E-01 1.794E-01 1.846E-01 1.895E-01 1.940E-01 1.982E-01 2.021E-01 2.056E-01 2.087E-01 2.115E-01 2.139E-01 2.160E-01 2.177E-01 2.191E-01 2.201E-01 2.207E-01 2.211E-01 2.211E-01 2.209E-01 2.203E-01 2.195E-01 2.185E-01 2.172E-01 2.158E-01 2.141E-01 2.123E-01 2.104E-01 2.083E-01 2.062E-01 2.040E-01 2.017E-01 1.994E-01 1.971E-01 1.948E-01 1.926E-01 1.904E-01 1.882E-01 1.861E-01 1.842E-01 1.823E-01 1.806E-01 1.790E-01 1.775E-01 1.762E-01 1.750E-01 1.740E-01 1.732E-01 1.726E-01 1.721E-01 1.718E-01 1.717E-01 1.718E-01 1.721E-01 1.726E-01 1.732E-01 1.740E-01 1.750E-01 1.762E-01 1.775E-01 1.790E-01 1.806E-01 1.823E-01 1.842E-01 1.861E-01 1.882E-01 1.904E-01 1.926E-01 1.948E-01 1.971E-01 1.994E-01 2.017E-01 2.040E-01 2.062E-01 2.083E-01 2.104E-01 2.123E-01 2.141E-01 2.158E-01 2.172E-01 2.185E-01 2.195E-01 2.203E-01 2.209E-01 2.211E-01 2.211E-01 2.207E-01 2.201E-01 2.191E-01 2.177E-01 2.160E-01 2.139E-01 2.115E-01 2.087E-01 2.056E-01 2.021E-01 1.982E-01 1.940E-01 1.895E-01 1.846E-01 1.794E-01 1.740E-01 1.682E-01 1.623E-01 1.561E-01 1.497E-01 1.431E-01 1.364E-01 1.296E-01 1.227E-01 1.158E-01 1.088E-01 1.018E-01 9.490E-02 8.803E-02 8.127E-02 7.463E-02 6.815E-02 6.186E-02 5.577E-02 4.992E-02 4.433E-02 3.901E-02 3.399E-02 2.928E-02 2.490E-02 2.086E-02 1.717E-02 1.384E-02 1.087E-02 8.267E-03 6.028E-03 4.153E-03 2.637E-03 1.474E-03 6.540E-04 1.670E-04 2.162E-07 1.389E-04 5.669E-04 1.266E-03 2.218E-03 3.402E-03 4.797E-03 6.381E-03 8.131E-03 1.002E-02 1.204E-02 1.414E-02 1.632E-02 1.855E-02 2.081E-02 2.307E-02 2.531E-02 2.752E-02 2.967E-02 3.174E-02 3.372E-02 3.559E-02 3.734E-02 3.895E-02 4.041E-02 4.172E-02 4.286E-02 4.383E-02 4.462E-02 4.523E-02 4.566E-02 4.591E-02 4.597E-02 4.585E-02 4.556E-02 4.510E-02 4.448E-02 4.370E-02 4.277E-02 4.171E-02 4.052E-02 3.921E-02 3.838E-02 3.975E-02 4.102E-02 4.216E-02 4.318E-02 4.405E-02 4.476E-02 4.532E-02 4.571E-02 4.593E-02 4.596E-02 4.582E-02 4.549E-02 4.498E-02 4.429E-02 4.341E-02 4.236E-02 4.113E-02 3.975E-02 3.820E-02 3.652E-02 3.470E-02 3.277E-02 3.073E-02 2.861E-02 2.642E-02 2.418E-02 2.192E-02 1.964E-02 1.739E-02 1.517E-02 1.301E-02 1.094E-02 8.978E-03 7.150E-03 5.479E-03 3.989E-03 2.703E-03 1.642E-03 8.283E-04 2.815E-04 2.057E-05 6.286E-05 4.241E-04 1.118E-03 2.157E-03 3.552E-03 5.308E-03 7.434E-03 9.931E-03 1.280E-02 1.604E-02 1.965E-02 2.361E-02 2.793E-02 3.259E-02 3.757E-02 4.286E-02 4.844E-02 5.429E-02 6.039E-02 6.671E-02 7.323E-02 7.991E-02 8.674E-02 9.367E-02 1.007E-01 1.078E-01 1.148E-01 1.219E-01 1.289E-01 1.358E-01 1.427E-01 1.493E-01 1.559E-01 1.622E-01 1.682E-01 1.741E-01 1.796E-01 1.849E-01 1.899E-01 1.945E-01 1.987E-01 2.027E-01 2.062E-01 2.094E-01 2.121E-01 2.146E-01 2.166E-01 2.182E-01 2.195E-01 2.204E-01 2.209E-01 2.211E-01 2.210E-01 2.206E-01 2.198E-01 2.188E-01 2.175E-01 2.160E-01 2.143E-01 2.124E-01 2.103E-01 2.080E-01 2.056E-01 2.032E-01 2.006E-01 1.980E-01 1.954E-01 1.927E-01 1.901E-01 1.875E-01 1.849E-01 1.824E-01 1.800E-01 1.777E-01 1.755E-01 1.734E-01 1.714E-01 1.697E-01 1.680E-01 1.666E-01 1.653E-01 1.642E-01 1.633E-01 1.626E-01 1.621E-01 1.618E-01 1.617E-01 1.618E-01 1.621E-01 1.626E-01 1.633E-01 1.642E-01 1.653E-01 1.666E-01 1.680E-01 1.697E-01 1.714E-01 1.734E-01 1.755E-01 1.777E-01 1.800E-01 1.824E-01 1.849E-01 1.875E-01 1.901E-01 1.927E-01 1.954E-01 1.980E-01 2.006E-01 2.032E-01 2.056E-01 2.080E-01 2.103E-01 2.124E-01 2.143E-01 2.160E-01 2.175E-01 2.188E-01 2.198E-01 2.206E-01 2.210E-01 2.211E-01 2.209E-01 2.204E-01 2.195E-01 2.182E-01 2.166E-01 2.146E-01 2.121E-01 2.094E-01 2.062E-01 2.027E-01 1.987E-01 1.945E-01 1.899E-01 1.849E-01 1.796E-01 1.741E-01 1.682E-01 1.622E-01 1.559E-01 1.493E-01 1.427E-01 1.358E-01 1.289E-01 1.219E-01 1.148E-01 1.078E-01 1.007E-01 9.367E-02 8.674E-02 7.991E-02 7.323E-02 6.671E-02 6.039E-02 5.429E-02 4.844E-02 4.286E-02 3.757E-02 3.259E-02 2.793E-02 2.361E-02 1.965E-02 1.604E-02 1.280E-02 9.931E-03 7.434E-03 5.308E-03 3.552E-03 2.157E-03 1.118E-03 4.241E-04 6.286E-05 2.057E-05 2.815E-04 8.283E-04 1.642E-03 2.703E-03 3.989E-03 5.479E-03 7.150E-03 8.978E-03 1.094E-02 1.301E-02 1.517E-02 1.739E-02 1.964E-02 2.192E-02 2.418E-02 2.642E-02 2.861E-02 3.073E-02 3.277E-02 3.470E-02 3.652E-02 3.820E-02 3.975E-02 4.113E-02 4.236E-02 4.341E-02 4.429E-02 4.498E-02 4.549E-02 4.582E-02 4.596E-02 4.593E-02 4.571E-02 4.532E-02 4.476E-02 4.405E-02 4.318E-02 4.216E-02 4.102E-02 3.975E-02 3.893E-02 4.027E-02 4.149E-02 4.259E-02 4.355E-02 4.436E-02 4.501E-02 4.550E-02 4.582E-02 4.596E-02 4.592E-02 4.570E-02 4.529E-02 4.470E-02 4.392E-02 4.296E-02 4.182E-02 4.052E-02 3.905E-02 3.744E-02 3.568E-02 3.380E-02 3.181E-02 2.972E-02 2.755E-02 2.532E-02 2.306E-02 2.078E-02 1.850E-02 1.625E-02 1.404E-02 1.192E-02 9.890E-03 7.986E-03 6.229E-03 4.644E-03 3.254E-03 2.083E-03 1.152E-03 4.831E-04 9.521E-05 7.280E-06 2.362E-04 7.971E-04 1.703E-03 2.966E-03 4.594E-03 6.595E-03 8.973E-03 1.173E-02 1.486E-02 1.837E-02 2.225E-02 2.650E-02 3.109E-02 3.602E-02 4.127E-02 4.682E-02 5.266E-02 5.875E-02 6.509E-02 7.163E-02 7.836E-02 8.524E-02 9.224E-02 9.933E-02 1.065E-01 1.137E-01 1.208E-01 1.279E-01 1.350E-01 1.419E-01 1.487E-01 1.554E-01 1.618E-01 1.680E-01 1.740E-01 1.796E-01 1.850E-01 1.901E-01 1.948E-01 1.991E-01 2.031E-01 2.066E-01 2.098E-01 2.126E-01 2.150E-01 2.170E-01 2.186E-01 2.198E-01 2.206E-01 2.211E-01 2.211E-01 2.208E-01 2.202E-01 2.193E-01 2.181E-01 2.165E-01 2.148E-01 2.128E-01 2.105E-01 2.081E-01 2.056E-01 2.029E-01 2.001E-01 1.972E-01 1.942E-01 1.912E-01 1.882E-01 1.852E-01 1.822E-01 1.793E-01 1.764E-01 1.737E-01 1.710E-01 1.684E-01 1.660E-01 1.637E-01 1.616E-01 1.597E-01 1.579E-01 1.563E-01 1.549E-01 1.538E-01 1.528E-01 1.520E-01 1.515E-01 1.511E-01 1.510E-01 1.511E-01 1.515E-01 1.520E-01 1.528E-01 1.538E-01 1.549E-01 1.563E-01 1.579E-01 1.597E-01 1.616E-01 1.637E-01 1.660E-01 1.684E-01 1.710E-01 1.737E-01 1.764E-01 1.793E-01 1.822E-01 1.852E-01 1.882E-01 1.912E-01 1.942E-01 1.972E-01 2.001E-01 2.029E-01 2.056E-01 2.081E-01 2.105E-01 2.128E-01 2.148E-01 2.165E-01 2.181E-01 2.193E-01 2.202E-01 2.208E-01 2.211E-01 2.211E-01 2.206E-01 2.198E-01 2.186E-01 2.170E-01 2.150E-01 2.126E-01 2.098E-01 2.066E-01 2.031E-01 1.991E-01 1.948E-01 1.901E-01 1.850E-01 1.796E-01 1.740E-01 1.680E-01 1.618E-01 1.554E-01 1.487E-01 1.419E-01 1.350E-01 1.279E-01 1.208E-01 1.137E-01 1.065E-01 9.933E-02 9.224E-02 8.524E-02 7.836E-02 7.163E-02 6.509E-02 5.875E-02 5.266E-02 4.682E-02 4.127E-02 3.602E-02 3.109E-02 2.650E-02 2.225E-02 1.837E-02 1.486E-02 1.173E-02 8.973E-03 6.595E-03 4.594E-03 2.966E-03 1.703E-03 7.971E-04 2.362E-04 7.280E-06 9.521E-05 4.831E-04 1.152E-03 2.083E-03 3.254E-03 4.644E-03 6.229E-03 7.986E-03 9.890E-03 1.192E-02 1.404E-02 1.625E-02 1.850E-02 2.078E-02 2.306E-02 2.532E-02 2.755E-02 2.972E-02 3.181E-02 3.380E-02 3.568E-02 3.744E-02 3.905E-02 4.052E-02 4.182E-02 4.296E-02 4.392E-02 4.470E-02 4.529E-02 4.570E-02 4.592E-02 4.596E-02 4.582E-02 4.550E-02 4.501E-02 4.436E-02 4.355E-02 4.259E-02 4.149E-02 4.027E-02 3.946E-02 4.076E-02 4.194E-02 4.299E-02 4.389E-02 4.464E-02 4.523E-02 4.566E-02 4.590E-02 4.597E-02 4.585E-02 4.555E-02 4.506E-02 4.438E-02 4.352E-02 4.248E-02 4.127E-02 3.988E-02 3.834E-02 3.666E-02 3.483E-02 3.289E-02 3.084E-02 2.870E-02 2.649E-02 2.424E-02 2.195E-02 1.965E-02 1.737E-02 1.513E-02 1.296E-02 1.087E-02 8.888E-03 7.048E-03 5.369E-03 3.877E-03 2.594E-03 1.544E-03 7.495E-04 2.307E-04 7.597E-06 9.812E-05 5.187E-04 1.284E-03 2.406E-03 3.896E-03 5.762E-03 8.009E-03 1.064E-02 1.366E-02 1.706E-02 2.084E-02 2.499E-02 2.950E-02 3.436E-02 3.956E-02 4.507E-02 5.088E-02 5.697E-02 6.330E-02 6.986E-02 7.661E-02 8.353E-02 9.059E-02 9.775E-02 1.050E-01 1.122E-01 1.195E-01 1.267E-01 1.339E-01 1.410E-01 1.479E-01 1.547E-01 1.612E-01 1.676E-01 1.736E-01 1.794E-01 1.849E-01 1.901E-01 1.948E-01 1.993E-01 2.033E-01 2.069E-01 2.102E-01 2.130E-01 2.154E-01 2.174E-01 2.189E-01 2.201E-01 2.208E-01 2.211E-01 2.211E-01 2.206E-01 2.198E-01 2.187E-01 2.173E-01 2.155E-01 2.135E-01 2.112E-01 2.087E-01 2.060E-01 2.032E-01 2.001E-01 1.970E-01 1.937E-01 1.904E-01 1.871E-01 1.837E-01 1.803E-01 1.770E-01 1.737E-01 1.704E-01 1.673E-01 1.642E-01 1.613E-01 1.585E-01 1.559E-01 1.534E-01 1.511E-01 1.490E-01 1.471E-01 1.455E-01 1.440E-01 1.427E-01 1.417E-01 1.408E-01 1.403E-01 1.399E-01 1.398E-01 1.399E-01 1.403E-01 1.408E-01 1.417E-01 1.427E-01 1.440E-01 1.455E-01 1.471E-01 1.490E-01 1.511E-01 1.534E-01 1.559E-01 1.585E-01 1.613E-01 1.642E-01 1.673E-01 1.704E-01 1.737E-01 1.770E-01 1.803E-01 1.837E-01 1.871E-01 1.904E-01 1.937E-01 1.970E-01 2.001E-01 2.032E-01 2.060E-01 2.087E-01 2.112E-01 2.135E-01 2.155E-01 2.173E-01 2.187E-01 2.198E-01 2.206E-01 2.211E-01 2.211E-01 2.208E-01 2.201E-01 2.189E-01 2.174E-01 2.154E-01 2.130E-01 2.102E-01 2.069E-01 2.033E-01 1.993E-01 1.948E-01 1.901E-01 1.849E-01 1.794E-01 1.736E-01 1.676E-01 1.612E-01 1.547E-01 1.479E-01 1.410E-01 1.339E-01 1.267E-01 1.195E-01 1.122E-01 1.050E-01 9.775E-02 9.059E-02 8.353E-02 7.661E-02 6.986E-02 6.330E-02 5.697E-02 5.088E-02 4.507E-02 3.956E-02 3.436E-02 2.950E-02 2.499E-02 2.084E-02 1.706E-02 1.366E-02 1.064E-02 8.009E-03 5.762E-03 3.896E-03 2.406E-03 1.284E-03 5.187E-04 9.812E-05 7.597E-06 2.307E-04 7.495E-04 1.544E-03 2.594E-03 3.877E-03 5.369E-03 7.048E-03 8.888E-03 1.087E-02 1.296E-02 1.513E-02 1.737E-02 1.965E-02 2.195E-02 2.424E-02 2.649E-02 2.870E-02 3.084E-02 3.289E-02 3.483E-02 3.666E-02 3.834E-02 3.988E-02 4.127E-02 4.248E-02 4.352E-02 4.438E-02 4.506E-02 4.555E-02 4.585E-02 4.597E-02 4.590E-02 4.566E-02 4.523E-02 4.464E-02 4.389E-02 4.299E-02 4.194E-02 4.076E-02 3.997E-02 4.123E-02 4.236E-02 4.336E-02 4.420E-02 4.490E-02 4.542E-02 4.578E-02 4.595E-02 4.594E-02 4.575E-02 4.537E-02 4.480E-02 4.404E-02 4.310E-02 4.198E-02 4.069E-02 3.923E-02 3.762E-02 3.586E-02 3.397E-02 3.197E-02 2.987E-02 2.769E-02 2.544E-02 2.316E-02 2.085E-02 1.855E-02 1.628E-02 1.405E-02 1.191E-02 9.859E-03 7.937E-03 6.167E-03 4.572E-03 3.178E-03 2.008E-03 1.086E-03 4.335E-04 7.095E-05 1.779E-05 2.917E-04 9.085E-04 1.882E-03 3.224E-03 4.944E-03 7.050E-03 9.544E-03 1.243E-02 1.571E-02 1.937E-02 2.342E-02 2.784E-02 3.262E-02 3.775E-02 4.320E-02 4.897E-02 5.503E-02 6.135E-02 6.791E-02 7.468E-02 8.164E-02 8.874E-02 9.596E-02 1.033E-01 1.106E-01 1.180E-01 1.253E-01 1.326E-01 1.398E-01 1.468E-01 1.537E-01 1.604E-01 1.669E-01 1.731E-01 1.790E-01 1.846E-01 1.899E-01 1.948E-01 1.993E-01 2.034E-01 2.071E-01 2.104E-01 2.132E-01 2.156E-01 2.176E-01 2.191E-01 2.202E-01 2.209E-01 2.211E-01 2.210E-01 2.204E-01 2.195E-01 2.182E-01 2.165E-01 2.145E-01 2.123E-01 2.097E-01 2.070E-01 2.040E-01 2.008E-01 1.974E-01 1.940E-01 1.904E-01 1.867E-01 1.830E-01 1.792E-01 1.755E-01 1.717E-01 1.680E-01 1.644E-01 1.609E-01 1.575E-01 1.542E-01 1.510E-01 1.480E-01 1.452E-01 1.426E-01 1.401E-01 1.379E-01 1.359E-01 1.341E-01 1.325E-01 1.312E-01 1.301E-01 1.292E-01 1.286E-01 1.282E-01 1.281E-01 1.282E-01 1.286E-01 1.292E-01 1.301E-01 1.312E-01 1.325E-01 1.341E-01 1.359E-01 1.379E-01 1.401E-01 1.426E-01 1.452E-01 1.480E-01 1.510E-01 1.542E-01 1.575E-01 1.609E-01 1.644E-01 1.680E-01 1.717E-01 1.755E-01 1.792E-01 1.830E-01 1.867E-01 1.904E-01 1.940E-01 1.974E-01 2.008E-01 2.040E-01 2.070E-01 2.097E-01 2.123E-01 2.145E-01 2.165E-01 2.182E-01 2.195E-01 2.204E-01 2.210E-01 2.211E-01 2.209E-01 2.202E-01 2.191E-01 2.176E-01 2.156E-01 2.132E-01 2.104E-01 2.071E-01 2.034E-01 1.993E-01 1.948E-01 1.899E-01 1.846E-01 1.790E-01 1.731E-01 1.669E-01 1.604E-01 1.537E-01 1.468E-01 1.398E-01 1.326E-01 1.253E-01 1.180E-01 1.106E-01 1.033E-01 9.596E-02 8.874E-02 8.164E-02 7.468E-02 6.791E-02 6.135E-02 5.503E-02 4.897E-02 4.320E-02 3.775E-02 3.262E-02 2.784E-02 2.342E-02 1.937E-02 1.571E-02 1.243E-02 9.544E-03 7.050E-03 4.944E-03 3.224E-03 1.882E-03 9.085E-04 2.917E-04 1.779E-05 7.095E-05 4.335E-04 1.086E-03 2.008E-03 3.178E-03 4.572E-03 6.167E-03 7.937E-03 9.859E-03 1.191E-02 1.405E-02 1.628E-02 1.855E-02 2.085E-02 2.316E-02 2.544E-02 2.769E-02 2.987E-02 3.197E-02 3.397E-02 3.586E-02 3.762E-02 3.923E-02 4.069E-02 4.198E-02 4.310E-02 4.404E-02 4.480E-02 4.537E-02 4.575E-02 4.594E-02 4.595E-02 4.578E-02 4.542E-02 4.490E-02 4.420E-02 4.336E-02 4.236E-02 4.123E-02 4.045E-02 4.167E-02 4.275E-02 4.370E-02 4.449E-02 4.512E-02 4.558E-02 4.587E-02 4.597E-02 4.589E-02 4.562E-02 4.516E-02 4.451E-02 4.368E-02 4.266E-02 4.146E-02 4.009E-02 3.856E-02 3.687E-02 3.505E-02 3.310E-02 3.105E-02 2.890E-02 2.668E-02 2.440E-02 2.210E-02 1.978E-02 1.748E-02 1.521E-02 1.301E-02 1.090E-02 8.898E-03 7.039E-03 5.344E-03 3.839E-03 2.550E-03 1.499E-03 7.096E-04 2.042E-04 2.840E-06 1.244E-04 5.861E-04 1.403E-03 2.589E-03 4.153E-03 6.106E-03 8.452E-03 1.120E-02 1.434E-02 1.787E-02 2.180E-02 2.611E-02 3.080E-02 3.584E-02 4.123E-02 4.694E-02 5.296E-02 5.925E-02 6.580E-02 7.258E-02 7.955E-02 8.668E-02 9.395E-02 1.013E-01 1.087E-01 1.162E-01 1.236E-01 1.310E-01 1.383E-01 1.455E-01 1.525E-01 1.593E-01 1.659E-01 1.723E-01 1.783E-01 1.841E-01 1.895E-01 1.945E-01 1.991E-01 2.033E-01 2.071E-01 2.104E-01 2.133E-01 2.158E-01 2.178E-01 2.193E-01 2.204E-01 2.210E-01 2.211E-01 2.209E-01 2.202E-01 2.191E-01 2.176E-01 2.158E-01 2.136E-01 2.111E-01 2.083E-01 2.053E-01 2.020E-01 1.985E-01 1.948E-01 1.910E-01 1.871E-01 1.830E-01 1.790E-01 1.748E-01 1.707E-01 1.666E-01 1.625E-01 1.585E-01 1.546E-01 1.508E-01 1.471E-01 1.436E-01 1.403E-01 1.371E-01 1.341E-01 1.313E-01 1.287E-01 1.264E-01 1.242E-01 1.224E-01 1.207E-01 1.193E-01 1.182E-01 1.173E-01 1.166E-01 1.162E-01 1.161E-01 1.162E-01 1.166E-01 1.173E-01 1.182E-01 1.193E-01 1.207E-01 1.224E-01 1.242E-01 1.264E-01 1.287E-01 1.313E-01 1.341E-01 1.371E-01 1.403E-01 1.436E-01 1.471E-01 1.508E-01 1.546E-01 1.585E-01 1.625E-01 1.666E-01 1.707E-01 1.748E-01 1.790E-01 1.830E-01 1.871E-01 1.910E-01 1.948E-01 1.985E-01 2.020E-01 2.053E-01 2.083E-01 2.111E-01 2.136E-01 2.158E-01 2.176E-01 2.191E-01 2.202E-01 2.209E-01 2.211E-01 2.210E-01 2.204E-01 2.193E-01 2.178E-01 2.158E-01 2.133E-01 2.104E-01 2.071E-01 2.033E-01 1.991E-01 1.945E-01 1.895E-01 1.841E-01 1.783E-01 1.723E-01 1.659E-01 1.593E-01 1.525E-01 1.455E-01 1.383E-01 1.310E-01 1.236E-01 1.162E-01 1.087E-01 1.013E-01 9.395E-02 8.668E-02 7.955E-02 7.258E-02 6.580E-02 5.925E-02 5.296E-02 4.694E-02 4.123E-02 3.584E-02 3.080E-02 2.611E-02 2.180E-02 1.787E-02 1.434E-02 1.120E-02 8.452E-03 6.106E-03 4.153E-03 2.589E-03 1.403E-03 5.861E-04 1.244E-04 2.840E-06 2.042E-04 7.096E-04 1.499E-03 2.550E-03 3.839E-03 5.344E-03 7.039E-03 8.898E-03 1.090E-02 1.301E-02 1.521E-02 1.748E-02 1.978E-02 2.210E-02 2.440E-02 2.668E-02 2.890E-02 3.105E-02 3.310E-02 3.505E-02 3.687E-02 3.856E-02 4.009E-02 4.146E-02 4.266E-02 4.368E-02 4.451E-02 4.516E-02 4.562E-02 4.589E-02 4.597E-02 4.587E-02 4.558E-02 4.512E-02 4.449E-02 4.370E-02 4.275E-02 4.167E-02 4.091E-02 4.208E-02 4.312E-02 4.401E-02 4.474E-02 4.531E-02 4.571E-02 4.593E-02 4.596E-02 4.581E-02 4.546E-02 4.492E-02 4.420E-02 4.328E-02 4.219E-02 4.091E-02 3.947E-02 3.787E-02 3.612E-02 3.423E-02 3.223E-02 3.012E-02 2.793E-02 2.567E-02 2.337E-02 2.105E-02 1.872E-02 1.643E-02 1.418E-02 1.200E-02 9.931E-03 7.986E-03 6.193E-03 4.580E-03 3.171E-03 1.991E-03 1.065E-03 4.139E-04 6.067E-05 2.515E-05 3.258E-04 9.791E-04 2.000E-03 3.400E-03 5.189E-03 7.376E-03 9.965E-03 1.296E-02 1.635E-02 2.015E-02 2.434E-02 2.891E-02 3.385E-02 3.916E-02 4.480E-02 5.076E-02 5.701E-02 6.353E-02 7.030E-02 7.728E-02 8.444E-02 9.174E-02 9.916E-02 1.067E-01 1.142E-01 1.217E-01 1.292E-01 1.366E-01 1.439E-01 1.511E-01 1.580E-01 1.648E-01 1.713E-01 1.775E-01 1.833E-01 1.889E-01 1.940E-01 1.987E-01 2.031E-01 2.069E-01 2.104E-01 2.133E-01 2.158E-01 2.179E-01 2.194E-01 2.204E-01 2.210E-01 2.211E-01 2.208E-01 2.200E-01 2.188E-01 2.171E-01 2.151E-01 2.128E-01 2.100E-01 2.070E-01 2.037E-01 2.001E-01 1.963E-01 1.924E-01 1.882E-01 1.839E-01 1.796E-01 1.751E-01 1.706E-01 1.661E-01 1.616E-01 1.572E-01 1.528E-01 1.485E-01 1.443E-01 1.403E-01 1.364E-01 1.326E-01 1.291E-01 1.257E-01 1.226E-01 1.197E-01 1.170E-01 1.145E-01 1.123E-01 1.104E-01 1.087E-01 1.072E-01 1.060E-01 1.051E-01 1.044E-01 1.040E-01 1.039E-01 1.040E-01 1.044E-01 1.051E-01 1.060E-01 1.072E-01 1.087E-01 1.104E-01 1.123E-01 1.145E-01 1.170E-01 1.197E-01 1.226E-01 1.257E-01 1.291E-01 1.326E-01 1.364E-01 1.403E-01 1.443E-01 1.485E-01 1.528E-01 1.572E-01 1.616E-01 1.661E-01 1.706E-01 1.751E-01 1.796E-01 1.839E-01 1.882E-01 1.924E-01 1.963E-01 2.001E-01 2.037E-01 2.070E-01 2.100E-01 2.128E-01 2.151E-01 2.171E-01 2.188E-01 2.200E-01 2.208E-01 2.211E-01 2.210E-01 2.204E-01 2.194E-01 2.179E-01 2.158E-01 2.133E-01 2.104E-01 2.069E-01 2.031E-01 1.987E-01 1.940E-01 1.889E-01 1.833E-01 1.775E-01 1.713E-01 1.648E-01 1.580E-01 1.511E-01 1.439E-01 1.366E-01 1.292E-01 1.217E-01 1.142E-01 1.067E-01 9.916E-02 9.174E-02 8.444E-02 7.728E-02 7.030E-02 6.353E-02 5.701E-02 5.076E-02 4.480E-02 3.916E-02 3.385E-02 2.891E-02 2.434E-02 2.015E-02 1.635E-02 1.296E-02 9.965E-03 7.376E-03 5.189E-03 3.400E-03 2.000E-03 9.791E-04 3.258E-04 2.515E-05 6.067E-05 4.139E-04 1.065E-03 1.991E-03 3.171E-03 4.580E-03 6.193E-03 7.986E-03 9.931E-03 1.200E-02 1.418E-02 1.643E-02 1.872E-02 2.105E-02 2.337E-02 2.567E-02 2.793E-02 3.012E-02 3.223E-02 3.423E-02 3.612E-02 3.787E-02 3.947E-02 4.091E-02 4.219E-02 4.328E-02 4.420E-02 4.492E-02 4.546E-02 4.581E-02 4.596E-02 4.593E-02 4.571E-02 4.531E-02 4.474E-02 4.401E-02 4.312E-02 4.208E-02 4.134E-02 4.247E-02 4.346E-02 4.430E-02 4.497E-02 4.548E-02 4.581E-02 4.596E-02 4.593E-02 4.570E-02 4.528E-02 4.466E-02 4.386E-02 4.287E-02 4.170E-02 4.035E-02 3.884E-02 3.717E-02 3.535E-02 3.341E-02 3.135E-02 2.920E-02 2.697E-02 2.468E-02 2.235E-02 2.002E-02 1.769E-02 1.540E-02 1.317E-02 1.103E-02 9.008E-03 7.122E-03 5.403E-03 3.877E-03 2.568E-03 1.504E-03 7.061E-04 1.983E-04 1.762E-06 1.362E-04 6.196E-04 1.468E-03 2.695E-03 4.312E-03 6.328E-03 8.750E-03 1.158E-02 1.482E-02 1.847E-02 2.252E-02 2.697E-02 3.180E-02 3.700E-02 4.255E-02 4.844E-02 5.464E-02 6.112E-02 6.786E-02 7.484E-02 8.200E-02 8.934E-02 9.680E-02 1.043E-01 1.120E-01 1.196E-01 1.272E-01 1.347E-01 1.421E-01 1.494E-01 1.565E-01 1.634E-01 1.700E-01 1.764E-01 1.824E-01 1.880E-01 1.933E-01 1.982E-01 2.027E-01 2.066E-01 2.102E-01 2.132E-01 2.158E-01 2.179E-01 2.194E-01 2.205E-01 2.210E-01 2.211E-01 2.207E-01 2.198E-01 2.185E-01 2.167E-01 2.146E-01 2.120E-01 2.091E-01 2.058E-01 2.023E-01 1.984E-01 1.944E-01 1.901E-01 1.856E-01 1.810E-01 1.763E-01 1.714E-01 1.666E-01 1.617E-01 1.568E-01 1.520E-01 1.473E-01 1.426E-01 1.380E-01 1.336E-01 1.293E-01 1.252E-01 1.213E-01 1.176E-01 1.142E-01 1.109E-01 1.079E-01 1.051E-01 1.026E-01 1.003E-01 9.826E-02 9.651E-02 9.502E-02 9.380E-02 9.285E-02 9.218E-02 9.177E-02 9.163E-02 9.177E-02 9.218E-02 9.285E-02 9.380E-02 9.502E-02 9.651E-02 9.826E-02 1.003E-01 1.026E-01 1.051E-01 1.079E-01 1.109E-01 1.142E-01 1.176E-01 1.213E-01 1.252E-01 1.293E-01 1.336E-01 1.380E-01 1.426E-01 1.473E-01 1.520E-01 1.568E-01 1.617E-01 1.666E-01 1.714E-01 1.763E-01 1.810E-01 1.856E-01 1.901E-01 1.944E-01 1.984E-01 2.023E-01 2.058E-01 2.091E-01 2.120E-01 2.146E-01 2.167E-01 2.185E-01 2.198E-01 2.207E-01 2.211E-01 2.210E-01 2.205E-01 2.194E-01 2.179E-01 2.158E-01 2.132E-01 2.102E-01 2.066E-01 2.027E-01 1.982E-01 1.933E-01 1.880E-01 1.824E-01 1.764E-01 1.700E-01 1.634E-01 1.565E-01 1.494E-01 1.421E-01 1.347E-01 1.272E-01 1.196E-01 1.120E-01 1.043E-01 9.680E-02 8.934E-02 8.200E-02 7.484E-02 6.786E-02 6.112E-02 5.464E-02 4.844E-02 4.255E-02 3.700E-02 3.180E-02 2.697E-02 2.252E-02 1.847E-02 1.482E-02 1.158E-02 8.750E-03 6.328E-03 4.312E-03 2.695E-03 1.468E-03 6.196E-04 1.362E-04 1.762E-06 1.983E-04 7.061E-04 1.504E-03 2.568E-03 3.877E-03 5.403E-03 7.122E-03 9.008E-03 1.103E-02 1.317E-02 1.540E-02 1.769E-02 2.002E-02 2.235E-02 2.468E-02 2.697E-02 2.920E-02 3.135E-02 3.341E-02 3.535E-02 3.717E-02 3.884E-02 4.035E-02 4.170E-02 4.287E-02 4.386E-02 4.466E-02 4.528E-02 4.570E-02 4.593E-02 4.596E-02 4.581E-02 4.548E-02 4.497E-02 4.430E-02 4.346E-02 4.247E-02 4.175E-02 4.283E-02 4.377E-02 4.456E-02 4.518E-02 4.562E-02 4.589E-02 4.597E-02 4.586E-02 4.556E-02 4.507E-02 4.438E-02 4.350E-02 4.244E-02 4.119E-02 3.977E-02 3.819E-02 3.645E-02 3.458E-02 3.258E-02 3.047E-02 2.828E-02 2.601E-02 2.369E-02 2.135E-02 1.901E-02 1.668E-02 1.441E-02 1.221E-02 1.011E-02 8.131E-03 6.309E-03 4.668E-03 3.234E-03 2.031E-03 1.086E-03 4.223E-04 6.178E-05 2.589E-05 3.339E-04 1.003E-03 2.049E-03 3.485E-03 5.320E-03 7.564E-03 1.022E-02 1.329E-02 1.678E-02 2.068E-02 2.499E-02 2.969E-02 3.477E-02 4.022E-02 4.602E-02 5.215E-02 5.857E-02 6.528E-02 7.223E-02 7.939E-02 8.674E-02 9.423E-02 1.018E-01 1.095E-01 1.172E-01 1.249E-01 1.325E-01 1.401E-01 1.475E-01 1.547E-01 1.618E-01 1.685E-01 1.750E-01 1.812E-01 1.870E-01 1.925E-01 1.975E-01 2.021E-01 2.062E-01 2.098E-01 2.130E-01 2.156E-01 2.178E-01 2.194E-01 2.205E-01 2.211E-01 2.211E-01 2.207E-01 2.197E-01 2.183E-01 2.164E-01 2.141E-01 2.114E-01 2.083E-01 2.048E-01 2.010E-01 1.969E-01 1.926E-01 1.880E-01 1.832E-01 1.783E-01 1.732E-01 1.680E-01 1.628E-01 1.576E-01 1.523E-01 1.471E-01 1.420E-01 1.370E-01 1.320E-01 1.272E-01 1.226E-01 1.182E-01 1.139E-01 1.098E-01 1.060E-01 1.024E-01 9.907E-02 9.597E-02 9.313E-02 9.054E-02 8.823E-02 8.618E-02 8.441E-02 8.290E-02 8.167E-02 8.071E-02 8.003E-02 7.962E-02 7.948E-02 7.962E-02 8.003E-02 8.071E-02 8.167E-02 8.290E-02 8.441E-02 8.618E-02 8.823E-02 9.054E-02 9.313E-02 9.597E-02 9.907E-02 1.024E-01 1.060E-01 1.098E-01 1.139E-01 1.182E-01 1.226E-01 1.272E-01 1.320E-01 1.370E-01 1.420E-01 1.471E-01 1.523E-01 1.576E-01 1.628E-01 1.680E-01 1.732E-01 1.783E-01 1.832E-01 1.880E-01 1.926E-01 1.969E-01 2.010E-01 2.048E-01 2.083E-01 2.114E-01 2.141E-01 2.164E-01 2.183E-01 2.197E-01 2.207E-01 2.211E-01 2.211E-01 2.205E-01 2.194E-01 2.178E-01 2.156E-01 2.130E-01 2.098E-01 2.062E-01 2.021E-01 1.975E-01 1.925E-01 1.870E-01 1.812E-01 1.750E-01 1.685E-01 1.618E-01 1.547E-01 1.475E-01 1.401E-01 1.325E-01 1.249E-01 1.172E-01 1.095E-01 1.018E-01 9.423E-02 8.674E-02 7.939E-02 7.223E-02 6.528E-02 5.857E-02 5.215E-02 4.602E-02 4.022E-02 3.477E-02 2.969E-02 2.499E-02 2.068E-02 1.678E-02 1.329E-02 1.022E-02 7.564E-03 5.320E-03 3.485E-03 2.049E-03 1.003E-03 3.339E-04 2.589E-05 6.178E-05 4.223E-04 1.086E-03 2.031E-03 3.234E-03 4.668E-03 6.309E-03 8.131E-03 1.011E-02 1.221E-02 1.441E-02 1.668E-02 1.901E-02 2.135E-02 2.369E-02 2.601E-02 2.828E-02 3.047E-02 3.258E-02 3.458E-02 3.645E-02 3.819E-02 3.977E-02 4.119E-02 4.244E-02 4.350E-02 4.438E-02 4.507E-02 4.556E-02 4.586E-02 4.597E-02 4.589E-02 4.562E-02 4.518E-02 4.456E-02 4.377E-02 4.283E-02 4.213E-02 4.317E-02 4.406E-02 4.479E-02 4.535E-02 4.574E-02 4.594E-02 4.595E-02 4.578E-02 4.540E-02 4.484E-02 4.408E-02 4.312E-02 4.199E-02 4.067E-02 3.918E-02 3.753E-02 3.573E-02 3.380E-02 3.175E-02 2.960E-02 2.736E-02 2.506E-02 2.272E-02 2.037E-02 1.802E-02 1.571E-02 1.345E-02 1.128E-02 9.219E-03 7.300E-03 5.548E-03 3.989E-03 2.651E-03 1.559E-03 7.385E-04 2.122E-04 2.840E-06 1.311E-04 6.158E-04 1.474E-03 2.720E-03 4.365E-03 6.421E-03 8.893E-03 1.179E-02 1.510E-02 1.883E-02 2.298E-02 2.754E-02 3.249E-02 3.782E-02 4.351E-02 4.955E-02 5.591E-02 6.255E-02 6.947E-02 7.661E-02 8.396E-02 9.147E-02 9.910E-02 1.068E-01 1.146E-01 1.224E-01 1.301E-01 1.378E-01 1.453E-01 1.527E-01 1.599E-01 1.668E-01 1.735E-01 1.798E-01 1.858E-01 1.914E-01 1.966E-01 2.013E-01 2.056E-01 2.094E-01 2.126E-01 2.154E-01 2.176E-01 2.193E-01 2.204E-01 2.210E-01 2.211E-01 2.206E-01 2.197E-01 2.182E-01 2.162E-01 2.138E-01 2.109E-01 2.076E-01 2.040E-01 2.000E-01 1.956E-01 1.910E-01 1.861E-01 1.811E-01 1.758E-01 1.704E-01 1.649E-01 1.594E-01 1.538E-01 1.482E-01 1.426E-01 1.371E-01 1.317E-01 1.264E-01 1.212E-01 1.162E-01 1.114E-01 1.068E-01 1.024E-01 9.826E-02 9.435E-02 9.068E-02 8.727E-02 8.413E-02 8.126E-02 7.866E-02 7.633E-02 7.428E-02 7.250E-02 7.100E-02 6.977E-02 6.881E-02 6.813E-02 6.772E-02 6.759E-02 6.772E-02 6.813E-02 6.881E-02 6.977E-02 7.100E-02 7.250E-02 7.428E-02 7.633E-02 7.866E-02 8.126E-02 8.413E-02 8.727E-02 9.068E-02 9.435E-02 9.826E-02 1.024E-01 1.068E-01 1.114E-01 1.162E-01 1.212E-01 1.264E-01 1.317E-01 1.371E-01 1.426E-01 1.482E-01 1.538E-01 1.594E-01 1.649E-01 1.704E-01 1.758E-01 1.811E-01 1.861E-01 1.910E-01 1.956E-01 2.000E-01 2.040E-01 2.076E-01 2.109E-01 2.138E-01 2.162E-01 2.182E-01 2.197E-01 2.206E-01 2.211E-01 2.210E-01 2.204E-01 2.193E-01 2.176E-01 2.154E-01 2.126E-01 2.094E-01 2.056E-01 2.013E-01 1.966E-01 1.914E-01 1.858E-01 1.798E-01 1.735E-01 1.668E-01 1.599E-01 1.527E-01 1.453E-01 1.378E-01 1.301E-01 1.224E-01 1.146E-01 1.068E-01 9.910E-02 9.147E-02 8.396E-02 7.661E-02 6.947E-02 6.255E-02 5.591E-02 4.955E-02 4.351E-02 3.782E-02 3.249E-02 2.754E-02 2.298E-02 1.883E-02 1.510E-02 1.179E-02 8.893E-03 6.421E-03 4.365E-03 2.720E-03 1.474E-03 6.158E-04 1.311E-04 2.840E-06 2.122E-04 7.385E-04 1.559E-03 2.651E-03 3.989E-03 5.548E-03 7.300E-03 9.219E-03 1.128E-02 1.345E-02 1.571E-02 1.802E-02 2.037E-02 2.272E-02 2.506E-02 2.736E-02 2.960E-02 3.175E-02 3.380E-02 3.573E-02 3.753E-02 3.918E-02 4.067E-02 4.199E-02 4.312E-02 4.408E-02 4.484E-02 4.540E-02 4.578E-02 4.595E-02 4.594E-02 4.574E-02 4.535E-02 4.479E-02 4.406E-02 4.317E-02 4.250E-02 4.349E-02 4.433E-02 4.500E-02 4.551E-02 4.583E-02 4.597E-02 4.591E-02 4.567E-02 4.522E-02 4.458E-02 4.375E-02 4.273E-02 4.152E-02 4.013E-02 3.858E-02 3.686E-02 3.501E-02 3.302E-02 3.092E-02 2.872E-02 2.645E-02 2.413E-02 2.177E-02 1.940E-02 1.706E-02 1.475E-02 1.252E-02 1.039E-02 8.375E-03 6.516E-03 4.838E-03 3.367E-03 2.130E-03 1.152E-03 4.594E-04 7.455E-05 1.967E-05 3.151E-04 9.791E-04 2.028E-03 3.475E-03 5.332E-03 7.608E-03 1.031E-02 1.344E-02 1.699E-02 2.097E-02 2.536E-02 3.016E-02 3.536E-02 4.093E-02 4.686E-02 5.313E-02 5.971E-02 6.657E-02 7.368E-02 8.101E-02 8.852E-02 9.618E-02 1.039E-01 1.118E-01 1.196E-01 1.275E-01 1.352E-01 1.429E-01 1.504E-01 1.578E-01 1.648E-01 1.717E-01 1.782E-01 1.843E-01 1.901E-01 1.955E-01 2.004E-01 2.048E-01 2.087E-01 2.121E-01 2.150E-01 2.174E-01 2.191E-01 2.204E-01 2.210E-01 2.211E-01 2.207E-01 2.197E-01 2.181E-01 2.161E-01 2.136E-01 2.106E-01 2.072E-01 2.033E-01 1.991E-01 1.946E-01 1.897E-01 1.846E-01 1.792E-01 1.737E-01 1.679E-01 1.621E-01 1.562E-01 1.503E-01 1.443E-01 1.384E-01 1.325E-01 1.267E-01 1.211E-01 1.156E-01 1.102E-01 1.051E-01 1.001E-01 9.543E-02 9.095E-02 8.673E-02 8.276E-02 7.907E-02 7.565E-02 7.250E-02 6.963E-02 6.704E-02 6.473E-02 6.270E-02 6.095E-02 5.947E-02 5.826E-02 5.732E-02 5.665E-02 5.625E-02 5.612E-02 5.625E-02 5.665E-02 5.732E-02 5.826E-02 5.947E-02 6.095E-02 6.270E-02 6.473E-02 6.704E-02 6.963E-02 7.250E-02 7.565E-02 7.907E-02 8.276E-02 8.673E-02 9.095E-02 9.543E-02 1.001E-01 1.051E-01 1.102E-01 1.156E-01 1.211E-01 1.267E-01 1.325E-01 1.384E-01 1.443E-01 1.503E-01 1.562E-01 1.621E-01 1.679E-01 1.737E-01 1.792E-01 1.846E-01 1.897E-01 1.946E-01 1.991E-01 2.033E-01 2.072E-01 2.106E-01 2.136E-01 2.161E-01 2.181E-01 2.197E-01 2.207E-01 2.211E-01 2.210E-01 2.204E-01 2.191E-01 2.174E-01 2.150E-01 2.121E-01 2.087E-01 2.048E-01 2.004E-01 1.955E-01 1.901E-01 1.843E-01 1.782E-01 1.717E-01 1.648E-01 1.578E-01 1.504E-01 1.429E-01 1.352E-01 1.275E-01 1.196E-01 1.118E-01 1.039E-01 9.618E-02 8.852E-02 8.101E-02 7.368E-02 6.657E-02 5.971E-02 5.313E-02 4.686E-02 4.093E-02 3.536E-02 3.016E-02 2.536E-02 2.097E-02 1.699E-02 1.344E-02 1.031E-02 7.608E-03 5.332E-03 3.475E-03 2.028E-03 9.791E-04 3.151E-04 1.967E-05 7.455E-05 4.594E-04 1.152E-03 2.130E-03 3.367E-03 4.838E-03 6.516E-03 8.375E-03 1.039E-02 1.252E-02 1.475E-02 1.706E-02 1.940E-02 2.177E-02 2.413E-02 2.645E-02 2.872E-02 3.092E-02 3.302E-02 3.501E-02 3.686E-02 3.858E-02 4.013E-02 4.152E-02 4.273E-02 4.375E-02 4.458E-02 4.522E-02 4.567E-02 4.591E-02 4.597E-02 4.583E-02 4.551E-02 4.500E-02 4.433E-02 4.349E-02 4.283E-02 4.378E-02 4.457E-02 4.519E-02 4.563E-02 4.590E-02 4.597E-02 4.585E-02 4.554E-02 4.502E-02 4.431E-02 4.341E-02 4.232E-02 4.104E-02 3.958E-02 3.796E-02 3.619E-02 3.428E-02 3.224E-02 3.009E-02 2.786E-02 2.555E-02 2.320E-02 2.083E-02 1.846E-02 1.612E-02 1.383E-02 1.163E-02 9.533E-03 7.574E-03 5.780E-03 4.180E-03 2.801E-03 1.668E-03 8.092E-04 2.478E-04 7.597E-06 1.101E-04 5.752E-04 1.421E-03 2.662E-03 4.312E-03 6.381E-03 8.877E-03 1.180E-02 1.516E-02 1.896E-02 2.317E-02 2.781E-02 3.285E-02 3.829E-02 4.409E-02 5.025E-02 5.674E-02 6.353E-02 7.060E-02 7.790E-02 8.540E-02 9.307E-02 1.009E-01 1.087E-01 1.167E-01 1.246E-01 1.325E-01 1.402E-01 1.479E-01 1.554E-01 1.626E-01 1.696E-01 1.763E-01 1.826E-01 1.886E-01 1.941E-01 1.992E-01 2.038E-01 2.079E-01 2.115E-01 2.146E-01 2.170E-01 2.189E-01 2.202E-01 2.210E-01 2.211E-01 2.207E-01 2.197E-01 2.182E-01 2.161E-01 2.135E-01 2.104E-01 2.069E-01 2.029E-01 1.985E-01 1.937E-01 1.887E-01 1.833E-01 1.777E-01 1.718E-01 1.658E-01 1.597E-01 1.534E-01 1.471E-01 1.408E-01 1.346E-01 1.284E-01 1.222E-01 1.162E-01 1.104E-01 1.047E-01 9.920E-02 9.394E-02 8.891E-02 8.413E-02 7.962E-02 7.537E-02 7.141E-02 6.772E-02 6.433E-02 6.122E-02 5.839E-02 5.585E-02 5.359E-02 5.161E-02 4.991E-02 4.847E-02 4.731E-02 4.640E-02 4.576E-02 4.537E-02 4.524E-02 4.537E-02 4.576E-02 4.640E-02 4.731E-02 4.847E-02 4.991E-02 5.161E-02 5.359E-02 5.585E-02 5.839E-02 6.122E-02 6.433E-02 6.772E-02 7.141E-02 7.537E-02 7.962E-02 8.413E-02 8.891E-02 9.394E-02 9.920E-02 1.047E-01 1.104E-01 1.162E-01 1.222E-01 1.284E-01 1.346E-01 1.408E-01 1.471E-01 1.534E-01 1.597E-01 1.658E-01 1.718E-01 1.777E-01 1.833E-01 1.887E-01 1.937E-01 1.985E-01 2.029E-01 2.069E-01 2.104E-01 2.135E-01 2.161E-01 2.182E-01 2.197E-01 2.207E-01 2.211E-01 2.210E-01 2.202E-01 2.189E-01 2.170E-01 2.146E-01 2.115E-01 2.079E-01 2.038E-01 1.992E-01 1.941E-01 1.886E-01 1.826E-01 1.763E-01 1.696E-01 1.626E-01 1.554E-01 1.479E-01 1.402E-01 1.325E-01 1.246E-01 1.167E-01 1.087E-01 1.009E-01 9.307E-02 8.540E-02 7.790E-02 7.060E-02 6.353E-02 5.674E-02 5.025E-02 4.409E-02 3.829E-02 3.285E-02 2.781E-02 2.317E-02 1.896E-02 1.516E-02 1.180E-02 8.877E-03 6.381E-03 4.312E-03 2.662E-03 1.421E-03 5.752E-04 1.101E-04 7.597E-06 2.478E-04 8.092E-04 1.668E-03 2.801E-03 4.180E-03 5.780E-03 7.574E-03 9.533E-03 1.163E-02 1.383E-02 1.612E-02 1.846E-02 2.083E-02 2.320E-02 2.555E-02 2.786E-02 3.009E-02 3.224E-02 3.428E-02 3.619E-02 3.796E-02 3.958E-02 4.104E-02 4.232E-02 4.341E-02 4.431E-02 4.502E-02 4.554E-02 4.585E-02 4.597E-02 4.590E-02 4.563E-02 4.519E-02 4.457E-02 4.378E-02 4.315E-02 4.405E-02 4.479E-02 4.535E-02 4.574E-02 4.594E-02 4.595E-02 4.577E-02 4.538E-02 4.480E-02 4.402E-02 4.305E-02 4.189E-02 4.054E-02 3.903E-02 3.735E-02 3.551E-02 3.355E-02 3.146E-02 2.927E-02 2.700E-02 2.467E-02 2.230E-02 1.991E-02 1.754E-02 1.521E-02 1.295E-02 1.077E-02 8.719E-03 6.817E-03 5.093E-03 3.575E-03 2.290E-03 1.266E-03 5.289E-04 1.022E-04 9.360E-06 2.717E-04 9.085E-04 1.937E-03 3.372E-03 5.225E-03 7.506E-03 1.022E-02 1.337E-02 1.697E-02 2.099E-02 2.545E-02 3.032E-02 3.560E-02 4.127E-02 4.730E-02 5.369E-02 6.039E-02 6.738E-02 7.463E-02 8.211E-02 8.977E-02 9.758E-02 1.055E-01 1.135E-01 1.215E-01 1.294E-01 1.374E-01 1.451E-01 1.528E-01 1.602E-01 1.673E-01 1.742E-01 1.807E-01 1.869E-01 1.926E-01 1.979E-01 2.027E-01 2.070E-01 2.107E-01 2.139E-01 2.166E-01 2.186E-01 2.201E-01 2.209E-01 2.211E-01 2.208E-01 2.198E-01 2.183E-01 2.162E-01 2.136E-01 2.104E-01 2.068E-01 2.027E-01 1.981E-01 1.932E-01 1.879E-01 1.823E-01 1.764E-01 1.703E-01 1.640E-01 1.576E-01 1.510E-01 1.444E-01 1.378E-01 1.312E-01 1.246E-01 1.182E-01 1.118E-01 1.056E-01 9.961E-02 9.380E-02 8.823E-02 8.290E-02 7.784E-02 7.305E-02 6.854E-02 6.433E-02 6.041E-02 5.679E-02 5.346E-02 5.043E-02 4.770E-02 4.524E-02 4.307E-02 4.118E-02 3.955E-02 3.819E-02 3.708E-02 3.623E-02 3.562E-02 3.526E-02 3.513E-02 3.526E-02 3.562E-02 3.623E-02 3.708E-02 3.819E-02 3.955E-02 4.118E-02 4.307E-02 4.524E-02 4.770E-02 5.043E-02 5.346E-02 5.679E-02 6.041E-02 6.433E-02 6.854E-02 7.305E-02 7.784E-02 8.290E-02 8.823E-02 9.380E-02 9.961E-02 1.056E-01 1.118E-01 1.182E-01 1.246E-01 1.312E-01 1.378E-01 1.444E-01 1.510E-01 1.576E-01 1.640E-01 1.703E-01 1.764E-01 1.823E-01 1.879E-01 1.932E-01 1.981E-01 2.027E-01 2.068E-01 2.104E-01 2.136E-01 2.162E-01 2.183E-01 2.198E-01 2.208E-01 2.211E-01 2.209E-01 2.201E-01 2.186E-01 2.166E-01 2.139E-01 2.107E-01 2.070E-01 2.027E-01 1.979E-01 1.926E-01 1.869E-01 1.807E-01 1.742E-01 1.673E-01 1.602E-01 1.528E-01 1.451E-01 1.374E-01 1.294E-01 1.215E-01 1.135E-01 1.055E-01 9.758E-02 8.977E-02 8.211E-02 7.463E-02 6.738E-02 6.039E-02 5.369E-02 4.730E-02 4.127E-02 3.560E-02 3.032E-02 2.545E-02 2.099E-02 1.697E-02 1.337E-02 1.022E-02 7.506E-03 5.225E-03 3.372E-03 1.937E-03 9.085E-04 2.717E-04 9.360E-06 1.022E-04 5.289E-04 1.266E-03 2.290E-03 3.575E-03 5.093E-03 6.817E-03 8.719E-03 1.077E-02 1.295E-02 1.521E-02 1.754E-02 1.991E-02 2.230E-02 2.467E-02 2.700E-02 2.927E-02 3.146E-02 3.355E-02 3.551E-02 3.735E-02 3.903E-02 4.054E-02 4.189E-02 4.305E-02 4.402E-02 4.480E-02 4.538E-02 4.577E-02 4.595E-02 4.594E-02 4.574E-02 4.535E-02 4.479E-02 4.405E-02 4.344E-02 4.430E-02 4.498E-02 4.550E-02 4.583E-02 4.597E-02 4.591E-02 4.566E-02 4.521E-02 4.457E-02 4.372E-02 4.268E-02 4.145E-02 4.004E-02 3.846E-02 3.672E-02 3.483E-02 3.281E-02 3.068E-02 2.845E-02 2.615E-02 2.379E-02 2.141E-02 1.902E-02 1.665E-02 1.433E-02 1.209E-02 9.951E-03 7.947E-03 6.105E-03 4.453E-03 3.021E-03 1.835E-03 9.228E-04 3.099E-04 2.057E-05 7.755E-05 5.017E-04 1.312E-03 2.524E-03 4.153E-03 6.210E-03 8.703E-03 1.164E-02 1.501E-02 1.883E-02 2.309E-02 2.778E-02 3.288E-02 3.839E-02 4.429E-02 5.055E-02 5.714E-02 6.405E-02 7.124E-02 7.867E-02 8.631E-02 9.412E-02 1.021E-01 1.101E-01 1.181E-01 1.262E-01 1.342E-01 1.421E-01 1.499E-01 1.575E-01 1.648E-01 1.718E-01 1.786E-01 1.849E-01 1.908E-01 1.963E-01 2.014E-01 2.058E-01 2.098E-01 2.132E-01 2.160E-01 2.182E-01 2.198E-01 2.208E-01 2.211E-01 2.209E-01 2.200E-01 2.185E-01 2.164E-01 2.138E-01 2.106E-01 2.069E-01 2.027E-01 1.980E-01 1.929E-01 1.875E-01 1.816E-01 1.755E-01 1.692E-01 1.626E-01 1.559E-01 1.490E-01 1.421E-01 1.352E-01 1.282E-01 1.213E-01 1.145E-01 1.079E-01 1.013E-01 9.502E-02 8.891E-02 8.304E-02 7.743E-02 7.209E-02 6.704E-02 6.230E-02 5.786E-02 5.373E-02 4.991E-02 4.640E-02 4.320E-02 4.030E-02 3.770E-02 3.538E-02 3.333E-02 3.156E-02 3.005E-02 2.878E-02 2.776E-02 2.697E-02 2.641E-02 2.608E-02 2.597E-02 2.608E-02 2.641E-02 2.697E-02 2.776E-02 2.878E-02 3.005E-02 3.156E-02 3.333E-02 3.538E-02 3.770E-02 4.030E-02 4.320E-02 4.640E-02 4.991E-02 5.373E-02 5.786E-02 6.230E-02 6.704E-02 7.209E-02 7.743E-02 8.304E-02 8.891E-02 9.502E-02 1.013E-01 1.079E-01 1.145E-01 1.213E-01 1.282E-01 1.352E-01 1.421E-01 1.490E-01 1.559E-01 1.626E-01 1.692E-01 1.755E-01 1.816E-01 1.875E-01 1.929E-01 1.980E-01 2.027E-01 2.069E-01 2.106E-01 2.138E-01 2.164E-01 2.185E-01 2.200E-01 2.209E-01 2.211E-01 2.208E-01 2.198E-01 2.182E-01 2.160E-01 2.132E-01 2.098E-01 2.058E-01 2.014E-01 1.963E-01 1.908E-01 1.849E-01 1.786E-01 1.718E-01 1.648E-01 1.575E-01 1.499E-01 1.421E-01 1.342E-01 1.262E-01 1.181E-01 1.101E-01 1.021E-01 9.412E-02 8.631E-02 7.867E-02 7.124E-02 6.405E-02 5.714E-02 5.055E-02 4.429E-02 3.839E-02 3.288E-02 2.778E-02 2.309E-02 1.883E-02 1.501E-02 1.164E-02 8.703E-03 6.210E-03 4.153E-03 2.524E-03 1.312E-03 5.017E-04 7.755E-05 2.057E-05 3.099E-04 9.228E-04 1.835E-03 3.021E-03 4.453E-03 6.105E-03 7.947E-03 9.951E-03 1.209E-02 1.433E-02 1.665E-02 1.902E-02 2.141E-02 2.379E-02 2.615E-02 2.845E-02 3.068E-02 3.281E-02 3.483E-02 3.672E-02 3.846E-02 4.004E-02 4.145E-02 4.268E-02 4.372E-02 4.457E-02 4.521E-02 4.566E-02 4.591E-02 4.597E-02 4.583E-02 4.550E-02 4.498E-02 4.430E-02 4.372E-02 4.452E-02 4.516E-02 4.562E-02 4.589E-02 4.597E-02 4.586E-02 4.554E-02 4.503E-02 4.431E-02 4.340E-02 4.230E-02 4.100E-02 3.953E-02 3.789E-02 3.609E-02 3.415E-02 3.209E-02 2.991E-02 2.765E-02 2.531E-02 2.294E-02 2.054E-02 1.815E-02 1.578E-02 1.348E-02 1.127E-02 9.169E-03 7.216E-03 5.437E-03 3.862E-03 2.518E-03 1.434E-03 6.364E-04 1.507E-04 9.375E-07 2.096E-04 7.971E-04 1.782E-03 3.179E-03 5.002E-03 7.262E-03 9.965E-03 1.312E-02 1.671E-02 2.076E-02 2.525E-02 3.016E-02 3.549E-02 4.123E-02 4.734E-02 5.382E-02 6.062E-02 6.772E-02 7.509E-02 8.269E-02 9.048E-02 9.843E-02 1.065E-01 1.146E-01 1.227E-01 1.308E-01 1.389E-01 1.468E-01 1.545E-01 1.620E-01 1.692E-01 1.761E-01 1.827E-01 1.889E-01 1.946E-01 1.998E-01 2.045E-01 2.087E-01 2.123E-01 2.153E-01 2.177E-01 2.195E-01 2.206E-01 2.211E-01 2.210E-01 2.202E-01 2.188E-01 2.167E-01 2.141E-01 2.109E-01 2.072E-01 2.029E-01 1.981E-01 1.929E-01 1.873E-01 1.813E-01 1.750E-01 1.684E-01 1.616E-01 1.546E-01 1.475E-01 1.403E-01 1.330E-01 1.257E-01 1.185E-01 1.114E-01 1.044E-01 9.759E-02 9.095E-02 8.454E-02 7.838E-02 7.250E-02 6.691E-02 6.162E-02 5.665E-02 5.201E-02 4.770E-02 4.371E-02 4.005E-02 3.672E-02 3.369E-02 3.098E-02 2.855E-02 2.641E-02 2.454E-02 2.292E-02 2.155E-02 2.042E-02 1.950E-02 1.880E-02 1.830E-02 1.801E-02 1.791E-02 1.801E-02 1.830E-02 1.880E-02 1.950E-02 2.042E-02 2.155E-02 2.292E-02 2.454E-02 2.641E-02 2.855E-02 3.098E-02 3.369E-02 3.672E-02 4.005E-02 4.371E-02 4.770E-02 5.201E-02 5.665E-02 6.162E-02 6.691E-02 7.250E-02 7.838E-02 8.454E-02 9.095E-02 9.759E-02 1.044E-01 1.114E-01 1.185E-01 1.257E-01 1.330E-01 1.403E-01 1.475E-01 1.546E-01 1.616E-01 1.684E-01 1.750E-01 1.813E-01 1.873E-01 1.929E-01 1.981E-01 2.029E-01 2.072E-01 2.109E-01 2.141E-01 2.167E-01 2.188E-01 2.202E-01 2.210E-01 2.211E-01 2.206E-01 2.195E-01 2.177E-01 2.153E-01 2.123E-01 2.087E-01 2.045E-01 1.998E-01 1.946E-01 1.889E-01 1.827E-01 1.761E-01 1.692E-01 1.620E-01 1.545E-01 1.468E-01 1.389E-01 1.308E-01 1.227E-01 1.146E-01 1.065E-01 9.843E-02 9.048E-02 8.269E-02 7.509E-02 6.772E-02 6.062E-02 5.382E-02 4.734E-02 4.123E-02 3.549E-02 3.016E-02 2.525E-02 2.076E-02 1.671E-02 1.312E-02 9.965E-03 7.262E-03 5.002E-03 3.179E-03 1.782E-03 7.971E-04 2.096E-04 9.375E-07 1.507E-04 6.364E-04 1.434E-03 2.518E-03 3.862E-03 5.437E-03 7.216E-03 9.169E-03 1.127E-02 1.348E-02 1.578E-02 1.815E-02 2.054E-02 2.294E-02 2.531E-02 2.765E-02 2.991E-02 3.209E-02 3.415E-02 3.609E-02 3.789E-02 3.953E-02 4.100E-02 4.230E-02 4.340E-02 4.431E-02 4.503E-02 4.554E-02 4.586E-02 4.597E-02 4.589E-02 4.562E-02 4.516E-02 4.452E-02 4.397E-02 4.473E-02 4.531E-02 4.572E-02 4.593E-02 4.596E-02 4.578E-02 4.540E-02 4.483E-02 4.405E-02 4.307E-02 4.190E-02 4.054E-02 3.901E-02 3.731E-02 3.546E-02 3.347E-02 3.136E-02 2.915E-02 2.685E-02 2.449E-02 2.210E-02 1.969E-02 1.730E-02 1.494E-02 1.266E-02 1.048E-02 8.424E-03 6.525E-03 4.814E-03 3.318E-03 2.066E-03 1.086E-03 4.056E-04 4.919E-05 4.092E-05 4.028E-04 1.155E-03 2.314E-03 3.896E-03 5.913E-03 8.375E-03 1.129E-02 1.465E-02 1.847E-02 2.274E-02 2.745E-02 3.259E-02 3.814E-02 4.409E-02 5.042E-02 5.710E-02 6.410E-02 7.139E-02 7.893E-02 8.668E-02 9.462E-02 1.027E-01 1.108E-01 1.190E-01 1.272E-01 1.354E-01 1.434E-01 1.513E-01 1.589E-01 1.663E-01 1.735E-01 1.802E-01 1.866E-01 1.926E-01 1.980E-01 2.030E-01 2.074E-01 2.112E-01 2.145E-01 2.171E-01 2.191E-01 2.204E-01 2.211E-01 2.211E-01 2.204E-01 2.191E-01 2.171E-01 2.146E-01 2.114E-01 2.076E-01 2.033E-01 1.985E-01 1.932E-01 1.875E-01 1.813E-01 1.748E-01 1.680E-01 1.610E-01 1.538E-01 1.464E-01 1.389E-01 1.313E-01 1.237E-01 1.162E-01 1.088E-01 1.015E-01 9.435E-02 8.741E-02 8.071E-02 7.428E-02 6.813E-02 6.230E-02 5.679E-02 5.161E-02 4.679E-02 4.231E-02 3.819E-02 3.441E-02 3.098E-02 2.787E-02 2.508E-02 2.260E-02 2.042E-02 1.850E-02 1.684E-02 1.543E-02 1.424E-02 1.326E-02 1.248E-02 1.189E-02 1.147E-02 1.122E-02 1.114E-02 1.122E-02 1.147E-02 1.189E-02 1.248E-02 1.326E-02 1.424E-02 1.543E-02 1.684E-02 1.850E-02 2.042E-02 2.260E-02 2.508E-02 2.787E-02 3.098E-02 3.441E-02 3.819E-02 4.231E-02 4.679E-02 5.161E-02 5.679E-02 6.230E-02 6.813E-02 7.428E-02 8.071E-02 8.741E-02 9.435E-02 1.015E-01 1.088E-01 1.162E-01 1.237E-01 1.313E-01 1.389E-01 1.464E-01 1.538E-01 1.610E-01 1.680E-01 1.748E-01 1.813E-01 1.875E-01 1.932E-01 1.985E-01 2.033E-01 2.076E-01 2.114E-01 2.146E-01 2.171E-01 2.191E-01 2.204E-01 2.211E-01 2.211E-01 2.204E-01 2.191E-01 2.171E-01 2.145E-01 2.112E-01 2.074E-01 2.030E-01 1.980E-01 1.926E-01 1.866E-01 1.802E-01 1.735E-01 1.663E-01 1.589E-01 1.513E-01 1.434E-01 1.354E-01 1.272E-01 1.190E-01 1.108E-01 1.027E-01 9.462E-02 8.668E-02 7.893E-02 7.139E-02 6.410E-02 5.710E-02 5.042E-02 4.409E-02 3.814E-02 3.259E-02 2.745E-02 2.274E-02 1.847E-02 1.465E-02 1.129E-02 8.375E-03 5.913E-03 3.896E-03 2.314E-03 1.155E-03 4.028E-04 4.092E-05 4.919E-05 4.056E-04 1.086E-03 2.066E-03 3.318E-03 4.814E-03 6.525E-03 8.424E-03 1.048E-02 1.266E-02 1.494E-02 1.730E-02 1.969E-02 2.210E-02 2.449E-02 2.685E-02 2.915E-02 3.136E-02 3.347E-02 3.546E-02 3.731E-02 3.901E-02 4.054E-02 4.190E-02 4.307E-02 4.405E-02 4.483E-02 4.540E-02 4.578E-02 4.596E-02 4.593E-02 4.572E-02 4.531E-02 4.473E-02 4.420E-02 4.492E-02 4.545E-02 4.580E-02 4.596E-02 4.593E-02 4.569E-02 4.525E-02 4.461E-02 4.377E-02 4.273E-02 4.150E-02 4.008E-02 3.849E-02 3.674E-02 3.483E-02 3.280E-02 3.064E-02 2.839E-02 2.606E-02 2.368E-02 2.127E-02 1.886E-02 1.647E-02 1.413E-02 1.187E-02 9.726E-03 7.717E-03 5.876E-03 4.234E-03 2.820E-03 1.663E-03 7.903E-04 2.286E-04 3.342E-06 1.379E-04 6.540E-04 1.571E-03 2.906E-03 4.672E-03 6.882E-03 9.544E-03 1.266E-02 1.624E-02 2.027E-02 2.476E-02 2.969E-02 3.505E-02 4.082E-02 4.698E-02 5.351E-02 6.039E-02 6.757E-02 7.504E-02 8.274E-02 9.065E-02 9.871E-02 1.069E-01 1.151E-01 1.234E-01 1.316E-01 1.398E-01 1.478E-01 1.556E-01 1.632E-01 1.705E-01 1.775E-01 1.841E-01 1.903E-01 1.960E-01 2.012E-01 2.059E-01 2.100E-01 2.135E-01 2.163E-01 2.185E-01 2.201E-01 2.209E-01 2.211E-01 2.206E-01 2.195E-01 2.176E-01 2.151E-01 2.120E-01 2.083E-01 2.040E-01 1.991E-01 1.937E-01 1.879E-01 1.816E-01 1.750E-01 1.680E-01 1.608E-01 1.533E-01 1.457E-01 1.379E-01 1.301E-01 1.222E-01 1.144E-01 1.067E-01 9.907E-02 9.163E-02 8.441E-02 7.743E-02 7.072E-02 6.433E-02 5.826E-02 5.254E-02 4.718E-02 4.219E-02 3.757E-02 3.333E-02 2.947E-02 2.597E-02 2.282E-02 2.001E-02 1.752E-02 1.534E-02 1.344E-02 1.181E-02 1.041E-02 9.244E-03 8.276E-03 7.491E-03 6.874E-03 6.409E-03 6.085E-03 5.894E-03 5.831E-03 5.894E-03 6.085E-03 6.409E-03 6.874E-03 7.491E-03 8.276E-03 9.244E-03 1.041E-02 1.181E-02 1.344E-02 1.534E-02 1.752E-02 2.001E-02 2.282E-02 2.597E-02 2.947E-02 3.333E-02 3.757E-02 4.219E-02 4.718E-02 5.254E-02 5.826E-02 6.433E-02 7.072E-02 7.743E-02 8.441E-02 9.163E-02 9.907E-02 1.067E-01 1.144E-01 1.222E-01 1.301E-01 1.379E-01 1.457E-01 1.533E-01 1.608E-01 1.680E-01 1.750E-01 1.816E-01 1.879E-01 1.937E-01 1.991E-01 2.040E-01 2.083E-01 2.120E-01 2.151E-01 2.176E-01 2.195E-01 2.206E-01 2.211E-01 2.209E-01 2.201E-01 2.185E-01 2.163E-01 2.135E-01 2.100E-01 2.059E-01 2.012E-01 1.960E-01 1.903E-01 1.841E-01 1.775E-01 1.705E-01 1.632E-01 1.556E-01 1.478E-01 1.398E-01 1.316E-01 1.234E-01 1.151E-01 1.069E-01 9.871E-02 9.065E-02 8.274E-02 7.504E-02 6.757E-02 6.039E-02 5.351E-02 4.698E-02 4.082E-02 3.505E-02 2.969E-02 2.476E-02 2.027E-02 1.624E-02 1.266E-02 9.544E-03 6.882E-03 4.672E-03 2.906E-03 1.571E-03 6.540E-04 1.379E-04 3.342E-06 2.286E-04 7.903E-04 1.663E-03 2.820E-03 4.234E-03 5.876E-03 7.717E-03 9.726E-03 1.187E-02 1.413E-02 1.647E-02 1.886E-02 2.127E-02 2.368E-02 2.606E-02 2.839E-02 3.064E-02 3.280E-02 3.483E-02 3.674E-02 3.849E-02 4.008E-02 4.150E-02 4.273E-02 4.377E-02 4.461E-02 4.525E-02 4.569E-02 4.593E-02 4.596E-02 4.580E-02 4.545E-02 4.492E-02 4.442E-02 4.508E-02 4.557E-02 4.587E-02 4.597E-02 4.588E-02 4.558E-02 4.508E-02 4.438E-02 4.348E-02 4.238E-02 4.109E-02 3.961E-02 3.796E-02 3.616E-02 3.421E-02 3.212E-02 2.993E-02 2.765E-02 2.529E-02 2.289E-02 2.047E-02 1.805E-02 1.567E-02 1.335E-02 1.112E-02 9.008E-03 7.048E-03 5.268E-03 3.699E-03 2.369E-03 1.309E-03 5.445E-04 1.036E-04 1.073E-05 2.892E-04 9.600E-04 2.042E-03 3.552E-03 5.502E-03 7.904E-03 1.076E-02 1.409E-02 1.787E-02 2.212E-02 2.682E-02 3.196E-02 3.753E-02 4.351E-02 4.988E-02 5.661E-02 6.367E-02 7.104E-02 7.867E-02 8.652E-02 9.456E-02 1.027E-01 1.110E-01 1.193E-01 1.276E-01 1.359E-01 1.441E-01 1.520E-01 1.598E-01 1.673E-01 1.745E-01 1.814E-01 1.878E-01 1.938E-01 1.992E-01 2.042E-01 2.085E-01 2.123E-01 2.154E-01 2.179E-01 2.196E-01 2.207E-01 2.211E-01 2.208E-01 2.198E-01 2.182E-01 2.158E-01 2.128E-01 2.091E-01 2.048E-01 2.000E-01 1.946E-01 1.887E-01 1.823E-01 1.755E-01 1.684E-01 1.610E-01 1.533E-01 1.455E-01 1.374E-01 1.293E-01 1.212E-01 1.131E-01 1.051E-01 9.718E-02 8.946E-02 8.194E-02 7.469E-02 6.772E-02 6.108E-02 5.479E-02 4.886E-02 4.333E-02 3.819E-02 3.345E-02 2.912E-02 2.519E-02 2.166E-02 1.850E-02 1.571E-02 1.326E-02 1.114E-02 9.320E-03 7.773E-03 6.474E-03 5.398E-03 4.519E-03 3.813E-03 3.258E-03 2.832E-03 2.520E-03 2.307E-03 2.184E-03 2.143E-03 2.184E-03 2.307E-03 2.520E-03 2.832E-03 3.258E-03 3.813E-03 4.519E-03 5.398E-03 6.474E-03 7.773E-03 9.320E-03 1.114E-02 1.326E-02 1.571E-02 1.850E-02 2.166E-02 2.519E-02 2.912E-02 3.345E-02 3.819E-02 4.333E-02 4.886E-02 5.479E-02 6.108E-02 6.772E-02 7.469E-02 8.194E-02 8.946E-02 9.718E-02 1.051E-01 1.131E-01 1.212E-01 1.293E-01 1.374E-01 1.455E-01 1.533E-01 1.610E-01 1.684E-01 1.755E-01 1.823E-01 1.887E-01 1.946E-01 2.000E-01 2.048E-01 2.091E-01 2.128E-01 2.158E-01 2.182E-01 2.198E-01 2.208E-01 2.211E-01 2.207E-01 2.196E-01 2.179E-01 2.154E-01 2.123E-01 2.085E-01 2.042E-01 1.992E-01 1.938E-01 1.878E-01 1.814E-01 1.745E-01 1.673E-01 1.598E-01 1.520E-01 1.441E-01 1.359E-01 1.276E-01 1.193E-01 1.110E-01 1.027E-01 9.456E-02 8.652E-02 7.867E-02 7.104E-02 6.367E-02 5.661E-02 4.988E-02 4.351E-02 3.753E-02 3.196E-02 2.682E-02 2.212E-02 1.787E-02 1.409E-02 1.076E-02 7.904E-03 5.502E-03 3.552E-03 2.042E-03 9.600E-04 2.892E-04 1.073E-05 1.036E-04 5.445E-04 1.309E-03 2.369E-03 3.699E-03 5.268E-03 7.048E-03 9.008E-03 1.112E-02 1.335E-02 1.567E-02 1.805E-02 2.047E-02 2.289E-02 2.529E-02 2.765E-02 2.993E-02 3.212E-02 3.421E-02 3.616E-02 3.796E-02 3.961E-02 4.109E-02 4.238E-02 4.348E-02 4.438E-02 4.508E-02 4.558E-02 4.588E-02 4.597E-02 4.587E-02 4.557E-02 4.508E-02 4.462E-02 4.523E-02 4.567E-02 4.592E-02 4.597E-02 4.582E-02 4.546E-02 4.490E-02 4.414E-02 4.318E-02 4.202E-02 4.067E-02 3.914E-02 3.744E-02 3.558E-02 3.358E-02 3.146E-02 2.923E-02 2.691E-02 2.453E-02 2.212E-02 1.969E-02 1.727E-02 1.490E-02 1.260E-02 1.040E-02 8.326E-03 6.417E-03 4.700E-03 3.206E-03 1.963E-03 1.001E-03 3.472E-04 2.826E-05 6.879E-05 4.916E-04 1.317E-03 2.564E-03 4.248E-03 6.381E-03 8.973E-03 1.203E-02 1.555E-02 1.955E-02 2.400E-02 2.891E-02 3.426E-02 4.004E-02 4.622E-02 5.279E-02 5.971E-02 6.695E-02 7.448E-02 8.227E-02 9.026E-02 9.843E-02 1.067E-01 1.151E-01 1.234E-01 1.318E-01 1.401E-01 1.482E-01 1.562E-01 1.639E-01 1.713E-01 1.783E-01 1.850E-01 1.912E-01 1.970E-01 2.022E-01 2.068E-01 2.109E-01 2.143E-01 2.170E-01 2.191E-01 2.204E-01 2.211E-01 2.210E-01 2.202E-01 2.187E-01 2.165E-01 2.136E-01 2.100E-01 2.058E-01 2.010E-01 1.956E-01 1.897E-01 1.833E-01 1.764E-01 1.692E-01 1.616E-01 1.538E-01 1.457E-01 1.374E-01 1.291E-01 1.207E-01 1.123E-01 1.040E-01 9.583E-02 8.782E-02 8.003E-02 7.250E-02 6.528E-02 5.839E-02 5.188E-02 4.576E-02 4.005E-02 3.477E-02 2.993E-02 2.552E-02 2.155E-02 1.801E-02 1.488E-02 1.214E-02 9.783E-03 7.773E-03 6.085E-03 4.690E-03 3.556E-03 2.652E-03 1.946E-03 1.408E-03 1.007E-03 7.180E-04 5.163E-04 3.816E-04 2.974E-04 2.518E-04 2.374E-04 2.518E-04 2.974E-04 3.816E-04 5.163E-04 7.180E-04 1.007E-03 1.408E-03 1.946E-03 2.652E-03 3.556E-03 4.690E-03 6.085E-03 7.773E-03 9.783E-03 1.214E-02 1.488E-02 1.801E-02 2.155E-02 2.552E-02 2.993E-02 3.477E-02 4.005E-02 4.576E-02 5.188E-02 5.839E-02 6.528E-02 7.250E-02 8.003E-02 8.782E-02 9.583E-02 1.040E-01 1.123E-01 1.207E-01 1.291E-01 1.374E-01 1.457E-01 1.538E-01 1.616E-01 1.692E-01 1.764E-01 1.833E-01 1.897E-01 1.956E-01 2.010E-01 2.058E-01 2.100E-01 2.136E-01 2.165E-01 2.187E-01 2.202E-01 2.210E-01 2.211E-01 2.204E-01 2.191E-01 2.170E-01 2.143E-01 2.109E-01 2.068E-01 2.022E-01 1.970E-01 1.912E-01 1.850E-01 1.783E-01 1.713E-01 1.639E-01 1.562E-01 1.482E-01 1.401E-01 1.318E-01 1.234E-01 1.151E-01 1.067E-01 9.843E-02 9.026E-02 8.227E-02 7.448E-02 6.695E-02 5.971E-02 5.279E-02 4.622E-02 4.004E-02 3.426E-02 2.891E-02 2.400E-02 1.955E-02 1.555E-02 1.203E-02 8.973E-03 6.381E-03 4.248E-03 2.564E-03 1.317E-03 4.916E-04 6.879E-05 2.826E-05 3.472E-04 1.001E-03 1.963E-03 3.206E-03 4.700E-03 6.417E-03 8.326E-03 1.040E-02 1.260E-02 1.490E-02 1.727E-02 1.969E-02 2.212E-02 2.453E-02 2.691E-02 2.923E-02 3.146E-02 3.358E-02 3.558E-02 3.744E-02 3.914E-02 4.067E-02 4.202E-02 4.318E-02 4.414E-02 4.490E-02 4.546E-02 4.582E-02 4.597E-02 4.592E-02 4.567E-02 4.523E-02 4.479E-02 4.537E-02 4.575E-02 4.595E-02 4.594E-02 4.574E-02 4.533E-02 4.471E-02 4.389E-02 4.287E-02 4.165E-02 4.025E-02 3.866E-02 3.691E-02 3.501E-02 3.296E-02 3.080E-02 2.854E-02 2.619E-02 2.379E-02 2.136E-02 1.893E-02 1.652E-02 1.415E-02 1.187E-02 9.706E-03 7.678E-03 5.824E-03 4.173E-03 2.755E-03 1.601E-03 7.385E-04 1.963E-04 2.914E-07 1.748E-04 7.422E-04 1.723E-03 3.134E-03 4.991E-03 7.304E-03 1.008E-02 1.333E-02 1.706E-02 2.125E-02 2.591E-02 3.102E-02 3.658E-02 4.255E-02 4.893E-02 5.569E-02 6.279E-02 7.020E-02 7.790E-02 8.583E-02 9.395E-02 1.022E-01 1.106E-01 1.190E-01 1.275E-01 1.358E-01 1.441E-01 1.522E-01 1.601E-01 1.677E-01 1.750E-01 1.820E-01 1.884E-01 1.945E-01 2.000E-01 2.049E-01 2.093E-01 2.130E-01 2.160E-01 2.184E-01 2.200E-01 2.209E-01 2.211E-01 2.206E-01 2.193E-01 2.173E-01 2.145E-01 2.111E-01 2.070E-01 2.023E-01 1.969E-01 1.910E-01 1.846E-01 1.777E-01 1.703E-01 1.626E-01 1.546E-01 1.464E-01 1.379E-01 1.293E-01 1.207E-01 1.121E-01 1.035E-01 9.502E-02 8.673E-02 7.866E-02 7.086E-02 6.338E-02 5.625E-02 4.952E-02 4.320E-02 3.733E-02 3.191E-02 2.697E-02 2.250E-02 1.850E-02 1.497E-02 1.189E-02 9.244E-03 7.009E-03 5.157E-03 3.658E-03 2.477E-03 1.578E-03 9.237E-04 4.758E-04 1.968E-04 4.997E-05 9.434E-07 1.796E-05 7.283E-05 1.415E-04 2.048E-04 2.485E-04 2.640E-04 2.485E-04 2.048E-04 1.415E-04 7.283E-05 1.796E-05 9.434E-07 4.997E-05 1.968E-04 4.758E-04 9.237E-04 1.578E-03 2.477E-03 3.658E-03 5.157E-03 7.009E-03 9.244E-03 1.189E-02 1.497E-02 1.850E-02 2.250E-02 2.697E-02 3.191E-02 3.733E-02 4.320E-02 4.952E-02 5.625E-02 6.338E-02 7.086E-02 7.866E-02 8.673E-02 9.502E-02 1.035E-01 1.121E-01 1.207E-01 1.293E-01 1.379E-01 1.464E-01 1.546E-01 1.626E-01 1.703E-01 1.777E-01 1.846E-01 1.910E-01 1.969E-01 2.023E-01 2.070E-01 2.111E-01 2.145E-01 2.173E-01 2.193E-01 2.206E-01 2.211E-01 2.209E-01 2.200E-01 2.184E-01 2.160E-01 2.130E-01 2.093E-01 2.049E-01 2.000E-01 1.945E-01 1.884E-01 1.820E-01 1.750E-01 1.677E-01 1.601E-01 1.522E-01 1.441E-01 1.358E-01 1.275E-01 1.190E-01 1.106E-01 1.022E-01 9.395E-02 8.583E-02 7.790E-02 7.020E-02 6.279E-02 5.569E-02 4.893E-02 4.255E-02 3.658E-02 3.102E-02 2.591E-02 2.125E-02 1.706E-02 1.333E-02 1.008E-02 7.304E-03 4.991E-03 3.134E-03 1.723E-03 7.422E-04 1.748E-04 2.914E-07 1.963E-04 7.385E-04 1.601E-03 2.755E-03 4.173E-03 5.824E-03 7.678E-03 9.706E-03 1.187E-02 1.415E-02 1.652E-02 1.893E-02 2.136E-02 2.379E-02 2.619E-02 2.854E-02 3.080E-02 3.296E-02 3.501E-02 3.691E-02 3.866E-02 4.025E-02 4.165E-02 4.287E-02 4.389E-02 4.471E-02 4.533E-02 4.574E-02 4.594E-02 4.595E-02 4.575E-02 4.537E-02 4.496E-02 4.548E-02 4.582E-02 4.597E-02 4.591E-02 4.565E-02 4.518E-02 4.451E-02 4.363E-02 4.256E-02 4.128E-02 3.983E-02 3.819E-02 3.639E-02 3.444E-02 3.235E-02 3.015E-02 2.786E-02 2.549E-02 2.307E-02 2.063E-02 1.819E-02 1.578E-02 1.344E-02 1.118E-02 9.048E-03 7.066E-03 5.268E-03 3.684E-03 2.345E-03 1.280E-03 5.195E-04 8.981E-05 1.718E-05 3.258E-04 1.038E-03 2.172E-03 3.746E-03 5.774E-03 8.267E-03 1.123E-02 1.467E-02 1.859E-02 2.298E-02 2.784E-02 3.315E-02 3.890E-02 4.507E-02 5.164E-02 5.857E-02 6.585E-02 7.343E-02 8.127E-02 8.934E-02 9.758E-02 1.060E-01 1.144E-01 1.229E-01 1.314E-01 1.398E-01 1.480E-01 1.561E-01 1.639E-01 1.714E-01 1.786E-01 1.854E-01 1.917E-01 1.975E-01 2.027E-01 2.074E-01 2.114E-01 2.148E-01 2.175E-01 2.194E-01 2.207E-01 2.211E-01 2.209E-01 2.198E-01 2.181E-01 2.155E-01 2.123E-01 2.083E-01 2.037E-01 1.984E-01 1.926E-01 1.861E-01 1.792E-01 1.718E-01 1.640E-01 1.559E-01 1.475E-01 1.389E-01 1.301E-01 1.212E-01 1.123E-01 1.035E-01 9.475E-02 8.618E-02 7.784E-02 6.977E-02 6.203E-02 5.466E-02 4.770E-02 4.118E-02 3.513E-02 2.958E-02 2.454E-02 2.001E-02 1.599E-02 1.248E-02 9.473E-03 6.941E-03 4.863E-03 3.209E-03 1.946E-03 1.036E-03 4.369E-04 1.066E-04 2.496E-07 7.283E-05 2.800E-04 5.789E-04 9.292E-04 1.294E-03 1.640E-03 1.939E-03 2.169E-03 2.314E-03 2.364E-03 2.314E-03 2.169E-03 1.939E-03 1.640E-03 1.294E-03 9.292E-04 5.789E-04 2.800E-04 7.283E-05 2.496E-07 1.066E-04 4.369E-04 1.036E-03 1.946E-03 3.209E-03 4.863E-03 6.941E-03 9.473E-03 1.248E-02 1.599E-02 2.001E-02 2.454E-02 2.958E-02 3.513E-02 4.118E-02 4.770E-02 5.466E-02 6.203E-02 6.977E-02 7.784E-02 8.618E-02 9.475E-02 1.035E-01 1.123E-01 1.212E-01 1.301E-01 1.389E-01 1.475E-01 1.559E-01 1.640E-01 1.718E-01 1.792E-01 1.861E-01 1.926E-01 1.984E-01 2.037E-01 2.083E-01 2.123E-01 2.155E-01 2.181E-01 2.198E-01 2.209E-01 2.211E-01 2.207E-01 2.194E-01 2.175E-01 2.148E-01 2.114E-01 2.074E-01 2.027E-01 1.975E-01 1.917E-01 1.854E-01 1.786E-01 1.714E-01 1.639E-01 1.561E-01 1.480E-01 1.398E-01 1.314E-01 1.229E-01 1.144E-01 1.060E-01 9.758E-02 8.934E-02 8.127E-02 7.343E-02 6.585E-02 5.857E-02 5.164E-02 4.507E-02 3.890E-02 3.315E-02 2.784E-02 2.298E-02 1.859E-02 1.467E-02 1.123E-02 8.267E-03 5.774E-03 3.746E-03 2.172E-03 1.038E-03 3.258E-04 1.718E-05 8.981E-05 5.195E-04 1.280E-03 2.345E-03 3.684E-03 5.268E-03 7.066E-03 9.048E-03 1.118E-02 1.344E-02 1.578E-02 1.819E-02 2.063E-02 2.307E-02 2.549E-02 2.786E-02 3.015E-02 3.235E-02 3.444E-02 3.639E-02 3.819E-02 3.983E-02 4.128E-02 4.256E-02 4.363E-02 4.451E-02 4.518E-02 4.565E-02 4.591E-02 4.597E-02 4.582E-02 4.548E-02 4.510E-02 4.559E-02 4.588E-02 4.597E-02 4.586E-02 4.555E-02 4.503E-02 4.430E-02 4.337E-02 4.224E-02 4.091E-02 3.940E-02 3.772E-02 3.587E-02 3.387E-02 3.175E-02 2.951E-02 2.719E-02 2.480E-02 2.236E-02 1.991E-02 1.748E-02 1.508E-02 1.275E-02 1.052E-02 8.424E-03 6.489E-03 4.749E-03 3.234E-03 1.974E-03 1.001E-03 3.421E-04 2.532E-05 7.627E-05 5.187E-04 1.374E-03 2.662E-03 4.398E-03 6.595E-03 9.264E-03 1.241E-02 1.604E-02 2.015E-02 2.473E-02 2.978E-02 3.529E-02 4.123E-02 4.759E-02 5.433E-02 6.144E-02 6.888E-02 7.661E-02 8.460E-02 9.279E-02 1.011E-01 1.096E-01 1.181E-01 1.267E-01 1.352E-01 1.436E-01 1.518E-01 1.598E-01 1.676E-01 1.750E-01 1.820E-01 1.886E-01 1.947E-01 2.003E-01 2.053E-01 2.096E-01 2.133E-01 2.164E-01 2.187E-01 2.202E-01 2.210E-01 2.211E-01 2.203E-01 2.188E-01 2.165E-01 2.135E-01 2.097E-01 2.053E-01 2.001E-01 1.944E-01 1.880E-01 1.811E-01 1.737E-01 1.658E-01 1.576E-01 1.490E-01 1.403E-01 1.313E-01 1.222E-01 1.131E-01 1.040E-01 9.502E-02 8.618E-02 7.756E-02 6.922E-02 6.122E-02 5.359E-02 4.640E-02 3.968E-02 3.345E-02 2.776E-02 2.260E-02 1.801E-02 1.397E-02 1.049E-02 7.561E-03 5.157E-03 3.258E-03 1.832E-03 8.437E-04 2.518E-04 1.105E-05 7.283E-05 3.863E-04 8.991E-04 1.559E-03 2.314E-03 3.115E-03 3.914E-03 4.670E-03 5.343E-03 5.901E-03 6.319E-03 6.577E-03 6.665E-03 6.577E-03 6.319E-03 5.901E-03 5.343E-03 4.670E-03 3.914E-03 3.115E-03 2.314E-03 1.559E-03 8.991E-04 3.863E-04 7.283E-05 1.105E-05 2.518E-04 8.437E-04 1.832E-03 3.258E-03 5.157E-03 7.561E-03 1.049E-02 1.397E-02 1.801E-02 2.260E-02 2.776E-02 3.345E-02 3.968E-02 4.640E-02 5.359E-02 6.122E-02 6.922E-02 7.756E-02 8.618E-02 9.502E-02 1.040E-01 1.131E-01 1.222E-01 1.313E-01 1.403E-01 1.490E-01 1.576E-01 1.658E-01 1.737E-01 1.811E-01 1.880E-01 1.944E-01 2.001E-01 2.053E-01 2.097E-01 2.135E-01 2.165E-01 2.188E-01 2.203E-01 2.211E-01 2.210E-01 2.202E-01 2.187E-01 2.164E-01 2.133E-01 2.096E-01 2.053E-01 2.003E-01 1.947E-01 1.886E-01 1.820E-01 1.750E-01 1.676E-01 1.598E-01 1.518E-01 1.436E-01 1.352E-01 1.267E-01 1.181E-01 1.096E-01 1.011E-01 9.279E-02 8.460E-02 7.661E-02 6.888E-02 6.144E-02 5.433E-02 4.759E-02 4.123E-02 3.529E-02 2.978E-02 2.473E-02 2.015E-02 1.604E-02 1.241E-02 9.264E-03 6.595E-03 4.398E-03 2.662E-03 1.374E-03 5.187E-04 7.627E-05 2.532E-05 3.421E-04 1.001E-03 1.974E-03 3.234E-03 4.749E-03 6.489E-03 8.424E-03 1.052E-02 1.275E-02 1.508E-02 1.748E-02 1.991E-02 2.236E-02 2.480E-02 2.719E-02 2.951E-02 3.175E-02 3.387E-02 3.587E-02 3.772E-02 3.940E-02 4.091E-02 4.224E-02 4.337E-02 4.430E-02 4.503E-02 4.555E-02 4.586E-02 4.597E-02 4.588E-02 4.559E-02 4.524E-02 4.567E-02 4.592E-02 4.596E-02 4.581E-02 4.544E-02 4.487E-02 4.409E-02 4.310E-02 4.192E-02 4.054E-02 3.898E-02 3.724E-02 3.535E-02 3.332E-02 3.115E-02 2.889E-02 2.654E-02 2.413E-02 2.168E-02 1.922E-02 1.679E-02 1.440E-02 1.209E-02 9.890E-03 7.832E-03 5.946E-03 4.265E-03 2.820E-03 1.642E-03 7.605E-04 2.042E-04 4.667E-07 1.748E-04 7.505E-04 1.749E-03 3.188E-03 5.084E-03 7.448E-03 1.029E-02 1.362E-02 1.743E-02 2.172E-02 2.650E-02 3.173E-02 3.743E-02 4.355E-02 5.009E-02 5.701E-02 6.429E-02 7.188E-02 7.976E-02 8.787E-02 9.618E-02 1.046E-01 1.132E-01 1.218E-01 1.304E-01 1.389E-01 1.472E-01 1.554E-01 1.634E-01 1.710E-01 1.783E-01 1.852E-01 1.916E-01 1.975E-01 2.029E-01 2.076E-01 2.116E-01 2.150E-01 2.177E-01 2.196E-01 2.208E-01 2.211E-01 2.207E-01 2.195E-01 2.175E-01 2.148E-01 2.112E-01 2.070E-01 2.020E-01 1.963E-01 1.901E-01 1.832E-01 1.758E-01 1.679E-01 1.597E-01 1.510E-01 1.421E-01 1.330E-01 1.237E-01 1.144E-01 1.051E-01 9.583E-02 8.673E-02 7.784E-02 6.922E-02 6.095E-02 5.307E-02 4.563E-02 3.868E-02 3.227E-02 2.641E-02 2.114E-02 1.646E-02 1.240E-02 8.941E-03 6.085E-03 3.813E-03 2.103E-03 9.237E-04 2.374E-04 9.434E-07 1.654E-04 6.775E-04 1.481E-03 2.515E-03 3.721E-03 5.037E-03 6.405E-03 7.765E-03 9.066E-03 1.026E-02 1.129E-02 1.214E-02 1.277E-02 1.315E-02 1.328E-02 1.315E-02 1.277E-02 1.214E-02 1.129E-02 1.026E-02 9.066E-03 7.765E-03 6.405E-03 5.037E-03 3.721E-03 2.515E-03 1.481E-03 6.775E-04 1.654E-04 9.434E-07 2.374E-04 9.237E-04 2.103E-03 3.813E-03 6.085E-03 8.941E-03 1.240E-02 1.646E-02 2.114E-02 2.641E-02 3.227E-02 3.868E-02 4.563E-02 5.307E-02 6.095E-02 6.922E-02 7.784E-02 8.673E-02 9.583E-02 1.051E-01 1.144E-01 1.237E-01 1.330E-01 1.421E-01 1.510E-01 1.597E-01 1.679E-01 1.758E-01 1.832E-01 1.901E-01 1.963E-01 2.020E-01 2.070E-01 2.112E-01 2.148E-01 2.175E-01 2.195E-01 2.207E-01 2.211E-01 2.208E-01 2.196E-01 2.177E-01 2.150E-01 2.116E-01 2.076E-01 2.029E-01 1.975E-01 1.916E-01 1.852E-01 1.783E-01 1.710E-01 1.634E-01 1.554E-01 1.472E-01 1.389E-01 1.304E-01 1.218E-01 1.132E-01 1.046E-01 9.618E-02 8.787E-02 7.976E-02 7.188E-02 6.429E-02 5.701E-02 5.009E-02 4.355E-02 3.743E-02 3.173E-02 2.650E-02 2.172E-02 1.743E-02 1.362E-02 1.029E-02 7.448E-03 5.084E-03 3.188E-03 1.749E-03 7.505E-04 1.748E-04 4.667E-07 2.042E-04 7.605E-04 1.642E-03 2.820E-03 4.265E-03 5.946E-03 7.832E-03 9.890E-03 1.209E-02 1.440E-02 1.679E-02 1.922E-02 2.168E-02 2.413E-02 2.654E-02 2.889E-02 3.115E-02 3.332E-02 3.535E-02 3.724E-02 3.898E-02 4.054E-02 4.192E-02 4.310E-02 4.409E-02 4.487E-02 4.544E-02 4.581E-02 4.596E-02 4.592E-02 4.567E-02 4.535E-02 4.575E-02 4.595E-02 4.595E-02 4.574E-02 4.532E-02 4.470E-02 4.386E-02 4.283E-02 4.159E-02 4.016E-02 3.856E-02 3.678E-02 3.484E-02 3.277E-02 3.057E-02 2.828E-02 2.590E-02 2.347E-02 2.101E-02 1.855E-02 1.612E-02 1.375E-02 1.146E-02 9.290E-03 7.272E-03 5.437E-03 3.817E-03 2.443E-03 1.347E-03 5.573E-04 1.036E-04 1.271E-05 3.098E-04 1.018E-03 2.157E-03 3.746E-03 5.800E-03 8.329E-03 1.134E-02 1.484E-02 1.883E-02 2.331E-02 2.826E-02 3.369E-02 3.956E-02 4.586E-02 5.257E-02 5.966E-02 6.709E-02 7.484E-02 8.285E-02 9.108E-02 9.950E-02 1.080E-01 1.167E-01 1.253E-01 1.339E-01 1.424E-01 1.508E-01 1.589E-01 1.668E-01 1.744E-01 1.815E-01 1.882E-01 1.945E-01 2.001E-01 2.052E-01 2.097E-01 2.134E-01 2.165E-01 2.188E-01 2.203E-01 2.211E-01 2.210E-01 2.202E-01 2.185E-01 2.160E-01 2.128E-01 2.087E-01 2.040E-01 1.985E-01 1.924E-01 1.856E-01 1.783E-01 1.704E-01 1.621E-01 1.534E-01 1.444E-01 1.352E-01 1.257E-01 1.162E-01 1.067E-01 9.718E-02 8.782E-02 7.866E-02 6.977E-02 6.122E-02 5.307E-02 4.537E-02 3.819E-02 3.156E-02 2.552E-02 2.011E-02 1.534E-02 1.122E-02 7.773E-03 4.980E-03 2.832E-03 1.310E-03 3.816E-04 1.105E-05 1.532E-04 7.568E-04 1.765E-03 3.115E-03 4.742E-03 6.577E-03 8.552E-03 1.060E-02 1.264E-02 1.462E-02 1.648E-02 1.815E-02 1.959E-02 2.076E-02 2.162E-02 2.214E-02 2.232E-02 2.214E-02 2.162E-02 2.076E-02 1.959E-02 1.815E-02 1.648E-02 1.462E-02 1.264E-02 1.060E-02 8.552E-03 6.577E-03 4.742E-03 3.115E-03 1.765E-03 7.568E-04 1.532E-04 1.105E-05 3.816E-04 1.310E-03 2.832E-03 4.980E-03 7.773E-03 1.122E-02 1.534E-02 2.011E-02 2.552E-02 3.156E-02 3.819E-02 4.537E-02 5.307E-02 6.122E-02 6.977E-02 7.866E-02 8.782E-02 9.718E-02 1.067E-01 1.162E-01 1.257E-01 1.352E-01 1.444E-01 1.534E-01 1.621E-01 1.704E-01 1.783E-01 1.856E-01 1.924E-01 1.985E-01 2.040E-01 2.087E-01 2.128E-01 2.160E-01 2.185E-01 2.202E-01 2.210E-01 2.211E-01 2.203E-01 2.188E-01 2.165E-01 2.134E-01 2.097E-01 2.052E-01 2.001E-01 1.945E-01 1.882E-01 1.815E-01 1.744E-01 1.668E-01 1.589E-01 1.508E-01 1.424E-01 1.339E-01 1.253E-01 1.167E-01 1.080E-01 9.950E-02 9.108E-02 8.285E-02 7.484E-02 6.709E-02 5.966E-02 5.257E-02 4.586E-02 3.956E-02 3.369E-02 2.826E-02 2.331E-02 1.883E-02 1.484E-02 1.134E-02 8.329E-03 5.800E-03 3.746E-03 2.157E-03 1.018E-03 3.098E-04 1.271E-05 1.036E-04 5.573E-04 1.347E-03 2.443E-03 3.817E-03 5.437E-03 7.272E-03 9.290E-03 1.146E-02 1.375E-02 1.612E-02 1.855E-02 2.101E-02 2.347E-02 2.590E-02 2.828E-02 3.057E-02 3.277E-02 3.484E-02 3.678E-02 3.856E-02 4.016E-02 4.159E-02 4.283E-02 4.386E-02 4.470E-02 4.532E-02 4.574E-02 4.595E-02 4.595E-02 4.575E-02 4.546E-02 4.581E-02 4.596E-02 4.592E-02 4.566E-02 4.520E-02 4.452E-02 4.364E-02 4.255E-02 4.127E-02 3.979E-02 3.814E-02 3.631E-02 3.434E-02 3.223E-02 3.000E-02 2.768E-02 2.528E-02 2.284E-02 2.037E-02 1.791E-02 1.548E-02 1.312E-02 1.086E-02 8.719E-03 6.744E-03 4.961E-03 3.402E-03 2.101E-03 1.086E-03 3.892E-04 3.801E-05 5.944E-05 4.784E-04 1.317E-03 2.597E-03 4.333E-03 6.541E-03 9.232E-03 1.241E-02 1.608E-02 2.025E-02 2.490E-02 3.003E-02 3.563E-02 4.168E-02 4.815E-02 5.503E-02 6.228E-02 6.986E-02 7.774E-02 8.588E-02 9.423E-02 1.027E-01 1.114E-01 1.200E-01 1.287E-01 1.374E-01 1.459E-01 1.542E-01 1.623E-01 1.701E-01 1.775E-01 1.845E-01 1.911E-01 1.971E-01 2.026E-01 2.074E-01 2.116E-01 2.150E-01 2.177E-01 2.197E-01 2.208E-01 2.211E-01 2.207E-01 2.194E-01 2.172E-01 2.143E-01 2.105E-01 2.060E-01 2.008E-01 1.948E-01 1.882E-01 1.810E-01 1.732E-01 1.649E-01 1.562E-01 1.471E-01 1.378E-01 1.282E-01 1.185E-01 1.088E-01 9.907E-02 8.946E-02 8.003E-02 7.086E-02 6.203E-02 5.359E-02 4.563E-02 3.819E-02 3.133E-02 2.508E-02 1.950E-02 1.460E-02 1.041E-02 6.941E-03 4.187E-03 2.143E-03 7.923E-04 1.066E-04 5.039E-05 5.789E-04 1.640E-03 3.173E-03 5.113E-03 7.388E-03 9.923E-03 1.264E-02 1.546E-02 1.831E-02 2.110E-02 2.376E-02 2.623E-02 2.843E-02 3.031E-02 3.183E-02 3.294E-02 3.362E-02 3.385E-02 3.362E-02 3.294E-02 3.183E-02 3.031E-02 2.843E-02 2.623E-02 2.376E-02 2.110E-02 1.831E-02 1.546E-02 1.264E-02 9.923E-03 7.388E-03 5.113E-03 3.173E-03 1.640E-03 5.789E-04 5.039E-05 1.066E-04 7.923E-04 2.143E-03 4.187E-03 6.941E-03 1.041E-02 1.460E-02 1.950E-02 2.508E-02 3.133E-02 3.819E-02 4.563E-02 5.359E-02 6.203E-02 7.086E-02 8.003E-02 8.946E-02 9.907E-02 1.088E-01 1.185E-01 1.282E-01 1.378E-01 1.471E-01 1.562E-01 1.649E-01 1.732E-01 1.810E-01 1.882E-01 1.948E-01 2.008E-01 2.060E-01 2.105E-01 2.143E-01 2.172E-01 2.194E-01 2.207E-01 2.211E-01 2.208E-01 2.197E-01 2.177E-01 2.150E-01 2.116E-01 2.074E-01 2.026E-01 1.971E-01 1.911E-01 1.845E-01 1.775E-01 1.701E-01 1.623E-01 1.542E-01 1.459E-01 1.374E-01 1.287E-01 1.200E-01 1.114E-01 1.027E-01 9.423E-02 8.588E-02 7.774E-02 6.986E-02 6.228E-02 5.503E-02 4.815E-02 4.168E-02 3.563E-02 3.003E-02 2.490E-02 2.025E-02 1.608E-02 1.241E-02 9.232E-03 6.541E-03 4.333E-03 2.597E-03 1.317E-03 4.784E-04 5.944E-05 3.801E-05 3.892E-04 1.086E-03 2.101E-03 3.402E-03 4.961E-03 6.744E-03 8.719E-03 1.086E-02 1.312E-02 1.548E-02 1.791E-02 2.037E-02 2.284E-02 2.528E-02 2.768E-02 3.000E-02 3.223E-02 3.434E-02 3.631E-02 3.814E-02 3.979E-02 4.127E-02 4.255E-02 4.364E-02 4.452E-02 4.520E-02 4.566E-02 4.592E-02 4.596E-02 4.581E-02 4.555E-02 4.586E-02 4.597E-02 4.588E-02 4.558E-02 4.506E-02 4.434E-02 4.341E-02 4.227E-02 4.094E-02 3.942E-02 3.772E-02 3.586E-02 3.385E-02 3.170E-02 2.944E-02 2.709E-02 2.468E-02 2.222E-02 1.974E-02 1.728E-02 1.487E-02 1.252E-02 1.028E-02 8.179E-03 6.247E-03 4.516E-03 3.021E-03 1.791E-03 8.593E-04 2.544E-04 5.093E-06 1.379E-04 6.775E-04 1.646E-03 3.063E-03 4.944E-03 7.304E-03 1.015E-02 1.350E-02 1.734E-02 2.167E-02 2.650E-02 3.180E-02 3.757E-02 4.378E-02 5.042E-02 5.745E-02 6.485E-02 7.258E-02 8.059E-02 8.885E-02 9.730E-02 1.059E-01 1.146E-01 1.233E-01 1.320E-01 1.407E-01 1.492E-01 1.575E-01 1.655E-01 1.732E-01 1.805E-01 1.874E-01 1.938E-01 1.996E-01 2.048E-01 2.094E-01 2.132E-01 2.164E-01 2.187E-01 2.203E-01 2.211E-01 2.210E-01 2.201E-01 2.183E-01 2.158E-01 2.124E-01 2.081E-01 2.032E-01 1.974E-01 1.910E-01 1.839E-01 1.763E-01 1.680E-01 1.594E-01 1.503E-01 1.408E-01 1.312E-01 1.213E-01 1.114E-01 1.015E-01 9.163E-02 8.194E-02 7.250E-02 6.338E-02 5.466E-02 4.640E-02 3.868E-02 3.156E-02 2.508E-02 1.930E-02 1.424E-02 9.939E-03 6.409E-03 3.658E-03 1.685E-03 4.758E-04 8.147E-06 2.485E-04 1.154E-03 2.672E-03 4.742E-03 7.295E-03 1.026E-02 1.354E-02 1.707E-02 2.076E-02 2.450E-02 2.822E-02 3.183E-02 3.524E-02 3.837E-02 4.115E-02 4.352E-02 4.542E-02 4.681E-02 4.766E-02 4.794E-02 4.766E-02 4.681E-02 4.542E-02 4.352E-02 4.115E-02 3.837E-02 3.524E-02 3.183E-02 2.822E-02 2.450E-02 2.076E-02 1.707E-02 1.354E-02 1.026E-02 7.295E-03 4.742E-03 2.672E-03 1.154E-03 2.485E-04 8.147E-06 4.758E-04 1.685E-03 3.658E-03 6.409E-03 9.939E-03 1.424E-02 1.930E-02 2.508E-02 3.156E-02 3.868E-02 4.640E-02 5.466E-02 6.338E-02 7.250E-02 8.194E-02 9.163E-02 1.015E-01 1.114E-01 1.213E-01 1.312E-01 1.408E-01 1.503E-01 1.594E-01 1.680E-01 1.763E-01 1.839E-01 1.910E-01 1.974E-01 2.032E-01 2.081E-01 2.124E-01 2.158E-01 2.183E-01 2.201E-01 2.210E-01 2.211E-01 2.203E-01 2.187E-01 2.164E-01 2.132E-01 2.094E-01 2.048E-01 1.996E-01 1.938E-01 1.874E-01 1.805E-01 1.732E-01 1.655E-01 1.575E-01 1.492E-01 1.407E-01 1.320E-01 1.233E-01 1.146E-01 1.059E-01 9.730E-02 8.885E-02 8.059E-02 7.258E-02 6.485E-02 5.745E-02 5.042E-02 4.378E-02 3.757E-02 3.180E-02 2.650E-02 2.167E-02 1.734E-02 1.350E-02 1.015E-02 7.304E-03 4.944E-03 3.063E-03 1.646E-03 6.775E-04 1.379E-04 5.093E-06 2.544E-04 8.593E-04 1.791E-03 3.021E-03 4.516E-03 6.247E-03 8.179E-03 1.028E-02 1.252E-02 1.487E-02 1.728E-02 1.974E-02 2.222E-02 2.468E-02 2.709E-02 2.944E-02 3.170E-02 3.385E-02 3.586E-02 3.772E-02 3.942E-02 4.094E-02 4.227E-02 4.341E-02 4.434E-02 4.506E-02 4.558E-02 4.588E-02 4.597E-02 4.586E-02 4.563E-02 4.590E-02 4.597E-02 4.583E-02 4.548E-02 4.492E-02 4.416E-02 4.318E-02 4.200E-02 4.062E-02 3.905E-02 3.731E-02 3.541E-02 3.336E-02 3.118E-02 2.890E-02 2.653E-02 2.409E-02 2.162E-02 1.914E-02 1.668E-02 1.428E-02 1.195E-02 9.736E-03 7.669E-03 5.780E-03 4.103E-03 2.671E-03 1.514E-03 6.639E-04 1.507E-04 2.384E-06 2.454E-04 9.039E-04 2.000E-03 3.552E-03 5.576E-03 8.084E-03 1.109E-02 1.459E-02 1.859E-02 2.309E-02 2.808E-02 3.355E-02 3.949E-02 4.586E-02 5.266E-02 5.984E-02 6.738E-02 7.524E-02 8.338E-02 9.174E-02 1.003E-01 1.090E-01 1.177E-01 1.265E-01 1.352E-01 1.439E-01 1.523E-01 1.606E-01 1.685E-01 1.761E-01 1.833E-01 1.901E-01 1.962E-01 2.019E-01 2.068E-01 2.111E-01 2.147E-01 2.175E-01 2.196E-01 2.208E-01 2.211E-01 2.207E-01 2.193E-01 2.171E-01 2.141E-01 2.103E-01 2.056E-01 2.001E-01 1.940E-01 1.871E-01 1.796E-01 1.714E-01 1.628E-01 1.538E-01 1.443E-01 1.346E-01 1.246E-01 1.145E-01 1.044E-01 9.435E-02 8.441E-02 7.469E-02 6.528E-02 5.625E-02 4.770E-02 3.968E-02 3.227E-02 2.552E-02 1.950E-02 1.424E-02 9.783E-03 6.149E-03 3.356E-03 1.408E-03 2.974E-04 7.911E-06 5.102E-04 1.765E-03 3.721E-03 6.319E-03 9.489E-03 1.315E-02 1.723E-02 2.162E-02 2.623E-02 3.096E-02 3.571E-02 4.038E-02 4.487E-02 4.909E-02 5.295E-02 5.636E-02 5.926E-02 6.158E-02 6.327E-02 6.430E-02 6.465E-02 6.430E-02 6.327E-02 6.158E-02 5.926E-02 5.636E-02 5.295E-02 4.909E-02 4.487E-02 4.038E-02 3.571E-02 3.096E-02 2.623E-02 2.162E-02 1.723E-02 1.315E-02 9.489E-03 6.319E-03 3.721E-03 1.765E-03 5.102E-04 7.911E-06 2.974E-04 1.408E-03 3.356E-03 6.149E-03 9.783E-03 1.424E-02 1.950E-02 2.552E-02 3.227E-02 3.968E-02 4.770E-02 5.625E-02 6.528E-02 7.469E-02 8.441E-02 9.435E-02 1.044E-01 1.145E-01 1.246E-01 1.346E-01 1.443E-01 1.538E-01 1.628E-01 1.714E-01 1.796E-01 1.871E-01 1.940E-01 2.001E-01 2.056E-01 2.103E-01 2.141E-01 2.171E-01 2.193E-01 2.207E-01 2.211E-01 2.208E-01 2.196E-01 2.175E-01 2.147E-01 2.111E-01 2.068E-01 2.019E-01 1.962E-01 1.901E-01 1.833E-01 1.761E-01 1.685E-01 1.606E-01 1.523E-01 1.439E-01 1.352E-01 1.265E-01 1.177E-01 1.090E-01 1.003E-01 9.174E-02 8.338E-02 7.524E-02 6.738E-02 5.984E-02 5.266E-02 4.586E-02 3.949E-02 3.355E-02 2.808E-02 2.309E-02 1.859E-02 1.459E-02 1.109E-02 8.084E-03 5.576E-03 3.552E-03 2.000E-03 9.039E-04 2.454E-04 2.384E-06 1.507E-04 6.639E-04 1.514E-03 2.671E-03 4.103E-03 5.780E-03 7.669E-03 9.736E-03 1.195E-02 1.428E-02 1.668E-02 1.914E-02 2.162E-02 2.409E-02 2.653E-02 2.890E-02 3.118E-02 3.336E-02 3.541E-02 3.731E-02 3.905E-02 4.062E-02 4.200E-02 4.318E-02 4.416E-02 4.492E-02 4.548E-02 4.583E-02 4.597E-02 4.590E-02 4.570E-02 4.593E-02 4.596E-02 4.578E-02 4.539E-02 4.478E-02 4.397E-02 4.295E-02 4.172E-02 4.030E-02 3.869E-02 3.691E-02 3.497E-02 3.289E-02 3.068E-02 2.837E-02 2.598E-02 2.353E-02 2.105E-02 1.856E-02 1.611E-02 1.371E-02 1.140E-02 9.219E-03 7.188E-03 5.344E-03 3.721E-03 2.351E-03 1.266E-03 4.981E-04 7.576E-05 2.738E-05 3.791E-04 1.155E-03 2.375E-03 4.060E-03 6.223E-03 8.877E-03 1.203E-02 1.569E-02 1.985E-02 2.451E-02 2.966E-02 3.529E-02 4.138E-02 4.791E-02 5.486E-02 6.218E-02 6.986E-02 7.784E-02 8.609E-02 9.456E-02 1.032E-01 1.120E-01 1.208E-01 1.296E-01 1.383E-01 1.469E-01 1.554E-01 1.636E-01 1.714E-01 1.789E-01 1.860E-01 1.926E-01 1.986E-01 2.040E-01 2.087E-01 2.127E-01 2.160E-01 2.185E-01 2.202E-01 2.210E-01 2.210E-01 2.202E-01 2.184E-01 2.158E-01 2.123E-01 2.080E-01 2.029E-01 1.970E-01 1.904E-01 1.830E-01 1.751E-01 1.666E-01 1.576E-01 1.482E-01 1.384E-01 1.284E-01 1.182E-01 1.079E-01 9.759E-02 8.741E-02 7.743E-02 6.772E-02 5.839E-02 4.952E-02 4.118E-02 3.345E-02 2.641E-02 2.011E-02 1.460E-02 9.939E-03 6.149E-03 3.258E-03 1.278E-03 2.099E-04 4.383E-05 7.568E-04 2.314E-03 4.670E-03 7.765E-03 1.153E-02 1.589E-02 2.076E-02 2.603E-02 3.161E-02 3.739E-02 4.325E-02 4.909E-02 5.479E-02 6.024E-02 6.534E-02 6.998E-02 7.408E-02 7.754E-02 8.031E-02 8.233E-02 8.356E-02 8.397E-02 8.356E-02 8.233E-02 8.031E-02 7.754E-02 7.408E-02 6.998E-02 6.534E-02 6.024E-02 5.479E-02 4.909E-02 4.325E-02 3.739E-02 3.161E-02 2.603E-02 2.076E-02 1.589E-02 1.153E-02 7.765E-03 4.670E-03 2.314E-03 7.568E-04 4.383E-05 2.099E-04 1.278E-03 3.258E-03 6.149E-03 9.939E-03 1.460E-02 2.011E-02 2.641E-02 3.345E-02 4.118E-02 4.952E-02 5.839E-02 6.772E-02 7.743E-02 8.741E-02 9.759E-02 1.079E-01 1.182E-01 1.284E-01 1.384E-01 1.482E-01 1.576E-01 1.666E-01 1.751E-01 1.830E-01 1.904E-01 1.970E-01 2.029E-01 2.080E-01 2.123E-01 2.158E-01 2.184E-01 2.202E-01 2.210E-01 2.210E-01 2.202E-01 2.185E-01 2.160E-01 2.127E-01 2.087E-01 2.040E-01 1.986E-01 1.926E-01 1.860E-01 1.789E-01 1.714E-01 1.636E-01 1.554E-01 1.469E-01 1.383E-01 1.296E-01 1.208E-01 1.120E-01 1.032E-01 9.456E-02 8.609E-02 7.784E-02 6.986E-02 6.218E-02 5.486E-02 4.791E-02 4.138E-02 3.529E-02 2.966E-02 2.451E-02 1.985E-02 1.569E-02 1.203E-02 8.877E-03 6.223E-03 4.060E-03 2.375E-03 1.155E-03 3.791E-04 2.738E-05 7.576E-05 4.981E-04 1.266E-03 2.351E-03 3.721E-03 5.344E-03 7.188E-03 9.219E-03 1.140E-02 1.371E-02 1.611E-02 1.856E-02 2.105E-02 2.353E-02 2.598E-02 2.837E-02 3.068E-02 3.289E-02 3.497E-02 3.691E-02 3.869E-02 4.030E-02 4.172E-02 4.295E-02 4.397E-02 4.478E-02 4.539E-02 4.578E-02 4.596E-02 4.593E-02 4.576E-02 4.595E-02 4.594E-02 4.572E-02 4.528E-02 4.464E-02 4.378E-02 4.271E-02 4.145E-02 3.998E-02 3.834E-02 3.652E-02 3.454E-02 3.243E-02 3.019E-02 2.786E-02 2.544E-02 2.298E-02 2.049E-02 1.801E-02 1.556E-02 1.317E-02 1.089E-02 8.729E-03 6.735E-03 4.936E-03 3.367E-03 2.060E-03 1.047E-03 3.601E-04 2.751E-05 7.755E-05 5.360E-04 1.426E-03 2.770E-03 4.583E-03 6.882E-03 9.678E-03 1.298E-02 1.678E-02 2.110E-02 2.591E-02 3.122E-02 3.700E-02 4.324E-02 4.992E-02 5.701E-02 6.447E-02 7.228E-02 8.038E-02 8.874E-02 9.730E-02 1.060E-01 1.148E-01 1.237E-01 1.325E-01 1.413E-01 1.499E-01 1.583E-01 1.664E-01 1.742E-01 1.816E-01 1.885E-01 1.949E-01 2.007E-01 2.059E-01 2.104E-01 2.141E-01 2.171E-01 2.193E-01 2.207E-01 2.211E-01 2.208E-01 2.195E-01 2.173E-01 2.143E-01 2.104E-01 2.056E-01 2.001E-01 1.937E-01 1.867E-01 1.790E-01 1.706E-01 1.617E-01 1.523E-01 1.426E-01 1.325E-01 1.222E-01 1.118E-01 1.013E-01 9.095E-02 8.071E-02 7.072E-02 6.108E-02 5.188E-02 4.320E-02 3.513E-02 2.776E-02 2.114E-02 1.534E-02 1.041E-02 6.409E-03 3.356E-03 1.278E-03 1.840E-04 7.283E-05 9.292E-04 2.725E-03 5.421E-03 8.962E-03 1.328E-02 1.831E-02 2.395E-02 3.010E-02 3.666E-02 4.352E-02 5.055E-02 5.764E-02 6.465E-02 7.145E-02 7.793E-02 8.397E-02 8.946E-02 9.429E-02 9.837E-02 1.016E-01 1.040E-01 1.054E-01 1.059E-01 1.054E-01 1.040E-01 1.016E-01 9.837E-02 9.429E-02 8.946E-02 8.397E-02 7.793E-02 7.145E-02 6.465E-02 5.764E-02 5.055E-02 4.352E-02 3.666E-02 3.010E-02 2.395E-02 1.831E-02 1.328E-02 8.962E-03 5.421E-03 2.725E-03 9.292E-04 7.283E-05 1.840E-04 1.278E-03 3.356E-03 6.409E-03 1.041E-02 1.534E-02 2.114E-02 2.776E-02 3.513E-02 4.320E-02 5.188E-02 6.108E-02 7.072E-02 8.071E-02 9.095E-02 1.013E-01 1.118E-01 1.222E-01 1.325E-01 1.426E-01 1.523E-01 1.617E-01 1.706E-01 1.790E-01 1.867E-01 1.937E-01 2.001E-01 2.056E-01 2.104E-01 2.143E-01 2.173E-01 2.195E-01 2.208E-01 2.211E-01 2.207E-01 2.193E-01 2.171E-01 2.141E-01 2.104E-01 2.059E-01 2.007E-01 1.949E-01 1.885E-01 1.816E-01 1.742E-01 1.664E-01 1.583E-01 1.499E-01 1.413E-01 1.325E-01 1.237E-01 1.148E-01 1.060E-01 9.730E-02 8.874E-02 8.038E-02 7.228E-02 6.447E-02 5.701E-02 4.992E-02 4.324E-02 3.700E-02 3.122E-02 2.591E-02 2.110E-02 1.678E-02 1.298E-02 9.678E-03 6.882E-03 4.583E-03 2.770E-03 1.426E-03 5.360E-04 7.755E-05 2.751E-05 3.601E-04 1.047E-03 2.060E-03 3.367E-03 4.936E-03 6.735E-03 8.729E-03 1.089E-02 1.317E-02 1.556E-02 1.801E-02 2.049E-02 2.298E-02 2.544E-02 2.786E-02 3.019E-02 3.243E-02 3.454E-02 3.652E-02 3.834E-02 3.998E-02 4.145E-02 4.271E-02 4.378E-02 4.464E-02 4.528E-02 4.572E-02 4.594E-02 4.595E-02 4.581E-02 4.597E-02 4.591E-02 4.565E-02 4.518E-02 4.449E-02 4.359E-02 4.248E-02 4.117E-02 3.967E-02 3.799E-02 3.613E-02 3.413E-02 3.198E-02 2.972E-02 2.736E-02 2.493E-02 2.245E-02 1.996E-02 1.748E-02 1.503E-02 1.266E-02 1.040E-02 8.267E-03 6.309E-03 4.556E-03 3.041E-03 1.797E-03 8.554E-04 2.478E-04 3.609E-06 1.503E-04 7.135E-04 1.716E-03 3.179E-03 5.119E-03 7.550E-03 1.048E-02 1.392E-02 1.787E-02 2.233E-02 2.730E-02 3.275E-02 3.868E-02 4.507E-02 5.189E-02 5.912E-02 6.671E-02 7.463E-02 8.285E-02 9.130E-02 9.995E-02 1.087E-01 1.176E-01 1.265E-01 1.354E-01 1.441E-01 1.527E-01 1.611E-01 1.691E-01 1.768E-01 1.841E-01 1.908E-01 1.971E-01 2.027E-01 2.077E-01 2.119E-01 2.154E-01 2.181E-01 2.200E-01 2.210E-01 2.211E-01 2.203E-01 2.187E-01 2.161E-01 2.126E-01 2.083E-01 2.032E-01 1.972E-01 1.904E-01 1.830E-01 1.748E-01 1.661E-01 1.568E-01 1.471E-01 1.371E-01 1.267E-01 1.162E-01 1.056E-01 9.502E-02 8.454E-02 7.428E-02 6.433E-02 5.479E-02 4.576E-02 3.733E-02 2.958E-02 2.260E-02 1.646E-02 1.122E-02 6.941E-03 3.658E-03 1.408E-03 2.099E-04 7.283E-05 9.907E-04 2.944E-03 5.901E-03 9.814E-03 1.462E-02 2.025E-02 2.662E-02 3.362E-02 4.115E-02 4.909E-02 5.732E-02 6.569E-02 7.408E-02 8.233E-02 9.032E-02 9.791E-02 1.050E-01 1.114E-01 1.170E-01 1.217E-01 1.255E-01 1.283E-01 1.299E-01 1.305E-01 1.299E-01 1.283E-01 1.255E-01 1.217E-01 1.170E-01 1.114E-01 1.050E-01 9.791E-02 9.032E-02 8.233E-02 7.408E-02 6.569E-02 5.732E-02 4.909E-02 4.115E-02 3.362E-02 2.662E-02 2.025E-02 1.462E-02 9.814E-03 5.901E-03 2.944E-03 9.907E-04 7.283E-05 2.099E-04 1.408E-03 3.658E-03 6.941E-03 1.122E-02 1.646E-02 2.260E-02 2.958E-02 3.733E-02 4.576E-02 5.479E-02 6.433E-02 7.428E-02 8.454E-02 9.502E-02 1.056E-01 1.162E-01 1.267E-01 1.371E-01 1.471E-01 1.568E-01 1.661E-01 1.748E-01 1.830E-01 1.904E-01 1.972E-01 2.032E-01 2.083E-01 2.126E-01 2.161E-01 2.187E-01 2.203E-01 2.211E-01 2.210E-01 2.200E-01 2.181E-01 2.154E-01 2.119E-01 2.077E-01 2.027E-01 1.971E-01 1.908E-01 1.841E-01 1.768E-01 1.691E-01 1.611E-01 1.527E-01 1.441E-01 1.354E-01 1.265E-01 1.176E-01 1.087E-01 9.995E-02 9.130E-02 8.285E-02 7.463E-02 6.671E-02 5.912E-02 5.189E-02 4.507E-02 3.868E-02 3.275E-02 2.730E-02 2.233E-02 1.787E-02 1.392E-02 1.048E-02 7.550E-03 5.119E-03 3.179E-03 1.716E-03 7.135E-04 1.503E-04 3.609E-06 2.478E-04 8.554E-04 1.797E-03 3.041E-03 4.556E-03 6.309E-03 8.267E-03 1.040E-02 1.266E-02 1.503E-02 1.748E-02 1.996E-02 2.245E-02 2.493E-02 2.736E-02 2.972E-02 3.198E-02 3.413E-02 3.613E-02 3.799E-02 3.967E-02 4.117E-02 4.248E-02 4.359E-02 4.449E-02 4.518E-02 4.565E-02 4.591E-02 4.597E-02 4.585E-02 4.597E-02 4.588E-02 4.558E-02 4.507E-02 4.434E-02 4.340E-02 4.225E-02 4.091E-02 3.937E-02 3.765E-02 3.576E-02 3.372E-02 3.155E-02 2.926E-02 2.688E-02 2.443E-02 2.195E-02 1.945E-02 1.697E-02 1.453E-02 1.218E-02 9.931E-03 7.832E-03 5.911E-03 4.203E-03 2.742E-03 1.559E-03 6.883E-04 1.593E-04 1.764E-06 2.431E-04 9.085E-04 2.021E-03 3.600E-03 5.662E-03 8.221E-03 1.129E-02 1.486E-02 1.896E-02 2.356E-02 2.866E-02 3.426E-02 4.033E-02 4.686E-02 5.382E-02 6.117E-02 6.888E-02 7.692E-02 8.524E-02 9.379E-02 1.025E-01 1.114E-01 1.203E-01 1.292E-01 1.381E-01 1.468E-01 1.554E-01 1.637E-01 1.717E-01 1.793E-01 1.864E-01 1.930E-01 1.991E-01 2.045E-01 2.093E-01 2.133E-01 2.165E-01 2.189E-01 2.204E-01 2.211E-01 2.209E-01 2.198E-01 2.177E-01 2.148E-01 2.109E-01 2.062E-01 2.006E-01 1.942E-01 1.871E-01 1.792E-01 1.707E-01 1.616E-01 1.520E-01 1.420E-01 1.317E-01 1.211E-01 1.104E-01 9.961E-02 8.891E-02 7.838E-02 6.813E-02 5.826E-02 4.886E-02 4.005E-02 3.191E-02 2.454E-02 1.801E-02 1.240E-02 7.773E-03 4.187E-03 1.685E-03 2.974E-04 4.383E-05 9.292E-04 2.944E-03 6.066E-03 1.026E-02 1.546E-02 2.162E-02 2.863E-02 3.642E-02 4.487E-02 5.387E-02 6.327E-02 7.294E-02 8.274E-02 9.251E-02 1.021E-01 1.114E-01 1.201E-01 1.283E-01 1.356E-01 1.421E-01 1.475E-01 1.519E-01 1.550E-01 1.570E-01 1.576E-01 1.570E-01 1.550E-01 1.519E-01 1.475E-01 1.421E-01 1.356E-01 1.283E-01 1.201E-01 1.114E-01 1.021E-01 9.251E-02 8.274E-02 7.294E-02 6.327E-02 5.387E-02 4.487E-02 3.642E-02 2.863E-02 2.162E-02 1.546E-02 1.026E-02 6.066E-03 2.944E-03 9.292E-04 4.383E-05 2.974E-04 1.685E-03 4.187E-03 7.773E-03 1.240E-02 1.801E-02 2.454E-02 3.191E-02 4.005E-02 4.886E-02 5.826E-02 6.813E-02 7.838E-02 8.891E-02 9.961E-02 1.104E-01 1.211E-01 1.317E-01 1.420E-01 1.520E-01 1.616E-01 1.707E-01 1.792E-01 1.871E-01 1.942E-01 2.006E-01 2.062E-01 2.109E-01 2.148E-01 2.177E-01 2.198E-01 2.209E-01 2.211E-01 2.204E-01 2.189E-01 2.165E-01 2.133E-01 2.093E-01 2.045E-01 1.991E-01 1.930E-01 1.864E-01 1.793E-01 1.717E-01 1.637E-01 1.554E-01 1.468E-01 1.381E-01 1.292E-01 1.203E-01 1.114E-01 1.025E-01 9.379E-02 8.524E-02 7.692E-02 6.888E-02 6.117E-02 5.382E-02 4.686E-02 4.033E-02 3.426E-02 2.866E-02 2.356E-02 1.896E-02 1.486E-02 1.129E-02 8.221E-03 5.662E-03 3.600E-03 2.021E-03 9.085E-04 2.431E-04 1.764E-06 1.593E-04 6.883E-04 1.559E-03 2.742E-03 4.203E-03 5.911E-03 7.832E-03 9.931E-03 1.218E-02 1.453E-02 1.697E-02 1.945E-02 2.195E-02 2.443E-02 2.688E-02 2.926E-02 3.155E-02 3.372E-02 3.576E-02 3.765E-02 3.937E-02 4.091E-02 4.225E-02 4.340E-02 4.434E-02 4.507E-02 4.558E-02 4.588E-02 4.597E-02 4.589E-02 4.597E-02 4.585E-02 4.551E-02 4.496E-02 4.419E-02 4.321E-02 4.203E-02 4.064E-02 3.907E-02 3.731E-02 3.539E-02 3.333E-02 3.113E-02 2.882E-02 2.642E-02 2.396E-02 2.146E-02 1.896E-02 1.648E-02 1.405E-02 1.171E-02 9.492E-03 7.422E-03 5.539E-03 3.877E-03 2.468E-03 1.347E-03 5.445E-04 9.249E-05 1.967E-05 3.533E-04 1.118E-03 2.337E-03 4.029E-03 6.210E-03 8.893E-03 1.209E-02 1.580E-02 2.002E-02 2.476E-02 3.000E-02 3.574E-02 4.194E-02 4.860E-02 5.569E-02 6.316E-02 7.099E-02 7.913E-02 8.755E-02 9.618E-02 1.050E-01 1.139E-01 1.228E-01 1.318E-01 1.407E-01 1.494E-01 1.579E-01 1.662E-01 1.741E-01 1.816E-01 1.886E-01 1.951E-01 2.010E-01 2.062E-01 2.107E-01 2.145E-01 2.174E-01 2.195E-01 2.208E-01 2.211E-01 2.206E-01 2.191E-01 2.167E-01 2.133E-01 2.091E-01 2.040E-01 1.980E-01 1.912E-01 1.837E-01 1.755E-01 1.666E-01 1.572E-01 1.473E-01 1.370E-01 1.264E-01 1.156E-01 1.047E-01 9.380E-02 8.304E-02 7.250E-02 6.230E-02 5.254E-02 4.333E-02 3.477E-02 2.697E-02 2.001E-02 1.397E-02 8.941E-03 4.980E-03 2.143E-03 4.758E-04 7.911E-06 7.568E-04 2.725E-03 5.901E-03 1.026E-02 1.575E-02 2.232E-02 2.989E-02 3.837E-02 4.766E-02 5.764E-02 6.817E-02 7.912E-02 9.032E-02 1.016E-01 1.129E-01 1.239E-01 1.345E-01 1.445E-01 1.538E-01 1.622E-01 1.695E-01 1.757E-01 1.807E-01 1.843E-01 1.865E-01 1.872E-01 1.865E-01 1.843E-01 1.807E-01 1.757E-01 1.695E-01 1.622E-01 1.538E-01 1.445E-01 1.345E-01 1.239E-01 1.129E-01 1.016E-01 9.032E-02 7.912E-02 6.817E-02 5.764E-02 4.766E-02 3.837E-02 2.989E-02 2.232E-02 1.575E-02 1.026E-02 5.901E-03 2.725E-03 7.568E-04 7.911E-06 4.758E-04 2.143E-03 4.980E-03 8.941E-03 1.397E-02 2.001E-02 2.697E-02 3.477E-02 4.333E-02 5.254E-02 6.230E-02 7.250E-02 8.304E-02 9.380E-02 1.047E-01 1.156E-01 1.264E-01 1.370E-01 1.473E-01 1.572E-01 1.666E-01 1.755E-01 1.837E-01 1.912E-01 1.980E-01 2.040E-01 2.091E-01 2.133E-01 2.167E-01 2.191E-01 2.206E-01 2.211E-01 2.208E-01 2.195E-01 2.174E-01 2.145E-01 2.107E-01 2.062E-01 2.010E-01 1.951E-01 1.886E-01 1.816E-01 1.741E-01 1.662E-01 1.579E-01 1.494E-01 1.407E-01 1.318E-01 1.228E-01 1.139E-01 1.050E-01 9.618E-02 8.755E-02 7.913E-02 7.099E-02 6.316E-02 5.569E-02 4.860E-02 4.194E-02 3.574E-02 3.000E-02 2.476E-02 2.002E-02 1.580E-02 1.209E-02 8.893E-03 6.210E-03 4.029E-03 2.337E-03 1.118E-03 3.533E-04 1.967E-05 9.249E-05 5.445E-04 1.347E-03 2.468E-03 3.877E-03 5.539E-03 7.422E-03 9.492E-03 1.171E-02 1.405E-02 1.648E-02 1.896E-02 2.146E-02 2.396E-02 2.642E-02 2.882E-02 3.113E-02 3.333E-02 3.539E-02 3.731E-02 3.907E-02 4.064E-02 4.203E-02 4.321E-02 4.419E-02 4.496E-02 4.551E-02 4.585E-02 4.597E-02 4.591E-02 4.597E-02 4.581E-02 4.543E-02 4.485E-02 4.404E-02 4.303E-02 4.181E-02 4.039E-02 3.878E-02 3.699E-02 3.504E-02 3.295E-02 3.072E-02 2.839E-02 2.598E-02 2.350E-02 2.100E-02 1.850E-02 1.602E-02 1.360E-02 1.128E-02 9.078E-03 7.039E-03 5.193E-03 3.575E-03 2.218E-03 1.157E-03 4.223E-04 4.531E-05 5.502E-05 4.784E-04 1.340E-03 2.662E-03 4.463E-03 6.759E-03 9.561E-03 1.288E-02 1.671E-02 2.107E-02 2.594E-02 3.131E-02 3.718E-02 4.351E-02 5.030E-02 5.750E-02 6.509E-02 7.303E-02 8.127E-02 8.977E-02 9.848E-02 1.073E-01 1.163E-01 1.253E-01 1.343E-01 1.431E-01 1.519E-01 1.603E-01 1.685E-01 1.764E-01 1.838E-01 1.906E-01 1.970E-01 2.027E-01 2.077E-01 2.120E-01 2.155E-01 2.182E-01 2.201E-01 2.210E-01 2.210E-01 2.201E-01 2.183E-01 2.155E-01 2.118E-01 2.072E-01 2.017E-01 1.954E-01 1.882E-01 1.803E-01 1.717E-01 1.625E-01 1.528E-01 1.426E-01 1.320E-01 1.212E-01 1.102E-01 9.920E-02 8.823E-02 7.743E-02 6.691E-02 5.679E-02 4.718E-02 3.819E-02 2.993E-02 2.250E-02 1.599E-02 1.049E-02 6.085E-03 2.832E-03 7.923E-04 8.147E-06 5.102E-04 2.314E-03 5.421E-03 9.814E-03 1.546E-02 2.232E-02 3.031E-02 3.937E-02 4.938E-02 6.024E-02 7.182E-02 8.397E-02 9.654E-02 1.094E-01 1.223E-01 1.350E-01 1.475E-01 1.595E-01 1.709E-01 1.814E-01 1.909E-01 1.992E-01 2.062E-01 2.118E-01 2.159E-01 2.183E-01 2.192E-01 2.183E-01 2.159E-01 2.118E-01 2.062E-01 1.992E-01 1.909E-01 1.814E-01 1.709E-01 1.595E-01 1.475E-01 1.350E-01 1.223E-01 1.094E-01 9.654E-02 8.397E-02 7.182E-02 6.024E-02 4.938E-02 3.937E-02 3.031E-02 2.232E-02 1.546E-02 9.814E-03 5.421E-03 2.314E-03 5.102E-04 8.147E-06 7.923E-04 2.832E-03 6.085E-03 1.049E-02 1.599E-02 2.250E-02 2.993E-02 3.819E-02 4.718E-02 5.679E-02 6.691E-02 7.743E-02 8.823E-02 9.920E-02 1.102E-01 1.212E-01 1.320E-01 1.426E-01 1.528E-01 1.625E-01 1.717E-01 1.803E-01 1.882E-01 1.954E-01 2.017E-01 2.072E-01 2.118E-01 2.155E-01 2.183E-01 2.201E-01 2.210E-01 2.210E-01 2.201E-01 2.182E-01 2.155E-01 2.120E-01 2.077E-01 2.027E-01 1.970E-01 1.906E-01 1.838E-01 1.764E-01 1.685E-01 1.603E-01 1.519E-01 1.431E-01 1.343E-01 1.253E-01 1.163E-01 1.073E-01 9.848E-02 8.977E-02 8.127E-02 7.303E-02 6.509E-02 5.750E-02 5.030E-02 4.351E-02 3.718E-02 3.131E-02 2.594E-02 2.107E-02 1.671E-02 1.288E-02 9.561E-03 6.759E-03 4.463E-03 2.662E-03 1.340E-03 4.784E-04 5.502E-05 4.531E-05 4.223E-04 1.157E-03 2.218E-03 3.575E-03 5.193E-03 7.039E-03 9.078E-03 1.128E-02 1.360E-02 1.602E-02 1.850E-02 2.100E-02 2.350E-02 2.598E-02 2.839E-02 3.072E-02 3.295E-02 3.504E-02 3.699E-02 3.878E-02 4.039E-02 4.181E-02 4.303E-02 4.404E-02 4.485E-02 4.543E-02 4.581E-02 4.597E-02 4.593E-02 4.595E-02 4.576E-02 4.536E-02 4.473E-02 4.390E-02 4.285E-02 4.159E-02 4.014E-02 3.850E-02 3.668E-02 3.470E-02 3.258E-02 3.033E-02 2.798E-02 2.555E-02 2.307E-02 2.056E-02 1.805E-02 1.558E-02 1.317E-02 1.087E-02 8.690E-03 6.680E-03 4.871E-03 3.296E-03 1.991E-03 9.884E-04 3.197E-04 1.574E-05 1.055E-04 6.158E-04 1.571E-03 2.992E-03 4.898E-03 7.304E-03 1.022E-02 1.366E-02 1.762E-02 2.209E-02 2.709E-02 3.259E-02 3.857E-02 4.503E-02 5.193E-02 5.925E-02 6.695E-02 7.499E-02 8.332E-02 9.191E-02 1.007E-01 1.096E-01 1.186E-01 1.276E-01 1.366E-01 1.455E-01 1.542E-01 1.626E-01 1.708E-01 1.785E-01 1.858E-01 1.926E-01 1.987E-01 2.043E-01 2.091E-01 2.132E-01 2.165E-01 2.189E-01 2.205E-01 2.211E-01 2.208E-01 2.196E-01 2.174E-01 2.143E-01 2.103E-01 2.053E-01 1.994E-01 1.927E-01 1.852E-01 1.770E-01 1.680E-01 1.585E-01 1.485E-01 1.380E-01 1.272E-01 1.162E-01 1.051E-01 9.394E-02 8.290E-02 7.209E-02 6.162E-02 5.161E-02 4.219E-02 3.345E-02 2.552E-02 1.850E-02 1.248E-02 7.561E-03 3.813E-03 1.310E-03 1.066E-04 2.485E-04 1.765E-03 4.670E-03 8.962E-03 1.462E-02 2.162E-02 2.989E-02 3.937E-02 4.997E-02 6.158E-02 7.408E-02 8.732E-02 1.012E-01 1.154E-01 1.299E-01 1.445E-01 1.589E-01 1.730E-01 1.865E-01 1.992E-01 2.110E-01 2.217E-01 2.310E-01 2.389E-01 2.451E-01 2.497E-01 2.525E-01 2.534E-01 2.525E-01 2.497E-01 2.451E-01 2.389E-01 2.310E-01 2.217E-01 2.110E-01 1.992E-01 1.865E-01 1.730E-01 1.589E-01 1.445E-01 1.299E-01 1.154E-01 1.012E-01 8.732E-02 7.408E-02 6.158E-02 4.997E-02 3.937E-02 2.989E-02 2.162E-02 1.462E-02 8.962E-03 4.670E-03 1.765E-03 2.485E-04 1.066E-04 1.310E-03 3.813E-03 7.561E-03 1.248E-02 1.850E-02 2.552E-02 3.345E-02 4.219E-02 5.161E-02 6.162E-02 7.209E-02 8.290E-02 9.394E-02 1.051E-01 1.162E-01 1.272E-01 1.380E-01 1.485E-01 1.585E-01 1.680E-01 1.770E-01 1.852E-01 1.927E-01 1.994E-01 2.053E-01 2.103E-01 2.143E-01 2.174E-01 2.196E-01 2.208E-01 2.211E-01 2.205E-01 2.189E-01 2.165E-01 2.132E-01 2.091E-01 2.043E-01 1.987E-01 1.926E-01 1.858E-01 1.785E-01 1.708E-01 1.626E-01 1.542E-01 1.455E-01 1.366E-01 1.276E-01 1.186E-01 1.096E-01 1.007E-01 9.191E-02 8.332E-02 7.499E-02 6.695E-02 5.925E-02 5.193E-02 4.503E-02 3.857E-02 3.259E-02 2.709E-02 2.209E-02 1.762E-02 1.366E-02 1.022E-02 7.304E-03 4.898E-03 2.992E-03 1.571E-03 6.158E-04 1.055E-04 1.574E-05 3.197E-04 9.884E-04 1.991E-03 3.296E-03 4.871E-03 6.680E-03 8.690E-03 1.087E-02 1.317E-02 1.558E-02 1.805E-02 2.056E-02 2.307E-02 2.555E-02 2.798E-02 3.033E-02 3.258E-02 3.470E-02 3.668E-02 3.850E-02 4.014E-02 4.159E-02 4.285E-02 4.390E-02 4.473E-02 4.536E-02 4.576E-02 4.595E-02 4.595E-02 4.594E-02 4.572E-02 4.528E-02 4.462E-02 4.375E-02 4.267E-02 4.138E-02 3.990E-02 3.823E-02 3.638E-02 3.437E-02 3.223E-02 2.996E-02 2.759E-02 2.515E-02 2.266E-02 2.014E-02 1.763E-02 1.517E-02 1.277E-02 1.048E-02 8.326E-03 6.345E-03 4.572E-03 3.041E-03 1.786E-03 8.399E-04 2.350E-04 1.762E-06 1.690E-04 7.631E-04 1.808E-03 3.325E-03 5.332E-03 7.844E-03 1.087E-02 1.442E-02 1.849E-02 2.309E-02 2.820E-02 3.382E-02 3.993E-02 4.650E-02 5.351E-02 6.094E-02 6.874E-02 7.687E-02 8.529E-02 9.395E-02 1.028E-01 1.118E-01 1.208E-01 1.299E-01 1.389E-01 1.477E-01 1.564E-01 1.648E-01 1.728E-01 1.805E-01 1.877E-01 1.943E-01 2.004E-01 2.057E-01 2.104E-01 2.143E-01 2.173E-01 2.195E-01 2.208E-01 2.211E-01 2.206E-01 2.190E-01 2.165E-01 2.130E-01 2.086E-01 2.033E-01 1.971E-01 1.901E-01 1.822E-01 1.737E-01 1.644E-01 1.546E-01 1.443E-01 1.336E-01 1.226E-01 1.114E-01 1.001E-01 8.891E-02 7.784E-02 6.704E-02 5.665E-02 4.679E-02 3.757E-02 2.912E-02 2.155E-02 1.497E-02 9.473E-03 5.157E-03 2.103E-03 3.816E-04 5.039E-05 1.154E-03 3.721E-03 7.765E-03 1.328E-02 2.025E-02 2.863E-02 3.837E-02 4.938E-02 6.158E-02 7.484E-02 8.903E-02 1.040E-01 1.196E-01 1.356E-01 1.519E-01 1.682E-01 1.843E-01 2.000E-01 2.151E-01 2.293E-01 2.424E-01 2.543E-01 2.647E-01 2.735E-01 2.805E-01 2.856E-01 2.887E-01 2.897E-01 2.887E-01 2.856E-01 2.805E-01 2.735E-01 2.647E-01 2.543E-01 2.424E-01 2.293E-01 2.151E-01 2.000E-01 1.843E-01 1.682E-01 1.519E-01 1.356E-01 1.196E-01 1.040E-01 8.903E-02 7.484E-02 6.158E-02 4.938E-02 3.837E-02 2.863E-02 2.025E-02 1.328E-02 7.765E-03 3.721E-03 1.154E-03 5.039E-05 3.816E-04 2.103E-03 5.157E-03 9.473E-03 1.497E-02 2.155E-02 2.912E-02 3.757E-02 4.679E-02 5.665E-02 6.704E-02 7.784E-02 8.891E-02 1.001E-01 1.114E-01 1.226E-01 1.336E-01 1.443E-01 1.546E-01 1.644E-01 1.737E-01 1.822E-01 1.901E-01 1.971E-01 2.033E-01 2.086E-01 2.130E-01 2.165E-01 2.190E-01 2.206E-01 2.211E-01 2.208E-01 2.195E-01 2.173E-01 2.143E-01 2.104E-01 2.057E-01 2.004E-01 1.943E-01 1.877E-01 1.805E-01 1.728E-01 1.648E-01 1.564E-01 1.477E-01 1.389E-01 1.299E-01 1.208E-01 1.118E-01 1.028E-01 9.395E-02 8.529E-02 7.687E-02 6.874E-02 6.094E-02 5.351E-02 4.650E-02 3.993E-02 3.382E-02 2.820E-02 2.309E-02 1.849E-02 1.442E-02 1.087E-02 7.844E-03 5.332E-03 3.325E-03 1.808E-03 7.631E-04 1.690E-04 1.762E-06 2.350E-04 8.399E-04 1.786E-03 3.041E-03 4.572E-03 6.345E-03 8.326E-03 1.048E-02 1.277E-02 1.517E-02 1.763E-02 2.014E-02 2.266E-02 2.515E-02 2.759E-02 2.996E-02 3.223E-02 3.437E-02 3.638E-02 3.823E-02 3.990E-02 4.138E-02 4.267E-02 4.375E-02 4.462E-02 4.528E-02 4.572E-02 4.594E-02 4.596E-02 4.592E-02 4.567E-02 4.520E-02 4.451E-02 4.361E-02 4.250E-02 4.118E-02 3.967E-02 3.796E-02 3.609E-02 3.406E-02 3.189E-02 2.961E-02 2.722E-02 2.477E-02 2.226E-02 1.974E-02 1.724E-02 1.478E-02 1.239E-02 1.012E-02 7.986E-03 6.034E-03 4.296E-03 2.807E-03 1.601E-03 7.096E-04 1.664E-04 1.402E-06 2.431E-04 9.178E-04 2.049E-03 3.658E-03 5.762E-03 8.375E-03 1.151E-02 1.516E-02 1.935E-02 2.406E-02 2.928E-02 3.501E-02 4.123E-02 4.791E-02 5.503E-02 6.255E-02 7.045E-02 7.867E-02 8.717E-02 9.590E-02 1.048E-01 1.138E-01 1.229E-01 1.320E-01 1.410E-01 1.498E-01 1.585E-01 1.668E-01 1.748E-01 1.824E-01 1.895E-01 1.960E-01 2.019E-01 2.071E-01 2.115E-01 2.152E-01 2.180E-01 2.200E-01 2.210E-01 2.211E-01 2.202E-01 2.183E-01 2.155E-01 2.117E-01 2.070E-01 2.014E-01 1.948E-01 1.875E-01 1.793E-01 1.704E-01 1.609E-01 1.508E-01 1.403E-01 1.293E-01 1.182E-01 1.068E-01 9.543E-02 8.413E-02 7.305E-02 6.230E-02 5.201E-02 4.231E-02 3.333E-02 2.519E-02 1.801E-02 1.189E-02 6.941E-03 3.258E-03 9.237E-04 1.105E-05 5.789E-04 2.672E-03 6.319E-03 1.153E-02 1.831E-02 2.662E-02 3.642E-02 4.766E-02 6.024E-02 7.408E-02 8.903E-02 1.050E-01 1.217E-01 1.391E-01 1.570E-01 1.750E-01 1.931E-01 2.110E-01 2.284E-01 2.451E-01 2.609E-01 2.755E-01 2.887E-01 3.003E-01 3.100E-01 3.178E-01 3.234E-01 3.268E-01 3.280E-01 3.268E-01 3.234E-01 3.178E-01 3.100E-01 3.003E-01 2.887E-01 2.755E-01 2.609E-01 2.451E-01 2.284E-01 2.110E-01 1.931E-01 1.750E-01 1.570E-01 1.391E-01 1.217E-01 1.050E-01 8.903E-02 7.408E-02 6.024E-02 4.766E-02 3.642E-02 2.662E-02 1.831E-02 1.153E-02 6.319E-03 2.672E-03 5.789E-04 1.105E-05 9.237E-04 3.258E-03 6.941E-03 1.189E-02 1.801E-02 2.519E-02 3.333E-02 4.231E-02 5.201E-02 6.230E-02 7.305E-02 8.413E-02 9.543E-02 1.068E-01 1.182E-01 1.293E-01 1.403E-01 1.508E-01 1.609E-01 1.704E-01 1.793E-01 1.875E-01 1.948E-01 2.014E-01 2.070E-01 2.117E-01 2.155E-01 2.183E-01 2.202E-01 2.211E-01 2.210E-01 2.200E-01 2.180E-01 2.152E-01 2.115E-01 2.071E-01 2.019E-01 1.960E-01 1.895E-01 1.824E-01 1.748E-01 1.668E-01 1.585E-01 1.498E-01 1.410E-01 1.320E-01 1.229E-01 1.138E-01 1.048E-01 9.590E-02 8.717E-02 7.867E-02 7.045E-02 6.255E-02 5.503E-02 4.791E-02 4.123E-02 3.501E-02 2.928E-02 2.406E-02 1.935E-02 1.516E-02 1.151E-02 8.375E-03 5.762E-03 3.658E-03 2.049E-03 9.178E-04 2.431E-04 1.402E-06 1.664E-04 7.096E-04 1.601E-03 2.807E-03 4.296E-03 6.034E-03 7.986E-03 1.012E-02 1.239E-02 1.478E-02 1.724E-02 1.974E-02 2.226E-02 2.477E-02 2.722E-02 2.961E-02 3.189E-02 3.406E-02 3.609E-02 3.796E-02 3.967E-02 4.118E-02 4.250E-02 4.361E-02 4.451E-02 4.520E-02 4.567E-02 4.592E-02 4.597E-02 4.590E-02 4.562E-02 4.512E-02 4.440E-02 4.347E-02 4.233E-02 4.098E-02 3.944E-02 3.772E-02 3.582E-02 3.376E-02 3.157E-02 2.927E-02 2.687E-02 2.440E-02 2.189E-02 1.937E-02 1.687E-02 1.441E-02 1.204E-02 9.777E-03 7.669E-03 5.746E-03 4.042E-03 2.594E-03 1.434E-03 5.962E-04 1.123E-04 1.271E-05 3.258E-04 1.078E-03 2.291E-03 3.988E-03 6.184E-03 8.893E-03 1.212E-02 1.588E-02 2.017E-02 2.499E-02 3.032E-02 3.616E-02 4.248E-02 4.926E-02 5.648E-02 6.410E-02 7.208E-02 8.038E-02 8.896E-02 9.775E-02 1.067E-01 1.158E-01 1.249E-01 1.340E-01 1.430E-01 1.518E-01 1.604E-01 1.687E-01 1.766E-01 1.841E-01 1.911E-01 1.975E-01 2.032E-01 2.083E-01 2.125E-01 2.160E-01 2.186E-01 2.203E-01 2.211E-01 2.209E-01 2.198E-01 2.176E-01 2.145E-01 2.104E-01 2.054E-01 1.994E-01 1.926E-01 1.849E-01 1.764E-01 1.673E-01 1.575E-01 1.471E-01 1.364E-01 1.252E-01 1.139E-01 1.024E-01 9.095E-02 7.962E-02 6.854E-02 5.786E-02 4.770E-02 3.819E-02 2.947E-02 2.166E-02 1.488E-02 9.244E-03 4.863E-03 1.832E-03 2.374E-04 1.532E-04 1.640E-03 4.742E-03 9.489E-03 1.589E-02 2.395E-02 3.362E-02 4.487E-02 5.764E-02 7.182E-02 8.732E-02 1.040E-01 1.217E-01 1.403E-01 1.595E-01 1.793E-01 1.992E-01 2.192E-01 2.389E-01 2.581E-01 2.765E-01 2.939E-01 3.100E-01 3.245E-01 3.373E-01 3.481E-01 3.566E-01 3.629E-01 3.667E-01 3.680E-01 3.667E-01 3.629E-01 3.566E-01 3.481E-01 3.373E-01 3.245E-01 3.100E-01 2.939E-01 2.765E-01 2.581E-01 2.389E-01 2.192E-01 1.992E-01 1.793E-01 1.595E-01 1.403E-01 1.217E-01 1.040E-01 8.732E-02 7.182E-02 5.764E-02 4.487E-02 3.362E-02 2.395E-02 1.589E-02 9.489E-03 4.742E-03 1.640E-03 1.532E-04 2.374E-04 1.832E-03 4.863E-03 9.244E-03 1.488E-02 2.166E-02 2.947E-02 3.819E-02 4.770E-02 5.786E-02 6.854E-02 7.962E-02 9.095E-02 1.024E-01 1.139E-01 1.252E-01 1.364E-01 1.471E-01 1.575E-01 1.673E-01 1.764E-01 1.849E-01 1.926E-01 1.994E-01 2.054E-01 2.104E-01 2.145E-01 2.176E-01 2.198E-01 2.209E-01 2.211E-01 2.203E-01 2.186E-01 2.160E-01 2.125E-01 2.083E-01 2.032E-01 1.975E-01 1.911E-01 1.841E-01 1.766E-01 1.687E-01 1.604E-01 1.518E-01 1.430E-01 1.340E-01 1.249E-01 1.158E-01 1.067E-01 9.775E-02 8.896E-02 8.038E-02 7.208E-02 6.410E-02 5.648E-02 4.926E-02 4.248E-02 3.616E-02 3.032E-02 2.499E-02 2.017E-02 1.588E-02 1.212E-02 8.893E-03 6.184E-03 3.988E-03 2.291E-03 1.078E-03 3.258E-04 1.271E-05 1.123E-04 5.962E-04 1.434E-03 2.594E-03 4.042E-03 5.746E-03 7.669E-03 9.777E-03 1.204E-02 1.441E-02 1.687E-02 1.937E-02 2.189E-02 2.440E-02 2.687E-02 2.927E-02 3.157E-02 3.376E-02 3.582E-02 3.772E-02 3.944E-02 4.098E-02 4.233E-02 4.347E-02 4.440E-02 4.512E-02 4.562E-02 4.590E-02 4.597E-02 4.588E-02 4.557E-02 4.504E-02 4.430E-02 4.334E-02 4.217E-02 4.080E-02 3.923E-02 3.748E-02 3.556E-02 3.348E-02 3.127E-02 2.895E-02 2.654E-02 2.406E-02 2.154E-02 1.902E-02 1.652E-02 1.407E-02 1.170E-02 9.461E-03 7.375E-03 5.479E-03 3.809E-03 2.400E-03 1.285E-03 4.981E-04 7.095E-05 3.381E-05 4.149E-04 1.240E-03 2.532E-03 4.312E-03 6.595E-03 9.396E-03 1.272E-02 1.658E-02 2.097E-02 2.588E-02 3.131E-02 3.725E-02 4.367E-02 5.055E-02 5.786E-02 6.556E-02 7.363E-02 8.200E-02 9.065E-02 9.950E-02 1.085E-01 1.176E-01 1.267E-01 1.358E-01 1.448E-01 1.537E-01 1.622E-01 1.705E-01 1.783E-01 1.857E-01 1.926E-01 1.989E-01 2.045E-01 2.094E-01 2.135E-01 2.167E-01 2.191E-01 2.206E-01 2.211E-01 2.207E-01 2.193E-01 2.169E-01 2.135E-01 2.091E-01 2.038E-01 1.975E-01 1.904E-01 1.824E-01 1.737E-01 1.642E-01 1.542E-01 1.436E-01 1.326E-01 1.213E-01 1.098E-01 9.826E-02 8.673E-02 7.537E-02 6.433E-02 5.373E-02 4.371E-02 3.441E-02 2.597E-02 1.850E-02 1.214E-02 7.009E-03 3.209E-03 8.437E-04 9.434E-07 7.568E-04 3.173E-03 7.295E-03 1.315E-02 2.076E-02 3.010E-02 4.115E-02 5.387E-02 6.817E-02 8.397E-02 1.012E-01 1.196E-01 1.391E-01 1.595E-01 1.807E-01 2.023E-01 2.242E-01 2.461E-01 2.676E-01 2.887E-01 3.089E-01 3.280E-01 3.457E-01 3.616E-01 3.757E-01 3.875E-01 3.970E-01 4.038E-01 4.080E-01 4.094E-01 4.080E-01 4.038E-01 3.970E-01 3.875E-01 3.757E-01 3.616E-01 3.457E-01 3.280E-01 3.089E-01 2.887E-01 2.676E-01 2.461E-01 2.242E-01 2.023E-01 1.807E-01 1.595E-01 1.391E-01 1.196E-01 1.012E-01 8.397E-02 6.817E-02 5.387E-02 4.115E-02 3.010E-02 2.076E-02 1.315E-02 7.295E-03 3.173E-03 7.568E-04 9.434E-07 8.437E-04 3.209E-03 7.009E-03 1.214E-02 1.850E-02 2.597E-02 3.441E-02 4.371E-02 5.373E-02 6.433E-02 7.537E-02 8.673E-02 9.826E-02 1.098E-01 1.213E-01 1.326E-01 1.436E-01 1.542E-01 1.642E-01 1.737E-01 1.824E-01 1.904E-01 1.975E-01 2.038E-01 2.091E-01 2.135E-01 2.169E-01 2.193E-01 2.207E-01 2.211E-01 2.206E-01 2.191E-01 2.167E-01 2.135E-01 2.094E-01 2.045E-01 1.989E-01 1.926E-01 1.857E-01 1.783E-01 1.705E-01 1.622E-01 1.537E-01 1.448E-01 1.358E-01 1.267E-01 1.176E-01 1.085E-01 9.950E-02 9.065E-02 8.200E-02 7.363E-02 6.556E-02 5.786E-02 5.055E-02 4.367E-02 3.725E-02 3.131E-02 2.588E-02 2.097E-02 1.658E-02 1.272E-02 9.396E-03 6.595E-03 4.312E-03 2.532E-03 1.240E-03 4.149E-04 3.381E-05 7.095E-05 4.981E-04 1.285E-03 2.400E-03 3.809E-03 5.479E-03 7.375E-03 9.461E-03 1.170E-02 1.407E-02 1.652E-02 1.902E-02 2.154E-02 2.406E-02 2.654E-02 2.895E-02 3.127E-02 3.348E-02 3.556E-02 3.748E-02 3.923E-02 4.080E-02 4.217E-02 4.334E-02 4.430E-02 4.504E-02 4.557E-02 4.588E-02 4.597E-02 4.585E-02 4.552E-02 4.497E-02 4.420E-02 4.321E-02 4.202E-02 4.062E-02 3.903E-02 3.725E-02 3.531E-02 3.321E-02 3.099E-02 2.865E-02 2.622E-02 2.374E-02 2.122E-02 1.869E-02 1.619E-02 1.375E-02 1.139E-02 9.169E-03 7.104E-03 5.234E-03 3.596E-03 2.224E-03 1.152E-03 4.139E-04 4.068E-05 6.286E-05 5.085E-04 1.403E-03 2.770E-03 4.628E-03 6.994E-03 9.880E-03 1.329E-02 1.724E-02 2.172E-02 2.673E-02 3.226E-02 3.829E-02 4.480E-02 5.177E-02 5.916E-02 6.695E-02 7.509E-02 8.353E-02 9.224E-02 1.011E-01 1.102E-01 1.193E-01 1.285E-01 1.376E-01 1.466E-01 1.554E-01 1.639E-01 1.721E-01 1.799E-01 1.872E-01 1.940E-01 2.001E-01 2.056E-01 2.103E-01 2.143E-01 2.174E-01 2.196E-01 2.208E-01 2.211E-01 2.205E-01 2.188E-01 2.161E-01 2.124E-01 2.078E-01 2.022E-01 1.956E-01 1.882E-01 1.800E-01 1.710E-01 1.613E-01 1.510E-01 1.403E-01 1.291E-01 1.176E-01 1.060E-01 9.435E-02 8.276E-02 7.141E-02 6.041E-02 4.991E-02 4.005E-02 3.098E-02 2.282E-02 1.571E-02 9.783E-03 5.157E-03 1.946E-03 2.518E-04 1.654E-04 1.765E-03 5.113E-03 1.026E-02 1.723E-02 2.603E-02 3.666E-02 4.909E-02 6.327E-02 7.912E-02 9.654E-02 1.154E-01 1.356E-01 1.570E-01 1.793E-01 2.023E-01 2.259E-01 2.497E-01 2.735E-01 2.971E-01 3.200E-01 3.421E-01 3.629E-01 3.822E-01 3.997E-01 4.151E-01 4.281E-01 4.384E-01 4.460E-01 4.506E-01 4.521E-01 4.506E-01 4.460E-01 4.384E-01 4.281E-01 4.151E-01 3.997E-01 3.822E-01 3.629E-01 3.421E-01 3.200E-01 2.971E-01 2.735E-01 2.497E-01 2.259E-01 2.023E-01 1.793E-01 1.570E-01 1.356E-01 1.154E-01 9.654E-02 7.912E-02 6.327E-02 4.909E-02 3.666E-02 2.603E-02 1.723E-02 1.026E-02 5.113E-03 1.765E-03 1.654E-04 2.518E-04 1.946E-03 5.157E-03 9.783E-03 1.571E-02 2.282E-02 3.098E-02 4.005E-02 4.991E-02 6.041E-02 7.141E-02 8.276E-02 9.435E-02 1.060E-01 1.176E-01 1.291E-01 1.403E-01 1.510E-01 1.613E-01 1.710E-01 1.800E-01 1.882E-01 1.956E-01 2.022E-01 2.078E-01 2.124E-01 2.161E-01 2.188E-01 2.205E-01 2.211E-01 2.208E-01 2.196E-01 2.174E-01 2.143E-01 2.103E-01 2.056E-01 2.001E-01 1.940E-01 1.872E-01 1.799E-01 1.721E-01 1.639E-01 1.554E-01 1.466E-01 1.376E-01 1.285E-01 1.193E-01 1.102E-01 1.011E-01 9.224E-02 8.353E-02 7.509E-02 6.695E-02 5.916E-02 5.177E-02 4.480E-02 3.829E-02 3.226E-02 2.673E-02 2.172E-02 1.724E-02 1.329E-02 9.880E-03 6.994E-03 4.628E-03 2.770E-03 1.403E-03 5.085E-04 6.286E-05 4.068E-05 4.139E-04 1.152E-03 2.224E-03 3.596E-03 5.234E-03 7.104E-03 9.169E-03 1.139E-02 1.375E-02 1.619E-02 1.869E-02 2.122E-02 2.374E-02 2.622E-02 2.865E-02 3.099E-02 3.321E-02 3.531E-02 3.725E-02 3.903E-02 4.062E-02 4.202E-02 4.321E-02 4.420E-02 4.497E-02 4.552E-02 4.585E-02 4.597E-02 4.583E-02 4.547E-02 4.489E-02 4.410E-02 4.309E-02 4.187E-02 4.045E-02 3.884E-02 3.704E-02 3.508E-02 3.296E-02 3.072E-02 2.837E-02 2.593E-02 2.344E-02 2.091E-02 1.838E-02 1.588E-02 1.345E-02 1.111E-02 8.898E-03 6.854E-03 5.010E-03 3.402E-03 2.066E-03 1.035E-03 3.421E-04 1.993E-05 9.812E-05 6.046E-04 1.565E-03 3.001E-03 4.933E-03 7.376E-03 1.034E-02 1.384E-02 1.787E-02 2.244E-02 2.754E-02 3.315E-02 3.927E-02 4.586E-02 5.291E-02 6.039E-02 6.825E-02 7.646E-02 8.497E-02 9.373E-02 1.027E-01 1.118E-01 1.209E-01 1.301E-01 1.392E-01 1.482E-01 1.570E-01 1.655E-01 1.736E-01 1.814E-01 1.886E-01 1.953E-01 2.013E-01 2.066E-01 2.112E-01 2.150E-01 2.179E-01 2.199E-01 2.210E-01 2.211E-01 2.202E-01 2.182E-01 2.153E-01 2.114E-01 2.065E-01 2.006E-01 1.938E-01 1.861E-01 1.777E-01 1.684E-01 1.585E-01 1.480E-01 1.371E-01 1.257E-01 1.142E-01 1.024E-01 9.068E-02 7.907E-02 6.772E-02 5.679E-02 4.640E-02 3.672E-02 2.787E-02 2.001E-02 1.326E-02 7.773E-03 3.658E-03 1.036E-03 1.105E-05 6.775E-04 3.115E-03 7.388E-03 1.354E-02 2.162E-02 3.161E-02 4.352E-02 5.732E-02 7.294E-02 9.032E-02 1.094E-01 1.299E-01 1.519E-01 1.750E-01 1.992E-01 2.242E-01 2.497E-01 2.755E-01 3.013E-01 3.268E-01 3.517E-01 3.757E-01 3.983E-01 4.194E-01 4.384E-01 4.552E-01 4.694E-01 4.808E-01 4.891E-01 4.941E-01 4.958E-01 4.941E-01 4.891E-01 4.808E-01 4.694E-01 4.552E-01 4.384E-01 4.194E-01 3.983E-01 3.757E-01 3.517E-01 3.268E-01 3.013E-01 2.755E-01 2.497E-01 2.242E-01 1.992E-01 1.750E-01 1.519E-01 1.299E-01 1.094E-01 9.032E-02 7.294E-02 5.732E-02 4.352E-02 3.161E-02 2.162E-02 1.354E-02 7.388E-03 3.115E-03 6.775E-04 1.105E-05 1.036E-03 3.658E-03 7.773E-03 1.326E-02 2.001E-02 2.787E-02 3.672E-02 4.640E-02 5.679E-02 6.772E-02 7.907E-02 9.068E-02 1.024E-01 1.142E-01 1.257E-01 1.371E-01 1.480E-01 1.585E-01 1.684E-01 1.777E-01 1.861E-01 1.938E-01 2.006E-01 2.065E-01 2.114E-01 2.153E-01 2.182E-01 2.202E-01 2.211E-01 2.210E-01 2.199E-01 2.179E-01 2.150E-01 2.112E-01 2.066E-01 2.013E-01 1.953E-01 1.886E-01 1.814E-01 1.736E-01 1.655E-01 1.570E-01 1.482E-01 1.392E-01 1.301E-01 1.209E-01 1.118E-01 1.027E-01 9.373E-02 8.497E-02 7.646E-02 6.825E-02 6.039E-02 5.291E-02 4.586E-02 3.927E-02 3.315E-02 2.754E-02 2.244E-02 1.787E-02 1.384E-02 1.034E-02 7.376E-03 4.933E-03 3.001E-03 1.565E-03 6.046E-04 9.812E-05 1.993E-05 3.421E-04 1.035E-03 2.066E-03 3.402E-03 5.010E-03 6.854E-03 8.898E-03 1.111E-02 1.345E-02 1.588E-02 1.838E-02 2.091E-02 2.344E-02 2.593E-02 2.837E-02 3.072E-02 3.296E-02 3.508E-02 3.704E-02 3.884E-02 4.045E-02 4.187E-02 4.309E-02 4.410E-02 4.489E-02 4.547E-02 4.583E-02 4.596E-02 4.580E-02 4.542E-02 4.483E-02 4.401E-02 4.298E-02 4.174E-02 4.029E-02 3.866E-02 3.684E-02 3.486E-02 3.273E-02 3.047E-02 2.811E-02 2.566E-02 2.316E-02 2.063E-02 1.810E-02 1.560E-02 1.317E-02 1.085E-02 8.650E-03 6.625E-03 4.805E-03 3.227E-03 1.924E-03 9.309E-04 2.815E-04 7.209E-06 1.379E-04 7.014E-04 1.723E-03 3.224E-03 5.225E-03 7.741E-03 1.078E-02 1.436E-02 1.847E-02 2.312E-02 2.830E-02 3.399E-02 4.019E-02 4.686E-02 5.399E-02 6.154E-02 6.947E-02 7.774E-02 8.631E-02 9.512E-02 1.041E-01 1.132E-01 1.224E-01 1.316E-01 1.407E-01 1.497E-01 1.585E-01 1.669E-01 1.750E-01 1.827E-01 1.899E-01 1.964E-01 2.024E-01 2.076E-01 2.120E-01 2.156E-01 2.184E-01 2.202E-01 2.211E-01 2.210E-01 2.198E-01 2.177E-01 2.145E-01 2.104E-01 2.052E-01 1.991E-01 1.921E-01 1.842E-01 1.755E-01 1.660E-01 1.559E-01 1.452E-01 1.341E-01 1.226E-01 1.109E-01 9.907E-02 8.727E-02 7.565E-02 6.433E-02 5.346E-02 4.320E-02 3.369E-02 2.508E-02 1.752E-02 1.114E-02 6.085E-03 2.477E-03 4.369E-04 7.283E-05 1.481E-03 4.742E-03 9.923E-03 1.707E-02 2.623E-02 3.739E-02 5.055E-02 6.569E-02 8.274E-02 1.016E-01 1.223E-01 1.445E-01 1.682E-01 1.931E-01 2.192E-01 2.461E-01 2.735E-01 3.013E-01 3.291E-01 3.566E-01 3.835E-01 4.094E-01 4.340E-01 4.568E-01 4.775E-01 4.958E-01 5.113E-01 5.237E-01 5.328E-01 5.383E-01 5.402E-01 5.383E-01 5.328E-01 5.237E-01 5.113E-01 4.958E-01 4.775E-01 4.568E-01 4.340E-01 4.094E-01 3.835E-01 3.566E-01 3.291E-01 3.013E-01 2.735E-01 2.461E-01 2.192E-01 1.931E-01 1.682E-01 1.445E-01 1.223E-01 1.016E-01 8.274E-02 6.569E-02 5.055E-02 3.739E-02 2.623E-02 1.707E-02 9.923E-03 4.742E-03 1.481E-03 7.283E-05 4.369E-04 2.477E-03 6.085E-03 1.114E-02 1.752E-02 2.508E-02 3.369E-02 4.320E-02 5.346E-02 6.433E-02 7.565E-02 8.727E-02 9.907E-02 1.109E-01 1.226E-01 1.341E-01 1.452E-01 1.559E-01 1.660E-01 1.755E-01 1.842E-01 1.921E-01 1.991E-01 2.052E-01 2.104E-01 2.145E-01 2.177E-01 2.198E-01 2.210E-01 2.211E-01 2.202E-01 2.184E-01 2.156E-01 2.120E-01 2.076E-01 2.024E-01 1.964E-01 1.899E-01 1.827E-01 1.750E-01 1.669E-01 1.585E-01 1.497E-01 1.407E-01 1.316E-01 1.224E-01 1.132E-01 1.041E-01 9.512E-02 8.631E-02 7.774E-02 6.947E-02 6.154E-02 5.399E-02 4.686E-02 4.019E-02 3.399E-02 2.830E-02 2.312E-02 1.847E-02 1.436E-02 1.078E-02 7.741E-03 5.225E-03 3.224E-03 1.723E-03 7.014E-04 1.379E-04 7.209E-06 2.815E-04 9.309E-04 1.924E-03 3.227E-03 4.805E-03 6.625E-03 8.650E-03 1.085E-02 1.317E-02 1.560E-02 1.810E-02 2.063E-02 2.316E-02 2.566E-02 2.811E-02 3.047E-02 3.273E-02 3.486E-02 3.684E-02 3.866E-02 4.029E-02 4.174E-02 4.298E-02 4.401E-02 4.483E-02 4.542E-02 4.580E-02 4.596E-02 4.578E-02 4.538E-02 4.476E-02 4.392E-02 4.287E-02 4.161E-02 4.015E-02 3.849E-02 3.666E-02 3.466E-02 3.251E-02 3.024E-02 2.787E-02 2.541E-02 2.290E-02 2.037E-02 1.784E-02 1.535E-02 1.292E-02 1.060E-02 8.424E-03 6.417E-03 4.620E-03 3.068E-03 1.797E-03 8.399E-04 2.307E-04 1.084E-06 1.807E-04 7.971E-04 1.875E-03 3.437E-03 5.502E-03 8.084E-03 1.120E-02 1.484E-02 1.903E-02 2.375E-02 2.900E-02 3.477E-02 4.104E-02 4.779E-02 5.499E-02 6.260E-02 7.060E-02 7.893E-02 8.755E-02 9.640E-02 1.054E-01 1.146E-01 1.238E-01 1.330E-01 1.421E-01 1.511E-01 1.598E-01 1.682E-01 1.763E-01 1.839E-01 1.910E-01 1.975E-01 2.033E-01 2.084E-01 2.127E-01 2.162E-01 2.188E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.138E-01 2.094E-01 2.040E-01 1.977E-01 1.904E-01 1.823E-01 1.734E-01 1.637E-01 1.534E-01 1.426E-01 1.313E-01 1.197E-01 1.079E-01 9.597E-02 8.413E-02 7.250E-02 6.122E-02 5.043E-02 4.030E-02 3.098E-02 2.260E-02 1.534E-02 9.320E-03 4.690E-03 1.578E-03 1.066E-04 3.863E-04 2.515E-03 6.577E-03 1.264E-02 2.076E-02 3.096E-02 4.325E-02 5.764E-02 7.408E-02 9.251E-02 1.129E-01 1.350E-01 1.589E-01 1.843E-01 2.110E-01 2.389E-01 2.676E-01 2.971E-01 3.268E-01 3.566E-01 3.862E-01 4.151E-01 4.430E-01 4.694E-01 4.941E-01 5.166E-01 5.365E-01 5.533E-01 5.669E-01 5.768E-01 5.828E-01 5.849E-01 5.828E-01 5.768E-01 5.669E-01 5.533E-01 5.365E-01 5.166E-01 4.941E-01 4.694E-01 4.430E-01 4.151E-01 3.862E-01 3.566E-01 3.268E-01 2.971E-01 2.676E-01 2.389E-01 2.110E-01 1.843E-01 1.589E-01 1.350E-01 1.129E-01 9.251E-02 7.408E-02 5.764E-02 4.325E-02 3.096E-02 2.076E-02 1.264E-02 6.577E-03 2.515E-03 3.863E-04 1.066E-04 1.578E-03 4.690E-03 9.320E-03 1.534E-02 2.260E-02 3.098E-02 4.030E-02 5.043E-02 6.122E-02 7.250E-02 8.413E-02 9.597E-02 1.079E-01 1.197E-01 1.313E-01 1.426E-01 1.534E-01 1.637E-01 1.734E-01 1.823E-01 1.904E-01 1.977E-01 2.040E-01 2.094E-01 2.138E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.188E-01 2.162E-01 2.127E-01 2.084E-01 2.033E-01 1.975E-01 1.910E-01 1.839E-01 1.763E-01 1.682E-01 1.598E-01 1.511E-01 1.421E-01 1.330E-01 1.238E-01 1.146E-01 1.054E-01 9.640E-02 8.755E-02 7.893E-02 7.060E-02 6.260E-02 5.499E-02 4.779E-02 4.104E-02 3.477E-02 2.900E-02 2.375E-02 1.903E-02 1.484E-02 1.120E-02 8.084E-03 5.502E-03 3.437E-03 1.875E-03 7.971E-04 1.807E-04 1.084E-06 2.307E-04 8.399E-04 1.797E-03 3.068E-03 4.620E-03 6.417E-03 8.424E-03 1.060E-02 1.292E-02 1.535E-02 1.784E-02 2.037E-02 2.290E-02 2.541E-02 2.787E-02 3.024E-02 3.251E-02 3.466E-02 3.666E-02 3.849E-02 4.015E-02 4.161E-02 4.287E-02 4.392E-02 4.476E-02 4.538E-02 4.578E-02 4.595E-02 4.575E-02 4.533E-02 4.470E-02 4.384E-02 4.277E-02 4.149E-02 4.001E-02 3.834E-02 3.649E-02 3.447E-02 3.231E-02 3.003E-02 2.765E-02 2.518E-02 2.267E-02 2.013E-02 1.760E-02 1.511E-02 1.269E-02 1.039E-02 8.218E-03 6.229E-03 4.453E-03 2.927E-03 1.684E-03 7.605E-04 1.886E-04 2.162E-07 2.249E-04 8.902E-04 2.021E-03 3.639E-03 5.762E-03 8.406E-03 1.158E-02 1.529E-02 1.955E-02 2.434E-02 2.966E-02 3.549E-02 4.183E-02 4.864E-02 5.591E-02 6.358E-02 7.163E-02 8.002E-02 8.868E-02 9.758E-02 1.067E-01 1.158E-01 1.251E-01 1.343E-01 1.434E-01 1.523E-01 1.611E-01 1.694E-01 1.775E-01 1.850E-01 1.920E-01 1.984E-01 2.042E-01 2.092E-01 2.133E-01 2.167E-01 2.191E-01 2.206E-01 2.211E-01 2.207E-01 2.192E-01 2.166E-01 2.130E-01 2.085E-01 2.029E-01 1.963E-01 1.889E-01 1.806E-01 1.714E-01 1.616E-01 1.511E-01 1.401E-01 1.287E-01 1.170E-01 1.051E-01 9.313E-02 8.126E-02 6.963E-02 5.839E-02 4.770E-02 3.770E-02 2.855E-02 2.042E-02 1.344E-02 7.773E-03 3.556E-03 9.237E-04 2.496E-07 8.991E-04 3.721E-03 8.552E-03 1.546E-02 2.450E-02 3.571E-02 4.909E-02 6.465E-02 8.233E-02 1.021E-01 1.239E-01 1.475E-01 1.730E-01 2.000E-01 2.284E-01 2.581E-01 2.887E-01 3.200E-01 3.517E-01 3.835E-01 4.151E-01 4.460E-01 4.759E-01 5.044E-01 5.310E-01 5.552E-01 5.768E-01 5.952E-01 6.099E-01 6.208E-01 6.274E-01 6.296E-01 6.274E-01 6.208E-01 6.099E-01 5.952E-01 5.768E-01 5.552E-01 5.310E-01 5.044E-01 4.759E-01 4.460E-01 4.151E-01 3.835E-01 3.517E-01 3.200E-01 2.887E-01 2.581E-01 2.284E-01 2.000E-01 1.730E-01 1.475E-01 1.239E-01 1.021E-01 8.233E-02 6.465E-02 4.909E-02 3.571E-02 2.450E-02 1.546E-02 8.552E-03 3.721E-03 8.991E-04 2.496E-07 9.237E-04 3.556E-03 7.773E-03 1.344E-02 2.042E-02 2.855E-02 3.770E-02 4.770E-02 5.839E-02 6.963E-02 8.126E-02 9.313E-02 1.051E-01 1.170E-01 1.287E-01 1.401E-01 1.511E-01 1.616E-01 1.714E-01 1.806E-01 1.889E-01 1.963E-01 2.029E-01 2.085E-01 2.130E-01 2.166E-01 2.192E-01 2.207E-01 2.211E-01 2.206E-01 2.191E-01 2.167E-01 2.133E-01 2.092E-01 2.042E-01 1.984E-01 1.920E-01 1.850E-01 1.775E-01 1.694E-01 1.611E-01 1.523E-01 1.434E-01 1.343E-01 1.251E-01 1.158E-01 1.067E-01 9.758E-02 8.868E-02 8.002E-02 7.163E-02 6.358E-02 5.591E-02 4.864E-02 4.183E-02 3.549E-02 2.966E-02 2.434E-02 1.955E-02 1.529E-02 1.158E-02 8.406E-03 5.762E-03 3.639E-03 2.021E-03 8.902E-04 2.249E-04 2.162E-07 1.886E-04 7.605E-04 1.684E-03 2.927E-03 4.453E-03 6.229E-03 8.218E-03 1.039E-02 1.269E-02 1.511E-02 1.760E-02 2.013E-02 2.267E-02 2.518E-02 2.765E-02 3.003E-02 3.231E-02 3.447E-02 3.649E-02 3.834E-02 4.001E-02 4.149E-02 4.277E-02 4.384E-02 4.470E-02 4.533E-02 4.575E-02 4.594E-02 4.573E-02 4.529E-02 4.464E-02 4.377E-02 4.268E-02 4.138E-02 3.988E-02 3.820E-02 3.633E-02 3.430E-02 3.213E-02 2.984E-02 2.744E-02 2.497E-02 2.245E-02 1.991E-02 1.739E-02 1.490E-02 1.249E-02 1.019E-02 8.034E-03 6.061E-03 4.304E-03 2.801E-03 1.585E-03 6.919E-04 1.541E-04 3.357E-06 2.693E-04 9.791E-04 2.157E-03 3.826E-03 6.003E-03 8.703E-03 1.194E-02 1.571E-02 2.002E-02 2.487E-02 3.026E-02 3.616E-02 4.255E-02 4.943E-02 5.674E-02 6.447E-02 7.258E-02 8.101E-02 8.972E-02 9.865E-02 1.078E-01 1.170E-01 1.262E-01 1.354E-01 1.445E-01 1.535E-01 1.622E-01 1.705E-01 1.785E-01 1.860E-01 1.929E-01 1.993E-01 2.049E-01 2.098E-01 2.139E-01 2.171E-01 2.194E-01 2.208E-01 2.211E-01 2.205E-01 2.188E-01 2.161E-01 2.124E-01 2.076E-01 2.018E-01 1.951E-01 1.875E-01 1.790E-01 1.697E-01 1.597E-01 1.490E-01 1.379E-01 1.264E-01 1.145E-01 1.026E-01 9.054E-02 7.866E-02 6.704E-02 5.585E-02 4.524E-02 3.538E-02 2.641E-02 1.850E-02 1.181E-02 6.474E-03 2.652E-03 4.758E-04 7.283E-05 1.559E-03 5.037E-03 1.060E-02 1.831E-02 2.822E-02 4.038E-02 5.479E-02 7.145E-02 9.032E-02 1.114E-01 1.345E-01 1.595E-01 1.865E-01 2.151E-01 2.451E-01 2.765E-01 3.089E-01 3.421E-01 3.757E-01 4.094E-01 4.430E-01 4.759E-01 5.078E-01 5.383E-01 5.669E-01 5.931E-01 6.164E-01 6.364E-01 6.525E-01 6.643E-01 6.716E-01 6.740E-01 6.716E-01 6.643E-01 6.525E-01 6.364E-01 6.164E-01 5.931E-01 5.669E-01 5.383E-01 5.078E-01 4.759E-01 4.430E-01 4.094E-01 3.757E-01 3.421E-01 3.089E-01 2.765E-01 2.451E-01 2.151E-01 1.865E-01 1.595E-01 1.345E-01 1.114E-01 9.032E-02 7.145E-02 5.479E-02 4.038E-02 2.822E-02 1.831E-02 1.060E-02 5.037E-03 1.559E-03 7.283E-05 4.758E-04 2.652E-03 6.474E-03 1.181E-02 1.850E-02 2.641E-02 3.538E-02 4.524E-02 5.585E-02 6.704E-02 7.866E-02 9.054E-02 1.026E-01 1.145E-01 1.264E-01 1.379E-01 1.490E-01 1.597E-01 1.697E-01 1.790E-01 1.875E-01 1.951E-01 2.018E-01 2.076E-01 2.124E-01 2.161E-01 2.188E-01 2.205E-01 2.211E-01 2.208E-01 2.194E-01 2.171E-01 2.139E-01 2.098E-01 2.049E-01 1.993E-01 1.929E-01 1.860E-01 1.785E-01 1.705E-01 1.622E-01 1.535E-01 1.445E-01 1.354E-01 1.262E-01 1.170E-01 1.078E-01 9.865E-02 8.972E-02 8.101E-02 7.258E-02 6.447E-02 5.674E-02 4.943E-02 4.255E-02 3.616E-02 3.026E-02 2.487E-02 2.002E-02 1.571E-02 1.194E-02 8.703E-03 6.003E-03 3.826E-03 2.157E-03 9.791E-04 2.693E-04 3.357E-06 1.541E-04 6.919E-04 1.585E-03 2.801E-03 4.304E-03 6.061E-03 8.034E-03 1.019E-02 1.249E-02 1.490E-02 1.739E-02 1.991E-02 2.245E-02 2.497E-02 2.744E-02 2.984E-02 3.213E-02 3.430E-02 3.633E-02 3.820E-02 3.988E-02 4.138E-02 4.268E-02 4.377E-02 4.464E-02 4.529E-02 4.573E-02 4.594E-02 4.571E-02 4.526E-02 4.459E-02 4.370E-02 4.260E-02 4.128E-02 3.977E-02 3.807E-02 3.619E-02 3.415E-02 3.197E-02 2.967E-02 2.726E-02 2.479E-02 2.226E-02 1.972E-02 1.719E-02 1.471E-02 1.230E-02 1.001E-02 7.870E-03 5.911E-03 4.173E-03 2.690E-03 1.499E-03 6.330E-04 1.261E-04 9.360E-06 3.124E-04 1.062E-03 2.284E-03 3.998E-03 6.223E-03 8.973E-03 1.226E-02 1.608E-02 2.045E-02 2.536E-02 3.080E-02 3.675E-02 4.320E-02 5.013E-02 5.750E-02 6.528E-02 7.343E-02 8.190E-02 9.065E-02 9.961E-02 1.087E-01 1.180E-01 1.272E-01 1.364E-01 1.456E-01 1.545E-01 1.632E-01 1.715E-01 1.794E-01 1.869E-01 1.938E-01 2.000E-01 2.056E-01 2.104E-01 2.144E-01 2.175E-01 2.197E-01 2.209E-01 2.211E-01 2.203E-01 2.185E-01 2.156E-01 2.117E-01 2.068E-01 2.008E-01 1.940E-01 1.861E-01 1.775E-01 1.680E-01 1.579E-01 1.471E-01 1.359E-01 1.242E-01 1.123E-01 1.003E-01 8.823E-02 7.633E-02 6.473E-02 5.359E-02 4.307E-02 3.333E-02 2.454E-02 1.684E-02 1.041E-02 5.398E-03 1.946E-03 1.968E-04 2.800E-04 2.314E-03 6.405E-03 1.264E-02 2.110E-02 3.183E-02 4.487E-02 6.024E-02 7.793E-02 9.791E-02 1.201E-01 1.445E-01 1.709E-01 1.992E-01 2.293E-01 2.609E-01 2.939E-01 3.280E-01 3.629E-01 3.983E-01 4.340E-01 4.694E-01 5.044E-01 5.383E-01 5.708E-01 6.014E-01 6.296E-01 6.548E-01 6.765E-01 6.941E-01 7.071E-01 7.151E-01 7.178E-01 7.151E-01 7.071E-01 6.941E-01 6.765E-01 6.548E-01 6.296E-01 6.014E-01 5.708E-01 5.383E-01 5.044E-01 4.694E-01 4.340E-01 3.983E-01 3.629E-01 3.280E-01 2.939E-01 2.609E-01 2.293E-01 1.992E-01 1.709E-01 1.445E-01 1.201E-01 9.791E-02 7.793E-02 6.024E-02 4.487E-02 3.183E-02 2.110E-02 1.264E-02 6.405E-03 2.314E-03 2.800E-04 1.968E-04 1.946E-03 5.398E-03 1.041E-02 1.684E-02 2.454E-02 3.333E-02 4.307E-02 5.359E-02 6.473E-02 7.633E-02 8.823E-02 1.003E-01 1.123E-01 1.242E-01 1.359E-01 1.471E-01 1.579E-01 1.680E-01 1.775E-01 1.861E-01 1.940E-01 2.008E-01 2.068E-01 2.117E-01 2.156E-01 2.185E-01 2.203E-01 2.211E-01 2.209E-01 2.197E-01 2.175E-01 2.144E-01 2.104E-01 2.056E-01 2.000E-01 1.938E-01 1.869E-01 1.794E-01 1.715E-01 1.632E-01 1.545E-01 1.456E-01 1.364E-01 1.272E-01 1.180E-01 1.087E-01 9.961E-02 9.065E-02 8.190E-02 7.343E-02 6.528E-02 5.750E-02 5.013E-02 4.320E-02 3.675E-02 3.080E-02 2.536E-02 2.045E-02 1.608E-02 1.226E-02 8.973E-03 6.223E-03 3.998E-03 2.284E-03 1.062E-03 3.124E-04 9.360E-06 1.261E-04 6.330E-04 1.499E-03 2.690E-03 4.173E-03 5.911E-03 7.870E-03 1.001E-02 1.230E-02 1.471E-02 1.719E-02 1.972E-02 2.226E-02 2.479E-02 2.726E-02 2.967E-02 3.197E-02 3.415E-02 3.619E-02 3.807E-02 3.977E-02 4.128E-02 4.260E-02 4.370E-02 4.459E-02 4.526E-02 4.571E-02 4.593E-02 4.569E-02 4.522E-02 4.454E-02 4.364E-02 4.252E-02 4.120E-02 3.967E-02 3.796E-02 3.607E-02 3.402E-02 3.183E-02 2.951E-02 2.710E-02 2.462E-02 2.210E-02 1.955E-02 1.702E-02 1.454E-02 1.214E-02 9.859E-03 7.726E-03 5.780E-03 4.058E-03 2.594E-03 1.424E-03 5.831E-04 1.036E-04 1.718E-05 3.533E-04 1.139E-03 2.399E-03 4.153E-03 6.421E-03 9.215E-03 1.255E-02 1.642E-02 2.084E-02 2.579E-02 3.128E-02 3.728E-02 4.378E-02 5.076E-02 5.817E-02 6.599E-02 7.418E-02 8.269E-02 9.147E-02 1.005E-01 1.096E-01 1.189E-01 1.281E-01 1.374E-01 1.465E-01 1.554E-01 1.640E-01 1.723E-01 1.802E-01 1.876E-01 1.945E-01 2.007E-01 2.062E-01 2.109E-01 2.148E-01 2.178E-01 2.199E-01 2.210E-01 2.211E-01 2.201E-01 2.182E-01 2.152E-01 2.111E-01 2.060E-01 2.000E-01 1.929E-01 1.850E-01 1.762E-01 1.666E-01 1.563E-01 1.455E-01 1.341E-01 1.224E-01 1.104E-01 9.826E-02 8.618E-02 7.428E-02 6.270E-02 5.161E-02 4.118E-02 3.156E-02 2.292E-02 1.543E-02 9.244E-03 4.519E-03 1.408E-03 4.997E-05 5.789E-04 3.115E-03 7.765E-03 1.462E-02 2.376E-02 3.524E-02 4.909E-02 6.534E-02 8.397E-02 1.050E-01 1.283E-01 1.538E-01 1.814E-01 2.110E-01 2.424E-01 2.755E-01 3.100E-01 3.457E-01 3.822E-01 4.194E-01 4.568E-01 4.941E-01 5.310E-01 5.669E-01 6.014E-01 6.341E-01 6.643E-01 6.915E-01 7.151E-01 7.344E-01 7.487E-01 7.576E-01 7.605E-01 7.576E-01 7.487E-01 7.344E-01 7.151E-01 6.915E-01 6.643E-01 6.341E-01 6.014E-01 5.669E-01 5.310E-01 4.941E-01 4.568E-01 4.194E-01 3.822E-01 3.457E-01 3.100E-01 2.755E-01 2.424E-01 2.110E-01 1.814E-01 1.538E-01 1.283E-01 1.050E-01 8.397E-02 6.534E-02 4.909E-02 3.524E-02 2.376E-02 1.462E-02 7.765E-03 3.115E-03 5.789E-04 4.997E-05 1.408E-03 4.519E-03 9.244E-03 1.543E-02 2.292E-02 3.156E-02 4.118E-02 5.161E-02 6.270E-02 7.428E-02 8.618E-02 9.826E-02 1.104E-01 1.224E-01 1.341E-01 1.455E-01 1.563E-01 1.666E-01 1.762E-01 1.850E-01 1.929E-01 2.000E-01 2.060E-01 2.111E-01 2.152E-01 2.182E-01 2.201E-01 2.211E-01 2.210E-01 2.199E-01 2.178E-01 2.148E-01 2.109E-01 2.062E-01 2.007E-01 1.945E-01 1.876E-01 1.802E-01 1.723E-01 1.640E-01 1.554E-01 1.465E-01 1.374E-01 1.281E-01 1.189E-01 1.096E-01 1.005E-01 9.147E-02 8.269E-02 7.418E-02 6.599E-02 5.817E-02 5.076E-02 4.378E-02 3.728E-02 3.128E-02 2.579E-02 2.084E-02 1.642E-02 1.255E-02 9.215E-03 6.421E-03 4.153E-03 2.399E-03 1.139E-03 3.533E-04 1.718E-05 1.036E-04 5.831E-04 1.424E-03 2.594E-03 4.058E-03 5.780E-03 7.726E-03 9.859E-03 1.214E-02 1.454E-02 1.702E-02 1.955E-02 2.210E-02 2.462E-02 2.710E-02 2.951E-02 3.183E-02 3.402E-02 3.607E-02 3.796E-02 3.967E-02 4.120E-02 4.252E-02 4.364E-02 4.454E-02 4.522E-02 4.569E-02 4.592E-02 4.567E-02 4.519E-02 4.450E-02 4.359E-02 4.246E-02 4.112E-02 3.958E-02 3.786E-02 3.596E-02 3.390E-02 3.170E-02 2.938E-02 2.697E-02 2.448E-02 2.195E-02 1.940E-02 1.688E-02 1.440E-02 1.200E-02 9.726E-03 7.602E-03 5.668E-03 3.959E-03 2.512E-03 1.361E-03 5.414E-04 8.587E-05 2.589E-05 3.908E-04 1.208E-03 2.501E-03 4.291E-03 6.595E-03 9.428E-03 1.280E-02 1.671E-02 2.117E-02 2.617E-02 3.170E-02 3.775E-02 4.429E-02 5.130E-02 5.875E-02 6.661E-02 7.484E-02 8.338E-02 9.218E-02 1.012E-01 1.104E-01 1.196E-01 1.289E-01 1.381E-01 1.472E-01 1.562E-01 1.648E-01 1.731E-01 1.809E-01 1.883E-01 1.951E-01 2.012E-01 2.066E-01 2.113E-01 2.151E-01 2.180E-01 2.200E-01 2.210E-01 2.210E-01 2.200E-01 2.179E-01 2.148E-01 2.106E-01 2.054E-01 1.992E-01 1.920E-01 1.839E-01 1.750E-01 1.653E-01 1.549E-01 1.440E-01 1.325E-01 1.207E-01 1.087E-01 9.651E-02 8.441E-02 7.250E-02 6.095E-02 4.991E-02 3.955E-02 3.005E-02 2.155E-02 1.424E-02 8.276E-03 3.813E-03 1.007E-03 9.434E-07 9.292E-04 3.914E-03 9.066E-03 1.648E-02 2.623E-02 3.837E-02 5.295E-02 6.998E-02 8.946E-02 1.114E-01 1.356E-01 1.622E-01 1.909E-01 2.217E-01 2.543E-01 2.887E-01 3.245E-01 3.616E-01 3.997E-01 4.384E-01 4.775E-01 5.166E-01 5.552E-01 5.931E-01 6.296E-01 6.643E-01 6.967E-01 7.260E-01 7.516E-01 7.728E-01 7.886E-01 7.985E-01 8.019E-01 7.985E-01 7.886E-01 7.728E-01 7.516E-01 7.260E-01 6.967E-01 6.643E-01 6.296E-01 5.931E-01 5.552E-01 5.166E-01 4.775E-01 4.384E-01 3.997E-01 3.616E-01 3.245E-01 2.887E-01 2.543E-01 2.217E-01 1.909E-01 1.622E-01 1.356E-01 1.114E-01 8.946E-02 6.998E-02 5.295E-02 3.837E-02 2.623E-02 1.648E-02 9.066E-03 3.914E-03 9.292E-04 9.434E-07 1.007E-03 3.813E-03 8.276E-03 1.424E-02 2.155E-02 3.005E-02 3.955E-02 4.991E-02 6.095E-02 7.250E-02 8.441E-02 9.651E-02 1.087E-01 1.207E-01 1.325E-01 1.440E-01 1.549E-01 1.653E-01 1.750E-01 1.839E-01 1.920E-01 1.992E-01 2.054E-01 2.106E-01 2.148E-01 2.179E-01 2.200E-01 2.210E-01 2.210E-01 2.200E-01 2.180E-01 2.151E-01 2.113E-01 2.066E-01 2.012E-01 1.951E-01 1.883E-01 1.809E-01 1.731E-01 1.648E-01 1.562E-01 1.472E-01 1.381E-01 1.289E-01 1.196E-01 1.104E-01 1.012E-01 9.218E-02 8.338E-02 7.484E-02 6.661E-02 5.875E-02 5.130E-02 4.429E-02 3.775E-02 3.170E-02 2.617E-02 2.117E-02 1.671E-02 1.280E-02 9.428E-03 6.595E-03 4.291E-03 2.501E-03 1.208E-03 3.908E-04 2.589E-05 8.587E-05 5.414E-04 1.361E-03 2.512E-03 3.959E-03 5.668E-03 7.602E-03 9.726E-03 1.200E-02 1.440E-02 1.688E-02 1.940E-02 2.195E-02 2.448E-02 2.697E-02 2.938E-02 3.170E-02 3.390E-02 3.596E-02 3.786E-02 3.958E-02 4.112E-02 4.246E-02 4.359E-02 4.450E-02 4.519E-02 4.567E-02 4.592E-02 4.565E-02 4.517E-02 4.446E-02 4.354E-02 4.240E-02 4.106E-02 3.951E-02 3.778E-02 3.587E-02 3.380E-02 3.159E-02 2.927E-02 2.685E-02 2.436E-02 2.183E-02 1.928E-02 1.675E-02 1.428E-02 1.189E-02 9.614E-03 7.498E-03 5.573E-03 3.877E-03 2.443E-03 1.309E-03 5.072E-04 7.214E-05 3.466E-05 4.241E-04 1.267E-03 2.589E-03 4.409E-03 6.745E-03 9.611E-03 1.302E-02 1.697E-02 2.146E-02 2.650E-02 3.206E-02 3.814E-02 4.472E-02 5.177E-02 5.925E-02 6.714E-02 7.539E-02 8.396E-02 9.279E-02 1.018E-01 1.110E-01 1.203E-01 1.296E-01 1.388E-01 1.479E-01 1.568E-01 1.654E-01 1.737E-01 1.815E-01 1.889E-01 1.956E-01 2.017E-01 2.071E-01 2.116E-01 2.154E-01 2.182E-01 2.201E-01 2.211E-01 2.210E-01 2.198E-01 2.176E-01 2.144E-01 2.101E-01 2.048E-01 1.985E-01 1.912E-01 1.830E-01 1.740E-01 1.642E-01 1.538E-01 1.427E-01 1.312E-01 1.193E-01 1.072E-01 9.502E-02 8.290E-02 7.100E-02 5.947E-02 4.847E-02 3.819E-02 2.878E-02 2.042E-02 1.326E-02 7.491E-03 3.258E-03 7.180E-04 1.796E-05 1.294E-03 4.670E-03 1.026E-02 1.815E-02 2.843E-02 4.115E-02 5.636E-02 7.408E-02 9.429E-02 1.170E-01 1.421E-01 1.695E-01 1.992E-01 2.310E-01 2.647E-01 3.003E-01 3.373E-01 3.757E-01 4.151E-01 4.552E-01 4.958E-01 5.365E-01 5.768E-01 6.164E-01 6.548E-01 6.915E-01 7.260E-01 7.576E-01 7.854E-01 8.087E-01 8.264E-01 8.376E-01 8.414E-01 8.376E-01 8.264E-01 8.087E-01 7.854E-01 7.576E-01 7.260E-01 6.915E-01 6.548E-01 6.164E-01 5.768E-01 5.365E-01 4.958E-01 4.552E-01 4.151E-01 3.757E-01 3.373E-01 3.003E-01 2.647E-01 2.310E-01 1.992E-01 1.695E-01 1.421E-01 1.170E-01 9.429E-02 7.408E-02 5.636E-02 4.115E-02 2.843E-02 1.815E-02 1.026E-02 4.670E-03 1.294E-03 1.796E-05 7.180E-04 3.258E-03 7.491E-03 1.326E-02 2.042E-02 2.878E-02 3.819E-02 4.847E-02 5.947E-02 7.100E-02 8.290E-02 9.502E-02 1.072E-01 1.193E-01 1.312E-01 1.427E-01 1.538E-01 1.642E-01 1.740E-01 1.830E-01 1.912E-01 1.985E-01 2.048E-01 2.101E-01 2.144E-01 2.176E-01 2.198E-01 2.210E-01 2.211E-01 2.201E-01 2.182E-01 2.154E-01 2.116E-01 2.071E-01 2.017E-01 1.956E-01 1.889E-01 1.815E-01 1.737E-01 1.654E-01 1.568E-01 1.479E-01 1.388E-01 1.296E-01 1.203E-01 1.110E-01 1.018E-01 9.279E-02 8.396E-02 7.539E-02 6.714E-02 5.925E-02 5.177E-02 4.472E-02 3.814E-02 3.206E-02 2.650E-02 2.146E-02 1.697E-02 1.302E-02 9.611E-03 6.745E-03 4.409E-03 2.589E-03 1.267E-03 4.241E-04 3.466E-05 7.214E-05 5.072E-04 1.309E-03 2.443E-03 3.877E-03 5.573E-03 7.498E-03 9.614E-03 1.189E-02 1.428E-02 1.675E-02 1.928E-02 2.183E-02 2.436E-02 2.685E-02 2.927E-02 3.159E-02 3.380E-02 3.587E-02 3.778E-02 3.951E-02 4.106E-02 4.240E-02 4.354E-02 4.446E-02 4.517E-02 4.565E-02 4.591E-02 4.564E-02 4.515E-02 4.443E-02 4.350E-02 4.236E-02 4.100E-02 3.945E-02 3.771E-02 3.579E-02 3.372E-02 3.151E-02 2.918E-02 2.675E-02 2.426E-02 2.172E-02 1.918E-02 1.665E-02 1.418E-02 1.179E-02 9.522E-03 7.413E-03 5.496E-03 3.809E-03 2.388E-03 1.266E-03 4.801E-04 6.178E-05 4.280E-05 4.524E-04 1.317E-03 2.662E-03 4.506E-03 6.869E-03 9.762E-03 1.319E-02 1.717E-02 2.170E-02 2.676E-02 3.236E-02 3.847E-02 4.507E-02 5.215E-02 5.966E-02 6.757E-02 7.585E-02 8.444E-02 9.329E-02 1.023E-01 1.115E-01 1.208E-01 1.301E-01 1.393E-01 1.484E-01 1.573E-01 1.659E-01 1.742E-01 1.820E-01 1.893E-01 1.960E-01 2.021E-01 2.074E-01 2.119E-01 2.156E-01 2.184E-01 2.202E-01 2.211E-01 2.209E-01 2.197E-01 2.174E-01 2.141E-01 2.097E-01 2.043E-01 1.979E-01 1.906E-01 1.823E-01 1.732E-01 1.633E-01 1.528E-01 1.417E-01 1.301E-01 1.182E-01 1.060E-01 9.380E-02 8.167E-02 6.977E-02 5.826E-02 4.731E-02 3.708E-02 2.776E-02 1.950E-02 1.248E-02 6.874E-03 2.832E-03 5.163E-04 7.283E-05 1.640E-03 5.343E-03 1.129E-02 1.959E-02 3.031E-02 4.352E-02 5.926E-02 7.754E-02 9.837E-02 1.217E-01 1.475E-01 1.757E-01 2.062E-01 2.389E-01 2.735E-01 3.100E-01 3.481E-01 3.875E-01 4.281E-01 4.694E-01 5.113E-01 5.533E-01 5.952E-01 6.364E-01 6.765E-01 7.151E-01 7.516E-01 7.854E-01 8.157E-01 8.414E-01 8.615E-01 8.744E-01 8.789E-01 8.744E-01 8.615E-01 8.414E-01 8.157E-01 7.854E-01 7.516E-01 7.151E-01 6.765E-01 6.364E-01 5.952E-01 5.533E-01 5.113E-01 4.694E-01 4.281E-01 3.875E-01 3.481E-01 3.100E-01 2.735E-01 2.389E-01 2.062E-01 1.757E-01 1.475E-01 1.217E-01 9.837E-02 7.754E-02 5.926E-02 4.352E-02 3.031E-02 1.959E-02 1.129E-02 5.343E-03 1.640E-03 7.283E-05 5.163E-04 2.832E-03 6.874E-03 1.248E-02 1.950E-02 2.776E-02 3.708E-02 4.731E-02 5.826E-02 6.977E-02 8.167E-02 9.380E-02 1.060E-01 1.182E-01 1.301E-01 1.417E-01 1.528E-01 1.633E-01 1.732E-01 1.823E-01 1.906E-01 1.979E-01 2.043E-01 2.097E-01 2.141E-01 2.174E-01 2.197E-01 2.209E-01 2.211E-01 2.202E-01 2.184E-01 2.156E-01 2.119E-01 2.074E-01 2.021E-01 1.960E-01 1.893E-01 1.820E-01 1.742E-01 1.659E-01 1.573E-01 1.484E-01 1.393E-01 1.301E-01 1.208E-01 1.115E-01 1.023E-01 9.329E-02 8.444E-02 7.585E-02 6.757E-02 5.966E-02 5.215E-02 4.507E-02 3.847E-02 3.236E-02 2.676E-02 2.170E-02 1.717E-02 1.319E-02 9.762E-03 6.869E-03 4.506E-03 2.662E-03 1.317E-03 4.524E-04 4.280E-05 6.178E-05 4.801E-04 1.266E-03 2.388E-03 3.809E-03 5.496E-03 7.413E-03 9.522E-03 1.179E-02 1.418E-02 1.665E-02 1.918E-02 2.172E-02 2.426E-02 2.675E-02 2.918E-02 3.151E-02 3.372E-02 3.579E-02 3.771E-02 3.945E-02 4.100E-02 4.236E-02 4.350E-02 4.443E-02 4.515E-02 4.564E-02 4.591E-02 4.563E-02 4.513E-02 4.441E-02 4.347E-02 4.232E-02 4.096E-02 3.940E-02 3.765E-02 3.573E-02 3.365E-02 3.144E-02 2.910E-02 2.668E-02 2.418E-02 2.164E-02 1.910E-02 1.657E-02 1.410E-02 1.171E-02 9.451E-03 7.347E-03 5.437E-03 3.758E-03 2.345E-03 1.234E-03 4.594E-04 5.426E-05 4.974E-05 4.751E-04 1.357E-03 2.720E-03 4.583E-03 6.966E-03 9.880E-03 1.333E-02 1.734E-02 2.188E-02 2.697E-02 3.259E-02 3.872E-02 4.535E-02 5.244E-02 5.998E-02 6.791E-02 7.621E-02 8.481E-02 9.367E-02 1.027E-01 1.120E-01 1.212E-01 1.305E-01 1.398E-01 1.489E-01 1.578E-01 1.663E-01 1.746E-01 1.824E-01 1.897E-01 1.963E-01 2.024E-01 2.077E-01 2.121E-01 2.158E-01 2.185E-01 2.203E-01 2.211E-01 2.209E-01 2.196E-01 2.173E-01 2.139E-01 2.094E-01 2.040E-01 1.975E-01 1.901E-01 1.817E-01 1.726E-01 1.626E-01 1.520E-01 1.408E-01 1.292E-01 1.173E-01 1.051E-01 9.285E-02 8.071E-02 6.881E-02 5.732E-02 4.640E-02 3.623E-02 2.697E-02 1.880E-02 1.189E-02 6.409E-03 2.520E-03 3.816E-04 1.415E-04 1.939E-03 5.901E-03 1.214E-02 2.076E-02 3.183E-02 4.542E-02 6.158E-02 8.031E-02 1.016E-01 1.255E-01 1.519E-01 1.807E-01 2.118E-01 2.451E-01 2.805E-01 3.178E-01 3.566E-01 3.970E-01 4.384E-01 4.808E-01 5.237E-01 5.669E-01 6.099E-01 6.525E-01 6.941E-01 7.344E-01 7.728E-01 8.087E-01 8.414E-01 8.700E-01 8.930E-01 9.083E-01 9.138E-01 9.083E-01 8.930E-01 8.700E-01 8.414E-01 8.087E-01 7.728E-01 7.344E-01 6.941E-01 6.525E-01 6.099E-01 5.669E-01 5.237E-01 4.808E-01 4.384E-01 3.970E-01 3.566E-01 3.178E-01 2.805E-01 2.451E-01 2.118E-01 1.807E-01 1.519E-01 1.255E-01 1.016E-01 8.031E-02 6.158E-02 4.542E-02 3.183E-02 2.076E-02 1.214E-02 5.901E-03 1.939E-03 1.415E-04 3.816E-04 2.520E-03 6.409E-03 1.189E-02 1.880E-02 2.697E-02 3.623E-02 4.640E-02 5.732E-02 6.881E-02 8.071E-02 9.285E-02 1.051E-01 1.173E-01 1.292E-01 1.408E-01 1.520E-01 1.626E-01 1.726E-01 1.817E-01 1.901E-01 1.975E-01 2.040E-01 2.094E-01 2.139E-01 2.173E-01 2.196E-01 2.209E-01 2.211E-01 2.203E-01 2.185E-01 2.158E-01 2.121E-01 2.077E-01 2.024E-01 1.963E-01 1.897E-01 1.824E-01 1.746E-01 1.663E-01 1.578E-01 1.489E-01 1.398E-01 1.305E-01 1.212E-01 1.120E-01 1.027E-01 9.367E-02 8.481E-02 7.621E-02 6.791E-02 5.998E-02 5.244E-02 4.535E-02 3.872E-02 3.259E-02 2.697E-02 2.188E-02 1.734E-02 1.333E-02 9.880E-03 6.966E-03 4.583E-03 2.720E-03 1.357E-03 4.751E-04 4.974E-05 5.426E-05 4.594E-04 1.234E-03 2.345E-03 3.758E-03 5.437E-03 7.347E-03 9.451E-03 1.171E-02 1.410E-02 1.657E-02 1.910E-02 2.164E-02 2.418E-02 2.668E-02 2.910E-02 3.144E-02 3.365E-02 3.573E-02 3.765E-02 3.940E-02 4.096E-02 4.232E-02 4.347E-02 4.441E-02 4.513E-02 4.563E-02 4.590E-02 4.562E-02 4.512E-02 4.439E-02 4.345E-02 4.230E-02 4.093E-02 3.937E-02 3.762E-02 3.569E-02 3.361E-02 3.139E-02 2.905E-02 2.662E-02 2.413E-02 2.159E-02 1.904E-02 1.652E-02 1.404E-02 1.166E-02 9.401E-03 7.300E-03 5.395E-03 3.721E-03 2.314E-03 1.211E-03 4.450E-04 4.919E-05 5.502E-05 4.916E-04 1.386E-03 2.761E-03 4.639E-03 7.036E-03 9.965E-03 1.344E-02 1.745E-02 2.201E-02 2.712E-02 3.275E-02 3.890E-02 4.554E-02 5.266E-02 6.021E-02 6.815E-02 7.646E-02 8.508E-02 9.395E-02 1.030E-01 1.122E-01 1.215E-01 1.308E-01 1.401E-01 1.492E-01 1.580E-01 1.666E-01 1.749E-01 1.826E-01 1.899E-01 1.966E-01 2.026E-01 2.078E-01 2.123E-01 2.159E-01 2.186E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.137E-01 2.092E-01 2.037E-01 1.972E-01 1.897E-01 1.813E-01 1.721E-01 1.621E-01 1.515E-01 1.403E-01 1.286E-01 1.166E-01 1.044E-01 9.218E-02 8.003E-02 6.813E-02 5.665E-02 4.576E-02 3.562E-02 2.641E-02 1.830E-02 1.147E-02 6.085E-03 2.307E-03 2.974E-04 2.048E-04 2.169E-03 6.319E-03 1.277E-02 2.162E-02 3.294E-02 4.681E-02 6.327E-02 8.233E-02 1.040E-01 1.283E-01 1.550E-01 1.843E-01 2.159E-01 2.497E-01 2.856E-01 3.234E-01 3.629E-01 4.038E-01 4.460E-01 4.891E-01 5.328E-01 5.768E-01 6.208E-01 6.643E-01 7.071E-01 7.487E-01 7.886E-01 8.264E-01 8.615E-01 8.930E-01 9.195E-01 9.386E-01 9.458E-01 9.386E-01 9.195E-01 8.930E-01 8.615E-01 8.264E-01 7.886E-01 7.487E-01 7.071E-01 6.643E-01 6.208E-01 5.768E-01 5.328E-01 4.891E-01 4.460E-01 4.038E-01 3.629E-01 3.234E-01 2.856E-01 2.497E-01 2.159E-01 1.843E-01 1.550E-01 1.283E-01 1.040E-01 8.233E-02 6.327E-02 4.681E-02 3.294E-02 2.162E-02 1.277E-02 6.319E-03 2.169E-03 2.048E-04 2.974E-04 2.307E-03 6.085E-03 1.147E-02 1.830E-02 2.641E-02 3.562E-02 4.576E-02 5.665E-02 6.813E-02 8.003E-02 9.218E-02 1.044E-01 1.166E-01 1.286E-01 1.403E-01 1.515E-01 1.621E-01 1.721E-01 1.813E-01 1.897E-01 1.972E-01 2.037E-01 2.092E-01 2.137E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.186E-01 2.159E-01 2.123E-01 2.078E-01 2.026E-01 1.966E-01 1.899E-01 1.826E-01 1.749E-01 1.666E-01 1.580E-01 1.492E-01 1.401E-01 1.308E-01 1.215E-01 1.122E-01 1.030E-01 9.395E-02 8.508E-02 7.646E-02 6.815E-02 6.021E-02 5.266E-02 4.554E-02 3.890E-02 3.275E-02 2.712E-02 2.201E-02 1.745E-02 1.344E-02 9.965E-03 7.036E-03 4.639E-03 2.761E-03 1.386E-03 4.916E-04 5.502E-05 4.919E-05 4.450E-04 1.211E-03 2.314E-03 3.721E-03 5.395E-03 7.300E-03 9.401E-03 1.166E-02 1.404E-02 1.652E-02 1.904E-02 2.159E-02 2.413E-02 2.662E-02 2.905E-02 3.139E-02 3.361E-02 3.569E-02 3.762E-02 3.937E-02 4.093E-02 4.230E-02 4.345E-02 4.439E-02 4.512E-02 4.562E-02 4.590E-02 4.562E-02 4.511E-02 4.438E-02 4.344E-02 4.228E-02 4.091E-02 3.935E-02 3.759E-02 3.567E-02 3.358E-02 3.136E-02 2.902E-02 2.659E-02 2.409E-02 2.155E-02 1.901E-02 1.648E-02 1.401E-02 1.163E-02 9.370E-03 7.272E-03 5.369E-03 3.699E-03 2.296E-03 1.197E-03 4.364E-04 4.626E-05 5.831E-05 5.017E-04 1.403E-03 2.786E-03 4.672E-03 7.078E-03 1.002E-02 1.350E-02 1.752E-02 2.209E-02 2.721E-02 3.285E-02 3.901E-02 4.566E-02 5.279E-02 6.034E-02 6.830E-02 7.661E-02 8.524E-02 9.412E-02 1.032E-01 1.124E-01 1.217E-01 1.310E-01 1.402E-01 1.493E-01 1.582E-01 1.668E-01 1.750E-01 1.828E-01 1.901E-01 1.967E-01 2.027E-01 2.079E-01 2.124E-01 2.160E-01 2.187E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.136E-01 2.091E-01 2.035E-01 1.970E-01 1.895E-01 1.811E-01 1.718E-01 1.618E-01 1.511E-01 1.399E-01 1.282E-01 1.162E-01 1.040E-01 9.177E-02 7.962E-02 6.772E-02 5.625E-02 4.537E-02 3.526E-02 2.608E-02 1.801E-02 1.122E-02 5.894E-03 2.184E-03 2.518E-04 2.485E-04 2.314E-03 6.577E-03 1.315E-02 2.214E-02 3.362E-02 4.766E-02 6.430E-02 8.356E-02 1.054E-01 1.299E-01 1.570E-01 1.865E-01 2.183E-01 2.525E-01 2.887E-01 3.268E-01 3.667E-01 4.080E-01 4.506E-01 4.941E-01 5.383E-01 5.828E-01 6.274E-01 6.716E-01 7.151E-01 7.576E-01 7.985E-01 8.376E-01 8.744E-01 9.083E-01 9.386E-01 9.632E-01 9.747E-01 9.632E-01 9.386E-01 9.083E-01 8.744E-01 8.376E-01 7.985E-01 7.576E-01 7.151E-01 6.716E-01 6.274E-01 5.828E-01 5.383E-01 4.941E-01 4.506E-01 4.080E-01 3.667E-01 3.268E-01 2.887E-01 2.525E-01 2.183E-01 1.865E-01 1.570E-01 1.299E-01 1.054E-01 8.356E-02 6.430E-02 4.766E-02 3.362E-02 2.214E-02 1.315E-02 6.577E-03 2.314E-03 2.485E-04 2.518E-04 2.184E-03 5.894E-03 1.122E-02 1.801E-02 2.608E-02 3.526E-02 4.537E-02 5.625E-02 6.772E-02 7.962E-02 9.177E-02 1.040E-01 1.162E-01 1.282E-01 1.399E-01 1.511E-01 1.618E-01 1.718E-01 1.811E-01 1.895E-01 1.970E-01 2.035E-01 2.091E-01 2.136E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.187E-01 2.160E-01 2.124E-01 2.079E-01 2.027E-01 1.967E-01 1.901E-01 1.828E-01 1.750E-01 1.668E-01 1.582E-01 1.493E-01 1.402E-01 1.310E-01 1.217E-01 1.124E-01 1.032E-01 9.412E-02 8.524E-02 7.661E-02 6.830E-02 6.034E-02 5.279E-02 4.566E-02 3.901E-02 3.285E-02 2.721E-02 2.209E-02 1.752E-02 1.350E-02 1.002E-02 7.078E-03 4.672E-03 2.786E-03 1.403E-03 5.017E-04 5.831E-05 4.626E-05 4.364E-04 1.197E-03 2.296E-03 3.699E-03 5.369E-03 7.272E-03 9.370E-03 1.163E-02 1.401E-02 1.648E-02 1.901E-02 2.155E-02 2.409E-02 2.659E-02 2.902E-02 3.136E-02 3.358E-02 3.567E-02 3.759E-02 3.935E-02 4.091E-02 4.228E-02 4.344E-02 4.438E-02 4.511E-02 4.562E-02 4.590E-02 4.561E-02 4.511E-02 4.438E-02 4.343E-02 4.227E-02 4.091E-02 3.934E-02 3.758E-02 3.566E-02 3.357E-02 3.135E-02 2.901E-02 2.658E-02 2.408E-02 2.154E-02 1.900E-02 1.647E-02 1.400E-02 1.162E-02 9.360E-03 7.262E-03 5.361E-03 3.691E-03 2.290E-03 1.193E-03 4.335E-04 4.531E-05 5.944E-05 5.051E-04 1.409E-03 2.795E-03 4.683E-03 7.092E-03 1.003E-02 1.352E-02 1.755E-02 2.212E-02 2.724E-02 3.288E-02 3.905E-02 4.570E-02 5.283E-02 6.039E-02 6.835E-02 7.666E-02 8.529E-02 9.417E-02 1.033E-01 1.125E-01 1.218E-01 1.311E-01 1.403E-01 1.494E-01 1.583E-01 1.669E-01 1.751E-01 1.829E-01 1.901E-01 1.968E-01 2.027E-01 2.080E-01 2.124E-01 2.160E-01 2.187E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.136E-01 2.090E-01 2.035E-01 1.969E-01 1.894E-01 1.810E-01 1.717E-01 1.617E-01 1.510E-01 1.398E-01 1.281E-01 1.161E-01 1.039E-01 9.163E-02 7.948E-02 6.759E-02 5.612E-02 4.524E-02 3.513E-02 2.597E-02 1.791E-02 1.114E-02 5.831E-03 2.143E-03 2.374E-04 2.640E-04 2.364E-03 6.665E-03 1.328E-02 2.232E-02 3.385E-02 4.794E-02 6.465E-02 8.397E-02 1.059E-01 1.305E-01 1.576E-01 1.872E-01 2.192E-01 2.534E-01 2.897E-01 3.280E-01 3.680E-01 4.094E-01 4.521E-01 4.958E-01 5.402E-01 5.849E-01 6.296E-01 6.740E-01 7.178E-01 7.605E-01 8.019E-01 8.414E-01 8.789E-01 9.138E-01 9.458E-01 9.747E-01 1.000E+00 9.747E-01 9.458E-01 9.138E-01 8.789E-01 8.414E-01 8.019E-01 7.605E-01 7.178E-01 6.740E-01 6.296E-01 5.849E-01 5.402E-01 4.958E-01 4.521E-01 4.094E-01 3.680E-01 3.280E-01 2.897E-01 2.534E-01 2.192E-01 1.872E-01 1.576E-01 1.305E-01 1.059E-01 8.397E-02 6.465E-02 4.794E-02 3.385E-02 2.232E-02 1.328E-02 6.665E-03 2.364E-03 2.640E-04 2.374E-04 2.143E-03 5.831E-03 1.114E-02 1.791E-02 2.597E-02 3.513E-02 4.524E-02 5.612E-02 6.759E-02 7.948E-02 9.163E-02 1.039E-01 1.161E-01 1.281E-01 1.398E-01 1.510E-01 1.617E-01 1.717E-01 1.810E-01 1.894E-01 1.969E-01 2.035E-01 2.090E-01 2.136E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.187E-01 2.160E-01 2.124E-01 2.080E-01 2.027E-01 1.968E-01 1.901E-01 1.829E-01 1.751E-01 1.669E-01 1.583E-01 1.494E-01 1.403E-01 1.311E-01 1.218E-01 1.125E-01 1.033E-01 9.417E-02 8.529E-02 7.666E-02 6.835E-02 6.039E-02 5.283E-02 4.570E-02 3.905E-02 3.288E-02 2.724E-02 2.212E-02 1.755E-02 1.352E-02 1.003E-02 7.092E-03 4.683E-03 2.795E-03 1.409E-03 5.051E-04 5.944E-05 4.531E-05 4.335E-04 1.193E-03 2.290E-03 3.691E-03 5.361E-03 7.262E-03 9.360E-03 1.162E-02 1.400E-02 1.647E-02 1.900E-02 2.154E-02 2.408E-02 2.658E-02 2.901E-02 3.135E-02 3.357E-02 3.566E-02 3.758E-02 3.934E-02 4.091E-02 4.227E-02 4.343E-02 4.438E-02 4.511E-02 4.561E-02 4.590E-02 4.562E-02 4.511E-02 4.438E-02 4.344E-02 4.228E-02 4.091E-02 3.935E-02 3.759E-02 3.567E-02 3.358E-02 3.136E-02 2.902E-02 2.659E-02 2.409E-02 2.155E-02 1.901E-02 1.648E-02 1.401E-02 1.163E-02 9.370E-03 7.272E-03 5.369E-03 3.699E-03 2.296E-03 1.197E-03 4.364E-04 4.626E-05 5.831E-05 5.017E-04 1.403E-03 2.786E-03 4.672E-03 7.078E-03 1.002E-02 1.350E-02 1.752E-02 2.209E-02 2.721E-02 3.285E-02 3.901E-02 4.566E-02 5.279E-02 6.034E-02 6.830E-02 7.661E-02 8.524E-02 9.412E-02 1.032E-01 1.124E-01 1.217E-01 1.310E-01 1.402E-01 1.493E-01 1.582E-01 1.668E-01 1.750E-01 1.828E-01 1.901E-01 1.967E-01 2.027E-01 2.079E-01 2.124E-01 2.160E-01 2.187E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.136E-01 2.091E-01 2.035E-01 1.970E-01 1.895E-01 1.811E-01 1.718E-01 1.618E-01 1.511E-01 1.399E-01 1.282E-01 1.162E-01 1.040E-01 9.177E-02 7.962E-02 6.772E-02 5.625E-02 4.537E-02 3.526E-02 2.608E-02 1.801E-02 1.122E-02 5.894E-03 2.184E-03 2.518E-04 2.485E-04 2.314E-03 6.577E-03 1.315E-02 2.214E-02 3.362E-02 4.766E-02 6.430E-02 8.356E-02 1.054E-01 1.299E-01 1.570E-01 1.865E-01 2.183E-01 2.525E-01 2.887E-01 3.268E-01 3.667E-01 4.080E-01 4.506E-01 4.941E-01 5.383E-01 5.828E-01 6.274E-01 6.716E-01 7.151E-01 7.576E-01 7.985E-01 8.376E-01 8.744E-01 9.083E-01 9.386E-01 9.632E-01 9.747E-01 9.632E-01 9.386E-01 9.083E-01 8.744E-01 8.376E-01 7.985E-01 7.576E-01 7.151E-01 6.716E-01 6.274E-01 5.828E-01 5.383E-01 4.941E-01 4.506E-01 4.080E-01 3.667E-01 3.268E-01 2.887E-01 2.525E-01 2.183E-01 1.865E-01 1.570E-01 1.299E-01 1.054E-01 8.356E-02 6.430E-02 4.766E-02 3.362E-02 2.214E-02 1.315E-02 6.577E-03 2.314E-03 2.485E-04 2.518E-04 2.184E-03 5.894E-03 1.122E-02 1.801E-02 2.608E-02 3.526E-02 4.537E-02 5.625E-02 6.772E-02 7.962E-02 9.177E-02 1.040E-01 1.162E-01 1.282E-01 1.399E-01 1.511E-01 1.618E-01 1.718E-01 1.811E-01 1.895E-01 1.970E-01 2.035E-01 2.091E-01 2.136E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.187E-01 2.160E-01 2.124E-01 2.079E-01 2.027E-01 1.967E-01 1.901E-01 1.828E-01 1.750E-01 1.668E-01 1.582E-01 1.493E-01 1.402E-01 1.310E-01 1.217E-01 1.124E-01 1.032E-01 9.412E-02 8.524E-02 7.661E-02 6.830E-02 6.034E-02 5.279E-02 4.566E-02 3.901E-02 3.285E-02 2.721E-02 2.209E-02 1.752E-02 1.350E-02 1.002E-02 7.078E-03 4.672E-03 2.786E-03 1.403E-03 5.017E-04 5.831E-05 4.626E-05 4.364E-04 1.197E-03 2.296E-03 3.699E-03 5.369E-03 7.272E-03 9.370E-03 1.163E-02 1.401E-02 1.648E-02 1.901E-02 2.155E-02 2.409E-02 2.659E-02 2.902E-02 3.136E-02 3.358E-02 3.567E-02 3.759E-02 3.935E-02 4.091E-02 4.228E-02 4.344E-02 4.438E-02 4.511E-02 4.562E-02 4.590E-02 4.562E-02 4.512E-02 4.439E-02 4.345E-02 4.230E-02 4.093E-02 3.937E-02 3.762E-02 3.569E-02 3.361E-02 3.139E-02 2.905E-02 2.662E-02 2.413E-02 2.159E-02 1.904E-02 1.652E-02 1.404E-02 1.166E-02 9.401E-03 7.300E-03 5.395E-03 3.721E-03 2.314E-03 1.211E-03 4.450E-04 4.919E-05 5.502E-05 4.916E-04 1.386E-03 2.761E-03 4.639E-03 7.036E-03 9.965E-03 1.344E-02 1.745E-02 2.201E-02 2.712E-02 3.275E-02 3.890E-02 4.554E-02 5.266E-02 6.021E-02 6.815E-02 7.646E-02 8.508E-02 9.395E-02 1.030E-01 1.122E-01 1.215E-01 1.308E-01 1.401E-01 1.492E-01 1.580E-01 1.666E-01 1.749E-01 1.826E-01 1.899E-01 1.966E-01 2.026E-01 2.078E-01 2.123E-01 2.159E-01 2.186E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.137E-01 2.092E-01 2.037E-01 1.972E-01 1.897E-01 1.813E-01 1.721E-01 1.621E-01 1.515E-01 1.403E-01 1.286E-01 1.166E-01 1.044E-01 9.218E-02 8.003E-02 6.813E-02 5.665E-02 4.576E-02 3.562E-02 2.641E-02 1.830E-02 1.147E-02 6.085E-03 2.307E-03 2.974E-04 2.048E-04 2.169E-03 6.319E-03 1.277E-02 2.162E-02 3.294E-02 4.681E-02 6.327E-02 8.233E-02 1.040E-01 1.283E-01 1.550E-01 1.843E-01 2.159E-01 2.497E-01 2.856E-01 3.234E-01 3.629E-01 4.038E-01 4.460E-01 4.891E-01 5.328E-01 5.768E-01 6.208E-01 6.643E-01 7.071E-01 7.487E-01 7.886E-01 8.264E-01 8.615E-01 8.930E-01 9.195E-01 9.386E-01 9.458E-01 9.386E-01 9.195E-01 8.930E-01 8.615E-01 8.264E-01 7.886E-01 7.487E-01 7.071E-01 6.643E-01 6.208E-01 5.768E-01 5.328E-01 4.891E-01 4.460E-01 4.038E-01 3.629E-01 3.234E-01 2.856E-01 2.497E-01 2.159E-01 1.843E-01 1.550E-01 1.283E-01 1.040E-01 8.233E-02 6.327E-02 4.681E-02 3.294E-02 2.162E-02 1.277E-02 6.319E-03 2.169E-03 2.048E-04 2.974E-04 2.307E-03 6.085E-03 1.147E-02 1.830E-02 2.641E-02 3.562E-02 4.576E-02 5.665E-02 6.813E-02 8.003E-02 9.218E-02 1.044E-01 1.166E-01 1.286E-01 1.403E-01 1.515E-01 1.621E-01 1.721E-01 1.813E-01 1.897E-01 1.972E-01 2.037E-01 2.092E-01 2.137E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.186E-01 2.159E-01 2.123E-01 2.078E-01 2.026E-01 1.966E-01 1.899E-01 1.826E-01 1.749E-01 1.666E-01 1.580E-01 1.492E-01 1.401E-01 1.308E-01 1.215E-01 1.122E-01 1.030E-01 9.395E-02 8.508E-02 7.646E-02 6.815E-02 6.021E-02 5.266E-02 4.554E-02 3.890E-02 3.275E-02 2.712E-02 2.201E-02 1.745E-02 1.344E-02 9.965E-03 7.036E-03 4.639E-03 2.761E-03 1.386E-03 4.916E-04 5.502E-05 4.919E-05 4.450E-04 1.211E-03 2.314E-03 3.721E-03 5.395E-03 7.300E-03 9.401E-03 1.166E-02 1.404E-02 1.652E-02 1.904E-02 2.159E-02 2.413E-02 2.662E-02 2.905E-02 3.139E-02 3.361E-02 3.569E-02 3.762E-02 3.937E-02 4.093E-02 4.230E-02 4.345E-02 4.439E-02 4.512E-02 4.562E-02 4.591E-02 4.563E-02 4.513E-02 4.441E-02 4.347E-02 4.232E-02 4.096E-02 3.940E-02 3.765E-02 3.573E-02 3.365E-02 3.144E-02 2.910E-02 2.668E-02 2.418E-02 2.164E-02 1.910E-02 1.657E-02 1.410E-02 1.171E-02 9.451E-03 7.347E-03 5.437E-03 3.758E-03 2.345E-03 1.234E-03 4.594E-04 5.426E-05 4.974E-05 4.751E-04 1.357E-03 2.720E-03 4.583E-03 6.966E-03 9.880E-03 1.333E-02 1.734E-02 2.188E-02 2.697E-02 3.259E-02 3.872E-02 4.535E-02 5.244E-02 5.998E-02 6.791E-02 7.621E-02 8.481E-02 9.367E-02 1.027E-01 1.120E-01 1.212E-01 1.305E-01 1.398E-01 1.489E-01 1.578E-01 1.663E-01 1.746E-01 1.824E-01 1.897E-01 1.963E-01 2.024E-01 2.077E-01 2.121E-01 2.158E-01 2.185E-01 2.203E-01 2.211E-01 2.209E-01 2.196E-01 2.173E-01 2.139E-01 2.094E-01 2.040E-01 1.975E-01 1.901E-01 1.817E-01 1.726E-01 1.626E-01 1.520E-01 1.408E-01 1.292E-01 1.173E-01 1.051E-01 9.285E-02 8.071E-02 6.881E-02 5.732E-02 4.640E-02 3.623E-02 2.697E-02 1.880E-02 1.189E-02 6.409E-03 2.520E-03 3.816E-04 1.415E-04 1.939E-03 5.901E-03 1.214E-02 2.076E-02 3.183E-02 4.542E-02 6.158E-02 8.031E-02 1.016E-01 1.255E-01 1.519E-01 1.807E-01 2.118E-01 2.451E-01 2.805E-01 3.178E-01 3.566E-01 3.970E-01 4.384E-01 4.808E-01 5.237E-01 5.669E-01 6.099E-01 6.525E-01 6.941E-01 7.344E-01 7.728E-01 8.087E-01 8.414E-01 8.700E-01 8.930E-01 9.083E-01 9.138E-01 9.083E-01 8.930E-01 8.700E-01 8.414E-01 8.087E-01 7.728E-01 7.344E-01 6.941E-01 6.525E-01 6.099E-01 5.669E-01 5.237E-01 4.808E-01 4.384E-01 3.970E-01 3.566E-01 3.178E-01 2.805E-01 2.451E-01 2.118E-01 1.807E-01 1.519E-01 1.255E-01 1.016E-01 8.031E-02 6.158E-02 4.542E-02 3.183E-02 2.076E-02 1.214E-02 5.901E-03 1.939E-03 1.415E-04 3.816E-04 2.520E-03 6.409E-03 1.189E-02 1.880E-02 2.697E-02 3.623E-02 4.640E-02 5.732E-02 6.881E-02 8.071E-02 9.285E-02 1.051E-01 1.173E-01 1.292E-01 1.408E-01 1.520E-01 1.626E-01 1.726E-01 1.817E-01 1.901E-01 1.975E-01 2.040E-01 2.094E-01 2.139E-01 2.173E-01 2.196E-01 2.209E-01 2.211E-01 2.203E-01 2.185E-01 2.158E-01 2.121E-01 2.077E-01 2.024E-01 1.963E-01 1.897E-01 1.824E-01 1.746E-01 1.663E-01 1.578E-01 1.489E-01 1.398E-01 1.305E-01 1.212E-01 1.120E-01 1.027E-01 9.367E-02 8.481E-02 7.621E-02 6.791E-02 5.998E-02 5.244E-02 4.535E-02 3.872E-02 3.259E-02 2.697E-02 2.188E-02 1.734E-02 1.333E-02 9.880E-03 6.966E-03 4.583E-03 2.720E-03 1.357E-03 4.751E-04 4.974E-05 5.426E-05 4.594E-04 1.234E-03 2.345E-03 3.758E-03 5.437E-03 7.347E-03 9.451E-03 1.171E-02 1.410E-02 1.657E-02 1.910E-02 2.164E-02 2.418E-02 2.668E-02 2.910E-02 3.144E-02 3.365E-02 3.573E-02 3.765E-02 3.940E-02 4.096E-02 4.232E-02 4.347E-02 4.441E-02 4.513E-02 4.563E-02 4.591E-02 4.564E-02 4.515E-02 4.443E-02 4.350E-02 4.236E-02 4.100E-02 3.945E-02 3.771E-02 3.579E-02 3.372E-02 3.151E-02 2.918E-02 2.675E-02 2.426E-02 2.172E-02 1.918E-02 1.665E-02 1.418E-02 1.179E-02 9.522E-03 7.413E-03 5.496E-03 3.809E-03 2.388E-03 1.266E-03 4.801E-04 6.178E-05 4.280E-05 4.524E-04 1.317E-03 2.662E-03 4.506E-03 6.869E-03 9.762E-03 1.319E-02 1.717E-02 2.170E-02 2.676E-02 3.236E-02 3.847E-02 4.507E-02 5.215E-02 5.966E-02 6.757E-02 7.585E-02 8.444E-02 9.329E-02 1.023E-01 1.115E-01 1.208E-01 1.301E-01 1.393E-01 1.484E-01 1.573E-01 1.659E-01 1.742E-01 1.820E-01 1.893E-01 1.960E-01 2.021E-01 2.074E-01 2.119E-01 2.156E-01 2.184E-01 2.202E-01 2.211E-01 2.209E-01 2.197E-01 2.174E-01 2.141E-01 2.097E-01 2.043E-01 1.979E-01 1.906E-01 1.823E-01 1.732E-01 1.633E-01 1.528E-01 1.417E-01 1.301E-01 1.182E-01 1.060E-01 9.380E-02 8.167E-02 6.977E-02 5.826E-02 4.731E-02 3.708E-02 2.776E-02 1.950E-02 1.248E-02 6.874E-03 2.832E-03 5.163E-04 7.283E-05 1.640E-03 5.343E-03 1.129E-02 1.959E-02 3.031E-02 4.352E-02 5.926E-02 7.754E-02 9.837E-02 1.217E-01 1.475E-01 1.757E-01 2.062E-01 2.389E-01 2.735E-01 3.100E-01 3.481E-01 3.875E-01 4.281E-01 4.694E-01 5.113E-01 5.533E-01 5.952E-01 6.364E-01 6.765E-01 7.151E-01 7.516E-01 7.854E-01 8.157E-01 8.414E-01 8.615E-01 8.744E-01 8.789E-01 8.744E-01 8.615E-01 8.414E-01 8.157E-01 7.854E-01 7.516E-01 7.151E-01 6.765E-01 6.364E-01 5.952E-01 5.533E-01 5.113E-01 4.694E-01 4.281E-01 3.875E-01 3.481E-01 3.100E-01 2.735E-01 2.389E-01 2.062E-01 1.757E-01 1.475E-01 1.217E-01 9.837E-02 7.754E-02 5.926E-02 4.352E-02 3.031E-02 1.959E-02 1.129E-02 5.343E-03 1.640E-03 7.283E-05 5.163E-04 2.832E-03 6.874E-03 1.248E-02 1.950E-02 2.776E-02 3.708E-02 4.731E-02 5.826E-02 6.977E-02 8.167E-02 9.380E-02 1.060E-01 1.182E-01 1.301E-01 1.417E-01 1.528E-01 1.633E-01 1.732E-01 1.823E-01 1.906E-01 1.979E-01 2.043E-01 2.097E-01 2.141E-01 2.174E-01 2.197E-01 2.209E-01 2.211E-01 2.202E-01 2.184E-01 2.156E-01 2.119E-01 2.074E-01 2.021E-01 1.960E-01 1.893E-01 1.820E-01 1.742E-01 1.659E-01 1.573E-01 1.484E-01 1.393E-01 1.301E-01 1.208E-01 1.115E-01 1.023E-01 9.329E-02 8.444E-02 7.585E-02 6.757E-02 5.966E-02 5.215E-02 4.507E-02 3.847E-02 3.236E-02 2.676E-02 2.170E-02 1.717E-02 1.319E-02 9.762E-03 6.869E-03 4.506E-03 2.662E-03 1.317E-03 4.524E-04 4.280E-05 6.178E-05 4.801E-04 1.266E-03 2.388E-03 3.809E-03 5.496E-03 7.413E-03 9.522E-03 1.179E-02 1.418E-02 1.665E-02 1.918E-02 2.172E-02 2.426E-02 2.675E-02 2.918E-02 3.151E-02 3.372E-02 3.579E-02 3.771E-02 3.945E-02 4.100E-02 4.236E-02 4.350E-02 4.443E-02 4.515E-02 4.564E-02 4.592E-02 4.565E-02 4.517E-02 4.446E-02 4.354E-02 4.240E-02 4.106E-02 3.951E-02 3.778E-02 3.587E-02 3.380E-02 3.159E-02 2.927E-02 2.685E-02 2.436E-02 2.183E-02 1.928E-02 1.675E-02 1.428E-02 1.189E-02 9.614E-03 7.498E-03 5.573E-03 3.877E-03 2.443E-03 1.309E-03 5.072E-04 7.214E-05 3.466E-05 4.241E-04 1.267E-03 2.589E-03 4.409E-03 6.745E-03 9.611E-03 1.302E-02 1.697E-02 2.146E-02 2.650E-02 3.206E-02 3.814E-02 4.472E-02 5.177E-02 5.925E-02 6.714E-02 7.539E-02 8.396E-02 9.279E-02 1.018E-01 1.110E-01 1.203E-01 1.296E-01 1.388E-01 1.479E-01 1.568E-01 1.654E-01 1.737E-01 1.815E-01 1.889E-01 1.956E-01 2.017E-01 2.071E-01 2.116E-01 2.154E-01 2.182E-01 2.201E-01 2.211E-01 2.210E-01 2.198E-01 2.176E-01 2.144E-01 2.101E-01 2.048E-01 1.985E-01 1.912E-01 1.830E-01 1.740E-01 1.642E-01 1.538E-01 1.427E-01 1.312E-01 1.193E-01 1.072E-01 9.502E-02 8.290E-02 7.100E-02 5.947E-02 4.847E-02 3.819E-02 2.878E-02 2.042E-02 1.326E-02 7.491E-03 3.258E-03 7.180E-04 1.796E-05 1.294E-03 4.670E-03 1.026E-02 1.815E-02 2.843E-02 4.115E-02 5.636E-02 7.408E-02 9.429E-02 1.170E-01 1.421E-01 1.695E-01 1.992E-01 2.310E-01 2.647E-01 3.003E-01 3.373E-01 3.757E-01 4.151E-01 4.552E-01 4.958E-01 5.365E-01 5.768E-01 6.164E-01 6.548E-01 6.915E-01 7.260E-01 7.576E-01 7.854E-01 8.087E-01 8.264E-01 8.376E-01 8.414E-01 8.376E-01 8.264E-01 8.087E-01 7.854E-01 7.576E-01 7.260E-01 6.915E-01 6.548E-01 6.164E-01 5.768E-01 5.365E-01 4.958E-01 4.552E-01 4.151E-01 3.757E-01 3.373E-01 3.003E-01 2.647E-01 2.310E-01 1.992E-01 1.695E-01 1.421E-01 1.170E-01 9.429E-02 7.408E-02 5.636E-02 4.115E-02 2.843E-02 1.815E-02 1.026E-02 4.670E-03 1.294E-03 1.796E-05 7.180E-04 3.258E-03 7.491E-03 1.326E-02 2.042E-02 2.878E-02 3.819E-02 4.847E-02 5.947E-02 7.100E-02 8.290E-02 9.502E-02 1.072E-01 1.193E-01 1.312E-01 1.427E-01 1.538E-01 1.642E-01 1.740E-01 1.830E-01 1.912E-01 1.985E-01 2.048E-01 2.101E-01 2.144E-01 2.176E-01 2.198E-01 2.210E-01 2.211E-01 2.201E-01 2.182E-01 2.154E-01 2.116E-01 2.071E-01 2.017E-01 1.956E-01 1.889E-01 1.815E-01 1.737E-01 1.654E-01 1.568E-01 1.479E-01 1.388E-01 1.296E-01 1.203E-01 1.110E-01 1.018E-01 9.279E-02 8.396E-02 7.539E-02 6.714E-02 5.925E-02 5.177E-02 4.472E-02 3.814E-02 3.206E-02 2.650E-02 2.146E-02 1.697E-02 1.302E-02 9.611E-03 6.745E-03 4.409E-03 2.589E-03 1.267E-03 4.241E-04 3.466E-05 7.214E-05 5.072E-04 1.309E-03 2.443E-03 3.877E-03 5.573E-03 7.498E-03 9.614E-03 1.189E-02 1.428E-02 1.675E-02 1.928E-02 2.183E-02 2.436E-02 2.685E-02 2.927E-02 3.159E-02 3.380E-02 3.587E-02 3.778E-02 3.951E-02 4.106E-02 4.240E-02 4.354E-02 4.446E-02 4.517E-02 4.565E-02 4.592E-02 4.567E-02 4.519E-02 4.450E-02 4.359E-02 4.246E-02 4.112E-02 3.958E-02 3.786E-02 3.596E-02 3.390E-02 3.170E-02 2.938E-02 2.697E-02 2.448E-02 2.195E-02 1.940E-02 1.688E-02 1.440E-02 1.200E-02 9.726E-03 7.602E-03 5.668E-03 3.959E-03 2.512E-03 1.361E-03 5.414E-04 8.587E-05 2.589E-05 3.908E-04 1.208E-03 2.501E-03 4.291E-03 6.595E-03 9.428E-03 1.280E-02 1.671E-02 2.117E-02 2.617E-02 3.170E-02 3.775E-02 4.429E-02 5.130E-02 5.875E-02 6.661E-02 7.484E-02 8.338E-02 9.218E-02 1.012E-01 1.104E-01 1.196E-01 1.289E-01 1.381E-01 1.472E-01 1.562E-01 1.648E-01 1.731E-01 1.809E-01 1.883E-01 1.951E-01 2.012E-01 2.066E-01 2.113E-01 2.151E-01 2.180E-01 2.200E-01 2.210E-01 2.210E-01 2.200E-01 2.179E-01 2.148E-01 2.106E-01 2.054E-01 1.992E-01 1.920E-01 1.839E-01 1.750E-01 1.653E-01 1.549E-01 1.440E-01 1.325E-01 1.207E-01 1.087E-01 9.651E-02 8.441E-02 7.250E-02 6.095E-02 4.991E-02 3.955E-02 3.005E-02 2.155E-02 1.424E-02 8.276E-03 3.813E-03 1.007E-03 9.434E-07 9.292E-04 3.914E-03 9.066E-03 1.648E-02 2.623E-02 3.837E-02 5.295E-02 6.998E-02 8.946E-02 1.114E-01 1.356E-01 1.622E-01 1.909E-01 2.217E-01 2.543E-01 2.887E-01 3.245E-01 3.616E-01 3.997E-01 4.384E-01 4.775E-01 5.166E-01 5.552E-01 5.931E-01 6.296E-01 6.643E-01 6.967E-01 7.260E-01 7.516E-01 7.728E-01 7.886E-01 7.985E-01 8.019E-01 7.985E-01 7.886E-01 7.728E-01 7.516E-01 7.260E-01 6.967E-01 6.643E-01 6.296E-01 5.931E-01 5.552E-01 5.166E-01 4.775E-01 4.384E-01 3.997E-01 3.616E-01 3.245E-01 2.887E-01 2.543E-01 2.217E-01 1.909E-01 1.622E-01 1.356E-01 1.114E-01 8.946E-02 6.998E-02 5.295E-02 3.837E-02 2.623E-02 1.648E-02 9.066E-03 3.914E-03 9.292E-04 9.434E-07 1.007E-03 3.813E-03 8.276E-03 1.424E-02 2.155E-02 3.005E-02 3.955E-02 4.991E-02 6.095E-02 7.250E-02 8.441E-02 9.651E-02 1.087E-01 1.207E-01 1.325E-01 1.440E-01 1.549E-01 1.653E-01 1.750E-01 1.839E-01 1.920E-01 1.992E-01 2.054E-01 2.106E-01 2.148E-01 2.179E-01 2.200E-01 2.210E-01 2.210E-01 2.200E-01 2.180E-01 2.151E-01 2.113E-01 2.066E-01 2.012E-01 1.951E-01 1.883E-01 1.809E-01 1.731E-01 1.648E-01 1.562E-01 1.472E-01 1.381E-01 1.289E-01 1.196E-01 1.104E-01 1.012E-01 9.218E-02 8.338E-02 7.484E-02 6.661E-02 5.875E-02 5.130E-02 4.429E-02 3.775E-02 3.170E-02 2.617E-02 2.117E-02 1.671E-02 1.280E-02 9.428E-03 6.595E-03 4.291E-03 2.501E-03 1.208E-03 3.908E-04 2.589E-05 8.587E-05 5.414E-04 1.361E-03 2.512E-03 3.959E-03 5.668E-03 7.602E-03 9.726E-03 1.200E-02 1.440E-02 1.688E-02 1.940E-02 2.195E-02 2.448E-02 2.697E-02 2.938E-02 3.170E-02 3.390E-02 3.596E-02 3.786E-02 3.958E-02 4.112E-02 4.246E-02 4.359E-02 4.450E-02 4.519E-02 4.567E-02 4.593E-02 4.569E-02 4.522E-02 4.454E-02 4.364E-02 4.252E-02 4.120E-02 3.967E-02 3.796E-02 3.607E-02 3.402E-02 3.183E-02 2.951E-02 2.710E-02 2.462E-02 2.210E-02 1.955E-02 1.702E-02 1.454E-02 1.214E-02 9.859E-03 7.726E-03 5.780E-03 4.058E-03 2.594E-03 1.424E-03 5.831E-04 1.036E-04 1.718E-05 3.533E-04 1.139E-03 2.399E-03 4.153E-03 6.421E-03 9.215E-03 1.255E-02 1.642E-02 2.084E-02 2.579E-02 3.128E-02 3.728E-02 4.378E-02 5.076E-02 5.817E-02 6.599E-02 7.418E-02 8.269E-02 9.147E-02 1.005E-01 1.096E-01 1.189E-01 1.281E-01 1.374E-01 1.465E-01 1.554E-01 1.640E-01 1.723E-01 1.802E-01 1.876E-01 1.945E-01 2.007E-01 2.062E-01 2.109E-01 2.148E-01 2.178E-01 2.199E-01 2.210E-01 2.211E-01 2.201E-01 2.182E-01 2.152E-01 2.111E-01 2.060E-01 2.000E-01 1.929E-01 1.850E-01 1.762E-01 1.666E-01 1.563E-01 1.455E-01 1.341E-01 1.224E-01 1.104E-01 9.826E-02 8.618E-02 7.428E-02 6.270E-02 5.161E-02 4.118E-02 3.156E-02 2.292E-02 1.543E-02 9.244E-03 4.519E-03 1.408E-03 4.997E-05 5.789E-04 3.115E-03 7.765E-03 1.462E-02 2.376E-02 3.524E-02 4.909E-02 6.534E-02 8.397E-02 1.050E-01 1.283E-01 1.538E-01 1.814E-01 2.110E-01 2.424E-01 2.755E-01 3.100E-01 3.457E-01 3.822E-01 4.194E-01 4.568E-01 4.941E-01 5.310E-01 5.669E-01 6.014E-01 6.341E-01 6.643E-01 6.915E-01 7.151E-01 7.344E-01 7.487E-01 7.576E-01 7.605E-01 7.576E-01 7.487E-01 7.344E-01 7.151E-01 6.915E-01 6.643E-01 6.341E-01 6.014E-01 5.669E-01 5.310E-01 4.941E-01 4.568E-01 4.194E-01 3.822E-01 3.457E-01 3.100E-01 2.755E-01 2.424E-01 2.110E-01 1.814E-01 1.538E-01 1.283E-01 1.050E-01 8.397E-02 6.534E-02 4.909E-02 3.524E-02 2.376E-02 1.462E-02 7.765E-03 3.115E-03 5.789E-04 4.997E-05 1.408E-03 4.519E-03 9.244E-03 1.543E-02 2.292E-02 3.156E-02 4.118E-02 5.161E-02 6.270E-02 7.428E-02 8.618E-02 9.826E-02 1.104E-01 1.224E-01 1.341E-01 1.455E-01 1.563E-01 1.666E-01 1.762E-01 1.850E-01 1.929E-01 2.000E-01 2.060E-01 2.111E-01 2.152E-01 2.182E-01 2.201E-01 2.211E-01 2.210E-01 2.199E-01 2.178E-01 2.148E-01 2.109E-01 2.062E-01 2.007E-01 1.945E-01 1.876E-01 1.802E-01 1.723E-01 1.640E-01 1.554E-01 1.465E-01 1.374E-01 1.281E-01 1.189E-01 1.096E-01 1.005E-01 9.147E-02 8.269E-02 7.418E-02 6.599E-02 5.817E-02 5.076E-02 4.378E-02 3.728E-02 3.128E-02 2.579E-02 2.084E-02 1.642E-02 1.255E-02 9.215E-03 6.421E-03 4.153E-03 2.399E-03 1.139E-03 3.533E-04 1.718E-05 1.036E-04 5.831E-04 1.424E-03 2.594E-03 4.058E-03 5.780E-03 7.726E-03 9.859E-03 1.214E-02 1.454E-02 1.702E-02 1.955E-02 2.210E-02 2.462E-02 2.710E-02 2.951E-02 3.183E-02 3.402E-02 3.607E-02 3.796E-02 3.967E-02 4.120E-02 4.252E-02 4.364E-02 4.454E-02 4.522E-02 4.569E-02 4.594E-02 4.571E-02 4.526E-02 4.459E-02 4.370E-02 4.260E-02 4.128E-02 3.977E-02 3.807E-02 3.619E-02 3.415E-02 3.197E-02 2.967E-02 2.726E-02 2.479E-02 2.226E-02 1.972E-02 1.719E-02 1.471E-02 1.230E-02 1.001E-02 7.870E-03 5.911E-03 4.173E-03 2.690E-03 1.499E-03 6.330E-04 1.261E-04 9.360E-06 3.124E-04 1.062E-03 2.284E-03 3.998E-03 6.223E-03 8.973E-03 1.226E-02 1.608E-02 2.045E-02 2.536E-02 3.080E-02 3.675E-02 4.320E-02 5.013E-02 5.750E-02 6.528E-02 7.343E-02 8.190E-02 9.065E-02 9.961E-02 1.087E-01 1.180E-01 1.272E-01 1.364E-01 1.456E-01 1.545E-01 1.632E-01 1.715E-01 1.794E-01 1.869E-01 1.938E-01 2.000E-01 2.056E-01 2.104E-01 2.144E-01 2.175E-01 2.197E-01 2.209E-01 2.211E-01 2.203E-01 2.185E-01 2.156E-01 2.117E-01 2.068E-01 2.008E-01 1.940E-01 1.861E-01 1.775E-01 1.680E-01 1.579E-01 1.471E-01 1.359E-01 1.242E-01 1.123E-01 1.003E-01 8.823E-02 7.633E-02 6.473E-02 5.359E-02 4.307E-02 3.333E-02 2.454E-02 1.684E-02 1.041E-02 5.398E-03 1.946E-03 1.968E-04 2.800E-04 2.314E-03 6.405E-03 1.264E-02 2.110E-02 3.183E-02 4.487E-02 6.024E-02 7.793E-02 9.791E-02 1.201E-01 1.445E-01 1.709E-01 1.992E-01 2.293E-01 2.609E-01 2.939E-01 3.280E-01 3.629E-01 3.983E-01 4.340E-01 4.694E-01 5.044E-01 5.383E-01 5.708E-01 6.014E-01 6.296E-01 6.548E-01 6.765E-01 6.941E-01 7.071E-01 7.151E-01 7.178E-01 7.151E-01 7.071E-01 6.941E-01 6.765E-01 6.548E-01 6.296E-01 6.014E-01 5.708E-01 5.383E-01 5.044E-01 4.694E-01 4.340E-01 3.983E-01 3.629E-01 3.280E-01 2.939E-01 2.609E-01 2.293E-01 1.992E-01 1.709E-01 1.445E-01 1.201E-01 9.791E-02 7.793E-02 6.024E-02 4.487E-02 3.183E-02 2.110E-02 1.264E-02 6.405E-03 2.314E-03 2.800E-04 1.968E-04 1.946E-03 5.398E-03 1.041E-02 1.684E-02 2.454E-02 3.333E-02 4.307E-02 5.359E-02 6.473E-02 7.633E-02 8.823E-02 1.003E-01 1.123E-01 1.242E-01 1.359E-01 1.471E-01 1.579E-01 1.680E-01 1.775E-01 1.861E-01 1.940E-01 2.008E-01 2.068E-01 2.117E-01 2.156E-01 2.185E-01 2.203E-01 2.211E-01 2.209E-01 2.197E-01 2.175E-01 2.144E-01 2.104E-01 2.056E-01 2.000E-01 1.938E-01 1.869E-01 1.794E-01 1.715E-01 1.632E-01 1.545E-01 1.456E-01 1.364E-01 1.272E-01 1.180E-01 1.087E-01 9.961E-02 9.065E-02 8.190E-02 7.343E-02 6.528E-02 5.750E-02 5.013E-02 4.320E-02 3.675E-02 3.080E-02 2.536E-02 2.045E-02 1.608E-02 1.226E-02 8.973E-03 6.223E-03 3.998E-03 2.284E-03 1.062E-03 3.124E-04 9.360E-06 1.261E-04 6.330E-04 1.499E-03 2.690E-03 4.173E-03 5.911E-03 7.870E-03 1.001E-02 1.230E-02 1.471E-02 1.719E-02 1.972E-02 2.226E-02 2.479E-02 2.726E-02 2.967E-02 3.197E-02 3.415E-02 3.619E-02 3.807E-02 3.977E-02 4.128E-02 4.260E-02 4.370E-02 4.459E-02 4.526E-02 4.571E-02 4.594E-02 4.573E-02 4.529E-02 4.464E-02 4.377E-02 4.268E-02 4.138E-02 3.988E-02 3.820E-02 3.633E-02 3.430E-02 3.213E-02 2.984E-02 2.744E-02 2.497E-02 2.245E-02 1.991E-02 1.739E-02 1.490E-02 1.249E-02 1.019E-02 8.034E-03 6.061E-03 4.304E-03 2.801E-03 1.585E-03 6.919E-04 1.541E-04 3.357E-06 2.693E-04 9.791E-04 2.157E-03 3.826E-03 6.003E-03 8.703E-03 1.194E-02 1.571E-02 2.002E-02 2.487E-02 3.026E-02 3.616E-02 4.255E-02 4.943E-02 5.674E-02 6.447E-02 7.258E-02 8.101E-02 8.972E-02 9.865E-02 1.078E-01 1.170E-01 1.262E-01 1.354E-01 1.445E-01 1.535E-01 1.622E-01 1.705E-01 1.785E-01 1.860E-01 1.929E-01 1.993E-01 2.049E-01 2.098E-01 2.139E-01 2.171E-01 2.194E-01 2.208E-01 2.211E-01 2.205E-01 2.188E-01 2.161E-01 2.124E-01 2.076E-01 2.018E-01 1.951E-01 1.875E-01 1.790E-01 1.697E-01 1.597E-01 1.490E-01 1.379E-01 1.264E-01 1.145E-01 1.026E-01 9.054E-02 7.866E-02 6.704E-02 5.585E-02 4.524E-02 3.538E-02 2.641E-02 1.850E-02 1.181E-02 6.474E-03 2.652E-03 4.758E-04 7.283E-05 1.559E-03 5.037E-03 1.060E-02 1.831E-02 2.822E-02 4.038E-02 5.479E-02 7.145E-02 9.032E-02 1.114E-01 1.345E-01 1.595E-01 1.865E-01 2.151E-01 2.451E-01 2.765E-01 3.089E-01 3.421E-01 3.757E-01 4.094E-01 4.430E-01 4.759E-01 5.078E-01 5.383E-01 5.669E-01 5.931E-01 6.164E-01 6.364E-01 6.525E-01 6.643E-01 6.716E-01 6.740E-01 6.716E-01 6.643E-01 6.525E-01 6.364E-01 6.164E-01 5.931E-01 5.669E-01 5.383E-01 5.078E-01 4.759E-01 4.430E-01 4.094E-01 3.757E-01 3.421E-01 3.089E-01 2.765E-01 2.451E-01 2.151E-01 1.865E-01 1.595E-01 1.345E-01 1.114E-01 9.032E-02 7.145E-02 5.479E-02 4.038E-02 2.822E-02 1.831E-02 1.060E-02 5.037E-03 1.559E-03 7.283E-05 4.758E-04 2.652E-03 6.474E-03 1.181E-02 1.850E-02 2.641E-02 3.538E-02 4.524E-02 5.585E-02 6.704E-02 7.866E-02 9.054E-02 1.026E-01 1.145E-01 1.264E-01 1.379E-01 1.490E-01 1.597E-01 1.697E-01 1.790E-01 1.875E-01 1.951E-01 2.018E-01 2.076E-01 2.124E-01 2.161E-01 2.188E-01 2.205E-01 2.211E-01 2.208E-01 2.194E-01 2.171E-01 2.139E-01 2.098E-01 2.049E-01 1.993E-01 1.929E-01 1.860E-01 1.785E-01 1.705E-01 1.622E-01 1.535E-01 1.445E-01 1.354E-01 1.262E-01 1.170E-01 1.078E-01 9.865E-02 8.972E-02 8.101E-02 7.258E-02 6.447E-02 5.674E-02 4.943E-02 4.255E-02 3.616E-02 3.026E-02 2.487E-02 2.002E-02 1.571E-02 1.194E-02 8.703E-03 6.003E-03 3.826E-03 2.157E-03 9.791E-04 2.693E-04 3.357E-06 1.541E-04 6.919E-04 1.585E-03 2.801E-03 4.304E-03 6.061E-03 8.034E-03 1.019E-02 1.249E-02 1.490E-02 1.739E-02 1.991E-02 2.245E-02 2.497E-02 2.744E-02 2.984E-02 3.213E-02 3.430E-02 3.633E-02 3.820E-02 3.988E-02 4.138E-02 4.268E-02 4.377E-02 4.464E-02 4.529E-02 4.573E-02 4.595E-02 4.575E-02 4.533E-02 4.470E-02 4.384E-02 4.277E-02 4.149E-02 4.001E-02 3.834E-02 3.649E-02 3.447E-02 3.231E-02 3.003E-02 2.765E-02 2.518E-02 2.267E-02 2.013E-02 1.760E-02 1.511E-02 1.269E-02 1.039E-02 8.218E-03 6.229E-03 4.453E-03 2.927E-03 1.684E-03 7.605E-04 1.886E-04 2.162E-07 2.249E-04 8.902E-04 2.021E-03 3.639E-03 5.762E-03 8.406E-03 1.158E-02 1.529E-02 1.955E-02 2.434E-02 2.966E-02 3.549E-02 4.183E-02 4.864E-02 5.591E-02 6.358E-02 7.163E-02 8.002E-02 8.868E-02 9.758E-02 1.067E-01 1.158E-01 1.251E-01 1.343E-01 1.434E-01 1.523E-01 1.611E-01 1.694E-01 1.775E-01 1.850E-01 1.920E-01 1.984E-01 2.042E-01 2.092E-01 2.133E-01 2.167E-01 2.191E-01 2.206E-01 2.211E-01 2.207E-01 2.192E-01 2.166E-01 2.130E-01 2.085E-01 2.029E-01 1.963E-01 1.889E-01 1.806E-01 1.714E-01 1.616E-01 1.511E-01 1.401E-01 1.287E-01 1.170E-01 1.051E-01 9.313E-02 8.126E-02 6.963E-02 5.839E-02 4.770E-02 3.770E-02 2.855E-02 2.042E-02 1.344E-02 7.773E-03 3.556E-03 9.237E-04 2.496E-07 8.991E-04 3.721E-03 8.552E-03 1.546E-02 2.450E-02 3.571E-02 4.909E-02 6.465E-02 8.233E-02 1.021E-01 1.239E-01 1.475E-01 1.730E-01 2.000E-01 2.284E-01 2.581E-01 2.887E-01 3.200E-01 3.517E-01 3.835E-01 4.151E-01 4.460E-01 4.759E-01 5.044E-01 5.310E-01 5.552E-01 5.768E-01 5.952E-01 6.099E-01 6.208E-01 6.274E-01 6.296E-01 6.274E-01 6.208E-01 6.099E-01 5.952E-01 5.768E-01 5.552E-01 5.310E-01 5.044E-01 4.759E-01 4.460E-01 4.151E-01 3.835E-01 3.517E-01 3.200E-01 2.887E-01 2.581E-01 2.284E-01 2.000E-01 1.730E-01 1.475E-01 1.239E-01 1.021E-01 8.233E-02 6.465E-02 4.909E-02 3.571E-02 2.450E-02 1.546E-02 8.552E-03 3.721E-03 8.991E-04 2.496E-07 9.237E-04 3.556E-03 7.773E-03 1.344E-02 2.042E-02 2.855E-02 3.770E-02 4.770E-02 5.839E-02 6.963E-02 8.126E-02 9.313E-02 1.051E-01 1.170E-01 1.287E-01 1.401E-01 1.511E-01 1.616E-01 1.714E-01 1.806E-01 1.889E-01 1.963E-01 2.029E-01 2.085E-01 2.130E-01 2.166E-01 2.192E-01 2.207E-01 2.211E-01 2.206E-01 2.191E-01 2.167E-01 2.133E-01 2.092E-01 2.042E-01 1.984E-01 1.920E-01 1.850E-01 1.775E-01 1.694E-01 1.611E-01 1.523E-01 1.434E-01 1.343E-01 1.251E-01 1.158E-01 1.067E-01 9.758E-02 8.868E-02 8.002E-02 7.163E-02 6.358E-02 5.591E-02 4.864E-02 4.183E-02 3.549E-02 2.966E-02 2.434E-02 1.955E-02 1.529E-02 1.158E-02 8.406E-03 5.762E-03 3.639E-03 2.021E-03 8.902E-04 2.249E-04 2.162E-07 1.886E-04 7.605E-04 1.684E-03 2.927E-03 4.453E-03 6.229E-03 8.218E-03 1.039E-02 1.269E-02 1.511E-02 1.760E-02 2.013E-02 2.267E-02 2.518E-02 2.765E-02 3.003E-02 3.231E-02 3.447E-02 3.649E-02 3.834E-02 4.001E-02 4.149E-02 4.277E-02 4.384E-02 4.470E-02 4.533E-02 4.575E-02 4.596E-02 4.578E-02 4.538E-02 4.476E-02 4.392E-02 4.287E-02 4.161E-02 4.015E-02 3.849E-02 3.666E-02 3.466E-02 3.251E-02 3.024E-02 2.787E-02 2.541E-02 2.290E-02 2.037E-02 1.784E-02 1.535E-02 1.292E-02 1.060E-02 8.424E-03 6.417E-03 4.620E-03 3.068E-03 1.797E-03 8.399E-04 2.307E-04 1.084E-06 1.807E-04 7.971E-04 1.875E-03 3.437E-03 5.502E-03 8.084E-03 1.120E-02 1.484E-02 1.903E-02 2.375E-02 2.900E-02 3.477E-02 4.104E-02 4.779E-02 5.499E-02 6.260E-02 7.060E-02 7.893E-02 8.755E-02 9.640E-02 1.054E-01 1.146E-01 1.238E-01 1.330E-01 1.421E-01 1.511E-01 1.598E-01 1.682E-01 1.763E-01 1.839E-01 1.910E-01 1.975E-01 2.033E-01 2.084E-01 2.127E-01 2.162E-01 2.188E-01 2.204E-01 2.211E-01 2.208E-01 2.195E-01 2.171E-01 2.138E-01 2.094E-01 2.040E-01 1.977E-01 1.904E-01 1.823E-01 1.734E-01 1.637E-01 1.534E-01 1.426E-01 1.313E-01 1.197E-01 1.079E-01 9.597E-02 8.413E-02 7.250E-02 6.122E-02 5.043E-02 4.030E-02 3.098E-02 2.260E-02 1.534E-02 9.320E-03 4.690E-03 1.578E-03 1.066E-04 3.863E-04 2.515E-03 6.577E-03 1.264E-02 2.076E-02 3.096E-02 4.325E-02 5.764E-02 7.408E-02 9.251E-02 1.129E-01 1.350E-01 1.589E-01 1.843E-01 2.110E-01 2.389E-01 2.676E-01 2.971E-01 3.268E-01 3.566E-01 3.862E-01 4.151E-01 4.430E-01 4.694E-01 4.941E-01 5.166E-01 5.365E-01 5.533E-01 5.669E-01 5.768E-01 5.828E-01 5.849E-01 5.828E-01 5.768E-01 5.669E-01 5.533E-01 5.365E-01 5.166E-01 4.941E-01 4.694E-01 4.430E-01 4.151E-01 3.862E-01 3.566E-01 3.268E-01 2.971E-01 2.676E-01 2.389E-01 2.110E-01 1.843E-01 1.589E-01 1.350E-01 1.129E-01 9.251E-02 7.408E-02 5.764E-02 4.325E-02 3.096E-02 2.076E-02 1.264E-02 6.577E-03 2.515E-03 3.863E-04 1.066E-04 1.578E-03 4.690E-03 9.320E-03 1.534E-02 2.260E-02 3.098E-02 4.030E-02 5.043E-02 6.122E-02 7.250E-02 8.413E-02 9.597E-02 1.079E-01 1.197E-01 1.313E-01 1.426E-01 1.534E-01 1.637E-01 1.734E-01 1.823E-01 1.904E-01 1.977E-01 2.040E-01 2.094E-01 2.138E-01 2.171E-01 2.195E-01 2.208E-01 2.211E-01 2.204E-01 2.188E-01 2.162E-01 2.127E-01 2.084E-01 2.033E-01 1.975E-01 1.910E-01 1.839E-01 1.763E-01 1.682E-01 1.598E-01 1.511E-01 1.421E-01 1.330E-01 1.238E-01 1.146E-01 1.054E-01 9.640E-02 8.755E-02 7.893E-02 7.060E-02 6.260E-02 5.499E-02 4.779E-02 4.104E-02 3.477E-02 2.900E-02 2.375E-02 1.903E-02 1.484E-02 1.120E-02 8.084E-03 5.502E-03 3.437E-03 1.875E-03 7.971E-04 1.807E-04 1.084E-06 2.307E-04 8.399E-04 1.797E-03 3.068E-03 4.620E-03 6.417E-03 8.424E-03 1.060E-02 1.292E-02 1.535E-02 1.784E-02 2.037E-02 2.290E-02 2.541E-02 2.787E-02 3.024E-02 3.251E-02 3.466E-02 3.666E-02 3.849E-02 4.015E-02 4.161E-02 4.287E-02 4.392E-02 4.476E-02 4.538E-02 4.578E-02 4.596E-02 4.580E-02 4.542E-02 4.483E-02 4.401E-02 4.298E-02 4.174E-02 4.029E-02 3.866E-02 3.684E-02 3.486E-02 3.273E-02 3.047E-02 2.811E-02 2.566E-02 2.316E-02 2.063E-02 1.810E-02 1.560E-02 1.317E-02 1.085E-02 8.650E-03 6.625E-03 4.805E-03 3.227E-03 1.924E-03 9.309E-04 2.815E-04 7.209E-06 1.379E-04 7.014E-04 1.723E-03 3.224E-03 5.225E-03 7.741E-03 1.078E-02 1.436E-02 1.847E-02 2.312E-02 2.830E-02 3.399E-02 4.019E-02 4.686E-02 5.399E-02 6.154E-02 6.947E-02 7.774E-02 8.631E-02 9.512E-02 1.041E-01 1.132E-01 1.224E-01 1.316E-01 1.407E-01 1.497E-01 1.585E-01 1.669E-01 1.750E-01 1.827E-01 1.899E-01 1.964E-01 2.024E-01 2.076E-01 2.120E-01 2.156E-01 2.184E-01 2.202E-01 2.211E-01 2.210E-01 2.198E-01 2.177E-01 2.145E-01 2.104E-01 2.052E-01 1.991E-01 1.921E-01 1.842E-01 1.755E-01 1.660E-01 1.559E-01 1.452E-01 1.341E-01 1.226E-01 1.109E-01 9.907E-02 8.727E-02 7.565E-02 6.433E-02 5.346E-02 4.320E-02 3.369E-02 2.508E-02 1.752E-02 1.114E-02 6.085E-03 2.477E-03 4.369E-04 7.283E-05 1.481E-03 4.742E-03 9.923E-03 1.707E-02 2.623E-02 3.739E-02 5.055E-02 6.569E-02 8.274E-02 1.016E-01 1.223E-01 1.445E-01 1.682E-01 1.931E-01 2.192E-01 2.461E-01 2.735E-01 3.013E-01 3.291E-01 3.566E-01 3.835E-01 4.094E-01 4.340E-01 4.568E-01 4.775E-01 4.958E-01 5.113E-01 5.237E-01 5.328E-01 5.383E-01 5.402E-01 5.383E-01 5.328E-01 5.237E-01 5.113E-01 4.958E-01 4.775E-01 4.568E-01 4.340E-01 4.094E-01 3.835E-01 3.566E-01 3.291E-01 3.013E-01 2.735E-01 2.461E-01 2.192E-01 1.931E-01 1.682E-01 1.445E-01 1.223E-01 1.016E-01 8.274E-02 6.569E-02 5.055E-02 3.739E-02 2.623E-02 1.707E-02 9.923E-03 4.742E-03 1.481E-03 7.283E-05 4.369E-04 2.477E-03 6.085E-03 1.114E-02 1.752E-02 2.508E-02 3.369E-02 4.320E-02 5.346E-02 6.433E-02 7.565E-02 8.727E-02 9.907E-02 1.109E-01 1.226E-01 1.341E-01 1.452E-01 1.559E-01 1.660E-01 1.755E-01 1.842E-01 1.921E-01 1.991E-01 2.052E-01 2.104E-01 2.145E-01 2.177E-01 2.198E-01 2.210E-01 2.211E-01 2.202E-01 2.184E-01 2.156E-01 2.120E-01 2.076E-01 2.024E-01 1.964E-01 1.899E-01 1.827E-01 1.750E-01 1.669E-01 1.585E-01 1.497E-01 1.407E-01 1.316E-01 1.224E-01 1.132E-01 1.041E-01 9.512E-02 8.631E-02 7.774E-02 6.947E-02 6.154E-02 5.399E-02 4.686E-02 4.019E-02 3.399E-02 2.830E-02 2.312E-02 1.847E-02 1.436E-02 1.078E-02 7.741E-03 5.225E-03 3.224E-03 1.723E-03 7.014E-04 1.379E-04 7.209E-06 2.815E-04 9.309E-04 1.924E-03 3.227E-03 4.805E-03 6.625E-03 8.650E-03 1.085E-02 1.317E-02 1.560E-02 1.810E-02 2.063E-02 2.316E-02 2.566E-02 2.811E-02 3.047E-02 3.273E-02 3.486E-02 3.684E-02 3.866E-02 4.029E-02 4.174E-02 4.298E-02 4.401E-02 4.483E-02 4.542E-02 4.580E-02 4.597E-02 4.583E-02 4.547E-02 4.489E-02 4.410E-02 4.309E-02 4.187E-02 4.045E-02 3.884E-02 3.704E-02 3.508E-02 3.296E-02 3.072E-02 2.837E-02 2.593E-02 2.344E-02 2.091E-02 1.838E-02 1.588E-02 1.345E-02 1.111E-02 8.898E-03 6.854E-03 5.010E-03 3.402E-03 2.066E-03 1.035E-03 3.421E-04 1.993E-05 9.812E-05 6.046E-04 1.565E-03 3.001E-03 4.933E-03 7.376E-03 1.034E-02 1.384E-02 1.787E-02 2.244E-02 2.754E-02 3.315E-02 3.927E-02 4.586E-02 5.291E-02 6.039E-02 6.825E-02 7.646E-02 8.497E-02 9.373E-02 1.027E-01 1.118E-01 1.209E-01 1.301E-01 1.392E-01 1.482E-01 1.570E-01 1.655E-01 1.736E-01 1.814E-01 1.886E-01 1.953E-01 2.013E-01 2.066E-01 2.112E-01 2.150E-01 2.179E-01 2.199E-01 2.210E-01 2.211E-01 2.202E-01 2.182E-01 2.153E-01 2.114E-01 2.065E-01 2.006E-01 1.938E-01 1.861E-01 1.777E-01 1.684E-01 1.585E-01 1.480E-01 1.371E-01 1.257E-01 1.142E-01 1.024E-01 9.068E-02 7.907E-02 6.772E-02 5.679E-02 4.640E-02 3.672E-02 2.787E-02 2.001E-02 1.326E-02 7.773E-03 3.658E-03 1.036E-03 1.105E-05 6.775E-04 3.115E-03 7.388E-03 1.354E-02 2.162E-02 3.161E-02 4.352E-02 5.732E-02 7.294E-02 9.032E-02 1.094E-01 1.299E-01 1.519E-01 1.750E-01 1.992E-01 2.242E-01 2.497E-01 2.755E-01 3.013E-01 3.268E-01 3.517E-01 3.757E-01 3.983E-01 4.194E-01 4.384E-01 4.552E-01 4.694E-01 4.808E-01 4.891E-01 4.941E-01 4.958E-01 4.941E-01 4.891E-01 4.808E-01 4.694E-01 4.552E-01 4.384E-01 4.194E-01 3.983E-01 3.757E-01 3.517E-01 3.268E-01 3.013E-01 2.755E-01 2.497E-01 2.242E-01 1.992E-01 1.750E-01 1.519E-01 1.299E-01 1.094E-01 9.032E-02 7.294E-02 5.732E-02 4.352E-02 3.161E-02 2.162E-02 1.354E-02 7.388E-03 3.115E-03 6.775E-04 1.105E-05 1.036E-03 3.658E-03 7.773E-03 1.326E-02 2.001E-02 2.787E-02 3.672E-02 4.640E-02 5.679E-02 6.772E-02 7.907E-02 9.068E-02 1.024E-01 1.142E-01 1.257E-01 1.371E-01 1.480E-01 1.585E-01 1.684E-01 1.777E-01 1.861E-01 1.938E-01 2.006E-01 2.065E-01 2.114E-01 2.153E-01 2.182E-01 2.202E-01 2.211E-01 2.210E-01 2.199E-01 2.179E-01 2.150E-01 2.112E-01 2.066E-01 2.013E-01 1.953E-01 1.886E-01 1.814E-01 1.736E-01 1.655E-01 1.570E-01 1.482E-01 1.392E-01 1.301E-01 1.209E-01 1.118E-01 1.027E-01 9.373E-02 8.497E-02 7.646E-02 6.825E-02 6.039E-02 5.291E-02 4.586E-02 3.927E-02 3.315E-02 2.754E-02 2.244E-02 1.787E-02 1.384E-02 1.034E-02 7.376E-03 4.933E-03 3.001E-03 1.565E-03 6.046E-04 9.812E-05 1.993E-05 3.421E-04 1.035E-03 2.066E-03 3.402E-03 5.010E-03 6.854E-03 8.898E-03 1.111E-02 1.345E-02 1.588E-02 1.838E-02 2.091E-02 2.344E-02 2.593E-02 2.837E-02 3.072E-02 3.296E-02 3.508E-02 3.704E-02 3.884E-02 4.045E-02 4.187E-02 4.309E-02 4.410E-02 4.489E-02 4.547E-02 4.583E-02 4.597E-02 4.585E-02 4.552E-02 4.497E-02 4.420E-02 4.321E-02 4.202E-02 4.062E-02 3.903E-02 3.725E-02 3.531E-02 3.321E-02 3.099E-02 2.865E-02 2.622E-02 2.374E-02 2.122E-02 1.869E-02 1.619E-02 1.375E-02 1.139E-02 9.169E-03 7.104E-03 5.234E-03 3.596E-03 2.224E-03 1.152E-03 4.139E-04 4.068E-05 6.286E-05 5.085E-04 1.403E-03 2.770E-03 4.628E-03 6.994E-03 9.880E-03 1.329E-02 1.724E-02 2.172E-02 2.673E-02 3.226E-02 3.829E-02 4.480E-02 5.177E-02 5.916E-02 6.695E-02 7.509E-02 8.353E-02 9.224E-02 1.011E-01 1.102E-01 1.193E-01 1.285E-01 1.376E-01 1.466E-01 1.554E-01 1.639E-01 1.721E-01 1.799E-01 1.872E-01 1.940E-01 2.001E-01 2.056E-01 2.103E-01 2.143E-01 2.174E-01 2.196E-01 2.208E-01 2.211E-01 2.205E-01 2.188E-01 2.161E-01 2.124E-01 2.078E-01 2.022E-01 1.956E-01 1.882E-01 1.800E-01 1.710E-01 1.613E-01 1.510E-01 1.403E-01 1.291E-01 1.176E-01 1.060E-01 9.435E-02 8.276E-02 7.141E-02 6.041E-02 4.991E-02 4.005E-02 3.098E-02 2.282E-02 1.571E-02 9.783E-03 5.157E-03 1.946E-03 2.518E-04 1.654E-04 1.765E-03 5.113E-03 1.026E-02 1.723E-02 2.603E-02 3.666E-02 4.909E-02 6.327E-02 7.912E-02 9.654E-02 1.154E-01 1.356E-01 1.570E-01 1.793E-01 2.023E-01 2.259E-01 2.497E-01 2.735E-01 2.971E-01 3.200E-01 3.421E-01 3.629E-01 3.822E-01 3.997E-01 4.151E-01 4.281E-01 4.384E-01 4.460E-01 4.506E-01 4.521E-01 4.506E-01 4.460E-01 4.384E-01 4.281E-01 4.151E-01 3.997E-01 3.822E-01 3.629E-01 3.421E-01 3.200E-01 2.971E-01 2.735E-01 2.497E-01 2.259E-01 2.023E-01 1.793E-01 1.570E-01 1.356E-01 1.154E-01 9.654E-02 7.912E-02 6.327E-02 4.909E-02 3.666E-02 2.603E-02 1.723E-02 1.026E-02 5.113E-03 1.765E-03 1.654E-04 2.518E-04 1.946E-03 5.157E-03 9.783E-03 1.571E-02 2.282E-02 3.098E-02 4.005E-02 4.991E-02 6.041E-02 7.141E-02 8.276E-02 9.435E-02 1.060E-01 1.176E-01 1.291E-01 1.403E-01 1.510E-01 1.613E-01 1.710E-01 1.800E-01 1.882E-01 1.956E-01 2.022E-01 2.078E-01 2.124E-01 2.161E-01 2.188E-01 2.205E-01 2.211E-01 2.208E-01 2.196E-01 2.174E-01 2.143E-01 2.103E-01 2.056E-01 2.001E-01 1.940E-01 1.872E-01 1.799E-01 1.721E-01 1.639E-01 1.554E-01 1.466E-01 1.376E-01 1.285E-01 1.193E-01 1.102E-01 1.011E-01 9.224E-02 8.353E-02 7.509E-02 6.695E-02 5.916E-02 5.177E-02 4.480E-02 3.829E-02 3.226E-02 2.673E-02 2.172E-02 1.724E-02 1.329E-02 9.880E-03 6.994E-03 4.628E-03 2.770E-03 1.403E-03 5.085E-04 6.286E-05 4.068E-05 4.139E-04 1.152E-03 2.224E-03 3.596E-03 5.234E-03 7.104E-03 9.169E-03 1.139E-02 1.375E-02 1.619E-02 1.869E-02 2.122E-02 2.374E-02 2.622E-02 2.865E-02 3.099E-02 3.321E-02 3.531E-02 3.725E-02 3.903E-02 4.062E-02 4.202E-02 4.321E-02 4.420E-02 4.497E-02 4.552E-02 4.585E-02 4.597E-02 4.588E-02 4.557E-02 4.504E-02 4.430E-02 4.334E-02 4.217E-02 4.080E-02 3.923E-02 3.748E-02 3.556E-02 3.348E-02 3.127E-02 2.895E-02 2.654E-02 2.406E-02 2.154E-02 1.902E-02 1.652E-02 1.407E-02 1.170E-02 9.461E-03 7.375E-03 5.479E-03 3.809E-03 2.400E-03 1.285E-03 4.981E-04 7.095E-05 3.381E-05 4.149E-04 1.240E-03 2.532E-03 4.312E-03 6.595E-03 9.396E-03 1.272E-02 1.658E-02 2.097E-02 2.588E-02 3.131E-02 3.725E-02 4.367E-02 5.055E-02 5.786E-02 6.556E-02 7.363E-02 8.200E-02 9.065E-02 9.950E-02 1.085E-01 1.176E-01 1.267E-01 1.358E-01 1.448E-01 1.537E-01 1.622E-01 1.705E-01 1.783E-01 1.857E-01 1.926E-01 1.989E-01 2.045E-01 2.094E-01 2.135E-01 2.167E-01 2.191E-01 2.206E-01 2.211E-01 2.207E-01 2.193E-01 2.169E-01 2.135E-01 2.091E-01 2.038E-01 1.975E-01 1.904E-01 1.824E-01 1.737E-01 1.642E-01 1.542E-01 1.436E-01 1.326E-01 1.213E-01 1.098E-01 9.826E-02 8.673E-02 7.537E-02 6.433E-02 5.373E-02 4.371E-02 3.441E-02 2.597E-02 1.850E-02 1.214E-02 7.009E-03 3.209E-03 8.437E-04 9.434E-07 7.568E-04 3.173E-03 7.295E-03 1.315E-02 2.076E-02 3.010E-02 4.115E-02 5.387E-02 6.817E-02 8.397E-02 1.012E-01 1.196E-01 1.391E-01 1.595E-01 1.807E-01 2.023E-01 2.242E-01 2.461E-01 2.676E-01 2.887E-01 3.089E-01 3.280E-01 3.457E-01 3.616E-01 3.757E-01 3.875E-01 3.970E-01 4.038E-01 4.080E-01 4.094E-01 4.080E-01 4.038E-01 3.970E-01 3.875E-01 3.757E-01 3.616E-01 3.457E-01 3.280E-01 3.089E-01 2.887E-01 2.676E-01 2.461E-01 2.242E-01 2.023E-01 1.807E-01 1.595E-01 1.391E-01 1.196E-01 1.012E-01 8.397E-02 6.817E-02 5.387E-02 4.115E-02 3.010E-02 2.076E-02 1.315E-02 7.295E-03 3.173E-03 7.568E-04 9.434E-07 8.437E-04 3.209E-03 7.009E-03 1.214E-02 1.850E-02 2.597E-02 3.441E-02 4.371E-02 5.373E-02 6.433E-02 7.537E-02 8.673E-02 9.826E-02 1.098E-01 1.213E-01 1.326E-01 1.436E-01 1.542E-01 1.642E-01 1.737E-01 1.824E-01 1.904E-01 1.975E-01 2.038E-01 2.091E-01 2.135E-01 2.169E-01 2.193E-01 2.207E-01 2.211E-01 2.206E-01 2.191E-01 2.167E-01 2.135E-01 2.094E-01 2.045E-01 1.989E-01 1.926E-01 1.857E-01 1.783E-01 1.705E-01 1.622E-01 1.537E-01 1.448E-01 1.358E-01 1.267E-01 1.176E-01 1.085E-01 9.950E-02 9.065E-02 8.200E-02 7.363E-02 6.556E-02 5.786E-02 5.055E-02 4.367E-02 3.725E-02 3.131E-02 2.588E-02 2.097E-02 1.658E-02 1.272E-02 9.396E-03 6.595E-03 4.312E-03 2.532E-03 1.240E-03 4.149E-04 3.381E-05 7.095E-05 4.981E-04 1.285E-03 2.400E-03 3.809E-03 5.479E-03 7.375E-03 9.461E-03 1.170E-02 1.407E-02 1.652E-02 1.902E-02 2.154E-02 2.406E-02 2.654E-02 2.895E-02 3.127E-02 3.348E-02 3.556E-02 3.748E-02 3.923E-02 4.080E-02 4.217E-02 4.334E-02 4.430E-02 4.504E-02 4.557E-02 4.588E-02 4.597E-02 4.590E-02 4.562E-02 4.512E-02 4.440E-02 4.347E-02 4.233E-02 4.098E-02 3.944E-02 3.772E-02 3.582E-02 3.376E-02 3.157E-02 2.927E-02 2.687E-02 2.440E-02 2.189E-02 1.937E-02 1.687E-02 1.441E-02 1.204E-02 9.777E-03 7.669E-03 5.746E-03 4.042E-03 2.594E-03 1.434E-03 5.962E-04 1.123E-04 1.271E-05 3.258E-04 1.078E-03 2.291E-03 3.988E-03 6.184E-03 8.893E-03 1.212E-02 1.588E-02 2.017E-02 2.499E-02 3.032E-02 3.616E-02 4.248E-02 4.926E-02 5.648E-02 6.410E-02 7.208E-02 8.038E-02 8.896E-02 9.775E-02 1.067E-01 1.158E-01 1.249E-01 1.340E-01 1.430E-01 1.518E-01 1.604E-01 1.687E-01 1.766E-01 1.841E-01 1.911E-01 1.975E-01 2.032E-01 2.083E-01 2.125E-01 2.160E-01 2.186E-01 2.203E-01 2.211E-01 2.209E-01 2.198E-01 2.176E-01 2.145E-01 2.104E-01 2.054E-01 1.994E-01 1.926E-01 1.849E-01 1.764E-01 1.673E-01 1.575E-01 1.471E-01 1.364E-01 1.252E-01 1.139E-01 1.024E-01 9.095E-02 7.962E-02 6.854E-02 5.786E-02 4.770E-02 3.819E-02 2.947E-02 2.166E-02 1.488E-02 9.244E-03 4.863E-03 1.832E-03 2.374E-04 1.532E-04 1.640E-03 4.742E-03 9.489E-03 1.589E-02 2.395E-02 3.362E-02 4.487E-02 5.764E-02 7.182E-02 8.732E-02 1.040E-01 1.217E-01 1.403E-01 1.595E-01 1.793E-01 1.992E-01 2.192E-01 2.389E-01 2.581E-01 2.765E-01 2.939E-01 3.100E-01 3.245E-01 3.373E-01 3.481E-01 3.566E-01 3.629E-01 3.667E-01 3.680E-01 3.667E-01 3.629E-01 3.566E-01 3.481E-01 3.373E-01 3.245E-01 3.100E-01 2.939E-01 2.765E-01 2.581E-01 2.389E-01 2.192E-01 1.992E-01 1.793E-01 1.595E-01 1.403E-01 1.217E-01 1.040E-01 8.732E-02 7.182E-02 5.764E-02 4.487E-02 3.362E-02 2.395E-02 1.589E-02 9.489E-03 4.742E-03 1.640E-03 1.532E-04 2.374E-04 1.832E-03 4.863E-03 9.244E-03 1.488E-02 2.166E-02 2.947E-02 3.819E-02 4.770E-02 5.786E-02 6.854E-02 7.962E-02 9.095E-02 1.024E-01 1.139E-01 1.252E-01 1.364E-01 1.471E-01 1.575E-01 1.673E-01 1.764E-01 1.849E-01 1.926E-01 1.994E-01 2.054E-01 2.104E-01 2.145E-01 2.176E-01 2.198E-01 2.209E-01 2.211E-01 2.203E-01 2.186E-01 2.160E-01 2.125E-01 2.083E-01 2.032E-01 1.975E-01 1.911E-01 1.841E-01 1.766E-01 1.687E-01 1.604E-01 1.518E-01 1.430E-01 1.340E-01 1.249E-01 1.158E-01 1.067E-01 9.775E-02 8.896E-02 8.038E-02 7.208E-02 6.410E-02 5.648E-02 4.926E-02 4.248E-02 3.616E-02 3.032E-02 2.499E-02 2.017E-02 1.588E-02 1.212E-02 8.893E-03 6.184E-03 3.988E-03 2.291E-03 1.078E-03 3.258E-04 1.271E-05 1.123E-04 5.962E-04 1.434E-03 2.594E-03 4.042E-03 5.746E-03 7.669E-03 9.777E-03 1.204E-02 1.441E-02 1.687E-02 1.937E-02 2.189E-02 2.440E-02 2.687E-02 2.927E-02 3.157E-02 3.376E-02 3.582E-02 3.772E-02 3.944E-02 4.098E-02 4.233E-02 4.347E-02 4.440E-02 4.512E-02 4.562E-02 4.590E-02 4.596E-02 4.592E-02 4.567E-02 4.520E-02 4.451E-02 4.361E-02 4.250E-02 4.118E-02 3.967E-02 3.796E-02 3.609E-02 3.406E-02 3.189E-02 2.961E-02 2.722E-02 2.477E-02 2.226E-02 1.974E-02 1.724E-02 1.478E-02 1.239E-02 1.012E-02 7.986E-03 6.034E-03 4.296E-03 2.807E-03 1.601E-03 7.096E-04 1.664E-04 1.402E-06 2.431E-04 9.178E-04 2.049E-03 3.658E-03 5.762E-03 8.375E-03 1.151E-02 1.516E-02 1.935E-02 2.406E-02 2.928E-02 3.501E-02 4.123E-02 4.791E-02 5.503E-02 6.255E-02 7.045E-02 7.867E-02 8.717E-02 9.590E-02 1.048E-01 1.138E-01 1.229E-01 1.320E-01 1.410E-01 1.498E-01 1.585E-01 1.668E-01 1.748E-01 1.824E-01 1.895E-01 1.960E-01 2.019E-01 2.071E-01 2.115E-01 2.152E-01 2.180E-01 2.200E-01 2.210E-01 2.211E-01 2.202E-01 2.183E-01 2.155E-01 2.117E-01 2.070E-01 2.014E-01 1.948E-01 1.875E-01 1.793E-01 1.704E-01 1.609E-01 1.508E-01 1.403E-01 1.293E-01 1.182E-01 1.068E-01 9.543E-02 8.413E-02 7.305E-02 6.230E-02 5.201E-02 4.231E-02 3.333E-02 2.519E-02 1.801E-02 1.189E-02 6.941E-03 3.258E-03 9.237E-04 1.105E-05 5.789E-04 2.672E-03 6.319E-03 1.153E-02 1.831E-02 2.662E-02 3.642E-02 4.766E-02 6.024E-02 7.408E-02 8.903E-02 1.050E-01 1.217E-01 1.391E-01 1.570E-01 1.750E-01 1.931E-01 2.110E-01 2.284E-01 2.451E-01 2.609E-01 2.755E-01 2.887E-01 3.003E-01 3.100E-01 3.178E-01 3.234E-01 3.268E-01 3.280E-01 3.268E-01 3.234E-01 3.178E-01 3.100E-01 3.003E-01 2.887E-01 2.755E-01 2.609E-01 2.451E-01 2.284E-01 2.110E-01 1.931E-01 1.750E-01 1.570E-01 1.391E-01 1.217E-01 1.050E-01 8.903E-02 7.408E-02 6.024E-02 4.766E-02 3.642E-02 2.662E-02 1.831E-02 1.153E-02 6.319E-03 2.672E-03 5.789E-04 1.105E-05 9.237E-04 3.258E-03 6.941E-03 1.189E-02 1.801E-02 2.519E-02 3.333E-02 4.231E-02 5.201E-02 6.230E-02 7.305E-02 8.413E-02 9.543E-02 1.068E-01 1.182E-01 1.293E-01 1.403E-01 1.508E-01 1.609E-01 1.704E-01 1.793E-01 1.875E-01 1.948E-01 2.014E-01 2.070E-01 2.117E-01 2.155E-01 2.183E-01 2.202E-01 2.211E-01 2.210E-01 2.200E-01 2.180E-01 2.152E-01 2.115E-01 2.071E-01 2.019E-01 1.960E-01 1.895E-01 1.824E-01 1.748E-01 1.668E-01 1.585E-01 1.498E-01 1.410E-01 1.320E-01 1.229E-01 1.138E-01 1.048E-01 9.590E-02 8.717E-02 7.867E-02 7.045E-02 6.255E-02 5.503E-02 4.791E-02 4.123E-02 3.501E-02 2.928E-02 2.406E-02 1.935E-02 1.516E-02 1.151E-02 8.375E-03 5.762E-03 3.658E-03 2.049E-03 9.178E-04 2.431E-04 1.402E-06 1.664E-04 7.096E-04 1.601E-03 2.807E-03 4.296E-03 6.034E-03 7.986E-03 1.012E-02 1.239E-02 1.478E-02 1.724E-02 1.974E-02 2.226E-02 2.477E-02 2.722E-02 2.961E-02 3.189E-02 3.406E-02 3.609E-02 3.796E-02 3.967E-02 4.118E-02 4.250E-02 4.361E-02 4.451E-02 4.520E-02 4.567E-02 4.592E-02 4.595E-02 4.594E-02 4.572E-02 4.528E-02 4.462E-02 4.375E-02 4.267E-02 4.138E-02 3.990E-02 3.823E-02 3.638E-02 3.437E-02 3.223E-02 2.996E-02 2.759E-02 2.515E-02 2.266E-02 2.014E-02 1.763E-02 1.517E-02 1.277E-02 1.048E-02 8.326E-03 6.345E-03 4.572E-03 3.041E-03 1.786E-03 8.399E-04 2.350E-04 1.762E-06 1.690E-04 7.631E-04 1.808E-03 3.325E-03 5.332E-03 7.844E-03 1.087E-02 1.442E-02 1.849E-02 2.309E-02 2.820E-02 3.382E-02 3.993E-02 4.650E-02 5.351E-02 6.094E-02 6.874E-02 7.687E-02 8.529E-02 9.395E-02 1.028E-01 1.118E-01 1.208E-01 1.299E-01 1.389E-01 1.477E-01 1.564E-01 1.648E-01 1.728E-01 1.805E-01 1.877E-01 1.943E-01 2.004E-01 2.057E-01 2.104E-01 2.143E-01 2.173E-01 2.195E-01 2.208E-01 2.211E-01 2.206E-01 2.190E-01 2.165E-01 2.130E-01 2.086E-01 2.033E-01 1.971E-01 1.901E-01 1.822E-01 1.737E-01 1.644E-01 1.546E-01 1.443E-01 1.336E-01 1.226E-01 1.114E-01 1.001E-01 8.891E-02 7.784E-02 6.704E-02 5.665E-02 4.679E-02 3.757E-02 2.912E-02 2.155E-02 1.497E-02 9.473E-03 5.157E-03 2.103E-03 3.816E-04 5.039E-05 1.154E-03 3.721E-03 7.765E-03 1.328E-02 2.025E-02 2.863E-02 3.837E-02 4.938E-02 6.158E-02 7.484E-02 8.903E-02 1.040E-01 1.196E-01 1.356E-01 1.519E-01 1.682E-01 1.843E-01 2.000E-01 2.151E-01 2.293E-01 2.424E-01 2.543E-01 2.647E-01 2.735E-01 2.805E-01 2.856E-01 2.887E-01 2.897E-01 2.887E-01 2.856E-01 2.805E-01 2.735E-01 2.647E-01 2.543E-01 2.424E-01 2.293E-01 2.151E-01 2.000E-01 1.843E-01 1.682E-01 1.519E-01 1.356E-01 1.196E-01 1.040E-01 8.903E-02 7.484E-02 6.158E-02 4.938E-02 3.837E-02 2.863E-02 2.025E-02 1.328E-02 7.765E-03 3.721E-03 1.154E-03 5.039E-05 3.816E-04 2.103E-03 5.157E-03 9.473E-03 1.497E-02 2.155E-02 2.912E-02 3.757E-02 4.679E-02 5.665E-02 6.704E-02 7.784E-02 8.891E-02 1.001E-01 1.114E-01 1.226E-01 1.336E-01 1.443E-01 1.546E-01 1.644E-01 1.737E-01 1.822E-01 1.901E-01 1.971E-01 2.033E-01 2.086E-01 2.130E-01 2.165E-01 2.190E-01 2.206E-01 2.211E-01 2.208E-01 2.195E-01 2.173E-01 2.143E-01 2.104E-01 2.057E-01 2.004E-01 1.943E-01 1.877E-01 1.805E-01 1.728E-01 1.648E-01 1.564E-01 1.477E-01 1.389E-01 1.299E-01 1.208E-01 1.118E-01 1.028E-01 9.395E-02 8.529E-02 7.687E-02 6.874E-02 6.094E-02 5.351E-02 4.650E-02 3.993E-02 3.382E-02 2.820E-02 2.309E-02 1.849E-02 1.442E-02 1.087E-02 7.844E-03 5.332E-03 3.325E-03 1.808E-03 7.631E-04 1.690E-04 1.762E-06 2.350E-04 8.399E-04 1.786E-03 3.041E-03 4.572E-03 6.345E-03 8.326E-03 1.048E-02 1.277E-02 1.517E-02 1.763E-02 2.014E-02 2.266E-02 2.515E-02 2.759E-02 2.996E-02 3.223E-02 3.437E-02 3.638E-02 3.823E-02 3.990E-02 4.138E-02 4.267E-02 4.375E-02 4.462E-02 4.528E-02 4.572E-02 4.594E-02 4.593E-02 4.595E-02 4.576E-02 4.536E-02 4.473E-02 4.390E-02 4.285E-02 4.159E-02 4.014E-02 3.850E-02 3.668E-02 3.470E-02 3.258E-02 3.033E-02 2.798E-02 2.555E-02 2.307E-02 2.056E-02 1.805E-02 1.558E-02 1.317E-02 1.087E-02 8.690E-03 6.680E-03 4.871E-03 3.296E-03 1.991E-03 9.884E-04 3.197E-04 1.574E-05 1.055E-04 6.158E-04 1.571E-03 2.992E-03 4.898E-03 7.304E-03 1.022E-02 1.366E-02 1.762E-02 2.209E-02 2.709E-02 3.259E-02 3.857E-02 4.503E-02 5.193E-02 5.925E-02 6.695E-02 7.499E-02 8.332E-02 9.191E-02 1.007E-01 1.096E-01 1.186E-01 1.276E-01 1.366E-01 1.455E-01 1.542E-01 1.626E-01 1.708E-01 1.785E-01 1.858E-01 1.926E-01 1.987E-01 2.043E-01 2.091E-01 2.132E-01 2.165E-01 2.189E-01 2.205E-01 2.211E-01 2.208E-01 2.196E-01 2.174E-01 2.143E-01 2.103E-01 2.053E-01 1.994E-01 1.927E-01 1.852E-01 1.770E-01 1.680E-01 1.585E-01 1.485E-01 1.380E-01 1.272E-01 1.162E-01 1.051E-01 9.394E-02 8.290E-02 7.209E-02 6.162E-02 5.161E-02 4.219E-02 3.345E-02 2.552E-02 1.850E-02 1.248E-02 7.561E-03 3.813E-03 1.310E-03 1.066E-04 2.485E-04 1.765E-03 4.670E-03 8.962E-03 1.462E-02 2.162E-02 2.989E-02 3.937E-02 4.997E-02 6.158E-02 7.408E-02 8.732E-02 1.012E-01 1.154E-01 1.299E-01 1.445E-01 1.589E-01 1.730E-01 1.865E-01 1.992E-01 2.110E-01 2.217E-01 2.310E-01 2.389E-01 2.451E-01 2.497E-01 2.525E-01 2.534E-01 2.525E-01 2.497E-01 2.451E-01 2.389E-01 2.310E-01 2.217E-01 2.110E-01 1.992E-01 1.865E-01 1.730E-01 1.589E-01 1.445E-01 1.299E-01 1.154E-01 1.012E-01 8.732E-02 7.408E-02 6.158E-02 4.997E-02 3.937E-02 2.989E-02 2.162E-02 1.462E-02 8.962E-03 4.670E-03 1.765E-03 2.485E-04 1.066E-04 1.310E-03 3.813E-03 7.561E-03 1.248E-02 1.850E-02 2.552E-02 3.345E-02 4.219E-02 5.161E-02 6.162E-02 7.209E-02 8.290E-02 9.394E-02 1.051E-01 1.162E-01 1.272E-01 1.380E-01 1.485E-01 1.585E-01 1.680E-01 1.770E-01 1.852E-01 1.927E-01 1.994E-01 2.053E-01 2.103E-01 2.143E-01 2.174E-01 2.196E-01 2.208E-01 2.211E-01 2.205E-01 2.189E-01 2.165E-01 2.132E-01 2.091E-01 2.043E-01 1.987E-01 1.926E-01 1.858E-01 1.785E-01 1.708E-01 1.626E-01 1.542E-01 1.455E-01 1.366E-01 1.276E-01 1.186E-01 1.096E-01 1.007E-01 9.191E-02 8.332E-02 7.499E-02 6.695E-02 5.925E-02 5.193E-02 4.503E-02 3.857E-02 3.259E-02 2.709E-02 2.209E-02 1.762E-02 1.366E-02 1.022E-02 7.304E-03 4.898E-03 2.992E-03 1.571E-03 6.158E-04 1.055E-04 1.574E-05 3.197E-04 9.884E-04 1.991E-03 3.296E-03 4.871E-03 6.680E-03 8.690E-03 1.087E-02 1.317E-02 1.558E-02 1.805E-02 2.056E-02 2.307E-02 2.555E-02 2.798E-02 3.033E-02 3.258E-02 3.470E-02 3.668E-02 3.850E-02 4.014E-02 4.159E-02 4.285E-02 4.390E-02 4.473E-02 4.536E-02 4.576E-02 4.595E-02 4.591E-02 4.597E-02 4.581E-02 4.543E-02 4.485E-02 4.404E-02 4.303E-02 4.181E-02 4.039E-02 3.878E-02 3.699E-02 3.504E-02 3.295E-02 3.072E-02 2.839E-02 2.598E-02 2.350E-02 2.100E-02 1.850E-02 1.602E-02 1.360E-02 1.128E-02 9.078E-03 7.039E-03 5.193E-03 3.575E-03 2.218E-03 1.157E-03 4.223E-04 4.531E-05 5.502E-05 4.784E-04 1.340E-03 2.662E-03 4.463E-03 6.759E-03 9.561E-03 1.288E-02 1.671E-02 2.107E-02 2.594E-02 3.131E-02 3.718E-02 4.351E-02 5.030E-02 5.750E-02 6.509E-02 7.303E-02 8.127E-02 8.977E-02 9.848E-02 1.073E-01 1.163E-01 1.253E-01 1.343E-01 1.431E-01 1.519E-01 1.603E-01 1.685E-01 1.764E-01 1.838E-01 1.906E-01 1.970E-01 2.027E-01 2.077E-01 2.120E-01 2.155E-01 2.182E-01 2.201E-01 2.210E-01 2.210E-01 2.201E-01 2.183E-01 2.155E-01 2.118E-01 2.072E-01 2.017E-01 1.954E-01 1.882E-01 1.803E-01 1.717E-01 1.625E-01 1.528E-01 1.426E-01 1.320E-01 1.212E-01 1.102E-01 9.920E-02 8.823E-02 7.743E-02 6.691E-02 5.679E-02 4.718E-02 3.819E-02 2.993E-02 2.250E-02 1.599E-02 1.049E-02 6.085E-03 2.832E-03 7.923E-04 8.147E-06 5.102E-04 2.314E-03 5.421E-03 9.814E-03 1.546E-02 2.232E-02 3.031E-02 3.937E-02 4.938E-02 6.024E-02 7.182E-02 8.397E-02 9.654E-02 1.094E-01 1.223E-01 1.350E-01 1.475E-01 1.595E-01 1.709E-01 1.814E-01 1.909E-01 1.992E-01 2.062E-01 2.118E-01 2.159E-01 2.183E-01 2.192E-01 2.183E-01 2.159E-01 2.118E-01 2.062E-01 1.992E-01 1.909E-01 1.814E-01 1.709E-01 1.595E-01 1.475E-01 1.350E-01 1.223E-01 1.094E-01 9.654E-02 8.397E-02 7.182E-02 6.024E-02 4.938E-02 3.937E-02 3.031E-02 2.232E-02 1.546E-02 9.814E-03 5.421E-03 2.314E-03 5.102E-04 8.147E-06 7.923E-04 2.832E-03 6.085E-03 1.049E-02 1.599E-02 2.250E-02 2.993E-02 3.819E-02 4.718E-02 5.679E-02 6.691E-02 7.743E-02 8.823E-02 9.920E-02 1.102E-01 1.212E-01 1.320E-01 1.426E-01 1.528E-01 1.625E-01 1.717E-01 1.803E-01 1.882E-01 1.954E-01 2.017E-01 2.072E-01 2.118E-01 2.155E-01 2.183E-01 2.201E-01 2.210E-01 2.210E-01 2.201E-01 2.182E-01 2.155E-01 2.120E-01 2.077E-01 2.027E-01 1.970E-01 1.906E-01 1.838E-01 1.764E-01 1.685E-01 1.603E-01 1.519E-01 1.431E-01 1.343E-01 1.253E-01 1.163E-01 1.073E-01 9.848E-02 8.977E-02 8.127E-02 7.303E-02 6.509E-02 5.750E-02 5.030E-02 4.351E-02 3.718E-02 3.131E-02 2.594E-02 2.107E-02 1.671E-02 1.288E-02 9.561E-03 6.759E-03 4.463E-03 2.662E-03 1.340E-03 4.784E-04 5.502E-05 4.531E-05 4.223E-04 1.157E-03 2.218E-03 3.575E-03 5.193E-03 7.039E-03 9.078E-03 1.128E-02 1.360E-02 1.602E-02 1.850E-02 2.100E-02 2.350E-02 2.598E-02 2.839E-02 3.072E-02 3.295E-02 3.504E-02 3.699E-02 3.878E-02 4.039E-02 4.181E-02 4.303E-02 4.404E-02 4.485E-02 4.543E-02 4.581E-02 4.597E-02 4.589E-02 4.597E-02 4.585E-02 4.551E-02 4.496E-02 4.419E-02 4.321E-02 4.203E-02 4.064E-02 3.907E-02 3.731E-02 3.539E-02 3.333E-02 3.113E-02 2.882E-02 2.642E-02 2.396E-02 2.146E-02 1.896E-02 1.648E-02 1.405E-02 1.171E-02 9.492E-03 7.422E-03 5.539E-03 3.877E-03 2.468E-03 1.347E-03 5.445E-04 9.249E-05 1.967E-05 3.533E-04 1.118E-03 2.337E-03 4.029E-03 6.210E-03 8.893E-03 1.209E-02 1.580E-02 2.002E-02 2.476E-02 3.000E-02 3.574E-02 4.194E-02 4.860E-02 5.569E-02 6.316E-02 7.099E-02 7.913E-02 8.755E-02 9.618E-02 1.050E-01 1.139E-01 1.228E-01 1.318E-01 1.407E-01 1.494E-01 1.579E-01 1.662E-01 1.741E-01 1.816E-01 1.886E-01 1.951E-01 2.010E-01 2.062E-01 2.107E-01 2.145E-01 2.174E-01 2.195E-01 2.208E-01 2.211E-01 2.206E-01 2.191E-01 2.167E-01 2.133E-01 2.091E-01 2.040E-01 1.980E-01 1.912E-01 1.837E-01 1.755E-01 1.666E-01 1.572E-01 1.473E-01 1.370E-01 1.264E-01 1.156E-01 1.047E-01 9.380E-02 8.304E-02 7.250E-02 6.230E-02 5.254E-02 4.333E-02 3.477E-02 2.697E-02 2.001E-02 1.397E-02 8.941E-03 4.980E-03 2.143E-03 4.758E-04 7.911E-06 7.568E-04 2.725E-03 5.901E-03 1.026E-02 1.575E-02 2.232E-02 2.989E-02 3.837E-02 4.766E-02 5.764E-02 6.817E-02 7.912E-02 9.032E-02 1.016E-01 1.129E-01 1.239E-01 1.345E-01 1.445E-01 1.538E-01 1.622E-01 1.695E-01 1.757E-01 1.807E-01 1.843E-01 1.865E-01 1.872E-01 1.865E-01 1.843E-01 1.807E-01 1.757E-01 1.695E-01 1.622E-01 1.538E-01 1.445E-01 1.345E-01 1.239E-01 1.129E-01 1.016E-01 9.032E-02 7.912E-02 6.817E-02 5.764E-02 4.766E-02 3.837E-02 2.989E-02 2.232E-02 1.575E-02 1.026E-02 5.901E-03 2.725E-03 7.568E-04 7.911E-06 4.758E-04 2.143E-03 4.980E-03 8.941E-03 1.397E-02 2.001E-02 2.697E-02 3.477E-02 4.333E-02 5.254E-02 6.230E-02 7.250E-02 8.304E-02 9.380E-02 1.047E-01 1.156E-01 1.264E-01 1.370E-01 1.473E-01 1.572E-01 1.666E-01 1.755E-01 1.837E-01 1.912E-01 1.980E-01 2.040E-01 2.091E-01 2.133E-01 2.167E-01 2.191E-01 2.206E-01 2.211E-01 2.208E-01 2.195E-01 2.174E-01 2.145E-01 2.107E-01 2.062E-01 2.010E-01 1.951E-01 1.886E-01 1.816E-01 1.741E-01 1.662E-01 1.579E-01 1.494E-01 1.407E-01 1.318E-01 1.228E-01 1.139E-01 1.050E-01 9.618E-02 8.755E-02 7.913E-02 7.099E-02 6.316E-02 5.569E-02 4.860E-02 4.194E-02 3.574E-02 3.000E-02 2.476E-02 2.002E-02 1.580E-02 1.209E-02 8.893E-03 6.210E-03 4.029E-03 2.337E-03 1.118E-03 3.533E-04 1.967E-05 9.249E-05 5.445E-04 1.347E-03 2.468E-03 3.877E-03 5.539E-03 7.422E-03 9.492E-03 1.171E-02 1.405E-02 1.648E-02 1.896E-02 2.146E-02 2.396E-02 2.642E-02 2.882E-02 3.113E-02 3.333E-02 3.539E-02 3.731E-02 3.907E-02 4.064E-02 4.203E-02 4.321E-02 4.419E-02 4.496E-02 4.551E-02 4.585E-02 4.597E-02 4.585E-02 4.597E-02 4.588E-02 4.558E-02 4.507E-02 4.434E-02 4.340E-02 4.225E-02 4.091E-02 3.937E-02 3.765E-02 3.576E-02 3.372E-02 3.155E-02 2.926E-02 2.688E-02 2.443E-02 2.195E-02 1.945E-02 1.697E-02 1.453E-02 1.218E-02 9.931E-03 7.832E-03 5.911E-03 4.203E-03 2.742E-03 1.559E-03 6.883E-04 1.593E-04 1.764E-06 2.431E-04 9.085E-04 2.021E-03 3.600E-03 5.662E-03 8.221E-03 1.129E-02 1.486E-02 1.896E-02 2.356E-02 2.866E-02 3.426E-02 4.033E-02 4.686E-02 5.382E-02 6.117E-02 6.888E-02 7.692E-02 8.524E-02 9.379E-02 1.025E-01 1.114E-01 1.203E-01 1.292E-01 1.381E-01 1.468E-01 1.554E-01 1.637E-01 1.717E-01 1.793E-01 1.864E-01 1.930E-01 1.991E-01 2.045E-01 2.093E-01 2.133E-01 2.165E-01 2.189E-01 2.204E-01 2.211E-01 2.209E-01 2.198E-01 2.177E-01 2.148E-01 2.109E-01 2.062E-01 2.006E-01 1.942E-01 1.871E-01 1.792E-01 1.707E-01 1.616E-01 1.520E-01 1.420E-01 1.317E-01 1.211E-01 1.104E-01 9.961E-02 8.891E-02 7.838E-02 6.813E-02 5.826E-02 4.886E-02 4.005E-02 3.191E-02 2.454E-02 1.801E-02 1.240E-02 7.773E-03 4.187E-03 1.685E-03 2.974E-04 4.383E-05 9.292E-04 2.944E-03 6.066E-03 1.026E-02 1.546E-02 2.162E-02 2.863E-02 3.642E-02 4.487E-02 5.387E-02 6.327E-02 7.294E-02 8.274E-02 9.251E-02 1.021E-01 1.114E-01 1.201E-01 1.283E-01 1.356E-01 1.421E-01 1.475E-01 1.519E-01 1.550E-01 1.570E-01 1.576E-01 1.570E-01 1.550E-01 1.519E-01 1.475E-01 1.421E-01 1.356E-01 1.283E-01 1.201E-01 1.114E-01 1.021E-01 9.251E-02 8.274E-02 7.294E-02 6.327E-02 5.387E-02 4.487E-02 3.642E-02 2.863E-02 2.162E-02 1.546E-02 1.026E-02 6.066E-03 2.944E-03 9.292E-04 4.383E-05 2.974E-04 1.685E-03 4.187E-03 7.773E-03 1.240E-02 1.801E-02 2.454E-02 3.191E-02 4.005E-02 4.886E-02 5.826E-02 6.813E-02 7.838E-02 8.891E-02 9.961E-02 1.104E-01 1.211E-01 1.317E-01 1.420E-01 1.520E-01 1.616E-01 1.707E-01 1.792E-01 1.871E-01 1.942E-01 2.006E-01 2.062E-01 2.109E-01 2.148E-01 2.177E-01 2.198E-01 2.209E-01 2.211E-01 2.204E-01 2.189E-01 2.165E-01 2.133E-01 2.093E-01 2.045E-01 1.991E-01 1.930E-01 1.864E-01 1.793E-01 1.717E-01 1.637E-01 1.554E-01 1.468E-01 1.381E-01 1.292E-01 1.203E-01 1.114E-01 1.025E-01 9.379E-02 8.524E-02 7.692E-02 6.888E-02 6.117E-02 5.382E-02 4.686E-02 4.033E-02 3.426E-02 2.866E-02 2.356E-02 1.896E-02 1.486E-02 1.129E-02 8.221E-03 5.662E-03 3.600E-03 2.021E-03 9.085E-04 2.431E-04 1.764E-06 1.593E-04 6.883E-04 1.559E-03 2.742E-03 4.203E-03 5.911E-03 7.832E-03 9.931E-03 1.218E-02 1.453E-02 1.697E-02 1.945E-02 2.195E-02 2.443E-02 2.688E-02 2.926E-02 3.155E-02 3.372E-02 3.576E-02 3.765E-02 3.937E-02 4.091E-02 4.225E-02 4.340E-02 4.434E-02 4.507E-02 4.558E-02 4.588E-02 4.597E-02 4.581E-02 4.597E-02 4.591E-02 4.565E-02 4.518E-02 4.449E-02 4.359E-02 4.248E-02 4.117E-02 3.967E-02 3.799E-02 3.613E-02 3.413E-02 3.198E-02 2.972E-02 2.736E-02 2.493E-02 2.245E-02 1.996E-02 1.748E-02 1.503E-02 1.266E-02 1.040E-02 8.267E-03 6.309E-03 4.556E-03 3.041E-03 1.797E-03 8.554E-04 2.478E-04 3.609E-06 1.503E-04 7.135E-04 1.716E-03 3.179E-03 5.119E-03 7.550E-03 1.048E-02 1.392E-02 1.787E-02 2.233E-02 2.730E-02 3.275E-02 3.868E-02 4.507E-02 5.189E-02 5.912E-02 6.671E-02 7.463E-02 8.285E-02 9.130E-02 9.995E-02 1.087E-01 1.176E-01 1.265E-01 1.354E-01 1.441E-01 1.527E-01 1.611E-01 1.691E-01 1.768E-01 1.841E-01 1.908E-01 1.971E-01 2.027E-01 2.077E-01 2.119E-01 2.154E-01 2.181E-01 2.200E-01 2.210E-01 2.211E-01 2.203E-01 2.187E-01 2.161E-01 2.126E-01 2.083E-01 2.032E-01 1.972E-01 1.904E-01 1.830E-01 1.748E-01 1.661E-01 1.568E-01 1.471E-01 1.371E-01 1.267E-01 1.162E-01 1.056E-01 9.502E-02 8.454E-02 7.428E-02 6.433E-02 5.479E-02 4.576E-02 3.733E-02 2.958E-02 2.260E-02 1.646E-02 1.122E-02 6.941E-03 3.658E-03 1.408E-03 2.099E-04 7.283E-05 9.907E-04 2.944E-03 5.901E-03 9.814E-03 1.462E-02 2.025E-02 2.662E-02 3.362E-02 4.115E-02 4.909E-02 5.732E-02 6.569E-02 7.408E-02 8.233E-02 9.032E-02 9.791E-02 1.050E-01 1.114E-01 1.170E-01 1.217E-01 1.255E-01 1.283E-01 1.299E-01 1.305E-01 1.299E-01 1.283E-01 1.255E-01 1.217E-01 1.170E-01 1.114E-01 1.050E-01 9.791E-02 9.032E-02 8.233E-02 7.408E-02 6.569E-02 5.732E-02 4.909E-02 4.115E-02 3.362E-02 2.662E-02 2.025E-02 1.462E-02 9.814E-03 5.901E-03 2.944E-03 9.907E-04 7.283E-05 2.099E-04 1.408E-03 3.658E-03 6.941E-03 1.122E-02 1.646E-02 2.260E-02 2.958E-02 3.733E-02 4.576E-02 5.479E-02 6.433E-02 7.428E-02 8.454E-02 9.502E-02 1.056E-01 1.162E-01 1.267E-01 1.371E-01 1.471E-01 1.568E-01 1.661E-01 1.748E-01 1.830E-01 1.904E-01 1.972E-01 2.032E-01 2.083E-01 2.126E-01 2.161E-01 2.187E-01 2.203E-01 2.211E-01 2.210E-01 2.200E-01 2.181E-01 2.154E-01 2.119E-01 2.077E-01 2.027E-01 1.971E-01 1.908E-01 1.841E-01 1.768E-01 1.691E-01 1.611E-01 1.527E-01 1.441E-01 1.354E-01 1.265E-01 1.176E-01 1.087E-01 9.995E-02 9.130E-02 8.285E-02 7.463E-02 6.671E-02 5.912E-02 5.189E-02 4.507E-02 3.868E-02 3.275E-02 2.730E-02 2.233E-02 1.787E-02 1.392E-02 1.048E-02 7.550E-03 5.119E-03 3.179E-03 1.716E-03 7.135E-04 1.503E-04 3.609E-06 2.478E-04 8.554E-04 1.797E-03 3.041E-03 4.556E-03 6.309E-03 8.267E-03 1.040E-02 1.266E-02 1.503E-02 1.748E-02 1.996E-02 2.245E-02 2.493E-02 2.736E-02 2.972E-02 3.198E-02 3.413E-02 3.613E-02 3.799E-02 3.967E-02 4.117E-02 4.248E-02 4.359E-02 4.449E-02 4.518E-02 4.565E-02 4.591E-02 4.597E-02 4.576E-02 4.595E-02 4.594E-02 4.572E-02 4.528E-02 4.464E-02 4.378E-02 4.271E-02 4.145E-02 3.998E-02 3.834E-02 3.652E-02 3.454E-02 3.243E-02 3.019E-02 2.786E-02 2.544E-02 2.298E-02 2.049E-02 1.801E-02 1.556E-02 1.317E-02 1.089E-02 8.729E-03 6.735E-03 4.936E-03 3.367E-03 2.060E-03 1.047E-03 3.601E-04 2.751E-05 7.755E-05 5.360E-04 1.426E-03 2.770E-03 4.583E-03 6.882E-03 9.678E-03 1.298E-02 1.678E-02 2.110E-02 2.591E-02 3.122E-02 3.700E-02 4.324E-02 4.992E-02 5.701E-02 6.447E-02 7.228E-02 8.038E-02 8.874E-02 9.730E-02 1.060E-01 1.148E-01 1.237E-01 1.325E-01 1.413E-01 1.499E-01 1.583E-01 1.664E-01 1.742E-01 1.816E-01 1.885E-01 1.949E-01 2.007E-01 2.059E-01 2.104E-01 2.141E-01 2.171E-01 2.193E-01 2.207E-01 2.211E-01 2.208E-01 2.195E-01 2.173E-01 2.143E-01 2.104E-01 2.056E-01 2.001E-01 1.937E-01 1.867E-01 1.790E-01 1.706E-01 1.617E-01 1.523E-01 1.426E-01 1.325E-01 1.222E-01 1.118E-01 1.013E-01 9.095E-02 8.071E-02 7.072E-02 6.108E-02 5.188E-02 4.320E-02 3.513E-02 2.776E-02 2.114E-02 1.534E-02 1.041E-02 6.409E-03 3.356E-03 1.278E-03 1.840E-04 7.283E-05 9.292E-04 2.725E-03 5.421E-03 8.962E-03 1.328E-02 1.831E-02 2.395E-02 3.010E-02 3.666E-02 4.352E-02 5.055E-02 5.764E-02 6.465E-02 7.145E-02 7.793E-02 8.397E-02 8.946E-02 9.429E-02 9.837E-02 1.016E-01 1.040E-01 1.054E-01 1.059E-01 1.054E-01 1.040E-01 1.016E-01 9.837E-02 9.429E-02 8.946E-02 8.397E-02 7.793E-02 7.145E-02 6.465E-02 5.764E-02 5.055E-02 4.352E-02 3.666E-02 3.010E-02 2.395E-02 1.831E-02 1.328E-02 8.962E-03 5.421E-03 2.725E-03 9.292E-04 7.283E-05 1.840E-04 1.278E-03 3.356E-03 6.409E-03 1.041E-02 1.534E-02 2.114E-02 2.776E-02 3.513E-02 4.320E-02 5.188E-02 6.108E-02 7.072E-02 8.071E-02 9.095E-02 1.013E-01 1.118E-01 1.222E-01 1.325E-01 1.426E-01 1.523E-01 1.617E-01 1.706E-01 1.790E-01 1.867E-01 1.937E-01 2.001E-01 2.056E-01 2.104E-01 2.143E-01 2.173E-01 2.195E-01 2.208E-01 2.211E-01 2.207E-01 2.193E-01 2.171E-01 2.141E-01 2.104E-01 2.059E-01 2.007E-01 1.949E-01 1.885E-01 1.816E-01 1.742E-01 1.664E-01 1.583E-01 1.499E-01 1.413E-01 1.325E-01 1.237E-01 1.148E-01 1.060E-01 9.730E-02 8.874E-02 8.038E-02 7.228E-02 6.447E-02 5.701E-02 4.992E-02 4.324E-02 3.700E-02 3.122E-02 2.591E-02 2.110E-02 1.678E-02 1.298E-02 9.678E-03 6.882E-03 4.583E-03 2.770E-03 1.426E-03 5.360E-04 7.755E-05 2.751E-05 3.601E-04 1.047E-03 2.060E-03 3.367E-03 4.936E-03 6.735E-03 8.729E-03 1.089E-02 1.317E-02 1.556E-02 1.801E-02 2.049E-02 2.298E-02 2.544E-02 2.786E-02 3.019E-02 3.243E-02 3.454E-02 3.652E-02 3.834E-02 3.998E-02 4.145E-02 4.271E-02 4.378E-02 4.464E-02 4.528E-02 4.572E-02 4.594E-02 4.595E-02 4.570E-02 4.593E-02 4.596E-02 4.578E-02 4.539E-02 4.478E-02 4.397E-02 4.295E-02 4.172E-02 4.030E-02 3.869E-02 3.691E-02 3.497E-02 3.289E-02 3.068E-02 2.837E-02 2.598E-02 2.353E-02 2.105E-02 1.856E-02 1.611E-02 1.371E-02 1.140E-02 9.219E-03 7.188E-03 5.344E-03 3.721E-03 2.351E-03 1.266E-03 4.981E-04 7.576E-05 2.738E-05 3.791E-04 1.155E-03 2.375E-03 4.060E-03 6.223E-03 8.877E-03 1.203E-02 1.569E-02 1.985E-02 2.451E-02 2.966E-02 3.529E-02 4.138E-02 4.791E-02 5.486E-02 6.218E-02 6.986E-02 7.784E-02 8.609E-02 9.456E-02 1.032E-01 1.120E-01 1.208E-01 1.296E-01 1.383E-01 1.469E-01 1.554E-01 1.636E-01 1.714E-01 1.789E-01 1.860E-01 1.926E-01 1.986E-01 2.040E-01 2.087E-01 2.127E-01 2.160E-01 2.185E-01 2.202E-01 2.210E-01 2.210E-01 2.202E-01 2.184E-01 2.158E-01 2.123E-01 2.080E-01 2.029E-01 1.970E-01 1.904E-01 1.830E-01 1.751E-01 1.666E-01 1.576E-01 1.482E-01 1.384E-01 1.284E-01 1.182E-01 1.079E-01 9.759E-02 8.741E-02 7.743E-02 6.772E-02 5.839E-02 4.952E-02 4.118E-02 3.345E-02 2.641E-02 2.011E-02 1.460E-02 9.939E-03 6.149E-03 3.258E-03 1.278E-03 2.099E-04 4.383E-05 7.568E-04 2.314E-03 4.670E-03 7.765E-03 1.153E-02 1.589E-02 2.076E-02 2.603E-02 3.161E-02 3.739E-02 4.325E-02 4.909E-02 5.479E-02 6.024E-02 6.534E-02 6.998E-02 7.408E-02 7.754E-02 8.031E-02 8.233E-02 8.356E-02 8.397E-02 8.356E-02 8.233E-02 8.031E-02 7.754E-02 7.408E-02 6.998E-02 6.534E-02 6.024E-02 5.479E-02 4.909E-02 4.325E-02 3.739E-02 3.161E-02 2.603E-02 2.076E-02 1.589E-02 1.153E-02 7.765E-03 4.670E-03 2.314E-03 7.568E-04 4.383E-05 2.099E-04 1.278E-03 3.258E-03 6.149E-03 9.939E-03 1.460E-02 2.011E-02 2.641E-02 3.345E-02 4.118E-02 4.952E-02 5.839E-02 6.772E-02 7.743E-02 8.741E-02 9.759E-02 1.079E-01 1.182E-01 1.284E-01 1.384E-01 1.482E-01 1.576E-01 1.666E-01 1.751E-01 1.830E-01 1.904E-01 1.970E-01 2.029E-01 2.080E-01 2.123E-01 2.158E-01 2.184E-01 2.202E-01 2.210E-01 2.210E-01 2.202E-01 2.185E-01 2.160E-01 2.127E-01 2.087E-01 2.040E-01 1.986E-01 1.926E-01 1.860E-01 1.789E-01 1.714E-01 1.636E-01 1.554E-01 1.469E-01 1.383E-01 1.296E-01 1.208E-01 1.120E-01 1.032E-01 9.456E-02 8.609E-02 7.784E-02 6.986E-02 6.218E-02 5.486E-02 4.791E-02 4.138E-02 3.529E-02 2.966E-02 2.451E-02 1.985E-02 1.569E-02 1.203E-02 8.877E-03 6.223E-03 4.060E-03 2.375E-03 1.155E-03 3.791E-04 2.738E-05 7.576E-05 4.981E-04 1.266E-03 2.351E-03 3.721E-03 5.344E-03 7.188E-03 9.219E-03 1.140E-02 1.371E-02 1.611E-02 1.856E-02 2.105E-02 2.353E-02 2.598E-02 2.837E-02 3.068E-02 3.289E-02 3.497E-02 3.691E-02 3.869E-02 4.030E-02 4.172E-02 4.295E-02 4.397E-02 4.478E-02 4.539E-02 4.578E-02 4.596E-02 4.593E-02 4.563E-02 4.590E-02 4.597E-02 4.583E-02 4.548E-02 4.492E-02 4.416E-02 4.318E-02 4.200E-02 4.062E-02 3.905E-02 3.731E-02 3.541E-02 3.336E-02 3.118E-02 2.890E-02 2.653E-02 2.409E-02 2.162E-02 1.914E-02 1.668E-02 1.428E-02 1.195E-02 9.736E-03 7.669E-03 5.780E-03 4.103E-03 2.671E-03 1.514E-03 6.639E-04 1.507E-04 2.384E-06 2.454E-04 9.039E-04 2.000E-03 3.552E-03 5.576E-03 8.084E-03 1.109E-02 1.459E-02 1.859E-02 2.309E-02 2.808E-02 3.355E-02 3.949E-02 4.586E-02 5.266E-02 5.984E-02 6.738E-02 7.524E-02 8.338E-02 9.174E-02 1.003E-01 1.090E-01 1.177E-01 1.265E-01 1.352E-01 1.439E-01 1.523E-01 1.606E-01 1.685E-01 1.761E-01 1.833E-01 1.901E-01 1.962E-01 2.019E-01 2.068E-01 2.111E-01 2.147E-01 2.175E-01 2.196E-01 2.208E-01 2.211E-01 2.207E-01 2.193E-01 2.171E-01 2.141E-01 2.103E-01 2.056E-01 2.001E-01 1.940E-01 1.871E-01 1.796E-01 1.714E-01 1.628E-01 1.538E-01 1.443E-01 1.346E-01 1.246E-01 1.145E-01 1.044E-01 9.435E-02 8.441E-02 7.469E-02 6.528E-02 5.625E-02 4.770E-02 3.968E-02 3.227E-02 2.552E-02 1.950E-02 1.424E-02 9.783E-03 6.149E-03 3.356E-03 1.408E-03 2.974E-04 7.911E-06 5.102E-04 1.765E-03 3.721E-03 6.319E-03 9.489E-03 1.315E-02 1.723E-02 2.162E-02 2.623E-02 3.096E-02 3.571E-02 4.038E-02 4.487E-02 4.909E-02 5.295E-02 5.636E-02 5.926E-02 6.158E-02 6.327E-02 6.430E-02 6.465E-02 6.430E-02 6.327E-02 6.158E-02 5.926E-02 5.636E-02 5.295E-02 4.909E-02 4.487E-02 4.038E-02 3.571E-02 3.096E-02 2.623E-02 2.162E-02 1.723E-02 1.315E-02 9.489E-03 6.319E-03 3.721E-03 1.765E-03 5.102E-04 7.911E-06 2.974E-04 1.408E-03 3.356E-03 6.149E-03 9.783E-03 1.424E-02 1.950E-02 2.552E-02 3.227E-02 3.968E-02 4.770E-02 5.625E-02 6.528E-02 7.469E-02 8.441E-02 9.435E-02 1.044E-01 1.145E-01 1.246E-01 1.346E-01 1.443E-01 1.538E-01 1.628E-01 1.714E-01 1.796E-01 1.871E-01 1.940E-01 2.001E-01 2.056E-01 2.103E-01 2.141E-01 2.171E-01 2.193E-01 2.207E-01 2.211E-01 2.208E-01 2.196E-01 2.175E-01 2.147E-01 2.111E-01 2.068E-01 2.019E-01 1.962E-01 1.901E-01 1.833E-01 1.761E-01 1.685E-01 1.606E-01 1.523E-01 1.439E-01 1.352E-01 1.265E-01 1.177E-01 1.090E-01 1.003E-01 9.174E-02 8.338E-02 7.524E-02 6.738E-02 5.984E-02 5.266E-02 4.586E-02 3.949E-02 3.355E-02 2.808E-02 2.309E-02 1.859E-02 1.459E-02 1.109E-02 8.084E-03 5.576E-03 3.552E-03 2.000E-03 9.039E-04 2.454E-04 2.384E-06 1.507E-04 6.639E-04 1.514E-03 2.671E-03 4.103E-03 5.780E-03 7.669E-03 9.736E-03 1.195E-02 1.428E-02 1.668E-02 1.914E-02 2.162E-02 2.409E-02 2.653E-02 2.890E-02 3.118E-02 3.336E-02 3.541E-02 3.731E-02 3.905E-02 4.062E-02 4.200E-02 4.318E-02 4.416E-02 4.492E-02 4.548E-02 4.583E-02 4.597E-02 4.590E-02 4.555E-02 4.586E-02 4.597E-02 4.588E-02 4.558E-02 4.506E-02 4.434E-02 4.341E-02 4.227E-02 4.094E-02 3.942E-02 3.772E-02 3.586E-02 3.385E-02 3.170E-02 2.944E-02 2.709E-02 2.468E-02 2.222E-02 1.974E-02 1.728E-02 1.487E-02 1.252E-02 1.028E-02 8.179E-03 6.247E-03 4.516E-03 3.021E-03 1.791E-03 8.593E-04 2.544E-04 5.093E-06 1.379E-04 6.775E-04 1.646E-03 3.063E-03 4.944E-03 7.304E-03 1.015E-02 1.350E-02 1.734E-02 2.167E-02 2.650E-02 3.180E-02 3.757E-02 4.378E-02 5.042E-02 5.745E-02 6.485E-02 7.258E-02 8.059E-02 8.885E-02 9.730E-02 1.059E-01 1.146E-01 1.233E-01 1.320E-01 1.407E-01 1.492E-01 1.575E-01 1.655E-01 1.732E-01 1.805E-01 1.874E-01 1.938E-01 1.996E-01 2.048E-01 2.094E-01 2.132E-01 2.164E-01 2.187E-01 2.203E-01 2.211E-01 2.210E-01 2.201E-01 2.183E-01 2.158E-01 2.124E-01 2.081E-01 2.032E-01 1.974E-01 1.910E-01 1.839E-01 1.763E-01 1.680E-01 1.594E-01 1.503E-01 1.408E-01 1.312E-01 1.213E-01 1.114E-01 1.015E-01 9.163E-02 8.194E-02 7.250E-02 6.338E-02 5.466E-02 4.640E-02 3.868E-02 3.156E-02 2.508E-02 1.930E-02 1.424E-02 9.939E-03 6.409E-03 3.658E-03 1.685E-03 4.758E-04 8.147E-06 2.485E-04 1.154E-03 2.672E-03 4.742E-03 7.295E-03 1.026E-02 1.354E-02 1.707E-02 2.076E-02 2.450E-02 2.822E-02 3.183E-02 3.524E-02 3.837E-02 4.115E-02 4.352E-02 4.542E-02 4.681E-02 4.766E-02 4.794E-02 4.766E-02 4.681E-02 4.542E-02 4.352E-02 4.115E-02 3.837E-02 3.524E-02 3.183E-02 2.822E-02 2.450E-02 2.076E-02 1.707E-02 1.354E-02 1.026E-02 7.295E-03 4.742E-03 2.672E-03 1.154E-03 2.485E-04 8.147E-06 4.758E-04 1.685E-03 3.658E-03 6.409E-03 9.939E-03 1.424E-02 1.930E-02 2.508E-02 3.156E-02 3.868E-02 4.640E-02 5.466E-02 6.338E-02 7.250E-02 8.194E-02 9.163E-02 1.015E-01 1.114E-01 1.213E-01 1.312E-01 1.408E-01 1.503E-01 1.594E-01 1.680E-01 1.763E-01 1.839E-01 1.910E-01 1.974E-01 2.032E-01 2.081E-01 2.124E-01 2.158E-01 2.183E-01 2.201E-01 2.210E-01 2.211E-01 2.203E-01 2.187E-01 2.164E-01 2.132E-01 2.094E-01 2.048E-01 1.996E-01 1.938E-01 1.874E-01 1.805E-01 1.732E-01 1.655E-01 1.575E-01 1.492E-01 1.407E-01 1.320E-01 1.233E-01 1.146E-01 1.059E-01 9.730E-02 8.885E-02 8.059E-02 7.258E-02 6.485E-02 5.745E-02 5.042E-02 4.378E-02 3.757E-02 3.180E-02 2.650E-02 2.167E-02 1.734E-02 1.350E-02 1.015E-02 7.304E-03 4.944E-03 3.063E-03 1.646E-03 6.775E-04 1.379E-04 5.093E-06 2.544E-04 8.593E-04 1.791E-03 3.021E-03 4.516E-03 6.247E-03 8.179E-03 1.028E-02 1.252E-02 1.487E-02 1.728E-02 1.974E-02 2.222E-02 2.468E-02 2.709E-02 2.944E-02 3.170E-02 3.385E-02 3.586E-02 3.772E-02 3.942E-02 4.094E-02 4.227E-02 4.341E-02 4.434E-02 4.506E-02 4.558E-02 4.588E-02 4.597E-02 4.586E-02 4.546E-02 4.581E-02 4.596E-02 4.592E-02 4.566E-02 4.520E-02 4.452E-02 4.364E-02 4.255E-02 4.127E-02 3.979E-02 3.814E-02 3.631E-02 3.434E-02 3.223E-02 3.000E-02 2.768E-02 2.528E-02 2.284E-02 2.037E-02 1.791E-02 1.548E-02 1.312E-02 1.086E-02 8.719E-03 6.744E-03 4.961E-03 3.402E-03 2.101E-03 1.086E-03 3.892E-04 3.801E-05 5.944E-05 4.784E-04 1.317E-03 2.597E-03 4.333E-03 6.541E-03 9.232E-03 1.241E-02 1.608E-02 2.025E-02 2.490E-02 3.003E-02 3.563E-02 4.168E-02 4.815E-02 5.503E-02 6.228E-02 6.986E-02 7.774E-02 8.588E-02 9.423E-02 1.027E-01 1.114E-01 1.200E-01 1.287E-01 1.374E-01 1.459E-01 1.542E-01 1.623E-01 1.701E-01 1.775E-01 1.845E-01 1.911E-01 1.971E-01 2.026E-01 2.074E-01 2.116E-01 2.150E-01 2.177E-01 2.197E-01 2.208E-01 2.211E-01 2.207E-01 2.194E-01 2.172E-01 2.143E-01 2.105E-01 2.060E-01 2.008E-01 1.948E-01 1.882E-01 1.810E-01 1.732E-01 1.649E-01 1.562E-01 1.471E-01 1.378E-01 1.282E-01 1.185E-01 1.088E-01 9.907E-02 8.946E-02 8.003E-02 7.086E-02 6.203E-02 5.359E-02 4.563E-02 3.819E-02 3.133E-02 2.508E-02 1.950E-02 1.460E-02 1.041E-02 6.941E-03 4.187E-03 2.143E-03 7.923E-04 1.066E-04 5.039E-05 5.789E-04 1.640E-03 3.173E-03 5.113E-03 7.388E-03 9.923E-03 1.264E-02 1.546E-02 1.831E-02 2.110E-02 2.376E-02 2.623E-02 2.843E-02 3.031E-02 3.183E-02 3.294E-02 3.362E-02 3.385E-02 3.362E-02 3.294E-02 3.183E-02 3.031E-02 2.843E-02 2.623E-02 2.376E-02 2.110E-02 1.831E-02 1.546E-02 1.264E-02 9.923E-03 7.388E-03 5.113E-03 3.173E-03 1.640E-03 5.789E-04 5.039E-05 1.066E-04 7.923E-04 2.143E-03 4.187E-03 6.941E-03 1.041E-02 1.460E-02 1.950E-02 2.508E-02 3.133E-02 3.819E-02 4.563E-02 5.359E-02 6.203E-02 7.086E-02 8.003E-02 8.946E-02 9.907E-02 1.088E-01 1.185E-01 1.282E-01 1.378E-01 1.471E-01 1.562E-01 1.649E-01 1.732E-01 1.810E-01 1.882E-01 1.948E-01 2.008E-01 2.060E-01 2.105E-01 2.143E-01 2.172E-01 2.194E-01 2.207E-01 2.211E-01 2.208E-01 2.197E-01 2.177E-01 2.150E-01 2.116E-01 2.074E-01 2.026E-01 1.971E-01 1.911E-01 1.845E-01 1.775E-01 1.701E-01 1.623E-01 1.542E-01 1.459E-01 1.374E-01 1.287E-01 1.200E-01 1.114E-01 1.027E-01 9.423E-02 8.588E-02 7.774E-02 6.986E-02 6.228E-02 5.503E-02 4.815E-02 4.168E-02 3.563E-02 3.003E-02 2.490E-02 2.025E-02 1.608E-02 1.241E-02 9.232E-03 6.541E-03 4.333E-03 2.597E-03 1.317E-03 4.784E-04 5.944E-05 3.801E-05 3.892E-04 1.086E-03 2.101E-03 3.402E-03 4.961E-03 6.744E-03 8.719E-03 1.086E-02 1.312E-02 1.548E-02 1.791E-02 2.037E-02 2.284E-02 2.528E-02 2.768E-02 3.000E-02 3.223E-02 3.434E-02 3.631E-02 3.814E-02 3.979E-02 4.127E-02 4.255E-02 4.364E-02 4.452E-02 4.520E-02 4.566E-02 4.592E-02 4.596E-02 4.581E-02 4.535E-02 4.575E-02 4.595E-02 4.595E-02 4.574E-02 4.532E-02 4.470E-02 4.386E-02 4.283E-02 4.159E-02 4.016E-02 3.856E-02 3.678E-02 3.484E-02 3.277E-02 3.057E-02 2.828E-02 2.590E-02 2.347E-02 2.101E-02 1.855E-02 1.612E-02 1.375E-02 1.146E-02 9.290E-03 7.272E-03 5.437E-03 3.817E-03 2.443E-03 1.347E-03 5.573E-04 1.036E-04 1.271E-05 3.098E-04 1.018E-03 2.157E-03 3.746E-03 5.800E-03 8.329E-03 1.134E-02 1.484E-02 1.883E-02 2.331E-02 2.826E-02 3.369E-02 3.956E-02 4.586E-02 5.257E-02 5.966E-02 6.709E-02 7.484E-02 8.285E-02 9.108E-02 9.950E-02 1.080E-01 1.167E-01 1.253E-01 1.339E-01 1.424E-01 1.508E-01 1.589E-01 1.668E-01 1.744E-01 1.815E-01 1.882E-01 1.945E-01 2.001E-01 2.052E-01 2.097E-01 2.134E-01 2.165E-01 2.188E-01 2.203E-01 2.211E-01 2.210E-01 2.202E-01 2.185E-01 2.160E-01 2.128E-01 2.087E-01 2.040E-01 1.985E-01 1.924E-01 1.856E-01 1.783E-01 1.704E-01 1.621E-01 1.534E-01 1.444E-01 1.352E-01 1.257E-01 1.162E-01 1.067E-01 9.718E-02 8.782E-02 7.866E-02 6.977E-02 6.122E-02 5.307E-02 4.537E-02 3.819E-02 3.156E-02 2.552E-02 2.011E-02 1.534E-02 1.122E-02 7.773E-03 4.980E-03 2.832E-03 1.310E-03 3.816E-04 1.105E-05 1.532E-04 7.568E-04 1.765E-03 3.115E-03 4.742E-03 6.577E-03 8.552E-03 1.060E-02 1.264E-02 1.462E-02 1.648E-02 1.815E-02 1.959E-02 2.076E-02 2.162E-02 2.214E-02 2.232E-02 2.214E-02 2.162E-02 2.076E-02 1.959E-02 1.815E-02 1.648E-02 1.462E-02 1.264E-02 1.060E-02 8.552E-03 6.577E-03 4.742E-03 3.115E-03 1.765E-03 7.568E-04 1.532E-04 1.105E-05 3.816E-04 1.310E-03 2.832E-03 4.980E-03 7.773E-03 1.122E-02 1.534E-02 2.011E-02 2.552E-02 3.156E-02 3.819E-02 4.537E-02 5.307E-02 6.122E-02 6.977E-02 7.866E-02 8.782E-02 9.718E-02 1.067E-01 1.162E-01 1.257E-01 1.352E-01 1.444E-01 1.534E-01 1.621E-01 1.704E-01 1.783E-01 1.856E-01 1.924E-01 1.985E-01 2.040E-01 2.087E-01 2.128E-01 2.160E-01 2.185E-01 2.202E-01 2.210E-01 2.211E-01 2.203E-01 2.188E-01 2.165E-01 2.134E-01 2.097E-01 2.052E-01 2.001E-01 1.945E-01 1.882E-01 1.815E-01 1.744E-01 1.668E-01 1.589E-01 1.508E-01 1.424E-01 1.339E-01 1.253E-01 1.167E-01 1.080E-01 9.950E-02 9.108E-02 8.285E-02 7.484E-02 6.709E-02 5.966E-02 5.257E-02 4.586E-02 3.956E-02 3.369E-02 2.826E-02 2.331E-02 1.883E-02 1.484E-02 1.134E-02 8.329E-03 5.800E-03 3.746E-03 2.157E-03 1.018E-03 3.098E-04 1.271E-05 1.036E-04 5.573E-04 1.347E-03 2.443E-03 3.817E-03 5.437E-03 7.272E-03 9.290E-03 1.146E-02 1.375E-02 1.612E-02 1.855E-02 2.101E-02 2.347E-02 2.590E-02 2.828E-02 3.057E-02 3.277E-02 3.484E-02 3.678E-02 3.856E-02 4.016E-02 4.159E-02 4.283E-02 4.386E-02 4.470E-02 4.532E-02 4.574E-02 4.595E-02 4.595E-02 4.575E-02 4.524E-02 4.567E-02 4.592E-02 4.596E-02 4.581E-02 4.544E-02 4.487E-02 4.409E-02 4.310E-02 4.192E-02 4.054E-02 3.898E-02 3.724E-02 3.535E-02 3.332E-02 3.115E-02 2.889E-02 2.654E-02 2.413E-02 2.168E-02 1.922E-02 1.679E-02 1.440E-02 1.209E-02 9.890E-03 7.832E-03 5.946E-03 4.265E-03 2.820E-03 1.642E-03 7.605E-04 2.042E-04 4.667E-07 1.748E-04 7.505E-04 1.749E-03 3.188E-03 5.084E-03 7.448E-03 1.029E-02 1.362E-02 1.743E-02 2.172E-02 2.650E-02 3.173E-02 3.743E-02 4.355E-02 5.009E-02 5.701E-02 6.429E-02 7.188E-02 7.976E-02 8.787E-02 9.618E-02 1.046E-01 1.132E-01 1.218E-01 1.304E-01 1.389E-01 1.472E-01 1.554E-01 1.634E-01 1.710E-01 1.783E-01 1.852E-01 1.916E-01 1.975E-01 2.029E-01 2.076E-01 2.116E-01 2.150E-01 2.177E-01 2.196E-01 2.208E-01 2.211E-01 2.207E-01 2.195E-01 2.175E-01 2.148E-01 2.112E-01 2.070E-01 2.020E-01 1.963E-01 1.901E-01 1.832E-01 1.758E-01 1.679E-01 1.597E-01 1.510E-01 1.421E-01 1.330E-01 1.237E-01 1.144E-01 1.051E-01 9.583E-02 8.673E-02 7.784E-02 6.922E-02 6.095E-02 5.307E-02 4.563E-02 3.868E-02 3.227E-02 2.641E-02 2.114E-02 1.646E-02 1.240E-02 8.941E-03 6.085E-03 3.813E-03 2.103E-03 9.237E-04 2.374E-04 9.434E-07 1.654E-04 6.775E-04 1.481E-03 2.515E-03 3.721E-03 5.037E-03 6.405E-03 7.765E-03 9.066E-03 1.026E-02 1.129E-02 1.214E-02 1.277E-02 1.315E-02 1.328E-02 1.315E-02 1.277E-02 1.214E-02 1.129E-02 1.026E-02 9.066E-03 7.765E-03 6.405E-03 5.037E-03 3.721E-03 2.515E-03 1.481E-03 6.775E-04 1.654E-04 9.434E-07 2.374E-04 9.237E-04 2.103E-03 3.813E-03 6.085E-03 8.941E-03 1.240E-02 1.646E-02 2.114E-02 2.641E-02 3.227E-02 3.868E-02 4.563E-02 5.307E-02 6.095E-02 6.922E-02 7.784E-02 8.673E-02 9.583E-02 1.051E-01 1.144E-01 1.237E-01 1.330E-01 1.421E-01 1.510E-01 1.597E-01 1.679E-01 1.758E-01 1.832E-01 1.901E-01 1.963E-01 2.020E-01 2.070E-01 2.112E-01 2.148E-01 2.175E-01 2.195E-01 2.207E-01 2.211E-01 2.208E-01 2.196E-01 2.177E-01 2.150E-01 2.116E-01 2.076E-01 2.029E-01 1.975E-01 1.916E-01 1.852E-01 1.783E-01 1.710E-01 1.634E-01 1.554E-01 1.472E-01 1.389E-01 1.304E-01 1.218E-01 1.132E-01 1.046E-01 9.618E-02 8.787E-02 7.976E-02 7.188E-02 6.429E-02 5.701E-02 5.009E-02 4.355E-02 3.743E-02 3.173E-02 2.650E-02 2.172E-02 1.743E-02 1.362E-02 1.029E-02 7.448E-03 5.084E-03 3.188E-03 1.749E-03 7.505E-04 1.748E-04 4.667E-07 2.042E-04 7.605E-04 1.642E-03 2.820E-03 4.265E-03 5.946E-03 7.832E-03 9.890E-03 1.209E-02 1.440E-02 1.679E-02 1.922E-02 2.168E-02 2.413E-02 2.654E-02 2.889E-02 3.115E-02 3.332E-02 3.535E-02 3.724E-02 3.898E-02 4.054E-02 4.192E-02 4.310E-02 4.409E-02 4.487E-02 4.544E-02 4.581E-02 4.596E-02 4.592E-02 4.567E-02 4.510E-02 4.559E-02 4.588E-02 4.597E-02 4.586E-02 4.555E-02 4.503E-02 4.430E-02 4.337E-02 4.224E-02 4.091E-02 3.940E-02 3.772E-02 3.587E-02 3.387E-02 3.175E-02 2.951E-02 2.719E-02 2.480E-02 2.236E-02 1.991E-02 1.748E-02 1.508E-02 1.275E-02 1.052E-02 8.424E-03 6.489E-03 4.749E-03 3.234E-03 1.974E-03 1.001E-03 3.421E-04 2.532E-05 7.627E-05 5.187E-04 1.374E-03 2.662E-03 4.398E-03 6.595E-03 9.264E-03 1.241E-02 1.604E-02 2.015E-02 2.473E-02 2.978E-02 3.529E-02 4.123E-02 4.759E-02 5.433E-02 6.144E-02 6.888E-02 7.661E-02 8.460E-02 9.279E-02 1.011E-01 1.096E-01 1.181E-01 1.267E-01 1.352E-01 1.436E-01 1.518E-01 1.598E-01 1.676E-01 1.750E-01 1.820E-01 1.886E-01 1.947E-01 2.003E-01 2.053E-01 2.096E-01 2.133E-01 2.164E-01 2.187E-01 2.202E-01 2.210E-01 2.211E-01 2.203E-01 2.188E-01 2.165E-01 2.135E-01 2.097E-01 2.053E-01 2.001E-01 1.944E-01 1.880E-01 1.811E-01 1.737E-01 1.658E-01 1.576E-01 1.490E-01 1.403E-01 1.313E-01 1.222E-01 1.131E-01 1.040E-01 9.502E-02 8.618E-02 7.756E-02 6.922E-02 6.122E-02 5.359E-02 4.640E-02 3.968E-02 3.345E-02 2.776E-02 2.260E-02 1.801E-02 1.397E-02 1.049E-02 7.561E-03 5.157E-03 3.258E-03 1.832E-03 8.437E-04 2.518E-04 1.105E-05 7.283E-05 3.863E-04 8.991E-04 1.559E-03 2.314E-03 3.115E-03 3.914E-03 4.670E-03 5.343E-03 5.901E-03 6.319E-03 6.577E-03 6.665E-03 6.577E-03 6.319E-03 5.901E-03 5.343E-03 4.670E-03 3.914E-03 3.115E-03 2.314E-03 1.559E-03 8.991E-04 3.863E-04 7.283E-05 1.105E-05 2.518E-04 8.437E-04 1.832E-03 3.258E-03 5.157E-03 7.561E-03 1.049E-02 1.397E-02 1.801E-02 2.260E-02 2.776E-02 3.345E-02 3.968E-02 4.640E-02 5.359E-02 6.122E-02 6.922E-02 7.756E-02 8.618E-02 9.502E-02 1.040E-01 1.131E-01 1.222E-01 1.313E-01 1.403E-01 1.490E-01 1.576E-01 1.658E-01 1.737E-01 1.811E-01 1.880E-01 1.944E-01 2.001E-01 2.053E-01 2.097E-01 2.135E-01 2.165E-01 2.188E-01 2.203E-01 2.211E-01 2.210E-01 2.202E-01 2.187E-01 2.164E-01 2.133E-01 2.096E-01 2.053E-01 2.003E-01 1.947E-01 1.886E-01 1.820E-01 1.750E-01 1.676E-01 1.598E-01 1.518E-01 1.436E-01 1.352E-01 1.267E-01 1.181E-01 1.096E-01 1.011E-01 9.279E-02 8.460E-02 7.661E-02 6.888E-02 6.144E-02 5.433E-02 4.759E-02 4.123E-02 3.529E-02 2.978E-02 2.473E-02 2.015E-02 1.604E-02 1.241E-02 9.264E-03 6.595E-03 4.398E-03 2.662E-03 1.374E-03 5.187E-04 7.627E-05 2.532E-05 3.421E-04 1.001E-03 1.974E-03 3.234E-03 4.749E-03 6.489E-03 8.424E-03 1.052E-02 1.275E-02 1.508E-02 1.748E-02 1.991E-02 2.236E-02 2.480E-02 2.719E-02 2.951E-02 3.175E-02 3.387E-02 3.587E-02 3.772E-02 3.940E-02 4.091E-02 4.224E-02 4.337E-02 4.430E-02 4.503E-02 4.555E-02 4.586E-02 4.597E-02 4.588E-02 4.559E-02 4.496E-02 4.548E-02 4.582E-02 4.597E-02 4.591E-02 4.565E-02 4.518E-02 4.451E-02 4.363E-02 4.256E-02 4.128E-02 3.983E-02 3.819E-02 3.639E-02 3.444E-02 3.235E-02 3.015E-02 2.786E-02 2.549E-02 2.307E-02 2.063E-02 1.819E-02 1.578E-02 1.344E-02 1.118E-02 9.048E-03 7.066E-03 5.268E-03 3.684E-03 2.345E-03 1.280E-03 5.195E-04 8.981E-05 1.718E-05 3.258E-04 1.038E-03 2.172E-03 3.746E-03 5.774E-03 8.267E-03 1.123E-02 1.467E-02 1.859E-02 2.298E-02 2.784E-02 3.315E-02 3.890E-02 4.507E-02 5.164E-02 5.857E-02 6.585E-02 7.343E-02 8.127E-02 8.934E-02 9.758E-02 1.060E-01 1.144E-01 1.229E-01 1.314E-01 1.398E-01 1.480E-01 1.561E-01 1.639E-01 1.714E-01 1.786E-01 1.854E-01 1.917E-01 1.975E-01 2.027E-01 2.074E-01 2.114E-01 2.148E-01 2.175E-01 2.194E-01 2.207E-01 2.211E-01 2.209E-01 2.198E-01 2.181E-01 2.155E-01 2.123E-01 2.083E-01 2.037E-01 1.984E-01 1.926E-01 1.861E-01 1.792E-01 1.718E-01 1.640E-01 1.559E-01 1.475E-01 1.389E-01 1.301E-01 1.212E-01 1.123E-01 1.035E-01 9.475E-02 8.618E-02 7.784E-02 6.977E-02 6.203E-02 5.466E-02 4.770E-02 4.118E-02 3.513E-02 2.958E-02 2.454E-02 2.001E-02 1.599E-02 1.248E-02 9.473E-03 6.941E-03 4.863E-03 3.209E-03 1.946E-03 1.036E-03 4.369E-04 1.066E-04 2.496E-07 7.283E-05 2.800E-04 5.789E-04 9.292E-04 1.294E-03 1.640E-03 1.939E-03 2.169E-03 2.314E-03 2.364E-03 2.314E-03 2.169E-03 1.939E-03 1.640E-03 1.294E-03 9.292E-04 5.789E-04 2.800E-04 7.283E-05 2.496E-07 1.066E-04 4.369E-04 1.036E-03 1.946E-03 3.209E-03 4.863E-03 6.941E-03 9.473E-03 1.248E-02 1.599E-02 2.001E-02 2.454E-02 2.958E-02 3.513E-02 4.118E-02 4.770E-02 5.466E-02 6.203E-02 6.977E-02 7.784E-02 8.618E-02 9.475E-02 1.035E-01 1.123E-01 1.212E-01 1.301E-01 1.389E-01 1.475E-01 1.559E-01 1.640E-01 1.718E-01 1.792E-01 1.861E-01 1.926E-01 1.984E-01 2.037E-01 2.083E-01 2.123E-01 2.155E-01 2.181E-01 2.198E-01 2.209E-01 2.211E-01 2.207E-01 2.194E-01 2.175E-01 2.148E-01 2.114E-01 2.074E-01 2.027E-01 1.975E-01 1.917E-01 1.854E-01 1.786E-01 1.714E-01 1.639E-01 1.561E-01 1.480E-01 1.398E-01 1.314E-01 1.229E-01 1.144E-01 1.060E-01 9.758E-02 8.934E-02 8.127E-02 7.343E-02 6.585E-02 5.857E-02 5.164E-02 4.507E-02 3.890E-02 3.315E-02 2.784E-02 2.298E-02 1.859E-02 1.467E-02 1.123E-02 8.267E-03 5.774E-03 3.746E-03 2.172E-03 1.038E-03 3.258E-04 1.718E-05 8.981E-05 5.195E-04 1.280E-03 2.345E-03 3.684E-03 5.268E-03 7.066E-03 9.048E-03 1.118E-02 1.344E-02 1.578E-02 1.819E-02 2.063E-02 2.307E-02 2.549E-02 2.786E-02 3.015E-02 3.235E-02 3.444E-02 3.639E-02 3.819E-02 3.983E-02 4.128E-02 4.256E-02 4.363E-02 4.451E-02 4.518E-02 4.565E-02 4.591E-02 4.597E-02 4.582E-02 4.548E-02 4.479E-02 4.537E-02 4.575E-02 4.595E-02 4.594E-02 4.574E-02 4.533E-02 4.471E-02 4.389E-02 4.287E-02 4.165E-02 4.025E-02 3.866E-02 3.691E-02 3.501E-02 3.296E-02 3.080E-02 2.854E-02 2.619E-02 2.379E-02 2.136E-02 1.893E-02 1.652E-02 1.415E-02 1.187E-02 9.706E-03 7.678E-03 5.824E-03 4.173E-03 2.755E-03 1.601E-03 7.385E-04 1.963E-04 2.914E-07 1.748E-04 7.422E-04 1.723E-03 3.134E-03 4.991E-03 7.304E-03 1.008E-02 1.333E-02 1.706E-02 2.125E-02 2.591E-02 3.102E-02 3.658E-02 4.255E-02 4.893E-02 5.569E-02 6.279E-02 7.020E-02 7.790E-02 8.583E-02 9.395E-02 1.022E-01 1.106E-01 1.190E-01 1.275E-01 1.358E-01 1.441E-01 1.522E-01 1.601E-01 1.677E-01 1.750E-01 1.820E-01 1.884E-01 1.945E-01 2.000E-01 2.049E-01 2.093E-01 2.130E-01 2.160E-01 2.184E-01 2.200E-01 2.209E-01 2.211E-01 2.206E-01 2.193E-01 2.173E-01 2.145E-01 2.111E-01 2.070E-01 2.023E-01 1.969E-01 1.910E-01 1.846E-01 1.777E-01 1.703E-01 1.626E-01 1.546E-01 1.464E-01 1.379E-01 1.293E-01 1.207E-01 1.121E-01 1.035E-01 9.502E-02 8.673E-02 7.866E-02 7.086E-02 6.338E-02 5.625E-02 4.952E-02 4.320E-02 3.733E-02 3.191E-02 2.697E-02 2.250E-02 1.850E-02 1.497E-02 1.189E-02 9.244E-03 7.009E-03 5.157E-03 3.658E-03 2.477E-03 1.578E-03 9.237E-04 4.758E-04 1.968E-04 4.997E-05 9.434E-07 1.796E-05 7.283E-05 1.415E-04 2.048E-04 2.485E-04 2.640E-04 2.485E-04 2.048E-04 1.415E-04 7.283E-05 1.796E-05 9.434E-07 4.997E-05 1.968E-04 4.758E-04 9.237E-04 1.578E-03 2.477E-03 3.658E-03 5.157E-03 7.009E-03 9.244E-03 1.189E-02 1.497E-02 1.850E-02 2.250E-02 2.697E-02 3.191E-02 3.733E-02 4.320E-02 4.952E-02 5.625E-02 6.338E-02 7.086E-02 7.866E-02 8.673E-02 9.502E-02 1.035E-01 1.121E-01 1.207E-01 1.293E-01 1.379E-01 1.464E-01 1.546E-01 1.626E-01 1.703E-01 1.777E-01 1.846E-01 1.910E-01 1.969E-01 2.023E-01 2.070E-01 2.111E-01 2.145E-01 2.173E-01 2.193E-01 2.206E-01 2.211E-01 2.209E-01 2.200E-01 2.184E-01 2.160E-01 2.130E-01 2.093E-01 2.049E-01 2.000E-01 1.945E-01 1.884E-01 1.820E-01 1.750E-01 1.677E-01 1.601E-01 1.522E-01 1.441E-01 1.358E-01 1.275E-01 1.190E-01 1.106E-01 1.022E-01 9.395E-02 8.583E-02 7.790E-02 7.020E-02 6.279E-02 5.569E-02 4.893E-02 4.255E-02 3.658E-02 3.102E-02 2.591E-02 2.125E-02 1.706E-02 1.333E-02 1.008E-02 7.304E-03 4.991E-03 3.134E-03 1.723E-03 7.422E-04 1.748E-04 2.914E-07 1.963E-04 7.385E-04 1.601E-03 2.755E-03 4.173E-03 5.824E-03 7.678E-03 9.706E-03 1.187E-02 1.415E-02 1.652E-02 1.893E-02 2.136E-02 2.379E-02 2.619E-02 2.854E-02 3.080E-02 3.296E-02 3.501E-02 3.691E-02 3.866E-02 4.025E-02 4.165E-02 4.287E-02 4.389E-02 4.471E-02 4.533E-02 4.574E-02 4.594E-02 4.595E-02 4.575E-02 4.537E-02 4.462E-02 4.523E-02 4.567E-02 4.592E-02 4.597E-02 4.582E-02 4.546E-02 4.490E-02 4.414E-02 4.318E-02 4.202E-02 4.067E-02 3.914E-02 3.744E-02 3.558E-02 3.358E-02 3.146E-02 2.923E-02 2.691E-02 2.453E-02 2.212E-02 1.969E-02 1.727E-02 1.490E-02 1.260E-02 1.040E-02 8.326E-03 6.417E-03 4.700E-03 3.206E-03 1.963E-03 1.001E-03 3.472E-04 2.826E-05 6.879E-05 4.916E-04 1.317E-03 2.564E-03 4.248E-03 6.381E-03 8.973E-03 1.203E-02 1.555E-02 1.955E-02 2.400E-02 2.891E-02 3.426E-02 4.004E-02 4.622E-02 5.279E-02 5.971E-02 6.695E-02 7.448E-02 8.227E-02 9.026E-02 9.843E-02 1.067E-01 1.151E-01 1.234E-01 1.318E-01 1.401E-01 1.482E-01 1.562E-01 1.639E-01 1.713E-01 1.783E-01 1.850E-01 1.912E-01 1.970E-01 2.022E-01 2.068E-01 2.109E-01 2.143E-01 2.170E-01 2.191E-01 2.204E-01 2.211E-01 2.210E-01 2.202E-01 2.187E-01 2.165E-01 2.136E-01 2.100E-01 2.058E-01 2.010E-01 1.956E-01 1.897E-01 1.833E-01 1.764E-01 1.692E-01 1.616E-01 1.538E-01 1.457E-01 1.374E-01 1.291E-01 1.207E-01 1.123E-01 1.040E-01 9.583E-02 8.782E-02 8.003E-02 7.250E-02 6.528E-02 5.839E-02 5.188E-02 4.576E-02 4.005E-02 3.477E-02 2.993E-02 2.552E-02 2.155E-02 1.801E-02 1.488E-02 1.214E-02 9.783E-03 7.773E-03 6.085E-03 4.690E-03 3.556E-03 2.652E-03 1.946E-03 1.408E-03 1.007E-03 7.180E-04 5.163E-04 3.816E-04 2.974E-04 2.518E-04 2.374E-04 2.518E-04 2.974E-04 3.816E-04 5.163E-04 7.180E-04 1.007E-03 1.408E-03 1.946E-03 2.652E-03 3.556E-03 4.690E-03 6.085E-03 7.773E-03 9.783E-03 1.214E-02 1.488E-02 1.801E-02 2.155E-02 2.552E-02 2.993E-02 3.477E-02 4.005E-02 4.576E-02 5.188E-02 5.839E-02 6.528E-02 7.250E-02 8.003E-02 8.782E-02 9.583E-02 1.040E-01 1.123E-01 1.207E-01 1.291E-01 1.374E-01 1.457E-01 1.538E-01 1.616E-01 1.692E-01 1.764E-01 1.833E-01 1.897E-01 1.956E-01 2.010E-01 2.058E-01 2.100E-01 2.136E-01 2.165E-01 2.187E-01 2.202E-01 2.210E-01 2.211E-01 2.204E-01 2.191E-01 2.170E-01 2.143E-01 2.109E-01 2.068E-01 2.022E-01 1.970E-01 1.912E-01 1.850E-01 1.783E-01 1.713E-01 1.639E-01 1.562E-01 1.482E-01 1.401E-01 1.318E-01 1.234E-01 1.151E-01 1.067E-01 9.843E-02 9.026E-02 8.227E-02 7.448E-02 6.695E-02 5.971E-02 5.279E-02 4.622E-02 4.004E-02 3.426E-02 2.891E-02 2.400E-02 1.955E-02 1.555E-02 1.203E-02 8.973E-03 6.381E-03 4.248E-03 2.564E-03 1.317E-03 4.916E-04 6.879E-05 2.826E-05 3.472E-04 1.001E-03 1.963E-03 3.206E-03 4.700E-03 6.417E-03 8.326E-03 1.040E-02 1.260E-02 1.490E-02 1.727E-02 1.969E-02 2.212E-02 2.453E-02 2.691E-02 2.923E-02 3.146E-02 3.358E-02 3.558E-02 3.744E-02 3.914E-02 4.067E-02 4.202E-02 4.318E-02 4.414E-02 4.490E-02 4.546E-02 4.582E-02 4.597E-02 4.592E-02 4.567E-02 4.523E-02 4.442E-02 4.508E-02 4.557E-02 4.587E-02 4.597E-02 4.588E-02 4.558E-02 4.508E-02 4.438E-02 4.348E-02 4.238E-02 4.109E-02 3.961E-02 3.796E-02 3.616E-02 3.421E-02 3.212E-02 2.993E-02 2.765E-02 2.529E-02 2.289E-02 2.047E-02 1.805E-02 1.567E-02 1.335E-02 1.112E-02 9.008E-03 7.048E-03 5.268E-03 3.699E-03 2.369E-03 1.309E-03 5.445E-04 1.036E-04 1.073E-05 2.892E-04 9.600E-04 2.042E-03 3.552E-03 5.502E-03 7.904E-03 1.076E-02 1.409E-02 1.787E-02 2.212E-02 2.682E-02 3.196E-02 3.753E-02 4.351E-02 4.988E-02 5.661E-02 6.367E-02 7.104E-02 7.867E-02 8.652E-02 9.456E-02 1.027E-01 1.110E-01 1.193E-01 1.276E-01 1.359E-01 1.441E-01 1.520E-01 1.598E-01 1.673E-01 1.745E-01 1.814E-01 1.878E-01 1.938E-01 1.992E-01 2.042E-01 2.085E-01 2.123E-01 2.154E-01 2.179E-01 2.196E-01 2.207E-01 2.211E-01 2.208E-01 2.198E-01 2.182E-01 2.158E-01 2.128E-01 2.091E-01 2.048E-01 2.000E-01 1.946E-01 1.887E-01 1.823E-01 1.755E-01 1.684E-01 1.610E-01 1.533E-01 1.455E-01 1.374E-01 1.293E-01 1.212E-01 1.131E-01 1.051E-01 9.718E-02 8.946E-02 8.194E-02 7.469E-02 6.772E-02 6.108E-02 5.479E-02 4.886E-02 4.333E-02 3.819E-02 3.345E-02 2.912E-02 2.519E-02 2.166E-02 1.850E-02 1.571E-02 1.326E-02 1.114E-02 9.320E-03 7.773E-03 6.474E-03 5.398E-03 4.519E-03 3.813E-03 3.258E-03 2.832E-03 2.520E-03 2.307E-03 2.184E-03 2.143E-03 2.184E-03 2.307E-03 2.520E-03 2.832E-03 3.258E-03 3.813E-03 4.519E-03 5.398E-03 6.474E-03 7.773E-03 9.320E-03 1.114E-02 1.326E-02 1.571E-02 1.850E-02 2.166E-02 2.519E-02 2.912E-02 3.345E-02 3.819E-02 4.333E-02 4.886E-02 5.479E-02 6.108E-02 6.772E-02 7.469E-02 8.194E-02 8.946E-02 9.718E-02 1.051E-01 1.131E-01 1.212E-01 1.293E-01 1.374E-01 1.455E-01 1.533E-01 1.610E-01 1.684E-01 1.755E-01 1.823E-01 1.887E-01 1.946E-01 2.000E-01 2.048E-01 2.091E-01 2.128E-01 2.158E-01 2.182E-01 2.198E-01 2.208E-01 2.211E-01 2.207E-01 2.196E-01 2.179E-01 2.154E-01 2.123E-01 2.085E-01 2.042E-01 1.992E-01 1.938E-01 1.878E-01 1.814E-01 1.745E-01 1.673E-01 1.598E-01 1.520E-01 1.441E-01 1.359E-01 1.276E-01 1.193E-01 1.110E-01 1.027E-01 9.456E-02 8.652E-02 7.867E-02 7.104E-02 6.367E-02 5.661E-02 4.988E-02 4.351E-02 3.753E-02 3.196E-02 2.682E-02 2.212E-02 1.787E-02 1.409E-02 1.076E-02 7.904E-03 5.502E-03 3.552E-03 2.042E-03 9.600E-04 2.892E-04 1.073E-05 1.036E-04 5.445E-04 1.309E-03 2.369E-03 3.699E-03 5.268E-03 7.048E-03 9.008E-03 1.112E-02 1.335E-02 1.567E-02 1.805E-02 2.047E-02 2.289E-02 2.529E-02 2.765E-02 2.993E-02 3.212E-02 3.421E-02 3.616E-02 3.796E-02 3.961E-02 4.109E-02 4.238E-02 4.348E-02 4.438E-02 4.508E-02 4.558E-02 4.588E-02 4.597E-02 4.587E-02 4.557E-02 4.508E-02 4.420E-02 4.492E-02 4.545E-02 4.580E-02 4.596E-02 4.593E-02 4.569E-02 4.525E-02 4.461E-02 4.377E-02 4.273E-02 4.150E-02 4.008E-02 3.849E-02 3.674E-02 3.483E-02 3.280E-02 3.064E-02 2.839E-02 2.606E-02 2.368E-02 2.127E-02 1.886E-02 1.647E-02 1.413E-02 1.187E-02 9.726E-03 7.717E-03 5.876E-03 4.234E-03 2.820E-03 1.663E-03 7.903E-04 2.286E-04 3.342E-06 1.379E-04 6.540E-04 1.571E-03 2.906E-03 4.672E-03 6.882E-03 9.544E-03 1.266E-02 1.624E-02 2.027E-02 2.476E-02 2.969E-02 3.505E-02 4.082E-02 4.698E-02 5.351E-02 6.039E-02 6.757E-02 7.504E-02 8.274E-02 9.065E-02 9.871E-02 1.069E-01 1.151E-01 1.234E-01 1.316E-01 1.398E-01 1.478E-01 1.556E-01 1.632E-01 1.705E-01 1.775E-01 1.841E-01 1.903E-01 1.960E-01 2.012E-01 2.059E-01 2.100E-01 2.135E-01 2.163E-01 2.185E-01 2.201E-01 2.209E-01 2.211E-01 2.206E-01 2.195E-01 2.176E-01 2.151E-01 2.120E-01 2.083E-01 2.040E-01 1.991E-01 1.937E-01 1.879E-01 1.816E-01 1.750E-01 1.680E-01 1.608E-01 1.533E-01 1.457E-01 1.379E-01 1.301E-01 1.222E-01 1.144E-01 1.067E-01 9.907E-02 9.163E-02 8.441E-02 7.743E-02 7.072E-02 6.433E-02 5.826E-02 5.254E-02 4.718E-02 4.219E-02 3.757E-02 3.333E-02 2.947E-02 2.597E-02 2.282E-02 2.001E-02 1.752E-02 1.534E-02 1.344E-02 1.181E-02 1.041E-02 9.244E-03 8.276E-03 7.491E-03 6.874E-03 6.409E-03 6.085E-03 5.894E-03 5.831E-03 5.894E-03 6.085E-03 6.409E-03 6.874E-03 7.491E-03 8.276E-03 9.244E-03 1.041E-02 1.181E-02 1.344E-02 1.534E-02 1.752E-02 2.001E-02 2.282E-02 2.597E-02 2.947E-02 3.333E-02 3.757E-02 4.219E-02 4.718E-02 5.254E-02 5.826E-02 6.433E-02 7.072E-02 7.743E-02 8.441E-02 9.163E-02 9.907E-02 1.067E-01 1.144E-01 1.222E-01 1.301E-01 1.379E-01 1.457E-01 1.533E-01 1.608E-01 1.680E-01 1.750E-01 1.816E-01 1.879E-01 1.937E-01 1.991E-01 2.040E-01 2.083E-01 2.120E-01 2.151E-01 2.176E-01 2.195E-01 2.206E-01 2.211E-01 2.209E-01 2.201E-01 2.185E-01 2.163E-01 2.135E-01 2.100E-01 2.059E-01 2.012E-01 1.960E-01 1.903E-01 1.841E-01 1.775E-01 1.705E-01 1.632E-01 1.556E-01 1.478E-01 1.398E-01 1.316E-01 1.234E-01 1.151E-01 1.069E-01 9.871E-02 9.065E-02 8.274E-02 7.504E-02 6.757E-02 6.039E-02 5.351E-02 4.698E-02 4.082E-02 3.505E-02 2.969E-02 2.476E-02 2.027E-02 1.624E-02 1.266E-02 9.544E-03 6.882E-03 4.672E-03 2.906E-03 1.571E-03 6.540E-04 1.379E-04 3.342E-06 2.286E-04 7.903E-04 1.663E-03 2.820E-03 4.234E-03 5.876E-03 7.717E-03 9.726E-03 1.187E-02 1.413E-02 1.647E-02 1.886E-02 2.127E-02 2.368E-02 2.606E-02 2.839E-02 3.064E-02 3.280E-02 3.483E-02 3.674E-02 3.849E-02 4.008E-02 4.150E-02 4.273E-02 4.377E-02 4.461E-02 4.525E-02 4.569E-02 4.593E-02 4.596E-02 4.580E-02 4.545E-02 4.492E-02 4.397E-02 4.473E-02 4.531E-02 4.572E-02 4.593E-02 4.596E-02 4.578E-02 4.540E-02 4.483E-02 4.405E-02 4.307E-02 4.190E-02 4.054E-02 3.901E-02 3.731E-02 3.546E-02 3.347E-02 3.136E-02 2.915E-02 2.685E-02 2.449E-02 2.210E-02 1.969E-02 1.730E-02 1.494E-02 1.266E-02 1.048E-02 8.424E-03 6.525E-03 4.814E-03 3.318E-03 2.066E-03 1.086E-03 4.056E-04 4.919E-05 4.092E-05 4.028E-04 1.155E-03 2.314E-03 3.896E-03 5.913E-03 8.375E-03 1.129E-02 1.465E-02 1.847E-02 2.274E-02 2.745E-02 3.259E-02 3.814E-02 4.409E-02 5.042E-02 5.710E-02 6.410E-02 7.139E-02 7.893E-02 8.668E-02 9.462E-02 1.027E-01 1.108E-01 1.190E-01 1.272E-01 1.354E-01 1.434E-01 1.513E-01 1.589E-01 1.663E-01 1.735E-01 1.802E-01 1.866E-01 1.926E-01 1.980E-01 2.030E-01 2.074E-01 2.112E-01 2.145E-01 2.171E-01 2.191E-01 2.204E-01 2.211E-01 2.211E-01 2.204E-01 2.191E-01 2.171E-01 2.146E-01 2.114E-01 2.076E-01 2.033E-01 1.985E-01 1.932E-01 1.875E-01 1.813E-01 1.748E-01 1.680E-01 1.610E-01 1.538E-01 1.464E-01 1.389E-01 1.313E-01 1.237E-01 1.162E-01 1.088E-01 1.015E-01 9.435E-02 8.741E-02 8.071E-02 7.428E-02 6.813E-02 6.230E-02 5.679E-02 5.161E-02 4.679E-02 4.231E-02 3.819E-02 3.441E-02 3.098E-02 2.787E-02 2.508E-02 2.260E-02 2.042E-02 1.850E-02 1.684E-02 1.543E-02 1.424E-02 1.326E-02 1.248E-02 1.189E-02 1.147E-02 1.122E-02 1.114E-02 1.122E-02 1.147E-02 1.189E-02 1.248E-02 1.326E-02 1.424E-02 1.543E-02 1.684E-02 1.850E-02 2.042E-02 2.260E-02 2.508E-02 2.787E-02 3.098E-02 3.441E-02 3.819E-02 4.231E-02 4.679E-02 5.161E-02 5.679E-02 6.230E-02 6.813E-02 7.428E-02 8.071E-02 8.741E-02 9.435E-02 1.015E-01 1.088E-01 1.162E-01 1.237E-01 1.313E-01 1.389E-01 1.464E-01 1.538E-01 1.610E-01 1.680E-01 1.748E-01 1.813E-01 1.875E-01 1.932E-01 1.985E-01 2.033E-01 2.076E-01 2.114E-01 2.146E-01 2.171E-01 2.191E-01 2.204E-01 2.211E-01 2.211E-01 2.204E-01 2.191E-01 2.171E-01 2.145E-01 2.112E-01 2.074E-01 2.030E-01 1.980E-01 1.926E-01 1.866E-01 1.802E-01 1.735E-01 1.663E-01 1.589E-01 1.513E-01 1.434E-01 1.354E-01 1.272E-01 1.190E-01 1.108E-01 1.027E-01 9.462E-02 8.668E-02 7.893E-02 7.139E-02 6.410E-02 5.710E-02 5.042E-02 4.409E-02 3.814E-02 3.259E-02 2.745E-02 2.274E-02 1.847E-02 1.465E-02 1.129E-02 8.375E-03 5.913E-03 3.896E-03 2.314E-03 1.155E-03 4.028E-04 4.092E-05 4.919E-05 4.056E-04 1.086E-03 2.066E-03 3.318E-03 4.814E-03 6.525E-03 8.424E-03 1.048E-02 1.266E-02 1.494E-02 1.730E-02 1.969E-02 2.210E-02 2.449E-02 2.685E-02 2.915E-02 3.136E-02 3.347E-02 3.546E-02 3.731E-02 3.901E-02 4.054E-02 4.190E-02 4.307E-02 4.405E-02 4.483E-02 4.540E-02 4.578E-02 4.596E-02 4.593E-02 4.572E-02 4.531E-02 4.473E-02 4.372E-02 4.452E-02 4.516E-02 4.562E-02 4.589E-02 4.597E-02 4.586E-02 4.554E-02 4.503E-02 4.431E-02 4.340E-02 4.230E-02 4.100E-02 3.953E-02 3.789E-02 3.609E-02 3.415E-02 3.209E-02 2.991E-02 2.765E-02 2.531E-02 2.294E-02 2.054E-02 1.815E-02 1.578E-02 1.348E-02 1.127E-02 9.169E-03 7.216E-03 5.437E-03 3.862E-03 2.518E-03 1.434E-03 6.364E-04 1.507E-04 9.375E-07 2.096E-04 7.971E-04 1.782E-03 3.179E-03 5.002E-03 7.262E-03 9.965E-03 1.312E-02 1.671E-02 2.076E-02 2.525E-02 3.016E-02 3.549E-02 4.123E-02 4.734E-02 5.382E-02 6.062E-02 6.772E-02 7.509E-02 8.269E-02 9.048E-02 9.843E-02 1.065E-01 1.146E-01 1.227E-01 1.308E-01 1.389E-01 1.468E-01 1.545E-01 1.620E-01 1.692E-01 1.761E-01 1.827E-01 1.889E-01 1.946E-01 1.998E-01 2.045E-01 2.087E-01 2.123E-01 2.153E-01 2.177E-01 2.195E-01 2.206E-01 2.211E-01 2.210E-01 2.202E-01 2.188E-01 2.167E-01 2.141E-01 2.109E-01 2.072E-01 2.029E-01 1.981E-01 1.929E-01 1.873E-01 1.813E-01 1.750E-01 1.684E-01 1.616E-01 1.546E-01 1.475E-01 1.403E-01 1.330E-01 1.257E-01 1.185E-01 1.114E-01 1.044E-01 9.759E-02 9.095E-02 8.454E-02 7.838E-02 7.250E-02 6.691E-02 6.162E-02 5.665E-02 5.201E-02 4.770E-02 4.371E-02 4.005E-02 3.672E-02 3.369E-02 3.098E-02 2.855E-02 2.641E-02 2.454E-02 2.292E-02 2.155E-02 2.042E-02 1.950E-02 1.880E-02 1.830E-02 1.801E-02 1.791E-02 1.801E-02 1.830E-02 1.880E-02 1.950E-02 2.042E-02 2.155E-02 2.292E-02 2.454E-02 2.641E-02 2.855E-02 3.098E-02 3.369E-02 3.672E-02 4.005E-02 4.371E-02 4.770E-02 5.201E-02 5.665E-02 6.162E-02 6.691E-02 7.250E-02 7.838E-02 8.454E-02 9.095E-02 9.759E-02 1.044E-01 1.114E-01 1.185E-01 1.257E-01 1.330E-01 1.403E-01 1.475E-01 1.546E-01 1.616E-01 1.684E-01 1.750E-01 1.813E-01 1.873E-01 1.929E-01 1.981E-01 2.029E-01 2.072E-01 2.109E-01 2.141E-01 2.167E-01 2.188E-01 2.202E-01 2.210E-01 2.211E-01 2.206E-01 2.195E-01 2.177E-01 2.153E-01 2.123E-01 2.087E-01 2.045E-01 1.998E-01 1.946E-01 1.889E-01 1.827E-01 1.761E-01 1.692E-01 1.620E-01 1.545E-01 1.468E-01 1.389E-01 1.308E-01 1.227E-01 1.146E-01 1.065E-01 9.843E-02 9.048E-02 8.269E-02 7.509E-02 6.772E-02 6.062E-02 5.382E-02 4.734E-02 4.123E-02 3.549E-02 3.016E-02 2.525E-02 2.076E-02 1.671E-02 1.312E-02 9.965E-03 7.262E-03 5.002E-03 3.179E-03 1.782E-03 7.971E-04 2.096E-04 9.375E-07 1.507E-04 6.364E-04 1.434E-03 2.518E-03 3.862E-03 5.437E-03 7.216E-03 9.169E-03 1.127E-02 1.348E-02 1.578E-02 1.815E-02 2.054E-02 2.294E-02 2.531E-02 2.765E-02 2.991E-02 3.209E-02 3.415E-02 3.609E-02 3.789E-02 3.953E-02 4.100E-02 4.230E-02 4.340E-02 4.431E-02 4.503E-02 4.554E-02 4.586E-02 4.597E-02 4.589E-02 4.562E-02 4.516E-02 4.452E-02 4.344E-02 4.430E-02 4.498E-02 4.550E-02 4.583E-02 4.597E-02 4.591E-02 4.566E-02 4.521E-02 4.457E-02 4.372E-02 4.268E-02 4.145E-02 4.004E-02 3.846E-02 3.672E-02 3.483E-02 3.281E-02 3.068E-02 2.845E-02 2.615E-02 2.379E-02 2.141E-02 1.902E-02 1.665E-02 1.433E-02 1.209E-02 9.951E-03 7.947E-03 6.105E-03 4.453E-03 3.021E-03 1.835E-03 9.228E-04 3.099E-04 2.057E-05 7.755E-05 5.017E-04 1.312E-03 2.524E-03 4.153E-03 6.210E-03 8.703E-03 1.164E-02 1.501E-02 1.883E-02 2.309E-02 2.778E-02 3.288E-02 3.839E-02 4.429E-02 5.055E-02 5.714E-02 6.405E-02 7.124E-02 7.867E-02 8.631E-02 9.412E-02 1.021E-01 1.101E-01 1.181E-01 1.262E-01 1.342E-01 1.421E-01 1.499E-01 1.575E-01 1.648E-01 1.718E-01 1.786E-01 1.849E-01 1.908E-01 1.963E-01 2.014E-01 2.058E-01 2.098E-01 2.132E-01 2.160E-01 2.182E-01 2.198E-01 2.208E-01 2.211E-01 2.209E-01 2.200E-01 2.185E-01 2.164E-01 2.138E-01 2.106E-01 2.069E-01 2.027E-01 1.980E-01 1.929E-01 1.875E-01 1.816E-01 1.755E-01 1.692E-01 1.626E-01 1.559E-01 1.490E-01 1.421E-01 1.352E-01 1.282E-01 1.213E-01 1.145E-01 1.079E-01 1.013E-01 9.502E-02 8.891E-02 8.304E-02 7.743E-02 7.209E-02 6.704E-02 6.230E-02 5.786E-02 5.373E-02 4.991E-02 4.640E-02 4.320E-02 4.030E-02 3.770E-02 3.538E-02 3.333E-02 3.156E-02 3.005E-02 2.878E-02 2.776E-02 2.697E-02 2.641E-02 2.608E-02 2.597E-02 2.608E-02 2.641E-02 2.697E-02 2.776E-02 2.878E-02 3.005E-02 3.156E-02 3.333E-02 3.538E-02 3.770E-02 4.030E-02 4.320E-02 4.640E-02 4.991E-02 5.373E-02 5.786E-02 6.230E-02 6.704E-02 7.209E-02 7.743E-02 8.304E-02 8.891E-02 9.502E-02 1.013E-01 1.079E-01 1.145E-01 1.213E-01 1.282E-01 1.352E-01 1.421E-01 1.490E-01 1.559E-01 1.626E-01 1.692E-01 1.755E-01 1.816E-01 1.875E-01 1.929E-01 1.980E-01 2.027E-01 2.069E-01 2.106E-01 2.138E-01 2.164E-01 2.185E-01 2.200E-01 2.209E-01 2.211E-01 2.208E-01 2.198E-01 2.182E-01 2.160E-01 2.132E-01 2.098E-01 2.058E-01 2.014E-01 1.963E-01 1.908E-01 1.849E-01 1.786E-01 1.718E-01 1.648E-01 1.575E-01 1.499E-01 1.421E-01 1.342E-01 1.262E-01 1.181E-01 1.101E-01 1.021E-01 9.412E-02 8.631E-02 7.867E-02 7.124E-02 6.405E-02 5.714E-02 5.055E-02 4.429E-02 3.839E-02 3.288E-02 2.778E-02 2.309E-02 1.883E-02 1.501E-02 1.164E-02 8.703E-03 6.210E-03 4.153E-03 2.524E-03 1.312E-03 5.017E-04 7.755E-05 2.057E-05 3.099E-04 9.228E-04 1.835E-03 3.021E-03 4.453E-03 6.105E-03 7.947E-03 9.951E-03 1.209E-02 1.433E-02 1.665E-02 1.902E-02 2.141E-02 2.379E-02 2.615E-02 2.845E-02 3.068E-02 3.281E-02 3.483E-02 3.672E-02 3.846E-02 4.004E-02 4.145E-02 4.268E-02 4.372E-02 4.457E-02 4.521E-02 4.566E-02 4.591E-02 4.597E-02 4.583E-02 4.550E-02 4.498E-02 4.430E-02 4.315E-02 4.405E-02 4.479E-02 4.535E-02 4.574E-02 4.594E-02 4.595E-02 4.577E-02 4.538E-02 4.480E-02 4.402E-02 4.305E-02 4.189E-02 4.054E-02 3.903E-02 3.735E-02 3.551E-02 3.355E-02 3.146E-02 2.927E-02 2.700E-02 2.467E-02 2.230E-02 1.991E-02 1.754E-02 1.521E-02 1.295E-02 1.077E-02 8.719E-03 6.817E-03 5.093E-03 3.575E-03 2.290E-03 1.266E-03 5.289E-04 1.022E-04 9.360E-06 2.717E-04 9.085E-04 1.937E-03 3.372E-03 5.225E-03 7.506E-03 1.022E-02 1.337E-02 1.697E-02 2.099E-02 2.545E-02 3.032E-02 3.560E-02 4.127E-02 4.730E-02 5.369E-02 6.039E-02 6.738E-02 7.463E-02 8.211E-02 8.977E-02 9.758E-02 1.055E-01 1.135E-01 1.215E-01 1.294E-01 1.374E-01 1.451E-01 1.528E-01 1.602E-01 1.673E-01 1.742E-01 1.807E-01 1.869E-01 1.926E-01 1.979E-01 2.027E-01 2.070E-01 2.107E-01 2.139E-01 2.166E-01 2.186E-01 2.201E-01 2.209E-01 2.211E-01 2.208E-01 2.198E-01 2.183E-01 2.162E-01 2.136E-01 2.104E-01 2.068E-01 2.027E-01 1.981E-01 1.932E-01 1.879E-01 1.823E-01 1.764E-01 1.703E-01 1.640E-01 1.576E-01 1.510E-01 1.444E-01 1.378E-01 1.312E-01 1.246E-01 1.182E-01 1.118E-01 1.056E-01 9.961E-02 9.380E-02 8.823E-02 8.290E-02 7.784E-02 7.305E-02 6.854E-02 6.433E-02 6.041E-02 5.679E-02 5.346E-02 5.043E-02 4.770E-02 4.524E-02 4.307E-02 4.118E-02 3.955E-02 3.819E-02 3.708E-02 3.623E-02 3.562E-02 3.526E-02 3.513E-02 3.526E-02 3.562E-02 3.623E-02 3.708E-02 3.819E-02 3.955E-02 4.118E-02 4.307E-02 4.524E-02 4.770E-02 5.043E-02 5.346E-02 5.679E-02 6.041E-02 6.433E-02 6.854E-02 7.305E-02 7.784E-02 8.290E-02 8.823E-02 9.380E-02 9.961E-02 1.056E-01 1.118E-01 1.182E-01 1.246E-01 1.312E-01 1.378E-01 1.444E-01 1.510E-01 1.576E-01 1.640E-01 1.703E-01 1.764E-01 1.823E-01 1.879E-01 1.932E-01 1.981E-01 2.027E-01 2.068E-01 2.104E-01 2.136E-01 2.162E-01 2.183E-01 2.198E-01 2.208E-01 2.211E-01 2.209E-01 2.201E-01 2.186E-01 2.166E-01 2.139E-01 2.107E-01 2.070E-01 2.027E-01 1.979E-01 1.926E-01 1.869E-01 1.807E-01 1.742E-01 1.673E-01 1.602E-01 1.528E-01 1.451E-01 1.374E-01 1.294E-01 1.215E-01 1.135E-01 1.055E-01 9.758E-02 8.977E-02 8.211E-02 7.463E-02 6.738E-02 6.039E-02 5.369E-02 4.730E-02 4.127E-02 3.560E-02 3.032E-02 2.545E-02 2.099E-02 1.697E-02 1.337E-02 1.022E-02 7.506E-03 5.225E-03 3.372E-03 1.937E-03 9.085E-04 2.717E-04 9.360E-06 1.022E-04 5.289E-04 1.266E-03 2.290E-03 3.575E-03 5.093E-03 6.817E-03 8.719E-03 1.077E-02 1.295E-02 1.521E-02 1.754E-02 1.991E-02 2.230E-02 2.467E-02 2.700E-02 2.927E-02 3.146E-02 3.355E-02 3.551E-02 3.735E-02 3.903E-02 4.054E-02 4.189E-02 4.305E-02 4.402E-02 4.480E-02 4.538E-02 4.577E-02 4.595E-02 4.594E-02 4.574E-02 4.535E-02 4.479E-02 4.405E-02 4.283E-02 4.378E-02 4.457E-02 4.519E-02 4.563E-02 4.590E-02 4.597E-02 4.585E-02 4.554E-02 4.502E-02 4.431E-02 4.341E-02 4.232E-02 4.104E-02 3.958E-02 3.796E-02 3.619E-02 3.428E-02 3.224E-02 3.009E-02 2.786E-02 2.555E-02 2.320E-02 2.083E-02 1.846E-02 1.612E-02 1.383E-02 1.163E-02 9.533E-03 7.574E-03 5.780E-03 4.180E-03 2.801E-03 1.668E-03 8.092E-04 2.478E-04 7.597E-06 1.101E-04 5.752E-04 1.421E-03 2.662E-03 4.312E-03 6.381E-03 8.877E-03 1.180E-02 1.516E-02 1.896E-02 2.317E-02 2.781E-02 3.285E-02 3.829E-02 4.409E-02 5.025E-02 5.674E-02 6.353E-02 7.060E-02 7.790E-02 8.540E-02 9.307E-02 1.009E-01 1.087E-01 1.167E-01 1.246E-01 1.325E-01 1.402E-01 1.479E-01 1.554E-01 1.626E-01 1.696E-01 1.763E-01 1.826E-01 1.886E-01 1.941E-01 1.992E-01 2.038E-01 2.079E-01 2.115E-01 2.146E-01 2.170E-01 2.189E-01 2.202E-01 2.210E-01 2.211E-01 2.207E-01 2.197E-01 2.182E-01 2.161E-01 2.135E-01 2.104E-01 2.069E-01 2.029E-01 1.985E-01 1.937E-01 1.887E-01 1.833E-01 1.777E-01 1.718E-01 1.658E-01 1.597E-01 1.534E-01 1.471E-01 1.408E-01 1.346E-01 1.284E-01 1.222E-01 1.162E-01 1.104E-01 1.047E-01 9.920E-02 9.394E-02 8.891E-02 8.413E-02 7.962E-02 7.537E-02 7.141E-02 6.772E-02 6.433E-02 6.122E-02 5.839E-02 5.585E-02 5.359E-02 5.161E-02 4.991E-02 4.847E-02 4.731E-02 4.640E-02 4.576E-02 4.537E-02 4.524E-02 4.537E-02 4.576E-02 4.640E-02 4.731E-02 4.847E-02 4.991E-02 5.161E-02 5.359E-02 5.585E-02 5.839E-02 6.122E-02 6.433E-02 6.772E-02 7.141E-02 7.537E-02 7.962E-02 8.413E-02 8.891E-02 9.394E-02 9.920E-02 1.047E-01 1.104E-01 1.162E-01 1.222E-01 1.284E-01 1.346E-01 1.408E-01 1.471E-01 1.534E-01 1.597E-01 1.658E-01 1.718E-01 1.777E-01 1.833E-01 1.887E-01 1.937E-01 1.985E-01 2.029E-01 2.069E-01 2.104E-01 2.135E-01 2.161E-01 2.182E-01 2.197E-01 2.207E-01 2.211E-01 2.210E-01 2.202E-01 2.189E-01 2.170E-01 2.146E-01 2.115E-01 2.079E-01 2.038E-01 1.992E-01 1.941E-01 1.886E-01 1.826E-01 1.763E-01 1.696E-01 1.626E-01 1.554E-01 1.479E-01 1.402E-01 1.325E-01 1.246E-01 1.167E-01 1.087E-01 1.009E-01 9.307E-02 8.540E-02 7.790E-02 7.060E-02 6.353E-02 5.674E-02 5.025E-02 4.409E-02 3.829E-02 3.285E-02 2.781E-02 2.317E-02 1.896E-02 1.516E-02 1.180E-02 8.877E-03 6.381E-03 4.312E-03 2.662E-03 1.421E-03 5.752E-04 1.101E-04 7.597E-06 2.478E-04 8.092E-04 1.668E-03 2.801E-03 4.180E-03 5.780E-03 7.574E-03 9.533E-03 1.163E-02 1.383E-02 1.612E-02 1.846E-02 2.083E-02 2.320E-02 2.555E-02 2.786E-02 3.009E-02 3.224E-02 3.428E-02 3.619E-02 3.796E-02 3.958E-02 4.104E-02 4.232E-02 4.341E-02 4.431E-02 4.502E-02 4.554E-02 4.585E-02 4.597E-02 4.590E-02 4.563E-02 4.519E-02 4.457E-02 4.378E-02 4.250E-02 4.349E-02 4.433E-02 4.500E-02 4.551E-02 4.583E-02 4.597E-02 4.591E-02 4.567E-02 4.522E-02 4.458E-02 4.375E-02 4.273E-02 4.152E-02 4.013E-02 3.858E-02 3.686E-02 3.501E-02 3.302E-02 3.092E-02 2.872E-02 2.645E-02 2.413E-02 2.177E-02 1.940E-02 1.706E-02 1.475E-02 1.252E-02 1.039E-02 8.375E-03 6.516E-03 4.838E-03 3.367E-03 2.130E-03 1.152E-03 4.594E-04 7.455E-05 1.967E-05 3.151E-04 9.791E-04 2.028E-03 3.475E-03 5.332E-03 7.608E-03 1.031E-02 1.344E-02 1.699E-02 2.097E-02 2.536E-02 3.016E-02 3.536E-02 4.093E-02 4.686E-02 5.313E-02 5.971E-02 6.657E-02 7.368E-02 8.101E-02 8.852E-02 9.618E-02 1.039E-01 1.118E-01 1.196E-01 1.275E-01 1.352E-01 1.429E-01 1.504E-01 1.578E-01 1.648E-01 1.717E-01 1.782E-01 1.843E-01 1.901E-01 1.955E-01 2.004E-01 2.048E-01 2.087E-01 2.121E-01 2.150E-01 2.174E-01 2.191E-01 2.204E-01 2.210E-01 2.211E-01 2.207E-01 2.197E-01 2.181E-01 2.161E-01 2.136E-01 2.106E-01 2.072E-01 2.033E-01 1.991E-01 1.946E-01 1.897E-01 1.846E-01 1.792E-01 1.737E-01 1.679E-01 1.621E-01 1.562E-01 1.503E-01 1.443E-01 1.384E-01 1.325E-01 1.267E-01 1.211E-01 1.156E-01 1.102E-01 1.051E-01 1.001E-01 9.543E-02 9.095E-02 8.673E-02 8.276E-02 7.907E-02 7.565E-02 7.250E-02 6.963E-02 6.704E-02 6.473E-02 6.270E-02 6.095E-02 5.947E-02 5.826E-02 5.732E-02 5.665E-02 5.625E-02 5.612E-02 5.625E-02 5.665E-02 5.732E-02 5.826E-02 5.947E-02 6.095E-02 6.270E-02 6.473E-02 6.704E-02 6.963E-02 7.250E-02 7.565E-02 7.907E-02 8.276E-02 8.673E-02 9.095E-02 9.543E-02 1.001E-01 1.051E-01 1.102E-01 1.156E-01 1.211E-01 1.267E-01 1.325E-01 1.384E-01 1.443E-01 1.503E-01 1.562E-01 1.621E-01 1.679E-01 1.737E-01 1.792E-01 1.846E-01 1.897E-01 1.946E-01 1.991E-01 2.033E-01 2.072E-01 2.106E-01 2.136E-01 2.161E-01 2.181E-01 2.197E-01 2.207E-01 2.211E-01 2.210E-01 2.204E-01 2.191E-01 2.174E-01 2.150E-01 2.121E-01 2.087E-01 2.048E-01 2.004E-01 1.955E-01 1.901E-01 1.843E-01 1.782E-01 1.717E-01 1.648E-01 1.578E-01 1.504E-01 1.429E-01 1.352E-01 1.275E-01 1.196E-01 1.118E-01 1.039E-01 9.618E-02 8.852E-02 8.101E-02 7.368E-02 6.657E-02 5.971E-02 5.313E-02 4.686E-02 4.093E-02 3.536E-02 3.016E-02 2.536E-02 2.097E-02 1.699E-02 1.344E-02 1.031E-02 7.608E-03 5.332E-03 3.475E-03 2.028E-03 9.791E-04 3.151E-04 1.967E-05 7.455E-05 4.594E-04 1.152E-03 2.130E-03 3.367E-03 4.838E-03 6.516E-03 8.375E-03 1.039E-02 1.252E-02 1.475E-02 1.706E-02 1.940E-02 2.177E-02 2.413E-02 2.645E-02 2.872E-02 3.092E-02 3.302E-02 3.501E-02 3.686E-02 3.858E-02 4.013E-02 4.152E-02 4.273E-02 4.375E-02 4.458E-02 4.522E-02 4.567E-02 4.591E-02 4.597E-02 4.583E-02 4.551E-02 4.500E-02 4.433E-02 4.349E-02 4.213E-02 4.317E-02 4.406E-02 4.479E-02 4.535E-02 4.574E-02 4.594E-02 4.595E-02 4.578E-02 4.540E-02 4.484E-02 4.408E-02 4.312E-02 4.199E-02 4.067E-02 3.918E-02 3.753E-02 3.573E-02 3.380E-02 3.175E-02 2.960E-02 2.736E-02 2.506E-02 2.272E-02 2.037E-02 1.802E-02 1.571E-02 1.345E-02 1.128E-02 9.219E-03 7.300E-03 5.548E-03 3.989E-03 2.651E-03 1.559E-03 7.385E-04 2.122E-04 2.840E-06 1.311E-04 6.158E-04 1.474E-03 2.720E-03 4.365E-03 6.421E-03 8.893E-03 1.179E-02 1.510E-02 1.883E-02 2.298E-02 2.754E-02 3.249E-02 3.782E-02 4.351E-02 4.955E-02 5.591E-02 6.255E-02 6.947E-02 7.661E-02 8.396E-02 9.147E-02 9.910E-02 1.068E-01 1.146E-01 1.224E-01 1.301E-01 1.378E-01 1.453E-01 1.527E-01 1.599E-01 1.668E-01 1.735E-01 1.798E-01 1.858E-01 1.914E-01 1.966E-01 2.013E-01 2.056E-01 2.094E-01 2.126E-01 2.154E-01 2.176E-01 2.193E-01 2.204E-01 2.210E-01 2.211E-01 2.206E-01 2.197E-01 2.182E-01 2.162E-01 2.138E-01 2.109E-01 2.076E-01 2.040E-01 2.000E-01 1.956E-01 1.910E-01 1.861E-01 1.811E-01 1.758E-01 1.704E-01 1.649E-01 1.594E-01 1.538E-01 1.482E-01 1.426E-01 1.371E-01 1.317E-01 1.264E-01 1.212E-01 1.162E-01 1.114E-01 1.068E-01 1.024E-01 9.826E-02 9.435E-02 9.068E-02 8.727E-02 8.413E-02 8.126E-02 7.866E-02 7.633E-02 7.428E-02 7.250E-02 7.100E-02 6.977E-02 6.881E-02 6.813E-02 6.772E-02 6.759E-02 6.772E-02 6.813E-02 6.881E-02 6.977E-02 7.100E-02 7.250E-02 7.428E-02 7.633E-02 7.866E-02 8.126E-02 8.413E-02 8.727E-02 9.068E-02 9.435E-02 9.826E-02 1.024E-01 1.068E-01 1.114E-01 1.162E-01 1.212E-01 1.264E-01 1.317E-01 1.371E-01 1.426E-01 1.482E-01 1.538E-01 1.594E-01 1.649E-01 1.704E-01 1.758E-01 1.811E-01 1.861E-01 1.910E-01 1.956E-01 2.000E-01 2.040E-01 2.076E-01 2.109E-01 2.138E-01 2.162E-01 2.182E-01 2.197E-01 2.206E-01 2.211E-01 2.210E-01 2.204E-01 2.193E-01 2.176E-01 2.154E-01 2.126E-01 2.094E-01 2.056E-01 2.013E-01 1.966E-01 1.914E-01 1.858E-01 1.798E-01 1.735E-01 1.668E-01 1.599E-01 1.527E-01 1.453E-01 1.378E-01 1.301E-01 1.224E-01 1.146E-01 1.068E-01 9.910E-02 9.147E-02 8.396E-02 7.661E-02 6.947E-02 6.255E-02 5.591E-02 4.955E-02 4.351E-02 3.782E-02 3.249E-02 2.754E-02 2.298E-02 1.883E-02 1.510E-02 1.179E-02 8.893E-03 6.421E-03 4.365E-03 2.720E-03 1.474E-03 6.158E-04 1.311E-04 2.840E-06 2.122E-04 7.385E-04 1.559E-03 2.651E-03 3.989E-03 5.548E-03 7.300E-03 9.219E-03 1.128E-02 1.345E-02 1.571E-02 1.802E-02 2.037E-02 2.272E-02 2.506E-02 2.736E-02 2.960E-02 3.175E-02 3.380E-02 3.573E-02 3.753E-02 3.918E-02 4.067E-02 4.199E-02 4.312E-02 4.408E-02 4.484E-02 4.540E-02 4.578E-02 4.595E-02 4.594E-02 4.574E-02 4.535E-02 4.479E-02 4.406E-02 4.317E-02 4.175E-02 4.283E-02 4.377E-02 4.456E-02 4.518E-02 4.562E-02 4.589E-02 4.597E-02 4.586E-02 4.556E-02 4.507E-02 4.438E-02 4.350E-02 4.244E-02 4.119E-02 3.977E-02 3.819E-02 3.645E-02 3.458E-02 3.258E-02 3.047E-02 2.828E-02 2.601E-02 2.369E-02 2.135E-02 1.901E-02 1.668E-02 1.441E-02 1.221E-02 1.011E-02 8.131E-03 6.309E-03 4.668E-03 3.234E-03 2.031E-03 1.086E-03 4.223E-04 6.178E-05 2.589E-05 3.339E-04 1.003E-03 2.049E-03 3.485E-03 5.320E-03 7.564E-03 1.022E-02 1.329E-02 1.678E-02 2.068E-02 2.499E-02 2.969E-02 3.477E-02 4.022E-02 4.602E-02 5.215E-02 5.857E-02 6.528E-02 7.223E-02 7.939E-02 8.674E-02 9.423E-02 1.018E-01 1.095E-01 1.172E-01 1.249E-01 1.325E-01 1.401E-01 1.475E-01 1.547E-01 1.618E-01 1.685E-01 1.750E-01 1.812E-01 1.870E-01 1.925E-01 1.975E-01 2.021E-01 2.062E-01 2.098E-01 2.130E-01 2.156E-01 2.178E-01 2.194E-01 2.205E-01 2.211E-01 2.211E-01 2.207E-01 2.197E-01 2.183E-01 2.164E-01 2.141E-01 2.114E-01 2.083E-01 2.048E-01 2.010E-01 1.969E-01 1.926E-01 1.880E-01 1.832E-01 1.783E-01 1.732E-01 1.680E-01 1.628E-01 1.576E-01 1.523E-01 1.471E-01 1.420E-01 1.370E-01 1.320E-01 1.272E-01 1.226E-01 1.182E-01 1.139E-01 1.098E-01 1.060E-01 1.024E-01 9.907E-02 9.597E-02 9.313E-02 9.054E-02 8.823E-02 8.618E-02 8.441E-02 8.290E-02 8.167E-02 8.071E-02 8.003E-02 7.962E-02 7.948E-02 7.962E-02 8.003E-02 8.071E-02 8.167E-02 8.290E-02 8.441E-02 8.618E-02 8.823E-02 9.054E-02 9.313E-02 9.597E-02 9.907E-02 1.024E-01 1.060E-01 1.098E-01 1.139E-01 1.182E-01 1.226E-01 1.272E-01 1.320E-01 1.370E-01 1.420E-01 1.471E-01 1.523E-01 1.576E-01 1.628E-01 1.680E-01 1.732E-01 1.783E-01 1.832E-01 1.880E-01 1.926E-01 1.969E-01 2.010E-01 2.048E-01 2.083E-01 2.114E-01 2.141E-01 2.164E-01 2.183E-01 2.197E-01 2.207E-01 2.211E-01 2.211E-01 2.205E-01 2.194E-01 2.178E-01 2.156E-01 2.130E-01 2.098E-01 2.062E-01 2.021E-01 1.975E-01 1.925E-01 1.870E-01 1.812E-01 1.750E-01 1.685E-01 1.618E-01 1.547E-01 1.475E-01 1.401E-01 1.325E-01 1.249E-01 1.172E-01 1.095E-01 1.018E-01 9.423E-02 8.674E-02 7.939E-02 7.223E-02 6.528E-02 5.857E-02 5.215E-02 4.602E-02 4.022E-02 3.477E-02 2.969E-02 2.499E-02 2.068E-02 1.678E-02 1.329E-02 1.022E-02 7.564E-03 5.320E-03 3.485E-03 2.049E-03 1.003E-03 3.339E-04 2.589E-05 6.178E-05 4.223E-04 1.086E-03 2.031E-03 3.234E-03 4.668E-03 6.309E-03 8.131E-03 1.011E-02 1.221E-02 1.441E-02 1.668E-02 1.901E-02 2.135E-02 2.369E-02 2.601E-02 2.828E-02 3.047E-02 3.258E-02 3.458E-02 3.645E-02 3.819E-02 3.977E-02 4.119E-02 4.244E-02 4.350E-02 4.438E-02 4.507E-02 4.556E-02 4.586E-02 4.597E-02 4.589E-02 4.562E-02 4.518E-02 4.456E-02 4.377E-02 4.283E-02 4.134E-02 4.247E-02 4.346E-02 4.430E-02 4.497E-02 4.548E-02 4.581E-02 4.596E-02 4.593E-02 4.570E-02 4.528E-02 4.466E-02 4.386E-02 4.287E-02 4.170E-02 4.035E-02 3.884E-02 3.717E-02 3.535E-02 3.341E-02 3.135E-02 2.920E-02 2.697E-02 2.468E-02 2.235E-02 2.002E-02 1.769E-02 1.540E-02 1.317E-02 1.103E-02 9.008E-03 7.122E-03 5.403E-03 3.877E-03 2.568E-03 1.504E-03 7.061E-04 1.983E-04 1.762E-06 1.362E-04 6.196E-04 1.468E-03 2.695E-03 4.312E-03 6.328E-03 8.750E-03 1.158E-02 1.482E-02 1.847E-02 2.252E-02 2.697E-02 3.180E-02 3.700E-02 4.255E-02 4.844E-02 5.464E-02 6.112E-02 6.786E-02 7.484E-02 8.200E-02 8.934E-02 9.680E-02 1.043E-01 1.120E-01 1.196E-01 1.272E-01 1.347E-01 1.421E-01 1.494E-01 1.565E-01 1.634E-01 1.700E-01 1.764E-01 1.824E-01 1.880E-01 1.933E-01 1.982E-01 2.027E-01 2.066E-01 2.102E-01 2.132E-01 2.158E-01 2.179E-01 2.194E-01 2.205E-01 2.210E-01 2.211E-01 2.207E-01 2.198E-01 2.185E-01 2.167E-01 2.146E-01 2.120E-01 2.091E-01 2.058E-01 2.023E-01 1.984E-01 1.944E-01 1.901E-01 1.856E-01 1.810E-01 1.763E-01 1.714E-01 1.666E-01 1.617E-01 1.568E-01 1.520E-01 1.473E-01 1.426E-01 1.380E-01 1.336E-01 1.293E-01 1.252E-01 1.213E-01 1.176E-01 1.142E-01 1.109E-01 1.079E-01 1.051E-01 1.026E-01 1.003E-01 9.826E-02 9.651E-02 9.502E-02 9.380E-02 9.285E-02 9.218E-02 9.177E-02 9.163E-02 9.177E-02 9.218E-02 9.285E-02 9.380E-02 9.502E-02 9.651E-02 9.826E-02 1.003E-01 1.026E-01 1.051E-01 1.079E-01 1.109E-01 1.142E-01 1.176E-01 1.213E-01 1.252E-01 1.293E-01 1.336E-01 1.380E-01 1.426E-01 1.473E-01 1.520E-01 1.568E-01 1.617E-01 1.666E-01 1.714E-01 1.763E-01 1.810E-01 1.856E-01 1.901E-01 1.944E-01 1.984E-01 2.023E-01 2.058E-01 2.091E-01 2.120E-01 2.146E-01 2.167E-01 2.185E-01 2.198E-01 2.207E-01 2.211E-01 2.210E-01 2.205E-01 2.194E-01 2.179E-01 2.158E-01 2.132E-01 2.102E-01 2.066E-01 2.027E-01 1.982E-01 1.933E-01 1.880E-01 1.824E-01 1.764E-01 1.700E-01 1.634E-01 1.565E-01 1.494E-01 1.421E-01 1.347E-01 1.272E-01 1.196E-01 1.120E-01 1.043E-01 9.680E-02 8.934E-02 8.200E-02 7.484E-02 6.786E-02 6.112E-02 5.464E-02 4.844E-02 4.255E-02 3.700E-02 3.180E-02 2.697E-02 2.252E-02 1.847E-02 1.482E-02 1.158E-02 8.750E-03 6.328E-03 4.312E-03 2.695E-03 1.468E-03 6.196E-04 1.362E-04 1.762E-06 1.983E-04 7.061E-04 1.504E-03 2.568E-03 3.877E-03 5.403E-03 7.122E-03 9.008E-03 1.103E-02 1.317E-02 1.540E-02 1.769E-02 2.002E-02 2.235E-02 2.468E-02 2.697E-02 2.920E-02 3.135E-02 3.341E-02 3.535E-02 3.717E-02 3.884E-02 4.035E-02 4.170E-02 4.287E-02 4.386E-02 4.466E-02 4.528E-02 4.570E-02 4.593E-02 4.596E-02 4.581E-02 4.548E-02 4.497E-02 4.430E-02 4.346E-02 4.247E-02 4.091E-02 4.208E-02 4.312E-02 4.401E-02 4.474E-02 4.531E-02 4.571E-02 4.593E-02 4.596E-02 4.581E-02 4.546E-02 4.492E-02 4.420E-02 4.328E-02 4.219E-02 4.091E-02 3.947E-02 3.787E-02 3.612E-02 3.423E-02 3.223E-02 3.012E-02 2.793E-02 2.567E-02 2.337E-02 2.105E-02 1.872E-02 1.643E-02 1.418E-02 1.200E-02 9.931E-03 7.986E-03 6.193E-03 4.580E-03 3.171E-03 1.991E-03 1.065E-03 4.139E-04 6.067E-05 2.515E-05 3.258E-04 9.791E-04 2.000E-03 3.400E-03 5.189E-03 7.376E-03 9.965E-03 1.296E-02 1.635E-02 2.015E-02 2.434E-02 2.891E-02 3.385E-02 3.916E-02 4.480E-02 5.076E-02 5.701E-02 6.353E-02 7.030E-02 7.728E-02 8.444E-02 9.174E-02 9.916E-02 1.067E-01 1.142E-01 1.217E-01 1.292E-01 1.366E-01 1.439E-01 1.511E-01 1.580E-01 1.648E-01 1.713E-01 1.775E-01 1.833E-01 1.889E-01 1.940E-01 1.987E-01 2.031E-01 2.069E-01 2.104E-01 2.133E-01 2.158E-01 2.179E-01 2.194E-01 2.204E-01 2.210E-01 2.211E-01 2.208E-01 2.200E-01 2.188E-01 2.171E-01 2.151E-01 2.128E-01 2.100E-01 2.070E-01 2.037E-01 2.001E-01 1.963E-01 1.924E-01 1.882E-01 1.839E-01 1.796E-01 1.751E-01 1.706E-01 1.661E-01 1.616E-01 1.572E-01 1.528E-01 1.485E-01 1.443E-01 1.403E-01 1.364E-01 1.326E-01 1.291E-01 1.257E-01 1.226E-01 1.197E-01 1.170E-01 1.145E-01 1.123E-01 1.104E-01 1.087E-01 1.072E-01 1.060E-01 1.051E-01 1.044E-01 1.040E-01 1.039E-01 1.040E-01 1.044E-01 1.051E-01 1.060E-01 1.072E-01 1.087E-01 1.104E-01 1.123E-01 1.145E-01 1.170E-01 1.197E-01 1.226E-01 1.257E-01 1.291E-01 1.326E-01 1.364E-01 1.403E-01 1.443E-01 1.485E-01 1.528E-01 1.572E-01 1.616E-01 1.661E-01 1.706E-01 1.751E-01 1.796E-01 1.839E-01 1.882E-01 1.924E-01 1.963E-01 2.001E-01 2.037E-01 2.070E-01 2.100E-01 2.128E-01 2.151E-01 2.171E-01 2.188E-01 2.200E-01 2.208E-01 2.211E-01 2.210E-01 2.204E-01 2.194E-01 2.179E-01 2.158E-01 2.133E-01 2.104E-01 2.069E-01 2.031E-01 1.987E-01 1.940E-01 1.889E-01 1.833E-01 1.775E-01 1.713E-01 1.648E-01 1.580E-01 1.511E-01 1.439E-01 1.366E-01 1.292E-01 1.217E-01 1.142E-01 1.067E-01 9.916E-02 9.174E-02 8.444E-02 7.728E-02 7.030E-02 6.353E-02 5.701E-02 5.076E-02 4.480E-02 3.916E-02 3.385E-02 2.891E-02 2.434E-02 2.015E-02 1.635E-02 1.296E-02 9.965E-03 7.376E-03 5.189E-03 3.400E-03 2.000E-03 9.791E-04 3.258E-04 2.515E-05 6.067E-05 4.139E-04 1.065E-03 1.991E-03 3.171E-03 4.580E-03 6.193E-03 7.986E-03 9.931E-03 1.200E-02 1.418E-02 1.643E-02 1.872E-02 2.105E-02 2.337E-02 2.567E-02 2.793E-02 3.012E-02 3.223E-02 3.423E-02 3.612E-02 3.787E-02 3.947E-02 4.091E-02 4.219E-02 4.328E-02 4.420E-02 4.492E-02 4.546E-02 4.581E-02 4.596E-02 4.593E-02 4.571E-02 4.531E-02 4.474E-02 4.401E-02 4.312E-02 4.208E-02 4.045E-02 4.167E-02 4.275E-02 4.370E-02 4.449E-02 4.512E-02 4.558E-02 4.587E-02 4.597E-02 4.589E-02 4.562E-02 4.516E-02 4.451E-02 4.368E-02 4.266E-02 4.146E-02 4.009E-02 3.856E-02 3.687E-02 3.505E-02 3.310E-02 3.105E-02 2.890E-02 2.668E-02 2.440E-02 2.210E-02 1.978E-02 1.748E-02 1.521E-02 1.301E-02 1.090E-02 8.898E-03 7.039E-03 5.344E-03 3.839E-03 2.550E-03 1.499E-03 7.096E-04 2.042E-04 2.840E-06 1.244E-04 5.861E-04 1.403E-03 2.589E-03 4.153E-03 6.106E-03 8.452E-03 1.120E-02 1.434E-02 1.787E-02 2.180E-02 2.611E-02 3.080E-02 3.584E-02 4.123E-02 4.694E-02 5.296E-02 5.925E-02 6.580E-02 7.258E-02 7.955E-02 8.668E-02 9.395E-02 1.013E-01 1.087E-01 1.162E-01 1.236E-01 1.310E-01 1.383E-01 1.455E-01 1.525E-01 1.593E-01 1.659E-01 1.723E-01 1.783E-01 1.841E-01 1.895E-01 1.945E-01 1.991E-01 2.033E-01 2.071E-01 2.104E-01 2.133E-01 2.158E-01 2.178E-01 2.193E-01 2.204E-01 2.210E-01 2.211E-01 2.209E-01 2.202E-01 2.191E-01 2.176E-01 2.158E-01 2.136E-01 2.111E-01 2.083E-01 2.053E-01 2.020E-01 1.985E-01 1.948E-01 1.910E-01 1.871E-01 1.830E-01 1.790E-01 1.748E-01 1.707E-01 1.666E-01 1.625E-01 1.585E-01 1.546E-01 1.508E-01 1.471E-01 1.436E-01 1.403E-01 1.371E-01 1.341E-01 1.313E-01 1.287E-01 1.264E-01 1.242E-01 1.224E-01 1.207E-01 1.193E-01 1.182E-01 1.173E-01 1.166E-01 1.162E-01 1.161E-01 1.162E-01 1.166E-01 1.173E-01 1.182E-01 1.193E-01 1.207E-01 1.224E-01 1.242E-01 1.264E-01 1.287E-01 1.313E-01 1.341E-01 1.371E-01 1.403E-01 1.436E-01 1.471E-01 1.508E-01 1.546E-01 1.585E-01 1.625E-01 1.666E-01 1.707E-01 1.748E-01 1.790E-01 1.830E-01 1.871E-01 1.910E-01 1.948E-01 1.985E-01 2.020E-01 2.053E-01 2.083E-01 2.111E-01 2.136E-01 2.158E-01 2.176E-01 2.191E-01 2.202E-01 2.209E-01 2.211E-01 2.210E-01 2.204E-01 2.193E-01 2.178E-01 2.158E-01 2.133E-01 2.104E-01 2.071E-01 2.033E-01 1.991E-01 1.945E-01 1.895E-01 1.841E-01 1.783E-01 1.723E-01 1.659E-01 1.593E-01 1.525E-01 1.455E-01 1.383E-01 1.310E-01 1.236E-01 1.162E-01 1.087E-01 1.013E-01 9.395E-02 8.668E-02 7.955E-02 7.258E-02 6.580E-02 5.925E-02 5.296E-02 4.694E-02 4.123E-02 3.584E-02 3.080E-02 2.611E-02 2.180E-02 1.787E-02 1.434E-02 1.120E-02 8.452E-03 6.106E-03 4.153E-03 2.589E-03 1.403E-03 5.861E-04 1.244E-04 2.840E-06 2.042E-04 7.096E-04 1.499E-03 2.550E-03 3.839E-03 5.344E-03 7.039E-03 8.898E-03 1.090E-02 1.301E-02 1.521E-02 1.748E-02 1.978E-02 2.210E-02 2.440E-02 2.668E-02 2.890E-02 3.105E-02 3.310E-02 3.505E-02 3.687E-02 3.856E-02 4.009E-02 4.146E-02 4.266E-02 4.368E-02 4.451E-02 4.516E-02 4.562E-02 4.589E-02 4.597E-02 4.587E-02 4.558E-02 4.512E-02 4.449E-02 4.370E-02 4.275E-02 4.167E-02 3.997E-02 4.123E-02 4.236E-02 4.336E-02 4.420E-02 4.490E-02 4.542E-02 4.578E-02 4.595E-02 4.594E-02 4.575E-02 4.537E-02 4.480E-02 4.404E-02 4.310E-02 4.198E-02 4.069E-02 3.923E-02 3.762E-02 3.586E-02 3.397E-02 3.197E-02 2.987E-02 2.769E-02 2.544E-02 2.316E-02 2.085E-02 1.855E-02 1.628E-02 1.405E-02 1.191E-02 9.859E-03 7.937E-03 6.167E-03 4.572E-03 3.178E-03 2.008E-03 1.086E-03 4.335E-04 7.095E-05 1.779E-05 2.917E-04 9.085E-04 1.882E-03 3.224E-03 4.944E-03 7.050E-03 9.544E-03 1.243E-02 1.571E-02 1.937E-02 2.342E-02 2.784E-02 3.262E-02 3.775E-02 4.320E-02 4.897E-02 5.503E-02 6.135E-02 6.791E-02 7.468E-02 8.164E-02 8.874E-02 9.596E-02 1.033E-01 1.106E-01 1.180E-01 1.253E-01 1.326E-01 1.398E-01 1.468E-01 1.537E-01 1.604E-01 1.669E-01 1.731E-01 1.790E-01 1.846E-01 1.899E-01 1.948E-01 1.993E-01 2.034E-01 2.071E-01 2.104E-01 2.132E-01 2.156E-01 2.176E-01 2.191E-01 2.202E-01 2.209E-01 2.211E-01 2.210E-01 2.204E-01 2.195E-01 2.182E-01 2.165E-01 2.145E-01 2.123E-01 2.097E-01 2.070E-01 2.040E-01 2.008E-01 1.974E-01 1.940E-01 1.904E-01 1.867E-01 1.830E-01 1.792E-01 1.755E-01 1.717E-01 1.680E-01 1.644E-01 1.609E-01 1.575E-01 1.542E-01 1.510E-01 1.480E-01 1.452E-01 1.426E-01 1.401E-01 1.379E-01 1.359E-01 1.341E-01 1.325E-01 1.312E-01 1.301E-01 1.292E-01 1.286E-01 1.282E-01 1.281E-01 1.282E-01 1.286E-01 1.292E-01 1.301E-01 1.312E-01 1.325E-01 1.341E-01 1.359E-01 1.379E-01 1.401E-01 1.426E-01 1.452E-01 1.480E-01 1.510E-01 1.542E-01 1.575E-01 1.609E-01 1.644E-01 1.680E-01 1.717E-01 1.755E-01 1.792E-01 1.830E-01 1.867E-01 1.904E-01 1.940E-01 1.974E-01 2.008E-01 2.040E-01 2.070E-01 2.097E-01 2.123E-01 2.145E-01 2.165E-01 2.182E-01 2.195E-01 2.204E-01 2.210E-01 2.211E-01 2.209E-01 2.202E-01 2.191E-01 2.176E-01 2.156E-01 2.132E-01 2.104E-01 2.071E-01 2.034E-01 1.993E-01 1.948E-01 1.899E-01 1.846E-01 1.790E-01 1.731E-01 1.669E-01 1.604E-01 1.537E-01 1.468E-01 1.398E-01 1.326E-01 1.253E-01 1.180E-01 1.106E-01 1.033E-01 9.596E-02 8.874E-02 8.164E-02 7.468E-02 6.791E-02 6.135E-02 5.503E-02 4.897E-02 4.320E-02 3.775E-02 3.262E-02 2.784E-02 2.342E-02 1.937E-02 1.571E-02 1.243E-02 9.544E-03 7.050E-03 4.944E-03 3.224E-03 1.882E-03 9.085E-04 2.917E-04 1.779E-05 7.095E-05 4.335E-04 1.086E-03 2.008E-03 3.178E-03 4.572E-03 6.167E-03 7.937E-03 9.859E-03 1.191E-02 1.405E-02 1.628E-02 1.855E-02 2.085E-02 2.316E-02 2.544E-02 2.769E-02 2.987E-02 3.197E-02 3.397E-02 3.586E-02 3.762E-02 3.923E-02 4.069E-02 4.198E-02 4.310E-02 4.404E-02 4.480E-02 4.537E-02 4.575E-02 4.594E-02 4.595E-02 4.578E-02 4.542E-02 4.490E-02 4.420E-02 4.336E-02 4.236E-02 4.123E-02 3.946E-02 4.076E-02 4.194E-02 4.299E-02 4.389E-02 4.464E-02 4.523E-02 4.566E-02 4.590E-02 4.597E-02 4.585E-02 4.555E-02 4.506E-02 4.438E-02 4.352E-02 4.248E-02 4.127E-02 3.988E-02 3.834E-02 3.666E-02 3.483E-02 3.289E-02 3.084E-02 2.870E-02 2.649E-02 2.424E-02 2.195E-02 1.965E-02 1.737E-02 1.513E-02 1.296E-02 1.087E-02 8.888E-03 7.048E-03 5.369E-03 3.877E-03 2.594E-03 1.544E-03 7.495E-04 2.307E-04 7.597E-06 9.812E-05 5.187E-04 1.284E-03 2.406E-03 3.896E-03 5.762E-03 8.009E-03 1.064E-02 1.366E-02 1.706E-02 2.084E-02 2.499E-02 2.950E-02 3.436E-02 3.956E-02 4.507E-02 5.088E-02 5.697E-02 6.330E-02 6.986E-02 7.661E-02 8.353E-02 9.059E-02 9.775E-02 1.050E-01 1.122E-01 1.195E-01 1.267E-01 1.339E-01 1.410E-01 1.479E-01 1.547E-01 1.612E-01 1.676E-01 1.736E-01 1.794E-01 1.849E-01 1.901E-01 1.948E-01 1.993E-01 2.033E-01 2.069E-01 2.102E-01 2.130E-01 2.154E-01 2.174E-01 2.189E-01 2.201E-01 2.208E-01 2.211E-01 2.211E-01 2.206E-01 2.198E-01 2.187E-01 2.173E-01 2.155E-01 2.135E-01 2.112E-01 2.087E-01 2.060E-01 2.032E-01 2.001E-01 1.970E-01 1.937E-01 1.904E-01 1.871E-01 1.837E-01 1.803E-01 1.770E-01 1.737E-01 1.704E-01 1.673E-01 1.642E-01 1.613E-01 1.585E-01 1.559E-01 1.534E-01 1.511E-01 1.490E-01 1.471E-01 1.455E-01 1.440E-01 1.427E-01 1.417E-01 1.408E-01 1.403E-01 1.399E-01 1.398E-01 1.399E-01 1.403E-01 1.408E-01 1.417E-01 1.427E-01 1.440E-01 1.455E-01 1.471E-01 1.490E-01 1.511E-01 1.534E-01 1.559E-01 1.585E-01 1.613E-01 1.642E-01 1.673E-01 1.704E-01 1.737E-01 1.770E-01 1.803E-01 1.837E-01 1.871E-01 1.904E-01 1.937E-01 1.970E-01 2.001E-01 2.032E-01 2.060E-01 2.087E-01 2.112E-01 2.135E-01 2.155E-01 2.173E-01 2.187E-01 2.198E-01 2.206E-01 2.211E-01 2.211E-01 2.208E-01 2.201E-01 2.189E-01 2.174E-01 2.154E-01 2.130E-01 2.102E-01 2.069E-01 2.033E-01 1.993E-01 1.948E-01 1.901E-01 1.849E-01 1.794E-01 1.736E-01 1.676E-01 1.612E-01 1.547E-01 1.479E-01 1.410E-01 1.339E-01 1.267E-01 1.195E-01 1.122E-01 1.050E-01 9.775E-02 9.059E-02 8.353E-02 7.661E-02 6.986E-02 6.330E-02 5.697E-02 5.088E-02 4.507E-02 3.956E-02 3.436E-02 2.950E-02 2.499E-02 2.084E-02 1.706E-02 1.366E-02 1.064E-02 8.009E-03 5.762E-03 3.896E-03 2.406E-03 1.284E-03 5.187E-04 9.812E-05 7.597E-06 2.307E-04 7.495E-04 1.544E-03 2.594E-03 3.877E-03 5.369E-03 7.048E-03 8.888E-03 1.087E-02 1.296E-02 1.513E-02 1.737E-02 1.965E-02 2.195E-02 2.424E-02 2.649E-02 2.870E-02 3.084E-02 3.289E-02 3.483E-02 3.666E-02 3.834E-02 3.988E-02 4.127E-02 4.248E-02 4.352E-02 4.438E-02 4.506E-02 4.555E-02 4.585E-02 4.597E-02 4.590E-02 4.566E-02 4.523E-02 4.464E-02 4.389E-02 4.299E-02 4.194E-02 4.076E-02 3.893E-02 4.027E-02 4.149E-02 4.259E-02 4.355E-02 4.436E-02 4.501E-02 4.550E-02 4.582E-02 4.596E-02 4.592E-02 4.570E-02 4.529E-02 4.470E-02 4.392E-02 4.296E-02 4.182E-02 4.052E-02 3.905E-02 3.744E-02 3.568E-02 3.380E-02 3.181E-02 2.972E-02 2.755E-02 2.532E-02 2.306E-02 2.078E-02 1.850E-02 1.625E-02 1.404E-02 1.192E-02 9.890E-03 7.986E-03 6.229E-03 4.644E-03 3.254E-03 2.083E-03 1.152E-03 4.831E-04 9.521E-05 7.280E-06 2.362E-04 7.971E-04 1.703E-03 2.966E-03 4.594E-03 6.595E-03 8.973E-03 1.173E-02 1.486E-02 1.837E-02 2.225E-02 2.650E-02 3.109E-02 3.602E-02 4.127E-02 4.682E-02 5.266E-02 5.875E-02 6.509E-02 7.163E-02 7.836E-02 8.524E-02 9.224E-02 9.933E-02 1.065E-01 1.137E-01 1.208E-01 1.279E-01 1.350E-01 1.419E-01 1.487E-01 1.554E-01 1.618E-01 1.680E-01 1.740E-01 1.796E-01 1.850E-01 1.901E-01 1.948E-01 1.991E-01 2.031E-01 2.066E-01 2.098E-01 2.126E-01 2.150E-01 2.170E-01 2.186E-01 2.198E-01 2.206E-01 2.211E-01 2.211E-01 2.208E-01 2.202E-01 2.193E-01 2.181E-01 2.165E-01 2.148E-01 2.128E-01 2.105E-01 2.081E-01 2.056E-01 2.029E-01 2.001E-01 1.972E-01 1.942E-01 1.912E-01 1.882E-01 1.852E-01 1.822E-01 1.793E-01 1.764E-01 1.737E-01 1.710E-01 1.684E-01 1.660E-01 1.637E-01 1.616E-01 1.597E-01 1.579E-01 1.563E-01 1.549E-01 1.538E-01 1.528E-01 1.520E-01 1.515E-01 1.511E-01 1.510E-01 1.511E-01 1.515E-01 1.520E-01 1.528E-01 1.538E-01 1.549E-01 1.563E-01 1.579E-01 1.597E-01 1.616E-01 1.637E-01 1.660E-01 1.684E-01 1.710E-01 1.737E-01 1.764E-01 1.793E-01 1.822E-01 1.852E-01 1.882E-01 1.912E-01 1.942E-01 1.972E-01 2.001E-01 2.029E-01 2.056E-01 2.081E-01 2.105E-01 2.128E-01 2.148E-01 2.165E-01 2.181E-01 2.193E-01 2.202E-01 2.208E-01 2.211E-01 2.211E-01 2.206E-01 2.198E-01 2.186E-01 2.170E-01 2.150E-01 2.126E-01 2.098E-01 2.066E-01 2.031E-01 1.991E-01 1.948E-01 1.901E-01 1.850E-01 1.796E-01 1.740E-01 1.680E-01 1.618E-01 1.554E-01 1.487E-01 1.419E-01 1.350E-01 1.279E-01 1.208E-01 1.137E-01 1.065E-01 9.933E-02 9.224E-02 8.524E-02 7.836E-02 7.163E-02 6.509E-02 5.875E-02 5.266E-02 4.682E-02 4.127E-02 3.602E-02 3.109E-02 2.650E-02 2.225E-02 1.837E-02 1.486E-02 1.173E-02 8.973E-03 6.595E-03 4.594E-03 2.966E-03 1.703E-03 7.971E-04 2.362E-04 7.280E-06 9.521E-05 4.831E-04 1.152E-03 2.083E-03 3.254E-03 4.644E-03 6.229E-03 7.986E-03 9.890E-03 1.192E-02 1.404E-02 1.625E-02 1.850E-02 2.078E-02 2.306E-02 2.532E-02 2.755E-02 2.972E-02 3.181E-02 3.380E-02 3.568E-02 3.744E-02 3.905E-02 4.052E-02 4.182E-02 4.296E-02 4.392E-02 4.470E-02 4.529E-02 4.570E-02 4.592E-02 4.596E-02 4.582E-02 4.550E-02 4.501E-02 4.436E-02 4.355E-02 4.259E-02 4.149E-02 4.027E-02 3.838E-02 3.975E-02 4.102E-02 4.216E-02 4.318E-02 4.405E-02 4.476E-02 4.532E-02 4.571E-02 4.593E-02 4.596E-02 4.582E-02 4.549E-02 4.498E-02 4.429E-02 4.341E-02 4.236E-02 4.113E-02 3.975E-02 3.820E-02 3.652E-02 3.470E-02 3.277E-02 3.073E-02 2.861E-02 2.642E-02 2.418E-02 2.192E-02 1.964E-02 1.739E-02 1.517E-02 1.301E-02 1.094E-02 8.978E-03 7.150E-03 5.479E-03 3.989E-03 2.703E-03 1.642E-03 8.283E-04 2.815E-04 2.057E-05 6.286E-05 4.241E-04 1.118E-03 2.157E-03 3.552E-03 5.308E-03 7.434E-03 9.931E-03 1.280E-02 1.604E-02 1.965E-02 2.361E-02 2.793E-02 3.259E-02 3.757E-02 4.286E-02 4.844E-02 5.429E-02 6.039E-02 6.671E-02 7.323E-02 7.991E-02 8.674E-02 9.367E-02 1.007E-01 1.078E-01 1.148E-01 1.219E-01 1.289E-01 1.358E-01 1.427E-01 1.493E-01 1.559E-01 1.622E-01 1.682E-01 1.741E-01 1.796E-01 1.849E-01 1.899E-01 1.945E-01 1.987E-01 2.027E-01 2.062E-01 2.094E-01 2.121E-01 2.146E-01 2.166E-01 2.182E-01 2.195E-01 2.204E-01 2.209E-01 2.211E-01 2.210E-01 2.206E-01 2.198E-01 2.188E-01 2.175E-01 2.160E-01 2.143E-01 2.124E-01 2.103E-01 2.080E-01 2.056E-01 2.032E-01 2.006E-01 1.980E-01 1.954E-01 1.927E-01 1.901E-01 1.875E-01 1.849E-01 1.824E-01 1.800E-01 1.777E-01 1.755E-01 1.734E-01 1.714E-01 1.697E-01 1.680E-01 1.666E-01 1.653E-01 1.642E-01 1.633E-01 1.626E-01 1.621E-01 1.618E-01 1.617E-01 1.618E-01 1.621E-01 1.626E-01 1.633E-01 1.642E-01 1.653E-01 1.666E-01 1.680E-01 1.697E-01 1.714E-01 1.734E-01 1.755E-01 1.777E-01 1.800E-01 1.824E-01 1.849E-01 1.875E-01 1.901E-01 1.927E-01 1.954E-01 1.980E-01 2.006E-01 2.032E-01 2.056E-01 2.080E-01 2.103E-01 2.124E-01 2.143E-01 2.160E-01 2.175E-01 2.188E-01 2.198E-01 2.206E-01 2.210E-01 2.211E-01 2.209E-01 2.204E-01 2.195E-01 2.182E-01 2.166E-01 2.146E-01 2.121E-01 2.094E-01 2.062E-01 2.027E-01 1.987E-01 1.945E-01 1.899E-01 1.849E-01 1.796E-01 1.741E-01 1.682E-01 1.622E-01 1.559E-01 1.493E-01 1.427E-01 1.358E-01 1.289E-01 1.219E-01 1.148E-01 1.078E-01 1.007E-01 9.367E-02 8.674E-02 7.991E-02 7.323E-02 6.671E-02 6.039E-02 5.429E-02 4.844E-02 4.286E-02 3.757E-02 3.259E-02 2.793E-02 2.361E-02 1.965E-02 1.604E-02 1.280E-02 9.931E-03 7.434E-03 5.308E-03 3.552E-03 2.157E-03 1.118E-03 4.241E-04 6.286E-05 2.057E-05 2.815E-04 8.283E-04 1.642E-03 2.703E-03 3.989E-03 5.479E-03 7.150E-03 8.978E-03 1.094E-02 1.301E-02 1.517E-02 1.739E-02 1.964E-02 2.192E-02 2.418E-02 2.642E-02 2.861E-02 3.073E-02 3.277E-02 3.470E-02 3.652E-02 3.820E-02 3.975E-02 4.113E-02 4.236E-02 4.341E-02 4.429E-02 4.498E-02 4.549E-02 4.582E-02 4.596E-02 4.593E-02 4.571E-02 4.532E-02 4.476E-02 4.405E-02 4.318E-02 4.216E-02 4.102E-02 3.975E-02 3.779E-02 3.921E-02 4.052E-02 4.171E-02 4.277E-02 4.370E-02 4.448E-02 4.510E-02 4.556E-02 4.585E-02 4.597E-02 4.591E-02 4.566E-02 4.523E-02 4.462E-02 4.383E-02 4.286E-02 4.172E-02 4.041E-02 3.895E-02 3.734E-02 3.559E-02 3.372E-02 3.174E-02 2.967E-02 2.752E-02 2.531E-02 2.307E-02 2.081E-02 1.855E-02 1.632E-02 1.414E-02 1.204E-02 1.002E-02 8.131E-03 6.381E-03 4.797E-03 3.402E-03 2.218E-03 1.266E-03 5.669E-04 1.389E-04 2.162E-07 1.670E-04 6.540E-04 1.474E-03 2.637E-03 4.153E-03 6.028E-03 8.267E-03 1.087E-02 1.384E-02 1.717E-02 2.086E-02 2.490E-02 2.928E-02 3.399E-02 3.901E-02 4.433E-02 4.992E-02 5.577E-02 6.186E-02 6.815E-02 7.463E-02 8.127E-02 8.803E-02 9.490E-02 1.018E-01 1.088E-01 1.158E-01 1.227E-01 1.296E-01 1.364E-01 1.431E-01 1.497E-01 1.561E-01 1.623E-01 1.682E-01 1.740E-01 1.794E-01 1.846E-01 1.895E-01 1.940E-01 1.982E-01 2.021E-01 2.056E-01 2.087E-01 2.115E-01 2.139E-01 2.160E-01 2.177E-01 2.191E-01 2.201E-01 2.207E-01 2.211E-01 2.211E-01 2.209E-01 2.203E-01 2.195E-01 2.185E-01 2.172E-01 2.158E-01 2.141E-01 2.123E-01 2.104E-01 2.083E-01 2.062E-01 2.040E-01 2.017E-01 1.994E-01 1.971E-01 1.948E-01 1.926E-01 1.904E-01 1.882E-01 1.861E-01 1.842E-01 1.823E-01 1.806E-01 1.790E-01 1.775E-01 1.762E-01 1.750E-01 1.740E-01 1.732E-01 1.726E-01 1.721E-01 1.718E-01 1.717E-01 1.718E-01 1.721E-01 1.726E-01 1.732E-01 1.740E-01 1.750E-01 1.762E-01 1.775E-01 1.790E-01 1.806E-01 1.823E-01 1.842E-01 1.861E-01 1.882E-01 1.904E-01 1.926E-01 1.948E-01 1.971E-01 1.994E-01 2.017E-01 2.040E-01 2.062E-01 2.083E-01 2.104E-01 2.123E-01 2.141E-01 2.158E-01 2.172E-01 2.185E-01 2.195E-01 2.203E-01 2.209E-01 2.211E-01 2.211E-01 2.207E-01 2.201E-01 2.191E-01 2.177E-01 2.160E-01 2.139E-01 2.115E-01 2.087E-01 2.056E-01 2.021E-01 1.982E-01 1.940E-01 1.895E-01 1.846E-01 1.794E-01 1.740E-01 1.682E-01 1.623E-01 1.561E-01 1.497E-01 1.431E-01 1.364E-01 1.296E-01 1.227E-01 1.158E-01 1.088E-01 1.018E-01 9.490E-02 8.803E-02 8.127E-02 7.463E-02 6.815E-02 6.186E-02 5.577E-02 4.992E-02 4.433E-02 3.901E-02 3.399E-02 2.928E-02 2.490E-02 2.086E-02 1.717E-02 1.384E-02 1.087E-02 8.267E-03 6.028E-03 4.153E-03 2.637E-03 1.474E-03 6.540E-04 1.670E-04 2.162E-07 1.389E-04 5.669E-04 1.266E-03 2.218E-03 3.402E-03 4.797E-03 6.381E-03 8.131E-03 1.002E-02 1.204E-02 1.414E-02 1.632E-02 1.855E-02 2.081E-02 2.307E-02 2.531E-02 2.752E-02 2.967E-02 3.174E-02 3.372E-02 3.559E-02 3.734E-02 3.895E-02 4.041E-02 4.172E-02 4.286E-02 4.383E-02 4.462E-02 4.523E-02 4.566E-02 4.591E-02 4.597E-02 4.585E-02 4.556E-02 4.510E-02 4.448E-02 4.370E-02 4.277E-02 4.171E-02 4.052E-02 3.921E-02 3.719E-02 3.864E-02 3.999E-02 4.122E-02 4.234E-02 4.332E-02 4.416E-02 4.485E-02 4.538E-02 4.575E-02 4.594E-02 4.596E-02 4.579E-02 4.545E-02 4.492E-02 4.422E-02 4.334E-02 4.228E-02 4.106E-02 3.967E-02 3.814E-02 3.646E-02 3.466E-02 3.274E-02 3.072E-02 2.862E-02 2.645E-02 2.424E-02 2.199E-02 1.974E-02 1.751E-02 1.531E-02 1.317E-02 1.112E-02 9.169E-03 7.347E-03 5.677E-03 4.180E-03 2.880E-03 1.797E-03 9.513E-04 3.627E-04 4.919E-05 2.738E-05 3.124E-04 9.178E-04 1.855E-03 3.134E-03 4.762E-03 6.745E-03 9.086E-03 1.179E-02 1.484E-02 1.825E-02 2.201E-02 2.611E-02 3.054E-02 3.529E-02 4.033E-02 4.566E-02 5.126E-02 5.710E-02 6.316E-02 6.942E-02 7.585E-02 8.243E-02 8.912E-02 9.590E-02 1.027E-01 1.096E-01 1.165E-01 1.233E-01 1.301E-01 1.368E-01 1.434E-01 1.498E-01 1.561E-01 1.622E-01 1.680E-01 1.736E-01 1.790E-01 1.841E-01 1.889E-01 1.933E-01 1.975E-01 2.013E-01 2.048E-01 2.079E-01 2.107E-01 2.132E-01 2.153E-01 2.171E-01 2.185E-01 2.196E-01 2.204E-01 2.209E-01 2.211E-01 2.211E-01 2.207E-01 2.202E-01 2.194E-01 2.183E-01 2.171E-01 2.158E-01 2.143E-01 2.126E-01 2.109E-01 2.091E-01 2.072E-01 2.053E-01 2.033E-01 2.014E-01 1.994E-01 1.975E-01 1.956E-01 1.938E-01 1.921E-01 1.904E-01 1.889E-01 1.875E-01 1.861E-01 1.850E-01 1.839E-01 1.830E-01 1.823E-01 1.817E-01 1.813E-01 1.811E-01 1.810E-01 1.811E-01 1.813E-01 1.817E-01 1.823E-01 1.830E-01 1.839E-01 1.850E-01 1.861E-01 1.875E-01 1.889E-01 1.904E-01 1.921E-01 1.938E-01 1.956E-01 1.975E-01 1.994E-01 2.014E-01 2.033E-01 2.053E-01 2.072E-01 2.091E-01 2.109E-01 2.126E-01 2.143E-01 2.158E-01 2.171E-01 2.183E-01 2.194E-01 2.202E-01 2.207E-01 2.211E-01 2.211E-01 2.209E-01 2.204E-01 2.196E-01 2.185E-01 2.171E-01 2.153E-01 2.132E-01 2.107E-01 2.079E-01 2.048E-01 2.013E-01 1.975E-01 1.933E-01 1.889E-01 1.841E-01 1.790E-01 1.736E-01 1.680E-01 1.622E-01 1.561E-01 1.498E-01 1.434E-01 1.368E-01 1.301E-01 1.233E-01 1.165E-01 1.096E-01 1.027E-01 9.590E-02 8.912E-02 8.243E-02 7.585E-02 6.942E-02 6.316E-02 5.710E-02 5.126E-02 4.566E-02 4.033E-02 3.529E-02 3.054E-02 2.611E-02 2.201E-02 1.825E-02 1.484E-02 1.179E-02 9.086E-03 6.745E-03 4.762E-03 3.134E-03 1.855E-03 9.178E-04 3.124E-04 2.738E-05 4.919E-05 3.627E-04 9.513E-04 1.797E-03 2.880E-03 4.180E-03 5.677E-03 7.347E-03 9.169E-03 1.112E-02 1.317E-02 1.531E-02 1.751E-02 1.974E-02 2.199E-02 2.424E-02 2.645E-02 2.862E-02 3.072E-02 3.274E-02 3.466E-02 3.646E-02 3.814E-02 3.967E-02 4.106E-02 4.228E-02 4.334E-02 4.422E-02 4.492E-02 4.545E-02 4.579E-02 4.596E-02 4.594E-02 4.575E-02 4.538E-02 4.485E-02 4.416E-02 4.332E-02 4.234E-02 4.122E-02 3.999E-02 3.864E-02 3.656E-02 3.804E-02 3.943E-02 4.071E-02 4.187E-02 4.291E-02 4.381E-02 4.457E-02 4.517E-02 4.561E-02 4.587E-02 4.597E-02 4.589E-02 4.563E-02 4.519E-02 4.458E-02 4.378E-02 4.281E-02 4.167E-02 4.037E-02 3.891E-02 3.731E-02 3.558E-02 3.373E-02 3.177E-02 2.972E-02 2.759E-02 2.541E-02 2.319E-02 2.096E-02 1.872E-02 1.652E-02 1.435E-02 1.226E-02 1.026E-02 8.375E-03 6.625E-03 5.035E-03 3.625E-03 2.418E-03 1.434E-03 6.919E-04 2.102E-04 6.105E-06 9.524E-05 4.916E-04 1.208E-03 2.254E-03 3.639E-03 5.369E-03 7.448E-03 9.880E-03 1.266E-02 1.580E-02 1.927E-02 2.309E-02 2.724E-02 3.170E-02 3.647E-02 4.153E-02 4.686E-02 5.244E-02 5.826E-02 6.429E-02 7.050E-02 7.687E-02 8.338E-02 8.999E-02 9.668E-02 1.034E-01 1.102E-01 1.170E-01 1.237E-01 1.304E-01 1.369E-01 1.434E-01 1.497E-01 1.559E-01 1.618E-01 1.676E-01 1.731E-01 1.783E-01 1.833E-01 1.880E-01 1.925E-01 1.966E-01 2.004E-01 2.038E-01 2.070E-01 2.098E-01 2.123E-01 2.145E-01 2.163E-01 2.179E-01 2.191E-01 2.200E-01 2.207E-01 2.210E-01 2.211E-01 2.210E-01 2.207E-01 2.201E-01 2.193E-01 2.184E-01 2.173E-01 2.161E-01 2.148E-01 2.133E-01 2.118E-01 2.103E-01 2.086E-01 2.070E-01 2.054E-01 2.038E-01 2.022E-01 2.006E-01 1.991E-01 1.977E-01 1.963E-01 1.951E-01 1.940E-01 1.929E-01 1.920E-01 1.912E-01 1.906E-01 1.901E-01 1.897E-01 1.895E-01 1.894E-01 1.895E-01 1.897E-01 1.901E-01 1.906E-01 1.912E-01 1.920E-01 1.929E-01 1.940E-01 1.951E-01 1.963E-01 1.977E-01 1.991E-01 2.006E-01 2.022E-01 2.038E-01 2.054E-01 2.070E-01 2.086E-01 2.103E-01 2.118E-01 2.133E-01 2.148E-01 2.161E-01 2.173E-01 2.184E-01 2.193E-01 2.201E-01 2.207E-01 2.210E-01 2.211E-01 2.210E-01 2.207E-01 2.200E-01 2.191E-01 2.179E-01 2.163E-01 2.145E-01 2.123E-01 2.098E-01 2.070E-01 2.038E-01 2.004E-01 1.966E-01 1.925E-01 1.880E-01 1.833E-01 1.783E-01 1.731E-01 1.676E-01 1.618E-01 1.559E-01 1.497E-01 1.434E-01 1.369E-01 1.304E-01 1.237E-01 1.170E-01 1.102E-01 1.034E-01 9.668E-02 8.999E-02 8.338E-02 7.687E-02 7.050E-02 6.429E-02 5.826E-02 5.244E-02 4.686E-02 4.153E-02 3.647E-02 3.170E-02 2.724E-02 2.309E-02 1.927E-02 1.580E-02 1.266E-02 9.880E-03 7.448E-03 5.369E-03 3.639E-03 2.254E-03 1.208E-03 4.916E-04 9.524E-05 6.105E-06 2.102E-04 6.919E-04 1.434E-03 2.418E-03 3.625E-03 5.035E-03 6.625E-03 8.375E-03 1.026E-02 1.226E-02 1.435E-02 1.652E-02 1.872E-02 2.096E-02 2.319E-02 2.541E-02 2.759E-02 2.972E-02 3.177E-02 3.373E-02 3.558E-02 3.731E-02 3.891E-02 4.037E-02 4.167E-02 4.281E-02 4.378E-02 4.458E-02 4.519E-02 4.563E-02 4.589E-02 4.597E-02 4.587E-02 4.561E-02 4.517E-02 4.457E-02 4.381E-02 4.291E-02 4.187E-02 4.071E-02 3.943E-02 3.804E-02 3.590E-02 3.741E-02 3.884E-02 4.016E-02 4.138E-02 4.247E-02 4.343E-02 4.425E-02 4.492E-02 4.543E-02 4.577E-02 4.595E-02 4.595E-02 4.578E-02 4.543E-02 4.489E-02 4.419E-02 4.331E-02 4.225E-02 4.104E-02 3.967E-02 3.814E-02 3.649E-02 3.470E-02 3.280E-02 3.081E-02 2.873E-02 2.659E-02 2.440E-02 2.218E-02 1.996E-02 1.775E-02 1.557E-02 1.345E-02 1.140E-02 9.461E-03 7.640E-03 5.964E-03 4.453E-03 3.130E-03 2.014E-03 1.126E-03 4.831E-04 1.036E-04 3.357E-06 1.969E-04 6.974E-04 1.516E-03 2.662E-03 4.143E-03 5.964E-03 8.130E-03 1.064E-02 1.350E-02 1.669E-02 2.022E-02 2.408E-02 2.826E-02 3.275E-02 3.753E-02 4.259E-02 4.791E-02 5.347E-02 5.925E-02 6.523E-02 7.139E-02 7.769E-02 8.412E-02 9.065E-02 9.724E-02 1.039E-01 1.105E-01 1.172E-01 1.238E-01 1.304E-01 1.368E-01 1.431E-01 1.493E-01 1.554E-01 1.612E-01 1.669E-01 1.723E-01 1.775E-01 1.824E-01 1.870E-01 1.914E-01 1.955E-01 1.992E-01 2.027E-01 2.058E-01 2.087E-01 2.112E-01 2.135E-01 2.154E-01 2.170E-01 2.184E-01 2.194E-01 2.202E-01 2.208E-01 2.211E-01 2.211E-01 2.210E-01 2.207E-01 2.202E-01 2.195E-01 2.187E-01 2.177E-01 2.167E-01 2.155E-01 2.143E-01 2.130E-01 2.117E-01 2.104E-01 2.091E-01 2.078E-01 2.065E-01 2.052E-01 2.040E-01 2.029E-01 2.018E-01 2.008E-01 2.000E-01 1.992E-01 1.985E-01 1.979E-01 1.975E-01 1.972E-01 1.970E-01 1.969E-01 1.970E-01 1.972E-01 1.975E-01 1.979E-01 1.985E-01 1.992E-01 2.000E-01 2.008E-01 2.018E-01 2.029E-01 2.040E-01 2.052E-01 2.065E-01 2.078E-01 2.091E-01 2.104E-01 2.117E-01 2.130E-01 2.143E-01 2.155E-01 2.167E-01 2.177E-01 2.187E-01 2.195E-01 2.202E-01 2.207E-01 2.210E-01 2.211E-01 2.211E-01 2.208E-01 2.202E-01 2.194E-01 2.184E-01 2.170E-01 2.154E-01 2.135E-01 2.112E-01 2.087E-01 2.058E-01 2.027E-01 1.992E-01 1.955E-01 1.914E-01 1.870E-01 1.824E-01 1.775E-01 1.723E-01 1.669E-01 1.612E-01 1.554E-01 1.493E-01 1.431E-01 1.368E-01 1.304E-01 1.238E-01 1.172E-01 1.105E-01 1.039E-01 9.724E-02 9.065E-02 8.412E-02 7.769E-02 7.139E-02 6.523E-02 5.925E-02 5.347E-02 4.791E-02 4.259E-02 3.753E-02 3.275E-02 2.826E-02 2.408E-02 2.022E-02 1.669E-02 1.350E-02 1.064E-02 8.130E-03 5.964E-03 4.143E-03 2.662E-03 1.516E-03 6.974E-04 1.969E-04 3.357E-06 1.036E-04 4.831E-04 1.126E-03 2.014E-03 3.130E-03 4.453E-03 5.964E-03 7.640E-03 9.461E-03 1.140E-02 1.345E-02 1.557E-02 1.775E-02 1.996E-02 2.218E-02 2.440E-02 2.659E-02 2.873E-02 3.081E-02 3.280E-02 3.470E-02 3.649E-02 3.814E-02 3.967E-02 4.104E-02 4.225E-02 4.331E-02 4.419E-02 4.489E-02 4.543E-02 4.578E-02 4.595E-02 4.595E-02 4.577E-02 4.543E-02 4.492E-02 4.425E-02 4.343E-02 4.247E-02 4.138E-02 4.016E-02 3.884E-02 3.741E-02 3.522E-02 3.676E-02 3.822E-02 3.959E-02 4.085E-02 4.199E-02 4.301E-02 4.389E-02 4.463E-02 4.521E-02 4.563E-02 4.589E-02 4.597E-02 4.588E-02 4.562E-02 4.518E-02 4.456E-02 4.377E-02 4.280E-02 4.168E-02 4.039E-02 3.895E-02 3.737E-02 3.566E-02 3.383E-02 3.189E-02 2.987E-02 2.777E-02 2.562E-02 2.343E-02 2.122E-02 1.901E-02 1.682E-02 1.468E-02 1.260E-02 1.060E-02 8.719E-03 6.964E-03 5.361E-03 3.929E-03 2.690E-03 1.663E-03 8.671E-04 3.197E-04 3.715E-05 3.466E-05 3.258E-04 9.224E-04 1.835E-03 3.071E-03 4.639E-03 6.541E-03 8.782E-03 1.136E-02 1.427E-02 1.752E-02 2.110E-02 2.499E-02 2.919E-02 3.369E-02 3.847E-02 4.351E-02 4.881E-02 5.433E-02 6.007E-02 6.599E-02 7.208E-02 7.831E-02 8.465E-02 9.108E-02 9.758E-02 1.041E-01 1.107E-01 1.172E-01 1.237E-01 1.301E-01 1.364E-01 1.427E-01 1.487E-01 1.547E-01 1.604E-01 1.659E-01 1.713E-01 1.764E-01 1.812E-01 1.858E-01 1.901E-01 1.941E-01 1.979E-01 2.014E-01 2.045E-01 2.074E-01 2.100E-01 2.123E-01 2.143E-01 2.160E-01 2.175E-01 2.187E-01 2.196E-01 2.203E-01 2.208E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.203E-01 2.198E-01 2.191E-01 2.183E-01 2.174E-01 2.165E-01 2.155E-01 2.145E-01 2.135E-01 2.124E-01 2.114E-01 2.104E-01 2.094E-01 2.085E-01 2.076E-01 2.068E-01 2.060E-01 2.054E-01 2.048E-01 2.043E-01 2.040E-01 2.037E-01 2.035E-01 2.035E-01 2.035E-01 2.037E-01 2.040E-01 2.043E-01 2.048E-01 2.054E-01 2.060E-01 2.068E-01 2.076E-01 2.085E-01 2.094E-01 2.104E-01 2.114E-01 2.124E-01 2.135E-01 2.145E-01 2.155E-01 2.165E-01 2.174E-01 2.183E-01 2.191E-01 2.198E-01 2.203E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.208E-01 2.203E-01 2.196E-01 2.187E-01 2.175E-01 2.160E-01 2.143E-01 2.123E-01 2.100E-01 2.074E-01 2.045E-01 2.014E-01 1.979E-01 1.941E-01 1.901E-01 1.858E-01 1.812E-01 1.764E-01 1.713E-01 1.659E-01 1.604E-01 1.547E-01 1.487E-01 1.427E-01 1.364E-01 1.301E-01 1.237E-01 1.172E-01 1.107E-01 1.041E-01 9.758E-02 9.108E-02 8.465E-02 7.831E-02 7.208E-02 6.599E-02 6.007E-02 5.433E-02 4.881E-02 4.351E-02 3.847E-02 3.369E-02 2.919E-02 2.499E-02 2.110E-02 1.752E-02 1.427E-02 1.136E-02 8.782E-03 6.541E-03 4.639E-03 3.071E-03 1.835E-03 9.224E-04 3.258E-04 3.466E-05 3.715E-05 3.197E-04 8.671E-04 1.663E-03 2.690E-03 3.929E-03 5.361E-03 6.964E-03 8.719E-03 1.060E-02 1.260E-02 1.468E-02 1.682E-02 1.901E-02 2.122E-02 2.343E-02 2.562E-02 2.777E-02 2.987E-02 3.189E-02 3.383E-02 3.566E-02 3.737E-02 3.895E-02 4.039E-02 4.168E-02 4.280E-02 4.377E-02 4.456E-02 4.518E-02 4.562E-02 4.588E-02 4.597E-02 4.589E-02 4.563E-02 4.521E-02 4.463E-02 4.389E-02 4.301E-02 4.199E-02 4.085E-02 3.959E-02 3.822E-02 3.676E-02 3.452E-02 3.609E-02 3.758E-02 3.899E-02 4.029E-02 4.148E-02 4.256E-02 4.350E-02 4.430E-02 4.495E-02 4.545E-02 4.578E-02 4.595E-02 4.595E-02 4.577E-02 4.542E-02 4.489E-02 4.419E-02 4.332E-02 4.228E-02 4.108E-02 3.973E-02 3.823E-02 3.659E-02 3.483E-02 3.296E-02 3.100E-02 2.895E-02 2.684E-02 2.468E-02 2.249E-02 2.029E-02 1.810E-02 1.594E-02 1.383E-02 1.180E-02 9.859E-03 8.034E-03 6.345E-03 4.814E-03 3.459E-03 2.302E-03 1.361E-03 6.535E-04 1.963E-04 5.093E-06 9.381E-05 4.751E-04 1.160E-03 2.157E-03 3.475E-03 5.119E-03 7.092E-03 9.396E-03 1.203E-02 1.499E-02 1.828E-02 2.188E-02 2.579E-02 3.000E-02 3.450E-02 3.927E-02 4.429E-02 4.955E-02 5.503E-02 6.071E-02 6.657E-02 7.258E-02 7.872E-02 8.497E-02 9.130E-02 9.769E-02 1.041E-01 1.105E-01 1.170E-01 1.233E-01 1.296E-01 1.358E-01 1.419E-01 1.479E-01 1.537E-01 1.593E-01 1.648E-01 1.700E-01 1.750E-01 1.798E-01 1.843E-01 1.886E-01 1.926E-01 1.963E-01 1.998E-01 2.030E-01 2.059E-01 2.085E-01 2.109E-01 2.130E-01 2.148E-01 2.164E-01 2.177E-01 2.188E-01 2.197E-01 2.203E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.209E-01 2.206E-01 2.201E-01 2.196E-01 2.190E-01 2.183E-01 2.176E-01 2.169E-01 2.161E-01 2.153E-01 2.145E-01 2.138E-01 2.130E-01 2.124E-01 2.117E-01 2.111E-01 2.106E-01 2.101E-01 2.097E-01 2.094E-01 2.092E-01 2.091E-01 2.090E-01 2.091E-01 2.092E-01 2.094E-01 2.097E-01 2.101E-01 2.106E-01 2.111E-01 2.117E-01 2.124E-01 2.130E-01 2.138E-01 2.145E-01 2.153E-01 2.161E-01 2.169E-01 2.176E-01 2.183E-01 2.190E-01 2.196E-01 2.201E-01 2.206E-01 2.209E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.203E-01 2.197E-01 2.188E-01 2.177E-01 2.164E-01 2.148E-01 2.130E-01 2.109E-01 2.085E-01 2.059E-01 2.030E-01 1.998E-01 1.963E-01 1.926E-01 1.886E-01 1.843E-01 1.798E-01 1.750E-01 1.700E-01 1.648E-01 1.593E-01 1.537E-01 1.479E-01 1.419E-01 1.358E-01 1.296E-01 1.233E-01 1.170E-01 1.105E-01 1.041E-01 9.769E-02 9.130E-02 8.497E-02 7.872E-02 7.258E-02 6.657E-02 6.071E-02 5.503E-02 4.955E-02 4.429E-02 3.927E-02 3.450E-02 3.000E-02 2.579E-02 2.188E-02 1.828E-02 1.499E-02 1.203E-02 9.396E-03 7.092E-03 5.119E-03 3.475E-03 2.157E-03 1.160E-03 4.751E-04 9.381E-05 5.093E-06 1.963E-04 6.535E-04 1.361E-03 2.302E-03 3.459E-03 4.814E-03 6.345E-03 8.034E-03 9.859E-03 1.180E-02 1.383E-02 1.594E-02 1.810E-02 2.029E-02 2.249E-02 2.468E-02 2.684E-02 2.895E-02 3.100E-02 3.296E-02 3.483E-02 3.659E-02 3.823E-02 3.973E-02 4.108E-02 4.228E-02 4.332E-02 4.419E-02 4.489E-02 4.542E-02 4.577E-02 4.595E-02 4.595E-02 4.578E-02 4.545E-02 4.495E-02 4.430E-02 4.350E-02 4.256E-02 4.148E-02 4.029E-02 3.899E-02 3.758E-02 3.609E-02 3.379E-02 3.539E-02 3.691E-02 3.835E-02 3.970E-02 4.094E-02 4.207E-02 4.307E-02 4.393E-02 4.466E-02 4.523E-02 4.564E-02 4.589E-02 4.597E-02 4.588E-02 4.562E-02 4.518E-02 4.458E-02 4.379E-02 4.285E-02 4.174E-02 4.047E-02 3.905E-02 3.750E-02 3.582E-02 3.402E-02 3.211E-02 3.012E-02 2.806E-02 2.593E-02 2.377E-02 2.159E-02 1.940E-02 1.724E-02 1.511E-02 1.304E-02 1.106E-02 9.169E-03 7.403E-03 5.780E-03 4.320E-03 3.041E-03 1.963E-03 1.104E-03 4.801E-04 1.079E-04 1.764E-06 1.748E-04 6.386E-04 1.403E-03 2.477E-03 3.866E-03 5.576E-03 7.608E-03 9.965E-03 1.264E-02 1.564E-02 1.896E-02 2.258E-02 2.650E-02 3.070E-02 3.518E-02 3.993E-02 4.491E-02 5.013E-02 5.555E-02 6.117E-02 6.695E-02 7.288E-02 7.893E-02 8.508E-02 9.130E-02 9.758E-02 1.039E-01 1.102E-01 1.165E-01 1.227E-01 1.289E-01 1.350E-01 1.410E-01 1.468E-01 1.525E-01 1.580E-01 1.634E-01 1.685E-01 1.735E-01 1.782E-01 1.826E-01 1.869E-01 1.908E-01 1.946E-01 1.980E-01 2.012E-01 2.042E-01 2.068E-01 2.093E-01 2.114E-01 2.133E-01 2.150E-01 2.165E-01 2.177E-01 2.187E-01 2.196E-01 2.202E-01 2.207E-01 2.210E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.206E-01 2.202E-01 2.198E-01 2.193E-01 2.188E-01 2.182E-01 2.177E-01 2.171E-01 2.166E-01 2.161E-01 2.156E-01 2.152E-01 2.148E-01 2.144E-01 2.141E-01 2.139E-01 2.137E-01 2.136E-01 2.136E-01 2.136E-01 2.137E-01 2.139E-01 2.141E-01 2.144E-01 2.148E-01 2.152E-01 2.156E-01 2.161E-01 2.166E-01 2.171E-01 2.177E-01 2.182E-01 2.188E-01 2.193E-01 2.198E-01 2.202E-01 2.206E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.210E-01 2.207E-01 2.202E-01 2.196E-01 2.187E-01 2.177E-01 2.165E-01 2.150E-01 2.133E-01 2.114E-01 2.093E-01 2.068E-01 2.042E-01 2.012E-01 1.980E-01 1.946E-01 1.908E-01 1.869E-01 1.826E-01 1.782E-01 1.735E-01 1.685E-01 1.634E-01 1.580E-01 1.525E-01 1.468E-01 1.410E-01 1.350E-01 1.289E-01 1.227E-01 1.165E-01 1.102E-01 1.039E-01 9.758E-02 9.130E-02 8.508E-02 7.893E-02 7.288E-02 6.695E-02 6.117E-02 5.555E-02 5.013E-02 4.491E-02 3.993E-02 3.518E-02 3.070E-02 2.650E-02 2.258E-02 1.896E-02 1.564E-02 1.264E-02 9.965E-03 7.608E-03 5.576E-03 3.866E-03 2.477E-03 1.403E-03 6.386E-04 1.748E-04 1.764E-06 1.079E-04 4.801E-04 1.104E-03 1.963E-03 3.041E-03 4.320E-03 5.780E-03 7.403E-03 9.169E-03 1.106E-02 1.304E-02 1.511E-02 1.724E-02 1.940E-02 2.159E-02 2.377E-02 2.593E-02 2.806E-02 3.012E-02 3.211E-02 3.402E-02 3.582E-02 3.750E-02 3.905E-02 4.047E-02 4.174E-02 4.285E-02 4.379E-02 4.458E-02 4.518E-02 4.562E-02 4.588E-02 4.597E-02 4.589E-02 4.564E-02 4.523E-02 4.466E-02 4.393E-02 4.307E-02 4.207E-02 4.094E-02 3.970E-02 3.835E-02 3.691E-02 3.539E-02 3.304E-02 3.466E-02 3.622E-02 3.769E-02 3.908E-02 4.037E-02 4.154E-02 4.260E-02 4.353E-02 4.432E-02 4.496E-02 4.545E-02 4.578E-02 4.595E-02 4.595E-02 4.578E-02 4.543E-02 4.492E-02 4.423E-02 4.337E-02 4.236E-02 4.118E-02 3.985E-02 3.838E-02 3.678E-02 3.505E-02 3.321E-02 3.128E-02 2.927E-02 2.719E-02 2.506E-02 2.290E-02 2.073E-02 1.856E-02 1.643E-02 1.433E-02 1.230E-02 1.036E-02 8.532E-03 6.826E-03 5.268E-03 3.877E-03 2.671E-03 1.668E-03 8.868E-04 3.421E-04 4.919E-05 2.164E-05 2.717E-04 8.101E-04 1.646E-03 2.786E-03 4.237E-03 6.003E-03 8.084E-03 1.048E-02 1.319E-02 1.622E-02 1.955E-02 2.317E-02 2.709E-02 3.128E-02 3.574E-02 4.044E-02 4.539E-02 5.055E-02 5.591E-02 6.144E-02 6.714E-02 7.298E-02 7.893E-02 8.497E-02 9.108E-02 9.724E-02 1.034E-01 1.096E-01 1.158E-01 1.219E-01 1.279E-01 1.339E-01 1.398E-01 1.455E-01 1.511E-01 1.565E-01 1.618E-01 1.668E-01 1.717E-01 1.763E-01 1.807E-01 1.849E-01 1.889E-01 1.926E-01 1.960E-01 1.992E-01 2.022E-01 2.049E-01 2.074E-01 2.096E-01 2.116E-01 2.134E-01 2.150E-01 2.164E-01 2.175E-01 2.185E-01 2.193E-01 2.200E-01 2.204E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.209E-01 2.207E-01 2.205E-01 2.202E-01 2.198E-01 2.195E-01 2.192E-01 2.188E-01 2.185E-01 2.182E-01 2.179E-01 2.176E-01 2.174E-01 2.173E-01 2.171E-01 2.171E-01 2.171E-01 2.171E-01 2.171E-01 2.173E-01 2.174E-01 2.176E-01 2.179E-01 2.182E-01 2.185E-01 2.188E-01 2.192E-01 2.195E-01 2.198E-01 2.202E-01 2.205E-01 2.207E-01 2.209E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.204E-01 2.200E-01 2.193E-01 2.185E-01 2.175E-01 2.164E-01 2.150E-01 2.134E-01 2.116E-01 2.096E-01 2.074E-01 2.049E-01 2.022E-01 1.992E-01 1.960E-01 1.926E-01 1.889E-01 1.849E-01 1.807E-01 1.763E-01 1.717E-01 1.668E-01 1.618E-01 1.565E-01 1.511E-01 1.455E-01 1.398E-01 1.339E-01 1.279E-01 1.219E-01 1.158E-01 1.096E-01 1.034E-01 9.724E-02 9.108E-02 8.497E-02 7.893E-02 7.298E-02 6.714E-02 6.144E-02 5.591E-02 5.055E-02 4.539E-02 4.044E-02 3.574E-02 3.128E-02 2.709E-02 2.317E-02 1.955E-02 1.622E-02 1.319E-02 1.048E-02 8.084E-03 6.003E-03 4.237E-03 2.786E-03 1.646E-03 8.101E-04 2.717E-04 2.164E-05 4.919E-05 3.421E-04 8.868E-04 1.668E-03 2.671E-03 3.877E-03 5.268E-03 6.826E-03 8.532E-03 1.036E-02 1.230E-02 1.433E-02 1.643E-02 1.856E-02 2.073E-02 2.290E-02 2.506E-02 2.719E-02 2.927E-02 3.128E-02 3.321E-02 3.505E-02 3.678E-02 3.838E-02 3.985E-02 4.118E-02 4.236E-02 4.337E-02 4.423E-02 4.492E-02 4.543E-02 4.578E-02 4.595E-02 4.595E-02 4.578E-02 4.545E-02 4.496E-02 4.432E-02 4.353E-02 4.260E-02 4.154E-02 4.037E-02 3.908E-02 3.769E-02 3.622E-02 3.466E-02 3.227E-02 3.391E-02 3.549E-02 3.700E-02 3.843E-02 3.976E-02 4.099E-02 4.210E-02 4.309E-02 4.394E-02 4.466E-02 4.523E-02 4.564E-02 4.589E-02 4.597E-02 4.589E-02 4.564E-02 4.521E-02 4.462E-02 4.386E-02 4.294E-02 4.185E-02 4.061E-02 3.923E-02 3.771E-02 3.606E-02 3.429E-02 3.243E-02 3.047E-02 2.844E-02 2.635E-02 2.423E-02 2.207E-02 1.991E-02 1.777E-02 1.566E-02 1.360E-02 1.162E-02 9.726E-03 7.947E-03 6.300E-03 4.805E-03 3.481E-03 2.345E-03 1.414E-03 7.061E-04 2.350E-04 1.518E-05 5.944E-05 3.791E-04 9.839E-04 1.882E-03 3.080E-03 4.583E-03 6.394E-03 8.514E-03 1.094E-02 1.368E-02 1.671E-02 2.005E-02 2.367E-02 2.757E-02 3.173E-02 3.616E-02 4.082E-02 4.570E-02 5.080E-02 5.608E-02 6.154E-02 6.714E-02 7.288E-02 7.872E-02 8.465E-02 9.065E-02 9.668E-02 1.027E-01 1.088E-01 1.148E-01 1.208E-01 1.267E-01 1.326E-01 1.383E-01 1.439E-01 1.494E-01 1.547E-01 1.599E-01 1.648E-01 1.696E-01 1.742E-01 1.786E-01 1.827E-01 1.866E-01 1.903E-01 1.938E-01 1.970E-01 2.000E-01 2.027E-01 2.053E-01 2.076E-01 2.097E-01 2.116E-01 2.132E-01 2.147E-01 2.160E-01 2.171E-01 2.181E-01 2.189E-01 2.195E-01 2.201E-01 2.205E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.207E-01 2.205E-01 2.203E-01 2.201E-01 2.200E-01 2.198E-01 2.197E-01 2.196E-01 2.195E-01 2.195E-01 2.195E-01 2.195E-01 2.195E-01 2.196E-01 2.197E-01 2.198E-01 2.200E-01 2.201E-01 2.203E-01 2.205E-01 2.207E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.205E-01 2.201E-01 2.195E-01 2.189E-01 2.181E-01 2.171E-01 2.160E-01 2.147E-01 2.132E-01 2.116E-01 2.097E-01 2.076E-01 2.053E-01 2.027E-01 2.000E-01 1.970E-01 1.938E-01 1.903E-01 1.866E-01 1.827E-01 1.786E-01 1.742E-01 1.696E-01 1.648E-01 1.599E-01 1.547E-01 1.494E-01 1.439E-01 1.383E-01 1.326E-01 1.267E-01 1.208E-01 1.148E-01 1.088E-01 1.027E-01 9.668E-02 9.065E-02 8.465E-02 7.872E-02 7.288E-02 6.714E-02 6.154E-02 5.608E-02 5.080E-02 4.570E-02 4.082E-02 3.616E-02 3.173E-02 2.757E-02 2.367E-02 2.005E-02 1.671E-02 1.368E-02 1.094E-02 8.514E-03 6.394E-03 4.583E-03 3.080E-03 1.882E-03 9.839E-04 3.791E-04 5.944E-05 1.518E-05 2.350E-04 7.061E-04 1.414E-03 2.345E-03 3.481E-03 4.805E-03 6.300E-03 7.947E-03 9.726E-03 1.162E-02 1.360E-02 1.566E-02 1.777E-02 1.991E-02 2.207E-02 2.423E-02 2.635E-02 2.844E-02 3.047E-02 3.243E-02 3.429E-02 3.606E-02 3.771E-02 3.923E-02 4.061E-02 4.185E-02 4.294E-02 4.386E-02 4.462E-02 4.521E-02 4.564E-02 4.589E-02 4.597E-02 4.589E-02 4.564E-02 4.523E-02 4.466E-02 4.394E-02 4.309E-02 4.210E-02 4.099E-02 3.976E-02 3.843E-02 3.700E-02 3.549E-02 3.391E-02 3.148E-02 3.314E-02 3.474E-02 3.628E-02 3.774E-02 3.912E-02 4.039E-02 4.156E-02 4.261E-02 4.353E-02 4.431E-02 4.495E-02 4.544E-02 4.578E-02 4.595E-02 4.595E-02 4.579E-02 4.547E-02 4.497E-02 4.430E-02 4.347E-02 4.248E-02 4.134E-02 4.004E-02 3.861E-02 3.704E-02 3.535E-02 3.355E-02 3.166E-02 2.969E-02 2.765E-02 2.555E-02 2.343E-02 2.128E-02 1.914E-02 1.702E-02 1.494E-02 1.292E-02 1.098E-02 9.139E-03 7.413E-03 5.824E-03 4.390E-03 3.130E-03 2.060E-03 1.197E-03 5.573E-04 1.541E-04 1.084E-06 1.101E-04 4.916E-04 1.155E-03 2.107E-03 3.353E-03 4.898E-03 6.745E-03 8.893E-03 1.134E-02 1.409E-02 1.713E-02 2.045E-02 2.406E-02 2.793E-02 3.206E-02 3.644E-02 4.104E-02 4.586E-02 5.088E-02 5.608E-02 6.144E-02 6.695E-02 7.258E-02 7.831E-02 8.412E-02 8.999E-02 9.590E-02 1.018E-01 1.078E-01 1.137E-01 1.195E-01 1.253E-01 1.310E-01 1.366E-01 1.421E-01 1.475E-01 1.527E-01 1.578E-01 1.626E-01 1.673E-01 1.718E-01 1.761E-01 1.802E-01 1.841E-01 1.878E-01 1.912E-01 1.945E-01 1.975E-01 2.003E-01 2.029E-01 2.052E-01 2.074E-01 2.094E-01 2.111E-01 2.127E-01 2.141E-01 2.154E-01 2.165E-01 2.174E-01 2.182E-01 2.189E-01 2.195E-01 2.200E-01 2.203E-01 2.206E-01 2.208E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.210E-01 2.209E-01 2.209E-01 2.208E-01 2.208E-01 2.208E-01 2.208E-01 2.208E-01 2.209E-01 2.209E-01 2.210E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.208E-01 2.206E-01 2.203E-01 2.200E-01 2.195E-01 2.189E-01 2.182E-01 2.174E-01 2.165E-01 2.154E-01 2.141E-01 2.127E-01 2.111E-01 2.094E-01 2.074E-01 2.052E-01 2.029E-01 2.003E-01 1.975E-01 1.945E-01 1.912E-01 1.878E-01 1.841E-01 1.802E-01 1.761E-01 1.718E-01 1.673E-01 1.626E-01 1.578E-01 1.527E-01 1.475E-01 1.421E-01 1.366E-01 1.310E-01 1.253E-01 1.195E-01 1.137E-01 1.078E-01 1.018E-01 9.590E-02 8.999E-02 8.412E-02 7.831E-02 7.258E-02 6.695E-02 6.144E-02 5.608E-02 5.088E-02 4.586E-02 4.104E-02 3.644E-02 3.206E-02 2.793E-02 2.406E-02 2.045E-02 1.713E-02 1.409E-02 1.134E-02 8.893E-03 6.745E-03 4.898E-03 3.353E-03 2.107E-03 1.155E-03 4.916E-04 1.101E-04 1.084E-06 1.541E-04 5.573E-04 1.197E-03 2.060E-03 3.130E-03 4.390E-03 5.824E-03 7.413E-03 9.139E-03 1.098E-02 1.292E-02 1.494E-02 1.702E-02 1.914E-02 2.128E-02 2.343E-02 2.555E-02 2.765E-02 2.969E-02 3.166E-02 3.355E-02 3.535E-02 3.704E-02 3.861E-02 4.004E-02 4.134E-02 4.248E-02 4.347E-02 4.430E-02 4.497E-02 4.547E-02 4.579E-02 4.595E-02 4.595E-02 4.578E-02 4.544E-02 4.495E-02 4.431E-02 4.353E-02 4.261E-02 4.156E-02 4.039E-02 3.912E-02 3.774E-02 3.628E-02 3.474E-02 3.314E-02 3.067E-02 3.235E-02 3.397E-02 3.553E-02 3.703E-02 3.844E-02 3.976E-02 4.098E-02 4.209E-02 4.307E-02 4.392E-02 4.463E-02 4.520E-02 4.562E-02 4.587E-02 4.597E-02 4.590E-02 4.567E-02 4.527E-02 4.470E-02 4.396E-02 4.307E-02 4.202E-02 4.082E-02 3.947E-02 3.799E-02 3.638E-02 3.466E-02 3.283E-02 3.092E-02 2.893E-02 2.688E-02 2.479E-02 2.267E-02 2.054E-02 1.842E-02 1.632E-02 1.428E-02 1.229E-02 1.040E-02 8.601E-03 6.928E-03 5.395E-03 4.020E-03 2.820E-03 1.813E-03 1.014E-03 4.364E-04 9.521E-05 2.384E-06 1.690E-04 6.046E-04 1.317E-03 2.314E-03 3.600E-03 5.178E-03 7.050E-03 9.215E-03 1.167E-02 1.442E-02 1.745E-02 2.076E-02 2.434E-02 2.817E-02 3.226E-02 3.658E-02 4.112E-02 4.586E-02 5.080E-02 5.591E-02 6.117E-02 6.657E-02 7.208E-02 7.769E-02 8.338E-02 8.912E-02 9.490E-02 1.007E-01 1.065E-01 1.122E-01 1.180E-01 1.236E-01 1.292E-01 1.347E-01 1.401E-01 1.453E-01 1.504E-01 1.554E-01 1.602E-01 1.648E-01 1.692E-01 1.735E-01 1.775E-01 1.814E-01 1.850E-01 1.884E-01 1.917E-01 1.947E-01 1.975E-01 2.001E-01 2.026E-01 2.048E-01 2.068E-01 2.087E-01 2.104E-01 2.119E-01 2.133E-01 2.145E-01 2.155E-01 2.165E-01 2.173E-01 2.180E-01 2.186E-01 2.191E-01 2.196E-01 2.199E-01 2.202E-01 2.204E-01 2.206E-01 2.208E-01 2.209E-01 2.210E-01 2.210E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.211E-01 2.210E-01 2.210E-01 2.209E-01 2.208E-01 2.206E-01 2.204E-01 2.202E-01 2.199E-01 2.196E-01 2.191E-01 2.186E-01 2.180E-01 2.173E-01 2.165E-01 2.155E-01 2.145E-01 2.133E-01 2.119E-01 2.104E-01 2.087E-01 2.068E-01 2.048E-01 2.026E-01 2.001E-01 1.975E-01 1.947E-01 1.917E-01 1.884E-01 1.850E-01 1.814E-01 1.775E-01 1.735E-01 1.692E-01 1.648E-01 1.602E-01 1.554E-01 1.504E-01 1.453E-01 1.401E-01 1.347E-01 1.292E-01 1.236E-01 1.180E-01 1.122E-01 1.065E-01 1.007E-01 9.490E-02 8.912E-02 8.338E-02 7.769E-02 7.208E-02 6.657E-02 6.117E-02 5.591E-02 5.080E-02 4.586E-02 4.112E-02 3.658E-02 3.226E-02 2.817E-02 2.434E-02 2.076E-02 1.745E-02 1.442E-02 1.167E-02 9.215E-03 7.050E-03 5.178E-03 3.600E-03 2.314E-03 1.317E-03 6.046E-04 1.690E-04 2.384E-06 9.521E-05 4.364E-04 1.014E-03 1.813E-03 2.820E-03 4.020E-03 5.395E-03 6.928E-03 8.601E-03 1.040E-02 1.229E-02 1.428E-02 1.632E-02 1.842E-02 2.054E-02 2.267E-02 2.479E-02 2.688E-02 2.893E-02 3.092E-02 3.283E-02 3.466E-02 3.638E-02 3.799E-02 3.947E-02 4.082E-02 4.202E-02 4.307E-02 4.396E-02 4.470E-02 4.527E-02 4.567E-02 4.590E-02 4.597E-02 4.587E-02 4.562E-02 4.520E-02 4.463E-02 4.392E-02 4.307E-02 4.209E-02 4.098E-02 3.976E-02 3.844E-02 3.703E-02 3.553E-02 3.397E-02 3.235E-02 2.985E-02 3.153E-02 3.317E-02 3.476E-02 3.629E-02 3.774E-02 3.910E-02 4.037E-02 4.153E-02 4.257E-02 4.349E-02 4.427E-02 4.492E-02 4.541E-02 4.575E-02 4.594E-02 4.596E-02 4.582E-02 4.551E-02 4.504E-02 4.441E-02 4.361E-02 4.266E-02 4.155E-02 4.029E-02 3.890E-02 3.738E-02 3.573E-02 3.398E-02 3.213E-02 3.020E-02 2.820E-02 2.615E-02 2.406E-02 2.195E-02 1.984E-02 1.774E-02 1.567E-02 1.366E-02 1.171E-02 9.859E-03 8.111E-03 6.489E-03 5.010E-03 3.691E-03 2.550E-03 1.601E-03 8.593E-04 3.396E-04 5.426E-05 1.486E-05 2.316E-04 7.135E-04 1.468E-03 2.501E-03 3.816E-03 5.417E-03 7.304E-03 9.478E-03 1.194E-02 1.467E-02 1.769E-02 2.097E-02 2.451E-02 2.830E-02 3.232E-02 3.658E-02 4.104E-02 4.570E-02 5.055E-02 5.555E-02 6.071E-02 6.599E-02 7.139E-02 7.687E-02 8.243E-02 8.803E-02 9.367E-02 9.933E-02 1.050E-01 1.106E-01 1.162E-01 1.217E-01 1.272E-01 1.325E-01 1.378E-01 1.429E-01 1.479E-01 1.528E-01 1.575E-01 1.620E-01 1.663E-01 1.705E-01 1.745E-01 1.783E-01 1.820E-01 1.854E-01 1.886E-01 1.916E-01 1.945E-01 1.971E-01 1.996E-01 2.019E-01 2.040E-01 2.059E-01 2.077E-01 2.093E-01 2.107E-01 2.120E-01 2.132E-01 2.143E-01 2.152E-01 2.160E-01 2.167E-01 2.174E-01 2.179E-01 2.184E-01 2.188E-01 2.191E-01 2.194E-01 2.197E-01 2.199E-01 2.200E-01 2.201E-01 2.202E-01 2.203E-01 2.204E-01 2.204E-01 2.204E-01 2.204E-01 2.204E-01 2.203E-01 2.202E-01 2.201E-01 2.200E-01 2.199E-01 2.197E-01 2.194E-01 2.191E-01 2.188E-01 2.184E-01 2.179E-01 2.174E-01 2.167E-01 2.160E-01 2.152E-01 2.143E-01 2.132E-01 2.120E-01 2.107E-01 2.093E-01 2.077E-01 2.059E-01 2.040E-01 2.019E-01 1.996E-01 1.971E-01 1.945E-01 1.916E-01 1.886E-01 1.854E-01 1.820E-01 1.783E-01 1.745E-01 1.705E-01 1.663E-01 1.620E-01 1.575E-01 1.528E-01 1.479E-01 1.429E-01 1.378E-01 1.325E-01 1.272E-01 1.217E-01 1.162E-01 1.106E-01 1.050E-01 9.933E-02 9.367E-02 8.803E-02 8.243E-02 7.687E-02 7.139E-02 6.599E-02 6.071E-02 5.555E-02 5.055E-02 4.570E-02 4.104E-02 3.658E-02 3.232E-02 2.830E-02 2.451E-02 2.097E-02 1.769E-02 1.467E-02 1.194E-02 9.478E-03 7.304E-03 5.417E-03 3.816E-03 2.501E-03 1.468E-03 7.135E-04 2.316E-04 1.486E-05 5.426E-05 3.396E-04 8.593E-04 1.601E-03 2.550E-03 3.691E-03 5.010E-03 6.489E-03 8.111E-03 9.859E-03 1.171E-02 1.366E-02 1.567E-02 1.774E-02 1.984E-02 2.195E-02 2.406E-02 2.615E-02 2.820E-02 3.020E-02 3.213E-02 3.398E-02 3.573E-02 3.738E-02 3.890E-02 4.029E-02 4.155E-02 4.266E-02 4.361E-02 4.441E-02 4.504E-02 4.551E-02 4.582E-02 4.596E-02 4.594E-02 4.575E-02 4.541E-02 4.492E-02 4.427E-02 4.349E-02 4.257E-02 4.153E-02 4.037E-02 3.910E-02 3.774E-02 3.629E-02 3.476E-02 3.317E-02 3.153E-02 2.900E-02 3.069E-02 3.235E-02 3.396E-02 3.552E-02 3.700E-02 3.840E-02 3.972E-02 4.093E-02 4.203E-02 4.301E-02 4.386E-02 4.458E-02 4.516E-02 4.558E-02 4.585E-02 4.597E-02 4.592E-02 4.571E-02 4.534E-02 4.480E-02 4.410E-02 4.324E-02 4.223E-02 4.107E-02 3.977E-02 3.834E-02 3.678E-02 3.510E-02 3.333E-02 3.146E-02 2.951E-02 2.751E-02 2.545E-02 2.337E-02 2.127E-02 1.918E-02 1.710E-02 1.507E-02 1.309E-02 1.118E-02 9.370E-03 7.669E-03 6.096E-03 4.668E-03 3.402E-03 2.314E-03 1.419E-03 7.312E-04 2.633E-04 2.751E-05 3.466E-05 2.943E-04 8.144E-04 1.602E-03 2.662E-03 3.998E-03 5.613E-03 7.506E-03 9.678E-03 1.212E-02 1.484E-02 1.783E-02 2.107E-02 2.456E-02 2.830E-02 3.226E-02 3.644E-02 4.082E-02 4.539E-02 5.013E-02 5.503E-02 6.007E-02 6.523E-02 7.050E-02 7.585E-02 8.127E-02 8.674E-02 9.224E-02 9.775E-02 1.033E-01 1.087E-01 1.142E-01 1.196E-01 1.249E-01 1.301E-01 1.352E-01 1.402E-01 1.451E-01 1.499E-01 1.545E-01 1.589E-01 1.632E-01 1.673E-01 1.713E-01 1.750E-01 1.786E-01 1.820E-01 1.852E-01 1.882E-01 1.911E-01 1.938E-01 1.962E-01 1.986E-01 2.007E-01 2.027E-01 2.045E-01 2.062E-01 2.077E-01 2.091E-01 2.104E-01 2.115E-01 2.125E-01 2.135E-01 2.143E-01 2.150E-01 2.156E-01 2.162E-01 2.167E-01 2.171E-01 2.175E-01 2.178E-01 2.180E-01 2.182E-01 2.184E-01 2.185E-01 2.186E-01 2.187E-01 2.187E-01 2.187E-01 2.186E-01 2.185E-01 2.184E-01 2.182E-01 2.180E-01 2.178E-01 2.175E-01 2.171E-01 2.167E-01 2.162E-01 2.156E-01 2.150E-01 2.143E-01 2.135E-01 2.125E-01 2.115E-01 2.104E-01 2.091E-01 2.077E-01 2.062E-01 2.045E-01 2.027E-01 2.007E-01 1.986E-01 1.962E-01 1.938E-01 1.911E-01 1.882E-01 1.852E-01 1.820E-01 1.786E-01 1.750E-01 1.713E-01 1.673E-01 1.632E-01 1.589E-01 1.545E-01 1.499E-01 1.451E-01 1.402E-01 1.352E-01 1.301E-01 1.249E-01 1.196E-01 1.142E-01 1.087E-01 1.033E-01 9.775E-02 9.224E-02 8.674E-02 8.127E-02 7.585E-02 7.050E-02 6.523E-02 6.007E-02 5.503E-02 5.013E-02 4.539E-02 4.082E-02 3.644E-02 3.226E-02 2.830E-02 2.456E-02 2.107E-02 1.783E-02 1.484E-02 1.212E-02 9.678E-03 7.506E-03 5.613E-03 3.998E-03 2.662E-03 1.602E-03 8.144E-04 2.943E-04 3.466E-05 2.751E-05 2.633E-04 7.312E-04 1.419E-03 2.314E-03 3.402E-03 4.668E-03 6.096E-03 7.669E-03 9.370E-03 1.118E-02 1.309E-02 1.507E-02 1.710E-02 1.918E-02 2.127E-02 2.337E-02 2.545E-02 2.751E-02 2.951E-02 3.146E-02 3.333E-02 3.510E-02 3.678E-02 3.834E-02 3.977E-02 4.107E-02 4.223E-02 4.324E-02 4.410E-02 4.480E-02 4.534E-02 4.571E-02 4.592E-02 4.597E-02 4.585E-02 4.558E-02 4.516E-02 4.458E-02 4.386E-02 4.301E-02 4.203E-02 4.093E-02 3.972E-02 3.840E-02 3.700E-02 3.552E-02 3.396E-02 3.235E-02 3.069E-02 2.814E-02 2.984E-02 3.151E-02 3.314E-02 3.472E-02 3.623E-02 3.767E-02 3.903E-02 4.029E-02 4.145E-02 4.249E-02 4.341E-02 4.420E-02 4.485E-02 4.536E-02 4.572E-02 4.592E-02 4.597E-02 4.585E-02 4.558E-02 4.514E-02 4.454E-02 4.378E-02 4.287E-02 4.181E-02 4.060E-02 3.926E-02 3.778E-02 3.619E-02 3.449E-02 3.269E-02 3.081E-02 2.886E-02 2.685E-02 2.480E-02 2.272E-02 2.064E-02 1.856E-02 1.652E-02 1.451E-02 1.256E-02 1.070E-02 8.928E-03 7.272E-03 5.746E-03 4.367E-03 3.150E-03 2.112E-03 1.266E-03 6.262E-04 2.042E-04 1.154E-05 5.831E-05 3.533E-04 9.039E-04 1.716E-03 2.795E-03 4.143E-03 5.762E-03 7.652E-03 9.812E-03 1.224E-02 1.493E-02 1.787E-02 2.107E-02 2.451E-02 2.817E-02 3.206E-02 3.616E-02 4.044E-02 4.491E-02 4.955E-02 5.433E-02 5.925E-02 6.429E-02 6.942E-02 7.463E-02 7.991E-02 8.524E-02 9.059E-02 9.596E-02 1.013E-01 1.067E-01 1.120E-01 1.172E-01 1.224E-01 1.275E-01 1.325E-01 1.374E-01 1.421E-01 1.468E-01 1.513E-01 1.556E-01 1.598E-01 1.639E-01 1.677E-01 1.714E-01 1.750E-01 1.783E-01 1.815E-01 1.845E-01 1.874E-01 1.901E-01 1.926E-01 1.949E-01 1.971E-01 1.991E-01 2.010E-01 2.027E-01 2.043E-01 2.057E-01 2.071E-01 2.083E-01 2.094E-01 2.103E-01 2.112E-01 2.120E-01 2.127E-01 2.133E-01 2.139E-01 2.144E-01 2.148E-01 2.151E-01 2.154E-01 2.156E-01 2.158E-01 2.159E-01 2.160E-01 2.160E-01 2.160E-01 2.159E-01 2.158E-01 2.156E-01 2.154E-01 2.151E-01 2.148E-01 2.144E-01 2.139E-01 2.133E-01 2.127E-01 2.120E-01 2.112E-01 2.103E-01 2.094E-01 2.083E-01 2.071E-01 2.057E-01 2.043E-01 2.027E-01 2.010E-01 1.991E-01 1.971E-01 1.949E-01 1.926E-01 1.901E-01 1.874E-01 1.845E-01 1.815E-01 1.783E-01 1.750E-01 1.714E-01 1.677E-01 1.639E-01 1.598E-01 1.556E-01 1.513E-01 1.468E-01 1.421E-01 1.374E-01 1.325E-01 1.275E-01 1.224E-01 1.172E-01 1.120E-01 1.067E-01 1.013E-01 9.596E-02 9.059E-02 8.524E-02 7.991E-02 7.463E-02 6.942E-02 6.429E-02 5.925E-02 5.433E-02 4.955E-02 4.491E-02 4.044E-02 3.616E-02 3.206E-02 2.817E-02 2.451E-02 2.107E-02 1.787E-02 1.493E-02 1.224E-02 9.812E-03 7.652E-03 5.762E-03 4.143E-03 2.795E-03 1.716E-03 9.039E-04 3.533E-04 5.831E-05 1.154E-05 2.042E-04 6.262E-04 1.266E-03 2.112E-03 3.150E-03 4.367E-03 5.746E-03 7.272E-03 8.928E-03 1.070E-02 1.256E-02 1.451E-02 1.652E-02 1.856E-02 2.064E-02 2.272E-02 2.480E-02 2.685E-02 2.886E-02 3.081E-02 3.269E-02 3.449E-02 3.619E-02 3.778E-02 3.926E-02 4.060E-02 4.181E-02 4.287E-02 4.378E-02 4.454E-02 4.514E-02 4.558E-02 4.585E-02 4.597E-02 4.592E-02 4.572E-02 4.536E-02 4.485E-02 4.420E-02 4.341E-02 4.249E-02 4.145E-02 4.029E-02 3.903E-02 3.767E-02 3.623E-02 3.472E-02 3.314E-02 3.151E-02 2.984E-02 2.726E-02 2.897E-02 3.065E-02 3.229E-02 3.389E-02 3.544E-02 3.691E-02 3.831E-02 3.962E-02 4.083E-02 4.193E-02 4.291E-02 4.377E-02 4.450E-02 4.509E-02 4.553E-02 4.582E-02 4.596E-02 4.594E-02 4.576E-02 4.542E-02 4.492E-02 4.427E-02 4.346E-02 4.249E-02 4.138E-02 4.013E-02 3.875E-02 3.724E-02 3.562E-02 3.390E-02 3.209E-02 3.019E-02 2.823E-02 2.622E-02 2.418E-02 2.212E-02 2.005E-02 1.800E-02 1.597E-02 1.400E-02 1.209E-02 1.026E-02 8.532E-03 6.918E-03 5.437E-03 4.103E-03 2.933E-03 1.940E-03 1.139E-03 5.414E-04 1.593E-04 3.342E-06 8.280E-05 4.058E-04 9.791E-04 1.808E-03 2.897E-03 4.248E-03 5.863E-03 7.741E-03 9.880E-03 1.228E-02 1.493E-02 1.783E-02 2.097E-02 2.434E-02 2.793E-02 3.173E-02 3.574E-02 3.993E-02 4.429E-02 4.881E-02 5.347E-02 5.826E-02 6.316E-02 6.815E-02 7.323E-02 7.836E-02 8.353E-02 8.874E-02 9.395E-02 9.916E-02 1.043E-01 1.095E-01 1.146E-01 1.196E-01 1.246E-01 1.294E-01 1.342E-01 1.389E-01 1.434E-01 1.478E-01 1.520E-01 1.562E-01 1.601E-01 1.639E-01 1.676E-01 1.710E-01 1.744E-01 1.775E-01 1.805E-01 1.833E-01 1.860E-01 1.885E-01 1.908E-01 1.930E-01 1.951E-01 1.970E-01 1.987E-01 2.004E-01 2.019E-01 2.032E-01 2.045E-01 2.056E-01 2.066E-01 2.076E-01 2.084E-01 2.092E-01 2.098E-01 2.104E-01 2.109E-01 2.113E-01 2.116E-01 2.119E-01 2.121E-01 2.123E-01 2.124E-01 2.124E-01 2.124E-01 2.123E-01 2.121E-01 2.119E-01 2.116E-01 2.113E-01 2.109E-01 2.104E-01 2.098E-01 2.092E-01 2.084E-01 2.076E-01 2.066E-01 2.056E-01 2.045E-01 2.032E-01 2.019E-01 2.004E-01 1.987E-01 1.970E-01 1.951E-01 1.930E-01 1.908E-01 1.885E-01 1.860E-01 1.833E-01 1.805E-01 1.775E-01 1.744E-01 1.710E-01 1.676E-01 1.639E-01 1.601E-01 1.562E-01 1.520E-01 1.478E-01 1.434E-01 1.389E-01 1.342E-01 1.294E-01 1.246E-01 1.196E-01 1.146E-01 1.095E-01 1.043E-01 9.916E-02 9.395E-02 8.874E-02 8.353E-02 7.836E-02 7.323E-02 6.815E-02 6.316E-02 5.826E-02 5.347E-02 4.881E-02 4.429E-02 3.993E-02 3.574E-02 3.173E-02 2.793E-02 2.434E-02 2.097E-02 1.783E-02 1.493E-02 1.228E-02 9.880E-03 7.741E-03 5.863E-03 4.248E-03 2.897E-03 1.808E-03 9.791E-04 4.058E-04 8.280E-05 3.342E-06 1.593E-04 5.414E-04 1.139E-03 1.940E-03 2.933E-03 4.103E-03 5.437E-03 6.918E-03 8.532E-03 1.026E-02 1.209E-02 1.400E-02 1.597E-02 1.800E-02 2.005E-02 2.212E-02 2.418E-02 2.622E-02 2.823E-02 3.019E-02 3.209E-02 3.390E-02 3.562E-02 3.724E-02 3.875E-02 4.013E-02 4.138E-02 4.249E-02 4.346E-02 4.427E-02 4.492E-02 4.542E-02 4.576E-02 4.594E-02 4.596E-02 4.582E-02 4.553E-02 4.509E-02 4.450E-02 4.377E-02 4.291E-02 4.193E-02 4.083E-02 3.962E-02 3.831E-02 3.691E-02 3.544E-02 3.389E-02 3.229E-02 3.065E-02 2.897E-02 2.637E-02 2.808E-02 2.977E-02 3.143E-02 3.304E-02 3.461E-02 3.612E-02 3.755E-02 3.890E-02 4.016E-02 4.132E-02 4.237E-02 4.330E-02 4.410E-02 4.476E-02 4.529E-02 4.567E-02 4.590E-02 4.597E-02 4.589E-02 4.565E-02 4.525E-02 4.470E-02 4.399E-02 4.312E-02 4.211E-02 4.096E-02 3.967E-02 3.826E-02 3.672E-02 3.508E-02 3.333E-02 3.151E-02 2.961E-02 2.765E-02 2.564E-02 2.360E-02 2.155E-02 1.951E-02 1.748E-02 1.548E-02 1.354E-02 1.166E-02 9.869E-03 8.179E-03 6.607E-03 5.168E-03 3.877E-03 2.748E-03 1.797E-03 1.035E-03 4.741E-04 1.261E-04 2.914E-07 1.055E-04 4.492E-04 1.038E-03 1.875E-03 2.966E-03 4.312E-03 5.913E-03 7.770E-03 9.880E-03 1.224E-02 1.484E-02 1.769E-02 2.076E-02 2.406E-02 2.757E-02 3.128E-02 3.518E-02 3.927E-02 4.351E-02 4.791E-02 5.244E-02 5.710E-02 6.186E-02 6.671E-02 7.163E-02 7.661E-02 8.164E-02 8.668E-02 9.174E-02 9.680E-02 1.018E-01 1.068E-01 1.118E-01 1.167E-01 1.215E-01 1.262E-01 1.308E-01 1.354E-01 1.398E-01 1.441E-01 1.482E-01 1.522E-01 1.561E-01 1.598E-01 1.634E-01 1.668E-01 1.701E-01 1.732E-01 1.761E-01 1.789E-01 1.816E-01 1.841E-01 1.864E-01 1.886E-01 1.906E-01 1.926E-01 1.943E-01 1.960E-01 1.975E-01 1.989E-01 2.001E-01 2.013E-01 2.024E-01 2.033E-01 2.042E-01 2.049E-01 2.056E-01 2.062E-01 2.066E-01 2.071E-01 2.074E-01 2.077E-01 2.078E-01 2.079E-01 2.080E-01 2.079E-01 2.078E-01 2.077E-01 2.074E-01 2.071E-01 2.066E-01 2.062E-01 2.056E-01 2.049E-01 2.042E-01 2.033E-01 2.024E-01 2.013E-01 2.001E-01 1.989E-01 1.975E-01 1.960E-01 1.943E-01 1.926E-01 1.906E-01 1.886E-01 1.864E-01 1.841E-01 1.816E-01 1.789E-01 1.761E-01 1.732E-01 1.701E-01 1.668E-01 1.634E-01 1.598E-01 1.561E-01 1.522E-01 1.482E-01 1.441E-01 1.398E-01 1.354E-01 1.308E-01 1.262E-01 1.215E-01 1.167E-01 1.118E-01 1.068E-01 1.018E-01 9.680E-02 9.174E-02 8.668E-02 8.164E-02 7.661E-02 7.163E-02 6.671E-02 6.186E-02 5.710E-02 5.244E-02 4.791E-02 4.351E-02 3.927E-02 3.518E-02 3.128E-02 2.757E-02 2.406E-02 2.076E-02 1.769E-02 1.484E-02 1.224E-02 9.880E-03 7.770E-03 5.913E-03 4.312E-03 2.966E-03 1.875E-03 1.038E-03 4.492E-04 1.055E-04 2.914E-07 1.261E-04 4.741E-04 1.035E-03 1.797E-03 2.748E-03 3.877E-03 5.168E-03 6.607E-03 8.179E-03 9.869E-03 1.166E-02 1.354E-02 1.548E-02 1.748E-02 1.951E-02 2.155E-02 2.360E-02 2.564E-02 2.765E-02 2.961E-02 3.151E-02 3.333E-02 3.508E-02 3.672E-02 3.826E-02 3.967E-02 4.096E-02 4.211E-02 4.312E-02 4.399E-02 4.470E-02 4.525E-02 4.565E-02 4.589E-02 4.597E-02 4.590E-02 4.567E-02 4.529E-02 4.476E-02 4.410E-02 4.330E-02 4.237E-02 4.132E-02 4.016E-02 3.890E-02 3.755E-02 3.612E-02 3.461E-02 3.304E-02 3.143E-02 2.977E-02 2.808E-02 2.547E-02 2.717E-02 2.887E-02 3.054E-02 3.217E-02 3.376E-02 3.530E-02 3.676E-02 3.816E-02 3.946E-02 4.067E-02 4.178E-02 4.277E-02 4.364E-02 4.439E-02 4.499E-02 4.546E-02 4.578E-02 4.594E-02 4.596E-02 4.582E-02 4.552E-02 4.507E-02 4.446E-02 4.370E-02 4.279E-02 4.174E-02 4.054E-02 3.922E-02 3.778E-02 3.622E-02 3.455E-02 3.280E-02 3.096E-02 2.905E-02 2.709E-02 2.509E-02 2.307E-02 2.104E-02 1.901E-02 1.700E-02 1.503E-02 1.312E-02 1.128E-02 9.522E-03 7.870E-03 6.336E-03 4.936E-03 3.684E-03 2.594E-03 1.679E-03 9.513E-04 4.223E-04 1.022E-04 2.162E-07 1.244E-04 4.817E-04 1.078E-03 1.916E-03 3.001E-03 4.333E-03 5.913E-03 7.741E-03 9.812E-03 1.212E-02 1.467E-02 1.745E-02 2.045E-02 2.367E-02 2.709E-02 3.070E-02 3.450E-02 3.847E-02 4.259E-02 4.686E-02 5.126E-02 5.577E-02 6.039E-02 6.509E-02 6.986E-02 7.468E-02 7.955E-02 8.444E-02 8.934E-02 9.423E-02 9.910E-02 1.039E-01 1.087E-01 1.135E-01 1.181E-01 1.227E-01 1.272E-01 1.316E-01 1.359E-01 1.401E-01 1.441E-01 1.480E-01 1.518E-01 1.554E-01 1.589E-01 1.623E-01 1.655E-01 1.685E-01 1.714E-01 1.742E-01 1.768E-01 1.793E-01 1.816E-01 1.838E-01 1.858E-01 1.877E-01 1.895E-01 1.911E-01 1.926E-01 1.940E-01 1.953E-01 1.964E-01 1.975E-01 1.984E-01 1.993E-01 2.000E-01 2.007E-01 2.012E-01 2.017E-01 2.021E-01 2.024E-01 2.026E-01 2.027E-01 2.027E-01 2.027E-01 2.026E-01 2.024E-01 2.021E-01 2.017E-01 2.012E-01 2.007E-01 2.000E-01 1.993E-01 1.984E-01 1.975E-01 1.964E-01 1.953E-01 1.940E-01 1.926E-01 1.911E-01 1.895E-01 1.877E-01 1.858E-01 1.838E-01 1.816E-01 1.793E-01 1.768E-01 1.742E-01 1.714E-01 1.685E-01 1.655E-01 1.623E-01 1.589E-01 1.554E-01 1.518E-01 1.480E-01 1.441E-01 1.401E-01 1.359E-01 1.316E-01 1.272E-01 1.227E-01 1.181E-01 1.135E-01 1.087E-01 1.039E-01 9.910E-02 9.423E-02 8.934E-02 8.444E-02 7.955E-02 7.468E-02 6.986E-02 6.509E-02 6.039E-02 5.577E-02 5.126E-02 4.686E-02 4.259E-02 3.847E-02 3.450E-02 3.070E-02 2.709E-02 2.367E-02 2.045E-02 1.745E-02 1.467E-02 1.212E-02 9.812E-03 7.741E-03 5.913E-03 4.333E-03 3.001E-03 1.916E-03 1.078E-03 4.817E-04 1.244E-04 2.162E-07 1.022E-04 4.223E-04 9.513E-04 1.679E-03 2.594E-03 3.684E-03 4.936E-03 6.336E-03 7.870E-03 9.522E-03 1.128E-02 1.312E-02 1.503E-02 1.700E-02 1.901E-02 2.104E-02 2.307E-02 2.509E-02 2.709E-02 2.905E-02 3.096E-02 3.280E-02 3.455E-02 3.622E-02 3.778E-02 3.922E-02 4.054E-02 4.174E-02 4.279E-02 4.370E-02 4.446E-02 4.507E-02 4.552E-02 4.582E-02 4.596E-02 4.594E-02 4.578E-02 4.546E-02 4.499E-02 4.439E-02 4.364E-02 4.277E-02 4.178E-02 4.067E-02 3.946E-02 3.816E-02 3.676E-02 3.530E-02 3.376E-02 3.217E-02 3.054E-02 2.887E-02 2.717E-02 2.455E-02 2.626E-02 2.795E-02 2.963E-02 3.127E-02 3.288E-02 3.444E-02 3.594E-02 3.737E-02 3.872E-02 3.999E-02 4.115E-02 4.220E-02 4.314E-02 4.396E-02 4.464E-02 4.519E-02 4.560E-02 4.586E-02 4.597E-02 4.593E-02 4.573E-02 4.538E-02 4.487E-02 4.422E-02 4.341E-02 4.246E-02 4.137E-02 4.014E-02 3.879E-02 3.731E-02 3.573E-02 3.405E-02 3.229E-02 3.044E-02 2.854E-02 2.658E-02 2.459E-02 2.258E-02 2.056E-02 1.855E-02 1.657E-02 1.463E-02 1.275E-02 1.094E-02 9.219E-03 7.602E-03 6.105E-03 4.741E-03 3.524E-03 2.468E-03 1.585E-03 8.868E-04 3.839E-04 8.587E-05 1.402E-06 1.379E-04 5.017E-04 1.098E-03 1.930E-03 3.001E-03 4.312E-03 5.863E-03 7.652E-03 9.678E-03 1.194E-02 1.442E-02 1.713E-02 2.005E-02 2.317E-02 2.650E-02 3.000E-02 3.369E-02 3.753E-02 4.153E-02 4.566E-02 4.992E-02 5.429E-02 5.875E-02 6.330E-02 6.791E-02 7.258E-02 7.728E-02 8.200E-02 8.674E-02 9.147E-02 9.618E-02 1.009E-01 1.055E-01 1.101E-01 1.146E-01 1.190E-01 1.234E-01 1.276E-01 1.318E-01 1.358E-01 1.398E-01 1.436E-01 1.472E-01 1.508E-01 1.542E-01 1.575E-01 1.606E-01 1.636E-01 1.664E-01 1.691E-01 1.717E-01 1.741E-01 1.764E-01 1.785E-01 1.805E-01 1.824E-01 1.841E-01 1.857E-01 1.872E-01 1.886E-01 1.899E-01 1.910E-01 1.920E-01 1.929E-01 1.938E-01 1.945E-01 1.951E-01 1.956E-01 1.960E-01 1.963E-01 1.966E-01 1.967E-01 1.968E-01 1.967E-01 1.966E-01 1.963E-01 1.960E-01 1.956E-01 1.951E-01 1.945E-01 1.938E-01 1.929E-01 1.920E-01 1.910E-01 1.899E-01 1.886E-01 1.872E-01 1.857E-01 1.841E-01 1.824E-01 1.805E-01 1.785E-01 1.764E-01 1.741E-01 1.717E-01 1.691E-01 1.664E-01 1.636E-01 1.606E-01 1.575E-01 1.542E-01 1.508E-01 1.472E-01 1.436E-01 1.398E-01 1.358E-01 1.318E-01 1.276E-01 1.234E-01 1.190E-01 1.146E-01 1.101E-01 1.055E-01 1.009E-01 9.618E-02 9.147E-02 8.674E-02 8.200E-02 7.728E-02 7.258E-02 6.791E-02 6.330E-02 5.875E-02 5.429E-02 4.992E-02 4.566E-02 4.153E-02 3.753E-02 3.369E-02 3.000E-02 2.650E-02 2.317E-02 2.005E-02 1.713E-02 1.442E-02 1.194E-02 9.678E-03 7.652E-03 5.863E-03 4.312E-03 3.001E-03 1.930E-03 1.098E-03 5.017E-04 1.379E-04 1.402E-06 8.587E-05 3.839E-04 8.868E-04 1.585E-03 2.468E-03 3.524E-03 4.741E-03 6.105E-03 7.602E-03 9.219E-03 1.094E-02 1.275E-02 1.463E-02 1.657E-02 1.855E-02 2.056E-02 2.258E-02 2.459E-02 2.658E-02 2.854E-02 3.044E-02 3.229E-02 3.405E-02 3.573E-02 3.731E-02 3.879E-02 4.014E-02 4.137E-02 4.246E-02 4.341E-02 4.422E-02 4.487E-02 4.538E-02 4.573E-02 4.593E-02 4.597E-02 4.586E-02 4.560E-02 4.519E-02 4.464E-02 4.396E-02 4.314E-02 4.220E-02 4.115E-02 3.999E-02 3.872E-02 3.737E-02 3.594E-02 3.444E-02 3.288E-02 3.127E-02 2.963E-02 2.795E-02 2.626E-02 2.363E-02 2.533E-02 2.702E-02 2.870E-02 3.036E-02 3.198E-02 3.356E-02 3.509E-02 3.656E-02 3.795E-02 3.926E-02 4.047E-02 4.159E-02 4.259E-02 4.348E-02 4.424E-02 4.487E-02 4.536E-02 4.571E-02 4.592E-02 4.597E-02 4.587E-02 4.562E-02 4.522E-02 4.467E-02 4.397E-02 4.312E-02 4.213E-02 4.100E-02 3.975E-02 3.837E-02 3.687E-02 3.527E-02 3.358E-02 3.181E-02 2.996E-02 2.806E-02 2.611E-02 2.413E-02 2.213E-02 2.013E-02 1.815E-02 1.619E-02 1.428E-02 1.242E-02 1.065E-02 8.958E-03 7.375E-03 5.911E-03 4.580E-03 3.395E-03 2.369E-03 1.514E-03 8.399E-04 3.575E-04 7.576E-05 2.612E-06 1.449E-04 5.085E-04 1.098E-03 1.916E-03 2.966E-03 4.248E-03 5.762E-03 7.506E-03 9.478E-03 1.167E-02 1.409E-02 1.671E-02 1.955E-02 2.258E-02 2.579E-02 2.919E-02 3.275E-02 3.647E-02 4.033E-02 4.433E-02 4.844E-02 5.266E-02 5.697E-02 6.135E-02 6.580E-02 7.030E-02 7.484E-02 7.939E-02 8.396E-02 8.852E-02 9.307E-02 9.758E-02 1.021E-01 1.065E-01 1.108E-01 1.151E-01 1.193E-01 1.234E-01 1.275E-01 1.314E-01 1.352E-01 1.389E-01 1.424E-01 1.459E-01 1.492E-01 1.523E-01 1.554E-01 1.583E-01 1.611E-01 1.637E-01 1.662E-01 1.685E-01 1.708E-01 1.728E-01 1.748E-01 1.766E-01 1.783E-01 1.799E-01 1.814E-01 1.827E-01 1.839E-01 1.850E-01 1.860E-01 1.869E-01 1.876E-01 1.883E-01 1.889E-01 1.893E-01 1.897E-01 1.899E-01 1.901E-01 1.901E-01 1.901E-01 1.899E-01 1.897E-01 1.893E-01 1.889E-01 1.883E-01 1.876E-01 1.869E-01 1.860E-01 1.850E-01 1.839E-01 1.827E-01 1.814E-01 1.799E-01 1.783E-01 1.766E-01 1.748E-01 1.728E-01 1.708E-01 1.685E-01 1.662E-01 1.637E-01 1.611E-01 1.583E-01 1.554E-01 1.523E-01 1.492E-01 1.459E-01 1.424E-01 1.389E-01 1.352E-01 1.314E-01 1.275E-01 1.234E-01 1.193E-01 1.151E-01 1.108E-01 1.065E-01 1.021E-01 9.758E-02 9.307E-02 8.852E-02 8.396E-02 7.939E-02 7.484E-02 7.030E-02 6.580E-02 6.135E-02 5.697E-02 5.266E-02 4.844E-02 4.433E-02 4.033E-02 3.647E-02 3.275E-02 2.919E-02 2.579E-02 2.258E-02 1.955E-02 1.671E-02 1.409E-02 1.167E-02 9.478E-03 7.506E-03 5.762E-03 4.248E-03 2.966E-03 1.916E-03 1.098E-03 5.085E-04 1.449E-04 2.612E-06 7.576E-05 3.575E-04 8.399E-04 1.514E-03 2.369E-03 3.395E-03 4.580E-03 5.911E-03 7.375E-03 8.958E-03 1.065E-02 1.242E-02 1.428E-02 1.619E-02 1.815E-02 2.013E-02 2.213E-02 2.413E-02 2.611E-02 2.806E-02 2.996E-02 3.181E-02 3.358E-02 3.527E-02 3.687E-02 3.837E-02 3.975E-02 4.100E-02 4.213E-02 4.312E-02 4.397E-02 4.467E-02 4.522E-02 4.562E-02 4.587E-02 4.597E-02 4.592E-02 4.571E-02 4.536E-02 4.487E-02 4.424E-02 4.348E-02 4.259E-02 4.159E-02 4.047E-02 3.926E-02 3.795E-02 3.656E-02 3.509E-02 3.356E-02 3.198E-02 3.036E-02 2.870E-02 2.702E-02 2.533E-02 2.270E-02 2.439E-02 2.608E-02 2.776E-02 2.942E-02 3.106E-02 3.266E-02 3.421E-02 3.571E-02 3.713E-02 3.849E-02 3.975E-02 4.092E-02 4.199E-02 4.294E-02 4.378E-02 4.449E-02 4.507E-02 4.550E-02 4.580E-02 4.595E-02 4.595E-02 4.581E-02 4.551E-02 4.506E-02 4.446E-02 4.372E-02 4.283E-02 4.181E-02 4.065E-02 3.937E-02 3.796E-02 3.645E-02 3.484E-02 3.314E-02 3.136E-02 2.951E-02 2.761E-02 2.567E-02 2.370E-02 2.172E-02 1.974E-02 1.778E-02 1.585E-02 1.397E-02 1.214E-02 1.040E-02 8.739E-03 7.188E-03 5.754E-03 4.453E-03 3.296E-03 2.296E-03 1.464E-03 8.092E-04 3.421E-04 7.095E-05 3.098E-06 1.449E-04 5.017E-04 1.078E-03 1.875E-03 2.897E-03 4.143E-03 5.613E-03 7.304E-03 9.215E-03 1.134E-02 1.368E-02 1.622E-02 1.896E-02 2.188E-02 2.499E-02 2.826E-02 3.170E-02 3.529E-02 3.901E-02 4.286E-02 4.682E-02 5.088E-02 5.503E-02 5.925E-02 6.353E-02 6.786E-02 7.223E-02 7.661E-02 8.101E-02 8.540E-02 8.977E-02 9.412E-02 9.843E-02 1.027E-01 1.069E-01 1.110E-01 1.151E-01 1.190E-01 1.229E-01 1.267E-01 1.304E-01 1.339E-01 1.374E-01 1.407E-01 1.439E-01 1.469E-01 1.499E-01 1.527E-01 1.554E-01 1.579E-01 1.603E-01 1.626E-01 1.648E-01 1.668E-01 1.687E-01 1.705E-01 1.721E-01 1.736E-01 1.750E-01 1.763E-01 1.775E-01 1.785E-01 1.794E-01 1.802E-01 1.809E-01 1.815E-01 1.820E-01 1.824E-01 1.826E-01 1.828E-01 1.829E-01 1.828E-01 1.826E-01 1.824E-01 1.820E-01 1.815E-01 1.809E-01 1.802E-01 1.794E-01 1.785E-01 1.775E-01 1.763E-01 1.750E-01 1.736E-01 1.721E-01 1.705E-01 1.687E-01 1.668E-01 1.648E-01 1.626E-01 1.603E-01 1.579E-01 1.554E-01 1.527E-01 1.499E-01 1.469E-01 1.439E-01 1.407E-01 1.374E-01 1.339E-01 1.304E-01 1.267E-01 1.229E-01 1.190E-01 1.151E-01 1.110E-01 1.069E-01 1.027E-01 9.843E-02 9.412E-02 8.977E-02 8.540E-02 8.101E-02 7.661E-02 7.223E-02 6.786E-02 6.353E-02 5.925E-02 5.503E-02 5.088E-02 4.682E-02 4.286E-02 3.901E-02 3.529E-02 3.170E-02 2.826E-02 2.499E-02 2.188E-02 1.896E-02 1.622E-02 1.368E-02 1.134E-02 9.215E-03 7.304E-03 5.613E-03 4.143E-03 2.897E-03 1.875E-03 1.078E-03 5.017E-04 1.449E-04 3.098E-06 7.095E-05 3.421E-04 8.092E-04 1.464E-03 2.296E-03 3.296E-03 4.453E-03 5.754E-03 7.188E-03 8.739E-03 1.040E-02 1.214E-02 1.397E-02 1.585E-02 1.778E-02 1.974E-02 2.172E-02 2.370E-02 2.567E-02 2.761E-02 2.951E-02 3.136E-02 3.314E-02 3.484E-02 3.645E-02 3.796E-02 3.937E-02 4.065E-02 4.181E-02 4.283E-02 4.372E-02 4.446E-02 4.506E-02 4.551E-02 4.581E-02 4.595E-02 4.595E-02 4.580E-02 4.550E-02 4.507E-02 4.449E-02 4.378E-02 4.294E-02 4.199E-02 4.092E-02 3.975E-02 3.849E-02 3.713E-02 3.571E-02 3.421E-02 3.266E-02 3.106E-02 2.942E-02 2.776E-02 2.608E-02 2.439E-02 2.177E-02 2.344E-02 2.512E-02 2.680E-02 2.847E-02 3.011E-02 3.173E-02 3.330E-02 3.482E-02 3.629E-02 3.768E-02 3.899E-02 4.022E-02 4.134E-02 4.236E-02 4.327E-02 4.405E-02 4.471E-02 4.524E-02 4.562E-02 4.587E-02 4.597E-02 4.592E-02 4.573E-02 4.538E-02 4.489E-02 4.425E-02 4.347E-02 4.255E-02 4.150E-02 4.031E-02 3.901E-02 3.758E-02 3.606E-02 3.444E-02 3.273E-02 3.095E-02 2.910E-02 2.721E-02 2.528E-02 2.333E-02 2.136E-02 1.940E-02 1.747E-02 1.556E-02 1.370E-02 1.191E-02 1.019E-02 8.561E-03 7.039E-03 5.634E-03 4.359E-03 3.227E-03 2.248E-03 1.434E-03 7.941E-04 3.371E-04 7.095E-05 2.612E-06 1.379E-04 4.817E-04 1.038E-03 1.808E-03 2.795E-03 3.998E-03 5.417E-03 7.050E-03 8.893E-03 1.094E-02 1.319E-02 1.564E-02 1.828E-02 2.110E-02 2.408E-02 2.724E-02 3.054E-02 3.399E-02 3.757E-02 4.127E-02 4.507E-02 4.897E-02 5.296E-02 5.701E-02 6.112E-02 6.528E-02 6.947E-02 7.368E-02 7.790E-02 8.211E-02 8.631E-02 9.048E-02 9.462E-02 9.871E-02 1.027E-01 1.067E-01 1.106E-01 1.144E-01 1.181E-01 1.218E-01 1.253E-01 1.287E-01 1.320E-01 1.352E-01 1.383E-01 1.413E-01 1.441E-01 1.468E-01 1.494E-01 1.519E-01 1.542E-01 1.564E-01 1.585E-01 1.604E-01 1.622E-01 1.639E-01 1.655E-01 1.669E-01 1.682E-01 1.694E-01 1.705E-01 1.715E-01 1.723E-01 1.731E-01 1.737E-01 1.742E-01 1.746E-01 1.749E-01 1.750E-01 1.751E-01 1.750E-01 1.749E-01 1.746E-01 1.742E-01 1.737E-01 1.731E-01 1.723E-01 1.715E-01 1.705E-01 1.694E-01 1.682E-01 1.669E-01 1.655E-01 1.639E-01 1.622E-01 1.604E-01 1.585E-01 1.564E-01 1.542E-01 1.519E-01 1.494E-01 1.468E-01 1.441E-01 1.413E-01 1.383E-01 1.352E-01 1.320E-01 1.287E-01 1.253E-01 1.218E-01 1.181E-01 1.144E-01 1.106E-01 1.067E-01 1.027E-01 9.871E-02 9.462E-02 9.048E-02 8.631E-02 8.211E-02 7.790E-02 7.368E-02 6.947E-02 6.528E-02 6.112E-02 5.701E-02 5.296E-02 4.897E-02 4.507E-02 4.127E-02 3.757E-02 3.399E-02 3.054E-02 2.724E-02 2.408E-02 2.110E-02 1.828E-02 1.564E-02 1.319E-02 1.094E-02 8.893E-03 7.050E-03 5.417E-03 3.998E-03 2.795E-03 1.808E-03 1.038E-03 4.817E-04 1.379E-04 2.612E-06 7.095E-05 3.371E-04 7.941E-04 1.434E-03 2.248E-03 3.227E-03 4.359E-03 5.634E-03 7.039E-03 8.561E-03 1.019E-02 1.191E-02 1.370E-02 1.556E-02 1.747E-02 1.940E-02 2.136E-02 2.333E-02 2.528E-02 2.721E-02 2.910E-02 3.095E-02 3.273E-02 3.444E-02 3.606E-02 3.758E-02 3.901E-02 4.031E-02 4.150E-02 4.255E-02 4.347E-02 4.425E-02 4.489E-02 4.538E-02 4.573E-02 4.592E-02 4.597E-02 4.587E-02 4.562E-02 4.524E-02 4.471E-02 4.405E-02 4.327E-02 4.236E-02 4.134E-02 4.022E-02 3.899E-02 3.768E-02 3.629E-02 3.482E-02 3.330E-02 3.173E-02 3.011E-02 2.847E-02 2.680E-02 2.512E-02 2.344E-02 2.083E-02 2.249E-02 2.416E-02 2.583E-02 2.750E-02 2.915E-02 3.077E-02 3.237E-02 3.391E-02 3.541E-02 3.684E-02 3.819E-02 3.946E-02 4.065E-02 4.173E-02 4.270E-02 4.356E-02 4.430E-02 4.491E-02 4.538E-02 4.572E-02 4.592E-02 4.597E-02 4.588E-02 4.564E-02 4.525E-02 4.472E-02 4.405E-02 4.323E-02 4.228E-02 4.120E-02 3.999E-02 3.866E-02 3.723E-02 3.569E-02 3.406E-02 3.235E-02 3.057E-02 2.873E-02 2.685E-02 2.493E-02 2.299E-02 2.105E-02 1.911E-02 1.719E-02 1.531E-02 1.348E-02 1.171E-02 1.002E-02 8.424E-03 6.928E-03 5.548E-03 4.296E-03 3.185E-03 2.224E-03 1.424E-03 7.941E-04 3.421E-04 7.576E-05 1.402E-06 1.244E-04 4.492E-04 9.791E-04 1.716E-03 2.662E-03 3.816E-03 5.178E-03 6.745E-03 8.514E-03 1.048E-02 1.264E-02 1.499E-02 1.752E-02 2.022E-02 2.309E-02 2.611E-02 2.928E-02 3.259E-02 3.602E-02 3.956E-02 4.320E-02 4.694E-02 5.076E-02 5.464E-02 5.857E-02 6.255E-02 6.657E-02 7.060E-02 7.463E-02 7.867E-02 8.269E-02 8.668E-02 9.065E-02 9.456E-02 9.843E-02 1.022E-01 1.060E-01 1.096E-01 1.132E-01 1.167E-01 1.200E-01 1.233E-01 1.265E-01 1.296E-01 1.325E-01 1.354E-01 1.381E-01 1.407E-01 1.431E-01 1.455E-01 1.477E-01 1.498E-01 1.518E-01 1.537E-01 1.554E-01 1.570E-01 1.585E-01 1.598E-01 1.611E-01 1.622E-01 1.632E-01 1.640E-01 1.648E-01 1.654E-01 1.659E-01 1.663E-01 1.666E-01 1.668E-01 1.669E-01 1.668E-01 1.666E-01 1.663E-01 1.659E-01 1.654E-01 1.648E-01 1.640E-01 1.632E-01 1.622E-01 1.611E-01 1.598E-01 1.585E-01 1.570E-01 1.554E-01 1.537E-01 1.518E-01 1.498E-01 1.477E-01 1.455E-01 1.431E-01 1.407E-01 1.381E-01 1.354E-01 1.325E-01 1.296E-01 1.265E-01 1.233E-01 1.200E-01 1.167E-01 1.132E-01 1.096E-01 1.060E-01 1.022E-01 9.843E-02 9.456E-02 9.065E-02 8.668E-02 8.269E-02 7.867E-02 7.463E-02 7.060E-02 6.657E-02 6.255E-02 5.857E-02 5.464E-02 5.076E-02 4.694E-02 4.320E-02 3.956E-02 3.602E-02 3.259E-02 2.928E-02 2.611E-02 2.309E-02 2.022E-02 1.752E-02 1.499E-02 1.264E-02 1.048E-02 8.514E-03 6.745E-03 5.178E-03 3.816E-03 2.662E-03 1.716E-03 9.791E-04 4.492E-04 1.244E-04 1.402E-06 7.576E-05 3.421E-04 7.941E-04 1.424E-03 2.224E-03 3.185E-03 4.296E-03 5.548E-03 6.928E-03 8.424E-03 1.002E-02 1.171E-02 1.348E-02 1.531E-02 1.719E-02 1.911E-02 2.105E-02 2.299E-02 2.493E-02 2.685E-02 2.873E-02 3.057E-02 3.235E-02 3.406E-02 3.569E-02 3.723E-02 3.866E-02 3.999E-02 4.120E-02 4.228E-02 4.323E-02 4.405E-02 4.472E-02 4.525E-02 4.564E-02 4.588E-02 4.597E-02 4.592E-02 4.572E-02 4.538E-02 4.491E-02 4.430E-02 4.356E-02 4.270E-02 4.173E-02 4.065E-02 3.946E-02 3.819E-02 3.684E-02 3.541E-02 3.391E-02 3.237E-02 3.077E-02 2.915E-02 2.750E-02 2.583E-02 2.416E-02 2.249E-02 1.989E-02 2.153E-02 2.318E-02 2.485E-02 2.651E-02 2.816E-02 2.980E-02 3.141E-02 3.297E-02 3.449E-02 3.596E-02 3.735E-02 3.867E-02 3.990E-02 4.104E-02 4.208E-02 4.301E-02 4.382E-02 4.451E-02 4.508E-02 4.551E-02 4.580E-02 4.595E-02 4.596E-02 4.582E-02 4.554E-02 4.512E-02 4.455E-02 4.384E-02 4.300E-02 4.202E-02 4.091E-02 3.969E-02 3.834E-02 3.690E-02 3.535E-02 3.372E-02 3.201E-02 3.023E-02 2.840E-02 2.653E-02 2.462E-02 2.270E-02 2.078E-02 1.886E-02 1.697E-02 1.511E-02 1.331E-02 1.156E-02 9.900E-03 8.326E-03 6.854E-03 5.496E-03 4.265E-03 3.171E-03 2.224E-03 1.434E-03 8.092E-04 3.575E-04 8.587E-05 2.162E-07 1.055E-04 4.058E-04 9.039E-04 1.602E-03 2.501E-03 3.600E-03 4.898E-03 6.394E-03 8.084E-03 9.965E-03 1.203E-02 1.427E-02 1.669E-02 1.927E-02 2.201E-02 2.490E-02 2.793E-02 3.109E-02 3.436E-02 3.775E-02 4.123E-02 4.480E-02 4.844E-02 5.215E-02 5.591E-02 5.971E-02 6.353E-02 6.738E-02 7.124E-02 7.509E-02 7.893E-02 8.274E-02 8.652E-02 9.026E-02 9.395E-02 9.758E-02 1.011E-01 1.046E-01 1.080E-01 1.114E-01 1.146E-01 1.177E-01 1.208E-01 1.237E-01 1.265E-01 1.292E-01 1.318E-01 1.343E-01 1.366E-01 1.389E-01 1.410E-01 1.430E-01 1.448E-01 1.466E-01 1.482E-01 1.497E-01 1.511E-01 1.523E-01 1.535E-01 1.545E-01 1.554E-01 1.562E-01 1.568E-01 1.573E-01 1.578E-01 1.580E-01 1.582E-01 1.583E-01 1.582E-01 1.580E-01 1.578E-01 1.573E-01 1.568E-01 1.562E-01 1.554E-01 1.545E-01 1.535E-01 1.523E-01 1.511E-01 1.497E-01 1.482E-01 1.466E-01 1.448E-01 1.430E-01 1.410E-01 1.389E-01 1.366E-01 1.343E-01 1.318E-01 1.292E-01 1.265E-01 1.237E-01 1.208E-01 1.177E-01 1.146E-01 1.114E-01 1.080E-01 1.046E-01 1.011E-01 9.758E-02 9.395E-02 9.026E-02 8.652E-02 8.274E-02 7.893E-02 7.509E-02 7.124E-02 6.738E-02 6.353E-02 5.971E-02 5.591E-02 5.215E-02 4.844E-02 4.480E-02 4.123E-02 3.775E-02 3.436E-02 3.109E-02 2.793E-02 2.490E-02 2.201E-02 1.927E-02 1.669E-02 1.427E-02 1.203E-02 9.965E-03 8.084E-03 6.394E-03 4.898E-03 3.600E-03 2.501E-03 1.602E-03 9.039E-04 4.058E-04 1.055E-04 2.162E-07 8.587E-05 3.575E-04 8.092E-04 1.434E-03 2.224E-03 3.171E-03 4.265E-03 5.496E-03 6.854E-03 8.326E-03 9.900E-03 1.156E-02 1.331E-02 1.511E-02 1.697E-02 1.886E-02 2.078E-02 2.270E-02 2.462E-02 2.653E-02 2.840E-02 3.023E-02 3.201E-02 3.372E-02 3.535E-02 3.690E-02 3.834E-02 3.969E-02 4.091E-02 4.202E-02 4.300E-02 4.384E-02 4.455E-02 4.512E-02 4.554E-02 4.582E-02 4.596E-02 4.595E-02 4.580E-02 4.551E-02 4.508E-02 4.451E-02 4.382E-02 4.301E-02 4.208E-02 4.104E-02 3.990E-02 3.867E-02 3.735E-02 3.596E-02 3.449E-02 3.297E-02 3.141E-02 2.980E-02 2.816E-02 2.651E-02 2.485E-02 2.318E-02 2.153E-02 1.896E-02 2.057E-02 2.221E-02 2.386E-02 2.551E-02 2.717E-02 2.881E-02 3.042E-02 3.201E-02 3.355E-02 3.504E-02 3.647E-02 3.783E-02 3.912E-02 4.031E-02 4.141E-02 4.241E-02 4.329E-02 4.406E-02 4.471E-02 4.523E-02 4.561E-02 4.586E-02 4.597E-02 4.593E-02 4.576E-02 4.544E-02 4.498E-02 4.438E-02 4.364E-02 4.277E-02 4.177E-02 4.064E-02 3.940E-02 3.805E-02 3.659E-02 3.504E-02 3.341E-02 3.170E-02 2.993E-02 2.811E-02 2.625E-02 2.436E-02 2.245E-02 2.055E-02 1.866E-02 1.679E-02 1.496E-02 1.317E-02 1.146E-02 9.818E-03 8.267E-03 6.817E-03 5.479E-03 4.265E-03 3.185E-03 2.248E-03 1.464E-03 8.399E-04 3.839E-04 1.022E-04 2.914E-07 8.280E-05 3.533E-04 8.144E-04 1.468E-03 2.314E-03 3.353E-03 4.583E-03 6.003E-03 7.608E-03 9.396E-03 1.136E-02 1.350E-02 1.580E-02 1.825E-02 2.086E-02 2.361E-02 2.650E-02 2.950E-02 3.262E-02 3.584E-02 3.916E-02 4.255E-02 4.602E-02 4.955E-02 5.313E-02 5.674E-02 6.039E-02 6.405E-02 6.772E-02 7.139E-02 7.504E-02 7.867E-02 8.227E-02 8.583E-02 8.934E-02 9.279E-02 9.618E-02 9.950E-02 1.027E-01 1.059E-01 1.090E-01 1.120E-01 1.148E-01 1.176E-01 1.203E-01 1.228E-01 1.253E-01 1.276E-01 1.299E-01 1.320E-01 1.340E-01 1.358E-01 1.376E-01 1.392E-01 1.407E-01 1.421E-01 1.434E-01 1.445E-01 1.456E-01 1.465E-01 1.472E-01 1.479E-01 1.484E-01 1.489E-01 1.492E-01 1.493E-01 1.494E-01 1.493E-01 1.492E-01 1.489E-01 1.484E-01 1.479E-01 1.472E-01 1.465E-01 1.456E-01 1.445E-01 1.434E-01 1.421E-01 1.407E-01 1.392E-01 1.376E-01 1.358E-01 1.340E-01 1.320E-01 1.299E-01 1.276E-01 1.253E-01 1.228E-01 1.203E-01 1.176E-01 1.148E-01 1.120E-01 1.090E-01 1.059E-01 1.027E-01 9.950E-02 9.618E-02 9.279E-02 8.934E-02 8.583E-02 8.227E-02 7.867E-02 7.504E-02 7.139E-02 6.772E-02 6.405E-02 6.039E-02 5.674E-02 5.313E-02 4.955E-02 4.602E-02 4.255E-02 3.916E-02 3.584E-02 3.262E-02 2.950E-02 2.650E-02 2.361E-02 2.086E-02 1.825E-02 1.580E-02 1.350E-02 1.136E-02 9.396E-03 7.608E-03 6.003E-03 4.583E-03 3.353E-03 2.314E-03 1.468E-03 8.144E-04 3.533E-04 8.280E-05 2.914E-07 1.022E-04 3.839E-04 8.399E-04 1.464E-03 2.248E-03 3.185E-03 4.265E-03 5.479E-03 6.817E-03 8.267E-03 9.818E-03 1.146E-02 1.317E-02 1.496E-02 1.679E-02 1.866E-02 2.055E-02 2.245E-02 2.436E-02 2.625E-02 2.811E-02 2.993E-02 3.170E-02 3.341E-02 3.504E-02 3.659E-02 3.805E-02 3.940E-02 4.064E-02 4.177E-02 4.277E-02 4.364E-02 4.438E-02 4.498E-02 4.544E-02 4.576E-02 4.593E-02 4.597E-02 4.586E-02 4.561E-02 4.523E-02 4.471E-02 4.406E-02 4.329E-02 4.241E-02 4.141E-02 4.031E-02 3.912E-02 3.783E-02 3.647E-02 3.504E-02 3.355E-02 3.201E-02 3.042E-02 2.881E-02 2.717E-02 2.551E-02 2.386E-02 2.221E-02 2.057E-02 1.802E-02 1.961E-02 2.123E-02 2.286E-02 2.451E-02 2.616E-02 2.780E-02 2.942E-02 3.102E-02 3.258E-02 3.410E-02 3.556E-02 3.696E-02 3.829E-02 3.953E-02 4.069E-02 4.175E-02 4.270E-02 4.355E-02 4.428E-02 4.488E-02 4.535E-02 4.570E-02 4.590E-02 4.597E-02 4.590E-02 4.569E-02 4.534E-02 4.485E-02 4.422E-02 4.345E-02 4.256E-02 4.154E-02 4.039E-02 3.914E-02 3.778E-02 3.631E-02 3.476E-02 3.313E-02 3.143E-02 2.967E-02 2.786E-02 2.601E-02 2.414E-02 2.225E-02 2.037E-02 1.850E-02 1.665E-02 1.484E-02 1.309E-02 1.139E-02 9.777E-03 8.248E-03 6.817E-03 5.496E-03 4.296E-03 3.227E-03 2.296E-03 1.514E-03 8.868E-04 4.223E-04 1.261E-04 3.342E-06 5.831E-05 2.943E-04 7.135E-04 1.317E-03 2.107E-03 3.080E-03 4.237E-03 5.576E-03 7.092E-03 8.782E-03 1.064E-02 1.266E-02 1.484E-02 1.717E-02 1.965E-02 2.225E-02 2.499E-02 2.784E-02 3.080E-02 3.385E-02 3.700E-02 4.022E-02 4.351E-02 4.686E-02 5.025E-02 5.369E-02 5.714E-02 6.062E-02 6.410E-02 6.757E-02 7.104E-02 7.448E-02 7.790E-02 8.127E-02 8.460E-02 8.787E-02 9.108E-02 9.423E-02 9.730E-02 1.003E-01 1.032E-01 1.060E-01 1.087E-01 1.114E-01 1.139E-01 1.163E-01 1.186E-01 1.208E-01 1.229E-01 1.249E-01 1.267E-01 1.285E-01 1.301E-01 1.316E-01 1.330E-01 1.343E-01 1.354E-01 1.364E-01 1.374E-01 1.381E-01 1.388E-01 1.393E-01 1.398E-01 1.401E-01 1.402E-01 1.403E-01 1.402E-01 1.401E-01 1.398E-01 1.393E-01 1.388E-01 1.381E-01 1.374E-01 1.364E-01 1.354E-01 1.343E-01 1.330E-01 1.316E-01 1.301E-01 1.285E-01 1.267E-01 1.249E-01 1.229E-01 1.208E-01 1.186E-01 1.163E-01 1.139E-01 1.114E-01 1.087E-01 1.060E-01 1.032E-01 1.003E-01 9.730E-02 9.423E-02 9.108E-02 8.787E-02 8.460E-02 8.127E-02 7.790E-02 7.448E-02 7.104E-02 6.757E-02 6.410E-02 6.062E-02 5.714E-02 5.369E-02 5.025E-02 4.686E-02 4.351E-02 4.022E-02 3.700E-02 3.385E-02 3.080E-02 2.784E-02 2.499E-02 2.225E-02 1.965E-02 1.717E-02 1.484E-02 1.266E-02 1.064E-02 8.782E-03 7.092E-03 5.576E-03 4.237E-03 3.080E-03 2.107E-03 1.317E-03 7.135E-04 2.943E-04 5.831E-05 3.342E-06 1.261E-04 4.223E-04 8.868E-04 1.514E-03 2.296E-03 3.227E-03 4.296E-03 5.496E-03 6.817E-03 8.248E-03 9.777E-03 1.139E-02 1.309E-02 1.484E-02 1.665E-02 1.850E-02 2.037E-02 2.225E-02 2.414E-02 2.601E-02 2.786E-02 2.967E-02 3.143E-02 3.313E-02 3.476E-02 3.631E-02 3.778E-02 3.914E-02 4.039E-02 4.154E-02 4.256E-02 4.345E-02 4.422E-02 4.485E-02 4.534E-02 4.569E-02 4.590E-02 4.597E-02 4.590E-02 4.570E-02 4.535E-02 4.488E-02 4.428E-02 4.355E-02 4.270E-02 4.175E-02 4.069E-02 3.953E-02 3.829E-02 3.696E-02 3.556E-02 3.410E-02 3.258E-02 3.102E-02 2.942E-02 2.780E-02 2.616E-02 2.451E-02 2.286E-02 2.123E-02 1.961E-02 1.709E-02 1.865E-02 2.024E-02 2.186E-02 2.349E-02 2.513E-02 2.677E-02 2.840E-02 3.001E-02 3.158E-02 3.312E-02 3.461E-02 3.605E-02 3.741E-02 3.871E-02 3.992E-02 4.104E-02 4.206E-02 4.298E-02 4.378E-02 4.447E-02 4.503E-02 4.546E-02 4.577E-02 4.593E-02 4.597E-02 4.586E-02 4.562E-02 4.523E-02 4.471E-02 4.406E-02 4.327E-02 4.236E-02 4.132E-02 4.016E-02 3.890E-02 3.753E-02 3.607E-02 3.452E-02 3.289E-02 3.119E-02 2.944E-02 2.765E-02 2.581E-02 2.396E-02 2.210E-02 2.023E-02 1.838E-02 1.656E-02 1.478E-02 1.304E-02 1.137E-02 9.777E-03 8.267E-03 6.854E-03 5.548E-03 4.359E-03 3.296E-03 2.369E-03 1.585E-03 9.513E-04 4.741E-04 1.593E-04 1.154E-05 3.466E-05 2.316E-04 6.046E-04 1.155E-03 1.882E-03 2.786E-03 3.866E-03 5.119E-03 6.541E-03 8.130E-03 9.880E-03 1.179E-02 1.384E-02 1.604E-02 1.837E-02 2.084E-02 2.342E-02 2.611E-02 2.891E-02 3.180E-02 3.477E-02 3.782E-02 4.093E-02 4.409E-02 4.730E-02 5.055E-02 5.382E-02 5.710E-02 6.039E-02 6.367E-02 6.695E-02 7.020E-02 7.343E-02 7.661E-02 7.976E-02 8.285E-02 8.588E-02 8.885E-02 9.174E-02 9.456E-02 9.730E-02 9.995E-02 1.025E-01 1.050E-01 1.073E-01 1.096E-01 1.118E-01 1.138E-01 1.158E-01 1.176E-01 1.193E-01 1.209E-01 1.224E-01 1.238E-01 1.251E-01 1.262E-01 1.272E-01 1.281E-01 1.289E-01 1.296E-01 1.301E-01 1.305E-01 1.308E-01 1.310E-01 1.311E-01 1.310E-01 1.308E-01 1.305E-01 1.301E-01 1.296E-01 1.289E-01 1.281E-01 1.272E-01 1.262E-01 1.251E-01 1.238E-01 1.224E-01 1.209E-01 1.193E-01 1.176E-01 1.158E-01 1.138E-01 1.118E-01 1.096E-01 1.073E-01 1.050E-01 1.025E-01 9.995E-02 9.730E-02 9.456E-02 9.174E-02 8.885E-02 8.588E-02 8.285E-02 7.976E-02 7.661E-02 7.343E-02 7.020E-02 6.695E-02 6.367E-02 6.039E-02 5.710E-02 5.382E-02 5.055E-02 4.730E-02 4.409E-02 4.093E-02 3.782E-02 3.477E-02 3.180E-02 2.891E-02 2.611E-02 2.342E-02 2.084E-02 1.837E-02 1.604E-02 1.384E-02 1.179E-02 9.880E-03 8.130E-03 6.541E-03 5.119E-03 3.866E-03 2.786E-03 1.882E-03 1.155E-03 6.046E-04 2.316E-04 3.466E-05 1.154E-05 1.593E-04 4.741E-04 9.513E-04 1.585E-03 2.369E-03 3.296E-03 4.359E-03 5.548E-03 6.854E-03 8.267E-03 9.777E-03 1.137E-02 1.304E-02 1.478E-02 1.656E-02 1.838E-02 2.023E-02 2.210E-02 2.396E-02 2.581E-02 2.765E-02 2.944E-02 3.119E-02 3.289E-02 3.452E-02 3.607E-02 3.753E-02 3.890E-02 4.016E-02 4.132E-02 4.236E-02 4.327E-02 4.406E-02 4.471E-02 4.523E-02 4.562E-02 4.586E-02 4.597E-02 4.593E-02 4.577E-02 4.546E-02 4.503E-02 4.447E-02 4.378E-02 4.298E-02 4.206E-02 4.104E-02 3.992E-02 3.871E-02 3.741E-02 3.605E-02 3.461E-02 3.312E-02 3.158E-02 3.001E-02 2.840E-02 2.677E-02 2.513E-02 2.349E-02 2.186E-02 2.024E-02 1.865E-02 1.616E-02 1.769E-02 1.926E-02 2.086E-02 2.247E-02 2.410E-02 2.573E-02 2.736E-02 2.897E-02 3.056E-02 3.212E-02 3.363E-02 3.510E-02 3.650E-02 3.784E-02 3.910E-02 4.028E-02 4.136E-02 4.234E-02 4.322E-02 4.399E-02 4.463E-02 4.516E-02 4.556E-02 4.582E-02 4.596E-02 4.595E-02 4.582E-02 4.554E-02 4.513E-02 4.458E-02 4.391E-02 4.310E-02 4.217E-02 4.112E-02 3.996E-02 3.869E-02 3.731E-02 3.585E-02 3.430E-02 3.268E-02 3.100E-02 2.926E-02 2.748E-02 2.566E-02 2.383E-02 2.198E-02 2.014E-02 1.832E-02 1.652E-02 1.475E-02 1.304E-02 1.139E-02 9.818E-03 8.326E-03 6.928E-03 5.634E-03 4.453E-03 3.395E-03 2.468E-03 1.679E-03 1.035E-03 5.414E-04 2.042E-04 2.751E-05 1.486E-05 1.690E-04 4.916E-04 9.839E-04 1.646E-03 2.477E-03 3.475E-03 4.639E-03 5.964E-03 7.448E-03 9.086E-03 1.087E-02 1.280E-02 1.486E-02 1.706E-02 1.937E-02 2.180E-02 2.434E-02 2.697E-02 2.969E-02 3.249E-02 3.536E-02 3.829E-02 4.127E-02 4.429E-02 4.734E-02 5.042E-02 5.351E-02 5.661E-02 5.971E-02 6.279E-02 6.585E-02 6.888E-02 7.188E-02 7.484E-02 7.774E-02 8.059E-02 8.338E-02 8.609E-02 8.874E-02 9.130E-02 9.379E-02 9.618E-02 9.848E-02 1.007E-01 1.028E-01 1.048E-01 1.067E-01 1.085E-01 1.102E-01 1.118E-01 1.132E-01 1.146E-01 1.158E-01 1.170E-01 1.180E-01 1.189E-01 1.196E-01 1.203E-01 1.208E-01 1.212E-01 1.215E-01 1.217E-01 1.218E-01 1.217E-01 1.215E-01 1.212E-01 1.208E-01 1.203E-01 1.196E-01 1.189E-01 1.180E-01 1.170E-01 1.158E-01 1.146E-01 1.132E-01 1.118E-01 1.102E-01 1.085E-01 1.067E-01 1.048E-01 1.028E-01 1.007E-01 9.848E-02 9.618E-02 9.379E-02 9.130E-02 8.874E-02 8.609E-02 8.338E-02 8.059E-02 7.774E-02 7.484E-02 7.188E-02 6.888E-02 6.585E-02 6.279E-02 5.971E-02 5.661E-02 5.351E-02 5.042E-02 4.734E-02 4.429E-02 4.127E-02 3.829E-02 3.536E-02 3.249E-02 2.969E-02 2.697E-02 2.434E-02 2.180E-02 1.937E-02 1.706E-02 1.486E-02 1.280E-02 1.087E-02 9.086E-03 7.448E-03 5.964E-03 4.639E-03 3.475E-03 2.477E-03 1.646E-03 9.839E-04 4.916E-04 1.690E-04 1.486E-05 2.751E-05 2.042E-04 5.414E-04 1.035E-03 1.679E-03 2.468E-03 3.395E-03 4.453E-03 5.634E-03 6.928E-03 8.326E-03 9.818E-03 1.139E-02 1.304E-02 1.475E-02 1.652E-02 1.832E-02 2.014E-02 2.198E-02 2.383E-02 2.566E-02 2.748E-02 2.926E-02 3.100E-02 3.268E-02 3.430E-02 3.585E-02 3.731E-02 3.869E-02 3.996E-02 4.112E-02 4.217E-02 4.310E-02 4.391E-02 4.458E-02 4.513E-02 4.554E-02 4.582E-02 4.595E-02 4.596E-02 4.582E-02 4.556E-02 4.516E-02 4.463E-02 4.399E-02 4.322E-02 4.234E-02 4.136E-02 4.028E-02 3.910E-02 3.784E-02 3.650E-02 3.510E-02 3.363E-02 3.212E-02 3.056E-02 2.897E-02 2.736E-02 2.573E-02 2.410E-02 2.247E-02 2.086E-02 1.926E-02 1.769E-02 1.525E-02 1.674E-02 1.828E-02 1.986E-02 2.145E-02 2.307E-02 2.469E-02 2.631E-02 2.792E-02 2.952E-02 3.109E-02 3.262E-02 3.412E-02 3.555E-02 3.693E-02 3.824E-02 3.946E-02 4.061E-02 4.165E-02 4.260E-02 4.344E-02 4.417E-02 4.478E-02 4.527E-02 4.563E-02 4.587E-02 4.597E-02 4.593E-02 4.577E-02 4.547E-02 4.503E-02 4.446E-02 4.377E-02 4.295E-02 4.200E-02 4.094E-02 3.977E-02 3.850E-02 3.713E-02 3.567E-02 3.413E-02 3.251E-02 3.084E-02 2.911E-02 2.735E-02 2.555E-02 2.374E-02 2.192E-02 2.010E-02 1.829E-02 1.652E-02 1.478E-02 1.309E-02 1.146E-02 9.900E-03 8.424E-03 7.039E-03 5.754E-03 4.580E-03 3.524E-03 2.594E-03 1.797E-03 1.139E-03 6.262E-04 2.633E-04 5.426E-05 2.384E-06 1.101E-04 3.791E-04 8.101E-04 1.403E-03 2.157E-03 3.071E-03 4.143E-03 5.369E-03 6.745E-03 8.267E-03 9.931E-03 1.173E-02 1.366E-02 1.571E-02 1.787E-02 2.015E-02 2.252E-02 2.499E-02 2.754E-02 3.016E-02 3.285E-02 3.560E-02 3.839E-02 4.123E-02 4.409E-02 4.698E-02 4.988E-02 5.279E-02 5.569E-02 5.857E-02 6.144E-02 6.429E-02 6.709E-02 6.986E-02 7.258E-02 7.524E-02 7.784E-02 8.038E-02 8.285E-02 8.524E-02 8.755E-02 8.977E-02 9.191E-02 9.395E-02 9.590E-02 9.775E-02 9.950E-02 1.011E-01 1.027E-01 1.041E-01 1.054E-01 1.067E-01 1.078E-01 1.087E-01 1.096E-01 1.104E-01 1.110E-01 1.115E-01 1.120E-01 1.122E-01 1.124E-01 1.125E-01 1.124E-01 1.122E-01 1.120E-01 1.115E-01 1.110E-01 1.104E-01 1.096E-01 1.087E-01 1.078E-01 1.067E-01 1.054E-01 1.041E-01 1.027E-01 1.011E-01 9.950E-02 9.775E-02 9.590E-02 9.395E-02 9.191E-02 8.977E-02 8.755E-02 8.524E-02 8.285E-02 8.038E-02 7.784E-02 7.524E-02 7.258E-02 6.986E-02 6.709E-02 6.429E-02 6.144E-02 5.857E-02 5.569E-02 5.279E-02 4.988E-02 4.698E-02 4.409E-02 4.123E-02 3.839E-02 3.560E-02 3.285E-02 3.016E-02 2.754E-02 2.499E-02 2.252E-02 2.015E-02 1.787E-02 1.571E-02 1.366E-02 1.173E-02 9.931E-03 8.267E-03 6.745E-03 5.369E-03 4.143E-03 3.071E-03 2.157E-03 1.403E-03 8.101E-04 3.791E-04 1.101E-04 2.384E-06 5.426E-05 2.633E-04 6.262E-04 1.139E-03 1.797E-03 2.594E-03 3.524E-03 4.580E-03 5.754E-03 7.039E-03 8.424E-03 9.900E-03 1.146E-02 1.309E-02 1.478E-02 1.652E-02 1.829E-02 2.010E-02 2.192E-02 2.374E-02 2.555E-02 2.735E-02 2.911E-02 3.084E-02 3.251E-02 3.413E-02 3.567E-02 3.713E-02 3.850E-02 3.977E-02 4.094E-02 4.200E-02 4.295E-02 4.377E-02 4.446E-02 4.503E-02 4.547E-02 4.577E-02 4.593E-02 4.597E-02 4.587E-02 4.563E-02 4.527E-02 4.478E-02 4.417E-02 4.344E-02 4.260E-02 4.165E-02 4.061E-02 3.946E-02 3.824E-02 3.693E-02 3.555E-02 3.412E-02 3.262E-02 3.109E-02 2.952E-02 2.792E-02 2.631E-02 2.469E-02 2.307E-02 2.145E-02 1.986E-02 1.828E-02 1.674E-02 1.434E-02 1.580E-02 1.731E-02 1.886E-02 2.043E-02 2.202E-02 2.363E-02 2.525E-02 2.686E-02 2.846E-02 3.004E-02 3.159E-02 3.310E-02 3.457E-02 3.598E-02 3.733E-02 3.860E-02 3.980E-02 4.091E-02 4.192E-02 4.284E-02 4.364E-02 4.434E-02 4.492E-02 4.537E-02 4.570E-02 4.590E-02 4.597E-02 4.591E-02 4.572E-02 4.539E-02 4.494E-02 4.435E-02 4.364E-02 4.280E-02 4.185E-02 4.079E-02 3.961E-02 3.834E-02 3.697E-02 3.551E-02 3.398E-02 3.238E-02 3.072E-02 2.901E-02 2.726E-02 2.549E-02 2.369E-02 2.189E-02 2.010E-02 1.832E-02 1.656E-02 1.484E-02 1.317E-02 1.156E-02 1.002E-02 8.561E-03 7.188E-03 5.911E-03 4.741E-03 3.684E-03 2.748E-03 1.940E-03 1.266E-03 7.312E-04 3.396E-04 9.521E-05 1.084E-06 5.944E-05 2.717E-04 6.386E-04 1.160E-03 1.835E-03 2.662E-03 3.639E-03 4.762E-03 6.028E-03 7.434E-03 8.973E-03 1.064E-02 1.243E-02 1.434E-02 1.635E-02 1.847E-02 2.068E-02 2.298E-02 2.536E-02 2.781E-02 3.032E-02 3.288E-02 3.549E-02 3.814E-02 4.082E-02 4.351E-02 4.622E-02 4.893E-02 5.164E-02 5.433E-02 5.701E-02 5.966E-02 6.228E-02 6.485E-02 6.738E-02 6.986E-02 7.228E-02 7.463E-02 7.692E-02 7.913E-02 8.127E-02 8.332E-02 8.529E-02 8.717E-02 8.896E-02 9.065E-02 9.224E-02 9.373E-02 9.512E-02 9.640E-02 9.758E-02 9.865E-02 9.961E-02 1.005E-01 1.012E-01 1.018E-01 1.023E-01 1.027E-01 1.030E-01 1.032E-01 1.033E-01 1.032E-01 1.030E-01 1.027E-01 1.023E-01 1.018E-01 1.012E-01 1.005E-01 9.961E-02 9.865E-02 9.758E-02 9.640E-02 9.512E-02 9.373E-02 9.224E-02 9.065E-02 8.896E-02 8.717E-02 8.529E-02 8.332E-02 8.127E-02 7.913E-02 7.692E-02 7.463E-02 7.228E-02 6.986E-02 6.738E-02 6.485E-02 6.228E-02 5.966E-02 5.701E-02 5.433E-02 5.164E-02 4.893E-02 4.622E-02 4.351E-02 4.082E-02 3.814E-02 3.549E-02 3.288E-02 3.032E-02 2.781E-02 2.536E-02 2.298E-02 2.068E-02 1.847E-02 1.635E-02 1.434E-02 1.243E-02 1.064E-02 8.973E-03 7.434E-03 6.028E-03 4.762E-03 3.639E-03 2.662E-03 1.835E-03 1.160E-03 6.386E-04 2.717E-04 5.944E-05 1.084E-06 9.521E-05 3.396E-04 7.312E-04 1.266E-03 1.940E-03 2.748E-03 3.684E-03 4.741E-03 5.911E-03 7.188E-03 8.561E-03 1.002E-02 1.156E-02 1.317E-02 1.484E-02 1.656E-02 1.832E-02 2.010E-02 2.189E-02 2.369E-02 2.549E-02 2.726E-02 2.901E-02 3.072E-02 3.238E-02 3.398E-02 3.551E-02 3.697E-02 3.834E-02 3.961E-02 4.079E-02 4.185E-02 4.280E-02 4.364E-02 4.435E-02 4.494E-02 4.539E-02 4.572E-02 4.591E-02 4.597E-02 4.590E-02 4.570E-02 4.537E-02 4.492E-02 4.434E-02 4.364E-02 4.284E-02 4.192E-02 4.091E-02 3.980E-02 3.860E-02 3.733E-02 3.598E-02 3.457E-02 3.310E-02 3.159E-02 3.004E-02 2.846E-02 2.686E-02 2.525E-02 2.363E-02 2.202E-02 2.043E-02 1.886E-02 1.731E-02 1.580E-02 1.344E-02 1.487E-02 1.635E-02 1.786E-02 1.941E-02 2.098E-02 2.257E-02 2.418E-02 2.578E-02 2.738E-02 2.897E-02 3.053E-02 3.206E-02 3.355E-02 3.499E-02 3.638E-02 3.770E-02 3.894E-02 4.011E-02 4.119E-02 4.217E-02 4.305E-02 4.382E-02 4.449E-02 4.503E-02 4.545E-02 4.575E-02 4.593E-02 4.597E-02 4.588E-02 4.567E-02 4.532E-02 4.485E-02 4.425E-02 4.352E-02 4.268E-02 4.172E-02 4.065E-02 3.948E-02 3.820E-02 3.684E-02 3.539E-02 3.387E-02 3.229E-02 3.064E-02 2.895E-02 2.722E-02 2.547E-02 2.369E-02 2.192E-02 2.014E-02 1.838E-02 1.665E-02 1.496E-02 1.331E-02 1.171E-02 1.019E-02 8.739E-03 7.375E-03 6.105E-03 4.936E-03 3.877E-03 2.933E-03 2.112E-03 1.419E-03 8.593E-04 4.364E-04 1.541E-04 1.518E-05 2.164E-05 1.748E-04 4.751E-04 9.224E-04 1.516E-03 2.254E-03 3.134E-03 4.153E-03 5.308E-03 6.595E-03 8.009E-03 9.544E-03 1.120E-02 1.296E-02 1.482E-02 1.678E-02 1.883E-02 2.097E-02 2.317E-02 2.545E-02 2.778E-02 3.016E-02 3.259E-02 3.505E-02 3.753E-02 4.004E-02 4.255E-02 4.507E-02 4.759E-02 5.009E-02 5.257E-02 5.503E-02 5.745E-02 5.984E-02 6.218E-02 6.447E-02 6.671E-02 6.888E-02 7.099E-02 7.303E-02 7.499E-02 7.687E-02 7.867E-02 8.038E-02 8.200E-02 8.353E-02 8.497E-02 8.631E-02 8.755E-02 8.868E-02 8.972E-02 9.065E-02 9.147E-02 9.218E-02 9.279E-02 9.329E-02 9.367E-02 9.395E-02 9.412E-02 9.417E-02 9.412E-02 9.395E-02 9.367E-02 9.329E-02 9.279E-02 9.218E-02 9.147E-02 9.065E-02 8.972E-02 8.868E-02 8.755E-02 8.631E-02 8.497E-02 8.353E-02 8.200E-02 8.038E-02 7.867E-02 7.687E-02 7.499E-02 7.303E-02 7.099E-02 6.888E-02 6.671E-02 6.447E-02 6.218E-02 5.984E-02 5.745E-02 5.503E-02 5.257E-02 5.009E-02 4.759E-02 4.507E-02 4.255E-02 4.004E-02 3.753E-02 3.505E-02 3.259E-02 3.016E-02 2.778E-02 2.545E-02 2.317E-02 2.097E-02 1.883E-02 1.678E-02 1.482E-02 1.296E-02 1.120E-02 9.544E-03 8.009E-03 6.595E-03 5.308E-03 4.153E-03 3.134E-03 2.254E-03 1.516E-03 9.224E-04 4.751E-04 1.748E-04 2.164E-05 1.518E-05 1.541E-04 4.364E-04 8.593E-04 1.419E-03 2.112E-03 2.933E-03 3.877E-03 4.936E-03 6.105E-03 7.375E-03 8.739E-03 1.019E-02 1.171E-02 1.331E-02 1.496E-02 1.665E-02 1.838E-02 2.014E-02 2.192E-02 2.369E-02 2.547E-02 2.722E-02 2.895E-02 3.064E-02 3.229E-02 3.387E-02 3.539E-02 3.684E-02 3.820E-02 3.948E-02 4.065E-02 4.172E-02 4.268E-02 4.352E-02 4.425E-02 4.485E-02 4.532E-02 4.567E-02 4.588E-02 4.597E-02 4.593E-02 4.575E-02 4.545E-02 4.503E-02 4.449E-02 4.382E-02 4.305E-02 4.217E-02 4.119E-02 4.011E-02 3.894E-02 3.770E-02 3.638E-02 3.499E-02 3.355E-02 3.206E-02 3.053E-02 2.897E-02 2.738E-02 2.578E-02 2.418E-02 2.257E-02 2.098E-02 1.941E-02 1.786E-02 1.635E-02 1.487E-02 1.257E-02 1.395E-02 1.539E-02 1.687E-02 1.839E-02 1.994E-02 2.151E-02 2.310E-02 2.469E-02 2.629E-02 2.788E-02 2.945E-02 3.099E-02 3.250E-02 3.397E-02 3.539E-02 3.675E-02 3.804E-02 3.926E-02 4.039E-02 4.144E-02 4.239E-02 4.324E-02 4.398E-02 4.462E-02 4.513E-02 4.553E-02 4.580E-02 4.594E-02 4.596E-02 4.586E-02 4.562E-02 4.526E-02 4.477E-02 4.416E-02 4.342E-02 4.257E-02 4.161E-02 4.054E-02 3.937E-02 3.810E-02 3.674E-02 3.531E-02 3.380E-02 3.223E-02 3.060E-02 2.893E-02 2.722E-02 2.549E-02 2.374E-02 2.198E-02 2.023E-02 1.850E-02 1.679E-02 1.511E-02 1.348E-02 1.191E-02 1.040E-02 8.958E-03 7.602E-03 6.336E-03 5.168E-03 4.103E-03 3.150E-03 2.314E-03 1.601E-03 1.014E-03 5.573E-04 2.350E-04 4.919E-05 1.764E-06 9.381E-05 3.258E-04 6.974E-04 1.208E-03 1.855E-03 2.637E-03 3.552E-03 4.594E-03 5.762E-03 7.050E-03 8.452E-03 9.965E-03 1.158E-02 1.329E-02 1.510E-02 1.699E-02 1.896E-02 2.099E-02 2.309E-02 2.525E-02 2.745E-02 2.969E-02 3.196E-02 3.426E-02 3.658E-02 3.890E-02 4.123E-02 4.355E-02 4.586E-02 4.815E-02 5.042E-02 5.266E-02 5.486E-02 5.701E-02 5.912E-02 6.117E-02 6.316E-02 6.509E-02 6.695E-02 6.874E-02 7.045E-02 7.208E-02 7.363E-02 7.509E-02 7.646E-02 7.774E-02 7.893E-02 8.002E-02 8.101E-02 8.190E-02 8.269E-02 8.338E-02 8.396E-02 8.444E-02 8.481E-02 8.508E-02 8.524E-02 8.529E-02 8.524E-02 8.508E-02 8.481E-02 8.444E-02 8.396E-02 8.338E-02 8.269E-02 8.190E-02 8.101E-02 8.002E-02 7.893E-02 7.774E-02 7.646E-02 7.509E-02 7.363E-02 7.208E-02 7.045E-02 6.874E-02 6.695E-02 6.509E-02 6.316E-02 6.117E-02 5.912E-02 5.701E-02 5.486E-02 5.266E-02 5.042E-02 4.815E-02 4.586E-02 4.355E-02 4.123E-02 3.890E-02 3.658E-02 3.426E-02 3.196E-02 2.969E-02 2.745E-02 2.525E-02 2.309E-02 2.099E-02 1.896E-02 1.699E-02 1.510E-02 1.329E-02 1.158E-02 9.965E-03 8.452E-03 7.050E-03 5.762E-03 4.594E-03 3.552E-03 2.637E-03 1.855E-03 1.208E-03 6.974E-04 3.258E-04 9.381E-05 1.764E-06 4.919E-05 2.350E-04 5.573E-04 1.014E-03 1.601E-03 2.314E-03 3.150E-03 4.103E-03 5.168E-03 6.336E-03 7.602E-03 8.958E-03 1.040E-02 1.191E-02 1.348E-02 1.511E-02 1.679E-02 1.850E-02 2.023E-02 2.198E-02 2.374E-02 2.549E-02 2.722E-02 2.893E-02 3.060E-02 3.223E-02 3.380E-02 3.531E-02 3.674E-02 3.810E-02 3.937E-02 4.054E-02 4.161E-02 4.257E-02 4.342E-02 4.416E-02 4.477E-02 4.526E-02 4.562E-02 4.586E-02 4.596E-02 4.594E-02 4.580E-02 4.553E-02 4.513E-02 4.462E-02 4.398E-02 4.324E-02 4.239E-02 4.144E-02 4.039E-02 3.926E-02 3.804E-02 3.675E-02 3.539E-02 3.397E-02 3.250E-02 3.099E-02 2.945E-02 2.788E-02 2.629E-02 2.469E-02 2.310E-02 2.151E-02 1.994E-02 1.839E-02 1.687E-02 1.539E-02 1.395E-02 1.170E-02 1.305E-02 1.445E-02 1.589E-02 1.738E-02 1.890E-02 2.045E-02 2.202E-02 2.360E-02 2.519E-02 2.677E-02 2.835E-02 2.990E-02 3.143E-02 3.292E-02 3.436E-02 3.575E-02 3.709E-02 3.835E-02 3.954E-02 4.065E-02 4.167E-02 4.259E-02 4.341E-02 4.413E-02 4.473E-02 4.522E-02 4.559E-02 4.583E-02 4.596E-02 4.596E-02 4.583E-02 4.558E-02 4.520E-02 4.470E-02 4.408E-02 4.334E-02 4.248E-02 4.152E-02 4.045E-02 3.928E-02 3.802E-02 3.668E-02 3.526E-02 3.376E-02 3.221E-02 3.060E-02 2.895E-02 2.726E-02 2.555E-02 2.383E-02 2.210E-02 2.037E-02 1.866E-02 1.697E-02 1.531E-02 1.370E-02 1.214E-02 1.065E-02 9.219E-03 7.870E-03 6.607E-03 5.437E-03 4.367E-03 3.402E-03 2.550E-03 1.813E-03 1.197E-03 7.061E-04 3.421E-04 1.079E-04 5.093E-06 3.466E-05 1.969E-04 4.916E-04 9.178E-04 1.474E-03 2.157E-03 2.966E-03 3.896E-03 4.944E-03 6.106E-03 7.376E-03 8.750E-03 1.022E-02 1.179E-02 1.344E-02 1.516E-02 1.697E-02 1.883E-02 2.076E-02 2.274E-02 2.476E-02 2.682E-02 2.891E-02 3.102E-02 3.315E-02 3.529E-02 3.743E-02 3.956E-02 4.168E-02 4.378E-02 4.586E-02 4.791E-02 4.992E-02 5.189E-02 5.382E-02 5.569E-02 5.750E-02 5.925E-02 6.094E-02 6.255E-02 6.410E-02 6.556E-02 6.695E-02 6.825E-02 6.947E-02 7.060E-02 7.163E-02 7.258E-02 7.343E-02 7.418E-02 7.484E-02 7.539E-02 7.585E-02 7.621E-02 7.646E-02 7.661E-02 7.666E-02 7.661E-02 7.646E-02 7.621E-02 7.585E-02 7.539E-02 7.484E-02 7.418E-02 7.343E-02 7.258E-02 7.163E-02 7.060E-02 6.947E-02 6.825E-02 6.695E-02 6.556E-02 6.410E-02 6.255E-02 6.094E-02 5.925E-02 5.750E-02 5.569E-02 5.382E-02 5.189E-02 4.992E-02 4.791E-02 4.586E-02 4.378E-02 4.168E-02 3.956E-02 3.743E-02 3.529E-02 3.315E-02 3.102E-02 2.891E-02 2.682E-02 2.476E-02 2.274E-02 2.076E-02 1.883E-02 1.697E-02 1.516E-02 1.344E-02 1.179E-02 1.022E-02 8.750E-03 7.376E-03 6.106E-03 4.944E-03 3.896E-03 2.966E-03 2.157E-03 1.474E-03 9.178E-04 4.916E-04 1.969E-04 3.466E-05 5.093E-06 1.079E-04 3.421E-04 7.061E-04 1.197E-03 1.813E-03 2.550E-03 3.402E-03 4.367E-03 5.437E-03 6.607E-03 7.870E-03 9.219E-03 1.065E-02 1.214E-02 1.370E-02 1.531E-02 1.697E-02 1.866E-02 2.037E-02 2.210E-02 2.383E-02 2.555E-02 2.726E-02 2.895E-02 3.060E-02 3.221E-02 3.376E-02 3.526E-02 3.668E-02 3.802E-02 3.928E-02 4.045E-02 4.152E-02 4.248E-02 4.334E-02 4.408E-02 4.470E-02 4.520E-02 4.558E-02 4.583E-02 4.596E-02 4.596E-02 4.583E-02 4.559E-02 4.522E-02 4.473E-02 4.413E-02 4.341E-02 4.259E-02 4.167E-02 4.065E-02 3.954E-02 3.835E-02 3.709E-02 3.575E-02 3.436E-02 3.292E-02 3.143E-02 2.990E-02 2.835E-02 2.677E-02 2.519E-02 2.360E-02 2.202E-02 2.045E-02 1.890E-02 1.738E-02 1.589E-02 1.445E-02 1.305E-02 1.086E-02 1.216E-02 1.352E-02 1.492E-02 1.638E-02 1.787E-02 1.939E-02 2.094E-02 2.250E-02 2.408E-02 2.565E-02 2.723E-02 2.879E-02 3.032E-02 3.183E-02 3.330E-02 3.472E-02 3.609E-02 3.740E-02 3.864E-02 3.980E-02 4.088E-02 4.187E-02 4.277E-02 4.356E-02 4.425E-02 4.483E-02 4.529E-02 4.564E-02 4.586E-02 4.596E-02 4.594E-02 4.580E-02 4.554E-02 4.515E-02 4.464E-02 4.401E-02 4.327E-02 4.241E-02 4.145E-02 4.039E-02 3.923E-02 3.798E-02 3.665E-02 3.524E-02 3.376E-02 3.223E-02 3.064E-02 2.901E-02 2.735E-02 2.566E-02 2.396E-02 2.225E-02 2.055E-02 1.886E-02 1.719E-02 1.556E-02 1.397E-02 1.242E-02 1.094E-02 9.522E-03 8.179E-03 6.918E-03 5.746E-03 4.668E-03 3.691E-03 2.820E-03 2.060E-03 1.414E-03 8.868E-04 4.801E-04 1.963E-04 3.715E-05 3.357E-06 9.524E-05 3.124E-04 6.540E-04 1.118E-03 1.703E-03 2.406E-03 3.224E-03 4.153E-03 5.189E-03 6.328E-03 7.564E-03 8.893E-03 1.031E-02 1.180E-02 1.337E-02 1.501E-02 1.671E-02 1.847E-02 2.027E-02 2.212E-02 2.400E-02 2.591E-02 2.784E-02 2.978E-02 3.173E-02 3.369E-02 3.563E-02 3.757E-02 3.949E-02 4.138E-02 4.324E-02 4.507E-02 4.686E-02 4.860E-02 5.030E-02 5.193E-02 5.351E-02 5.503E-02 5.648E-02 5.786E-02 5.916E-02 6.039E-02 6.154E-02 6.260E-02 6.358E-02 6.447E-02 6.528E-02 6.599E-02 6.661E-02 6.714E-02 6.757E-02 6.791E-02 6.815E-02 6.830E-02 6.835E-02 6.830E-02 6.815E-02 6.791E-02 6.757E-02 6.714E-02 6.661E-02 6.599E-02 6.528E-02 6.447E-02 6.358E-02 6.260E-02 6.154E-02 6.039E-02 5.916E-02 5.786E-02 5.648E-02 5.503E-02 5.351E-02 5.193E-02 5.030E-02 4.860E-02 4.686E-02 4.507E-02 4.324E-02 4.138E-02 3.949E-02 3.757E-02 3.563E-02 3.369E-02 3.173E-02 2.978E-02 2.784E-02 2.591E-02 2.400E-02 2.212E-02 2.027E-02 1.847E-02 1.671E-02 1.501E-02 1.337E-02 1.180E-02 1.031E-02 8.893E-03 7.564E-03 6.328E-03 5.189E-03 4.153E-03 3.224E-03 2.406E-03 1.703E-03 1.118E-03 6.540E-04 3.124E-04 9.524E-05 3.357E-06 3.715E-05 1.963E-04 4.801E-04 8.868E-04 1.414E-03 2.060E-03 2.820E-03 3.691E-03 4.668E-03 5.746E-03 6.918E-03 8.179E-03 9.522E-03 1.094E-02 1.242E-02 1.397E-02 1.556E-02 1.719E-02 1.886E-02 2.055E-02 2.225E-02 2.396E-02 2.566E-02 2.735E-02 2.901E-02 3.064E-02 3.223E-02 3.376E-02 3.524E-02 3.665E-02 3.798E-02 3.923E-02 4.039E-02 4.145E-02 4.241E-02 4.327E-02 4.401E-02 4.464E-02 4.515E-02 4.554E-02 4.580E-02 4.594E-02 4.596E-02 4.586E-02 4.564E-02 4.529E-02 4.483E-02 4.425E-02 4.356E-02 4.277E-02 4.187E-02 4.088E-02 3.980E-02 3.864E-02 3.740E-02 3.609E-02 3.472E-02 3.330E-02 3.183E-02 3.032E-02 2.879E-02 2.723E-02 2.565E-02 2.408E-02 2.250E-02 2.094E-02 1.939E-02 1.787E-02 1.638E-02 1.492E-02 1.352E-02 1.216E-02 1.004E-02 1.129E-02 1.260E-02 1.397E-02 1.538E-02 1.684E-02 1.833E-02 1.986E-02 2.140E-02 2.296E-02 2.453E-02 2.610E-02 2.766E-02 2.920E-02 3.072E-02 3.221E-02 3.366E-02 3.506E-02 3.641E-02 3.769E-02 3.890E-02 4.004E-02 4.110E-02 4.206E-02 4.293E-02 4.370E-02 4.436E-02 4.491E-02 4.535E-02 4.568E-02 4.588E-02 4.597E-02 4.593E-02 4.578E-02 4.550E-02 4.510E-02 4.459E-02 4.396E-02 4.321E-02 4.236E-02 4.141E-02 4.035E-02 3.920E-02 3.796E-02 3.665E-02 3.526E-02 3.380E-02 3.229E-02 3.072E-02 2.911E-02 2.748E-02 2.581E-02 2.414E-02 2.245E-02 2.078E-02 1.911E-02 1.747E-02 1.585E-02 1.428E-02 1.275E-02 1.128E-02 9.869E-03 8.532E-03 7.272E-03 6.096E-03 5.010E-03 4.020E-03 3.130E-03 2.345E-03 1.668E-03 1.104E-03 6.535E-04 3.197E-04 1.036E-04 6.105E-06 2.738E-05 1.670E-04 4.241E-04 7.971E-04 1.284E-03 1.882E-03 2.589E-03 3.400E-03 4.312E-03 5.320E-03 6.421E-03 7.608E-03 8.877E-03 1.022E-02 1.164E-02 1.312E-02 1.465E-02 1.624E-02 1.787E-02 1.955E-02 2.125E-02 2.298E-02 2.473E-02 2.650E-02 2.826E-02 3.003E-02 3.180E-02 3.355E-02 3.529E-02 3.700E-02 3.868E-02 4.033E-02 4.194E-02 4.351E-02 4.503E-02 4.650E-02 4.791E-02 4.926E-02 5.055E-02 5.177E-02 5.291E-02 5.399E-02 5.499E-02 5.591E-02 5.674E-02 5.750E-02 5.817E-02 5.875E-02 5.925E-02 5.966E-02 5.998E-02 6.021E-02 6.034E-02 6.039E-02 6.034E-02 6.021E-02 5.998E-02 5.966E-02 5.925E-02 5.875E-02 5.817E-02 5.750E-02 5.674E-02 5.591E-02 5.499E-02 5.399E-02 5.291E-02 5.177E-02 5.055E-02 4.926E-02 4.791E-02 4.650E-02 4.503E-02 4.351E-02 4.194E-02 4.033E-02 3.868E-02 3.700E-02 3.529E-02 3.355E-02 3.180E-02 3.003E-02 2.826E-02 2.650E-02 2.473E-02 2.298E-02 2.125E-02 1.955E-02 1.787E-02 1.624E-02 1.465E-02 1.312E-02 1.164E-02 1.022E-02 8.877E-03 7.608E-03 6.421E-03 5.320E-03 4.312E-03 3.400E-03 2.589E-03 1.882E-03 1.284E-03 7.971E-04 4.241E-04 1.670E-04 2.738E-05 6.105E-06 1.036E-04 3.197E-04 6.535E-04 1.104E-03 1.668E-03 2.345E-03 3.130E-03 4.020E-03 5.010E-03 6.096E-03 7.272E-03 8.532E-03 9.869E-03 1.128E-02 1.275E-02 1.428E-02 1.585E-02 1.747E-02 1.911E-02 2.078E-02 2.245E-02 2.414E-02 2.581E-02 2.748E-02 2.911E-02 3.072E-02 3.229E-02 3.380E-02 3.526E-02 3.665E-02 3.796E-02 3.920E-02 4.035E-02 4.141E-02 4.236E-02 4.321E-02 4.396E-02 4.459E-02 4.510E-02 4.550E-02 4.578E-02 4.593E-02 4.597E-02 4.588E-02 4.568E-02 4.535E-02 4.491E-02 4.436E-02 4.370E-02 4.293E-02 4.206E-02 4.110E-02 4.004E-02 3.890E-02 3.769E-02 3.641E-02 3.506E-02 3.366E-02 3.221E-02 3.072E-02 2.920E-02 2.766E-02 2.610E-02 2.453E-02 2.296E-02 2.140E-02 1.986E-02 1.833E-02 1.684E-02 1.538E-02 1.397E-02 1.260E-02 1.129E-02 9.234E-03 1.044E-02 1.171E-02 1.303E-02 1.441E-02 1.583E-02 1.729E-02 1.878E-02 2.030E-02 2.184E-02 2.340E-02 2.495E-02 2.651E-02 2.806E-02 2.959E-02 3.109E-02 3.256E-02 3.399E-02 3.537E-02 3.669E-02 3.795E-02 3.914E-02 4.026E-02 4.128E-02 4.222E-02 4.307E-02 4.381E-02 4.445E-02 4.499E-02 4.541E-02 4.571E-02 4.590E-02 4.597E-02 4.592E-02 4.576E-02 4.547E-02 4.507E-02 4.455E-02 4.392E-02 4.318E-02 4.233E-02 4.138E-02 4.034E-02 3.920E-02 3.798E-02 3.668E-02 3.531E-02 3.387E-02 3.238E-02 3.084E-02 2.926E-02 2.765E-02 2.601E-02 2.436E-02 2.270E-02 2.105E-02 1.940E-02 1.778E-02 1.619E-02 1.463E-02 1.312E-02 1.166E-02 1.026E-02 8.928E-03 7.669E-03 6.489E-03 5.395E-03 4.390E-03 3.481E-03 2.671E-03 1.963E-03 1.361E-03 8.671E-04 4.831E-04 2.102E-04 4.919E-05 2.162E-07 6.286E-05 2.362E-04 5.187E-04 9.085E-04 1.403E-03 2.000E-03 2.695E-03 3.485E-03 4.365E-03 5.332E-03 6.381E-03 7.506E-03 8.703E-03 9.965E-03 1.129E-02 1.266E-02 1.409E-02 1.555E-02 1.706E-02 1.859E-02 2.015E-02 2.172E-02 2.331E-02 2.490E-02 2.650E-02 2.808E-02 2.966E-02 3.122E-02 3.275E-02 3.426E-02 3.574E-02 3.718E-02 3.857E-02 3.993E-02 4.123E-02 4.248E-02 4.367E-02 4.480E-02 4.586E-02 4.686E-02 4.779E-02 4.864E-02 4.943E-02 5.013E-02 5.076E-02 5.130E-02 5.177E-02 5.215E-02 5.244E-02 5.266E-02 5.279E-02 5.283E-02 5.279E-02 5.266E-02 5.244E-02 5.215E-02 5.177E-02 5.130E-02 5.076E-02 5.013E-02 4.943E-02 4.864E-02 4.779E-02 4.686E-02 4.586E-02 4.480E-02 4.367E-02 4.248E-02 4.123E-02 3.993E-02 3.857E-02 3.718E-02 3.574E-02 3.426E-02 3.275E-02 3.122E-02 2.966E-02 2.808E-02 2.650E-02 2.490E-02 2.331E-02 2.172E-02 2.015E-02 1.859E-02 1.706E-02 1.555E-02 1.409E-02 1.266E-02 1.129E-02 9.965E-03 8.703E-03 7.506E-03 6.381E-03 5.332E-03 4.365E-03 3.485E-03 2.695E-03 2.000E-03 1.403E-03 9.085E-04 5.187E-04 2.362E-04 6.286E-05 2.162E-07 4.919E-05 2.102E-04 4.831E-04 8.671E-04 1.361E-03 1.963E-03 2.671E-03 3.481E-03 4.390E-03 5.395E-03 6.489E-03 7.669E-03 8.928E-03 1.026E-02 1.166E-02 1.312E-02 1.463E-02 1.619E-02 1.778E-02 1.940E-02 2.105E-02 2.270E-02 2.436E-02 2.601E-02 2.765E-02 2.926E-02 3.084E-02 3.238E-02 3.387E-02 3.531E-02 3.668E-02 3.798E-02 3.920E-02 4.034E-02 4.138E-02 4.233E-02 4.318E-02 4.392E-02 4.455E-02 4.507E-02 4.547E-02 4.576E-02 4.592E-02 4.597E-02 4.590E-02 4.571E-02 4.541E-02 4.499E-02 4.445E-02 4.381E-02 4.307E-02 4.222E-02 4.128E-02 4.026E-02 3.914E-02 3.795E-02 3.669E-02 3.537E-02 3.399E-02 3.256E-02 3.109E-02 2.959E-02 2.806E-02 2.651E-02 2.495E-02 2.340E-02 2.184E-02 2.030E-02 1.878E-02 1.729E-02 1.583E-02 1.441E-02 1.303E-02 1.171E-02 1.044E-02 8.458E-03 9.614E-03 1.083E-02 1.211E-02 1.344E-02 1.483E-02 1.625E-02 1.771E-02 1.921E-02 2.072E-02 2.226E-02 2.381E-02 2.535E-02 2.690E-02 2.843E-02 2.995E-02 3.143E-02 3.288E-02 3.429E-02 3.565E-02 3.695E-02 3.819E-02 3.936E-02 4.045E-02 4.145E-02 4.237E-02 4.319E-02 4.391E-02 4.453E-02 4.505E-02 4.545E-02 4.574E-02 4.591E-02 4.597E-02 4.591E-02 4.574E-02 4.545E-02 4.504E-02 4.452E-02 4.390E-02 4.316E-02 4.232E-02 4.138E-02 4.035E-02 3.923E-02 3.802E-02 3.674E-02 3.539E-02 3.398E-02 3.251E-02 3.100E-02 2.944E-02 2.786E-02 2.625E-02 2.462E-02 2.299E-02 2.136E-02 1.974E-02 1.815E-02 1.657E-02 1.503E-02 1.354E-02 1.209E-02 1.070E-02 9.370E-03 8.111E-03 6.928E-03 5.824E-03 4.805E-03 3.877E-03 3.041E-03 2.302E-03 1.663E-03 1.126E-03 6.919E-04 3.627E-04 1.389E-04 2.057E-05 7.280E-06 9.812E-05 2.917E-04 5.861E-04 9.791E-04 1.468E-03 2.049E-03 2.720E-03 3.475E-03 4.312E-03 5.225E-03 6.210E-03 7.262E-03 8.375E-03 9.544E-03 1.076E-02 1.203E-02 1.333E-02 1.467E-02 1.604E-02 1.743E-02 1.883E-02 2.025E-02 2.167E-02 2.309E-02 2.451E-02 2.591E-02 2.730E-02 2.866E-02 3.000E-02 3.131E-02 3.259E-02 3.382E-02 3.501E-02 3.616E-02 3.725E-02 3.829E-02 3.927E-02 4.019E-02 4.104E-02 4.183E-02 4.255E-02 4.320E-02 4.378E-02 4.429E-02 4.472E-02 4.507E-02 4.535E-02 4.554E-02 4.566E-02 4.570E-02 4.566E-02 4.554E-02 4.535E-02 4.507E-02 4.472E-02 4.429E-02 4.378E-02 4.320E-02 4.255E-02 4.183E-02 4.104E-02 4.019E-02 3.927E-02 3.829E-02 3.725E-02 3.616E-02 3.501E-02 3.382E-02 3.259E-02 3.131E-02 3.000E-02 2.866E-02 2.730E-02 2.591E-02 2.451E-02 2.309E-02 2.167E-02 2.025E-02 1.883E-02 1.743E-02 1.604E-02 1.467E-02 1.333E-02 1.203E-02 1.076E-02 9.544E-03 8.375E-03 7.262E-03 6.210E-03 5.225E-03 4.312E-03 3.475E-03 2.720E-03 2.049E-03 1.468E-03 9.791E-04 5.861E-04 2.917E-04 9.812E-05 7.280E-06 2.057E-05 1.389E-04 3.627E-04 6.919E-04 1.126E-03 1.663E-03 2.302E-03 3.041E-03 3.877E-03 4.805E-03 5.824E-03 6.928E-03 8.111E-03 9.370E-03 1.070E-02 1.209E-02 1.354E-02 1.503E-02 1.657E-02 1.815E-02 1.974E-02 2.136E-02 2.299E-02 2.462E-02 2.625E-02 2.786E-02 2.944E-02 3.100E-02 3.251E-02 3.398E-02 3.539E-02 3.674E-02 3.802E-02 3.923E-02 4.035E-02 4.138E-02 4.232E-02 4.316E-02 4.390E-02 4.452E-02 4.504E-02 4.545E-02 4.574E-02 4.591E-02 4.597E-02 4.591E-02 4.574E-02 4.545E-02 4.505E-02 4.453E-02 4.391E-02 4.319E-02 4.237E-02 4.145E-02 4.045E-02 3.936E-02 3.819E-02 3.695E-02 3.565E-02 3.429E-02 3.288E-02 3.143E-02 2.995E-02 2.843E-02 2.690E-02 2.535E-02 2.381E-02 2.226E-02 2.072E-02 1.921E-02 1.771E-02 1.625E-02 1.483E-02 1.344E-02 1.211E-02 1.083E-02 9.614E-03 7.707E-03 8.813E-03 9.983E-03 1.121E-02 1.250E-02 1.384E-02 1.523E-02 1.666E-02 1.812E-02 1.961E-02 2.112E-02 2.265E-02 2.419E-02 2.573E-02 2.726E-02 2.878E-02 3.028E-02 3.175E-02 3.318E-02 3.457E-02 3.591E-02 3.719E-02 3.840E-02 3.955E-02 4.062E-02 4.160E-02 4.250E-02 4.330E-02 4.400E-02 4.460E-02 4.510E-02 4.548E-02 4.576E-02 4.592E-02 4.597E-02 4.591E-02 4.573E-02 4.543E-02 4.503E-02 4.451E-02 4.389E-02 4.316E-02 4.233E-02 4.141E-02 4.039E-02 3.928E-02 3.810E-02 3.684E-02 3.551E-02 3.413E-02 3.268E-02 3.119E-02 2.967E-02 2.811E-02 2.653E-02 2.493E-02 2.333E-02 2.172E-02 2.013E-02 1.855E-02 1.700E-02 1.548E-02 1.400E-02 1.256E-02 1.118E-02 9.859E-03 8.601E-03 7.413E-03 6.300E-03 5.268E-03 4.320E-03 3.459E-03 2.690E-03 2.014E-03 1.434E-03 9.513E-04 5.669E-04 2.815E-04 9.521E-05 7.597E-06 1.779E-05 1.244E-04 3.258E-04 6.196E-04 1.003E-03 1.474E-03 2.028E-03 2.662E-03 3.372E-03 4.153E-03 5.002E-03 5.913E-03 6.882E-03 7.904E-03 8.973E-03 1.008E-02 1.123E-02 1.241E-02 1.362E-02 1.484E-02 1.608E-02 1.734E-02 1.859E-02 1.985E-02 2.110E-02 2.233E-02 2.356E-02 2.476E-02 2.594E-02 2.709E-02 2.820E-02 2.928E-02 3.032E-02 3.131E-02 3.226E-02 3.315E-02 3.399E-02 3.477E-02 3.549E-02 3.616E-02 3.675E-02 3.728E-02 3.775E-02 3.814E-02 3.847E-02 3.872E-02 3.890E-02 3.901E-02 3.905E-02 3.901E-02 3.890E-02 3.872E-02 3.847E-02 3.814E-02 3.775E-02 3.728E-02 3.675E-02 3.616E-02 3.549E-02 3.477E-02 3.399E-02 3.315E-02 3.226E-02 3.131E-02 3.032E-02 2.928E-02 2.820E-02 2.709E-02 2.594E-02 2.476E-02 2.356E-02 2.233E-02 2.110E-02 1.985E-02 1.859E-02 1.734E-02 1.608E-02 1.484E-02 1.362E-02 1.241E-02 1.123E-02 1.008E-02 8.973E-03 7.904E-03 6.882E-03 5.913E-03 5.002E-03 4.153E-03 3.372E-03 2.662E-03 2.028E-03 1.474E-03 1.003E-03 6.196E-04 3.258E-04 1.244E-04 1.779E-05 7.597E-06 9.521E-05 2.815E-04 5.669E-04 9.513E-04 1.434E-03 2.014E-03 2.690E-03 3.459E-03 4.320E-03 5.268E-03 6.300E-03 7.413E-03 8.601E-03 9.859E-03 1.118E-02 1.256E-02 1.400E-02 1.548E-02 1.700E-02 1.855E-02 2.013E-02 2.172E-02 2.333E-02 2.493E-02 2.653E-02 2.811E-02 2.967E-02 3.119E-02 3.268E-02 3.413E-02 3.551E-02 3.684E-02 3.810E-02 3.928E-02 4.039E-02 4.141E-02 4.233E-02 4.316E-02 4.389E-02 4.451E-02 4.503E-02 4.543E-02 4.573E-02 4.591E-02 4.597E-02 4.592E-02 4.576E-02 4.548E-02 4.510E-02 4.460E-02 4.400E-02 4.330E-02 4.250E-02 4.160E-02 4.062E-02 3.955E-02 3.840E-02 3.719E-02 3.591E-02 3.457E-02 3.318E-02 3.175E-02 3.028E-02 2.878E-02 2.726E-02 2.573E-02 2.419E-02 2.265E-02 2.112E-02 1.961E-02 1.812E-02 1.666E-02 1.523E-02 1.384E-02 1.250E-02 1.121E-02 9.983E-03 8.813E-03 6.984E-03 8.037E-03 9.157E-03 1.034E-02 1.158E-02 1.288E-02 1.422E-02 1.561E-02 1.704E-02 1.850E-02 1.999E-02 2.150E-02 2.302E-02 2.455E-02 2.608E-02 2.760E-02 2.910E-02 3.058E-02 3.203E-02 3.345E-02 3.482E-02 3.614E-02 3.740E-02 3.859E-02 3.972E-02 4.076E-02 4.173E-02 4.260E-02 4.339E-02 4.407E-02 4.466E-02 4.514E-02 4.551E-02 4.578E-02 4.593E-02 4.597E-02 4.590E-02 4.572E-02 4.543E-02 4.502E-02 4.451E-02 4.390E-02 4.318E-02 4.236E-02 4.145E-02 4.045E-02 3.937E-02 3.820E-02 3.697E-02 3.567E-02 3.430E-02 3.289E-02 3.143E-02 2.993E-02 2.840E-02 2.685E-02 2.528E-02 2.370E-02 2.213E-02 2.056E-02 1.901E-02 1.748E-02 1.597E-02 1.451E-02 1.309E-02 1.171E-02 1.040E-02 9.139E-03 7.947E-03 6.826E-03 5.780E-03 4.814E-03 3.929E-03 3.130E-03 2.418E-03 1.797E-03 1.266E-03 8.283E-04 4.831E-04 2.307E-04 7.095E-05 2.840E-06 2.515E-05 1.362E-04 3.339E-04 6.158E-04 9.791E-04 1.421E-03 1.937E-03 2.524E-03 3.179E-03 3.896E-03 4.672E-03 5.502E-03 6.381E-03 7.304E-03 8.267E-03 9.264E-03 1.029E-02 1.134E-02 1.241E-02 1.350E-02 1.459E-02 1.569E-02 1.678E-02 1.787E-02 1.896E-02 2.002E-02 2.107E-02 2.209E-02 2.309E-02 2.406E-02 2.499E-02 2.588E-02 2.673E-02 2.754E-02 2.830E-02 2.900E-02 2.966E-02 3.026E-02 3.080E-02 3.128E-02 3.170E-02 3.206E-02 3.236E-02 3.259E-02 3.275E-02 3.285E-02 3.288E-02 3.285E-02 3.275E-02 3.259E-02 3.236E-02 3.206E-02 3.170E-02 3.128E-02 3.080E-02 3.026E-02 2.966E-02 2.900E-02 2.830E-02 2.754E-02 2.673E-02 2.588E-02 2.499E-02 2.406E-02 2.309E-02 2.209E-02 2.107E-02 2.002E-02 1.896E-02 1.787E-02 1.678E-02 1.569E-02 1.459E-02 1.350E-02 1.241E-02 1.134E-02 1.029E-02 9.264E-03 8.267E-03 7.304E-03 6.381E-03 5.502E-03 4.672E-03 3.896E-03 3.179E-03 2.524E-03 1.937E-03 1.421E-03 9.791E-04 6.158E-04 3.339E-04 1.362E-04 2.515E-05 2.840E-06 7.095E-05 2.307E-04 4.831E-04 8.283E-04 1.266E-03 1.797E-03 2.418E-03 3.130E-03 3.929E-03 4.814E-03 5.780E-03 6.826E-03 7.947E-03 9.139E-03 1.040E-02 1.171E-02 1.309E-02 1.451E-02 1.597E-02 1.748E-02 1.901E-02 2.056E-02 2.213E-02 2.370E-02 2.528E-02 2.685E-02 2.840E-02 2.993E-02 3.143E-02 3.289E-02 3.430E-02 3.567E-02 3.697E-02 3.820E-02 3.937E-02 4.045E-02 4.145E-02 4.236E-02 4.318E-02 4.390E-02 4.451E-02 4.502E-02 4.543E-02 4.572E-02 4.590E-02 4.597E-02 4.593E-02 4.578E-02 4.551E-02 4.514E-02 4.466E-02 4.407E-02 4.339E-02 4.260E-02 4.173E-02 4.076E-02 3.972E-02 3.859E-02 3.740E-02 3.614E-02 3.482E-02 3.345E-02 3.203E-02 3.058E-02 2.910E-02 2.760E-02 2.608E-02 2.455E-02 2.302E-02 2.150E-02 1.999E-02 1.850E-02 1.704E-02 1.561E-02 1.422E-02 1.288E-02 1.158E-02 1.034E-02 9.157E-03 8.037E-03 6.291E-03 7.290E-03 8.357E-03 9.488E-03 1.068E-02 1.193E-02 1.323E-02 1.458E-02 1.597E-02 1.740E-02 1.886E-02 2.035E-02 2.185E-02 2.336E-02 2.488E-02 2.640E-02 2.790E-02 2.939E-02 3.086E-02 3.229E-02 3.369E-02 3.504E-02 3.634E-02 3.758E-02 3.876E-02 3.986E-02 4.089E-02 4.183E-02 4.269E-02 4.346E-02 4.413E-02 4.470E-02 4.517E-02 4.553E-02 4.579E-02 4.593E-02 4.597E-02 4.590E-02 4.572E-02 4.543E-02 4.503E-02 4.452E-02 4.392E-02 4.321E-02 4.241E-02 4.152E-02 4.054E-02 3.948E-02 3.834E-02 3.713E-02 3.585E-02 3.452E-02 3.313E-02 3.170E-02 3.023E-02 2.873E-02 2.721E-02 2.567E-02 2.413E-02 2.258E-02 2.104E-02 1.951E-02 1.800E-02 1.652E-02 1.507E-02 1.366E-02 1.229E-02 1.098E-02 9.726E-03 8.532E-03 7.403E-03 6.345E-03 5.361E-03 4.453E-03 3.625E-03 2.880E-03 2.218E-03 1.642E-03 1.152E-03 7.495E-04 4.335E-04 2.042E-04 6.067E-05 1.762E-06 2.589E-05 1.311E-04 3.151E-04 5.752E-04 9.085E-04 1.312E-03 1.782E-03 2.314E-03 2.906E-03 3.552E-03 4.248E-03 4.991E-03 5.774E-03 6.595E-03 7.448E-03 8.329E-03 9.232E-03 1.015E-02 1.109E-02 1.203E-02 1.298E-02 1.392E-02 1.486E-02 1.580E-02 1.671E-02 1.762E-02 1.849E-02 1.935E-02 2.017E-02 2.097E-02 2.172E-02 2.244E-02 2.312E-02 2.375E-02 2.434E-02 2.487E-02 2.536E-02 2.579E-02 2.617E-02 2.650E-02 2.676E-02 2.697E-02 2.712E-02 2.721E-02 2.724E-02 2.721E-02 2.712E-02 2.697E-02 2.676E-02 2.650E-02 2.617E-02 2.579E-02 2.536E-02 2.487E-02 2.434E-02 2.375E-02 2.312E-02 2.244E-02 2.172E-02 2.097E-02 2.017E-02 1.935E-02 1.849E-02 1.762E-02 1.671E-02 1.580E-02 1.486E-02 1.392E-02 1.298E-02 1.203E-02 1.109E-02 1.015E-02 9.232E-03 8.329E-03 7.448E-03 6.595E-03 5.774E-03 4.991E-03 4.248E-03 3.552E-03 2.906E-03 2.314E-03 1.782E-03 1.312E-03 9.085E-04 5.752E-04 3.151E-04 1.311E-04 2.589E-05 1.762E-06 6.067E-05 2.042E-04 4.335E-04 7.495E-04 1.152E-03 1.642E-03 2.218E-03 2.880E-03 3.625E-03 4.453E-03 5.361E-03 6.345E-03 7.403E-03 8.532E-03 9.726E-03 1.098E-02 1.229E-02 1.366E-02 1.507E-02 1.652E-02 1.800E-02 1.951E-02 2.104E-02 2.258E-02 2.413E-02 2.567E-02 2.721E-02 2.873E-02 3.023E-02 3.170E-02 3.313E-02 3.452E-02 3.585E-02 3.713E-02 3.834E-02 3.948E-02 4.054E-02 4.152E-02 4.241E-02 4.321E-02 4.392E-02 4.452E-02 4.503E-02 4.543E-02 4.572E-02 4.590E-02 4.597E-02 4.593E-02 4.579E-02 4.553E-02 4.517E-02 4.470E-02 4.413E-02 4.346E-02 4.269E-02 4.183E-02 4.089E-02 3.986E-02 3.876E-02 3.758E-02 3.634E-02 3.504E-02 3.369E-02 3.229E-02 3.086E-02 2.939E-02 2.790E-02 2.640E-02 2.488E-02 2.336E-02 2.185E-02 2.035E-02 1.886E-02 1.740E-02 1.597E-02 1.458E-02 1.323E-02 1.193E-02 1.068E-02 9.488E-03 8.357E-03 7.290E-03 5.628E-03 6.573E-03 7.586E-03 8.665E-03 9.807E-03 1.101E-02 1.226E-02 1.357E-02 1.492E-02 1.632E-02 1.774E-02 1.920E-02 2.068E-02 2.217E-02 2.368E-02 2.519E-02 2.669E-02 2.818E-02 2.966E-02 3.111E-02 3.253E-02 3.391E-02 3.524E-02 3.652E-02 3.774E-02 3.890E-02 3.999E-02 4.100E-02 4.192E-02 4.277E-02 4.352E-02 4.417E-02 4.473E-02 4.519E-02 4.554E-02 4.579E-02 4.593E-02 4.597E-02 4.590E-02 4.572E-02 4.543E-02 4.504E-02 4.455E-02 4.396E-02 4.327E-02 4.248E-02 4.161E-02 4.065E-02 3.961E-02 3.850E-02 3.731E-02 3.607E-02 3.476E-02 3.341E-02 3.201E-02 3.057E-02 2.910E-02 2.761E-02 2.611E-02 2.459E-02 2.307E-02 2.155E-02 2.005E-02 1.856E-02 1.710E-02 1.567E-02 1.428E-02 1.292E-02 1.162E-02 1.036E-02 9.169E-03 8.034E-03 6.964E-03 5.964E-03 5.035E-03 4.180E-03 3.402E-03 2.703E-03 2.083E-03 1.544E-03 1.086E-03 7.096E-04 4.139E-04 1.983E-04 6.178E-05 2.840E-06 1.967E-05 1.101E-04 2.717E-04 5.017E-04 7.971E-04 1.155E-03 1.571E-03 2.042E-03 2.564E-03 3.134E-03 3.746E-03 4.398E-03 5.084E-03 5.800E-03 6.541E-03 7.304E-03 8.084E-03 8.877E-03 9.678E-03 1.048E-02 1.129E-02 1.209E-02 1.288E-02 1.366E-02 1.442E-02 1.516E-02 1.588E-02 1.658E-02 1.724E-02 1.787E-02 1.847E-02 1.903E-02 1.955E-02 2.002E-02 2.045E-02 2.084E-02 2.117E-02 2.146E-02 2.170E-02 2.188E-02 2.201E-02 2.209E-02 2.212E-02 2.209E-02 2.201E-02 2.188E-02 2.170E-02 2.146E-02 2.117E-02 2.084E-02 2.045E-02 2.002E-02 1.955E-02 1.903E-02 1.847E-02 1.787E-02 1.724E-02 1.658E-02 1.588E-02 1.516E-02 1.442E-02 1.366E-02 1.288E-02 1.209E-02 1.129E-02 1.048E-02 9.678E-03 8.877E-03 8.084E-03 7.304E-03 6.541E-03 5.800E-03 5.084E-03 4.398E-03 3.746E-03 3.134E-03 2.564E-03 2.042E-03 1.571E-03 1.155E-03 7.971E-04 5.017E-04 2.717E-04 1.101E-04 1.967E-05 2.840E-06 6.178E-05 1.983E-04 4.139E-04 7.096E-04 1.086E-03 1.544E-03 2.083E-03 2.703E-03 3.402E-03 4.180E-03 5.035E-03 5.964E-03 6.964E-03 8.034E-03 9.169E-03 1.036E-02 1.162E-02 1.292E-02 1.428E-02 1.567E-02 1.710E-02 1.856E-02 2.005E-02 2.155E-02 2.307E-02 2.459E-02 2.611E-02 2.761E-02 2.910E-02 3.057E-02 3.201E-02 3.341E-02 3.476E-02 3.607E-02 3.731E-02 3.850E-02 3.961E-02 4.065E-02 4.161E-02 4.248E-02 4.327E-02 4.396E-02 4.455E-02 4.504E-02 4.543E-02 4.572E-02 4.590E-02 4.597E-02 4.593E-02 4.579E-02 4.554E-02 4.519E-02 4.473E-02 4.417E-02 4.352E-02 4.277E-02 4.192E-02 4.100E-02 3.999E-02 3.890E-02 3.774E-02 3.652E-02 3.524E-02 3.391E-02 3.253E-02 3.111E-02 2.966E-02 2.818E-02 2.669E-02 2.519E-02 2.368E-02 2.217E-02 2.068E-02 1.920E-02 1.774E-02 1.632E-02 1.492E-02 1.357E-02 1.226E-02 1.101E-02 9.807E-03 8.665E-03 7.586E-03 6.573E-03 4.998E-03 5.887E-03 6.846E-03 7.871E-03 8.961E-03 1.011E-02 1.132E-02 1.258E-02 1.389E-02 1.525E-02 1.664E-02 1.806E-02 1.951E-02 2.099E-02 2.247E-02 2.397E-02 2.547E-02 2.696E-02 2.844E-02 2.990E-02 3.133E-02 3.273E-02 3.410E-02 3.541E-02 3.668E-02 3.788E-02 3.902E-02 4.009E-02 4.108E-02 4.199E-02 4.282E-02 4.356E-02 4.420E-02 4.475E-02 4.520E-02 4.555E-02 4.579E-02 4.593E-02 4.597E-02 4.590E-02 4.573E-02 4.545E-02 4.507E-02 4.459E-02 4.401E-02 4.334E-02 4.257E-02 4.172E-02 4.079E-02 3.977E-02 3.869E-02 3.753E-02 3.631E-02 3.504E-02 3.372E-02 3.235E-02 3.095E-02 2.951E-02 2.806E-02 2.658E-02 2.509E-02 2.360E-02 2.212E-02 2.064E-02 1.918E-02 1.774E-02 1.632E-02 1.494E-02 1.360E-02 1.230E-02 1.106E-02 9.859E-03 8.719E-03 7.640E-03 6.625E-03 5.677E-03 4.797E-03 3.989E-03 3.254E-03 2.594E-03 2.008E-03 1.499E-03 1.065E-03 7.061E-04 4.223E-04 2.122E-04 7.455E-05 7.597E-06 9.360E-06 7.755E-05 2.096E-04 4.028E-04 6.540E-04 9.600E-04 1.317E-03 1.723E-03 2.172E-03 2.662E-03 3.188E-03 3.746E-03 4.333E-03 4.944E-03 5.576E-03 6.223E-03 6.882E-03 7.550E-03 8.221E-03 8.893E-03 9.561E-03 1.022E-02 1.087E-02 1.151E-02 1.212E-02 1.272E-02 1.329E-02 1.384E-02 1.436E-02 1.484E-02 1.529E-02 1.571E-02 1.608E-02 1.642E-02 1.671E-02 1.697E-02 1.717E-02 1.734E-02 1.745E-02 1.752E-02 1.755E-02 1.752E-02 1.745E-02 1.734E-02 1.717E-02 1.697E-02 1.671E-02 1.642E-02 1.608E-02 1.571E-02 1.529E-02 1.484E-02 1.436E-02 1.384E-02 1.329E-02 1.272E-02 1.212E-02 1.151E-02 1.087E-02 1.022E-02 9.561E-03 8.893E-03 8.221E-03 7.550E-03 6.882E-03 6.223E-03 5.576E-03 4.944E-03 4.333E-03 3.746E-03 3.188E-03 2.662E-03 2.172E-03 1.723E-03 1.317E-03 9.600E-04 6.540E-04 4.028E-04 2.096E-04 7.755E-05 9.360E-06 7.597E-06 7.455E-05 2.122E-04 4.223E-04 7.061E-04 1.065E-03 1.499E-03 2.008E-03 2.594E-03 3.254E-03 3.989E-03 4.797E-03 5.677E-03 6.625E-03 7.640E-03 8.719E-03 9.859E-03 1.106E-02 1.230E-02 1.360E-02 1.494E-02 1.632E-02 1.774E-02 1.918E-02 2.064E-02 2.212E-02 2.360E-02 2.509E-02 2.658E-02 2.806E-02 2.951E-02 3.095E-02 3.235E-02 3.372E-02 3.504E-02 3.631E-02 3.753E-02 3.869E-02 3.977E-02 4.079E-02 4.172E-02 4.257E-02 4.334E-02 4.401E-02 4.459E-02 4.507E-02 4.545E-02 4.573E-02 4.590E-02 4.597E-02 4.593E-02 4.579E-02 4.555E-02 4.520E-02 4.475E-02 4.420E-02 4.356E-02 4.282E-02 4.199E-02 4.108E-02 4.009E-02 3.902E-02 3.788E-02 3.668E-02 3.541E-02 3.410E-02 3.273E-02 3.133E-02 2.990E-02 2.844E-02 2.696E-02 2.547E-02 2.397E-02 2.247E-02 2.099E-02 1.951E-02 1.806E-02 1.664E-02 1.525E-02 1.389E-02 1.258E-02 1.132E-02 1.011E-02 8.961E-03 7.871E-03 6.846E-03 5.887E-03 4.402E-03 5.234E-03 6.137E-03 7.108E-03 8.145E-03 9.244E-03 1.040E-02 1.162E-02 1.288E-02 1.419E-02 1.555E-02 1.694E-02 1.836E-02 1.981E-02 2.127E-02 2.275E-02 2.424E-02 2.572E-02 2.720E-02 2.867E-02 3.011E-02 3.153E-02 3.292E-02 3.426E-02 3.556E-02 3.681E-02 3.799E-02 3.912E-02 4.017E-02 4.115E-02 4.205E-02 4.286E-02 4.359E-02 4.422E-02 4.476E-02 4.521E-02 4.555E-02 4.579E-02 4.593E-02 4.597E-02 4.591E-02 4.574E-02 4.547E-02 4.510E-02 4.464E-02 4.408E-02 4.342E-02 4.268E-02 4.185E-02 4.094E-02 3.996E-02 3.890E-02 3.778E-02 3.659E-02 3.535E-02 3.406E-02 3.273E-02 3.136E-02 2.996E-02 2.854E-02 2.709E-02 2.564E-02 2.418E-02 2.272E-02 2.127E-02 1.984E-02 1.842E-02 1.702E-02 1.566E-02 1.433E-02 1.304E-02 1.180E-02 1.060E-02 9.461E-03 8.375E-03 7.347E-03 6.381E-03 5.479E-03 4.644E-03 3.877E-03 3.178E-03 2.550E-03 1.991E-03 1.504E-03 1.086E-03 7.385E-04 4.594E-04 2.478E-04 1.022E-04 2.057E-05 9.375E-07 4.092E-05 1.379E-04 2.892E-04 4.916E-04 7.422E-04 1.038E-03 1.374E-03 1.749E-03 2.157E-03 2.597E-03 3.063E-03 3.552E-03 4.060E-03 4.583E-03 5.119E-03 5.662E-03 6.210E-03 6.759E-03 7.304E-03 7.844E-03 8.375E-03 8.893E-03 9.396E-03 9.880E-03 1.034E-02 1.078E-02 1.120E-02 1.158E-02 1.194E-02 1.226E-02 1.255E-02 1.280E-02 1.302E-02 1.319E-02 1.333E-02 1.344E-02 1.350E-02 1.352E-02 1.350E-02 1.344E-02 1.333E-02 1.319E-02 1.302E-02 1.280E-02 1.255E-02 1.226E-02 1.194E-02 1.158E-02 1.120E-02 1.078E-02 1.034E-02 9.880E-03 9.396E-03 8.893E-03 8.375E-03 7.844E-03 7.304E-03 6.759E-03 6.210E-03 5.662E-03 5.119E-03 4.583E-03 4.060E-03 3.552E-03 3.063E-03 2.597E-03 2.157E-03 1.749E-03 1.374E-03 1.038E-03 7.422E-04 4.916E-04 2.892E-04 1.379E-04 4.092E-05 9.375E-07 2.057E-05 1.022E-04 2.478E-04 4.594E-04 7.385E-04 1.086E-03 1.504E-03 1.991E-03 2.550E-03 3.178E-03 3.877E-03 4.644E-03 5.479E-03 6.381E-03 7.347E-03 8.375E-03 9.461E-03 1.060E-02 1.180E-02 1.304E-02 1.433E-02 1.566E-02 1.702E-02 1.842E-02 1.984E-02 2.127E-02 2.272E-02 2.418E-02 2.564E-02 2.709E-02 2.854E-02 2.996E-02 3.136E-02 3.273E-02 3.406E-02 3.535E-02 3.659E-02 3.778E-02 3.890E-02 3.996E-02 4.094E-02 4.185E-02 4.268E-02 4.342E-02 4.408E-02 4.464E-02 4.510E-02 4.547E-02 4.574E-02 4.591E-02 4.597E-02 4.593E-02 4.579E-02 4.555E-02 4.521E-02 4.476E-02 4.422E-02 4.359E-02 4.286E-02 4.205E-02 4.115E-02 4.017E-02 3.912E-02 3.799E-02 3.681E-02 3.556E-02 3.426E-02 3.292E-02 3.153E-02 3.011E-02 2.867E-02 2.720E-02 2.572E-02 2.424E-02 2.275E-02 2.127E-02 1.981E-02 1.836E-02 1.694E-02 1.555E-02 1.419E-02 1.288E-02 1.162E-02 1.040E-02 9.244E-03 8.145E-03 7.108E-03 6.137E-03 5.234E-03 3.840E-03 4.616E-03 5.463E-03 6.378E-03 7.359E-03 8.405E-03 9.512E-03 1.068E-02 1.189E-02 1.316E-02 1.447E-02 1.583E-02 1.721E-02 1.863E-02 2.007E-02 2.153E-02 2.300E-02 2.448E-02 2.595E-02 2.741E-02 2.887E-02 3.030E-02 3.170E-02 3.307E-02 3.440E-02 3.568E-02 3.691E-02 3.808E-02 3.919E-02 4.023E-02 4.120E-02 4.208E-02 4.289E-02 4.360E-02 4.423E-02 4.476E-02 4.520E-02 4.554E-02 4.579E-02 4.593E-02 4.597E-02 4.591E-02 4.576E-02 4.550E-02 4.515E-02 4.470E-02 4.416E-02 4.352E-02 4.280E-02 4.200E-02 4.112E-02 4.016E-02 3.914E-02 3.805E-02 3.690E-02 3.569E-02 3.444E-02 3.314E-02 3.181E-02 3.044E-02 2.905E-02 2.765E-02 2.622E-02 2.480E-02 2.337E-02 2.195E-02 2.054E-02 1.914E-02 1.777E-02 1.643E-02 1.511E-02 1.383E-02 1.260E-02 1.140E-02 1.026E-02 9.169E-03 8.131E-03 7.150E-03 6.229E-03 5.369E-03 4.572E-03 3.839E-03 3.171E-03 2.568E-03 2.031E-03 1.559E-03 1.152E-03 8.092E-04 5.289E-04 3.099E-04 1.507E-04 4.919E-05 3.342E-06 1.073E-05 6.879E-05 1.748E-04 3.258E-04 5.187E-04 7.505E-04 1.018E-03 1.317E-03 1.646E-03 2.000E-03 2.375E-03 2.770E-03 3.179E-03 3.600E-03 4.029E-03 4.463E-03 4.898E-03 5.332E-03 5.762E-03 6.184E-03 6.595E-03 6.994E-03 7.376E-03 7.741E-03 8.084E-03 8.406E-03 8.703E-03 8.973E-03 9.215E-03 9.428E-03 9.611E-03 9.762E-03 9.880E-03 9.965E-03 1.002E-02 1.003E-02 1.002E-02 9.965E-03 9.880E-03 9.762E-03 9.611E-03 9.428E-03 9.215E-03 8.973E-03 8.703E-03 8.406E-03 8.084E-03 7.741E-03 7.376E-03 6.994E-03 6.595E-03 6.184E-03 5.762E-03 5.332E-03 4.898E-03 4.463E-03 4.029E-03 3.600E-03 3.179E-03 2.770E-03 2.375E-03 2.000E-03 1.646E-03 1.317E-03 1.018E-03 7.505E-04 5.187E-04 3.258E-04 1.748E-04 6.879E-05 1.073E-05 3.342E-06 4.919E-05 1.507E-04 3.099E-04 5.289E-04 8.092E-04 1.152E-03 1.559E-03 2.031E-03 2.568E-03 3.171E-03 3.839E-03 4.572E-03 5.369E-03 6.229E-03 7.150E-03 8.131E-03 9.169E-03 1.026E-02 1.140E-02 1.260E-02 1.383E-02 1.511E-02 1.643E-02 1.777E-02 1.914E-02 2.054E-02 2.195E-02 2.337E-02 2.480E-02 2.622E-02 2.765E-02 2.905E-02 3.044E-02 3.181E-02 3.314E-02 3.444E-02 3.569E-02 3.690E-02 3.805E-02 3.914E-02 4.016E-02 4.112E-02 4.200E-02 4.280E-02 4.352E-02 4.416E-02 4.470E-02 4.515E-02 4.550E-02 4.576E-02 4.591E-02 4.597E-02 4.593E-02 4.579E-02 4.554E-02 4.520E-02 4.476E-02 4.423E-02 4.360E-02 4.289E-02 4.208E-02 4.120E-02 4.023E-02 3.919E-02 3.808E-02 3.691E-02 3.568E-02 3.440E-02 3.307E-02 3.170E-02 3.030E-02 2.887E-02 2.741E-02 2.595E-02 2.448E-02 2.300E-02 2.153E-02 2.007E-02 1.863E-02 1.721E-02 1.583E-02 1.447E-02 1.316E-02 1.189E-02 1.068E-02 9.512E-03 8.405E-03 7.359E-03 6.378E-03 5.463E-03 4.616E-03 3.314E-03 4.033E-03 4.823E-03 5.682E-03 6.608E-03 7.599E-03 8.652E-03 9.765E-03 1.093E-02 1.215E-02 1.342E-02 1.473E-02 1.609E-02 1.747E-02 1.888E-02 2.031E-02 2.176E-02 2.322E-02 2.469E-02 2.615E-02 2.760E-02 2.904E-02 3.046E-02 3.184E-02 3.320E-02 3.451E-02 3.578E-02 3.699E-02 3.815E-02 3.925E-02 4.027E-02 4.122E-02 4.210E-02 4.289E-02 4.360E-02 4.422E-02 4.475E-02 4.519E-02 4.553E-02 4.578E-02 4.592E-02 4.597E-02 4.592E-02 4.578E-02 4.554E-02 4.520E-02 4.477E-02 4.425E-02 4.364E-02 4.295E-02 4.217E-02 4.132E-02 4.039E-02 3.940E-02 3.834E-02 3.723E-02 3.606E-02 3.484E-02 3.358E-02 3.229E-02 3.096E-02 2.961E-02 2.823E-02 2.685E-02 2.545E-02 2.406E-02 2.267E-02 2.128E-02 1.991E-02 1.856E-02 1.724E-02 1.594E-02 1.468E-02 1.345E-02 1.226E-02 1.112E-02 1.002E-02 8.978E-03 7.986E-03 7.048E-03 6.167E-03 5.344E-03 4.580E-03 3.877E-03 3.234E-03 2.651E-03 2.130E-03 1.668E-03 1.266E-03 9.228E-04 6.364E-04 4.056E-04 2.286E-04 1.036E-04 2.826E-05 2.914E-07 1.718E-05 7.627E-05 1.748E-04 3.098E-04 4.784E-04 6.775E-04 9.039E-04 1.155E-03 1.426E-03 1.716E-03 2.021E-03 2.337E-03 2.662E-03 2.992E-03 3.325E-03 3.658E-03 3.988E-03 4.312E-03 4.628E-03 4.933E-03 5.225E-03 5.502E-03 5.762E-03 6.003E-03 6.223E-03 6.421E-03 6.595E-03 6.745E-03 6.869E-03 6.966E-03 7.036E-03 7.078E-03 7.092E-03 7.078E-03 7.036E-03 6.966E-03 6.869E-03 6.745E-03 6.595E-03 6.421E-03 6.223E-03 6.003E-03 5.762E-03 5.502E-03 5.225E-03 4.933E-03 4.628E-03 4.312E-03 3.988E-03 3.658E-03 3.325E-03 2.992E-03 2.662E-03 2.337E-03 2.021E-03 1.716E-03 1.426E-03 1.155E-03 9.039E-04 6.775E-04 4.784E-04 3.098E-04 1.748E-04 7.627E-05 1.718E-05 2.914E-07 2.826E-05 1.036E-04 2.286E-04 4.056E-04 6.364E-04 9.228E-04 1.266E-03 1.668E-03 2.130E-03 2.651E-03 3.234E-03 3.877E-03 4.580E-03 5.344E-03 6.167E-03 7.048E-03 7.986E-03 8.978E-03 1.002E-02 1.112E-02 1.226E-02 1.345E-02 1.468E-02 1.594E-02 1.724E-02 1.856E-02 1.991E-02 2.128E-02 2.267E-02 2.406E-02 2.545E-02 2.685E-02 2.823E-02 2.961E-02 3.096E-02 3.229E-02 3.358E-02 3.484E-02 3.606E-02 3.723E-02 3.834E-02 3.940E-02 4.039E-02 4.132E-02 4.217E-02 4.295E-02 4.364E-02 4.425E-02 4.477E-02 4.520E-02 4.554E-02 4.578E-02 4.592E-02 4.597E-02 4.592E-02 4.578E-02 4.553E-02 4.519E-02 4.475E-02 4.422E-02 4.360E-02 4.289E-02 4.210E-02 4.122E-02 4.027E-02 3.925E-02 3.815E-02 3.699E-02 3.578E-02 3.451E-02 3.320E-02 3.184E-02 3.046E-02 2.904E-02 2.760E-02 2.615E-02 2.469E-02 2.322E-02 2.176E-02 2.031E-02 1.888E-02 1.747E-02 1.609E-02 1.473E-02 1.342E-02 1.215E-02 1.093E-02 9.765E-03 8.652E-03 7.599E-03 6.608E-03 5.682E-03 4.823E-03 4.033E-03 2.826E-03 3.488E-03 4.220E-03 5.021E-03 5.891E-03 6.826E-03 7.825E-03 8.884E-03 1.000E-02 1.117E-02 1.240E-02 1.366E-02 1.497E-02 1.632E-02 1.770E-02 1.911E-02 2.053E-02 2.197E-02 2.342E-02 2.487E-02 2.632E-02 2.776E-02 2.919E-02 3.059E-02 3.196E-02 3.330E-02 3.460E-02 3.585E-02 3.705E-02 3.820E-02 3.928E-02 4.029E-02 4.123E-02 4.210E-02 4.289E-02 4.359E-02 4.420E-02 4.473E-02 4.517E-02 4.551E-02 4.576E-02 4.591E-02 4.597E-02 4.593E-02 4.580E-02 4.558E-02 4.526E-02 4.485E-02 4.435E-02 4.377E-02 4.310E-02 4.236E-02 4.154E-02 4.064E-02 3.969E-02 3.866E-02 3.758E-02 3.645E-02 3.527E-02 3.405E-02 3.280E-02 3.151E-02 3.019E-02 2.886E-02 2.751E-02 2.615E-02 2.479E-02 2.343E-02 2.207E-02 2.073E-02 1.940E-02 1.810E-02 1.682E-02 1.557E-02 1.435E-02 1.317E-02 1.204E-02 1.094E-02 9.890E-03 8.888E-03 7.937E-03 7.039E-03 6.193E-03 5.403E-03 4.668E-03 3.989E-03 3.367E-03 2.801E-03 2.290E-03 1.835E-03 1.434E-03 1.086E-03 7.903E-04 5.445E-04 3.472E-04 1.963E-04 8.981E-05 2.532E-05 4.667E-07 1.271E-05 5.944E-05 1.379E-04 2.454E-04 3.791E-04 5.360E-04 7.135E-04 9.085E-04 1.118E-03 1.340E-03 1.571E-03 1.808E-03 2.049E-03 2.291E-03 2.532E-03 2.770E-03 3.001E-03 3.224E-03 3.437E-03 3.639E-03 3.826E-03 3.998E-03 4.153E-03 4.291E-03 4.409E-03 4.506E-03 4.583E-03 4.639E-03 4.672E-03 4.683E-03 4.672E-03 4.639E-03 4.583E-03 4.506E-03 4.409E-03 4.291E-03 4.153E-03 3.998E-03 3.826E-03 3.639E-03 3.437E-03 3.224E-03 3.001E-03 2.770E-03 2.532E-03 2.291E-03 2.049E-03 1.808E-03 1.571E-03 1.340E-03 1.118E-03 9.085E-04 7.135E-04 5.360E-04 3.791E-04 2.454E-04 1.379E-04 5.944E-05 1.271E-05 4.667E-07 2.532E-05 8.981E-05 1.963E-04 3.472E-04 5.445E-04 7.903E-04 1.086E-03 1.434E-03 1.835E-03 2.290E-03 2.801E-03 3.367E-03 3.989E-03 4.668E-03 5.403E-03 6.193E-03 7.039E-03 7.937E-03 8.888E-03 9.890E-03 1.094E-02 1.204E-02 1.317E-02 1.435E-02 1.557E-02 1.682E-02 1.810E-02 1.940E-02 2.073E-02 2.207E-02 2.343E-02 2.479E-02 2.615E-02 2.751E-02 2.886E-02 3.019E-02 3.151E-02 3.280E-02 3.405E-02 3.527E-02 3.645E-02 3.758E-02 3.866E-02 3.969E-02 4.064E-02 4.154E-02 4.236E-02 4.310E-02 4.377E-02 4.435E-02 4.485E-02 4.526E-02 4.558E-02 4.580E-02 4.593E-02 4.597E-02 4.591E-02 4.576E-02 4.551E-02 4.517E-02 4.473E-02 4.420E-02 4.359E-02 4.289E-02 4.210E-02 4.123E-02 4.029E-02 3.928E-02 3.820E-02 3.705E-02 3.585E-02 3.460E-02 3.330E-02 3.196E-02 3.059E-02 2.919E-02 2.776E-02 2.632E-02 2.487E-02 2.342E-02 2.197E-02 2.053E-02 1.911E-02 1.770E-02 1.632E-02 1.497E-02 1.366E-02 1.240E-02 1.117E-02 1.000E-02 8.884E-03 7.825E-03 6.826E-03 5.891E-03 5.021E-03 4.220E-03 3.488E-03 2.375E-03 2.980E-03 3.654E-03 4.398E-03 5.210E-03 6.089E-03 7.032E-03 8.037E-03 9.102E-03 1.022E-02 1.140E-02 1.262E-02 1.389E-02 1.519E-02 1.654E-02 1.791E-02 1.931E-02 2.072E-02 2.215E-02 2.359E-02 2.503E-02 2.647E-02 2.790E-02 2.931E-02 3.069E-02 3.205E-02 3.338E-02 3.466E-02 3.590E-02 3.709E-02 3.822E-02 3.929E-02 4.029E-02 4.122E-02 4.208E-02 4.286E-02 4.356E-02 4.417E-02 4.470E-02 4.514E-02 4.548E-02 4.574E-02 4.590E-02 4.597E-02 4.594E-02 4.583E-02 4.562E-02 4.532E-02 4.494E-02 4.446E-02 4.391E-02 4.327E-02 4.256E-02 4.177E-02 4.091E-02 3.999E-02 3.901E-02 3.796E-02 3.687E-02 3.573E-02 3.455E-02 3.333E-02 3.209E-02 3.081E-02 2.951E-02 2.820E-02 2.688E-02 2.555E-02 2.423E-02 2.290E-02 2.159E-02 2.029E-02 1.901E-02 1.775E-02 1.652E-02 1.531E-02 1.414E-02 1.301E-02 1.192E-02 1.087E-02 9.859E-03 8.898E-03 7.986E-03 7.122E-03 6.309E-03 5.548E-03 4.838E-03 4.180E-03 3.575E-03 3.021E-03 2.518E-03 2.066E-03 1.663E-03 1.309E-03 1.001E-03 7.385E-04 5.195E-04 3.421E-04 2.042E-04 1.036E-04 3.801E-05 5.093E-06 2.384E-06 2.738E-05 7.755E-05 1.503E-04 2.431E-04 3.533E-04 4.784E-04 6.158E-04 7.631E-04 9.178E-04 1.078E-03 1.240E-03 1.403E-03 1.565E-03 1.723E-03 1.875E-03 2.021E-03 2.157E-03 2.284E-03 2.399E-03 2.501E-03 2.589E-03 2.662E-03 2.720E-03 2.761E-03 2.786E-03 2.795E-03 2.786E-03 2.761E-03 2.720E-03 2.662E-03 2.589E-03 2.501E-03 2.399E-03 2.284E-03 2.157E-03 2.021E-03 1.875E-03 1.723E-03 1.565E-03 1.403E-03 1.240E-03 1.078E-03 9.178E-04 7.631E-04 6.158E-04 4.784E-04 3.533E-04 2.431E-04 1.503E-04 7.755E-05 2.738E-05 2.384E-06 5.093E-06 3.801E-05 1.036E-04 2.042E-04 3.421E-04 5.195E-04 7.385E-04 1.001E-03 1.309E-03 1.663E-03 2.066E-03 2.518E-03 3.021E-03 3.575E-03 4.180E-03 4.838E-03 5.548E-03 6.309E-03 7.122E-03 7.986E-03 8.898E-03 9.859E-03 1.087E-02 1.192E-02 1.301E-02 1.414E-02 1.531E-02 1.652E-02 1.775E-02 1.901E-02 2.029E-02 2.159E-02 2.290E-02 2.423E-02 2.555E-02 2.688E-02 2.820E-02 2.951E-02 3.081E-02 3.209E-02 3.333E-02 3.455E-02 3.573E-02 3.687E-02 3.796E-02 3.901E-02 3.999E-02 4.091E-02 4.177E-02 4.256E-02 4.327E-02 4.391E-02 4.446E-02 4.494E-02 4.532E-02 4.562E-02 4.583E-02 4.594E-02 4.597E-02 4.590E-02 4.574E-02 4.548E-02 4.514E-02 4.470E-02 4.417E-02 4.356E-02 4.286E-02 4.208E-02 4.122E-02 4.029E-02 3.929E-02 3.822E-02 3.709E-02 3.590E-02 3.466E-02 3.338E-02 3.205E-02 3.069E-02 2.931E-02 2.790E-02 2.647E-02 2.503E-02 2.359E-02 2.215E-02 2.072E-02 1.931E-02 1.791E-02 1.654E-02 1.519E-02 1.389E-02 1.262E-02 1.140E-02 1.022E-02 9.102E-03 8.037E-03 7.032E-03 6.089E-03 5.210E-03 4.398E-03 3.654E-03 2.980E-03 1.963E-03 2.511E-03 3.128E-03 3.814E-03 4.568E-03 5.389E-03 6.276E-03 7.225E-03 8.235E-03 9.303E-03 1.043E-02 1.160E-02 1.282E-02 1.409E-02 1.539E-02 1.673E-02 1.809E-02 1.948E-02 2.089E-02 2.231E-02 2.374E-02 2.517E-02 2.659E-02 2.800E-02 2.940E-02 3.077E-02 3.212E-02 3.343E-02 3.470E-02 3.593E-02 3.710E-02 3.822E-02 3.928E-02 4.027E-02 4.120E-02 4.205E-02 4.282E-02 4.352E-02 4.413E-02 4.466E-02 4.510E-02 4.545E-02 4.571E-02 4.588E-02 4.596E-02 4.596E-02 4.586E-02 4.567E-02 4.539E-02 4.503E-02 4.458E-02 4.406E-02 4.345E-02 4.277E-02 4.202E-02 4.120E-02 4.031E-02 3.937E-02 3.837E-02 3.731E-02 3.622E-02 3.508E-02 3.390E-02 3.269E-02 3.146E-02 3.020E-02 2.893E-02 2.765E-02 2.635E-02 2.506E-02 2.377E-02 2.249E-02 2.122E-02 1.996E-02 1.872E-02 1.751E-02 1.632E-02 1.517E-02 1.404E-02 1.296E-02 1.191E-02 1.090E-02 9.931E-03 9.008E-03 8.131E-03 7.300E-03 6.516E-03 5.780E-03 5.093E-03 4.453E-03 3.862E-03 3.318E-03 2.820E-03 2.369E-03 1.963E-03 1.601E-03 1.280E-03 1.001E-03 7.605E-04 5.573E-04 3.892E-04 2.544E-04 1.507E-04 7.576E-05 2.751E-05 3.609E-06 1.764E-06 1.967E-05 5.502E-05 1.055E-04 1.690E-04 2.431E-04 3.258E-04 4.149E-04 5.085E-04 6.046E-04 7.014E-04 7.971E-04 8.902E-04 9.791E-04 1.062E-03 1.139E-03 1.208E-03 1.267E-03 1.317E-03 1.357E-03 1.386E-03 1.403E-03 1.409E-03 1.403E-03 1.386E-03 1.357E-03 1.317E-03 1.267E-03 1.208E-03 1.139E-03 1.062E-03 9.791E-04 8.902E-04 7.971E-04 7.014E-04 6.046E-04 5.085E-04 4.149E-04 3.258E-04 2.431E-04 1.690E-04 1.055E-04 5.502E-05 1.967E-05 1.764E-06 3.609E-06 2.751E-05 7.576E-05 1.507E-04 2.544E-04 3.892E-04 5.573E-04 7.605E-04 1.001E-03 1.280E-03 1.601E-03 1.963E-03 2.369E-03 2.820E-03 3.318E-03 3.862E-03 4.453E-03 5.093E-03 5.780E-03 6.516E-03 7.300E-03 8.131E-03 9.008E-03 9.931E-03 1.090E-02 1.191E-02 1.296E-02 1.404E-02 1.517E-02 1.632E-02 1.751E-02 1.872E-02 1.996E-02 2.122E-02 2.249E-02 2.377E-02 2.506E-02 2.635E-02 2.765E-02 2.893E-02 3.020E-02 3.146E-02 3.269E-02 3.390E-02 3.508E-02 3.622E-02 3.731E-02 3.837E-02 3.937E-02 4.031E-02 4.120E-02 4.202E-02 4.277E-02 4.345E-02 4.406E-02 4.458E-02 4.503E-02 4.539E-02 4.567E-02 4.586E-02 4.596E-02 4.596E-02 4.588E-02 4.571E-02 4.545E-02 4.510E-02 4.466E-02 4.413E-02 4.352E-02 4.282E-02 4.205E-02 4.120E-02 4.027E-02 3.928E-02 3.822E-02 3.710E-02 3.593E-02 3.470E-02 3.343E-02 3.212E-02 3.077E-02 2.940E-02 2.800E-02 2.659E-02 2.517E-02 2.374E-02 2.231E-02 2.089E-02 1.948E-02 1.809E-02 1.673E-02 1.539E-02 1.409E-02 1.282E-02 1.160E-02 1.043E-02 9.303E-03 8.235E-03 7.225E-03 6.276E-03 5.389E-03 4.568E-03 3.814E-03 3.128E-03 2.511E-03 1.589E-03 2.081E-03 2.641E-03 3.269E-03 3.965E-03 4.729E-03 5.557E-03 6.450E-03 7.404E-03 8.418E-03 9.488E-03 1.061E-02 1.179E-02 1.300E-02 1.427E-02 1.556E-02 1.689E-02 1.825E-02 1.963E-02 2.103E-02 2.244E-02 2.386E-02 2.527E-02 2.668E-02 2.808E-02 2.947E-02 3.083E-02 3.216E-02 3.345E-02 3.471E-02 3.593E-02 3.709E-02 3.820E-02 3.925E-02 4.023E-02 4.115E-02 4.199E-02 4.277E-02 4.346E-02 4.407E-02 4.460E-02 4.505E-02 4.541E-02 4.568E-02 4.586E-02 4.596E-02 4.596E-02 4.588E-02 4.572E-02 4.547E-02 4.513E-02 4.471E-02 4.422E-02 4.364E-02 4.300E-02 4.228E-02 4.150E-02 4.065E-02 3.975E-02 3.879E-02 3.778E-02 3.672E-02 3.562E-02 3.449E-02 3.333E-02 3.213E-02 3.092E-02 2.969E-02 2.844E-02 2.719E-02 2.593E-02 2.468E-02 2.343E-02 2.218E-02 2.096E-02 1.974E-02 1.855E-02 1.739E-02 1.625E-02 1.513E-02 1.405E-02 1.301E-02 1.200E-02 1.103E-02 1.011E-02 9.219E-03 8.375E-03 7.574E-03 6.817E-03 6.105E-03 5.437E-03 4.814E-03 4.234E-03 3.699E-03 3.206E-03 2.755E-03 2.345E-03 1.974E-03 1.642E-03 1.347E-03 1.086E-03 8.593E-04 6.639E-04 4.981E-04 3.601E-04 2.478E-04 1.593E-04 9.249E-05 4.531E-05 1.574E-05 1.762E-06 1.402E-06 1.271E-05 3.381E-05 6.286E-05 9.812E-05 1.379E-04 1.807E-04 2.249E-04 2.693E-04 3.124E-04 3.533E-04 3.908E-04 4.241E-04 4.524E-04 4.751E-04 4.916E-04 5.017E-04 5.051E-04 5.017E-04 4.916E-04 4.751E-04 4.524E-04 4.241E-04 3.908E-04 3.533E-04 3.124E-04 2.693E-04 2.249E-04 1.807E-04 1.379E-04 9.812E-05 6.286E-05 3.381E-05 1.271E-05 1.402E-06 1.762E-06 1.574E-05 4.531E-05 9.249E-05 1.593E-04 2.478E-04 3.601E-04 4.981E-04 6.639E-04 8.593E-04 1.086E-03 1.347E-03 1.642E-03 1.974E-03 2.345E-03 2.755E-03 3.206E-03 3.699E-03 4.234E-03 4.814E-03 5.437E-03 6.105E-03 6.817E-03 7.574E-03 8.375E-03 9.219E-03 1.011E-02 1.103E-02 1.200E-02 1.301E-02 1.405E-02 1.513E-02 1.625E-02 1.739E-02 1.855E-02 1.974E-02 2.096E-02 2.218E-02 2.343E-02 2.468E-02 2.593E-02 2.719E-02 2.844E-02 2.969E-02 3.092E-02 3.213E-02 3.333E-02 3.449E-02 3.562E-02 3.672E-02 3.778E-02 3.879E-02 3.975E-02 4.065E-02 4.150E-02 4.228E-02 4.300E-02 4.364E-02 4.422E-02 4.471E-02 4.513E-02 4.547E-02 4.572E-02 4.588E-02 4.596E-02 4.596E-02 4.586E-02 4.568E-02 4.541E-02 4.505E-02 4.460E-02 4.407E-02 4.346E-02 4.277E-02 4.199E-02 4.115E-02 4.023E-02 3.925E-02 3.820E-02 3.709E-02 3.593E-02 3.471E-02 3.345E-02 3.216E-02 3.083E-02 2.947E-02 2.808E-02 2.668E-02 2.527E-02 2.386E-02 2.244E-02 2.103E-02 1.963E-02 1.825E-02 1.689E-02 1.556E-02 1.427E-02 1.300E-02 1.179E-02 1.061E-02 9.488E-03 8.418E-03 7.404E-03 6.450E-03 5.557E-03 4.729E-03 3.965E-03 3.269E-03 2.641E-03 2.081E-03 1.255E-03 1.691E-03 2.194E-03 2.765E-03 3.403E-03 4.108E-03 4.879E-03 5.714E-03 6.611E-03 7.569E-03 8.586E-03 9.657E-03 1.078E-02 1.195E-02 1.317E-02 1.442E-02 1.572E-02 1.704E-02 1.839E-02 1.976E-02 2.115E-02 2.255E-02 2.395E-02 2.535E-02 2.675E-02 2.814E-02 2.951E-02 3.085E-02 3.217E-02 3.345E-02 3.470E-02 3.590E-02 3.705E-02 3.815E-02 3.919E-02 4.017E-02 4.108E-02 4.192E-02 4.269E-02 4.339E-02 4.400E-02 4.453E-02 4.499E-02 4.535E-02 4.564E-02 4.583E-02 4.594E-02 4.597E-02 4.591E-02 4.577E-02 4.554E-02 4.523E-02 4.485E-02 4.438E-02 4.384E-02 4.323E-02 4.255E-02 4.181E-02 4.100E-02 4.014E-02 3.922E-02 3.826E-02 3.724E-02 3.619E-02 3.510E-02 3.398E-02 3.283E-02 3.166E-02 3.047E-02 2.927E-02 2.806E-02 2.684E-02 2.562E-02 2.440E-02 2.319E-02 2.199E-02 2.081E-02 1.964E-02 1.850E-02 1.737E-02 1.628E-02 1.521E-02 1.418E-02 1.317E-02 1.221E-02 1.128E-02 1.039E-02 9.533E-03 8.719E-03 7.947E-03 7.216E-03 6.525E-03 5.876E-03 5.268E-03 4.700E-03 4.173E-03 3.684E-03 3.234E-03 2.820E-03 2.443E-03 2.101E-03 1.791E-03 1.514E-03 1.266E-03 1.047E-03 8.554E-04 6.883E-04 5.445E-04 4.223E-04 3.197E-04 2.350E-04 1.664E-04 1.123E-04 7.095E-05 4.068E-05 1.993E-05 7.209E-06 1.084E-06 2.162E-07 3.357E-06 9.360E-06 1.718E-05 2.589E-05 3.466E-05 4.280E-05 4.974E-05 5.502E-05 5.831E-05 5.944E-05 5.831E-05 5.502E-05 4.974E-05 4.280E-05 3.466E-05 2.589E-05 1.718E-05 9.360E-06 3.357E-06 2.162E-07 1.084E-06 7.209E-06 1.993E-05 4.068E-05 7.095E-05 1.123E-04 1.664E-04 2.350E-04 3.197E-04 4.223E-04 5.445E-04 6.883E-04 8.554E-04 1.047E-03 1.266E-03 1.514E-03 1.791E-03 2.101E-03 2.443E-03 2.820E-03 3.234E-03 3.684E-03 4.173E-03 4.700E-03 5.268E-03 5.876E-03 6.525E-03 7.216E-03 7.947E-03 8.719E-03 9.533E-03 1.039E-02 1.128E-02 1.221E-02 1.317E-02 1.418E-02 1.521E-02 1.628E-02 1.737E-02 1.850E-02 1.964E-02 2.081E-02 2.199E-02 2.319E-02 2.440E-02 2.562E-02 2.684E-02 2.806E-02 2.927E-02 3.047E-02 3.166E-02 3.283E-02 3.398E-02 3.510E-02 3.619E-02 3.724E-02 3.826E-02 3.922E-02 4.014E-02 4.100E-02 4.181E-02 4.255E-02 4.323E-02 4.384E-02 4.438E-02 4.485E-02 4.523E-02 4.554E-02 4.577E-02 4.591E-02 4.597E-02 4.594E-02 4.583E-02 4.564E-02 4.535E-02 4.499E-02 4.453E-02 4.400E-02 4.339E-02 4.269E-02 4.192E-02 4.108E-02 4.017E-02 3.919E-02 3.815E-02 3.705E-02 3.590E-02 3.470E-02 3.345E-02 3.217E-02 3.085E-02 2.951E-02 2.814E-02 2.675E-02 2.535E-02 2.395E-02 2.255E-02 2.115E-02 1.976E-02 1.839E-02 1.704E-02 1.572E-02 1.442E-02 1.317E-02 1.195E-02 1.078E-02 9.657E-03 8.586E-03 7.569E-03 6.611E-03 5.714E-03 4.879E-03 4.108E-03 3.403E-03 2.765E-03 2.194E-03 1.691E-03 9.609E-04 1.342E-03 1.789E-03 2.302E-03 2.882E-03 3.529E-03 4.241E-03 5.018E-03 5.858E-03 6.759E-03 7.720E-03 8.737E-03 9.807E-03 1.093E-02 1.210E-02 1.331E-02 1.456E-02 1.584E-02 1.716E-02 1.850E-02 1.986E-02 2.124E-02 2.263E-02 2.402E-02 2.541E-02 2.679E-02 2.816E-02 2.952E-02 3.085E-02 3.216E-02 3.343E-02 3.466E-02 3.585E-02 3.699E-02 3.808E-02 3.912E-02 4.009E-02 4.100E-02 4.183E-02 4.260E-02 4.330E-02 4.391E-02 4.445E-02 4.491E-02 4.529E-02 4.559E-02 4.580E-02 4.593E-02 4.597E-02 4.593E-02 4.582E-02 4.562E-02 4.534E-02 4.498E-02 4.455E-02 4.405E-02 4.347E-02 4.283E-02 4.213E-02 4.137E-02 4.054E-02 3.967E-02 3.875E-02 3.778E-02 3.678E-02 3.573E-02 3.466E-02 3.355E-02 3.243E-02 3.128E-02 3.012E-02 2.895E-02 2.777E-02 2.659E-02 2.541E-02 2.424E-02 2.307E-02 2.192E-02 2.078E-02 1.965E-02 1.855E-02 1.748E-02 1.643E-02 1.540E-02 1.441E-02 1.345E-02 1.252E-02 1.163E-02 1.077E-02 9.951E-03 9.169E-03 8.424E-03 7.717E-03 7.048E-03 6.417E-03 5.824E-03 5.268E-03 4.749E-03 4.265E-03 3.817E-03 3.402E-03 3.021E-03 2.671E-03 2.351E-03 2.060E-03 1.797E-03 1.559E-03 1.347E-03 1.157E-03 9.884E-04 8.399E-04 7.096E-04 5.962E-04 4.981E-04 4.139E-04 3.421E-04 2.815E-04 2.307E-04 1.886E-04 1.541E-04 1.261E-04 1.036E-04 8.587E-05 7.214E-05 6.178E-05 5.426E-05 4.919E-05 4.626E-05 4.531E-05 4.626E-05 4.919E-05 5.426E-05 6.178E-05 7.214E-05 8.587E-05 1.036E-04 1.261E-04 1.541E-04 1.886E-04 2.307E-04 2.815E-04 3.421E-04 4.139E-04 4.981E-04 5.962E-04 7.096E-04 8.399E-04 9.884E-04 1.157E-03 1.347E-03 1.559E-03 1.797E-03 2.060E-03 2.351E-03 2.671E-03 3.021E-03 3.402E-03 3.817E-03 4.265E-03 4.749E-03 5.268E-03 5.824E-03 6.417E-03 7.048E-03 7.717E-03 8.424E-03 9.169E-03 9.951E-03 1.077E-02 1.163E-02 1.252E-02 1.345E-02 1.441E-02 1.540E-02 1.643E-02 1.748E-02 1.855E-02 1.965E-02 2.078E-02 2.192E-02 2.307E-02 2.424E-02 2.541E-02 2.659E-02 2.777E-02 2.895E-02 3.012E-02 3.128E-02 3.243E-02 3.355E-02 3.466E-02 3.573E-02 3.678E-02 3.778E-02 3.875E-02 3.967E-02 4.054E-02 4.137E-02 4.213E-02 4.283E-02 4.347E-02 4.405E-02 4.455E-02 4.498E-02 4.534E-02 4.562E-02 4.582E-02 4.593E-02 4.597E-02 4.593E-02 4.580E-02 4.559E-02 4.529E-02 4.491E-02 4.445E-02 4.391E-02 4.330E-02 4.260E-02 4.183E-02 4.100E-02 4.009E-02 3.912E-02 3.808E-02 3.699E-02 3.585E-02 3.466E-02 3.343E-02 3.216E-02 3.085E-02 2.952E-02 2.816E-02 2.679E-02 2.541E-02 2.402E-02 2.263E-02 2.124E-02 1.986E-02 1.850E-02 1.716E-02 1.584E-02 1.456E-02 1.331E-02 1.210E-02 1.093E-02 9.807E-03 8.737E-03 7.720E-03 6.759E-03 5.858E-03 5.018E-03 4.241E-03 3.529E-03 2.882E-03 2.302E-03 1.789E-03 1.342E-03 7.064E-04 1.033E-03 1.424E-03 1.881E-03 2.404E-03 2.992E-03 3.646E-03 4.364E-03 5.146E-03 5.989E-03 6.893E-03 7.854E-03 8.871E-03 9.940E-03 1.106E-02 1.222E-02 1.343E-02 1.467E-02 1.595E-02 1.726E-02 1.859E-02 1.994E-02 2.130E-02 2.268E-02 2.406E-02 2.543E-02 2.681E-02 2.816E-02 2.951E-02 3.083E-02 3.212E-02 3.338E-02 3.460E-02 3.578E-02 3.691E-02 3.799E-02 3.902E-02 3.999E-02 4.089E-02 4.173E-02 4.250E-02 4.319E-02 4.381E-02 4.436E-02 4.483E-02 4.522E-02 4.553E-02 4.575E-02 4.590E-02 4.597E-02 4.595E-02 4.586E-02 4.569E-02 4.544E-02 4.512E-02 4.472E-02 4.425E-02 4.372E-02 4.312E-02 4.246E-02 4.174E-02 4.096E-02 4.013E-02 3.926E-02 3.834E-02 3.738E-02 3.638E-02 3.535E-02 3.429E-02 3.321E-02 3.211E-02 3.100E-02 2.987E-02 2.873E-02 2.759E-02 2.645E-02 2.531E-02 2.418E-02 2.306E-02 2.195E-02 2.085E-02 1.978E-02 1.872E-02 1.769E-02 1.668E-02 1.571E-02 1.475E-02 1.383E-02 1.295E-02 1.209E-02 1.127E-02 1.048E-02 9.726E-03 9.008E-03 8.326E-03 7.678E-03 7.066E-03 6.489E-03 5.946E-03 5.437E-03 4.961E-03 4.516E-03 4.103E-03 3.721E-03 3.367E-03 3.041E-03 2.742E-03 2.468E-03 2.218E-03 1.991E-03 1.786E-03 1.601E-03 1.434E-03 1.285E-03 1.152E-03 1.035E-03 9.309E-04 8.399E-04 7.605E-04 6.919E-04 6.330E-04 5.831E-04 5.414E-04 5.072E-04 4.801E-04 4.594E-04 4.450E-04 4.364E-04 4.335E-04 4.364E-04 4.450E-04 4.594E-04 4.801E-04 5.072E-04 5.414E-04 5.831E-04 6.330E-04 6.919E-04 7.605E-04 8.399E-04 9.309E-04 1.035E-03 1.152E-03 1.285E-03 1.434E-03 1.601E-03 1.786E-03 1.991E-03 2.218E-03 2.468E-03 2.742E-03 3.041E-03 3.367E-03 3.721E-03 4.103E-03 4.516E-03 4.961E-03 5.437E-03 5.946E-03 6.489E-03 7.066E-03 7.678E-03 8.326E-03 9.008E-03 9.726E-03 1.048E-02 1.127E-02 1.209E-02 1.295E-02 1.383E-02 1.475E-02 1.571E-02 1.668E-02 1.769E-02 1.872E-02 1.978E-02 2.085E-02 2.195E-02 2.306E-02 2.418E-02 2.531E-02 2.645E-02 2.759E-02 2.873E-02 2.987E-02 3.100E-02 3.211E-02 3.321E-02 3.429E-02 3.535E-02 3.638E-02 3.738E-02 3.834E-02 3.926E-02 4.013E-02 4.096E-02 4.174E-02 4.246E-02 4.312E-02 4.372E-02 4.425E-02 4.472E-02 4.512E-02 4.544E-02 4.569E-02 4.586E-02 4.595E-02 4.597E-02 4.590E-02 4.575E-02 4.553E-02 4.522E-02 4.483E-02 4.436E-02 4.381E-02 4.319E-02 4.250E-02 4.173E-02 4.089E-02 3.999E-02 3.902E-02 3.799E-02 3.691E-02 3.578E-02 3.460E-02 3.338E-02 3.212E-02 3.083E-02 2.951E-02 2.816E-02 2.681E-02 2.543E-02 2.406E-02 2.268E-02 2.130E-02 1.994E-02 1.859E-02 1.726E-02 1.595E-02 1.467E-02 1.343E-02 1.222E-02 1.106E-02 9.940E-03 8.871E-03 7.854E-03 6.893E-03 5.989E-03 5.146E-03 4.364E-03 3.646E-03 2.992E-03 2.404E-03 1.881E-03 1.424E-03 1.033E-03 4.916E-04 7.652E-04 1.102E-03 1.503E-03 1.969E-03 2.499E-03 3.094E-03 3.754E-03 4.477E-03 5.262E-03 6.108E-03 7.012E-03 7.973E-03 8.988E-03 1.005E-02 1.117E-02 1.233E-02 1.353E-02 1.476E-02 1.603E-02 1.733E-02 1.865E-02 1.999E-02 2.134E-02 2.270E-02 2.407E-02 2.543E-02 2.679E-02 2.814E-02 2.947E-02 3.077E-02 3.205E-02 3.330E-02 3.451E-02 3.568E-02 3.681E-02 3.788E-02 3.890E-02 3.986E-02 4.076E-02 4.160E-02 4.237E-02 4.307E-02 4.370E-02 4.425E-02 4.473E-02 4.513E-02 4.545E-02 4.570E-02 4.587E-02 4.596E-02 4.597E-02 4.590E-02 4.576E-02 4.554E-02 4.525E-02 4.489E-02 4.446E-02 4.397E-02 4.341E-02 4.279E-02 4.211E-02 4.138E-02 4.060E-02 3.977E-02 3.890E-02 3.799E-02 3.704E-02 3.606E-02 3.505E-02 3.402E-02 3.296E-02 3.189E-02 3.081E-02 2.972E-02 2.862E-02 2.752E-02 2.642E-02 2.532E-02 2.424E-02 2.316E-02 2.210E-02 2.105E-02 2.002E-02 1.901E-02 1.802E-02 1.706E-02 1.612E-02 1.521E-02 1.433E-02 1.348E-02 1.266E-02 1.187E-02 1.112E-02 1.040E-02 9.706E-03 9.048E-03 8.424E-03 7.832E-03 7.272E-03 6.744E-03 6.247E-03 5.780E-03 5.344E-03 4.936E-03 4.556E-03 4.203E-03 3.877E-03 3.575E-03 3.296E-03 3.041E-03 2.807E-03 2.594E-03 2.400E-03 2.224E-03 2.066E-03 1.924E-03 1.797E-03 1.684E-03 1.585E-03 1.499E-03 1.424E-03 1.361E-03 1.309E-03 1.266E-03 1.234E-03 1.211E-03 1.197E-03 1.193E-03 1.197E-03 1.211E-03 1.234E-03 1.266E-03 1.309E-03 1.361E-03 1.424E-03 1.499E-03 1.585E-03 1.684E-03 1.797E-03 1.924E-03 2.066E-03 2.224E-03 2.400E-03 2.594E-03 2.807E-03 3.041E-03 3.296E-03 3.575E-03 3.877E-03 4.203E-03 4.556E-03 4.936E-03 5.344E-03 5.780E-03 6.247E-03 6.744E-03 7.272E-03 7.832E-03 8.424E-03 9.048E-03 9.706E-03 1.040E-02 1.112E-02 1.187E-02 1.266E-02 1.348E-02 1.433E-02 1.521E-02 1.612E-02 1.706E-02 1.802E-02 1.901E-02 2.002E-02 2.105E-02 2.210E-02 2.316E-02 2.424E-02 2.532E-02 2.642E-02 2.752E-02 2.862E-02 2.972E-02 3.081E-02 3.189E-02 3.296E-02 3.402E-02 3.505E-02 3.606E-02 3.704E-02 3.799E-02 3.890E-02 3.977E-02 4.060E-02 4.138E-02 4.211E-02 4.279E-02 4.341E-02 4.397E-02 4.446E-02 4.489E-02 4.525E-02 4.554E-02 4.576E-02 4.590E-02 4.597E-02 4.596E-02 4.587E-02 4.570E-02 4.545E-02 4.513E-02 4.473E-02 4.425E-02 4.370E-02 4.307E-02 4.237E-02 4.160E-02 4.076E-02 3.986E-02 3.890E-02 3.788E-02 3.681E-02 3.568E-02 3.451E-02 3.330E-02 3.205E-02 3.077E-02 2.947E-02 2.814E-02 2.679E-02 2.543E-02 2.407E-02 2.270E-02 2.134E-02 1.999E-02 1.865E-02 1.733E-02 1.603E-02 1.476E-02 1.353E-02 1.233E-02 1.117E-02 1.005E-02 8.988E-03 7.973E-03 7.012E-03 6.108E-03 5.262E-03 4.477E-03 3.754E-03 3.094E-03 2.499E-03 1.969E-03 1.503E-03 1.102E-03 7.652E-04 3.162E-04 5.381E-04 8.215E-04 1.167E-03 1.577E-03 2.050E-03 2.587E-03 3.188E-03 3.852E-03 4.578E-03 5.365E-03 6.212E-03 7.116E-03 8.076E-03 9.088E-03 1.015E-02 1.126E-02 1.241E-02 1.360E-02 1.483E-02 1.609E-02 1.738E-02 1.869E-02 2.001E-02 2.136E-02 2.270E-02 2.406E-02 2.541E-02 2.675E-02 2.808E-02 2.940E-02 3.069E-02 3.196E-02 3.320E-02 3.440E-02 3.556E-02 3.668E-02 3.774E-02 3.876E-02 3.972E-02 4.062E-02 4.145E-02 4.222E-02 4.293E-02 4.356E-02 4.413E-02 4.462E-02 4.503E-02 4.537E-02 4.563E-02 4.582E-02 4.593E-02 4.597E-02 4.593E-02 4.582E-02 4.564E-02 4.538E-02 4.506E-02 4.467E-02 4.422E-02 4.370E-02 4.312E-02 4.249E-02 4.181E-02 4.107E-02 4.029E-02 3.947E-02 3.861E-02 3.771E-02 3.678E-02 3.582E-02 3.483E-02 3.383E-02 3.280E-02 3.177E-02 3.072E-02 2.967E-02 2.861E-02 2.755E-02 2.649E-02 2.544E-02 2.440E-02 2.337E-02 2.235E-02 2.135E-02 2.037E-02 1.940E-02 1.846E-02 1.754E-02 1.665E-02 1.578E-02 1.494E-02 1.413E-02 1.335E-02 1.260E-02 1.187E-02 1.118E-02 1.052E-02 9.890E-03 9.290E-03 8.719E-03 8.179E-03 7.669E-03 7.188E-03 6.735E-03 6.309E-03 5.911E-03 5.539E-03 5.193E-03 4.871E-03 4.572E-03 4.296E-03 4.042E-03 3.809E-03 3.596E-03 3.402E-03 3.227E-03 3.068E-03 2.927E-03 2.801E-03 2.690E-03 2.594E-03 2.512E-03 2.443E-03 2.388E-03 2.345E-03 2.314E-03 2.296E-03 2.290E-03 2.296E-03 2.314E-03 2.345E-03 2.388E-03 2.443E-03 2.512E-03 2.594E-03 2.690E-03 2.801E-03 2.927E-03 3.068E-03 3.227E-03 3.402E-03 3.596E-03 3.809E-03 4.042E-03 4.296E-03 4.572E-03 4.871E-03 5.193E-03 5.539E-03 5.911E-03 6.309E-03 6.735E-03 7.188E-03 7.669E-03 8.179E-03 8.719E-03 9.290E-03 9.890E-03 1.052E-02 1.118E-02 1.187E-02 1.260E-02 1.335E-02 1.413E-02 1.494E-02 1.578E-02 1.665E-02 1.754E-02 1.846E-02 1.940E-02 2.037E-02 2.135E-02 2.235E-02 2.337E-02 2.440E-02 2.544E-02 2.649E-02 2.755E-02 2.861E-02 2.967E-02 3.072E-02 3.177E-02 3.280E-02 3.383E-02 3.483E-02 3.582E-02 3.678E-02 3.771E-02 3.861E-02 3.947E-02 4.029E-02 4.107E-02 4.181E-02 4.249E-02 4.312E-02 4.370E-02 4.422E-02 4.467E-02 4.506E-02 4.538E-02 4.564E-02 4.582E-02 4.593E-02 4.597E-02 4.593E-02 4.582E-02 4.563E-02 4.537E-02 4.503E-02 4.462E-02 4.413E-02 4.356E-02 4.293E-02 4.222E-02 4.145E-02 4.062E-02 3.972E-02 3.876E-02 3.774E-02 3.668E-02 3.556E-02 3.440E-02 3.320E-02 3.196E-02 3.069E-02 2.940E-02 2.808E-02 2.675E-02 2.541E-02 2.406E-02 2.270E-02 2.136E-02 2.001E-02 1.869E-02 1.738E-02 1.609E-02 1.483E-02 1.360E-02 1.241E-02 1.126E-02 1.015E-02 9.088E-03 8.076E-03 7.116E-03 6.212E-03 5.365E-03 4.578E-03 3.852E-03 3.188E-03 2.587E-03 2.050E-03 1.577E-03 1.167E-03 8.215E-04 5.381E-04 1.800E-04 3.517E-04 5.828E-04 8.748E-04 1.229E-03 1.645E-03 2.124E-03 2.667E-03 3.272E-03 3.939E-03 4.667E-03 5.456E-03 6.302E-03 7.205E-03 8.162E-03 9.170E-03 1.023E-02 1.133E-02 1.248E-02 1.366E-02 1.488E-02 1.613E-02 1.740E-02 1.870E-02 2.001E-02 2.134E-02 2.268E-02 2.402E-02 2.535E-02 2.668E-02 2.800E-02 2.931E-02 3.059E-02 3.184E-02 3.307E-02 3.426E-02 3.541E-02 3.652E-02 3.758E-02 3.859E-02 3.955E-02 4.045E-02 4.128E-02 4.206E-02 4.277E-02 4.341E-02 4.398E-02 4.449E-02 4.492E-02 4.527E-02 4.556E-02 4.577E-02 4.590E-02 4.597E-02 4.596E-02 4.588E-02 4.573E-02 4.551E-02 4.522E-02 4.487E-02 4.446E-02 4.399E-02 4.346E-02 4.287E-02 4.223E-02 4.155E-02 4.082E-02 4.004E-02 3.923E-02 3.838E-02 3.750E-02 3.659E-02 3.566E-02 3.470E-02 3.373E-02 3.274E-02 3.174E-02 3.073E-02 2.972E-02 2.870E-02 2.769E-02 2.668E-02 2.567E-02 2.468E-02 2.369E-02 2.272E-02 2.177E-02 2.083E-02 1.991E-02 1.902E-02 1.815E-02 1.730E-02 1.647E-02 1.567E-02 1.490E-02 1.415E-02 1.344E-02 1.275E-02 1.209E-02 1.146E-02 1.086E-02 1.028E-02 9.736E-03 9.219E-03 8.729E-03 8.267E-03 7.832E-03 7.422E-03 7.039E-03 6.680E-03 6.345E-03 6.034E-03 5.746E-03 5.479E-03 5.234E-03 5.010E-03 4.805E-03 4.620E-03 4.453E-03 4.304E-03 4.173E-03 4.058E-03 3.959E-03 3.877E-03 3.809E-03 3.758E-03 3.721E-03 3.699E-03 3.691E-03 3.699E-03 3.721E-03 3.758E-03 3.809E-03 3.877E-03 3.959E-03 4.058E-03 4.173E-03 4.304E-03 4.453E-03 4.620E-03 4.805E-03 5.010E-03 5.234E-03 5.479E-03 5.746E-03 6.034E-03 6.345E-03 6.680E-03 7.039E-03 7.422E-03 7.832E-03 8.267E-03 8.729E-03 9.219E-03 9.736E-03 1.028E-02 1.086E-02 1.146E-02 1.209E-02 1.275E-02 1.344E-02 1.415E-02 1.490E-02 1.567E-02 1.647E-02 1.730E-02 1.815E-02 1.902E-02 1.991E-02 2.083E-02 2.177E-02 2.272E-02 2.369E-02 2.468E-02 2.567E-02 2.668E-02 2.769E-02 2.870E-02 2.972E-02 3.073E-02 3.174E-02 3.274E-02 3.373E-02 3.470E-02 3.566E-02 3.659E-02 3.750E-02 3.838E-02 3.923E-02 4.004E-02 4.082E-02 4.155E-02 4.223E-02 4.287E-02 4.346E-02 4.399E-02 4.446E-02 4.487E-02 4.522E-02 4.551E-02 4.573E-02 4.588E-02 4.596E-02 4.597E-02 4.590E-02 4.577E-02 4.556E-02 4.527E-02 4.492E-02 4.449E-02 4.398E-02 4.341E-02 4.277E-02 4.206E-02 4.128E-02 4.045E-02 3.955E-02 3.859E-02 3.758E-02 3.652E-02 3.541E-02 3.426E-02 3.307E-02 3.184E-02 3.059E-02 2.931E-02 2.800E-02 2.668E-02 2.535E-02 2.402E-02 2.268E-02 2.134E-02 2.001E-02 1.870E-02 1.740E-02 1.613E-02 1.488E-02 1.366E-02 1.248E-02 1.133E-02 1.023E-02 9.170E-03 8.162E-03 7.205E-03 6.302E-03 5.456E-03 4.667E-03 3.939E-03 3.272E-03 2.667E-03 2.124E-03 1.645E-03 1.229E-03 8.748E-04 5.828E-04 3.517E-04 8.243E-05 2.054E-04 3.858E-04 6.251E-04 9.246E-04 1.285E-03 1.708E-03 2.192E-03 2.738E-03 3.347E-03 4.016E-03 4.745E-03 5.533E-03 6.378E-03 7.278E-03 8.231E-03 9.234E-03 1.029E-02 1.138E-02 1.252E-02 1.369E-02 1.490E-02 1.614E-02 1.740E-02 1.869E-02 1.999E-02 2.130E-02 2.263E-02 2.395E-02 2.527E-02 2.659E-02 2.790E-02 2.919E-02 3.046E-02 3.170E-02 3.292E-02 3.410E-02 3.524E-02 3.634E-02 3.740E-02 3.840E-02 3.936E-02 4.026E-02 4.110E-02 4.187E-02 4.259E-02 4.324E-02 4.382E-02 4.434E-02 4.478E-02 4.516E-02 4.546E-02 4.570E-02 4.586E-02 4.595E-02 4.597E-02 4.592E-02 4.581E-02 4.562E-02 4.538E-02 4.507E-02 4.470E-02 4.427E-02 4.378E-02 4.324E-02 4.266E-02 4.202E-02 4.134E-02 4.061E-02 3.985E-02 3.905E-02 3.823E-02 3.737E-02 3.649E-02 3.558E-02 3.466E-02 3.372E-02 3.277E-02 3.181E-02 3.084E-02 2.987E-02 2.890E-02 2.793E-02 2.697E-02 2.601E-02 2.506E-02 2.413E-02 2.320E-02 2.230E-02 2.141E-02 2.054E-02 1.969E-02 1.886E-02 1.805E-02 1.727E-02 1.652E-02 1.578E-02 1.508E-02 1.440E-02 1.375E-02 1.312E-02 1.252E-02 1.195E-02 1.140E-02 1.089E-02 1.040E-02 9.931E-03 9.492E-03 9.078E-03 8.690E-03 8.326E-03 7.986E-03 7.669E-03 7.375E-03 7.104E-03 6.854E-03 6.625E-03 6.417E-03 6.229E-03 6.061E-03 5.911E-03 5.780E-03 5.668E-03 5.573E-03 5.496E-03 5.437E-03 5.395E-03 5.369E-03 5.361E-03 5.369E-03 5.395E-03 5.437E-03 5.496E-03 5.573E-03 5.668E-03 5.780E-03 5.911E-03 6.061E-03 6.229E-03 6.417E-03 6.625E-03 6.854E-03 7.104E-03 7.375E-03 7.669E-03 7.986E-03 8.326E-03 8.690E-03 9.078E-03 9.492E-03 9.931E-03 1.040E-02 1.089E-02 1.140E-02 1.195E-02 1.252E-02 1.312E-02 1.375E-02 1.440E-02 1.508E-02 1.578E-02 1.652E-02 1.727E-02 1.805E-02 1.886E-02 1.969E-02 2.054E-02 2.141E-02 2.230E-02 2.320E-02 2.413E-02 2.506E-02 2.601E-02 2.697E-02 2.793E-02 2.890E-02 2.987E-02 3.084E-02 3.181E-02 3.277E-02 3.372E-02 3.466E-02 3.558E-02 3.649E-02 3.737E-02 3.823E-02 3.905E-02 3.985E-02 4.061E-02 4.134E-02 4.202E-02 4.266E-02 4.324E-02 4.378E-02 4.427E-02 4.470E-02 4.507E-02 4.538E-02 4.562E-02 4.581E-02 4.592E-02 4.597E-02 4.595E-02 4.586E-02 4.570E-02 4.546E-02 4.516E-02 4.478E-02 4.434E-02 4.382E-02 4.324E-02 4.259E-02 4.187E-02 4.110E-02 4.026E-02 3.936E-02 3.840E-02 3.740E-02 3.634E-02 3.524E-02 3.410E-02 3.292E-02 3.170E-02 3.046E-02 2.919E-02 2.790E-02 2.659E-02 2.527E-02 2.395E-02 2.263E-02 2.130E-02 1.999E-02 1.869E-02 1.740E-02 1.614E-02 1.490E-02 1.369E-02 1.252E-02 1.138E-02 1.029E-02 9.234E-03 8.231E-03 7.278E-03 6.378E-03 5.533E-03 4.745E-03 4.016E-03 3.347E-03 2.738E-03 2.192E-03 1.708E-03 1.285E-03 9.246E-04 6.251E-04 3.858E-04 2.054E-04 2.278E-05 9.874E-05 2.299E-04 4.181E-04 6.645E-04 9.705E-04 1.337E-03 1.764E-03 2.252E-03 2.801E-03 3.411E-03 4.081E-03 4.810E-03 5.596E-03 6.439E-03 7.335E-03 8.283E-03 9.280E-03 1.032E-02 1.141E-02 1.254E-02 1.370E-02 1.490E-02 1.613E-02 1.738E-02 1.865E-02 1.994E-02 2.124E-02 2.255E-02 2.386E-02 2.517E-02 2.647E-02 2.776E-02 2.904E-02 3.030E-02 3.153E-02 3.273E-02 3.391E-02 3.504E-02 3.614E-02 3.719E-02 3.819E-02 3.914E-02 4.004E-02 4.088E-02 4.167E-02 4.239E-02 4.305E-02 4.364E-02 4.417E-02 4.463E-02 4.503E-02 4.535E-02 4.561E-02 4.580E-02 4.592E-02 4.597E-02 4.595E-02 4.587E-02 4.573E-02 4.552E-02 4.525E-02 4.492E-02 4.454E-02 4.410E-02 4.361E-02 4.307E-02 4.248E-02 4.185E-02 4.118E-02 4.047E-02 3.973E-02 3.895E-02 3.814E-02 3.731E-02 3.646E-02 3.559E-02 3.470E-02 3.380E-02 3.289E-02 3.197E-02 3.105E-02 3.012E-02 2.920E-02 2.828E-02 2.736E-02 2.645E-02 2.555E-02 2.467E-02 2.379E-02 2.294E-02 2.210E-02 2.127E-02 2.047E-02 1.969E-02 1.893E-02 1.819E-02 1.748E-02 1.679E-02 1.612E-02 1.548E-02 1.487E-02 1.428E-02 1.371E-02 1.317E-02 1.266E-02 1.218E-02 1.171E-02 1.128E-02 1.087E-02 1.048E-02 1.012E-02 9.777E-03 9.461E-03 9.169E-03 8.898E-03 8.650E-03 8.424E-03 8.218E-03 8.034E-03 7.870E-03 7.726E-03 7.602E-03 7.498E-03 7.413E-03 7.347E-03 7.300E-03 7.272E-03 7.262E-03 7.272E-03 7.300E-03 7.347E-03 7.413E-03 7.498E-03 7.602E-03 7.726E-03 7.870E-03 8.034E-03 8.218E-03 8.424E-03 8.650E-03 8.898E-03 9.169E-03 9.461E-03 9.777E-03 1.012E-02 1.048E-02 1.087E-02 1.128E-02 1.171E-02 1.218E-02 1.266E-02 1.317E-02 1.371E-02 1.428E-02 1.487E-02 1.548E-02 1.612E-02 1.679E-02 1.748E-02 1.819E-02 1.893E-02 1.969E-02 2.047E-02 2.127E-02 2.210E-02 2.294E-02 2.379E-02 2.467E-02 2.555E-02 2.645E-02 2.736E-02 2.828E-02 2.920E-02 3.012E-02 3.105E-02 3.197E-02 3.289E-02 3.380E-02 3.470E-02 3.559E-02 3.646E-02 3.731E-02 3.814E-02 3.895E-02 3.973E-02 4.047E-02 4.118E-02 4.185E-02 4.248E-02 4.307E-02 4.361E-02 4.410E-02 4.454E-02 4.492E-02 4.525E-02 4.552E-02 4.573E-02 4.587E-02 4.595E-02 4.597E-02 4.592E-02 4.580E-02 4.561E-02 4.535E-02 4.503E-02 4.463E-02 4.417E-02 4.364E-02 4.305E-02 4.239E-02 4.167E-02 4.088E-02 4.004E-02 3.914E-02 3.819E-02 3.719E-02 3.614E-02 3.504E-02 3.391E-02 3.273E-02 3.153E-02 3.030E-02 2.904E-02 2.776E-02 2.647E-02 2.517E-02 2.386E-02 2.255E-02 2.124E-02 1.994E-02 1.865E-02 1.738E-02 1.613E-02 1.490E-02 1.370E-02 1.254E-02 1.141E-02 1.032E-02 9.280E-03 8.283E-03 7.335E-03 6.439E-03 5.596E-03 4.810E-03 4.081E-03 3.411E-03 2.801E-03 2.252E-03 1.764E-03 1.337E-03 9.705E-04 6.645E-04 4.181E-04 2.299E-04 9.874E-05 2.521E-07 3.108E-05 1.148E-04 2.533E-04 4.481E-04 7.007E-04 1.012E-03 1.383E-03 1.813E-03 2.304E-03 2.855E-03 3.466E-03 4.135E-03 4.862E-03 5.646E-03 6.484E-03 7.376E-03 8.318E-03 9.308E-03 1.034E-02 1.142E-02 1.254E-02 1.369E-02 1.488E-02 1.609E-02 1.733E-02 1.859E-02 1.986E-02 2.115E-02 2.244E-02 2.374E-02 2.503E-02 2.632E-02 2.760E-02 2.887E-02 3.011E-02 3.133E-02 3.253E-02 3.369E-02 3.482E-02 3.591E-02 3.695E-02 3.795E-02 3.890E-02 3.980E-02 4.065E-02 4.144E-02 4.217E-02 4.284E-02 4.344E-02 4.399E-02 4.447E-02 4.488E-02 4.523E-02 4.551E-02 4.572E-02 4.587E-02 4.595E-02 4.597E-02 4.593E-02 4.582E-02 4.565E-02 4.542E-02 4.514E-02 4.480E-02 4.441E-02 4.396E-02 4.347E-02 4.294E-02 4.236E-02 4.174E-02 4.108E-02 4.039E-02 3.967E-02 3.891E-02 3.814E-02 3.734E-02 3.652E-02 3.568E-02 3.483E-02 3.397E-02 3.310E-02 3.223E-02 3.135E-02 3.047E-02 2.960E-02 2.872E-02 2.786E-02 2.700E-02 2.615E-02 2.531E-02 2.449E-02 2.368E-02 2.289E-02 2.212E-02 2.136E-02 2.063E-02 1.991E-02 1.922E-02 1.855E-02 1.791E-02 1.728E-02 1.668E-02 1.611E-02 1.556E-02 1.503E-02 1.453E-02 1.405E-02 1.360E-02 1.317E-02 1.277E-02 1.239E-02 1.204E-02 1.170E-02 1.139E-02 1.111E-02 1.085E-02 1.060E-02 1.039E-02 1.019E-02 1.001E-02 9.859E-03 9.726E-03 9.614E-03 9.522E-03 9.451E-03 9.401E-03 9.370E-03 9.360E-03 9.370E-03 9.401E-03 9.451E-03 9.522E-03 9.614E-03 9.726E-03 9.859E-03 1.001E-02 1.019E-02 1.039E-02 1.060E-02 1.085E-02 1.111E-02 1.139E-02 1.170E-02 1.204E-02 1.239E-02 1.277E-02 1.317E-02 1.360E-02 1.405E-02 1.453E-02 1.503E-02 1.556E-02 1.611E-02 1.668E-02 1.728E-02 1.791E-02 1.855E-02 1.922E-02 1.991E-02 2.063E-02 2.136E-02 2.212E-02 2.289E-02 2.368E-02 2.449E-02 2.531E-02 2.615E-02 2.700E-02 2.786E-02 2.872E-02 2.960E-02 3.047E-02 3.135E-02 3.223E-02 3.310E-02 3.397E-02 3.483E-02 3.568E-02 3.652E-02 3.734E-02 3.814E-02 3.891E-02 3.967E-02 4.039E-02 4.108E-02 4.174E-02 4.236E-02 4.294E-02 4.347E-02 4.396E-02 4.441E-02 4.480E-02 4.514E-02 4.542E-02 4.565E-02 4.582E-02 4.593E-02 4.597E-02 4.595E-02 4.587E-02 4.572E-02 4.551E-02 4.523E-02 4.488E-02 4.447E-02 4.399E-02 4.344E-02 4.284E-02 4.217E-02 4.144E-02 4.065E-02 3.980E-02 3.890E-02 3.795E-02 3.695E-02 3.591E-02 3.482E-02 3.369E-02 3.253E-02 3.133E-02 3.011E-02 2.887E-02 2.760E-02 2.632E-02 2.503E-02 2.374E-02 2.244E-02 2.115E-02 1.986E-02 1.859E-02 1.733E-02 1.609E-02 1.488E-02 1.369E-02 1.254E-02 1.142E-02 1.034E-02 9.308E-03 8.318E-03 7.376E-03 6.484E-03 5.646E-03 4.862E-03 4.135E-03 3.466E-03 2.855E-03 2.304E-03 1.813E-03 1.383E-03 1.012E-03 7.007E-04 4.481E-04 2.533E-04 1.148E-04 3.108E-05 1.389E-05 1.565E-06 3.969E-05 1.303E-04 2.751E-04 4.756E-04 7.331E-04 1.049E-03 1.423E-03 1.856E-03 2.348E-03 2.900E-03 3.510E-03 4.177E-03 4.902E-03 5.682E-03 6.515E-03 7.400E-03 8.335E-03 9.317E-03 1.034E-02 1.141E-02 1.252E-02 1.366E-02 1.483E-02 1.603E-02 1.726E-02 1.850E-02 1.976E-02 2.103E-02 2.231E-02 2.359E-02 2.487E-02 2.615E-02 2.741E-02 2.867E-02 2.990E-02 3.111E-02 3.229E-02 3.345E-02 3.457E-02 3.565E-02 3.669E-02 3.769E-02 3.864E-02 3.954E-02 4.039E-02 4.119E-02 4.192E-02 4.260E-02 4.322E-02 4.378E-02 4.428E-02 4.471E-02 4.508E-02 4.538E-02 4.562E-02 4.580E-02 4.592E-02 4.597E-02 4.596E-02 4.589E-02 4.576E-02 4.558E-02 4.534E-02 4.504E-02 4.470E-02 4.430E-02 4.386E-02 4.337E-02 4.285E-02 4.228E-02 4.168E-02 4.104E-02 4.037E-02 3.967E-02 3.895E-02 3.820E-02 3.744E-02 3.666E-02 3.586E-02 3.505E-02 3.423E-02 3.341E-02 3.258E-02 3.175E-02 3.092E-02 3.009E-02 2.927E-02 2.845E-02 2.765E-02 2.685E-02 2.606E-02 2.529E-02 2.453E-02 2.379E-02 2.307E-02 2.236E-02 2.168E-02 2.101E-02 2.037E-02 1.974E-02 1.914E-02 1.856E-02 1.801E-02 1.748E-02 1.697E-02 1.648E-02 1.602E-02 1.558E-02 1.517E-02 1.478E-02 1.441E-02 1.407E-02 1.375E-02 1.345E-02 1.317E-02 1.292E-02 1.269E-02 1.249E-02 1.230E-02 1.214E-02 1.200E-02 1.189E-02 1.179E-02 1.171E-02 1.166E-02 1.163E-02 1.162E-02 1.163E-02 1.166E-02 1.171E-02 1.179E-02 1.189E-02 1.200E-02 1.214E-02 1.230E-02 1.249E-02 1.269E-02 1.292E-02 1.317E-02 1.345E-02 1.375E-02 1.407E-02 1.441E-02 1.478E-02 1.517E-02 1.558E-02 1.602E-02 1.648E-02 1.697E-02 1.748E-02 1.801E-02 1.856E-02 1.914E-02 1.974E-02 2.037E-02 2.101E-02 2.168E-02 2.236E-02 2.307E-02 2.379E-02 2.453E-02 2.529E-02 2.606E-02 2.685E-02 2.765E-02 2.845E-02 2.927E-02 3.009E-02 3.092E-02 3.175E-02 3.258E-02 3.341E-02 3.423E-02 3.505E-02 3.586E-02 3.666E-02 3.744E-02 3.820E-02 3.895E-02 3.967E-02 4.037E-02 4.104E-02 4.168E-02 4.228E-02 4.285E-02 4.337E-02 4.386E-02 4.430E-02 4.470E-02 4.504E-02 4.534E-02 4.558E-02 4.576E-02 4.589E-02 4.596E-02 4.597E-02 4.592E-02 4.580E-02 4.562E-02 4.538E-02 4.508E-02 4.471E-02 4.428E-02 4.378E-02 4.322E-02 4.260E-02 4.192E-02 4.119E-02 4.039E-02 3.954E-02 3.864E-02 3.769E-02 3.669E-02 3.565E-02 3.457E-02 3.345E-02 3.229E-02 3.111E-02 2.990E-02 2.867E-02 2.741E-02 2.615E-02 2.487E-02 2.359E-02 2.231E-02 2.103E-02 1.976E-02 1.850E-02 1.726E-02 1.603E-02 1.483E-02 1.366E-02 1.252E-02 1.141E-02 1.034E-02 9.317E-03 8.335E-03 7.400E-03 6.515E-03 5.682E-03 4.902E-03 4.177E-03 3.510E-03 2.900E-03 2.348E-03 1.856E-03 1.423E-03 1.049E-03 7.331E-04 4.756E-04 2.751E-04 1.303E-04 3.969E-05 1.565E-06 6.260E-05 9.190E-06 3.699E-06 4.826E-05 1.448E-04 2.949E-04 5.001E-04 7.616E-04 1.080E-03 1.457E-03 1.891E-03 2.384E-03 2.935E-03 3.543E-03 4.208E-03 4.928E-03 5.703E-03 6.530E-03 7.409E-03 8.335E-03 9.308E-03 1.032E-02 1.138E-02 1.248E-02 1.360E-02 1.476E-02 1.595E-02 1.716E-02 1.839E-02 1.963E-02 2.089E-02 2.215E-02 2.342E-02 2.469E-02 2.595E-02 2.720E-02 2.844E-02 2.966E-02 3.086E-02 3.203E-02 3.318E-02 3.429E-02 3.537E-02 3.641E-02 3.740E-02 3.835E-02 3.926E-02 4.011E-02 4.091E-02 4.165E-02 4.234E-02 4.298E-02 4.355E-02 4.406E-02 4.451E-02 4.491E-02 4.524E-02 4.550E-02 4.571E-02 4.586E-02 4.594E-02 4.597E-02 4.594E-02 4.585E-02 4.571E-02 4.551E-02 4.527E-02 4.497E-02 4.462E-02 4.423E-02 4.379E-02 4.332E-02 4.280E-02 4.225E-02 4.167E-02 4.106E-02 4.041E-02 3.975E-02 3.905E-02 3.834E-02 3.762E-02 3.687E-02 3.612E-02 3.535E-02 3.458E-02 3.380E-02 3.302E-02 3.224E-02 3.146E-02 3.068E-02 2.991E-02 2.915E-02 2.839E-02 2.765E-02 2.691E-02 2.619E-02 2.549E-02 2.480E-02 2.413E-02 2.347E-02 2.284E-02 2.222E-02 2.162E-02 2.105E-02 2.049E-02 1.996E-02 1.945E-02 1.896E-02 1.850E-02 1.805E-02 1.763E-02 1.724E-02 1.687E-02 1.652E-02 1.619E-02 1.588E-02 1.560E-02 1.535E-02 1.511E-02 1.490E-02 1.471E-02 1.454E-02 1.440E-02 1.428E-02 1.418E-02 1.410E-02 1.404E-02 1.401E-02 1.400E-02 1.401E-02 1.404E-02 1.410E-02 1.418E-02 1.428E-02 1.440E-02 1.454E-02 1.471E-02 1.490E-02 1.511E-02 1.535E-02 1.560E-02 1.588E-02 1.619E-02 1.652E-02 1.687E-02 1.724E-02 1.763E-02 1.805E-02 1.850E-02 1.896E-02 1.945E-02 1.996E-02 2.049E-02 2.105E-02 2.162E-02 2.222E-02 2.284E-02 2.347E-02 2.413E-02 2.480E-02 2.549E-02 2.619E-02 2.691E-02 2.765E-02 2.839E-02 2.915E-02 2.991E-02 3.068E-02 3.146E-02 3.224E-02 3.302E-02 3.380E-02 3.458E-02 3.535E-02 3.612E-02 3.687E-02 3.762E-02 3.834E-02 3.905E-02 3.975E-02 4.041E-02 4.106E-02 4.167E-02 4.225E-02 4.280E-02 4.332E-02 4.379E-02 4.423E-02 4.462E-02 4.497E-02 4.527E-02 4.551E-02 4.571E-02 4.585E-02 4.594E-02 4.597E-02 4.594E-02 4.586E-02 4.571E-02 4.550E-02 4.524E-02 4.491E-02 4.451E-02 4.406E-02 4.355E-02 4.298E-02 4.234E-02 4.165E-02 4.091E-02 4.011E-02 3.926E-02 3.835E-02 3.740E-02 3.641E-02 3.537E-02 3.429E-02 3.318E-02 3.203E-02 3.086E-02 2.966E-02 2.844E-02 2.720E-02 2.595E-02 2.469E-02 2.342E-02 2.215E-02 2.089E-02 1.963E-02 1.839E-02 1.716E-02 1.595E-02 1.476E-02 1.360E-02 1.248E-02 1.138E-02 1.032E-02 9.308E-03 8.335E-03 7.409E-03 6.530E-03 5.703E-03 4.928E-03 4.208E-03 3.543E-03 2.935E-03 2.384E-03 1.891E-03 1.457E-03 1.080E-03 7.616E-04 5.001E-04 2.949E-04 1.448E-04 4.826E-05 3.699E-06 9.190E-06 1.451E-04 5.282E-05 5.812E-06 6.341E-06 5.645E-05 1.580E-04 3.125E-04 5.214E-04 7.858E-04 1.106E-03 1.484E-03 1.919E-03 2.411E-03 2.960E-03 3.565E-03 4.226E-03 4.942E-03 5.710E-03 6.530E-03 7.400E-03 8.318E-03 9.280E-03 1.029E-02 1.133E-02 1.241E-02 1.353E-02 1.467E-02 1.584E-02 1.704E-02 1.825E-02 1.948E-02 2.072E-02 2.197E-02 2.322E-02 2.448E-02 2.572E-02 2.696E-02 2.818E-02 2.939E-02 3.058E-02 3.175E-02 3.288E-02 3.399E-02 3.506E-02 3.609E-02 3.709E-02 3.804E-02 3.894E-02 3.980E-02 4.061E-02 4.136E-02 4.206E-02 4.270E-02 4.329E-02 4.382E-02 4.430E-02 4.471E-02 4.507E-02 4.536E-02 4.560E-02 4.578E-02 4.590E-02 4.596E-02 4.597E-02 4.592E-02 4.582E-02 4.567E-02 4.547E-02 4.521E-02 4.492E-02 4.458E-02 4.419E-02 4.377E-02 4.331E-02 4.281E-02 4.228E-02 4.172E-02 4.113E-02 4.052E-02 3.988E-02 3.923E-02 3.856E-02 3.787E-02 3.717E-02 3.645E-02 3.573E-02 3.501E-02 3.428E-02 3.355E-02 3.281E-02 3.209E-02 3.136E-02 3.064E-02 2.993E-02 2.923E-02 2.854E-02 2.786E-02 2.719E-02 2.654E-02 2.590E-02 2.528E-02 2.468E-02 2.409E-02 2.353E-02 2.298E-02 2.245E-02 2.195E-02 2.146E-02 2.100E-02 2.056E-02 2.014E-02 1.974E-02 1.937E-02 1.902E-02 1.869E-02 1.838E-02 1.810E-02 1.784E-02 1.760E-02 1.739E-02 1.719E-02 1.702E-02 1.688E-02 1.675E-02 1.665E-02 1.657E-02 1.652E-02 1.648E-02 1.647E-02 1.648E-02 1.652E-02 1.657E-02 1.665E-02 1.675E-02 1.688E-02 1.702E-02 1.719E-02 1.739E-02 1.760E-02 1.784E-02 1.810E-02 1.838E-02 1.869E-02 1.902E-02 1.937E-02 1.974E-02 2.014E-02 2.056E-02 2.100E-02 2.146E-02 2.195E-02 2.245E-02 2.298E-02 2.353E-02 2.409E-02 2.468E-02 2.528E-02 2.590E-02 2.654E-02 2.719E-02 2.786E-02 2.854E-02 2.923E-02 2.993E-02 3.064E-02 3.136E-02 3.209E-02 3.281E-02 3.355E-02 3.428E-02 3.501E-02 3.573E-02 3.645E-02 3.717E-02 3.787E-02 3.856E-02 3.923E-02 3.988E-02 4.052E-02 4.113E-02 4.172E-02 4.228E-02 4.281E-02 4.331E-02 4.377E-02 4.419E-02 4.458E-02 4.492E-02 4.521E-02 4.547E-02 4.567E-02 4.582E-02 4.592E-02 4.597E-02 4.596E-02 4.590E-02 4.578E-02 4.560E-02 4.536E-02 4.507E-02 4.471E-02 4.430E-02 4.382E-02 4.329E-02 4.270E-02 4.206E-02 4.136E-02 4.061E-02 3.980E-02 3.894E-02 3.804E-02 3.709E-02 3.609E-02 3.506E-02 3.399E-02 3.288E-02 3.175E-02 3.058E-02 2.939E-02 2.818E-02 2.696E-02 2.572E-02 2.448E-02 2.322E-02 2.197E-02 2.072E-02 1.948E-02 1.825E-02 1.704E-02 1.584E-02 1.467E-02 1.353E-02 1.241E-02 1.133E-02 1.029E-02 9.280E-03 8.318E-03 7.400E-03 6.530E-03 5.710E-03 4.942E-03 4.226E-03 3.565E-03 2.960E-03 2.411E-03 1.919E-03 1.484E-03 1.106E-03 7.858E-04 5.214E-04 3.125E-04 1.580E-04 5.645E-05 6.341E-06 5.812E-06 5.282E-05 2.601E-04 1.312E-04 4.486E-05 3.484E-06 9.211E-06 6.401E-05 1.696E-04 3.276E-04 5.391E-04 8.054E-04 1.127E-03 1.505E-03 1.939E-03 2.429E-03 2.975E-03 3.576E-03 4.232E-03 4.942E-03 5.703E-03 6.515E-03 7.376E-03 8.283E-03 9.234E-03 1.023E-02 1.126E-02 1.233E-02 1.343E-02 1.456E-02 1.572E-02 1.689E-02 1.809E-02 1.931E-02 2.053E-02 2.176E-02 2.300E-02 2.424E-02 2.547E-02 2.669E-02 2.790E-02 2.910E-02 3.028E-02 3.143E-02 3.256E-02 3.366E-02 3.472E-02 3.575E-02 3.675E-02 3.770E-02 3.860E-02 3.946E-02 4.028E-02 4.104E-02 4.175E-02 4.241E-02 4.301E-02 4.356E-02 4.405E-02 4.449E-02 4.487E-02 4.519E-02 4.546E-02 4.567E-02 4.582E-02 4.592E-02 4.597E-02 4.596E-02 4.590E-02 4.579E-02 4.564E-02 4.543E-02 4.518E-02 4.489E-02 4.456E-02 4.419E-02 4.378E-02 4.334E-02 4.286E-02 4.236E-02 4.182E-02 4.127E-02 4.069E-02 4.009E-02 3.947E-02 3.884E-02 3.819E-02 3.753E-02 3.686E-02 3.619E-02 3.551E-02 3.483E-02 3.415E-02 3.347E-02 3.280E-02 3.212E-02 3.146E-02 3.080E-02 3.015E-02 2.951E-02 2.889E-02 2.828E-02 2.768E-02 2.709E-02 2.653E-02 2.598E-02 2.544E-02 2.493E-02 2.443E-02 2.396E-02 2.350E-02 2.307E-02 2.266E-02 2.226E-02 2.189E-02 2.154E-02 2.122E-02 2.091E-02 2.063E-02 2.037E-02 2.013E-02 1.991E-02 1.972E-02 1.955E-02 1.940E-02 1.928E-02 1.918E-02 1.910E-02 1.904E-02 1.901E-02 1.900E-02 1.901E-02 1.904E-02 1.910E-02 1.918E-02 1.928E-02 1.940E-02 1.955E-02 1.972E-02 1.991E-02 2.013E-02 2.037E-02 2.063E-02 2.091E-02 2.122E-02 2.154E-02 2.189E-02 2.226E-02 2.266E-02 2.307E-02 2.350E-02 2.396E-02 2.443E-02 2.493E-02 2.544E-02 2.598E-02 2.653E-02 2.709E-02 2.768E-02 2.828E-02 2.889E-02 2.951E-02 3.015E-02 3.080E-02 3.146E-02 3.212E-02 3.280E-02 3.347E-02 3.415E-02 3.483E-02 3.551E-02 3.619E-02 3.686E-02 3.753E-02 3.819E-02 3.884E-02 3.947E-02 4.009E-02 4.069E-02 4.127E-02 4.182E-02 4.236E-02 4.286E-02 4.334E-02 4.378E-02 4.419E-02 4.456E-02 4.489E-02 4.518E-02 4.543E-02 4.564E-02 4.579E-02 4.590E-02 4.596E-02 4.597E-02 4.592E-02 4.582E-02 4.567E-02 4.546E-02 4.519E-02 4.487E-02 4.449E-02 4.405E-02 4.356E-02 4.301E-02 4.241E-02 4.175E-02 4.104E-02 4.028E-02 3.946E-02 3.860E-02 3.770E-02 3.675E-02 3.575E-02 3.472E-02 3.366E-02 3.256E-02 3.143E-02 3.028E-02 2.910E-02 2.790E-02 2.669E-02 2.547E-02 2.424E-02 2.300E-02 2.176E-02 2.053E-02 1.931E-02 1.809E-02 1.689E-02 1.572E-02 1.456E-02 1.343E-02 1.233E-02 1.126E-02 1.023E-02 9.234E-03 8.283E-03 7.376E-03 6.515E-03 5.703E-03 4.942E-03 4.232E-03 3.576E-03 2.975E-03 2.429E-03 1.939E-03 1.505E-03 1.127E-03 8.054E-04 5.391E-04 3.276E-04 1.696E-04 6.401E-05 9.211E-06 3.484E-06 4.486E-05 1.312E-04 4.060E-04 2.428E-04 1.195E-04 3.847E-05 1.956E-06 1.206E-05 7.067E-05 1.795E-04 3.399E-04 5.532E-04 8.203E-04 1.142E-03 1.519E-03 1.951E-03 2.438E-03 2.980E-03 3.576E-03 4.226E-03 4.928E-03 5.682E-03 6.484E-03 7.335E-03 8.231E-03 9.170E-03 1.015E-02 1.117E-02 1.222E-02 1.331E-02 1.442E-02 1.556E-02 1.673E-02 1.791E-02 1.911E-02 2.031E-02 2.153E-02 2.275E-02 2.397E-02 2.519E-02 2.640E-02 2.760E-02 2.878E-02 2.995E-02 3.109E-02 3.221E-02 3.330E-02 3.436E-02 3.539E-02 3.638E-02 3.733E-02 3.824E-02 3.910E-02 3.992E-02 4.069E-02 4.141E-02 4.208E-02 4.270E-02 4.327E-02 4.378E-02 4.424E-02 4.464E-02 4.499E-02 4.529E-02 4.553E-02 4.572E-02 4.585E-02 4.594E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.562E-02 4.542E-02 4.518E-02 4.489E-02 4.458E-02 4.422E-02 4.383E-02 4.341E-02 4.296E-02 4.248E-02 4.198E-02 4.146E-02 4.091E-02 4.035E-02 3.977E-02 3.918E-02 3.858E-02 3.796E-02 3.735E-02 3.672E-02 3.609E-02 3.546E-02 3.483E-02 3.421E-02 3.358E-02 3.296E-02 3.235E-02 3.175E-02 3.115E-02 3.057E-02 3.000E-02 2.944E-02 2.890E-02 2.837E-02 2.786E-02 2.736E-02 2.688E-02 2.642E-02 2.598E-02 2.555E-02 2.515E-02 2.477E-02 2.440E-02 2.406E-02 2.374E-02 2.344E-02 2.316E-02 2.290E-02 2.267E-02 2.245E-02 2.226E-02 2.210E-02 2.195E-02 2.183E-02 2.172E-02 2.164E-02 2.159E-02 2.155E-02 2.154E-02 2.155E-02 2.159E-02 2.164E-02 2.172E-02 2.183E-02 2.195E-02 2.210E-02 2.226E-02 2.245E-02 2.267E-02 2.290E-02 2.316E-02 2.344E-02 2.374E-02 2.406E-02 2.440E-02 2.477E-02 2.515E-02 2.555E-02 2.598E-02 2.642E-02 2.688E-02 2.736E-02 2.786E-02 2.837E-02 2.890E-02 2.944E-02 3.000E-02 3.057E-02 3.115E-02 3.175E-02 3.235E-02 3.296E-02 3.358E-02 3.421E-02 3.483E-02 3.546E-02 3.609E-02 3.672E-02 3.735E-02 3.796E-02 3.858E-02 3.918E-02 3.977E-02 4.035E-02 4.091E-02 4.146E-02 4.198E-02 4.248E-02 4.296E-02 4.341E-02 4.383E-02 4.422E-02 4.458E-02 4.489E-02 4.518E-02 4.542E-02 4.562E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.594E-02 4.585E-02 4.572E-02 4.553E-02 4.529E-02 4.499E-02 4.464E-02 4.424E-02 4.378E-02 4.327E-02 4.270E-02 4.208E-02 4.141E-02 4.069E-02 3.992E-02 3.910E-02 3.824E-02 3.733E-02 3.638E-02 3.539E-02 3.436E-02 3.330E-02 3.221E-02 3.109E-02 2.995E-02 2.878E-02 2.760E-02 2.640E-02 2.519E-02 2.397E-02 2.275E-02 2.153E-02 2.031E-02 1.911E-02 1.791E-02 1.673E-02 1.556E-02 1.442E-02 1.331E-02 1.222E-02 1.117E-02 1.015E-02 9.170E-03 8.231E-03 7.335E-03 6.484E-03 5.682E-03 4.928E-03 4.226E-03 3.576E-03 2.980E-03 2.438E-03 1.951E-03 1.519E-03 1.142E-03 8.203E-04 5.532E-04 3.399E-04 1.795E-04 7.067E-05 1.206E-05 1.956E-06 3.847E-05 1.195E-04 2.428E-04 5.812E-04 3.863E-04 2.283E-04 1.099E-04 3.344E-05 1.016E-06 1.469E-05 7.626E-05 1.873E-04 3.493E-04 5.633E-04 8.303E-04 1.151E-03 1.526E-03 1.955E-03 2.438E-03 2.975E-03 3.565E-03 4.208E-03 4.902E-03 5.646E-03 6.439E-03 7.278E-03 8.162E-03 9.088E-03 1.005E-02 1.106E-02 1.210E-02 1.317E-02 1.427E-02 1.539E-02 1.654E-02 1.770E-02 1.888E-02 2.007E-02 2.127E-02 2.247E-02 2.368E-02 2.488E-02 2.608E-02 2.726E-02 2.843E-02 2.959E-02 3.072E-02 3.183E-02 3.292E-02 3.397E-02 3.499E-02 3.598E-02 3.693E-02 3.784E-02 3.871E-02 3.953E-02 4.031E-02 4.104E-02 4.173E-02 4.236E-02 4.294E-02 4.348E-02 4.396E-02 4.439E-02 4.476E-02 4.509E-02 4.536E-02 4.558E-02 4.575E-02 4.587E-02 4.595E-02 4.597E-02 4.595E-02 4.588E-02 4.577E-02 4.562E-02 4.543E-02 4.519E-02 4.492E-02 4.462E-02 4.429E-02 4.392E-02 4.352E-02 4.310E-02 4.266E-02 4.219E-02 4.170E-02 4.119E-02 4.067E-02 4.013E-02 3.958E-02 3.903E-02 3.846E-02 3.789E-02 3.731E-02 3.674E-02 3.616E-02 3.558E-02 3.501E-02 3.444E-02 3.387E-02 3.332E-02 3.277E-02 3.223E-02 3.170E-02 3.118E-02 3.068E-02 3.019E-02 2.972E-02 2.926E-02 2.882E-02 2.839E-02 2.798E-02 2.759E-02 2.722E-02 2.687E-02 2.654E-02 2.622E-02 2.593E-02 2.566E-02 2.541E-02 2.518E-02 2.497E-02 2.479E-02 2.462E-02 2.448E-02 2.436E-02 2.426E-02 2.418E-02 2.413E-02 2.409E-02 2.408E-02 2.409E-02 2.413E-02 2.418E-02 2.426E-02 2.436E-02 2.448E-02 2.462E-02 2.479E-02 2.497E-02 2.518E-02 2.541E-02 2.566E-02 2.593E-02 2.622E-02 2.654E-02 2.687E-02 2.722E-02 2.759E-02 2.798E-02 2.839E-02 2.882E-02 2.926E-02 2.972E-02 3.019E-02 3.068E-02 3.118E-02 3.170E-02 3.223E-02 3.277E-02 3.332E-02 3.387E-02 3.444E-02 3.501E-02 3.558E-02 3.616E-02 3.674E-02 3.731E-02 3.789E-02 3.846E-02 3.903E-02 3.958E-02 4.013E-02 4.067E-02 4.119E-02 4.170E-02 4.219E-02 4.266E-02 4.310E-02 4.352E-02 4.392E-02 4.429E-02 4.462E-02 4.492E-02 4.519E-02 4.543E-02 4.562E-02 4.577E-02 4.588E-02 4.595E-02 4.597E-02 4.595E-02 4.587E-02 4.575E-02 4.558E-02 4.536E-02 4.509E-02 4.476E-02 4.439E-02 4.396E-02 4.348E-02 4.294E-02 4.236E-02 4.173E-02 4.104E-02 4.031E-02 3.953E-02 3.871E-02 3.784E-02 3.693E-02 3.598E-02 3.499E-02 3.397E-02 3.292E-02 3.183E-02 3.072E-02 2.959E-02 2.843E-02 2.726E-02 2.608E-02 2.488E-02 2.368E-02 2.247E-02 2.127E-02 2.007E-02 1.888E-02 1.770E-02 1.654E-02 1.539E-02 1.427E-02 1.317E-02 1.210E-02 1.106E-02 1.005E-02 9.088E-03 8.162E-03 7.278E-03 6.439E-03 5.646E-03 4.902E-03 4.208E-03 3.565E-03 2.975E-03 2.438E-03 1.955E-03 1.526E-03 1.151E-03 8.303E-04 5.633E-04 3.493E-04 1.873E-04 7.626E-05 1.469E-05 1.016E-06 3.344E-05 1.099E-04 2.283E-04 3.863E-04 7.841E-04 5.598E-04 3.697E-04 2.164E-04 1.022E-04 2.957E-05 4.832E-07 1.691E-05 8.059E-05 1.931E-04 3.556E-04 5.694E-04 8.353E-04 1.154E-03 1.526E-03 1.951E-03 2.429E-03 2.960E-03 3.543E-03 4.177E-03 4.862E-03 5.596E-03 6.378E-03 7.205E-03 8.076E-03 8.988E-03 9.940E-03 1.093E-02 1.195E-02 1.300E-02 1.409E-02 1.519E-02 1.632E-02 1.747E-02 1.863E-02 1.981E-02 2.099E-02 2.217E-02 2.336E-02 2.455E-02 2.573E-02 2.690E-02 2.806E-02 2.920E-02 3.032E-02 3.143E-02 3.250E-02 3.355E-02 3.457E-02 3.555E-02 3.650E-02 3.741E-02 3.829E-02 3.912E-02 3.990E-02 4.065E-02 4.134E-02 4.199E-02 4.259E-02 4.314E-02 4.364E-02 4.410E-02 4.450E-02 4.485E-02 4.516E-02 4.541E-02 4.562E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.595E-02 4.588E-02 4.578E-02 4.563E-02 4.545E-02 4.523E-02 4.498E-02 4.470E-02 4.438E-02 4.404E-02 4.368E-02 4.328E-02 4.287E-02 4.244E-02 4.199E-02 4.152E-02 4.104E-02 4.054E-02 4.004E-02 3.953E-02 3.901E-02 3.849E-02 3.796E-02 3.744E-02 3.691E-02 3.639E-02 3.587E-02 3.535E-02 3.484E-02 3.434E-02 3.385E-02 3.336E-02 3.289E-02 3.243E-02 3.198E-02 3.155E-02 3.113E-02 3.072E-02 3.033E-02 2.996E-02 2.961E-02 2.927E-02 2.895E-02 2.865E-02 2.837E-02 2.811E-02 2.787E-02 2.765E-02 2.744E-02 2.726E-02 2.710E-02 2.697E-02 2.685E-02 2.675E-02 2.668E-02 2.662E-02 2.659E-02 2.658E-02 2.659E-02 2.662E-02 2.668E-02 2.675E-02 2.685E-02 2.697E-02 2.710E-02 2.726E-02 2.744E-02 2.765E-02 2.787E-02 2.811E-02 2.837E-02 2.865E-02 2.895E-02 2.927E-02 2.961E-02 2.996E-02 3.033E-02 3.072E-02 3.113E-02 3.155E-02 3.198E-02 3.243E-02 3.289E-02 3.336E-02 3.385E-02 3.434E-02 3.484E-02 3.535E-02 3.587E-02 3.639E-02 3.691E-02 3.744E-02 3.796E-02 3.849E-02 3.901E-02 3.953E-02 4.004E-02 4.054E-02 4.104E-02 4.152E-02 4.199E-02 4.244E-02 4.287E-02 4.328E-02 4.368E-02 4.404E-02 4.438E-02 4.470E-02 4.498E-02 4.523E-02 4.545E-02 4.563E-02 4.578E-02 4.588E-02 4.595E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.562E-02 4.541E-02 4.516E-02 4.485E-02 4.450E-02 4.410E-02 4.364E-02 4.314E-02 4.259E-02 4.199E-02 4.134E-02 4.065E-02 3.990E-02 3.912E-02 3.829E-02 3.741E-02 3.650E-02 3.555E-02 3.457E-02 3.355E-02 3.250E-02 3.143E-02 3.032E-02 2.920E-02 2.806E-02 2.690E-02 2.573E-02 2.455E-02 2.336E-02 2.217E-02 2.099E-02 1.981E-02 1.863E-02 1.747E-02 1.632E-02 1.519E-02 1.409E-02 1.300E-02 1.195E-02 1.093E-02 9.940E-03 8.988E-03 8.076E-03 7.205E-03 6.378E-03 5.596E-03 4.862E-03 4.177E-03 3.543E-03 2.960E-03 2.429E-03 1.951E-03 1.526E-03 1.154E-03 8.353E-04 5.694E-04 3.556E-04 1.931E-04 8.059E-05 1.691E-05 4.832E-07 2.957E-05 1.022E-04 2.164E-04 3.697E-04 5.598E-04 1.013E-03 7.617E-04 5.419E-04 3.562E-04 2.068E-04 9.628E-05 2.673E-05 2.117E-07 1.859E-05 8.354E-05 1.965E-04 3.588E-04 5.715E-04 8.353E-04 1.151E-03 1.519E-03 1.939E-03 2.411E-03 2.935E-03 3.510E-03 4.135E-03 4.810E-03 5.533E-03 6.302E-03 7.116E-03 7.973E-03 8.871E-03 9.807E-03 1.078E-02 1.179E-02 1.282E-02 1.389E-02 1.497E-02 1.609E-02 1.721E-02 1.836E-02 1.951E-02 2.068E-02 2.185E-02 2.302E-02 2.419E-02 2.535E-02 2.651E-02 2.766E-02 2.879E-02 2.990E-02 3.099E-02 3.206E-02 3.310E-02 3.412E-02 3.510E-02 3.605E-02 3.696E-02 3.783E-02 3.867E-02 3.946E-02 4.022E-02 4.092E-02 4.159E-02 4.220E-02 4.277E-02 4.330E-02 4.377E-02 4.420E-02 4.458E-02 4.492E-02 4.520E-02 4.544E-02 4.564E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.595E-02 4.589E-02 4.579E-02 4.566E-02 4.549E-02 4.529E-02 4.506E-02 4.480E-02 4.451E-02 4.420E-02 4.386E-02 4.350E-02 4.312E-02 4.273E-02 4.232E-02 4.189E-02 4.145E-02 4.100E-02 4.054E-02 4.008E-02 3.961E-02 3.914E-02 3.866E-02 3.819E-02 3.772E-02 3.724E-02 3.678E-02 3.631E-02 3.586E-02 3.541E-02 3.497E-02 3.454E-02 3.413E-02 3.372E-02 3.333E-02 3.295E-02 3.258E-02 3.223E-02 3.189E-02 3.157E-02 3.127E-02 3.099E-02 3.072E-02 3.047E-02 3.024E-02 3.003E-02 2.984E-02 2.967E-02 2.951E-02 2.938E-02 2.927E-02 2.918E-02 2.910E-02 2.905E-02 2.902E-02 2.901E-02 2.902E-02 2.905E-02 2.910E-02 2.918E-02 2.927E-02 2.938E-02 2.951E-02 2.967E-02 2.984E-02 3.003E-02 3.024E-02 3.047E-02 3.072E-02 3.099E-02 3.127E-02 3.157E-02 3.189E-02 3.223E-02 3.258E-02 3.295E-02 3.333E-02 3.372E-02 3.413E-02 3.454E-02 3.497E-02 3.541E-02 3.586E-02 3.631E-02 3.678E-02 3.724E-02 3.772E-02 3.819E-02 3.866E-02 3.914E-02 3.961E-02 4.008E-02 4.054E-02 4.100E-02 4.145E-02 4.189E-02 4.232E-02 4.273E-02 4.312E-02 4.350E-02 4.386E-02 4.420E-02 4.451E-02 4.480E-02 4.506E-02 4.529E-02 4.549E-02 4.566E-02 4.579E-02 4.589E-02 4.595E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.564E-02 4.544E-02 4.520E-02 4.492E-02 4.458E-02 4.420E-02 4.377E-02 4.330E-02 4.277E-02 4.220E-02 4.159E-02 4.092E-02 4.022E-02 3.946E-02 3.867E-02 3.783E-02 3.696E-02 3.605E-02 3.510E-02 3.412E-02 3.310E-02 3.206E-02 3.099E-02 2.990E-02 2.879E-02 2.766E-02 2.651E-02 2.535E-02 2.419E-02 2.302E-02 2.185E-02 2.068E-02 1.951E-02 1.836E-02 1.721E-02 1.609E-02 1.497E-02 1.389E-02 1.282E-02 1.179E-02 1.078E-02 9.807E-03 8.871E-03 7.973E-03 7.116E-03 6.302E-03 5.533E-03 4.810E-03 4.135E-03 3.510E-03 2.935E-03 2.411E-03 1.939E-03 1.519E-03 1.151E-03 8.353E-04 5.715E-04 3.588E-04 1.965E-04 8.354E-05 1.859E-05 2.117E-07 2.673E-05 9.628E-05 2.068E-04 3.562E-04 5.419E-04 7.617E-04 1.265E-03 9.900E-04 7.432E-04 5.275E-04 3.455E-04 1.995E-04 9.192E-05 2.478E-05 9.200E-08 1.964E-05 8.504E-05 1.977E-04 3.588E-04 5.694E-04 8.303E-04 1.142E-03 1.505E-03 1.919E-03 2.384E-03 2.900E-03 3.466E-03 4.081E-03 4.745E-03 5.456E-03 6.212E-03 7.012E-03 7.854E-03 8.737E-03 9.657E-03 1.061E-02 1.160E-02 1.262E-02 1.366E-02 1.473E-02 1.583E-02 1.694E-02 1.806E-02 1.920E-02 2.035E-02 2.150E-02 2.265E-02 2.381E-02 2.495E-02 2.610E-02 2.723E-02 2.835E-02 2.945E-02 3.053E-02 3.159E-02 3.262E-02 3.363E-02 3.461E-02 3.556E-02 3.647E-02 3.735E-02 3.819E-02 3.899E-02 3.975E-02 4.047E-02 4.115E-02 4.178E-02 4.237E-02 4.291E-02 4.341E-02 4.386E-02 4.427E-02 4.463E-02 4.495E-02 4.523E-02 4.545E-02 4.564E-02 4.578E-02 4.589E-02 4.595E-02 4.597E-02 4.596E-02 4.591E-02 4.582E-02 4.570E-02 4.555E-02 4.537E-02 4.516E-02 4.492E-02 4.466E-02 4.438E-02 4.408E-02 4.375E-02 4.341E-02 4.305E-02 4.268E-02 4.230E-02 4.190E-02 4.150E-02 4.109E-02 4.067E-02 4.025E-02 3.983E-02 3.940E-02 3.898E-02 3.856E-02 3.814E-02 3.772E-02 3.731E-02 3.691E-02 3.652E-02 3.613E-02 3.576E-02 3.539E-02 3.504E-02 3.470E-02 3.437E-02 3.406E-02 3.376E-02 3.348E-02 3.321E-02 3.296E-02 3.273E-02 3.251E-02 3.231E-02 3.213E-02 3.197E-02 3.183E-02 3.170E-02 3.159E-02 3.151E-02 3.144E-02 3.139E-02 3.136E-02 3.135E-02 3.136E-02 3.139E-02 3.144E-02 3.151E-02 3.159E-02 3.170E-02 3.183E-02 3.197E-02 3.213E-02 3.231E-02 3.251E-02 3.273E-02 3.296E-02 3.321E-02 3.348E-02 3.376E-02 3.406E-02 3.437E-02 3.470E-02 3.504E-02 3.539E-02 3.576E-02 3.613E-02 3.652E-02 3.691E-02 3.731E-02 3.772E-02 3.814E-02 3.856E-02 3.898E-02 3.940E-02 3.983E-02 4.025E-02 4.067E-02 4.109E-02 4.150E-02 4.190E-02 4.230E-02 4.268E-02 4.305E-02 4.341E-02 4.375E-02 4.408E-02 4.438E-02 4.466E-02 4.492E-02 4.516E-02 4.537E-02 4.555E-02 4.570E-02 4.582E-02 4.591E-02 4.596E-02 4.597E-02 4.595E-02 4.589E-02 4.578E-02 4.564E-02 4.545E-02 4.523E-02 4.495E-02 4.463E-02 4.427E-02 4.386E-02 4.341E-02 4.291E-02 4.237E-02 4.178E-02 4.115E-02 4.047E-02 3.975E-02 3.899E-02 3.819E-02 3.735E-02 3.647E-02 3.556E-02 3.461E-02 3.363E-02 3.262E-02 3.159E-02 3.053E-02 2.945E-02 2.835E-02 2.723E-02 2.610E-02 2.495E-02 2.381E-02 2.265E-02 2.150E-02 2.035E-02 1.920E-02 1.806E-02 1.694E-02 1.583E-02 1.473E-02 1.366E-02 1.262E-02 1.160E-02 1.061E-02 9.657E-03 8.737E-03 7.854E-03 7.012E-03 6.212E-03 5.456E-03 4.745E-03 4.081E-03 3.466E-03 2.900E-03 2.384E-03 1.919E-03 1.505E-03 1.142E-03 8.303E-04 5.694E-04 3.588E-04 1.977E-04 8.504E-05 1.964E-05 9.200E-08 2.478E-05 9.192E-05 1.995E-04 3.455E-04 5.275E-04 7.432E-04 9.900E-04 1.540E-03 1.243E-03 9.715E-04 7.285E-04 5.164E-04 3.376E-04 1.944E-04 8.907E-05 2.365E-05 5.057E-08 2.000E-05 8.504E-05 1.965E-04 3.556E-04 5.633E-04 8.203E-04 1.127E-03 1.484E-03 1.891E-03 2.348E-03 2.855E-03 3.411E-03 4.016E-03 4.667E-03 5.365E-03 6.108E-03 6.893E-03 7.720E-03 8.586E-03 9.488E-03 1.043E-02 1.140E-02 1.240E-02 1.342E-02 1.447E-02 1.555E-02 1.664E-02 1.774E-02 1.886E-02 1.999E-02 2.112E-02 2.226E-02 2.340E-02 2.453E-02 2.565E-02 2.677E-02 2.788E-02 2.897E-02 3.004E-02 3.109E-02 3.212E-02 3.312E-02 3.410E-02 3.504E-02 3.596E-02 3.684E-02 3.768E-02 3.849E-02 3.926E-02 3.999E-02 4.067E-02 4.132E-02 4.193E-02 4.249E-02 4.301E-02 4.349E-02 4.392E-02 4.431E-02 4.466E-02 4.496E-02 4.523E-02 4.545E-02 4.563E-02 4.577E-02 4.587E-02 4.594E-02 4.597E-02 4.596E-02 4.592E-02 4.585E-02 4.575E-02 4.562E-02 4.546E-02 4.528E-02 4.507E-02 4.484E-02 4.458E-02 4.431E-02 4.402E-02 4.372E-02 4.340E-02 4.307E-02 4.273E-02 4.238E-02 4.202E-02 4.165E-02 4.128E-02 4.091E-02 4.054E-02 4.016E-02 3.979E-02 3.942E-02 3.905E-02 3.869E-02 3.834E-02 3.799E-02 3.765E-02 3.731E-02 3.699E-02 3.668E-02 3.638E-02 3.609E-02 3.582E-02 3.556E-02 3.531E-02 3.508E-02 3.486E-02 3.466E-02 3.447E-02 3.430E-02 3.415E-02 3.402E-02 3.390E-02 3.380E-02 3.372E-02 3.365E-02 3.361E-02 3.358E-02 3.357E-02 3.358E-02 3.361E-02 3.365E-02 3.372E-02 3.380E-02 3.390E-02 3.402E-02 3.415E-02 3.430E-02 3.447E-02 3.466E-02 3.486E-02 3.508E-02 3.531E-02 3.556E-02 3.582E-02 3.609E-02 3.638E-02 3.668E-02 3.699E-02 3.731E-02 3.765E-02 3.799E-02 3.834E-02 3.869E-02 3.905E-02 3.942E-02 3.979E-02 4.016E-02 4.054E-02 4.091E-02 4.128E-02 4.165E-02 4.202E-02 4.238E-02 4.273E-02 4.307E-02 4.340E-02 4.372E-02 4.402E-02 4.431E-02 4.458E-02 4.484E-02 4.507E-02 4.528E-02 4.546E-02 4.562E-02 4.575E-02 4.585E-02 4.592E-02 4.596E-02 4.597E-02 4.594E-02 4.587E-02 4.577E-02 4.563E-02 4.545E-02 4.523E-02 4.496E-02 4.466E-02 4.431E-02 4.392E-02 4.349E-02 4.301E-02 4.249E-02 4.193E-02 4.132E-02 4.067E-02 3.999E-02 3.926E-02 3.849E-02 3.768E-02 3.684E-02 3.596E-02 3.504E-02 3.410E-02 3.312E-02 3.212E-02 3.109E-02 3.004E-02 2.897E-02 2.788E-02 2.677E-02 2.565E-02 2.453E-02 2.340E-02 2.226E-02 2.112E-02 1.999E-02 1.886E-02 1.774E-02 1.664E-02 1.555E-02 1.447E-02 1.342E-02 1.240E-02 1.140E-02 1.043E-02 9.488E-03 8.586E-03 7.720E-03 6.893E-03 6.108E-03 5.365E-03 4.667E-03 4.016E-03 3.411E-03 2.855E-03 2.348E-03 1.891E-03 1.484E-03 1.127E-03 8.203E-04 5.633E-04 3.556E-04 1.965E-04 8.504E-05 2.000E-05 5.057E-08 2.365E-05 8.907E-05 1.944E-04 3.376E-04 5.164E-04 7.285E-04 9.715E-04 1.243E-03 1.834E-03 1.518E-03 1.225E-03 9.572E-04 7.176E-04 5.085E-04 3.324E-04 1.913E-04 8.765E-05 2.328E-05 5.057E-08 1.964E-05 8.354E-05 1.931E-04 3.493E-04 5.532E-04 8.054E-04 1.106E-03 1.457E-03 1.856E-03 2.304E-03 2.801E-03 3.347E-03 3.939E-03 4.578E-03 5.262E-03 5.989E-03 6.759E-03 7.569E-03 8.418E-03 9.303E-03 1.022E-02 1.117E-02 1.215E-02 1.316E-02 1.419E-02 1.525E-02 1.632E-02 1.740E-02 1.850E-02 1.961E-02 2.072E-02 2.184E-02 2.296E-02 2.408E-02 2.519E-02 2.629E-02 2.738E-02 2.846E-02 2.952E-02 3.056E-02 3.158E-02 3.258E-02 3.355E-02 3.449E-02 3.541E-02 3.629E-02 3.713E-02 3.795E-02 3.872E-02 3.946E-02 4.016E-02 4.083E-02 4.145E-02 4.203E-02 4.257E-02 4.307E-02 4.353E-02 4.394E-02 4.432E-02 4.466E-02 4.495E-02 4.521E-02 4.543E-02 4.561E-02 4.575E-02 4.585E-02 4.593E-02 4.596E-02 4.597E-02 4.594E-02 4.589E-02 4.581E-02 4.570E-02 4.556E-02 4.540E-02 4.522E-02 4.502E-02 4.480E-02 4.457E-02 4.431E-02 4.405E-02 4.377E-02 4.348E-02 4.318E-02 4.287E-02 4.256E-02 4.224E-02 4.192E-02 4.159E-02 4.127E-02 4.094E-02 4.062E-02 4.030E-02 3.998E-02 3.967E-02 3.937E-02 3.907E-02 3.878E-02 3.850E-02 3.823E-02 3.796E-02 3.772E-02 3.748E-02 3.725E-02 3.704E-02 3.684E-02 3.666E-02 3.649E-02 3.633E-02 3.619E-02 3.607E-02 3.596E-02 3.587E-02 3.579E-02 3.573E-02 3.569E-02 3.567E-02 3.566E-02 3.567E-02 3.569E-02 3.573E-02 3.579E-02 3.587E-02 3.596E-02 3.607E-02 3.619E-02 3.633E-02 3.649E-02 3.666E-02 3.684E-02 3.704E-02 3.725E-02 3.748E-02 3.772E-02 3.796E-02 3.823E-02 3.850E-02 3.878E-02 3.907E-02 3.937E-02 3.967E-02 3.998E-02 4.030E-02 4.062E-02 4.094E-02 4.127E-02 4.159E-02 4.192E-02 4.224E-02 4.256E-02 4.287E-02 4.318E-02 4.348E-02 4.377E-02 4.405E-02 4.431E-02 4.457E-02 4.480E-02 4.502E-02 4.522E-02 4.540E-02 4.556E-02 4.570E-02 4.581E-02 4.589E-02 4.594E-02 4.597E-02 4.596E-02 4.593E-02 4.585E-02 4.575E-02 4.561E-02 4.543E-02 4.521E-02 4.495E-02 4.466E-02 4.432E-02 4.394E-02 4.353E-02 4.307E-02 4.257E-02 4.203E-02 4.145E-02 4.083E-02 4.016E-02 3.946E-02 3.872E-02 3.795E-02 3.713E-02 3.629E-02 3.541E-02 3.449E-02 3.355E-02 3.258E-02 3.158E-02 3.056E-02 2.952E-02 2.846E-02 2.738E-02 2.629E-02 2.519E-02 2.408E-02 2.296E-02 2.184E-02 2.072E-02 1.961E-02 1.850E-02 1.740E-02 1.632E-02 1.525E-02 1.419E-02 1.316E-02 1.215E-02 1.117E-02 1.022E-02 9.303E-03 8.418E-03 7.569E-03 6.759E-03 5.989E-03 5.262E-03 4.578E-03 3.939E-03 3.347E-03 2.801E-03 2.304E-03 1.856E-03 1.457E-03 1.106E-03 8.054E-04 5.532E-04 3.493E-04 1.931E-04 8.354E-05 1.964E-05 5.057E-08 2.328E-05 8.765E-05 1.913E-04 3.324E-04 5.085E-04 7.176E-04 9.572E-04 1.225E-03 1.518E-03 2.145E-03 1.813E-03 1.501E-03 1.212E-03 9.471E-04 7.104E-04 5.038E-04 3.298E-04 1.903E-04 8.765E-05 2.365E-05 9.200E-08 1.859E-05 8.059E-05 1.873E-04 3.399E-04 5.391E-04 7.858E-04 1.080E-03 1.423E-03 1.813E-03 2.252E-03 2.738E-03 3.272E-03 3.852E-03 4.477E-03 5.146E-03 5.858E-03 6.611E-03 7.404E-03 8.235E-03 9.102E-03 1.000E-02 1.093E-02 1.189E-02 1.288E-02 1.389E-02 1.492E-02 1.597E-02 1.704E-02 1.812E-02 1.921E-02 2.030E-02 2.140E-02 2.250E-02 2.360E-02 2.469E-02 2.578E-02 2.686E-02 2.792E-02 2.897E-02 3.001E-02 3.102E-02 3.201E-02 3.297E-02 3.391E-02 3.482E-02 3.571E-02 3.656E-02 3.737E-02 3.816E-02 3.890E-02 3.962E-02 4.029E-02 4.093E-02 4.153E-02 4.209E-02 4.261E-02 4.309E-02 4.353E-02 4.393E-02 4.430E-02 4.463E-02 4.492E-02 4.517E-02 4.538E-02 4.556E-02 4.571E-02 4.582E-02 4.590E-02 4.595E-02 4.597E-02 4.596E-02 4.593E-02 4.586E-02 4.578E-02 4.567E-02 4.554E-02 4.538E-02 4.521E-02 4.503E-02 4.483E-02 4.461E-02 4.438E-02 4.414E-02 4.389E-02 4.363E-02 4.337E-02 4.310E-02 4.283E-02 4.255E-02 4.227E-02 4.200E-02 4.172E-02 4.145E-02 4.117E-02 4.091E-02 4.064E-02 4.039E-02 4.014E-02 3.990E-02 3.967E-02 3.944E-02 3.923E-02 3.903E-02 3.884E-02 3.866E-02 3.849E-02 3.834E-02 3.820E-02 3.807E-02 3.796E-02 3.786E-02 3.778E-02 3.771E-02 3.765E-02 3.762E-02 3.759E-02 3.758E-02 3.759E-02 3.762E-02 3.765E-02 3.771E-02 3.778E-02 3.786E-02 3.796E-02 3.807E-02 3.820E-02 3.834E-02 3.849E-02 3.866E-02 3.884E-02 3.903E-02 3.923E-02 3.944E-02 3.967E-02 3.990E-02 4.014E-02 4.039E-02 4.064E-02 4.091E-02 4.117E-02 4.145E-02 4.172E-02 4.200E-02 4.227E-02 4.255E-02 4.283E-02 4.310E-02 4.337E-02 4.363E-02 4.389E-02 4.414E-02 4.438E-02 4.461E-02 4.483E-02 4.503E-02 4.521E-02 4.538E-02 4.554E-02 4.567E-02 4.578E-02 4.586E-02 4.593E-02 4.596E-02 4.597E-02 4.595E-02 4.590E-02 4.582E-02 4.571E-02 4.556E-02 4.538E-02 4.517E-02 4.492E-02 4.463E-02 4.430E-02 4.393E-02 4.353E-02 4.309E-02 4.261E-02 4.209E-02 4.153E-02 4.093E-02 4.029E-02 3.962E-02 3.890E-02 3.816E-02 3.737E-02 3.656E-02 3.571E-02 3.482E-02 3.391E-02 3.297E-02 3.201E-02 3.102E-02 3.001E-02 2.897E-02 2.792E-02 2.686E-02 2.578E-02 2.469E-02 2.360E-02 2.250E-02 2.140E-02 2.030E-02 1.921E-02 1.812E-02 1.704E-02 1.597E-02 1.492E-02 1.389E-02 1.288E-02 1.189E-02 1.093E-02 1.000E-02 9.102E-03 8.235E-03 7.404E-03 6.611E-03 5.858E-03 5.146E-03 4.477E-03 3.852E-03 3.272E-03 2.738E-03 2.252E-03 1.813E-03 1.423E-03 1.080E-03 7.858E-04 5.391E-04 3.399E-04 1.873E-04 8.059E-05 1.859E-05 9.200E-08 2.365E-05 8.765E-05 1.903E-04 3.298E-04 5.038E-04 7.104E-04 9.471E-04 1.212E-03 1.501E-03 1.813E-03 2.473E-03 2.127E-03 1.798E-03 1.489E-03 1.203E-03 9.410E-04 7.068E-04 5.023E-04 3.298E-04 1.913E-04 8.907E-05 2.478E-05 2.117E-07 1.691E-05 7.626E-05 1.795E-04 3.276E-04 5.214E-04 7.616E-04 1.049E-03 1.383E-03 1.764E-03 2.192E-03 2.667E-03 3.188E-03 3.754E-03 4.364E-03 5.018E-03 5.714E-03 6.450E-03 7.225E-03 8.037E-03 8.884E-03 9.765E-03 1.068E-02 1.162E-02 1.258E-02 1.357E-02 1.458E-02 1.561E-02 1.666E-02 1.771E-02 1.878E-02 1.986E-02 2.094E-02 2.202E-02 2.310E-02 2.418E-02 2.525E-02 2.631E-02 2.736E-02 2.840E-02 2.942E-02 3.042E-02 3.141E-02 3.237E-02 3.330E-02 3.421E-02 3.509E-02 3.594E-02 3.676E-02 3.755E-02 3.831E-02 3.903E-02 3.972E-02 4.037E-02 4.098E-02 4.156E-02 4.210E-02 4.260E-02 4.307E-02 4.350E-02 4.389E-02 4.425E-02 4.457E-02 4.485E-02 4.510E-02 4.532E-02 4.550E-02 4.566E-02 4.578E-02 4.587E-02 4.593E-02 4.596E-02 4.597E-02 4.595E-02 4.591E-02 4.585E-02 4.577E-02 4.566E-02 4.554E-02 4.540E-02 4.525E-02 4.508E-02 4.490E-02 4.471E-02 4.451E-02 4.430E-02 4.409E-02 4.386E-02 4.364E-02 4.341E-02 4.318E-02 4.295E-02 4.271E-02 4.248E-02 4.225E-02 4.203E-02 4.181E-02 4.159E-02 4.138E-02 4.118E-02 4.098E-02 4.080E-02 4.062E-02 4.045E-02 4.029E-02 4.015E-02 4.001E-02 3.988E-02 3.977E-02 3.967E-02 3.958E-02 3.951E-02 3.945E-02 3.940E-02 3.937E-02 3.935E-02 3.934E-02 3.935E-02 3.937E-02 3.940E-02 3.945E-02 3.951E-02 3.958E-02 3.967E-02 3.977E-02 3.988E-02 4.001E-02 4.015E-02 4.029E-02 4.045E-02 4.062E-02 4.080E-02 4.098E-02 4.118E-02 4.138E-02 4.159E-02 4.181E-02 4.203E-02 4.225E-02 4.248E-02 4.271E-02 4.295E-02 4.318E-02 4.341E-02 4.364E-02 4.386E-02 4.409E-02 4.430E-02 4.451E-02 4.471E-02 4.490E-02 4.508E-02 4.525E-02 4.540E-02 4.554E-02 4.566E-02 4.577E-02 4.585E-02 4.591E-02 4.595E-02 4.597E-02 4.596E-02 4.593E-02 4.587E-02 4.578E-02 4.566E-02 4.550E-02 4.532E-02 4.510E-02 4.485E-02 4.457E-02 4.425E-02 4.389E-02 4.350E-02 4.307E-02 4.260E-02 4.210E-02 4.156E-02 4.098E-02 4.037E-02 3.972E-02 3.903E-02 3.831E-02 3.755E-02 3.676E-02 3.594E-02 3.509E-02 3.421E-02 3.330E-02 3.237E-02 3.141E-02 3.042E-02 2.942E-02 2.840E-02 2.736E-02 2.631E-02 2.525E-02 2.418E-02 2.310E-02 2.202E-02 2.094E-02 1.986E-02 1.878E-02 1.771E-02 1.666E-02 1.561E-02 1.458E-02 1.357E-02 1.258E-02 1.162E-02 1.068E-02 9.765E-03 8.884E-03 8.037E-03 7.225E-03 6.450E-03 5.714E-03 5.018E-03 4.364E-03 3.754E-03 3.188E-03 2.667E-03 2.192E-03 1.764E-03 1.383E-03 1.049E-03 7.616E-04 5.214E-04 3.276E-04 1.795E-04 7.626E-05 1.691E-05 2.117E-07 2.478E-05 8.907E-05 1.913E-04 3.298E-04 5.023E-04 7.068E-04 9.410E-04 1.203E-03 1.489E-03 1.798E-03 2.127E-03 2.813E-03 2.456E-03 2.113E-03 1.788E-03 1.482E-03 1.198E-03 9.390E-04 7.068E-04 5.038E-04 3.324E-04 1.944E-04 9.192E-05 2.673E-05 4.832E-07 1.469E-05 7.067E-05 1.696E-04 3.125E-04 5.001E-04 7.331E-04 1.012E-03 1.337E-03 1.708E-03 2.124E-03 2.587E-03 3.094E-03 3.646E-03 4.241E-03 4.879E-03 5.557E-03 6.276E-03 7.032E-03 7.825E-03 8.652E-03 9.512E-03 1.040E-02 1.132E-02 1.226E-02 1.323E-02 1.422E-02 1.523E-02 1.625E-02 1.729E-02 1.833E-02 1.939E-02 2.045E-02 2.151E-02 2.257E-02 2.363E-02 2.469E-02 2.573E-02 2.677E-02 2.780E-02 2.881E-02 2.980E-02 3.077E-02 3.173E-02 3.266E-02 3.356E-02 3.444E-02 3.530E-02 3.612E-02 3.691E-02 3.767E-02 3.840E-02 3.910E-02 3.976E-02 4.039E-02 4.099E-02 4.154E-02 4.207E-02 4.256E-02 4.301E-02 4.343E-02 4.381E-02 4.416E-02 4.448E-02 4.476E-02 4.501E-02 4.523E-02 4.542E-02 4.558E-02 4.571E-02 4.581E-02 4.589E-02 4.594E-02 4.597E-02 4.597E-02 4.595E-02 4.591E-02 4.586E-02 4.578E-02 4.569E-02 4.558E-02 4.546E-02 4.533E-02 4.518E-02 4.503E-02 4.487E-02 4.470E-02 4.452E-02 4.434E-02 4.416E-02 4.397E-02 4.378E-02 4.359E-02 4.340E-02 4.321E-02 4.303E-02 4.285E-02 4.267E-02 4.250E-02 4.233E-02 4.217E-02 4.202E-02 4.187E-02 4.174E-02 4.161E-02 4.149E-02 4.138E-02 4.128E-02 4.120E-02 4.112E-02 4.106E-02 4.100E-02 4.096E-02 4.093E-02 4.091E-02 4.091E-02 4.091E-02 4.093E-02 4.096E-02 4.100E-02 4.106E-02 4.112E-02 4.120E-02 4.128E-02 4.138E-02 4.149E-02 4.161E-02 4.174E-02 4.187E-02 4.202E-02 4.217E-02 4.233E-02 4.250E-02 4.267E-02 4.285E-02 4.303E-02 4.321E-02 4.340E-02 4.359E-02 4.378E-02 4.397E-02 4.416E-02 4.434E-02 4.452E-02 4.470E-02 4.487E-02 4.503E-02 4.518E-02 4.533E-02 4.546E-02 4.558E-02 4.569E-02 4.578E-02 4.586E-02 4.591E-02 4.595E-02 4.597E-02 4.597E-02 4.594E-02 4.589E-02 4.581E-02 4.571E-02 4.558E-02 4.542E-02 4.523E-02 4.501E-02 4.476E-02 4.448E-02 4.416E-02 4.381E-02 4.343E-02 4.301E-02 4.256E-02 4.207E-02 4.154E-02 4.099E-02 4.039E-02 3.976E-02 3.910E-02 3.840E-02 3.767E-02 3.691E-02 3.612E-02 3.530E-02 3.444E-02 3.356E-02 3.266E-02 3.173E-02 3.077E-02 2.980E-02 2.881E-02 2.780E-02 2.677E-02 2.573E-02 2.469E-02 2.363E-02 2.257E-02 2.151E-02 2.045E-02 1.939E-02 1.833E-02 1.729E-02 1.625E-02 1.523E-02 1.422E-02 1.323E-02 1.226E-02 1.132E-02 1.040E-02 9.512E-03 8.652E-03 7.825E-03 7.032E-03 6.276E-03 5.557E-03 4.879E-03 4.241E-03 3.646E-03 3.094E-03 2.587E-03 2.124E-03 1.708E-03 1.337E-03 1.012E-03 7.331E-04 5.001E-04 3.125E-04 1.696E-04 7.067E-05 1.469E-05 4.832E-07 2.673E-05 9.192E-05 1.944E-04 3.324E-04 5.038E-04 7.068E-04 9.390E-04 1.198E-03 1.482E-03 1.788E-03 2.113E-03 2.456E-03 3.164E-03 2.799E-03 2.445E-03 2.106E-03 1.783E-03 1.480E-03 1.198E-03 9.410E-04 7.104E-04 5.085E-04 3.376E-04 1.995E-04 9.628E-05 2.957E-05 1.016E-06 1.206E-05 6.401E-05 1.580E-04 2.949E-04 4.756E-04 7.007E-04 9.705E-04 1.285E-03 1.645E-03 2.050E-03 2.499E-03 2.992E-03 3.529E-03 4.108E-03 4.729E-03 5.389E-03 6.089E-03 6.826E-03 7.599E-03 8.405E-03 9.244E-03 1.011E-02 1.101E-02 1.193E-02 1.288E-02 1.384E-02 1.483E-02 1.583E-02 1.684E-02 1.787E-02 1.890E-02 1.994E-02 2.098E-02 2.202E-02 2.307E-02 2.410E-02 2.513E-02 2.616E-02 2.717E-02 2.816E-02 2.915E-02 3.011E-02 3.106E-02 3.198E-02 3.288E-02 3.376E-02 3.461E-02 3.544E-02 3.623E-02 3.700E-02 3.774E-02 3.844E-02 3.912E-02 3.976E-02 4.037E-02 4.094E-02 4.148E-02 4.199E-02 4.247E-02 4.291E-02 4.332E-02 4.370E-02 4.405E-02 4.436E-02 4.464E-02 4.490E-02 4.512E-02 4.531E-02 4.548E-02 4.562E-02 4.574E-02 4.583E-02 4.590E-02 4.594E-02 4.597E-02 4.597E-02 4.596E-02 4.593E-02 4.588E-02 4.582E-02 4.574E-02 4.565E-02 4.555E-02 4.544E-02 4.532E-02 4.520E-02 4.506E-02 4.492E-02 4.478E-02 4.464E-02 4.449E-02 4.434E-02 4.419E-02 4.404E-02 4.390E-02 4.375E-02 4.361E-02 4.347E-02 4.334E-02 4.321E-02 4.309E-02 4.298E-02 4.287E-02 4.277E-02 4.268E-02 4.260E-02 4.252E-02 4.246E-02 4.240E-02 4.236E-02 4.232E-02 4.230E-02 4.228E-02 4.227E-02 4.228E-02 4.230E-02 4.232E-02 4.236E-02 4.240E-02 4.246E-02 4.252E-02 4.260E-02 4.268E-02 4.277E-02 4.287E-02 4.298E-02 4.309E-02 4.321E-02 4.334E-02 4.347E-02 4.361E-02 4.375E-02 4.390E-02 4.404E-02 4.419E-02 4.434E-02 4.449E-02 4.464E-02 4.478E-02 4.492E-02 4.506E-02 4.520E-02 4.532E-02 4.544E-02 4.555E-02 4.565E-02 4.574E-02 4.582E-02 4.588E-02 4.593E-02 4.596E-02 4.597E-02 4.597E-02 4.594E-02 4.590E-02 4.583E-02 4.574E-02 4.562E-02 4.548E-02 4.531E-02 4.512E-02 4.490E-02 4.464E-02 4.436E-02 4.405E-02 4.370E-02 4.332E-02 4.291E-02 4.247E-02 4.199E-02 4.148E-02 4.094E-02 4.037E-02 3.976E-02 3.912E-02 3.844E-02 3.774E-02 3.700E-02 3.623E-02 3.544E-02 3.461E-02 3.376E-02 3.288E-02 3.198E-02 3.106E-02 3.011E-02 2.915E-02 2.816E-02 2.717E-02 2.616E-02 2.513E-02 2.410E-02 2.307E-02 2.202E-02 2.098E-02 1.994E-02 1.890E-02 1.787E-02 1.684E-02 1.583E-02 1.483E-02 1.384E-02 1.288E-02 1.193E-02 1.101E-02 1.011E-02 9.244E-03 8.405E-03 7.599E-03 6.826E-03 6.089E-03 5.389E-03 4.729E-03 4.108E-03 3.529E-03 2.992E-03 2.499E-03 2.050E-03 1.645E-03 1.285E-03 9.705E-04 7.007E-04 4.756E-04 2.949E-04 1.580E-04 6.401E-05 1.206E-05 1.016E-06 2.957E-05 9.628E-05 1.995E-04 3.376E-04 5.085E-04 7.104E-04 9.410E-04 1.198E-03 1.480E-03 1.783E-03 2.106E-03 2.445E-03 2.799E-03 3.524E-03 3.153E-03 2.790E-03 2.440E-03 2.103E-03 1.783E-03 1.482E-03 1.203E-03 9.471E-04 7.176E-04 5.164E-04 3.455E-04 2.068E-04 1.022E-04 3.344E-05 1.956E-06 9.211E-06 5.645E-05 1.448E-04 2.751E-04 4.481E-04 6.645E-04 9.246E-04 1.229E-03 1.577E-03 1.969E-03 2.404E-03 2.882E-03 3.403E-03 3.965E-03 4.568E-03 5.210E-03 5.891E-03 6.608E-03 7.359E-03 8.145E-03 8.961E-03 9.807E-03 1.068E-02 1.158E-02 1.250E-02 1.344E-02 1.441E-02 1.538E-02 1.638E-02 1.738E-02 1.839E-02 1.941E-02 2.043E-02 2.145E-02 2.247E-02 2.349E-02 2.451E-02 2.551E-02 2.651E-02 2.750E-02 2.847E-02 2.942E-02 3.036E-02 3.127E-02 3.217E-02 3.304E-02 3.389E-02 3.472E-02 3.552E-02 3.629E-02 3.703E-02 3.774E-02 3.843E-02 3.908E-02 3.970E-02 4.029E-02 4.085E-02 4.138E-02 4.187E-02 4.234E-02 4.277E-02 4.318E-02 4.355E-02 4.389E-02 4.420E-02 4.449E-02 4.474E-02 4.497E-02 4.518E-02 4.535E-02 4.551E-02 4.563E-02 4.574E-02 4.583E-02 4.589E-02 4.593E-02 4.596E-02 4.597E-02 4.597E-02 4.594E-02 4.591E-02 4.586E-02 4.581E-02 4.574E-02 4.566E-02 4.558E-02 4.548E-02 4.539E-02 4.528E-02 4.518E-02 4.507E-02 4.496E-02 4.485E-02 4.473E-02 4.462E-02 4.451E-02 4.440E-02 4.430E-02 4.420E-02 4.410E-02 4.401E-02 4.392E-02 4.384E-02 4.377E-02 4.370E-02 4.364E-02 4.359E-02 4.354E-02 4.350E-02 4.347E-02 4.345E-02 4.344E-02 4.343E-02 4.344E-02 4.345E-02 4.347E-02 4.350E-02 4.354E-02 4.359E-02 4.364E-02 4.370E-02 4.377E-02 4.384E-02 4.392E-02 4.401E-02 4.410E-02 4.420E-02 4.430E-02 4.440E-02 4.451E-02 4.462E-02 4.473E-02 4.485E-02 4.496E-02 4.507E-02 4.518E-02 4.528E-02 4.539E-02 4.548E-02 4.558E-02 4.566E-02 4.574E-02 4.581E-02 4.586E-02 4.591E-02 4.594E-02 4.597E-02 4.597E-02 4.596E-02 4.593E-02 4.589E-02 4.583E-02 4.574E-02 4.563E-02 4.551E-02 4.535E-02 4.518E-02 4.497E-02 4.474E-02 4.449E-02 4.420E-02 4.389E-02 4.355E-02 4.318E-02 4.277E-02 4.234E-02 4.187E-02 4.138E-02 4.085E-02 4.029E-02 3.970E-02 3.908E-02 3.843E-02 3.774E-02 3.703E-02 3.629E-02 3.552E-02 3.472E-02 3.389E-02 3.304E-02 3.217E-02 3.127E-02 3.036E-02 2.942E-02 2.847E-02 2.750E-02 2.651E-02 2.551E-02 2.451E-02 2.349E-02 2.247E-02 2.145E-02 2.043E-02 1.941E-02 1.839E-02 1.738E-02 1.638E-02 1.538E-02 1.441E-02 1.344E-02 1.250E-02 1.158E-02 1.068E-02 9.807E-03 8.961E-03 8.145E-03 7.359E-03 6.608E-03 5.891E-03 5.210E-03 4.568E-03 3.965E-03 3.403E-03 2.882E-03 2.404E-03 1.969E-03 1.577E-03 1.229E-03 9.246E-04 6.645E-04 4.481E-04 2.751E-04 1.448E-04 5.645E-05 9.211E-06 1.956E-06 3.344E-05 1.022E-04 2.068E-04 3.455E-04 5.164E-04 7.176E-04 9.471E-04 1.203E-03 1.482E-03 1.783E-03 2.103E-03 2.440E-03 2.790E-03 3.153E-03 3.891E-03 3.516E-03 3.147E-03 2.787E-03 2.440E-03 2.106E-03 1.788E-03 1.489E-03 1.212E-03 9.572E-04 7.285E-04 5.275E-04 3.562E-04 2.164E-04 1.099E-04 3.847E-05 3.484E-06 6.341E-06 4.826E-05 1.303E-04 2.533E-04 4.181E-04 6.251E-04 8.748E-04 1.167E-03 1.503E-03 1.881E-03 2.302E-03 2.765E-03 3.269E-03 3.814E-03 4.398E-03 5.021E-03 5.682E-03 6.378E-03 7.108E-03 7.871E-03 8.665E-03 9.488E-03 1.034E-02 1.121E-02 1.211E-02 1.303E-02 1.397E-02 1.492E-02 1.589E-02 1.687E-02 1.786E-02 1.886E-02 1.986E-02 2.086E-02 2.186E-02 2.286E-02 2.386E-02 2.485E-02 2.583E-02 2.680E-02 2.776E-02 2.870E-02 2.963E-02 3.054E-02 3.143E-02 3.229E-02 3.314E-02 3.396E-02 3.476E-02 3.553E-02 3.628E-02 3.700E-02 3.769E-02 3.835E-02 3.899E-02 3.959E-02 4.016E-02 4.071E-02 4.122E-02 4.171E-02 4.216E-02 4.259E-02 4.299E-02 4.336E-02 4.370E-02 4.401E-02 4.430E-02 4.456E-02 4.479E-02 4.500E-02 4.519E-02 4.535E-02 4.550E-02 4.562E-02 4.572E-02 4.580E-02 4.587E-02 4.592E-02 4.595E-02 4.597E-02 4.597E-02 4.596E-02 4.595E-02 4.592E-02 4.588E-02 4.583E-02 4.578E-02 4.572E-02 4.565E-02 4.558E-02 4.551E-02 4.543E-02 4.536E-02 4.528E-02 4.520E-02 4.512E-02 4.504E-02 4.497E-02 4.489E-02 4.483E-02 4.476E-02 4.470E-02 4.464E-02 4.459E-02 4.454E-02 4.450E-02 4.446E-02 4.443E-02 4.441E-02 4.439E-02 4.438E-02 4.438E-02 4.438E-02 4.439E-02 4.441E-02 4.443E-02 4.446E-02 4.450E-02 4.454E-02 4.459E-02 4.464E-02 4.470E-02 4.476E-02 4.483E-02 4.489E-02 4.497E-02 4.504E-02 4.512E-02 4.520E-02 4.528E-02 4.536E-02 4.543E-02 4.551E-02 4.558E-02 4.565E-02 4.572E-02 4.578E-02 4.583E-02 4.588E-02 4.592E-02 4.595E-02 4.596E-02 4.597E-02 4.597E-02 4.595E-02 4.592E-02 4.587E-02 4.580E-02 4.572E-02 4.562E-02 4.550E-02 4.535E-02 4.519E-02 4.500E-02 4.479E-02 4.456E-02 4.430E-02 4.401E-02 4.370E-02 4.336E-02 4.299E-02 4.259E-02 4.216E-02 4.171E-02 4.122E-02 4.071E-02 4.016E-02 3.959E-02 3.899E-02 3.835E-02 3.769E-02 3.700E-02 3.628E-02 3.553E-02 3.476E-02 3.396E-02 3.314E-02 3.229E-02 3.143E-02 3.054E-02 2.963E-02 2.870E-02 2.776E-02 2.680E-02 2.583E-02 2.485E-02 2.386E-02 2.286E-02 2.186E-02 2.086E-02 1.986E-02 1.886E-02 1.786E-02 1.687E-02 1.589E-02 1.492E-02 1.397E-02 1.303E-02 1.211E-02 1.121E-02 1.034E-02 9.488E-03 8.665E-03 7.871E-03 7.108E-03 6.378E-03 5.682E-03 5.021E-03 4.398E-03 3.814E-03 3.269E-03 2.765E-03 2.302E-03 1.881E-03 1.503E-03 1.167E-03 8.748E-04 6.251E-04 4.181E-04 2.533E-04 1.303E-04 4.826E-05 6.341E-06 3.484E-06 3.847E-05 1.099E-04 2.164E-04 3.562E-04 5.275E-04 7.285E-04 9.572E-04 1.212E-03 1.489E-03 1.788E-03 2.106E-03 2.440E-03 2.787E-03 3.147E-03 3.516E-03 4.261E-03 3.885E-03 3.513E-03 3.147E-03 2.790E-03 2.445E-03 2.113E-03 1.798E-03 1.501E-03 1.225E-03 9.715E-04 7.432E-04 5.419E-04 3.697E-04 2.283E-04 1.195E-04 4.486E-05 5.812E-06 3.699E-06 3.969E-05 1.148E-04 2.299E-04 3.858E-04 5.828E-04 8.215E-04 1.102E-03 1.424E-03 1.789E-03 2.194E-03 2.641E-03 3.128E-03 3.654E-03 4.220E-03 4.823E-03 5.463E-03 6.137E-03 6.846E-03 7.586E-03 8.357E-03 9.157E-03 9.983E-03 1.083E-02 1.171E-02 1.260E-02 1.352E-02 1.445E-02 1.539E-02 1.635E-02 1.731E-02 1.828E-02 1.926E-02 2.024E-02 2.123E-02 2.221E-02 2.318E-02 2.416E-02 2.512E-02 2.608E-02 2.702E-02 2.795E-02 2.887E-02 2.977E-02 3.065E-02 3.151E-02 3.235E-02 3.317E-02 3.397E-02 3.474E-02 3.549E-02 3.622E-02 3.691E-02 3.758E-02 3.822E-02 3.884E-02 3.943E-02 3.999E-02 4.052E-02 4.102E-02 4.149E-02 4.194E-02 4.236E-02 4.275E-02 4.312E-02 4.346E-02 4.377E-02 4.406E-02 4.433E-02 4.457E-02 4.479E-02 4.498E-02 4.516E-02 4.531E-02 4.545E-02 4.557E-02 4.567E-02 4.575E-02 4.582E-02 4.588E-02 4.592E-02 4.595E-02 4.596E-02 4.597E-02 4.597E-02 4.596E-02 4.594E-02 4.591E-02 4.588E-02 4.585E-02 4.581E-02 4.576E-02 4.572E-02 4.567E-02 4.562E-02 4.557E-02 4.552E-02 4.547E-02 4.542E-02 4.538E-02 4.533E-02 4.529E-02 4.526E-02 4.522E-02 4.519E-02 4.517E-02 4.515E-02 4.513E-02 4.512E-02 4.511E-02 4.511E-02 4.511E-02 4.512E-02 4.513E-02 4.515E-02 4.517E-02 4.519E-02 4.522E-02 4.526E-02 4.529E-02 4.533E-02 4.538E-02 4.542E-02 4.547E-02 4.552E-02 4.557E-02 4.562E-02 4.567E-02 4.572E-02 4.576E-02 4.581E-02 4.585E-02 4.588E-02 4.591E-02 4.594E-02 4.596E-02 4.597E-02 4.597E-02 4.596E-02 4.595E-02 4.592E-02 4.588E-02 4.582E-02 4.575E-02 4.567E-02 4.557E-02 4.545E-02 4.531E-02 4.516E-02 4.498E-02 4.479E-02 4.457E-02 4.433E-02 4.406E-02 4.377E-02 4.346E-02 4.312E-02 4.275E-02 4.236E-02 4.194E-02 4.149E-02 4.102E-02 4.052E-02 3.999E-02 3.943E-02 3.884E-02 3.822E-02 3.758E-02 3.691E-02 3.622E-02 3.549E-02 3.474E-02 3.397E-02 3.317E-02 3.235E-02 3.151E-02 3.065E-02 2.977E-02 2.887E-02 2.795E-02 2.702E-02 2.608E-02 2.512E-02 2.416E-02 2.318E-02 2.221E-02 2.123E-02 2.024E-02 1.926E-02 1.828E-02 1.731E-02 1.635E-02 1.539E-02 1.445E-02 1.352E-02 1.260E-02 1.171E-02 1.083E-02 9.983E-03 9.157E-03 8.357E-03 7.586E-03 6.846E-03 6.137E-03 5.463E-03 4.823E-03 4.220E-03 3.654E-03 3.128E-03 2.641E-03 2.194E-03 1.789E-03 1.424E-03 1.102E-03 8.215E-04 5.828E-04 3.858E-04 2.299E-04 1.148E-04 3.969E-05 3.699E-06 5.812E-06 4.486E-05 1.195E-04 2.283E-04 3.697E-04 5.419E-04 7.432E-04 9.715E-04 1.225E-03 1.501E-03 1.798E-03 2.113E-03 2.445E-03 2.790E-03 3.147E-03 3.513E-03 3.885E-03 4.634E-03 4.258E-03 3.885E-03 3.516E-03 3.153E-03 2.799E-03 2.456E-03 2.127E-03 1.813E-03 1.518E-03 1.243E-03 9.900E-04 7.617E-04 5.598E-04 3.863E-04 2.428E-04 1.312E-04 5.282E-05 9.190E-06 1.565E-06 3.108E-05 9.874E-05 2.054E-04 3.517E-04 5.381E-04 7.652E-04 1.033E-03 1.342E-03 1.691E-03 2.081E-03 2.511E-03 2.980E-03 3.488E-03 4.033E-03 4.616E-03 5.234E-03 5.887E-03 6.573E-03 7.290E-03 8.037E-03 8.813E-03 9.614E-03 1.044E-02 1.129E-02 1.216E-02 1.305E-02 1.395E-02 1.487E-02 1.580E-02 1.674E-02 1.769E-02 1.865E-02 1.961E-02 2.057E-02 2.153E-02 2.249E-02 2.344E-02 2.439E-02 2.533E-02 2.626E-02 2.717E-02 2.808E-02 2.897E-02 2.984E-02 3.069E-02 3.153E-02 3.235E-02 3.314E-02 3.391E-02 3.466E-02 3.539E-02 3.609E-02 3.676E-02 3.741E-02 3.804E-02 3.864E-02 3.921E-02 3.975E-02 4.027E-02 4.076E-02 4.123E-02 4.167E-02 4.208E-02 4.247E-02 4.283E-02 4.317E-02 4.349E-02 4.378E-02 4.405E-02 4.430E-02 4.452E-02 4.473E-02 4.492E-02 4.508E-02 4.523E-02 4.537E-02 4.548E-02 4.559E-02 4.567E-02 4.575E-02 4.581E-02 4.586E-02 4.590E-02 4.593E-02 4.595E-02 4.597E-02 4.597E-02 4.597E-02 4.597E-02 4.595E-02 4.594E-02 4.592E-02 4.590E-02 4.588E-02 4.585E-02 4.583E-02 4.580E-02 4.578E-02 4.575E-02 4.573E-02 4.571E-02 4.569E-02 4.567E-02 4.565E-02 4.564E-02 4.563E-02 4.562E-02 4.562E-02 4.561E-02 4.562E-02 4.562E-02 4.563E-02 4.564E-02 4.565E-02 4.567E-02 4.569E-02 4.571E-02 4.573E-02 4.575E-02 4.578E-02 4.580E-02 4.583E-02 4.585E-02 4.588E-02 4.590E-02 4.592E-02 4.594E-02 4.595E-02 4.597E-02 4.597E-02 4.597E-02 4.597E-02 4.595E-02 4.593E-02 4.590E-02 4.586E-02 4.581E-02 4.575E-02 4.567E-02 4.559E-02 4.548E-02 4.537E-02 4.523E-02 4.508E-02 4.492E-02 4.473E-02 4.452E-02 4.430E-02 4.405E-02 4.378E-02 4.349E-02 4.317E-02 4.283E-02 4.247E-02 4.208E-02 4.167E-02 4.123E-02 4.076E-02 4.027E-02 3.975E-02 3.921E-02 3.864E-02 3.804E-02 3.741E-02 3.676E-02 3.609E-02 3.539E-02 3.466E-02 3.391E-02 3.314E-02 3.235E-02 3.153E-02 3.069E-02 2.984E-02 2.897E-02 2.808E-02 2.717E-02 2.626E-02 2.533E-02 2.439E-02 2.344E-02 2.249E-02 2.153E-02 2.057E-02 1.961E-02 1.865E-02 1.769E-02 1.674E-02 1.580E-02 1.487E-02 1.395E-02 1.305E-02 1.216E-02 1.129E-02 1.044E-02 9.614E-03 8.813E-03 8.037E-03 7.290E-03 6.573E-03 5.887E-03 5.234E-03 4.616E-03 4.033E-03 3.488E-03 2.980E-03 2.511E-03 2.081E-03 1.691E-03 1.342E-03 1.033E-03 7.652E-04 5.381E-04 3.517E-04 2.054E-04 9.874E-05 3.108E-05 1.565E-06 9.190E-06 5.282E-05 1.312E-04 2.428E-04 3.863E-04 5.598E-04 7.617E-04 9.900E-04 1.243E-03 1.518E-03 1.813E-03 2.127E-03 2.456E-03 2.799E-03 3.153E-03 3.516E-03 3.885E-03 4.258E-03 ngraph-gtk-6.09.05/demo/demo6.dat0000644000175000017500000027525013070106167013322 00000000000000 40.0000 0.0000 1.000 42.8995 2.6990 1.000 45.4200 5.7379 1.000 47.3606 9.0345 1.000 48.5569 12.4673 1.000 48.8964 15.8874 1.000 48.3264 19.1338 1.000 46.8587 22.0500 1.000 44.5671 24.5010 1.000 41.5799 26.3874 1.000 38.0670 27.6573 1.000 34.2243 28.3128 1.000 30.2551 28.4114 1.000 26.3523 28.0624 1.000 22.6811 27.4168 1.000 19.3655 26.6543 1.000 16.4787 25.9663 1.000 14.0393 25.5374 1.000 12.0123 25.5275 1.000 10.3162 26.0558 1.000 8.8340 27.1882 1.000 7.4279 28.9297 1.000 5.9560 31.2224 1.000 4.2888 33.9491 1.000 2.3242 36.9427 1.000 -0.0000 40.0000 1.000 -2.6990 42.8995 1.000 -5.7379 45.4200 1.000 -9.0345 47.3606 1.000 -12.4673 48.5569 1.000 -15.8874 48.8964 1.000 -19.1338 48.3264 1.000 -22.0500 46.8587 1.000 -24.5010 44.5671 1.000 -26.3874 41.5799 1.000 -27.6573 38.0670 1.000 -28.3128 34.2243 1.000 -28.4114 30.2551 1.000 -28.0624 26.3523 1.000 -27.4168 22.6811 1.000 -26.6543 19.3655 1.000 -25.9663 16.4787 1.000 -25.5374 14.0393 1.000 -25.5275 12.0123 1.000 -26.0558 10.3162 1.000 -27.1882 8.8340 1.000 -28.9297 7.4279 1.000 -31.2224 5.9560 1.000 -33.9491 4.2888 1.000 -36.9427 2.3242 1.000 -40.0000 -0.0000 1.000 -42.8995 -2.6990 1.000 -45.4200 -5.7379 1.000 -47.3606 -9.0345 1.000 -48.5569 -12.4673 1.000 -48.8964 -15.8874 1.000 -48.3264 -19.1338 1.000 -46.8587 -22.0500 1.000 -44.5671 -24.5010 1.000 -41.5799 -26.3874 1.000 -38.0670 -27.6573 1.000 -34.2243 -28.3128 1.000 -30.2551 -28.4114 1.000 -26.3523 -28.0624 1.000 -22.6811 -27.4168 1.000 -19.3655 -26.6543 1.000 -16.4787 -25.9663 1.000 -14.0393 -25.5374 1.000 -12.0123 -25.5275 1.000 -10.3162 -26.0558 1.000 -8.8340 -27.1882 1.000 -7.4279 -28.9297 1.000 -5.9560 -31.2224 1.000 -4.2888 -33.9491 1.000 -2.3242 -36.9427 1.000 -0.0000 -40.0000 1.000 2.6990 -42.8995 1.000 5.7379 -45.4200 1.000 9.0345 -47.3606 1.000 12.4673 -48.5569 1.000 15.8874 -48.8964 1.000 19.1338 -48.3264 1.000 22.0500 -46.8587 1.000 24.5010 -44.5671 1.000 26.3874 -41.5799 1.000 27.6573 -38.0670 1.000 28.3128 -34.2243 1.000 28.4114 -30.2551 1.000 28.0624 -26.3523 1.000 27.4168 -22.6811 1.000 26.6543 -19.3655 1.000 25.9663 -16.4787 1.000 25.5374 -14.0393 1.000 25.5275 -12.0123 1.000 26.0558 -10.3162 1.000 27.1882 -8.8340 1.000 28.9297 -7.4279 1.000 31.2224 -5.9560 1.000 33.9491 -4.2888 1.000 36.9427 -2.3242 1.000 = = = 40.0017 0.1250 0.975 42.7913 2.8093 0.975 45.1560 5.8137 0.975 46.9072 9.0492 0.975 47.8961 12.3905 0.975 48.0269 15.6893 0.975 47.2639 18.7886 0.975 45.6343 21.5401 0.975 43.2248 23.8193 0.975 40.1722 25.5397 0.975 36.6509 26.6626 0.975 32.8563 27.2027 0.975 28.9867 27.2279 0.975 25.2259 26.8548 0.975 21.7273 26.2376 0.975 18.6009 25.5548 0.975 15.9059 24.9917 0.975 13.6478 24.7229 0.975 11.7808 24.8949 0.975 10.2156 25.6111 0.975 8.8315 26.9209 0.975 7.4909 28.8133 0.975 6.0561 31.2167 0.975 4.4048 34.0033 0.975 2.4450 36.9997 0.975 0.1250 40.0017 0.975 -2.5593 42.7913 0.975 -5.5637 45.1560 0.975 -8.7992 46.9072 0.975 -12.1405 47.8961 0.975 -15.4393 48.0269 0.975 -18.5386 47.2639 0.975 -21.2901 45.6343 0.975 -23.5693 43.2248 0.975 -25.2897 40.1722 0.975 -26.4126 36.6509 0.975 -26.9527 32.8563 0.975 -26.9779 28.9867 0.975 -26.6048 25.2259 0.975 -25.9876 21.7273 0.975 -25.3048 18.6009 0.975 -24.7417 15.9059 0.975 -24.4729 13.6478 0.975 -24.6449 11.7808 0.975 -25.3611 10.2156 0.975 -26.6709 8.8315 0.975 -28.5633 7.4909 0.975 -30.9667 6.0561 0.975 -33.7533 4.4048 0.975 -36.7497 2.4450 0.975 -39.7517 0.1250 0.975 -42.5413 -2.5593 0.975 -44.9060 -5.5637 0.975 -46.6572 -8.7992 0.975 -47.6461 -12.1405 0.975 -47.7769 -15.4393 0.975 -47.0139 -18.5386 0.975 -45.3843 -21.2901 0.975 -42.9748 -23.5693 0.975 -39.9222 -25.2897 0.975 -36.4009 -26.4126 0.975 -32.6063 -26.9527 0.975 -28.7367 -26.9779 0.975 -24.9759 -26.6048 0.975 -21.4773 -25.9876 0.975 -18.3509 -25.3048 0.975 -15.6559 -24.7417 0.975 -13.3978 -24.4729 0.975 -11.5308 -24.6449 0.975 -9.9656 -25.3611 0.975 -8.5815 -26.6709 0.975 -7.2409 -28.5633 0.975 -5.8061 -30.9667 0.975 -4.1548 -33.7533 0.975 -2.1950 -36.7497 0.975 0.1250 -39.7517 0.975 2.8093 -42.5413 0.975 5.8137 -44.9060 0.975 9.0492 -46.6572 0.975 12.3905 -47.6461 0.975 15.6893 -47.7769 0.975 18.7886 -47.0139 0.975 21.5401 -45.3843 0.975 23.8193 -42.9748 0.975 25.5397 -39.9222 0.975 26.6626 -36.4009 0.975 27.2027 -32.6063 0.975 27.2279 -28.7367 0.975 26.8548 -24.9759 0.975 26.2376 -21.4773 0.975 25.5548 -18.3509 0.975 24.9917 -15.6559 0.975 24.7229 -13.3978 0.975 24.8949 -11.5308 0.975 25.6111 -9.9656 0.975 26.9209 -8.5815 0.975 28.8133 -7.2409 0.975 31.2167 -5.8061 0.975 34.0033 -4.1548 0.975 36.9997 -2.1950 0.975 = = = 39.9536 0.2500 0.950 42.6195 2.9157 0.950 44.8190 5.8804 0.950 46.3763 9.0491 0.950 47.1586 12.2941 0.950 47.0864 15.4681 0.950 46.1407 18.4194 0.950 44.3631 21.0081 0.950 41.8516 23.1207 0.950 38.7508 24.6833 0.950 35.2378 25.6701 0.950 31.5063 26.1074 0.950 27.7486 26.0729 0.950 24.1387 25.6889 0.950 20.8175 25.1118 0.950 17.8814 24.5175 0.950 15.3758 24.0844 0.950 13.2937 23.9764 0.950 11.5793 24.3260 0.950 10.1368 25.2212 0.950 8.8426 26.6952 0.950 7.5604 28.7221 0.950 6.1573 31.2173 0.950 4.5192 34.0440 0.950 2.5636 37.0241 0.950 0.2500 39.9536 0.950 -2.4157 42.6195 0.950 -5.3804 44.8190 0.950 -8.5491 46.3763 0.950 -11.7941 47.1586 0.950 -14.9681 47.0864 0.950 -17.9194 46.1407 0.950 -20.5081 44.3631 0.950 -22.6207 41.8516 0.950 -24.1833 38.7508 0.950 -25.1701 35.2378 0.950 -25.6074 31.5063 0.950 -25.5729 27.7486 0.950 -25.1889 24.1387 0.950 -24.6118 20.8175 0.950 -24.0175 17.8814 0.950 -23.5844 15.3758 0.950 -23.4764 13.2937 0.950 -23.8260 11.5793 0.950 -24.7212 10.1368 0.950 -26.1952 8.8426 0.950 -28.2221 7.5604 0.950 -30.7173 6.1573 0.950 -33.5440 4.5192 0.950 -36.5241 2.5636 0.950 -39.4536 0.2500 0.950 -42.1195 -2.4157 0.950 -44.3190 -5.3804 0.950 -45.8763 -8.5491 0.950 -46.6586 -11.7941 0.950 -46.5864 -14.9681 0.950 -45.6407 -17.9194 0.950 -43.8631 -20.5081 0.950 -41.3516 -22.6207 0.950 -38.2508 -24.1833 0.950 -34.7378 -25.1701 0.950 -31.0063 -25.6074 0.950 -27.2486 -25.5729 0.950 -23.6387 -25.1889 0.950 -20.3175 -24.6118 0.950 -17.3814 -24.0175 0.950 -14.8758 -23.5844 0.950 -12.7937 -23.4764 0.950 -11.0793 -23.8260 0.950 -9.6368 -24.7212 0.950 -8.3426 -26.1952 0.950 -7.0604 -28.2221 0.950 -5.6573 -30.7173 0.950 -4.0192 -33.5440 0.950 -2.0636 -36.5241 0.950 0.2500 -39.4536 0.950 2.9157 -42.1195 0.950 5.8804 -44.3190 0.950 9.0491 -45.8763 0.950 12.2941 -46.6586 0.950 15.4681 -46.5864 0.950 18.4194 -45.6407 0.950 21.0081 -43.8631 0.950 23.1207 -41.3516 0.950 24.6833 -38.2508 0.950 25.6701 -34.7378 0.950 26.1074 -31.0063 0.950 26.0729 -27.2486 0.950 25.6889 -23.6387 0.950 25.1118 -20.3175 0.950 24.5175 -17.3814 0.950 24.0844 -14.8758 0.950 23.9764 -12.7937 0.950 24.3260 -11.0793 0.950 25.2212 -9.6368 0.950 26.6952 -8.3426 0.950 28.7221 -7.0604 0.950 31.2173 -5.6573 0.950 34.0440 -4.0192 0.950 37.0241 -2.0636 0.950 = = = 39.8515 0.3750 0.925 42.3815 3.0178 0.925 44.4079 5.9376 0.925 45.7687 9.0343 0.925 46.3466 12.1785 0.925 46.0789 15.2251 0.925 44.9618 18.0282 0.925 43.0507 20.4567 0.925 40.4538 22.4085 0.925 37.3216 23.8220 0.925 33.8331 24.6837 0.925 30.1789 25.0310 0.925 26.5444 24.9497 0.925 23.0930 24.5672 0.925 19.9530 24.0407 0.925 17.2071 23.5424 0.925 14.8875 23.2430 0.925 12.9753 23.2949 0.925 11.4058 23.8167 0.925 10.0775 24.8808 0.925 8.8651 26.5049 0.925 7.6345 28.6491 0.925 6.2585 31.2172 0.925 4.6310 34.0647 0.925 2.6799 37.0104 0.925 0.3750 39.8515 0.925 -2.2678 42.3815 0.925 -5.1876 44.4079 0.925 -8.2843 45.7687 0.925 -11.4285 46.3466 0.925 -14.4751 46.0789 0.925 -17.2782 44.9618 0.925 -19.7067 43.0507 0.925 -21.6585 40.4538 0.925 -23.0720 37.3216 0.925 -23.9337 33.8331 0.925 -24.2810 30.1789 0.925 -24.1997 26.5444 0.925 -23.8172 23.0930 0.925 -23.2907 19.9530 0.925 -22.7924 17.2071 0.925 -22.4930 14.8875 0.925 -22.5449 12.9753 0.925 -23.0667 11.4058 0.925 -24.1308 10.0775 0.925 -25.7549 8.8651 0.925 -27.8991 7.6345 0.925 -30.4672 6.2585 0.925 -33.3147 4.6310 0.925 -36.2604 2.6799 0.925 -39.1015 0.3750 0.925 -41.6315 -2.2678 0.925 -43.6579 -5.1876 0.925 -45.0187 -8.2843 0.925 -45.5966 -11.4285 0.925 -45.3289 -14.4751 0.925 -44.2118 -17.2782 0.925 -42.3007 -19.7067 0.925 -39.7038 -21.6585 0.925 -36.5716 -23.0720 0.925 -33.0831 -23.9337 0.925 -29.4289 -24.2810 0.925 -25.7944 -24.1997 0.925 -22.3430 -23.8172 0.925 -19.2030 -23.2907 0.925 -16.4571 -22.7924 0.925 -14.1375 -22.4930 0.925 -12.2253 -22.5449 0.925 -10.6558 -23.0667 0.925 -9.3275 -24.1308 0.925 -8.1151 -25.7549 0.925 -6.8845 -27.8991 0.925 -5.5085 -30.4672 0.925 -3.8810 -33.3147 0.925 -1.9299 -36.2604 0.925 0.3750 -39.1015 0.925 3.0178 -41.6315 0.925 5.9376 -43.6579 0.925 9.0343 -45.0187 0.925 12.1785 -45.5966 0.925 15.2251 -45.3289 0.925 18.0282 -44.2118 0.925 20.4567 -42.3007 0.925 22.4085 -39.7038 0.925 23.8220 -36.5716 0.925 24.6837 -33.0831 0.925 25.0310 -29.4289 0.925 24.9497 -25.7944 0.925 24.5672 -22.3430 0.925 24.0407 -19.2030 0.925 23.5424 -16.4571 0.925 23.2430 -14.1375 0.925 23.2949 -12.2253 0.925 23.8167 -10.6558 0.925 24.8808 -9.3275 0.925 26.5049 -8.1151 0.925 28.6491 -6.8845 0.925 31.2172 -5.5085 0.925 34.0647 -3.8810 0.925 37.0104 -1.9299 0.925 = = = 39.6916 0.5000 0.900 42.0750 3.1157 0.900 43.9223 5.9855 0.900 45.0855 9.0051 0.900 45.4632 12.0446 0.900 45.0084 14.9617 0.900 43.7324 17.6169 0.900 41.7030 19.8886 0.900 39.0371 21.6860 0.900 35.8904 22.9594 0.900 32.4420 23.7072 0.900 28.8785 23.9768 0.900 25.3773 23.8613 0.900 22.0909 23.4920 0.900 19.1347 23.0254 0.900 16.5779 22.6293 0.900 14.4399 22.4658 0.900 12.6910 22.6753 0.900 11.2582 23.3623 0.900 10.0356 24.5841 0.900 8.8971 26.3436 0.900 7.7117 28.5876 0.900 6.3582 31.2099 0.900 4.7396 34.0595 0.900 2.7935 36.9534 0.900 0.5000 39.6916 0.900 -2.1157 42.0750 0.900 -4.9855 43.9223 0.900 -8.0051 45.0855 0.900 -11.0446 45.4632 0.900 -13.9617 45.0084 0.900 -16.6169 43.7324 0.900 -18.8886 41.7030 0.900 -20.6860 39.0371 0.900 -21.9594 35.8904 0.900 -22.7072 32.4420 0.900 -22.9768 28.8785 0.900 -22.8613 25.3773 0.900 -22.4920 22.0909 0.900 -22.0254 19.1347 0.900 -21.6293 16.5779 0.900 -21.4658 14.4399 0.900 -21.6753 12.6910 0.900 -22.3623 11.2582 0.900 -23.5841 10.0356 0.900 -25.3436 8.8971 0.900 -27.5876 7.7117 0.900 -30.2099 6.3582 0.900 -33.0595 4.7396 0.900 -35.9534 2.7935 0.900 -38.6916 0.5000 0.900 -41.0750 -2.1157 0.900 -42.9223 -4.9855 0.900 -44.0855 -8.0051 0.900 -44.4632 -11.0446 0.900 -44.0084 -13.9617 0.900 -42.7324 -16.6169 0.900 -40.7030 -18.8886 0.900 -38.0371 -20.6860 0.900 -34.8904 -21.9594 0.900 -31.4420 -22.7072 0.900 -27.8785 -22.9768 0.900 -24.3773 -22.8613 0.900 -21.0909 -22.4920 0.900 -18.1347 -22.0254 0.900 -15.5779 -21.6293 0.900 -13.4399 -21.4658 0.900 -11.6910 -21.6753 0.900 -10.2582 -22.3623 0.900 -9.0356 -23.5841 0.900 -7.8971 -25.3436 0.900 -6.7117 -27.5876 0.900 -5.3582 -30.2099 0.900 -3.7396 -33.0595 0.900 -1.7935 -35.9534 0.900 0.5000 -38.6916 0.900 3.1157 -41.0750 0.900 5.9855 -42.9223 0.900 9.0051 -44.0855 0.900 12.0446 -44.4632 0.900 14.9617 -44.0084 0.900 17.6169 -42.7324 0.900 19.8886 -40.7030 0.900 21.6860 -38.0371 0.900 22.9594 -34.8904 0.900 23.7072 -31.4420 0.900 23.9768 -27.8785 0.900 23.8613 -24.3773 0.900 23.4920 -21.0909 0.900 23.0254 -18.1347 0.900 22.6293 -15.5779 0.900 22.4658 -13.4399 0.900 22.6753 -11.6910 0.900 23.3623 -10.2582 0.900 24.5841 -9.0356 0.900 26.3436 -7.8971 0.900 28.5876 -6.7117 0.900 31.2099 -5.3582 0.900 34.0595 -3.7396 0.900 36.9534 -1.7935 0.900 = = = 39.4709 0.6250 0.875 41.6986 3.2091 0.875 43.3624 6.0240 0.875 44.3287 8.9619 0.875 44.5116 11.8932 0.875 43.8796 14.6793 0.875 42.4580 17.1879 0.875 40.3258 19.3068 0.875 37.6077 20.9564 0.875 34.4629 22.0992 0.875 31.0695 22.7442 0.875 27.6091 22.9482 0.875 24.2502 22.8105 0.875 21.1340 22.4648 0.875 18.3629 22.0665 0.875 15.9931 21.7774 0.875 14.0316 21.7504 0.875 12.4386 22.1138 0.875 11.1341 22.9580 0.875 10.0087 24.3254 0.875 8.9364 26.2049 0.875 7.7901 28.5312 0.875 6.4554 31.1891 0.875 4.8441 34.0228 0.875 2.9040 36.8486 0.875 0.6250 39.4709 0.875 -1.9591 41.6986 0.875 -4.7740 43.3624 0.875 -7.7119 44.3287 0.875 -10.6432 44.5116 0.875 -13.4293 43.8796 0.875 -15.9379 42.4580 0.875 -18.0568 40.3258 0.875 -19.7064 37.6077 0.875 -20.8492 34.4629 0.875 -21.4942 31.0695 0.875 -21.6982 27.6091 0.875 -21.5605 24.2502 0.875 -21.2148 21.1340 0.875 -20.8165 18.3629 0.875 -20.5274 15.9931 0.875 -20.5004 14.0316 0.875 -20.8638 12.4386 0.875 -21.7080 11.1341 0.875 -23.0754 10.0087 0.875 -24.9549 8.9364 0.875 -27.2812 7.7901 0.875 -29.9391 6.4554 0.875 -32.7728 4.8441 0.875 -35.5986 2.9040 0.875 -38.2209 0.6250 0.875 -40.4486 -1.9591 0.875 -42.1124 -4.7740 0.875 -43.0787 -7.7119 0.875 -43.2616 -10.6432 0.875 -42.6296 -13.4293 0.875 -41.2080 -15.9379 0.875 -39.0758 -18.0568 0.875 -36.3577 -19.7064 0.875 -33.2129 -20.8492 0.875 -29.8195 -21.4942 0.875 -26.3591 -21.6982 0.875 -23.0002 -21.5605 0.875 -19.8840 -21.2148 0.875 -17.1129 -20.8165 0.875 -14.7431 -20.5274 0.875 -12.7816 -20.5004 0.875 -11.1886 -20.8638 0.875 -9.8841 -21.7080 0.875 -8.7587 -23.0754 0.875 -7.6864 -24.9549 0.875 -6.5401 -27.2812 0.875 -5.2054 -29.9391 0.875 -3.5941 -32.7728 0.875 -1.6540 -35.5986 0.875 0.6250 -38.2209 0.875 3.2091 -40.4486 0.875 6.0240 -42.1124 0.875 8.9619 -43.0787 0.875 11.8932 -43.2616 0.875 14.6793 -42.6296 0.875 17.1879 -41.2080 0.875 19.3068 -39.0758 0.875 20.9564 -36.3577 0.875 22.0992 -33.2129 0.875 22.7442 -29.8195 0.875 22.9482 -26.3591 0.875 22.8105 -23.0002 0.875 22.4648 -19.8840 0.875 22.0665 -17.1129 0.875 21.7774 -14.7431 0.875 21.7504 -12.7816 0.875 22.1138 -11.1886 0.875 22.9580 -9.8841 0.875 24.3254 -8.7587 0.875 26.2049 -7.6864 0.875 28.5312 -6.5401 0.875 31.1891 -5.2054 0.875 34.0228 -3.5941 0.875 36.8486 -1.6540 0.875 = = = 39.1866 0.7500 0.850 41.2513 3.2981 0.850 42.7289 6.0532 0.850 43.5006 8.9051 0.850 43.4956 11.7252 0.850 42.6973 14.3795 0.850 41.1442 16.7432 0.850 38.9251 18.7139 0.850 36.1715 20.2232 0.850 33.0445 21.2447 0.850 29.7203 21.7981 0.850 26.3742 21.9482 0.850 23.1654 21.7995 0.850 20.2235 21.4871 0.850 17.6378 21.1639 0.850 15.4518 20.9852 0.850 13.6608 21.0942 0.850 12.2160 21.6066 0.850 11.0312 22.5987 0.850 9.9944 24.0987 0.850 8.9810 26.0823 0.850 7.8681 28.4733 0.850 6.5489 31.1488 0.850 4.9440 33.9493 0.850 3.0113 36.6921 0.850 0.7500 39.1866 0.850 -1.7981 41.2513 0.850 -4.5532 42.7289 0.850 -7.4051 43.5006 0.850 -10.2252 43.4956 0.850 -12.8795 42.6973 0.850 -15.2432 41.1442 0.850 -17.2139 38.9251 0.850 -18.7232 36.1715 0.850 -19.7447 33.0445 0.850 -20.2981 29.7203 0.850 -20.4482 26.3742 0.850 -20.2995 23.1654 0.850 -19.9871 20.2235 0.850 -19.6639 17.6378 0.850 -19.4852 15.4518 0.850 -19.5942 13.6608 0.850 -20.1066 12.2160 0.850 -21.0987 11.0312 0.850 -22.5987 9.9944 0.850 -24.5823 8.9810 0.850 -26.9733 7.8681 0.850 -29.6488 6.5489 0.850 -32.4493 4.9440 0.850 -35.1921 3.0113 0.850 -37.6866 0.7500 0.850 -39.7513 -1.7981 0.850 -41.2289 -4.5532 0.850 -42.0006 -7.4051 0.850 -41.9956 -10.2252 0.850 -41.1973 -12.8795 0.850 -39.6442 -15.2432 0.850 -37.4251 -17.2139 0.850 -34.6715 -18.7232 0.850 -31.5445 -19.7447 0.850 -28.2203 -20.2981 0.850 -24.8742 -20.4482 0.850 -21.6654 -20.2995 0.850 -18.7235 -19.9871 0.850 -16.1378 -19.6639 0.850 -13.9518 -19.4852 0.850 -12.1608 -19.5942 0.850 -10.7160 -20.1066 0.850 -9.5312 -21.0987 0.850 -8.4944 -22.5987 0.850 -7.4810 -24.5823 0.850 -6.3681 -26.9733 0.850 -5.0489 -29.6488 0.850 -3.4440 -32.4493 0.850 -1.5113 -35.1921 0.850 0.7500 -37.6866 0.850 3.2981 -39.7513 0.850 6.0532 -41.2289 0.850 8.9051 -42.0006 0.850 11.7252 -41.9956 0.850 14.3795 -41.1973 0.850 16.7432 -39.6442 0.850 18.7139 -37.4251 0.850 20.2232 -34.6715 0.850 21.2447 -31.5445 0.850 21.7981 -28.2203 0.850 21.9482 -24.8742 0.850 21.7995 -21.6654 0.850 21.4871 -18.7235 0.850 21.1639 -16.1378 0.850 20.9852 -13.9518 0.850 21.0942 -12.1608 0.850 21.6066 -10.7160 0.850 22.5987 -9.5312 0.850 24.0987 -8.4944 0.850 26.0823 -7.4810 0.850 28.4733 -6.3681 0.850 31.1488 -5.0489 0.850 33.9493 -3.4440 0.850 36.6921 -1.5113 0.850 = = = 38.8370 0.8750 0.825 40.7328 3.3826 0.825 42.0232 6.0732 0.825 42.6040 8.8352 0.825 42.4194 11.5418 0.825 41.4668 14.0641 0.825 39.7967 16.2852 0.825 37.5071 18.1128 0.825 34.7343 19.4893 0.825 31.6405 20.3994 0.825 28.3986 20.8721 0.825 25.1770 20.9794 0.825 22.1250 20.8301 0.825 19.3601 20.5596 0.825 16.9590 20.3172 0.825 14.9526 20.2512 0.825 13.3257 20.4941 0.825 12.0208 21.1491 0.825 10.9469 22.2789 0.825 9.9904 23.8979 0.825 9.0287 25.9695 0.825 7.9442 28.4076 0.825 6.6375 31.0831 0.825 5.0387 33.8342 0.825 3.1151 36.4803 0.825 0.8750 38.8370 0.825 -1.6326 40.7328 0.825 -4.3232 42.0232 0.825 -7.0852 42.6040 0.825 -9.7918 42.4194 0.825 -12.3141 41.4668 0.825 -14.5352 39.7967 0.825 -16.3628 37.5071 0.825 -17.7393 34.7343 0.825 -18.6494 31.6405 0.825 -19.1221 28.3986 0.825 -19.2294 25.1770 0.825 -19.0801 22.1250 0.825 -18.8096 19.3601 0.825 -18.5672 16.9590 0.825 -18.5012 14.9526 0.825 -18.7441 13.3257 0.825 -19.3991 12.0208 0.825 -20.5289 10.9469 0.825 -22.1479 9.9904 0.825 -24.2195 9.0287 0.825 -26.6576 7.9442 0.825 -29.3331 6.6375 0.825 -32.0842 5.0387 0.825 -34.7303 3.1151 0.825 -37.0870 0.8750 0.825 -38.9828 -1.6326 0.825 -40.2732 -4.3232 0.825 -40.8540 -7.0852 0.825 -40.6694 -9.7918 0.825 -39.7168 -12.3141 0.825 -38.0467 -14.5352 0.825 -35.7571 -16.3628 0.825 -32.9843 -17.7393 0.825 -29.8905 -18.6494 0.825 -26.6486 -19.1221 0.825 -23.4270 -19.2294 0.825 -20.3750 -19.0801 0.825 -17.6101 -18.8096 0.825 -15.2090 -18.5672 0.825 -13.2026 -18.5012 0.825 -11.5757 -18.7441 0.825 -10.2708 -19.3991 0.825 -9.1969 -20.5289 0.825 -8.2404 -22.1479 0.825 -7.2787 -24.2195 0.825 -6.1942 -26.6576 0.825 -4.8875 -29.3331 0.825 -3.2887 -32.0842 0.825 -1.3651 -34.7303 0.825 0.8750 -37.0870 0.825 3.3826 -38.9828 0.825 6.0732 -40.2732 0.825 8.8352 -40.8540 0.825 11.5418 -40.6694 0.825 14.0641 -39.7168 0.825 16.2852 -38.0467 0.825 18.1128 -35.7571 0.825 19.4893 -32.9843 0.825 20.3994 -29.8905 0.825 20.8721 -26.6486 0.825 20.9794 -23.4270 0.825 20.8301 -20.3750 0.825 20.5596 -17.6101 0.825 20.3172 -15.2090 0.825 20.2512 -13.2026 0.825 20.4941 -11.5757 0.825 21.1491 -10.2708 0.825 22.2789 -9.1969 0.825 23.8979 -8.2404 0.825 25.9695 -7.2787 0.825 28.4076 -6.1942 0.825 31.0831 -4.8875 0.825 33.8342 -3.2887 0.825 36.4803 -1.3651 0.825 = = = 38.4206 1.0000 0.800 40.1433 3.4627 0.800 41.2472 6.0844 0.800 41.6424 8.7529 0.800 41.2875 11.3441 0.800 40.1935 13.7347 0.800 38.4216 15.8163 0.800 36.0776 17.5063 0.800 33.3017 18.7580 0.800 30.2557 19.5663 0.800 27.1085 19.9689 0.800 24.0205 20.0442 0.800 21.1306 19.9039 0.800 18.5443 19.6828 0.800 16.3258 19.5257 0.800 14.4941 19.5730 0.800 13.0239 19.9466 0.800 11.8505 20.7370 0.800 10.8787 21.9933 0.800 9.9943 23.7170 0.800 9.0776 25.8603 0.800 8.0167 28.3283 0.800 6.7203 30.9869 0.800 5.1276 33.6734 0.800 3.2152 36.2102 0.800 1.0000 38.4206 0.800 -1.4627 40.1433 0.800 -4.0844 41.2472 0.800 -6.7529 41.6424 0.800 -9.3441 41.2875 0.800 -11.7347 40.1935 0.800 -13.8163 38.4216 0.800 -15.5063 36.0776 0.800 -16.7580 33.3017 0.800 -17.5663 30.2557 0.800 -17.9689 27.1085 0.800 -18.0442 24.0205 0.800 -17.9039 21.1306 0.800 -17.6828 18.5443 0.800 -17.5257 16.3258 0.800 -17.5730 14.4941 0.800 -17.9466 13.0239 0.800 -18.7370 11.8505 0.800 -19.9933 10.8787 0.800 -21.7170 9.9943 0.800 -23.8603 9.0776 0.800 -26.3283 8.0167 0.800 -28.9869 6.7203 0.800 -31.6734 5.1276 0.800 -34.2102 3.2152 0.800 -36.4206 1.0000 0.800 -38.1433 -1.4627 0.800 -39.2472 -4.0844 0.800 -39.6424 -6.7529 0.800 -39.2875 -9.3441 0.800 -38.1935 -11.7347 0.800 -36.4216 -13.8163 0.800 -34.0776 -15.5063 0.800 -31.3017 -16.7580 0.800 -28.2557 -17.5663 0.800 -25.1085 -17.9689 0.800 -22.0205 -18.0442 0.800 -19.1306 -17.9039 0.800 -16.5443 -17.6828 0.800 -14.3258 -17.5257 0.800 -12.4941 -17.5730 0.800 -11.0239 -17.9466 0.800 -9.8505 -18.7370 0.800 -8.8787 -19.9933 0.800 -7.9943 -21.7170 0.800 -7.0776 -23.8603 0.800 -6.0167 -26.3283 0.800 -4.7203 -28.9869 0.800 -3.1276 -31.6734 0.800 -1.2152 -34.2102 0.800 1.0000 -36.4206 0.800 3.4627 -38.1433 0.800 6.0844 -39.2472 0.800 8.7529 -39.6424 0.800 11.3441 -39.2875 0.800 13.7347 -38.1935 0.800 15.8163 -36.4216 0.800 17.5063 -34.0776 0.800 18.7580 -31.3017 0.800 19.5663 -28.2557 0.800 19.9689 -25.1085 0.800 20.0442 -22.0205 0.800 19.9039 -19.1306 0.800 19.6828 -16.5443 0.800 19.5257 -14.3258 0.800 19.5730 -12.4941 0.800 19.9466 -11.0239 0.800 20.7370 -9.8505 0.800 21.9933 -8.8787 0.800 23.7170 -7.9943 0.800 25.8603 -7.0776 0.800 28.3283 -6.0167 0.800 30.9869 -4.7203 0.800 33.6734 -3.1276 0.800 36.2102 -1.2152 0.800 = = = 37.9365 1.1250 0.775 39.4838 3.5383 0.775 40.4033 6.0870 0.775 40.6195 8.6590 0.775 40.1049 11.1333 0.775 38.8830 13.3933 0.775 37.0247 15.3387 0.775 34.6425 16.8971 0.775 31.8791 18.0322 0.775 28.8949 18.7483 0.775 25.8534 19.0913 0.775 22.9069 19.1446 0.775 20.1834 19.0220 0.775 17.7761 18.8566 0.775 15.7372 18.7881 0.775 14.0743 18.9482 0.775 12.7531 19.4479 0.775 11.7024 20.3652 0.775 10.8238 21.7361 0.775 10.0037 23.5500 0.775 9.1257 25.7485 0.775 8.0843 28.2295 0.775 6.7963 30.8551 0.775 5.2102 33.4629 0.775 3.3116 35.8796 0.775 1.1250 37.9365 0.775 -1.2883 39.4838 0.775 -3.8370 40.4033 0.775 -6.4090 40.6195 0.775 -8.8833 40.1049 0.775 -11.1433 38.8830 0.775 -13.0887 37.0247 0.775 -14.6471 34.6425 0.775 -15.7822 31.8791 0.775 -16.4983 28.8949 0.775 -16.8413 25.8534 0.775 -16.8946 22.9069 0.775 -16.7720 20.1834 0.775 -16.6066 17.7761 0.775 -16.5381 15.7372 0.775 -16.6982 14.0743 0.775 -17.1979 12.7531 0.775 -18.1152 11.7024 0.775 -19.4861 10.8238 0.775 -21.3000 10.0037 0.775 -23.4985 9.1257 0.775 -25.9795 8.0843 0.775 -28.6051 6.7963 0.775 -31.2129 5.2102 0.775 -33.6296 3.3116 0.775 -35.6865 1.1250 0.775 -37.2338 -1.2883 0.775 -38.1533 -3.8370 0.775 -38.3695 -6.4090 0.775 -37.8549 -8.8833 0.775 -36.6330 -11.1433 0.775 -34.7747 -13.0887 0.775 -32.3925 -14.6471 0.775 -29.6291 -15.7822 0.775 -26.6449 -16.4983 0.775 -23.6034 -16.8413 0.775 -20.6569 -16.8946 0.775 -17.9334 -16.7720 0.775 -15.5261 -16.6066 0.775 -13.4872 -16.5381 0.775 -11.8243 -16.6982 0.775 -10.5031 -17.1979 0.775 -9.4524 -18.1152 0.775 -8.5738 -19.4861 0.775 -7.7537 -21.3000 0.775 -6.8757 -23.4985 0.775 -5.8343 -25.9795 0.775 -4.5463 -28.6051 0.775 -2.9602 -31.2129 0.775 -1.0616 -33.6296 0.775 1.1250 -35.6865 0.775 3.5383 -37.2338 0.775 6.0870 -38.1533 0.775 8.6590 -38.3695 0.775 11.1333 -37.8549 0.775 13.3933 -36.6330 0.775 15.3387 -34.7747 0.775 16.8971 -32.3925 0.775 18.0322 -29.6291 0.775 18.7483 -26.6449 0.775 19.0913 -23.6034 0.775 19.1446 -20.6569 0.775 19.0220 -17.9334 0.775 18.8566 -15.5261 0.775 18.7881 -13.4872 0.775 18.9482 -11.8243 0.775 19.4479 -10.5031 0.775 20.3652 -9.4524 0.775 21.7361 -8.5738 0.775 23.5500 -7.7537 0.775 25.7485 -6.8757 0.775 28.2295 -5.8343 0.775 30.8551 -4.5463 0.775 33.4629 -2.9602 0.775 35.8796 -1.0616 0.775 = = = 37.3847 1.2500 0.750 38.7555 3.6096 0.750 39.4944 6.0814 0.750 39.5395 8.5541 0.750 38.8768 10.9109 0.750 37.5410 13.0417 0.750 35.6121 14.8549 0.750 33.2076 16.2881 0.750 30.4717 17.3148 0.750 27.5623 17.9483 0.750 24.6367 18.2414 0.750 21.8383 18.2821 0.750 19.2839 18.1850 0.750 17.0550 18.0806 0.750 15.1917 18.1026 0.750 13.6912 18.3738 0.750 12.5107 18.9940 0.750 11.5737 20.0288 0.750 10.7798 21.5018 0.750 10.0161 23.3908 0.750 9.1710 25.6283 0.750 8.1454 28.1060 0.750 6.8647 30.6834 0.750 5.2862 33.1995 0.750 3.4040 35.4867 0.750 1.2500 37.3847 0.750 -1.1096 38.7555 0.750 -3.5814 39.4944 0.750 -6.0541 39.5395 0.750 -8.4109 38.8768 0.750 -10.5417 37.5410 0.750 -12.3549 35.6121 0.750 -13.7881 33.2076 0.750 -14.8148 30.4717 0.750 -15.4483 27.5623 0.750 -15.7414 24.6367 0.750 -15.7821 21.8383 0.750 -15.6850 19.2839 0.750 -15.5806 17.0550 0.750 -15.6026 15.1917 0.750 -15.8738 13.6912 0.750 -16.4940 12.5107 0.750 -17.5288 11.5737 0.750 -19.0018 10.7798 0.750 -20.8908 10.0161 0.750 -23.1283 9.1710 0.750 -25.6060 8.1454 0.750 -28.1834 6.8647 0.750 -30.6995 5.2862 0.750 -32.9867 3.4040 0.750 -34.8847 1.2500 0.750 -36.2555 -1.1096 0.750 -36.9944 -3.5814 0.750 -37.0395 -6.0541 0.750 -36.3768 -8.4109 0.750 -35.0410 -10.5417 0.750 -33.1121 -12.3549 0.750 -30.7076 -13.7881 0.750 -27.9717 -14.8148 0.750 -25.0623 -15.4483 0.750 -22.1367 -15.7414 0.750 -19.3383 -15.7821 0.750 -16.7839 -15.6850 0.750 -14.5550 -15.5806 0.750 -12.6917 -15.6026 0.750 -11.1912 -15.8738 0.750 -10.0107 -16.4940 0.750 -9.0737 -17.5288 0.750 -8.2798 -19.0018 0.750 -7.5161 -20.8908 0.750 -6.6710 -23.1283 0.750 -5.6454 -25.6060 0.750 -4.3647 -28.1834 0.750 -2.7862 -30.6995 0.750 -0.9040 -32.9867 0.750 1.2500 -34.8847 0.750 3.6096 -36.2555 0.750 6.0814 -36.9944 0.750 8.5541 -37.0395 0.750 10.9109 -36.3768 0.750 13.0417 -35.0410 0.750 14.8549 -33.1121 0.750 16.2881 -30.7076 0.750 17.3148 -27.9717 0.750 17.9483 -25.0623 0.750 18.2414 -22.1367 0.750 18.2821 -19.3383 0.750 18.1850 -16.7839 0.750 18.0806 -14.5550 0.750 18.1026 -12.6917 0.750 18.3738 -11.1912 0.750 18.9940 -10.0107 0.750 20.0288 -9.0737 0.750 21.5018 -8.2798 0.750 23.3908 -7.5161 0.750 25.6283 -6.6710 0.750 28.1060 -5.6454 0.750 30.6834 -4.3647 0.750 33.1995 -2.7862 0.750 35.4867 -0.9040 0.750 = = = 36.7656 1.3750 0.725 37.9606 3.6768 0.725 38.5238 6.0680 0.725 38.4069 8.4392 0.725 37.6084 10.6782 0.725 36.1735 12.6817 0.725 34.1897 14.3672 0.725 31.7785 15.6818 0.725 29.0844 16.6084 0.725 26.2617 17.1686 0.725 23.4611 17.4215 0.725 20.8161 17.4581 0.725 18.4327 17.3932 0.725 16.3802 17.3539 0.725 14.6876 17.4672 0.725 13.3423 17.8466 0.725 12.2940 18.5806 0.725 11.4617 19.7226 0.725 10.7437 21.2845 0.725 10.0294 23.2336 0.725 9.2118 25.4941 0.725 8.1990 27.9527 0.725 6.9247 30.4677 0.725 5.3551 32.8807 0.725 3.4924 35.0301 0.725 1.3750 36.7656 0.725 -0.9268 37.9606 0.725 -3.3180 38.5238 0.725 -5.6892 38.4069 0.725 -7.9282 37.6084 0.725 -9.9317 36.1735 0.725 -11.6172 34.1897 0.725 -12.9318 31.7785 0.725 -13.8584 29.0844 0.725 -14.4186 26.2617 0.725 -14.6715 23.4611 0.725 -14.7081 20.8161 0.725 -14.6432 18.4327 0.725 -14.6039 16.3802 0.725 -14.7172 14.6876 0.725 -15.0966 13.3423 0.725 -15.8306 12.2940 0.725 -16.9726 11.4617 0.725 -18.5345 10.7437 0.725 -20.4836 10.0294 0.725 -22.7441 9.2118 0.725 -25.2027 8.1990 0.725 -27.7177 6.9247 0.725 -30.1307 5.3551 0.725 -32.2801 3.4924 0.725 -34.0156 1.3750 0.725 -35.2106 -0.9268 0.725 -35.7738 -3.3180 0.725 -35.6569 -5.6892 0.725 -34.8584 -7.9282 0.725 -33.4235 -9.9317 0.725 -31.4397 -11.6172 0.725 -29.0285 -12.9318 0.725 -26.3344 -13.8584 0.725 -23.5117 -14.4186 0.725 -20.7111 -14.6715 0.725 -18.0661 -14.7081 0.725 -15.6827 -14.6432 0.725 -13.6302 -14.6039 0.725 -11.9376 -14.7172 0.725 -10.5923 -15.0966 0.725 -9.5440 -15.8306 0.725 -8.7117 -16.9726 0.725 -7.9937 -18.5345 0.725 -7.2794 -20.4836 0.725 -6.4618 -22.7441 0.725 -5.4490 -25.2027 0.725 -4.1747 -27.7177 0.725 -2.6051 -30.1307 0.725 -0.7424 -32.2801 0.725 1.3750 -34.0156 0.725 3.6768 -35.2106 0.725 6.0680 -35.7738 0.725 8.4392 -35.6569 0.725 10.6782 -34.8584 0.725 12.6817 -33.4235 0.725 14.3672 -31.4397 0.725 15.6818 -29.0285 0.725 16.6084 -26.3344 0.725 17.1686 -23.5117 0.725 17.4215 -20.7111 0.725 17.4581 -18.0661 0.725 17.3932 -15.6827 0.725 17.3539 -13.6302 0.725 17.4672 -11.9376 0.725 17.8466 -10.5923 0.725 18.5806 -9.5440 0.725 19.7226 -8.7117 0.725 21.2845 -7.9937 0.725 23.2336 -7.2794 0.725 25.4941 -6.4618 0.725 27.9527 -5.4490 0.725 30.4677 -4.1747 0.725 32.8807 -2.6051 0.725 35.0301 -0.7424 0.725 = = = 36.0799 1.5000 0.700 37.1014 3.7398 0.700 37.4954 6.0473 0.700 37.2267 8.3152 0.700 36.3054 10.4365 0.700 34.7863 12.3154 0.700 32.7632 13.8780 0.700 30.3604 15.0807 0.700 27.7217 15.9155 0.700 24.9968 16.4115 0.700 22.3288 16.6330 0.700 19.8415 16.6734 0.700 17.6294 16.6465 0.700 15.7506 16.6753 0.700 14.2230 16.8794 0.700 13.0250 17.3629 0.700 12.1000 18.2029 0.700 11.3633 19.4413 0.700 10.7130 21.0787 0.700 10.0412 23.0726 0.700 9.2462 25.3405 0.700 8.2437 27.7651 0.700 6.9757 30.2046 0.700 5.4167 32.5041 0.700 3.5768 34.5094 0.700 1.5000 36.0799 0.700 -0.7398 37.1014 0.700 -3.0473 37.4954 0.700 -5.3152 37.2267 0.700 -7.4365 36.3054 0.700 -9.3154 34.7863 0.700 -10.8780 32.7632 0.700 -12.0807 30.3604 0.700 -12.9155 27.7217 0.700 -13.4115 24.9968 0.700 -13.6330 22.3288 0.700 -13.6734 19.8415 0.700 -13.6465 17.6294 0.700 -13.6753 15.7506 0.700 -13.8794 14.2230 0.700 -14.3629 13.0250 0.700 -15.2029 12.1000 0.700 -16.4413 11.3633 0.700 -18.0787 10.7130 0.700 -20.0726 10.0412 0.700 -22.3405 9.2462 0.700 -24.7651 8.2437 0.700 -27.2046 6.9757 0.700 -29.5041 5.4167 0.700 -31.5094 3.5768 0.700 -33.0799 1.5000 0.700 -34.1014 -0.7398 0.700 -34.4954 -3.0473 0.700 -34.2267 -5.3152 0.700 -33.3054 -7.4365 0.700 -31.7863 -9.3154 0.700 -29.7632 -10.8780 0.700 -27.3604 -12.0807 0.700 -24.7217 -12.9155 0.700 -21.9968 -13.4115 0.700 -19.3288 -13.6330 0.700 -16.8415 -13.6734 0.700 -14.6294 -13.6465 0.700 -12.7506 -13.6753 0.700 -11.2230 -13.8794 0.700 -10.0250 -14.3629 0.700 -9.1000 -15.2029 0.700 -8.3633 -16.4413 0.700 -7.7130 -18.0787 0.700 -7.0412 -20.0726 0.700 -6.2462 -22.3405 0.700 -5.2437 -24.7651 0.700 -3.9757 -27.2046 0.700 -2.4167 -29.5041 0.700 -0.5768 -31.5094 0.700 1.5000 -33.0799 0.700 3.7398 -34.1014 0.700 6.0473 -34.4954 0.700 8.3152 -34.2267 0.700 10.4365 -33.3054 0.700 12.3154 -31.7863 0.700 13.8780 -29.7632 0.700 15.0807 -27.3604 0.700 15.9155 -24.7217 0.700 16.4115 -21.9968 0.700 16.6330 -19.3288 0.700 16.6734 -16.8415 0.700 16.6465 -14.6294 0.700 16.6753 -12.7506 0.700 16.8794 -11.2230 0.700 17.3629 -10.0250 0.700 18.2029 -9.1000 0.700 19.4413 -8.3633 0.700 21.0787 -7.7130 0.700 23.0726 -7.0412 0.700 25.3405 -6.2462 0.700 27.7651 -5.2437 0.700 30.2046 -3.9757 0.700 32.5041 -2.4167 0.700 34.5094 -0.5768 0.700 = = = 35.3294 1.6250 0.675 36.1808 3.7991 0.675 36.4134 6.0198 0.675 36.0039 8.1831 0.675 34.9736 10.1875 0.675 33.3853 11.9445 0.675 31.3383 13.3893 0.675 28.9586 14.4872 0.675 26.3879 15.2385 0.675 23.7707 15.6791 0.675 21.2419 15.8775 0.675 18.9151 15.9286 0.675 16.8737 15.9445 0.675 15.1645 16.0431 0.675 13.7954 16.3365 0.675 12.7367 16.9189 0.675 11.9258 17.8565 0.675 11.2758 19.1797 0.675 10.6851 20.8786 0.675 10.0493 22.9025 0.675 9.2728 25.1625 0.675 8.2786 27.5390 0.675 7.0170 29.8910 0.675 5.4709 32.0683 0.675 3.6571 33.9245 0.675 1.6250 35.3294 0.675 -0.5491 36.1808 0.675 -2.7698 36.4134 0.675 -4.9331 36.0039 0.675 -6.9375 34.9736 0.675 -8.6945 33.3853 0.675 -10.1393 31.3383 0.675 -11.2372 28.9586 0.675 -11.9885 26.3879 0.675 -12.4291 23.7707 0.675 -12.6275 21.2419 0.675 -12.6786 18.9151 0.675 -12.6945 16.8737 0.675 -12.7931 15.1645 0.675 -13.0865 13.7954 0.675 -13.6689 12.7367 0.675 -14.6065 11.9258 0.675 -15.9297 11.2758 0.675 -17.6286 10.6851 0.675 -19.6525 10.0493 0.675 -21.9125 9.2728 0.675 -24.2890 8.2786 0.675 -26.6410 7.0170 0.675 -28.8183 5.4709 0.675 -30.6745 3.6571 0.675 -32.0794 1.6250 0.675 -32.9308 -0.5491 0.675 -33.1634 -2.7698 0.675 -32.7539 -4.9331 0.675 -31.7236 -6.9375 0.675 -30.1353 -8.6945 0.675 -28.0883 -10.1393 0.675 -25.7086 -11.2372 0.675 -23.1379 -11.9885 0.675 -20.5207 -12.4291 0.675 -17.9919 -12.6275 0.675 -15.6651 -12.6786 0.675 -13.6237 -12.6945 0.675 -11.9145 -12.7931 0.675 -10.5454 -13.0865 0.675 -9.4867 -13.6689 0.675 -8.6758 -14.6065 0.675 -8.0258 -15.9297 0.675 -7.4351 -17.6286 0.675 -6.7993 -19.6525 0.675 -6.0228 -21.9125 0.675 -5.0286 -24.2890 0.675 -3.7670 -26.6410 0.675 -2.2209 -28.8183 0.675 -0.4071 -30.6745 0.675 1.6250 -32.0794 0.675 3.7991 -32.9308 0.675 6.0198 -33.1634 0.675 8.1831 -32.7539 0.675 10.1875 -31.7236 0.675 11.9445 -30.1353 0.675 13.3893 -28.0883 0.675 14.4872 -25.7086 0.675 15.2385 -23.1379 0.675 15.6791 -20.5207 0.675 15.8775 -17.9919 0.675 15.9286 -15.6651 0.675 15.9445 -13.6237 0.675 16.0431 -11.9145 0.675 16.3365 -10.5454 0.675 16.9189 -9.4867 0.675 17.8565 -8.6758 0.675 19.1797 -8.0258 0.675 20.8786 -7.4351 0.675 22.9025 -6.7993 0.675 25.1625 -6.0228 0.675 27.5390 -5.0286 0.675 29.8910 -3.7670 0.675 32.0683 -2.2209 0.675 33.9245 -0.4071 0.675 = = = 34.5159 1.7500 0.650 35.2024 3.8546 0.650 35.2822 5.9861 0.650 34.7439 8.0439 0.650 33.6185 9.9325 0.650 31.9764 11.5711 0.650 29.9206 12.9035 0.650 27.5778 13.9037 0.650 25.0868 14.5795 0.650 22.5860 14.9729 0.650 20.2017 15.1559 0.650 18.0371 15.2238 0.650 16.1645 15.2861 0.650 14.6202 15.4554 0.650 13.4024 15.8354 0.650 12.4742 16.5106 0.650 11.7683 17.5363 0.650 11.1960 18.9322 0.650 10.6573 20.6789 0.650 10.0517 22.7178 0.650 9.2899 24.9555 0.650 8.3026 27.2707 0.650 7.0483 29.5245 0.650 5.5174 31.5723 0.650 3.7334 33.2758 0.650 1.7500 34.5159 0.650 -0.3546 35.2024 0.650 -2.4861 35.2822 0.650 -4.5439 34.7439 0.650 -6.4325 33.6185 0.650 -8.0711 31.9764 0.650 -9.4035 29.9206 0.650 -10.4037 27.5778 0.650 -11.0795 25.0868 0.650 -11.4729 22.5860 0.650 -11.6559 20.2017 0.650 -11.7238 18.0371 0.650 -11.7861 16.1645 0.650 -11.9554 14.6202 0.650 -12.3354 13.4024 0.650 -13.0106 12.4742 0.650 -14.0363 11.7683 0.650 -15.4322 11.1960 0.650 -17.1789 10.6573 0.650 -19.2178 10.0517 0.650 -21.4555 9.2899 0.650 -23.7707 8.3026 0.650 -26.0245 7.0483 0.650 -28.0723 5.5174 0.650 -29.7758 3.7334 0.650 -31.0159 1.7500 0.650 -31.7024 -0.3546 0.650 -31.7822 -2.4861 0.650 -31.2439 -4.5439 0.650 -30.1185 -6.4325 0.650 -28.4764 -8.0711 0.650 -26.4206 -9.4035 0.650 -24.0778 -10.4037 0.650 -21.5868 -11.0795 0.650 -19.0860 -11.4729 0.650 -16.7017 -11.6559 0.650 -14.5371 -11.7238 0.650 -12.6645 -11.7861 0.650 -11.1202 -11.9554 0.650 -9.9024 -12.3354 0.650 -8.9742 -13.0106 0.650 -8.2683 -14.0363 0.650 -7.6960 -15.4322 0.650 -7.1573 -17.1789 0.650 -6.5517 -19.2178 0.650 -5.7899 -21.4555 0.650 -4.8026 -23.7707 0.650 -3.5483 -26.0245 0.650 -2.0174 -28.0723 0.650 -0.2334 -29.7758 0.650 1.7500 -31.0159 0.650 3.8546 -31.7024 0.650 5.9861 -31.7822 0.650 8.0439 -31.2439 0.650 9.9325 -30.1185 0.650 11.5711 -28.4764 0.650 12.9035 -26.4206 0.650 13.9037 -24.0778 0.650 14.5795 -21.5868 0.650 14.9729 -19.0860 0.650 15.1559 -16.7017 0.650 15.2238 -14.5371 0.650 15.2861 -12.6645 0.650 15.4554 -11.1202 0.650 15.8354 -9.9024 0.650 16.5106 -8.9742 0.650 17.5363 -8.2683 0.650 18.9322 -7.6960 0.650 20.6789 -7.1573 0.650 22.7178 -6.5517 0.650 24.9555 -5.7899 0.650 27.2707 -4.8026 0.650 29.5245 -3.5483 0.650 31.5723 -2.0174 0.650 33.2758 -0.2334 0.650 = = = 33.6420 1.8750 0.625 34.1698 3.9068 0.625 34.1067 5.9468 0.625 33.4522 7.8987 0.625 32.2462 9.6730 0.625 30.5652 11.1970 0.625 28.5153 12.4226 0.625 26.2226 13.3321 0.625 23.8219 13.9404 0.625 21.4450 14.2945 0.625 19.2091 14.4690 0.625 17.2072 14.5589 0.625 15.5006 14.6703 0.625 14.1154 14.9097 0.625 13.0412 15.3727 0.625 12.2345 16.1336 0.625 11.6243 17.2374 0.625 11.1212 18.6937 0.625 10.6271 20.4741 0.625 10.0464 22.5137 0.625 9.2962 24.7152 0.625 8.3150 26.9570 0.625 7.0691 29.1032 0.625 5.5563 31.0155 0.625 3.8058 32.5645 0.625 1.8750 33.6420 0.625 -0.1568 34.1698 0.625 -2.1968 34.1067 0.625 -4.1487 33.4522 0.625 -5.9230 32.2462 0.625 -7.4470 30.5652 0.625 -8.6726 28.5153 0.625 -9.5821 26.2226 0.625 -10.1904 23.8219 0.625 -10.5445 21.4450 0.625 -10.7190 19.2091 0.625 -10.8089 17.2072 0.625 -10.9203 15.5006 0.625 -11.1597 14.1154 0.625 -11.6227 13.0412 0.625 -12.3836 12.2345 0.625 -13.4874 11.6243 0.625 -14.9437 11.1212 0.625 -16.7241 10.6271 0.625 -18.7637 10.0464 0.625 -20.9652 9.2962 0.625 -23.2070 8.3150 0.625 -25.3532 7.0691 0.625 -27.2655 5.5563 0.625 -28.8145 3.8058 0.625 -29.8920 1.8750 0.625 -30.4198 -0.1568 0.625 -30.3567 -2.1968 0.625 -29.7022 -4.1487 0.625 -28.4962 -5.9230 0.625 -26.8152 -7.4470 0.625 -24.7653 -8.6726 0.625 -22.4726 -9.5821 0.625 -20.0719 -10.1904 0.625 -17.6950 -10.5445 0.625 -15.4591 -10.7190 0.625 -13.4572 -10.8089 0.625 -11.7506 -10.9203 0.625 -10.3654 -11.1597 0.625 -9.2912 -11.6227 0.625 -8.4845 -12.3836 0.625 -7.8743 -13.4874 0.625 -7.3712 -14.9437 0.625 -6.8771 -16.7241 0.625 -6.2964 -18.7637 0.625 -5.5462 -20.9652 0.625 -4.5650 -23.2070 0.625 -3.3191 -25.3532 0.625 -1.8063 -27.2655 0.625 -0.0558 -28.8145 0.625 1.8750 -29.8920 0.625 3.9068 -30.4198 0.625 5.9468 -30.3567 0.625 7.8987 -29.7022 0.625 9.6730 -28.4962 0.625 11.1970 -26.8152 0.625 12.4226 -24.7653 0.625 13.3321 -22.4726 0.625 13.9404 -20.0719 0.625 14.2945 -17.6950 0.625 14.4690 -15.4591 0.625 14.5589 -13.4572 0.625 14.6703 -11.7506 0.625 14.9097 -10.3654 0.625 15.3727 -9.2912 0.625 16.1336 -8.4845 0.625 17.2374 -7.8743 0.625 18.6937 -7.3712 0.625 20.4741 -6.8771 0.625 22.5137 -6.2964 0.625 24.7152 -5.5462 0.625 26.9570 -4.5650 0.625 29.1032 -3.3191 0.625 31.0155 -1.8063 0.625 32.5645 -0.0558 0.625 = = = 32.7107 2.0000 0.600 33.0872 3.9558 0.600 32.8920 5.9026 0.600 32.1345 7.7485 0.600 30.8624 9.4106 0.600 29.1574 10.8240 0.600 27.1274 11.9486 0.600 24.8969 12.7745 0.600 22.5962 13.3229 0.600 20.3495 13.6450 0.600 18.2649 13.8171 0.600 16.4248 13.9332 0.600 14.8803 14.0954 0.600 13.6477 14.4036 0.600 12.7088 14.9447 0.600 12.0143 15.7836 0.600 11.4907 16.9549 0.600 11.0483 18.4588 0.600 10.5921 20.2592 0.600 10.0316 22.2854 0.600 9.2905 24.4377 0.600 8.3150 26.5952 0.600 7.0791 28.6258 0.600 5.5875 30.3980 0.600 3.8744 31.7921 0.600 2.0000 32.7107 0.600 0.0442 33.0872 0.600 -1.9026 32.8920 0.600 -3.7485 32.1345 0.600 -5.4106 30.8624 0.600 -6.8240 29.1574 0.600 -7.9486 27.1274 0.600 -8.7745 24.8969 0.600 -9.3229 22.5962 0.600 -9.6450 20.3495 0.600 -9.8171 18.2649 0.600 -9.9332 16.4248 0.600 -10.0954 14.8803 0.600 -10.4036 13.6477 0.600 -10.9447 12.7088 0.600 -11.7836 12.0143 0.600 -12.9549 11.4907 0.600 -14.4588 11.0483 0.600 -16.2592 10.5921 0.600 -18.2854 10.0316 0.600 -20.4377 9.2905 0.600 -22.5952 8.3150 0.600 -24.6258 7.0791 0.600 -26.3980 5.5875 0.600 -27.7921 3.8744 0.600 -28.7107 2.0000 0.600 -29.0872 0.0442 0.600 -28.8920 -1.9026 0.600 -28.1345 -3.7485 0.600 -26.8624 -5.4106 0.600 -25.1574 -6.8240 0.600 -23.1274 -7.9486 0.600 -20.8969 -8.7745 0.600 -18.5962 -9.3229 0.600 -16.3495 -9.6450 0.600 -14.2649 -9.8171 0.600 -12.4248 -9.9332 0.600 -10.8803 -10.0954 0.600 -9.6477 -10.4036 0.600 -8.7088 -10.9447 0.600 -8.0143 -11.7836 0.600 -7.4907 -12.9549 0.600 -7.0483 -14.4588 0.600 -6.5921 -16.2592 0.600 -6.0316 -18.2854 0.600 -5.2905 -20.4377 0.600 -4.3150 -22.5952 0.600 -3.0791 -24.6258 0.600 -1.5875 -26.3980 0.600 0.1256 -27.7921 0.600 2.0000 -28.7107 0.600 3.9558 -29.0872 0.600 5.9026 -28.8920 0.600 7.7485 -28.1345 0.600 9.4106 -26.8624 0.600 10.8240 -25.1574 0.600 11.9486 -23.1274 0.600 12.7745 -20.8969 0.600 13.3229 -18.5962 0.600 13.6450 -16.3495 0.600 13.8171 -14.2649 0.600 13.9332 -12.4248 0.600 14.0954 -10.8803 0.600 14.4036 -9.6477 0.600 14.9447 -8.7088 0.600 15.7836 -8.0143 0.600 16.9549 -7.4907 0.600 18.4588 -7.0483 0.600 20.2592 -6.5921 0.600 22.2854 -6.0316 0.600 24.4377 -5.2905 0.600 26.5952 -4.3150 0.600 28.6258 -3.0791 0.600 30.3980 -1.5875 0.600 31.7921 0.1256 0.600 = = = 31.7253 2.1250 0.575 31.9592 4.0020 0.575 31.6433 5.8540 0.575 30.7963 7.5943 0.575 29.4728 9.1467 0.575 27.7584 10.4538 0.575 25.7616 11.4834 0.575 23.6046 12.2326 0.575 21.4122 12.7282 0.575 19.3008 13.0251 0.575 17.3689 13.2003 0.575 15.6888 13.3460 0.575 14.3015 13.5595 0.575 13.2144 13.9340 0.575 12.4020 14.5478 0.575 11.8105 15.4560 0.575 11.3643 16.6838 0.575 10.9747 18.2226 0.575 10.5501 20.0293 0.575 10.0055 22.0288 0.575 9.2715 24.1198 0.575 8.3021 26.1830 0.575 7.0783 28.0913 0.575 5.6111 29.7206 0.575 3.9392 30.9608 0.575 2.1250 31.7253 0.575 0.2480 31.9592 0.575 -1.6040 31.6433 0.575 -3.3443 30.7963 0.575 -4.8967 29.4728 0.575 -6.2038 27.7584 0.575 -7.2334 25.7616 0.575 -7.9826 23.6046 0.575 -8.4782 21.4122 0.575 -8.7751 19.3008 0.575 -8.9503 17.3689 0.575 -9.0960 15.6888 0.575 -9.3095 14.3015 0.575 -9.6840 13.2144 0.575 -10.2978 12.4020 0.575 -11.2060 11.8105 0.575 -12.4338 11.3643 0.575 -13.9726 10.9747 0.575 -15.7793 10.5501 0.575 -17.7788 10.0055 0.575 -19.8698 9.2715 0.575 -21.9330 8.3021 0.575 -23.8413 7.0783 0.575 -25.4706 5.6111 0.575 -26.7108 3.9392 0.575 -27.4753 2.1250 0.575 -27.7092 0.2480 0.575 -27.3933 -1.6040 0.575 -26.5463 -3.3443 0.575 -25.2228 -4.8967 0.575 -23.5084 -6.2038 0.575 -21.5116 -7.2334 0.575 -19.3546 -7.9826 0.575 -17.1622 -8.4782 0.575 -15.0508 -8.7751 0.575 -13.1189 -8.9503 0.575 -11.4388 -9.0960 0.575 -10.0515 -9.3095 0.575 -8.9644 -9.6840 0.575 -8.1520 -10.2978 0.575 -7.5605 -11.2060 0.575 -7.1143 -12.4338 0.575 -6.7247 -13.9726 0.575 -6.3001 -15.7793 0.575 -5.7555 -17.7788 0.575 -5.0215 -19.8698 0.575 -4.0521 -21.9330 0.575 -2.8283 -23.8413 0.575 -1.3611 -25.4706 0.575 0.3108 -26.7108 0.575 2.1250 -27.4753 0.575 4.0020 -27.7092 0.575 5.8540 -27.3933 0.575 7.5943 -26.5463 0.575 9.1467 -25.2228 0.575 10.4538 -23.5084 0.575 11.4834 -21.5116 0.575 12.2326 -19.3546 0.575 12.7282 -17.1622 0.575 13.0251 -15.0508 0.575 13.2003 -13.1189 0.575 13.3460 -11.4388 0.575 13.5595 -10.0515 0.575 13.9340 -8.9644 0.575 14.5478 -8.1520 0.575 15.4560 -7.5605 0.575 16.6838 -7.1143 0.575 18.2226 -6.7247 0.575 20.0293 -6.3001 0.575 22.0288 -5.7555 0.575 24.1198 -5.0215 0.575 26.1830 -4.0521 0.575 28.0913 -2.8283 0.575 29.7206 -1.3611 0.575 30.9608 0.3108 0.575 = = = 30.6898 2.2500 0.550 30.7905 4.0456 0.550 30.3661 5.8019 0.550 29.4435 7.4374 0.550 28.0831 8.8828 0.550 26.3733 10.0881 0.550 24.4223 11.0286 0.550 22.3491 11.7079 0.550 20.2721 12.1577 0.550 18.2997 12.4355 0.550 16.5208 12.6184 0.550 14.9978 12.7959 0.550 13.7620 13.0605 0.550 12.8125 13.4979 0.550 12.1175 14.1778 0.550 11.6196 15.1461 0.550 11.2419 16.4190 0.550 10.8976 17.9799 0.550 10.4988 19.7796 0.550 9.9665 21.7398 0.550 9.2385 23.7584 0.550 8.2758 25.7189 0.550 7.0666 27.4996 0.550 5.6273 28.9844 0.550 4.0005 30.0730 0.550 2.2500 30.6898 0.550 0.4544 30.7905 0.550 -1.3019 30.3661 0.550 -2.9374 29.4435 0.550 -4.3828 28.0831 0.550 -5.5881 26.3733 0.550 -6.5286 24.4223 0.550 -7.2079 22.3491 0.550 -7.6577 20.2721 0.550 -7.9355 18.2997 0.550 -8.1184 16.5208 0.550 -8.2959 14.9978 0.550 -8.5605 13.7620 0.550 -8.9979 12.8125 0.550 -9.6778 12.1175 0.550 -10.6461 11.6196 0.550 -11.9190 11.2419 0.550 -13.4799 10.8976 0.550 -15.2796 10.4988 0.550 -17.2398 9.9665 0.550 -19.2584 9.2385 0.550 -21.2189 8.2758 0.550 -22.9996 7.0666 0.550 -24.4844 5.6273 0.550 -25.5730 4.0005 0.550 -26.1898 2.2500 0.550 -26.2905 0.4544 0.550 -25.8661 -1.3019 0.550 -24.9435 -2.9374 0.550 -23.5831 -4.3828 0.550 -21.8733 -5.5881 0.550 -19.9223 -6.5286 0.550 -17.8491 -7.2079 0.550 -15.7721 -7.6577 0.550 -13.7997 -7.9355 0.550 -12.0208 -8.1184 0.550 -10.4978 -8.2959 0.550 -9.2620 -8.5605 0.550 -8.3125 -8.9979 0.550 -7.6175 -9.6778 0.550 -7.1196 -10.6461 0.550 -6.7419 -11.9190 0.550 -6.3976 -13.4799 0.550 -5.9988 -15.2796 0.550 -5.4665 -17.2398 0.550 -4.7385 -19.2584 0.550 -3.7758 -21.2189 0.550 -2.5666 -22.9996 0.550 -1.1273 -24.4844 0.550 0.4995 -25.5730 0.550 2.2500 -26.1898 0.550 4.0456 -26.2905 0.550 5.8019 -25.8661 0.550 7.4374 -24.9435 0.550 8.8828 -23.5831 0.550 10.0881 -21.8733 0.550 11.0286 -19.9223 0.550 11.7079 -17.8491 0.550 12.1577 -15.7721 0.550 12.4355 -13.7997 0.550 12.6184 -12.0208 0.550 12.7959 -10.4978 0.550 13.0605 -9.2620 0.550 13.4979 -8.3125 0.550 14.1778 -7.6175 0.550 15.1461 -7.1196 0.550 16.4190 -6.7419 0.550 17.9799 -6.3976 0.550 19.7796 -5.9988 0.550 21.7398 -5.4665 0.550 23.7584 -4.7385 0.550 25.7189 -3.7758 0.550 27.4996 -2.5666 0.550 28.9844 -1.1273 0.550 30.0730 0.4995 0.550 = = = 29.6082 2.3750 0.525 29.5862 4.0870 0.525 29.0660 5.7469 0.525 28.0818 7.2788 0.525 26.6987 8.6203 0.525 25.0069 9.7286 0.525 23.1135 10.5860 0.525 21.1330 11.2019 0.525 19.1775 11.6122 0.525 17.3467 11.8763 0.525 15.7199 12.0707 0.525 14.3499 12.2815 0.525 13.2590 12.5958 0.525 12.4387 13.0918 0.525 11.8520 13.8307 0.525 11.4382 14.8495 0.525 11.1206 16.1558 0.525 10.8143 17.7260 0.525 10.4363 19.5061 0.525 9.9134 21.4149 0.525 9.1906 23.3512 0.525 8.2359 25.2017 0.525 7.0440 26.8509 0.525 5.6363 28.1910 0.525 4.0584 29.1318 0.525 2.3750 29.6082 0.525 0.6630 29.5862 0.525 -0.9969 29.0660 0.525 -2.5288 28.0818 0.525 -3.8703 26.6987 0.525 -4.9786 25.0069 0.525 -5.8360 23.1135 0.525 -6.4519 21.1330 0.525 -6.8622 19.1775 0.525 -7.1263 17.3467 0.525 -7.3207 15.7199 0.525 -7.5315 14.3499 0.525 -7.8458 13.2590 0.525 -8.3418 12.4387 0.525 -9.0807 11.8520 0.525 -10.0995 11.4382 0.525 -11.4058 11.1206 0.525 -12.9760 10.8143 0.525 -14.7561 10.4363 0.525 -16.6649 9.9134 0.525 -18.6012 9.1906 0.525 -20.4517 8.2359 0.525 -22.1009 7.0440 0.525 -23.4410 5.6363 0.525 -24.3818 4.0584 0.525 -24.8582 2.3750 0.525 -24.8362 0.6630 0.525 -24.3160 -0.9969 0.525 -23.3318 -2.5288 0.525 -21.9487 -3.8703 0.525 -20.2569 -4.9786 0.525 -18.3635 -5.8360 0.525 -16.3830 -6.4519 0.525 -14.4275 -6.8622 0.525 -12.5967 -7.1263 0.525 -10.9699 -7.3207 0.525 -9.5999 -7.5315 0.525 -8.5090 -7.8458 0.525 -7.6887 -8.3418 0.525 -7.1020 -9.0807 0.525 -6.6882 -10.0995 0.525 -6.3706 -11.4058 0.525 -6.0643 -12.9760 0.525 -5.6863 -14.7561 0.525 -5.1634 -16.6649 0.525 -4.4406 -18.6012 0.525 -3.4859 -20.4517 0.525 -2.2940 -22.1009 0.525 -0.8863 -23.4410 0.525 0.6916 -24.3818 0.525 2.3750 -24.8582 0.525 4.0870 -24.8362 0.525 5.7469 -24.3160 0.525 7.2788 -23.3318 0.525 8.6203 -21.9487 0.525 9.7286 -20.2569 0.525 10.5860 -18.3635 0.525 11.2019 -16.3830 0.525 11.6122 -14.4275 0.525 11.8763 -12.5967 0.525 12.0707 -10.9699 0.525 12.2815 -9.5999 0.525 12.5958 -8.5090 0.525 13.0918 -7.6887 0.525 13.8307 -7.1020 0.525 14.8495 -6.6882 0.525 16.1558 -6.3706 0.525 17.7260 -6.0643 0.525 19.5061 -5.6863 0.525 21.4149 -5.1634 0.525 23.3512 -4.4406 0.525 25.2017 -3.4859 0.525 26.8509 -2.2940 0.525 28.1910 -0.8863 0.525 29.1318 0.6916 0.525 = = = 28.4850 2.5000 0.500 28.3514 4.1264 0.500 27.7485 5.6896 0.500 26.7167 7.1196 0.500 25.3249 8.3604 0.500 23.6640 9.3766 0.500 21.8388 10.1568 0.500 19.9590 10.7156 0.500 18.1296 11.0924 0.500 16.4416 11.3476 0.500 14.9650 11.5563 0.500 13.7430 11.8010 0.500 12.7897 12.1627 0.500 12.0898 12.7121 0.500 11.6018 13.5022 0.500 11.2630 14.5613 0.500 10.9971 15.8894 0.500 10.7224 17.4565 0.500 10.3606 19.2046 0.500 9.8449 21.0511 0.500 9.1271 22.8962 0.500 8.1822 24.6307 0.500 7.0107 26.1459 0.500 5.6384 27.3428 0.500 4.1132 28.1407 0.500 2.5000 28.4850 0.500 0.8736 28.3514 0.500 -0.6896 27.7485 0.500 -2.1196 26.7167 0.500 -3.3604 25.3249 0.500 -4.3766 23.6640 0.500 -5.1568 21.8388 0.500 -5.7156 19.9590 0.500 -6.0924 18.1296 0.500 -6.3476 16.4416 0.500 -6.5563 14.9650 0.500 -6.8010 13.7430 0.500 -7.1627 12.7897 0.500 -7.7121 12.0898 0.500 -8.5022 11.6018 0.500 -9.5613 11.2630 0.500 -10.8894 10.9971 0.500 -12.4565 10.7224 0.500 -14.2046 10.3606 0.500 -16.0511 9.8449 0.500 -17.8962 9.1271 0.500 -19.6307 8.1822 0.500 -21.1459 7.0107 0.500 -22.3428 5.6384 0.500 -23.1407 4.1132 0.500 -23.4850 2.5000 0.500 -23.3514 0.8736 0.500 -22.7485 -0.6896 0.500 -21.7167 -2.1196 0.500 -20.3249 -3.3604 0.500 -18.6640 -4.3766 0.500 -16.8388 -5.1568 0.500 -14.9590 -5.7156 0.500 -13.1296 -6.0924 0.500 -11.4416 -6.3476 0.500 -9.9650 -6.5563 0.500 -8.7430 -6.8010 0.500 -7.7897 -7.1627 0.500 -7.0898 -7.7121 0.500 -6.6018 -8.5022 0.500 -6.2630 -9.5613 0.500 -5.9971 -10.8894 0.500 -5.7224 -12.4565 0.500 -5.3606 -14.2046 0.500 -4.8449 -16.0511 0.500 -4.1271 -17.8962 0.500 -3.1822 -19.6307 0.500 -2.0107 -21.1459 0.500 -0.6384 -22.3428 0.500 0.8868 -23.1407 0.500 2.5000 -23.4850 0.500 4.1264 -23.3514 0.500 5.6896 -22.7485 0.500 7.1196 -21.7167 0.500 8.3604 -20.3249 0.500 9.3766 -18.6640 0.500 10.1568 -16.8388 0.500 10.7156 -14.9590 0.500 11.0924 -13.1296 0.500 11.3476 -11.4416 0.500 11.5563 -9.9650 0.500 11.8010 -8.7430 0.500 12.1627 -7.7897 0.500 12.7121 -7.0898 0.500 13.5022 -6.6018 0.500 14.5613 -6.2630 0.500 15.8894 -5.9971 0.500 17.4565 -5.7224 0.500 19.2046 -5.3606 0.500 21.0511 -4.8449 0.500 22.8962 -4.1271 0.500 24.6307 -3.1822 0.500 26.1459 -2.0107 0.500 27.3428 -0.6384 0.500 28.1407 0.8868 0.500 = = = 27.3249 2.6250 0.475 27.0915 4.1643 0.475 26.4192 5.6309 0.475 25.3538 6.9608 0.475 23.9667 8.1046 0.475 22.3486 9.0336 0.475 20.6013 9.7423 0.475 18.8290 10.2500 0.475 17.1291 10.5987 0.475 15.5840 10.8490 0.475 14.2543 11.0742 0.475 13.1745 11.3523 0.475 12.3509 11.7582 0.475 11.7623 12.3553 0.475 11.3635 13.1881 0.475 11.0907 14.2771 0.475 10.8688 15.6151 0.475 10.6196 17.1671 0.475 10.2701 18.8716 0.475 9.7599 20.6458 0.475 9.0477 22.3919 0.475 8.1147 24.0059 0.475 6.9669 25.3861 0.475 5.6338 26.4421 0.475 4.1651 27.1034 0.475 2.6250 27.3249 0.475 1.0857 27.0915 0.475 -0.3809 26.4192 0.475 -1.7108 25.3538 0.475 -2.8546 23.9667 0.475 -3.7836 22.3486 0.475 -4.4923 20.6013 0.475 -5.0000 18.8290 0.475 -5.3487 17.1291 0.475 -5.5990 15.5840 0.475 -5.8242 14.2543 0.475 -6.1023 13.1745 0.475 -6.5082 12.3509 0.475 -7.1053 11.7623 0.475 -7.9381 11.3635 0.475 -9.0271 11.0907 0.475 -10.3651 10.8688 0.475 -11.9171 10.6196 0.475 -13.6216 10.2701 0.475 -15.3958 9.7599 0.475 -17.1419 9.0477 0.475 -18.7559 8.1147 0.475 -20.1361 6.9669 0.475 -21.1921 5.6338 0.475 -21.8534 4.1651 0.475 -22.0749 2.6250 0.475 -21.8415 1.0857 0.475 -21.1692 -0.3809 0.475 -20.1038 -1.7108 0.475 -18.7167 -2.8546 0.475 -17.0986 -3.7836 0.475 -15.3513 -4.4923 0.475 -13.5790 -5.0000 0.475 -11.8791 -5.3487 0.475 -10.3340 -5.5990 0.475 -9.0043 -5.8242 0.475 -7.9245 -6.1023 0.475 -7.1009 -6.5082 0.475 -6.5123 -7.1053 0.475 -6.1135 -7.9381 0.475 -5.8407 -9.0271 0.475 -5.6188 -10.3651 0.475 -5.3696 -11.9171 0.475 -5.0201 -13.6216 0.475 -4.5099 -15.3958 0.475 -3.7977 -17.1419 0.475 -2.8647 -18.7559 0.475 -1.7169 -20.1361 0.475 -0.3838 -21.1921 0.475 1.0849 -21.8534 0.475 2.6250 -22.0749 0.475 4.1643 -21.8415 0.475 5.6309 -21.1692 0.475 6.9608 -20.1038 0.475 8.1046 -18.7167 0.475 9.0336 -17.0986 0.475 9.7423 -15.3513 0.475 10.2500 -13.5790 0.475 10.5987 -11.8791 0.475 10.8490 -10.3340 0.475 11.0742 -9.0043 0.475 11.3523 -7.9245 0.475 11.7582 -7.1009 0.475 12.3553 -6.5123 0.475 13.1881 -6.1135 0.475 14.2771 -5.8407 0.475 15.6151 -5.6188 0.475 17.1671 -5.3696 0.475 18.8716 -5.0201 0.475 20.6458 -4.5099 0.475 22.3919 -3.7977 0.475 24.0059 -2.8647 0.475 25.3861 -1.7169 0.475 26.4421 -0.3838 0.475 27.1034 1.0849 0.475 = = = 26.1331 2.7500 0.450 25.8121 4.2009 0.450 25.0839 5.5714 0.450 23.9985 6.8034 0.450 22.6289 7.8540 0.450 21.0646 8.7008 0.450 19.4038 9.3437 0.450 17.7445 9.8059 0.450 16.1763 10.1311 0.450 14.7728 10.3799 0.450 13.5859 10.6227 0.450 12.6416 10.9330 0.450 11.9393 11.3793 0.450 11.4526 12.0173 0.450 11.1335 12.8840 0.450 10.9179 13.9922 0.450 10.7327 15.3287 0.450 10.5036 16.8538 0.450 10.1632 18.5039 0.450 9.6576 20.1967 0.450 8.9519 21.8375 0.450 8.0335 23.3277 0.450 6.9130 24.5730 0.450 5.6230 25.4923 0.450 4.2143 26.0242 0.450 2.7500 26.1331 0.450 1.2991 25.8121 0.450 -0.0714 25.0839 0.450 -1.3034 23.9985 0.450 -2.3540 22.6289 0.450 -3.2008 21.0646 0.450 -3.8437 19.4038 0.450 -4.3059 17.7445 0.450 -4.6311 16.1763 0.450 -4.8799 14.7728 0.450 -5.1227 13.5859 0.450 -5.4330 12.6416 0.450 -5.8793 11.9393 0.450 -6.5173 11.4526 0.450 -7.3840 11.1335 0.450 -8.4922 10.9179 0.450 -9.8287 10.7327 0.450 -11.3538 10.5036 0.450 -13.0039 10.1632 0.450 -14.6967 9.6576 0.450 -16.3375 8.9519 0.450 -17.8277 8.0335 0.450 -19.0730 6.9130 0.450 -19.9923 5.6230 0.450 -20.5242 4.2143 0.450 -20.6331 2.7500 0.450 -20.3121 1.2991 0.450 -19.5839 -0.0714 0.450 -18.4985 -1.3034 0.450 -17.1289 -2.3540 0.450 -15.5646 -3.2008 0.450 -13.9038 -3.8437 0.450 -12.2445 -4.3059 0.450 -10.6763 -4.6311 0.450 -9.2728 -4.8799 0.450 -8.0859 -5.1227 0.450 -7.1416 -5.4330 0.450 -6.4393 -5.8793 0.450 -5.9526 -6.5173 0.450 -5.6335 -7.3840 0.450 -5.4179 -8.4922 0.450 -5.2327 -9.8287 0.450 -5.0036 -11.3538 0.450 -4.6632 -13.0039 0.450 -4.1576 -14.6967 0.450 -3.4519 -16.3375 0.450 -2.5335 -17.8277 0.450 -1.4130 -19.0730 0.450 -0.1230 -19.9923 0.450 1.2857 -20.5242 0.450 2.7500 -20.6331 0.450 4.2009 -20.3121 0.450 5.5714 -19.5839 0.450 6.8034 -18.4985 0.450 7.8540 -17.1289 0.450 8.7008 -15.5646 0.450 9.3437 -13.9038 0.450 9.8059 -12.2445 0.450 10.1311 -10.6763 0.450 10.3799 -9.2728 0.450 10.6227 -8.0859 0.450 10.9330 -7.1416 0.450 11.3793 -6.4393 0.450 12.0173 -5.9526 0.450 12.8840 -5.6335 0.450 13.9922 -5.4179 0.450 15.3287 -5.2327 0.450 16.8538 -5.0036 0.450 18.5039 -4.6632 0.450 20.1967 -4.1576 0.450 21.8375 -3.4519 0.450 23.3277 -2.5335 0.450 24.5730 -1.4130 0.450 25.4923 -0.1230 0.450 26.0242 1.2857 0.450 = = = 24.9145 2.8750 0.425 24.5186 4.2367 0.425 23.7479 5.5119 0.425 22.6557 6.6484 0.425 21.3158 7.6098 0.425 19.8155 8.3793 0.425 18.2485 8.9618 0.425 16.7064 9.3836 0.425 15.2708 9.6897 0.425 14.0067 9.9394 0.425 12.9574 10.2003 0.425 12.1412 10.5407 0.425 11.5512 11.0225 0.425 11.1569 11.6944 0.425 10.9083 12.5856 0.425 10.7416 13.7024 0.425 10.5862 15.0260 0.425 10.3726 16.5130 0.425 10.0388 18.0988 0.425 9.5374 19.7023 0.425 8.8397 21.2326 0.425 7.9387 22.5970 0.425 6.8493 23.7092 0.425 5.6065 24.4967 0.425 4.2612 24.9074 0.425 2.8750 24.9145 0.425 1.5133 24.5186 0.425 0.2381 23.7479 0.425 -0.8984 22.6557 0.425 -1.8598 21.3158 0.425 -2.6293 19.8155 0.425 -3.2118 18.2485 0.425 -3.6336 16.7064 0.425 -3.9397 15.2708 0.425 -4.1894 14.0067 0.425 -4.4503 12.9574 0.425 -4.7907 12.1412 0.425 -5.2725 11.5512 0.425 -5.9444 11.1569 0.425 -6.8356 10.9083 0.425 -7.9524 10.7416 0.425 -9.2760 10.5862 0.425 -10.7630 10.3726 0.425 -12.3488 10.0388 0.425 -13.9523 9.5374 0.425 -15.4826 8.8397 0.425 -16.8470 7.9387 0.425 -17.9592 6.8493 0.425 -18.7467 5.6065 0.425 -19.1574 4.2612 0.425 -19.1645 2.8750 0.425 -18.7686 1.5133 0.425 -17.9979 0.2381 0.425 -16.9057 -0.8984 0.425 -15.5658 -1.8598 0.425 -14.0655 -2.6293 0.425 -12.4985 -3.2118 0.425 -10.9564 -3.6336 0.425 -9.5208 -3.9397 0.425 -8.2567 -4.1894 0.425 -7.2074 -4.4503 0.425 -6.3912 -4.7907 0.425 -5.8012 -5.2725 0.425 -5.4069 -5.9444 0.425 -5.1583 -6.8356 0.425 -4.9916 -7.9524 0.425 -4.8362 -9.2760 0.425 -4.6226 -10.7630 0.425 -4.2888 -12.3488 0.425 -3.7874 -13.9523 0.425 -3.0897 -15.4826 0.425 -2.1887 -16.8470 0.425 -1.0993 -17.9592 0.425 0.1435 -18.7467 0.425 1.4888 -19.1574 0.425 2.8750 -19.1645 0.425 4.2367 -18.7686 0.425 5.5119 -17.9979 0.425 6.6484 -16.9057 0.425 7.6098 -15.5658 0.425 8.3793 -14.0655 0.425 8.9618 -12.4985 0.425 9.3836 -10.9564 0.425 9.6897 -9.5208 0.425 9.9394 -8.2567 0.425 10.2003 -7.2074 0.425 10.5407 -6.3912 0.425 11.0225 -5.8012 0.425 11.6944 -5.4069 0.425 12.5856 -5.1583 0.425 13.7024 -4.9916 0.425 15.0260 -4.8362 0.425 16.5130 -4.6226 0.425 18.0988 -4.2888 0.425 19.7023 -3.7874 0.425 21.2326 -3.0897 0.425 22.5970 -2.1887 0.425 23.7092 -1.0993 0.425 24.4967 0.1435 0.425 24.9074 1.4888 0.425 = = = 23.6745 3.0000 0.400 23.2164 4.2719 0.400 22.4166 5.4529 0.400 21.3305 6.4967 0.400 20.0315 7.3729 0.400 18.6043 8.0701 0.400 17.1373 8.5974 0.400 15.7154 8.9834 0.400 14.4121 9.2738 0.400 13.2840 9.5264 0.400 12.3662 9.8049 0.400 11.6701 10.1725 0.400 11.1832 10.6845 0.400 10.8717 11.3825 0.400 10.6843 12.2887 0.400 10.5585 13.4034 0.400 10.4269 14.7030 0.400 10.2246 16.1415 0.400 9.8956 17.6540 0.400 9.3987 19.1613 0.400 8.7112 20.5771 0.400 7.8309 21.8152 0.400 6.7765 22.7971 0.400 5.5846 23.4590 0.400 4.3060 23.7578 0.400 3.0000 23.6745 0.400 1.7281 23.2164 0.400 0.5471 22.4166 0.400 -0.4967 21.3305 0.400 -1.3729 20.0315 0.400 -2.0701 18.6043 0.400 -2.5974 17.1373 0.400 -2.9834 15.7154 0.400 -3.2738 14.4121 0.400 -3.5264 13.2840 0.400 -3.8049 12.3662 0.400 -4.1725 11.6701 0.400 -4.6845 11.1832 0.400 -5.3825 10.8717 0.400 -6.2887 10.6843 0.400 -7.4034 10.5585 0.400 -8.7030 10.4269 0.400 -10.1415 10.2246 0.400 -11.6540 9.8956 0.400 -13.1613 9.3987 0.400 -14.5771 8.7112 0.400 -15.8152 7.8309 0.400 -16.7971 6.7765 0.400 -17.4590 5.5846 0.400 -17.7578 4.3060 0.400 -17.6745 3.0000 0.400 -17.2164 1.7281 0.400 -16.4166 0.5471 0.400 -15.3305 -0.4967 0.400 -14.0315 -1.3729 0.400 -12.6043 -2.0701 0.400 -11.1373 -2.5974 0.400 -9.7154 -2.9834 0.400 -8.4121 -3.2738 0.400 -7.2840 -3.5264 0.400 -6.3662 -3.8049 0.400 -5.6701 -4.1725 0.400 -5.1832 -4.6845 0.400 -4.8717 -5.3825 0.400 -4.6843 -6.2887 0.400 -4.5585 -7.4034 0.400 -4.4269 -8.7030 0.400 -4.2246 -10.1415 0.400 -3.8956 -11.6540 0.400 -3.3987 -13.1613 0.400 -2.7112 -14.5771 0.400 -1.8309 -15.8152 0.400 -0.7765 -16.7971 0.400 0.4154 -17.4590 0.400 1.6940 -17.7578 0.400 3.0000 -17.6745 0.400 4.2719 -17.2164 0.400 5.4529 -16.4166 0.400 6.4967 -15.3305 0.400 7.3729 -14.0315 0.400 8.0701 -12.6043 0.400 8.5974 -11.1373 0.400 8.9834 -9.7154 0.400 9.2738 -8.4121 0.400 9.5264 -7.2840 0.400 9.8049 -6.3662 0.400 10.1725 -5.6701 0.400 10.6845 -5.1832 0.400 11.3825 -4.8717 0.400 12.2887 -4.6843 0.400 13.4034 -4.5585 0.400 14.7030 -4.4269 0.400 16.1415 -4.2246 0.400 17.6540 -3.8956 0.400 19.1613 -3.3987 0.400 20.5771 -2.7112 0.400 21.8152 -1.8309 0.400 22.7971 -0.7765 0.400 23.4590 0.4154 0.400 23.7578 1.6940 0.400 = = = 22.4184 3.1250 0.375 21.9111 4.3069 0.375 21.0951 5.3952 0.375 20.0273 6.3493 0.375 18.7797 7.1444 0.375 17.4335 7.7741 0.375 16.0715 8.2509 0.375 14.7715 8.6054 0.375 13.5989 8.8831 0.375 12.6023 9.1395 0.375 11.8092 9.4345 0.375 11.2246 9.8255 0.375 10.8313 10.3617 0.375 10.5930 11.0776 0.375 10.4581 11.9892 0.375 10.3658 13.0912 0.375 10.2525 14.3561 0.375 10.0582 15.7364 0.375 9.7329 17.1675 0.375 9.2413 18.5731 0.375 8.5664 19.8718 0.375 7.7105 20.9843 0.375 6.6951 21.8400 0.375 5.5579 22.3836 0.375 4.3490 22.5802 0.375 3.1250 22.4184 0.375 1.9431 21.9111 0.375 0.8548 21.0951 0.375 -0.0993 20.0273 0.375 -0.8944 18.7797 0.375 -1.5241 17.4335 0.375 -2.0009 16.0715 0.375 -2.3554 14.7715 0.375 -2.6331 13.5989 0.375 -2.8895 12.6023 0.375 -3.1845 11.8092 0.375 -3.5755 11.2246 0.375 -4.1117 10.8313 0.375 -4.8276 10.5930 0.375 -5.7392 10.4581 0.375 -6.8412 10.3658 0.375 -8.1061 10.2525 0.375 -9.4864 10.0582 0.375 -10.9175 9.7329 0.375 -12.3231 9.2413 0.375 -13.6218 8.5664 0.375 -14.7343 7.7105 0.375 -15.5900 6.6951 0.375 -16.1336 5.5579 0.375 -16.3302 4.3490 0.375 -16.1684 3.1250 0.375 -15.6611 1.9431 0.375 -14.8451 0.8548 0.375 -13.7773 -0.0993 0.375 -12.5297 -0.8944 0.375 -11.1835 -1.5241 0.375 -9.8215 -2.0009 0.375 -8.5215 -2.3554 0.375 -7.3489 -2.6331 0.375 -6.3523 -2.8895 0.375 -5.5592 -3.1845 0.375 -4.9746 -3.5755 0.375 -4.5813 -4.1117 0.375 -4.3430 -4.8276 0.375 -4.2081 -5.7392 0.375 -4.1158 -6.8412 0.375 -4.0025 -8.1061 0.375 -3.8082 -9.4864 0.375 -3.4829 -10.9175 0.375 -2.9913 -12.3231 0.375 -2.3164 -13.6218 0.375 -1.4605 -14.7343 0.375 -0.4451 -15.5900 0.375 0.6921 -16.1336 0.375 1.9010 -16.3302 0.375 3.1250 -16.1684 0.375 4.3069 -15.6611 0.375 5.3952 -14.8451 0.375 6.3493 -13.7773 0.375 7.1444 -12.5297 0.375 7.7741 -11.1835 0.375 8.2509 -9.8215 0.375 8.6054 -8.5215 0.375 8.8831 -7.3489 0.375 9.1395 -6.3523 0.375 9.4345 -5.5592 0.375 9.8255 -4.9746 0.375 10.3617 -4.5813 0.375 11.0776 -4.3430 0.375 11.9892 -4.2081 0.375 13.0912 -4.1158 0.375 14.3561 -4.0025 0.375 15.7364 -3.8082 0.375 17.1675 -3.4829 0.375 18.5731 -2.9913 0.375 19.8718 -2.3164 0.375 20.9843 -1.4605 0.375 21.8400 -0.4451 0.375 22.3836 0.6921 0.375 22.5802 1.9010 0.375 = = = 21.1516 3.2500 0.350 20.6081 4.3421 0.350 19.7886 5.3393 0.350 18.7504 6.2069 0.350 17.5636 6.9251 0.350 16.3052 7.4919 0.350 15.0519 7.9227 0.350 13.8742 8.2494 0.350 12.8298 8.5165 0.350 11.9593 8.7771 0.350 11.2833 9.0865 0.350 10.8010 9.4968 0.350 10.4918 10.0505 0.350 10.3173 10.7759 0.350 10.2264 11.6830 0.350 10.1608 12.7619 0.350 10.0609 13.9822 0.350 9.8720 15.2953 0.350 9.5499 16.6379 0.350 9.0651 17.9374 0.350 8.4057 19.1177 0.350 7.5780 20.1066 0.350 6.6057 20.8413 0.350 5.5271 21.2748 0.350 4.3906 21.3799 0.350 3.2500 21.1516 0.350 2.1579 20.6081 0.350 1.1607 19.7886 0.350 0.2931 18.7504 0.350 -0.4251 17.5636 0.350 -0.9919 16.3052 0.350 -1.4227 15.0519 0.350 -1.7494 13.8742 0.350 -2.0165 12.8298 0.350 -2.2771 11.9593 0.350 -2.5865 11.2833 0.350 -2.9968 10.8010 0.350 -3.5505 10.4918 0.350 -4.2759 10.3173 0.350 -5.1830 10.2264 0.350 -6.2619 10.1608 0.350 -7.4822 10.0609 0.350 -8.7953 9.8720 0.350 -10.1379 9.5499 0.350 -11.4374 9.0651 0.350 -12.6177 8.4057 0.350 -13.6066 7.5780 0.350 -14.3413 6.6057 0.350 -14.7748 5.5271 0.350 -14.8799 4.3906 0.350 -14.6516 3.2500 0.350 -14.1081 2.1579 0.350 -13.2886 1.1607 0.350 -12.2504 0.2931 0.350 -11.0636 -0.4251 0.350 -9.8052 -0.9919 0.350 -8.5519 -1.4227 0.350 -7.3742 -1.7494 0.350 -6.3298 -2.0165 0.350 -5.4593 -2.2771 0.350 -4.7833 -2.5865 0.350 -4.3010 -2.9968 0.350 -3.9918 -3.5505 0.350 -3.8173 -4.2759 0.350 -3.7264 -5.1830 0.350 -3.6608 -6.2619 0.350 -3.5609 -7.4822 0.350 -3.3720 -8.7953 0.350 -3.0499 -10.1379 0.350 -2.5651 -11.4374 0.350 -1.9057 -12.6177 0.350 -1.0780 -13.6066 0.350 -0.1057 -14.3413 0.350 0.9729 -14.7748 0.350 2.1094 -14.8799 0.350 3.2500 -14.6516 0.350 4.3421 -14.1081 0.350 5.3393 -13.2886 0.350 6.2069 -12.2504 0.350 6.9251 -11.0636 0.350 7.4919 -9.8052 0.350 7.9227 -8.5519 0.350 8.2494 -7.3742 0.350 8.5165 -6.3298 0.350 8.7771 -5.4593 0.350 9.0865 -4.7833 0.350 9.4968 -4.3010 0.350 10.0505 -3.9918 0.350 10.7759 -3.8173 0.350 11.6830 -3.7264 0.350 12.7619 -3.6608 0.350 13.9822 -3.5609 0.350 15.2953 -3.3720 0.350 16.6379 -3.0499 0.350 17.9374 -2.5651 0.350 19.1177 -1.9057 0.350 20.1066 -1.0780 0.350 20.8413 -0.1057 0.350 21.2748 0.9729 0.350 21.3799 2.1094 0.350 = = = 19.8796 3.3750 0.325 19.3124 4.3777 0.325 18.5015 5.2859 0.325 17.5036 6.0702 0.325 16.3861 6.7157 0.325 15.2210 7.2240 0.325 14.0789 7.6130 0.325 13.0227 7.9149 0.325 12.1026 8.1731 0.325 11.3519 8.4373 0.325 10.7848 8.7585 0.325 10.3956 9.1830 0.325 10.1607 9.7472 0.325 10.0408 10.4733 0.325 9.9860 11.3663 0.325 9.9409 12.4121 0.325 9.8502 13.5783 0.325 9.6648 14.8161 0.325 9.3462 16.0644 0.325 8.8703 17.2545 0.325 8.2298 18.3164 0.325 7.4343 19.1848 0.325 6.5092 19.8048 0.325 5.4926 20.1372 0.325 4.4311 20.1618 0.325 3.3750 19.8796 0.325 2.3723 19.3124 0.325 1.4641 18.5015 0.325 0.6798 17.5036 0.325 0.0343 16.3861 0.325 -0.4740 15.2210 0.325 -0.8630 14.0789 0.325 -1.1649 13.0227 0.325 -1.4231 12.1026 0.325 -1.6873 11.3519 0.325 -2.0085 10.7848 0.325 -2.4330 10.3956 0.325 -2.9972 10.1607 0.325 -3.7233 10.0408 0.325 -4.6163 9.9860 0.325 -5.6621 9.9409 0.325 -6.8283 9.8502 0.325 -8.0661 9.6648 0.325 -9.3144 9.3462 0.325 -10.5045 8.8703 0.325 -11.5664 8.2298 0.325 -12.4348 7.4343 0.325 -13.0548 6.5092 0.325 -13.3872 5.4926 0.325 -13.4118 4.4311 0.325 -13.1296 3.3750 0.325 -12.5624 2.3723 0.325 -11.7515 1.4641 0.325 -10.7536 0.6798 0.325 -9.6361 0.0343 0.325 -8.4710 -0.4740 0.325 -7.3289 -0.8630 0.325 -6.2727 -1.1649 0.325 -5.3526 -1.4231 0.325 -4.6019 -1.6873 0.325 -4.0348 -2.0085 0.325 -3.6456 -2.4330 0.325 -3.4107 -2.9972 0.325 -3.2908 -3.7233 0.325 -3.2360 -4.6163 0.325 -3.1909 -5.6621 0.325 -3.1002 -6.8283 0.325 -2.9148 -8.0661 0.325 -2.5962 -9.3144 0.325 -2.1203 -10.5045 0.325 -1.4798 -11.5664 0.325 -0.6843 -12.4348 0.325 0.2408 -13.0548 0.325 1.2574 -13.3872 0.325 2.3189 -13.4118 0.325 3.3750 -13.1296 0.325 4.3777 -12.5624 0.325 5.2859 -11.7515 0.325 6.0702 -10.7536 0.325 6.7157 -9.6361 0.325 7.2240 -8.4710 0.325 7.6130 -7.3289 0.325 7.9149 -6.2727 0.325 8.1731 -5.3526 0.325 8.4373 -4.6019 0.325 8.7585 -4.0348 0.325 9.1830 -3.6456 0.325 9.7472 -3.4107 0.325 10.4733 -3.2908 0.325 11.3663 -3.2360 0.325 12.4121 -3.1909 0.325 13.5783 -3.1002 0.325 14.8161 -2.9148 0.325 16.0644 -2.5962 0.325 17.2545 -2.1203 0.325 18.3164 -1.4798 0.325 19.1848 -0.6843 0.325 19.8048 0.2408 0.325 20.1372 1.2574 0.325 20.1618 2.3189 0.325 = = = 18.6076 3.5000 0.300 18.0292 4.4141 0.300 17.2384 5.2356 0.300 16.2905 5.9399 0.300 15.2495 6.5168 0.300 14.1821 6.9708 0.300 13.1523 7.3216 0.300 12.2157 7.6013 0.300 11.4151 7.8514 0.300 10.7771 8.1182 0.300 10.3100 8.4478 0.300 10.0044 8.8809 0.300 9.8341 9.4481 0.300 9.7600 10.1662 0.300 9.7338 11.0354 0.300 9.7036 12.0385 0.300 9.6189 13.1418 0.300 9.4359 14.2973 0.300 9.1215 15.4464 0.300 8.6571 16.5252 0.300 8.0391 17.4699 0.300 7.2800 18.2221 0.300 6.4062 18.7347 0.300 5.4550 18.9757 0.300 4.4709 18.9314 0.300 3.5000 18.6076 0.300 2.5859 18.0292 0.300 1.7644 17.2384 0.300 1.0601 16.2905 0.300 0.4832 15.2495 0.300 0.0292 14.1821 0.300 -0.3216 13.1523 0.300 -0.6013 12.2157 0.300 -0.8514 11.4151 0.300 -1.1182 10.7771 0.300 -1.4478 10.3100 0.300 -1.8809 10.0044 0.300 -2.4481 9.8341 0.300 -3.1662 9.7600 0.300 -4.0354 9.7338 0.300 -5.0385 9.7036 0.300 -6.1418 9.6189 0.300 -7.2973 9.4359 0.300 -8.4464 9.1215 0.300 -9.5252 8.6571 0.300 -10.4699 8.0391 0.300 -11.2221 7.2800 0.300 -11.7347 6.4062 0.300 -11.9757 5.4550 0.300 -11.9314 4.4709 0.300 -11.6076 3.5000 0.300 -11.0292 2.5859 0.300 -10.2384 1.7644 0.300 -9.2905 1.0601 0.300 -8.2495 0.4832 0.300 -7.1821 0.0292 0.300 -6.1523 -0.3216 0.300 -5.2157 -0.6013 0.300 -4.4151 -0.8514 0.300 -3.7771 -1.1182 0.300 -3.3100 -1.4478 0.300 -3.0044 -1.8809 0.300 -2.8341 -2.4481 0.300 -2.7600 -3.1662 0.300 -2.7338 -4.0354 0.300 -2.7036 -5.0385 0.300 -2.6189 -6.1418 0.300 -2.4359 -7.2973 0.300 -2.1215 -8.4464 0.300 -1.6571 -9.5252 0.300 -1.0391 -10.4699 0.300 -0.2800 -11.2221 0.300 0.5938 -11.7347 0.300 1.5450 -11.9757 0.300 2.5291 -11.9314 0.300 3.5000 -11.6076 0.300 4.4141 -11.0292 0.300 5.2356 -10.2384 0.300 5.9399 -9.2905 0.300 6.5168 -8.2495 0.300 6.9708 -7.1821 0.300 7.3216 -6.1523 0.300 7.6013 -5.2157 0.300 7.8514 -4.4151 0.300 8.1182 -3.7771 0.300 8.4478 -3.3100 0.300 8.8809 -3.0044 0.300 9.4481 -2.8341 0.300 10.1662 -2.7600 0.300 11.0354 -2.7338 0.300 12.0385 -2.7036 0.300 13.1418 -2.6189 0.300 14.2973 -2.4359 0.300 15.4464 -2.1215 0.300 16.5252 -1.6571 0.300 17.4699 -1.0391 0.300 18.2221 -0.2800 0.300 18.7347 0.5938 0.300 18.9757 1.5450 0.300 18.9314 2.5291 0.300 = = = 17.3408 3.6250 0.275 16.7632 4.4516 0.275 16.0033 5.1887 0.275 15.1142 5.8167 0.275 14.1557 6.3288 0.275 13.1890 6.7325 0.275 12.2714 7.0484 0.275 11.4514 7.3078 0.275 10.7646 7.5500 0.275 10.2314 7.8175 0.275 9.8552 8.1515 0.275 9.6233 8.5872 0.275 9.5083 9.1498 0.275 9.4715 9.8509 0.275 9.4671 10.6868 0.275 9.4469 11.6382 0.275 9.3655 12.6707 0.275 9.1844 13.7376 0.275 8.8760 14.7839 0.275 8.4259 15.7508 0.275 7.8345 16.5805 0.275 7.1161 17.2220 0.275 6.2976 17.6354 0.275 5.4151 17.7954 0.275 4.5101 17.6938 0.275 3.6250 17.3408 0.275 2.7984 16.7632 0.275 2.0613 16.0033 0.275 1.4333 15.1142 0.275 0.9212 14.1557 0.275 0.5175 13.1890 0.275 0.2016 12.2714 0.275 -0.0578 11.4514 0.275 -0.3000 10.7646 0.275 -0.5675 10.2314 0.275 -0.9015 9.8552 0.275 -1.3372 9.6233 0.275 -1.8998 9.5083 0.275 -2.6009 9.4715 0.275 -3.4368 9.4671 0.275 -4.3882 9.4469 0.275 -5.4207 9.3655 0.275 -6.4876 9.1844 0.275 -7.5339 8.8760 0.275 -8.5008 8.4259 0.275 -9.3305 7.8345 0.275 -9.9720 7.1161 0.275 -10.3854 6.2976 0.275 -10.5454 5.4151 0.275 -10.4438 4.5101 0.275 -10.0908 3.6250 0.275 -9.5132 2.7984 0.275 -8.7533 2.0613 0.275 -7.8642 1.4333 0.275 -6.9057 0.9212 0.275 -5.9390 0.5175 0.275 -5.0214 0.2016 0.275 -4.2014 -0.0578 0.275 -3.5146 -0.3000 0.275 -2.9814 -0.5675 0.275 -2.6052 -0.9015 0.275 -2.3733 -1.3372 0.275 -2.2583 -1.8998 0.275 -2.2215 -2.6009 0.275 -2.2171 -3.4368 0.275 -2.1969 -4.3882 0.275 -2.1155 -5.4207 0.275 -1.9344 -6.4876 0.275 -1.6260 -7.5339 0.275 -1.1759 -8.5008 0.275 -0.5845 -9.3305 0.275 0.1339 -9.9720 0.275 0.9524 -10.3854 0.275 1.8349 -10.5454 0.275 2.7399 -10.4438 0.275 3.6250 -10.0908 0.275 4.4516 -9.5132 0.275 5.1887 -8.7533 0.275 5.8167 -7.8642 0.275 6.3288 -6.9057 0.275 6.7325 -5.9390 0.275 7.0484 -5.0214 0.275 7.3078 -4.2014 0.275 7.5500 -3.5146 0.275 7.8175 -2.9814 0.275 8.1515 -2.6052 0.275 8.5872 -2.3733 0.275 9.1498 -2.2583 0.275 9.8509 -2.2215 0.275 10.6868 -2.2171 0.275 11.6382 -2.1969 0.275 12.6707 -2.1155 0.275 13.7376 -1.9344 0.275 14.7839 -1.6260 0.275 15.7508 -1.1759 0.275 16.5805 -0.5845 0.275 17.2220 0.1339 0.275 17.6354 0.9524 0.275 17.7954 1.8349 0.275 17.6938 2.7399 0.275 = = = 16.0842 3.7500 0.250 15.5190 4.4904 0.250 14.7998 5.1459 0.250 13.9771 5.7009 0.250 13.1061 6.1522 0.250 12.2420 6.5092 0.250 11.4353 6.7928 0.250 10.7275 7.0334 0.250 10.1479 7.2673 0.250 9.7110 7.5330 0.250 9.4163 7.8668 0.250 9.2484 8.2986 0.250 9.1794 8.8485 0.250 9.1719 9.5237 0.250 9.1830 10.3174 0.250 9.1690 11.2085 0.250 9.0891 12.1630 0.250 8.9102 13.1364 0.250 8.6097 14.0775 0.250 8.1776 14.9328 0.250 7.6169 15.6511 0.250 6.9436 16.1884 0.250 6.1844 16.5115 0.250 5.3735 16.6012 0.250 4.5493 16.4544 0.250 3.7500 16.0842 0.250 3.0096 15.5190 0.250 2.3541 14.7998 0.250 1.7991 13.9771 0.250 1.3478 13.1061 0.250 0.9908 12.2420 0.250 0.7072 11.4353 0.250 0.4666 10.7275 0.250 0.2327 10.1479 0.250 -0.0330 9.7110 0.250 -0.3668 9.4163 0.250 -0.7986 9.2484 0.250 -1.3485 9.1794 0.250 -2.0237 9.1719 0.250 -2.8174 9.1830 0.250 -3.7085 9.1690 0.250 -4.6630 9.0891 0.250 -5.6364 8.9102 0.250 -6.5775 8.6097 0.250 -7.4328 8.1776 0.250 -8.1511 7.6169 0.250 -8.6884 6.9436 0.250 -9.0115 6.1844 0.250 -9.1012 5.3735 0.250 -8.9544 4.5493 0.250 -8.5842 3.7500 0.250 -8.0190 3.0096 0.250 -7.2998 2.3541 0.250 -6.4771 1.7991 0.250 -5.6061 1.3478 0.250 -4.7420 0.9908 0.250 -3.9353 0.7072 0.250 -3.2275 0.4666 0.250 -2.6479 0.2327 0.250 -2.2110 -0.0330 0.250 -1.9163 -0.3668 0.250 -1.7484 -0.7986 0.250 -1.6794 -1.3485 0.250 -1.6719 -2.0237 0.250 -1.6830 -2.8174 0.250 -1.6690 -3.7085 0.250 -1.5891 -4.6630 0.250 -1.4102 -5.6364 0.250 -1.1097 -6.5775 0.250 -0.6776 -7.4328 0.250 -0.1169 -8.1511 0.250 0.5564 -8.6884 0.250 1.3156 -9.0115 0.250 2.1265 -9.1012 0.250 2.9507 -8.9544 0.250 3.7500 -8.5842 0.250 4.4904 -8.0190 0.250 5.1459 -7.2998 0.250 5.7009 -6.4771 0.250 6.1522 -5.6061 0.250 6.5092 -4.7420 0.250 6.7928 -3.9353 0.250 7.0334 -3.2275 0.250 7.2673 -2.6479 0.250 7.5330 -2.2110 0.250 7.8668 -1.9163 0.250 8.2986 -1.7484 0.250 8.8485 -1.6794 0.250 9.5237 -1.6719 0.250 10.3174 -1.6830 0.250 11.2085 -1.6690 0.250 12.1630 -1.5891 0.250 13.1364 -1.4102 0.250 14.0775 -1.1097 0.250 14.9328 -0.6776 0.250 15.6511 -0.1169 0.250 16.1884 0.5564 0.250 16.5115 1.3156 0.250 16.6012 2.1265 0.250 16.4544 2.9507 0.250 = = = 14.8428 3.8750 0.225 14.3006 4.5309 0.225 13.6312 5.1075 0.225 12.8815 5.5931 0.225 12.1016 5.9872 0.225 11.3407 6.3007 0.225 10.6424 6.5544 0.225 10.0417 6.7768 0.225 9.5617 7.0013 0.225 9.2122 7.2621 0.225 8.9891 7.5906 0.225 8.8755 8.0118 0.225 8.8437 8.5409 0.225 8.8581 9.1815 0.225 8.8794 9.9243 0.225 8.8680 10.7473 0.225 8.7886 11.6176 0.225 8.6130 12.4934 0.225 8.3232 13.3279 0.225 7.9128 14.0734 0.225 7.3874 14.6850 0.225 6.7636 15.1254 0.225 6.0674 15.3678 0.225 5.3307 15.3984 0.225 4.5887 15.2183 0.225 3.8750 14.8428 0.225 3.2191 14.3006 0.225 2.6425 13.6312 0.225 2.1569 12.8815 0.225 1.7628 12.1016 0.225 1.4493 11.3407 0.225 1.1956 10.6424 0.225 0.9732 10.0417 0.225 0.7487 9.5617 0.225 0.4879 9.2122 0.225 0.1594 8.9891 0.225 -0.2618 8.8755 0.225 -0.7909 8.8437 0.225 -1.4315 8.8581 0.225 -2.1743 8.8794 0.225 -2.9973 8.8680 0.225 -3.8676 8.7886 0.225 -4.7434 8.6130 0.225 -5.5779 8.3232 0.225 -6.3234 7.9128 0.225 -6.9350 7.3874 0.225 -7.3754 6.7636 0.225 -7.6178 6.0674 0.225 -7.6484 5.3307 0.225 -7.4683 4.5887 0.225 -7.0928 3.8750 0.225 -6.5506 3.2191 0.225 -5.8812 2.6425 0.225 -5.1315 2.1569 0.225 -4.3516 1.7628 0.225 -3.5907 1.4493 0.225 -2.8924 1.1956 0.225 -2.2917 0.9732 0.225 -1.8117 0.7487 0.225 -1.4622 0.4879 0.225 -1.2391 0.1594 0.225 -1.1255 -0.2618 0.225 -1.0937 -0.7909 0.225 -1.1081 -1.4315 0.225 -1.1294 -2.1743 0.225 -1.1180 -2.9973 0.225 -1.0386 -3.8676 0.225 -0.8630 -4.7434 0.225 -0.5732 -5.5779 0.225 -0.1628 -6.3234 0.225 0.3626 -6.9350 0.225 0.9864 -7.3754 0.225 1.6826 -7.6178 0.225 2.4193 -7.6484 0.225 3.1613 -7.4683 0.225 3.8750 -7.0928 0.225 4.5309 -6.5506 0.225 5.1075 -5.8812 0.225 5.5931 -5.1315 0.225 5.9872 -4.3516 0.225 6.3007 -3.5907 0.225 6.5544 -2.8924 0.225 6.7768 -2.2917 0.225 7.0013 -1.8117 0.225 7.2621 -1.4622 0.225 7.5906 -1.2391 0.225 8.0118 -1.1255 0.225 8.5409 -1.0937 0.225 9.1815 -1.1081 0.225 9.9243 -1.1294 0.225 10.7473 -1.1180 0.225 11.6176 -1.0386 0.225 12.4934 -0.8630 0.225 13.3279 -0.5732 0.225 14.0734 -0.1628 0.225 14.6850 0.3626 0.225 15.1254 0.9864 0.225 15.3678 1.6826 0.225 15.3984 2.4193 0.225 15.2183 3.1613 0.225 = = = 13.6211 4.0000 0.200 13.1120 4.5733 0.200 12.5004 5.0739 0.200 11.8291 5.4935 0.200 11.1427 5.8339 0.200 10.4841 6.1068 0.200 9.8906 6.3323 0.200 9.3908 6.5367 0.200 9.0024 6.7501 0.200 8.7308 7.0023 0.200 8.5695 7.3200 0.200 8.5008 7.7233 0.200 8.4976 8.2236 0.200 8.5272 8.8210 0.200 8.5539 9.5047 0.200 8.5428 10.2527 0.200 8.4636 11.0335 0.200 8.2929 11.8088 0.200 8.0171 12.5367 0.200 7.6327 13.1751 0.200 7.1471 13.6856 0.200 6.5771 14.0373 0.200 5.9475 14.2091 0.200 5.2876 14.1922 0.200 4.6286 13.9905 0.200 4.0000 13.6211 0.200 3.4267 13.1120 0.200 2.9261 12.5004 0.200 2.5065 11.8291 0.200 2.1661 11.1427 0.200 1.8932 10.4841 0.200 1.6677 9.8906 0.200 1.4633 9.3908 0.200 1.2499 9.0024 0.200 0.9977 8.7308 0.200 0.6800 8.5695 0.200 0.2767 8.5008 0.200 -0.2236 8.4976 0.200 -0.8210 8.5272 0.200 -1.5047 8.5539 0.200 -2.2527 8.5428 0.200 -3.0335 8.4636 0.200 -3.8088 8.2929 0.200 -4.5367 8.0171 0.200 -5.1751 7.6327 0.200 -5.6856 7.1471 0.200 -6.0373 6.5771 0.200 -6.2091 5.9475 0.200 -6.1922 5.2876 0.200 -5.9905 4.6286 0.200 -5.6211 4.0000 0.200 -5.1120 3.4267 0.200 -4.5004 2.9261 0.200 -3.8291 2.5065 0.200 -3.1427 2.1661 0.200 -2.4841 1.8932 0.200 -1.8906 1.6677 0.200 -1.3908 1.4633 0.200 -1.0024 1.2499 0.200 -0.7308 0.9977 0.200 -0.5695 0.6800 0.200 -0.5008 0.2767 0.200 -0.4976 -0.2236 0.200 -0.5272 -0.8210 0.200 -0.5539 -1.5047 0.200 -0.5428 -2.2527 0.200 -0.4636 -3.0335 0.200 -0.2929 -3.8088 0.200 -0.0171 -4.5367 0.200 0.3673 -5.1751 0.200 0.8529 -5.6856 0.200 1.4229 -6.0373 0.200 2.0525 -6.2091 0.200 2.7124 -6.1922 0.200 3.3714 -5.9905 0.200 4.0000 -5.6211 0.200 4.5733 -5.1120 0.200 5.0739 -4.5004 0.200 5.4935 -3.8291 0.200 5.8339 -3.1427 0.200 6.1068 -2.4841 0.200 6.3323 -1.8906 0.200 6.5367 -1.3908 0.200 6.7501 -1.0024 0.200 7.0023 -0.7308 0.200 7.3200 -0.5695 0.200 7.7233 -0.5008 0.200 8.2236 -0.4976 0.200 8.8210 -0.5272 0.200 9.5047 -0.5539 0.200 10.2527 -0.5428 0.200 11.0335 -0.4636 0.200 11.8088 -0.2929 0.200 12.5367 -0.0171 0.200 13.1751 0.3673 0.200 13.6856 0.8529 0.200 14.0373 1.4229 0.200 14.2091 2.0525 0.200 14.1922 2.7124 0.200 13.9905 3.3714 0.200 = = = 12.4235 4.1250 0.175 11.9567 4.6177 0.175 11.4098 5.0453 0.175 10.8210 5.4023 0.175 10.2292 5.6923 0.175 9.6711 5.9271 0.175 9.1777 6.1255 0.175 8.7717 6.3116 0.175 8.4660 6.5115 0.175 8.2627 6.7509 0.175 8.1534 7.0518 0.175 8.1202 7.4301 0.175 8.1379 7.8934 0.175 8.1766 8.4395 0.175 8.2047 9.0565 0.175 8.1923 9.7231 0.175 8.1137 10.4102 0.175 7.9504 11.0833 0.175 7.6921 11.7056 0.175 7.3383 12.2408 0.175 6.8972 12.6569 0.175 6.3854 12.9287 0.175 5.8257 13.0406 0.175 5.2446 12.9875 0.175 4.6693 12.7760 0.175 4.1250 12.4235 0.175 3.6323 11.9567 0.175 3.2047 11.4098 0.175 2.8477 10.8210 0.175 2.5577 10.2292 0.175 2.3229 9.6711 0.175 2.1245 9.1777 0.175 1.9384 8.7717 0.175 1.7385 8.4660 0.175 1.4991 8.2627 0.175 1.1982 8.1534 0.175 0.8199 8.1202 0.175 0.3566 8.1379 0.175 -0.1895 8.1766 0.175 -0.8065 8.2047 0.175 -1.4731 8.1923 0.175 -2.1602 8.1137 0.175 -2.8333 7.9504 0.175 -3.4556 7.6921 0.175 -3.9908 7.3383 0.175 -4.4069 6.8972 0.175 -4.6787 6.3854 0.175 -4.7906 5.8257 0.175 -4.7375 5.2446 0.175 -4.5260 4.6693 0.175 -4.1735 4.1250 0.175 -3.7067 3.6323 0.175 -3.1598 3.2047 0.175 -2.5710 2.8477 0.175 -1.9792 2.5577 0.175 -1.4211 2.3229 0.175 -0.9277 2.1245 0.175 -0.5217 1.9384 0.175 -0.2160 1.7385 0.175 -0.0127 1.4991 0.175 0.0966 1.1982 0.175 0.1298 0.8199 0.175 0.1121 0.3566 0.175 0.0734 -0.1895 0.175 0.0453 -0.8065 0.175 0.0577 -1.4731 0.175 0.1363 -2.1602 0.175 0.2996 -2.8333 0.175 0.5579 -3.4556 0.175 0.9117 -3.9908 0.175 1.3528 -4.4069 0.175 1.8646 -4.6787 0.175 2.4243 -4.7906 0.175 3.0054 -4.7375 0.175 3.5807 -4.5260 0.175 4.1250 -4.1735 0.175 4.6177 -3.7067 0.175 5.0453 -3.1598 0.175 5.4023 -2.5710 0.175 5.6923 -1.9792 0.175 5.9271 -1.4211 0.175 6.1255 -0.9277 0.175 6.3116 -0.5217 0.175 6.5115 -0.2160 0.175 6.7509 -0.0127 0.175 7.0518 0.0966 0.175 7.4301 0.1298 0.175 7.8934 0.1121 0.175 8.4395 0.0734 0.175 9.0565 0.0453 0.175 9.7231 0.0577 0.175 10.4102 0.1363 0.175 11.0833 0.2996 0.175 11.7056 0.5579 0.175 12.2408 0.9117 0.175 12.6569 1.3528 0.175 12.9287 1.8646 0.175 13.0406 2.4243 0.175 12.9875 3.0054 0.175 12.7760 3.5807 0.175 = = = 11.2538 4.2500 0.150 10.8377 4.6645 0.150 10.3613 5.0220 0.150 9.8579 5.3198 0.150 9.3606 5.5622 0.150 8.8999 5.7609 0.150 8.5008 5.9330 0.150 8.1808 6.0997 0.150 7.9486 6.2833 0.150 7.8037 6.5052 0.150 7.7366 6.7832 0.150 7.7301 7.1290 0.150 7.7613 7.5473 0.150 7.8037 8.0343 0.150 7.8302 8.5777 0.150 7.8156 9.1576 0.150 7.7390 9.7477 0.150 7.5859 10.3180 0.150 7.3495 10.8367 0.150 7.0309 11.2737 0.150 6.6391 11.6028 0.150 6.1896 11.8044 0.150 5.7031 11.8672 0.150 5.2025 11.7895 0.150 4.7111 11.5794 0.150 4.2500 11.2538 0.150 3.8355 10.8377 0.150 3.4780 10.3613 0.150 3.1802 9.8579 0.150 2.9378 9.3606 0.150 2.7391 8.8999 0.150 2.5670 8.5008 0.150 2.4003 8.1808 0.150 2.2167 7.9486 0.150 1.9948 7.8037 0.150 1.7168 7.7366 0.150 1.3710 7.7301 0.150 0.9527 7.7613 0.150 0.4657 7.8037 0.150 -0.0777 7.8302 0.150 -0.6576 7.8156 0.150 -1.2477 7.7390 0.150 -1.8180 7.5859 0.150 -2.3367 7.3495 0.150 -2.7737 7.0309 0.150 -3.1028 6.6391 0.150 -3.3044 6.1896 0.150 -3.3672 5.7031 0.150 -3.2895 5.2025 0.150 -3.0794 4.7111 0.150 -2.7538 4.2500 0.150 -2.3377 3.8355 0.150 -1.8613 3.4780 0.150 -1.3579 3.1802 0.150 -0.8606 2.9378 0.150 -0.3999 2.7391 0.150 -0.0008 2.5670 0.150 0.3192 2.4003 0.150 0.5514 2.2167 0.150 0.6963 1.9948 0.150 0.7634 1.7168 0.150 0.7699 1.3710 0.150 0.7387 0.9527 0.150 0.6963 0.4657 0.150 0.6698 -0.0777 0.150 0.6844 -0.6576 0.150 0.7610 -1.2477 0.150 0.9141 -1.8180 0.150 1.1505 -2.3367 0.150 1.4691 -2.7737 0.150 1.8609 -3.1028 0.150 2.3104 -3.3044 0.150 2.7969 -3.3672 0.150 3.2975 -3.2895 0.150 3.7889 -3.0794 0.150 4.2500 -2.7538 0.150 4.6645 -2.3377 0.150 5.0220 -1.8613 0.150 5.3198 -1.3579 0.150 5.5622 -0.8606 0.150 5.7609 -0.3999 0.150 5.9330 -0.0008 0.150 6.0997 0.3192 0.150 6.2833 0.5514 0.150 6.5052 0.6963 0.150 6.7832 0.7634 0.150 7.1290 0.7699 0.150 7.5473 0.7387 0.150 8.0343 0.6963 0.150 8.5777 0.6698 0.150 9.1576 0.6844 0.150 9.7477 0.7610 0.150 10.3180 0.9141 0.150 10.8367 1.1505 0.150 11.2737 1.4691 0.150 11.6028 1.8609 0.150 11.8044 2.3104 0.150 11.8672 2.7969 0.150 11.7895 3.2975 0.150 11.5794 3.7889 0.150 = = = 10.1159 4.3750 0.125 9.7576 4.7136 0.125 9.3563 5.0043 0.125 8.9399 5.2458 0.125 8.5358 5.4433 0.125 8.1683 5.6075 0.125 7.8569 5.7536 0.125 7.6143 5.8993 0.125 7.4459 6.0633 0.125 7.3494 6.2626 0.125 7.3150 6.5110 0.125 7.3268 6.8170 0.125 7.3649 7.1827 0.125 7.4065 7.6032 0.125 7.4291 8.0667 0.125 7.4122 8.5554 0.125 7.3396 9.0464 0.125 7.2003 9.5143 0.125 6.9903 9.9327 0.125 6.7119 10.2774 0.125 6.3741 10.5277 0.125 5.9910 10.6691 0.125 5.5804 10.6940 0.125 5.1618 10.6031 0.125 4.7544 10.4050 0.125 4.3750 10.1159 0.125 4.0364 9.7576 0.125 3.7457 9.3563 0.125 3.5042 8.9399 0.125 3.3067 8.5358 0.125 3.1425 8.1683 0.125 2.9964 7.8569 0.125 2.8507 7.6143 0.125 2.6867 7.4459 0.125 2.4874 7.3494 0.125 2.2390 7.3150 0.125 1.9330 7.3268 0.125 1.5673 7.3649 0.125 1.1468 7.4065 0.125 0.6833 7.4291 0.125 0.1946 7.4122 0.125 -0.2964 7.3396 0.125 -0.7643 7.2003 0.125 -1.1827 6.9903 0.125 -1.5274 6.7119 0.125 -1.7777 6.3741 0.125 -1.9191 5.9910 0.125 -1.9440 5.5804 0.125 -1.8531 5.1618 0.125 -1.6550 4.7544 0.125 -1.3659 4.3750 0.125 -1.0076 4.0364 0.125 -0.6063 3.7457 0.125 -0.1899 3.5042 0.125 0.2142 3.3067 0.125 0.5817 3.1425 0.125 0.8931 2.9964 0.125 1.1357 2.8507 0.125 1.3041 2.6867 0.125 1.4006 2.4874 0.125 1.4350 2.2390 0.125 1.4232 1.9330 0.125 1.3851 1.5673 0.125 1.3435 1.1468 0.125 1.3209 0.6833 0.125 1.3378 0.1946 0.125 1.4104 -0.2964 0.125 1.5497 -0.7643 0.125 1.7597 -1.1827 0.125 2.0381 -1.5274 0.125 2.3759 -1.7777 0.125 2.7590 -1.9191 0.125 3.1696 -1.9440 0.125 3.5882 -1.8531 0.125 3.9956 -1.6550 0.125 4.3750 -1.3659 0.125 4.7136 -1.0076 0.125 5.0043 -0.6063 0.125 5.2458 -0.1899 0.125 5.4433 0.2142 0.125 5.6075 0.5817 0.125 5.7536 0.8931 0.125 5.8993 1.1357 0.125 6.0633 1.3041 0.125 6.2626 1.4006 0.125 6.5110 1.4350 0.125 6.8170 1.4232 0.125 7.1827 1.3851 0.125 7.6032 1.3435 0.125 8.0667 1.3209 0.125 8.5554 1.3378 0.125 9.0464 1.4104 0.125 9.5143 1.5497 0.125 9.9327 1.7597 0.125 10.2774 2.0381 0.125 10.5277 2.3759 0.125 10.6691 2.7590 0.125 10.6940 3.1696 0.125 10.6031 3.5882 0.125 10.4050 3.9956 0.125 = = = 9.0129 4.5000 0.100 8.7186 4.7654 0.100 8.3958 4.9922 0.100 8.0669 5.1804 0.100 7.7533 5.3353 0.100 7.4737 5.4662 0.100 7.2423 5.5858 0.100 7.0681 5.7085 0.100 6.9537 5.8489 0.100 6.8955 6.0202 0.100 6.8845 6.2324 0.100 6.9069 6.4912 0.100 6.9458 6.7968 0.100 6.9830 7.1441 0.100 7.0003 7.5224 0.100 6.9821 7.9163 0.100 6.9160 8.3071 0.100 6.7947 8.6741 0.100 6.6159 8.9966 0.100 6.3829 9.2558 0.100 6.1039 9.4362 0.100 5.7909 9.5277 0.100 5.4587 9.5259 0.100 5.1232 9.4329 0.100 4.7993 9.2571 0.100 4.5000 9.0129 0.100 4.2346 8.7186 0.100 4.0078 8.3958 0.100 3.8196 8.0669 0.100 3.6647 7.7533 0.100 3.5338 7.4737 0.100 3.4142 7.2423 0.100 3.2915 7.0681 0.100 3.1511 6.9537 0.100 2.9798 6.8955 0.100 2.7676 6.8845 0.100 2.5088 6.9069 0.100 2.2032 6.9458 0.100 1.8559 6.9830 0.100 1.4776 7.0003 0.100 1.0837 6.9821 0.100 0.6929 6.9160 0.100 0.3259 6.7947 0.100 0.0034 6.6159 0.100 -0.2558 6.3829 0.100 -0.4362 6.1039 0.100 -0.5277 5.7909 0.100 -0.5259 5.4587 0.100 -0.4329 5.1232 0.100 -0.2571 4.7993 0.100 -0.0129 4.5000 0.100 0.2814 4.2346 0.100 0.6042 4.0078 0.100 0.9331 3.8196 0.100 1.2467 3.6647 0.100 1.5263 3.5338 0.100 1.7577 3.4142 0.100 1.9319 3.2915 0.100 2.0463 3.1511 0.100 2.1045 2.9798 0.100 2.1155 2.7676 0.100 2.0931 2.5088 0.100 2.0542 2.2032 0.100 2.0170 1.8559 0.100 1.9997 1.4776 0.100 2.0179 1.0837 0.100 2.0840 0.6929 0.100 2.2053 0.3259 0.100 2.3841 0.0034 0.100 2.6171 -0.2558 0.100 2.8961 -0.4362 0.100 3.2091 -0.5277 0.100 3.5413 -0.5259 0.100 3.8768 -0.4329 0.100 4.2007 -0.2571 0.100 4.5000 -0.0129 0.100 4.7654 0.2814 0.100 4.9922 0.6042 0.100 5.1804 0.9331 0.100 5.3353 1.2467 0.100 5.4662 1.5263 0.100 5.5858 1.7577 0.100 5.7085 1.9319 0.100 5.8489 2.0463 0.100 6.0202 2.1045 0.100 6.2324 2.1155 0.100 6.4912 2.0931 0.100 6.7968 2.0542 0.100 7.1441 2.0170 0.100 7.5224 1.9997 0.100 7.9163 2.0179 0.100 8.3071 2.0840 0.100 8.6741 2.2053 0.100 8.9966 2.3841 0.100 9.2558 2.6171 0.100 9.4362 2.8961 0.100 9.5277 3.2091 0.100 9.5259 3.5413 0.100 9.4329 3.8768 0.100 9.2571 4.2007 0.100 = = = 7.9476 4.6250 0.075 7.7224 4.8199 0.075 7.4802 4.9857 0.075 7.2379 5.1234 0.075 7.0111 5.2376 0.075 6.8130 5.3359 0.075 6.6535 5.4281 0.075 6.5380 5.5252 0.075 6.4674 5.6378 0.075 6.4378 5.7754 0.075 6.4414 5.9447 0.075 6.4671 6.1489 0.075 6.5018 6.3875 0.075 6.5316 6.6554 0.075 6.5432 6.9438 0.075 6.5252 7.2404 0.075 6.4692 7.5310 0.075 6.3703 7.7998 0.075 6.2280 8.0316 0.075 6.0455 8.2128 0.075 5.8298 8.3329 0.075 5.5905 8.3853 0.075 5.3390 8.3678 0.075 5.0872 8.2834 0.075 4.8461 8.1395 0.075 4.6250 7.9476 0.075 4.4301 7.7224 0.075 4.2643 7.4802 0.075 4.1266 7.2379 0.075 4.0124 7.0111 0.075 3.9141 6.8130 0.075 3.8219 6.6535 0.075 3.7248 6.5380 0.075 3.6122 6.4674 0.075 3.4746 6.4378 0.075 3.3053 6.4414 0.075 3.1011 6.4671 0.075 2.8625 6.5018 0.075 2.5946 6.5316 0.075 2.3062 6.5432 0.075 2.0096 6.5252 0.075 1.7190 6.4692 0.075 1.4502 6.3703 0.075 1.2184 6.2280 0.075 1.0372 6.0455 0.075 0.9171 5.8298 0.075 0.8647 5.5905 0.075 0.8822 5.3390 0.075 0.9666 5.0872 0.075 1.1105 4.8461 0.075 1.3024 4.6250 0.075 1.5276 4.4301 0.075 1.7698 4.2643 0.075 2.0121 4.1266 0.075 2.2389 4.0124 0.075 2.4370 3.9141 0.075 2.5965 3.8219 0.075 2.7120 3.7248 0.075 2.7826 3.6122 0.075 2.8122 3.4746 0.075 2.8086 3.3053 0.075 2.7829 3.1011 0.075 2.7482 2.8625 0.075 2.7184 2.5946 0.075 2.7068 2.3062 0.075 2.7248 2.0096 0.075 2.7808 1.7190 0.075 2.8797 1.4502 0.075 3.0220 1.2184 0.075 3.2045 1.0372 0.075 3.4202 0.9171 0.075 3.6595 0.8647 0.075 3.9110 0.8822 0.075 4.1628 0.9666 0.075 4.4039 1.1105 0.075 4.6250 1.3024 0.075 4.8199 1.5276 0.075 4.9857 1.7698 0.075 5.1234 2.0121 0.075 5.2376 2.2389 0.075 5.3359 2.4370 0.075 5.4281 2.5965 0.075 5.5252 2.7120 0.075 5.6378 2.7826 0.075 5.7754 2.8122 0.075 5.9447 2.8086 0.075 6.1489 2.7829 0.075 6.3875 2.7482 0.075 6.6554 2.7184 0.075 6.9438 2.7068 0.075 7.2404 2.7248 0.075 7.5310 2.7808 0.075 7.7998 2.8797 0.075 8.0316 3.0220 0.075 8.2128 3.2045 0.075 8.3329 3.4202 0.075 8.3853 3.6595 0.075 8.3678 3.9110 0.075 8.2834 4.1628 0.075 8.1395 4.4039 0.075 = = = 6.9225 4.7500 0.050 6.7702 4.8771 0.050 6.6095 4.9849 0.050 6.4517 5.0746 0.050 6.3067 5.1497 0.050 6.1830 5.2156 0.050 6.0864 5.2791 0.050 6.0196 5.3474 0.050 5.9826 5.4276 0.050 5.9720 5.5255 0.050 5.9819 5.6450 0.050 6.0045 5.7878 0.050 6.0307 5.9526 0.050 6.0513 6.1357 0.050 6.0575 6.3305 0.050 6.0421 6.5284 0.050 6.0000 6.7197 0.050 5.9286 6.8939 0.050 5.8281 7.0412 0.050 5.7014 7.1529 0.050 5.5534 7.2226 0.050 5.3910 7.2467 0.050 5.2220 7.2245 0.050 5.0543 7.1589 0.050 4.8950 7.0554 0.050 4.7500 6.9225 0.050 4.6229 6.7702 0.050 4.5151 6.6095 0.050 4.4254 6.4517 0.050 4.3503 6.3067 0.050 4.2844 6.1830 0.050 4.2209 6.0864 0.050 4.1526 6.0196 0.050 4.0724 5.9826 0.050 3.9745 5.9720 0.050 3.8550 5.9819 0.050 3.7122 6.0045 0.050 3.5474 6.0307 0.050 3.3643 6.0513 0.050 3.1695 6.0575 0.050 2.9716 6.0421 0.050 2.7803 6.0000 0.050 2.6061 5.9286 0.050 2.4588 5.8281 0.050 2.3471 5.7014 0.050 2.2774 5.5534 0.050 2.2533 5.3910 0.050 2.2755 5.2220 0.050 2.3411 5.0543 0.050 2.4446 4.8950 0.050 2.5775 4.7500 0.050 2.7298 4.6229 0.050 2.8905 4.5151 0.050 3.0483 4.4254 0.050 3.1933 4.3503 0.050 3.3170 4.2844 0.050 3.4136 4.2209 0.050 3.4804 4.1526 0.050 3.5174 4.0724 0.050 3.5280 3.9745 0.050 3.5181 3.8550 0.050 3.4955 3.7122 0.050 3.4693 3.5474 0.050 3.4487 3.3643 0.050 3.4425 3.1695 0.050 3.4579 2.9716 0.050 3.5000 2.7803 0.050 3.5714 2.6061 0.050 3.6719 2.4588 0.050 3.7986 2.3471 0.050 3.9466 2.2774 0.050 4.1090 2.2533 0.050 4.2780 2.2755 0.050 4.4457 2.3411 0.050 4.6050 2.4446 0.050 4.7500 2.5775 0.050 4.8771 2.7298 0.050 4.9849 2.8905 0.050 5.0746 3.0483 0.050 5.1497 3.1933 0.050 5.2156 3.3170 0.050 5.2791 3.4136 0.050 5.3474 3.4804 0.050 5.4276 3.5174 0.050 5.5255 3.5280 0.050 5.6450 3.5181 0.050 5.7878 3.4955 0.050 5.9526 3.4693 0.050 6.1357 3.4487 0.050 6.3305 3.4425 0.050 6.5284 3.4579 0.050 6.7197 3.5000 0.050 6.8939 3.5714 0.050 7.0412 3.6719 0.050 7.1529 3.7986 0.050 7.2226 3.9466 0.050 7.2467 4.1090 0.050 7.2245 4.2780 0.050 7.1589 4.4457 0.050 7.0554 4.6050 0.050 = = = 5.9395 4.8750 0.025 5.8626 4.9371 0.025 5.7831 4.9897 0.025 5.7064 5.0336 0.025 5.6374 5.0708 0.025 5.5800 5.1041 0.025 5.5367 5.1370 0.025 5.5085 5.1731 0.025 5.4949 5.2158 0.025 5.4940 5.2678 0.025 5.5025 5.3309 0.025 5.5162 5.4055 0.025 5.5306 5.4906 0.025 5.5409 5.5841 0.025 5.5430 5.6824 0.025 5.5334 5.7811 0.025 5.5098 5.8752 0.025 5.4712 5.9596 0.025 5.4182 6.0293 0.025 5.3523 6.0804 0.025 5.2763 6.1100 0.025 5.1938 6.1167 0.025 5.1088 6.1005 0.025 5.0251 6.0632 0.025 4.9463 6.0081 0.025 4.8750 5.9395 0.025 4.8129 5.8626 0.025 4.7603 5.7831 0.025 4.7164 5.7064 0.025 4.6792 5.6374 0.025 4.6459 5.5800 0.025 4.6130 5.5367 0.025 4.5769 5.5085 0.025 4.5342 5.4949 0.025 4.4822 5.4940 0.025 4.4191 5.5025 0.025 4.3445 5.5162 0.025 4.2594 5.5306 0.025 4.1659 5.5409 0.025 4.0676 5.5430 0.025 3.9689 5.5334 0.025 3.8748 5.5098 0.025 3.7904 5.4712 0.025 3.7207 5.4182 0.025 3.6696 5.3523 0.025 3.6400 5.2763 0.025 3.6333 5.1938 0.025 3.6495 5.1088 0.025 3.6868 5.0251 0.025 3.7419 4.9463 0.025 3.8105 4.8750 0.025 3.8874 4.8129 0.025 3.9669 4.7603 0.025 4.0436 4.7164 0.025 4.1126 4.6792 0.025 4.1700 4.6459 0.025 4.2133 4.6130 0.025 4.2415 4.5769 0.025 4.2551 4.5342 0.025 4.2560 4.4822 0.025 4.2475 4.4191 0.025 4.2338 4.3445 0.025 4.2194 4.2594 0.025 4.2091 4.1659 0.025 4.2070 4.0676 0.025 4.2166 3.9689 0.025 4.2402 3.8748 0.025 4.2788 3.7904 0.025 4.3318 3.7207 0.025 4.3977 3.6696 0.025 4.4737 3.6400 0.025 4.5562 3.6333 0.025 4.6412 3.6495 0.025 4.7249 3.6868 0.025 4.8037 3.7419 0.025 4.8750 3.8105 0.025 4.9371 3.8874 0.025 4.9897 3.9669 0.025 5.0336 4.0436 0.025 5.0708 4.1126 0.025 5.1041 4.1700 0.025 5.1370 4.2133 0.025 5.1731 4.2415 0.025 5.2158 4.2551 0.025 5.2678 4.2560 0.025 5.3309 4.2475 0.025 5.4055 4.2338 0.025 5.4906 4.2194 0.025 5.5841 4.2091 0.025 5.6824 4.2070 0.025 5.7811 4.2166 0.025 5.8752 4.2402 0.025 5.9596 4.2788 0.025 6.0293 4.3318 0.025 6.0804 4.3977 0.025 6.1100 4.4737 0.025 6.1167 4.5562 0.025 6.1005 4.6412 0.025 6.0632 4.7249 0.025 6.0081 4.8037 0.025 ngraph-gtk-6.09.05/demo/demo9.ngp0000644000175000017500000003617413706526563013355 00000000000000#!ngraph #%creator: Ngraph #%version: 6.08.05 new parameter parameter::title='_Start angle:' parameter::type=SpinButton parameter::min=0 parameter::max=359 parameter::step=1 parameter::start=0 parameter::stop=100 parameter::wait=10 parameter::wrap=true parameter::items= parameter::redraw=true parameter::active=false parameter::selected=0 parameter::value=150 parameter::transition=stop new parameter parameter::title='_Color:' parameter::type=Switch parameter::min=0 parameter::max=100 parameter::step=1 parameter::start=0 parameter::stop=100 parameter::wait=10 parameter::wrap=false parameter::items= parameter::redraw=true parameter::active=true parameter::selected=0 parameter::value=0 parameter::transition=stop new axis name:fX1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=1 axis::inc=1 axis::div=0 axis::type=linear axis::x=5000 axis::y=24600 axis::direction=0 axis::baseline=true axis::length=11000 axis::width=40 axis::style= axis::auto_scale_margin=0 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fY1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.7 axis::max=4.3 axis::inc=1 axis::div=0 axis::type=linear axis::x=5000 axis::y=24600 axis::direction=9000 axis::baseline=false axis::length=11000 axis::width=40 axis::style= axis::auto_scale_margin=1000 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=none axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fU1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=5000 axis::y=13600 axis::direction=0 axis::baseline=true axis::length=11000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fR1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=16000 axis::y=24600 axis::direction=9000 axis::baseline=true axis::length=11000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=left axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 1 0 1 2 3 new axis name:fX2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.5 axis::max=4.5 axis::inc=1 axis::div=0 axis::type=linear axis::x=1000 axis::y=12400 axis::direction=0 axis::baseline=false axis::length=19000 axis::width=40 axis::style= axis::auto_scale_margin=0 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=none axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fY2 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-0.5 axis::max=0.5 axis::inc=1 axis::div=0 axis::type=linear axis::x=1000 axis::y=12400 axis::direction=9000 axis::baseline=true axis::length=4500 axis::width=40 axis::style= axis::auto_scale_margin=1000 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fU2 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=1000 axis::y=7900 axis::direction=0 axis::baseline=true axis::length=19000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:4' axis::gauge=right axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fR2 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0 axis::max=0 axis::inc=0 axis::div=0 axis::type=linear axis::x=20000 axis::y=12400 axis::direction=9000 axis::baseline=true axis::length=4500 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:5' axis::gauge=left axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 1 4 5 6 7 new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=1 data::y=0 data::type=mark data::interpolation=spline data::fit= data::math_x='const HEIGHT = 0.5; # height of a bar graph const FILL = parameter(1); # fill or not shift(col); # remove %0 from the array col n = size(col); # number of the data total = array_sum(col); # summation of the data start = 0; # start position of a rectangle text_size(10); # set font size each_with_index(col, w, i, # draw rectangle for each data { width = w / total; # width of a rectangle hsb2(i / n, 0.7, 1); # set fill color draw_rect(start, y - HEIGHT / 2, width, HEIGHT, TRUE, FILL); sprintf($str, "%.1f%%", width * 100); text_align(0, 0.5); draw_text_raw($str, start + 0.01, y, a); start += width; });' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=0 data::line_width=40 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo9.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=1 data::y=0 data::type=mark data::interpolation=spline data::fit= data::math_x='const R = 0.4; # radius of a pie chart const FILL = parameter(1); # fill or not shift(col); # remove %0 from the array col n = size(col); # number of the data total = array_sum(col); # summation of the data angle2 = parameter(0); array_clear(ang); map(ang, col, a, a / total * 360); text_size(10); each_with_index(ang, a, i,# draw pie-slice for each data { hsb2(i / n, 0.7, 1); # set fill color angle2 += a; draw_arc(y, 0, R, R, angle2, -a, TRUE, TRUE, FILL, TRUE); sprintf($str, "%.1f%%", a / 3.60); text_align(0.5, 0.6); a = (angle2 - a * 0.5) * PI / 180; draw_text_raw($str, y + R * 0.65 * cos(a), R * 0.65 * sin(a)); });' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=0 data::line_width=40 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo9.dat' new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Demo #9:\ndraw\_rect(), draw\_arc() and parameter() FUNCTIONS' text::x=2000 text::y=6842 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj='axisgrid axis data merge legend rectangle arc path mark text' ngraph-gtk-6.09.05/demo/demo1.dat0000644000175000017500000014377413070106167013322 00000000000000 -0.49 -0.49 0.10 -0.49 -0.46 0.12 -0.49 -0.44 0.19 -0.49 -0.41 0.32 -0.49 -0.39 0.47 -0.49 -0.36 0.52 -0.49 -0.34 0.41 -0.49 -0.31 0.21 -0.49 -0.29 0.95E-01 -0.49 -0.26 0.22 -0.49 -0.24 0.56 -0.49 -0.21 0.92 -0.49 -0.19 1.1 -0.49 -0.16 0.89 -0.49 -0.14 0.56 -0.49 -0.11 0.29 -0.49 -0.87E-01 0.25 -0.49 -0.63E-01 0.41 -0.49 -0.37E-01 0.66 -0.49 -0.13E-01 0.83 -0.49 0.13E-01 0.83 -0.49 0.38E-01 0.66 -0.49 0.63E-01 0.41 -0.49 0.88E-01 0.25 -0.49 0.11 0.29 -0.49 0.14 0.56 -0.49 0.16 0.89 -0.49 0.19 1.1 -0.49 0.21 0.92 -0.49 0.24 0.56 -0.49 0.26 0.22 -0.49 0.29 0.95E-01 -0.49 0.31 0.21 -0.49 0.34 0.41 -0.49 0.36 0.52 -0.49 0.39 0.47 -0.49 0.41 0.32 -0.49 0.44 0.19 -0.49 0.46 0.12 -0.49 0.49 0.10 -0.46 -0.49 0.12 -0.46 -0.46 0.31 -0.46 -0.44 0.59 -0.46 -0.41 0.81 -0.46 -0.39 0.88 -0.46 -0.36 0.75 -0.46 -0.34 0.48 -0.46 -0.31 0.20 -0.46 -0.29 0.53E-01 -0.46 -0.26 0.12 -0.46 -0.24 0.34 -0.46 -0.21 0.56 -0.46 -0.19 0.66 -0.46 -0.16 0.63 -0.46 -0.14 0.55 -0.46 -0.11 0.52 -0.46 -0.87E-01 0.55 -0.46 -0.63E-01 0.57 -0.46 -0.37E-01 0.55 -0.46 -0.13E-01 0.52 -0.46 0.13E-01 0.52 -0.46 0.38E-01 0.55 -0.46 0.63E-01 0.57 -0.46 0.88E-01 0.55 -0.46 0.11 0.52 -0.46 0.14 0.55 -0.46 0.16 0.63 -0.46 0.19 0.66 -0.46 0.21 0.56 -0.46 0.24 0.34 -0.46 0.26 0.12 -0.46 0.29 0.53E-01 -0.46 0.31 0.20 -0.46 0.34 0.48 -0.46 0.36 0.75 -0.46 0.39 0.88 -0.46 0.41 0.81 -0.46 0.44 0.59 -0.46 0.46 0.31 -0.46 0.49 0.12 -0.44 -0.49 0.19 -0.44 -0.46 0.59 -0.44 -0.44 1.1 -0.44 -0.41 1.4 -0.44 -0.39 1.3 -0.44 -0.36 0.92 -0.44 -0.34 0.48 -0.44 -0.31 0.16 -0.44 -0.29 0.57E-01 -0.44 -0.26 0.10 -0.44 -0.24 0.18 -0.44 -0.21 0.21 -0.44 -0.19 0.24 -0.44 -0.16 0.34 -0.44 -0.14 0.59 -0.44 -0.11 0.87 -0.44 -0.87E-01 1.0 -0.44 -0.63E-01 0.85 -0.44 -0.37E-01 0.50 -0.44 -0.13E-01 0.21 -0.44 0.13E-01 0.21 -0.44 0.38E-01 0.50 -0.44 0.63E-01 0.85 -0.44 0.88E-01 1.0 -0.44 0.11 0.87 -0.44 0.14 0.59 -0.44 0.16 0.34 -0.44 0.19 0.24 -0.44 0.21 0.21 -0.44 0.24 0.18 -0.44 0.26 0.10 -0.44 0.29 0.57E-01 -0.44 0.31 0.16 -0.44 0.34 0.48 -0.44 0.36 0.92 -0.44 0.39 1.3 -0.44 0.41 1.4 -0.44 0.44 1.1 -0.44 0.46 0.59 -0.44 0.49 0.19 -0.41 -0.49 0.32 -0.41 -0.46 0.81 -0.41 -0.44 1.4 -0.41 -0.41 1.6 -0.41 -0.39 1.4 -0.41 -0.36 0.81 -0.41 -0.34 0.33 -0.41 -0.31 0.14 -0.41 -0.29 0.21 -0.41 -0.26 0.33 -0.41 -0.24 0.34 -0.41 -0.21 0.22 -0.41 -0.19 0.11 -0.41 -0.16 0.24 -0.41 -0.14 0.65 -0.41 -0.11 1.1 -0.41 -0.87E-01 1.3 -0.41 -0.63E-01 1.1 -0.41 -0.37E-01 0.61 -0.41 -0.13E-01 0.18 -0.41 0.13E-01 0.18 -0.41 0.38E-01 0.61 -0.41 0.63E-01 1.1 -0.41 0.88E-01 1.3 -0.41 0.11 1.1 -0.41 0.14 0.65 -0.41 0.16 0.24 -0.41 0.19 0.11 -0.41 0.21 0.22 -0.41 0.24 0.34 -0.41 0.26 0.33 -0.41 0.29 0.21 -0.41 0.31 0.14 -0.41 0.34 0.33 -0.41 0.36 0.81 -0.41 0.39 1.4 -0.41 0.41 1.6 -0.41 0.44 1.4 -0.41 0.46 0.81 -0.41 0.49 0.32 -0.39 -0.49 0.47 -0.39 -0.46 0.88 -0.39 -0.44 1.3 -0.39 -0.41 1.4 -0.39 -0.39 0.98 -0.39 -0.36 0.45 -0.39 -0.34 0.14 -0.39 -0.31 0.20 -0.39 -0.29 0.50 -0.39 -0.26 0.76 -0.39 -0.24 0.78 -0.39 -0.21 0.56 -0.39 -0.19 0.31 -0.39 -0.16 0.31 -0.39 -0.14 0.63 -0.39 -0.11 1.1 -0.39 -0.87E-01 1.3 -0.39 -0.63E-01 1.2 -0.39 -0.37E-01 0.73 -0.39 -0.13E-01 0.35 -0.39 0.13E-01 0.35 -0.39 0.38E-01 0.73 -0.39 0.63E-01 1.2 -0.39 0.88E-01 1.3 -0.39 0.11 1.1 -0.39 0.14 0.63 -0.39 0.16 0.31 -0.39 0.19 0.31 -0.39 0.21 0.56 -0.39 0.24 0.78 -0.39 0.26 0.76 -0.39 0.29 0.50 -0.39 0.31 0.20 -0.39 0.34 0.14 -0.39 0.36 0.45 -0.39 0.39 0.98 -0.39 0.41 1.4 -0.39 0.44 1.3 -0.39 0.46 0.88 -0.39 0.49 0.47 -0.36 -0.49 0.52 -0.36 -0.46 0.75 -0.36 -0.44 0.92 -0.36 -0.41 0.81 -0.36 -0.39 0.45 -0.36 -0.36 0.11 -0.36 -0.34 0.66E-01 -0.36 -0.31 0.34 -0.36 -0.29 0.77 -0.36 -0.26 1.1 -0.36 -0.24 1.1 -0.36 -0.21 0.90 -0.36 -0.19 0.56 -0.36 -0.16 0.38 -0.36 -0.14 0.48 -0.36 -0.11 0.77 -0.36 -0.87E-01 0.99 -0.36 -0.63E-01 0.95 -0.36 -0.37E-01 0.69 -0.36 -0.13E-01 0.45 -0.36 0.13E-01 0.45 -0.36 0.38E-01 0.69 -0.36 0.63E-01 0.95 -0.36 0.88E-01 0.99 -0.36 0.11 0.77 -0.36 0.14 0.48 -0.36 0.16 0.38 -0.36 0.19 0.56 -0.36 0.21 0.90 -0.36 0.24 1.1 -0.36 0.26 1.1 -0.36 0.29 0.77 -0.36 0.31 0.34 -0.36 0.34 0.66E-01 -0.36 0.36 0.11 -0.36 0.39 0.45 -0.36 0.41 0.81 -0.36 0.44 0.92 -0.36 0.46 0.75 -0.36 0.49 0.52 -0.34 -0.49 0.41 -0.34 -0.46 0.48 -0.34 -0.44 0.48 -0.34 -0.41 0.33 -0.34 -0.39 0.14 -0.34 -0.36 0.66E-01 -0.34 -0.34 0.21 -0.34 -0.31 0.51 -0.34 -0.29 0.84 -0.34 -0.26 1.1 -0.34 -0.24 1.1 -0.34 -0.21 0.93 -0.34 -0.19 0.63 -0.34 -0.16 0.36 -0.34 -0.14 0.28 -0.34 -0.11 0.37 -0.34 -0.87E-01 0.51 -0.34 -0.63E-01 0.54 -0.34 -0.37E-01 0.47 -0.34 -0.13E-01 0.38 -0.34 0.13E-01 0.38 -0.34 0.38E-01 0.47 -0.34 0.63E-01 0.54 -0.34 0.88E-01 0.51 -0.34 0.11 0.37 -0.34 0.14 0.28 -0.34 0.16 0.36 -0.34 0.19 0.63 -0.34 0.21 0.93 -0.34 0.24 1.1 -0.34 0.26 1.1 -0.34 0.29 0.84 -0.34 0.31 0.51 -0.34 0.34 0.21 -0.34 0.36 0.66E-01 -0.34 0.39 0.14 -0.34 0.41 0.33 -0.34 0.44 0.48 -0.34 0.46 0.48 -0.34 0.49 0.41 -0.31 -0.49 0.21 -0.31 -0.46 0.20 -0.31 -0.44 0.16 -0.31 -0.41 0.14 -0.31 -0.39 0.20 -0.31 -0.36 0.34 -0.31 -0.34 0.51 -0.31 -0.31 0.62 -0.31 -0.29 0.67 -0.31 -0.26 0.72 -0.31 -0.24 0.75 -0.31 -0.21 0.70 -0.31 -0.19 0.55 -0.31 -0.16 0.35 -0.31 -0.14 0.21 -0.31 -0.11 0.16 -0.31 -0.87E-01 0.20 -0.31 -0.63E-01 0.23 -0.31 -0.37E-01 0.24 -0.31 -0.13E-01 0.22 -0.31 0.13E-01 0.22 -0.31 0.38E-01 0.24 -0.31 0.63E-01 0.23 -0.31 0.88E-01 0.20 -0.31 0.11 0.16 -0.31 0.14 0.21 -0.31 0.16 0.35 -0.31 0.19 0.55 -0.31 0.21 0.70 -0.31 0.24 0.75 -0.31 0.26 0.72 -0.31 0.29 0.67 -0.31 0.31 0.62 -0.31 0.34 0.51 -0.31 0.36 0.34 -0.31 0.39 0.20 -0.31 0.41 0.14 -0.31 0.44 0.16 -0.31 0.46 0.20 -0.31 0.49 0.21 -0.29 -0.49 0.95E-01 -0.29 -0.46 0.53E-01 -0.29 -0.44 0.57E-01 -0.29 -0.41 0.21 -0.29 -0.39 0.50 -0.29 -0.36 0.77 -0.29 -0.34 0.84 -0.29 -0.31 0.67 -0.29 -0.29 0.43 -0.29 -0.26 0.30 -0.29 -0.24 0.35 -0.29 -0.21 0.48 -0.29 -0.19 0.54 -0.29 -0.16 0.48 -0.29 -0.14 0.36 -0.29 -0.11 0.25 -0.29 -0.87E-01 0.19 -0.29 -0.63E-01 0.16 -0.29 -0.37E-01 0.15 -0.29 -0.13E-01 0.15 -0.29 0.13E-01 0.15 -0.29 0.38E-01 0.15 -0.29 0.63E-01 0.16 -0.29 0.88E-01 0.19 -0.29 0.11 0.25 -0.29 0.14 0.36 -0.29 0.16 0.48 -0.29 0.19 0.54 -0.29 0.21 0.48 -0.29 0.24 0.35 -0.29 0.26 0.30 -0.29 0.29 0.43 -0.29 0.31 0.67 -0.29 0.34 0.84 -0.29 0.36 0.77 -0.29 0.39 0.50 -0.29 0.41 0.21 -0.29 0.44 0.57E-01 -0.29 0.46 0.53E-01 -0.29 0.49 0.95E-01 -0.26 -0.49 0.22 -0.26 -0.46 0.12 -0.26 -0.44 0.10 -0.26 -0.41 0.33 -0.26 -0.39 0.76 -0.26 -0.36 1.1 -0.26 -0.34 1.1 -0.26 -0.31 0.72 -0.26 -0.29 0.30 -0.26 -0.26 0.11 -0.26 -0.24 0.23 -0.26 -0.21 0.50 -0.26 -0.19 0.71 -0.26 -0.16 0.76 -0.26 -0.14 0.67 -0.26 -0.11 0.52 -0.26 -0.87E-01 0.39 -0.26 -0.63E-01 0.29 -0.26 -0.37E-01 0.23 -0.26 -0.13E-01 0.20 -0.26 0.13E-01 0.20 -0.26 0.38E-01 0.23 -0.26 0.63E-01 0.29 -0.26 0.88E-01 0.39 -0.26 0.11 0.52 -0.26 0.14 0.67 -0.26 0.16 0.76 -0.26 0.19 0.71 -0.26 0.21 0.50 -0.26 0.24 0.23 -0.26 0.26 0.11 -0.26 0.29 0.30 -0.26 0.31 0.72 -0.26 0.34 1.1 -0.26 0.36 1.1 -0.26 0.39 0.76 -0.26 0.41 0.33 -0.26 0.44 0.10 -0.26 0.46 0.12 -0.26 0.49 0.22 -0.24 -0.49 0.56 -0.24 -0.46 0.34 -0.24 -0.44 0.18 -0.24 -0.41 0.34 -0.24 -0.39 0.78 -0.24 -0.36 1.1 -0.24 -0.34 1.1 -0.24 -0.31 0.75 -0.24 -0.29 0.35 -0.24 -0.26 0.23 -0.24 -0.24 0.43 -0.24 -0.21 0.77 -0.24 -0.19 1.0 -0.24 -0.16 1.1 -0.24 -0.14 0.99 -0.24 -0.11 0.80 -0.24 -0.87E-01 0.61 -0.24 -0.63E-01 0.45 -0.24 -0.37E-01 0.35 -0.24 -0.13E-01 0.30 -0.24 0.13E-01 0.30 -0.24 0.38E-01 0.35 -0.24 0.63E-01 0.45 -0.24 0.88E-01 0.61 -0.24 0.11 0.80 -0.24 0.14 0.99 -0.24 0.16 1.1 -0.24 0.19 1.0 -0.24 0.21 0.77 -0.24 0.24 0.43 -0.24 0.26 0.23 -0.24 0.29 0.35 -0.24 0.31 0.75 -0.24 0.34 1.1 -0.24 0.36 1.1 -0.24 0.39 0.78 -0.24 0.41 0.34 -0.24 0.44 0.18 -0.24 0.46 0.34 -0.24 0.49 0.56 -0.21 -0.49 0.92 -0.21 -0.46 0.56 -0.21 -0.44 0.21 -0.21 -0.41 0.22 -0.21 -0.39 0.56 -0.21 -0.36 0.90 -0.21 -0.34 0.93 -0.21 -0.31 0.70 -0.21 -0.29 0.48 -0.21 -0.26 0.50 -0.21 -0.24 0.77 -0.21 -0.21 1.1 -0.21 -0.19 1.3 -0.21 -0.16 1.3 -0.21 -0.14 1.2 -0.21 -0.11 0.95 -0.21 -0.87E-01 0.72 -0.21 -0.63E-01 0.54 -0.21 -0.37E-01 0.42 -0.21 -0.13E-01 0.37 -0.21 0.13E-01 0.37 -0.21 0.38E-01 0.42 -0.21 0.63E-01 0.54 -0.21 0.88E-01 0.72 -0.21 0.11 0.95 -0.21 0.14 1.2 -0.21 0.16 1.3 -0.21 0.19 1.3 -0.21 0.21 1.1 -0.21 0.24 0.77 -0.21 0.26 0.50 -0.21 0.29 0.48 -0.21 0.31 0.70 -0.21 0.34 0.93 -0.21 0.36 0.90 -0.21 0.39 0.56 -0.21 0.41 0.22 -0.21 0.44 0.21 -0.21 0.46 0.56 -0.21 0.49 0.92 -0.19 -0.49 1.1 -0.19 -0.46 0.66 -0.19 -0.44 0.24 -0.19 -0.41 0.11 -0.19 -0.39 0.31 -0.19 -0.36 0.56 -0.19 -0.34 0.63 -0.19 -0.31 0.55 -0.19 -0.29 0.54 -0.19 -0.26 0.71 -0.19 -0.24 1.0 -0.19 -0.21 1.3 -0.19 -0.19 1.4 -0.19 -0.16 1.4 -0.19 -0.14 1.2 -0.19 -0.11 0.94 -0.19 -0.87E-01 0.71 -0.19 -0.63E-01 0.54 -0.19 -0.37E-01 0.42 -0.19 -0.13E-01 0.36 -0.19 0.13E-01 0.36 -0.19 0.38E-01 0.42 -0.19 0.63E-01 0.54 -0.19 0.88E-01 0.71 -0.19 0.11 0.94 -0.19 0.14 1.2 -0.19 0.16 1.4 -0.19 0.19 1.4 -0.19 0.21 1.3 -0.19 0.24 1.0 -0.19 0.26 0.71 -0.19 0.29 0.54 -0.19 0.31 0.55 -0.19 0.34 0.63 -0.19 0.36 0.56 -0.19 0.39 0.31 -0.19 0.41 0.11 -0.19 0.44 0.24 -0.19 0.46 0.66 -0.19 0.49 1.1 -0.16 -0.49 0.89 -0.16 -0.46 0.63 -0.16 -0.44 0.34 -0.16 -0.41 0.24 -0.16 -0.39 0.31 -0.16 -0.36 0.38 -0.16 -0.34 0.36 -0.16 -0.31 0.35 -0.16 -0.29 0.48 -0.16 -0.26 0.76 -0.16 -0.24 1.1 -0.16 -0.21 1.3 -0.16 -0.19 1.4 -0.16 -0.16 1.3 -0.16 -0.14 1.1 -0.16 -0.11 0.82 -0.16 -0.87E-01 0.62 -0.16 -0.63E-01 0.46 -0.16 -0.37E-01 0.36 -0.16 -0.13E-01 0.31 -0.16 0.13E-01 0.31 -0.16 0.38E-01 0.36 -0.16 0.63E-01 0.46 -0.16 0.88E-01 0.62 -0.16 0.11 0.82 -0.16 0.14 1.1 -0.16 0.16 1.3 -0.16 0.19 1.4 -0.16 0.21 1.3 -0.16 0.24 1.1 -0.16 0.26 0.76 -0.16 0.29 0.48 -0.16 0.31 0.35 -0.16 0.34 0.36 -0.16 0.36 0.38 -0.16 0.39 0.31 -0.16 0.41 0.24 -0.16 0.44 0.34 -0.16 0.46 0.63 -0.16 0.49 0.89 -0.14 -0.49 0.56 -0.14 -0.46 0.55 -0.14 -0.44 0.59 -0.14 -0.41 0.65 -0.14 -0.39 0.63 -0.14 -0.36 0.48 -0.14 -0.34 0.28 -0.14 -0.31 0.21 -0.14 -0.29 0.36 -0.14 -0.26 0.67 -0.14 -0.24 0.99 -0.14 -0.21 1.2 -0.14 -0.19 1.2 -0.14 -0.16 1.1 -0.14 -0.14 0.86 -0.14 -0.11 0.66 -0.14 -0.87E-01 0.49 -0.14 -0.63E-01 0.36 -0.14 -0.37E-01 0.28 -0.14 -0.13E-01 0.24 -0.14 0.13E-01 0.24 -0.14 0.38E-01 0.28 -0.14 0.63E-01 0.36 -0.14 0.88E-01 0.49 -0.14 0.11 0.66 -0.14 0.14 0.86 -0.14 0.16 1.1 -0.14 0.19 1.2 -0.14 0.21 1.2 -0.14 0.24 0.99 -0.14 0.26 0.67 -0.14 0.29 0.36 -0.14 0.31 0.21 -0.14 0.34 0.28 -0.14 0.36 0.48 -0.14 0.39 0.63 -0.14 0.41 0.65 -0.14 0.44 0.59 -0.14 0.46 0.55 -0.14 0.49 0.56 -0.11 -0.49 0.29 -0.11 -0.46 0.52 -0.11 -0.44 0.87 -0.11 -0.41 1.1 -0.11 -0.39 1.1 -0.11 -0.36 0.77 -0.11 -0.34 0.37 -0.11 -0.31 0.16 -0.11 -0.29 0.25 -0.11 -0.26 0.52 -0.11 -0.24 0.80 -0.11 -0.21 0.95 -0.11 -0.19 0.94 -0.11 -0.16 0.82 -0.11 -0.14 0.66 -0.11 -0.11 0.51 -0.11 -0.87E-01 0.37 -0.11 -0.63E-01 0.27 -0.11 -0.37E-01 0.20 -0.11 -0.13E-01 0.17 -0.11 0.13E-01 0.17 -0.11 0.38E-01 0.20 -0.11 0.63E-01 0.27 -0.11 0.88E-01 0.37 -0.11 0.11 0.51 -0.11 0.14 0.66 -0.11 0.16 0.82 -0.11 0.19 0.94 -0.11 0.21 0.95 -0.11 0.24 0.80 -0.11 0.26 0.52 -0.11 0.29 0.25 -0.11 0.31 0.16 -0.11 0.34 0.37 -0.11 0.36 0.77 -0.11 0.39 1.1 -0.11 0.41 1.1 -0.11 0.44 0.87 -0.11 0.46 0.52 -0.11 0.49 0.29 -0.87E-01 -0.49 0.25 -0.87E-01 -0.46 0.55 -0.87E-01 -0.44 1.0 -0.87E-01 -0.41 1.3 -0.87E-01 -0.39 1.3 -0.87E-01 -0.36 0.99 -0.87E-01 -0.34 0.51 -0.87E-01 -0.31 0.20 -0.87E-01 -0.29 0.19 -0.87E-01 -0.26 0.39 -0.87E-01 -0.24 0.61 -0.87E-01 -0.21 0.72 -0.87E-01 -0.19 0.71 -0.87E-01 -0.16 0.62 -0.87E-01 -0.14 0.49 -0.87E-01 -0.11 0.37 -0.87E-01 -0.87E-01 0.27 -0.87E-01 -0.63E-01 0.19 -0.87E-01 -0.37E-01 0.14 -0.87E-01 -0.13E-01 0.12 -0.87E-01 0.13E-01 0.12 -0.87E-01 0.38E-01 0.14 -0.87E-01 0.63E-01 0.19 -0.87E-01 0.88E-01 0.27 -0.87E-01 0.11 0.37 -0.87E-01 0.14 0.49 -0.87E-01 0.16 0.62 -0.87E-01 0.19 0.71 -0.87E-01 0.21 0.72 -0.87E-01 0.24 0.61 -0.87E-01 0.26 0.39 -0.87E-01 0.29 0.19 -0.87E-01 0.31 0.20 -0.87E-01 0.34 0.51 -0.87E-01 0.36 0.99 -0.87E-01 0.39 1.3 -0.87E-01 0.41 1.3 -0.87E-01 0.44 1.0 -0.87E-01 0.46 0.55 -0.87E-01 0.49 0.25 -0.63E-01 -0.49 0.41 -0.63E-01 -0.46 0.57 -0.63E-01 -0.44 0.85 -0.63E-01 -0.41 1.1 -0.63E-01 -0.39 1.2 -0.63E-01 -0.36 0.95 -0.63E-01 -0.34 0.54 -0.63E-01 -0.31 0.23 -0.63E-01 -0.29 0.16 -0.63E-01 -0.26 0.29 -0.63E-01 -0.24 0.45 -0.63E-01 -0.21 0.54 -0.63E-01 -0.19 0.54 -0.63E-01 -0.16 0.46 -0.63E-01 -0.14 0.36 -0.63E-01 -0.11 0.27 -0.63E-01 -0.87E-01 0.19 -0.63E-01 -0.63E-01 0.13 -0.63E-01 -0.37E-01 0.97E-01 -0.63E-01 -0.13E-01 0.79E-01 -0.63E-01 0.13E-01 0.79E-01 -0.63E-01 0.38E-01 0.97E-01 -0.63E-01 0.63E-01 0.13 -0.63E-01 0.88E-01 0.19 -0.63E-01 0.11 0.27 -0.63E-01 0.14 0.36 -0.63E-01 0.16 0.46 -0.63E-01 0.19 0.54 -0.63E-01 0.21 0.54 -0.63E-01 0.24 0.45 -0.63E-01 0.26 0.29 -0.63E-01 0.29 0.16 -0.63E-01 0.31 0.23 -0.63E-01 0.34 0.54 -0.63E-01 0.36 0.95 -0.63E-01 0.39 1.2 -0.63E-01 0.41 1.1 -0.63E-01 0.44 0.85 -0.63E-01 0.46 0.57 -0.63E-01 0.49 0.41 -0.37E-01 -0.49 0.66 -0.37E-01 -0.46 0.55 -0.37E-01 -0.44 0.50 -0.37E-01 -0.41 0.61 -0.37E-01 -0.39 0.73 -0.37E-01 -0.36 0.69 -0.37E-01 -0.34 0.47 -0.37E-01 -0.31 0.24 -0.37E-01 -0.29 0.15 -0.37E-01 -0.26 0.23 -0.37E-01 -0.24 0.35 -0.37E-01 -0.21 0.42 -0.37E-01 -0.19 0.42 -0.37E-01 -0.16 0.36 -0.37E-01 -0.14 0.28 -0.37E-01 -0.11 0.20 -0.37E-01 -0.87E-01 0.14 -0.37E-01 -0.63E-01 0.97E-01 -0.37E-01 -0.37E-01 0.69E-01 -0.37E-01 -0.13E-01 0.56E-01 -0.37E-01 0.13E-01 0.56E-01 -0.37E-01 0.38E-01 0.69E-01 -0.37E-01 0.63E-01 0.97E-01 -0.37E-01 0.88E-01 0.14 -0.37E-01 0.11 0.20 -0.37E-01 0.14 0.28 -0.37E-01 0.16 0.36 -0.37E-01 0.19 0.42 -0.37E-01 0.21 0.42 -0.37E-01 0.24 0.35 -0.37E-01 0.26 0.23 -0.37E-01 0.29 0.15 -0.37E-01 0.31 0.24 -0.37E-01 0.34 0.47 -0.37E-01 0.36 0.69 -0.37E-01 0.39 0.73 -0.37E-01 0.41 0.61 -0.37E-01 0.44 0.50 -0.37E-01 0.46 0.55 -0.37E-01 0.49 0.66 -0.13E-01 -0.49 0.83 -0.13E-01 -0.46 0.52 -0.13E-01 -0.44 0.21 -0.13E-01 -0.41 0.18 -0.13E-01 -0.39 0.35 -0.13E-01 -0.36 0.45 -0.13E-01 -0.34 0.38 -0.13E-01 -0.31 0.22 -0.13E-01 -0.29 0.15 -0.13E-01 -0.26 0.20 -0.13E-01 -0.24 0.30 -0.13E-01 -0.21 0.37 -0.13E-01 -0.19 0.36 -0.13E-01 -0.16 0.31 -0.13E-01 -0.14 0.24 -0.13E-01 -0.11 0.17 -0.13E-01 -0.87E-01 0.12 -0.13E-01 -0.63E-01 0.79E-01 -0.13E-01 -0.37E-01 0.56E-01 -0.13E-01 -0.13E-01 0.46E-01 -0.13E-01 0.13E-01 0.46E-01 -0.13E-01 0.38E-01 0.56E-01 -0.13E-01 0.63E-01 0.79E-01 -0.13E-01 0.88E-01 0.12 -0.13E-01 0.11 0.17 -0.13E-01 0.14 0.24 -0.13E-01 0.16 0.31 -0.13E-01 0.19 0.36 -0.13E-01 0.21 0.37 -0.13E-01 0.24 0.30 -0.13E-01 0.26 0.20 -0.13E-01 0.29 0.15 -0.13E-01 0.31 0.22 -0.13E-01 0.34 0.38 -0.13E-01 0.36 0.45 -0.13E-01 0.39 0.35 -0.13E-01 0.41 0.18 -0.13E-01 0.44 0.21 -0.13E-01 0.46 0.52 -0.13E-01 0.49 0.83 0.13E-01 -0.49 0.83 0.13E-01 -0.46 0.52 0.13E-01 -0.44 0.21 0.13E-01 -0.41 0.18 0.13E-01 -0.39 0.35 0.13E-01 -0.36 0.45 0.13E-01 -0.34 0.38 0.13E-01 -0.31 0.22 0.13E-01 -0.29 0.15 0.13E-01 -0.26 0.20 0.13E-01 -0.24 0.30 0.13E-01 -0.21 0.37 0.13E-01 -0.19 0.36 0.13E-01 -0.16 0.31 0.13E-01 -0.14 0.24 0.13E-01 -0.11 0.17 0.13E-01 -0.87E-01 0.12 0.13E-01 -0.63E-01 0.79E-01 0.13E-01 -0.37E-01 0.56E-01 0.13E-01 -0.13E-01 0.46E-01 0.13E-01 0.13E-01 0.46E-01 0.13E-01 0.38E-01 0.56E-01 0.13E-01 0.63E-01 0.79E-01 0.13E-01 0.88E-01 0.12 0.13E-01 0.11 0.17 0.13E-01 0.14 0.24 0.13E-01 0.16 0.31 0.13E-01 0.19 0.36 0.13E-01 0.21 0.37 0.13E-01 0.24 0.30 0.13E-01 0.26 0.20 0.13E-01 0.29 0.15 0.13E-01 0.31 0.22 0.13E-01 0.34 0.38 0.13E-01 0.36 0.45 0.13E-01 0.39 0.35 0.13E-01 0.41 0.18 0.13E-01 0.44 0.21 0.13E-01 0.46 0.52 0.13E-01 0.49 0.83 0.38E-01 -0.49 0.66 0.38E-01 -0.46 0.55 0.38E-01 -0.44 0.50 0.38E-01 -0.41 0.61 0.38E-01 -0.39 0.73 0.38E-01 -0.36 0.69 0.38E-01 -0.34 0.47 0.38E-01 -0.31 0.24 0.38E-01 -0.29 0.15 0.38E-01 -0.26 0.23 0.38E-01 -0.24 0.35 0.38E-01 -0.21 0.42 0.38E-01 -0.19 0.42 0.38E-01 -0.16 0.36 0.38E-01 -0.14 0.28 0.38E-01 -0.11 0.20 0.38E-01 -0.87E-01 0.14 0.38E-01 -0.63E-01 0.97E-01 0.38E-01 -0.37E-01 0.69E-01 0.38E-01 -0.13E-01 0.56E-01 0.38E-01 0.13E-01 0.56E-01 0.38E-01 0.38E-01 0.69E-01 0.38E-01 0.63E-01 0.97E-01 0.38E-01 0.88E-01 0.14 0.38E-01 0.11 0.20 0.38E-01 0.14 0.28 0.38E-01 0.16 0.36 0.38E-01 0.19 0.42 0.38E-01 0.21 0.42 0.38E-01 0.24 0.35 0.38E-01 0.26 0.23 0.38E-01 0.29 0.15 0.38E-01 0.31 0.24 0.38E-01 0.34 0.47 0.38E-01 0.36 0.69 0.38E-01 0.39 0.73 0.38E-01 0.41 0.61 0.38E-01 0.44 0.50 0.38E-01 0.46 0.55 0.38E-01 0.49 0.66 0.63E-01 -0.49 0.41 0.63E-01 -0.46 0.57 0.63E-01 -0.44 0.85 0.63E-01 -0.41 1.1 0.63E-01 -0.39 1.2 0.63E-01 -0.36 0.95 0.63E-01 -0.34 0.54 0.63E-01 -0.31 0.23 0.63E-01 -0.29 0.16 0.63E-01 -0.26 0.29 0.63E-01 -0.24 0.45 0.63E-01 -0.21 0.54 0.63E-01 -0.19 0.54 0.63E-01 -0.16 0.46 0.63E-01 -0.14 0.36 0.63E-01 -0.11 0.27 0.63E-01 -0.87E-01 0.19 0.63E-01 -0.63E-01 0.13 0.63E-01 -0.37E-01 0.97E-01 0.63E-01 -0.13E-01 0.79E-01 0.63E-01 0.13E-01 0.79E-01 0.63E-01 0.38E-01 0.97E-01 0.63E-01 0.63E-01 0.13 0.63E-01 0.88E-01 0.19 0.63E-01 0.11 0.27 0.63E-01 0.14 0.36 0.63E-01 0.16 0.46 0.63E-01 0.19 0.54 0.63E-01 0.21 0.54 0.63E-01 0.24 0.45 0.63E-01 0.26 0.29 0.63E-01 0.29 0.16 0.63E-01 0.31 0.23 0.63E-01 0.34 0.54 0.63E-01 0.36 0.95 0.63E-01 0.39 1.2 0.63E-01 0.41 1.1 0.63E-01 0.44 0.85 0.63E-01 0.46 0.57 0.63E-01 0.49 0.41 0.88E-01 -0.49 0.25 0.88E-01 -0.46 0.55 0.88E-01 -0.44 1.0 0.88E-01 -0.41 1.3 0.88E-01 -0.39 1.3 0.88E-01 -0.36 0.99 0.88E-01 -0.34 0.51 0.88E-01 -0.31 0.20 0.88E-01 -0.29 0.19 0.88E-01 -0.26 0.39 0.88E-01 -0.24 0.61 0.88E-01 -0.21 0.72 0.88E-01 -0.19 0.71 0.88E-01 -0.16 0.62 0.88E-01 -0.14 0.49 0.88E-01 -0.11 0.37 0.88E-01 -0.87E-01 0.27 0.88E-01 -0.63E-01 0.19 0.88E-01 -0.37E-01 0.14 0.88E-01 -0.13E-01 0.12 0.88E-01 0.13E-01 0.12 0.88E-01 0.38E-01 0.14 0.88E-01 0.63E-01 0.19 0.88E-01 0.88E-01 0.27 0.88E-01 0.11 0.37 0.88E-01 0.14 0.49 0.88E-01 0.16 0.62 0.88E-01 0.19 0.71 0.88E-01 0.21 0.72 0.88E-01 0.24 0.61 0.88E-01 0.26 0.39 0.88E-01 0.29 0.19 0.88E-01 0.31 0.20 0.88E-01 0.34 0.51 0.88E-01 0.36 0.99 0.88E-01 0.39 1.3 0.88E-01 0.41 1.3 0.88E-01 0.44 1.0 0.88E-01 0.46 0.55 0.88E-01 0.49 0.25 0.11 -0.49 0.29 0.11 -0.46 0.52 0.11 -0.44 0.87 0.11 -0.41 1.1 0.11 -0.39 1.1 0.11 -0.36 0.77 0.11 -0.34 0.37 0.11 -0.31 0.16 0.11 -0.29 0.25 0.11 -0.26 0.52 0.11 -0.24 0.80 0.11 -0.21 0.95 0.11 -0.19 0.94 0.11 -0.16 0.82 0.11 -0.14 0.66 0.11 -0.11 0.51 0.11 -0.87E-01 0.37 0.11 -0.63E-01 0.27 0.11 -0.37E-01 0.20 0.11 -0.13E-01 0.17 0.11 0.13E-01 0.17 0.11 0.38E-01 0.20 0.11 0.63E-01 0.27 0.11 0.88E-01 0.37 0.11 0.11 0.51 0.11 0.14 0.66 0.11 0.16 0.82 0.11 0.19 0.94 0.11 0.21 0.95 0.11 0.24 0.80 0.11 0.26 0.52 0.11 0.29 0.25 0.11 0.31 0.16 0.11 0.34 0.37 0.11 0.36 0.77 0.11 0.39 1.1 0.11 0.41 1.1 0.11 0.44 0.87 0.11 0.46 0.52 0.11 0.49 0.29 0.14 -0.49 0.56 0.14 -0.46 0.55 0.14 -0.44 0.59 0.14 -0.41 0.65 0.14 -0.39 0.63 0.14 -0.36 0.48 0.14 -0.34 0.28 0.14 -0.31 0.21 0.14 -0.29 0.36 0.14 -0.26 0.67 0.14 -0.24 0.99 0.14 -0.21 1.2 0.14 -0.19 1.2 0.14 -0.16 1.1 0.14 -0.14 0.86 0.14 -0.11 0.66 0.14 -0.87E-01 0.49 0.14 -0.63E-01 0.36 0.14 -0.37E-01 0.28 0.14 -0.13E-01 0.24 0.14 0.13E-01 0.24 0.14 0.38E-01 0.28 0.14 0.63E-01 0.36 0.14 0.88E-01 0.49 0.14 0.11 0.66 0.14 0.14 0.86 0.14 0.16 1.1 0.14 0.19 1.2 0.14 0.21 1.2 0.14 0.24 0.99 0.14 0.26 0.67 0.14 0.29 0.36 0.14 0.31 0.21 0.14 0.34 0.28 0.14 0.36 0.48 0.14 0.39 0.63 0.14 0.41 0.65 0.14 0.44 0.59 0.14 0.46 0.55 0.14 0.49 0.56 0.16 -0.49 0.89 0.16 -0.46 0.63 0.16 -0.44 0.34 0.16 -0.41 0.24 0.16 -0.39 0.31 0.16 -0.36 0.38 0.16 -0.34 0.36 0.16 -0.31 0.35 0.16 -0.29 0.48 0.16 -0.26 0.76 0.16 -0.24 1.1 0.16 -0.21 1.3 0.16 -0.19 1.4 0.16 -0.16 1.3 0.16 -0.14 1.1 0.16 -0.11 0.82 0.16 -0.87E-01 0.62 0.16 -0.63E-01 0.46 0.16 -0.37E-01 0.36 0.16 -0.13E-01 0.31 0.16 0.13E-01 0.31 0.16 0.38E-01 0.36 0.16 0.63E-01 0.46 0.16 0.88E-01 0.62 0.16 0.11 0.82 0.16 0.14 1.1 0.16 0.16 1.3 0.16 0.19 1.4 0.16 0.21 1.3 0.16 0.24 1.1 0.16 0.26 0.76 0.16 0.29 0.48 0.16 0.31 0.35 0.16 0.34 0.36 0.16 0.36 0.38 0.16 0.39 0.31 0.16 0.41 0.24 0.16 0.44 0.34 0.16 0.46 0.63 0.16 0.49 0.89 0.19 -0.49 1.1 0.19 -0.46 0.66 0.19 -0.44 0.24 0.19 -0.41 0.11 0.19 -0.39 0.31 0.19 -0.36 0.56 0.19 -0.34 0.63 0.19 -0.31 0.55 0.19 -0.29 0.54 0.19 -0.26 0.71 0.19 -0.24 1.0 0.19 -0.21 1.3 0.19 -0.19 1.4 0.19 -0.16 1.4 0.19 -0.14 1.2 0.19 -0.11 0.94 0.19 -0.87E-01 0.71 0.19 -0.63E-01 0.54 0.19 -0.37E-01 0.42 0.19 -0.13E-01 0.36 0.19 0.13E-01 0.36 0.19 0.38E-01 0.42 0.19 0.63E-01 0.54 0.19 0.88E-01 0.71 0.19 0.11 0.94 0.19 0.14 1.2 0.19 0.16 1.4 0.19 0.19 1.4 0.19 0.21 1.3 0.19 0.24 1.0 0.19 0.26 0.71 0.19 0.29 0.54 0.19 0.31 0.55 0.19 0.34 0.63 0.19 0.36 0.56 0.19 0.39 0.31 0.19 0.41 0.11 0.19 0.44 0.24 0.19 0.46 0.66 0.19 0.49 1.1 0.21 -0.49 0.92 0.21 -0.46 0.56 0.21 -0.44 0.21 0.21 -0.41 0.22 0.21 -0.39 0.56 0.21 -0.36 0.90 0.21 -0.34 0.93 0.21 -0.31 0.70 0.21 -0.29 0.48 0.21 -0.26 0.50 0.21 -0.24 0.77 0.21 -0.21 1.1 0.21 -0.19 1.3 0.21 -0.16 1.3 0.21 -0.14 1.2 0.21 -0.11 0.95 0.21 -0.87E-01 0.72 0.21 -0.63E-01 0.54 0.21 -0.37E-01 0.42 0.21 -0.13E-01 0.37 0.21 0.13E-01 0.37 0.21 0.38E-01 0.42 0.21 0.63E-01 0.54 0.21 0.88E-01 0.72 0.21 0.11 0.95 0.21 0.14 1.2 0.21 0.16 1.3 0.21 0.19 1.3 0.21 0.21 1.1 0.21 0.24 0.77 0.21 0.26 0.50 0.21 0.29 0.48 0.21 0.31 0.70 0.21 0.34 0.93 0.21 0.36 0.90 0.21 0.39 0.56 0.21 0.41 0.22 0.21 0.44 0.21 0.21 0.46 0.56 0.21 0.49 0.92 0.24 -0.49 0.56 0.24 -0.46 0.34 0.24 -0.44 0.18 0.24 -0.41 0.34 0.24 -0.39 0.78 0.24 -0.36 1.1 0.24 -0.34 1.1 0.24 -0.31 0.75 0.24 -0.29 0.35 0.24 -0.26 0.23 0.24 -0.24 0.43 0.24 -0.21 0.77 0.24 -0.19 1.0 0.24 -0.16 1.1 0.24 -0.14 0.99 0.24 -0.11 0.80 0.24 -0.87E-01 0.61 0.24 -0.63E-01 0.45 0.24 -0.37E-01 0.35 0.24 -0.13E-01 0.30 0.24 0.13E-01 0.30 0.24 0.38E-01 0.35 0.24 0.63E-01 0.45 0.24 0.88E-01 0.61 0.24 0.11 0.80 0.24 0.14 0.99 0.24 0.16 1.1 0.24 0.19 1.0 0.24 0.21 0.77 0.24 0.24 0.43 0.24 0.26 0.23 0.24 0.29 0.35 0.24 0.31 0.75 0.24 0.34 1.1 0.24 0.36 1.1 0.24 0.39 0.78 0.24 0.41 0.34 0.24 0.44 0.18 0.24 0.46 0.34 0.24 0.49 0.56 0.26 -0.49 0.22 0.26 -0.46 0.12 0.26 -0.44 0.10 0.26 -0.41 0.33 0.26 -0.39 0.76 0.26 -0.36 1.1 0.26 -0.34 1.1 0.26 -0.31 0.72 0.26 -0.29 0.30 0.26 -0.26 0.11 0.26 -0.24 0.23 0.26 -0.21 0.50 0.26 -0.19 0.71 0.26 -0.16 0.76 0.26 -0.14 0.67 0.26 -0.11 0.52 0.26 -0.87E-01 0.39 0.26 -0.63E-01 0.29 0.26 -0.37E-01 0.23 0.26 -0.13E-01 0.20 0.26 0.13E-01 0.20 0.26 0.38E-01 0.23 0.26 0.63E-01 0.29 0.26 0.88E-01 0.39 0.26 0.11 0.52 0.26 0.14 0.67 0.26 0.16 0.76 0.26 0.19 0.71 0.26 0.21 0.50 0.26 0.24 0.23 0.26 0.26 0.11 0.26 0.29 0.30 0.26 0.31 0.72 0.26 0.34 1.1 0.26 0.36 1.1 0.26 0.39 0.76 0.26 0.41 0.33 0.26 0.44 0.10 0.26 0.46 0.12 0.26 0.49 0.22 0.29 -0.49 0.95E-01 0.29 -0.46 0.53E-01 0.29 -0.44 0.57E-01 0.29 -0.41 0.21 0.29 -0.39 0.50 0.29 -0.36 0.77 0.29 -0.34 0.84 0.29 -0.31 0.67 0.29 -0.29 0.43 0.29 -0.26 0.30 0.29 -0.24 0.35 0.29 -0.21 0.48 0.29 -0.19 0.54 0.29 -0.16 0.48 0.29 -0.14 0.36 0.29 -0.11 0.25 0.29 -0.87E-01 0.19 0.29 -0.63E-01 0.16 0.29 -0.37E-01 0.15 0.29 -0.13E-01 0.15 0.29 0.13E-01 0.15 0.29 0.38E-01 0.15 0.29 0.63E-01 0.16 0.29 0.88E-01 0.19 0.29 0.11 0.25 0.29 0.14 0.36 0.29 0.16 0.48 0.29 0.19 0.54 0.29 0.21 0.48 0.29 0.24 0.35 0.29 0.26 0.30 0.29 0.29 0.43 0.29 0.31 0.67 0.29 0.34 0.84 0.29 0.36 0.77 0.29 0.39 0.50 0.29 0.41 0.21 0.29 0.44 0.57E-01 0.29 0.46 0.53E-01 0.29 0.49 0.95E-01 0.31 -0.49 0.21 0.31 -0.46 0.20 0.31 -0.44 0.16 0.31 -0.41 0.14 0.31 -0.39 0.20 0.31 -0.36 0.34 0.31 -0.34 0.51 0.31 -0.31 0.62 0.31 -0.29 0.67 0.31 -0.26 0.72 0.31 -0.24 0.75 0.31 -0.21 0.70 0.31 -0.19 0.55 0.31 -0.16 0.35 0.31 -0.14 0.21 0.31 -0.11 0.16 0.31 -0.87E-01 0.20 0.31 -0.63E-01 0.23 0.31 -0.37E-01 0.24 0.31 -0.13E-01 0.22 0.31 0.13E-01 0.22 0.31 0.38E-01 0.24 0.31 0.63E-01 0.23 0.31 0.88E-01 0.20 0.31 0.11 0.16 0.31 0.14 0.21 0.31 0.16 0.35 0.31 0.19 0.55 0.31 0.21 0.70 0.31 0.24 0.75 0.31 0.26 0.72 0.31 0.29 0.67 0.31 0.31 0.62 0.31 0.34 0.51 0.31 0.36 0.34 0.31 0.39 0.20 0.31 0.41 0.14 0.31 0.44 0.16 0.31 0.46 0.20 0.31 0.49 0.21 0.34 -0.49 0.41 0.34 -0.46 0.48 0.34 -0.44 0.48 0.34 -0.41 0.33 0.34 -0.39 0.14 0.34 -0.36 0.66E-01 0.34 -0.34 0.21 0.34 -0.31 0.51 0.34 -0.29 0.84 0.34 -0.26 1.1 0.34 -0.24 1.1 0.34 -0.21 0.93 0.34 -0.19 0.63 0.34 -0.16 0.36 0.34 -0.14 0.28 0.34 -0.11 0.37 0.34 -0.87E-01 0.51 0.34 -0.63E-01 0.54 0.34 -0.37E-01 0.47 0.34 -0.13E-01 0.38 0.34 0.13E-01 0.38 0.34 0.38E-01 0.47 0.34 0.63E-01 0.54 0.34 0.88E-01 0.51 0.34 0.11 0.37 0.34 0.14 0.28 0.34 0.16 0.36 0.34 0.19 0.63 0.34 0.21 0.93 0.34 0.24 1.1 0.34 0.26 1.1 0.34 0.29 0.84 0.34 0.31 0.51 0.34 0.34 0.21 0.34 0.36 0.66E-01 0.34 0.39 0.14 0.34 0.41 0.33 0.34 0.44 0.48 0.34 0.46 0.48 0.34 0.49 0.41 0.36 -0.49 0.52 0.36 -0.46 0.75 0.36 -0.44 0.92 0.36 -0.41 0.81 0.36 -0.39 0.45 0.36 -0.36 0.11 0.36 -0.34 0.66E-01 0.36 -0.31 0.34 0.36 -0.29 0.77 0.36 -0.26 1.1 0.36 -0.24 1.1 0.36 -0.21 0.90 0.36 -0.19 0.56 0.36 -0.16 0.38 0.36 -0.14 0.48 0.36 -0.11 0.77 0.36 -0.87E-01 0.99 0.36 -0.63E-01 0.95 0.36 -0.37E-01 0.69 0.36 -0.13E-01 0.45 0.36 0.13E-01 0.45 0.36 0.38E-01 0.69 0.36 0.63E-01 0.95 0.36 0.88E-01 0.99 0.36 0.11 0.77 0.36 0.14 0.48 0.36 0.16 0.38 0.36 0.19 0.56 0.36 0.21 0.90 0.36 0.24 1.1 0.36 0.26 1.1 0.36 0.29 0.77 0.36 0.31 0.34 0.36 0.34 0.66E-01 0.36 0.36 0.11 0.36 0.39 0.45 0.36 0.41 0.81 0.36 0.44 0.92 0.36 0.46 0.75 0.36 0.49 0.52 0.39 -0.49 0.47 0.39 -0.46 0.88 0.39 -0.44 1.3 0.39 -0.41 1.4 0.39 -0.39 0.98 0.39 -0.36 0.45 0.39 -0.34 0.14 0.39 -0.31 0.20 0.39 -0.29 0.50 0.39 -0.26 0.76 0.39 -0.24 0.78 0.39 -0.21 0.56 0.39 -0.19 0.31 0.39 -0.16 0.31 0.39 -0.14 0.63 0.39 -0.11 1.1 0.39 -0.87E-01 1.3 0.39 -0.63E-01 1.2 0.39 -0.37E-01 0.73 0.39 -0.13E-01 0.35 0.39 0.13E-01 0.35 0.39 0.38E-01 0.73 0.39 0.63E-01 1.2 0.39 0.88E-01 1.3 0.39 0.11 1.1 0.39 0.14 0.63 0.39 0.16 0.31 0.39 0.19 0.31 0.39 0.21 0.56 0.39 0.24 0.78 0.39 0.26 0.76 0.39 0.29 0.50 0.39 0.31 0.20 0.39 0.34 0.14 0.39 0.36 0.45 0.39 0.39 0.98 0.39 0.41 1.4 0.39 0.44 1.3 0.39 0.46 0.88 0.39 0.49 0.47 0.41 -0.49 0.32 0.41 -0.46 0.81 0.41 -0.44 1.4 0.41 -0.41 1.6 0.41 -0.39 1.4 0.41 -0.36 0.81 0.41 -0.34 0.33 0.41 -0.31 0.14 0.41 -0.29 0.21 0.41 -0.26 0.33 0.41 -0.24 0.34 0.41 -0.21 0.22 0.41 -0.19 0.11 0.41 -0.16 0.24 0.41 -0.14 0.65 0.41 -0.11 1.1 0.41 -0.87E-01 1.3 0.41 -0.63E-01 1.1 0.41 -0.37E-01 0.61 0.41 -0.13E-01 0.18 0.41 0.13E-01 0.18 0.41 0.38E-01 0.61 0.41 0.63E-01 1.1 0.41 0.88E-01 1.3 0.41 0.11 1.1 0.41 0.14 0.65 0.41 0.16 0.24 0.41 0.19 0.11 0.41 0.21 0.22 0.41 0.24 0.34 0.41 0.26 0.33 0.41 0.29 0.21 0.41 0.31 0.14 0.41 0.34 0.33 0.41 0.36 0.81 0.41 0.39 1.4 0.41 0.41 1.6 0.41 0.44 1.4 0.41 0.46 0.81 0.41 0.49 0.32 0.44 -0.49 0.19 0.44 -0.46 0.59 0.44 -0.44 1.1 0.44 -0.41 1.4 0.44 -0.39 1.3 0.44 -0.36 0.92 0.44 -0.34 0.48 0.44 -0.31 0.16 0.44 -0.29 0.57E-01 0.44 -0.26 0.10 0.44 -0.24 0.18 0.44 -0.21 0.21 0.44 -0.19 0.24 0.44 -0.16 0.34 0.44 -0.14 0.59 0.44 -0.11 0.87 0.44 -0.87E-01 1.0 0.44 -0.63E-01 0.85 0.44 -0.37E-01 0.50 0.44 -0.13E-01 0.21 0.44 0.13E-01 0.21 0.44 0.38E-01 0.50 0.44 0.63E-01 0.85 0.44 0.88E-01 1.0 0.44 0.11 0.87 0.44 0.14 0.59 0.44 0.16 0.34 0.44 0.19 0.24 0.44 0.21 0.21 0.44 0.24 0.18 0.44 0.26 0.10 0.44 0.29 0.57E-01 0.44 0.31 0.16 0.44 0.34 0.48 0.44 0.36 0.92 0.44 0.39 1.3 0.44 0.41 1.4 0.44 0.44 1.1 0.44 0.46 0.59 0.44 0.49 0.19 0.46 -0.49 0.12 0.46 -0.46 0.31 0.46 -0.44 0.59 0.46 -0.41 0.81 0.46 -0.39 0.88 0.46 -0.36 0.75 0.46 -0.34 0.48 0.46 -0.31 0.20 0.46 -0.29 0.53E-01 0.46 -0.26 0.12 0.46 -0.24 0.34 0.46 -0.21 0.56 0.46 -0.19 0.66 0.46 -0.16 0.63 0.46 -0.14 0.55 0.46 -0.11 0.52 0.46 -0.87E-01 0.55 0.46 -0.63E-01 0.57 0.46 -0.37E-01 0.55 0.46 -0.13E-01 0.52 0.46 0.13E-01 0.52 0.46 0.38E-01 0.55 0.46 0.63E-01 0.57 0.46 0.88E-01 0.55 0.46 0.11 0.52 0.46 0.14 0.55 0.46 0.16 0.63 0.46 0.19 0.66 0.46 0.21 0.56 0.46 0.24 0.34 0.46 0.26 0.12 0.46 0.29 0.53E-01 0.46 0.31 0.20 0.46 0.34 0.48 0.46 0.36 0.75 0.46 0.39 0.88 0.46 0.41 0.81 0.46 0.44 0.59 0.46 0.46 0.31 0.46 0.49 0.12 0.49 -0.49 0.10 0.49 -0.46 0.12 0.49 -0.44 0.19 0.49 -0.41 0.32 0.49 -0.39 0.47 0.49 -0.36 0.52 0.49 -0.34 0.41 0.49 -0.31 0.21 0.49 -0.29 0.95E-01 0.49 -0.26 0.22 0.49 -0.24 0.56 0.49 -0.21 0.92 0.49 -0.19 1.1 0.49 -0.16 0.89 0.49 -0.14 0.56 0.49 -0.11 0.29 0.49 -0.87E-01 0.25 0.49 -0.63E-01 0.41 0.49 -0.37E-01 0.66 0.49 -0.13E-01 0.83 0.49 0.13E-01 0.83 0.49 0.38E-01 0.66 0.49 0.63E-01 0.41 0.49 0.88E-01 0.25 0.49 0.11 0.29 0.49 0.14 0.56 0.49 0.16 0.89 0.49 0.19 1.1 0.49 0.21 0.92 0.49 0.24 0.56 0.49 0.26 0.22 0.49 0.29 0.95E-01 0.49 0.31 0.21 0.49 0.34 0.41 0.49 0.36 0.52 0.49 0.39 0.47 0.49 0.41 0.32 0.49 0.44 0.19 0.49 0.46 0.12 0.49 0.49 0.10 ngraph-gtk-6.09.05/demo/demo8.ngp0000644000175000017500000003307513673104711013337 00000000000000#!ngraph #%creator: Ngraph #%version: 6.08.05 new axis name:fX1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=2.550000000000000e+02 axis::inc=1.000000000000000e+02 axis::div=0 axis::type=linear axis::x=3600 axis::y=22000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=0 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fY1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=2.550000000000000e+02 axis::inc=1.000000000000000e+02 axis::div=0 axis::type=linear axis::x=3600 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=0 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=400 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fU1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3600 axis::y=8000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fR1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=17600 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 1 0 1 2 3 new axis name:cX1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=2.700000000000000e+02 axis::inc=1.000000000000000e+02 axis::div=0 axis::type=linear axis::x=6500 axis::y=26000 axis::direction=4500 axis::baseline=true axis::length=5400 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=178 axis::wave_width=40 axis::reference= axis::gauge=both axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=59 axis::gauge_width1=40 axis::gauge_length2=119 axis::gauge_width2=40 axis::gauge_length3=178 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=1191 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:cY1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=3.300000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=6500 axis::y=26000 axis::direction=9000 axis::baseline=true axis::length=8000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=178 axis::wave_width=40 axis::reference= axis::gauge=both axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=59 axis::gauge_width1=40 axis::gauge_length2=119 axis::gauge_width2=40 axis::gauge_length3=178 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=1191 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=regular axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=400 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 3 4 5 new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=0 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x='ofst_x = %0 * 2.5; ofst_y = -%0 / 40; shift(col); # remove %0 from the array col n = size(col); # number of the data each_with_index(col, y, i, # initialize arrays for polyline { ax[i] = i + ofst_x; ay[i] = y + ofst_y; }); unshift(ax, ax[0]); # add first x for a polygon mask unshift(ay, ofst_y); # add first y for a polygon mask push(ax, ax[-1]); # add last x for a polygon mask push(ay, ofst_y); # add last y for a polygon mask draw_polygon(ax, ay, FALSE, FILL_RULE_WINDING); shift(ax); # remove first x for a polygon mask shift(ay); # remove first y for a polygon mask pop(ax); # remove last x for a polygon mask pop(ay); # remove last y for a polygon mask draw_polyline(ax, ay); # draw a polyline x;' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=0 data::line_width=20 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=2 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::data_clip=false data::range_min=1.000000000000000e+00 data::range_max=1.000000000000000e+01 data::range_div=512 data::array= data::file='demo8.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=0 data::y=0 data::type=mark data::interpolation=spline data::fit= data::math_x='shift(col); each_with_index(col, c, i, # draw rectangle for each column { hsb2((1 - c) * 0.68, 1, 1); # set fill color draw_rect(i + 1, y, -1.1, -1.1, FALSE, TRUE); }); x - 1' data::math_y='y - 1' data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=0 data::line_width=10 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1.000000000000000e+00 data::range_max=1.000000000000000e+01 data::range_div=512 data::array= data::file='demo8.dat' new data data::hidden=false data::R=252 data::G=233 data::B=79 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=96 data::y=128 data::type=line data::interpolation=spline data::fit= data::math_x='if(%0 == NUM, # at the last data { color(3,128); # set line color draw_line(COLX, 0, COLX, NUM); # draw a vertical line draw_line(0, COLY, size(col), COLY); }); # draw a horizontal line x * h();' data::math_y='const SCALE = h(); n = size(col); # number of the data if(%0 == COLY, # if data row is COLY times(n - 2, i, # draw horizontal data draw_line(i, col[i + 1] * SCALE, i + 1, col[i + 2] * SCALE))); %0' data::func_f= data::func_g= data::func_h='100' data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=0 data::line_width=40 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1.000000000000000e+00 data::range_max=1.000000000000000e+01 data::range_div=512 data::array= data::file='demo8.dat' new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Demo #8:\ndraw\_rect(), draw\_line() and col[ ]' text::x=4000 text::y=6842 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj='axisgrid axis data merge legend rectangle arc path mark text' ngraph-gtk-6.09.05/demo/demo1.ngp0000644000175000017500000002301313626172351013322 00000000000000#! ngraph new axis name:frameX axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=-5.200000000000000e-01 axis::max=1.520000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=22000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=300 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameY axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=-5.200000000000000e-01 axis::max=1.520000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=300 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameU axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=8000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameR axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=19000 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::grouping 1 0 1 2 3 new data data::hidden=false data::R=0 data::G=0 data::B=0 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=1 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x='HSB(1-%03/1.6,1,1);x' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=10 data::mark_size=250 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::file='demo1.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=1 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x='COLOR(0,255*%03/1.6);COLOR(1,255*%03/1.6);COLOR(2,255*%03/1.6);x' data::math_y='y+1' data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=10 data::mark_size=250 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::file='demo1.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=1 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x='MARKSIZE(%03*300);x+1' data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=250 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::file='demo1.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=1 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x='RGB(%03/1.6,1-%03/1.6,1);x+1' data::math_y='y+1' data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=10 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::file='demo1.dat' new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='x axis (lattice constant)' text::x=8790 text::y=23500 text::pt=2000 text::font='Sans-serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='y axis (lattice constant)' text::x=3783 text::y=18057 text::pt=2000 text::font='Sans-serif' text::style=3 text::space=0 text::direction=9000 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Demo #1:' text::x=1900 text::y=6100 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='color(), rgb(), hsb() and marksize() FUNCTION' text::x=1900 text::y=7300 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj= ngraph-gtk-6.09.05/demo/demo7.ngp0000644000175000017500000002615414045740764013346 00000000000000#!ngraph #%creator: Ngraph #%version: 6.07.00 new axis name:fX1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-3.000000000000000e+00 axis::max=1.000000000000000e+01 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3000 axis::y=21800 axis::direction=0 axis::baseline=true axis::length=14140 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=363 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=121 axis::gauge_width1=40 axis::gauge_length2=242 axis::gauge_width2=40 axis::gauge_length3=363 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2420 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fY1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-3.000000000000000e+00 axis::max=1.000000000000000e+01 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3000 axis::y=21800 axis::direction=9000 axis::baseline=true axis::length=14140 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=363 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=121 axis::gauge_width1=40 axis::gauge_length2=242 axis::gauge_width2=40 axis::gauge_length3=363 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2420 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fU1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3000 axis::y=7660 axis::direction=0 axis::baseline=true axis::length=14140 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=363 axis::wave_width=40 axis::reference='axis:0' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=121 axis::gauge_width1=40 axis::gauge_length2=242 axis::gauge_width2=40 axis::gauge_length3=363 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2420 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:fR1 axis::hidden=true axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=17140 axis::y=21800 axis::direction=9000 axis::baseline=true axis::length=14140 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=363 axis::wave_width=40 axis::reference='axis:1' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=121 axis::gauge_width1=40 axis::gauge_length2=242 axis::gauge_width2=40 axis::gauge_length3=363 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2420 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 1 0 1 2 3 new data data::hidden=false data::R=237 data::G=212 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x='F(X)*sin(X)' data::math_y='F(X)*cos(X)+7' data::func_f='cos((3+1/2)*X)/2+2' data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=80 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=0.000000000000000e+00 data::range_max=1.884955592153876e+01 data::range_div=512 data::array= data::file= new data data::hidden=false data::R=245 data::G=121 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=polygon data::interpolation=spline data::fit= data::math_x='F(X)*sin(X)' data::math_y='F(X)*cos(X)' data::func_f='cos((3+1/3)*X)/2+2' data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=80 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=0.000000000000000e+00 data::range_max=1.884955592153876e+01 data::range_div=512 data::array= data::file= new data data::hidden=false data::R=52 data::G=101 data::B=164 data::A=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=polygon data::interpolation=spline data::fit= data::math_x='F(X)*sin(X)+7' data::math_y='F(X)*cos(X)' data::func_f='cos((4+1/3)*X)/2+2' data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=80 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=0.000000000000000e+00 data::range_max=1.884955592153876e+01 data::range_div=512 data::array= data::file= new data data::hidden=false data::R=115 data::G=210 data::B=22 data::A=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x='F(X)*sin(X)+7' data::math_y='F(X)*cos(X)+7' data::func_f='cos((5+1/2)*X)/2+2' data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=80 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=0.000000000000000e+00 data::range_max=1.884955592153876e+01 data::range_div=512 data::array= data::file= new data data::hidden=false data::R=173 data::G=127 data::B=168 data::A=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x='2.5*sin(x*F())*cos(x/F())+cos(x*F())*sin(x/F())/1.5+3.4' data::math_y='2.5*sin(x*F())*sin(x/F())-cos(x*F())*cos(x/F())/1.5+3.5' data::func_f='3' data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=80 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' , ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=false data::range_min=0.000000000000000e+00 data::range_max=1.884955592153876e+01 data::range_div=512 data::array= data::file= new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Demo #7: FUNCTION PLOT' text::x=2500 text::y=6800 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj='axisgrid axis data merge legend rectangle arc path mark text' ngraph-gtk-6.09.05/demo/demo9.dat0000644000175000017500000000004213230544574013314 000000000000002 3 4 5 3 2 5 4 2 4 5 3 6 4 5 2 3 ngraph-gtk-6.09.05/demo/demo4.ngp0000644000175000017500000005676214045740761013350 00000000000000#! ngraph new axisgrid axisgrid::hidden=false axisgrid::R=0 axisgrid::G=0 axisgrid::B=0 axisgrid::clip=true axisgrid::redraw_flag=true axisgrid::axis_x='axis:0' axisgrid::axis_y='axis:1' axisgrid::width1=0 axisgrid::style1='150 150' axisgrid::width2=0 axisgrid::style2= axisgrid::width3=40 axisgrid::style3='450 150 150 150' axisgrid::grid_x=false axisgrid::grid_y=true axisgrid::background=true axisgrid::BR=128 axisgrid::BG=255 axisgrid::BB=255 new axisgrid axisgrid::hidden=false axisgrid::R=0 axisgrid::G=0 axisgrid::B=0 axisgrid::clip=true axisgrid::redraw_flag=true axisgrid::axis_x='axis:4' axisgrid::axis_y='axis:5' axisgrid::width1=0 axisgrid::style1='150 150' axisgrid::width2=0 axisgrid::style2= axisgrid::width3=40 axisgrid::style3='450 150 150 150' axisgrid::grid_x=false axisgrid::grid_y=true axisgrid::background=true axisgrid::BR=128 axisgrid::BG=255 axisgrid::BB=255 new axis name:frameX axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=5.000000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=10500 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=right axis::num_begin=0 axis::num_step=1 axis::num_num=0 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2400 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameY axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=-2.200000000000000e+00 axis::max=4.200000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=10500 axis::direction=9000 axis::baseline=true axis::length=7000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%+g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2400 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameU axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=3500 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=300 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameR axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=19000 axis::y=10500 axis::direction=9000 axis::baseline=true axis::length=7000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=300 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::grouping 1 0 1 2 3 new axis name:frameX_a axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=5.000000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=18000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=right axis::num_begin=0 axis::num_step=1 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2400 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameY_a axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=-1.200000000000000e+00 axis::max=1.200000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=18000 axis::direction=9000 axis::baseline=true axis::length=7000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2400 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameU_a axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=5000 axis::y=11000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:4' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis name:frameR_a axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=19000 axis::y=18000 axis::direction=9000 axis::baseline=true axis::length=7000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:5' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::grouping 1 4 5 6 7 new data data::hidden=false data::R=255 data::G=0 data::B=0 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='GAMMA(X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=0 data::G=0 data::B=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='EI(X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=0 data::G=0 data::B=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='EI(-X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=0 data::G=128 data::B=128 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='1-ERFC(X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=255 data::G=0 data::B=128 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='JN(0,X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=255 data::G=0 data::B=128 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='JN(1,X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=255 data::G=0 data::B=128 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='JN(2,X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=0 data::G=128 data::B=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='YN(0,X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style='200 50 100 50 100 50' data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=0 data::G=128 data::B=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='YN(1,X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style='200 50 100 50 100 50' data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::range_min=0 data::range_max=5 data::range_div=512 new data data::hidden=false data::R=0 data::G=128 data::B=255 data::clip=true data::redraw_flag=true data::source=range data::save_path=unchange data::x=1 data::y=2 data::type=line data::interpolation=spline data::fit= data::math_x= data::math_y='YN(2,X)' data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style='200 50 100 50 100 50' data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::remark='#%'\''' data::ifs=' , ()' data::head_skip=2 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:5' data::range_min=0 data::range_max=5 data::range_div=512 new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Demo #4: MULTI GRAPH' text::x=3500 text::y=2842 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='X-Axis' text::x=11289 text::y=19500 text::pt=2400 text::font='Sans-serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Y-Axis' text::x=3263 text::y=12026 text::pt=2400 text::font='Sans-serif' text::style=3 text::space=0 text::direction=9000 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Γ(x)' text::x=14684 text::y=5553 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Ei(x)' text::x=8789 text::y=5553 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Ei(-x)' text::x=7053 text::y=8947 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='erf(x)' text::x=17184 text::y=6763 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Special function' text::x=13842 text::y=10026 text::pt=2000 text::font='Serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='J_0' text::x=6500 text::y=11600 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='J_1' text::x=7200 text::y=13000 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='J_2' text::x=7000 text::y=14100 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Y_0' text::x=5800 text::y=15500 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Y_1' text::x=8600 text::y=15500 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Y_2' text::x=10900 text::y=15700 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Bessel function' text::x=14000 text::y=17600 text::pt=2000 text::font='Serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=4000 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj= ngraph-gtk-6.09.05/demo/Makefile.am0000644000175000017500000000040513625714727013653 00000000000000demodir = $(pkgdatadir)/demo dist_demo_DATA = demo1.dat demo2.dat demo3.dat demo6.dat demo8.dat \ demo9.dat demo.ngp demo1.ngp demo2.ngp demo3.ngp demo4.ngp \ demo5a.ngp demo5b.ngp demo5c.ngp demo5d.ngp demo5e.ngp \ demo6.ngp demo7.ngp demo8.ngp demo9.ngp ngraph-gtk-6.09.05/demo/demo3.dat0000644000175000017500000000016513070106167013306 00000000000000Samp.1 0.5 0.05 Samp.2 2.1 0.9 Samp.3 2.9 1.0 Samp.4 4.5 1.01 Samp.5 5.0 1.02 Samp.6 5.5 1.03 Samp.7 5.8 1.04 ngraph-gtk-6.09.05/demo/demo5a.ngp0000644000175000017500000000175213626716040013474 00000000000000#! ngraph # new text text::x=3000 text::y=6500 text::font="Sans-serif" text::style=3 text::text="Demo #5A: ARROW" # new path type=line put path points="4000 7000 4000 12000" put path width=500 put path arrow=both put path arrow_length=36213 put path arrow_width=30000 # new path type=line put path points="7000 7000 15000 12000" put path style="600 300 200 300" put path arrow_length=36213 put path arrow_width=30000 put path width=500 put path arrow=begin # new path type=line put path points="7000 12000 15000 7000" put path style="600 300 200 300" put path arrow_length=36213 put path arrow_width=30000 put path width=500 put path arrow=end # for i in `seq 4 2 18` do new path type=line put path points="10000 18000 ${i}000 12500" put path width=${i}0 put path arrow=end done # for i in `seq 4 2 18` do new path type=line put path arrow_length=80000 put path arrow_width=160000 put path points="10000 18000 ${i}000 23500" put path width=${i}0 put path arrow=end done # new gra ngraph-gtk-6.09.05/demo/demo2.dat0000644000175000017500000000550013777512753013323 00000000000000-2,3750000000E+00 6,3853206635E+00 -5,3208610535E-01 5,1208610535E-01 -1,8750000000E+00 1,6853206635E+01 -5,6208610535E-01 5,6208610535E-01 -1,7500000000E+00 2,5078868867E+01 -1,8241024023E+00 1,8241024023E+00 -1,6250000000E+00 3,0353093393E+01 -1,7673212325E+00 1,7673212325E+00 -1,5000000000E+00 3,1408799923E+01 -9,3877496140E-01 9,3877496140E-01 -1,3750000000E+00 3,2429282847E+01 -1,1462057545E+00 1,1462057545E+00 -1,2500000000E+00 3,3987725690E+01 -2,4259917514E+00 2,4259917514E+00 -1,1250000000E+00 2,8208945768E+01 -6,2218833831E-01 6,2218833831E-01 -1,0000000000E+00 2,7270073024E+01 -1,6350365122E+00 1,6350365122E+00 -8,7500000000E-01 2,0984815797E+01 -2,1126470994E-01 2,1126470994E-01 -7,5000000000E-01 1,8000241324E+01 -5,4064800555E-01 5,4064800555E-01 -6,2500000000E-01 1,7279030306E+01 -1,9953043375E+00 1,9953043375E+00 -5,0000000000E-01 1,3373603736E+01 -1,7649268679E+00 1,7649268679E+00 -3,7500000000E-01 8,7321208054E+00 -1,0079518822E+00 1,0079518822E+00 -2,5000000000E-01 7,7763810440E+00 -1,8886788032E+00 1,8886788032E+00 -1,2500000000E-01 4,1519917478E+00 -1,2005228514E+00 1,2005228514E+00 0,0000000000E+00 1,6535825690E+00 -8,2679128449E-01 8,2679128449E-01 1,2500000000E-01 -1,1561405845E+00 -4,8379292712E-02 1,1379292712E+00 2,5000000000E-01 -1,5127512394E-02 -1,0075729626E+00 1,5075729626E+00 3,7500000000E-01 -2,0045571146E+00 -1,8493152573E-01 1,8493152573E+00 5,0000000000E-01 1,1148215260E+00 -1,7292857630E+00 1,7292857630E+00 6,2500000000E-01 2,2247068724E+00 -2,1169158141E+00 2,1169158141E+00 7,5000000000E-01 3,3490430529E+00 -2,3996191827E+00 2,3996191827E+00 8,7500000000E-01 1,7226515696E+00 -1,2371955358E+00 1,2371955358E+00 1,0000000000E+00 3,3536891581E+00 -1,6768445791E+00 1,6768445791E+00 1,1250000000E+00 3,5535274167E+00 -1,4162748167E+00 1,4162748167E+00 1,2500000000E+00 6,0451963649E+00 -2,3560942762E+00 2,3560942762E+00 1,3750000000E+00 4,9219230353E+00 -1,5772487491E+00 1,5772487491E+00 1,5000000000E+00 6,8925221867E+00 -2,4618860934E+00 2,4618860934E+00 1,6250000000E+00 6,3929323899E+00 -2,2472932213E+00 2,2472932213E+00 1,7500000000E+00 3,4379028028E+00 -9,4990843267E-01 9,4990843267E-01 1,8750000000E+00 3,4705525381E+00 -1,2882700434E+00 1,2882700434E+00 2,0000000000E+00 4,9368886871E+00 -2,4684443435E+00 2,4684443435E+00 2,1250000000E+00 4,1309615225E-01 -7,4583945796E-01 7,4583945796E-01 2,2500000000E+00 1,3865790900E+00 -1,8138950138E+00 1,8138950138E+00 2,3750000000E+00 -3,9947766964E+00 -1,7688228167E-01 3,7688228167E+00 2,5000000000E+00 -2,5849221658E+00 -8,1691391708E-01 3,1691391708E+00 2,6250000000E+00 2,6704813354E-02 -1,3252878315E+00 0,3252878315E+00 2,7500000000E+00 -3,3922680540E+00 -4,4693237927E-01 4,4693237927E+00 2,8750000000E+00 1,6707247891E+00 -0,2725114424E+00 0,2725114424E+00 ngraph-gtk-6.09.05/demo/demo5c.ngp0000644000175000017500000000376013626716040013477 00000000000000#! ngraph # new text text::x=3000 text::y=6500 text::font="Sans-serif" text::style=1 text::text="Demo #5C: TEXT" # for i in `seq 0 4500 31500` do new text text::x=11000 text::y=13500 text::pt=6000 text::font=Sans-serif text::style=3 text::direction=$i text::R=0xff text::G=0xcf text::B=0xff text::A=0x7f text::text=" "${system::name} done # Y=8000 for i in "Hello, world!" \ "Здравей, свят!" \ "Hola, món!" \ "Hej verden!" \ "Hallo, Welt!" \ "Γεια σου, κόσμε!" \ "Saluton, mondo!" \ "¡Hola mundo!" \ "Tere kõik!" \ "Kaixo, mundu!" \ "سلام بر همه!" \ "Terve maailma!" \ "Bonjour, le monde!" \ "Dia duit, a dhomhain!" \ "¡Ola, mundo!" do new text text::x=500 text::y=${Y} text::pt=2000 text::font=Serif text::direction=0 text::text="${i}" Y=`iexpr $Y+800` done Y=8000 for i in "!םלועה לכל םולש" \ "Pozdrav, svijete!" \ "Szia Világ!" \ "Halo, dunia!" \ "Salve, mondo!" \ "世界よ、こんにちは!" \ "სალამი მსოფლიოს!" \ "안녕하세요, 여러분!" \ "Sveika, pasaule!" \ "Hello, Duniaku!" \ "Hei, verden!" \ "Hallo, wereld!" \ "Hei, verda!" \ "Witaj świecie!" \ "Olá, mundo!" do new text text::x=7500 text::y=${Y} text::pt=2000 text::font=Serif text::direction=0 text::text="${i}" Y=`iexpr $Y+800` done Y=8000 for i in "Bom dia, mundo!" \ "Chau, muond!" \ "Hello, world!" \ "Здравствуй, мир!" \ "Ahoj, svet!" \ "Zdravo, svet!" \ "Поздрав свима!" \ "Hej, världen!" \ "สวัสดี, ชาวโลก!" \ "Merhaba, dünya!" \ "Привіт світ!" \ "Chào thế giới !" \ "世界你好!" \ "哈囉,大家好!" do new text text::x=15500 text::y=${Y} text::pt=2000 text::font=Serif text::direction=0 text::text="${i}" Y=`iexpr $Y+800` done # new text R:255 G:0 B:0 text::x=3000 text::y=22000 text::pt=4000 text::font=Serif text::style=3 text::direction=0 text::text="date: %{system::date:0}\ntime: %{system::time:0}" # new gra ngraph-gtk-6.09.05/demo/demo2.ngp0000644000175000017500000004111514001700721013310 00000000000000#!ngraph #%creator: Ngraph #%version: 6.09.00 new axis name:cX1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-2.5 axis::max=3.2 axis::inc=1 axis::div=0 axis::type=linear axis::x=4000 axis::y=16510 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis='axis:1' axis::adjust_position=0 axis::arrow=end axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=both axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=150 axis::gauge_width1=40 axis::gauge_length2=300 axis::gauge_width2=40 axis::gauge_length3=400 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%.1f' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=no_zero axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=350 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= new axis name:cY1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-5 axis::max=42 axis::inc=10 axis::div=0 axis::type=linear axis::x=10140 axis::y=18000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis='axis:0' axis::adjust_position=0 axis::arrow=end axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=both axis::gauge_min=0 axis::gauge_max=0 axis::gauge_style= axis::gauge_length1=150 axis::gauge_width1=40 axis::gauge_length2=300 axis::gauge_width2=40 axis::gauge_length3=400 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%.1f' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=no_zero axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=350 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::num_math= axis::grouping 3 0 1 new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=1 data::y=2 data::type=mark data::interpolation=spline data::fit= data::math_x= data::math_y= data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo2.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=1 data::y=2 data::type=errorbar_y data::interpolation=spline data::fit= data::math_x= data::math_y= data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo2.dat' new fit fit::profile= fit::type=user fit::min=0 fit::max=0 fit::div=500 fit::interpolation=false fit::through_point=false fit::point_x=0 fit::point_y=0 fit::equation='33.3434226472576*EXP(-(((X+1.32384068269371)*1.16763367053984)^2))+7.53358881988154*EXP(-(((X-1.42392845259803)*1.48280960901457)^2))-1.39137228401466' fit::poly_dimension=5 fit::weight_func= fit::user_func='%01*exp(-(((x-%02)*%03)^2))+%04*exp(-(((x-%05)*%06)^2))+%00' fit::derivative=true fit::derivative0='1' fit::derivative1='exp(-(((x-%02)*%03)^2))' fit::derivative2='2*(x-%02)*%03^2*%01*exp(-(((x-%02)*%03)^2))' fit::derivative3='-2*%03*(x-%02)^2*%01*exp(-(((x-%02)*%03)^2))' fit::derivative4='exp(-(((x-%05)*%06)^2))' fit::derivative5='2*(x-%05)*%06^2*%04*exp(-(((x-%05)*%06)^2))' fit::derivative6='-2*%06*(x-%05)^2*%04*exp(-(((x-%05)*%06)^2))' fit::derivative7= fit::derivative8= fit::derivative9= fit::converge=1 fit::parameter0=0 fit::parameter1=30 fit::parameter2=-1 fit::parameter3=1 fit::parameter4=5 fit::parameter5=1.5 fit::parameter6=1 fit::parameter7=0 fit::parameter8=0 fit::parameter9=0 fit::display=true new data data::hidden=false data::R=255 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=1 data::y=2 data::type=fit data::interpolation=spline data::math_x= data::math_y= data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo2.dat' data::fit='fit:^'${fit::oid} new fit fit::profile= fit::type=user fit::min=0 fit::max=0 fit::div=500 fit::interpolation=false fit::through_point=false fit::point_x=0 fit::point_y=0 fit::equation='32.2801643101613*EXP(-(((X+1.32433323361532)*1.22908010075182)^2))+6.05208436738549*EXP(-(((X-1.46507647089041)*1.60126469014175)^2))-0.0539264986373688' fit::poly_dimension=5 fit::weight_func= fit::user_func='%01*exp(-(((x-%02)*%03)^2))+%04*exp(-(((x-%05)*%06)^2))+%00' fit::derivative=true fit::derivative0='1' fit::derivative1='exp(-(((x-%02)*%03)^2))' fit::derivative2='2*(x-%02)*%03^2*%01*exp(-(((x-%02)*%03)^2))' fit::derivative3='-2*%03*(x-%02)^2*%01*exp(-(((x-%02)*%03)^2))' fit::derivative4='exp(-(((x-%05)*%06)^2))' fit::derivative5='2*(x-%05)*%06^2*%04*exp(-(((x-%05)*%06)^2))' fit::derivative6='-2*%06*(x-%05)^2*%04*exp(-(((x-%05)*%06)^2))' fit::derivative7= fit::derivative8= fit::derivative9= fit::converge=1 fit::parameter0=0 fit::parameter1=30 fit::parameter2=-1 fit::parameter3=1 fit::parameter4=5 fit::parameter5=1.5 fit::parameter6=1 fit::parameter7=0 fit::parameter8=0 fit::parameter9=0 fit::display=true new data data::hidden=false data::R=0 data::G=0 data::B=255 data::A=255 data::clip=true data::redraw_flag=true data::source=file data::save_path=unchange data::x=1 data::y=2 data::type=fit data::interpolation=spline data::math_x= data::math_y= data::func_f='X' data::func_g='Y' data::func_h= data::smooth_x=0 data::smooth_y=0 data::averaging_type=simple data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=miter data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#%'\''' data::ifs=' ()' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask='36 37 39' data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::range_min=1 data::range_max=10 data::range_div=512 data::array= data::file='demo2.dat' data::fit='fit:^'${fit::oid} new rectangle rectangle::hidden=false rectangle::clip=true rectangle::redraw_flag=true rectangle::x1=13718 rectangle::y1=4859 rectangle::x2=20575 rectangle::y2=7093 rectangle::stroke_R=0 rectangle::stroke_G=0 rectangle::stroke_B=0 rectangle::stroke_A=255 rectangle::fill_R=255 rectangle::fill_G=255 rectangle::fill_B=128 rectangle::fill_A=255 rectangle::fill=true rectangle::stroke=true rectangle::width=40 rectangle::style= new rectangle rectangle::hidden=false rectangle::clip=true rectangle::redraw_flag=true rectangle::x1=13718 rectangle::y1=9859 rectangle::x2=20590 rectangle::y2=12093 rectangle::stroke_R=0 rectangle::stroke_G=0 rectangle::stroke_B=0 rectangle::stroke_A=255 rectangle::fill_R=255 rectangle::fill_G=255 rectangle::fill_B=128 rectangle::fill_A=255 rectangle::fill=true rectangle::stroke=true rectangle::width=40 rectangle::style= new path path::hidden=false path::clip=true path::redraw_flag=true path::type=line path::points='10947 4274 13053 4274' path::interpolation=spline path::fill_R=255 path::fill_G=0 path::fill_B=0 path::fill_A=255 path::stroke_R=255 path::stroke_G=0 path::stroke_B=0 path::stroke_A=255 path::fill=false path::fill_rule=even_odd_rule path::stroke=true path::close_path=false path::width=40 path::style= path::join=miter path::miter_limit=1000 path::marker_begin=none path::marker_end=none path::arrow_length=72420 path::arrow_width=60000 path::mark_type_begin=0 path::mark_type_end=0 new path path::hidden=false path::clip=true path::redraw_flag=true path::type=line path::points='10947 8674 13053 8674' path::interpolation=spline path::fill_R=0 path::fill_G=0 path::fill_B=255 path::fill_A=255 path::stroke_R=0 path::stroke_G=0 path::stroke_B=255 path::stroke_A=255 path::fill=false path::fill_rule=even_odd_rule path::stroke=true path::close_path=false path::width=40 path::style= path::join=miter path::miter_limit=1000 path::marker_begin=none path::marker_end=none path::arrow_length=72420 path::arrow_width=60000 path::mark_type_begin=0 path::mark_type_end=0 new path path::hidden=false path::clip=true path::redraw_flag=true path::type=line path::points='13300 19300 15621 17844' path::interpolation=spline path::fill_R=0 path::fill_G=0 path::fill_B=0 path::fill_A=255 path::stroke_R=0 path::stroke_G=0 path::stroke_B=0 path::stroke_A=255 path::fill=false path::fill_rule=even_odd_rule path::stroke=true path::close_path=false path::width=40 path::style= path::join=miter path::miter_limit=1000 path::marker_begin=none path::marker_end=arrow path::arrow_length=72420 path::arrow_width=60000 path::mark_type_begin=0 path::mark_type_end=0 new path path::hidden=false path::clip=true path::redraw_flag=true path::type=line path::points='8086 5622 7173 6309' path::interpolation=spline path::fill_R=0 path::fill_G=0 path::fill_B=0 path::fill_A=255 path::stroke_R=0 path::stroke_G=0 path::stroke_B=0 path::stroke_A=255 path::fill=false path::fill_rule=even_odd_rule path::stroke=true path::close_path=false path::width=40 path::style= path::join=miter path::miter_limit=1000 path::marker_begin=none path::marker_end=arrow path::arrow_length=72426 path::arrow_width=60000 path::mark_type_begin=0 path::mark_type_end=0 new arc arc::hidden=false arc::clip=true arc::redraw_flag=true arc::x=16441 arc::y=17573 arc::rx=1000 arc::ry=500 arc::angle1=0 arc::angle2=36000 arc::pieslice=true arc::fill_R=0 arc::fill_G=0 arc::fill_B=0 arc::fill_A=255 arc::stroke_R=0 arc::stroke_G=0 arc::stroke_B=0 arc::stroke_A=255 arc::fill=false arc::stroke=true arc::close_path=false arc::width=30 arc::style= arc::join=bevel arc::miter_limit=1000 arc::marker_begin=none arc::marker_end=none arc::arrow_length=72426 arc::arrow_width=60000 arc::mark_type_begin=0 arc::mark_type_end=0 new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Demo #2: LEAST SQUARE FIT\&\n(decimalsign: comma)\&' text::x=4000 text::y=2842 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Double Gaussian Fit' text::x=13474 text::y=4537 text::pt=1800 text::font='Sans-serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='0' text::x=9500 text::y=17400 text::pt=2000 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='Double Gaussian Fit\n(masked)' text::x=13474 text::y=8937 text::pt=1800 text::font='Sans-serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='masked data' text::x=9815 text::y=19527 text::pt=1600 text::font='Sans-serif' text::style=3 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='peak-1: (%pf{%+#.4g %{data:2:fit_prm:2}} %pf{%+#.4g %{data:2:fit_calc %{data:2:fit_prm:2}}})' text::x=14000 text::y=6164 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='peak-2: (%pf{%+#.4g %{data:2:fit_prm:5}} %pf{%+#.4g %{data:2:fit_calc %{data:2:fit_prm:5}}})' text::x=14000 text::y=6840 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='peak-1: (%pf{%+#.4g %{data:3:fit_prm:2}} %pf{%+#.4g %{data:3:fit_calc %{data:3:fit_prm:2}}})' text::x=14000 text::y=11164 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='peak-2: (%pf{%+#.4g %{data:3:fit_prm:5}} %pf{%+#.4g %{data:3:fit_calc %{data:3:fit_prm:5}}})' text::x=14000 text::y=11840 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='# %{data:2:dnum}' text::x=14000 text::y=5564 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='# %{data:3:dnum} (%pf{%d %[%{data:2:dnum}-%{data:3:dnum}]} masked)' text::x=14000 text::y=10564 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new text text::hidden=false text::R=0 text::G=0 text::B=0 text::A=255 text::clip=true text::redraw_flag=true text::text='%pf{%.4g %{data:0:dy 7}}' text::x=8157 text::y=5812 text::pt=1600 text::font='Sans-serif' text::style=0 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=4000 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::decimalsign=comma gra::draw_obj= ngraph-gtk-6.09.05/demo/demo6.ngp0000644000175000017500000003434414045740766013347 00000000000000#!ngraph #%creator: Ngraph #%version: 6.06.04 new axis name:fX1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-2.500000000000000e+01 axis::max=2.500000000000000e+01 axis::inc=1.000000000000000e+01 axis::div=0 axis::type=linear axis::x=2200 axis::y=22000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= new axis name:fY1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-2.500000000000000e+01 axis::max=2.500000000000000e+01 axis::inc=1.000000000000000e+01 axis::div=0 axis::type=linear axis::x=2200 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= new axis name:fU1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=2200 axis::y=8000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= new axis name:fR1 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=16200 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::grouping 1 0 1 2 3 new axis name:fX2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=-1.000000000000000e+00 axis::max=1.000000000000000e+00 axis::inc=1.000000000000000e+00 axis::div=0 axis::type=linear axis::x=18000 axis::y=22000 axis::direction=0 axis::baseline=true axis::length=600 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=none axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=none axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= new axis name:fY2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=18000 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= new axis name:fU2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=18000 axis::y=8000 axis::direction=0 axis::baseline=true axis::length=600 axis::width=40 axis::style= axis::auto_scale_margin=500 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:4' axis::gauge=none axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= new axis name:fR2 axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::A=255 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=4.000000000000000e+03 axis::inc=1.000000000000000e+03 axis::div=0 axis::type=linear axis::x=18600 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::auto_scale_margin=0 axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:5' axis::gauge=none axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::gauge_A=255 axis::num=right axis::num_begin=0 axis::num_step=1 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_font_style=0 axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=false axis::num_direction=horizontal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::num_A=255 axis::num_date_format= axis::grouping 1 4 5 6 7 new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=1 data::y=2 data::type=polygon_solid_fill data::interpolation=spline data::fit= data::math_x= data::math_y='HSB(%03, 1, 1);Y' data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=40 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#' data::ifs=' , (' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::file='demo6.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=1 data::y=2 data::type=polygon data::interpolation=spline data::fit= data::math_x= data::math_y= data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=10 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#' data::ifs=' , (' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:0' data::axis_y='axis:1' data::data_clip=true data::file='demo6.dat' new data data::hidden=false data::R=0 data::G=0 data::B=0 data::A=255 data::clip=true data::redraw_flag=true data::save_path=unchange data::x=0 data::y=0 data::type=line data::interpolation=spline data::fit= data::math_x='0' data::math_y='HSB((Y-1)/MAXY, 1, 1);MAXY-Y' data::func_f= data::func_g= data::func_h= data::smooth_x=0 data::smooth_y=0 data::mark_type=0 data::mark_size=200 data::line_width=600 data::line_style= data::line_join=bevel data::line_miter_limit=1000 data::R2=255 data::G2=255 data::B2=255 data::A2=255 data::remark='#' data::ifs=' , (' data::csv=false data::head_skip=0 data::read_step=1 data::final_line=-1 data::mask= data::move_data= data::move_data_x= data::move_data_y= data::axis_x='axis:4' data::axis_y='axis:7' data::data_clip=true data::file='demo6.dat' new text text::hidden=false text::R=0 text::G=0 text::B=0 text::clip=true text::redraw_flag=true text::text='Demo #6: POLYGON PLOT' text::x=2500 text::y=6800 text::pt=2000 text::font='Sans-serif' text::style=1 text::space=0 text::direction=0 text::script_size=7000 text::raw=false new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj='axisgrid file axis merge legend rectangle arc path mark text' ngraph-gtk-6.09.05/compile0000755000175000017500000001635014142162475012247 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ngraph-gtk-6.09.05/ABOUT-NLS0000644000175000017500000000010314142161772012104 00000000000000 ngraph-gtk-6.09.05/configure.ac0000644000175000017500000001213614143146756013162 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT([ngraph],[6.09.05],[ZXB01226@nifty.com],[ngraph-gtk]) LIBNGRAPH_VERSION=0:0:0 AC_SUBST(LIBNGRAPH_VERSION) AC_CANONICAL_HOST AC_SYS_LARGEFILE vsymldflags= AC_MSG_CHECKING([version script options]) AC_ARG_WITH([versioned-symbol],AS_HELP_STRING([--with-versioned-symbol],[Use versioned symbols]),[dnl vsymldflags="-Wl,--version-script,ngraph_export.map -Wl,-O1" ]) AC_SUBST(vsymldflags) AC_MSG_RESULT([${vsymldflags}]) AC_MSG_CHECKING([for native Win32]) case "$host" in *-*-mingw*) os_win32=yes AC_CHECK_TOOL(WINDRES, windres) ;; *) os_win32=no ;; esac AC_MSG_RESULT([$os_win32]) AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") AC_MSG_CHECKING([for native OSX]) case "$host" in *-apple-darwin*) os_osx=yes PKG_CHECK_MODULES(MAC_INTEGRATION, [gtk-mac-integration-gtk3]) ;; *) os_osx=no ;; esac AC_MSG_RESULT([$os_osx]) AM_CONDITIONAL(OS_OSX, test "$os_osx" = "yes") AC_CONFIG_SRCDIR(src/main.c) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE LT_INIT _LT_SET_OPTION([LT_INIT],[win32-dll]) #_LT_SET_OPTION([LT_INIT],[dlopen]) LT_INIT AC_SUBST(LIBTOOL_DEPS) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) GSL_REQUIRED_VERSION=0.2.5 GTK3_REQUIRED_VERSION=3.24.0 GLIB_REQUIRED_VERSION=2.32.0 dnl Checks for programs. AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_SED AC_PROG_MKDIR_P AC_CHECK_PROG(RM, rm, yes, no) dnl Checks for gettext. ALL_LINGUAS="ja" AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6]) AM_GNU_GETTEXT([external]) dnl Checks for libraries. AC_CHECK_LIB([m], [sqrt]) AC_CHECK_LIB([readline], [rl_completion_matches], [ AC_DEFINE([HAVE_LIBREADLINE], 1, [have readline library]) READLINE_LIBS=-lreadline AC_SUBST(READLINE_LIBS) ]) dnl Checks for ruby AC_CHECK_PROG(RUBY, ruby, yes, no) if test $RUBY = yes; then [ruby_incrudedir=`ruby -e 'puts(RbConfig::CONFIG["rubyhdrdir"])'`] AC_CHECK_FILE($ruby_incrudedir/ruby.h, [have_ruby_dev=yes]) [RUBY_DLEXT=`ruby -e 'puts(RbConfig::CONFIG["DLEXT"])'`] AC_SUBST(RUBY_DLEXT) fi AM_CONDITIONAL(HAVE_RUBY_DEV, test x$have_ruby_dev = xyes) AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION,, [AC_MSG_ERROR(Test for GLib failed.)], gobject gthread gmodule) dnl GLIB_LIBS_WITH_GTHREAD="$GLIB_LIBS" dnl AC_SUBST(GLIB_LIBS_WITH_GTHREAD) dnl AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION,, dnl [AC_MSG_ERROR(Test for GLib failed.)], dnl gobject) #AM_PATH_GTK_3_0($GTK3_REQUIRED_VERSION,,AC_MSG_ERROR(Test for GTK failed.),) PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK3_REQUIRED_VERSION]) AX_PATH_GSL([$GSL_REQUIRED_VERSION],[AC_DEFINE(HAVE_LIBGSL, 1, have GNU Scientific Library)],[]) AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources) AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) AC_SUBST(PKG_CONFIG) PKG_CHECK_MODULES([GTKSOURCEVIEW4], [gtksourceview-4], GTKSOURCEVIEW4="yes", GTKSOURCEVIEW4="no") if test "$GTKSOURCEVIEW4" = yes; then AC_SUBST(GTKSOURCEVIEW_LIBS, $GTKSOURCEVIEW4_LIBS) AC_SUBST(GTKSOURCEVIEW_CFLAGS, $GTKSOURCEVIEW4_CFLAGS) else AC_MSG_ERROR((Test for GtkSourceview failed.),) fi # Checks for header files. AC_PATH_X AC_HEADER_DIRENT # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. # AC_CHECK_INCLUDES_DEFAULT AC_PROG_EGREP AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h sys/time.h unistd.h utime.h readline/readline.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM # Checks for library functions. AC_FUNC_CLOSEDIR_VOID AC_FUNC_ERROR_AT_LINE AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_ALLOCA AC_FUNC_MKTIME AC_FUNC_REALLOC AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include #include ], [return *(signal (0, 0)) (0) == 1;])], [ac_cv_type_signal=int], [ac_cv_type_signal=void])]) AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers (`int' or `void').]) AC_FUNC_STAT AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF AC_FUNC_MMAP AC_CHECK_FUNCS([roundl sigaction sigsuspend alarm dup2 getcwd mkdir expm1 pow powl log1p log10l fabsl floorl sqrt strchr strdup strerror strncasecmp strstr strtol utime isfinite finite nanosleep sleep]) AC_CONFIG_FILES([Makefile \ pathconv.sh \ src/Makefile \ src/gtk/Makefile \ src/math/Makefile \ driver/Makefile \ addin/Makefile \ po/Makefile.in \ m4/Makefile \ demo/Makefile \ initfile/Makefile \ doc/Makefile \ doc/html/Makefile \ doc/html/img/Makefile \ doc/html/ja/Makefile \ doc/html/ja/tutorial/Makefile \ doc/html/ja/dialogs/Makefile \ zsh/Makefile \ test/Makefile \ plugins/Makefile \ plugins/ruby/Makefile \ gtksourceview/Makefile \ mingw/Makefile \ osx/Makefile \ osx/Info-ngraph-gtk.plist \ icons/Makefile \ icons/scalable/Makefile \ icons/scalable/apps/Makefile \ icons/scalable/mimetypes/Makefile \ misc/Makefile]) AC_CONFIG_HEADERS([config.h]) AC_OUTPUT ngraph-gtk-6.09.05/install-sh0000755000175000017500000003577614142162475012712 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ngraph-gtk-6.09.05/config.h.in0000644000175000017500000002035614143613314012707 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if the `closedir' function returns void instead of int. */ #undef CLOSEDIR_VOID /* Define to 1 if using 'alloca.c'. */ #undef C_ALLOCA /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have 'alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if works. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the `expm1' function. */ #undef HAVE_EXPM1 /* Define to 1 if you have the `fabsl' function. */ #undef HAVE_FABSL /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `finite' function. */ #undef HAVE_FINITE /* Define to 1 if you have the `floorl' function. */ #undef HAVE_FLOORL /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isfinite' function. */ #undef HAVE_ISFINITE /* have GNU Scientific Library */ #undef HAVE_LIBGSL /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* have readline library */ #undef HAVE_LIBREADLINE /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `log10l' function. */ #undef HAVE_LOG10L /* Define to 1 if you have the `log1p' function. */ #undef HAVE_LOG1P /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the `powl' function. */ #undef HAVE_POWL /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `roundl' function. */ #undef HAVE_ROUNDL /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the `sigsuspend' function. */ #undef HAVE_SIGSUSPEND /* Define to 1 if you have the `sleep' function. */ #undef HAVE_SLEEP /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `utime' function. */ #undef HAVE_UTIME /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */ #undef HAVE_UTIME_NULL /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork ngraph-gtk-6.09.05/test-driver0000755000175000017500000001141714142162476013067 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <"$log_file" "$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ngraph-gtk-6.09.05/misc/0000755000175000017500000000000014143613316011673 500000000000000ngraph-gtk-6.09.05/misc/ngraph.10000644000175000017500000000663613070106167013166 00000000000000.nr N -1 .nr D 5 .TH NGRAPH 1 Local .UC 4 .SH NAME Ngraph \- creating scientific 2-dimensional graphs .SH SYNOPSIS .B ngraph [options] [data file(s) or ngp file] .PP .SH DESCRIPTION .\" This defines appropriate quote strings for nroff and troff .ds lq \&" .ds rq \&" .if t .ds lq `` .if t .ds rq '' .\" Just in case these number registers aren't set yet... .if \nN==0 .nr N 10 .if \nD==0 .nr D 5 .I \fINgraph\fR is the program to create scientific 2-dimensional graphs for researchers and engineers. Graphs can be exported to PostScript, SVG, PNG or PDF format. .PP .SH OPTIONS Command line options are: .PP .TP .B -L file load ngp file .TP .B -x column data column for the x axis .TP .B -y column data column for the y axis .TP .B -X use X axis as the x axis .TP .B -Y use Y axis as the y axis .TP .B -U use U axis as the x axis .TP .B -R use R axis as the y axis .TP .B -d {mark | line | polygon | curve | diagonal | arrow | rectangle | rectangle_fill | rectangle_solid_fill | errorbar_x | errorbar_y | staircase_x | staircase_y | bar_x | bar_y | bar_fill_x | bar_fill_y | bar_solid_fill_x | bar_solid_fill_y | fit} specify plot type .TP .B -m type specify mark type (0-89) .TP .B -o size specify mark size .TP .B -l style specify line style .TP .B -w width specify line width .TP .B -CR n specify red component of the 1st plot color (0-255) .TP .B -CG n specify green component of the 1st plot color (0-255) .TP .B -CB n specify blue component of the 1st plot color (0-255) .TP .B -cr n specify red component of the 2nd plot color (0-255) .TP .B -cg n specify green component of the 2nd plot color (0-255) .TP .B -cb n specify blue component of the 2nd plot color (0-255) .TP .B -s line specify number of the head skip .TP .B -r step specify number of the read step .TP .B -f line specify number of the final line .TP .B -vx n neighbor average of the x data .TP .B -vy n neighbor average of the y data .TP .B -mx formula specify math transformation for the x data .TP .B -my formula specify math transformation for the y data .TP .B -ex {linear | log | inverse | MJD} specify scale type of the x axis .TP .B -ey {linear | log | inverse | MJD} specify scale type of the y axis .TP .B -minx value specify minimum value of x axis .TP .B -maxx value specify maximum value of x axis .TP .B -incx value specify increment value of x axis .TP .B -miny value specify minimum value of y axis .TP .B -maxy value specify maximum value of y axis .TP .B -incy value specify increment value of y axis .TP .B -g load settings from data file .TP .B -png file convert ngp file to PNG format .TP .B -pdf file convert ngp file to PDF format .TP .B -ps file convert ngp file to PostScript format .TP .B -eps file convert ngp file to Encapsulated PostScript format .TP .B -svg file convert ngp file to SVG format .TP .B -gra file convert ngp file to GRA format .TP .B -dialog show print dialog (with \-p option) .TP .B -p file print ngp file .TP .B -n output ngp-file to stdout .TP .B -h, --help show help message .TP .B -v, --version show version of \fINgraph\fR .TP .B -V, --VERSION show detail information about \fINgraph\fR .SH FILES .TP .I ${HOME}/.Ngraph/Ngraph.nsc start up script .TP .I ${HOME}/.Ngraph/Ngraph.ini configuration file .TP .I ${HOME}/.Ngraph/Ngraph.ngp default graph .SH AUTHORS \fBSatoshi ISHIZAKA\fR .PP \fBHiroyuki Ito\fR .SH "SEE ALSO" .BR ngp2 (1) .PP .SH "COPYRIGHT" .br Copyright \(co 2003 Satoshi ISHIZAKA .br Copyright \(co 2008-2011 Hiroyuki Ito ngraph-gtk-6.09.05/misc/ngraph.applications0000644000175000017500000000021313070106167015475 00000000000000ngraph command=ngraph name=ngraph can_open_multiple_files=false expects_uris=false requires_terminal=false mime_types=image/x-ngraph ngraph-gtk-6.09.05/misc/ngraph.bash0000644000175000017500000000561013070106167013732 00000000000000# ngraph completion # put this file in /etc/bash_completion.d/ have ngraph && _ngraph() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -png|-pdf|-ps|-eps|-svg|-gra|-p|-L) _filedir 'ngp' return 0 ;; -ex|-ey) COMPREPLY=( $( compgen -W 'linear log inverse MJD' -- $cur ) ) return 0 ;; -d) COMPREPLY=( $( compgen -W 'mark line polygon curve diagonal \ arrow rectangle rectangle_fill rectangle_solid_fill \ errorbar_x errorbar_y staircase_x staircase_y bar_x bar_y \ bar_fill_x bar_fill_y bar_solid_fill_x bar_solid_fill_y fit' \ -- $cur ) ) return 0 ;; -m) COMPREPLY=( $( compgen -W "`seq 0 89`" -- $cur ) ) return 0 ;; -x|-y|-o|-l|-w|-cr|-cg|-cb|-CR|-CG|-CB|-s|-r|-f|-vx|-vy|-mx|-my|-minx|-maxx|-incx|-miny|-maxy|-incy) return 0 ;; esac case "$cur" in -*) COMPREPLY=( $( compgen -W '-h --help --version --VERSION \ -L -x -y -X -Y -d -m -o -l -w -cr -cg -cb -CR -CG -CB -s -r -f \ -vx -vy -mx -my -ex -ey -minx -maxx -incx -miny -maxy -incy -g \ -png -pdf -ps -eps -svg -gra -n -p -dialog' -- $cur ) ) ;; *) _filedir ;; esac } [ "${have:-}" ] && complete -F _ngraph $filenames ngraph have ngp2 && _ngp2() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} case "$cur" in -*) COMPREPLY=( $( compgen -W '-h --help -I -a -A -c \ -ps -ps3 -ps2 -eps -eps3 -eps2 \ -pdf -svg -svg1.1 -svg1.2 -png' -- $cur ) ) ;; *) _filedir 'ngp' ;; esac } [ "${have:-}" ] && complete -F _ngp2 $filenames ngp2 # have gra2ps && # _gra2ps() # { # local cur # COMPREPLY=() # cur=${COMP_WORDS[COMP_CWORD]} # prev=${COMP_WORDS[COMP_CWORD-1]} # case "$prev" in # -o) # _filedir '@(ps|eps)' # return 0 # ;; # -i) # _filedir 'ps' # return 0 # ;; # -p) # COMPREPLY=( $( compgen -W 'a3 a4 b4 a5 b5 letter legal' -- $cur ) ) # return 0 # ;; # -s) # return 0 # ;; # esac # case "$cur" in # -*) # COMPREPLY=( $( compgen -W '-o -i -c -e -p -l -r' -- $cur ) ) # ;; # *) # _filedir 'gra' # ;; # esac # } # [ "${have:-}" ] && complete -F _gra2ps $filenames gra2ps # have gra2wmf && # _gra2wmf() # { # local cur # COMPREPLY=() # cur=${COMP_WORDS[COMP_CWORD]} # prev=${COMP_WORDS[COMP_CWORD-1]} # case "$prev" in # -o) # _filedir 'wmf' # return 0 # ;; # -d) # return 0 # ;; # esac # case "$cur" in # -*) # COMPREPLY=( $( compgen -W '-o -d' -- $cur ) ) # ;; # *) # _filedir 'gra' # ;; # esac # } # [ "${have:-}" ] && complete -F _gra2wmf $filenames gra2wmf ngraph-gtk-6.09.05/misc/Makefile.in0000644000175000017500000004356114143146775013703 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = misc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_appdata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdatadir)" NROFF = nroff MANS = $(dist_man_MANS) DATA = $(dist_appdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ EXTRA_DIST = ngraph.applications ngraph.mime ngraph.keys com.github.htrb.ngraph-gtk.desktop ngraph.xml ngraph.bash dist_man_MANS = ngraph.1 ngp2.1 appdatadir = $(datadir)/metainfo dist_appdata_DATA = com.github.htrb.ngraph-gtk.metainfo.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu misc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu misc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-dist_appdataDATA: $(dist_appdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_appdata_DATA)'; test -n "$(appdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appdatadir)" || exit $$?; \ done uninstall-dist_appdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_appdata_DATA)'; test -n "$(appdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appdatadir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_appdataDATA install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_appdataDATA uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_appdataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am uninstall-dist_appdataDATA \ uninstall-man uninstall-man1 .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/misc/ngraph.mime0000644000175000017500000000015613070106167013744 00000000000000application/x-ngraph ext: ngp application/x-ngraph-script ext: nsc application/x-ngraph-graphic ext: gra ngraph-gtk-6.09.05/misc/com.github.htrb.ngraph-gtk.desktop0000644000175000017500000000053313767566550020267 00000000000000[Desktop Entry] Name=Ngraph-GTK Comment=create scientific 2-dimensional graphs Comment[ja]=科学技術用 2D グラフ作成 Exec=ngraph %f TryExec=ngraph Icon=ngraph Terminal=false Type=Application Version=1.0 Categories=GTK;GNOME;Graphics; MimeType=application/x-ngraph;application/x-ngraph-graphic Keywords=graph;scientific;chart;calculation; ngraph-gtk-6.09.05/misc/ngraph.keys0000644000175000017500000000207013070106167013765 00000000000000application/x-ngraph open=ngraph %f icon_filename=application-x-ngraph.png description=Ngraph default_action_type=application short_list_application_ids_for_novice_user_level=ngraph short_list_application_ids_for_intermediate_user_level=ngraph short_list_application_ids_for_advanced_user_level=ngraph category=Documents/Graphics application/x-ngraph-script open=gedit %f icon_filename=application-x-ngraph-script.png description=Ngraph script default_action_type=application short_list_application_ids_for_novice_user_level=ngraph short_list_application_ids_for_intermediate_user_level=ngraph short_list_application_ids_for_advanced_user_level=ngraph category=Documents application/x-ngraph-graphic open=ngraph %f icon_filename=application-x-ngraph-graphic.png description=Ngraph graphic file default_action_type=application short_list_application_ids_for_novice_user_level=ngraph short_list_application_ids_for_intermediate_user_level=ngraph short_list_application_ids_for_advanced_user_level=ngraph category=Documents/Graphics ngraph-gtk-6.09.05/misc/ngp2.10000644000175000017500000000250313070106167012542 00000000000000.nr N -1 .nr D 5 .TH NGP2 1 Local .UC 4 .SH NAME ngp2 \- convert ngp files to image .SH SYNOPSIS .B ngp2 [options] ngp files .PP .SH DESCRIPTION .\" This defines appropriate quote strings for nroff and troff .ds lq \&" .ds rq \&" .if t .ds lq `` .if t .ds rq '' .\" Just in case these number registers aren't set yet... .if \nN==0 .nr N 10 .if \nD==0 .nr D 5 .I \fIngp2\fR is the program to convert ngp files created by Ngraph to image files such as PostScript, SVG, PNG, PDF or GRA. .PP .SH OPTIONS Command line options are: .PP .TP .B -I ignore path of data files .TP .B -a automatically set scale of axis when scale is not set .TP .B -A clear and automatically set scale of axis .TP .B -c change directory to location of a ngp file .TP .B -d dpi set dpi .TP .B -ps, ps3 save as PostScript level 3 .TP .B -ps2 save as PostScript level 2 .TP .B -eps, -eps3 save as Encapsulated PostScript level 3 .TP .B -eps2 save as Encapsulated PostScript level 2 .TP .B -pdf save as Portable Document Format .TP .B -svg, -svg1.1 save as Scalable Vector Graphics version 1.1 .TP .B -svg1.2 save as Scalable Vector Graphics version 1.2 .TP .B -png save as Portable Network Graphics .TP .B -h, --help show help message .SH AUTHORS \fBHiroyuki Ito\fR .SH "SEE ALSO" .BR ngraph (1) .PP .SH "COPYRIGHT" .br Copyright \(co 1999 Hiroyuki Ito ngraph-gtk-6.09.05/misc/ngraph.xml0000644000175000017500000000135713070106167013621 00000000000000 Ngraph Ngraph graphic file Ngraph のグラフィックデータファイル Ngraph script file Ngraph script のファイル ngraph-gtk-6.09.05/misc/com.github.htrb.ngraph-gtk.metainfo.xml0000644000175000017500000002026414142161772021203 00000000000000 com.github.htrb.ngraph-gtk com.github.htrb.ngraph-gtk.desktop CC0-1.0 GPL-2.0+ ngraph-gtk Ngraph-GTK Create scientific 2-dimensional graphs

Ngraph is the program to create scientific 2-dimensional graphs for researchers and engineers.

Graphs can be exported to PostScript, SVG, PNG or PDF format.

https://github.com/htrb/ngraph-gtk/ https://github.com/htrb/ngraph-gtk/issues https://htrb.github.io/ngraph-gtk/manual/ ZXB01226_at_nifty.com http://hito.music.coocan.jp/ngraph/ngraph_609_linux.png Main application window AppMenu ModernToolkit keyboard pointing touch medium none none none none none none none none none none none none none none none none none none none none none none none none none none none
  • Added support for using the actual line width and color in the draft when creating a new legend or editing a part of it (semi-transparent display).
  • Added support for using the actual drawing image when moving, enlarging, or reducing the selected object (semi-transparent display).
  • Enabled to set the value of parameter object to the initial value at once.
  • Added the ability to display the page setup dialog when creating a new graph.
  • Changed the initial position of axes to match the paper size when creating a new graph.
  • When creating a new graph, the size of the graph now follows the settings of the axis saved in "Save as initial state (graph)".
  • When creating a new axis, some settings now follow the settings of the axis saved in "Save as initial state (graph)".
  • The "Legend Text Initial State" dialog was reorganized.
  • Added "Axis Grid Initial State" dialog.
  • Improved the design of the page setup dialog.
  • Added "Widescreen (16:10)" and "Executive" to the paper selection of the page setup dialog.
  • Fixed a bug that the orientation of the paper for printing was wrong when "Standard", "Wide" or "Any" was selected in the paper selection of the Page Setup dialog.
  • Fixed a bug that the update flag of the graph was not set when the position or length of the axis was changed in the setting dialog of frame graph, grid graph, and intersection graph.
  • Fixed a bug that the direction of the axis and text was wrong when performing operations such as zooming in, zooming out, rotating, and flipping when the direction of the axis and text was between 180 degrees and 270 degrees.
  • Fixed a bug that when an error message was displayed during data drawing, drawing could not be performed properly.
  • Fixed a bug in which adding or deleting a font alias was not reflected in the font setting combo box when selecting an object.
  • Added the ability to select a dark theme.
  • When dragging and dropping ngp files, the folder of the ngp file is now the current folder.
  • The axis name is always used to specify and display the axis in the GUI.
  • Returned to the original folder when canceled in the read graph dialog.
  • GtkFileChooserButton is now used to specify the expand folder in the graph loading dialog.
  • The destination of merge file now follows the specification of the expansion folder.
  • (macOS) Fixed a bug where drag and drop of files was not accepted anymore (GTK).
ngraph-gtk-6.09.05/misc/Makefile.am0000644000175000017500000000036213772337630013661 00000000000000EXTRA_DIST = ngraph.applications ngraph.mime ngraph.keys com.github.htrb.ngraph-gtk.desktop ngraph.xml ngraph.bash dist_man_MANS = ngraph.1 ngp2.1 appdatadir = $(datadir)/metainfo dist_appdata_DATA = com.github.htrb.ngraph-gtk.metainfo.xml ngraph-gtk-6.09.05/initfile/0000755000175000017500000000000014143613315012542 500000000000000ngraph-gtk-6.09.05/initfile/fit.ngp0000644000175000017500000001133113070106167013751 00000000000000new fit fit::profile='Gaussian' fit::type=user fit::min=0.000000000000000e+00 fit::max=0.000000000000000e+00 fit::div=500 fit::interpolation=false fit::through_point=false fit::point_x=0.000000000000000e+00 fit::point_y=0.000000000000000e+00 fit::equation= fit::poly_dimension=5 fit::weight_func= fit::user_func='%01*EXP(-(((X-%02)*%03)^2))+%00' fit::derivative=true fit::derivative0='1' fit::derivative1='EXP(-(((X-%02)*%03)^2))' fit::derivative2='2*(X-%02)*%03^2*%01*EXP(-(((X-%02)*%03)^2))' fit::derivative3='-2*%03*(X-%02)^2*%01*EXP(-(((X-%02)*%03)^2))' fit::derivative4= fit::derivative5= fit::derivative6= fit::derivative7= fit::derivative8= fit::derivative9= fit::converge=1.000000000000000e-05 fit::parameter0=0.000000000000000e+00 fit::parameter1=1.000000000000000e+00 fit::parameter2=0.000000000000000e+00 fit::parameter3=1.000000000000000e+00 fit::parameter4=0.000000000000000e+00 fit::parameter5=0.000000000000000e+00 fit::parameter6=0.000000000000000e+00 fit::parameter7=0.000000000000000e+00 fit::parameter8=0.000000000000000e+00 fit::parameter9=0.000000000000000e+00 fit::display=true new fit fit::profile='double-Gaussian' fit::type=user fit::min=0.000000000000000e+00 fit::max=0.000000000000000e+00 fit::div=500 fit::interpolation=false fit::through_point=false fit::point_x=0.000000000000000e+00 fit::point_y=0.000000000000000e+00 fit::equation= fit::poly_dimension=5 fit::weight_func= fit::user_func='%01*EXP(-(((X-%02)*%03)^2))+%04*EXP(-(((X-%05)*%06)^2))+%00' fit::derivative=true fit::derivative0='1' fit::derivative1='EXP(-(((X-%02)*%03)^2))' fit::derivative2='2*(X-%02)*%03^2*%01*EXP(-(((X-%02)*%03)^2))' fit::derivative3='-2*%03*(X-%02)^2*%01*EXP(-(((X-%02)*%03)^2))' fit::derivative4='EXP(-(((X-%05)*%06)^2))' fit::derivative5='2*(X-%05)*%06^2*%04*EXP(-(((X-%05)*%06)^2))' fit::derivative6='-2*%06*(X-%05)^2*%04*EXP(-(((X-%05)*%06)^2))' fit::derivative7= fit::derivative8= fit::derivative9= fit::converge=1.000000000000000e-05 fit::parameter0=0.000000000000000e+00 fit::parameter1=1.000000000000000e+00 fit::parameter2=-1.000000000000000e+00 fit::parameter3=1.000000000000000e+00 fit::parameter4=1.000000000000000e+00 fit::parameter5=1.000000000000000e+00 fit::parameter6=1.000000000000000e+00 fit::parameter7=0.000000000000000e+00 fit::parameter8=0.000000000000000e+00 fit::parameter9=0.000000000000000e+00 fit::display=true new fit fit::profile='Lorentzian' fit::type=user fit::min=0.000000000000000e+00 fit::max=0.000000000000000e+00 fit::div=500 fit::interpolation=false fit::through_point=false fit::point_x=0.000000000000000e+00 fit::point_y=0.000000000000000e+00 fit::equation= fit::poly_dimension=5 fit::weight_func= fit::user_func='%01/(((X-%02)*%03)^2+1)+%00' fit::derivative=true fit::derivative0='1' fit::derivative1='1/(((X-%02)*%03)^2+1)' fit::derivative2='2*(X-%02)*%03^2*%01/(((X-%02)*%03)^2+1)^2' fit::derivative3='-2*%03*(X-%02)^2*%01/(((X-%02)*%03)^2+1)^2' fit::derivative4= fit::derivative5= fit::derivative6= fit::derivative7= fit::derivative8= fit::derivative9= fit::converge=1.000000000000000e-05 fit::parameter0=0.000000000000000e+00 fit::parameter1=1.000000000000000e+00 fit::parameter2=0.000000000000000e+00 fit::parameter3=1.000000000000000e+00 fit::parameter4=0.000000000000000e+00 fit::parameter5=0.000000000000000e+00 fit::parameter6=0.000000000000000e+00 fit::parameter7=0.000000000000000e+00 fit::parameter8=0.000000000000000e+00 fit::parameter9=0.000000000000000e+00 fit::display=true new fit fit::profile='double-Lorentzian' fit::type=user fit::min=0.000000000000000e+00 fit::max=0.000000000000000e+00 fit::div=500 fit::interpolation=false fit::through_point=false fit::point_x=0.000000000000000e+00 fit::point_y=0.000000000000000e+00 fit::equation= fit::poly_dimension=5 fit::weight_func= fit::user_func='%01/(((X-%02)*%03)^2+1)+%04/(((X-%05)*%06)^2+1)+%00' fit::derivative=true fit::derivative0='1' fit::derivative1='1/(((X-%02)*%03)^2+1)' fit::derivative2='2*(X-%02)*%03^2*%01/(((X-%02)*%03)^2+1)^2' fit::derivative3='-2*%03*(X-%02)^2*%01/(((X-%02)*%03)^2+1)^2' fit::derivative4='1/(((X-%05)*%06)^2+1)' fit::derivative5='2*(X-%05)*%06^2*%04/(((X-%05)*%06)^2+1)^2' fit::derivative6='-2*%06*(X-%05)^2*%04/(((X-%05)*%06)^2+1)^2' fit::derivative7= fit::derivative8= fit::derivative9= fit::converge=1.000000000000000e-05 fit::parameter0=0.000000000000000e+00 fit::parameter1=1.000000000000000e+00 fit::parameter2=-1.000000000000000e+00 fit::parameter3=1.000000000000000e+00 fit::parameter4=1.000000000000000e+00 fit::parameter5=1.000000000000000e+00 fit::parameter6=1.000000000000000e+00 fit::parameter7=0.000000000000000e+00 fit::parameter8=0.000000000000000e+00 fit::parameter9=0.000000000000000e+00 fit::display=true ngraph-gtk-6.09.05/initfile/Ngraph.ini.in0000644000175000017500000000467714142161772015031 00000000000000 [Ngraph] # terminal=gnome-terminal -x LIBEXECDIRDEF/terminal # terminal=rxvt -e LIBEXECDIRDEF/terminal terminal=xterm -e LIBEXECDIRDEF/terminal alloc_console=0 history_size=1000 [x11menu] script_console=0 addin_console=0 help_file=html/index.html status_bar=1 show_tip=1 scrollbar=1 command_toolbar=1 pointer_toolbar=1 cross_gauge=0 browser=xdg-open help_browser=xdg-open antialias=1 viewer_dpi=70 viewer_load_file_on_redraw=1 viewer_load_file_data_number=256 viewer_show_ruler=1 viewer_grid=200 data_head_lines=100 preserve_width=1 infowin_size=1000 background_color=ffffff change_directory=1 save_path=0 load_path=1 save_with_data=0 save_with_merge=0 expand_dir=./ expand=1 editor=gedit select_data_on_export=0 coordwin_font=Liberation Mono 12 infowin_font=Liberation Mono 10 file_preview_font=Liberation Mono 10 character_map=_Miscellaneous,☀☁☂☃☄★☆☐☑☒☚☛☜☝☞☟☠☹☺☻♠♡♢♣♤♥♦♧♨♩♪♫♬➩➪➫➬➭➮ character_map=_Physics,µ℃℉ℎℏÅℇ☢ character_map=_Mathematics,±×÷‰∀∂∃∄∇∈∉∋∌√∛∜∝∞∠∥∦∧∨∩∪∫∬∮≂≃≒≡≦≧≨≩≪≫ character_map=_Greece,ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψωϕς menu_win=12,39,1000,680 extwin_dpi=40 extwin_width=400 extwin_height=600 use_external_viewer=1 history_size=1000 file_tab=0 axis_tab=100 merge_tab=101 path_tab=1 rectangle_tab=2 arc_tab=3 mark_tab=4 text_tab=5 sidebar=1 [gra2cairo] font=Sans-serif,Liberation Sans font=Serif,Liberation Serif font=Monospace,Liberation Mono [axis] width=40 gauge_length1=100 gauge_width1=40 gauge_length2=200 gauge_width2=40 gauge_length3=300 gauge_width3=40 num_pt=2000 num_space=0 num_script_size=7000 num_format=%g num_font=Sans-serif num_font_style=0 [axis_fX] direction=0 gauge=2 num=2 num_align=0 arrow=0 wave=0 [axis_fY] direction=9000 gauge=3 num=1 num_align=2 arrow=0 wave=0 [axis_fU] direction=0 gauge=3 num=1 num_align=0 arrow=0 wave=0 [axis_fR] direction=9000 gauge=2 num=2 num_align=1 arrow=0 wave=0 [axis_sX] direction=0 gauge=0 num=2 num_align=0 arrow=0 wave=0 [axis_sY] direction=9000 gauge=0 num=1 num_align=2 arrow=0 wave=0 [axis_sU] direction=0 gauge=0 num=1 num_align=0 arrow=0 wave=0 [axis_sR] direction=9000 gauge=0 num=2 num_align=1 arrow=0 wave=0 [axis_cX] direction=0 gauge=1 num=2 num_align=0 num_no_zero=1 arrow=0 wave=0 [axis_cY] direction=9000 gauge=1 num=1 num_align=2 num_no_zero=1 arrow=0 wave=0 ngraph-gtk-6.09.05/initfile/save_ui_file.nsc0000644000175000017500000000112513070106167015620 00000000000000#! /usr/bin/ngraph MAP_FILE=$1 TMP_FILE=${system::temp_file} TMP_NGP=tmp.ngp new menu new regexp new sarray new io echo "get menu: -field get_accel_map" > $TMP_NGP menu::menu $TMP_NGP > $TMP_FILE echo -n > $MAP_FILE regexp::@="^; \(" io::open "$TMP_FILE" while true do s="${io::gets}" if io::eof then break fi if regexp::match "$s" then sarray::push "$s" else echo "$s" >> $MAP_FILE fi done io::close sarray::sort for i in ${sarray::seq} do get sarray -field get:$i >> $MAP_FILE done rm $TMP_NGP del io del sarray del regexp del menu del system ngraph-gtk-6.09.05/initfile/Makefile.in0000644000175000017500000004570614143146775014556 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_RUBY_DEV_TRUE@am__append_1 = 20append_addins_ruby.nsc subdir = initfile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_ngraphconf_DATA) \ $(am__dist_ngraphinit_DATA_DIST) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(ngraphconfdir)" \ "$(DESTDIR)$(ngraphinitdir)" "$(DESTDIR)$(ngraphconfdir)" am__dist_ngraphinit_DATA_DIST = 10append_addins.nsc \ 20append_addins_ruby.nsc DATA = $(dist_ngraphconf_DATA) $(dist_ngraphinit_DATA) \ $(nodist_ngraphconf_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ ngraphconfdir = $(sysconfdir)/$(PACKAGE) ngraphinitdir = $(sysconfdir)/$(PACKAGE)/init.d ACCEL_FILE = accel_map init_scripts = 10append_addins.nsc $(am__append_1) dist_ngraphinit_DATA = $(init_scripts) dist_ngraphconf_DATA = Ngraph.nsc Ngraph.ngp fit.ngp $(ACCEL_FILE) nodist_ngraphconf_DATA = Ngraph.ini EXTRA_DIST = Ngraph.ini.in Ngraph.ini.win save_ui_file.nsc CLEANFILES = Ngraph.ini all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu initfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu initfile/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_ngraphconfDATA: $(dist_ngraphconf_DATA) @$(NORMAL_INSTALL) @list='$(dist_ngraphconf_DATA)'; test -n "$(ngraphconfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ngraphconfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ngraphconfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ngraphconfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ngraphconfdir)" || exit $$?; \ done uninstall-dist_ngraphconfDATA: @$(NORMAL_UNINSTALL) @list='$(dist_ngraphconf_DATA)'; test -n "$(ngraphconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ngraphconfdir)'; $(am__uninstall_files_from_dir) install-dist_ngraphinitDATA: $(dist_ngraphinit_DATA) @$(NORMAL_INSTALL) @list='$(dist_ngraphinit_DATA)'; test -n "$(ngraphinitdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ngraphinitdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ngraphinitdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ngraphinitdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ngraphinitdir)" || exit $$?; \ done uninstall-dist_ngraphinitDATA: @$(NORMAL_UNINSTALL) @list='$(dist_ngraphinit_DATA)'; test -n "$(ngraphinitdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ngraphinitdir)'; $(am__uninstall_files_from_dir) install-nodist_ngraphconfDATA: $(nodist_ngraphconf_DATA) @$(NORMAL_INSTALL) @list='$(nodist_ngraphconf_DATA)'; test -n "$(ngraphconfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ngraphconfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ngraphconfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ngraphconfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ngraphconfdir)" || exit $$?; \ done uninstall-nodist_ngraphconfDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_ngraphconf_DATA)'; test -n "$(ngraphconfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ngraphconfdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(ngraphconfdir)" "$(DESTDIR)$(ngraphinitdir)" "$(DESTDIR)$(ngraphconfdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_ngraphconfDATA \ install-dist_ngraphinitDATA install-nodist_ngraphconfDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_ngraphconfDATA \ uninstall-dist_ngraphinitDATA uninstall-nodist_ngraphconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_ngraphconfDATA install-dist_ngraphinitDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-nodist_ngraphconfDATA install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_ngraphconfDATA \ uninstall-dist_ngraphinitDATA uninstall-nodist_ngraphconfDATA .PRECIOUS: Makefile @OS_WIN32_TRUE@Ngraph.ini: Ngraph.ini.win @OS_WIN32_TRUE@ cp $< $@ @OS_OSX_TRUE@@OS_WIN32_FALSE@Ngraph.ini: Ngraph.ini.osx @OS_OSX_TRUE@@OS_WIN32_FALSE@ cp $< $@ @OS_OSX_FALSE@@OS_WIN32_FALSE@Ngraph.ini: $(srcdir)/Ngraph.ini.in $(top_srcdir)/pathconv.sh @OS_OSX_FALSE@@OS_WIN32_FALSE@ $(SHELL) $(top_srcdir)/pathconv.sh $< update_ui_file: $(top_srcdir)/src/ngraph -i save_ui_file.nsc $(ACCEL_FILE) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/initfile/Ngraph.ngp0000644000175000017500000001246114122373107014412 00000000000000new axis axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3600 axis::y=22000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3600 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference= axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=right axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=3600 axis::y=8000 axis::direction=0 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:0' axis::gauge=right axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=left axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=center axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 new axis axis::hidden=false axis::R=0 axis::G=0 axis::B=0 axis::clip=true axis::redraw_flag=true axis::min=0.000000000000000e+00 axis::max=0.000000000000000e+00 axis::inc=0.000000000000000e+00 axis::div=0 axis::type=linear axis::x=17600 axis::y=22000 axis::direction=9000 axis::baseline=true axis::length=14000 axis::width=40 axis::style= axis::adjust_axis= axis::adjust_position=0 axis::arrow=none axis::arrow_length=72426 axis::arrow_width=60000 axis::wave=none axis::wave_length=300 axis::wave_width=40 axis::reference='axis:1' axis::gauge=left axis::gauge_min=0.000000000000000e+00 axis::gauge_max=0.000000000000000e+00 axis::gauge_style= axis::gauge_length1=100 axis::gauge_width1=40 axis::gauge_length2=200 axis::gauge_width2=40 axis::gauge_length3=300 axis::gauge_width3=40 axis::gauge_R=0 axis::gauge_G=0 axis::gauge_B=0 axis::num=right axis::num_begin=0 axis::num_step=0 axis::num_num=-1 axis::num_auto_norm=5 axis::num_head= axis::num_format='%g' axis::num_tail= axis::num_log_pow=true axis::num_pt=2000 axis::num_space=0 axis::num_font='Sans-serif' axis::num_script_size=7000 axis::num_align=left axis::num_no_zero=false axis::num_direction=normal axis::num_shift_p=0 axis::num_shift_n=100 axis::num_R=0 axis::num_G=0 axis::num_B=0 axis::grouping 1 0 1 2 3 new gra name:viewer gra::left_margin=0 gra::top_margin=0 gra::zoom=10000 gra::paper_width=21000 gra::paper_height=29700 gra::draw_obj='axisgrid axis file merge rectangle arc path mark text' ngraph-gtk-6.09.05/initfile/accel_map0000644000175000017500000001256513070106167014322 00000000000000; ngraph GtkAccelMap rc-file -*- scheme -*- ; this file is an automated accelerator map dump ; ; (gtk_accel_path "/Axis/Add/Cross graph" "") ; (gtk_accel_path "/Axis/Add/Frame graph" "") ; (gtk_accel_path "/Axis/Add/Section graph" "") ; (gtk_accel_path "/Axis/Add/Single axis" "") ; (gtk_accel_path "/Axis/Delete" "") ; (gtk_accel_path "/Axis/Grid/Add" "") ; (gtk_accel_path "/Axis/Grid/Delete" "") ; (gtk_accel_path "/Axis/Grid/Property" "") ; (gtk_accel_path "/Axis/Property" "") ; (gtk_accel_path "/Axis/Scale Clear" "c") ; (gtk_accel_path "/Axis/Scale Undo" "") ; (gtk_accel_path "/Axis/Scale Zoom" "") ; (gtk_accel_path "/Data/Add/Data" "o") ; (gtk_accel_path "/Data/Add/Range" "") ; (gtk_accel_path "/Data/Close" "") ; (gtk_accel_path "/Data/Edit" "") ; (gtk_accel_path "/Data/Math" "") ; (gtk_accel_path "/Data/Property" "") ; (gtk_accel_path "/Data/Save data" "") ; (gtk_accel_path "/Edit/Align/Bottom" "") ; (gtk_accel_path "/Edit/Align/Horizontal center" "") ; (gtk_accel_path "/Edit/Align/Left" "") ; (gtk_accel_path "/Edit/Align/Right" "") ; (gtk_accel_path "/Edit/Align/Top" "") ; (gtk_accel_path "/Edit/Align/Vertical center" "") ; (gtk_accel_path "/Edit/Copy" "c") ; (gtk_accel_path "/Edit/Cut" "x") ; (gtk_accel_path "/Edit/Delete" "Delete") ; (gtk_accel_path "/Edit/Duplicate" "Insert") ; (gtk_accel_path "/Edit/FlipHorizontally" "") ; (gtk_accel_path "/Edit/FlipVertically" "") ; (gtk_accel_path "/Edit/Paste" "v") ; (gtk_accel_path "/Edit/RotateCCW" "") ; (gtk_accel_path "/Edit/RotateCW" "") ; (gtk_accel_path "/Edit/draw Order/Bottom" "End") ; (gtk_accel_path "/Edit/draw Order/Down" "") ; (gtk_accel_path "/Edit/draw Order/Top" "Home") ; (gtk_accel_path "/Edit/draw Order/Up" "") ; (gtk_accel_path "/Graph/Current directory" "") ; (gtk_accel_path "/Graph/Draw order" "") ; (gtk_accel_path "/Graph/Export image/EPS File" "") ; (gtk_accel_path "/Graph/Export image/GRA File" "") ; (gtk_accel_path "/Graph/Export image/PDF File" "") ; (gtk_accel_path "/Graph/Export image/PNG File" "") ; (gtk_accel_path "/Graph/Export image/PS File" "") ; (gtk_accel_path "/Graph/Export image/SVG File" "") ; (gtk_accel_path "/Graph/Load graph" "r") ; (gtk_accel_path "/Graph/New graph/All clear" "") ; (gtk_accel_path "/Graph/New graph/Cross graph" "") ; (gtk_accel_path "/Graph/New graph/Frame graph" "") ; (gtk_accel_path "/Graph/New graph/Section graph" "") ; (gtk_accel_path "/Graph/Ngraph shell" "") ; (gtk_accel_path "/Graph/Page" "") ; (gtk_accel_path "/Graph/Print preview" "") ; (gtk_accel_path "/Graph/Print" "p") ; (gtk_accel_path "/Graph/Quit" "q") ; (gtk_accel_path "/Graph/Save" "s") ; (gtk_accel_path "/Graph/SaveAs" "s") ; (gtk_accel_path "/Help/About" "") ; (gtk_accel_path "/Help/Help" "F1") ; (gtk_accel_path "/Legend/Arc/Delete" "") ; (gtk_accel_path "/Legend/Arc/Property" "") ; (gtk_accel_path "/Legend/Mark/Delete" "") ; (gtk_accel_path "/Legend/Mark/Property" "") ; (gtk_accel_path "/Legend/Path/Delete" "") ; (gtk_accel_path "/Legend/Path/Property" "") ; (gtk_accel_path "/Legend/Rectangle/Delete" "") ; (gtk_accel_path "/Legend/Rectangle/Property" "") ; (gtk_accel_path "/Legend/Text/Delete" "") ; (gtk_accel_path "/Legend/Text/Property" "") ; (gtk_accel_path "/Merge/Add" "") ; (gtk_accel_path "/Merge/Close" "") ; (gtk_accel_path "/Merge/Property" "") ; (gtk_accel_path "/Popup/Update" "") ; (gtk_accel_path "/Preference/Addin Script" "") ; (gtk_accel_path "/Preference/Data file default" "") ; (gtk_accel_path "/Preference/External Viewer" "") ; (gtk_accel_path "/Preference/Font aliases" "") ; (gtk_accel_path "/Preference/Legend text default" "") ; (gtk_accel_path "/Preference/Miscellaneous" "") ; (gtk_accel_path "/Preference/Viewer" "") ; (gtk_accel_path "/Preference/save as default (Graph)" "") ; (gtk_accel_path "/Preference/save as default (Settings)" "") ; (gtk_accel_path "/View/Axis Window" "F4") ; (gtk_accel_path "/View/Clear information window" "") ; (gtk_accel_path "/View/Clear" "e") ; (gtk_accel_path "/View/Command toolbar" "") ; (gtk_accel_path "/View/Coordinate Window" "F7") ; (gtk_accel_path "/View/Data Window" "F3") ; (gtk_accel_path "/View/Draw" "d") ; (gtk_accel_path "/View/Information Window" "F8") ; (gtk_accel_path "/View/Legend Window" "F5") ; (gtk_accel_path "/View/Merge Window" "F6") ; (gtk_accel_path "/View/Ruler" "") ; (gtk_accel_path "/View/Scrollbar" "") ; (gtk_accel_path "/View/Sidebar" "") ; (gtk_accel_path "/View/Statusbar" "") ; (gtk_accel_path "/View/Toolbox" "") ; (gtk_accel_path "/View/cross Gauge" "g") ; (gtk_accel_path "/View/default Window config" "") ngraph-gtk-6.09.05/initfile/20append_addins_ruby.nsc0000644000175000017500000000241313756156511017174 00000000000000#! ngraph if system::plugin_check ruby then true else exit fi if exist -q menu then new regexp name=ADDIN regexp:ADDIN:@='^#\s*Description:\s*(.+)' new regexp name=COMMENT regexp:COMMENT:@='^#' new io name=ADDIN io:ADDIN:mode="r" new sarray name=ADDIN sarray::delimiter="," for addin in "${system::home_dir}"/*.rb "${system::data_dir}"/addin/*.rb do if [ -f "$addin" ] then io:ADDIN:open "$addin" while l=`get io -field gets` do if regexp:COMMENT:match "$l" then if regexp:ADDIN:match "$l" then sarray:ADDIN:split "${regexp:ADDIN:get:'0 1'}" if [ ${sarray:ADDIN:num} -gt 3 ] then new sarray name=TMP sarray:TMP:push "${sarray:ADDIN:shift}" sarray:TMP:push "${sarray:ADDIN:shift}" sarray:TMP:push "${sarray:ADDIN:join:','}" cpy sarray:TMP,ADDIN @ del sarray:TMP fi if [ ${sarray:ADDIN:num} -eq 3 ] then sarray:ADDIN:put 2 "$addin ${sarray:ADDIN:get:2}" else sarray:ADDIN:put 2 "$addin" fi sarray:ADDIN:unshift "ruby.nsc" menu::addin_list_append sarray:ADDIN fi else break fi done io:ADDIN:close fi done del regexp:ADDIN del regexp:COMMENT del io:ADDIN del sarray:ADDIN fi ngraph-gtk-6.09.05/initfile/Ngraph.nsc0000644000175000017500000002262114001231674014406 00000000000000#! ngraph # Ngraph initialization script usage() { echo ${system::name} version ${system::version} echo ${system::copyright} echo 'Usage: ngraph [ options ] [ data | NGP | PRM ]' echo 'valid options:' echo ' -L ngp_file load ngp file' echo ' -x column -y column data column' echo ' -X -Y -U -R axis' echo ' -d type plot type' echo ' -m type mark type (0 - 89)' echo ' -o size mark size' echo ' -l style -w width line style and width' # echo ' -c R G B -C R G B plot color (1st and 2nd)' # obsolete echo ' -CR r -CG g -CB b 1st plot color' echo ' -cr r -cg g -cb b 2nd plot color' echo ' -s line head skip' echo ' -r step read step' echo ' -f line finale line' echo ' -vx num -vy num neighbor average' echo ' -mx math -my math math transformation' echo ' -ex type -ey type scale type' # echo ' -zx min max inc axis settings' # obsolete # echo ' -zy min max inc axis settings' # obsolete echo ' -minx minimum set minimum value of x axis' echo ' -maxx maximum set maximum value of x axis' echo ' -incx increment set increment value of x axis' echo ' -miny minimum set minimum value of y axis' echo ' -maxy maximum set maximum value of y axis' echo ' -incy increment set increment value of y axis' echo ' -g load settings from data file' echo ' -png ngp_file save png file' echo ' -pdf ngp_file save pdf file' echo ' -ps ngp_file save ps file' echo ' -eps ngp_file save eps file' echo ' -svg ngp_file save svg file' echo ' -gra ngp_file save gra file' echo ' -dialog show print dialog (with -p option)' echo ' -p ngp_file print graph' echo ' -n output ngp-file to stdout' echo ' -h, --help Show this help message' echo ' -v, --version Show version of Ngraph' echo ' -V, --VERSION Show detail information about Ngraph' del system:0 } check_file() { if [ -z "$1" ] then echo "${system::name}: missing file operand" del system:0 elif [ ! -f "$1" ] then echo "${system::name}: can't find the file $1." del system:0 fi } clear_viewer() { for i in `derive -instance draw` do del ${i}:0-! done if exist -q gra:viewer then del gra:viewer fi } copy_gra_settings() { if exist -q gra:viewer then cpy gra:viewer,$1 draw_obj left_margin top_margin zoom paper_width paper_height decimalsign fi } save_image() { check_file "$1" clear_viewer . "$1" new gra2cairofile name=OUTPUT gra2cairofile::format=$2 gra2cairofile::file=$3 gra::device=gra2cairofile:OUTPUT gra::open gra::draw gra::close del gra del gra2cairofile } check_set() { if [ -n "$3" ] then VAL=$3 if [ -n "$4" ] then VAL=$4:$3 fi put $1: $2=$VAL unset VAL fi } load_graph() { check_file "$1" path=`dirname "$1"` if [ -d "$path" ] then cd "$path" fi name=`pwd`/`basename "$1"` if [ -n "$LOGIN_SHELL" ] then system:0:login_shell="$LOGIN_SHELL $name" else . "$name" fi unset path name } IGNOREEOF=0 if new menu then LOGIN_SHELL="menu:0:menu" system:0:login_shell="$LOGIN_SHELL" fi # if [ -f "${NGRAPHHOME}/Ngraph.ngp" ]; then . "${NGRAPHHOME}/Ngraph.ngp" elif [ -f "${NGRAPHCONF}/Ngraph.ngp" ]; then . "${NGRAPHCONF}/Ngraph.ngp" fi # LOADSETTINGS=0 SHOW_DIALOG=0 XAXIS=0 YAXIS=1 SAVE_NGP=0 NULL_DEVICE=/dev/null # while [ "$1" ] do case $1 in *.prm|*.PRM|*.ngp|*.NGP) load_graph "$1" break ;; *.gra|*.GRA) for drawable in `derive -instance draw` do if [ $drawable != "merge" ] then del $drawable:0-! fi done new merge file:"$1" ;; -L) shift load_graph "$1" break ;; -x) shift XCOLUMN="$1" ;; -y) shift YCOLUMN="$1" ;; -X) XAXIS=0 ;; -Y) YAXIS=1 ;; -U) XAXIS=2 ;; -R) YAXIS=3 ;; -d) shift PLOTTYPE="$1" ;; -m) shift MARKTYPE="$1" ;; -o) shift MARKSIZE="$1" ;; -l) shift LINESTYLE="$1" ;; -w) shift LINEWIDTH="$1" ;; -cr) shift COLORR="$1" ;; -cg) shift COLORG="$1" ;; -cb) shift COLORB="$1" ;; -CR) shift COLORR2="$1" ;; -CG) shift COLORG2="$1" ;; -CB) shift COLORB2="$1" ;; -c) echo "warning: option $1 is obsolete" echo ' use -cr -cg and -cb option' shift COLORR="$1" shift COLORG="$1" shift COLORB="$1" ;; -C) echo "warning: option $1 is obsolete" echo ' use -CR -CG and -CB option' shift COLORR2="$1" shift COLORG2="$1" shift COLORB2="$1" ;; -s) shift HEADSKIP="$1" ;; -r) shift READSTEP="$1" ;; -f) shift FINALLINE="$1" ;; -vx) shift AVERAGEX="$1" ;; -vy) shift AVERAGEY="$1" ;; -mx) shift MATHX="$1" ;; -my) shift MATHY="$1" ;; -ex) shift put axis:$XAXIS type="$1" ;; -ey) shift put axis:$YAXIS type="$1" ;; -minx) shift put axis:$XAXIS min="$1" ;; -maxx) shift put axis:$XAXIS max="$1" ;; -incx) shift put axis:$XAXIS inc="$1" ;; -miny) shift put axis:$YAXIS min="$1" ;; -maxy) shift put axis:$YAXIS max="$1" ;; -incy) shift put axis:$YAXIS inc="$1" ;; -zx) echo "warning: option $1 is obsolete" echo ' use -minx -maxx and -incx option' shift put axis:$XAXIS min="$1" shift put axis:$XAXIS max="$1" shift put axis:$XAXIS inc="$1" ;; -zy) echo "warning: option $1 is obsolete" echo ' use -miny -maxy and -incy option' shift put axis:$YAXIS min="$1" shift put axis:$YAXIS max="$1" shift put axis:$YAXIS inc="$1" ;; -g) LOADSETTINGS=1 ;; -n) SAVE_NGP=1 ;; -p) shift check_file "$1" clear_viewer . "$1" menu::print false $SHOW_DIALOG del system:0 ;; -dialog) SHOW_DIALOG=2 ;; -png) save_image "$2" png `basename $2 .ngp`.png del system:0 ;; -ps) save_image "$2" ps3 `basename $2 .ngp`.ps del system:0 ;; -eps) save_image "$2" eps3 `basename $2 .ngp`.eps del system:0 ;; -pdf) save_image "$2" pdf `basename $2 .ngp`.pdf del system:0 ;; -svg) save_image "$2" svg1.1 `basename $2 .ngp`.svg del system:0 ;; -gra) check_file $2 clear_viewer . $2 new gra2cairofile file=$NULL_DEVICE new gra name=DUMMY gra:DUMMY:device=gra2cairofile:0 gra:DUMMY:open new gra2file name=OUTPUT new gra name=OUTPUT copy_gra_settings OUTPUT gra2file::file=`basename $2 .ngp`.gra gra:OUTPUT:device=gra2file:OUTPUT gra:OUTPUT:open gra:OUTPUT:draw gra:OUTPUT:close del gra:OUTPUT del gra2file:OUTPUT gra:DUMMY:close del gra:DUMMY del gra2cairofile del system:0 ;; -h|-help|--help) usage ;; -v|-version|--version) echo ${system::name} version ${system::version} echo ${system::copyright} del system:0 ;; -V|-VERSION|--VERSION) echo ${system::name} version ${system::version} echo ${system::copyright} echo echo " compiler:" echo " ${system::compiler}" if exist -q menu then echo echo " library:" get menu: -field lib_version:4 fi del system:0 ;; -*) echo invalid option "$1" echo usage ;; *) check_file "$1" new file file:"$1" check_set file x $XCOLUMN check_set file y $YCOLUMN check_set file type $PLOTTYPE check_set file mark_type $MARKTYPE check_set file mark_size $MARKSIZE check_set file line_style $LINESTYLE check_set file line_width $LINEWIDTH check_set file R $COLORR check_set file G $COLORG check_set file B $COLORB check_set file R2 $COLORR2 check_set file G2 $COLORG2 check_set file B2 $COLORB2 check_set file head_skip $HEADSKIP check_set file read_step $READSTEP check_set file final_line $FINALLINE check_set file smooth_x $AVERAGEX check_set file smooth_y $AVERAGEY check_set file math_x $MATHX check_set file math_y $MATHY check_set file axis_x "$XAXIS" axis check_set file axis_y "$YAXIS" axis if [ $LOADSETTINGS = 1 ]; then file::load_settings fi esac shift done if [ $SAVE_NGP = 1 ]; then echo '#!ngraph' echo '#%creator:' ${system:0:name} echo '#%version:' ${system:0:version} for i in `derive -instance draw` do get ${i}:0-! -id -field save done get gra:0 -id -field save del system:0 fi pwd=`pwd` cd "$NGRAPHCONF" new shell name=init_d for nsc in init.d/[0-9][0-9]*.nsc do shell:init_d:shell "$nsc" done del shell:init_d cd "$pwd" unset usage check_file clear_viewer save_image check_set load_graph LOADSETTINGS SHOW_DIALOG XAXIS YAXIS SAVE_NGP NULL_DEVICE pwd ngraph-gtk-6.09.05/initfile/Makefile.am0000644000175000017500000000134313625714727014534 00000000000000ngraphconfdir = $(sysconfdir)/$(PACKAGE) ngraphinitdir = $(sysconfdir)/$(PACKAGE)/init.d ACCEL_FILE = accel_map init_scripts = 10append_addins.nsc if HAVE_RUBY_DEV init_scripts += 20append_addins_ruby.nsc endif dist_ngraphinit_DATA = $(init_scripts) dist_ngraphconf_DATA = Ngraph.nsc Ngraph.ngp fit.ngp $(ACCEL_FILE) nodist_ngraphconf_DATA = Ngraph.ini EXTRA_DIST = Ngraph.ini.in Ngraph.ini.win save_ui_file.nsc if OS_WIN32 Ngraph.ini: Ngraph.ini.win cp $< $@ else if OS_OSX Ngraph.ini: Ngraph.ini.osx cp $< $@ else Ngraph.ini: $(srcdir)/Ngraph.ini.in $(top_srcdir)/pathconv.sh $(SHELL) $(top_srcdir)/pathconv.sh $< endif endif update_ui_file: $(top_srcdir)/src/ngraph -i save_ui_file.nsc $(ACCEL_FILE) CLEANFILES = Ngraph.ini ngraph-gtk-6.09.05/initfile/Ngraph.ini.win0000644000175000017500000000604514142161772015207 00000000000000# the first line shoud be comment or blank because notepad.exe add BOM # on the top of the file and Ngraph cannnot understand BOM. [Ngraph] alloc_console=0 history_size=1000 [x11menu] script_console=0 addin_console=0 help_file=html/index.html status_bar=1 show_tip=1 scrollbar=1 command_toolbar=1 pointer_toolbar=1 cross_gauge=0 browser=cmd /c start "" help_browser=cmd /c start "" antialias=1 viewer_dpi=70 viewer_load_file_on_redraw=1 viewer_load_file_data_number=256 viewer_show_ruler=1 viewer_grid=200 data_head_lines=100 preserve_width=1 infowin_size=1000 background_color=ffffff change_directory=1 save_path=0 load_path=1 save_with_data=0 save_with_merge=0 expand_dir=./ expand=1 editor=notepad select_data_on_export=0 coordwin_font=Courier New 12 infowin_font=Courier New 10 file_preview_font=Courier New 10 character_map=_Miscellaneous,☀☁☂☃☄★☆☐☑☒☚☛☜☝☞☟☠☹☺☻♠♡♢♣♤♥♦♧♨♩♪♫♬➩➪➫➬➭➮ character_map=_Physics,µ℃℉ℎℏÅℇ☢ character_map=_Mathematics,±×÷‰∀∂∃∄∇∈∉∋∌√∛∜∝∞∠∥∦∧∨∩∪∫∬∮≂≃≒≡≦≧≨≩≪≫ character_map=_Greece,ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρστυφχψω menu_win=0,0,1024,700 extwin_dpi=40 extwin_width=400 extwin_height=600 use_external_viewer=0 history_size=1000 sidebar=1 png_dpi=72 emf_dpi=576 ps_version=0 svg_version=0 main_pane=640 side_pane1=520 side_pane2=300 side_pane3=200 file_tab=0 axis_tab=100 merge_tab=101 path_tab=1 rectangle_tab=2 arc_tab=3 mark_tab=4 text_tab=5 [gra2cairo] font=Sans-serif,arial,ms pgothic,browallia new,mingliu,simhei,gulimche,kartika,latha,mangal,raavi,Sylfaen,Microsoft Sans Serif,Malgun Gothic font=Serif,times new roman,ms pmincho,angsana new,mingliu,simsun,batangche,kartika,latha,mangal,raavi,Sylfaen,Microsoft Sans Serif,Malgun Gothic font=Monospace,courier new,ms gothic,courier monothai,mingliu,simsun,gulimche,kartika,latha,mangal,raavi,Sylfaen,Microsoft Sans Serif,Malgun Gothic [axis] width=40 gauge_length1=100 gauge_width1=40 gauge_length2=200 gauge_width2=40 gauge_length3=300 gauge_width3=40 num_pt=2000 num_space=0 num_script_size=7000 num_format=%g num_font=Sans-serif num_font_style=0 [axis_fX] direction=0 gauge=2 num=2 num_align=0 arrow=0 wave=0 [axis_fY] direction=9000 gauge=3 num=1 num_align=2 arrow=0 wave=0 [axis_fU] direction=0 gauge=3 num=1 num_align=0 arrow=0 wave=0 [axis_fR] direction=9000 gauge=2 num=2 num_align=1 arrow=0 wave=0 [axis_sX] direction=0 gauge=0 num=2 num_align=0 arrow=0 wave=0 [axis_sY] direction=9000 gauge=0 num=1 num_align=2 arrow=0 wave=0 [axis_sU] direction=0 gauge=0 num=1 num_align=0 arrow=0 wave=0 [axis_sR] direction=9000 gauge=0 num=2 num_align=1 arrow=0 wave=0 [axis_cX] direction=0 gauge=1 num=2 num_align=0 num_no_zero=1 arrow=0 wave=0 [axis_cY] direction=9000 gauge=1 num=1 num_align=2 num_no_zero=1 arrow=0 wave=0 ngraph-gtk-6.09.05/initfile/10append_addins.nsc0000644000175000017500000000207013756156514016134 00000000000000#! ngraph if exist -q menu then new regexp name=ADDIN regexp:ADDIN:@='^#\s*Description:\s*(.+)' new regexp name=COMMENT regexp:COMMENT:@='^#' new io name=ADDIN io:ADDIN:mode="r" new sarray name=ADDIN sarray::delimiter="," for addin in "${system::home_dir}"/*.nsc "${system::data_dir}"/addin/*.nsc do if [ -f "$addin" ] then io:ADDIN:open "$addin" while l=`get io -field gets` do if regexp:COMMENT:match "$l" then if regexp:ADDIN:match "$l" then sarray:ADDIN:split "${regexp:ADDIN:get:'0 1'}" if [ ${sarray:ADDIN:num} -gt 3 ] then new sarray name=TMP sarray:TMP:push "${sarray:ADDIN:shift}" sarray:TMP:push "${sarray:ADDIN:shift}" sarray:TMP:push "${sarray:ADDIN:join:','}" cpy sarray:TMP,ADDIN @ del sarray:TMP fi sarray:ADDIN:unshift "$addin" menu::addin_list_append sarray:ADDIN fi else break fi done io:ADDIN:close fi done del regexp:ADDIN del regexp:COMMENT del io:ADDIN del sarray:ADDIN fi ngraph-gtk-6.09.05/AUTHORS0000644000175000017500000000015213070106167011725 00000000000000Original authors: Satoshi ISHIZAKA GTK: Ito Hiroyuki ngraph-gtk-6.09.05/config.rpath0000755000175000017500000004421614142161772013202 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2020 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's _LT_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | cygwin* | pw32* | os2* | cegcc*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in ecc*) wl='-Wl,' ;; icc* | ifort*) wl='-Wl,' ;; lf95*) wl='-Wl,' ;; nagfor*) wl='-Wl,-Wl,,' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; xl* | bgxl* | bgf* | mpixl*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) wl= ;; *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; newsos6) ;; *nto* | *qnx*) ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) wl='-Qoption ld ' ;; *) wl='-Wl,' ;; esac ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's _LT_LINKER_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; haiku*) ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) case "$host_cpu" in powerpc) ;; m68k) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then : else ld_shlibs=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix[4-9]*) library_names_spec='$libname$shrext' ;; amigaos*) case "$host_cpu" in powerpc*) library_names_spec='$libname$shrext' ;; m68k) library_names_spec='$libname.a' ;; esac ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32* | cegcc*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd[23].*) library_names_spec='$libname$shrext$versuffix' ;; freebsd* | dragonfly*) library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' ;; haiku*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; *nto* | *qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; tpf*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = zsh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_zsh_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(zshdir)" DATA = $(dist_zsh_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ ngraphconfdir = $(sysconfdir)/$(PACKAGE) zshdir = $(ngraphconfdir)/zsh dist_zsh_DATA = _ngraph _ngp2 # _gra2ps _gra2wmf all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu zsh/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu zsh/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_zshDATA: $(dist_zsh_DATA) @$(NORMAL_INSTALL) @list='$(dist_zsh_DATA)'; test -n "$(zshdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(zshdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(zshdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(zshdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(zshdir)" || exit $$?; \ done uninstall-dist_zshDATA: @$(NORMAL_UNINSTALL) @list='$(dist_zsh_DATA)'; test -n "$(zshdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(zshdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(zshdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_zshDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_zshDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_zshDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_zshDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/zsh/_ngp20000644000175000017500000000151413070106167012414 00000000000000#compdef ngp2 _arguments \ '*:file:_files -g "*.ngp(-.)"' \ '-I[ignore path]' \ '-a[auto scale]' \ '-A[clear scale and auto scale]' \ '-c[change directory]' \ '-ps[output PostScript level 3]' \ '-ps3[output PostScript level 3]' \ '-ps2[output PostScript level 2]' \ '-eps[output Encapsulated PostScript level 3]' \ '-eps3[output Encapsulated PostScript level 3]' \ '-eps2[output Encapsulated PostScript level 2]' \ '-wmf[output Windows meta file]' \ '-pdf[output Portable Document Format]' \ '-svg[output Scalable Vector Graphics version 1.1]' \ '-svg1.1[output Scalable Vector Graphics version 1.1]' \ '-svg1.2[output Scalable Vector Graphics version 1.2]' \ '-png[output Portable Network Graphics]' \ '-h[Show this help message]' \ '--help[Show this help message]' ngraph-gtk-6.09.05/zsh/_ngraph0000644000175000017500000000505013070106167013024 00000000000000#compdef ngraph _arguments \ ':file:_files' \ '-L[load ngp file]:file:_files -g "*.ngp(-.)"' \ '-x[set data column of x axis]:integer' \ '-y[set data column of y axis]:integer' \ '-X[set X axis as x axis]' \ '-Y[set Y axis as y axis]' \ '-U[set U axis as x axis]' \ '-R[set R axis as y axis]' \ '-d[set type of data plot]:type of data plot:(mark line polygon curve \ diagonal arrow rectangle rectangle_fill rectangle_solid_fill \ errorbar_x errorbar_y staircase_x staircase_y bar_x bar_y \ bar_fill_x bar_fill_y bar_solid_fill_x bar_solid_fill_y fit)' \ '-m[set mark type (0 - 89)]:integer' \ '-o[set mark size]:integer' \ '-l[set line style]:string' \ '-w[set line width]:integer' \ '-cr[red element of plot color 1]:integer' \ '-cg[green element of plot color 1]:integer' \ '-cb[blue element of plot color 1]:integer' \ '-CR[red element of plot color 2]:integer' \ '-CG[green element of plot color 2]:integer' \ '-CB[blue element of plot color 2]:integer' \ '-s[set number of head skip]:lines' \ '-r[set number of read step]:lines' \ '-f[set number of finale line]:lines' \ '-vx[set number of neighbor average for x]:integer' \ '-vy[set number of neighbor average for y]:integer' \ '-mx[set math transformation for x]:string' \ '-my[set math transformation for y]:string' \ '-ex[set scale type of x axis]:type of axis:(linear log inverse MJD)' \ '-ey[set scale type of y axis]:type of axis:(linear log inverse MJD)' \ '-minx[set minimum of x axis]:double' \ '-maxx[set maximum of x axis]:double' \ '-incx[set increment of x axis]:double' \ '-miny[set minimum of y axis]:double' \ '-maxy[set maximum of y axis]:double' \ '-incy[set increment of y axis]:double' \ '-g[load settings from data file]' \ '-png[save as png file]:file:_files -g "*.ngp(-.)"' \ '-pdf[save as pdf file]:file:_files -g "*.ngp(-.)"' \ '-ps[save as ps file]:file:_files -g "*.ngp(-.)"' \ '-eps[save as eps file]:file:_files -g "*.ngp(-.)"' \ '-svg[save as svg file]:file:_files -g "*.ngp(-.)"' \ '-gra[save as gra file]:file:_files -g "*.ngp(-.)"' \ '-p[print graph]:file:_files -g "*.ngp(-.)"' \ '-dialog[show print dialog (with -p option)]' \ '-n[output ngp-file to stdout]' \ '-h[Show this help message]' \ '--help[Show this help message]' \ '-v[Show version of Ngraph]' \ '--version[Show version of Ngraph]' \ '-V[Show detail informations of Ngraph]' \ '--VERSION[Show detail informations of Ngraph]' ngraph-gtk-6.09.05/zsh/Makefile.am0000644000175000017500000000017213070106167013517 00000000000000ngraphconfdir = $(sysconfdir)/$(PACKAGE) zshdir = $(ngraphconfdir)/zsh dist_zsh_DATA = _ngraph _ngp2 # _gra2ps _gra2wmf ngraph-gtk-6.09.05/ChangeLog0000644000175000017500000165647313452311477012465 000000000000002018-09-09 Hiroyuki Ito * src/gtk/gtk_subwin.c (focus_out, focus_in): added. (sub_window_create): connect "focus-in-event" and "focus-out-event". 2018-09-08 Hiroyuki Ito * src/gtk/gtk_subwin.c (set_object_name) (list_sub_window_object_name): added. 2018-09-02 Hiroyuki Ito * src/gtk/x11menu.c (application): call "gtk_icon_theme_add_resource_path()". 2018-08-23 Hiroyuki Ito * merge "marker type" feature of the path object. 2018-07-31 Hiroyuki Ito * src/gtk/gtk_widget.c (set_linumber_color): removed. 2018-07-30 Hiroyuki Ito * src/odraw.h (ARROW_POSITION_TYPE_NUM, JOIN_TYPE_NUM): added. 2018-07-28 Hiroyuki Ito * src/gtk/x11menu.c (create_toplevel_window): set toplevel window modal for the GtkColorButton (modal GtkColorChooserDialog). 2018-07-27 Hiroyuki Ito * addin/fitrslt.c (set_parameter): use "g_strdup_printf()" instead of "snprintf()". * src/shellcm.c (cmget): fix check "NWRITE" flag. * src/gtk/x11file.c (FileDialogAxis): increase size of the buffer. * src/gtk/init.c (exec_console): increase size of the buffer. 2018-07-25 Hiroyuki Ito * src/odraw.h (DEFAULT_FONT_PT): added. (DEFAULT_MARK_SIZE): added. * src/omark.c (markinit): use "DEFAULT_MARK_SIZE". * src/odata.c (f2dinit): use "DEFAULT_MARK_SIZE". * src/otext.c (textinit): use "DEFAULT_FONT_PT". * src/oaxis.c (axisinit): use "DEFAULT_FONT_PT". * src/gtk/x11axis.c (create_num_combo_item, select_type) (numbering_tab_create): now the type of the field "no_zero" is not NBOOL but NENUM. * src/oaxis.c (AXIS_NUM_NO_ZERO, anumnozero): added. (get_axis_gauge_num_str): add 3rd argument. (anumnozeroput): added. (axis): the type of the field "num_no_zero" is now "NENUM". (anumnozero): use "false" and "true" for backward compatibility. 2018-07-21 Hiroyuki Ito * src/axis.c (getaxisposition): compare "*po", "alocal->posst" an "alocal->posed" with "N_EPSILON". * src/mathfn.c (nraise): use "N_EPSILON" if x is nagative. * src/mathfn.h (N_EPSILON): added. 2018-07-19 Hiroyuki Ito * src/odraw.h (DEFAULT_LINE_WIDTH): added. 2018-07-17 Hiroyuki Ito * addin/legend.nsc: use "-escape" option to get fields of a data object. * src/shellcm.c (put_field_str): added. (cmget): add "escape" option. 2018-07-12 Hiroyuki Ito * src/gtk/x11file.c (FileDialogType): set sensitivity of only curve and fit button (for drawing math-functions). 2018-07-06 Hiroyuki Ito * test/math_test_new.dat: fix some tests related to comparison with precision. * src/math/math_basic_function.c (compare_double_with_prec): use "gsl_fcmp()" when available. 2018-06-30 Hiroyuki Ito * src/common.h: check "G_OS_WIN32" instead of "__MINGW32__". 2018-06-29 Hiroyuki Ito * src/ioutil.c (nstat): remove codes for windows. * configure.ac: add AC_SYS_LARGEFILE. 2018-06-27 Hiroyuki Ito * src/ioutil.c (nstat): add codes to avoid segmentation fault on Windows. 2018-06-24 Hiroyuki Ito * src/odata.c (set_const): add constants AXISX_MAX, AXISX_MIN, AXISX_LEN, AXISY_MAX, AXISY_MIN and AXISY_LEN. 2018-06-15 Hiroyuki Ito * src/gtk/x11file.c (RANGE_ENTRY_WIDTH): add and use the constant. * src/nhash.c (hash_each_sub): check returned value of the function "hash_each_sub()". * src/gra.c (GRAtextextentraw): fix calculation of the bounding box of a raw-text. 2018-06-06 Hiroyuki Ito * src/gtk/x11graph.c (CmGraphNewMenu): clear all lists. 2018-03-28 Hiroyuki Ito * src/odata.c (opendata): save "f2dlocal" to "struct f2ddata". (fitout): initialize and check "f2dlocal->use_drawing_func". 2018-03-25 Hiroyuki Ito * src/odata.c (draw_fit): use "fp->color" instead of "fp->fg". 2018-03-23 Hiroyuki Ito * src/odata.c (dummyout): added. (fitout): use "dummyout()" when redrawing. 2018-03-20 Hiroyuki Ito * gtksourceview/create_lang.nsc: remove "%D" and "%N" from the list of constrants. 2018-03-09 Hiroyuki Ito * src/gtk/ox11menu.c (mx_show_source_view_search_path): added. (gtkmenu): add field "source_view_search_path". 2018-03-08 Hiroyuki Ito * src/gtk/x11menu.c (souce_view_set_search_path): renamed. check language. 2018-03-04 Hiroyuki Ito * src/gtk/data/css/ngraph.css: remove unused style. * src/gtk/x11dialg.h (MathTextDialog): remove unused member "label". * src/gtk/x11file.c (MathTextDialogSetup): don't use label but window title. 2018-03-03 Hiroyuki Ito * src/gtk/x11file.c (MathTextDialogSetup): call "gtk_widget_grab_focus()". (math_common_widgets_create, MathTextDialogSetup): change position of the tabs. 2018-03-01 Hiroyuki Ito * src/odata.c (ofile_create_math_equation): add static constants definitions. 2018-02-28 Hiroyuki Ito * src/odata.c (file_draw_path, file_draw_polyline) (file_draw_polygon): added. (draw_polygon): add 3rd parameter. don't call "arraydel()". 2018-02-27 Hiroyuki Ito * src/gtk/x11file.c (RangeDialogSetup): update label to avoid collision with the short cut to show information of a completion. * src/odata.c (file_draw_errorbar, file_draw_errorbar2) (draw_errorbar): added. (errorbarout): use "draw_errorbar()". 2018-02-26 Hiroyuki Ito * src/gtk/x11file.c (math_common_widgets_create): call "gtk_widget_set_vexpand()". * src/gtk/x11menu.c (souce_view_initialize): moved from "x11file.c". (application): call "souce_view_initialize()". 2018-02-24 Hiroyuki Ito * src/gtk/x11opt.c (MiscDialogSetup): call "souce_view_initialize()". * src/gtk/x11file.c (souce_view_initialize): renamed. 2018-02-23 Hiroyuki Ito * src/gtk/x11file.c (set_source_style): added. (MathTextDialogSetup, math_tab_setup_item): call "set_source_style()". * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose): add source style settings. * src/gtk/ox11menu.c (mx_show_lib_version): show version of GtkSourceView. (MenuConfigMisc): add "sourece_style_id" setting. (menuinit): initialize "Menulocal.source_style_id". * src/math/math_parser.c (parse_primary_expression): don't apply the limitation of the length of a variable. * src/math/math_error.c (math_err_get_error_message): show error line and line-offset. * src/math/math_equation.c (math_equation_set_parse_error): change type of the 3rd parameter from "int" to "const struct math_string *str". * src/math/math_scanner.c (math_scanner_get_token): save current line and line-offset. 2018-02-22 Hiroyuki Ito * src/object.c (get_localized_str): added. (error2, error22): use "get_localized_str()". 2018-02-21 Hiroyuki Ito * src/gtk/x11file.c (move_cursor_to_error_line): added. (MathTextDialogClose, focus_math_widget): use "move_cursor_to_error_line()". * src/math/math_error.c (math_err_get_error_message): show line number. (math_err_get_recent_error_line_number): added. * src/math/math_equation.c (math_equation_set_parse_error): add 3rd parameter. * src/math/math_scanner.c (math_scanner_init_string): added. (math_scanner_free_token): use "struct math_token *". * src/math/math_basic_function.c (math_func_array): added. * src/math/math_equation.c (math_equation_add_func): use "math_function_get_arg_type_num()". * src/math/math_parser.c (get_argument): use "math_function_get_arg_type_num()". * src/math/math_expression.c (math_function_get_arg_type_num): added. (check_argument, call_func): use "math_function_get_arg_type_num()". 2018-02-20 Hiroyuki Ito * src/gtk/x11opt.c (FontSettingDialogSetupItem) (MiscDialogSetupItem): use "gtk_font_chooser_set_font()" instead of "gtk_font_button_set_font_name()". (FontSettingDialogAddAlternative, FontSettingDialogClose) (set_font): use "gtk_font_chooser_get_font()" instead of "gtk_font_button_get_font_name()". * src/gtk/x11gui.c (message_beep): use "gdk_display_beep()". 2018-02-19 Hiroyuki Ito * src/math/math_scanner.c (math_scanner_get_token): support shell-like-comment. 2018-02-17 Hiroyuki Ito * src/gtk/x11file.c (set_text_to_source_buffer): added. (MathTextDialogChangeInputType, MathTextDialogSetup) (copy_entry_to_text): use "set_text_to_source_buffer(). 2018-02-15 Hiroyuki Ito * src/gtk/completion_info.h: added. * src/gtk/completion_info.c: added. * src/gtk/create_const_info.rb: added. * src/gtk/create_func_info.rb: added. 2018-02-11 Hiroyuki Ito * src/odata.c (odata_get_functions, odata_get_constants) (get_functions, get_constants): added. (file2d): add fields "functions" and "constants". 2018-02-10 Hiroyuki Ito * src/gtk/x11file.c (FileDialogCloseCommon, MathTextDialogSetup) (MathTextDialogClose, FileDialogSetup): save and restore math-transformation intput type. * src/gtk/ox11menu.c (menuinit): initialize "Menulocal.math_input_mode". * src/gtk/x11dialg.h (FileDialog): add member "math_input_tab". (MathTextDialog): add member "input_tab". * src/gtk/ox11menu.h (menulocal): add member "math_input_mode". 2018-02-09 Hiroyuki Ito * src/gtk/gtk_entry_completion.c (entry_completion_load): don't save a string which includes line feed. 2018-02-08 Hiroyuki Ito * src/gtk/gtk_action.c (create_application_window): don't use appmenu on Windows. * src/gtk/x11file.c (set_escaped_str): added. (file_list_set_val, MathDialogSetupItem): use "set_escaped_str()". (MathTextDialogSetup): don't use mnemonic label. 2018-02-07 Hiroyuki Ito * src/gtk/gtk_widget.c (create_text_view_with_line_number): use "GtkSourceview". * configure.ac: ckeck "gtksourceview-3.0". * src/gtk/x11menu.c (menu_undo_common, menu_undo_internal): added. (menu_undo): use "menu_undo_common()". (menu_delete_undo): check undo id. (menu_save_undo_single, menu_save_undo): return undo id. (undo_info_push): save undo id. 2018-02-06 Hiroyuki Ito * src/gtk/x11file.c: add multi line input feature for math-transformations. 2018-02-03 Hiroyuki Ito * src/omerge.c (get_mtime): removed. (read_gra): check not only "st_mtime" but "st_size". 2018-02-02 Hiroyuki Ito * src/omerge.c (OLD_GRA_HEADER): added. (USE_MERGE_CACHE): added. (gra_data_new, gra_data_free, gra_cache_new, gra_cache_get) (gra_cache_free, gra_cache_init, read_new_gra_file) (read_old_gra_file, read_gra_file, dup_cpar, draw_gra) (free_cache, read_gra, merge_cache_clear, draw_gra_data): added. (mergedraw): use "read_gra()" when "USE_MERGE_CACHE" is true. (gra_info): added. 2018-01-30 Hiroyuki Ito * src/gtk/x11commn.c (check_ref_axis, file_auto_scale): added. (FileAutoScale): don't save undo information. 2018-01-29 Hiroyuki Ito * src/gtk/x11menu.c (application): call "CmViewerDraw()" when "LoadNgpFile()" is not called. * src/gtk/x11commn.c (file_auto_scale): added. (FileAutoScale): use the function "file_auto_scale()". 2018-01-27 Hiroyuki Ito * src/math/math_basic_function.c (math_func_m, math_func_rm): accepts negative index. (math_func_cm): add 2nd argument. 2018-01-26 Hiroyuki Ito * src/gtk/x11gui.c (FileSelectionDialog): use "gtk_file_chooser_set_extra_widget()" instead of "gtk_box_pack_start()". * src/odata.c (file_draw_line, file_draw_rect, file_draw_arc): always restore current point. 2018-01-25 Hiroyuki Ito * src/gtk/x11graph.c (CmGraphShell): use "set_graph_modified()" instead of "set_graph_modified_gra()". 2018-01-21 Hiroyuki Ito * src/math/math_basic_function.c (math_func_am) (math_func_array_average, math_func_array_stdevp) (math_func_array_stdev): added. 2018-01-20 Hiroyuki Ito * src/odata.c (file_draw_line): added. 2018-01-19 Hiroyuki Ito * src/gtk/x11file.c (set_headline_table_array) (set_headline_table): check maximum column. * src/odata.c (column_array_push, column_array_clear): added. (getdataarray): use "column_array_clear()" and "column_array_push()". * src/math/math_basic_function.c (math_func_push): use "math_equation_push_array_val()". * src/math/math_equation.c (math_equation_push_array_val): added. 2018-01-18 Hiroyuki Ito * src/odata.c (getdataarray): call the function "set_column_array()". (set_column_array): call the function "math_equation_clear_array()". (set_column_array): check the parameter "id". * src/math/math_basic_function.c (math_func_array_clear): added. (math_func_array_sum): added. (math_func_array_max, math_func_array_min): added. (math_func_array_compact): added. * src/math/math_equation.c (math_equation_clear_array): added. 2018-01-17 Hiroyuki Ito * src/odata.c (getposition): use "getposition2()" and "_f2dtransf()". (f2dtransf): use "_f2dtransf()". (_f2dtransf): return integer. 2018-01-16 Hiroyuki Ito * src/odata.c (f2ddata, f2dlocal): add member "column_array_id_x" and "column_array_id_y". (opendata): initialize "fp->column_array_id_x" and "fp->column_array_id_y". (f2dputmath): check "column" array. (f2dinit): initialize "f2dlocal->column_array_id_x" and "f2dlocal->column_array_id_y". (set_column_array): added. (get_data_from_source): use the function "set_column_array()". (file_draw_mark): added. 2018-01-14 Hiroyuki Ito * src/odata.c (file_draw_arc, file_draw_rect): added. (FileFunc): add drawing functions. (opendata): initialize "fp->GC". (f2ddraw): set "fp->GC". (file_draw_rect, file_draw_arc): check the variable "fp". * src/gra.c (GRAcurrent_point): added. * src/odraw.c (curve_expand, curve_expand_points): moved from "opath.c". * src/opath.c (curve_expand_points): change parameters. (opath_curve_expand_points): added. (arrowdraw, arrowbbox, point_match): use "opath_curve_expand_points()". 2018-01-05 Hiroyuki Ito * addin/gimg2gra.c (gra_save, fputcolor): don't draw fully transparent color information and image. 2017-12-31 Hiroyuki Ito * src/gtk/x11commn.c (FileAutoScale): save undo information. 2017-12-27 Hiroyuki Ito * src/odata.c (ofile_create_math_equation): use "STDEVPX" and "STDEVPY" instead of "SGX" and "SGY". (f2dstat): add fields "dstdevpx", "dstdevpyy", "dstdevx" and "dstdevy". 2017-12-26 Hiroyuki Ito * src/math/math_basic_function.c (math_func_sumsq): added. 2017-12-21 Hiroyuki Ito * src/gtk/x11view.c (create_axis): use "menu_undo()" to cancel creation of instances. * src/gtk/x11merge.c (CmMergeOpen): use "menu_undo()" to cancel edit. (CmMergeUpdate): call "MergeWinUpdate()" only when merge objects are updated. * src/gtk/x11file.c (CmFileHistory, CmRangeAdd): use "menu_undo()" instead of "menu_delete_undo()" to cancel creation of an instance. (FileWinFileUpdate): don't consider "IDDELETE". * src/gtk/x11axis.c (SectionDialogGrid): use "menu_undo()" to cancel edit. (CmAxisNewFrame, CmAxisNewSection, CmAxisNewCross) (CmAxisNewSingle, CmAxisGridNew): use "menu_undo()" to cancel creation. (CmAxisUpdate): check the returned value of the function "DialogExecute()" is "IDCANCEL" or not. 2017-12-20 Hiroyuki Ito * src/gtk/x11view.c (new_merge_obj, new_file_obj) (create_single_axis, create_axis): don't consider "IDDELETE". (ViewUpdate): remove codes related to "IDDELETE". 2017-12-19 Hiroyuki Ito * src/gtk/x11file.c (CmFileMath): check the variable "modified". (MathTextDialog, MathDialog): initialize "modified" member variable. (MathTextDialogClose, MathDialogList): set "modified" member variable. * src/gtk/x11dialg.h (MathDialog, MathTextDialog): add member "modified". 2017-12-14 Hiroyuki Ito * src/gtk/x11view.c (ViewUpdate): redraw only when the graph is modified. * src/gtk/x11axis.c (select_type): redraw data object when "type" field is changed. 2017-12-13 Hiroyuki Ito * src/gtk/x11file.c (CmFileNew): removed. (update_file_obj_multi): "modified" is always true when "IDDELETE" is returned; 2017-12-12 Hiroyuki Ito * src/gtk/x11menu.c (set_undo_menu_label): update undo and redo menu label when use GtkBuilder. * src/gtk/x11file.c (update_file_obj_multi): call "data_save_undo()" befor call "DialogExecute()". (update_file_obj_multi): return modified or not. * src/gtk/x11menu.c (MODIFIED_TYPE_UNMODIFIED): added. (undo_check_modified): call "set_graph_modified()" only when "modified_saved"is TRUE. * src/gtk/x11menu.h (MENU_UNDO_TYPE): add "UNDO_TYPE_DUMMY". * src/gtk/x11view.c (CmEditMenuCB): check "Menulock" and "Globallock". * src/gtk/gtk_subwin.c (update): call "d->undo_save" if available. (update): always call "set_graph_modified()" after call "DialogExecute()". (update): use "menu_undo(FALSE)" instead of "menu_delete_undo()". 2017-12-11 Hiroyuki Ito * src/gtk/gtk_subwin.c (update): don't call "d->update()" if the returned value of the function "DialogExecute()" is "IDCANCEL". * src/gtk/x11file.c (FitDialogResult): use "markup_message_box()". (select_type): check the returned value of the function "show_fit_dialog()". (FileWinFileUpdate): don't call "d->update()" if the returned value of the function "DialogExecute()" is "IDCANCEL". * src/gtk/x11gui.c (markup_message_box): added. (message_box): use "markup_message_box()". 2017-12-07 Hiroyuki Ito * src/omerge.c (set_bbox): added. (mergebbox, mergemove, mergezoom, mergegeometry): use "set_bbox()". 2017-12-06 Hiroyuki Ito * src/omerge.c (get_mtime): added. (mergedraw): check mtime. (mergemove, mergegeometry): use saved bounding box. * src/odata.c (f2dredraw): check the returned value of the function "f2ddraw()". 2017-12-05 Hiroyuki Ito * src/gtk/x11merge.c (MergeWinUpdate): call "draw_notify()". * src/osystem.c (system_set_draw_notify_func, system_draw_notify): added. * src/omerge.c (mergeredraw): call "system_draw_notify()". * src/odata.c (f2dredraw): call "system_draw_notify()". * src/gtk/x11view.c (graph_dropped): don't call "CmViewerDraw()". * src/gtk/x11menu.c (application): call "system_set_draw_notify_func()". (UpdateAll2): add 2nd argment. (ChangePage): call "draw_notify()". * src/gtk/x11graph.c (CmGraphNewMenu): call "UpdateAll2()" instead of "UpdateAll()". * src/gtk/x11view.c (Draw): call "draw_notify()". * src/gtk/x11menu.c (draw_notify): added. * src/gtk/x11menu.h (FileDrawFlag): added. * src/gtk/x11file.c (FileWinUpdate): call "draw_notify()". * src/gtk/gtk_subwin.c (update): redraw flag is now "FILE_DRAW_NOTIFY". * src/gtk/data/css/ngraph.css: add definition of "draw_notify" class. 2017-12-04 Hiroyuki Ito * src/gtk/x11file.c (CmFileHistory, CmFileNew, CmFileOpen) (FileWinFileCopy, FileWinFileCopy2): don't redraw. * src/gtk/x11lgnd.c (LegendWinUpdate): add 3rd argument. * src/gtk/x11merge.c (MergeWinUpdate): add 3rd argument. * src/gtk/x11file.c (FileWinUpdate): add 3rd argument. * src/gtk/x11axis.c (AxisWinUpdate): add 3rd argument. * src/gtk/x11lgnd.c (TextListUpdate, MarkListUpdate) (RectListUpdate, ArcListUpdate, PathListUpdate): add 3rd argument. (ObjListUpdate): redraw object depend on the 3rd parameter. 2017-12-02 Hiroyuki Ito * src/gtk/x11file.c (FileWinFileDraw): save undo information. * src/gtk/x11merge.c (MergeWinUpdate): draw merge object. * src/gtk/x11menu.c (UpdateAll): call only "UpdateAll2()". (check_update_obj): added. (UpdateAll2): use "check_update_obj()". * src/gtk/x11file.c (FileWinFileDraw): don't call "CmViewerDraw()". (FileWinUpdate): draw data object. * src/gtk/x11axis.c (AxisWinUpdate): draw axis, axisgrid and data objects. 2017-12-01 Hiroyuki Ito * src/gtk/x11gui.c (message_beep): call "gdk_beep()" when the variable "parent" is NULL. 2017-11-30 Hiroyuki Ito * src/gtk/x11gui.c (message_beep): use "gdk_window_beep()" instead of "gdk_beep()". (fsok): use "message_beep()" instead of "gdk_beep()". 2017-11-29 Hiroyuki Ito * addin/timer.nsc: execute "gra::flush". * addin/img2gra.nsc: execute "gra::flush". 2017-11-27 Hiroyuki Ito * src/gtk/x11menu.c (reset_graph_modified): call "reset_modified_info()". (undo_info_push): initialize the member "modified". (undo_check_modified): added. (menu_undo, menu_redo): save the modified information. (get_graph_modified): return "Menulocal.modified". (set_graph_modified_gra, reset_modified_info): added. * src/gtk/x11graph.c (CmGraphShell, CmGraphSwitch, CmGraphPage): call "set_graph_modified_gra()" instead of "set_graph_modified()". * src/gtk/ox11menu.c (menuinit): initialize "Menulocal.modified". (mxmodified): set value to "Menulocal.modified". 2017-11-09 Hiroyuki Ito * src/math/math_parser.c (parse_primary_expression): the limitation of the length is not applied when the variable is start with the character '_'. 2017-10-27 Hiroyuki Ito * src/math/math_scanner.c (math_scanner_get_token): accepts '_' as the first character of a symbol. 2017-10-12 Hiroyuki Ito * src/gtk/x11print.c (CmOutputPrinter): fix memory leak. 2017-10-03 Hiroyuki Ito * src/gtk/ox11menu.c (create_layer): added. (init_layer): use "create_layer()". 2017-09-30 Hiroyuki Ito * src/gra.c (GRAtextextent, GRAdrawtext): use "g_strndup()" instead of "g_malloc()" and "strncpy()". (GRAtextextent): fix calculation of the bounding-box. 2017-09-28 Hiroyuki Ito * src/gtk/x11commn.c (get_save_opt): check source field of data objects. 2017-09-25 Hiroyuki Ito * src/gtk/ox11menu.c (MenuConfigToggleView): add "show_grid" configration. * src/gtk/x11menu.c (toggle_view): add case for MenuIdToggleGridLine. (ViewMenu): agg grid menu item. * src/gtk/x11view.c (draw_grid): added. 2017-09-22 Hiroyuki Ito * src/gtk/x11menu.c (UpdateAll2): add parameter. * src/gtk/x11lgnd.c (LegendWinUpdate): add first parameter. 2017-09-18 Hiroyuki Ito * src/gtk/x11menu.c (UpdateAll): don't redraw legends. 2017-09-12 Hiroyuki Ito * src/gtk/x11gui.c (DialogExecute): dont connect "key-press-event" signal (use CSS). 2017-09-11 Hiroyuki Ito * src/gtk/x11dialg.c (CopyDialog, SelectDialog): add "title" parameter. * src/gtk/x11commn.c (ProgressDialogCreate): use predefined function "gtk_true()". * src/gtk/x11gui.c (DialogExecute): remove redundant call of the function "gtk_window_set_title()". (DialogExecute): use predefined function "gtk_true()". 2017-09-07 Hiroyuki Ito * src/gtk/ox11menu.c (MenuConfigMisc): add custom palette support. (add_color_ary_to_array, menu_config_set_custom_palette) (init_custom_palette): added. (menu_save_config_sub, mgtkloadconfig, menulocal_finalize) (menuinit): add custom palette support. * src/gtk/gtk_widget.c (add_default_color, add_default_gray) (set_default_palette, show_color_dialog, set_custom_palette): added. (create_color_button, select_obj_color): add custom palette support. * src/gtk/x11opt.c (edit_custom_palette, save_custom_palette) (create_custom_palette_buttons): added. (MiscDialogSetup, MiscDialogClose, MiscDialogSetupItem): add custom palette support. 2017-09-06 Hiroyuki Ito * src/object.c (arraycmp, arraycpy): added. 2017-09-05 Hiroyuki Ito * src/gtk/x11view.c (ViewerEvLButtonUp): don't call "UpdateAll()". (check_last_insts, focus_new_insts): static function. (focus_new_insts): save created objects. * src/odata.c (f2dredraw): don't call "ignorestdio()" and "restorestdio()". * src/gtk/ox11menu.c (mx_redraw): call "ignorestdio()" and "restorestdio()". * src/odata.c (f2derror): use snprintf() instead of sprintf(). 2017-09-04 Hiroyuki Ito * src/gtk/x11view.c (CmEditMenuCB): call the function "set_focus_sensitivity()". * src/omerge.c (mergeredraw): draw a rectangle instead of a image. 2017-09-03 Hiroyuki Ito * src/gtk/x11axis.c (axis_save_undo): save undo information of the data object. * src/gtk/ox11menu.c (mx_redraw): use the function "GRArederaw()". * src/gra.c (_GRAredraw): now static function. * src/gtk/x11graph.c (CmGraphShell): call "set_graph_modified()". 2017-09-02 Hiroyuki Ito * src/object.c (arraydup): bug fix: array->data can be NULL. 2017-09-01 Hiroyuki Ito * src/odata.c (f2dredraw): call "ignorestdio()" and "restorestdio()". * src/gtk/x11lgnd.c (ObjListUpdate): set "NgraphApp.Viewer.allclear" as TRUE. * src/gtk/x11view.c (mouse_down_move_data, Evaluate): call "UpdateAll()". * src/gtk/x11commn.c (GetPageSettingsFromGRA): check alias name and duplications. * src/object.c (arrayuniq_all_str): added. 2017-08-30 Hiroyuki Ito * src/gtk/gtk_subwin.c (update_viewer): added. * src/gtk/x11view.c (create_pix): dont set "Menulocal.local->cairo". * src/gtk/x11menu.c (script_exec): call "UpdateAll()" instead of "UpdateAll2()". * src/gtk/x11lgnd.c (ObjListUpdate): call "ViewerWinUpdate()". * src/gtk/x11commn.c (LoadNgpFile): call "CmViewerDraw()". 2017-08-27 Hiroyuki Ito * src/gtk/x11view.c (create_layers): added. * src/gtk/ogra2cairo.c (set_cairo_antialias): added. * src/ogra.c (oGRAdrawparent, oGRAdraw): call "GRAlayer()". * src/gra.c (GRAlayer): added. 2017-08-26 Hiroyuki Ito * src/gtk/x11view.c (ViewerEvPaint): draw background and foreground images. (update_bg): added. (create_pix): create background image. (draw_paper_frame): removed. * src/gtk/x11opt.c (ViewerDialogClose): call "update_bg()" anf "UpdateAll2()" when background color is changed. * src/gtk/ox11menu.c (mx_clear): fill "empty" image. * src/odata.c (file_alpha): add "break" statement. 2017-08-18 Hiroyuki Ito * src/gtk/x11view.c (get_focused_obj_array): added. * src/gtk/x11file.c (data_save_undo): added. * src/gtk/x11axis.c (axis_save_undo): added. * src/gtk/x11menu.c (menu_redo, menu_undo, menu_clear_undo) (menu_delete_undo, menu_save_undo): save undo informations. (menu_save_undo_single): added. (set_undo_menu_label): added. (undo_info_pop, undo_info_push): added. (menu_undo_iteration): add second parameter. (menu_check_undo, menu_check_redo): check undo informations. * src/gtk/x11menu.h (MENU_UNDO_TYPE): added. 2017-08-12 Hiroyuki Ito * src/gtk/x11axis.c (axis_check_history): added. 2017-08-11 Hiroyuki Ito * src/gtk/x11lgnd.c (legend_menu_update_object): added. (CmLineUpdate, CmRectUpdate, CmArcUpdate, CmMarkUpdate) (CmTextUpdate): use "legend_menu_update_object()". (legend_menu_delete_object): added. (CmLineDel, CmRectDel, CmArcDel, CmMarkDel, CmTextDel): use "legend_menu_delete_object()". 2017-08-10 Hiroyuki Ito * src/object.c: add undo related functions. 2017-08-09 Hiroyuki Ito * src/odata.c (data_inst_dup, data_inst_free): added. * src/omerge.c (merge_inst_dup, merge_inst_free): added. * src/ofit.c (fit_inst_dup, fit_inst_free, create_math_equation): added. (fitput): use "create_math_equation()". 2017-08-08 Hiroyuki Ito * src/gtk/x11view.c (move_objects): added. (mouse_up_drag, ViewerEvKeyUp): use "move_objects()". 2017-07-25 Hiroyuki Ito * addin/gimg2gra.c (create_widgets): added. (main): use create_widgets(). (create_widgets): use gdk_pixbuf_new_from_file() and gtk_image_new_from_pixbuf() instead of gtk_image_new_from_file(). 2017-06-23 Hiroyuki Ito * src/gtk/init.c (exec_console): use "system" to execute xterm on macOS. * src/otext.c (textmatch): fix point coordinates calculation. 2017-06-08 Hiroyuki Ito * src/odata.c (getdata_skip_step): bug fix: use "rstep" instead of "hskip". 2017-06-07 Hiroyuki Ito * src/gtk/x11file.c (CmRangeAdd): default plot type is "line" when data source is "range". 2017-05-25 Hiroyuki Ito * src/gtk/x11menu.c (create_recent_menu): use RECENT_CHOOSER_LIMIT. * src/gtk/gtk_common.h (RECENT_CHOOSER_LIMIT): added. 2017-05-16 Hiroyuki Ito * src/gtk/ox11menu.h (paper_id): add PAPER_ID_NORMAL and PAPER_ID_WIDE. * src/gtk/x11graph.c (pagelist): add "normal display" and "wide display". 2017-04-12 Hiroyuki Ito * src/oiarray.c (iarray_sdev): check the value befor call sqrt. * src/odata.c (f2dstat_sub, set_const): check the value befor call sqrt. * src/odarray.c (darray_sdev): check the value befor call sqrt. 2017-03-31 Hiroyuki Ito * src/ofit.c (show_poly_equation): improve tne notation of an equation. 2017-03-30 Hiroyuki Ito * src/nstring.c (get_printf_format_str): check '^' flag. (str_to_pow): added. (add_printf_formated_str): support '^' flag. 2017-03-03 Hiroyuki Ito * src/gtk/gtk_action.c (create_application_window): set G_APPLICATION_NON_UNIQUE flag to GtkApplication. * src/gtk/x11gui.c (FileSelectionDialog): don't use global variable. 2017-03-02 Hiroyuki Ito * src/gtk/x11menu.c (setup_toolbar): added. (create_toplevel_window): call "setup_toolbar()" before realize the window. * src/gtk/x11commn.c (ProgressDialogCreate): don't destory existent widget. (ProgressDialogFinalize): don't destory widget. 2017-03-01 Hiroyuki Ito * src/odata.c (getdataarray, f2dcolumn_file): remove extraneous parentheses. * src/math/math_parser.c (my_get_token): remove duplicate 'const'. 2017-02-26 Hiroyuki Ito * src/gtk/x11menu.c (create_toolbar, create_menu_sub): use "gtk_image_new_from_resource()". * src/gtk/x11lgnd.c (LegendWinState): use "gtk_image_new_from_resource()". * src/gtk/gtk_widget.c (create_image_from_file): removed. * src/gtk/init.c (load_css): use "gtk_css_provider_load_from_resource()". * src/gtk/gtk_subwin.c (sub_window_create): use "gdk_pixbuf_new_from_resource()". * src/gtk/gtk_action.c (create_application_window): add GtkShortcutsWindow. (help_overlay_action): app menu is automatically generated by GtkApplication. * src/gtk/dir_defs.h: remove "PIXMAPDIR". * src/gtk/data/ngraph.resources.xml: add resource files as sources. 2017-02-24 Hiroyuki Ito * src/gtk/x11menu.c (MainMenu): show "Help" menu because appmenu can be hidden. * src/gtk/gtk_action.c (AppEntries): add "preference" action (for macOS). (create_application_window): divide appmenu resource file. 2017-02-22 Hiroyuki Ito * src/gtk/x11menu.c (create_toolbar): use "gtk_menu_tool_button_set_arrow_tooltip_text()". (SaveMenu, create_save_menu): added. (create_toolbar): use GtkMenuToolButton for save tool button. (create_save_menu): use GtkAction when "USE_GTK_BUILDER" is true. 2017-02-21 Hiroyuki Ito * src/gtk/x11file.c (FileWinState): use "tree_view_set_no_expand_column()". * src/gtk/x11lgnd.c (LegendWinState): use "tree_view_set_no_expand_column()". * src/gtk/gtk_liststore.c (tree_view_set_no_expand_column): added. 2017-02-17 Hiroyuki Ito * src/common.h (OSX): check OSX environment. 2017-02-16 Hiroyuki Ito * configure.ac: check OSX environment. * src/gtk/x11menu.c (ObjectMenu): add "Object" menu. 2017-02-13 Hiroyuki Ito * src/gtk/x11lgnd.c (create_color_combo_box): add "Stroke" and "Fill" menu items under the each submenu. 2017-02-10 Hiroyuki Ito * configure.ac: remove GTK+2 support. (GTK3_REQUIRED_VERSION): support GTK+ 3.4.0 or later. 2017-02-09 Hiroyuki Ito * src/gtk/x11menu.c (MainMenu): remove "Help" menu (integrated to the app menu). 2017-02-08 Hiroyuki Ito * src/gtk/x11lgnd.c (Mlist): change step for mark size. (Tlist): change step size for font size. * src/gtk/gtk_widget.c (create_spin_entry_type): change step size for font size. * src/gtk/init.c (n_initialize): don't use "g_mem_set_vtable()". * src/osystem.c (system_mem_profile): removed. * src/common.h (MARK_TYPE_NUM): removed. * src/gtk/gtk_subwin.c (do_popup): set "d->select" before call "gtk_menu_popup_at_pointer()". * src/odata.c (line_number, add_func_sub, add_basic_func): added. (add_file_func, add_fit_func): use "add_func_sub()". (ofile_create_math_equation): call "add_basic_func()". * src/ntime.c (mjd2gd): fix time calculation. 2017-02-05 Hiroyuki Ito * src/gtk/ox11dlg.c (get_toplevel_window): added. * addin/spellchecker.rb (NgraphSpellchecker): save and restore dialog position. 2017-02-02 Hiroyuki Ito * src/gtk/x11view.c (do_popup): call "gtk_widget_realize()" when the popup menu is not realized. 2017-02-01 Hiroyuki Ito * src/gtk/x11lgnd.c (LegendArrowDialogScale): added. (LegendArrowDialogScaleW, LegendArrowDialogScaleL): use "LegendArrowDialogScale()". 2017-02-01 Hiroyuki Ito * plugins/ruby/ngraph.c (wrap_load_script): added. (load_script): use "wrap_load_script()" with "rb_protect()" instead of "rb_load_protect()". * plugins/ruby.c (require_files): added. (ngraph_plugin_open_ruby): use "require_files()" with "rb_protect()". 2017-01-31 Hiroyuki Ito * src/gtk/gtk_combo.c (set_model): "gtk_cell_renderer_text_new()" shoud be called only when the variable "renderer" is true. * plugins/ruby.c (ngraph_plugin_open_ruby): use "rb_protect()" to avoid exception. 2017-01-27 Hiroyuki Ito * src/gtk/x11menu.c (set_focus_sensitivity_sub): the merge object can be deleted and duplicated. * addin/spellchecker.rb (NgraphSpellchecker#spell_check): use "buttons" and "response_button" fields of the Ngraph::Dialog object. * src/gtk/x11gui.c (add_buttons): added. (DialogButton, DialogCombo, DialogComboEntry, DialogSpinEntry) (DialogCheck): use "add_buttons()". * src/gtk/ox11dlg.c (dlg_get_buttons): added. (dlginput, dlgradio, dlgcombo, dlgspin, dlgcheck): use "dlg_get_buttons()". (dialog): add "buttons" and "response_button" fields. 2017-01-26 Hiroyuki Ito * plugins/ruby/ngraph.c (set_ngraph_obj_class_name): added. (get_ngraph_obj, add_obj_name_const): use "set_ngraph_obj_class_name()". 2017-01-25 Hiroyuki Ito * src/odata.c (f2dlocal_array_sub, f2dstat_array, f2dstat_range): removed. (f2dstat_sub): renamed from "f2dstat_file()". (f2dstat): always use "f2dstat_sub()". (opendata): "fp->mtime" is always 1 for the source type "DATA_SOURCE_ARRAY" and "DATA_SOURCE_RANGE". 2017-01-23 Hiroyuki Ito * src/math/math_parser.c (parse_primary_expression): now accepts two character variable. * src/shell.c (nsleep): use g_thread. * plugins/ruby/ngraph.c (nsleep): accepts real number (not only integer). * src/shellux.c (cmsleep): accepts real number (not only integer). 2017-01-01 Hiroyuki Ito * plugins/ruby/Makefile.am: use "$(MAKE)" and "$(AM_MAKEFLAGS)". * src/Makefile.am (ngraph_DEPENDENCIES): set dependency. 2016-12-30 Hiroyuki Ito * src/oio.c (io_open): check security. 2016-12-26 Hiroyuki Ito * src/gtk/gtk_widget.c (set_widget_font): use PangoFontDescription to make css string. 2016-12-23 Hiroyuki Ito * src/gtk/x11menu.c (create_icon): use image file for application icon (Windows). * src/gtk/gtk_subwin.c (sub_window_create): use image file instead of xpm data. * pixmap/Makefile.am (dist_pixmap_DATA): add application icons and 48 dot window icons. 2016-12-13 Hiroyuki Ito * mingw/windows64.sh: use mingw package for the installation. * src/gtk/init.c (set_dir_defs, set_path_env): add "BINDIR" to the windows "PATH" environment. 2016-11-29 Hiroyuki Ito * src/gtk/gtk_ruler.c (_Nruler): hold widget style and foreground color. * initfile/Ngraph.ini.win (font): add "Malgun Gothic". * debian/control (Build-Depends): depend on "libreadline-dev". 2016-11-28 Hiroyuki Ito * src/gtk/gtk_ruler.c (nruler_get_color): use cached color to avoid busy loop in the function "AppMainLoop()". * src/gtk/x11menu.c (check_pending_event): removed (redundant event check). 2016-11-25 Hiroyuki Ito * src/gtk/ogra2x11.c (gtk_evloop): use "check_pending_event()" instead of "gtk_events_pending()". 2016-11-01 Hiroyuki Ito * src/gtk/gtk_subwin.c (popup_menu_position): not used if the version of GTK+ is greater or equal to 3.22. * src/gtk/x11view.c (popup_menu_position): not used if the version of GTK+ is greater or equal to 3.22. 2016-10-26 Hiroyuki Ito * src/gtk/x11menu.c (defaultwindowconfig) (create_toplevel_window): use "gdk_monitor_get_geometry();" if the version of GTK+ is greater or equal to 3.22. * src/gtk/x11lgnd.c (LegendArrowDialogScaleL) (LegendArrowDialogScaleW): use "gdk_window_invalidate_rect()" if the version of GTK+ is greater or equal to 3.22. * src/gtk/x11view.c (do_popup): use "gtk_menu_popup_at_pointer()" if the version of GTK+ is greater or equal to 3.22. (mouse_down_zoom2): don't use "show_zoom_animation()" if the version of GTK+ is greater or equal to 3.22. * src/gtk/gtk_subwin.c (do_popup): use "gtk_menu_popup_at_pointer()" if the version of GTK+ is greater or equal to 3.22. 2016-09-07 Hiroyuki Ito * src/gtk/x11menu.c (check_pending_event): added. (AppMainLoop, reset_event, ChkInterrupt): use "check_pending_event()". 2016-08-01 Hiroyuki Ito * src/gtk/gtk_widget.c (create_text_view_with_line_number): call "gtk_widget_set_margin_end()". 2016-07-29 Hiroyuki Ito * addin/cal.nsc: use "ncal" instead of "cal". * src/gtk/gtk_widget.c (set_widget_font): us "*" as a selector. * initfile/ngraph.css: fix selector and style. 2016-07-28 Hiroyuki Ito * src/shell.c (ngraphenvironment): check returned value of the function "g_strdup_printf()". * src/oshell.c (cmdshell): functions "shellsavestdio()" and "shellrestorestdio()" must be called always. 2016-01-05 Hiroyuki Ito * debian/control (Build-Depends): depend on "libgsl-dev". 2016-01-01 Hiroyuki Ito * src/gtk/x11menu.c (create_toolbar): set label for radio tool buttons. (show_recent_dialog): check "Menulock" and "Globallock". * src/gtk/gtk_subwin.c (spin_button_size_allocated) (start_editing): don't change allocated size. * src/gtk/x11file.c (FileDialogClose): save range parameters. 2015-09-21 Hiroyuki Ito * src/math/math_expression.c: fix typo. * src/math/math_expression.h (MATH_EXPRESSION_TYPE_DOUBLE): fix typo. * src/math/math_equation.c (optimize_func_cb, check_const_sub): fix typo. 2015-08-19 Hiroyuki Ito * initfile/Ngraph.nsc: unset used variables. * src/gtk/x11gui.c (FileSelectionDialog): call "gtk_file_chooser_set_local_only()". * src/gtk/x11graph.c (DirectoryDialogSetup): call "gtk_file_chooser_set_local_only()". 2015-08-03 Hiroyuki Ito * src/gtk/gtk_action.c (ViewSidebarAction_activated) (ViewStatusbarAction_activated, ViewRulerAction_activated) (ViewScrollbarAction_activated) (ViewCommandToolbarAction_activated) (ViewToolboxAction_activated, ViewCrossGaugeAction_activated): check returned value of the function "toggle_view()". (ViewToggleSingleWindowModeAction_activated): check "Menulocal.single_window_mode". * src/gtk/x11menu.c (toggle_view, CmReloadWindowConfig) (CmToggleSingleWindowMode): check "Menulock" and "Globallock". (toggle_view): return success or false. 2015-07-30 Hiroyuki Ito * src/osystem.c (WEB): The repository is moved from SourceForge to GitHub. 2015-07-15 Hiroyuki Ito * src/shell.c (expand): remove "WILD_PERIOD" flag. * src/nconfig.c (replaceconfig, removeconfig): free "fil" when the variable "fptmp" is NULL. * src/gtk/init.c (load_css): this function is used only when the vertsion of the GTK+ is greater or equal to 3.16. * src/gtk/ox11menu.c (mx_show_lib_version): check "RL_VERSION_MAJOR" instead of "HAVE_READLINE_READLINE_H". 2015-07-14 Hiroyuki Ito * src/gtk/x11menu.c (create_cursor): use "gdk_cursor_new_for_display()" instead of "gdk_cursor_new()". * src/gtk/x11info.c (InfoWinSetFont): use "set_widget_font()". * src/gtk/x11file.c (HEADLINE_FONT_COLUMN): added. (create_preview_table): add font column. (update_table_visibility, set_headline_table_array) (set_headline_table): set font. (FileDialogSetup, ArrayDialogSetup): dont setup font. * src/gtk/x11cood.c (CoordWinSetFont): use "set_widget_font()". * src/gtk/ogra2x11.c (gtkwait_action): use "gdk_cursor_new_for_display()" instead of "gdk_cursor_new()". * src/gtk/init.c (load_css): added. (n_initialize): use "load_css()". * src/gtk/gtk_widget.c (set_widget_font): added. (text_view_with_line_number_set_font): use "set_widget_font()". * src/gtk/gtk_ruler.c (nruler_get_color): remove 3rd parameter. (nruler_draw_ticks): use "gtk_render_background()". 2015-07-06 Hiroyuki Ito * src/gtk/init.c (n_initialize): load css file. * initfile/ngraph.css: added. * initfile/Makefile.am (dist_ngraphui_DATA): add "ngraph.css" 2015-07-05 Hiroyuki Ito * src/gtk/gtk_widget.c (set_linumber_color): not used if the vertsion of the GTK+ is greater or equal to 3.16. * src/gtk/gtk_common.h (LINE_NUMBER_WIDGET_NAME): added. 2015-07-04 Hiroyuki Ito * src/math/math_expression.h: remove unnecessary definition of a variable "function_argument". * src/gtk/gtk_widget.c (set_button_icon): do nothing when the vertsion of the GTK+ is greater or equal to 3.12. (set_linumber_color): use "GTK_STATE_FLAG_*" instead of "GTK_STATE_*". 2015-07-01 Hiroyuki Ito * src/gtk/gtk_liststore.c (add_line_style_item_to_cbox): use "g_strcmp0()" instead of "strcmp()". 2015-06-03 Hiroyuki Ito * src/gtk/init.c (n_save_shell_history): "HistoryFile" is not declared when "HAVE_READLINE_READLINE_H" is false. 2015-05-09 Hiroyuki Ito * use "void *" instead of "GtkAction *". 2015-04-03 Hiroyuki Ito * src/shell.c (cmdexec): don't call "check_interrupt()" and "reset_interrupt()". 2015-03-13 Hiroyuki Ito * src/shell.h: the function "set_signal()"is not used in Windows. * src/oshell.c (cmdshell): signal is not used in Windows. 2015-03-06 Hiroyuki Ito * src/odata.c (set_data_progress): check not only "ninterrupt()" but "fp->interrupt". (file_calculate): "fp->interrupt" is true when "val->type" is "MATH_VALUE_INTERRUPT". (getdata_sub1): check "fp->interrupt". * src/math/math_expression.c (math_expression_calculate): retain "val->type" when the type is "MATH_VALUE_INTERRUPT". * src/math/math_basic_function.c (math_func_for) (math_func_while): return "MATH_VALUE_INTERRUPT" when interrupted. * src/math/math_equation.h (MATH_VALUE_INTERRUPT): added. * src/gtk/x11view.c (check_paint_lock): added. * src/gtk/x11menu.h (NgraphApp): remove member "Interrupt". * src/gtk/x11menu.c (kill_signal_handler): call "set_interrupt()". (AppMainLoop): don't reset interruption. (ChkInterrupt): call "check_interrupt()" when "DrawLock != DrawLockDraw". * src/gtk/x11commn.c (stop_btn_clicked): use "set_interrupt()". (ProgressDialogCreate): call "reset_interrupt()". * src/gtk/x11axis.c (pos_edited_common, axis_prm_edited_common): call "menu_lock(FALSE)". (pos_y_edited, pos_x_edited): don't call "menu_lock(FALSE)". 2015-03-04 Hiroyuki Ito * src/oshell.c (int_handler): added. (cmdshell): save, set and restore signal handler for the "SIGINT" signal. * src/shell.c (nsleep): use "reset_interrupt()" and "check_interrupt()". (set_signal): add 4th parameter. (set_interrupt, reset_interrupt, check_interrupt): added. (cmdexec): use "reset_interrupt()" and "check_interrupt()". 2015-02-28 Hiroyuki Ito * src/math/math_function.h.in: add function "while". * src/math/math_basic_function.c (math_func_while): added. (math_func_for): check interruption. 2015-01-22 Hiroyuki Ito * doc/html/ja/math.html (特殊関数): update document. * src/math/math_function.h.in: add function "mjd2unix". * src/math/math_basic_function.c (math_func_mjd2unix): added. 2014-12-24 Hiroyuki Ito * src/gtk/x11axis.c (scale_tab_create): change label fron "File" to "Data". 2014-12-17 Hiroyuki Ito * addin/fitrslt.c (savescript, create_format_frame) :add "shadow" check button. (frame_toggled): added. * addin/legend.c (savescript, create_option_frame): add "shadow" check button. (frame_toggled): added. 2014-12-13 Hiroyuki Ito * addin/fitrslt.nsc: use "get" command. * addin/fitrslt.c (set_parameter): check variable "i". (set_parameter): use "data" object. 2014-11-20 Hiroyuki Ito * src/gtk/gtk_widget.c (_create_spin_entry) (create_direction_entry): call "gtk_entry_set_max_width_chars()". 2014-11-13 Hiroyuki Ito * src/gtk/x11view.c (graph_dropped): don't call "LoadDialog()". * src/gtk/x11graph.c (LoadDialog): free "data->exdir" if necessary. (CmGraphLoad, CmGraphHistory): don't call "LoadDialog()". * src/gtk/x11dialg.c (initdialog): initialize "DlgLoad.exdir". * src/gtk/x11commn.c (LoadNgpFile): call "LoadDialog()". 2014-11-12 Hiroyuki Ito * src/oprm.c (addfontcontrol, remarkconv, prmload): support recent Ngraph objects. * src/gtk/x11view.c (graph_dropped): don't load PRM file. * src/gtk/x11menu.c (check_instance): call "set_axis_undo_button_sensitivity()". (application): don't load PRM file. * src/gtk/x11graph.c (PrmDialogSetup, PrmDialogClose, PrmDialog): removed. (CmGraphLoad): don't load PRM file. * src/gtk/x11dialg.c (initdialog): remove "PrmDialog". * src/gtk/x11commn.c (GraphSave): don't consider PRM file. (LoadPrmFile): removed. * src/gtk/ox11dlg.c (dlgconfirm, dlgmessage, dlginput) (dlgbutton, dlgradio, dlgcombo, dlgspin, dlgcheck): update title of the window. * addin/load_prm.nsc: added. 2014-10-26 Hiroyuki Ito * src/gtk/x11menu.c (create_toolbar): use gettext to show tooltips. 2014-10-05 Hiroyuki Ito * src/gtk/x11menu.c (set_widget_visibility): call "set_toggle_action_widget_state()" twice when "USE_GTK_BUILDER" is false. 2014-10-03 Hiroyuki Ito * src/gtk/x11menu.c (create_toplevel_window): call "set_widget_visibility()" only once. 2014-10-02 Hiroyuki Ito * debian/rules (override_dh_auto_configure): add "--with-versioned-symbol" option. * src/Makefile.am (libngraph_ldflags): use "vsymldflags". * configure.ac (vsymldflags): add "--with-versioned-symbol" option. 2014-09-27 Hiroyuki Ito * src/gtk/x11view.c (ViewerWinSetup): check "d->popup". * src/gtk/x11menu.c (setupwindow): check "NgraphApp.Viewer.popup". (create_menu_sub): don't call "gtk_application_add_accelerator()". (create_toplevel_window): don't call "gtk_window_set_has_resize_grip()". * src/gtk/x11file.c (RangeDialogSetup): change width of numeric entries. * src/gtk/gtk_action.c (create_application_window): create popup menu. 2014-09-05 Hiroyuki Ito * debian/libngraph0.install: added. * debian/libngraph0-dev.install: added (renamed from "ngraph-gtk-dev"). * src/gtk/gtk_action.c (DataAddRecentFileAction_activated) (GraphRecentAction_activated): added. * src/gtk/x11menu.c (create_recent_filter, show_recent_dialog): added. (create_recent_menu): use "create_recent_filter()". 2014-08-26 Hiroyuki Ito * src/gtk/x11menu.c (ActionWidget): add member "action". (ToolItem, MenuItem): add member "action_name". (add_addin_menu): added. (create_addin_menu): call "add_addin_menu()". (set_window_action_visibility): call "g_simple_action_set_enabled()". (clipboard_changed, unref_entry_history, get_subwindow_state): added. (save_entry_history): dont call "g_object_unref()". (toggle_view): added. (toggle_view_cb): use "toggle_view()". (set_toggle_action_widget_state): use "g_action_change_state()". (create_toolbar): call "gtk_actionable_set_action_name()". (create_menu_sub): initialize GActionMap. (create_toplevel_window): added. (application): use "create_toplevel_window()" and destroy "TopLevel" only when terminate signal is received. (script_exec, CmToggleSingleWindowMode): not static. (CmToggleSingleWindowMode): the variable "state" is given from the parameter "client_data" when the first parameter is NULL. * src/gtk/ox11menu.c (mx_get_accel_map): use GtkApplication if necessary. * src/gtk/x11view.c (ViewerWinClose): don't call "CloseGC()" and "CloseGRA()". (ViewerEvKeyDown): add case for "GDK_KEY_Return". * src/gtk/x11menu.h (NgraphApp): remove members "ghistory" and "fhistory", add member "recent_manager". * src/gtk/ox11menu.h (menulocal): remove member "ngpfilelist". * src/gtk/gtk_action.h: added. * src/gtk/gtk_action.c: added. * initfile/menus.ui: added. 2014-08-18 Hiroyuki Ito * src/odata.c (getdata_skip_step): always return 0 when data source is "DATA_SOURCE_ARRAY" or "DATA_SOURCE_RANGE". (get_data_from_source): return 2 when remarked line. (getdata_sub1): call "getdata_sub2()" only when "get_data_from_source()" returns 0. (getdata2, getdataraw): continue loop when "get_data_from_source()" returns non zero. 2014-08-07 Hiroyuki Ito * addin/fft.c (read_data): use "fgets()" and "sscanf()" instead of "fscanf()". 2014-07-31 Hiroyuki Ito * src/gtk/x11menu.c (PlotAddMenu): add "recent data" menu item. (recent_filter): static function. (create_recent_menu): not static function. * src/gtk/x11file.c (add_menu_list): add "recent data" menu item. (file_setup_item): check source type. (FileDialogSetupItem): remove third parameter. (FileDialogSetupCommon): check source type. (RangeDialogSetup): renamed from "FuncDialogSetup()". (ArrayDialogClose, FuncDialogClose): removed. (FileDialog): always "0FileDialogClose" is used. (FileDefDialog): initialize "source" member. (draw_type_pixbuf, start_editing_type): don't check the "source" field. (create_type_color_combo_box): remove fifth parameter. * src/shell.c (gettok): second argument "len" is always initialized. * src/oplot.c (ERR_INVALID_RANGE): added. (f2ddata): add members "range_min", "range_max" and "range_div". (opendata): initialize members "range_min", "range_max" and "range_div". (put_func): don't use the variable "is_fuinc". (f2dinit): initialize fields "range_min", "range_max" and "range_div". (hskipdata, getdata_skip_step, get_data_from_source): handle case for "PLOT_SOURCE_RANGE". (get_func_prm, get_func_value, funcout): removed. (f2dcolumn_range): added. (f2dopendata, f2dgetdata, f2dopendataraw): don't check the "source" field. (f2dstat_range): added. (f2dstat): use "f2dstat_range()". (f2dboundings_func, save_data_func): removed. (solve_equation, calc_fit_equation, get_fit_parameter): don't check the "source" field. 2014-07-30 Hiroyuki Ito * addin/fft.c (save_data): change numerical format of the output. * src/gtk/gtk_subwin.c (create_popup_menu_sub): add case for "POP_UP_MENU_ITEM_TYPE_RECENT_DATA". * src/gtk/x11commn.c (PlotFileArrayCB): removed. * src/odarray.c (darray_modified): added. (odarray): "darray_modified()" is called for the "@" field. * addin/fft.c (main, save_data, read_data): fix order of arguments. 2014-06-30 Hiroyuki Ito * src/oplot.c (f2ddraw): call "GRAview()". 2014-06-08 Hiroyuki Ito * src/oplot.c (open_array): check maximum value of the id. * src/gtk/x11commn.c (del_darray): added. (DeleteDrawable): call "del_darray()". (store_file, save_array, save_merge, save_plot): added. (SaveParent): use "save_plot()" and "save_merge()". 2014-06-05 Hiroyuki Ito * debian/rules (XDG_RUNTIME_DIR): set environment variable (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750043). 2014-06-02 Hiroyuki Ito * src/gtk/x11menu.h (obj_list_data): remove member "ev_button". * src/gtk/gtk_subwin.c (do_popup): "button" argument is always zero because this function is called from "button-release-event" or "key-press-event". 2014-05-27 Hiroyuki Ito * src/oplot.c (f2dstat_file): add parameter "field". 2014-05-24 Hiroyuki Ito * src/oplot.c (f2ddraw): add label "FinishDrawing" and use "goto" instead of "return 0". (f2dredraw): check "source" field. * src/gtk/x11file.c (copy_file_obj_field): ignore not only "file" but also "array" field. 2014-05-22 Hiroyuki Ito * src/gtk/x11axis.c (Popup_list): add "_Add" sub menu. * src/gtk/x11file.c (popup_show_cb): check "source" field. 2014-05-21 Hiroyuki Ito * src/gtk/x11merge.c (Popup_list): use "_Delete" instead of "_Close". * src/gtk/x11file.c (Popup_list): use "_Delete" instead of "_Close". * src/gtk/x11menu.c (create_recent_menu): call "g_signal_connect()". (create_toolbar): handle "TOOL_TYPE_RECENT_GRAPH" and "TOOL_TYPE_RECENT_GRAPH". (create_menu_sub): don't call "g_signal_connect()" for "GtkRecentChooserMenu". * src/gtk/x11merge.c (MergeWinState): use "tree_view_set_tooltip_column()". * src/gtk/x11lgnd.c (LegendWinState): use "tree_view_set_tooltip_column()". * src/gtk/x11file.c (FileWinState): use "tree_view_set_tooltip_column()". * src/gtk/x11axis.c (AxisWinState): use "tree_view_set_tooltip_column()". * src/gtk/gtk_liststore.c (tree_view_set_tooltip_column) (tree_view_set_tooltip_query_cb): added. 2014-05-14 Hiroyuki Ito * src/oplot.c (save_data_func): don't check returned value of the function "math_equation_calculate()". * addin/fitrslt.c (loaddatalist): get and check "source" and "array" fields. * addin/text-in.nsc: use "plot" object and check "source" field. * addin/legend.nsc: use "plot" object and save "source" and "array" fields. * addin/legend.c (loaddatalist): get and check "source" and "array" fields. (set_parameter): set 3rd column based on "source" field. * addin/fitrslt.nsc: use "plot" object and save "source" and "array" fields. * addin/fft.nsc: use "plot" object. * addin/append.nsc: use "plot" object. * addin/Makefile.am (addins, pkglibexec_PROGRAMS): remove "calc" addin. 2014-05-13 Hiroyuki Ito * src/oplot.c (file_fit_calc, file_fit_prm): use "plot" object. (add_file_prm): added. (opendata): check "src" and use "add_file_prm()". (f2dputmath): strip math string. (f2dinit): initialize "max", "min" and "div" field. (draw_fit): check "code->exp". (draw_fit): check "val.type" instead of the returned value of the function "math_equation_calculate()". (get_func_value): check "f2dlocal->codex[0]->exp" and "f2dlocal->codey[0]->exp". (funcout): initialize cnstant of the equation. (save_data_func): check "val.type", "f2dlocal->codex[0]->exp" and "f2dlocal->codey[0]->exp". (solve_equation): check "eq->exp". * src/ofit.c (fituser): check "var.type" instead of the returned value of the function "math_equation_calculate()". * src/math/math_equation.c (math_equation_calculate): check and initalize the parmetar "val". * src/gtk/x11file.c (add_menu_list): added. (move_tab_copy, mask_tab_copy): use "PlotFileArrayCB". (load_tab_setup_item): check "d->source". (load_tab_copy): use "PlotFileArrayCB". (load_tab_create, load_tab_set_value): check "d->source". (math_tab_copy): use "PlotFileArrayCB". (math_common_widgets_create): added. (math_tab_create): use "math_common_widgets_create()". (math_set_value_common): added. (math_tab_set_value): use "math_set_value_common()". (set_axis_combo_box, plot_axis_setup_item): added. (file_setup_item): use "plot_axis_setup_item()". (FileDialogSetupItem): check "d->source". (plot_tab_copy, file_settings_copy): use "PlotFileArrayCB". (FileDialogSetupCommon): use default width for the deta clumn entries. (CHECK_VISIBILITY_ARRAY): added. (set_headline_table_array): added. (update_table_visibility): check "d->source". (FileDialogSetup): change title of the dialog. (ArrayDialogSetup, FuncDialogSetupItem, FuncDialogSetup) (ArrayDialogClose, FuncDialogClose): added. (FileDialog): check "d->source". (CmFileHistory): use "data->dialog" instead of "&DlgFile". (CmFileNew): use "plot" object. (CmFileNew): use "data->dialog" instead of "&DlgFile". (CmFuncAdd): added. (CmFileOpen): use "plot" object. (update_file_obj_multi): use "data->dialog" instead of "&DlgFile". (CmFileUpdate): use "plot" object. (check_plot_obj_file): added. (CmFileEdit): use "plot" object, "PlotFileCB" and "check_plot_obj_file()". (CmOptionFileDef): use "plot" object. (get_plot_info_str): added. (file_list_set_val): use "get_plot_info_str()". (CmFileMath, GetDrawFiles, CmFileSaveData, select_type) (start_editing_type, FileWinState): use "plot" object. 2014-05-12 Hiroyuki Ito * src/gtk/x11menu.c (create_toolbar): add 3rd parameter. (check_instance): use "plot" object. (PlotAddMenu): added. * src/gtk/x11dialg.h (FileDialog): add members "min", "max, "div" and "sourece". * src/gtk/x11dialg.c: add "DlgFunc" and "DlgArray". * src/gtk/x11commn.c (AxisDel2, AxisMove, FitClear) (DeleteDrawable, SaveParent, get_save_opt, FileAutoScale) (SetFileHidden): use "plot" object. (field_obj_del, get_plot_cb_str, ArrayDel, PlotFileCB) (PlotFileArrayCB): added. (FileCB): use "get_plot_cb_str()". (FitDel): use "field_obj_del()". * src/gtk/x11view.c (ViewerWinFileUpdate, Evaluate) (mouse_down_move_data, data_dropped): use "plot" object. (ViewerWinSetup): call "gtk_menu_attach_to_widget()". * src/gtk/x11opt.c (CmOptionSaveNgp): use "plot" object. * src/gtk/gtk_subwin.c (create_popup_menu_sub): added. (sub_win_create_popup_menu): use "create_popup_menu_sub()". 2014-05-11 Hiroyuki Ito * src/shell.c (shprintfstdout, shprintfstderr): type of the first parameter is "const char *". * src/ogra.c (set_progress_val): type of the last parameter is "const char *". * src/object.c (vnprintf, seprintf): type of the first parameter is "const char *". (registerevloop): type of the first and second parameters are "const char *". * src/ngraph_api.c (ngraph_get_object_alias): added. * src/gtk/ox11menu.c (mgtkprintfstdout, mgtkprintfstderr): type of the first parameter is "const char *". * src/gtk/init.c (printfconsole): type of the first parameter is "const char *". * src/gra.c (_GRAopen, GRAopen, GRAaddlist, GRAinslist): type of some parameters are "const char *". * plugins/ruby/create_objs.rb (NgraphObj): now "alias" name can be used as an object. * src/gtk/x11axis.c (AxisDialogFile, file_button_show): use "plot" object. 2014-05-03 Hiroyuki Ito * src/oaxis.c (get_reference_parameter): keep original axis type when the typeboth axis are linear or MJD. 2014-05-01 Hiroyuki Ito * src/oaxis.c (calc_numbering_value, get_axis_math) (alloc_axis_math, free_axis_math, num_put_math): added. (numformat): use "calc_numbering_value()". (axisdraw, axis_get_numbering): use "alloc_axis_math()" and "free_axis_math()". (axis): add field "num_math". (axisdraw): don't call "get_axis_parameter()" twice when "aconf.code" is not NULL. * src/gtk/x11axis.c (Alist): add "num_math" column. (numbering_tab_set_value): save "num_math"field. (numbering_tab_setup_item): setup "num_math". (numbering_tab_create): add widget to set "num_math" field. (axis_list_set_val): set style depend on "num_math" field. (AxisWinState): min, max and inc column refer "num_math" column as the font style. * src/gtk/x11file.c (FileWinState): use "set_cell_attribute_source()". (set_source_attribute): removed. * src/gtk/gtk_subwin.c (set_cell_attribute_source): added. 2014-04-25 Hiroyuki Ito * addin/spellchecker.rb: add "About" button. 2014-04-23 Hiroyuki Ito * addin/spellchecker.rb: usr "Ruby/GTK3" if available. 2014-04-22 Hiroyuki Ito * initfile/20append_addins_ruby.nsc: added. * initfile/Makefile.am (init_scripts): install "20append_addins_ruby.nsc". * src/osystem.c (get_basename): renemed from "get_plugin_name()". (get_plugin_name): added. (load_plugin_sub): use "get_plugin_name()". (system_plugin_check): added. (nsystem): add field "plugin_check". * addin/Makefile.am (ruby_addins): added. * addin/legend.c (main): change order of buttons. * addin/fitrslt.c (main): change order of buttons. (my_create_spin_button): use "gtk_widget_set_margin_end()" when the version of GTK+ is greater or equal to 3.12. * addin/calc.c (main): change order of buttons. 2014-04-19 Hiroyuki Ito * addin/spell_check.rb: handle "LoadError". 2014-04-18 Hiroyuki Ito * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose): don't use "Menulocal.browser" when ter version of GTK+ is greater or equal to "3.0.0". * src/gtk/x11gui.c (message_box): change order ob buttons in the case of "RESPONS_YESNOCANCEL". * debian/ruby-ngraph.install: install "usr/lib/*/ruby/*". 2014-04-16 Hiroyuki Ito * src/gtk/x11lgnd.c (Tlist): add "bgcolor" column. (text_list_set_val, LegendWinState): set background color of the text column. * src/gtk/gtk_common.h (USE_HEADER_BAR): added. 2014-04-15 Hiroyuki Ito * src/gtk/x11opt.c (MiscDialogSetup, ExViewerDialogSetup) (ViewerDialogSetup): use "GTK_RESPONSE_CANCEL" instead of "IDCANCEL". * src/gtk/x11gui.c (DialogExecute): use "gtk_dialog_new_with_buttons()" instead of "gtk_dialog_new()". (DialogInput, DialogRadio, DialogCombo, DialogComboEntry) (DialogSpinEntry, DialogCheck): add "GTK_DIALOG_USE_HEADER_BAR" flag. 2014-04-10 Hiroyuki Ito * src/gtk/x11menu.c (create_toolbar, create_menu_sub): use "create_image_from_file()". * src/gtk/x11lgnd.c (LegendWinState): use "create_image_from_file()". * src/gtk/gtk_widget.c (create_image_from_file): added. 2014-04-04 Hiroyuki Ito * src/gtk/x11file.c (MarkDialogSetup): use "gtk_widget_set_margin_start()" and "gtk_widget_set_margin_end()" when the version of GTK+ is greater or equal to 3.12. * src/gtk/gtk_widget.c (set_widget_margin): use "gtk_widget_set_margin_start()" and "gtk_widget_set_margin_end()" when the version of GTK+ is greater or equal to 3.12. * plugins/Makefile.am (RUBY_ARCH_INCLUDEDIR): added. 2014-04-03 Hiroyuki Ito * src/gtk/x11lgnd.c (LegendWinState): show "text::text" field as a tool-tip. * src/gtk/x11file.c (FileWinState, file_list_set_val): show "file::file" field as a tool-tip. * src/gtk/x11view.c (AlignFocusedObj): swap "VIEW_ALIGN_HCENTER" and "VIEW_ALIGN_VCENTER". (ViewerEvLButtonDblClk, ViewerEvKeyDown): use "set_pointer_mode()" instead of "gtk_radio_action_set_current_value()". * src/gtk/x11merge.c (MergeWinState): renamed from "CmMergeWindow". * src/gtk/x11menu.c (set_pointer_mode, init_action_widget_list) (set_action_widget_sensitivity, set_subwin_state) (set_toggle_action_widget_state, create_toolbar) (create_menu_sub, create_menu, create_popup, toggle_subwindow) (set_subwindow_state): added. (CmViewerButtonArm): moved from "x11view.c". (set_axis_undo_button_sensitivity): use "set_action_widget_sensitivity()". (create_addin_menu): don't use "gtk_ui_manager_get_widget()". (set_action_sensitivity): removed. (set_focus_sensitivity_sub, set_window_action_visibility): don't use "GtkAction". (multi_to_single, destroy_sub_windows): call "set_subwindow_state()" instead of "window_action_set_active()". (setupwindow): don't use "GTkUIManager". (init_ngraph_app_struct): initialize member valiables "action_widget_id" and "state_func". (create_sub_windows): use "set_subwindow_state()". (set_modified_state): use set_action_widget_sensitivity()". (toggle_view_cb): inhibit recursive call. (set_widget_visibility): use "set_toggle_action_widget_state()". (check_instance): use "set_action_widget_sensitivity()". (application): don't use "GTkUIManager" and "GtkAction". (CmReloadWindowConfig): use "set_subwindow_state()" instead of "window_action_set_active()". (CmToggleSingleWindowMode): use "gtk_check_menu_item_get_active()" instead of "gtk_toggle_tool_button_get_active()". * src/gtk/x11lgnd.c (LegendWinState): renamed from "CmLegendWindow". * src/gtk/x11info.c (InfoWinState): renamed from "CmInformationWindow". * src/gtk/x11file.c (FileWinState): renamed from "CmFileWindow". * src/gtk/x11cood.c (CoordWinState): renamed from "CmCoordinateWindow". * src/gtk/x11axis.c (AxisWinState): renamed from "CmAxisWindow". * src/gtk/ox11menu.c (mx_show_win, mx_hide_win, mx_toggle_win): call "set_subwindow_state()" instead of "window_action_set_active()". (mx_get_ui): removed. (gtkmenu): remove field "get_ui". * src/gtk/init.c (n_initialize): use "rl_completion_func_t *" instead of "CPPFunction *". * src/gtk/gtk_subwin.c (sub_window_hide, sub_window_show): set "visible" member variable and call "set_toggle_action_widget_state()". (cb_del, ev_sub_win_key_down): call "set_subwindow_state()" instead of "window_action_set_active()". 2014-04-02 Hiroyuki Ito * src/gtk/x11menu.c (create_ui_from_file, set_toolbar_caption) (set_btn_press_cb, get_toolbar, create_action_group) (create_action_widget, init_action_widget_list): removed. 2014-04-01 Hiroyuki Ito * src/gtk/x11menu.c (window_action_toggle) (window_action_set_active, set_toggle_action): removed. 2014-03-27 Hiroyuki Ito * src/gtk/x11menu.c (set_gdk_color): removed. 2014-03-01 Hiroyuki Ito * src/gtk/gtk_widget.h (NUM_ENTRY_WIDTH): change width from 11 to 12. * src/gtk/x11axis.c (font_tab_create): use "gtk_check_button_new_with_mnemonic()" instead of "gtk_check_button_new_with_label()". 2014-02-28 Hiroyuki Ito * src/gtk/x11view.c (EvalDialogSetup): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". (EvalDialogSetup): don't use "GtkStockItem". * src/gtk/x11opt_proto.h (CREATE_NAME): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". (CREATE_NAME): don't use "GtkStockItem". * src/gtk/x11opt.c (PrefScriptDialogSetup) (PrefDriverDialogSetup, PrefFontDialogSetup, MiscDialogSetup) (ExViewerDialogSetup, ViewerDialogSetup): don't use "GtkStockItem". (FontSettingDialogSetup): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". * src/gtk/x11merge.c (Popup_list): don't use "GtkStockItem". * src/gtk/x11menu.c (ActionEntry): don't use "GtkStockItem". (create_action_group): use "gtk_action_set_icon_name()"; * src/gtk/x11lgnd.c (Popup_list): don't use "GtkStockItem". (points_setup, legend_dialog_setup_sub): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". (LegendTextDialogSetup, LegendArrowDialogSetup) (LegendRectDialogSetup, LegendArcDialogSetup) (LegendMarkDialogSetup): don't use "GtkStockItem". * src/gtk/x11gui.c (DialogExecute, message_box, DialogInput) (DialogRadio, DialogCombo, DialogComboEntry, DialogSpinEntry) (DialogCheck, nGetOpenFileNameMulti, nGetSaveFileName): don't use "GtkStockItem". * src/gtk/x11graph.c (SwitchDialogSetup): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". * src/gtk/x11file.c (Popup_list): don't use "GtkStockItem." (MathDialogSetup, FitDialogSetup) (move_tab_create,mask_tab_create): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". (MathDialogSetup, FitSaveDialogSetup, FitDialogSetup): don't use "GtkStockItem". * src/gtk/x11dialg.c (SelectDialogSetup): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". * src/gtk/x11commn.c (ProgressDialogCreate): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_button_new_from_stock()". * src/gtk/x11axis.c (Popup_list): don't use "GtkStockItem". (scale_tab_create): use "gtk_button_new_with_mnemonic()" instead of "gtk_button_new_from_stock()". (font_tab_create): use "gtk_check_button_new_with_mnemonic()" and "set_button_icon()" instead of "gtk_check_button_new_with_label()" and "gtk_button_set_use_stock()". * src/gtk/gtk_widget.c (set_button_icon): added. (create_file_entry_with_cb, create_direction_entry): use "gtk_entry_set_icon_from_icon_name()" instead of "gtk_entry_set_icon_from_stock()". * src/gtk/gtk_subwin.h (subwin_popup_list): remove member "use_stock". * src/gtk/gtk_subwin.c (start_editing): use "gtk_entry_set_icon_from_icon_name()" instead of "gtk_entry_set_icon_from_stock()". (sub_win_create_popup_menu): use "gtk_menu_item_new_with_mnemonic()" instead of "gtk_image_menu_item_new_from_stock()". * initfile/NgraphUI.xml: remove preview tool button. * initfile/Ngraph.ini.in (browser): don't use "yelp". * addin/legend.c (main): don't use "GtkStockItem". * addin/fitrslt.c (main): don't use "GtkStockItem". * addin/calc.c (main): don't use "GtkStockItem". 2014-02-25 Hiroyuki Ito * src/gtk/x11menu.c (single_to_multi): set "Menulocal.single_window_mode" true before call "CmReloadWindowConfig()". * src/gtk/gtk_subwin.c (sub_window_set_visibility): check "Menulocal.single_window_mode". 2014-02-15 Hiroyuki Ito * plugins/Makefile.am (libruby_ldflags): don't link aginst libngraph. * configure.ac: use "AC_CHECK_LIB" to check libm. 2014-02-14 Hiroyuki Ito * src/gtk/x11file.c (file_list_set_val) (create_type_color_combo_box, select_type, select_axis): support sourece type. (set_source_attribute): added. 2014-02-13 Hiroyuki Ito * doc/html/ja/text.html: update document. * src/gtk/x11file.c (draw_type_pixbuf, file_list_set_val): support sourece type "function" and "array". * src/oplot.c (set_array): added. (open_array): return non zero when failed. (ERR_INVALID_OBJ): added. * src/gra.c (GRAdrawtext, GRAtextextent): add space between the lines setting. 2014-02-11 Hiroyuki Ito * src/oplot.h: added. * src/oplot.c: added. * src/gtk/x11view.c (ViewerEvLButtonUp): call "gtk_widget_queue_draw()". 2014-02-02 Hiroyuki Ito * src/odarray.c (calc_sum, calc_square_sum): removed. (cache_data): added. (darray_sum, darray_average, darray_rms, darray_sdev) (darray_min, darray_max): use "cache_data()". 2014-02-01 Hiroyuki Ito * src/object.c (obj_do_tighten_all): added. 2014-01-28 Hiroyuki Ito * addin/fft.c (save_data, read_data): added. (main): use "save_data()" and "read_data()". (MAXP): changed from 16 to 24. 2013-12-15 Ito Hiroyuki * addin/legend.c (create_geometry_frame): use "create_spin_button()". * addin/fitrslt.c (my_create_spin_button, create_position_frame): use "create_spin_button()". * addin/addin_common.c (create_spin_button): added. (create_font_frame): use "create_spin_button()". 2013-12-07 Ito Hiroyuki * plugins/ruby/ngraph.c (load_script): use File#expand_path to get full path name of the script. * plugins/ruby.c (ngraph_plugin_open_ruby): check returned value of th function "rb_require()". 2013-12-01 Hiroyuki Ito * plugins/ruby/lib/ngraph/ngp2.rb: added. 2013-11-29 Ito Hiroyuki * plugins/ruby/create_objs.rb: don't add '?' to some methods. * plugins/ruby.c (ngraph_plugin_exec_ruby): removed. * src/osystem.h: added. * src/osarray.c (sarrayerrorlist): bug fix: add ',' as the needed. * src/osystem.c (syserrorlist): bug fix: add ',' as the needed. (close_module, get_symbol, get_plugin_name, load_plugin_sub) (get_plugin_from_name, load_plugin, system_plugin_load) (free_argv, allocate_argv, system_plugin_exec) (system_plugin_get_module): added (moved from "oplugin.c"). (sysdone): unload modules. * src/oplugin.c: removed. * plugins/ruby/ngraph.c (load_script): added. (ruby_ngraph_init): the function "ngraph_set_exec_func()" is always called. 2013-11-28 Ito Hiroyuki * src/osystem.c (ext_shell_exec, system_check_prohibited_plugin) (system_set_ext_shell): added. (nsystem): add fields "ext_shell", "ext_shell_name" and "prohibited_plugin". (addsystem): initialize "ProhibitedPlugins". * src/oplugin.c (load_plugin): check prohibited plugins. * src/ngraph_api.c (ngraph_set_exec_func): added. * plugins/ruby/ngraph.c (ruby_ngraph_exec_loginshell): use "ALLOCA_N()" and "strcpy()" instead of "strdup()". (ruby_ngraph_init): add 3rd parameter and call "ngraph_set_ext_shell()" ic necessary. 2013-11-27 Ito Hiroyuki * plugins/ruby/ngraph.c (ruby_ngraph_init): set "Initialized". (Init_ngraph): check "Initialized". * src/ngraph_api.c (ngraph_exec_loginshell): return returned valu of the function "exeobj()" or "sexeobj()". * plugins/ruby/ngraph.c (ruby_ngraph_exec_loginshell) (ruby_ngraph_init_file): added. (Init_ngraph): add singleton methods "get_initialize_file" and "execute_loginshell". 2013-11-26 Ito Hiroyuki * plugins/ruby/ngraph.c (ruby_ngraph_init): added. (Init_ngraph): add singleton method "ngraph_initialize". * plugins/ruby/extconf.rb: check first argument. * plugins/ruby/Makefile.am (ruby_ext): use "RUBY_DLEXT." * debian/ruby-ngraph.install: added. * debian/control (Package): add ruby-ngraph package. * configure.ac: set "RUBY_DLEXT". * plugins/ruby/lib/ngraph.rb.win: added. * plugins/ruby/lib/ngraph.rb: added. * plugins/ruby/lib/Makefile.am: added. 2013-11-25 Ito Hiroyuki * plugins/ruby.c: many functions are moved to "plugins/ruby/ngraph.c". (get_ext_name): added. (ngraph_plugin_exec_ruby): use "get_ext_name()" on Windows. * plugins/ruby/ngraph.c: added. * plugins/ruby/getobj.nsc: moved from "plugins/". * plugins/ruby/extconf.rb: added. * plugins/ruby/create_objs.rb: moved from "plugins/". * plugins/ruby/Makefile.am: added. 2013-11-24 Hiroyuki Ito * src/ngraph_api.c (ngraph_save_shell_history): added. * src/gtk/init.c (n_save_shell_history): added. (n_finalize): use "n_save_shell_history()". (n_initialize): check already initialized or not. * plugins/ruby.c (ngraph_save_hist): added. (ngraph_plugin_open_ruby): add singleton method "save_shell_history". 2013-11-23 Ito Hiroyuki * Makefile.am (AM_CFLAGS): added. * src/shell.c (cmdexec, system_bg): use "g_thread_new()" instead of "g_thread_create()" when the version of glib is greater or equal to 2.32. 2013-11-22 Hiroyuki Ito * src/gtk/Makefile.am (libngraphui_la_LDFLAGS): removed. * src/math/Makefile.am (libmath_la_LDFLAGS): removed. 2013-11-21 Ito Hiroyuki * src/oplugin.c (ngraph_plugin_set_user_data) (ngraph_plugin_get_user_data): removed. * src/gtk/x11view.c (create_axis, ViewCopyAxis): use "g_strdup_printf()". * src/gtk/x11commn.c (axis_move_each_obj): use "g_strdup_printf()". * src/gtk/x11axis.c (SectionDialogGrid, CmAxisNewSection): use "g_strdup_printf()". * src/gtk/ox11menu.c (add_str_with_int_to_array) (add_child_geometry_to_array, add_geometry_to_array) (add_color_to_array): use "g_strdup_printf()". * src/gtk/init.c (my_sprintf): removed. (get_file_list): use "g_strdup_printf()". * plugins/ruby.c (str2inst_ensure, obj_del_from_str) (inst_get_obj, inst_put_obj): use "ngraph_free()". (obj_get): don't use "ngraph_object_free()". * src/main.c: added. * src/ngraph_api.c: added. * src/ntime.c (ndate, ntime): use "g_strdup_printf()". * src/oaxis.c (axisinit, axisdone, set_group, axis_default_set): use "g_strdup_printf()". * src/object.c (getvaluestr): add case for "NVOID", "NPOINTER" and "NVFUNC". * src/odraw.c: include "mathfn.h". * src/oplugin.c: api functions are moved to "ngraph_api.c". * src/oroot.c (obj_save_config_numeric, obj_save_config_string): use "g_strdup_printf()". * src/math/math_basic_function.c (math_func_fmod): remove unused variables. * debian/ngraph-gtk.install: install "libngraph". * mingw/windows.sh: now some processes are automatically done. * src/gtk/init.c: added (renamed from main.c). * src/gtk/init.h: added (renamed from main.h). * configure.ac: add "LIBNGRAPH_VERSION" and "AC_CANONICAL_HOST", check OS type. * acinclude.m4: remove macro. * Makefile.am (libtool): added. * test/: now "del system" is not necessary to end interpreter. 2013-11-20 Ito Hiroyuki * plugins/libruby.def: moved from "mingw/" * plugins/libruby_resource.rc: added * src/ngraph_resource.rc: moved from "mingw/windows_resource.rc". * src/libngraph_resource.rc: added. 2013-11-15 Ito Hiroyuki * mingw/windows.sh (DEFS): define "_USE_32BIT_TIME_T". * src/gtk/x11gui.c (fsok): use "GStatBuf" instead of "struct stat". * src/omerge.c (mergetime, mergedate): use "GStatBuf" instead of "struct stat". (mergestore, mergestoredum): use default date and time if the date and time are not available. * src/shellux.c (testexpand): use "GStatBuf" instead of "struct stat". * src/ofile.c (f2dtime, f2ddate, get_mtime): use "GStatBuf" instead of "struct stat". (f2dstat, f2dstat2): use "g_strdup_printf()" instead of "snprintf()". (f2dstore, f2dstoredum): use default date and time if the date and time are not available. * src/nconfig.c (openconfig, writecheckconfig, copyconfig): use "GStatBuf" instead of "struct stat". * src/ioutil.c (getfilename, findfilename): type of all parameters are "cost char *". (findfilename): use "GStatBuf" instead of "struct stat". (nstat): type of the second parameter is "GStatBuf *". * acinclude.m4: save "CFLAGS". 2013-11-11 Ito Hiroyuki * src/otext.c (text): add field "hsb". * src/orect.c (rect): add fields "fill_hsb" and "stroke_hsb". * src/opath.c (arrow): add fields "fill_hsb" and "stroke_hsb". * src/omark.c (mark): add fields "hsb" and "hsb2". * src/ofile.c (file2d): add fields "hsb" and "hsb2". * src/odraw.c (put_hsb_color, put_fill_hsb, put_stroke_hsb) (put_hsb, put_hsb2): added. * src/oaxis.c (put_gauge_hsb, put_num_hsb): added. (axis): add fields "gauge_hsb", "num_hsb" and "hsb". * src/oarc.c (arc): add fields "fill_hsb" and "stroke_hsb". * src/oagrid.c (agrid): add field "hsb". * src/math/math_basic_function.c (math_func_fmod): added. 2013-11-10 Ito Hiroyuki * src/gtk/x11axis.c (gauge_tab_create): use "gtk_entry_set_width_chars()". * src/gtk/gtk_widget.c (create_direction_entry) (create_text_entry, _create_spin_entry):use "gtk_entry_set_width_chars()". * src/gtk/x11lgnd.c (style_setup): use "combo_box_entry_set_width()". * src/gtk/x11file.c (FitSaveDialogSetup, plot_tab_create) (FileDialogSetupCommon): use "combo_box_entry_set_width()". * src/gtk/x11axis.c (scale_tab_create, position_tab_create): use "combo_box_entry_set_width()". * src/gtk/gtk_combo.c (combo_box_entry_set_width): added. 2013-11-06 Ito Hiroyuki * src/oplugin.c (ngraph_get_obj_field_type): type of the returned value is "enum ngraph_object_field_type". (ngraph_putobj): free allocated string when the returned value of the function "putobj()" is negative. * src/ngraph.h (ngraph_object_field_type): added. 2013-11-05 Ito Hiroyuki * src/gtk/ogra2x11.c (gtkclose): always returns "TRUE". 2013-11-02 Ito Hiroyuki * src/oplugin.c (get_plugin_name, get_plugin_from_name): added. (load_plugin, plugin_open): use "get_plugin_name()". (get_plugin, plugin_open): use "get_plugin_from_name()". 2013-11-01 Ito Hiroyuki * src/math/math_basic_function.c (math_func_dif): returned value is 0 if the type of saved value is not "MATH_VALUE_NORMAL". 2013-10-30 Hiroyuki Ito * plugins/ruby.c (ngraph_plugin_open_ruby): set default encodings and require some libraries. * plugins/create_objs.rb (NgraphObj#create_str_func_with_args) (NgraphObj#create_str_func_with_argv) (NgraphObj#add_str_array_func): use "tainted_utf8_str_new()". * plugins/ruby.c (tainted_utf8_str_new): added. (inst_get_str, inst_get_sarray, obj_func_obj, get_str_func_argv): use "tainted_utf8_str_new()". 2013-10-29 Hiroyuki Ito * configure.ac: use "AC_SEARCH_LIBS" instead of "AC_CHECK_LIB" to find math functions in "AC_CHECK_FUNCS". 2013-10-28 Hiroyuki Ito * configure.ac: check linker option. * acinclude.m4: added. 2013-10-27 Hiroyuki Ito * plugins/create_objs.rb (NgraphObj#create_str_func_with_argv): use "create_val_func_with_argv()". 2013-10-26 Ito Hiroyuki * src/oplugin.c (Plugin): remove field "_local" and add field "lock". * src/Makefile.am (ngraph_LDFLAGS): added. * src/ngraph_export.map: added. 2013-10-25 Ito Hiroyuki * src/gtk/ogra2emf.c (check_fonts): use "EnumFontFamiliesEx()" instead of "EnumFontFamiliesExW()" befcase the program is crashed when call "EnumFontFamiliesExW()" on Windows8 64bit. * mingw/windows.sh: create ruby plugin. * mingw/libruby.def: added. 2013-10-23 Ito Hiroyuki * src/Makefile.am (noinst_LTLIBRARIES): use convenience library. * plugins/ruby.c (ngraph_plugin_exec_ruby): check "argc". 2013-10-21 Ito Hiroyuki * mingw/windows_make.sed: change "$(pkglibdir)". * configure.ac: add "AC_LIBTOOL_WIN32_DLL". 2013-10-19 Hiroyuki Ito * plugins/ruby.c (ngraph_plugin_exec_ruby): check error string. 2013-10-19 Ito Hiroyuki * plugins/ruby.c (get_array_arg): added. (allocate_iarray, allocate_darray, allocate_sarray): use "get_array_arg()". 2013-10-16 Ito Hiroyuki * src/oplugin.c (load_plugin): check interrupt function. (plugin_done): call interrupt function when the plugin is locked. * plugins/ruby.c (obj_get_from_str, obj_del_from_str): use "rb_sprintf()". (ngraph_plugin_exec_ruby): show detail information aobut the error. (ngraph_plugin_interrupt_ruby): added. * src/gtk/ogra2x11.c (gra2gtk): argument of the "fullscreen" field is boolean. 2013-10-15 Ito Hiroyuki * src/ngraph_plugin.h: renamed to "ngraph.h". * src/ngraph.h: definitions are moved to "common.h". * plugins/ruby.c (obj_del_from_str): added. 2013-10-11 Ito Hiroyuki * src/oplugin.c (ngraph_plugin_copy): added. * plugins/ruby.c (ngraph_inst_method_copy, obj_copy): added. (ngraph_plugin_open_ruby): call "ruby_sysinit()" and "rb_enc_find_index()". 2013-10-10 Ito Hiroyuki * src/oplugin.c (allocate_iarray, allocate_darray) (allocate_sarray): check if the "arg" is NULL or not. (ngraph_plugin_get_instances_by_str, ngraph_plugin_sleep) (ngraph_plugin_get_obj_root): added. (ngraph_plugin_get_inst): removed. * test/sarray_test.nsc: add test for "put" and "ins" fields. * addin/timer.nsc: fix name of text object and field name of color of rectanble object. * addin/text-in.nsc: fix horizontal alignment. * addin/fig2gra.rb (Fig2Gra): added. * src/shellux.c (cmsleep): use "nsleep()". * src/shell.c (nsleep, cmsleeptimeout, SleepThread): added. * src/object.c (arrayadd, arrayins, arrayput): type of the second parameter is "const void *". (arrayadd2, arrayins2, arrayput2): type of the second parameter is "const char *". 2013-10-06 Ito Hiroyuki * src/oplugin.c (Plugin): type of the fields "open" and "exec" are NIFUNC. 2013-10-05 Ito Hiroyuki * src/osystem.c (nsystem): add field "plugin_dir". * src/oplugin.c (plugin_file, plugin_name): added. (plugin_open): check multiple loading. * src/gtk/ox11menu.c (menuinit): check "OpenApplication()" first. * src/gtk/main.c (set_dir_defs, main): initialize "PLUGINDIR" settings. * src/gtk/dir_defs.h.in: add "PLUGINDIR" definition. * plugins/ruby.c (ngraph_plugin_close_ruby): 0 (ngraph_plugin_open_ruby): added. (ngraph_plugin_exec_ruby): change name. * plugins/create_objs.rb (NgraphObj): add instants variable "singleton". * pathconv.sh (LIBDIR): add "LIBDIR" definition. 2013-10-04 Ito Hiroyuki * plugins/Makefile.am (ngraphplugindir): change install directory. * initfile/Ngraph.nsc: check "${NGRAPHCONF}/init.d". * initfile/10append_addins.nsc: mobed from "Ngraph.nsc". 2013-09-25 Hiroyuki Ito * src/gtk/ox11dlg.c: include "mathfn.h". 2013-09-24 Hiroyuki Ito * src/gtk/ox11menu.c (mx_show_lib_version): the first argument of the field means indent width. 2013-09-20 Hiroyuki Ito * plugins/Makefile.am: check develop environment of Ruby. * initfile/save_ui_file.nsc: use "get" commend to get informations. * initfile/Ngraph.nsc (NULL_DEVICE): use "get" commend to show version of the libraries. * configure.ac: call LT_INIT, check develop environment of Ruby. * src/plugins.c (plugin_shell_exec): check security. (ngraph_plugin_shell_err_puts, ngraph_plugin_shell_puts) (ngraph_plugin_shell_get_inst): added. * src/otext.c (test): type of argument of the field "save_config" is "void". * src/osystem.c (nsystem): type of argument of the field "temp_file" is "void". * src/ostring.c (ostring): type of argument of some fields are "void". * src/osarray.c (osarray): type of argument of some fields are "void". * src/oregexp.c (oregexp): type of argument of some fields are "void". * src/oprm.c (prm): type of argument of the field "load" is "void". * src/omerge.c (merge): type of argument of some fields are "void". * src/omath.c (math): type of argument of the field "clear" is "void". * src/oiarray.c (oiarray): type of argument of some fields are "void". * src/ofile.c (file2d): type of argument of some fields are "void". * src/odarray.c (odarray): type of argument of some fields are "void". * src/oaxis.c (draw_numbering, numbering): type of the last parameter is "struct narray *". (draw_numbering): use "g_strdup_printf()" when the parameter "array" is not NULL. (axis_get_numbering): type of field is "NSAFUNC". (axis): type of the argument of fields "scale_push", "scale_pop", "clear", "adjust", "tight", "group_manager" and "get_numbering" are "void". * src/oagrid.c (agrid): type of "tight" field is "void (void)". * src/gtk/x11menu.c (get_ui_definition): name is changed from "show_ui_definition()". * src/gtk/x11gui.c (DialogInput, DialogRadio, DialogCombo) (DialogComboEntry, DialogSpinEntry, DialogCheck): chang order of buttons. * src/gtk/ox11menu.c (mx_get_ui, mx_get_accel_map) (mx_show_lib_version, mx_get_locale): type of the fields is changed from "NVFUNC" to "NSFUNC". (mx_get_active): added. (gtkmenu): add "active" field, change type of some fields from "NVFUNC" to "NSFUNC". 2013-09-18 Hiroyuki Ito * src/gtk/ox11dlg.c (dlgspin): fix case for "double_entry". (dialog): type of "double_entry" and "integer_entry" is "NDFUNC" and "NIFUNC" respectively. 2013-09-16 Hiroyuki Ito * src/plugins.c (ngraph_plugin_shell_exeobj): check type of the field. * src/shellcm.c (dispfield): the macro "NLABEL" is not used. * src/object.c (addobject, _putobj, putobj, _getobj, getobj) (copyobj): the macro "NLABEL" is not used. * src/object.h: macro for field type and permission definitions are moved to the file "ngraph_plugin_shell.h". 2013-09-14 Hiroyuki Ito * plugins/: added. * src/shellcm.c (dispfield): fix representation of "char*" and "void*". 2013-08-28 Ito Hiroyuki * src/ofile.c (f2dstore, f2dstoredum): bug fix: use "g_strdup_printf()" instead of "g_malloc()" and "sprintf()". * src/omerge.c (mergestore, mergestoredum): bug fix: use "g_strdup_printf()" instead of "g_malloc()" and "sprintf()". 2013-07-26 Hiroyuki Ito * src/object.c (chkobjarglist): type of the returned value "const char *". (getargument, freeargument): type of second parameter is "const char *". 2013-07-25 Ito Hiroyuki * src/plugins.h: added (experimental). * src/plugins.c: added (experimental). * src/shell.c (get_security): added. (cmdtable): add "load_plugin" command. 2013-07-24 Ito Hiroyuki * src/gtk/x11merge.c (MergeDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11axis.c (GridDialogSetup, SectionDialogSetup) (CrossDialogSetup, ZoomDialogSetup, AxisDialogSetup): call "gtk_widget_show_all()". * src/gtk/gtk_widget.c (set_widget_visibility_with_label): added. (set_scroll_visibility): use "gtk_widget_set_visible()" instead of "gtk_widget_show()" and "gtk_widget_hide()". * src/gtk/x11print.c (DriverDialogSetup, OutputDataDialogSetup) (OutputImageDialogSetup): call "gtk_widget_show_all()". (OutputImageDialogSetupItem): hide unused widgets and reset window size. * src/gtk/x11lgnd.c (LegendArrowDialogSetup) (LegendRectDialogSetup, LegendArcDialogSetup) (LegendMarkDialogSetup, LegendTextDialogSetup) (LegendTextDefDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11menu.c (toggle_view_cb): use "gtk_widget_set_visible()" instead of "gtk_widget_show()" and "gtk_widget_hide()". (InputYN): use "get_current_window()". * src/gtk/x11graph.c (PageDialogSetup, SwitchDialogSetup) (DirectoryDialogSetup, LoadDialogSetup, PrmDialogSetup) (SaveDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11lgndx.c (LegendGaussDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11dialg.c (SelectDialogSetup, CopyDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11file.c (MathTextDialogSetup, MathDialogSetup) (FitLoadDialogSetup, FitSaveDialogSetup, FitDialogSetup) (MarkDialogSetup, FileDialogSetup, FileDefDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11view.c (EvalDialogSetup): call "gtk_widget_show_all()". * src/gtk/x11opt.c (DefaultDialogSetup, SetScriptDialogSetup) (PrefScriptDialogSetup, SetDriverDialogSetup) (PrefDriverDialogSetup, FontSettingDialogSetup) (PrefFontDialogSetup, MiscDialogSetup, ExViewerDialogSetup) (ViewerDialogSetup): call "gtk_widget_show_all()". (DefaultDialogSetup): use "gtk_widget_set_visible()" instead of "gtk_widget_set_sensitive()". * src/gtk/x11gui.c (DialogExecute): use "gtk_widget_show()" instead of "gtk_widget_show_all()". 2013-07-24 Koichi Akabe * misc/ngraph.desktop (Keywords): added. 2013-07-18 Ito Hiroyuki * src/gra.h (GRA_FILL_MODE): added. * src/gra.c (GRAdrawpoly): type of the 4th parameter is "enum GRA_FILL_MODE". 2013-07-17 Ito Hiroyuki * src/gtk/x11lgnd.c (LegendArrowDialogSetup): use "set_scale_mark()". (points_setup, LegendArrowDialogSetup, LegendRectDialogSetup) (LegendArcDialogSetup): use "set_widget_margin()". (create_color_combo_box, select_type): the field "line_join" can be modified from a combo-box. (create_mark_color_combo_box): call "add_line_style_item_to_cbox()". * src/gtk/x11lgndx.c (LegendGaussDialogSetup): use "set_scale_mark()". * src/gtk/gtk_widget.h (WIDGET_MARGIN): added. * src/gtk/gtk_widget.c (set_widget_margin, set_scale_mark): added. * src/gtk/gtk_subwin.c (spin_button_size_allocated): use variable "new_allocation". * src/gtk/x11file.c (move_tab_create, mask_tab_create) (load_tab_create, math_tab_create): use "set_widget_margin()". (create_type_color_combo_box, select_type): the field "line_join" can be modified from the combo-box. * src/gtk/x11axis.c (scale_tab_create, baseline_tab_create) (gauge_tab_create, numbering_tab_create, font_tab_create) (position_tab_create): use "set_widget_margin()". * src/gra.h (GRA_LINE_JOIN, GRA_LINE_CAP): added. * src/gra.c (GRAlinestyle): type of 5th and 6th parameters are "enum GRA_LINE_CAP" and "enum GRA_LINE_JOIN" respectively. 2013-07-13 Hiroyuki Ito * src/gtk/x11lgnd.c (create_character_view): don't set the number of columns when the version of GTK+ is greater or equal to "3.8.0". (create_character_view): call "gtk_icon_view_set_activate_on_single_click()" when the version of GTK+ is greater or equal to "3.8.0". 2013-07-12 Ito Hiroyuki * src/gtk/x11file.c (create_user_fit_frame): use "gtk_container_add()" instead of "gtk_scrolled_window_add_with_viewport()" when the version of GTK+ is greater or equal to "3.8.0". * src/gtk/ogra2x11.c (gtkinit): use "gtk_container_add()" instead of "gtk_scrolled_window_add_with_viewport()" when the version of GTK+ is greater or equal to "3.8.0". * src/gtk/gtk_subwin.c (label_sub_window_create): use "gtk_container_add()" instead of "gtk_scrolled_window_add_with_viewport()" when the version of GTK+ is greater or equal to "3.8.0". * src/gtk/gtk_ruler.c (nruler_get_color): use "TopLevel" to get the default color. 2013-07-05 Hiroyuki Ito * src/gtk/x11menu.c (application): check the state of "ViewToggleSingleWindowModeAction". * src/gtk/main.c (main): the "-i" option with no filename means to execute a console. * src/gtk/gtk_subwin.c (start_editing): the function "spin_button_size_allocated()" is connected to the "size-allocate" signal. (spin_button_size_allocated): added. 2013-06-27 Ito Hiroyuki * src/gtk/x11view.c (PasteObjectsFromClipboard): check "d->Win". (PasteObjectsFromClipboard, ShowCrossGauge, show_zoom_animation) (show_move_animation, mouse_move_scroll, ViewerEvMouseMove) (popup_menu_position, SetHRuler, SetVRuler, create_pix): use "gtk_widget_get_window()". (move_focus_frame, ViewerEvVScroll, ViewerEvHScroll) (ViewerWinUpdate, ChangeDPI, Draw): use "main_window_redraw()". 2013-06-26 Ito Hiroyuki * src/gtk/ogra2cairo.c (gra2cairo_draw_path): check "local->cairo". * src/gtk/x11file.c (draw_type_pixbuf): use "gra2cairo_draw_path()". (CmFileSaveData): use "main_window_redraw()". * src/gtk/x11lgnd.c (draw_color_pixbuf): use "gra2cairo_draw_path()". * src/gtk/ogra2gtkprint.c (gra2gtkprint_done): use "gra2cairo_draw_path()". * src/gtk/ox11menu.c (main_window_redraw): added. (mx_redraw, mxdpi, mxclear): use "gra2cairo_draw_path()". (mxflush): use "gra2cairo_draw_path()". * src/gtk/ogra2x11.c (gtklocal): remove member "win". (redraw_window): added. (gtkclear, gtkflush, gtkredraw): use "redraw_window()". * src/gtk/x11menu.h (Viewer): remove member "gdk_win". * src/gtk/x11menu.c (NSetCursor): check "NgraphApp.Viewer.Win" and use "gtk_widget_get_window()". (script_exec): use "main_window_redraw()". * src/gtk/x11print.c (draw_gra): use "main_window_redraw()". 2013-06-05 Ito Hiroyuki * src/object.h (objlist): type of the member "root" and "root2" should be "N_VALUE *". 2013-06-05 Hiroyuki Ito * src/gtk/ogra2x11.c (gtkwait_action): renamed from "wait_key()". (action_type, button_released, scrolled): added. (gtklocal): use "struct action_type". (gtkinit): add event handler for signals "button-release-event" and "scroll-event". 2013-06-04 Ito Hiroyuki * src/gra.c (GRAcolor): don't change the color when an argument is negative. (GRAdrawtext, GRAtextextent): add "C" and "A" parameter. * src/gtk/ogra2x11.c (gtklocal): add member "blank_cursor". (cursor_moved): added. (gtkinit): initialize "gtklocal->blank_cursor". (gtkinit): the "motion-notify-event" signal is connected to the function "cursor_moved()". (gtkdone): unref "gtklocal->blank_cursor" if necessary. (gtk_wait_key): set mouse cursor invisible. * src/gtk/gtk_common.h (SE_ENTRY_ICON): removed. * configure.in (GTK2_REQUIRED_VERSION, GLIB_REQUIRED_VERSION): changed from "2.14.0" to "2.16.0". 2013-06-02 Hiroyuki Ito * src/ofile.c (f2dredraw): redraw when the variable "dmax" equal to zero. * src/gtk/ogra2x11.c (ev_key_down): save "e->keyval". (ev_key_down): use "gtkclose()" to close the window. (gtk_wait_key): added. (gra2gtk): add "wait_key" field. * src/gtk/x11menu.c (application): call "multi_to_single()" if necessary. * src/omerge.c (mergeredraw): redraw when the variable "dmax" equal to zero. 2013-05-31 Ito Hiroyuki * src/gtk/ox11dlg.c (dlgbutton): set "rval->str". 2013-05-29 Ito Hiroyuki * src/ogra.c (close_gc): added. (oGRAclose): use "close_gc()". (oGRAopen): call "close_gc()" when "GRAinit()" returns non-zero value. (oGRAopen): bug fix: initialize the variable "robj" and check before call the function "GRAopen()". * src/gtk/ogra2cairo.c (addgra2cairo): use "CAIRO_STATUS_LAST_STATUS" to generate error messages. * src/gtk/ox11dlg.c (dlgbutton): added. (dialog): add "button" field. * src/gtk/x11gui.c (DialogButton): added. * src/gtk/x11view.c (Draw, Clear): don't use "Menulocal.GRAinst". * src/gtk/ogra2x11.c (size_allocate, gtkfullscreen, gtk_set_fit) (gtk_set_frame): added. (gtkinit): initialize "fit" and "frame" fields. (gtkinit): the "GtkDrawingArea" is located center of the window. (gtkinit): the function "size_allocate()" is connected to the "size-allocate" signal. (gtkchangedpi): use function "cairo_surface_destroy()" instead of "g_object_unref()". (gtkMakeRuler): check "gtklocal->frame". (gtk_set_dpi): set "fit" field as FALSE. (gra2gtk): add fields "fit", "frame" and "fullscreen". * src/gtk/x11commn.c (OpenGRA): remove redundant call of the function "chkobjinstoid()". (OpenGRA, CheckPage, CloseGRA, ChangeGRA): don't use "Menulocal.GRAinst". (SetPageSettingsToGRA): bug fix: the last argument of the function "_putobj()" is not "&drawable" but "drawable". 2013-05-24 Ito Hiroyuki * doc/html/ja/math.html: update document. * src/math/math_basic_function.c (math_func_for): use variables "start", "stop" and "step". * src/gtk/x11file.c (set_headline_table_header): fix title of the table. 2013-05-20 Ito Hiroyuki * src/math/math_parser.c (create_variable_assign_expression): initialize the variable "bin". * src/math/math_scanner.c (math_scanner_get_token, get_ope): EOEQ is treated as an operator. * src/math/math_operator.h.in: add operators ":=", "==", ">=", "<=", "!=", "-=", "+=", "*=", "/=", "\=" and "^=". EOEQ is treated as an operator. * src/math/math_operator.rb: accept multiple representations for one operator. * src/osarray.c (ERROUTBOUND): added (sarrayerrorlist): add error message for the error "ERROUTBOUND". (sarrayget, sarrayput, sarraysns, sarraydel): show error message for the error "ERROUTBOUND". * src/odarray.c (ERROUTBOUND): added (darrayerrorlist): add error message for the error "ERROUTBOUND". (darrayget, darrayput, darraydns, darraydel): show error message for the error "ERROUTBOUND". * src/oiarray.c (ERROUTBOUND): added. (iarrayerrorlist): add error message for the error "ERROUTBOUND". (iarrayget, iarrayput, iarrayins, iarraydel): show error message for the error "ERROUTBOUND". 2013-05-16 Ito Hiroyuki * src/math/math_expression.c (optimize_div_expression): check if the right hand side of the operator is zero or not. (calc): compare with "0.0" (not "0"). * src/gtk/x11file.c (set_headline_table): remark character is located at the top of a line. 2013-05-09 Ito Hiroyuki * debian/patches/series: remove "01_replace_to_free_fonts.patch". * initfile/Ngraph.ini.in: use "Liberation" fonts as default. * src/gtk/x11view.c (ViewerEvKeyDown): initialize the variable "d" first. 2013-04-13 Ito Hiroyuki * src/ofile.c (get_value_from_str): accepts space character around the value. 2013-04-11 Ito Hiroyuki * src/gtk/x11file.c (check_add_str): use "〓" if the character is not printable. (set_headline_table): use "g_ascii_isprint()" and "g_ascii_isspace()". * src/ofile.c (get_value_from_str): added. (getdataarray): use 'get_value_from_str()'. 2013-04-06 Ito Hiroyuki * src/gtk/x11file.c (decode_ifs_text): accepts ascii character only. (check_add_str): added. (parse_data_line): use "check_add_str()". (set_headline_table): only ascii character can be accepted as mark. 2013-04-05 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvLButtonUp): call "set_focus_sensitivity()". 2013-04-04 Ito Hiroyuki * src/gtk/x11file.c (set_headline_table, create_preview_table) (update_table_visibility): don't use "GtkTreeModelFilter". (set_headline_table_header): check space of the cilumn header. 2013-04-03 Ito Hiroyuki * src/gtk/x11file.c (parse_data_line): remove 6th parameter. (create_preview_table): use "GtkTreeModelFilter". (update_table_visibility): added. * src/ofile.c (getdataarray): set terminator at the end of the column. 2013-03-31 Ito Hiroyuki * src/gtk/x11dialg.h (FileDialog): add member "head_linese." * src/gtk/x11file.c (set_headline_table_header, update_table) (update_table_header): added. (FileDialogSetup): use "set_headline_table_header()". 2013-03-29 Ito Hiroyuki * src/gtk/x11dialg.h (FileDialog): add members "comment_table" and "initialized". * src/gtk/x11file.c (decode_ifs_text, set_headline_table) (create_preview_table): added. (load_tab_set_value): use "decode_ifs_text()". (FileDialogSetupCommon): use "GtkGrid" when the version of GTK+ is greater or equal to "3.0.0". (FileDialogSetup): add table preview. (FileDialogClose, FileDialog): set "d->initialize" as FALSE. 2013-03-15 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvKeyDown): call "set_focus_sensitivity()" when the signal is propagated further. (add_focus_obj, clear_focus_obj): don't call "set_focus_sensitivity()". * src/gtk/gtk_subwin.c (start_editing): the function "UnFocus()" don't have to be called before "menu_lock()". (list_unfocused): removed. * src/gtk/x11menu.c (menu_lock): don't call "set_focus_insensitive()" and "set_focus_sensitivity()". (edit_menu_shown): added. (setupwindow): "edit_menu_shown()" is connected to the "show"signal of the popup menu and edit menu. 2013-03-12 Ito Hiroyuki * src/gtk/x11menu.c (menu_lock): call "set_focus_insensitive()" or "set_focus_sensitivity()". (set_focus_sensitivity_sub): set sensitivity of "EditPasteAction". * src/gtk/gtk_subwin.c (start_editing): call "UnFocus()" before call "menu_lock()". (list_unfocused): call "set_focus_sensitivity()" only when "Menulock" is false. 2013-03-11 Ito Hiroyuki * src/gtk/x11axis.c (type_edited): removed. (CmAxisWindow): the 5th argument of the function "set_combo_cell_renderer_cb()" is "NULL". * src/gtk/x11lgnd.c (select_type): call "gtk_widget_grab_focus()". (edited_line_type, edited_font): removed. (CmLegendWindow): the 5th argument of the function "set_combo_cell_renderer_cb()" is "NULL". * src/gtk/gtk_subwin.c (cancel_editing, enum_cb): call "gtk_widget_grab_focus()". (set_cell_renderer_cb): the 4th argument of the function "g_signal_connect()" for the "editing-canceled" signal is "d" when tha case is "G_TYPE_ENUM". (combo_edited_cb): added. (set_combo_cell_renderer_cb): use "combo_edited_cb()" as the default call-back for the signal "edited". (set_combo_cell_renderer_cb, set_obj_cell_renderer_cb): the 4th argument of the function "g_signal_connect()" for the "editing-canceled" signal is "d" * src/gtk/x11file.c (select_type, edited_axis): call "gtk_widget_grab_focus()". 2013-03-08 Ito Hiroyuki * src/gtk/x11file.c (MARK_PIX_LINE_WIDTH, set_line_style) (CURVE_POINTS_MAX, draw_curve): added. (draw_type_pixbuf): use "MARK_PIX_LINE_WIDTH", "set_line_style()", "CURVE_POINTS_MAX" and "draw_curve()". (draw_type_pixbuf): update image. (select_type): check if the graph is modified or not after call the function "chk_sputobjfield()". 2013-03-06 Ito Hiroyuki * src/gtk/x11file.c (select_type): add "break" statement for the case "FILE_COMBO_ITEM_LINESTYLE:". * src/gtk/x11commn.c (FitClear): fix indent. 2013-03-04 Ito Hiroyuki * src/gtk/x11file.c (select_type): add case for "FILE_COMBO_ITEM_CLIP". (create_type_color_combo_box): add "clip" combo-item. 2013-03-02 Ito Hiroyuki * src/gtk/gtk_widget.c (select_obj_color): change type of the return value. * src/gtk/x11lgnd.c (select_type): check returned value of the function "select_obj_color()" * src/gtk/x11axis.c (AxisCB): initialize the variable "s". (AxisHistoryCB): use "AxisCB()". * src/gtk/ox11menu.c (menuinit): fix initial value of "Menulocal.side_pane1_pos" and "Menulocal.side_pane2_pos". 2013-03-01 Ito Hiroyuki * src/gtk/x11axis.c (select_type): use "OBJECT_COLUMN_TYPE_ENUM". * src/gtk/x11file.c (select_type): use "OBJECT_COLUMN_TYPE_ENUM". * src/gtk/x11lgnd.c (select_type, select_line_type): use "OBJECT_COLUMN_TYPE_ENUM". * src/gtk/gtk_liststore.c (add_text_combo_item_to_cbox): use "TOGGLE_TYPE". add parameter "enum_id". (add_enum_combo_item_to_cbox, add_bool_combo_item_to_cbox) (add_line_style_item_to_cbox, add_font_style_combo_item_to_cbox): use "add_text_combo_item_to_cbox()". * src/gtk/gtk_liststore.h (TOGGLE_TYPE): added. (OBJECT_COLUMN_TYPE): add "OBJECT_COLUMN_TYPE_ENUM". 2013-02-28 Ito Hiroyuki * src/gtk/x11lgnd.c (points_setup): check the version of GTK+ to avoid the bug (Bug 691592). * src/gtk/gtk_liststore.c (create_column): check the version of GTK+ to avoid the bug (Bug 691592). 2013-02-26 Ito Hiroyuki * src/shellcm.c (cmget): check returned value via 3rd argument of the function "sgetobjfield()". * src/gtk/gtk_liststore.c (add_line_style_item_to_cbox): don't duplicate returned value via 3rd argument of the function "sgetobjfield()". * src/gtk/x11axis.c (Popup_list): remove "Show" item from the pop-up menu. (popup_show_cb): remove case for "POPUP_ITEM_HIDE". (AxisCB, AxisHistoryCB, GridDialogSetupItem) (scale_tab_setup_item, position_tab_setup_item) (axis_list_set_val): check returned value via 3rd argument of the function "sgetobjfield()". * src/gtk/x11merge.c (Popup_list): remove "Show" item from the pop-up menu. (popup_show_cb): remove case for "POPUP_ITEM_HIDE". * src/gtk/x11lgnd.c (Popup_list): remove "Show" item from the pop-up menu. (legend_dialog_setup_item, path_list_set_val): check returned value via 3rd argument of the function "sgetobjfield()". (popup_show_cb): remove case for "POPUP_ITEM_HIDE". * src/gtk/x11file.c (Flist): remove "Show" and "Fit" items from the pop-up menu. (FitCB, load_tab_setup_item, file_setup_item) (FileDialogSetupItem, get_axis_obj_str): check returned value via 3rd argument of the function "sgetobjfield()". (FileDialogSetupItem): remove 4th parameter. (show_fit_dialog): added. (FileDialogFit): use "show_fit_dialog()". (file_fit_popup_func): removed. (popup_show_cb): remove cases for "POPUP_ITEM_HIDE" and "POPUP_ITEM_FIT". (start_editing): don't show radio buttom on the combo-box. (add_fit_combo_item_to_cbox): added. (create_type_color_combo_box): use "add_fit_combo_item_to_cbox()". (select_type): show fitting dialog when the plot type fit is selected and the fit field of the file instance is not set. (select_type): add case for "FILE_COMBO_ITEM_FIT". * src/gtk/gtk_subwin.c (start_editing): check returned value via 3rd argument of the function "sgetobjfield()". 2013-02-24 Ito Hiroyuki * src/gtk/gtk_widget.c (combo_box_create_mark): removed. (select_obj_color): handle case for "OBJ_FIELD_COLOR_TYPE_AXIS_BASE", "OBJ_FIELD_COLOR_TYPE_AXIS_GAUGE" and "OBJ_FIELD_COLOR_TYPE_AXIS_NUM". * src/gtk/x11lgnd.c (text_list_set_val): set color of the text column. (create_mark_color_combo_box): use "add_text_combo_item_to_cbox()" and "add_mark_combo_item_to_cbox()". (create_fill_rule_combo_box): removed. (create_color_combo_box): use "add_bool_combo_item_to_cbox()", "add_line_style_item_to_cbox()", "add_text_combo_item_to_cbox()" and "add_enum_combo_item_to_cbox()". (select_type): dant handle the case "LEGEND_COMBO_ITEM_COLOR_0". (select_line_type): now the ComboBox use "GtkTreeStore". (start_editing_line_type): use "init_object_combo_box()". (select_font): added. (start_editing_font): use "init_object_combo_box()". (edited_font): only call "menu_lock()". (CmLegendWindow): set "foreground" column. * src/gtk/gtk_liststore.c (combo_box_separator_func) (init_object_combo_box, create_object_tree_model) (add_separator_combo_item_to_cbox, add_font_combo_item_to_cbox) (add_font_style_combo_item_to_cbox, add_text_combo_item_to_cbox) (add_mark_combo_item_to_cbox, add_enum_combo_item_to_cbox) (add_bool_combo_item_to_cbox, add_line_style_item_to_cbox): added. (create_object_cbox): use "create_object_tree_model()". (create_column): use "create_object_tree_model()" for the case "G_TYPE_PARAM". * src/gtk/x11dialg.c (SetFontListFromObj): type of the lase parameter is "const char *". * src/gtk/x11file.c (create_type_color_combo_box): use "create_type_combo_item()" and "add_text_combo_item_to_cbox()". (create_type_combo_item): use "add_text_combo_item_to_cbox()". (create_type_combo_item): added. (create_type_combo_box): removed. (select_axis): use "gtk_tree_model_get()" to get active item. (start_editing): use "init_object_combo_box()" and "add_text_combo_item_to_cbox()". * src/gtk/x11axis.c (AXIS_COMBO_ITEM, create_base_combo_item) (create_gauge_combo_item, create_num_combo_item) (create_type_combo_box, select_type, start_editing_type) (type_edited): added. (CmAxisWindow): call "set_combo_cell_renderer_cb()". 2013-02-21 Ito Hiroyuki * src/gtk/x11view.c (ViewerWinClose): assign NULL to freed member. * src/gtk/gtk_liststore.c (create_object_cbox): use "OBJECT_COLUMN_TYPE_NUM" for the function "gtk_tree_store_new()". (add_line_style_item_to_cbox): add 3rd, 5th, 6rh and 7th parameters. * src/gtk/gtk_liststore.h (OBJECT_COLUMN_TYPE): add "OBJECT_COLUMN_TYPE_TOGGLE_IS_RADIO" and "OBJECT_COLUMN_TYPE_NUM". * src/gtk/x11file.c (FileDialogType): set sensitivity of the widgets to set "line style" and "line width". (create_type_color_combo_box): add 4th parameter. (create_type_combo_box): add 3rd parameter. * src/gtk/gtk_widget.c (combo_box_create_mark): add 4th parameter. * src/gtk/x11lgnd.c (LEGEND_COMBO_ITEM): add "LEGEND_COMBO_ITEM_FILL_EVEN_ODD" and "LEGEND_COMBO_ITEM_FILL_WINDING". (create_mark_color_combo_box): add 3rd parameter. (create_fill_rule_combo_box): added. (create_color_combo_box): some menus are placed as a child menu. (set_bool_field, set_stroke, set_fill): added. (select_type): use "set_stroke()" and "set_fill()". set "fill_rule" field. 2013-02-20 Ito Hiroyuki * src/gtk/x11file.c (create_type_color_combo_box): use "add_line_style_item_to_cbox()". (select_type): add case for "FILE_COMBO_ITEM_LINESTYLE". * src/gtk/gtk_liststore.c (add_line_style_item_to_cbox): added. * src/gtk/x11lgnd.c (select_color, select_line_style): removed. (create_mark_color_combo_box, create_color_combo_box): use "add_line_style_item_to_cbox()". (select_type): handle all legend objects. (start_editing_color): use "select_type()" as a callback function. * addin/fitrslt.c (set_parameter): use "file::fit_prm". (ACCURACY): defined as 7 2013-02-19 Ito Hiroyuki * src/gtk/x11lgnd.c (add_line_style_item): added. (create_mark_color_combo_box, create_color_combo_box): use "add_line_style_item()". (select_line_style): added. (select_type, select_color): use "select_line_style()". * mingw/windows.sh: create "$PKG_DIR/lib". * mingw/gtkrc (msw-combobox-thickness): set "GtkComboBox::appears-as-list" as 0. 2013-02-18 Ito Hiroyuki * addin/ps2gra.nsc: use "get" command to obtain returned value of "dialog::yesno". * src/ofit.c (fitput, fitcalc): use "ofile_create_math_equation()". * src/ofile.c (file_fit_calc, file_fit_prm): don't use "math_equation_get_user_data()". (FitFunc, add_fit_func): added. (ofile_create_math_equation): add 7th parameter "use_fit_func". (ofile_create_math_equation): 2nd parameter represents the digit of prm. (ofile_calc_fit_equation): added. 2013-02-12 Ito Hiroyuki * src/ofit.c (fitlocal): add member "result_code". (fitinit): initialize "fitlocal->result_code". (fitdone): free "fitlocal->result_code". (set_equation, fitequation): added. (fitput, fitfit): use "set_equation()". (fitfit): check case "FitError_Interrupt". (fitcalc): use "fitlocal->result_code". (fitcalc): returned value is not string but double. * src/ofile.c (MATH_CONST_MASK): add "MATH_CONST_FILE_OBJ", "MATH_CONST_PATH_OBJ", MATH_CONST_RECT_OBJ, "MATH_CONST_ARC_OBJ", "MATH_CONST_MARK_OBJ" and "MATH_CONST_TEXT_OBJ". (FIT_FIELD_PREFIX, file_obj_color_alpha, file_objcolor) (file_objalpha): added. (file_color): now first argument of the "COLOR()" function accepts "8" and "9". (file_fit_calc, file_fit_prm): added. (file_func): add functions "FIT_CALC", "FIT_PRM", "OBJ_COLOR" and "OBJ_ALPHA". (ofile_create_math_equation): add constants "FILE_OBJ", "PATH_OBJ", "RECT_OBJ", "ARC_OBJ", "MARK_OBJ" and "TEXT_OBJ". (set_const): initialize constants "FILE_OBJ", "PATH_OBJ", "RECT_OBJ", "ARC_OBJ", "MARK_OBJ" and "TEXT_OBJ". (newton): don't check the number of the iteration is 1 or not ("i = 1"). (solve_equation): add prefix to the fields. (solve_equation): the error message is not set to the returned string. (calc_fit_equation): added. (calc_equation): use "calc_fit_equation()". (calc_equation): the error message is not set to the returned string. (get_fit_parameter): added. (file2d): add fields "fit_prm". change name of the fields "newton", "bisection" and "calc". * src/gtk/x11file.c (MathDialogSetup): initialize "d->Mode" whine "makewidget" is true (MathDialog): don't modify "data->Mode". * src/gtk/x11view.c (Draw): call "FitClear()" after call "FileAutoScale()". * src/object.c (addobject): object id is start from 1. 2013-01-24 Ito Hiroyuki * initfile/NgraphUI.xml.win: add "Sidebar" menu. * initfile/NgraphUI.xml: add "Sidebar" menu. * src/gtk/ox11menu.h (menulocal): add member "sidebar". * src/gtk/x11menu.h (MenuID): add id "MenuIdToggleSidebar". * src/gtk/x11menu.c (ActionEntry): add "ViewSidebarAction". (ActionEntry): change shortcut key of "cross bar" menu from "+" to "^g", (set_window_action_visibility): set visibility of "ViewSidebarAction". (multi_to_single): check "Menulocal.sidebar".0 (toggle_view_cb): handle "MenuIdToggleSidebar". (application): hide only "NgraphApp.Viewer.side_pane1". * src/gtk/ox11menu.c (MenuConfigToggleView): add sidebar setting. (menuinit): initialize "Menulocal.sidebar". 2013-01-23 Ito Hiroyuki * src/gtk/x11file.c (FileWinFit): use "list_store_get_selected_int()". (filewin_ev_key_down): check "GDK_CONTROL_MASK" for the case "GDK_KEY_f". 2013-01-22 Ito Hiroyuki * src/gtk/gtk_subwin.c (copy, delete, move_top, move_last) (move_up, move_down, hidden): call "UnFocus()". (list_focused, list_unfocused): added. (list_widget_create): use "focus-in-event" and "focus-in-event" to improve behavior of single window mode. * src/gtk/x11file.c (FitDialogSetup): add delete button to the dialog. (filewin_ev_key_down): call "UnFocus()". * src/gtk/x11view.c (ShowFocusFrame): don't call "set_focus_sensitivity()". (ViewerEvKeyDown): "DGK_KEY_Insert" is not handled. (Focus): don't call "gtk_widget_grab_focus()". (CmEditMenuCB): add case "MenuIdEditDuplicate". * src/gtk/x11axis.c (axiswin_delete_axis): call "UnFocus()". * src/gtk/x11menu.c (set_action_sensitivity) (set_focus_sensitivity_sub, set_focus_insensitive): added. (set_focus_sensitivity): use "set_focus_sensitivity_sub()". * initfile/NgraphUI.xml.win: add "EditDuplicate" item. * initfile/NgraphUI.xml: add "EditDuplicate" item. 2013-01-18 Ito Hiroyuki * src/gtk/gtk_subwin.c (swin_realized): type of the "user_data" is "struct obj_list_data *". (list_widget_create): "realize" signal is connected to the function "swin_realized()". (sub_window_create): don't call "g_signal_connect()" to the variable "swin". (tree_sub_window_create): remove redundant cast to "struct SubWin *". 2013-01-14 Ito Hiroyuki * src/gtk/gtk_liststore.c (create_column): don't use GtkCellRendererSpin while the GTK+ bug is not fixed. * src/gtk/x11lgnd.c (points_setup): don't use GtkCellRendererSpin while the GTK+ bug is not fixed. 2013-01-11 Ito Hiroyuki * src/gtk/x11view.c (ZOOM_SPEED_LITTLE, ZOOM_SPEED_NORMAL) (mouse_down_zoom_little, mouse_down_zoom2): added. (ViewerEvScroll): use "mouse_down_zoom_little()". * src/gtk/ogra2emf.c (enum_font_cb): check argument "FontType" and return with 0 if necessary. 2013-01-09 Ito Hiroyuki * src/gtk/x11view.c (PasteObjectsFromClipboard): check source device. 2013-01-08 Ito Hiroyuki * addin/legend.c (loaddatalist): check "hidden" field of data instances. 2013-01-07 Ito Hiroyuki * addin/legend.c (create_file_frame): not set hight of tree view but scrolled window. (create_file_frame): sensitivity of columns are depend on the state of the top column. (create_control): setting frames are expandable. * addin/fitrslt.c (create_spin_button): set margin of spin button widget. (create_control): setting frames are expandable. * addin/addin_common.c (create_font_frame): table widget is expandable * src/gtk/gtk_subwin.c (list_widget_create): sensitivity of columns are depend of the state of top column. * src/gtk/gtk_liststore.c (create_column): expand some editable columns. * src/gtk/x11lgnd.c (CmLegendWindow): don't expand some columns. 2013-01-04 Ito Hiroyuki * addin/fitrslt.c (get_opt): check "argv[i]". * addin/legend.c (get_opt): check "argv[i]". 2013-01-01 Ito Hiroyuki * addin/fitrslt.c (savescript, caption_toggled, set_parameter): use GtkTreeModel. (text_edited, caption_edited, value_edited): added. (create_caption_frame): use GtkTreeView widgret. (VERSION): 1.00.02 2012-12-28 Ito Hiroyuki * src/gtk/x11menu.c (application): call "CheckIniFile()" before save configurations. 2012-12-27 Ito Hiroyuki * src/gtk/ox11menu.c (mx_show_win, mx_hide_win, mx_toggle_win): check "Menulocal.single_window_mode". 2012-12-21 Ito Hiroyuki * src/gtk/gtk_subwin.c (tree_sub_window_create): call "gtk_notebook_popup_enable()". (tree_sub_window_create): set text label of the popup menu. 2012-12-20 Ito Hiroyuki * src/gtk/x11lgnd.c (CmLegendWindow): use icon file macros. (CmLegendWindow): add data for the key "ngraph_object_data" to widgets of inside of tabs. * src/gtk/x11menu.c (ActionEntry, window_to_tab, multi_to_single): use icon file macros. (window_to_tab): add parameter "tip". (tab_info_compare, init_tab_info, save_tab_position_sub) (save_tab_position): added. (multi_to_single): restore tab positions. (single_to_multi): call function "save_tab_position()". (single_to_multi): enable popup of tabs. (create_action_group): use icon file macros. (application): call function "save_tab_position()". * src/gtk/ox11menu.h (menulocal): add member related to tabs used in the single window mode. * src/gtk/ox11menu.c (MenuConfigOthers): add settings related to tabs used in the single window mode. (menuinit): initialize settings related to tabs used in the single window mode. * src/gtk/gtk_subwin.c (file_select, update): parent window is depend on the setting "Menulocal.single_window_mode". (swin_realized): added. (sub_window_create): connect "realize" signal to the function "swin_realized()". (sub_window_set_visibility): don't update content in this function. * src/gtk/x11file.c (FileWinFileUpdate, FileWinFit): parent window is depend on the setting "Menulocal.single_window_mode". * src/gtk/x11bitmp.h: add macros for icon files. * src/ioutil.h (DIRSEP_STR): added. 2012-12-18 Ito Hiroyuki * src/gtk/gtk_ruler.c (nruler_destroy): destroy or unref "ruler->backing_store". 2012-12-17 Ito Hiroyuki * src/gtk/x11view.c (popup_menu_position): use the function "gdk_window_get_origin()" to get the position. (ViewerWinSetup): the function "ev_popup_menu()" is connect to the signal "popup-menu". (ev_popup_menu): added. * src/gtk/gtk_subwin.c (popup_menu_position): use the function "gdk_window_get_origin()" to get the position. (do_popup): data for the positon function is "d->text". 2012-12-16 Ito Hiroyuki * src/gtk/x11file.c (init_dnd): destination of DnD is listsore widget. * src/gtk/x11merge.c (init_dnd): destination of DnD is listsore widget. * src/gtk/x11cood.c (CoordWinSetCoord): the variable "str" should be initialized as "NULL". (CoordWinSetCoord): don't check visibility of the widget "d->Win". (CoordWinSetCoord): show date and time in new line. * src/gtk/ox11menu.c (MenuConfigOthers): add pane and single window mode settings. (menuinit): initialize pane and single window mode settings. * src/gtk/x11opt.c (DefaultDialogSetup): set widget sensitivity depend on "Menulocal.single_window_mode". * src/gtk/gtk_subwin.c (sub_window_save_geometry): check "Menulocal.single_window_mode". (sub_window_create, text_sub_window_create) (label_sub_window_create, list_sub_window_create) (tree_sub_window_create): type of the second parameter is "const char *". * src/gtk/x11menu.c (SIDE_PANE_TAB_ID): added. (ActionEntry): add "ViewToggleSingleWindowModeAction". (menu_lock): check "NgraphApp.Viewer.menu", lock "NgraphApp.Viewer.menu" and the first child of the widget "NgraphApp.Viewer.main_pane". (set_window_action_visibility, OBJ_ID_KEY, window_to_tab) (tab_to_window, get_pane_position, set_pane_position) (multi_to_single, check_move_widget, check_move_legend_widget) (single_to_multi): added. (setupwindow): add paned widget for the single window mode. (create_sub_windows): check "Menulocal.single_window_mode". (set_toggle_action): added. (window_action_set_active): use the function "set_toggle_action()". (application): call "gtk_window_set_has_resize_grip()". (application): check "Menulocal.single_window_mode". (CmToggleSingleWindowMode): added. * initfile/NgraphUI.xml: add single window mode menu item. * initfile/NgraphUI.xml.win: add single window mode menu item. 2012-12-11 Ito Hiroyuki * src/gtk/x11menu.c (setupwindow): remove redundant call of the function "gtk_menu_bar_new()". 2012-12-04 Ito Hiroyuki * src/gtk/x11view.c (draw_paper_frame): the origin of the rectangle is 0 is the version of GTK+ is less than "2.22". * src/gtk/gtk_common.h (CAIRO_COORDINATE_OFFSET): always defined as "1". * src/gtk/gtk_ruler.c (_Nruler): add member "widget" and "parent". (nruler_new): change name from "ruler_new". (nruler_new): use "GtkFrame". (nruler_make_pixmap): add argument "parent". (nruler_draw_ticks): don't draw frame. * src/gtk/x11menu.c (setupwindow): use "nruler_new()". 2012-12-03 Ito Hiroyuki * src/gtk/gtk_ruler.c (nruler_get_preferred_width) (nruler_get_preferred_height, nruler_size_request, hruler_new) (vruler_new): removed. 2012-12-01 Ito Hiroyuki * src/gtk/gtk_ruler.c (nruler_set_style, nruler_parent_set): removed. (nruler_get_color): added. (nruler_draw_pos, nruler_draw_ticks): use "nruler_get_color()". * src/gtk/main.c (main): dan't call "gdk_threads_init()" and "gdk_threads_enter()". 2012-11-30 Ito Hiroyuki * src/gtk/gtk_ruler.c (nruler_set_style): added. (nruler_parent_set): connect the function "nruler_set_style" to the signal "changed". (nruler_draw_ticks, nruler_draw_pos): always use the color correspond to "GTK_STATE_NORMAL". * src/gtk/x11file.c (Flist): type of the "masked" column is now "G_TYPE_INT". (file_list_set_val): set style instead of color to distinguish masked or mobed data. (CmFileWindow): "masked" column is correspond to "style" property. 2012-11-29 Ito Hiroyuki * src/gtk/gtk_ruler.c (ruler_new): connect the function "nruler_parent_set()" to the signal "parent-set". (nruler_parent_set): added. * src/gtk/gtk_widget.c (create_text_view_with_line_number): call "gtk_text_buffer_new()". * src/gtk/gtk_subwin.c (text_sub_window_create): call "gtk_text_buffer_new()". 2012-11-10 Ito Hiroyuki * src/ofit.c (show_poly_equation, show_poly_result) (show_user_result, show_user_equation): added. (fitpoly): use "show_poly_equation()" and "show_poly_result()". (fituser): use "show_user_equation()" and "show_user_result()". 2012-11-06 Ito Hiroyuki * src/ofit.c (fitpoly, fituser): use "GString" to show fitting results. 2012-11-04 Ito Hiroyuki * src/ofit.c (fitpoly, fituser): use "GString" to show calclated equation. 2012-11-03 Ito Hiroyuki * src/gtk/x11bitmp.c (ICON_WIDTH, ICON_HEIGHT): removed. * src/gtk/x11commn.c (MESSAGE_BUF_SIZE): removed. * src/gtk/x11opt.c (BUF_SIZE): removed. * src/gtk/x11file.c (CB_BUF_SIZE): removed. * src/gtk/x11axis.c (CB_BUF_SIZE): removed. * src/gtk/x11lgnd.c (CmLegendWindow): use ""struct legend_data legend_data[]". (CB_BUF_SIZE): removed. 2012-11-02 Ito Hiroyuki * src/gtk/x11lgnd.c (CmLegendWindow): add tooltip to icons. 2012-10-31 Ito Hiroyuki * src/ofile.c (getdataarray): 'D' can be used as a prefix for a decimal exponent. Accept hexadecimal number. * src/otext.c (USE_UTF8): removed. (text_set_text): remove code for shift-jis. 2012-10-28 Ito Hiroyuki * src/gtk/gtk_subwin.c (get_cell_renderer_from_tree_view): added. (set_combo_cell_renderer_cb, set_obj_cell_renderer_cb) (set_editable_cell_renderer_cb): use "get_cell_renderer_from_tree_view()". * src/gtk/x11lgnd.c (select_line_type): remove redundant call of the function "g_object_get_data()". (select_text, start_editing_text): added. (CmLegendWindow): connect the function "start_editing_text()" to the signal "editing-started". 2012-10-20 Ito Hiroyuki * doc/html/ja/math.html: add explanation of the functions "eq", "neq", "ge", "gt", "le" and "lt". * test/math_test_new.dat: add tests for the functions "eq", "neq", "ge", "gt", "le" and "lt". * doc/html/ja/math.html: update explanation of the functions "eq", "neq", "ge", "gt", "le" and "lt". * src/math/math_function.rb: fix invarid expression for case statement. * src/math/math_function.h.in: increase number of arguments for the functions "ge", "gt", "le" and "lt". * src/math/math_basic_function.c (math_func_lt, math_func_le) (math_func_ge, math_func_gt): use "compare_double_with_prec()". (compare_double_with_prec): use "long double". * configure.in (AC_CHECK_FUNCS): check functions "log10l", "fabsl" and "floorl". 2012-10-19 Ito Hiroyuki * src/math/math_constant.c: include "config.h". * src/math/math_operator.rb: convert integer to string (for Ruby 1.9). * src/math/math_expression.c: include "config.h". * src/math/math_parser.c: include "config.h". * src/math/math_equation.c: include "config.h". * src/math/math_error.c: include "config.h". * src/math/math_scanner.c: include "config.h". * src/math/math_equation.c: include "config.h". * src/math/math_constant.rb: include "config.h". 2012-10-18 Ito Hiroyuki * test/math_test_new.dat: add tests for the functions "EQ()" and "NEQ()". * src/math/math_basic_function.c (compare_double_with_prec): fix calculation. 2012-10-17 Ito Hiroyuki * initfile/Ngraph.ini.win: change initial size of main-window. * initfile/Ngraph.ini.in: set initial size of sub-windows. 2012-10-16 Ito Hiroyuki * src/gtk/gtk_subwin.c (set_geometry): don't save state. (set_visibility, sub_window_save_visibility) (get_window_visibility): added. (sub_window_save_geometry): check return value of the function "get_window_visibility()". * src/gtk/x11gui.c (get_window_geometry): don't call "gdk_window_get_state()". * src/gtk/ox11menu.c (add_child_geometry_to_array): call "sub_window_save_visibility()". * src/gtk/x11menu.c (destroy_sub_windows): hide window before destroy. 2012-10-09 Ito Hiroyuki * src/gtk/x11graph.c (PageDialogSetup): left and top margin can be nagative. 2012-10-08 Ito Hiroyuki * src/gra.c (GRAinit, GRAreopen): "GRAClist[GC].width" and "GRAClist[GC].height" is as same as paper width. (GRAregion): remove unused parameters. (GRAregion): calculate width and height depend on "GRAClist[GC].topm" and "GRAClist[GC].leftm". 2012-09-21 Ito Hiroyuki * src/gtk/x11lgnd.c (start_editing_common, start_editing_font): call "menu_lock()" if the variable "sel" is negative. (start_editing_mark): the function "start_editing_common()" is failed if the return value is nagative. 2012-09-07 Ito Hiroyuki * src/gtk/x11graph.c (LoadDialogSetup): remove redundant call of the function "gtk_box_pack_start()". 2012-09-04 Ito Hiroyuki * src/gtk/x11opt.c (MiscDialogSetup): use "LoadPathStr". * src/gtk/x11commn.c (LoadNgpFile): use "LOAD_PATH_FULL" and "LOAD_PATH_BASE". * src/gtk/x11graph.h (LOAD_PATH_TYPE): added. * src/gtk/x11graph.c (LoadPathStr): added. (LoadDialogSetup): use "LoadPathStr". 2012-08-24 Ito Hiroyuki * src/gtk/x11view.c (graph_dropped): use "loadpath" instead of "ignorepath". * src/gtk/x11menu.c (application): use "loadpath" instead of "ignorepath". * src/gtk/x11commn.c (LoadNgpFile): use "loadpath" instead of "ignorepath" and "expandtofullpath". * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose): use "loadpath" instead of "ignorepath". * src/gtk/x11graph.c (LoadDialogSetup, LoadDialogClose) (CmGraphLoad, CmGraphHistory): use "load_path" instead of "ignore_path". 2012-08-23 Ito Hiroyuki * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose): add UI for "Menulocal.select_data". * src/gtk/x11view.c (Draw): call "FileWinUpdate()". * src/gtk/x11dialg.h (MiscDialog): add member "select_data". * src/gtk/ox11menu.h (menulocal): add member "select_data". * src/gtk/ox11menu.c (menuinit): initialize "Menulocal.select_data". * src/gtk/x11print.c (CmOutputPrinter, CmOutputDriver) (CmPrintGRAFile, CmOutputImage, CmOutputEMF): call "FileWinUpdate()". (CmOutputDriver, CmPrintGRAFile, CmOutputImage, CmOutputEMF): check "Menulocal.select_data". * src/gtk/x11commn.c (SetFileHidden): call "set_graph_modified()" if necessary. 2012-08-21 Ito Hiroyuki * src/gtk/x11gui.c (get_filename_with_ext): added. (FileSelectionDialog): use "get_filename_with_ext()". 2012-08-16 Ito Hiroyuki * src/gtk/x11cood.c (CmCoordinateWindow): don't call functions "sub_window_show_all()", "sub_window_set_geometry()". * src/gtk/x11file.c (CmFileWindow): don't call functions "sub_window_show_all()", "sub_window_set_geometry()" and "FileWinUpdate()". * src/gtk/x11axis.c (CmAxisWindow): don't call functions "sub_window_show_all()", "sub_window_set_geometry()" and "AxisWinUpdate()". * src/gtk/x11merge.c (CmMergeWindow): don't call functions "sub_window_show_all()", "sub_window_set_geometry()" and "MergeWinUpdate()". * src/gtk/x11lgnd.c (CmLegendWindow): don't call functions "sub_window_show_all()", "sub_window_set_geometry()" and "LegendWinUpdate()". * src/gtk/gtk_subwin.c (sub_window_show_all): static function. (sub_window_set_visibility): realize a window when the window is not realized. * src/gtk/x11menu.c (create_sub_windows): call "CmInformationWindow()", "CmCoordinateWindow()", "CmMergeWindow", "CmLegendWindow()", "CmAxisWindow()" and "CmFileWindow()". * src/gtk/x11info.c (create_win): removed. (InfoWinDrawInfoText, CmInformationWindow): don't use "create_win()". 2012-08-15 Ito Hiroyuki * src/gtk/x11file.c (FileWinFileEdit, FileWinFileDelete) (file_obj_copy, FileWinFileCopy2, FileWinFileUpdate) (FileWinFileDraw, FileWinFit, popup_show_cb): use "chkobjlastinst()". * src/gtk/x11axis.c (axiswin_scale_clear, popup_show_cb) (axis_prm_edited_common, axiswin_delete_axis, AxisWinAxisTop) (AxisWinAxisLast, AxisWinAxisUp, AxisWinAxisDown): use "chkobjlastinst()". * src/gtk/x11merge.c (popup_show_cb): use "chkobjlastinst()". * src/gtk/x11lgnd.c (rect_size_edited): use "chkobjlastinst()". * src/gtk/gtk_subwin.c (file_select, copy, delete, move_top) (move_last, move_up, move_down, update, focus, toggle_boolean) (modify_numeric, modify_string, hidden, set_hidden_state) (list_sub_window_set): use "chkobjlastinst()". * src/gtk/x11menu.h (obj_list_data): remove member "num". 2012-08-14 Ito Hiroyuki * src/terminal.c (sig_handler, my_signal): not used if the os is Windows. 2012-08-13 Ito Hiroyuki * src/gtk/ogra2emf.c (open_emf): call "SaveDC()". (close_emf): call "RestoreDC()". (select_font): "id_font.lfOutPrecision" is "OUT_TT_ONLY_PRECIS". * src/gtk/main.c (interruptconsole, reset_fifo, consolesave) (consolefd): not used if the os is Windows. 2012-08-12 Ito Hiroyuki * src/shell.c (set_shell_args): added. * src/oshell.c (cmdshell): use "set_shell_args()". * src/shellcm.c (cmset): use "set_shell_args()". (cmset): options "--" and "-" work as same as bash. 2012-08-11 Ito Hiroyuki * src/shellcm.c (cmset): "--" means the last argument. 2012-08-10 Ito Hiroyuki * src/gtk/ogra2cairo.c (CompatibleFont): "Mincho" should be corresponded to "Seril" and "Gothic" should be corresponded to "Sans-serif". 2012-08-09 Ito Hiroyuki * src/gtk/ogra2emf.c (gra2emf_local): add members "update_pen_attribute", "update_brush_attribute", "line", "null_pen", "the_pen" and "the_brush". (gra2emf_init): initialize "null_pen" and "line". (gra2emf_done): finalize "null_pen" and "line". (open_emf): initialize "update_pen_attribute", "update_brush_attribute", "null_pen", "the_pen" and "the_brush". (close_emf): finalize "update_pen_attribute", "update_brush_attribute", "null_pen", "the_pen" and "the_brush". (create_pen): create object only when "local->update_pen_attribute" is TRUE. (create_brush): added. (draw_polygon, draw_polyline, draw_lines): added. (gra2emf_output): use "draw_polygon()", "draw_polyline()" and "draw_lines()". * src/gtk/main.c (check_console): remove unused variable "menu". * src/shell.c (cmdexec): remove unused variable "r" (Windows only). * mingw/windows.sh (DEFS, CCOPT): add compile options. * src/gtk/x11menu.c (create_sub_windows): file window, axis window, legend window and merge window must be created in this function. (kill_signal_handler, term_signal_handler): not used when the OS is Windows. 2012-08-08 Ito Hiroyuki * src/gtk/ogra2emf.c (draw_text_rect, draw_rectangle): added. (draw_str_sub): don't call "SetBkMode()". (draw_str_sub): call "draw_text_rect()". (check_font_indices): check return value of the function "GetGlyphIndicesW()". (gra2emf_output): use "SelectClipPath()" instead of "SelectClipRgn()". (gra2emf_output): use "draw_rectangle()". (gra2emf_output): call "SetPolyFillMode()" before drawing path. * initfile/Ngraph.ini.win (font): use "batangche" instead of "gulimche" for "Serif" font. 2012-08-07 Ito Hiroyuki * driver/ngp2.in: remove EMF output. * src/gtk/ogra2emf.c (gra2emf_fontmap, enum_font_cb) (get_char_set, fontmap_append, check_fonts, free_fontmap_sub) (free_fontmap, add_fontmap, check_font_indices, draw_str_sub) (set_alternative_font): added. (gra2emf_init): create dumy hdc. (gra2emf_done): delete dumy hdc and fontmaps. 2012-08-06 Ito Hiroyuki * src/gtk/ogra2cairo.c (gra2cairo_get_fontmap) (gra2cairo_remove_fontmap, gra2cairo_get_compatible_font_info): type of the argument is "const char *". 2012-07-29 Ito Hiroyuki * src/gtk/ogra2cairo.c (add_font_map): added. (create_font_map): use "add_font_map()". 2012-07-28 Ito Hiroyuki * src/gtk/ogra2emf.c (gra2emf_output): call "SetPolyFillMode()" to set fill mode. 2012-07-28 Ito Hiroyuki * initfile/NgraphUI.xml.win: add "GraphExportEMFFileAction" and "GraphExportEMFClipboardAction", remove "GraphExportEMFAction" and "GraphExportClipboardAction". * src/gtk/ogra2emf.c: added. * src/gtk/Makefile.am (libngraph_la_SOURCES): add "ogra2emf.c". * src/gtk/x11print.c (OutputImageDialogSetupItem) (OutputImageDialogSetup, OutputImageDialogClose, CmOutputImage): don't handle "MenuIdOutputEMFFile" and "MenuIdOutputEMFClipboard". (CmOutputEMF): added. * src/gtk/x11menu.h (MenuID): add "MenuIdOutputCairoEMFFile", "MenuIdOutputEMFFile" and "MenuIdOutputEMFClipboard", remove "MenuIdOutputClipboard". * src/gtk/x11menu.c (NgraphActionEntry): change name from "GraphExportEMFAction" to "GraphExportCairoEMFAction", add "GraphExportEMFFileAction" and "GraphExportEMFClipboardAction". * src/gtk/main.c (obj_add_func_ary): add function "addgra2emf". 2012-07-27 Ito Hiroyuki * src/gtk/ogra2cairofile.c (surface_type, open_emf, close_emf) (create_cairo): remove clipboard output. * src/gra.c (GRAreopen): width and height of the paper should be "GRAClist[GC].width+GRAClist[GC].leftm" and "GRAClist[GC].height+GRAClist[GC].topm" respectively. (GRAinit): width and height of the drawing region should be "width-leftm" and "height-topm" respectively. 2012-07-26 Ito Hiroyuki * src/gtk/ox11menu.c (mxflush): call "cairo_surface_flush()". * src/gtk/ogra2cairo.c (gra2cairo_flush): call "cairo_surface_flush()". (gra2cairo_output): fix typo ("tmp2" to "tmp"). 2012-07-23 Ito Hiroyuki * src/gtk/ogra2cairo.c (gra2cairo_get_utf8_str): added. (gra2cairo_output): use "gra2cairo_get_utf8_str()". * src/gtk/ox11menu.c (menuinit): set default dpi of an EMF file as 576. 2012-07-18 Ito Hiroyuki * pathconv.sh (LC_ALL): set as "C" and export. * src/math/math_scanner.c (get_dec): use function "powl()" only if "HAVE_POWL" is defined. * src/gtk/ox11menu.c (graph_modified_sub): don't call "SetCaption()" and "set_modified_state()". (mxmodified): call "set_modified_state()". * configure.in (AC_CHECK_HEADERS): check "readline.h". 2012-07-10 Ito Hiroyuki * src/gtk/ogra2cairofile.c (open_emf): remove parameters "fname" and "clipboard". (close_emf): change second parameter from "clipboard" to "fname". (gra2cairofile_output): check return value of the function "close_emf()". 2012-07-09 Ito Hiroyuki * src/gtk/ox11menu.c (menuinit): set default dpi of an EMF file as 600. * src/gtk/ogra2cairofile.c (create_reference_dc): removed. (open_emf): use display device as referencs DC. use "SetWorldTransform()" to scale image. 2012-07-06 Ito Hiroyuki * src/gtk/x11lgnd.c (path_list_set_val): set columns "PATH_LIST_COL_X", "PATH_LIST_COL_Y" and "PATH_LIST_COL_POINTS" at once. * src/gtk/ogra2cairofile.c (open_emf, close_emf): added. (create_cairo): use "open_emf()". (gra2cairofile_output): use "close_emf()". 2012-07-05 Ito Hiroyuki * src/gtk/ogra2cairofile.h (surface_type_id): add "TYPE_CLIPBOARD". * src/gtk/ogra2cairofile.c (surface_type, create_cairo) (gra2cairofile_output): support clipboard. * src/gtk/x11menu.h (MenuID): add "MenuIdOutputClipboard". * src/gtk/x11menu.c (ActionEntry): add clipboard action. * src/gtk/x11print.c (OutputImageDialogSetupItem) (OutputImageDialogSetup, OutputImageDialogClose) (CmOutputImage, CmOutputMenu): support clipboard. * initfile/NgraphUI.xml.win: add clipboard menu. 2012-07-03 Ito Hiroyuki * src/gtk/x11lgnd.c (create_mark_color_combo_box) (create_color_combo_box): change order of items. * src/gtk/x11file.c (create_type_color_combo_box): change order of items. 012-07-02 Ito Hiroyuki * src/gtk/x11file.c (create_type_combo_box): use "combo_box_create_mark()". (create_type_combo_box): set visibility of toggle and pixbudf column. (select_type): use "select_obj_color()". (start_editing_type, start_editing): use "tree_view_get_selected_row_int_from_path()". (CmFileWindow): set "foreground" attribute column. * src/gtk/gtk_liststore.h (_list_store): the member "color" is removed. * src/gtk/gtk_liststore.c (create_object_cbox): add columns to show toggle item and set visibility of toggle and pixbuf column. (create_tree_view): don't create invisible column. (tree_view_get_selected_row_int_from_path): added. * src/gtk/gtk_widget.h (OBJ_FIELD_COLOR_TYPE): added. * src/gtk/gtk_widget.c (combo_box_create_mark, select_obj_color): added. * src/gtk/x11lgnd.c (get_points): get number of points. (draw_color_pixbuf): added. (path_list_set_val): support type of interpolation. (path_list_set_val): show number of points. (rect_list_set_val, arc_list_set_val): line type is shown as image. (draw_mark_pixbuf): added. (mark_list_set_val): use "draw_mark_pixbuf()". (rect_size_edited): use "tree_view_get_selected_row_int_from_path()". (LEGEND_COMBO_ITEM, create_mark_color_combo_box) (create_color_combo_box, select_type, select_color) (start_editing_common, start_editing_mark, start_editing_color) (select_line_type, start_editing_line_type, edited_line_type) (start_editing_font, edited_font): added. (CmLegendWindow): set callback functions to columns. 2012-07-01 Ito Hiroyuki * src/gtk/x11file.c (select_color): removed. * src/gtk/x11lgnd.c (mark_list_set_property) (legend_list_set_color): removed. 2012-07-01 Ito Hiroyuki * src/ofile.c (nstrrchr, get_filename_last_index): added. (f2dload_sub): use "get_filename_last_index()" instead of "getitok2()". 2012-06-24 Ito Hiroyuki * src/gtk/x11lgnd.c (get_points): only get first point. (path_list_set_property, text_list_set_property): removed. (path_list_set_val): support "PATH_LIST_COL_TYPE" and "PATH_LIST_COL_ARROW". (text_list_set_val): support "TEXT_LIST_COL_TEXT" and "TEXT_LIST_COL_FONT". * src/gtk/gtk_subwin.c (select_enum, start_editing_enum, enum_cb): added. (start_editing, set_cell_renderer_cb): support G_TYPE_ENUM. (set_combo_cell_renderer_cb): check and save "list[i].edited_id". * src/gtk/x11file.c (Flist): change type of the columns "ax" and "ay" from G_TYPE_ENUM to G_TYPE_PARAM. * src/gtk/gtk_liststore.c (create_column, create_tree_view): check "G_TYPE_PARAM". * src/gtk/x11axis.c (start_editing, select_type, edited): removed. (CmAxisWindow): don't call "set_combo_cell_renderer_cb()". * src/gtk/x11view.c (ViewerEvLButtonDown, ViewerEvLButtonUp) (ViewerEvMouseMove): treat "MOUSESCROLLE". * src/gtk/x11menu.h (MouseMode): add "MOUSESCROLLE". 2012-06-23 Ito Hiroyuki * src/gtk/gtk_subwin.c (sub_window_get_nth_content) (tree_get_selected, tree_copy, tree_delete, tree_move_top) (tree_move_last, tree_move_up, tree_move_down, tree_update) (tree_focus, tree_hidden, tree_set_hidden_state) (ev_key_down_tree): removed. (start_editing): accepts legend window. (toggle_cb): use "g_object_get_data()" and "toggle_boolean()". (set_cell_renderer_cb, set_editable_cell_renderer_cb) (set_combo_cell_renderer_cb, set_obj_cell_renderer_cb): change type of the firest parameter from "struct SubWin *" to "struct obj_list_data *". (cb_destroy): free data.data member of the "SubWin" struct. (copy, delete, move_top, move_last, move_up, move_down, update) (focus, modify_numeric, modify_string, hidden, set_hidden_state): change type of the firest parameter from "struct SubWin *" to "struct obj_list_data *". (toggle_boolean): added. (do_popup): change type of the second parameter from "struct SubWin *" to "struct obj_list_data *". (do_popup): accepts legend window. (sub_window_create): remove last parameter. (sub_window_create): don't create scrolled window. (text_sub_window_create, label_sub_window_create): create scrolled window. (list_widget_create): added. (list_sub_window_create, tree_sub_window_create): use "list_widget_create()". (list_sub_window_must_rebuild, list_sub_window_build) (list_sub_window_set, sub_win_create_popup_menu): change type of the second parameter from "struct SubWin *" to "struct obj_list_data *". * src/gtk/x11axis.c (AxisDialog): change type of the firest parameter from "void *" to "struct obj_list_data *" and remove second parameter. (AxisWinUpdate): add parameter "struct obj_list_data *". (AxisDelCB): added. (axis_list_set_val, pos_edited_common, axis_prm_edited_common) (axiswin_delete_axis): change type of the firest parameter from "struct SubWin *" to "struct obj_list_data *". (CmAxisWindow): use "AxisDelCB" instead of "AxisDel". * src/gtk/x11lgnd.c (Plist, Alist, Rlist, Mlist, Tlist): added. (Llist): removed. (LegendWinPathUpdate, LegendWinRectUpdate, LegendWinArcUpdate) (LegendWinMarkUpdate, LegendWinTextUpdate): added. (LegendWinLegendUpdate): removed. (ObjListUpdate, PathListUpdate, ArcListUpdate, RectListUpdate) (MarkListUpdate, TextListUpdate): added.0 (legend_list_set_color): change type of the firest parameter from "struct LegendWin *" to "struct obj_list_data *" and remove second parameter. (path_list_set_property, mark_list_set_property) (text_list_set_property, path_list_set_val, rect_list_set_val) (arc_list_set_val, mark_list_set_val, text_list_set_val): added. (legend_list_set_val): removed. (popup_show_cb): use "list_store_get_selected_int()" instead of "tree_store_get_selected_nth()". (pos_edited): get column number from the "title" member of "n_list_store". (pos_edited): use "gtk_tree_model_get_iter_from_string()" to get current row instead of "gtk_tree_path_new_from_string()". (rect_size_edited, rect_width_edited, rect_height_edited): added. (width_edited): removed. * src/gtk/x11file.c (FileDialog): change type of the firest parameter from "void *" to "struct obj_list_data *" and remove second parameter. (FileWinFileEdit, file_obj_copy, FileWinFileCopy) (FileWinFileUpdate, FileWinFileDraw, FileWinFit) (file_list_set_val): change type of the firest parameter from "struct SubWin *" to "struct obj_list_data *". (delete_file_obj, FileWinUpdate): add parameter "struct obj_list_data *". * src/gtk/x11menu.h (obj_list_data): added. (SubWin): use "struct obj_list_data *". (LegendWin): removed. * src/gtk/gtk_liststore.c (create_column): set "user-data" to "GtkCellRendererToggle" when the column is editable. * src/gtk/x11merge.c (merge_list_set_val): change type of the firest parameter from "struct SubWin *" to "struct obj_list_data *". (MergeDialog): change type of the firest parameter from "void *" to "struct obj_list_data *". (MergeWinUpdate): add parameter "struct obj_list_data *". * src/omark.c (marktype): moved to "oroot.c". * src/oroot.c (oputmarktype): moved and renamed from "omark.c". * src/ofile.c (file_marktype): use "MARK_TYPE_NUM". (file2d): check argument of the field "mark_type". 2012-06-20 Ito Hiroyuki * src/gtk/main.c (HAVE_READLINE_READLINE_H): used instead of "HAVE_LIBREADLINE". * src/gtk/ox11menu.c (HAVE_READLINE_READLINE_H): used instead of "HAVE_LIBREADLINE". * src/shell.c (getcmdline): use global valuable "Multiline" only when "HAVE_READLINE_READLINE_H" is defined. (HAVE_READLINE_READLINE_H): used instead of "HAVE_LIBREADLINE". * configure.in (READLINE_LIBS): defined when readline library is installed. (AC_CHECK_HEADERS): check "readline/readline.h" 2012-06-16 Ito Hiroyuki * src/gtk/x11opt.c (SetScriptDialogSetupItem): addin selection combobox is always available. * addin/fig2gra.rb: support Ruby 1.9. 2012-06-15 Ito Hiroyuki * src/gtk/x11axis.c (baseline_tab_create): don't call "gtk_widget_set_size_request()". * src/gtk/x11menu.c (setupwindow): call "gtk_toolbar_set_style()" when the version of GTK+ is greater or equal to 3.4.0. 2012-06-14 Ito Hiroyuki * addin/text-in.nsc: vertical offset of text can be changed. 2012-06-13 Ito Hiroyuki * driver/ngp2.in: accepts "-emf" option if EMF output is supported. * src/gtk/ox11dlg.c (dlginput): argument of the field is used as initial string of the text entry. * src/gtk/x11gui.c (DialogInput): add parameter "init_str". * addin/math.nsc: retry when error will be occurred. * src/gtk/ogra2cairo.c (gra2cairo_output): don't call "cairo_save()" on the 'I' command. 2012-06-12 Ito Hiroyuki * driver/ngp2.in (save_gra): copy field of "gra:viewer". * src/gtk/ox11menu.c (mx_clear): call "cairo_reset_clip()" before call "cairo_paint()". 2012-06-11 Ito Hiroyuki * zsh/Makefile.am (dist_zsh_DATA): use "dist_" prefix. * pixmap/Makefile.am (dist_pixmap_DATA): use "dist_" prefix. * initfile/Makefile.am (dist_ngraphconf_DATA): use "dist_" prefix. * doc/html/ja/tutorial/Makefile.am (dist_htmltutorial_DATA): use "dist_" prefix. * doc/html/ja/dialogs/Makefile.am (dist_htmldialog_DATA): use "dist_" prefix. * doc/html/img/Makefile.am (dist_htmlimg_DATA): use "dist_" prefix. * doc/html/Makefile.am (dist_html_DATA): use "dist_" prefix. * demo/Makefile.am (.ngp.in.ngp): use suffix rule. 2012-06-09 Ito Hiroyuki * src/gtk/x11view.c (show_move_animation, mouse_down_zoom) (ViewerEvMButtonDown): disable move animation. 2012-06-07 Ito Hiroyuki * addin/ps2gra.nsc (gra_file): check overwrite. 2012-06-06 Ito Hiroyuki * addin/ps2gra.nsc: add import pdf menu. * addin/fig2gra.rb: print creator comment. * addin/fig2gra.nsc (fig2gra): print creator comment. 2012-06-06 Koichi Akabe * demo/Makefile.am (CLEANFILES): add "demo6.ngp" 2012-06-05 Koichi Akabe * debian/ngraph-gtk.install: add scalable icons. * misc/ngraph.desktop (Icon): add scalable icons. * configure.in: add scalable icons. * icons/scalable/mimetypes/application-x-ngraph.svg: added. * icons/scalable/mimetypes/application-x-ngraph-script.svg: added. * icons/scalable/mimetypes/application-x-ngraph-graphic.svg: added. * icons/scalable/mimetypes/Makefile.am: added. * icons/scalable/apps/ngraph.svg: added. * icons/scalable/apps/Makefile.am: added. * icons/scalable/Makefile.am: added. 2012-06-03 Ito Hiroyuki * addin/fig2gra.nsc (fig2gra): accepts dummy option "-dummy". * addin/tex_equation.nsc: addin scripts are installed not in the directory "$NGRAPHLIB" but "${system::data_dir}/addin". * addin/ps2gra.nsc: addin scripts are installed not in the directory "$NGRAPHLIB" but "${system::data_dir}/addin". 2012-05-30 Ito Hiroyuki * src/gtk/x11print.c (CmOutputViewerB): set "width" and "height" fields of the "gra2dtk" object. * src/gtk/ox11menu.h (SAVE_CONFIG_TYPE_X11MENU): add "SAVE_CONFIG_TYPE_EXTERNAL_VIEWER". * src/gtk/ox11menu.c (exwinloadconfig): removed. (MenuConfigExiView): added. (MenuConfigArrray): add "MenuConfigExiView". (menu_save_config): check "SAVE_CONFIG_TYPE_EXTERNAL_VIEWER". (menuinit): initialize "Menulocal.exwindpi", "Menulocal.exwinwidth" and "Menulocal.exwinheight". * src/gtk/x11lgnd.c (format_value_percent, format_value_degree): added. (LegendArrowDialogSetup): connect "format_value_degree" and "format_value_percent" to the "format-value" signal. * src/gtk/ogra2x11.c (gtkloadconfig): removed. (gra2gtk): add fields "width" and "height". (gtkinit): use "gtk_window_set_default_size()" instead of "gtk_widget_set_size_request()". (gtk_set_size): added. * src/gtk/x11opt.c (add_str_with_int_to_array) (save_ext_viewer_config): removed. (ViewerDialogSetup): change layout. 2012-05-26 Ito Hiroyuki * addin/fitrslt.c: don't use deprecated functions. * addin/addin_common.c: don't use deprecated functions. * addin/calc.c (create_control): don't use deprecated functions. * addin/legend.c: don't use deprecated functions. * src/gtk/gtk_subwin.c (label_sub_window_create): use "gtk_widget_set_halign()" and "gtk_widget_set_valign()" instead of "gtk_misc_set_alignment()". * src/gtk/x11lgndx.c (LegendGaussDialogSetup): don't use deprecated functions. * src/gtk/ogra2x11.c (gtkinit): don't use deprecated functions. * src/gtk/x11axis.c (GridDialogSetup, SectionDialogSetup) (CrossDialogSetup, ZoomDialogSetup, scale_tab_create) (baseline_tab_create, gauge_tab_create, numbering_tab_create) (font_tab_create, position_tab_create): don't use deprecated functions. * src/gtk/gtk_widget.c (add_widget_to_table_sub) (add_copy_button_to_box, item_setup) (create_text_view_with_line_number): don't use deprecated functions. * src/gtk/x11print.c (DriverDialogSetup, OutputDataDialogSetup): don't use deprecated functions. * src/gtk/x11lgnd.c (points_setup): call "gtk_tree_view_column_set_expand()". (points_setup, LegendArrowDialogSetup, LegendRectDialogSetup) (LegendArcDialogSetup, LegendMarkDialogSetup) (legend_dialog_setup_sub, LegendTextDialogSetup) (LegendTextDefDialogSetup): don't use deprecated functions. * src/gtk/x11dialg.c (SelectDialogSetup): don't use deprecated functions. * src/gtk/x11file.c (MathTextDialogSetup, MathDialogSetup) (FitSaveDialogSetup, create_user_fit_frame, FitDialogSetup) (move_tab_create, mask_tab_create, load_tab_create) (math_tab_create, button_set_mark_image, MarkDialogSetup) (plot_tab_create, FileDialogSetupCommon, FileDialogSetup): don't use deprecated functions. (set_fitdialog_sensitivity): set sensitivity of initial value input for user function. (FitDialogSetSensitivity): call "check_fit_func()". * src/gtk/x11view.c (EvalDialogSetup): don't use deprecated functions. * src/gtk/x11commn.c (ProgressDialogCreate): don't use deprecated functions. * src/gtk/x11menu.c (create_message_box, setupwindow): don't use deprecated functions. * src/gtk/x11opt.c (SetScriptDialogSetup, SetDriverDialogSetup) (FontSettingDialogSetup, PrefFontDialogSetup, MiscDialogSetup) (ExViewerDialogSetup, ViewerDialogSetup): don't use deprecated functions. * src/gtk/x11graph.c (PageDialogSetup, SwitchDialogSetup) (DirectoryDialogSetup, LoadDialogSetup, PrmDialogSetup) (SaveDialogSetup): don't use deprecated functions. * src/gtk/x11merge.c (MergeDialogSetup): don't use deprecated functions. 2012-05-23 Ito Hiroyuki * src/shell.c (set_shellevloop, nreadline): use "g_thread_new()" instead of "g_thread_create()" when the version of glib is greater or equal to 2.32. * src/gtk/main.c (main): don't use duplicate function "g_thread_init()" if the version of glib is greater or equal to 2.32. * src/gtk/x11view.c (draw_cairo_arc): check if radius is not less than 1. (ViewerEvScroll): check "e->state" when "e->direction" is "GDK_SCROLL_SMOOTH". 2012-05-22 Ito Hiroyuki * src/gtk/x11view.c (scrollbar_scroll_cb): handle "GDK_SCROLL_SMOOTH". (ViewerEvScroll): multiply "x" and "y" by "SCROLL_INC" when the direction is "GDK_SCROLL_SMOOTH". * src/gtk/gtk_widget.c (set_adjustment): added. (text_view_scroll_event): handle "GDK_SCROLL_SMOOTH". (text_view_scroll_event): use "set_adjustment()". 2012-05-16 Ito Hiroyuki * src/gtk/x11menu.c (detach_toolbar, create_toolbar_box): not used if the version of GTK+ is greater or equal to 3.4. (setupwindow): don't use GtkHandleBox. * src/gtk/gtk_widget.c (show_color_sel, create_color_button): set tool-tip. * src/gtk/x11file.c (select_color): use GtkColorChooserDialog when the version of GTK+ is greater or equal to 3.4. * src/gtk/x11view.c (EvalDialogSetup): change default width of the window. (show_zoom_animation, show_move_animation): call "cairo_set_source()" only once. 2012-05-11 Ito Hiroyuki * src/gtk/gtk_widget.h (NUM_ENTRY_WIDTH): change width of entries. * src/gtk/gtk_widget.c (create_direction_entry): change width of the entry. (show_color_sel, color_button_key_event): not used if the version of GTK+ is greater or equal to 3.4. * src/gtk/ox11menu.c (get_palette, set_palette): not used if the version of GTK+ is greater or equal to 3.4. * src/gtk/x11dialg.c (_set_color, _putobj_color): use "GtkColorChooser" if the version of GTK+ is greater or equal to 3.4. * src/gtk/x11axis.c (position_tab_create): change width of the "Adjust:" entry. * src/gtk/x11opt.c (ViewerDialogSetupItem, ViewerDialogClose): use "GtkColorChooser" if the version of GTK+ is greater or equal to 3.4. * src/gtk/x11view.c (PasteObjectsFromClipboard): use "gdk_window_get_device_position()" instead of "gtk_widget_get_pointer()" if the version of GTK+ is greater or equal to 3.4. (ViewerWinSetup): add "GDK_SCROLL_MASK" and "GDK_SMOOTH_SCROLL_MASK". (ViewerEvScroll): add case for "GDK_SCROLL_SMOOTH". 2012-05-09 Ito Hiroyuki * src/gtk/x11view.c (calc_mouse_x, calc_mouse_y): added. (text_dropped, mouse_up_point, mouse_up_drag, mouse_up_change) (mouse_up_lgend1, mouse_up_lgend2, update_frame_rect) (mouse_move_drag, mouse_move_change, ViewerEvMouseMove) (SetVRuler, SetHRuler): use "calc_mouse_x()" and/or "calc_mouse_y()". 2012-05-08 Ito Hiroyuki * src/math/math_basic_function.c (math_func_rand): use "g_random_double()". (math_func_srand): use "g_random_set_seed()". (create_random_buf): removed. 2012-05-01 Ito Hiroyuki * src/gtk/x11view.c (show_zoom_animation, show_move_animation): don't call "gdk_window_invalidate_rect()". (ViewerEvPaint): check "ZoomLock". 2012-04-27 Ito Hiroyuki * src/gtk/x11view.c (mouse_down_zoom): now cursor position is static. (ViewerEvScroll): control + wheel works as zoom. (get_range_max): added. (ChangeDPI): use "get_range_max()". (show_zoom_animation, show_move_animation): added. (mouse_down_zoom): use "show_zoom_animation()" and "show_move_animation()". (ViewerEvMButtonDown): use "show_move_animation()". * src/gtk/x11menu.h (Viewer): remove members "hupper" and "vupper". 2012-04-26 Ito Hiroyuki * src/gtk/x11view.c (ChangeDPI): use "nround()" to avoid floating point error when calculating scroll position. 2012-04-22 Ito Hiroyuki * src/shell.c (remove_duplicate_history): added. (shget): combine multi-line input. (getcmdline, checkcmd): set "MultiLine" state. 2012-04-20 Ito Hiroyuki * src/shell.c (checkcmd, gettok): accepts here-document "<<-". 2012-04-19 Ito Hiroyuki * src/shellux.c (SleepThread): argument of the function "Sleep()" is milliseconds. 2012-04-14 Ito Hiroyuki * misc/ngraph.keys: filename is changed from "ngraph.key". * misc/ngraph.desktop (Exec): special field code "%f" is added. 2012-04-11 Ito Hiroyuki * addin/ps2gra.nsc: fix error message. * src/ofile.c (rectout): use "GRAdrawpoly()" instead of "GRArectangle()". (draw_rect): added. (barout): use "draw_rect()" instead of "GRAdrawpoly()" when draw outline of the bar. 2012-04-07 Ito Hiroyuki * src/ofile.c (poly_add_elements): fix calculation to avoid influence of floating point error. 2012-04-06 Ito Hiroyuki * src/math/math_scanner.c (get_dec): fix calculation to reduce floating point error. 2012-04-05 Ito Hiroyuki * src/ofile.c (file_color, file_alpha, file_rgb_sub) (file_hsb_sub, file_marksize, file_marktype): check parameters are normal value or not. (draw_polygon): added. (polyout): use "draw_polygon()". (accept_ascii_only): added. (file2d): "ifs" and "remark" fields are accepts only printable ascii character. (check_ifs_init): check if the index of the array is positive. 2012-04-04 Ito Hiroyuki * demo/Makefile.am: add settings for demo#6. * demo/demo.ngp.in: add demo#6. * demo/demo6.dat: added. * demo/demo6.ngp.in: added. * src/ofile.c (uniq_points): fix index pf the array. 2012-04-03 Ito Hiroyuki * src/ofile.c (poly_add_point, poly_add_clip_point) (poly_pos_sort_cb, poly_set_pos, poly_add_elements): added. (polyout): remove parameters related to line attributes. * src/gtk/x11file.c (FileWinUpdate): don't use "FileWinExpose()". (FileWinExpose): removed. (CmFileWindow): don't connect "draw" or "expose-event" signal. (CmFileWindow): call "FileWinUpdate()". * src/gtk/x11axis.c (AxisWinUpdate): don't use "AxisWinExpose()". (AxisWinExpose): removed. (CmAxisWindow): don't connect "draw" or "expose-event" signal. (CmAxisWindow): call "AxisWinUpdate()". * src/gtk/x11merge.c (MergeWinUpdate): don't use "MergeWinExpose()". (MergeWinExpose): removed. (CmMergeWindow): don't connect "draw" or "expose-event" signal. (CmMergeWindow): call "MergeWinUpdate()". * src/gtk/x11lgnd.c (LegendWinUpdate): don't use "LegendWinExpose()". (LegendWinExpose): removed. (CmLegendWindow): don't connect "draw" or "expose-event" signal. (CmLegendWindow): call "LegendWinUpdate()". 2012-03-30 Ito Hiroyuki * addin/legend.c (makescript): add condition to check plot type "polygon_solid_fill". * src/ofile.h (FILE_OBJ_PLOT_TYPE): add plot type "polygon_solid_fill". * src/ofile.c (f2dtypechar): add plot type "polygon_solid_fill". (add_polygon_point, remove_same_points, polyout): added. (f2ddraw): add case "PLOT_TYPE_POLYGON_SOLID_FILL". * src/gtk/x11file.c (FileDialogType): add case "PLOT_TYPE_POLYGON_SOLID_FILL". (draw_type_pixbuf): simplify conditions. (create_type_combo_box): suffix of the array "curvelist" is not "i" but "j". 2012-03-29 Ito Hiroyuki * src/ofile.c (f2dgetcoord): call "arraydel()" when the number of elements is greater than zero. 2012-03-28 Ito Hiroyuki * addin/fitrslt.nsc: use int object to count number of fitting plots. * addin/text-in.nsc: an id of a file instance can be selected. use "dialog::integer_entry" to specify column number. use color of the file object as text color. * doc/html/ja/addin.html: update document. * doc/html/ja/script.html.in: update document. * doc/html/ja/object.html.in: add link to title of each object. * doc/html/objlist.nsc: add link to title of each object. * initfile/Ngraph.nsc (append_addin_list): check size of the sarray object. * src/gtk/ox11menu.c (mx_addin_list_append): check return value of the function "getobj()". (mx_addin_list_append): don't modify sarray object. 2012-03-27 Ito Hiroyuki * src/gtk/main.c (set_dir_defs): use function "g_locale_to_utf8()" instead of "g_locale_from_utf8()". * src/gtk/ox11menu.c (mx_addin_list_append): check if strings are valid UTF-8. * src/gtk/x11opt.c (remove_char): added. (SetScriptDialogSetupItem): use "remove_char()". 2012-03-25 Ito Hiroyuki * src/gtk/x11opt.c (SetScriptDialogSetupItem): use basename of the add-ins as add-in combo-box. 2012-03-23 Ito Hiroyuki * src/gtk/x11dialg.h (SetScriptDialog): add member "assins". * src/gtk/ox11menu.h (menulocal): add member "addin_list". * src/gtk/ox11menu.c (gtkmenu): add field "addin_list_append". (mx_addin_list_append, free_script_list): added. (menulocal_finalize): use "free_script_list()". * src/gtk/x11opt.c (active_script_changed): added. (SetScriptDialogSetupItem): initialize addin combo box. (SetScriptDialogSetup): add addin combo box. * initfile/Ngraph.nsc (append_addin_list): added. 2012-03-16 Ito Hiroyuki * src/math/math_expression.c (math_expression_calculate, calc): "val->type" is always "MATH_VALUE_ERROR" when an error is occurred during calculation. (FACT_MAX): added. (calc): the operator "!" accepts a number lesser then "FACT_MAX". * src/math/math_basic_function.c (math_func_choose): added. (create_random_buf): added. (math_func_rand, math_func_srand): use functions included in GSL if available. * src/shellcm.c (cmdexpr): use "%.0f" instead of "%d" for "iexpr" command. (cmdexpr): use "round()" instead of "nround()" for "iexpr" command. 2012-03-14 Ito Hiroyuki * debian/control (Build-Depends): add "libreadline6-dev". 2012-03-07 Ito Hiroyuki * addin/addin_common.c (fgets_str): return NULL instead of 0. 2012-02-28 Ito Hiroyuki * src/gtk/x11print.c (init_print): removed. 2012-02-22 Ito Hiroyuki * src/gtk/x11lgnd.c (LegendArrowDialogSetup) (LegendRectDialogSetup, LegendMarkDialogSetup) (LegendTextDialogSetup, LegendArcDialogSetup): add delete button again. * src/ofile.c (set_data_progress): consider "fp->bufnum". (getdata_skip_step): call "set_data_progress()". (getdata_sub1): check return value of the function "getdata_sub2()". * addin/fitrslt.c (savescript): width of the frame is now a multiple of 100. * addin/legend.c (savescript): width of the frame is now a multiple of 100. 2012-02-21 Ito Hiroyuki * src/gtk/x11file.c (FitDialogSetupItem) (FitDialogSetSensitivity): set "user_func" field aftr setting of "derivative". (check_fit_func): added. (create_user_fit_frame): connect "changed" signal to the function "check_fit_func()". (create_user_fit_frame): connect "focus-in" signal to the function "func_entry_focused()". (FitDialogResult): 4th argument of the function "math_equation_add_parameter()" should be 2. (func_entry_focused): use parameter "user_data" as a instance of the "GtkEntryCompletion". (FitDialogApply): save user fitting function to the history. * src/gtk/x11menu.h (NgraphApp): add member "fit_list". * src/gtk/x11menu.c (FIT_HISTORY): added. (load_hist, save_entry_history): load and save history of user fitting functions. 2012-02-16 Ito Hiroyuki * mingw/windows_make.sed: update install path. * initfile/Ngraph.ini.win: the first line should be blank or comment. * src/gtk/main.c: add global variable "ADDINDIR"(only for Windows). 2012-02-15 Ito Hiroyuki * doc/html/index.html: remove English documents from the package. * doc/html/Makefile.am: remove English documents from the package. * src/gtk/x11graph.c (check_help_file): default language of the help file is Japanese. * configure.in: remove English documents from the package. * src/gtk/gtk_entry_completion.c (add_completion): check if the string is valid UTF8. 2012-02-14 Ito Hiroyuki * src/gtk/gtk_entry_completion.c (add_completion): use "g_strchomp()". * misc/debian/ngraph-gtk.install: update install directory of demonstration files. * misc/debian/ngraph-gtk-addins.install: update install directory. * misc/debian/watch (http): fix URL. * misc/debian/rules: remove rule "override_dh_compress". * misc/debian/control (Description): fix description of addin package. * mingw/windows_make.sed: change "pkgdatadir". * addin/Makefile.am (addindir): added. * src/osystem.c (sysinit): free string set to the field "doc_dir". (nsystem): add field "doc_dir". * src/shell.c (ngraphenvironment): add "addin" to the "PATH" environment instead of "data". * src/gtk/dir_defs.h.in (ADDINDIR): added. * src/gtk/main.c (set_dir_defs): initialize "ADDINDIR". (set_path_env): add "ADDINDIR" to the "PATH" environment instead of "DATADIR". (main): initialize "doc_dir" field of the system object. * demo/Makefile.am (demodir): change install directory to "pkgdatadir". 2012-02-13 Ito Hiroyuki * mingw/associate.bat: change line feed code. * mingw/echo.nsc: show program neme and version. 2012-02-10 Ito Hiroyuki * src/gtk/dir_defs.h.in: add global variable "NDATADIR" when "WINDOWS" is teue. * src/shell.c (ngraphenvironment): set "data_dir" of the system object to the "PATH" environment. * src/gtk/main.c (main): don't call "set_path_env()". (main): initialize the "data_dir" field of the system object. * src/osystem.c (nsystem): add field "data_dir". (sysdone): free string set to the field "data_dir". * pathconv.sh: number of the argument is fixed. * addin/Makefile.am (dist_pkgdata_DATA): addins are installed in "pkgdatadir". * misc/debian/ngraph-gtk-addins.install: addins are installed in "pkgdatadir". * mingw/windows_make.sed: replace "pkglibexecdir" and "pkgdatadir" to bin directory and lib directory respectively. * mingw/windows.sh: don't move addins to the bin directory. copy hicolor icons to share/icons if exist. 2012-02-09 Ito Hiroyuki * misc/debian/ngraph-gtk.install: update path of "pkglibexedir". * misc/debian/ngraph-gtk-addins-base.install: update path of "pkglibexedir". * misc/debian/ngraph-gtk-addins.install: update path of "pkglibexedir". * misc/debian/control (Build-Depends): use debhelper version 9. * misc/debian/compat: use version 9. * addin/Makefile.am (calc_CFLAGS, fitrslt_CFLAGS): remove option "-D_FORTIFY_SOURCE". (dist_pkglibexec_SCRIPTS, pkglibexec_PROGRAMS): installed in pkglibexedir. * doc/html/ja/Makefile.am (intro.html): use "pkglibexecdir" instead of "libexecdir". * doc/html/en/Makefile.am (intro.html): use "pkglibexecdir" instead of "libexecdi5D5D5Dr". * initfile/Makefile.am (Ngraph.ini): use "pkglibexecdir" instead of "libexecdir". * src/Makefile.am (ngraph_CFLAGS): remove option "-D_FORTIFY_SOURCE". (pkglibexec_PROGRAMS): installed in pkglibexedir. * src/math/Makefile.am (libmath_la_CFLAGS): remove option "-D_FORTIFY_SOURCE". * src/gtk/Makefile.am (libngraph_la_CFLAGS): remove option "-D_FORTIFY_SOURCE". 2012-02-09 Ito Hiroyuki * addin/legend.c (savescript): add font style setting. 2012-01-31 Ito Hiroyuki * src/gtk/x11file.c (button_set_mark_image): check return value of "gtk_image_new_from_pixbuf()" or "gtk_image_new_from_pixmap()". 2012-01-27 Ito Hiroyuki * mingw/windows.sh: add "--libexecdir" option for "configure" script. * addin/Makefile.am (dist_libexec_SCRIPTS): used instead of "pkglib_DATA". (libexec_PROGRAMS): used instead of "pkglib_PROGRAMS". (pkglib_SCRIPTS, EXTRA_DIST): removed. * doc/html/en/Makefile.am (dist_html_DATA): used instead of "html_DATA". (nodist_html_DATA, CLEANFILES): added * doc/html/ja/Makefile.am (dist_html_DATA): used instead of "html_DATA". (nodist_html_DATA, CLEANFILES): added * initfile/Makefile.am (nodist_ngraphconf_DATA): added. (Ngraph.ini): now install directory of the "terminal" command is not "lib" but "libexec". (CLEANFILES): added. * driver/Makefile.am (CLEANFILES): added. * src/Makefile.am (libexec_PROGRAMS): now install directory of the "terminal" command is not "lib" but "libexec". * src/math/Makefile.am (BUILT_SOURCES): added. * src/gtk/Makefile.am (nodist_libngraph_la_SOURCES) (BUILT_SOURCES, CLEANFILES): added. * demo/Makefile.am (nodist_demo_DATA): files "demo[1-4].ngp" are not included in tarball. 2012-01-23 Ito Hiroyuki * src/gtk/x11lgnd.c (set_sensitive_with_label): removed. (legend_dialog_set_sensitive): use "set_widget_sensitivity_with_label()". * src/gtk/x11print.c (OutputImageDialogSetupItem): use functions "set_widget_sensitivity_with_label()" and "get_mnemonic_label()". * src/gtk/x11opt.c (use_external_toggled, load_file_toggled): use function "set_widget_sensitivity_with_label()". * src/gtk/x11graph.c (PageDialogPage): use function "set_widget_sensitivity_with_label()". * src/gtk/x11file.c (set_fitdialog_sensitivity) (set_user_fit_sensitivity, FitDialogSetSensitivity) (FileDialogType): use function "set_widget_sensitivity_with_label()". * src/gtk/x11axis.c (bg_button_toggled, num_direction_changed): use function "set_widget_sensitivity_with_label()". * src/gtk/gtk_widget.c (get_mnemonic_label) (set_widget_sensitivity_with_label): added. (get_widget): removed. 2012-01-22 Ito Hiroyuki * src/gtk/x11file.c (FileDialogType): set sensitivity of widgets "d->fit" and "d->fit_label". (plot_tab_create): initialize "d->fit_label". * src/gtk/x11dialg.h (FileDialog): add member "fit_label". 2012-01-21 Ito Hiroyuki * src/gtk/x11dialg.h (FitDialog): add member "usr_def_prm_tbl". * src/gtk/x11file.c (set_fitdialog_sensitivity) (FitDialogSetSensitivity): set sensitivity of the widget "usr_def_prm_tb". (create_user_fit_frame): initialize "usr_def_prm_tbl". 2012-01-20 Ito Hiroyuki * src/gtk/x11lgnd.c (text_dialog_show_tab): removed. (LegendTextDialogSetup): don't connect "show" signal. * src/gtk/x11axis.c (scale_tab_create): use "map" signal instead of "show" signal. (TIME_FORMAT_STR): added. (numbering_tab_create): add tool tip for "Date/time format" entry. (axis_dialog_show_tab): removed. (AxisDialogSetup): don't connect "show" signal. * src/gtk/x11file.c (file_dialog_show_tab): removed. (FileDialogSetupCommon): don't connect "show" signal. * src/gtk/gtk_widget.c (add_copy_button_to_box): use "map" signal instead of "show" signal. 2012-01-19 Ito Hiroyuki * src/gtk/x11dialg.h (AxisDialog): remove member "del_btn" and "CanDel". * src/gtk/x11view.c (ViewerAlignType): added. (ViewerEvKeyDown): actions related to delete and change order of objects are managed in "GtkAction". (ViewerPopupMenu): removed. (ViewerUpdateCB): added. (CmEditMenuCB): manage actions related to change order of an object. * src/gtk/x11axis.c (AxisDialogSetup): remove redundant call of the function "gtk_widget_set_sensitive()". (AxisDialog): the parameter "candel" is not used. * src/gtk/x11menu.c (ActionEntry): "Edit/drow Order" menu item is added. * addin/timer.nsc (rectangle): use "dup" command. * src/shell.c (cmdtable): add internal command "dup". * src/shellcm.c (cmdup): added. 2012-01-13 Ito Hiroyuki * src/gtk/gtk_subwin.c (cell_focus_out, start_editing): connect "cell_focus_out()" to "focus-out-event" only when the version of GTK+ is 3.0. * src/gtk/gtk_ruler.c (get_thickness): added. (nruler_size_request, nruler_draw_ticks, nruler_draw_pos): use "get_thickness()". 2012-01-06 Ito Hiroyuki * src/gtk/ox11menu.c (mx_get_locale): added. (gtkmenu): add field "locale". * src/gtk/main.c (n_getlocale): added. (main): get locale string. * src/gtk/x11graph.c (check_help_file): added. (CmHelpHelp): use "check_help_file()" to get full-path of help file. 2011-12-22 Ito Hiroyuki * addin/legend.c (caption_edited, caption_toggled): remove unused variables. * addin/addin_common.h (gtk_hbox_new, gtk_vbox_new): don't use deprecated functions. * src/gtk/gtk_common.h (gtk_hbox_new, gtk_vbox_new) (gtk_hbutton_box_new, gtk_hseparator_new, gtk_hscrollbar_new) (gtk_vscrollbar_new, gtk_hscale_new_with_range): don't use deprecated functions. * src/gtk/x11opt.c (FontSettingDialogAddAlternative): use "GtkFontChooserDialog" when the version of GTK+ library is greater or equal to 3.2. * src/gtk/gtk_widget.c (set_linumber_color): use "gtk_widget_override_color()" to set color of text. initialize "alpha" member of the structure "GdkRGBA". The range of each member of the structure "GdkRGBA" is from 0.0 to 1.0. 2011-12-18 Ito Hiroyuki * addin/fitrslt.c (makescript, savescript): use "iarray" object to calculate the maximum length of the text. * addin/legend.c (caption_toggled, caption_edited): use "gtk_tree_model_get()" to get file id. (COLUMN_CHECK, COLUMN_ID): added. (COLUMN_CAPTION): change name. (savescript): use "iarray" object to calculate the maximum length of the text. 2011-12-14 Ito Hiroyuki * addin/legend.c (savescript): fix font setting. 2011-12-14 Ito Hiroyuki * addin/tex_equation.nsc: add quotation mark around the variable "$NGRAPHLIB". * addin/ps2gra.nsc: add quotation mark around the variable "$NGRAPHLIB". * addin/legend.nsc: add quotation mark around the variable "$NGRAPHLIB". * addin/fitrslt.nsc: add quotation mark around the variable "$NGRAPHLIB". * addin/fft.nsc: add quotation mark around the variable "$NGRAPHLIB". * addin/calc.nsc: add quotation mark around the variable "$NGRAPHLIB". 2011-12-07 Ito Hiroyuki * initfile/NgraphUI.xml: remove "View Clear" button. * initfile/NgraphUI.xml.win: remove "View Clear" button. 2011-12-06 Ito Hiroyuki * misc/ngraph.1: escape '-'. * misc/ngraph.desktop (Encoding): removed. * debian/control (Description): add text. * src/gtk/x11menu.c (ActionEntry): change menu strings from "Open" to "Add". * initfile/NgraphUI.xml: chang name of action from "DataOpenAction" and "MergeOpenAction" to "DataAddAction" and "MergeAddAction" respectively. 2011-12-05 Ito Hiroyuki * src/gtk/x11file.c (FitDialogSetup, FileDialogSetup): remove "Delete" button from dialog. * src/gtk/x11merge.c (MergeDialogSetup): remove "Delete" button from dialog. * src/gtk/x11axis.c (GridDialogSetup, SectionDialogSetup) (CrossDialogSetup, AxisDialogSetup): remove "Delete" button from dialog. * src/gtk/x11lgnd.c (LegendArrowDialogSetup) (LegendRectDialogSetup, LegendArcDialogSetup) (LegendMarkDialogSetup, LegendTextDialogSetup): remove "Delete" button from dialog. 2011-12-05 Ito Hiroyuki * debian/ngraph-gtk.manpages: added. * configure.in: change name of the package from "Ngraph-gtk" to "ngraph-gtk". * src/gtk/main.c (set_path_env): change order of "PATH" environment. 2011-11-23 Ito Hiroyuki * misc/ngp2.1: added. * misc/ngraph.1: added. 2011-11-21 Ito Hiroyuki * configure.in (GTK2_REQUIRED_VERSION, GTK3_REQUIRED_VERSION): added. * configure.in: use GTK+3 if available. * icons/application-x-ngraph.xpm: added. * configure.in (AC_CONFIG_FILES): add "icons/Makefile" and "misc/Makefile". * MAKEFILE.am (SUBDIRS): add "icons" and "misc". 2011-11-21 Koichi Akabe * debian/rules: updated for debian repository. * debian/control: updated for debian repository. * debian/install: added. 2011-11-21 Ito Hiroyuki * addin/timer.nsc: remove shebang. * addin/tex_equation.nsc: remove shebang. * addin/ps2gra.nsc: remove shebang. * addin/fig2gra.nsc: remove shebang. * addin/cal.nsc: remove shebang. 2011-11-20 Ito Hiroyuki * src/gtk/Makefile.am (libngraph_la_CFLAGS): remove settingis -DGTK_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -DGDK_PIXBUF_DISABLE_DEPRECATED=1 -DG_DISABLE_DEPRECATED=1 -DGTK_DISABLE_SINGLE_INCLUDES=1 -DG_DISABLE_SINGLE_INCLUDES=1 -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES=1 -DGSEAL_ENABLE=1 * src/Makefile.am (ngraph_CFLAGS): remove settingis -DG_DISABLE_DEPRECATED=1 -DG_DISABLE_SINGLE_INCLUDES=1 * addin/Makefile.am (APP_CFLAGS): remove settingis -DGTK_DISABLE_DEPRECATED=1 -DGDK_DISABLE_DEPRECATED=1 -DGDK_PIXBUF_DISABLE_DEPRECATED=1 -DG_DISABLE_DEPRECATED=1 -DGTK_DISABLE_SINGLE_INCLUDES=1 -DG_DISABLE_SINGLE_INCLUDES=1 \ -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES=1 -DGSEAL_ENABLE=1 * debian/copyright: specify GPL version. 2011-11-14 Ito Hiroyuki * addin/Makefile.am (pkglib_DATA): add "timer.nsc". * addin/timer.nsc: added. 2011-11-08 Ito Hiroyuki * src/gtk/x11menu.c (recent_filter): use "g_ascii_strncasecmp()" and "g_ascii_strcasecmp()" instead of "g_strcmp0()". * src/gtk/main.h (NGRAPH_TEXT_MIME): added. 2011-11-04 Ito Hiroyuki * src/gtk/main.h (NGRAPH_GRAPH_MIME, NGRAPH_DATA_MIME): added. * src/gtk/x11dialg.h (MiscDialog): remove member "history". * src/gtk/ox11menu.c (menu_save_config_sub, mgtkloadconfig) (menulocal_finalize, menuinit): remove codes related to data file history. * src/gtk/x11file.c (CmFileHistory): use "GtkRecentChooser". * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose): remove codes related to data file history. * src/gtk/x11commn.c (add_hist): added. (AddNgpFileList, AddDataFileList): use "add_hist()". * src/gtk/ox11menu.h (menulocal): remove member "datafilelist". * src/gtk/x11menu.c (SaveHistory, create_recent_data_menu) (add_underscore): removed. (recent_filter): added. (create_action_group): use "gtk_recent_filter_add_custom()" instead of "gtk_recent_filter_add_mime_type()". 2011-11-02 Ito Hiroyuki * addin/calc.c (load_settings): set maximum length of a string of "%s" parameter for the function "sscanf()". * addin/fft.c (MAXP, MAXDATA): increase maximum data number. * src/gtk/main.h (APP_MIME): added. * src/gtk/x11menu.c (create_action_group): use "gtk_recent_filter_add_mime_type()" instead of "gtk_recent_filter_add_application()" and "gtk_recent_filter_add_pattern()". * src/gtk/x11commn.c (AddNgpFileList): use "APP_MIME". 2011-11-01 Ito Hiroyuki * addin/fitrslt.c: move some functions to "addin_common.c". * addin/legend.c: added. * src/gtk/x11menu.c (application): call "SaveHistory()" before call "gtk_ui_manager_remove_ui()". 2011-10-24 Ito Hiroyuki * initfile/Ngraph.ini.win (script): add fft add-in. * src/gtk/main.c (set_dir_defs): "LIBDIR" is now "app_path/bin". * mingw/windows.sh: add-in programs are now installed in "$PKG_DIR/bin". * addin/Makefile.am (pkglib_SCRIPTS): remove "calc.tcl" and "fitrslt.tcl". (pkglib_PROGRAMS): add "calc" and "fitrslt". * addin/addin_common.h: added. * addin/addin_common.c: added. * addin/calc.c: added. * addin/fitrslt.c: added. 2011-10-07 Ito Hiroyuki * debian/control (Recommends): add pstoedit. * addin/calc.tcl (savedata, savescript): remove white space in the formula. 2011-09-26 Ito Hiroyuki * debian/ngraph.bash: add "-V" and "--VERSION" option. add "MJD" to the parameter of the "-ex" and "-ey" option. * zsh/_ngraph: add "-V" and "--VERSION" option. add "MJD" to the parameter of the "-ex" and "-ey" option. 2011-09-16 Ito Hiroyuki * src/gtk/gtk_subwin.c (sub_window_show): use "gtk_window_present()" instead of "gtk_widget_show()". * src/gtk/x11commn.c: fix typo. 2011-09-14 Ito Hiroyuki * src/gtk/main.c: "License" is defined when the version of GTK+ is less than 3. 2011-09-13 Ito Hiroyuki * src/ofile.c (set_data_progress): consider "d->hskip". * src/gtk/x11lgnd.c (width_edited, pos_edited): the argument of the function "LegendWinUpdate()" is "TRUE". 2011-09-12 Ito Hiroyuki * src/gtk/x11commn.c (ProgressDialogCreate): call "gtk_progress_bar_set_show_text()" when the version of GTK+ is 3. * src/gtk/x11graph.c (CmHelpAbout): use "license-type" instead of "license" when the version of GTK+ is 3. 2011-09-09 Ito Hiroyuki * src/gtk/ogra2cairo.h (gra2cairo_local): use "cairo_region_t" instead of "GdkRegion" when the version of GTK+ is 3. * src/gtk/ogra2cairo.c (gra2cairo_clip_region): use "cairo_region_t" instead of "GdkRegion" when the version of GTK+ is 3. * src/gtk/ox11menu.h (menulocal): type of "pix" is not "GdkPixmap" but "cairo_surface_t". (menulocal): use "cairo_region_t" instead of "GdkRegion" when the version of GTK+ is 3. * src/gtk/x11dialg.h (DIALOG_PROTOTYPE): type of "vbox" is not "GtkVBox" but "GtkBox". (LegendDialog): type of "arrow_pixmap" is not "GdkPixmap" but "cairo_surface_t". * src/gtk/x11gui.c (DialogInput, DialogRadio, DialogCombo) (DialogComboEntry, DialogSpinEntry, DialogCheck): type of "vbox" is not "GtkVBox" but "GtkBox". * src/gtk/ox11menu.c (mx_clear): use "cairo_region_t" instead of "GdkRegion" when the version of GTK+ is 3. * src/gtk/x11file.c (button_set_mark_image, draw_type_pixbuf) (create_type_combo_box): use "cairo_surface_t" instead of "GdkPixmap" when the version of GTK+ is 3. * src/gtk/x11view.c (region): use "cairo_region_t" instead of "GdkRegion" when the version of GTK+ is 3. (paste_cb, mouse_move_scroll): use "gdk_window_get_width()" and "gdk_window_get_height()" instead of "gdk_window_get_geometry()" when the version of GTK+ is greater than 2.24. (ViewerWinSetup, ShowCrossGauge, SetHRuler, SetVRuler): use "gdk_window_get_width()" and "gdk_window_get_height()" instead of "gdk_drawable_get_size()" when the version of GTK+ is greater than 2.24. (popup_menu_position): use "gdk_window_get_position()" instead of "gdk_window_get_geometry()" when the version of GTK+ is greater than 2.24. (ViewerEvPaint): use "cairo_set_source_surface()" instead of "gdk_cairo_set_source_pixmap()." (ViewerEvPaint): added codes for GTK+ 3. (create_pix): use "cairo_surface_t" instead of "GdkPixmap". (OpenGC): added codes for GTK+ 3. * src/gtk/ogra2x11.c (gtkevpaint): added codes for GTK+ 3. (gtklocal): use "cairo_surface_t" instead of "GdkPixmap" when the version of GTK+ is 3. * src/gtk/ogra2gdk.c (gra2gdk_create_pixmap): use "cairo_surface_t" instead of "GdkPixmap" when the version of GTK+ is 3. * src/gtk/gtk_widget.c (text_view_size_allocate): fix typo. (set_linumber_color): use "gtk_widget_override_background_color()" instead of "gtk_widget_modify_base()" when the version of GTK+ is 3. (get_preferred_width, get_preferred_height): added for GTK+ 3. (create_text_view_with_line_number): added codes for GTK+ 3. (text_view_with_line_number_set_font): use "gtk_widget_override_font()" instead of "gtk_widget_modify_font()" when the version of GTK+ is 3. * src/gtk/x11lgnd.c (LegendArrowDialogPaint) (LegendArrowDialogScaleL, LegendArrowDialogSetup) (create_character_view, LegendWinExpose, CmLegendWindow): add codes for GTK+ 3. * src/gtk/x11menu.h (NgraphApp): use "cairo_surface_t" instead of "GdkPixmap" when the version of GTK+ is 3. * src/gtk/gtk_common.h: add "GDK_KEY_*" definitions. * src/gtk/x11menu.c (create_markpixmap, free_markpixmap): use "cairo_surface_t" instead of "GdkPixmap" when the version of GTK+ is 3. * src/gtk/gtk_liststore.c (start_editing_obj): add "const" to the 5th parameter when the version of GTK+ is 3. * src/gtk/x11info.c (InfoWinSetFont): use "gtk_widget_override_font()" instead of "gtk_widget_modify_font()" when the version of GTK+ is 3. * src/gtk/gtk_subwin.c (cell_focus_out): added for GTK+ 3. (start_editing): add codes for GTK+ 3. * src/gtk/x11lgndx.c (LegendGaussDialogPaint) (LegendGaussDialogSetup): add codes for GTK+ 3. * src/gtk/gtk_ruler.c (ruler_new): add codes for GTK+ 3. (nruler_get_preferred_width, nruler_get_preferred_height): added for GTK+ 3. (nruler_size_request, nruler_expose, nruler_make_pixmap) (nruler_draw_ticks, nruler_draw_pos): add codes for GTK+ 3. 2011-08-15 Ito Hiroyuki * initfile/NgraphUI.xml.win: fix typo. * initfile/NgraphUI.xml: fix typo. * src/gtk/x11menu.c (ActionEntry): fix typo. 2011-08-09 Ito Hiroyuki * src/math/math_equation.c (check_const_sub): check "exp->u.assign.right" instead of "exp->u.bin.right" when type of the expression is "MATH_EXPRESSION_TYPE_ASSIGN". 2011-08-08 Ito Hiroyuki * src/gtk/gtk_subwin.c (sub_window_minimize) (sub_window_restore_state): removed. 2011-08-07 Ito Hiroyuki * src/gtk/gtk_subwin.c (ev_sub_win_key_down): use "window_action_set_active()" instead of "gtk_widget_hide()". * src/gtk/x11file.c (execute_fit_dialog): added. (FileDialogFit, FileWinFit): use "execute_fit_dialog()". 2011-07-31 Ito Hiroyuki * src/shellcm.c (cmwhich): check built-in command. 2011-07-29 Ito Hiroyuki * src/gtk/x11lgnd.c (LegendWinLegendUpdate): save "d->select" and "d->legend_type" when "ret" is equal to "IDOK". 2011-07-28 Ito Hiroyuki * src/ofile.c (getdata2, getminmaxdata, f2dgetdataraw): use stack instead of heap for the data buffer. (getdata, getdata2, getminmaxdata, f2dgetdataraw): size of the data buffer is "FILE_OBJ_MAXCOL + 3" (for error-bar plot). 2011-07-27 Ito Hiroyuki * src/gtk/x11gui.c (message_box): increase maximum length of a message. * src/ofile.c (getminmaxdata): bug fix: update "fp->maxy.val" instead of "fp->maxx.val". (getdataraw): bug fix: set value to not "fp->d3" but "d3". 2011-07-22 Ito Hiroyuki * addin/ps2gra.nsc: change name of functions. * addin/fig2gra.nsc: change name of functions. * addin/fig2gra.rb (set_line_attribute): fix typo. * addin/tex_equation.nsc: change name of functions. * src/nstring.c (nstrncat): this function is not used. 2011-07-21 Ito Hiroyuki * addin/tex_equation.nsc: fix typo. 2011-07-20 Ito Hiroyuki * addin/fig2gra.nsc: added. * addin/tex_equation.nsc: use "fig2gra.nsc" when ruby is not available. * addin/ps2gra.nsc: use "fig2gra.nsc" when ruby is not available. * src/object.c (get_array_argument): call "g_strfreev()" when the function "g_shell_parse_argv()" returns false. * src/oregexp.c (regexp_match): call "g_match_info_free()" when the function "g_regex_match()" returns false. 2011-07-18 Ito Hiroyuki * src/oiarray.c (oarray_get_index, oarray_create_math) (iarray_map): added. (iarrayget, iarrayput, iarrayins, iarraydel): use "oarray_get_index()". (oiarray): add field "map". * src/odarray.c (darrayget, darrayput, darrayins, darraydel): use "oarray_get_index()". (odarray): add field "map". * src/osarray.c (sarrayget, sarrayput, sarrayins, sarraydel): use "oarray_get_index()". * test/sarray_test.nsc: add tests for "get" and "map" fields. * test/iarray_test.nsc: add tests for "get" and "map" fields. * test/darray_test.nsc: add tests for "get" and "map" fields. 2011-07-16 Ito Hiroyuki * src/oint.c (int_times, int_inc, int_dec): added. (oint): add fields "times", "inc" and "dec". 2011-07-13 Ito Hiroyuki * addin/ps2gra.nsc: remove automatically created files. * addin/fig2gra.rb (#draw_poly_line, #uniq_pos): close path when start and end points are same position. * initfile/Ngraph.ini.in (script): add "import PS" and "import EPS" addin. * addin/ps2gra.nsc: added. * addin/Makefile.am: add ps2gra.nsc * src/gtk/x11view.c (ncopyobj): don't copy "name" field. 2011-07-12 Ito Hiroyuki * src/osystem.c (nsystem): type of the field "pid" is "NINT". 2011-07-12 Ito Hiroyuki * src/osystem.c (nsystem): add field "pid". (syspid): added. * src/math/math_basic_function.c (math_func_srand): added. * src/math/math_function.h.in: add function "srand()". * src/gtk/x11menu.h (SubWinType): change order. 2011-07-11 Ito Hiroyuki * src/shellcm.c (cmwhich): added. * src/shell.c (cmdtable): add internal command "which". * doc/html_ja/addin.html: update document. * addin/Makefile.am (pkglib_SCRIPTS): add "fig2gra.rb". (pkglib_DATA): add "tex_equation.nsc". * addin/fig2gra.rb: added. * addin/tex_equation.nsc: added. * initfile/Ngraph.ini.in (script): add "TeX equation" addin. * src/math/math_expression.c (math_func_call_expression_new): "buf" is NULL when argc is less than 1. * src/math/math_basic_function.c (math_func_time): added. * src/math/math_function.h.in: add function "time()". 2011-07-10 Ito Hiroyuki * src/object.c (add_arg_object, getargument): accept character "," as a string of an id list. * src/gtk/ox11menu.c (mx_focus_obj, mx_unfocus_obj): added. (gtkmenu): add fields "focus" and "unfocus". 2011-07-05 Ito Hiroyuki * src/omerge.c (ZOOM_MAX): added. (mergezoom): do nothing if "zm * zoom" is larger than "ZOOM_MAX". (mergegeometry): upper limit of the field "zoom" is "ZOOM_MAX". * src/gtk/x11view.c (calc_zoom, set_zoom_prm): added. (init_zoom, mouse_move_zoom): use "calc_zoom()" and "set_zoom_prm()". (mouse_up_zoom): use "calc_zoom()". (ViewUpdate): set "d->ShowRect" as FALSE. * src/gtk/gtk_widget.h (SPIN_ENTRY_MAX): change limit to 1000000. 2011-07-02 Ito Hiroyuki * src/gtk/x11gui.c (message_box): limit length of an error message. * src/gra.c (GRAlines): fix argument number. (GRAinputdraw): fix check of the argument number. 2011-06-23 Ito Hiroyuki * src/ofile.c (f2dhead): don't add line number. * src/gtk/x11dialg.h (FileDialog):remove members "comment" and "comment_num_tag". * src/gtk/x11file.c (count_line_number_str, set_line_number_tag) (create_text_tag, set_file_preview): removed. (set_headlines): use "text_view_with_line_number_set_text()". (FileDialogSetup): use "create_text_view_with_line_number()". (CmFileWindow): call "gtk_tree_view_set_enable_search()", "gtk_tree_view_set_search_column()" and "gtk_tree_view_set_tooltip_column()". * src/gtk/x11merge.c (CmMergeWindow): call "gtk_tree_view_set_enable_search()", "gtk_tree_view_set_search_column()" and "gtk_tree_view_set_tooltip_column()". * src/gtk/x11axis.c (CmAxisWindow): call "gtk_tree_view_set_enable_search()", "gtk_tree_view_set_search_column()" and "gtk_tree_view_set_tooltip_column()". * src/gtk/gtk_widget.c (text_view_scroll_event) (set_scroll_visibility, text_view_size_alocate) (set_linumber_color, create_text_view_with_line_number) (text_view_with_line_number_set_text) (text_view_with_line_number_set_font): added. * src/gtk/gtk_common.h: remove macros for Gtk+ which version is lesser than 2.14. * configure.in: "GTK_REQUIRED_VERSION" is now 2.14.0. 2011-06-20 Ito Hiroyuki * src/gtk/x11merge.c (MergeDialogSetupItem): cursor will be set after the last character. * src/gtk/x11file.c (FileDialogSetupItem): cursor will be set after the last character. 2011-06-15 Shijo Nagao * src/gtk/ox11menu.c (mx_show_lib_version): use macro "GSL_VERSION" if available. 2011-06-14 Ito Hiroyuki * initfile/Ngraph.nsc: open dummy "gra2cairofile" object when save "GRA" file to render strings corectry. * src/ogra2nul.c (g2nul_chardescent): remove unused variable "font". * src/oaxis.c (draw_numbering_normalize): add "default" in the "case" statement. * src/oprm.c (prmload): remove unused variables "scauto" and "scperiod". * src/math/math_expression.c (register_arg): remove unused variable "i". (call_func): remove unused variable "use_array". * src/math/math_scanner.c (get_dec): remove unused variable "ptr". * src/object.c (getvaluestr): remove unused variable "len". * src/otext.c (textmatch): calculate margin. * src/shell.c (puts_localized): return "r". * src/ofile.c (put_func): remove unused variables "default_func" and "fname". (getdata_sub2): remove unused variables "data2" and "data3". (f2doutputfile): return "r". * src/orect.c (rectrotate): remove unused variables "nx1", "ny1", "nx2" and "ny2". * src/gra.c (GRAdrawtext): remove unused variable "j". * src/gtk/ogra2cairo.c (loadconfig): remove unused variables "fontcashsize" and "fontcashsize, fontcashdirfontcashdir". * src/gtk/ox11dlg.c (dlgmessage): remove unused variable "rcode". * src/gtk/x11cood.c (CmCoordinateWindow): remove unused variable "dlg". * src/gtk/x11file.c (FitSaveDialogSetup): remove unused variable "j". (func_entry_focused): remove unused variable "d". (FileDialogSetup): remove unused variable "rcode". (start_editing_type): remove unused variable "list". * src/gtk/x11view.c (CutFocusedObjects): remove unused variable "text". (EvalDialogSetupItem): initialize variable "n". (scrollbar_scroll_cb, AddList, AddInvalidateRect): remove unused variable "d". (mouse_down_point): remove unused variable "zoom". (calc_integer_ratio): check variable "po2" (not "pow"). * src/gtk/x11opt.c (SetScriptDialogBrowse): remove unused variable "d". * src/gtk/ogra2x11.c (gtk_output): remove unused variables "cstr"and "local". * src/gtk/x11axis.c (GridDialogAxis): remove unused variable "d". (AxisDialogFile): remove unused variable "room". (CmAxisScaleUndo): remove unused variable "d". * src/gtk/x11print.c (print_obj): remove unused member "g2wid". (draw_page): remove unused variable "g2wid". * src/gtk/x11lgnd.c (LegendWinLegendUpdate): remove unused variable "num". * src/gtk/x11commn.c (FileAutoScale): remove unused variable "room". * src/gtk/x11graph.c (SwitchDialogUp): remove unused variable "num". (SaveDialogSetup): remove unused variable "hbox". * src/gtk/ogra2cairofile.c (gra2cairofile_output): remove unused variable "cstr". 2011-06-11 Ito Hiroyuki * demo/demo.ngp.in (dialog): don't clear graph before exit demonstration. * src/gtk/x11print.c (DriverDialogSelectCB): type of variables "l" and "n"is now "int". * initfile/Ngraph.nsc: add option "-V". * src/oaxis.c (axis): add field "auto_scale_margin". remove 2nd argument for "auto_scale" and "get_auto_scale" fields. (axisautoscale_margin): added. (axisinit): initialize "auto_scale_margin" field. (axisadjust, axischangescale, axiscoordinate): use "AXIS_TYPE_", "AXIS_TYPE_LOG" and "AXIS_TYPE_LOG" instead of 1 and 2. (axischangescale): now parameter "room" means margin of the scale. (axisautoscale, axisgetautoscale): remove 2nd argument. * src/oagrid.c (agrid): add fields "grid_x" and "grid_y". (agridinit): initialize "grid_x" and "grid_y" fields. (agriddraw): check "grid_x" and "grid_y" fields. * src/shellcm.c (dispfield): "NCHAR" and "NCFUNC" are not used now. * src/object.c (check_arglist): added. (addobject): call "check_arglist()". (chkobjarglist, _putobj, putobj, _getobj, getobj, copyobj) (getvaluestr): "NCHAR" and "NCFUNC" are not used now. (add_arg_object, add_arg_int, add_arg_double, add_arg_bool) (add_arg_num, add_arg_sarray, add_arg_iarray, add_arg_darray) (set_arg_enum, get_array_argument): added. (getargument): use "set_arg_enum()", "g_shell_parse_argv()", "get_array_argument()", "add_arg_num()" and "add_arg_object()". * src/oio.c (io): add "mode" field. remove 2nd argument for "open" and "popen" field. (io_init): initialize "mode" field. (io_open): use "mode" filed instead of 2nd argument. * src/mathfn.c (nround): use "G_MAXINT" and "G_MAXINT" instead of "LANG_MIN" and "LONG_MAX" . * src/ofile.c (barout): use "case" statement instead of "if". (f2dboundings): minimum or maximum value for bar plot is now 0. * src/gtk/x11dialg.h (AAxisDialog): add member "margin". (GridDialog): add members "draw_x" and "draw_y". * src/gtk/x11axis.c (GridDialogSetupItem): get "grid_x" and "grid_y" fields. (GridDialogSetup): add widgets to set "grid_x" and "grid_y" fields. (GridDialogClose): set "grid_x" and "grid_y" fields. (scale_tab_setup_item): remove redundant function call "getobj()" for "div" fields. (scale_tab_setup_item): get "auto_scale_margin" field. (AxisDialogFile): remove second argument for "get_auto_scale" field. (scale_tab_create): add widget to set "auto_scale_margin" field. (scale_tab_set_value): set "auto_scale_margin" field. (CmAxisZoom): now 3rd argument for "scale" field is 0. * src/gtk/x11commn.c (FileAutoScale): remove second argument for "auto_scale" field. * demo/demo.ngp (dialog): don't clear graph before exit demonstration. * demo/demo4.ngp.in: use "axisgrid" instead of "path" to show grid line. * src/math/math_basic_function.c (mjd): check parameters "m" and "d". * src/gtk/ox11menu.c (get_palette): initialize variable "palette" as NULL. 2011-06-10 Ito Hiroyuki * src/gtk/ox11menu.c (gtkmenu): add argument for the field "lib_version". (mx_show_lib_version): add prefix for the output strings. * src/gtk/x11view.c (ViewerPopupMenu, CmEditMenuCB) (CmViewerButtonArm): use "GPOINTER_TO_INT()" to get data. * src/gtk/x11print.c (CmOutputMenu): use "GPOINTER_TO_INT()" to get data. * src/gtk/x11menu.c (toggle_view_cb, detach_toolbar): use "GPOINTER_TO_INT()" to get data. * src/gtk/x11graph.c (CmGraphNewMenu): use "GPOINTER_TO_INT()" to get data. 2011-06-08 Ito Hiroyuki * src/gtk/x11commn.c (get_new_axis_id): add argument "aobj". 2011-05-20 Ito Hiroyuki * src/ostring.c (utf8_string_slice, string_slice, string_match) (string_rindex, string_index, string_replace): added. (ostring): add field "slice", "replace", "index", "rindex" and "match". * src/oregexp.c (regexp_replace): added. (oregexp): add field "replace". * test/string_test.nsc: added. * src/math/math_basic_function.c (compare_double_with_prec): added. (math_func_eq, math_func_neq): add 3rd argument. use "compare_double_with_prec()". 2011-05-19 Ito Hiroyuki * src/math/math_parser.c (parse_argument_list): update "*buf" after call the function "g_realloc()". * src/object.c (array_reverse): added. * src/odarray.c (odarray): add field "reverse", "sum", "average", "RMS", "sdev", min", "max" and "slice". (calc_sum, calc_square_sum, darray_sum, darray_average) (darray_rms, darray_sdev, darray_min, darray_max): added. * src/oiarray.c (oarray_reverse, oarray_slice): added. (oiarray): add field "reverse", "sum", "average", "RMS", "sdev", min", "max" and "slice". (calc_sum, calc_square_sum, iarray_sum, iarray_average) (iarray_rms, iarray_sdev, iarray_min, iarray_max): added. * src/mathfn.c (bsearch_int): add braces after "if" statements. * src/osarray.c (osarray): add field "reverse" and "slice". (sarray_slice): added. 2011-05-18 Ito Hiroyuki * src/ofit.c (fituser): "MSERR" is not used. * src/ofile.c (errordisp, errordisp2): "MSERR" is not used. * src/oregexp.c (regexp_get): return 1 when failed. 2011-05-17 Ito Hiroyuki * test/iarray_test.nsc: added. * test/darray_test.nsc: added. * test/sarray_test.nsc: added. * test/regexp_test.nsc: added. * initfile/save_ui_file.nsc: don't use external programs. * src/shellcm.c (cmecho): length of the output strings is now not limited. * src/object.c (cmp_func_int_r, arrayrsort_int, cmp_func_double) (cmp_func_double_r, arraysort_double, arrayrsort_double) (arrayuniq_double, cmp_func_str, cmp_func_str_r, arraysort_str) (arrayrsort_str, arrayuniq_str): added. (getvaluestr): use "g_string_append_printf()" instead of "sprintf()". * src/oio.c (io_eof): return value is depend on the return value of the function "feof()". * src/gtk/main.c (obj_add_func_ary): add "addregexp". * src/oiarray.c (oarray_get_array, oarray_num, oarray_seq) (iarraypop, iarrayunshift, iarrayshift, iarraysort, iarrayrsort) (iarrayuniq, iarrayjoin, oarray_reverse_seq): added (iarrayadd, iarrayins): use "oarray_get_array()". (oiarray): add fields "push", "pop", "unshift", "shift", "sort", "rsort", "uniq", "join", "seq" and "rseq". * src/odarray.c (darrayadd, darrayins): use "oarray_get_array()". (darraypop, darrayunshift, darrayshift, darraysort, darrayrsort) (darrayuniq, darrayjoin): added. (odarray): add fields "push", "pop", "unshift", "shift", "sort", "rsort", "uniq", "join", "seq" and "rseq". * src/osarray.c (sarrayadd, sarrayins): use "oarray_get_array()". (sarraypop, sarrayunshift, sarrayshift, sarraysort, sarrayrsort) (sarrayuniq): added. (osarray): add fields "push", "pop", "unshift", "shift", "sort", "rsort" and "uniq". * src/oregexp.c: added. 2011-05-16 Ito Hiroyuki * src/ostring.c (string_strip, set_length, string_upcase) (string_downcase, string_reverse): added. (ostring): add field "byte", "length", "strip", "upcase", "downcase" and "reverse". * src/odarray.c (odarray): add field "seq" and "rseq". (odarray): use "oarray_num()", "oarray_seq()" and "oarray_reverse_seq()". * src/oiarray.c (oarray_num): change name from "iarraunum()". (oarray_seq, oarray_rseq): added. (oiarray): add field "seq"and "rseq". (oiarray): use "oarray_num()", "oarray_seq()" and "oarray_reverse_seq()". * src/osarray.c (ERRREGEXP, set_delimiter, sarraysplit) (sarrayjoin): added. (sarrayinit): initialize field "_local". (sarraydone): finalize field "_local". (osarray): add fields "delimiter", "split", "seq", "rseq" and "join". (osarray): use "oarray_num()", "oarray_seq()" and "oarray_reverse_seq()". * src/object.c (arrayins2, arrayput2): use "g_strdup()" instead of "g_malloc()" and "strcpy()". 2011-05-13 Ito Hiroyuki * src/gtk/x11menu.c (ActionEntry): fix callback function (from "CmOutputMenu()" to "CmViewerClear()"). * src/gtk/x11opt.c (CmOptionSaveNgp): fix window title. 2011-05-10 Ito Hiroyuki * initfile/Ngraph.ini.win (palette): added. * initfile/Ngraph.ini.in (palette): added. * src/gtk/ox11menu.h (menulocal): add member "Palette". * src/gtk/ox11menu.c (MenuConfigOthers): change name from "MenuConfigExportImage". Add setting "palette". (get_palette, set_palette): added. (menu_save_config): call "get_palette()" before call "menu_save_config_sub()" when "type & SAVE_CONFIG_TYPE_OTHERS" is true. (menuinit): call "set_palette()". 2011-05-09 Ito Hiroyuki * src/gtk/x11dialg.c: add braces after "if" statements. 2011-05-01 Ito Hiroyuki * src/gtk/x11view.c (UnFocus): use "gtk_widget_queue_draw()" instead of "gdk_window_invalidate_rect()". 2011-04-29 Ito Hiroyuki * src/gtk/x11view.c (UnFocus): call "gdk_window_invalidate_rect()". 2011-04-28 Ito Hiroyuki * src/gtk/x11file.c (CmFileNew, CmFileOpen, CmFileClose) (CmFileUpdate, CmFileEdit, CmFileMath): add parameters "GtkAction *w" and "gpointer client_data". (FileWinFileDraw): call "CmViewerDraw()" instead of "CmViewerDrawB()". (CmFileMenu): removed. (GetDrawFiles, CmFileSaveData): moved from "x11print.c". * src/gtk/x11view.c (ViewerEvKeyUp): call "reset_drag_info()" only when "CLEAR_DRAG_INFO" is true. (graph_dropped, ViewerEvKeyDown): call "CmViewerDraw()" instead of "CmViewerDrawB()". (CmViewerDraw, CmViewerClear): add parameters "GtkAction *w" and "gpointer client_data". (CmViewerDraw): second parameter represents if select files before drawing or not. * src/gtk/x11opt.c (CmOptionSaveNgp, CmOptionViewer) (CmOptionExtViewer, CmOptionPrefFont, CmOptionScript) (CmOptionMisc, CmOptionSaveDefault): add parameters "GtkAction *w" and "gpointer client_data". (CmOptionMenu): removed. * src/gtk/x11merge.c (CmMergeOpen, CmMergeClose, CmMergeUpdate): add parameters "GtkAction *w" and "gpointer client_data". (CmMergeMenu, MergeWinMergeOpen): removed. * src/gtk/x11axis.c (CmAxisNewFrame, CmAxisNewSection) (CmAxisNewCross, CmAxisNewSingle, CmAxisDel, CmAxisUpdate) (CmAxisZoom, CmAxisClear, CmAxisGridNew, CmAxisGridDel) (CmAxisGridUpdate, CmAxisScaleUndo): add parameters "GtkAction *w" and "gpointer client_data". (CmAxisMenu, CmGridMenu): removed. * src/gtk/x11print.c (CmOutputViewer): removed. (CmOutputViewerB): merged with the function "CmOutputViewer()". (CmOutputViewerB): never call "SetFileHidden()". (CmPrintGRAFile, CmOutputImage): static function. (CmOutputMenu): remove unused case. * src/gtk/x11lgnd.c (CmLineDel, CmLineUpdate, CmRectDel) (CmRectUpdate, CmArcDel, CmArcUpdate, CmMarkDel, CmMarkUpdate) (CmTextDel, CmOptionTextDef): add parameters "GtkAction *w" and "gpointer client_data". (CmLineMenu, CmRectangleMenu, CmArcMenu, CmMarkMenu, CmTextMenu): removed. * src/gtk/x11menu.h (MenuID): remove unused items. 2011-04-23 Ito Hiroyuki * src/gtk/main.c (main): call "g_mem_set_vtable()" when "USE_MEM_PROFILE" is true. * src/osystem.c (system_mem_profile): added. (nsystem): add field "mem_profile" when "USE_MEM_PROFILE" is true. * src/common.h (USE_MEM_PROFILE): added. 2011-04-21 Ito Hiroyuki * src/gtk/main.c (obj_member_completion_function) (my_completion_function): use "strdup()" to create return value. * src/gtk/gtk_ruler.c (nruler_destroy): remove unused parameter "event". (ruler_new): function "nruler_destroy()" is now connected to the "unrealize" signal. 2011-04-20 Ito Hiroyuki * src/object.c (arrayadd): check if the parameter "val" is NULL or not. * src/oroot.c (oputstyle): when size of the array is 1, it is as same as the array has the same two elements. * src/gtk/x11dialg.c (SetObjPointsFromText) (SetObjFieldFromStyle): call "gtk_widget_grab_focus()" when an error is occurred. 2011-04-15 Ito Hiroyuki * src/gtk/x11menu.c (setupwindow, create_message_box): exchange position of messages. * src/gtk/x11view.c (move_focus_frame, viewer_key_scroll): added. (ViewerEvKeyDown): use "move_focus_frame()" and "viewer_key_scroll()". (set_drag_info, reset_drag_info): added. (SetPoint, move_focus_frame): use "set_drag_info()". (ViewerEvKeyUp): call "reset_drag_info()" * pixmap/Makefile.am (EXTRA_DIST): add pixmaps ngraph_align_b.png, ngraph_align_hc.png, ngraph_align_l.png, ngraph_align_r.png, ngraph_align_t.png and ngraph_align_vc.png 2011-04-11 Ito Hiroyuki * src/gtk/x11menu.c (ActionEntry): fix typo (from "_Right" to "_Bottom"). 2011-04-06 Ito Hiroyuki * src/gtk/x11gui.c (check_overwrite): moved from x11commn.c. * src/gtk/x11view.c (SetPoint): moved from x11menu.c. (CmViewerClearB): removed. * src/gtk/x11axis.c (check_axis_history): static function. * src/gtk/x11print.c (GetDrawFiles): moved from x11commn.c. (CmOutputDriverB): removed. * src/gtk/x11menu.c (SaveHistory): moved from x11commn.c. * src/gtk/x11lgndx.c (get_radio_index): moved from x11dialg.c. 2011-04-03 Ito Hiroyuki * src/ofile.c (f2dsettings): fix infinite loop. * src/gtk/gtk_common.h (CAIRO_COORDINATE_OFFSET): always 0. * src/gtk/main.c (main): don't call "gtk_set_locale()" when version of the GTK+ is greater than 2.24. * src/gtk/x11gui.c (DialogExecute): use "gtk_widget_hide()" instead of "gtk_widget_hide_all()". * src/gtk/x11dialg.c (SetObjFieldFromWidget) (SetWidgetFromObjField): use "gtk_combo_box_get_has_entry()" when version of the GTK+ is greater than 2.24. * src/gtk/x11view.c (ViewerWinSetup, ShowCrossGauge, SetHRuler) (SetVRuler): use "gdk_window_get_width()" and "gdk_window_get_height()" when version of the GTK+ is greater than 2.24. (ChangeDPI, draw_paper_frame): use "gdk_pixmap_get_size()" when version of the GTK+ is greater than 2.24. * src/gtk/ogra2x11.c (gtkchangedpi): use "gdk_pixmap_get_size()" when version of the GTK+ is greater than 2.24. * src/gtk/x11graph.c (CmHelpAbout): don't call "gtk_about_dialog_set_url_hook()" when version of the GTK+ is greater than 2.24. * src/gtk/gtk_subwin.c (sub_window_minimize): use "gtk_widget_hide()" instead of "gtk_widget_hide_all()". * src/gtk/gtk_combo.c (combo_box_entry_create): use "gtk_combo_box_new_with_entry()" and "gtk_combo_box_set_entry_text_column()" when version of the GTK+ is greater than 2.24. * src/gtk/gtk_ruler.c (nruler_make_pixmap): use "gdk_pixmap_get_size()" when version of the GTK+ is greater than 2.24. 2011-04-01 Ito Hiroyuki * src/gtk/x11menu.h (Viewer): change type of members "VRuler" and "HRuler". * src/gtk/gtk_ruler.c (_Nruler): remove member "widget". (ruler_new): call "g_object_set_data()" to save data. (nruler_set_range, nruler_set_position): use "g_object_get_data()" to get data. (nruler_make_pixmap, nruler_draw_ticks): add parameter "widget". (nruler_draw_ticks): remove redundant call of the function "pango_layout_get_extents()". * src/gtk/gtk_common.h (CAIRO_COORDINATE_OFFSET): always 1. * src/gtk/x11view.c (coord_conv_x, coord_conv_y): add CAIRO_COORDINATE_OFFSET. * src/gtk/ogra2x11.c (clear_pixmap): use "cairo_paint()" instead of "cairo_rectangle()" and "cairo_fill()". * src/gtk/x11lgnd.c (draw_arrow_pixmap, LegendArrowDialogPaint): use "cairo_paint()" instead of "cairo_rectangle()" and "cairo_fill()". * src/gtk/ogra2cairofile.c (create_cairo): use "cairo_paint()" instead of "cairo_rectangle()" and "cairo_fill()". * src/gtk/x11lgndx.c (LegendGaussDialogPaint): use "cairo_paint()" instead of "cairo_rectangle()" and "cairo_fill()". 2011-03-31 Ito Hiroyuki * src/gtk/x11view.c (mouse_down_zoom): improve calculation of dpi. (ChangeDPI): remove parameter. (create_legend1, create_path, create_legend3, create_legendx) (create_single_axis, create_axis): call "UpdateAll()". (ViewerEvLButtonDblClk): don't call "UpdateAll()". * src/gtk/x11opt.c (CmOptionViewer): simplify condition. 2011-03-30 Ito Hiroyuki * src/gtk/Makefile.am (libngraph_la_SOURCES): add "gtk_ruler.c" and "gtk_ruler.h". * src/gtk/gtk_ruler.h: added. * src/gtk/gtk_ruler.c: added. * src/gtk/ox11menu.h (menulocal): remove unused members "scrollx", "scrolly", "pixel_dot", "offsetx" and "offsety". * src/gtk/ox11menu.c (mx_redraw): call "draw_paper_frame()" after call "mxflush()". (mx_clear): use "Menulocal.local->cairo". (mx_clear): use "cairo_paint()" when clear whole drawing area. * src/gtk/x11view.c (ViewerEvSize): remove unused codes. (ViewerEvPaint): use "nround()" to get coordinate. (SetHRuler, SetVRuler): use "nruler_set_range()" instead of "gtk_ruler_set_range()". (create_pix): size of the pixmap is now "(w + 1) x (h + 1)". (create_pix): use "cairo_paint()" instead of "cairo_rectangle()" and "cairo_fill()". (create_pix): don't call "draw_paper_frame()". (ChangeDPI): size of drawing area is now "(w - 1) x (h - 1)". (draw_paper_frame): use "gdk_drawable_get_size()" to get size of the pixmap. (draw_paper_frame): call "cairo_reset_clip()" before drawing. * src/gtk/x11menu.h (Viewer): change type of members "VRuler" and "HRuler". remove unused members "width" and "height". * src/gtk/x11menu.c (setupwindow): use "hruler_new()" and "vruler_new()". (SetPoint): use "nruler_set_position()" instead of "g_object_set()". * src/gtk/ogra2gdk.c (gra2gdk_create_pixmap): use "cairo_paint()" instead of "cairo_rectangle()" and "cairo_fill()". 2011-03-28 Ito Hiroyuki * src/gtk/x11view.c (SetHRuler, SetVRuler): keep position of the ruler. 2011-03-25 Ito Hiroyuki * src/gtk/x11view.c (ViewerWinSetup): initialize "d->KeyMask". (Evaluate, Trimming, Match, DelList, GetLargeFrame) (coord_conv_x, coord_conv_y, GetFocusFrame, ShowFocusFrame) (show_focus_line_arc, draw_frame_rect, draw_focus_line) (ShowFocusLine, ShowPoints, ShowFrameRect, ShowCrossGauge): add parameter "struct Viewer *" or "const struct Viewer *". (mouse_down_move_data): remove unused parameter "TPoint *dpoint". (ViewerWinUpdate): remove unused parameter "int clear". (ShowFocusLine, show_focus_line_arc): remove unused parameter "int clear" and "unsigned int state". (show_focus_line_arc): remove unused variable "clear". (ViewerEvMouseMove, ViewerEvButtonDown, ViewerEvButtonUp): save "d->KeyMask". * src/gtk/x11menu.h (struct Viewer): add member "KeyMask". * src/gtk/x11menu.c (set_focus_sensitivity): change type of the parameter to "const struct Viewer *". 2011-03-24 Ito Hiroyuki * src/gtk/ox11menu.c (mx_show_lib_version): show version of the readline library and GSL. * src/gtk/x11print.c (CmPrintDataFile): update progress dialog. 2011-03-23 Ito Hiroyuki * src/gtk/x11print.c (CmOutputViewer): execute "present" field of the "gra2gtk" object. * src/gtk/ox11menu.c (menuinit): use "gra2cairo_set_antialias()" to set antialias. (mx_show_lib_version): added. (gtkmenu): add field "lib_version", remove fields "GTK_compile_version" and "GTK_runtime_version". * src/gtk/x11view.c (draw_paper_frame): use "CAIRO_COORDINATE_OFFSET". (ViewerEvLButtonDown, ViewerEvRButtonDown, CmViewerButtonArm): call "gtk_widget_queue_draw()". (ViewerEvMouseMove): call "gtk_widget_queue_draw()" when "d->Mode & POINT_TYPE_DRAW_ALL"is true. (create_pix): use "gra2cairo_set_antialias()" to set antialias. * src/gtk/x11lgndx.c (LegendGaussDialogPaint): use "CAIRO_COORDINATE_OFFSET". * src/gtk/x11lgnd.c (draw_arrow_pixmap, LegendArrowDialogPaint): use "CAIRO_COORDINATE_OFFSET". * src/gtk/gtk_common.h (CAIRO_COORDINATE_OFFSET): added. * src/gtk/ogra2x11.c (gtkpresent): added. (gra2gtk): add field "present". (gtkMakeRuler): use "CAIRO_COORDINATE_OFFSET". 2011-03-22 Ito Hiroyuki * src/gtk/x11print.c (CmOutputViewer): range of color is 0.0 to 1.0. * src/gtk/ox11menu.h (menulocal): remove members "win", "gc" and "do_not_use_arc_for_draft". (menulocal): change type of members "bg_r", "bg_g" and "bg_b" from int to double. * src/gtk/x11lgnd.c (draw_arrow_pixmap, LegendArrowDialogPaint): use cairo to draw graphics. * src/gtk/ox11menu.c (MenuConfigViewer): remove setting "do_not_use_arc_for_draft". (add_color_to_array, menu_config_set_bgcolor): range of color is 0.0 to 1.0. (mx_redraw): call "draw_paper_frame()" before call "GRAredraw()". (mx_redraw, mxdpi, mxclear): use "NgraphApp.Viewer.gdk_win" instead of "Menulocal.win". (mx_clear): use cairo to draw graphics. * src/gtk/x11view.c (GRAY, DOT_LENGTH, create_cairo) (draw_cairo_arc): added. (paste_cb, text_dropped, mouse_down_point, init_zoom) (mouse_down_move, mouse_up_point, mouse_up_drag, mouse_up_zoom) (mouse_up_change, mouse_up_lgend1, mouse_up_lgend2) (update_frame_rect, mouse_move_drag, mouse_move_zoom) (mouse_move_change, mouse_move_draw, ViewerEvMouseMove) (ViewerEvKeyDown, ViewerEvKeyUp, UnFocus, Draw, ViewUpdate) (ViewCopy, ViewCross): don't call "ShowFocusFrame()", "ShowPoints()", "ShowFocusLine()", "ShowFrameRect()" or "ShowCrossGauge()". (ShowFocusFrame, show_focus_line_arc, draw_frame_rect) (draw_focus_line, ShowFocusLine, ShowPoints, ShowFrameRect) (ShowCrossGauge, ViewerEvPaint, create_pix, draw_paper_frame): use cairo to draw graphics. (ViewerEvPaint): always redraw pixmap. (ViewerEvMouseMove): call "gtk_widget_queue_draw()" if necessary. (show_focus_line_arc, draw_focus_line): call "cairo_close_path()" if necessary. (draw_focus_line): add parameter "close_path". (ViewDelete): fix memory leak. * src/gtk/gtk_common.h: include "cairo/cairo.h". * src/gtk/x11opt.c (ViewerDialogSetupItem, ViewerDialogClose): range of color is 0.0 to 1.0. * src/gtk/x11lgndx.c (LegendGaussDialogPaint): use cairo to draw graphics. (LegendGaussDialogPaint): change background color depend on the setting. * src/gtk/ogra2x11.c (gtklocal): change type of members "bg_r", "bg_g" and "bg_b" from int to double. (gtklocal): remove member "gc". (gtkevpaint, gtkMakeRuler): use cairo. (clear_pixmap): added. (gtkclear, gtkchangedpi): use "clear_pixmap()". (get_color): return 0.0 to 1.0 instead of 0 to 255. * src/gtk/ogra2gdk.c (gra2gdk_create_pixmap): change type of parameters "r", "g" and "b" from int to double. 2011-03-15 Ito Hiroyuki * src/ofit.c (fitpoly, fituser): use enumerate for return code. 2011-03-14 Ito Hiroyuki * src/ofile.c (get_axis_prm): added. (opendata, f2dgetcoord): use "get_axis_prm()". (ofile_create_math_equation, set_const): add constants "AXISX", "AXISY" and "FLINE". * src/gtk/x11commn.c (AxisDel2): use "g_strdup_printf()" instead of "snprintf()". 2011-03-11 Ito Hiroyuki * src/gtk/x11view.c (search_axis_group): added. (ViewUpdate, ViewCopyAxis): use "search_axis_group()". * src/gtk/x11commn.c (get_new_axis_id): added. (AxisDel2): use "get_new_axis_id()". 2011-03-10 Ito Hiroyuki * src/gtk/x11commn.c (AxisDel2): use "get_axis_id()". * src/gtk/x11view.c (ViewUpdate, ViewCopyAxis): use "get_axis_id()". (ViewUpdate): bug fix: id of the axis object to delete is not "aid" but "id" when "type == 'c'". * src/ofile.c (get_axis_id): added. (opendata, f2dgetcoord, f2dsettings, f2dbounding): use "get_axis_id()". 2011-03-09 Ito Hiroyuki * src/gtk/x11view.c (mouse_up_drag): invert logic and fix indent. (ViewerWinUpdate): set and restore "PaintLock". (ViewerWinUpdate): don't check "region" when "d->allclear" is true. 2011-03-08 Ito Hiroyuki * src/ofile.c (ofile_create_math_equation, set_const): add constants "COLX", "COLY", "HSKIP" and "RSTEP". 2011-03-04 Ito Hiroyuki * src/gtk/x11menu.c (ActionEntry): add callback to actions "GraphDrawOrderAction" and "GraphPageSetupAction". * src/gtk/gtk_subwin.h (NgraphActionEntry): moved from "x11menu.c". * src/gtk/x11graph.c (CmGraphLoadB, CmGraphSaveB, CmGraphMenu) (CmHelpMenu): removed. 2011-03-02 Ito Hiroyuki * src/gtk/x11menu.c (application): call "gtk_ui_manager_ensure_update()" after add ui. 2011-03-01 Ito Hiroyuki * src/gtk/x11cood.c (CoordWinUpdate): don't set type to the variable "d->type." * src/gtk/x11lgnd.c (CmLegendWindow): don't set type to the variable "d->type." * src/gtk/x11merge.c (CmMergeWindow): don't set type to the variable "d->type." * src/gtk/x11info.c (create_win, InfoWinUpdate): don't set type to the variable "d->type." * src/gtk/x11axis.c (CmAxisWindow): don't set type to the variable "d->type." * src/math/math_parser.c (parse_argument_list): reallocate memory for arguments if necessary. * src/gtk/x11file.c (CmFileHistory, CmFileNew): call "AddDataFileList()" only when the file is really opened. (update_file_obj_multi): call "AddDataFileList()" when "new_file" is TRUE and the file is really opened. (CmFileOpen): don't call "AddDataFileList()". (CmFileWindow): don't set type to the variable "d->type." * src/gtk/x11view.c (new_file_obj): call "AddDataFileList()" only when the file is really opened. * src/gtk/x11opt.c (PrefScriptDialogClose): call "create_addin_menu()". * src/gtk/x11commn.c (AddDataFileList): check if the file name is valid UTF-8 string or not. (AddDataFileList): call "create_recent_data_menu()". * src/gtk/x11menu.c (show_graph_menu, show_data_menu): removed. (application): call "create_addin_menu()" and "create_recent_data_menu()" after create UI. (create_addin_menu, create_recent_data_menu): remove parameter. (init_ngraph_app_struct): initialize "type" member of each struct. 2011-02-25 Ito Hiroyuki * addin/cal.nsc: fix argument for "menu::show_window". * src/gtk/x11menu.c (ActionEntry): fix callback functions. 2011-02-24 Ito Hiroyuki * src/gtk/x11menu.c (show_ui_definition): use "printfstdout()". * src/gtk/ox11menu.c (mx_get_accel_map): use "putstderr()" and "printfstdout()". * initfile/save_ui_file.nsc: NgraphUI.xml.win is automatically generated. 2011-02-23 Ito Hiroyuki * src/gtk/ox11menu.c (mx_get_ui, mx_get_accel_map): added. (gtkmenu): add fields "get_ui" and "get_accel_map". * src/gtk/x11menu.c (read_keymap_file): read keymap file in the "CONFDIR". (show_ui_definition): added. * initfile/Makefile.am (update_ui_file): add rule. * initfile/save_ui_file.nsc: added. * initfile/NgraphUI.xml.win: added. 2011-02-22 Ito Hiroyuki * initfile/NgraphUI.xml: added. * src/object.c (set_newobj_cb, set_delobj_cb): added. (newobj_alias): call "NewObjCB()" when "NewObjCB" is not NULL. (delobj): call "DelObjCB()" when "DelObjCB" is not NULL. * src/gtk/main.c (set_dir_defs): add setting for "PIXMAPDIR". * src/gtk/x11lgnd.c (CmLegendWindow): type of the first argument is "GtkToggleAction *". (CmLegendWindow): visibility is depend on the state of the action. * src/gtk/x11cood.c (CmCoordinateWindow): type of the first argument is "GtkToggleAction *". (CmCoordinateWindow): visibility is depend on the state of the action. * src/gtk/ox11menu.c (subwindow_show, subwindow_hide): removed. (mx_show_win, mx_hide_win): use "window_action_set_active()". (mx_toggle_win): use "window_action_toggle()". * src/gtk/x11file.c (CmFileHistory): get identifier of the history entry from second argument. (CmFileOpen): check number of instances. (update_file_obj_multi): don't call "set_graph_modified()" when "new_file" is TRUE and "ret" is "IDDELETE". (CmFileWindow): type of the first argument is "GtkToggleAction *". (CmFileWindow): visibility is depend on the state of the action. * src/gtk/x11view.c (ViewerEvPopupMenu, ViewerPopupMenu) (create_menu, create_popup_menu): removed. (ShowFocusFrame): call "set_focus_sensitivity()". (clear_focus_obj): type of the argument is "struct Viewer *". (clear_focus_obj): call "set_focus_sensitivity()". (ViewerPopupMenu): remove unused case. (CmViewerButtonArm): data point button can be default. * src/gtk/x11menu.h (Viewer): remove members "PToolbar", "CToolbar" and "popup_item". * src/gtk/x11menu.c (ActionEntry, create_action_group) (reate_ui_from_file): added. (application): use "GtkUIManager" to make the menu and toolbars. (set_focus_sensitivity, set_btn_press_cb, get_toolbar) (set_toolbar_caption, show_graph_menu, show_data_menu) (check_instance, check_exist_instances) (window_action_set_active, window_action_toggle) (create_action_group): added. (CmReloadWindowConfig): use "window_action_set_active". * src/gtk/x11opt.c (PrefScriptDialogClose): don't update "add-in" menu. * src/gtk/x11graph.c (CmGraphHistory): check "uri" is NULL or not. * src/gtk/x11merge.c (CmMergeWindow): type of the first argument is "GtkToggleAction *". (CmMergeWindow): visibility is depend on the state of the action. * src/gtk/x11info.c (InfoWinUpdate): type of the first argument is "GtkToggleAction *". (InfoWinUpdate): visibility is depend on the state of the action. * src/gtk/dir_defs.h.in (PIXMAPDIR): added. * src/gtk/gtk_subwin.c (sub_window_hide, sub_window_show): static function. (sub_window_set_visibility): added. (sub_window_toggle_visibility): removed. (cb_del): use "window_action_set_active()". * src/gtk/Makefile.am (pixmapdir): added. (dir_defs.h): add pixmapdir setting. * src/gtk/x11axis.c (CmAxisWindow): type of the first argument is "GtkToggleAction *". (CmAxisWindow): visibility is depend on the state of the action. * pixmap/Makefile.am: added. * mingw/windows_make.sed: add command for pixmap directory. * configure.in (AC_CONFIG_FILES): add "pixmap/Makefile". * Makefile.am (SUBDIRS): add directory "pixmap". 2011-02-08 Ito Hiroyuki * src/math/math_basic_function.c (math_func_for): don't set first argument to the memory when the argument is negative value. * src/gtk/ox11menu.c (menuinit): initialize fields "GTK_compile_version" and "GTK_runtime_version". (gtkmenu): add fields "GTK_compile_version" and "GTK_runtime_version". * src/gtk/x11print.c (CmOutputPrinter): use "GTK_CHECK_VERSION()". * src/gtk/x11menu.c (create_graphmenu, create_toolbar): use "GTK_CHECK_VERSION()". * src/gtk/x11lgnd.c (create_character_view): use "GTK_CHECK_VERSION()". * src/gtk/x11dialg.c: use "GTK_CHECK_VERSION()". * src/gtk/gtk_common.h: use "GTK_CHECK_VERSION()". 2011-02-04 Ito Hiroyuki * src/math/math_function.rb: add comment after case labels. * src/math/math_function.h.in: fix indent. 2011-02-03 Ito Hiroyuki * src/gtk/gtk_subwin.c (hide_minimize_menu_item): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/Makefile.am (libngraph_la_CFLAGS): add option "-DGSEAL_ENABLE=1". * src/gtk/ogra2gdk.c (gra2gdk_create_pixmap): check if the variable "drawable" is NULL or not. * src/gtk/x11axis.c (AxisPosDialogRef): removed. (position_tab_create): use "AxisDialogRef()" for "changed" signal. (AxisDialogRef): set empty text when the index of the active item is 0. (position_tab_setup_item, scale_tab_setup_item): add item "none" to the GtkComboBoxEntry widget. * src/gtk/gtk_widget.c (show_color_sel): use "GTK_COLOR_SELECTION_DIALOG_GET_COLOR_SELECTION()". * src/gtk/x11gui.c (DialogExecute, DialogInput, DialogRadio) (DialogCombo, DialogComboEntry, DialogSpinEntry, DialogCheck) (FileSelectionDialog): use "GTK_DIALOG_GET_CONTENT_AREA()". * src/gtk/x11view.c (paste_cb, ViewerWinSetup, create_pix) (OpenGC): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/x11menu.c (create_markpixmap): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/x11lgndx.c (clear_view, LegendGaussDialogPaint): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/x11lgnd.c (draw_arrow_pixmap, LegendArrowDialogPaint): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/x11gui.c (get_window_geometry): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/x11file.c (select_color): use "GTK_COLOR_SELECTION_DIALOG_GET_COLOR_SELECTION()". (draw_type_pixbuf): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/ogra2x11.c (gtkinit): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/gtk_subwin.c (sub_window_save_geometry) (sub_window_minimize): use "GTK_WIDGET_GET_WINDOW()". * src/gtk/x11view.c (ViewerWinSetup): use "GTK_WIDGET_SET_CAN_FOCUS()". * src/gtk/gtk_common.h (GTK_WIDGET_GET_WINDOW) (GTK_DIALOG_GET_CONTENT_AREA, GTK_WIDGET_SET_CAN_FOCUS) (GTK_COLOR_SELECTION_DIALOG_GET_COLOR_SELECTION): added. 2011-02-02 Ito Hiroyuki * src/gtk/x11dialg.c (SetObjFieldFromWidget) (SetWidgetFromObjField, SetObjFieldFromStyle) (SetStyleFromObjField): use "gtk_bin_get_child()". * src/gtk/gtk_combo.c (combo_box_entry_create) (combo_box_entry_set_text, combo_box_entry_get_text): use "gtk_bin_get_child()". 2011-02-01 Ito Hiroyuki * zsh/Makefile.am (zsh_DATA): remove settings for gra2ps and gra2wmf. * driver/Makefile.am (ngraphconf_DATA): remove settings for gra2ps and gra2wmf. * debian/ngraph.bash: remove settings for gra2ps and gra2wmf. 2011-01-31 Ito Hiroyuki * test/math_test.nsc: don't create io object every time. * mingw/install.txt: update document. 2011-01-28 Ito Hiroyuki * src/ofile.c (set_data_progress): variable "msgbuf" is not static now. (solve_equation): variable "eq" is not static now. * src/gtk/ox11menu.c (mx_cat): variable "buf" is not static now. * src/gtk/x11view.c (check_focused_obj_type): check variables "axis", "merge", "legend" and "text" are NULL or not. * src/gtk/x11menu.c (find_gra2gdk_inst): remove first parameter. (find_gra2gdk_inst): variable "inxt" is not static now. (find_gra2gdk_inst): remove variable "local" and "onamek". 2011-01-27 Ito Hiroyuki * src/gtk/x11cood.c (CoordWinSetCoord): this function is now reentrant. 2011-01-26 Ito Hiroyuki * src/oaxis.c (get_axis_gauge_num_str): use "GString" to create format string. (get_axis_gauge_num_str): numbering string is now well formated such as "5.0×10^-7@". * src/gtk/x11cood.c (CoordWinSetCoord): use static variable to create information strings. (CoordWinSetCoord, CoordWinUpdate): type of the coordinate window is "SubWin". * src/gtk/x11commn.c (FileAutoScale): use "GString" to create argument string for "auto_scale" field. * src/gtk/x11menu.h (NgraphApp): the type of members "InfoWin" and "CoordWin" is "struct SubWin *". * src/gtk/x11menu.c (application): now "NgraphApp.InfoWin" and "NgraphApp.CoordWin" don't have the member "str". * src/gtk/x11info.c (create_win, InfoWinUpdate): type of the information window is "SubWin". * src/gtk/x11axis.c (AxisDialogFile): use "GString" to create argument string for "get_auto_scale" field. (set_num_format): added. (numbering_tab_set_value): use "set_num_format()". (axis_list_set_val): variable "len" is not used. 2011-01-24 Ito Hiroyuki * src/gra.c (GRAC, _GRAopencallback): use "directfunc". * src/gra.h (directfunc): typedefed. * src/ogra2nul.c (g2nuldone): call "_exeparent()". * src/ogra2.c (gra2done): check number of element of "sarray" when "GC" is not equal to -1. * src/ogra.c (oGRAopen): fix indent. (oGRAdrawparent): add parameter "oGRAargv". (oGRAdraw): "oGRAargv" is local variable now. 2011-01-21 Ito Hiroyuki * src/gtk/x11graph.c (SwitchDialogSetupItem) (switch_dialog_top_cb, switch_dialog_last_cb, SwitchDialogUp) (SwitchDialogDown, SwitchDialogClose): use "arraynget_int()". (SwitchDialogSetup): use "arraynget_str()". * src/gtk/x11axis.c (AxisDialogFile): use "arraynget_double()". * src/gtk/x11view.c (mouse_down_move_data, ViewUpdate) (ViewCopyAxis): use "arraylast_int()". (focus_new_insts, mask_selected_data, mouse_down_move_data): use "arraynget_int()". (Evaluate): use "arraynget_double()". * src/gtk/x11file.c (FileDialogFit, FileWinFit): use "arraylast_int()". (move_tab_setup_item): use "arraynget_int()" and "arraynget_double()". (move_tab_set_value, mask_tab_setup_item): use "arraynget_int()". * src/gtk/x11commn.c (AxisDel2, axis_move_each_obj, FitDel) (FitCopy, FitClear, FileAutoScale): use "arraylast_int()". * src/gtk/ox11dlg.c (dlgradio, dlgcombo): use "arraylast_int()". (get_sarray_argument): use "arraynget_int()". * src/ofile.c (opendata, get_fit_obj_id, f2dgetcoord) (f2dsettings, f2dbounding, f2dsave): use "arraylast_int()". * src/oagrid.c (get_grid_prm): use "arraylast_int()". * src/otext.c (textmatch): use "arraynget_int()". * src/oroot.c (obj_save_config_line_style): use "arraynget_int()". * src/orect.c (rectmatch): use "arraynget_int()". * src/opath.c (curvematch): use "arraynget_int()". * src/omerge.c (mergematch): use "arraynget_int()". * src/omark.c (markmatch): use "arraynget_int()". * src/olegend.c (legendmatch): use "arraynget_int()". * src/ogra2.c (gra2done, gra2disconnect): use "arraynget_str()". * src/ogra.c (oGRAdisconnect, oGRAopen): use "arraynget_str()". (oGRAopen): bug fix: use "arraylast_int()" instead of "*(char *)". * src/oaxis.c (get_axis_box, axismatch2, axisautoscalefile): use "arraynget_int()" and "arraynget_double()". (get_reference_parameter, axisadjust): use "arraylast_int()". * src/oarc.c (arcmatch): use "arraynget_int()". * src/nconfig.c (replaceconfig_match, replaceconfig): use "arraynget_int()". * src/object.c (arraynget_int, arraynget_double, arraynget_str) (arraylast_int): added. (getvaluestr): use "arraynget_int()", "arraynget_double()" and "arraynget_str()". (obj_do_tighten): use "arraylast_int()". 2011-01-20 Ito Hiroyuki * src/gtk/gtk_widget.c (show_color_sel): set tooltip text. * src/gtk/x11lgnd.c (LegendMarkCB): added. (CmMarkDel, CmMarkUpdate): use "LegendMarkCB". (legend_dialog_setup_item, LegendMarkDialogMark): use "button_set_mark_image()". (CmLineUpdate, CmRectUpdate, CmArcUpdate, CmMarkUpdate) (CmTextUpdate): don't use the variable "ret". * src/gtk/x11dialg.c (_set_color): set tooltip text. * src/gtk/x11file.c (button_set_mark_image): added. (MarkDialogSetup, plot_tab_setup_item, FileDialogMark): use "button_set_mark_image()". (MarkDialog): check "type". * src/gtk/x11commn.c (SetFileHidden): add braces after "for" statement. * src/gtk/x11merge.c (CmMergeUpdate): don't use the variable "ret". 2011-01-19 Ito Hiroyuki * src/object.h (n_value, N_VALUE): added. * src/object.h: use "N_VALUE *" instead of "char *" for an instance of an Ngraph object and return value of an object field. * src/gtk/ogra2gdk.c: ditto. * src/gtk/ogra2x11.c: ditto. * src/gtk/ogra2gdk.h: ditto. * src/gtk/x11lgndx.c: ditto. * src/gtk/ogra2cairofile.c: ditto. * src/gtk/x11graph.c: ditto. * src/gtk/ogra2gtkprint.c: ditto. * src/gtk/x11menu.c: ditto. * src/gtk/x11menu.h: ditto. * src/gtk/x11commn.c: ditto. * src/gtk/x11view.c: ditto. * src/gtk/x11file.c: ditto. * src/gtk/ox11menu.c: ditto. * src/gtk/ox11dlg.c: ditto. * src/gtk/ox11menu.h: ditto. * src/gtk/main.c: ditto. * src/gtk/x11print.c: ditto. * src/gtk/ogra2cairo.c: ditto. * src/gtk/ogra2cairo.h: ditto. * src/gra.c: ditto. * src/orect.c: ditto. * src/olegend.c: ditto. * src/gra.h: ditto. * src/osarray.c: ditto. * src/olegend.h: ditto. * src/ngraph.h: ditto. * src/ofile.c: ditto. * src/oroot.c: ditto. * src/oroot.h: ditto. * src/oint.c: ditto. * src/ogra2.c: ditto. * src/opath.c: ditto. * src/omerge.c: ditto. * src/ostring.c: ditto. * src/oio.c: ditto. * src/oshell.c: ditto. * src/ofit.c: ditto. * src/otext.c: ditto. * src/osystem.c: ditto. * src/object.c: ditto. * src/oiarray.c: ditto. * src/omath.c: ditto. * src/omark.c: ditto. * src/odraw.c: ditto. * src/odraw.h: ditto. * src/oarc.c: ditto. * src/ogra.c: ditto. * src/odouble.c: ditto. * src/ogra2prn.c: ditto. * src/odarray.c: ditto. * src/ogra2fil.c: ditto. * src/oagrid.c: ditto. * src/oprm.c: ditto. * src/oaxis.c: ditto. * src/ogra2nul.c: ditto 2011-01-17 Ito Hiroyuki * test/math_test_new.dat: add test for the the functions "push", "pop", "unshift" and "shift". * doc/html_ja/math.html: add documents about the functions "push", "pop", "unshift" and "shift". * src/math/math_basic_function.c (math_func_unshift) (math_func_shift, math_func_pop) (math_func_push): added. * src/math/math_function.h.in: add "push", "pop", "unshift" and "shift". * src/math/math_operator.rb: check coments. 2011-01-14 Ito Hiroyuki * src/opath.c (arrowdraw): check if the path should be closed or not. (draw_stroke): last parameter represents that the path should be closed or not. * src/ofile.c (draw_fit, curveoutfile): initialize variable "a". (curveout, curveoutfile): use "FREE_INTP_BUF()". (UPDATE_PROGRESS_LINE_NUM): added. (hskipdata, getdata_sub1, getdataraw): use "UPDATE_PROGRESS_LINE_NUM". 2010-12-24 Ito Hiroyuki * src/gtk/gtk_widget.c (color_button_key_event): added. (create_color_button): the function "color_button_key_event()" is connected to "key-press-event" and "key-release-event". 2010-12-23 Ito Hiroyuki * src/osystem.c (WEB): change url (sourceforge). * src/gtk/x11file.c (FitDialogSetSensitivity): show simple equation when the "type" is FIT_TYPE_POLY and "dim == 1". 2010-10-20 Ito Hiroyuki * src/ntime.c (append_date_str): format string for "%y" is "%02d". * src/gtk/x11lgnd.c (insert_selcted_char): focus entry widget after insert character. 2010-10-19 Ito Hiroyuki * src/object.c (error): add braces after "if" statements. 2010-10-15 Ito Hiroyuki * src/ofile.c (f2dredraw): check the "type" is "PLOT_TYPE_FIT" or not. 2010-10-14 Ito Hiroyuki * src/gtk/x11gui.c (DialogExecute): don't use "data->show_buttons". * src/gtk/x11file.c (MarkDialogSetup): show number of the mark as a tooltip. 2010-10-13 Ito Hiroyuki * addin/legend.tcl (savescript): don't set "fill_A" field. * src/gtk/x11file.c (draw_type_pixbuf): add braces after "if" statement. (create_type_color_combo_box): renamed from "create_type_combo_box()" . (create_type_combo_box): create only "type", "mark" and "interpolation" item. (start_editing_type): use "create_type_color_combo_box()". * src/gtk/gtk_liststore.c (create_object_cbox): added. (start_editing_obj): use "create_object_cbox()". 2010-10-07 Ito Hiroyuki * src/gtk/x11file.c (create_type_combo_box): change order of columns. (create_type_combo_box): use "OBJECT_COLUMN_TYPE_STRING", "OBJECT_COLUMN_TYPE_PIXBUF" and "OBJECT_COLUMN_TYPE_INT". (select_color): use "OBJECT_COLUMN_TYPE_INT". * src/gtk/gtk_liststore.h (OBJECT_COLUMN_TYPE_STRING) (OBJECT_COLUMN_TYPE_PIXBUF, OBJECT_COLUMN_TYPE_INT): added. * src/gtk/gtk_liststore.c (start_editing_obj): change order of columns. (start_editing_obj): use "OBJECT_COLUMN_TYPE_STRING", "OBJECT_COLUMN_TYPE_PIXBUF" and "OBJECT_COLUMN_TYPE_INT". 2010-10-06 Ito Hiroyuki * src/gtk/x11file.c (create_type_combo_box): show number of a merk type. 2010-09-22 Ito Hiroyuki * src/gtk/x11file.c (file_list_set_val): unref pixbuf. * src/gtk/x11commn.c (ProgressDialogFinalize): set NULL to "ProgressBar2". * src/gtk/x11menu.h (NgraphApp):remove members "swin" and "iconpix". * src/gtk/x11menu.c (create_icon): renamed from "createicon()". (create_icon): unref pixbufs. free "list". * src/gtk/gtk_subwin.c (sub_window_create): unref pixbufs. free "list". * src/ofit.c (fitput): use "math_equation_free()" instead of "g_free()". 2010-09-15 Ito Hiroyuki * src/gtk/gtk_widget.c (direction_icon_released): change direction from 360 to 0 or 0 to 360 when an icon is released. * src/gtk/x11lgnd.c (LegendArcDialogSetup): use "create_direction_entry()" instead of "create_spin_entry_type()". 2010-09-13 Ito Hiroyuki * src/ofile.c (put_func, rectout): fix indent. 2010-09-09 Ito Hiroyuki * src/math/math_function.h.in: add functions "cm". * src/math/math_basic_function.c (math_func_rm): added. 2010-09-08 Ito Hiroyuki * src/ntime.c (get_iso_8601_week): added. * src/gtk/main.c (main): don't set "LC_TIME". * src/math/math_basic_function.c (math_func_mjd2year) (math_func_mjd2month, math_func_mjd2day): use "mjd2gd()" in "ntime.c". (math_func_mjd2wday, math_func_mjd2yday): added. 2010-09-07 Ito Hiroyuki * src/oaxis.c (mjd_to_date_str): use "nstrftime()" instead of "strftime()". (get_axis_gauge_num_str): added. (numformat): use "get_axis_gauge_num_str()". * src/oprm.c (gettimeval2): meved from "ntime.c". * src/ntime.c (mjd2gd, append_date_str, nstrftime): added. * src/gtk/x11cood.c (CoordWinSetCoord): use "nstrftime()" instead of "strftime()". 2010-09-03 Ito Hiroyuki * src/ofile.c (lineout, curveout, stairout, draw_fit): set line style attribute when "EXPAND_DOTTED_LINE" is false. * src/gra.c (GRAreopen, _GRAclose, GRAclose, GRAcurvefirst): allocate , free and initialize "gdashlist" and so on only when "EXPAND_DOTTED_LINE" is treu. (GRAdashlinetod): expand dotted line only when "EXPAND_DOTTED_LINE" is treu. * src/gra.h (EXPAND_DOTTED_LINE): added. 2010-09-02 Ito Hiroyuki * src/nstring.c (get_printf_format_str): call "g_strdup()" after check the strings. * src/ofile.c (rectout): initialize "emig" and "emng". * src/gtk/gtk_widget.c (show_color_sel, create_color_button): check "Menulocal.use_opacity". * src/gtk/ogra2cairo.c (gra2cairo_init): initialize "local->use_opacity". (gra2cairo_output): check "local->use_opacity". (use_opacity): added. (gra2cairo): add field "use_opacity". * src/gtk/x11print.c (OutputImageDialogSetupItem): setup "d->use_opacity". (OutputImageDialogSetup): add widget to set "Use opacity". (OutputImageDialogClose): save setting of "d->use_opacity". (CmOutputImage): set opacity setting to "g2wobj". (CmOutputPrinter, CmOutputViewer): save setting of "Menulocal.use_opacity". * src/gtk/ox11menu.h (menulocal): add member "use_opacity". * src/gtk/x11dialg.h (MiscDialog, OutputImageDialog): add member "use_opacity". * src/gtk/ox11menu.c (menuinit): initialize opacity setting. (mxuse_opacity): added. (gtkmenu): add field "use_opacity". * src/gtk/x11dialg.c (_set_color, _putobj_color): check "Menulocal.use_opacity". * src/gtk/x11file.c (select_color): use opacity settings when "Menulocal.use_opacity" is treu. * src/gtk/x11opt.c (MiscDialogSetupItem): setup "d->use_opacity". (MiscDialogSetup): add widget to set "Use opacity". (MiscDialogClose): save setting of "d->use_opacity". * debian/control (Depends): use "${shlibs:Depends}". 2010-09-01 Ito Hiroyuki * src/nstring.c (add_printf_formated_str): free "format2". 2010-08-31 Ito Hiroyuki * src/gtk/x11file.c (select_color): set opacity. 2010-08-30 Ito Hiroyuki * src/ofile.c (f2ddata_buf, f2ddata): use "struct rgba" instead of "int". (file_alpha): added. (file_func): add function "ALPHA". (opendata): use fields "A" and "A2". (dataadd): add parameters "fa" and "a". * src/oaxis.c (axis): rename fields from "gauge_alpha" to "gauge_A" end "num_alpha" to "num_A". * src/oagrid.c (agridinit): initialize field "BA". (draw_background, agriddraw): remove parameter "alpha". (draw_background): use field "BA". (agriddraw): use field "A". (agrid): add field "BA". * src/oarc.c (arcinit): initialize field "stroke_A" and "fill_A". (arcdraw): use field "stroke_A" and "fill_A". (arc): add field "stroke_A" and "fill_A". * src/omark.c (markinit): initialize field "A2". (markdraw): use field "A" and "A2". (mark): add field "A2". * src/opath.c (arrowinit): initialize field "stroke_A" and "fill_A". (draw_stroke, draw_fill): remove parameter "alpha". (draw_stroke): use field "stroke_A". (draw_fill): use field "fill_A". (arrow): add field "stroke_A" and "fill_A". * src/olegend.c (put_color_for_backward_compatibility): set opacity. * src/orect.c (rectinit): initialize field "stroke_A" and "fill_A". (rectdraw): use field "stroke_A" and "fill_A". (rect): add field "stroke_A" and "fill_A". * src/gra.c (GRAmark): remove parameter "alpha". add parameter "fa" and "ba". * src/gtk/gtk_widget.c (show_color_sel, create_color_button): use opacity control. * src/gtk/x11dialg.c (_set_color, _putobj_color): setup opacity. * src/gtk/x11axis.c (opacity_setup): removed. 2010-08-27 Ito Hiroyuki * src/oaxis.c (axisinit): initialize field "gauge_alpha" and "num_alpha". (AxisConfig): add data "alpha", "gauge_alpha" and "num_alpha". (numbering): use field "num_alpha". (draw_gauge): use field "gauge_alpha". (axisdraw): use field "alpha". (axis): add fields "num_alpha" and "gauge_alpha". * src/oarc.c (arcdraw): use field "alpha". * src/omark.c (markdraw): use field "alpha". * src/otext.c (textdraw): use field "alpha". (TextConfig): add data "alpha". * src/opath.c (draw_stroke, draw_fill): add parameter "alpha". (arrowdraw): use field "alpha". * src/ofile.c (f2ddata): add member "alpha". (opendata): use field "alpha". (markout, lineout, curveout, rectout, errorbarout, stairout) (barout, draw_fit): use "fp->alpha". (FileConfig): add data "alpha". * src/oagrid.c (draw_background): add parameter "alpha". (agriddraw): use field "alpha". * src/odraw.c (drawinit): initialize field "alpha". (draw): add field "alpha". * src/orect.c (rectdraw): use field "alpha". * src/gra.c (GRAmark): add parameter "alpha". * src/gtk/x11lgnd.c (init_legend_dialog_widget_member): initialize "d->opacity". (legend_dialog_setup_item): setup "d->opacity". (legend_dialog_close): save opacity. (opacity_setup): added. (LegendArrowDialogSetup, LegendRectDialogSetup) (LegendArcDialogSetup, LegendMarkDialogSetup) (legend_dialog_setup_sub): add widget to set opacity. * src/gtk/x11file.c (plot_tab_setup_item): setup "d->opacity". (plot_tab_create): add widget to set opacity. (plot_tab_set_value): save opacity. * src/gtk/x11lgndx.c (LegendGaussDialogSetupItem): setup "d->opacity". (LegendGaussDialogSetup): add widget to set opacity. (LegendGaussDialogClose): save opacity. * src/gtk/x11axis.c (opacity_setup): added. (GridDialogSetupItem, baseline_tab_setup_item) (gauge_tab_setup_item, font_tab_setup_item): setup "d->opacity". (GridDialogSetup, baseline_tab_create, gauge_tab_create) (font_tab_create): add widget to set opacity. (GridDialogClose, baseline_tab_set_value, gauge_tab_set_value) (font_tab_set_value): save opacity. 2010-08-26 Ito Hiroyuki * src/oprm.c (prmload): don't use the field "num_jfont". (prmload): id of path object is not "pid" but "cid" when the type of the instance is "PATH_TYPE_CURVE". * src/gra.c (GRAcolor): add argument "alpha". (GRAC): add member "alpha". (GRAdraw): check "GRAClist[GC].alpha". * src/gtk/ogra2cairo.c (gra2cairo_output): use "cairo_set_source_rgba()" when the value "alpha" is less than 255. 2010-08-25 Ito Hiroyuki * src/gtk/ogra2cairo.c (gra2cairo_output): now 7th argument of "C" command means not only fill method but stroke. * src/oarc.c (get_pos): removed (arcdraw): use 7th argument of "C" command to draw stroke. 2010-08-19 Ito Hiroyuki * src/gra.c (GRAdrawtext, GRAtextextent): consider subscript strings for the calculation of new line position. 2010-08-18 Ito Hiroyuki * src/gra.c (GRAdrawtext, GRAtextextent): use "case" instead of "if". (GRAtextextent): bug fix: fix calculation of bounding box when "c[j] == '\n" and "scriptf != 0". (GRAtextextent, GRAtextextentraw): fix calculation of space. (get_str_bbox): fix treatment of '\' character. * src/gtk/ogra2cairo.c (gra2cairo_output): fix treatment of '\' character. 2010-08-17 Ito Hiroyuki * src/gtk/x11commn.c (LoadNgpFile, LoadPrmFile): call "set_axis_undo_button_sensitivity()". * src/gtk/x11graph.c (CmGraphNewMenu): call "set_axis_undo_button_sensitivity()". * src/gtk/gtk_liststore.c (list_store_set_align): added. * src/gtk/x11axis.c (axis_list_set_val): use "%g" instead of "%.2e" for format string of the function "snprintf()". (CmAxisWindow): call "list_store_set_align()" for columns AXIS_WIN_COL_MIN, AXIS_WIN_COL_MAX and. AXIS_WIN_COL_INC. 2010-07-16 Ito Hiroyuki * initfile/Ngraph.nsc: -n option works after all other options are managed. 2010-07-13 Ito Hiroyuki * src/gtk/x11lgnd.c (legend_dialog_close): save color of "d->color". 2010-07-09 Ito Hiroyuki * src/omath.c (math): remove fields "m00" to "m19". (mlocal): remove member "idpm". (msettbl, minit, mparam): now memories are not used. * src/math/math_basic_function.c (MATH_FUNCTION_MEMORY_NUM): added. (init_memory): added. (math_func_rm, math_func_m, math_func_for): use static variable "Memory". * src/math/math_equation.c (math_equation_clear): don't initialize "eq->memory". * src/math/math_equation.h (_math_equation): remove member "memory". * src/gtk/x11lgnd.c (create_character_panel): use "Menulocal.char_map". * src/gtk/ox11menu.c (MenuConfig): use "character_map" instead of "greece_character", "mathematics_character", "physics_character" and "misc_character". (save_char_map_config, menu_config_set_char_map): added. (menu_save_config_sub, mgtkloadconfig): add case for "MENU_CONFIG_TYPE_CHARMAP". (menulocal_finalize): free "Menulocal.char_map". 2010-07-08 Ito Hiroyuki * src/gtk/ox11menu.h (menulocal): add members "greece_char", "mathematics_char", "physics_char" and "misc_char". * src/gtk/ox11menu.c (MenuConfigMisc): "browser" and "help_browser" ins member of miscellaneous settings menu. (MenuConfig): append character selection data. * src/gtk/x11opt.c (FontSettingDialogClose): free returned string from the function "list_store_get_string()". * src/gtk/x11lgnd.c (insert_selcted_char, create_character_view) (create_character_panel): added. (LegendTextDialogSetup): append character selection panel. 2010-07-07 Ito Hiroyuki * initfile/Ngraph.ini.win: add alternative fonts settings. * src/gtk/ogra2cairo.c (free_font_map): free "d->alternative". (create_font_map): add 3rd argument "alternative". (gra2cairo_save_config): save alternative fonts. (loadconfig): load alternative fonts. (gra2cairo_add_fontmap): don't duplicate font names. (gra2cairo_set_alternative_font): added. (loadfont): use alternative fonts. * src/gtk/x11dialg.h (FontSettingDialog): added. * src/gtk/x11opt.c (FontSettingDialogSetupItem) (AlternativeFontListSelCb, get_font_family) (FontSettingDialogAddAlternative) (FontSettingDialogRemoveAlternative) (FontSettingDialogDownAlternative) (FontSettingDialogUpAlternative, FontSettingDialogSetup) (FontSettingDialogClose, FontSettingDialog): added (get_font_alias): type of the parameter is "struct FontSettingDialog *". (PrefFontDialogUpdate, PrefFontDialogAdd): use "FontSettingDialog". (PrefFontDialogSetupItem, PrefFontDialogSetup): show alternative fonts. 2010-07-02 Ito Hiroyuki * src/nstring.c (getitok, getitok2): type of the 3rd parameter is "const char *". (add_printf_formated_str): type of the 1st parameter is "GString *". * src/otext.c (textprintf): use "GString *" instead of "char *". * src/gra.c (GRAexpandobj, GRAexpandpf): use "GString *" instead of "char *". 2010-07-01 Ito Hiroyuki * src/ioutil.c (getrelativepath): use "GString *" instead of "char *". * src/gra.c (GRAexpandmath): use "GString *" instead of "char *". * src/ofile.c (f2dhead, f2dsave): use "GString *" instead of "char *". * src/oroot.c (osave): use "GString *" instead of "char *". * src/odraw.c (pathsave): use "GString *" instead of "char *". * src/oaxis.c (axis_save_group): use "GString *" instead of "char *". * src/ogra2prn.c (gra2p_output): use "GString *" instead of "char *". * src/shellcm.c (cmeval, cmread, cmdexpr): use "GString *" instead of "char *". * src/gtk/ogra2cairo.c (gra2cairo_output): use "g_unichar_to_utf8()"instead of "iso8859_to_utf8()". * src/gra.c (GRAtextextent, get_str_bbox): use "g_string_append_unichar()" (GRAdrawtext): convert string such as "\x31" to unicode character. * src/strconv.c (iso8859_to_utf8): removed. 2010-06-30 Ito Hiroyuki * src/gtk/x11dialg.c (set_entry_from_obj_point): use "GString *" instead of "char *". * src/gtk/x11file.c (load_tab_set_value): use "GString *" instead of "char *". * src/gtk/x11view.c (eval_dialog_copy_selected) (CopyFocusedObjects): use "GString *" instead of "char *". * src/gra.c (GRAtextextent, GRAexpandtext): use "GString *" instead of "char *". * src/ogra2nul.c (g2nul_strwidth): added. (g2nul_charwidth): removed. (gra2null): remove "_charwidth" field, add "_strwidth" field. * src/ogra.c (oGRAopen): use "_strwidth" field instead of "_charwidth" field. * src/gra.c (GRAC): remove "charwidth" member, add "strwidth" member. (_GRAopen, GRAopen): initialize "strwidth" member. (GRAstrwidth): added. (GRAcharwidth): removed. (GRAtextextent, GRAtextextentraw, get_str_bbox): use "GRAstrwidth()" instead of "GRAcharwidth()". * src/gtk/x11opt_proto.h (CREATE_NAME): call "gtk_scrolled_window_set_policy()". * src/gtk/ogra2cairo.c (gra2cairo): remove "_charwidth" field, add "_strwidth" field. (gra2cairo_strwidth): added. (gra2cairo_charwidth): removed. * src/gtk/ogra2cairofile.c (gra2cairofile): remove "_charwidth" field, add "_strwidth" field. * src/gtk/ogra2x11.c (gra2gtk): remove "_charwidth" field, add "_strwidth" field. 2010-06-28 Ito Hiroyuki * src/oprm.c (prminit, prmload): the field "symbol_greek" in not used now. (remarkconv): use UTF-8 string. (prm): the field "symbol_greek" is removed. * src/omerge.c (mergeinit, mergedraw, mergebbox): the field "symbol_greek" in not used now. * src/gra.c (GRAexpandtext, GRAdrawtext, GRAtextextent) (get_str_bbox): use "g_ascii_isxdigit()" instead of "isxdigit()". (GRAtextextent): use "g_ascii_xdigit_value()". (get_str_bbox): added. (GRAboundingbox): use "get_str_bbox()". (GRAinputold): just convert string from Shift-jis to UTF-8 when the variable "code" is 'K'. * src/gtk/x11dialg.h (MergeDialog, PrmDialog): the member "greek_symbol" is removed. * src/gtk/x11graph.c (PrmDialogSetup, PrmDialogClose): the field "symbol_greek" in not used now. * src/jnstring.c: removed. 2010-06-25 Ito Hiroyuki * initfile/Ngraph.ngp: change font settings. * initfile/Ngraph.ini.win: change font settings. * initfile/Ngraph.ini.in: change font settings. * driver/ngp2.in: remove "-wmf" option. * driver/Makefile.am (ngraphconfdir): gra2ps and gra2wmf are not used now. * src/ogra2nul.c (g2nul_charwidth, g2nul_charheight): check backward compatibility. (addgra2null): initialize "FontDataHash". * src/oaxis.c (AxisConfig): remove configuration "num_jfont", add configuration "num_font_style". (axisinit): "jfont" field does not exist now. (axis): add field "num_font_style". * src/jnstring.c (njis2jms, njms2euc, neuc2jms): removed. * src/shellcm.c (cmdexpr): remove old math related codes. * src/mathcode.c: remove old math related codes. * src/omath.c: remove old math related codes. * src/object.c (getargument): remove old math related codes. * src/otext.c (TextConfig): remove configuration "jfont". add configuration "style". (textinit): "jfont" field does not exist now. (textgeometry): check value of "style" field. (text): add field "style". * src/ofit.c: remove old math related codes. * src/mathfn.c: remove old math related functions. * src/opath.c (draw_stroke): arr parameter "intp". * src/shell.c (str_calc): remove old math related codes. * src/ofile.c: remove old math related codes. * src/gra.c (FONT_STYLE_NORMAL, FONT_STYLE_BOLD) (FONT_STYLE_ITALIC): added. (GRAC): add member "style". (GRAdraw, GRAcharwidth, GRAcharascent, GRAchardescent) (GRAtextstyle): 4th argument of the "H" command represents style of the font. (GRAoutkanji): removed. (GRAexpandmath): remove old math related codes. (GRAexpandtext): use "case" statement. (GRAdrawtext, GRAtextextent): add format command "\B", "\I" and "\N". (GRAtextextent, GRAtextextentraw): don't check "kanji" code. (GRAinputold): convert argument of the "S" command Shift-JI to UTF-8. * src/ioutil.c (getrelativepath): "cwd2" may not be Shift-JIS code. * src/gtk/ogra2cairo.h (compatible_font_info): added. * src/gtk/ogra2cairo.c (check_type, gra2cairo_get_font_type_str): removed. (create_font_map): don't save type, symbol and twobyte. (gra2cairo_save_config): save "font" configurations. remove "font-map" configurations. (loadconfig): load "font" configurations. (loadconfig): load "font-map" configurations only when the "font" configuration related to the font is not loaded yet. (init_conf): don't initialize "FontFace". (gra2cairo_update_fontmap, gra2cairo_add_fontmap): remove parameter "type" and "two_byte". (gra2cairo_done): save configurations when old configurations are used. (gra2cairo_get_compatible_font_info): add. (loadfont): add parameter "font_style" and "symbol". (loadfont): set weight and style every time. (gra2cairo_output): use UTF-8 in the 'S' command. (gra2cairo_charwidth): use "gunichar" instead of "char *". (addgra2cairo): initialize "CompatibleFontHash". * src/gtk/main.c (get_obj_font_list): remove japanese specified codes. * src/gtk/x11dialg.h (AxisFont, LegendDialog): add member "font_bold" and "font_italic". * src/gtk/x11lgnd.c (LegendTextCB): remove japanese specified settings. (init_legend_dialog_widget_member): remove "d->jfont", add "d->font_bold" and "d->font_italic". (get_font, set_font): get and set font style settings. (set_fonts): remove. (legend_dialog_setup_item, legend_dialog_close) (legend_dialog_setup_sub, legend_list_set_property): remove japanese specified settings. (legend_dialog_setup_item, legend_dialog_close) (legend_dialog_setup_sub): get and set font style settings. * src/gtk/x11dialg.c (SetFontListFromObj) (SetObjFieldFromFontList): remove japanese specified settings. * src/gtk/x11file.c (FitDialogResult): remove old math related codes. (draw_type_pixbuf): add 3rd argument for "GRAtextstyle()". * src/gtk/x11view.c (CopyFocusedObjects, focus_new_insts) (text_dropped): remove japanese specified settings. * src/gtk/x11menu.c (USE_EXT_DRIVER): add. (show_graph_menu_cb, create_graphmenu, create_preferencemenu): external driver menu is not shown. * src/gtk/x11opt.c (PrefFontDialogSetupItem) (create_font_selection_dialog): don't save font type. (create_font_selection_dialog) (set_font_from_font_selection_dialog): remove japanese specified settings. (set_font_from_font_selection_dialog): remove settings related to font type. (PrefFontDialogSetup): don't show the style of the font. * src/gtk/x11merge.c (MergeDialogSetupItem, MergeDialogSetup) (MergeDialogClose): remove japanese specified settings. * src/gtk/x11axis.c (font_tab_set_value, font_tab_setup_item) (font_tab_create): remove japanese specified settings. (font_tab_set_value, font_tab_setup_item, font_tab_create): add font style settings. * demo/encodeing.ngp: remove. * demo/demo5a.ngp: change font settings. * demo/demo5b.ngp: change font settings. * demo/demo5c.ngp: show muliti languages. * demo/demo5d.ngp: change font settings. * demo/demo5e.ngp: change font settings. * demo/demo4.ngp.in: change font settings. * demo/demo3.ngp.in: change font settings. * demo/demo2.ngp.in: change font settings. * demo/demo1.ngp.in: change font settings. * debian/rules: remove configure option "--enable-janese". 2010-06-17 Ito Hiroyuki * src/opath.c (distance, check_point_match, point_match): add. (curvematch): use "point_match()". (get_arrow_pos): use "distance()". 2010-06-16 Ito Hiroyuki * src/opath.c (path_fill_mode): "fill" field accept "true" or "false" . (PATH_FUILL_MODE, path_fill_rule, PATH_FILL_RULE): add. (draw_stroke, draw_fill): add. (arrowdraw): use "draw_stroke()" and "draw_fill()". (put_fill_mode): add. (arrow): use "put_fill_mode()" for "fill" field. (arrow): add "fill_rule" field. * src/gtk/x11lgnd.c (legend_dialog_set_sensitive): sensitivity of the widget "d->fill_rule" is depend on the widget "d->fill". (legend_dialog_setup_item, legend_dialog_close): field name for the widget "d->fill_rule" is "fill_rule". (LegendArrowDialogSetup): add widget "d->fill". 2010-06-11 Ito Hiroyuki * src/opath.c (get_arrow_pos): remove parameter "strict". (arrowdraw, arrowbbox): remove 3rd argument of the function "get_arrow_pos()". 2010-06-10 Ito Hiroyuki * src/opath.c (get_arrow_pos): add strict mode. (arrowdraw, arrowbbox): use strict mode for "get_arrow_pos()" when the type is "PATH_TYPE_LINE". * demo/demo5a.ngp: change position of "path" instances. * src/gtk/x11lgndx.c (LegendGaussDialogSetupItem): use "set_stroke_color()" instead of "set_color()". (LegendGaussDialogClose): use "putobj_stroke_color()" instead of "putobj_color()". 2010-06-09 Ito Hiroyuki * src/gtk/ox11menu.c (graph_modified_sub): call "set_modified_state()". * src/gtk/x11menu.c (set_modified_state): add. 2010-06-04 Ito Hiroyuki * src/oarc.c (arcinit): initialize fields "miter_limit", "join" and "stroke". (get_pos): add. (arcdraw): use "stroke_[RGB]" instead of "[RGB]". (arcdraw): use "stroke", "miter_limit", "join", "fill_[RGB]" and "close_path". (arcbbox): use "stroke" and "close_path". (arc): add fields "fill_[RGB]", "stroke_[RGB]", "close_path" and "stroke". * src/odraw.h (JOIN_TYPE): add. * src/olegend.c (put_color_for_backward_compatibility): add. * src/orect.c (rectdraw): use "fill_[RGB]" and "stroke_[RGB]" instead of "[RGB]2" and "[RGB]". (rectdraw, rectbbox, rectmatch): don't use "frame". use "stroke". (rect_frame, put_color2): add. (rect): add fields "fill_[RGB]", "stroke_[RGB]" and "stroke". * src/gtk/x11dialg.h (LegendDialog): add member "stroke_color". * src/gtk/x11lgnd.c (init_legend_dialog_widget_member): initialize "d->fill_color" and "d->stroke_color". (set_sensitive_with_label): fix typo. (legend_dialog_set_sensitive): set sensitivity of "d->fill_color" and "d->stroke_color". (legend_dialog_setup_item): setup "d->fill_color" and "d->stroke_color". (legend_dialog_close): get value from "d->fill_color" and "d->stroke_color". (fill_color_setup, stroke_color_setup): add. (LegendArrowDialogSetup, LegendRectDialogSetup): use "fill_color_setup()" and "stroke_color_setup()" instead of "color_setup()" and "color2_setup()" respectively. (LegendRectDialogSetup): remove "d->frame" setting. add "d->stroke" setting. (LegendArcDialogSetup): use "fill_color_setup()" and "stroke_color_setup()" instead of "color_setup()" and "color2_setup()" respectively. (LegendArcDialogSetup): add settings for "d->stroke" and "d->close_path". (COLOR_TYPE): add. (legend_list_set_color): support "COLOR_TYPE_FILL" and "COLOR_TYPE_STROKE". (legend_list_set_property): use "COLOR_TYPE_FILL" and "COLOR_TYPE_STROKE". * src/gtk/x11dialg.c (set_fill_color, set_stroke_color) (putobj_fill_color, putobj_stroke_color): add. 2010-06-03 Ito Hiroyuki * src/gtk/x11view.c (create_path): use "goto" statement to handle errors. * src/object.c (newobj_alias): check arguments. 2010-06-02 Ito Hiroyuki * demo/encoding.ngp: use "path" object instead of "line" object. * demo/demo5d.ngp: use "path" object instead of "line" object. * demo/demo5a.ngp: use "path" object instead of "line" object. * demo/demo4.ngp.in: use "path" object instead of "line" object. * demo/demo3.ngp.in: use "path" object instead of "line" object. * demo/demo2.ngp.in: use "path" object instead of "curve" object. * addin/legend.tcl (makescript): use "path" object instead of "line" object. * initfile/Ngraph.ngp (gra::draw_obj): remove "line", "polygon" and "curve" objects. add "path" object. * src/Makefile.am (ngraph_SOURCES): remove "oline.c", "opolygon.c" and "ocurve.c". add "opath.c" and "opath.h". * src/oprm.c (prmload): use "path" object instead of "line", "polygon" and "curve" objects. * src/shellcm.c (cmnew): use object name from the functions"getobjiname()" for "newobj_alias()". * src/object.c (newobj_alias): add. (newobj): use "newobj_alias()". (getobjiname): add. (chkobjilist, getobjilist): use "getobjiname()". * src/gtk/gtk_widget.c (get_widget): add. (spin_entry_set_val, spin_entry_get_val): use "get_widget()". * src/gtk/main.c (obj_add_func_ary): remove "addline", "addcurve" and "addpolygon". add "addpath". * src/gtk/x11dialg.h: remove prototype of unused functions. (LegendDialog):add member "stroke", "path_type" and "close_path". remove member "color2_label". * src/gtk/x11lgnd.c (legendlist): remove "line", "polygon" and "curve" items. add "path" item. (Ldlg): remove "DlgLegendCurve" and "DlgLegendPoly". (LegendType): remove "LegendTypeLine", "LegendTypeCurve", "LegendTypePoly". add "LegendTypePath". (LegendLineCB): show the type of the "path" object. (init_legend_dialog_widget_member): initialize "d->path_type", "d->stroke" and "d->close_path". (set_sensitive_with_labdl): add. (legend_dialog_set_sensitive): use "set_sensitive_with_labdl()". (legend_dialog_set_sensitive): set sensitivity for stroke and fill related widgets. (legend_dialog_setup_item): set up "d->stroke", "d->path_type" and "d->close_path". (legend_dialog_setup_item): call "get_widget()" before call "gtk_range_set_value" and "gtk_entry_set_text()". (width_setup, style_setup, miter_setup, join_setup, color_setup) (color2_setup): save label instead of control widgets. (LegendCurveDialogSetup, LegendCurveDialog, LegendPolyDialogSetup) (LegendPolyDialog, CmCurveDel, CmCurveUpdate, CmCurveMenu) (CmPolyDel, CmPolyUpdate, CmPolygonMenu): removed. (LegendArrowDialogSetup): add control widgets for "d->stroke", "d->fill_rule", "d->path_type" and "d->close_path". (CmLineDel, CmLineUpdate): use "path" object instead of "line" object. (LegendWinLegendUpdate, legend_list_set_property): remove case for "LegendTypeLine", "LegendTypeCurve" and "LegendTypePoly". add case for "LegendTypePath". (legend_list_set_property): show some attributes for "path" object. * src/gtk/x11dialg.c (initdialog): don't initialize "DlgLegendCurve" and "DlgLegendPoly". (SetWidgetFromObjField, SetObjFieldFromWidget) (SetObjFieldFromStyle, SetStyleFromObjField, _putobj_color) (_set_color): call "get_widget()" for the parameter "widget". (SetComboList, SetComboList2): removed. (SetObjFieldFromText, SetTextFromObjField, SetObjFieldFromSpin) (SetSpinFromObjField, SetObjFieldFromToggle) (SetToggleFromObjField, SetObjFieldFromStyle): now these functions are static. * src/gtk/x11view.c (create_legend2): create only "path" object. (create_legendx): create "path" object instead of "curve" object. (ViewerEvLButtonDblClk, ViewerEvRButtonDown): remove case for "LineB", "CurveB" and "PolyB". add case for "PathB". (ViewerEvRButtonDown): "g_object_unref()" should be called outside of the "switch" block. (ViewUpdate): don't check "line", "polygon" and "curve" objects. check "path" object. * src/gtk/x11menu.h (PointerType): remove "LineB", "CurveB" and "PolyB" add "PathB". * src/gtk/x11menu.c (Command2_data): remove "line", "polygon" and "curve" buttons. add "path" button. (create_legendmenu): remove "line", "polygon" and "curve" menu items. add "path" menu item. * src/gtk/x11graph.c (SwitchDialogSetupItem, SwitchDialogSetup): localize. (SwitchDialogSetup): check duplicate item. 2010-06-01 Ito Hiroyuki * src/math/math_basic_function.c (mjd2gd): "mjd" must be an integer. * src/oline.c: removed. * src/ocurve.c: removed. * src/opolygon.c: removed. 2010-05-21 Ito Hiroyuki * src/oaxis.c (anumdirchar): add new settings "oblique1" and "oblique2". (get_num_pos): renamed from "get_num_pos_parallel". (get_num_pos_normal): removed. (get_num_pos_oblique, get_num_ofst_oblique1) (get_num_ofst_oblique2): add. (draw_numbering_normalize): add case for "AXIS_NUM_POS_OBLIQUE1" and "AXIS_NUM_POS_OBLIQUE2". (draw_numbering): add argument "ndir". (draw_numbering): add case for "AXIS_NUM_POS_OBLIQUE1" and "AXIS_NUM_POS_OBLIQUE2". (draw_numbering): use "get_num_pos()" instead of "get_num_pos_normal()" and "get_num_pos_parallel()". (numbering): get field "num_direction". (numbering): "align" is not used when "ndir" is "AXIS_NUM_POS_OBLIQUE1" or "AXIS_NUM_POS_OBLIQUE2". (anumdirput): add case for "AXIS_NUM_POS_OBLIQUE1" and "AXIS_NUM_POS_OBLIQUE2". * src/axis.h (AXIS_NUM_DIR): moved from "oaxis.c". * src/gra.c (GRAexpandmath): show "0" when calculated value is equal to 0. * src/gtk/x11dialg.h (AxisNumbering): add member "align_label". * src/gtk/x11axis.c (num_direction_changed): add. (numbering_tab_create): "change" signal is connected to the function "num_direction_changed()". (numbering_tab_create): initialize "d->align_label". 2010-05-20 Ito Hiroyuki * src/gtk/x11menu.c (SetPoint): don't show the position in the status bar when the widget is not visible. * src/gtk/x11cood.c (CoordWinSetCoord): show date when tyoe of the axis is "AXIS_TYPE_MJD". (CoordWinSetCoord): do nothing when the widget is not visible. 2010-05-19 Ito Hiroyuki * src/ofile.c (opendata, getposition, f2dgetcoord): use "AXIS_TYPE_LINEAR", "AXIS_TYPE_LOG" and "AXIS_TYPE_INVERSE". (get_pos_sub): add. (getposition2): use "get_pos_sub()". 2010-05-18 Ito Hiroyuki * src/gtk/x11menu.c (create_image_outputmenu): change accel path of "Export image" menu items. 2010-05-17 Ito Hiroyuki * src/ofit.c (ERR_SMALL_ARGS, ERR_INVALID_PARAM): remove. (fittypechar): remove some error messages. (bisection, newton, fitsolve): remove. (fit): remove fields "newton" and "bisection". * src/ofile.c (ERR_SMALL_ARGS, ERR_INVALID_TYPE) (ERR_INVALID_PARAM, ERRCONVERGE): add. (f2derrorlist): add error messages. (get_fit_obj_id): add. (fitout): use "get_fit_obj_id()". (bisection, newton): moved from "ofit.c". (solve_equation): add. (calc_equation): add. (file2d): add fields "newton", "bisection" and "calc". 2010-05-15 Ito Hiroyuki * test/math_test_new.dat: add test for functions "mjd2year()", "mjd2month()", "mjd2day()" and "unix2mjd()". 2010-05-14 Ito Hiroyuki * src/otext.c (textprintf): use "add_printf_formated_str()". * src/ofit.c (ERR_SMALL_ARGS, ERR_INVALID_PARAM): add. (fittypechar): add error messages. (fitcalc): variable "eq" is not static. (bisection, newton, fitsolve): add. (fit): add fields "newton" and "bisection". * src/nstring.c (get_printf_format_str, add_printf_formated_str): add. * src/gra.c (GRAexpandmath): use "g_strdup_printf()" instead of "sprintf()". (GRAexpandmath): change format string depend on the value "vd". (GRAexpandpf): use "add_printf_formated_str()". 2010-05-13 Ito Hiroyuki * src/math/math_basic_function.c (mjd2gd, math_func_mjd2year) (math_func_mjd2month, math_func_mjd2day): add. * src/math/math_function.h.in: add functions "mjd2year", "mjd2month" and "mjd2day". * src/gtk/x11graph.c (CmGraphSaveB): call "CmGraphOverWrite()" instead of "CmGraphSave()". * src/gtk/x11menu.c (show_outputmenu_cb, create_outputmenu): remove. (command_data): add member "stock". (Command1_data): use stock items. (show_graph_menu_cb): set sensitivity of the widget "ExtDrvOutMenu". (create_graphmenu): move "Export image", "external _Driver" and "Print preview" menu items from "Output" menu. (create_filemenu): move "Save data" menu item from "Output" menu. (create_windowmenu): move "Draw" and "Clear" menu items from "Output" menu. (createmenu): don't call "create_outputmenu()". (createpixmap): check "data[i].xpm". (createcommand1): call "gtk_tool_button_new_from_stock()" when "cdata->xpm" is NULL. (createcommand1): call "gtk_tool_item_set_homogeneous()". (createcommand2): call "gtk_tool_button_set_stock_id()" when "cdata->img" is NULL. 2010-05-10 Ito Hiroyuki * src/oaxis.c (get_num_ofst_horizontal, get_num_ofst_parallel) (get_num_ofst_normal1, get_num_ofst_normal2): the type of the parameter "aconf" is "const struct axis_config *". (mjd_to_date_str): add parameter "date_format". (draw_numbering_normalize): the type of parameters "aconf" and "font" are "const struct axis_config *" and "const struct font_config *" respectively. (axis): add field "num_date_format". * src/math/math_basic_function.c (math_func_unix2mjd): first argument of the function "mjd()" is "tm->tm_year + 1900". * src/gtk/ogra2cairo.c (draw_str): check if the parameter "str" is NULL or not. * src/gtk/main.c (main): set "LC_TIME" as "C". * src/gtk/x11dialg.h (AxisNumbering):add member "date_format". * src/gtk/x11file.c (FitCB): localize message. * src/gtk/x11axis.c (AxisCB, AxisHistoryCB): localize message. (numbering_tab_set_value, numbering_tab_setup_item) (numbering_tab_create): add settings for date format. 2010-05-08 Ito Hiroyuki * src/oaxis.c (axistypechar): add scale type "MJD". (anumdirchar): use "horizontal" and "parallel1" instead of "normal" and "parallel" respectively. (AxisConfig): remove duplicated member "type". (mjd_to_date_str): add. (numformat): construct whole numbering string. (draw_numbering_normalize, draw_numbering, anumdirput): use "AXIS_NUM_POS_HORIZONTAL" and "AXIS_NUM_POS_PARALLEL1" instead of "AXIS_NUM_POS_NORMAL" and "AXIS_NUM_POS_PARALLEL" respectively. (draw_numbering): remove unused argument "taillen". (draw_numbering): remove unused variable "num". (draw_numbering): move some codes to the function "numformat()". (get_step): add. (numbering): remove unused variables "taillen", "num", "n" and "count". (numbering): use "get_step()". (numbering): move some codes to the function "numformat()". (anumdirput): add. (axis): use "anumdirput" to set value to the field "num_direction". * src/axis.h (AXIS_SCALE_TYPE): meved from "oaxis.c". 2010-05-07 Ito Hiroyuki * src/math/math_basic_function.c (mjd): add. (math_func_mjd): use "mjd()". (math_func_unix2mjd): add. * src/math/math_function.h.in: add function "unix2mjd". add 4th, 5th and 6th arguments to the function "mjd". * src/shellcm.c (dispfield): check first character of a string "enumlist[j]". * src/axis.h (AXIS_SCALE_TYPE): moved from "oaxis.c". * src/object.c (getargument): check first character of a string "enumlist[i]". * src/gtk/main.c (get_obj_enum_list): check first character of a string "enumlist[i]". * src/gtk/x11dialg.c (SetListFromObjField): check first character of a string "enumlist[i]". * src/gtk/x11file.c (FitDialogSetup, create_type_combo_box) (create_type_combo_box): check first character of strings "curvelist[j]" and "enumlist[i]". 2010-04-28 Ito Hiroyuki * src/Makefile.am (ngraph_CFLAGS): add option "-DG_DISABLE_DEPRECATED=1" and "-DG_DISABLE_SINGLE_INCLUDES=1". * src/nconfig.c (replaceconfig, removeconfig): use "n_tmpfile()" and "n_tmpfile_close()". * src/ioutil.c (n_tmpfile, n_tmpfile_close): add. * src/gtk/x11commn.c (AddNgpFileList): use "g_filename_to_uri()". * src/gtk/x11graph.c (CmGraphHistory): use "g_filename_from_uri()". 2010-04-27 Ito Hiroyuki * src/gtk/x11graph.c (PageDialogPage): change sensitivity of labels. (PageDialogSetup): initialize "d->paperheight_label" and "d->paperwidth_label". * src/gtk/x11opt.c (MiscDialogSetupItem): initialize "d->help_browser" and "d->browser". (set_file_in_entry): change title of the dialog. (MiscDialogSetup): add entries to set programs for help browser and web browser. (MiscDialogSetup): change order of frames. (use_external_toggled): toggle sensitivity of labels. (load_file_toggled): add. (ViewerDialogSetup): "load_file_toggled()" is connected to the "toggled" signal. (set_program_name): add. (MiscDialogClose): use "set_program_name()". * src/gtk/x11dialg.h (PageDialog): add member "paperwidth_label" and "paperheight_label". (ExViewerDialog):add member "d_label", "w_label" and "h_label". (ViewerDialog): add member *data_num_label". * src/gtk/gtk_entry_completion.c (entry_completion_set_entry): add. * src/gtk/x11lgnd.c (LegendTextDialogSetup): don't call "gtk_entry_set_completion()". (LegendTextDialogSetup): use "entry_completion_set_entry()" instead of "gtk_entry_set_completion()". * src/gtk/x11file.c (clear_math_completion): remove. (MathTextDialogSetup, math_tab_setup_item, func_entry_focused): use "entry_completion_set_entry()" instead of "gtk_entry_set_completion()". (FileDialogClose, FileDefDialogClose): don't call "clear_math_completion()". 2010-04-26 Ito Hiroyuki * src/jnstring.c (niskanji): conditions are simplified. (niskanji2): use variable "l" to compare length of string. * mingw/install.txt: add document. * src/gtk/x11file.c (MathTextDialogClose): call "gtk_entry_set_completion()" before exit the function except the case of "d->ret == IDLOOP". (math_tab_setup_item): call "gtk_entry_set_completion()". (clear_math_completion): add. (FileDialogClose, FileDefDialogClose): call "clear_math_completion()" before exit the function except the case of "d->ret == IDLOOP". 2010-04-25 Ito Hiroyuki * src/gtk/x11print.c (SvgVersion): change order of SVG version. (OutputImageDialogSetupItem): initialize image export settings. (OutputImageDialogClose): save image export settings. (OutputImageDialogClose): "d->Version" is "TYPE_SVG1_1" when selected version is "SVG version 1.1". * src/gtk/ox11menu.h (menulocal): add image export settings. (SAVE_CONFIG_TYPE): add "SAVE_CONFIG_TYPE_EXPORT_IMAGE". * src/gtk/ox11menu.c (MenuConfigExportImage): add. (MenuConfigArrray): add "MenuConfigExportImage". (menu_save_config): save image export settings. (menuinit): initialize image export settings. * src/gtk/x11menu.c (application): call "menu_save_config()" for "SAVE_CONFIG_TYPE_EXPORT_IMAGE". 2010-04-23 Ito Hiroyuki * mingw/windows_make.sed: add "-lwinspool" option to the variable "LIBS". * src/gtk/x11print.c (OutputImageDialogSetupItem): "d->dpi" and "d->dlabel" are sensitive. * src/gtk/ogra2cairofile.c (create_reference_dc): add. (create_cairo): use "create_reference_dc()" to get reference DC. (create_cairo): call "StartPage()". (gra2cairofile_output): call "cairo_surface_flush()", "cairo_surface_copy_page()" and "EndPage()". 2010-04-21 Ito Hiroyuki * src/gtk/x11menu.c (create_image_outputmenu): add "EMF file" menu item. * src/gtk/x11print.c (OutputImageDialogSetupItem) (OutputImageDialogSetup, OutputImageDialogClose) (CmOutputImage, CmOutputMenu): add case for "MenuIdOutputEMFFile". * src/gtk/x11menu.h (MenuID): add "MenuIdOutputEMFFile". * src/gtk/ogra2cairofile.h (surface_type_id): add "TYPE_EMF". * src/gtk/ogra2cairofile.c (CAIRO_EMF_SCALE): add. (surface_type): add type "emf". (create_cairo, gra2cairofile_output): add case for "TYPE_EMF". 2010-04-20 Ito Hiroyuki * src/gtk/x11lgnd.c (legend_list_build): use "tree_store_prepend()" instead of "tree_store_append()". * src/gtk/x11file.c (delete_file_obj): add. (CmFileHistory, CmFileNew, CmFileClose, update_file_obj_multi) (FileWinFileDelete, FileWinFileUpdate): use "delete_file_obj()". (CmFileWindow): "d->delete" is set as "delete_file_obj". * src/gtk/x11view.c (EvalDialogSetupItem): use "tree_store_prepend()" instead of "tree_store_append()". * src/gtk/x11menu.c (init_ngraph_app_struct): use "memset()". * src/gtk/gtk_subwin.c (update, delete): use "d->delete" instead of "delobj()" if "d->delete" is not NULL. * src/gtk/x11axis.c (CmAxisWindow): "d->delete" is set as "AxisDel". * src/gtk/x11menu.h (SUBWIN_PROTOTYPE): add member "delete". * src/math/math_scanner.h (struct math_token): add member "next". * src/math/math_scanner.c (create_token): use "g_malloc0()" instead of "g_malloc()". * src/math/math_parser.c (parse_expression_list): fix memory leak when the type of the token is "MATH_TOKEN_TYPE_EOEQ". (my_get_token, unget_token, math_parser_parse): use list instead of array. * src/gtk/gtk_liststore.c (tree_store_prepend): add. 2010-04-15 Ito Hiroyuki * src/omath.c (create_func_def_str): use "g_strdup_printf()". * src/ofile.c (EQUATION_NUM): add. (struct f2ddata, set_user_fnc, set_equation): use "EQUATION_NUM". (create_func_def_str): use "g_strdup_printf()". (set_const_all): last argument of "set_const()" for "fp->codex[1]" and "fp->codey[1]" is depend on "fp->type". (f2ddraw): use "set_const_all()" instead of "set_const()". * src/gtk/gtk_common.h (GTK_WIDGET_VISIBLE): use "gtk_widget_get_visible()" if "GTK_WIDGET_VISIBLE" is not defined. 2010-04-13 Ito Hiroyuki * src/gtk/x11file.c (FileDialogCopyAll): remove. (FileDialogClose): remove case "IDCOPYALL" (FileDialogSetup): remove "Copy all" button. (FileDialogSetup): set width of the file preview as 240. 2010-04-06 Ito Hiroyuki * src/gtk/x11menu.c (SUB_WINDOW_STATE, change_window_state_cb): add. (application): "change_window_state_cb()" is connected to the "window-state-event" signal. * src/gtk/gtk_subwin.c (hide_minimize_menu_item): add. (sub_window_create): "hide_minimize_menu_item()" is connected to the "realize" signal. 2010-04-05 Ito Hiroyuki * src/gtk/x11menu.c (create_sub_windows, destroy_sub_windows): add. (application): use "create_sub_windows()" and "destroy_sub_windows()" . * src/gtk/gtk_subwin.c (ev_sub_win_key_down): call "gtk_widget_hide()" instead of "gtk_widget_hide_all()". 2010-04-04 Ito Hiroyuki * mingw/windows.sh: remove "--enable-new_math" option for configure script. 2010-04-01 Ito Hiroyuki * initfile/Ngraph.ini.win: change Japanese fonts. * src/otext.c (text_set_text): treat shift-jis strings. * src/shell.c (getcmdline): treat shit-jis strings. * driver/gra2wmf.c (main): use g_mkstemp() when the version of GLIB is lesser than 2.22. * src/gtk/x11view.c (graph_dropped): add "-f" option for "LoadNgpFile()". (ViewerEvMouseMove, ViewerEvPaint, create_pix): check "Menulocal.gc". * src/gtk/x11opt.c (set_file_in_entry): add. (MiscDialogSetup): use "create_file_entry_with_cb()" instead of "create_text_entry()". (CmOptionSaveNgp): use "naccess()" instead of "access()". * src/gtk/x11merge.c (merge_list_set_val): the filename is always UTF-8. * src/gtk/x11menu.h (NgraphApp): remove member "Message1", and members "Message_pos" and "Message_extra". * src/gtk/x11menu.c (show_file_menu_cb): the filename is always UTF-8. (createpixmap, create_toolbar_pixmap, createicon): remove unused argument "win". (create_message_box): add. (setupwindow): call "gtk_widget_show_all()" and "reset_event()" just after call "gtk_table_attach" for "NgraphApp.Viewer.Win". (SetPoint): use GtkLabel to show the cursor position in the status bar. * src/gtk/x11gui.c (fsok): use "naccess()" instead of "access()". (fsok): use "nstat()" instead of "stat()". (fsok): convert filename string to UTF-8. (fsok): use "g_path_get_dirname()". (file_dialog_set_current_neme): use "getbasename()". (FileSelectionDialog): second argument of "file_dialog_set_current_neme()" has to be converted from UTF-8. * src/gtk/x11graph.c (DirectoryDialogClose, CmGraphHistory): use "nchdir()" instead of "chdir()". (CmGraphHistory): use "g_path_get_dirname()". (about_link_activated_cb, CmHelpHelp): use "system_bg()". * src/gtk/x11file.c (edit_file): add. (FileDialogEdit, CmFileEdit, FileWinFileEdit): use "edit_file()". (file_list_set_val): the filename is always UTF-8. * src/gtk/x11dialg.c (SetObjFieldFromText, SetTextFromObjField): strings are always UTF-8. * src/gtk/x11commn.c (SaveDrawrable): don't write platform information. (check_overwrite, GraphSave): use "naccess()" instead of "access()". (GraphSave): use "nchdir()" instead of "chdir()". (LoadNgpFile): check if the file is readable or not. (LoadNgpFile): the filename is always UTF-8. (CheckIniFile): get home directory from "system" object. (ErrorMessage): use "g_strerror()" instead of "strerror()". * src/gtk/ox11menu.c (menumenu): convert filename string from UTF-8. (menumenu): call "hide_console()" and "resotre_console()" before and after call "application()" respectively. (SetCaption): the filename is always UTF-8. * src/gtk/ogra2cairofile.c (create_cairo, gra2cairofile_output): convert filename string from UTF-8. * src/gtk/main.c (check_console, hide_console, resotre_console): added. (nallocconsole, exec_console): use "g_unlink()" instead of "unlink()". (set_dir_defs, set_path_env): added. (main): don't use third argument. (main): call "g_thread_init()", "gdk_threads_init()" and "gdk_threads_enter()". (main): call "set_dir_defs()" when "WINDOWS" is defined. (main): use "g_getenv()" instead of "getenv()". (main): use "g_get_user_config_dir()". (main): check return value of "exeobj()" for "shell::shell". (get_file_list): use "nstat()" instead of "stat()". * src/gtk/gtk_widget.c (filename_from_utf8, filename_to_utf8): remove. (entry_set_filename, entry_get_filename): don't convert file name. * src/gtk/gtk_subwin.c (start_editing, modify_string): strings are always UTF-8. (sub_window_create): type hint for subwindows are "GDK_WINDOW_TYPE_HINT_UTILITY". (sub_window_create): call "gtk_window_set_transient_for()". * src/shellux.c (testexpand): use "nstat()" instead of "stat()". * src/shellcm.c (cmcd): use "nchdir()" instead of "chdir()". (cmbasename): use "getbasename()" instead of "basename()". (cmdirname): use "getdirname()" instead of "dirname()". * src/shell.c (set_environ): use "g_getenv()" to get environment variable. (unlinkfile): use "g_unlink()" instead of "unlink()". (set_shellevloop): use "g_thread_create()" instead of "pthread_create()". (reset_shellevloop): use "g_thread_join()" instead of "pthread_join()". (readline_thread, nreadline): added. (shget): use "nreadline()" when readline library is available. (puts_localized): added. (shputstdout, shprintfstdout): use "puts_localized()". (getcmdline): convert strings to UTF-8 if the strings are not valid UTF-8. (expand): use "g_unlink()" instead of "unlink()". (expand): use function "strlen()" only once for a loop. (set_env_val, cmdexec, newshell): use "g_getenv()" instead of "getenv()". (proc_in_thread, quote_args): added. (cmdexec): use "g_strerror()" instead of "strerror()". (cmdexec): use "g_thread_create()" and "proc_in_thread()" to execute command. (show_system_error, system_in_thread, system_bg): added. * src/osystem.c (nsystem): add field "compiler". (sysinit): set compiler name. (sysdone, sysunlink): use "g_unlink()" instead of "unlink()". (syscwd): use "nchdir()" instead of "chdir()". * src/oprm.c (prmload): use "naccess()" instead of "access()". * src/omerge.c (mergefile): call "get_utf8_filename()" for filename argument. (mergetime, mergedate): use "nstat()" instead of "stat()". (mergeload): use "naccess()" instead of "access()". * src/oio.c (io_error): use "g_strerror()" instead of "strerror()". * src/ogra2prn.c (gra2p_output): use "g_unlink()" instead of "unlink()". * src/ofile.c (f2dfile): call "get_utf8_filename()" for filename argument. (f2dtime, f2ddate, get_mtime): use "nstat()" instead of "stat()". (f2dload): use "naccess()" instead of "access()". (f2doutputfile): use "g_strerror()" instead of "strerror()". * src/object.c (error2, error22): call "g_locale_from_utf8()" for message string. * src/nconfig.c (unlockconfig, make_backup, copyconfig): use "g_unlink()" instead of "unlink()". (openconfig, writecheckconfig, copyconfig): use "nstat()" instead of "stat()". (writecheckconfig): use "naccess()" instead of "access()". * src/ioutil.c (changefilename): don't check Shit-JIS kanji code. Encodeing of the filename should be UTF-8. (path_to_win): added. (getfullpath): use "get_utf8_filename()". (getdisk): added. (getrelativepath): use "get_utf8_filename()". (get_utf8_filename, get_localized_filename): added. (getbasename): use "g_path_get_basename()". (getdirname): use "g_path_get_dirname()". (nsearchpath): call "g_find_program_in_path()". (nselectdir): use "nstat()" instead of "stat()". (nfopen): use "g_fopen()". (nstat, naccess, nchdir): added. (n_mkstemp): use "g_get_tmp_dir()". * src/common.h (COMPILER_NAME): added. (WINDOWS): define if "__MINGW32__" is defined * initfile/Ngraph.ini.in (help_browser): change format (file name is not included). * driver/wmfapi.c (chk_write): added. (Polygon, Ellipse, Arc, Pie, Chord, SetPixel, SetPolyFillMode) (SetBkMode, SetTextAlign, SetTextCharacterExtra, TextOut) (SetTextColor, Rectangle, MoveTo, LineTo, SelectObject) (DeleteObject, SetWindowOrg, SetWindowExt, CloseMetaFile) (SetMapMode): use "chk_write()" instead of "write()". (CloseMetaFile): don't close the file but call "fseek()". (CreateMetaFile): add argument "dc". (CreateMetaFile): don't open a file. * driver/gra2wmf.c (getboundingbox, draw): use function "strlen()" only once for each loops. (main): use environment variable "NGRAPHCONF" instead of "NGRAPHLIB". (main): use "g_mkstemp_full()" to create temporally file. (main): use "chk_write()" instead of "write()". 2010-03-31 Ito Hiroyuki * driver/gra2ps.c (getboundingbox, draw): use function "strlen()" only once for each loops. (main): use environment variable "NGRAPHCONF" instead of "NGRAPHLIB". * mingw/windows_resource.rc: added. * mingw/windows_make.sed: added. * mingw/windows_demo.sed: added. * mingw/windows.sh: added. * mingw/pango.aliases: added. * mingw/gtkrc: added. * mingw/associate.bat: added. * mingw/Makefile.am: added. 2010-03-19 Ito Hiroyuki * src/gtk/main.c (main): use "g_listenv()" instead of 3rd argument of "main()" function. 2010-03-04 Ito Hiroyuki * src/gtk/x11menu.c (reset_event): change name from "ResetEvent" * Src/Gtk/x11gui.c (message_beep): change name from "MessageBeep" (message_box): change name from "MessageBox". * src/gtk/x11commn.c (allocate_console): change name from "AllocConsole". (free_console): change name from "FreeConsol". * src/gtk/main.c (reset_fifo, nallocconsole, reset_fifo) (nfreeconsole): use "nopen()" and "nclose()". (get_file_list): use "g_dir_open()", "g_dir_read_name()" and "g_dir_close()". * src/gtk/ox11menu.h (DEFAULT_GEOMETRY): change name from "CW_USEDEFAULT". * src/gtk/gtk_entry_completion.c (entry_completion_save) (entry_completion_load): use "nfopen()". * src/strconv.c (str2utf8): use "g_iconv". * src/object.c: change variable name form "GlovalLock" to "Glovallock". * src/nconfig.c (lockconfig, openconfig, make_backup) (replaceconfig, removeconfig, copyconfig): use "nfopen()". * src/ioutil.c (nscandir): use "g_dir_open()", "g_dir_read_name()" and "g_dir_close()". (nscandir): remove 3rd argument. (nopen): use "g_open()". (nfopen): use "g_fopen()". (n_mkstemp): use "g_mkstemp()". * configure.in: check library "pthreadGC2". 2010-02-24 Ito Hiroyuki * src/ofile.c (draw_interpolation): added. (draw_fit): use "draw_interpolation()". 2010-02-23 Ito Hiroyuki * src/math/math_expression.c (math_parameter_expression_new): set errorcode to "err" when the variable "prm" is NULL. * src/ofit.c (ERR_INCONSISTENT_DATA_NUM): added. (fiterrorlist): add error message. (fit_put_weight_func): fix arguments of the function "ofile_create_math_equation()". * src/ofile.c (calc_fit, draw_fit): added. (fitout): use "calc_fit()" and "draw_fit()". (ofile_create_math_equation): add argument "use_const". (set_equation): fix second argument of "set_user_fnc()" from "g" to "h". (set_const): add arguments "const_id" and "need2pass". (f2ddraw): constant "FIRST" for equatiosn "fp->codex[0]" and "fp->codey[0]" is TRUE. 2010-02-22 Ito Hiroyuki * src/ofile.c (fitout): use "calc_weight()" to calculate weight. (calc_weight): added. * src/object.c (moveobj): move object only when id of instances of "sid" and "did" are exist. (_newobj, _delobj, _copyobj): remove. * src/math/math_function.h.in: add functions "prog1" and "prog2". * src/math/math_basic_function.c (math_func_prog1) (math_func_prog2): added. 2010-02-19 Ito Hiroyuki * src/math/math_expression.c (calc): divided by zero is not error. returned value is 'NaN'. 2010-02-18 Ito Hiroyuki * src/math/math_function.h.in: add function "progn". * src/math/math_basic_function.c (math_func_progn): add * src/oaxis.c (numformat, draw_numbering, numbering): use "snprintf()". (draw_numbering): delete argument "num" and add argument "draw". (draw_numbering): print position, direction and numbering value when "draw" is false. (numbering): add argument "draw". (axis_get_numbering): added. (axis): add field "get_numbering". (draw_numbering_normalize): added. (draw_numbering): use "draw_numbering_normalize()". * driver/ngp2.in: add "-d dpi" option. 2010-02-16 Ito Hiroyuki * src/gtk/x11file.c (load_tab_create): type of the spin button "d->load.finalline" is "SPIN_BUTTON_TYPE_INT". 2010-02-15 Ito Hiroyuki * src/ofile.c (ofile_create_math_equation): change name from "create_math_equation()" and this function is now global. (fitout): call "math_equation_parse()", "set_const()" and "math_equation_optimize()" for weight function. * src/ofit.c (fit_put_weight_func): added. (show_eqn_error): added. (fit): check "weight_func". (fitput): use "show_eqn_error()". 2010-02-10 Ito Hiroyuki * src/gtk/x11axis.c (ZoomDialogSetupItem): use "spin_entry_set_val()" . (ZoomDialog): don't initialize "data->zoom". * src/gtk/x11dialg.c (initdialog): initialize "DlgZoom.zoom" 2010-02-05 Ito Hiroyuki * src/gtk/x11commn.c (get_save_opt): return "IDOK" (not "IDCANCEL") when both "fnum" and "mnum" is negative. 2010-02-03 Ito Hiroyuki * src/gtk/gtk_liststore.c (list_store_remove_selected_cb): set cursor on the first selected path. 2010-02-02 Ito Hiroyuki * src/gtk/x11view.c (show_focus_line_arc, ShowPoints): call "gdk_draw_arc()" only when "Menulocal.do_not_use_arc_for_draft" is false. * src/gtk/ox11menu.h (menulocal): add member "do_not_use_arc_for_draft". * src/gtk/ox11menu.c (MenuConfigViewer): add setting related to "do_not_use_arc_for_draft". * src/gtk/x11lgnd.c (renderer_func, column_edited) (column_0_edited, column_1_edited, insert_column) (set_delete_button_sensitivity): added. (points_setup): use "GtkTreeView". (LegendCurveDialogSetup, LegendPolyDialogSetup) (LegendArrowDialogSetup): change layout. * src/gtk/x11dialg.c (SetObjPointsFromText) (SetTextFromObjPoints): use "GtkTreeView". (set_obj_points_from_text, set_entry_from_obj_point): added. (SetObjFieldFromStyle): use "set_obj_points_from_text()" instead of "SetObjPointsFromText()". (SetStyleFromObjField): use "set_entry_from_obj_point()" instead of "SetTextFromObjPoints()". 2010-01-26 Ito Hiroyuki * src/gtk/x11graph.c (DirectoryDialogSetup): use "GtkTable" instead of "GtkHBox". (DirectoryDialogSetup): add current directory label. * src/gtk/x11dialg.h (DirectoryDialog): add member "dir_label". 2010-01-22 Ito Hiroyuki * src/gtk/x11view.c (EvalDialogSetup): set "d->ok_button" as "GTK_STOCK_CLOSE". * src/gtk/x11opt_proto.h (CREATE_NAME): set "d->ok_button" as "GTK_STOCK_CLOSE". * src/gtk/x11gui.c (DialogExecute): initialize "data->ok_button". (DialogExecute): use "data->ok_button" for "ok" button. * src/gtk/x11file.c (MathDialogSetup): set "d->ok_button" as "GTK_STOCK_CLOSE". * src/gtk/x11dialg.h (DIALOG_PROTOTYPE): add member "ok_button". 2010-01-21 Ito Hiroyuki * src/gtk/x11print.c (init_print): added. (CmOutputPrinter): "begin_print" signal is connected to the function "init_print()". (CmOutputPrinter): don't call "gtk_print_operation_set_current_page()". 2010-01-04 Ito Hiroyuki * src/gra.h (CURVE_OBJ_USE_EXPAND_BUFFER): added. * src/ocurve.c (curveinit): initialize "_points" field when "CURVE_OBJ_USE_EXPAND_BUFFER" is TRUE. (curve_expand, curve_expand_points, curve_clear) (curve_set_points, curve_flip, curve_move, curve_rotate) (curve_zoom, curve_change): added. (curve): add field "_points". (curvedraw, curvebbox, curvematch): use "_points" field when "CURVE_OBJ_USE_EXPAND_BUFFER" is TRUE. * src/object.c (arrayclear, arrayclear2): added. 2009-12-25 Ito Hiroyuki * src/ofile.c (file_color): allow negative or greater than 255 for "val". * src/gtk/x11view.c (EvalDialogSetup): call "gtk_scrolled_window_set_policy()". * src/gtk/x11file.c (MathDialogSetup, create_user_fit_frame) (move_tab_create, mask_tab_create, FileDialogSetup): call "gtk_scrolled_window_set_policy()". * src/gtk/ogra2x11.c (gtkinit): call "gtk_scrolled_window_set_policy()". * src/gtk/x11dialg.c (SelectDialogSetup, CopyDialogSetup): call "gtk_scrolled_window_set_policy()". * src/gtk/ogra2x11.c (gtkinit): call "gtk_scrolled_window_set_policy()". * src/gtk/gtk_subwin.c (sub_window_create): call "gtk_scrolled_window_set_policy()". (sub_window_create): call "gtk_window_set_skip_taskbar_hint()" * src/gtk/x11file.c (create_user_fit_frame): initial values and derivative equations are shown in scrolled window. 2009-12-24 Ito Hiroyuki * src/gtk/x11lgnd.c (legend_list_set_val): use "legend_list_set_property()". (legend_list_set_color, legend_list_set_property): added. * src/gtk/x11menu.c (create_toolbar): use "gtk_orientable_set_orientation()" instead of "gtk_toolbar_set_orientation()" is the version of the GTK+ is greater or equal to 2.16. * src/gtk/gtk_subwin.c (set_cell_renderer_cb) (set_editable_cell_renderer_cb, set_combo_cell_renderer_cb) (set_obj_cell_renderer_cb): use "gtk_cell_layout_get_cells()" instead of "gtk_tree_view_column_get_cell_renderers()". * src/gtk/x11file.c (FitDialogSetSensitivity): don't change sensitivity of widgets related to division settings. (FitDialogSetup): don't use "toggled" signal of "d->interpolation". * src/gtk/x11dialg.h (struct FitDialog): remove member "div_box" 2009-12-22 Ito Hiroyuki * src/gtk/x11print.c: initialize "DriverDialogBrowseCB" as NULL when "USE_ENTRY_ICON" is FALSE. (DriverDialogSelectCB): now "ext" of "struct extprinter" is not include ".". * src/gtk/x11opt.c: initialize "SetScriptDialogBrowse" and "SetDriverDialogBrowse" as NULL when "USE_ENTRY_ICON" is FALSE. * src/gtk/gtk_widget.c: initialize "entry_icon_file_select" as NULL when "USE_ENTRY_ICON" is FALSE. 2009-12-18 Ito Hiroyuki * src/gtk/x11file.c (set_user_fit_sensitivity) (create_user_fit_frame): added. (FitDialogSetSensitivity): use "set_user_fit_sensitivity()". (FitDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". (FitDialogResult): call "math_equation_add_parameter()". (FitDialogSave, FitDialogLoad, FitDialogCopy): connected to "clicked" signal. 2009-12-17 Ito Hiroyuki * src/gtk/gtk_widget.c (create_file_entry_with_cb): added. * src/gtk/x11dialg.h (struct FileMath, struct FileLoad) (struct FileMask, struct FileMove): added. (struct FileDialog): add member "math", "load", "mask" and "move" * src/gtk/x11file.c (move_tab_setup_item, move_tab_copy) (move_tab_create, move_tab_set_value, mask_tab_setup_item) (mask_tab_copy, mask_tab_create, mask_tab_set_value) (load_tab_setup_item, load_tab_copy, load_tab_create) (load_tab_set_value, math_tab_setup_item, math_tab_copy) (math_tab_create, math_tab_set_value, file_setup_item) (set_fit_button_label, plot_tab_setup_item, file_settings_copy) (plot_tab_create, file_dialog_show_tab, set_headlines) (plot_tab_set_value): added. (FileDialogSetup): use "set_headlines()". * src/gtk/x11graph.c (PageDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". * src/gtk/x11lgnd.c (LegendLineCB, LegendRectCB, LegendArcCB): use "g_strdup_printf()" instead of "g_malloc()" and "snprintf()". (legend_dialog_set_sensitive): added. (legend_dialog_setup_item): call "legend_dialog_set_sensitive()". (legend_copy_clicked): added. (width_setup, points_setup, style_setup, miter_setup) (join_setup, color_setup, color2_setup, LegendCurveDialogSetup) (LegendPolyDialogSetup, LegendArrowDialogSetup) (LegendRectDialogSetup, LegendArcDialogSetup) (legend_dialog_setup_sub, LegendTextDialogSetup) (LegendTextDefDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". * src/gtk/x11lgndx.c (LegendGaussDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". * src/gtk/x11merge.c (MergeDialogCopy): connected to "clicked" signal. (MergeDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". (MergeDialogClose): remove case for "IDCOPY". * src/gtk/x11opt.c (ViewerDialogSetup, ExViewerDialogSetup) (MiscDialogSetup, SetDriverDialogSetup, SetScriptDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". (SetDriverDialogSetup, SetScriptDialogSetup): use "create_file_entry_with_cb()" instead of "create_text_entry()". (SetScriptDialogBrowse, SetDriverDialogBrowse): connected to "icon-release" signal. * src/gtk/x11print.c (DriverDialogSetup): use "GtkTable" instead of "GtkHBox" or "GtkVBox". (DriverDialogSetup): use "create_file_entry_with_cb()" instead of "create_text_entry()". (DriverDialogBrowseCB): connected to "icon-release" signal. 2009-12-11 Ito Hiroyuki * src/gtk/x11opt.c (MiscDialogSetup): use "GtkTable" instead of "GtkHBox" and "GtkVBox". 2009-12-10 Ito Hiroyuki * src/gtk/x11file.c (select_color): use "ndialog_run()" instead of "gtk_dialog_run()". * src/gtk/gtk_widget.c (show_color_sel): use "ndialog_run()" instead of "gtk_dialog_run()". * src/gtk/x11opt.c (PrefFontDialogUpdate, PrefFontDialogAdd): use "ndialog_run()" instead of "gtk_dialog_run()". * src/gtk/x11gui.c (DialogExecute): use "DnDLock" instead of "GlobalLock". (ndialog_run): added. (DialogExecute, MessageBox, DialogInput, DialogRadio) (DialogCombo, DialogComboEntry, DialogSpinEntry, DialogCheck) (FileSelectionDialog): use "ndialog_run()" instead of "gtk_dialog_run()". * src/gtk/x11menu.c: add gloval variable "DnDLock". * src/gtk/x11view.c (drag_drop_cb): check "DnDLock". * src/gtk/x11lgndx.c (enum LEGEND_DIRECTION) (LEGEND_DIRECTION_NUM): add (LegendGaussDialogPaint, LegendGaussDialogClose): use "switch" instead of "if". (LegendGaussDialogSetup): use "GtkTable" instead of "GtkHBox" and "GtkVBox". * src/gtk/x11dialg.h: add definition of structs "AxisBase", "AxisPos", "AxisFont", "AxisNumbering" and "AxisGauge". (struct AxisDialog): add member "tab", "del_btn", "tab_active", "base", "font", "position", "gauge" and "numbering". * src/gtk/x11dialg.c: remove gloval variables "DlgAxisBase", "DlgAxisPos", "DlgNum", "DlgAxisFont" and "DlgGauge". (SetObjFieldFromWidget): focus the widget when an error is occurred. * src/gtk/x11axis.c (bg_button_toggled): added. (GridDialogSetupItem): call "bg_button_toggled()". (GridDialogSetup): "toggled" signal is connected to "bg_button_toggled()" . (grid_copy_clicked): change name from "GridDialogCopy()". (gauge_syle_setup, GridDialogSetup, SectionDialogSetup) (CrossDialogSetup): use "GtkTable" instead of "GtkHBox" and "GtkVBox". (scale_tab_setup_item, scale_tab_copy_clicked, scale_tab_create) (baseline_tab_set_value, baseline_tab_setup_item) (baseline_tab_copy_clicked, baseline_tab_create) (gauge_tab_set_value, gauge_tab_setup_item) (gauge_tab_copy_clicked, gauge_tab_create) (numbering_tab_set_value, numbering_tab_setup_item) (numbering_tab_copy_clicked, numbering_tab_create) (font_tab_set_value, font_tab_setup_item, font_tab_copy_clicked) (font_tab_create, position_tab_set_value) (position_tab_setup_item, position_tab_copy_clicked) (position_tab_create, axis_dialog_show_tab): added. (AxisDialogSetup): use "GtkNotebook". (scale_tab_set_value): added. (AxisDialogClose): call "gtk_notebook_set_current_page()" when errors are occurred. (AxisDialogSetup): sensitivity of the delete button is depemd on "d->CanDel". * src/gtk/gtk_widget.c (add_widget_to_table_sub) (add_widget_to_table, add_copy_button_to_box): added. 2009-12-05 Ito Hiroyuki * configure.in: set "AM_SILENT_RULES". 2009-11-30 Ito Hiroyuki * src/osystem.c (sysinit): call "gsl_set_error_handler_off()" when "HAVE_LIBGSL" is defined. * src/math/math_basic_function.c (math_func_icgam) (math_func_gamma, math_func_erfc, math_func_beta, math_func_lgn) (math_func_pn, math_func_yn, math_func_jn, math_func_ei): use GSL function when available. (math_func_icbeta, math_func_erf, math_func_zeta) (math_func_zetam1, math_func_zeta_int, math_func_zetam1_int) (math_func_ynu, math_func_jnu, math_func_inu, math_func_knu) (math_func_in, math_func_kn, math_func_yl, math_func_jl): added. 2009-11-26 Ito Hiroyuki * src/omath.c (parse_original_formula): this function is not used if "NEW_MATH_CODE" is not defined. * src/shellcm.c (cmdexpr): variable "err_msg" is always used. * src/gtk/main.c (obj_add_func_ary[]): add "addio". * src/oio.c: added. 2009-11-24 Ito Hiroyuki * src/math/math_equation.c (clear_pos_func_buf): added. (math_equation_clear): use "clear_pos_func_buf()". (math_equation_parse): call "clear_pos_func_buf()" if "eq->pos_func_num" is greater than zero. * src/math/math_basic_function.c (math_func_asin) (math_func_acos): minimum value of "v" is -1 (not 0). (math_func_not): don't have to check "exp->buf[1]". (math_func_gt): comparing condition is ">" (not ">="). (math_func_pn): "x" is "double" (not "int"). (math_func_pn): check maximum value of "x". (math_func_rsort): 3rd argument of the function "qsort" is "sizeof(MathValue)" (not "sizeof(double)"). * src/shell.c (str_calc): set rcode as "MNAN" or "MUNDEF" when "value.type" is "MATH_VALUE_NAN" or "MATH_VALUE_UNDEF" respectively. (str_calc): initialize "value" and "val". 2009-11-23 Ito Hiroyuki * src/math/math_basic_function.c (math_func_acos) (math_func_asin): initialize variable "v". 2009-11-21 Ito Hiroyuki * src/math/math_parser.c (parse_const_def_expression): return NULL when "eq->func_def" is TRUE. (parse_const_def_expression): set and restore "eq->func_def" before and after call the function "parse_expression()". (parse_expression_list): don't call "math_expression_free()" before call "math_equation_set_parse_error()". (parse_expression_list): return NULL when "token->type" is "MATH_TOKEN_TYPE_CONST" and "inside_block" is TRUE. * src/math/math_error.h (MATH_ERROR_INVALID_CDEF) (MATH_ERROR_PRM_IN_DEF): added. * src/math/math_error.c (ERR_MSG_INVALID_C, ERR_MSG_PRM_IN_DEF): added. (ERR_MSG_POS_FUNC): change message. (math_err_get_error_message): add case for "MATH_ERROR_INVALID_CDEF" and "MATH_ERROR_PRM_IN_DEF#. * src/math/math_equation.c (math_equation_get_parameter): add argument "int *err" and set error id when "err" is not NULL. * src/ofile.c (put_func): don't substitute return value of the function "set_equation()" when rcode is TRUE. * src/object.c (ERR_MSG_BUF_SIZE): change buffer size. (error, error2, error22): change maximumlength of an error message. 2009-11-20 Ito Hiroyuki * src/ofile.c (MATH_CONST_NUM): add constant "MASK" and "MOVE". (set_const): set constant "MASK" and "MOVE". 2009-11-17 Ito Hiroyuki * src/math/math_parser.c (parse_primary_expression): return NULL when the type of the token is "MATH_TOKEN_TYPE_EOEQ". * src/gtk/x11commn.c (AddNgpFileList): check if the filename is valid UTF-8 string. * src/gtk/x11menu.c (show_file_menu_cb): change filename to UTF-8. * src/gtk/x11opt.c (SetScriptDialogBrowse) (SetDriverDialogBrowse): use "entry_set_filename()". * src/gtk/gtk_widget.c (entry_icon_file_select): use "entry_set_filename()". * src/gtk/x11opt.c (set_scrpt_file, SetDriverDialogClose): use "entry_get_filename()". * src/gtk/x11dialg.c (SetObjFieldFromText): change filename from UTF-8. * src/gtk/gtk_widget.c (entry_get_filename, entry_set_filename): added. * src/gtk/gtk_subwin.c (modify_string): change filename from UTF-8. * src/gtk/x11merge.c (merge_list_set_val): change filename to UTF-8. * src/gtk/x11gui.c (file_dialog_set_current_neme): change filename to UTF-8. * src/gtk/x11file.c (file_list_set_val): change filename to UTF-8. * src/gtk/x11dialg.c (SetTextFromObjField): change filename to UTF-8. * src/gtk/x11commn.c (check_overwrite, LoadNgpFile): change filename to UTF-8. * src/gtk/ox11menu.c (SetCaption): change filename to UTF-8. * src/gtk/gtk_widget.c (entry_set_filename): change filename to UTF-8. * src/gtk/gtk_subwin.c (file_select, start_editing): change filename to UTF-8. * src/ofile.c (set_data_progress): don't show the filename. * src/gtk/gtk_widget.c (filename_from_utf8, filename_to_utf8): added. 2009-11-16 Ito Hiroyuki * src/nstring.c (nstrdup): remove (use g_strdup instead). * src/object.c (memalloc, memrealloc, memfree): remove (use g_malloc, g_realloc and g_free instead). 2009-11-14 Ito Hiroyuki * src/strconv.h: moved from "src/gtk/strconv.c". * src/strconv.c: moved from "src/gtk/strconv.c". * src/math/math_parser.c (parse_primary_expression) (parse_const_def_expression): "*err" is "MATH_ERROR_EOEQ" when the type of the token is "MATH_TOKEN_TYPE_EOEQ". * src/gtk/strconv.c (utf8_to_sjis, sjis_to_utf8): use "CP932" instead of "shift-jis" 2009-11-12 Ito Hiroyuki * src/omath.c (parse_original_formula): added. (mformula): use "parse_original_formula()". 2009-11-11 Ito Hiroyuki * src/shellcm.c (str_calc): remove. * src/shell.c (str_calc): added. * src/object.c (getargument): use "str_calc()". * src/gra.c (GRAexpandmath): use "str_calc()". * src/ofile.c (put_func): restore old equation when new equation causes error. 2009-11-10 Ito Hiroyuki * src/math/math_parser.c (parse_const_def_expression): set error code. (parse_const_def_expression): fix condition from "token->data.op == MATH_OPERATOR_TYPE_EQ" to "token->data.op != MATH_OPERATOR_TYPE_ASSIGN" 2009-11-07 Ito Hiroyuki * src/gtk/x11commn.c (get_save_opt): return "IDOK" or "IDCANCEL". (GraphSave): return "IDCANCEL" when "get_save_opt()" returns "IDCANCEL". 2009-11-06 Ito Hiroyuki * src/gtk/x11view.c (mouse_down_move_data, move_data_cancel): first argument of "MessageBox()" is NULL. * src/gtk/x11print.c (CmOutputPrinter): first argument of "MessageBox()" is NULL. * src/gtk/x11opt.c (set_scrpt_option, CmOptionSaveNgp): first argument of "MessageBox()" is NULL. * src/gtk/x11menu.c: (static GtkWidget *CurrentWindow) (set_current_window, get_current_window): add (PutStderr): first argument of "MessageBox()" is NULL. * src/gtk/x11gui.c (DialogExecute): save and restore current window. (MessageBox): use "get_current_window()" as parent if "parent" is NULL. * src/gtk/x11commn.c (ErrorMessage): first argument of "MessageBox()" is NULL. * src/math/math_error.c (math_err_get_error_message): convert error message from utf-8 to locale. * src/gtk/x11lgnd.c (pos_edited, width_edited): don't show error message. * src/gtk/x11axis.c (pos_edited_common): don't show error message. (pos_edited_common): change first argument (from "struct objlist *" to "struct SubWin*"). * src/gtk/gtk_widget.c (spin_change_value_cb): don't show error message (because Gtk+ shows following error message). Gtk-WARNING **: GtkEntry - did not receive focus-out-event. If you connect a handler to this signal, it must return FALSE so the entry gets the event as well 2009-11-04 Ito Hiroyuki * src/ofile.c (put_func): change 5th argument from "int type" to "char *field". * src/ofit.c (fitput): use "math_err_get_error_message()". 2009-11-03 Ito Hiroyuki * src/math/math_expression.c (math_constant_definition_expression_new): set error id to "*err" when the constant is already defined. * src/math/math_error.c (ERR_MSG_CONST_EXIST) (ERR_MSG_CALCULATION): added. * src/math/math_equation.c (math_equation_set_const_error) (math_equation_get_const_name): added. (math_equation_add_const_definition): add argument "int *err". * src/math/math_error.c (check_error_position) (math_err_get_error_message, ERR_MSG_FUNC_NEST) (ERR_MSG_UNEXP_OP, ERR_MSG_UNEXP_TOK, ERR_MSG_ARG_NUM) (ERR_MSG_MISS_RP, ERR_MSG_MISS_RC, ERR_MSG_MISS_RB) (ERR_MSG_UNKNOWN_F, ERR_MSG_INVARID_F, ERR_MSG_INVARID_P) (ERR_MSG_MEMORY, ERR_MSG_UNKNOWN, ERR_MSG_POS_FUNC): added. * src/math/math_parser.c (parse_array_expression) (parse_primary_expression, get_argument, create_math_func) (parse_unary_expression, parse_expression) (parse_expression_list): call "math_equation_set_parse_error()", "math_equation_set_func_arg_num_error()" or "math_equation_set_func_error()" when parse error. * src/math/math_equation.h (_struct _math_equation): add member "err_info". * src/math/math_equation.c (math_equation_new): use "memset()" to initialize struct. (math_equation_set_parse_error) (math_equation_set_func_arg_num_error) (math_equation_set_func_error): added. (math_equation_parse): initialize "eq->err_info". * src/gtk/x11lgnd.c (width_edited, pos_edited): add 4th argument for the function "str_calc()". (width_edited, pos_edited): show message on an error. * src/gtk/x11axis.c (pos_edited_common): add 4th argument for the function "str_calc()". (pos_edited_common): show message on an error. * src/gtk/gtk_widget.c (spin_change_value_cb): add 4th argument for the function "str_calc()". (spin_change_value_cb): show message on an error. * src/gtk/gtk_subwin.c (numeric_cb): add 4th argument for the function "str_calc()". * src/shellcm.c (str_calc): add argument "char **err_msg". (str_calc): set error message when "*err_msg" is not NULL. (cmdexpr): show error message created in new math code. * src/ofile.c (put_func): show message on an error. (f2dputmath): don't show error message. 2009-10-27 Ito Hiroyuki * addin/legend.tcl (savescript): move frame rectangle to the top of the instances. (makescript): bug fix: fix typo "in" to "int". 2009-10-22 Ito Hiroyuki * src/ofile.c (struct f2dlocal): add member "total_line", (f2dinit): initialize "f2dlocal->total_line". (set_final_line): added. (check_mtime, getminmaxdata): call "set_final_line()". 2009-10-21 Ito Hiroyuki * src/shellcm.c (str_calc): add code for new math code. * src/omath.c (mlocalclear, minit, mdone): add code for new math code. (create_func_def_str): added. (mformula, mcalc): add code for new math code. * src/ofit.c (fitdone, fitput, fituser): add code for new math code. * src/ofile.c (struct f2ddata_buf): add members "colr2", "colg2" and "colb2" when "NEW_MATH_CODE" is true. (struct f2ddata): add some members when "NEW_MATH_CODE" is true. (struct f2dload): add some members when "NEW_MATH_CODE" is true. (file_color, file_rgb_sub, file_rgb, file_rgb2, file_hsb_sub) (file_hsb, file_hsb2, file_marksize, file_marktype, struct funcs) (add_file_func): added. (opendata, reopendata, f2dputmath): add code for new math code. (create_func_def_str, set_user_fnc, set_equation, put_func): added. (create_math_equation): added. (f2dinit, f2ddone, getdataarray, getdata_get_other_files): add code for new math code. (set_var, set_const, file_calculate, set_const_all): added. (getdata_sub2, getdata_sub1, getdata, getdata2, getdataraw) (getminmaxdata, markout, rectout, barout, fitout, f2ddraw) (f2devaluate, f2dgetdataraw, f2dstat, f2dstat2, f2dboundings) (f2doutputfile): add code for new math code. * src/object.c (getargument): add code for new math code. * src/gra.c (GRAexpandmath): add code for new math code. * src/gtk/x11file.c (FitDialogResult): add code for new math code. * src/math/parse_bin_expression.h: added. * src/math/math_scanner.h: added. * src/math/math_scanner.c: added. * src/math/math_parser.h: added. * src/math/math_parser.c: added. * src/math/math_operator.rb: added. * src/math/math_operator.h.in: added. * src/math/math_operator.h: added. * src/math/math_operator.c: added. * src/math/math_function.rb: added. * src/math/math_function.h.in: added. * src/math/math_function.h: added. * src/math/math_function.c: added. * src/math/math_expression.h: added. * src/math/math_expression.c: added. * src/math/math_error.h: added. * src/math/math_equation.h: added. * src/math/math_equation.c: added. * src/math/math_constant.rb: added. * src/math/math_constant.h.in: added. * src/math/math_constant.h: added. * src/math/math_constant.c: added. * src/math/math_basic_function.c: added. * src/math/Makefile.am: added. * configure.in: add macro for new math code. * src/gtk/x11axis.c (axiswin_scale_clear): call "set_graph_modified()" after call "exeobj()". 2009-10-20 Ito Hiroyuki * src/shell.c (expand): new upstream release (6.3.51). * src/ofile.c (f2dtime, f2ddate): new upstream release (6.3.51). * src/omerge.c (mergedate, mergetime): new upstream release (6.3.51). 2009-10-10 Ito Hiroyuki * src/gtk/x11commn.c (AxisDel): fix 3rd argument of "strncpy()" (from "sizeof(group)" to "sizeof(group3)"). 2009-10-02 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvKeyDown): call "UnFocus()" when the escape key is pressed. 2009-09-05 Ito Hiroyuki * src/mathcode.c (mathexpand): maximum value of the operand for operator '!' is 169 (not 69). 2009-08-28 Ito Hiroyuki * src/gtk/x11commn.c (get_save_opt): added. (GraphSave): use "get_save_opt()". 2009-08-19 Ito Hiroyuki * src/gtk/x11file.c (draw_type_pixbuf): call "g_object_unref()" for "pix" when "ggc" is lesser than 0. * src/gtk/x11view.c (drag_drop_cb): check the drop is success or not. (text_dropped): use "CheckGrid()". (enum EvalDialogColType, eval_dialog_set_parent_cal) (mask_selected_data): added. (EvalDialogSetupItem, eval_dialog_copy_selected) (EvalDialogSetup, select_data_cb): use "GtkTreeStore" instead of "GtkListStore". (Evaluate): use "mask_selected_data". (mouse_down_move_data): don't return but "goto ErrEnd;" when "fileobj" is NULL. 2009-08-18 Ito Hiroyuki * src/gtk/x11view.c (eval_dialog_copy_selected): save text to not only "CLIPBOARD" but "PRIMARY". 2009-08-17 Ito Hiroyuki * src/gtk/gtk_widget.c (_create_spin_entry): fix argument of "gtk_spin_button_set_digits()". * src/gtk/x11dialg.c (get_style_string): added. (SetStyleFromObjField): use "get_style_string()". * src/gtk/x11lgnd.c (legend_list_set_val): don't display size of mark object. (legend_list_set_val): show mark size in "LEGEND_WIN_COL_WIDTH" column. (legend_list_set_val): show some fields in "LEGEND_WIN_COL_PROP" column. (width_edited): edit "size" field of mark object. (get_points): added. 2009-08-14 Ito Hiroyuki * src/gtk/x11gui.c (DialogExecute): set "GlobalLock" as TRUE, save and restore "GlobalLock" to inhibit DnD during executing dialog. * src/gtk/x11view.c (init_dnd): use "gtk_target_list_add_text_targets()" to add text target. (drag_drop_cb): do nothing when "GlobalLock" is TRUE. (drag_drop_cb): always call "gtk_drag_finish()". (paste_cb): call "UpdateAll()" after call "ShowFocusFrame()". (text_dropped): focus newly created text. 2009-08-13 Ito Hiroyuki * src/gtk/x11gui.c (DialogSpinEntry): call "gtk_spin_button_set_numeric()". * src/gtk/x11print.c (OutputImageDialogSetup): second argument of "gtk_spin_button_set_numeric()" is TRUE. * src/gtk/x11lgnd.c (pos_edited, width_edited): use "str_calc()" instead of "strtod()". * src/gtk/x11axis.c (pos_edited_common): use "str_calc()" instead of "strtod()". * src/gtk/gtk_widget.c (spin_change_value_cb): added. (_create_spin_entry): call "g_signal_connect()" for "input" signal. (_create_spin_entry): second argument of "gtk_spin_button_set_numeric()" is FALSE. * src/gtk/gtk_subwin.c (start_editing): second argument of "gtk_spin_button_set_numeric()" is FALSE. (numeric_cb): use "str_calc()" instead of "strtod()". * src/gtk/x11lgnd.c (width_edited): added. (CmLegendWindow): call "set_editable_cell_renderer_cb()" for "LEGEND_WIN_COL_WIDTH". (legend_list_set_val): add case for "LEGEND_WIN_COL_WIDTH". (legend_list_set_val): add mark character and mark size for the case of "LegendTypeMark". (MarkChar, MarkCharNum): added. (Llist): add column "lw/pt", remove column "object" and change column from "property" to "object/property". (LEGEND_WIN_COL_WIDTH): added. (legend_list_set_val): gettextize some strings. (legend_list_set_val): remove case for "LEGEND_WIN_COL_NAME". (legend_list_build, legend_list_set): set strings to "LEGEND_WIN_COL_PROP" column. 2009-08-12 Ito Hiroyuki * src/gtk/x11file.c (fit_load_dialog_default_cb): remove. (FitLoadDialogSetup): use "GtkComboBox" instead of "GtkTreeView". (FitSaveDialogSetup): add delete button. (FitSaveDialogClose): call "g_strstrip()" for the profile. (FitSaveDialogClose): show confirm message when the profile is not specified. (copy_settings_to_fitobj, delete_fitobj): added. (FitDialogSave): use "copy_settings_to_fitobj()" and "delete_fitobj()". (FitCB): return "type" only when "profile" is NULL. 2009-08-11 Ito Hiroyuki * src/gtk/x11view.c (eval_dialog_copy_selected) (eval_data_sel_cb): added. (EvalDialogSetup): add "Copy" button. (paste_cb): place pasted text to center of the widget. (text_dropped): position of the text is multiple of 100. * src/gtk/x11file.c (math_dialog_key_pressed_cb): use "gtk_tree_selection_count_selected_rows()" to check rows are selected or not. * src/gtk/x11dialg.c (multi_list_default_cb): use "gtk_tree_selection_count_selected_rows()" to check rows are selected or not. * src/gtk/x11dialg.c (multi_list_default_cb): remove redundant call of "gtk_tree_view_get_selection()". * src/gtk/x11dialg.h (struct FitDialog): add member "func_label". * src/gtk/x11file.c (FitDialogSetup): add equation label. (FitDialogSetup): improve the placement of widgets. (FitDialogSetup): maximum number of "d->dim" is 9. (FitDialogSetup): maximum number of "d->div" is 65535. (FitDialogSetSensitivity): set equation label string. (set_fitdialog_sensitivity): added. * src/ofit.c (fituser): show "dxxc" in the progress dialog. 2009-08-10 Ito Hiroyuki * src/gra.c (GRAexpandtext): output '-' character when the string is '\-' (because 0xad "soft hyphen" is not printable usually). (GRAexpandtext): output no character when the string is '\x00'. * src/gtk/gtk_subwin.c (sub_window_create): call "gtk_widget_show_all()" for "swin". 2009-08-07 Ito Hiroyuki * src/gtk/x11file.c (select_color): check version of GTK. * src/gtk/x11gui.c (FileSelectionDialog): call "file_dialog_set_current_neme()" only when "type" is "GTK_FILE_CHOOSER_ACTION_SAVE". 2009-08-06 Ito Hiroyuki * src/object.c (sexeobjfield): check "arglist" before call "strcmp()". * src/odraw.h (enum SAVE_PATH_TYPE): added. * src/gtk/x11commn.c (SetFileName): use copy of "str". (ToRalativePath): added. (GraphSave): save and restore previous working directory. (GraphSave): change "file::file" and "merge::file" depend on the value of "path". 2009-08-05 Ito Hiroyuki * src/gtk/x11opt.c (MiscDialogSetup): set label to some frames. * src/gtk/x11file.c (FitCB): just return "valstr". * src/gtk/x11commn.c (FileCB): use "g_strdup_printf()". (change_filename, get_basename, ToBasename): added. (ToFullPath): use "change_filename()". (LoadNgpFile): "system::ignore_path" is always FALSE. (LoadNgpFile): call "ToBasename()" when "ignorepath" is TRUE. * src/gtk/x11axis.c (AxisCB, AxisHistoryCB, GridCB): use "g_strdup_printf()". * src/gtk/x11commn.c (LoadPrmFile): set modified flag when load PRM file. * src/oaxis.c (draw_wave, draw_arrow): added. (axisdraw): use "draw_wave()" and "draw_arrow()". 2009-08-04 Ito Hiroyuki * src/gtk/gtk_widget.c (direction_icon_released) (create_direction_entry): exchange up and down icon. * src/oline.c (arrowdraw, arrowbbox): use "enum ARROW_POSITION_TYPE". * src/oaxis.c (enum AXIS_SCALE_TYPE): added. (anumdirchar, enum AXIS_NUM_DIR): add member "normal2". (get_num_pos_horizontal, get_num_pos_parallel) (get_num_pos_normal, struct font_config, struct axis_config) (get_num_ofst_horizontal, get_num_ofst_parallel) (get_num_ofst_normal1, get_num_ofst_normal2, draw_numbering) (numbering, draw_gauge, get_axis_parameter) (get_reference_parameter): added. (axisdraw): use "get_reference_parameter()", "draw_gauge()" and "numbering()". (axisdraw): use "enum ARROW_POSITION_TYPE". * src/odraw.h (enum ARROW_POSITION_TYPE): added. * src/mathfn.c (compare_double): added. * src/axis.c (getaxispositionini): use "compare_double()" to compare two floating-point value. 2009-07-27 Ito Hiroyuki * src/gtk/x11view.c (ncopyobj): use "copy_obj_field()". (new_file_obj): add argument "multi". (data_dropped): "Apply All" button is active when "i" is lesser than "num - 1". * src/gtk/x11file.c (copy_file_obj_field): use "copy_obj_field()". * src/gtk/x11commn.c (FitCopy): use "copy_obj_field()". * src/gtk/gtk_subwin.c (obj_copy): use "copy_obj_field()". * src/shellcm.c (cmcpy): use "copy_obj_field()". * src/object.c (copy_obj_field): added. 2009-07-26 Ito Hiroyuki * src/gtk/x11file.c (copy_file_obj_field): add (FitDialogSave): check "DlgFitSave.Profile" and "DlgFitSave.Profile[0]". (FitDialogSave): check arguments of "strcmp()". (CmFileHistory): use "nstrdup()" instead of "memalloc()" and "strcpy()". (FileDialogCopyAll, update_file_obj_multi, file_obj_copy): use "copy_file_obj_field()". * src/gtk/x11gui.c (fsok): use "g_strdup_printf()" or "strdup()" instead of "malloc()" and "strcpy()". * src/gtk/x11commn.c (AxisDel): use "strncpy()" instead of "strcpy()". * src/gtk/ogra2cairofile.c (gra2cairofile_output): don't check "local->linetonum" before call "gra2cairo_draw_path()". * src/gtk/ogra2cairo.c (gra2cairo_update_fontmap): check arguments "fontname" and "fontalias". (gra2cairo_draw_path): check "local->linetonum". (gra2cairo_free, gra2cairo_flush, gra2cairo_output): don't check "local->linetonum" before call "gra2cairo_draw_path()". * src/gtk/gtk_entry_completion.c (entry_completion_append): check argument "str". 2009-07-23 Ito Hiroyuki * src/gtk/x11file.c (FitDialogSave): bug fix: check and argument of "strcmp()". * src/gtk/x11gui.c (set_dialog_position, get_dialog_position): added. (DialogInput, DialogRadio, DialogCombo, DialogComboEntry) (DialogSpinEntry, DialogCheck): add add argument "x" and "y". * src/gtk/ox11dlg.c (dlginit): initialize "x" and "y" field. (dlginput, dlgradio, dlgcombo, dlgspin, dlgcheck): add argument "x" and "y" to create dialog window. (dialog): add field "x" and "y". 2009-07-22 Ito Hiroyuki * src/gtk/x11axis.c (CmAxisWindow): call "sub_window_show_all()" instead of "sub_window_show()". * src/gtk/x11cood.c (CoordWinUpdate): call "sub_window_show_all()" instead of "sub_window_show()". * src/gtk/x11file.c (CmFileWindow): call "sub_window_show_all()" instead of "sub_window_show()". * src/gtk/x11info.c (InfoWinUpdate): call "sub_window_show_all()" instead of "sub_window_show()". * src/gtk/x11lgnd.c (CmLegendWindow): call "sub_window_show_all()" instead of "sub_window_show()". * src/gtk/x11merge.c (CmMergeWindow): call "sub_window_show_all()" instead of "sub_window_show()". * src/gtk/gtk_subwin.c (sub_window_show_all): added. (sub_window_show, sub_window_hide): call "gtk_widget_show()" and "gtk_widget_hide()" instead of "gtk_widget_show_all()" and "gtk_widget_hide_all()" respectively. 2009-07-21 Ito Hiroyuki * src/omark.c (MODIFY_MARK_TYPE, rotate_cw, v_flip, h_flip): added. (markrotate, markflip): modify mark type when "MODIFY_MARK_TYPE" is TRUE. 2009-07-15 Ito Hiroyuki * src/gtk/x11file.c (select_type): use 3rd column of the combo-box to specify which type of item is selected. (start_editing_type): don't activate the combo-box item. * src/gtk/gtk_liststore.c (start_editing_obj): add column to the model. 2009-07-14 Ito Hiroyuki * src/gtk/gtk_liststore.c (create_column): set "expand" property as TRUE when ellipsize mode is not "PANGO_ELLIPSIZE_NONE". * src/gtk/x11file.c (enum FILE_COMBO_ITEM, select_color): added. (select_type): set not only "type" but color. (create_type_combo_box): add color setting combo item. 2009-07-10 Ito Hiroyuki * src/gtk/x11file.c (count_line_number_str, set_line_number_tag) (create_text_tag): added. (FileDialogSetup): initialize "d->comment_num_tag" and set tag for line number. * src/gtk/x11dialg.h (struct FileDialog): add member "comment_num_tag". * addin/Makefile.am (pkglib_DATA): add "cal.nsc". * addin/cal.nsc: added. * src/gtk/x11gui.c (DialogSpinEntry): added. * src/gtk/ox11dlg.c (dlgspin): added. (dialog): add new field "double_entry" and "integer_entry". 2009-07-09 Ito Hiroyuki * src/gtk/x11menu.c (clear_information): added. (create_windowmenu): add menu item "_Clear information window". * src/gtk/ox11menu.c (menudone): return "1" when GUI is active. (mxredraw, mxdpi, mxflush, mx_get_focused, mx_echo, mx_cat) (mx_clear_info, mx_toggle_win, mxdraw, mxclear): do nothing when GUI is not active. (menuerrorlist): add error message ("the GUI is not active"). (SubwinData, _subwin_data, subwindow_show, subwindow_hide) (mx_show_win, mx_hide_win): added. (gtkmenu): add new field "show_window" and "hide_window". * src/gtk/x11info.c (create_win): initialize font and geometry settings. 2009-07-08 Ito Hiroyuki * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose): add code for "infowin_font" setting. * src/gtk/x11info.c (InfoWinSetFont): added. (InfoWinUpdate): call "InfoWinSetFont()". * src/gtk/ox11menu.h (struct menulocal): add member "infowin_font". * src/gtk/ox11menu.c (menuerrorlist): add error message ("cannot open the file"). (MenuConfigMisc): add "infowin_font" setting. (mx_cat, mx_clear_info, mx_toggle_win): added. (gtkmenu): add new field "cat", "clear_info" and "toggle_window". 2009-07-07 Ito Hiroyuki * src/gtk/gtk_subwin.c (tree_hidden): don't execute "d->update()" but call "gtk_tree_store_set()". (toggle_cb): use "tree_hidden()". * src/object.c (sexefield): don't remove space character. (sexeobjfield): remove space character only when "arglist" is "s". 2009-07-06 Ito Hiroyuki * src/gtk/x11commn.c (AddNgpFileList): free "full_name" after call "g_strdup_printf()". * src/gtk/x11view.c (paste_cb): don't use a temporary file and use "eval_script()". * src/shell.c (getcmdline): the type of argument "str" is "const char *". (eval_script): added. (cmdexecute): the type of argument "cline" is "const char *". 2009-07-05 Ito Hiroyuki * initfile/Ngraph.nsc: use "NGRAPHCONF" instead of "NGRAPHLIB". * src/gtk/x11print.c (DriverDialogClose): use "g_strdup_printf()" instead of "snprintf()". * src/gtk/x11opt.c (create_font_selection_dialog): use "g_strdup_printf()" instead of "snprintf()". * src/gtk/x11menu.c (createmenu): use "g_strdup_printf()" instead of "snprintf()". (load_hist_file, save_hist_file): added. (save_entry_history): use "save_hist_file()". (load_hist): use "load_hist_file()". * src/gtk/x11dialg.c (SetObjAxisFieldFromWidget): use "g_strdup_printf()" instead of "snprintf()". * src/gtk/x11commn.c (check_overwrite, AddNgpFileList) (SaveHistory): use "g_strdup_printf()" instead of "snprintf()". * src/gtk/ox11menu.c (add_prm_str_to_array) (save_ext_driver_config, save_script_config): use "g_strdup_printf()" instead of "snprintf()". (menu): "arglist" of "menu" field is "s". * src/gtk/main.c (main, obj_member_completion_function): use "g_strdup_printf()" instead of "snprintf()". * src/shellcm.c (cmbasename): call "basename(3)" to duplicated string. (cmdirname): use duplicated string. (cmexist): add "-q" option. * driver/ngp2.in: use "-q" option for "exist" command. (save_image): copy settings of "gra" object. (save_image): set "display" field of "fit" object as false if exist. * initfile/Ngraph.nsc: use "-q" option for "exist" command. (load_graph): argument of "$LOGIN_SHELL" is full-path filename. 2009-07-02 Ito Hiroyuki * src/gtk/x11print.c (DriverDialogBrowseCB, CmPrintGRAFile) (CmOutputImage, CmPrintDataFile): change the arguments of the function "nGetSaveFileName()". * src/gtk/x11opt.c (SetScriptDialogBrowse) (SetDriverDialogBrowse): change the arguments of the function "nGetOpenFileName()". * src/gtk/x11merge.c (CmMergeOpen): change the arguments of the function "nGetOpenFileName()". * src/gtk/x11gui.c (file_dialog_set_current_neme): added. (FileSelectionDialog): use "file_dialog_set_current_neme()". (nGetOpenFileNameMulti, nGetOpenFileName, nGetSaveFileName): remove the argument "filter". (struct nGetOpenFileData): remove member "filter". * src/gtk/x11graph.c (CmGraphLoad): change the arguments of the function "nGetOpenFileName()". * src/gtk/x11file.c (CmFileNew, CmFileOpen): change the arguments of the functions "nGetOpenFileName()" and "nGetOpenFileNameMulti()". * src/gtk/x11commn.c (GraphSave): change the arguments of the function "nGetSaveFileName()". * src/gtk/ox11dlg.c (dlggetopenfile, dlggetopenfiles) (dlggetsavefile): change the arguments of the functions "nGetOpenFileName()", "nGetOpenFileNameMulti()" and "nGetSaveFileName()". * src/gtk/ogra2cairo.c (gra2cairo_save_config): use "g_strdup_printf()" instead of "snprintf()". * src/gtk/gtk_widget.c (entry_icon_file_select): change the arguments of the function "nGetOpenFileName()". * src/gtk/gtk_subwin.c (file_select): change the arguments of the function "nGetOpenFileName()". 2009-07-01 Ito Hiroyuki * src/gtk/x11print.c (DriverDialogClose): use "check_overwrite()". * src/gtk/x11gui.c (FileSelectionDialog): don't call "gtk_file_chooser_set_do_overwrite_confirmation()". (FileSelectionDialog): call "check_overwrite()" when "type" is " GTK_FILE_CHOOSER_ACTION_SAVE" and "data->overwrite" is false. * src/gtk/x11commn.c (check_overwrite): added. 2009-06-30 Ito Hiroyuki * src/gtk/ogra2cairofile.c (gra2cairofile_output): call "gra2cairo_draw_path()" before call "cairo_surface_write_to_png()". * src/gtk/ogra2cairo.c (gra2cairo_draw_path): added. (gra2cairo_free, gra2cairo_flush, gra2cairo_output): use "gra2cairo_draw_path()". 2009-06-29 Ito Hiroyuki * src/ofit.c (fitpoly, fituser): call "display_equation()" only when "disp" is true. 2009-06-26 Ito Hiroyuki * src/gtk/x11file.c (FitDialogClose): check "ret" instead of "d->ret" with "IDOK". 2009-06-24 Ito Hiroyuki * src/gtk/main.c (reset_fifo, exec_console): added. (nallocconsole): use "exec_console()". (nallocconsole): call "unlink()" after open fifo. * src/terminal.c (main): don't call "unlink()". 2009-06-18 Ito Hiroyuki * src/gtk/main.c (main): initialize system::conf_dir. (main): search "conf_dir" instead of "lib_dir". * src/gtk/dir_defs.h.in (CONFDIR): added. * src/shell.c (ngraphenvironment): add new environment variable "NGRAPHCONF". * src/osystem.c (nsystem): add new field "conf_dir". * src/nconfig.c (searchscript, openconfig, replaceconfig) (removeconfig, writecheckconfig, copyconfig): search "conf_dir" instead of "lib_dir". * src/ioutil.h (CONFSEP): change from "/." to "/". * src/Makefile.am (pkglib_PROGRAMS): "terminal" is installed in "$pkglibdir". * initfile/Ngraph.ini.in: specify full path of "nterminal". * initfile/Makefile.am (ngraphconfdir): configration files are installed in "$(sysconfdir)/$(PACKAGE)". * initfile/fit.ngp: change file name from ".fit.ngp" * initfile/Ngraph.nsc: change file name from ".Ngraph" * initfile/Ngraph.ngp: change file name from ".Ngraph.ngp" * driver/Makefile.am (ngraphconfdir): configration files are installed in "$(sysconfdir)/$(PACKAGE)". * addin/Makefile.am (pkglib_DATA): install addins to $pkglibdir. 2009-06-15 Ito Hiroyuki * src/gtk/x11commn.c (SaveDrawrable): use "NFMODE_NORMAL_FILE" instead of "NFMODE". * src/gtk/x11file.c (FitDialogSave): use "NFMODE_NORMAL_FILE" instead of "NFMODE". * src/ioutil.h (NFMODE_NORMAL_FILE): added. * src/osystem.c (sysdone): delete temporary files if exist. 2009-06-14 Ito Hiroyuki * src/osystem.c (systemp): use "n_mkstemp()". * src/ioutil.c (n_mkstemp): set and restore umask. 2009-06-11 Ito Hiroyuki * zsh/_ngraph: added. * zsh/_ngp2: added. * zsh/_gra2wmf: added. * zsh/_gra2ps: added. * zsh/Makefile.am: added. * src/gtk/x11print.c (draw_gra): check "NgraphApp.Viewer.win" before call "gdk_window_invalidate_rect()". * initfile/.Ngraph: add new option -cr, -cg, -cb, -CR, -CG, -CB, -incx, -maxx, -minx, -incy, -maxy, -miny, -L and -dialog. option -c, -C, -zx and -zy are obsolete. 2009-06-10 Ito Hiroyuki * debian/rules: add mime types and bash completion settings. * src/ofile.c (markout): the argument "type" is not used in this function. 2009-06-09 Ito Hiroyuki * src/gtk/x11menu.c (show_graph_menu_cb): remove code related to "ngp_history" and "ngp_dir_history". (create_recent_graph_menu): use "GtkRecentChooserMenu". * src/gtk/x11graph.c (CmGraphHistory): use "GtkRecentChooser". * src/gtk/x11commn.c (AddNgpFileList): static function. (AddNgpFileList): use "GtkRecentManager". (SaveHistory): don't save "ngp_history" and "ngp_dir_history". * src/gtk/ox11menu.c (MenuConfig): remove "ngp_history" and "ngp_dir_history". (menulocal_finalize, menuinit): remove code related to "ngp_history" and "ngp_dir_history". (menuinit): "Menulocal.ngpfilelist" is "GtkRecentManager *". * initfile/Ngraph.ini.in (viewer_load_file_data_number): remove "ngp_history" and "ngp_dir_history". 2009-06-08 Ito Hiroyuki * src/gtk/x11graph.c (pagelist, PageDialogSetup): gettextize paper size strings. 2009-06-03 Ito Hiroyuki * src/gra.c (getintpar): check size of "s2". (GRAinputdraw): check number of the parameters and return success or not. (GRAinput): return the return value of "GRAinputdraw()". * src/gtk/x11menu.c (AppMainLoop): return 1 when terminated. (application): delete instance of "system" object when return value of "AppMainLoop()" is 1. 2009-06-02 Ito Hiroyuki * src/gtk/main.c (nfreeconsole): send "SIGTERM" instead of "SIGCHLD". * src/terminal.c (main): use "sigsuspend()" if available. (main): trap "SIGTERM" instead of "SIGCHLD". * src/shell.c (cmdexec): bug fix: use "WEXITSTATUS" to get return status of external command. * src/gtk/x11menu.c (application): call "SaveHistory()". (AppMainLoop): don't call "SaveHistory()". 2009-06-01 Ito Hiroyuki * src/shell.c (set_signal, set_shellevloop, reset_shellevloop): added. (shellevloop): use pthread. (shgetstdin, shget): use "set_shellevloop()" and "reset_shellevloop()". (childhandler, set_childhandler, unset_childhandler): added. (cmdexec): call "unset_childhandler()" and "set_childhandler()" before and after execute command. * src/gtk/x11menu.c (term_signal_handler): added. (childhandler): remove. (AppMainLoop): check type of "Hide_window". (application): use "set_signal()". (application): trap "SIGTERM" while GUI is active. * src/gtk/x11file.c (FitDialogClose): bug fix: delete unused fit objects not only in the case of "d->ret" is "IDOK" but "IDCANCEL" and "IDDELETE". (FileDialogFit): call "set_graph_modified()" if necessary. (FileDialogEdit, CmFileEdit, FileWinFileEdit): don't call "arrayadd()" for "ChildList". * src/shellux.c (cmsleep): use "set_signal()". 2009-05-26 Ito Hiroyuki * src/gtk/x11menu.c (create_graphmenu): use "GTK_STOCK_PAGE_SETUP" when the version of GTK++ is greater than 2.14. 2009-05-23 Ito Hiroyuki * src/gtk/x11lgnd.c (pos_edited): call "set_graph_modified()" after "exeobj()". 2009-05-19 Ito Hiroyuki * src/nconfig.c (getconfig): treat the line as comment when the first caractor of the line is "#" or ";". 2009-05-18 Ito Hiroyuki * src/gtk/ogra2cairo.c (gra2cairo): change permission of fields "init" and "done". * src/gtk/main.c (load_config): added. (load_config): bug fix: check return value of "getobject". * src/gtk/x11axis.c (file_button_show): added. (AxisDialogSetup): call "g_signal_connect()" for "show" signal of "File" button. * src/gtk/x11opt.c (set_font): added. (MiscDialogClose): use "set_font()". (MiscDialogSetupItem, MiscDialogSetup): initialize and setup "d->file_preview_font". * src/gtk/x11dialg.h (struct FileDialog): add member "comment_view". (struct MiscDialog): add member "file_preview_font". * src/gtk/x11file.c (FileDialogSetup): call "gtk_widget_modify_font" if "Menulocal.file_preview_font" is not NULL. * src/gtk/ox11menu.h (struct menulocal): add member "file_preview_font". * src/gtk/ox11menu.c (MenuConfigMisc): add config "file_preview_font". (menulocal_finalize): added. (menuinit, menudone): use "menulocal_finalize()". (menuinit): call "memset()" to initialize "Menulocal". * src/gtk/ogra2x11.c (gtkloadconfig): check string "use_external_viewer". 2009-05-17 Ito Hiroyuki * src/gtk/x11axis.c (AxisPosDialogSetup): use "create_direction_entry()" instead of "create_spin_entry_type()". * src/gtk/x11lgnd.c (legend_dialog_setup_sub): use "create_direction_entry()" instead of "create_spin_entry_type()". * src/gtk/gtk_widget.c (direction_icon_released) (create_direction_entry): added. 2009-05-15 Ito Hiroyuki * src/gtk/x11print.c (DriverDialogSelectCB): set value to "d->ext". (DriverDialogBrowseCB): set filter when "d->ext" is not NULL. (DriverDialogClose): use "d->widget" for first argument of "MessageBox()". (DriverDialog): initialize "data->ext". (CmPrintGRAFile, CmOutputImage, CmPrintDataFile): remove check of confirmation about overwriting an existing file. * src/gtk/x11opt.c (SetDriverDialogBrowse, SetDriverDialogClose) (PrefFontDialogAdd): use "d->widget" for first argument of "MessageBox()" and "nGetOpenFileName()". * src/gtk/x11merge.c (MergeDialogSetup): use "create_file_entry()" instead of "create_text_entry()". * src/gtk/x11gui.c (struct nGetOpenFileData): add member "overwrite". (FileSelectionDialog): check "parent". (FileSelectionDialog): call "gtk_file_chooser_set_do_overwrite_confirmation()" when "type" is "GTK_FILE_CHOOSER_ACTION_SAVE". (FileSelectionDialog): hide "data->chdir_cb" when "data->initdir" is NULL. (nGetSaveFileName): add argument "overwrite". * src/gtk/x11file.c (FitDialogLoadConfig, FitDialogLoad) (FitDialogSave): use "d->widget" for first argument of "DialogExecute". (FileDialogSetup): use "create_file_entry()" instead of "create_text_entry()". (FileWinFit): use "d->Win" for first argument of "DialogExecute". * src/gtk/x11dialg.h (struct DriverDialog): add member "ext". * src/gtk/x11commn.c (GraphSave): remove check of confirmation about overwriting an existing file. * src/gtk/x11axis.c (AxisDialogFile): use "d->widget" for first argument of "DialogExecute". * src/gtk/gtk_widget.c (get_parent_window) (entry_icon_file_select, create_file_entry): added. * src/gtk/gtk_subwin.c (file_select): added. (start_editing): call gtk_entry_set_icon_from_stock when "list->name" is "file". * src/gtk/gtk_common.h (USE_ENTRY_ICON): added. * src/omerge.c (merge): add field "ext". (mergeinit): initialize field "ext". 2009-05-14 Ito Hiroyuki * initfile/.Ngraph: change directory when "ngp" or "prm" file is specified. * src/gtk/x11graph.c (DirectoryDialogSetup): use "GtkFileChooserButton" instead of "GtkEntry". * src/shell.c (cmdtable): add commands "basename" and "dirname". * src/shellcm.c (cmdirname, cmbasename): added. 2009-05-13 Ito Hiroyuki * src/gtk/x11view.c (Trimming): use "axis_scale_push()" instead of "exeobj()". * src/gtk/x11axis.c (check_axis_history): added. (CmAxisWinScaleUndo): call "check_axis_history()" instead of "chkobjlastinst()". (axis_scale_push): added. (AxisDialogClose, axiswin_scale_clear, CmAxisClear) (axis_prm_edited_common): use "axis_scale_push()" instead of "exeobj()". (CmAxisWinScaleUndo): call "set_axis_undo_button_sensitivity()". * src/gtk/x11menu.c (hide_instance_menu_cb): added. (set_show_instance_menu_cb): add arguments "show_cb" and "hide_cb". (show_axis_menu_cb, hide_axis_menu_cb): added. (create_axismenu): add 5th and 6th arguments to call "set_show_instance_menu_cb()". (set_axis_undo_button_sensitivity): added. (setupwindow): call "set_axis_undo_button_sensitivity()". * src/gtk/x11file.c (CmFileWinMath): check number of instance. 2009-05-12 Ito Hiroyuki * src/gtk/x11axis.c (AxisDialogSetupItem): add item to combo boxes when the value is different from previous one. (axis_prm_edited_common, min_edited, max_edited, inc_edited): added. (CmAxisWindow): call "set_editable_cell_renderer_cb()" for "AXIS_WIN_COL_MIN", "AXIS_WIN_COL_MAX" and "AXIS_WIN_COL_INC". (AxisHistoryCB): added. (AxisWinExpose): use "AxisHistoryCB()". (CmAxisDel): check "DlgCopy.sel". * src/gtk/x11lgnd.c (LegendTextCB): return whole string. * src/gtk/x11dialg.c (SelectDialogSetup, CopyDialogSetup): "PangoEllipsizeMode" of "property" column is "PANGO_ELLIPSIZE_END". (SelectDialogSetup, CopyDialogSetup): append item only when return value of a function "d->cb()" is not NULL. (SelectDialogClose): save value of "id" column. (CopyDialogClose): set value of "id" column of the selected row to "d->sel". * src/oaxis.c (axisbbox2): check "inst". (get_axis_box): this function returns int. (get_axis_box): check return value of "axisbbox2()". (get_axis_group_box): this function returns int. (get_axis_group_box): check return value of "get_axis_box()". (axisbbox): check return value of "get_axis_group_box()". (axisrotate2, axisflip2): check "inst". (axisrotate, axisflip): check return value of "get_axis_group_box()". (AXIS_HISTORY_NUM): added. (axisscalepush): use "AXIS_HISTORY_NUM". 2009-05-11 Ito Hiroyuki * src/gtk/ox11menu.c (MenuConfigToggleView): add "{NULL}" at the end of the array. 2009-05-08 Ito Hiroyuki * src/ofile.c (USE_BUF_PTR, USE_RING_BUF, BUF_TYPE, USE_MEMMOVE) (RING_BUF_INC, ring_buf_index): added. (struct f2ddata): add new member "buf_ptr" or "ringbuf_top". (struct f2ddata): now "buf" is array. (opendata): initialize "buf_ptr" or "ringbuf_top". (getdata): use array of pointer or ring buffer. 2009-05-01 Ito Hiroyuki * src/gtk/x11view.h (enum FOCU_OBJ_TYPE): add "FOCUS_OBJ_TYPE_TEXT". * src/gtk/x11view.c (enum ViewerPopupIdn): add "VIEW_FLIP_HORIZONTAL" and "VIEW_FLIP_VERTICAL". (create_popup_menu): added. (create_popup_menu): add flip menu. (VIEWER_POPUP_ITEM_FLIP): added. (execute_selected_instances): added. (RotateFocusedObj): use "execute_selected_instances()". (FlipFocusedObj): added. (do_popup): set sensitivity of flip menu. (ViewerPopupMenu): add case for "VIEW_FLIP_HORIZONTAL" and "VIEW_FLIP_VERTICAL". (CmEditMenuCB): add case for "MenuIdEditFlipHorizontally" and "MenuIdEditFlipVertically". * src/gtk/x11menu.h (enum MenuID): add "MenuIdEditFlipHorizontally" and "MenuIdEditFlipVertically". * src/gtk/x11menu.c (show_edit_menu_cb): set sensitivity of "FlipH" and "FlipV". (create_editmenu): add flip menu. * src/orect.c (rectflip): added. (rect): add new field "flip". * src/opolygon.c (opoly): add new field "flip". * src/omark.c (markflip): added. (mark): add new field "flip". * src/oline.c (arrow): add new field "flip". * src/olegend.h (enum FLIP_DIRECTION): added. * src/olegend.c (flip, legendflip): added. * src/ocurve.c (curve): add new field "flip". * src/oaxis.c (axisbbox2, get_axis_box): remove unused arguments "argc" and "argv". (get_axis_group_box): added. (axisbbox, axisrotate): use "get_axis_group_box()". (axisflip2, axisflip): added. (axis): add new field "flip". * src/oarc.c (arcflip): added. (arc): add new field "flip". * addin/append.nsc: hide and recover axisgrid. 2009-04-30 Ito Hiroyuki * src/gtk/x11menu.h (SUBWIN_PROTOTYPE): added. (struct SubWin, struct LegendWin, struct InfoWin): use "SUBWIN_PROTOTYPE". (struct CoordWin): remove. * src/gtk/x11dialg.h (DIALOG_PROTOTYPE): added. use "DIALOG_PROTOTYPE" for all struct which inherit "DialogType" struct. * src/gtk/x11cood.c (CoordWinSetCoord, CoordWinUpdate): use "struct InfoWin" instead of "struct CoordWin". 2009-04-28 Ito Hiroyuki * src/gtk/gtk_subwin.c (ev_button_down_tree): remove. (ev_button_down): don't respond to right button click. (ev_button_down): call "tree_update()" when "d->type" is "TypeLegendWin". (ev_button_up): added. (list_sub_window_create, tree_sub_window_create): call back function for "button-release-event" is "ev_button_up()". * src/gtk/x11view.h (struct FocusObj): change name of the struct from "focuslist". (struct Point): moved from x11view.c and change name of the struct from "pointslist". * src/gtk/x11menu.c (SetPoint): show width and height when "d->Capture" is TRUE. 2009-04-27 Ito Hiroyuki * src/gtk/x11menu.c (create_windowmenu): change accel path of "View" menu. (create_legendmenu): do not gettextize menu title. (create_legendsubmenu): gettextize "label". (create_legendsubmenu): remove under score from "label" for accel path string. * src/gtk/gtk_subwin.c (numeric_cb, string_cb): do nothing when "d->type" is "TypeLegendWin". * src/gtk/x11lgnd.c (LEGEND_WIN_COL_HIDDEN, LEGEND_WIN_COL_PROP) (LEGEND_WIN_COL_X, LEGEND_WIN_COL_Y): added. (legend_list_set_val): use "case" instead of "strcmp()". (enum CHANGE_DIR, pos_edited, pos_x_edited, pos_y_edited): added. (CmLegendWindow): call "set_editable_cell_renderer_cb()" for "LEGEND_WIN_COL_X" and "LEGEND_WIN_COL_Y". (Llist): colum "x" and "y" is editable. * src/gtk/x11file.c (FILE_WIN_COL_HIDDEN, FILE_WIN_COL_FILE) (FILE_WIN_COL_X, FILE_WIN_COL_Y): added. (file_list_set_val): use "case" instead of "strcmp()". * src/gtk/x11axis.c (AXIS_WIN_COL_HIDDEN, AXIS_WIN_COL_NAME) (AXIS_WIN_COL_MIN, AXIS_WIN_COL_MAX, AXIS_WIN_COL_INC): added. (axis_list_set_val): use "case" instead of "strcmp()". * src/gtk/x11merge.c (MERG_WIN_COL_HIDDEN, MERG_WIN_COL_FILE): added. (merge_list_set_val): use "case" instead of "strcmp()". * src/gtk/gtk_liststore.h (tree_store_path_get_string): added. 2009-04-26 Ito Hiroyuki * src/gtk/ox11menu.c (menuinit): free "sdel->description" when error is occurred. * src/oaxis.c (check_group): added. (axisuniqgroup): use "check_group()". 2009-04-25 Ito Hiroyuki * src/gtk/x11view.c (Focus): check if "man" is valid id. * src/gtk/x11commn.c (AxisDel): call "delobj()" after check all instances. * src/odraw.c (clear_bbox): check if "inst" is NULL. * src/oaxis.c (INST_ARRAY_NUM): added. (axisdone): change "group" field of other instances belong to the same group. (get_axis_group_type): initialize "inst_array". 2009-04-24 Ito Hiroyuki * src/gtk/x11axis.c (enum CHANGE_DIR, pos_edited_common) (pos_x_edited, pos_y_edited): added. (CmAxisWindow): call "set_editable_cell_renderer_cb()" for "AXIS_WIN_COL_X" and "AXIS_WIN_COL_Y". * src/gtk/gtk_subwin.c (start_editing): call "UnFocus()". (set_cell_renderer_cb): set "list[i].edited_id" when "g_signal_connect()" is called for "edited" signal. (set_editable_cell_renderer_cb): added. (update): call "UnFocus()". * src/gtk/gtk_liststore.h: add member "edited_id". * src/gtk/gtk_liststore.c (create_tree_view): initialize "list[i].edited_id". * src/oaxis.c (axisgeometry): clear all bbox of instances belong to the group. (get_axis_group_type): add argument "check_all". * src/gtk/x11menu.c (struct command_data): add member "button", (createcommand1, createcommand2): set pointer of the GtkToolItem to "cdata->button" when "cdata->button" is not NULL. * src/gtk/x11file.c (set_btn_sensitivity_delete_cb) (set_btn_sensitivity_insert_cb, set_sensitivity_by_row_num): added. (MathDialogSetup, FileMoveDialogSetup, FileMaskDialogSetup): call "set_sensitivity_by_row_num()". 2009-04-23 Ito Hiroyuki * src/gtk/x11file.c (set_btn_sensitivity_cb) (set_sensitivity_by_selection): added. (MathDialogSetup, FileMoveDialogSetup, FileMaskDialogSetup): call "set_sensitivity_by_selection()" * src/oshell.c (cmdsecurity): use "set_security()". * src/shell.c (set_security, set_environ): added. * src/gtk/x11commn.c (LoadNgpFile): check execution of "shell::shell" for loding graph is success or not. * src/gtk/x11view.c (create_popup_menu): change title of a menuitem from "Show cross" to "cross Gauge". (ViewerEvKeyDown): change case from " GDK_KP_Space" to " GDK_space". remove case for "GDK_BackSpace". * src/gtk/x11opt.c (MiscDialogSetupItem): remove codes related to widgets visibility. (MiscDialogSetup): remove codes related to widgets visibility and change order of widgets. (MiscDialogClose): remove codes related to widgets visibility. * src/gtk/x11menu.h (enum MenuID): add "MenuIdToggleStatusBar", "MenuIdToggleRuler", "MenuIdToggleScrollbar", "MenuIdToggleCToolbar", "MenuIdTogglePToolbar", MenuIdToggleCrossGauge", "MenuIdAxisUndo" and "MenuIdFileMath". (struct Viewer): add "PToolbar" and "CToolbar", remove "ShowCross". * src/gtk/x11menu.c (create_filemenu): add menu item for "Math Transformation". (create_axismenu): add menu item for "Scale Undo". (show_win_menu_cb): set active state for "ToggleStatusBar", "ToggleRuler", "ToggleScrollbar", "ToggleCToobar", "TogglePToobar" and "ToggleCrossGauge". (toggle_view_cb): added. (create_windowmenu): create some menu items to show and hide widgets. (create_windowmenu): now the title of this menu is "View". (createmenu): reorder menus. (create_toolbar): add argument "hbox" and set GtkHandleBox to the variable. (set_widget_visibility): add argument "cross" and set visibility of some other widgets and cross gauge. (setupwindow): add argment to call "create_toolbar()".x (application): save settings for widgets visibility. * src/gtk/x11file.c (CmFileMenu): add case for "MenuIdFileMath". * src/gtk/x11dialg.h (struct MiscDialog): remove member "ruler" and "statusbar". * src/gtk/x11axis.c (CmAxisMenu): add case for "MenuIdAxisUndo". * src/gtk/ox11menu.h (struct menulocal): add member "scrollbar", "ctoolbar", "show_cross" and "ptoolbar". (enum SAVE_CONFIG_TYPE): add "SAVE_CONFIG_TYPE_TOGGLE_VIEW". * src/gtk/ox11menu.c (MenuConfigToggleView): added. (MenuConfigArrray): add "MenuConfigToggleView". (menu_save_config): add codes for "SAVE_CONFIG_TYPE_TOGGLE_VIEW". * src/nconfig.c (replaceconfig_match): return "buf" when next section was found. (replaceconfig): print "buf" after print configurations if "buf" is not NULL. 2009-04-22 Ito Hiroyuki * src/gtk/x11view.c (CmEditMenuCB): add case for "MenuIdAlignLeft", "MenuIdAlignVCenter", "MenuIdAlignRight", "MenuIdAlignTop", "MenuIdAlignHCenter" and "MenuIdAlignHBottom". * src/gtk/x11menu.h (enum MenuID): add "MenuIdAlignLeft", "MenuIdAlignVCenter", "MenuIdAlignRight", "MenuIdAlignTop", "MenuIdAlignHCenter" and "MenuIdAlignHBottom". * src/gtk/x11menu.c (hide_edit_menu_cb, create_alignmenu): added. (create_editmenu): call "create_alignmenu()". * src/object.h (struct objlist): add member "child". * src/object.c (addobject): set "parent->child" if "parent" in not NULL. (addobject): initialize "objnew->child" as NULL. (addobject): change the order of object list. 2009-04-21 Ito Hiroyuki * src/gtk/x11view.h (ROTATE_CLOCKWISE, ROTATE_COUNTERCLOCKWISE) (enum FOCU_OBJ_TYPE): added. * src/gtk/x11view.c (enum ViewerPopupIdn): add "VIEW_CUT", "VIEW_PASTE" add "VIEW_DUP". (CopyFocusedObjects, CutFocusedObjects, check_last_insts) (focus_new_insts, paste_cb, PasteObjectsFromClipboard): added. (create_popup_menu): add cut, copy and paste menu item. (check_focused_obj_type): added. (do_popup): use "check_focused_obj_type()". (ViewerPopupMenu): add case for "VIEW_CUT", "VIEW_PASTE" add "VIEW_DUP". (CmEditMenuCB): added. * src/gtk/x11menu.h (enum MenuID): add "MenuIdEditCut", "MenuIdEditCopy", "MenuIdEditPaste", "MenuIdEditDelete", "MenuIdEditRotateCW" and "MenuIdEditRotateCCW". * src/gtk/x11menu.c (show_edit_menu_cb, hide_edit_menu_cb) (create_editmenu): added. (createmenu): call "create_editmenu()". 2009-04-19 Ito Hiroyuki * src/orect.c (rectrotate, rectmove, rectchange, rectzoom) (rectgeometry): use "clear_bbox()". (set_position, get_position): added. (rectdraw): use "get_position()". (rectrotate, rectmove, rectchange, rectzoom): use "set_position()". * src/otext.c (textgeometry, textmove, textrotate, textzoom): use "clear_bbox()". * src/opolygon.c (polygeometry): use "clear_bbox()". * src/omerge.c (mergefile, mergemove, mergezoom, mergegeometry): use "clear_bbox()". * src/omark.c (markmove, markrotate, markzoom, markgeometry): use "clear_bbox()". * src/oline.c (arrowput): use "clear_bbox()". * src/olegend.c (legendgeometry, legendmove, legendrotate) (legendchange, legendzoom): use "clear_bbox()". * src/ocurve.c (curvegeometry): use "clear_bbox()". * src/oaxis.c (axisgeometry, axismove2, axisrotate2) (axischange2, axischange, axiszoom2, axisadjust, set_group_pos): use "clear_bbox()". * src/oarc.c (arcgeometry, arcmove, arcchange, arcrotate) (arczoom): use "clear_bbox()". * src/odraw.c (clear_bbox): added. 2009-04-17 Ito Hiroyuki * src/oagrid.c (struct axis_prm, struct axis_pos) (struct grid_prm, get_grid_prm, draw_grid_line, draw_background) (calc_intersection): added. (agriddraw): use "get_grid_prm()", "draw_grid_line()" and "draw_background()". 2009-04-16 Ito Hiroyuki * src/gtk/x11view.c (do_popup): popup item related to change order of instances is also sesensitive when the focused instances is "merge" object. (reorder_object): reorder instances when the focused instance is "merge" object. * src/oaxis.c (axis_get_box): added. (axisbbox2): use "axis_get_box()". (axisrotate2, axisrotate): added. (axis): add field "rotate". 2009-04-15 Ito Hiroyuki * src/gtk/x11menu.c (SetPoint): show the value of "s->Angle" when "d->Angle" is greater or equal to 0. * src/gtk/x11menu.h (struct Viewer): add member "Angle". * src/gtk/x11view.c (show_focus_line_arc): add argument "clear" and save previous state when "clear" is TRUE. (ShowFocusLine): add argument "clear". (mouse_move_change): second argument of "ShowFocusLine()" is TRUE at the first time to call "ShowFocusLine()". (enum ViewerPopupIdn): add "VIEW_ROTATE_CLOCKWISE" and "VIEW_ROTATE_COUNTER_CLOCKWISE". (create_popup_menu): added. (create_popup_menu): add item "_Rotate". (VIEWER_POPUP_ITEM_ROTATE): added. (RotateFocusedObj): added. (do_popup): set sensitivity of "d->popup_item[VIEWER_POPUP_ITEM_ROTATE]". (ViewerPopupMenu): add case for "VIEW_ROTATE_CLOCKWISE" and "VIEW_ROTATE_CONTER_CLOCKWISE" * src/orect.c (rectrotate): added. * src/otext.c (textrotate): added. (text): add field "rotate". * src/orect.c (rectrotate): added. (rect): add field "rotate". * src/opolygon.c (opoly): add field "rotate". * src/omark.c (markrotate): added. (mark): add field "rotate". * src/oline.c (arrow): add field "rotate". * src/olegend.c (rotate, legendrotate): added. * src/ocurve.c (curve): add field "rotate". * src/oarc.c (arcrotate): added. (arc): add field "rotate". 2009-04-14 Ito Hiroyuki * src/gtk/ox11menu.c (mxd2p, mxd2px, mxd2py, mxp2d): remove. * src/gtk/x11view.c (mxd2p, mxp2d coord_conv_x, coord_conv_y) (draw_frame_rect, draw_focus_line): added. (GetFocusFrame, ShowFocusFrame, show_focus_line_arc) (draw_frame_rect, ShowFocusLine, ShowPoints, ShowFrameRect) (ShowCrossGauge, get_mouse_cursor_type): use "coord_conv_x()" and "coord_conv_y()". (ShowFocusLine): use "draw_frame_rect()" and "draw_focus_line()". 2009-04-13 Ito Hiroyuki * src/gtk/x11view.c (arc_get_angle, show_focus_line_arc): added. (ShowFocusLine): call "show_focus_line_arc()" when focused object is "arc". (ShowFocusLine): add argument "state". (mouse_up_change): check if the focused object is "arc". * src/oarc.h: added. * src/oarc.c (arcbbox): add points to modify angle. (arcchange): added. (arc): add "change" field. * src/gtk/ogra2cairo.c (gra2cairo_output): do nothing when "a1 == a2" in the case of "code" ic "C". * src/gtk/x11commn.c (ToFullPath): use loop to modify "file" field of "file" and "merge" object. 2009-04-11 Ito Hiroyuki * src/gtk/x11view.c (do_popup): check if the focused object is child of the "legend" object when "num == 1" . 2009-04-10 Ito Hiroyuki * src/gtk/x11view.c (ShowPoints): draw arc and rectangle when "num" is greater or equal to 2. (mouse_move_drag, mouse_move_zoom, mouse_move_change) (mouse_move_scroll, mouse_move_draw): added. (ViewerEvMouseMove): use "mouse_move_drag()", "mouse_move_zoom()", "mouse_move_change()", "mouse_move_scroll()" and "mouse_move_draw()". (get_mouse_cursor_type): return "GDK_TCROSS" when "d->MoveData" is TRUE. 2009-04-09 Ito Hiroyuki * src/gtk/x11view.c (ShowCrossGauge): don't call "gdk_window_get_position()". (ViewerEvMouseMotion): call "gdk_event_request_motions()". (ViewerWinSetup): set GDK_POINTER_MOTION_HINT_MASK to "d->Win". 2009-04-07 Ito Hiroyuki * src/gtk/x11scrip.h: remove. * src/gtk/x11scrip.c: remove. * src/gtk/x11menu.c (script_exec): added. (create_addin_menu): use "script_exec()" as callback. 2009-04-06 Ito Hiroyuki * src/gtk/x11lgnd.c (LegendWinLegendUpdate): remove argument of function "UnFocus()". * src/gtk/x11view.c (clear_focus_obj): remove unused arguments. (UnFocus): remove unused argument "init_cursor". (CloseGC, Clear, CmViewerButtonArm, Focus): remove argument of function "UnFocus()". * src/gtk/x11commn.c (axis_move_each_obj): added. (AxisMove): use "axis_move_each_obj()". * src/gtk/x11axis.c (AxisWinAxisTop, AxisWinAxisLast) (AxisWinAxisUp, AxisWinAxisDown): added. (axiswin_ev_key_down): call "AxisWinAxisTop()", "AxisWinAxisLast()", "AxisWinAxisUp()" and "AxisWinAxisDown()". (Popup_list): set "AxisWinAxisTop()", "AxisWinAxisLast()", "AxisWinAxisUp()" and "AxisWinAxisDown()" to related member. * src/ofit.c (enum FitError, display_equation): added. (fitpoly, fituser, fitfit): use "FitError". (fitpoly, fituser): use "snprintf()" instead of "sprintf()". (fitpoly, fituser): call "display_equation()". (fitpoly, fituser): return "enum FitError". (fitfit): change type of "type" from "int" to "enum FIT_OBJ_TYPE". * demo/demo2.ngp.in: use "fit::calc" for legend text. * src/gtk/x11graph.c (CmGraphHistory, DirectoryDialogClose): remove argument of "ErrorMessage()". * src/gtk/x11file.c (FitDialogSave): check return value of "nopen()". (FitDialogSave): call "ErrorMessage()" instead of "MessageBox()". * src/gtk/x11commn.c (SaveDrawrable): check return value of "nopen()". (SaveDrawrable): call "ErrorMessage()" instead of "MessageBox()". (SaveDrawrable): return "error" instead of "! error". (GraphSave): call "reset_graph_modified()", "changefilename()", "AddNgpFileList()" and "SetFileName()" only when success "SaveDrawrable()". (ErrorMessage): argument of function is now "void". 2009-04-04 Ito Hiroyuki * src/mathcode.c (mathexpand, calculate): new upstream release (6.3.48). * driver/gra2ps.c: new upstream release (6.3.48). * driver/Ngraph.ps: new upstream release (6.3.48). 2009-04-03 Ito Hiroyuki * src/ofit.c (fitfit): use loop to initialize values related to parameters "%0?" and "parameter0?". (fitcalc): added. (fit): add member "calc". * src/omath.c (mparam): bug fix: fix calculation of "m". (struct mlocal): now member "idpm" is array. (msettbl): use loop to set value related to "mlocal->idpm[]". (minit): use loop to set value to "mlocal->idpm[]". 2009-04-02 Ito Hiroyuki * src/gtk/x11graph.c (DirectoryDialogSetup): change width of "d->dir". * src/gtk/ogra2cairo.c (relative_move): added. (draw_str, gra2cairo_output): use "relative_move()" instead of "cairo_rel_move_to()". 2009-04-01 Ito Hiroyuki * src/gtk/x11merge.c (Mlist): gettextize. * src/gtk/x11file.c (Flist): gettextize. * src/gtk/x11axis.c (Alist): gettextize. * src/gtk/x11lgnd.c (legend_list_set_val): just set converted text to tree view when "type" is "LegendTypeText". (Llist): gettextize. (Llist): ellipsize mode of "property" column is "PANGO_ELLIPSIZE_END". * src/gtk/gtk_liststore.c (create_column): add attribute "ellipsize" to "renderer". * src/gtk/gtk_liststore.h (_list_store): add member "ellipsize". * src/ofile.c (search_mask): check if the index "i" of array "mask" is lesser than "n". * src/gtk/x11graph.c (CmHelpHelp, about_link_activated_cb): use "execlp()" instead of "system()". 2009-03-31 Ito Hiroyuki * src/gtk/x11file.c (FileMoveDialogClose): free "ptr". (FileMoveDialogClose): call "set_graph_modified()". * src/gtk/x11opt.c (PrefFontDialogUpdate): free "fontalias". * src/shell.c (shputstdout, shprintfstdout): check return value of "write()". (expand, checkcmd, cmdexec): use "n_mkstemp()" instead of "tempnam()". * src/ioutil.c (n_mkstemp): added. * src/ogra2prn.c (mytempfile): added. (gra2p_output): use "mytempfile()". * src/nconfig.c (replaceconfig_match, removeconfig_match, make_backup): added. (replaceconfig): use "replaceconfig_match()" and "make_backup()". (removeconfig): use "removeconfig_match()" and "make_backup()". (replaceconfig, removeconfig): use "tmpfile()" instead of "tempnam()". (lockconfig): call "msleep()" while checking "configlocked()". 2009-03-29 Ito Hiroyuki * driver/gra2wmf.c (getboundingbox): remove unused variable "exchange". (draw): remove unused variables "lBrush" and "rect". 2009-03-26 Ito Hiroyuki * src/gtk/x11axis.c (NumDialogSetup): arrange widgets. * src/oprm.c (prmload): use "R_OK", "W_OK", "X_OK" for "access()". * src/omerge.c (mergeload): use "R_OK", "W_OK", "X_OK" for "access()". * src/ofile.c (f2dload): use "R_OK", "W_OK", "X_OK" for "access()". * src/nconfig.c (writecheckconfig): use "R_OK", "W_OK", "X_OK" for "access()". * src/ioutil.c (findfilename, nsearchpath, nglob2): use "R_OK", "W_OK", "X_OK" for "access()". * src/ofile.c (f2dload): use "R_OK", "W_OK", "X_OK" for "access()". * src/gra.c (GRAC_INIT_VAL): added. (GRAClist): use "GRAC_INIT_VAL". (get_gra_font): added. (GRAinputold): use "get_gra_font()". * src/shell.c (shputstderr, shprintfstderr): comment out. * src/ogra2.c (gra2disconnect): comment out. * src/object.c (vdisplaywindow, unregisterallevloop) (chkobjectlocal, chkobjproc, getobjproc, getuniqname): comment out. * src/nstring.c (getitok3, getitok4): comment out. * src/ioutil.c (nselectdir, nselectfile): comment out. * src/gra.c (GRAdirect, GRAremark): comment out. * src/gtk/ox11dlg.c (dialogclose): remove. * src/gtk/ogra2cairo.c (FONT_FACE_NUM): added. (check_type): use "FONT_FACE_NUM". * src/gtk/ogra2x11.c (gtkevsize): remove. 2009-03-24 Ito Hiroyuki * src/oprm.c (remarkconv): use "greektable_num()". * src/gra.c (greektable_num): added. (FONTTBL_NUM): added. (GREEK_TBL_NUM): added. (GRAinputold): check index of "fonttbl[]". 2009-03-23 Ito Hiroyuki * src/gtk/ox11menu.c (SetCaption, graph_modified_sub): added. (set_graph_modified, reset_graph_modified): use "graph_modified_sub()". (gtkmenu): field "modified" use function "mxmodified". (mxmodified): added. * src/gtk/x11menu.c (SetCaption): remove. * src/ofile.c (f2dload_sub): added. (f2dload, f2dloaddum): use "f2dload_sub()". * src/gtk/x11file.c (FileDialogSetupItemCommon,start_editing): use "CHK_STR()". * src/gtk/x11axis.c (AxisDialogSetup, AxisCB) (AxisDialogSetupItem, AxisPosDialogSetupItem): use "CHK_STR()". * src/gtk/x11print.c (DriverDialogSelectCB): use "CHK_STR()". * src/gtk/ox11dlg.c (dlgconfirm): use "CHK_STR()". * src/oaxis.c (axisautoscale): return 0 even if the return value of axisautoscalefile() is not 0. 2009-03-20 Ito Hiroyuki * src/gtk/x11print.c (OutputImageDialogSetupItem): sensitivity of dpi settings is FALSE for ps and pdf output. 2009-03-18 Ito Hiroyuki * src/gtk/x11view.c (ViewerWinFileUpdate): use "update_file_obj_multi()". * src/gtk/x11file.c (update_file_obj_multi): added. (CmFileUpdate, CmFileOpen): use "update_file_obj_multi()". 2009-03-17 Ito Hiroyuki * src/gtk/ox11dlg.c (get_sarray_argument): accept multi "sarray"s. 2009-03-12 Ito Hiroyuki * src/gtk/x11menu.h (struct NgraphApp): remove member "Message3". * src/gtk/x11view.c (init_zoom, mouse_up_zoom) (ViewerEvMouseMove): remove "SetZoom()" or "ResetZoom()". (mouse_up_zoom): set coordinate of a mouse to "d->MouseX2" and "d->MouseY2". (ViewerEvLButtonUp): call "SetPoint()" after call "SetCursor()". * src/gtk/x11print.c (CmOutputDriver): call "ResetStatusBar()". * src/gtk/x11menu.c (SetZoom, ResetZoom): remove. 2009-03-11 Ito Hiroyuki * src/gtk/x11menu.c (tool_button_enter_leave_cb): use "SetStatusBarSub()" instead of "SetStatusBarXm()". (SetStatusBarXm): remove. (ResetZoom, SetZoom, ResetStatusBar): use "SetStatusBarSub()" or "ResetStatusBarSub()". (SetStatusBarSub, ResetStatusBarSub): added. * src/gtk/ox11menu.c (mgtkdisplaystatus): use "DisplayDialog()" instead of "DisplayStatus()". * src/gtk/x11graph.c (CmGraphNewFrame, CmGraphNewSection) (CmGraphNewCross, CmGraphAllClear): remove. (CmGraphNewMenu): clear graph and set NULL to "NgraphApp.FileName". call "reset_graph_modified()". * src/gtk/x11view.c (ViewerWinSetup): use "value-changed" signal instead of "change-value" signal for "d->HScroll" and "d->VScroll". (ViewerEvVScroll, ViewerEvHScroll): change return value and argument. don't call "gdk_window_get_position()", "gdk_draw_drawable()", "gdk_drawable_get_size()", "gdk_gc_new()" and "g_object_unre()". (scrollbar_scroll_cb, ViewerEvMouseMove, ViewerEvScroll) (ViewerEvKeyDown): don't call "ViewerEvVScroll()" or "ViewerEvHScroll()" after call "range_increment()". (SetHRuler, SetVRuler): change argument. get size of drawable widget inside the function. 2009-03-10 Ito Hiroyuki * src/gtk/gtk_liststore.c (create_column): set user data with "g_object_set_data()" instead of "g_object_set()". * src/gtk/x11file.c (start_editing_type, start_editing): remove unused variable "list". * src/gtk/x11axis.c (start_editing): remove unused variable "list". * src/gtk/gtk_widget.c (spin_entry_set_range) (spin_entry_set_inc, spin_entry_set_val, spin_entry_get_val) (_create_spin_entry): use "g_object_[gs]et_data()" instead of "gtk_object_[gs]et_user_data()". * src/gtk/gtk_subwin.c (numeric_cb, string_cb, start_editing): use "g_object_[gs]et_data()" instead of "gtk_object_[gs]et_user_data()". * src/gtk/x11lgndx.c (LegendGaussDialogSetup): use "gtk_widget_set_size_request()" instead of "gtk_drawing_area_size()". * src/gtk/x11opt.c (add_str_to_array): remove. * src/gtk/x11lgnd.c (CmOptionTextDef): save and restore modified state. * src/gtk/x11file.c (CmOptionFileDef): save and restore modified state. * src/ofile.c (f2dstore): use "nstrdup()" instead of "memalloc()" to create string "[EOF]\n". (f2dstat, f2dstat2): use "nstrdup()" instead of "memalloc()". * src/osystem.c (sysinit): use "nstrdup()" instead of "memalloc()" to create string "./". * src/ofit.c (fitfit): use "nstrdup()" instead of "memalloc()" to create string "equation". * src/ntime.c (ndate, ntime): use "nstrdup()" instead of "memalloc()". * src/nconfig.c (removeconfig): free "buf" when "change" is FALSE. * src/ioutil.c (fgetline): set NULL to "*buf" when EOF or error. 2009-03-09 Ito Hiroyuki * src/gtk/ox11menu.c (enum menu_config_type): add "MENU_CONFIG_TYPE_CHILD_WINDOW", "MENU_CONFIG_TYPE_HISTORY", "MENU_CONFIG_TYPE_COLOR", "MENU_CONFIG_TYPE_SCRIPT" and "MENU_CONFIG_TYPE_DRIVER". (struct child_win_stat, MenuConfigDriver, MenuConfigScript) (MenuConfigMisc, MenuConfigViewer, MenuConfigGeometry) (MenuConfigChildGeometry, MenuConfigArrray, BUF_SIZE) (add_str_with_int_to_array, add_child_geometry_to_array) (add_geometry_to_array, add_color_to_array) (add_prm_str_to_array, save_ext_driver_config) (save_script_config, add_str_to_array, menu_save_config_sub) (menu_save_config): added. (menu_config_set_child_window_geometry): use "struct child_win_stat *" (addmenu): initialize "MenuConfigHash" with "MenuConfigArrray". * src/gtk/ox11menu.h (enum SAVE_CONFIG_TYPE) (SAVE_CONFIG_TYPE_X11MENU): added. * src/gtk/x11opt.c (CHK_STR, save_font_config, save_misc_config) (save_script_config, save_ext_driver_config, save_viewer_config) (save_child_geometory_config, add_geometry_to_array) (save_geometory_config, add_prm_str_to_array) (SAVE_CONFIG_TYPE_X11MENU, SAVE_CONFIG_TYPE): remove. (save_config): use "menu_save_config()" and "gra2cairo_save_config()". * src/nstring.h (CHK_STR): add * src/gtk/ogra2cairo.c (gra2cairo_save_config): added. * src/oaxis.c (enum axis_config_type): remove. (axisloadconfig): use "obj_load_config()". * src/otext.c (TextConfig): added. (textloadconfig): use "obj_load_config()". (textsaveconfig): use "obj_save_config()". (addtext): initialize "TextConfigHash". * src/ofile.c (f2dinit): use "nstrdup()" instead of "memalloc()". (f2dinit): free "s3" and "s4" when error is occurred. (f2dsaveconfig): use "obj_save_config()". (f2dloadconfig): use "obj_load_config()". (enum file_config_type, struct file_config): remove. * src/oaxis.c (axisinit): use "nstrdup()" instead of "memalloc()". 2009-03-06 Ito Hiroyuki * src/gtk/x11commn.c (LoadPrmFile, LoadNgpFile): call "reset_graph_modified()". * src/gtk/x11view.c (graph_dropped): don't call "reset_graph_modified()". * src/gtk/x11graph.c (CmGraphLoad): don't call "reset_graph_modified()". * src/omerge.c (mergestore): bug fix: buffer over run. use "nstrdup()" instead of "memalloc()". * src/gtk/gtk_liststore.c (create_tree_view): header of the tree view is visible when "n" greater than 1. (list_store_set_sort_all, list_store_set_sort_column): header of the tree view is always visible. * src/gtk/x11view.c (struct viewer_popup): add member "type". (create_menu): create GtkCheckMenuItem when "popup[i].type" is "POP_UP_MENU_ITEM_TYPE_CHECK". (do_popup): set active state of the menu item when i is "POPUP_ITEM_HIDE". (ViewCross): add argument "dtate". * src/gtk/x11merge.c (Popup_list): add initial data for member "type". (POPUP_ITEM_HIDE): add (MergeWinExpose): set active state of the menu item when i is "POPUP_ITEM_HIDE". * src/gtk/x11menu.h (enum pop_up_menu_item_type): added. * src/gtk/x11lgnd.c (Popup_list): add initial data for member "type". (POPUP_ITEM_HIDE): add (LegendWinExpose): set active state of the menu item when i is "POPUP_ITEM_HIDE". * src/gtk/x11file.c (Popup_list): add initial data for member "type". (POPUP_ITEM_HIDE): add (popup_show_cb): set active state of the menu item when i is "POPUP_ITEM_HIDE". * src/gtk/x11axis.c (Popup_list): add initial data for member "type". (POPUP_ITEM_HIDE): added. (popup_show_cb): set active state of the menu item when i is "POPUP_ITEM_HIDE". * src/gtk/gtk_subwin.h (struct subwin_popup_list): add member "type". * src/gtk/gtk_subwin.c (tree_set_hidden_state, set_hidden_state): added. (list_sub_window_hide): use "set_hidden_state()". (tree_sub_window_hide): use "tree_set_hidden_state()" (sub_win_create_popup_menu): create GtkCheckMenuItem when "list[i].type" is "POP_UP_MENU_ITEM_TYPE_CHECK". * src/gtk/ox11menu.c (reset_graph_modified, set_graph_modified): call "SetCaption()". * src/gtk/x11menu.c (SetCaption): no argument. use "ngp" field of "menu" object for file name of the window title. * src/gtk/x11commn.c (LoadPrmFile, LoadNgpFile, GraphSave): don't call "SetCaption()". 2009-03-05 Ito Hiroyuki * src/gtk/x11menu.c (SetPoint): add argument "struct Viewer *d". (SetPoint): show parameter when change, zoom or drag object. (change_window_state_cb): remove. 2009-03-04 Ito Hiroyuki * src/gtk/ogra2x11.c (gtkloadconfig): print warning when unused parameter is appeared. * src/otext.c (textloadconfig): print warning when unused parameter is appeared. * src/gtk/ogra2cairo.c (loadconfig): print warning when unused parameter is appeared. * src/ofile.c (f2dloadconfig): print warning when unused parameter is appeared. * src/gtk/ox11menu.c (mgtkloadconfig): print warning when unused parameter is appeared. * src/oaxis.c (axisloadconfig): print warning when unused parameter is appeared. * src/gtk/x11dialg.h (struct ViewerDialog): remove unused member "redraw". * src/gtk/ox11menu.h (struct menulocal): remove unused member "autoredraw". * src/gtk/x11opt.c (ViewerDialogSetupItem, ViewerDialogClose) (ViewerDialogSetup, save_viewer_config): remove codes related to "Menulocal.autoredraw". * src/gtk/ox11menu.c (mxautoredraw): remove. (MenuConfig, menuinit, gtkmenu): remove codes related to "Menulocal.autoredraw". * src/gtk/x11opt.c (enum SAVE_CONFIG_TYPE) (SAVE_CONFIG_TYPE_X11MENU, save_config): added. (DefaultDialogClose): use "save_config()" to save configuration. (PrefScriptDialogSetup, PrefDriverDialogSetup) (PrefFontDialogSetup, MiscDialogSetup, ExViewerDialogSetup) (ViewerDialogSetup): add a save button. (PrefScriptDialogClose, PrefDriverDialogClose) (PrefFontDialogClose, MiscDialogClose, ExViewerDialogClose) (ViewerDialogClose): save configuration if the save button is clicked. 2009-03-03 Ito Hiroyuki * src/gtk/x11opt.c (save_viewer_config, save_misc_config) (MiscDialogSetupItem, MiscDialogSetup, MiscDialogClose) (ViewerDialogSetupItem, ViewerDialogSetup, ViewerDialogClose): settings for status-bar and ruler are moved from viewer dialog to misc dialog, and setting for line attribute of focus frame is moved from misc dialog to viewer dialog 2009-02-28 Ito Hiroyuki * src/object.c (_newobj, _delobj): static. 2009-02-26 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvMouseMove): don't call "CoordWinSetCoord()". * src/gtk/x11menu.c (SetPoint): call "CoordWinSetCoord()". * src/gtk/ox11menu.c (set_menu_config_mxlocal): remove. (gtkmenu): remove field "_gtklocal". (mx_clear): call "draw_paper_frame()" after call "gdk_draw_rectangle()". (menuinit): unref "Menulocal.pix" if "Menulocal.pix" is not NULL. (menu_config_set_prn_driver): remove. * src/gtk/ox11menu.h (struct menulocal): remove unused member "output", "outputobh", "prnprinterroot". (struct mxlocal): remove mxlocal and use menulocal. (struct prnprinter): remove. * src/gtk/x11opt.c (save_viewer_config, ViewerDialogSetupItem) (ViewerDialogSetup, ViewerDialogClose): add codes related to status bar. * src/gtk/x11menu.c (toggle_status_bar): remove. (show_outputmenu_cb): added. (create_outputmenu): call "g_signal_connect()" for "Output" menu. (show_winmwnu_cb, create_windowmenu): remove codes related to status bar. (SetPoint): add offset to coordinate. * src/gtk/x11opt_proto.h (Pref*DialogMoveSub): added. (Pref*DialogUp, Pref*DialogUp): use Pref*DialogMoveSub. (Pref*ListDefailtCb): respond to "GDK_Up", "GDK_Down" and "GDK_Delete". 2009-02-25 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvLButtonDblClk): use "POINT_TYPE_DRAW_ALL". * src/gtk/x11menu.h (POINT_TYPE_DRAW_ALL): add * src/gtk/x11opt.c (script_free, script_init, extprinter_free) (extprinter_init): added. (PrefScriptDialogUpdate, PrefScriptDialogRemove) (PrefScriptDialogAdd, PrefScriptDialogUp, PrefScriptDialogDown) (script_list_defailt_cb, script_list_sel_cb) (PrefDriverDialogUpdate, PrefDriverDialogRemove) (driver_list_defailt_cb, driver_list_sel_cb) (PrefDriverDialogAdd, PrefDriverDialogUp, PrefDriverDialogDown) (PrefFontDialogUp, PrefFontDialogDown, font_list_defailt_cb) (font_list_sel_cb) : remove (use "x11opt_proto.h"). (PrefScriptDialogSetupItem, PrefDriverDialogSetupItem): remove unused argument. * src/gtk/ogra2cairo.c (free_font_map, create_font_map): remove codes related to "fcur->prev" and so on. * src/gtk/ogra2cairo.h (struct fontmap): remove member "prev". * src/gtk/Makefile.am (libngraph_la_SOURCES): add "x11opt_proto.h". 2009-02-24 Ito Hiroyuki * src/gtk/x11opt.c (PrefScriptDialogUp, PrefScriptDialogDown) (PrefDriverDialogUp, PrefDriverDialogDown, PrefFontDialogUp) (PrefFontDialogDown): add (scriptlist_sel_cb, drvlist_sel_cb, fontlist_sel_cb): set sensitivity of "d->up_b" and "d->down_b". (PrefScriptDialogSetup, PrefDriverDialogSetup) (PrefFontDialogSetup): create GtkButton "d->up_b" and "d->down_b". * src/gtk/x11view.c (ShowPoints, mouse_up_lgend2): use "POINT_TYPE_DRAW1". (ViewerEvLButtonUp): use "POINT_TYPE_POINT". (ViewerEvMouseMove): use "POINT_TYPE_TRIM", "POINT_TYPE_POINT", "POINT_TYPE_DRAW1" and "POINT_TYPE_DRAW2". (ViewerEvKeyDown): use "POINT_TYPE_POINT". (ViewCopy): use "POINT_TYPE_POINT". (ShowPoints): use "POINT_TYPE_DRAW1". (mouse_up_lgend2): use "POINT_TYPE_DRAW1". (ViewerEvMouseMove, ViewerEvPaint): use "Mxlocal->gc" instead of newly created GdkGC. * src/gtk/x11menu.h (POINT_TYPE_POINT, POINT_TYPE_DRAW1) (POINT_TYPE_DRAW2, POINT_TYPE_TRIM): added. * src/gtk/x11menu.c (SetCursor): do nothing when "type" is same as "CursorType". * src/gtk/ox11menu.c (mx_clear): turn off clipping after draw pixmap. * src/gtk/ogra2x11.c (gtkevpaint): turn off clipping after draw pixmap. 2009-02-23 Ito Hiroyuki * src/gtk/ox11menu.c (mx_redraw): call "draw_paper_frame()" after call "GRAredraw()". (check_object_name): added. (mx_get_focused): use "check_object_name()" to check the object is exist in the argument. (gtkmenu): argument type of "focused" is "sa". * src/gtk/x11menu.h (struct Viewer): add member "VRuler" and "HRuler". * src/gtk/x11opt.c (ViewerDialogClose): call "set_widget_visibility()". * src/gtk/x11menu.c (setupwindow): create GtkHRuler and GtkVRuler. (SetPoint): set position of "NgraphApp.Viewer.HRuler" and "NgraphApp.Viewer.VRuler". (set_widget_visibility): added. (application): call "set_widget_visibility()" after call "gtk_widget_show_all()". * src/gtk/x11view.c (MakeRuler): remove. (SetVRuler, SetHRuler): added. (ChangeDPI): call "SetHRuler()" and "SetVRuler()". (ViewerEvHScroll): call "SetVRuler()". (ViewerEvVScroll): call "SetHRuler()". (draw_paper_frame): added. (Draw, create_pix): call "draw_paper_frame()". (ViewerWinSetup): call "ChangeDPI" after initialize "d->cx", "d->cy", "d->hscroll" and "d->vscroll". (ViewerEvPaint): don't call "MakeRuler()". * src/gtk/main.c (my_sprintf): don't change "buf_size" when the return value of "realloc()" is NULL. 2009-02-20 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvPaint): call "gdk_draw_drawable()" even if "GlobalLock" is TRUE. (ViewerEvPaint): don't check "chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid)". * demo/demo.ngp: use dialog::check * src/gtk/ox11dlg.c (get_sarray_argument): added. (dlgradio, dlgcombo, dlgcheck): use "get_sarray_argument()". * src/object.c (saveobj, restoreobj): remove. (_copyobj): static function. * src/shellcm.c (cmput): never save and restore image of instance. 2009-02-19 Ito Hiroyuki * src/gtk/ox11dlg.c (dlgradio, dlgcombo, dlgcheck): return 1 when no arguments are given. * src/shell.c (cmdstackfree): call "memfree(stdel->pat)". (cmdstackcat): initialize "stnew->pat". (cmdstackrmlast): call "memfree(stdel->pat)". (cmdexec): set NULL to "st->pat" if "st->pat" will not be used any more. * src/gtk/x11opt.c (PrefScriptDialogRemove): call "memfree(sdel->description)". * src/gtk/ox11menu.c (menudone): call "memfree(sdel->description)". (mx_get_focused): use "arrayfree2()" instead of "memfree()" to free "*rval". * src/gtk/ox11dlg.c (dlggetopenfiles): use "arrayfree2()" instead of "memfree()" to free "*rval". * src/oaxis.c (axisbbox): set NULL to "rval" when return value of "set_axis_box()" is NULL. * src/otext.c (textbbox): set NULL to "rval" after call "arrayfree()". * src/orect.c (rectbbox): set NULL to "rval" after call "arrayfree()". * src/olegend.c (legendbbox): set NULL to "rval" after call "arrayfree()". * src/omerge.c (mergebbox): set NULL to "rval" after call "arrayfree()". * src/omark.c (markbbox): set NULL to "rval" after call "arrayfree()". * src/oline.c (arrowbbox): set NULL to "rval" after call "arrayfree()". * src/ofile.c (f2dgetcoord): set NULL to "rval" after call "arrayfree()". * src/ocurve.c (curvebbox): set NULL to "rval" after call "arrayfree()". * src/oarc.c (arcbbox): set NULL to "rval" after call "arrayfree()". 2009-02-18 Ito Hiroyuki * src/gtk/ox11dlg.c (dlgcombo_entry): remove. (dlgradio, dlgcombo, dlgcheck): check "select" field. (dlgcheck): now "check" field return array of selected index. (dialog): add field "select". * src/gtk/x11gui.c (DialogRadio): initialize state of toggle button by the value of "*r". (DialogCombo, DialogComboEntry): add argument "sel" and activate item related to "sel". (DialogCheck): change type of argument from "int **r" to "int *r". (DialogCheck): initialize state of toggle button by the value of "r[i]". * src/gtk/ox11menu.c (mx_get_focused): return 0 when "num" is less than 1. (mx_echo): added. (gtkmenu): add field "echo". 2009-02-17 Ito Hiroyuki * src/ofile.c (f2ddraw): do "fp->datanum = f2dlocal->num" after call "fitout()" when "fp->datanum" is zero. * src/gtk/x11opt.c (CHK_STR): added. (save_ext_driver_config, save_script_config) (SetScriptDialogSetupItem, SetDriverDialogSetupItem): use "CHK_STR" (PrefScriptDialogAdd): initialize "fnew->description". 2009-02-16 Ito Hiroyuki * src/gtk/x11scrip.c (ScriptDialog, ScriptDialogClose) (ScriptDialogSetup, script_list_default_cb) (ScriptDialogSetupItem): remove. (CmScriptExec): add arguments "GtkWidget *w" and "gpointer client_data". (CmScriptExec): don't use "ScriptDialog". * src/gtk/x11opt.c (save_script_config): save description of the script. (SetScriptDialogSetup): change title from "Script:" to "Script file". (SetScriptDialogSetup): add widgets for script description. (set_scrpt_option): added. (SetScriptDialogClose): use "set_scrpt_option()". (SetScriptDialogClose): save description of the script. (PrefScriptDialogSetup): add column for file name and script description. (PrefScriptDialogSetupItem): set file name and script description. (PrefScriptDialogClose): call "update_addin_menu()". * src/gtk/x11menu.h (enum MenuID): remove "MenuIdScriptExec". * src/gtk/x11menu.c: add global variable "AddinMenu". (show_graphmwnu_cb): set sensitivity of "AddinMenu". (create_addin_menu, update_addin_menu): added. (create_graphmenu): now "Add-In" menu has sub menu. * src/gtk/x11graph.c (CmGraphMenu): remove case for "MenuIdScriptExec". * src/gtk/x11dialg.h (struct ScriptDialog): remove. (struct SetScriptDialog): add member "description". * src/gtk/x11dialg.c: remove unused variable "DlgScript". * src/gtk/ox11menu.h (struct script): add member "description". * src/gtk/ox11menu.c (menu_config_set_script): set description. * initfile/Ngraph.ini.in (script): change format (add description column). 2009-02-13 Ito Hiroyuki * src/object.c (error22): now the type of the argument "mes1" and "mes2" are "const char *". (error2): now the type of the argument "mes" is "const char *". * initfile/Ngraph.ini.in (num_script_size): fix typo (from "num_scriptsize" to "num_script_size"). * src/gtk/x11dialg.c (SetObjPointsFromText): check field of the instance is modified or not after call "sgetobjfield()". (chk_sputobjfield): added. (SetObjFieldFromText, SetObjFieldFromStyle) (SetObjFieldFromFontList, SetObjAxisFieldFromWidget): use "chk_sputobjfield()". * src/gtk/gtk_subwin.c (modify_numeric): check field of the instance is modified or not after call "getobj()". (modify_string): use "chk_sputobjfield()". 2009-02-12 Ito Hiroyuki * src/gtk/x11axis.c (axiswin_delete_axis) (axis_delete_popup_func, axiswin_ev_key_down): added. (CmAxisWindow): initialize "d->ev_key". (Popup_list): "axis_delete_popup_func()" is called when delete menu is activated. * src/oaxis.c (check_direction): also check position of axises. * src/gtk/x11axis.c (Alist): "length" column accept negative value. 2009-02-11 Ito Hiroyuki * src/oaxis.c (axischange): check length of axis instead of position. (FIND_X, FIND_Y, FIND_U, FIND_R, FIND_FRAME, FIND_CROSS) (CHECK_FRAME, CHECK_CROSS): added. (get_axis_group_type): use "FIND_X", "FIND_Y", "FIND_U", "FIND_R", "CHECK_FRAME" and "CHECK_CROSS". (axis_save_groupe): added. (axissave): use "axis_save_groupe()" and "get_axis_group_type()". (struct axis_config, AxisConfig, enum axis_config_type): added. (addaxis): initialize "AxisConfigHash". (axisloadconfig): use "AxisConfigHash". 2009-02-10 Ito Hiroyuki * src/gtk/x11commn.c (GraphSave): "overwrite" is FALSE when "initfil" is NULL. (GraphSave): check overwrite before show save dialog. * src/gtk/x11axis.c (SectionDialogSetup, CrossDialogSetup) (AxisPosDialogSetup): type of spin buttons for width, height and length are "SPIN_BUTTON_TYPE_POSITION". * src/oaxis.c (get_axis_group_type, get_axis_box, set_axis_box): added. (axisbbox): use "get_axis_group_type()", "get_axis_box()" and "set_axis_box()". (axismatch, axismove, axischange, axiszoom): use "get_axis_group_type()". (axis_change_point0, axis_change_point1, axis_change_point2) (axis_change_point3): added. (axischange): use "axis_change_point0()", "axis_change_point1()", "axis_change_point2()" and "axis_change_point3()". (check_direction): added. (axisbbox, axischange): call "check_direction()" to check direction of axises. 2009-02-09 Ito Hiroyuki * src/oaxis.c (axissave, axisbbox, axismatch, axismove) (axischange, axiszoom, axisadjust, axisautoscalefile) (axisdraw): add initialization to avoid compile warnings. (axisautoscalefile): set "set" as TRUE when "set" is FALSE. (axisgrouping): check "data[0]". (set_group, set_group_pos): added. (axisgrouping): use "set_group()". (axisgrouppos): use "set_group_pos()". (axis_default, axis_default_set, axis_default_set_ref) (axis_default_set_adj): added. (axisdefgrouping): use "axis_default()", "axis_default_set_adj()" and "axis_default_set_ref()". (enum AXIS_TYPE, enum AXIS_GAUGE, enum AXIS_NUM_POS) (enum AXIS_NUM_ALIGN, enum AXIS_NUM_DIR): added. * src/omath.c (mformula): use "mathcode_error()". * src/ofit.c (fitput): use "mathcode_error()". * src/omath.c (addmath): initialize "MathErrorCodeArray". * src/ofit.c (addfit): initialize "MathErrorCodeArray". * src/ofile.c (f2dloadconfig2): remove. (mathcode_error): remove. (addfile): initialize "MathErrorCodeArray". * src/mathcode.c (mathcode_error): added. 2009-02-06 Ito Hiroyuki * src/gtk/x11opt.c (add_prm_str_to_array): added. (save_misc_config): use "add_prm_str_to_array()". (save_misc_config): save "coordwin_font". (DefaultDialogClose): call "add_str_to_array()" when "Menulocal.coordwin_font" is NULL. (MiscDialogSetupItem): set font name to "d->coordwin_font" if "Menulocal.coordwin_font" is not NULL. (MiscDialogSetup): create widgets for "Menulocal.coordwin_font". (MiscDialogClose): set selected font to "Menulocal.coordwin_font" and call "CoordWinSetFont()". * src/gtk/x11dialg.h (struct MiscDialog): add member "coordwin_font". * src/gtk/x11cood.c (CoordWinSetFont): added. (CoordWinDrawTex): remove. (CoordWinSetCoord): call "gtk_label_set_text()" instead of "CoordWinSetCoord()". (CoordWinSetCoord): change format strings for "x" and "y" from "%.2f" to "%6.2f". (CoordWinSetCoord): change format strings for axis id from "%d" to "%2d". (CoordWinUpdate): call "label_sub_window_create()" instead of "text_sub_window_create()". * src/gtk/ox11menu.c (MenuConfig): add data for "coordwin_font". (menuinit): initialize "Menulocal.coordwin_font". * src/gtk/ox11menu.h (struct menulocal): add member "coordwin_font". * src/gtk/gtk_subwin.c (sub_window_create): add argument "with_view_port". (sub_window_create): use "gtk_scrolled_window_add_with_viewport()" when "with_view_port" is TRUE. (label_sub_window_create): added. * src/omath.c (mformula): use "switch" to check "rcode". * src/ofile.c (mathcode_error): added. (f2dputmath, fitout): use "mathcode_error()". * src/gtk/x11gui.c (DialogExecute): call "gtk_widget_grab_focus()" when "data->focus" is not NULL. (DialogExecute): call "gtk_widget_show_all()" outside of the loop. (DialogExecute): check "data->show_buttons "outside of the loop. * src/gtk/x11lgnd.c (LegendTextDialogSetup): set poniter of the widget as "d->focus" instead of call "gtk_widget_grab_focus()". * src/gtk/x11graph.c (SaveDialogSetup): set poniter of the widget as "d->focus" instead of call "gtk_widget_grab_focus()". * src/gtk/x11file.c (MarkDialogSetup): set poniter of the widget as "d->focus" instead of call "gtk_widget_grab_focus()". * src/gtk/x11dialg.c (initdialog): initialize member "focus" of each instance of struct. * src/gtk/x11dialg.h (struct DialogType): add member "focus" to dialog related struct. 2009-02-05 Ito Hiroyuki * src/oagrid.c (agriddraw): bug fix: fix calculation of coordinate when "axdir" or "aydir" is 3. (agriddraw): adjust "dirx" and "diry" as these value is greater or equal to zero and less than 36000. * src/oaxis.c (axisdirection): added. (axis): "axisdirection()" is called when field "direction" is changed. * src/odraw.h (enum INTERPOLATION_TYPE): added. * src/mathcode.c (mathcode): return value type of "mathcode()" is "enum MATH_CODE_ERROR_NO". * src/gtk/x11graph.c (DirectoryDialogClose, CmGraphHistory): call "ErrorMessage()" when "chdir()" returns non zero value. * src/gtk/x11commn.c (ErrorMessage): added. * src/gtk/x11file.c (FitDialogSetSensitivity): use "FIT_OBJ_TYPE". (enum MATH_FNC_TYPE): added. (MathTextDialogSetup, MathTextDialogClose): use "MATH_FNC_TYPE". (FitDialogSetSensitivity): use "FIT_OBJ_TYPE". (FileDialogFit, FileDialogType, draw_type_pixbuf, select_type) (start_editing_type, f2dsettings): use "FILE_OBJ_PLOT_TYPE". * src/ofit.c (fitpoly, fitfit): use "FIT_OBJ_TYPE". * src/ofit.h: added. * src/ofile.c (f2ddraw): do "fp->datanum = f2dlocal->num" after call "fitout()" when "redraw" is true. (opendata, rectout, errorbarout, stairout, barout, f2ddraw): use "FILE_OBJ_PLOT_TYPE". (curveout, curveoutfile, f2dsettings): use "INTERPOLATION_TYPE". * src/ofile.h (enum FILE_OBJ_PLOT_TYPE): add 2009-02-04 Ito Hiroyuki * driver/Makefile.am (ngp2, dir_defs.h): depend on Makefile. * src/gtk/Makefile.am (dir_defs.h): depend on Makefile. * src/gtk/ogra2cairo.c (loadfont): remove unused variables "lang" and "lang_ja". (gra2cairo_get_fontmap_num): added. * src/gtk/x11opt.c (save_font_config, save_ext_viewer_config) (save_misc_config, save_script_config, save_ext_driver_config) (save_viewer_config, save_child_geometory_config) (save_geometory_config, add_str_to_array) (add_str_with_int_to_array, add_geometry_to_array): added. (DefaultDialogClose): use "add_str_to_array()", "save_geometory_config()" and so on. (scriptlist_sel_cb, drvlist_sel_cb, fontlist_sel_cb): added. (PrefScriptDialogSetup, PrefDriverDialogSetup) (PrefFontDialogSetup): set signal handler to GtkTreeSelection for "changed" signal. (get_font_alias): added. (set_font_from_font_selection_dialog): use "get_font_alias()". (PrefFontDialogAdd): use "get_font_alias()" and "gra2cairo_get_fontmap()" to check if "alias" is valid string. * src/gtk/x11dialg.h (struct PrefScriptDialog) (struct PrefDriverDialog, struct PrefFontDialog): add member "update_b" and "del_b". * src/gtk/gtk_liststore.c (list_store_set_string) (list_store_path_set_string, tree_store_set_string): type of argument "v" is "const char *". 2009-02-03 Ito Hiroyuki * src/gtk/x11opt.c (DefaultDialogSetup): add "Font aliases" button. (DefaultDialogClose): add codes for save font map. (PrefFontDialogSetupItem, create_font_selection_dialog) (set_font_from_font_selection_dialog, PrefFontDialogUpdate) (PrefFontDialogRemove, PrefFontDialogAdd, font_list_defailt_cb) (PrefFontDialogSetup, PrefFontDialogClose, PrefFontDialog) (CmOptionPrefFont): added. (CmOptionMenu): add case for "MenuIdOptionPrefFont". * src/gtk/x11menu.h (enum MenuID): add "MenuIdOptionPrefFont". * src/gtk/x11menu.c (create_preferencemenu): add menu item "Font aliases". * src/gtk/x11dialg.h (struct PrefFontDialog): added. * src/gtk/x11dialg.c: add global variable "DlgPrefFont". * src/gtk/ogra2cairo.c (FontFaceStr, gra2cairo_get_fontmap) (gra2cairo_remove_fontmap, gra2cairo_add_fontmap, free_fonts) (gra2cairo_update_fontmap, check_type): added. (init_conf, free_conf): use "free_fonts()". (loadconfig): remove unused variable "fcur". (init_conf): use "FontFaceStr". * src/gtk/ogra2cairo.h (struct gra2cairo_local): remove unused member "font_opt". 2009-01-29 Ito Hiroyuki * src/gtk/x11view.c (create_legendx): use "swapint()". 2009-01-28 Ito Hiroyuki * addin/math.nsc: format result with "text::printf". * src/gtk/x11view.c (mouse_down_move): don't check "arraynum(d->focusobj)". (mouse_up_point): remove unused variables "num" and "focused". (mouse_up_point): use "switch" instead of "if". (mouse_up_drag, mouse_up_zoom, mouse_up_change): don't call "SetCursor()". (ViewerEvLButtonUp): call "SetCursor()" when "d->Mode" is "PointB", "LegendB", "AxisB", "TrimB", "DataB" or "EvalB". (get_mouse_cursor_type): return GDK_LEFT_PTR when "num == 0". * src/gtk/x11scrip.c (ScriptDialogClose): initialize "d->execscript" as NULL before check "d->ret". (CmScriptExec): call "delobj(shell, newid)" when "arrayadd()" returns NULL. 2009-01-23 Ito Hiroyuki * debian/Makefile.am: add files for debian package. * src/gtk/x11menu.c (application): call "gtk_widget_show_all()" instead of "gtk_window_present()". 2009-01-20 Ito Hiroyuki * src/gtk/x11file.c (start_editing): treat "id" as oid when "name[0] == '^'". * src/oagrid.c (agridtight): use "obj_do_tighten()". * src/oaxis.c (axistight): use "obj_do_tighten()". * src/ofile.c (f2dtight): use "obj_do_tighten()". * src/object.c (obj_do_tighten): added. 2009-01-18 Ito Hiroyuki * src/gtk/x11merge.c (POPUP_ITEM_TOP, POPUP_ITEM_UP) (POPUP_ITEM_DOWN, POPUP_ITEM_BOTTOM): added. (MergeWinExpose): change sensitivity of popup menu item. * src/gtk/x11lgnd.c (POPUP_ITEM_TOP, POPUP_ITEM_UP) (POPUP_ITEM_DOWN, POPUP_ITEM_BOTTOM): added. (LegendWinExpose): change sensitivity of popup menu item. * src/gtk/x11file.c (POPUP_ITEM_TOP, POPUP_ITEM_UP) (POPUP_ITEM_DOWN, POPUP_ITEM_BOTTOM): added. (popup_show_cb): change sensitivity of popup menu item. (FileDialog): d->multi_open is TRUE when "multi > 0". * src/gtk/x11axis.c (POPUP_ITEM_TOP, POPUP_ITEM_UP) (POPUP_ITEM_DOWN, POPUP_ITEM_BOTTOM): added. (popup_show_cb): change sensitivity of popup menu item. 2009-01-17 Ito Hiroyuki * src/gtk/x11dialg.h (struct FitDialog): add members "through_box", "dim_box", "weight_box", "usr_deriv_box", "usr_def_frame" and "div_box". * src/gtk/x11file.c (FitDialogSetSensitivity): added. (FitDialogSetup): add signal handler for some widgets to change sensitivity of widgets. 2009-01-14 Ito Hiroyuki * src/gtk/x11dialg.h (struct FileDialog): add member "apply_all" and "multi_open". * src/gtk/x11merge.c (MergeDialogSetup): add signal handler for "copy" button. * src/gtk/x11lgnd.c (LegendCurveDialogSetup) (LegendPolyDialogSetup, LegendArrowDialogSetup) (LegendRectDialogSetup, LegendArcDialogSetup) (LegendMarkDialogSetup, LegendTextDialogSetup): add signal handler for "copy" and "copy all" button. * src/gtk/x11file.c (FitDialogSetup, FileMoveDialogSetup) (FileMaskDialogSetup, FileLoadDialogSetup, FileMathDialogSetup) (FileDialogSetup): add signal handler for "copy" button. (FileDialogSetupItem): set sensitivity of "d->apply_all" by "d->multi_open". (FileDialog): initialize "d->multi_open". (FitDialogApply): check "poly_dimension" field is changed or not. (FileMoveDialogSetupItem, FileMoveDialogClose): execute "move_data_adjust" before get "move_data", "move_data_x" and "move_data_y". (FileDialogFit): delete instance of "fit" object when "ret == IDCANCEL" and "create == FALSE". * src/gtk/x11axis.c (GridDialogSetup, AxisBaseDialogSetup) (AxisPosDialogSetup, NumDialogSetup, AxisFontDialogSetup) (GaugeDialogSetup, AxisDialogSetup): add signal handler for "copy" button. (SectionDialogGrid): delete instance of "axisgrid" object when "ret == IDCANCEL" and "create == FALSE". (SectionDialogGrid): don't call "set_graph_modified()" when "axisgrid" object is not created. * src/gtk/x11gui.c (set_sensitivity_by_check_instance): added. (DialogExecute): call "gtk_widget_hide_all()" before call "gtk_widget_show_all()". * src/shellcm.c (dispfield): change field size for field name from 15 to 16. * src/gtk/x11view.c (mouse_down_move_data): execute "move_data_adjust" before get "move_data", "move_data_x" and "move_data_y". * src/oprm.c (prmload): execute "move_data_adjust" before get "move_data", "move_data_x" and "move_data_y". * src/ofile.c (adjust_move_num): added. (file2d): add field "move_data_adjust". (opendata): execute "move_data_adjust" before get "move_data", "move_data_x" and "move_data_y". 2009-01-13 Ito Hiroyuki * src/gtk/x11view.c (menu_activate): added. (ViewerWinSetup): add signal handler for "selection-done" to "d->menu". (Evaluate): cursor type is "GDK_TCROSS" when move data mode. (mouse_down_move_data): check return value of "getobj()" and "getobjlist()" and goto "ErrEnd" when these functions return FALSE. (move_data_cancel): add argument "show_message". (mouse_down_move_data): check return value of "arraynget()". (do_popup): check id of focused object when "num == 1". * src/gtk/x11menu.h (struct Viewer): add member "menu". * src/gtk/x11menu.c (Cursor): add "GDK_TCROSS". (SetCursor): add case "GDK_TCROSS". (setupwindow): initialize "NgraphApp.Viewer.menu". 2009-01-11 Ito Hiroyuki * src/gtk/x11menu.h (enum MouseMode): added. (struct Viewer): member "MouseMode" and "Mode" are enum. * src/gtk/x11view.c (init_zoom): added. (mouse_down_move): use "get_mouse_cursor_type()" to check cursor position. (get_mouse_cursor_type): set "d->ChangePoint". (POINT_LENGTH, FOCUS_FRAME_OFST, FOCUS_RECT_SIZE): added. (ShowFocusFrame, get_mouse_cursor_type): use "FOCUS_RECT_SIZE" and "FOCUS_FRAME_OFST". (ShowPoints): use "POINT_LENGTH". 2009-01-10 Ito Hiroyuki * src/gtk/x11view.c (do_popup): set sensitivity of popup item related to "VIEWER_POPUP_ITEM_UP" and "VIEWER_POPUP_ITEM_DOWN". (create_popup_menu): add "#error" directive to check array size. 2009-01-09 Ito Hiroyuki * src/gtk/x11menu.h (VIEWER_POPUP_ITEM_NUM): change value from 7 to 9. * src/gtk/x11gui.c (GetColor): remove. * src/gtk/x11menu.c (application): change color of "gray" from "#7f7f7f" to "#aaaaaa". 2009-01-08 Ito Hiroyuki * src/gtk/ogra2x11.c (gtkMakeRuler): use "GDK_INVERT" instead of "GDK_XOR". (gtkRGB): remove. * src/gtk/x11lgndx.c (clear_view): don't call "gdk_window_clear()". (LegendGaussDialogSetup): use "value-changed" signal instead of "change-value". * src/gtk/x11opt.c (DefaultDialogClose): use "sub_window_save_geometry()" to get geometry of a sub window. * src/gtk/x11menu.c (CmReloadWindowConfig): use "sub_window_hide()" to hide sub window. * src/gtk/x11info.c (CmInformationWindow): use "sub_window_show()" and "sub_window_toggle_visibility()". * src/gtk/x11cood.c (CmCoordinateWindow): use "sub_window_show()" and "sub_window_toggle_visibility()". * src/gtk/x11merge.c (CmMergeWindow): use "sub_window_show()" and "sub_window_toggle_visibility()". * src/gtk/x11lgnd.c (CmLegendWindow): use "sub_window_show()" and "sub_window_toggle_visibility()". * src/gtk/x11axis.c (CmAxisWindow): use "sub_window_show()" and "sub_window_toggle_visibility()". * src/gtk/x11file.c (CmFileWindow): use "sub_window_show()" and "sub_window_toggle_visibility()". * src/gtk/gtk_subwin.c (set_geometry): add argument "state" and save window state. (sub_window_save_geometry): save window state. (sub_window_hide, sub_window_show, sub_window_toggle_visibility): added. (cb_del): just call "sub_window_hide()". 2009-01-07 Ito Hiroyuki * src/gtk/x11menu.c (CmReloadWindowConfig): call "sub_window_set_geometry()" after show the window. * src/gtk/x11cood.c (CmCoordinateWindow): call "sub_window_save_geometry()" before hide. (CmCoordinateWindow): call "sub_window_set_geometry()" after call "gtk_widget_show_all()". * src/gtk/x11axis.c (CmAxisWindow): call "sub_window_save_geometry()" before hide. (CmAxisWindow): call "sub_window_set_geometry()" after call "gtk_widget_show_all()". * src/gtk/x11file.c (CmFileWindow): call "sub_window_save_geometry()" before hide. (CmFileWindow): call "sub_window_set_geometry()" after call "gtk_widget_show_all()". * src/gtk/x11lgnd.c (CmLegendWindow): call "sub_window_save_geometry()" before hide. (CmLegendWindow): call "sub_window_set_geometry()" after call "gtk_widget_show_all()". * src/gtk/x11merge.c (CmMergeWindow): call "sub_window_save_geometry()" before hide. (CmMergeWindow): call "sub_window_set_geometry()" after call "gtk_widget_show_all()". * src/gtk/x11info.c (InfoWinUpdate): call "sub_window_save_geometry()" before hide. (InfoWinUpdate): call "sub_window_set_geometry()" after call "gtk_widget_show_all()". * src/gtk/gtk_subwin.c (sub_window_set_geometry) (sub_window_save_geometry): added. (cb_show): call "sub_window_set_geometry()". (cb_del): call "sub_window_save_geometry()". * src/gtk/x11view.c (ShowFocusFrame): use "Menulocal.focus_frame_type" for line attribute of focus frame. * src/gtk/x11opt.c (DefaultDialogClose): save "Menulocal.focus_frame_type". (MiscDialogSetupItem): setpu "d->fftype". (MiscDialogClose): set "Menulocal.focus_frame_type". * src/gtk/ox11menu.h (struct menulocal): add member "focus_frame_type". * src/gtk/ox11menu.c (MenuConfig): add item for "focus_frame_type". (menuinit): initialize "Menulocal.focus_frame_type". * src/gtk/x11menu.c (show_instance_menu_cb) (set_show_instance_menu_cb, struct show_instance_menu_data): added. (create_filemenu, create_axisgridmenu, create_axismenu) (create_mergemenu, create_outputmenu): call "show_instance_menu_cb()". (create_legendmenu): call "g_signal_connect()" for "show" signal. (create_legendsubmenu): return "menu". 2009-01-06 Ito Hiroyuki * src/object.c: variable "looproot" is static. (has_eventloop): added. * src/shell.c (msleep): added. (cmdexec): don't set "WNOHANG" when "has_eventloop()" returns FALSE. (cmdexec): use "msleep()" after call "eventloop()". * src/shellux.c (cmsleep): use "sleep()" when "has_eventloop()" returns FALSE. (cmsleep): use "msleep()" after call "eventloop()". * demo/demo.ngp.in: added. * src/gtk/gtk_subwin.c (sub_window_create): add argument "xpm2" and call "gtk_window_set_icon_list()" when "xpm2" is not NULL. * src/gtk/x11bitmp.c: add "Axiswin48_xpm", "Coordwin48_xpm", "Filewin48_xpm", "Infowin48_xpm", "Legendwin48_xpm" and "Mergewin48_xpm". * src/gtk/x11menu.c (struct command_data): remove member "xbm". * src/gtk/x11bitmp.c: remove xbm data. * src/gtk/x11menu.c (createpixmap, createicon): use "gdk_pixbuf_new_from_xpm_data()" instead of "create_pixbuf_from_xpm()". * src/gtk/gtk_subwin.c (sub_window_create): use "gdk_pixbuf_new_from_xpm_data()" instead of "create_pixbuf_from_xpm()". * src/gtk/x11menu.c (create_pixbuf_from_xpm): remove. 2009-01-04 Ito Hiroyuki * src/terminal.c (my_signal): added. (main): use "my_signal". * src/gtk/main.c: variables "consolecol", "consolerow", "consolefdout", "consolefdin", "consoleac" and "systemname" are static. (interruptconsole, inputynconsole, displaydialogconsole) (displaystatusconsole): these functions are static. * src/osystem.c (systemresize): don't check "data[0]" and "data[1]". 2009-01-03 Ito Hiroyuki * src/gtk/x11menu.c (create_cursor): use "gdk_cursor_new()" instead of "gdk_cursor_new_for_display()". * src/gtk/main.c: remove global variable "Disp". * src/gtk/x11view.c (OpenGC): don't call "gdk_display_get_default()". * src/gtk/ogra2x11.c (gtkflush): added. * src/gtk/ox11menu.c (mxflush): don't call "gdk_display_flush()". * src/gtk/x11view.c (CloseGC, ReopenGC): don't call "gdk_display_flush()". 2009-01-02 Ito Hiroyuki * src/terminal.c (main): use named pipe. (main): use "pause()" to wait termination. * src/gtk/main.c: global variables "terminal", "consolesave", "consolefd[]" and "consolepid" are static. remove unused variable "pipefd". (nallocconsole): use named pipe. (nfreeconsole): use "kill()" to terminate "nterminal". 2008-12-31 Ito Hiroyuki * src/gtk/main.c (putconsole, printfconsole, inputynconsole) (nallocconsole): check return value of "write()". (nfreeconsole): check value of "pipefd". * src/gtk/ogra2x11.c (gtkflush): remove. (gra2gtk): remove field "flush". (gra2gtk): rename field "redraw" to "expose". (gra2gtk): add field "dpix" and "dpiy". (gtkinit): "gtkevpaint()" is connected to "gtklocal->View". (gdkgc_set_arc_mode, gdkgc_set_fill_rule): remove. (gtkinit): show error message when "OpenApplication()" returns FALSE. 2008-12-30 Ito Hiroyuki * demo/demo.ngp: added. * src/gtk/x11view.c (AlignFocusedObj, ViewDelete, ViewCopy) (ViewCross): do nothing when "Menulock" or "GlobalLock" is TRUE. (mouse_up_zoom): minimum value of "zm" is 1000. * src/gtk/x11opt.c (CmOptionSaveNgp): do nothing when "Menulock" or "GlobalLock" is TRUE. * src/gtk/x11graph.c (CmHelpAbout, CmHelpHelp): do nothing when "Menulock" or "GlobalLock" is TRUE. * src/gtk/ogra2x11.c (gtkclear): clear pixmap. (gtk_set_dpi): added. (gra2gtk): add filed "dpi". * src/gtk/x11scrip.c (CmScriptExec): use "menu_lock()" to lock gui. * src/gtk/x11menu.c (menu_lock): add * src/gtk/x11graph.c (CmGraphShell): use "menu_lock()" to lock gui. * src/gtk/x11file.c (select_type, start_editing_type) (start_editing, edited_axis): use "menu_lock()" to lock gui. * src/gtk/x11commn.c (LoadNgpFile): use "menu_lock()" to lock gui. (LoadNgpFile): call "registerevloop()" and "unregisterevloop()" before and after call "_exeobj()" respectively. * src/gtk/x11axis.c (start_editing, edited): use "menu_lock()" to lock gui. * src/gtk/ox11menu.c (mx_print): use "menu_lock()" to lock gui. (gtkmenu): type of "print" field is "NVFUNC". * src/gtk/gtk_subwin.c (start_editing, cancel_editing) (numeric_cb, string_cb): use "menu_lock()" to lock gui. * src/shellux.c (cmsleep): call "sleep()" while waiting timeout. 2008-12-28 Ito Hiroyuki * src/gtk/x11view.c (mouse_up_drag): move object only when "dx != 0 || dy != 0". (mouse_up_change): change object only when "dx != 0 || dy != 0". (mouse_up_zoom): zoom object only when "zm != 0 && zm != 10000". 2008-12-26 Ito Hiroyuki * src/omark.c (marktype): added. (mark): check marktype. * demo/demo5b.ngp (text): maximum value of "i" is 8. * src/gtk/x11view.c (ShowFrameRect, ShowPoints, ShowFocusLine) (ShowFocusFrame): do not call "gdk_gc_set_dashes()". * src/gtk/x11lgndx.c (LegendGaussDialogPaint): do not call "gdk_gc_set_dashes()". * src/gtk/x11dialg.c: remove variables "Dashes" and "DashesNum". * src/gtk/x11view.c (get_mouse_cursor_type): bug fix: fix conditions for "GDK_TOP_RIGHT_CORNER". * src/gtk/ogra2cairo.c (draw_str): create PangoLayoute only when "local->layout" is NULL. (gra2cairo_init): initialize "local->layout". (gra2cairo_free): unref "local->layout" if "local->layout" is not NULL. * src/gtk/ogra2cairo.h (struct gra2cairo_local): add member "layout". 2008-12-25 Ito Hiroyuki * initfile/.Ngraph: add "-gra" option. do not create new "gra" object after evaluate ngp file. 2008-12-22 Ito Hiroyuki * src/gtk/x11view.c (new_merge_obj, new_file_obj) (text_dropped, ViewerWinFileUpdate, Evaluate, Trimming) (AlignFocusedObj, mouse_down_move_data, mouse_up_drag) (mouse_up_zoom, mouse_up_change, create_legend1, create_legend2) (create_legend3, create_legendx, create_single_axis) (create_axis, ViewerEvKeyUp, ViewUpdate, ViewDelete) (reorder_object, ViewCopyAxis, ViewCopy): use "set_graph_modified()". (graph_dropped): use "reset_graph_modified()". * src/gtk/x11merge.c (CmMergeOpen, CmMergeClose, CmMergeUpdate): use "set_graph_modified()". * src/gtk/x11lgnd.c (legend_dialog_close, CmLineDel) (CmLineUpdate, CmCurveDel, CmCurveUpdate, CmPolyDel) (CmPolyUpdate, CmRectDel, CmRectUpdate, CmArcDel, CmArcUpdate) (CmMarkDel, CmMarkUpdate, CmTextDel, CmTextUpdate) (LegendWinLegendUpdate): use "set_graph_modified()". * src/gtk/x11graph.c (CmGraphSwitch, CmGraphPage): use "set_graph_modified()". (CmGraphLoad, CmGraphHistory): use "reset_graph_modified()". * src/gtk/x11file.c (MathDialogList, FileMaskDialogClose) (FileLoadDialogClose, FileDialogCopyAll, CmFileHistory) (CmFileNew, CmFileOpen, CmFileClose, CmFileUpdate) (FileWinFileDelete, file_obj_copy, FileWinFileUpdate) (FileWinFileDraw, select_type, edited_axis): use "set_graph_modified()". * src/gtk/x11dialg.c (SetObjPointsFromText, SetObjFieldFromText) (SetObjFieldFromSpin, SetObjFieldFromToggle) (SetObjFieldFromStyle, SetObjFieldFromList) (SetObjFieldFromFontList, SetObjAxisFieldFromWidget) (_putobj_color): use "set_graph_modified()". * src/gtk/x11commn.c (CheckSave): use "get_graph_modified()". (GraphSave): use "reset_graph_modified()". * src/gtk/x11axis.c (SectionDialogGrid, CmAxisNewFrame) (CmAxisNewSection, CmAxisNewCross, CmAxisNewSingle, CmAxisDel) (CmAxisZoom, CmAxisClear, CmAxisGridNew, CmAxisGridDel) (CmAxisGridUpdate, AxisWinExpose, edited): use "set_graph_modified()". * src/gtk/ox11menu.h: add prototype of "get_graph_modified", "reset_graph_modified" and "set_graph_modified". * src/gtk/ox11menu.c (get_graph_modified, reset_graph_modified) (set_graph_modified): add (menuinit): initialize "modified" field. (gtkmenu): add "modified" field. * src/gtk/gtk_subwin.c (copy, delete, move_top, move_last) (move_up, move_down, modify_numeric, modify_string, hidden) (tree_copy, tree_delete, tree_move_top, tree_move_last) (tree_move_up, tree_move_down, tree_hidden): use "set_graph_modified()". * addin/math.nsc: set +e and check return value of dexpr. * src/gtk/x11dialg.h (struct MiscDialog): add menber "Obj" and "Id". * src/gtk/x11menu.c (init_ngraph_app_struct): initialize "NgraphApp.Interrupt". * src/gtk/x11menu.h (struct NgraphApp): remove unused member "interrupt" and "Changed". * src/gtk/x11opt.c (ViewerDialogClose): call "putobj()" to set "redraw_num" field. (MiscDialog): add argument "struct objlist *obj" and "int id". (CmOptionMisc): add argument to call "MiscDialog()". (MiscDialogClose): call "putobj()" to save "data_head_lines". * src/gtk/ox11menu.c (gtkmenu): type of "redraw_num" field is "NINT". 2008-12-20 Ito Hiroyuki * src/gtk/ox11menu.c (menuerrorlist): add message "cannot open display.". (enum): add error identifier. (menuinit): call "error()" when "OpenApplication()" returns FALSE. * src/gtk/ox11dlg.c (dlginit): call "error()" when "OpenApplication()" returns FALSE. 2008-12-19 Ito Hiroyuki * src/ofile.c (set_data_progress): check if "frac" is greater than 1 or not. 2008-12-18 Ito Hiroyuki * src/gtk/x11menu.c (kill_signal_handler): added. (childhandler): use "sigaction()" instead of "signal()". (AppMainLoop): call "CheckSave()" when "Hide_window" is TRUE. (application): use "sigaction()" instead of "signal()". (application): set signal handler for "SIGINT" signal. * src/gtk/x11graph.c (CmGraphQuit): just call "QuitGUI()". * src/gtk/x11opt.c (MiscDialogSetup): change design of the dialog. * src/gtk/x11view.c (enum ViewerPopupIdn): add "VIEW_UP" and "VIEW_DOWN". (enum object_move_type): added. (create_popup_menu): add up and down object menu item. (ViewerPopupMenu): add case "VIEW_DOWN" and "VIEW_UP". (reorder_object): change argument from int to "enum object_move_type". * src/gtk/ogra2cairo.c (gra2cairo_output): don't draw arc if "w" or "h" is 0 in the case of "code" is 'C'. * src/otext.c (textzoom): minimum value of "pt" is 1. * src/orect.c (rectzoom): minimum value of "width" is 1. * src/omark.c (markzoom): minimum value of "size" and "width" is 1. (markgeometry): use temporal variable "val". * src/olegend.c (legendzoom): minimum value of "width" is 1. * src/oarc.c (arcgeometry): use temporal variable "val". (arczoom): minimum value of "rx", "ry", and "width" is 1. 2008-12-17 Ito Hiroyuki * src/gtk/x11file.c (FileWinFileDraw): check if the graph is changed or not. * src/oline.c (arrowbbox): bug fix: add valiable "num2" and "num2" is used only to calculate positions of an arrow. * src/gtk/x11view.c (Match): return matched instance number. (mouse_up_point): change cursor if any object is focused. * src/gtk/ox11menu.c (gtkmenu): add field "draw". (mxdraw): added. (mx_redraw): call "gdk_window_invalidate_rect()". * src/gtk/x11merge.c (MergeDialogSetup): use "gtk_check_button_new_with_mnemonic()" instead of "gtk_check_button_new_with_label()". * src/gtk/x11gui.c (FileSelectionDialog): use "gtk_check_button_new_with_mnemonic()" instead of "gtk_check_button_new_with_label()". 2008-12-16 Ito Hiroyuki * src/gtk/x11view.c (struct viewer_popup): add member "submenu_item_num". (create_menu): add argument "int n". (create_menu): add separator when "popup[i].title" is NULL. (create_popup_menu): add separator to menus. * src/gtk/x11merge.c (Mlist): add separator. (Mlist): "file" column is editable. * src/gtk/x11lgnd.c (Popup_list): add separator. * src/gtk/x11file.c (Flist): minimum value of "step" is 1. (Popup_list): add separator. * src/gtk/x11axis.c (Popup_list): add separator. (Popup_list): add clear menu item. (axiswin_scale_clear): added. * src/gtk/gtk_subwin.c (sub_win_create_popup_menu): add "GtkSeparatorMenuItem" when "list[i].title" is NULL. 2008-12-15 Ito Hiroyuki * src/gtk/x11menu.c (find_gra2gdk_inst): bug fix: always get "_local" field. 2008-12-12 Ito Hiroyuki * src/gtk/ogra2x11.c (struct gtklocal): remove unused member "autoredraw", "cmap" and "minus_hyphen". (gra2gtk): remove unused field "auto_redraw". * src/gtk/ox11menu.h (struct mxlocal): remove unused member "privatecolor", "cmap", "cdepth", "cairo_save", "minus_hyphen" and "points". (struct menulocal): remove unused member "mousecloick" and "movechild". * src/gtk/x11menu.c (createcommand1, createcommand2): check "Menulocal.showtip". * src/gtk/gtk_liststore.c (create_column): set page_size of GtkAdjustment as 0. 2008-12-09 Ito Hiroyuki * src/shellcm.c (cmecho): add "-n" option. 2008-12-03 Ito Hiroyuki * src/ofile.c (getdata_skip_step): call "memfree(buf)" when "rcode" is 1 or -1. 2008-12-02 Ito Hiroyuki * src/ofile.c (search_mask): added. (getdata_sub2, getdata2, getdataraw): use "search_mask()". (struct f2ddata): add member "mask_index". (opendata, reopendata): initialize "fp->mask_index". 2008-12-01 Ito Hiroyuki * src/gtk/ox11dlg.c * src/gtk/x11gui.c (DialogRadio, DialogCombo, DialogCheck): add label if "caption" is not NULL. (DialogComboEntry): added. * src/gtk/ox11dlg.c (dlgconfirm, dlgmessage, dlgradio, dlgcombo) (dlgcheck): check and use "title" field. (dlginput, dlgradio, dlgcombo, dlgcheck): check and use "caption" field. (dlgcombo_entry): added. (dialog): add "combo_entry", "title" and "caption" field. 2008-11-28 Ito Hiroyuki * src/gtk/ox11dlg.c (dlggetopenfile, dlggetopenfiles) (dlggetsavefile): second argument is used as an initial file name. * src/gtk/x11gui.c (FileSelectionDialog): check "type" before call set name. (fsok): check "filter". * src/gtk/ox11dlg.c (dlgcombo): added. (dialog): add field "combo". (dlggetsavefile, dlggetopenfile): use "memfree()" to free "*(char **)rval". * src/gtk/x11gui.c (DialogCombo): added. * demo/encoding.ngp: use "dialog::combo" instead of "dialog::input". 2008-11-27 Ito Hiroyuki * src/gtk/ox11dlg.c (dlgcheck, dlgradio): added. (dialog): add fields "radio" and "check". now all functions dfined in ox11dlg.c is static. * src/gtk/x11gui.h: add prototype of "DialogCheck" and "DialogRadio" * src/gtk/x11gui.c (DialogCheck, DialogRadio): added. * src/gtk/ox11menu.h (struct menulocal): remove unused member "framex", "framey" and "exwinbackingstore". (struct mxlocal): remove unused member "backingstore". * src/gtk/ox11menu.c (enum menu_config_type) (menu_config_menu_geometry, menu_config_file_geometry) (menu_config_axis_geometry, menu_config_legend_geometry) (menu_config_merge_geometry, menu_config_dialog_geometry) (menu_config_coord_geometry, struct menu_config, MenuConfig) (MenuConfigHash, menu_config_set_four_elements) (menu_config_set_window_geometry, menu_config_set_bgcolor) (menu_config_set_ext_driver, menu_config_set_prn_driver) (menu_config_set_script, set_menu_config_mxlocal): added. (addmenu): initialize "MenuConfigHash". (mgtkloadconfig, mgtkwindowconfig): use "FileConfigHash". 2008-11-26 Ito Hiroyuki * src/ofile.c add global valiable "FileConfigHash". (enum file_config_type, struct file_config, FileConfig): added. (f2dloadconfig): use "FileConfigHash". (addfile): initialize "FileConfigHash". * src/gtk/ox11menu.h (struct mxlocal): remove unused member "fontalias". * src/gtk/x11dialg.c (SetObjFieldFromFontList): free "fontalias". * src/gtk/main.c (get_obj_font_list): use "Gra2cairoConf->font_num". * src/gtk/ogra2cairo.c (free_font_map): added. (create_font_map): added. (loadconfig): use "create_font_map()" (init_conf): initialize "Gra2cairoConf->font_num". (free_fonts_sub): added. (free_conf): use "nhash_each" and "nhash_free" to free font maps. (loadfont): remove second argument and return "struct fontmap *". (loadfont): remove codes related with " Gra2cairoConf->font". (draw_str): change 4th argument. (gra2cairo_output): use "local->loadfont". * src/gtk/ogra2cairo.h: remove definition of "struct fontlocal". (struct fontmap): add member "PangoFontDescription *font". (struct fontmap): add member "struct fontmap *prev". (struct gra2cairo_local): remove member "loadfontf" and add member "loadfont". 2008-11-25 Ito Hiroyuki * src/orect.c (rect): use "oputcolor()" to set value to fields "R2", "G2" and "B2". * src/omark.c (mark): use "oputcolor()" to set value to fields "R2", "G2" and "B2". * src/ofile.c (file2d): use "oputcolor()" to set value to fields "R2", "G2" and "B2". * src/odraw.c (draw): use "oputcolor()" to set value to fields "R", "G" and "B". * src/oroot.h: add prototype of "oputcolor()". * src/oroot.c (oputcolor): added. * src/gtk/x11dialg.c (SetFontListFromObj): use "Gra2cairoConf->fontmap_list_root" instead of "Gra2cairoConf->fontmaproot". (SetFontListFromObj): bug fix: check if "font" is NULL or not. (SetFontListFromObj): default value of "selfont" is now 0. (SetObjFieldFromFontList): use hash to search font alias. (_set_color): check value of "R", "G" and "B". * src/gtk/ogra2cairo.h (struct gra2cairo_config): add member "fontmap_list_root". * src/gtk/ogra2cairo.c: add global valiable "FontFace". (loadconfig): save font configuration to hash. (init_conf): init "FontFace" and "Gra2cairoConf->fontmaproot". (free_conf): use "nhash_free_with_memfree_ptr()" to free fontmap. (loadfont, gra2cairo_charheight): use hash to search font alias settings. * src/gtk/main.c (get_obj_font_list): use "Gra2cairoConf->fontmap_list_root" instead of "Gra2cairoConf->fontmaproot". * src/nhash.h: add prototype of "nhash_num()". * src/nhash.c (count_hash, nhash_num): added. 2008-11-21 Ito Hiroyuki * src/gra.c (GRAcharascent, GRAchardescent, GRAcharwidth): return calculated value when return value of "__exeobj()" is not zero. 2008-11-18 Ito Hiroyuki * initfile/.Ngraph: use new gra to create image file. * driver/ngp2.in: added. * driver/Makefile.am (ngp2): added. (bin_SCRIPTS): added. 2008-11-17 Ito Hiroyuki * src/ogra.c (oGRAopen): put error message when the return value of "GRAinit()" is false. * src/gra.c (GRAinit): don't return "ERROPEN" when "GRAClist[GC]output == -1". 2008-11-16 Ito Hiroyuki * src/nhash.c (create_hash_with_hkey): fix condition (from "lr == -1" to "lr < 0"). * src/gtk/main.c (main): check return value of "newobj()" and "chkobjinst()". 2008-11-12 Ito Hiroyuki * src/gtk/x11graph.c (CmGraphShell): create new instance when there are no instances of "shell" object. * src/shell.h (struct nshell): add member "deleted". * src/shell.c (cmdexecute): exit loop when "nshell->deleted" is true. (newshell): initialize "nshell->deleted". * src/oshell.c (cmddone): if "shlocal->lock" is true, set "shlocal->nshell->deleted" as 1. (cmdshell): exit roop when "nshell->deleted" is true. (cmdshell): call "delshell()" when "nshell->deleted" is true. * src/nhash.c (nhash_del_with_hkey, nhash_del): check "h". 2008-11-10 Ito Hiroyuki * src/gtk/x11file.c (FileDialogType): set sensitivity of parent widgets. * src/gtk/x11opt.c (use_external_toggled): set sensitivity of parent widgets. * src/gtk/x11graph.c (pagelist): fix label string of "Legal L". (PageDialogPage): set sensitivity of parent widgets. 2008-11-07 Ito Hiroyuki * src/gtk/x11menu.c (get_home): added. (createmenu): load accel map when "KEYMAP_FILE" is exist in "NGRAPH_HOME". * src/object.h (struct objlist): add member "fieldnum". * src/object.c (addobject): initialize "objnew->fieldnum". (chkobjfieldnum): return "obj->fieldnum" when value of "obj->fieldnum" is valid. 2008-11-06 Ito Hiroyuki * src/shell.c (saveval): bug fix: "valcur->next" is NULL when "name" is found in nshell->valroot. * src/gtk/x11print.c (DriverDialogClose): change buffer size of a message. * src/shellcm.c (printexp): added. (cmexport, cmset): use hash when "USE_HASH" is true. * src/shell.c (create_vallist, free_vallist): added. (addval, saveval, restoreval, addexp, delval, getval, getexp) (newfunc, addfunc, getfunc, cmdexec, newshell, delshell): use hash when "USE_HASH" is true. * src/object.c (ARGBUFNUM): change value from 10 to 32. * src/nhash.c (free_hash_list): add argument "free_ptr". (free_hash_list): call memfree() when "free_ptr" is true. (nhash_free): add second argument. (nhash_free_with_memfree_ptr, create_hash_with_hkey) (nhash_set_int_with_hkey, nhash_set_ptr_with_hkey) (nhash_get_with_hkey, nhash_get_int_with_hkey) (nhash_del_with_hkey, nhash_get_ptr_with_hkey): added. 2008-10-23 Ito Hiroyuki * src/ofile.c: add macro "check_infinite()". (getdataarray, f2dsettings): use "check_infinite()". 2008-10-22 Ito Hiroyuki * src/ofile.c (f2dinit): initialize "line_join" as "bevel". 2008-10-20 Ito Hiroyuki * src/gtk/main.c (main): call 'init_cmd_tbl()'. * src/shellcm.c (cmtype): use 'check_cpcmd()' and 'check_cmd()'. * src/shell.c (init_cmd_tbl, check_cmd, check_cpcmd): added. (checkcmd): use 'check_cpcmd()'. (cmdexec): use 'check_cmd()'. 2008-10-17 Ito Hiroyuki * src/shell.c (cmdtable): add setting for 'seq'. * src/shellcm.c (cmseq): added. 2008-10-10 Ito Hiroyuki * src/gtk/x11graph.c (set_objlist_btn_state) (set_drawlist_btn_state): added. (SwitchDialogAdd, SwitchDialogInsert, SwitchDialogRemove): call set_drawlist_btn_state() after call SwitchDialogSetupItem(). (SwitchDialogSetup): set_drawlist_btn_state() and set_objlist_btn_state() after call SwitchDialogSetupItem(). (drawlist_sel_cb, objlist_sel_cb): added. * src/gtk/x11dialg.h (struct SwitchDialog): add member "top", "up", "down", "bottom", "del", "ins", "add" and "btn_lock". 2008-10-08 Ito Hiroyuki * src/gtk/x11graph.c (SwitchDialogDown, SwitchDialogUp): added. (SwitchDialogSetup): add 'GO UP' and 'GO DOWN' button. (SwitchDialogLast): select last item after move object. (SwitchDialogTop): select first item after move object. * src/gtk/x11view.c (ViewDelete): set mouse cursor to GDK_LEFT_PTR after delete objects. * src/otext.c (textprintf): add 'G' to the conversion specifier. (textprintf): check format string. * src/gra.c (GRAexpandpf): add 'G' to the conversion specifier. (GRAexpandpf): check format string. 2008-10-07 Ito Hiroyuki * src/gtk/x11scrip.c (CmScriptExec): call gdk_window_invalidate_rect() after execute script. 2008-10-06 Ito Hiroyuki * src/gtk/x11file.c (FileMaskDialogClose): don't check if the line number is already contained in mask. * call arrayuniq_int() after call arrayuniq_int(). * src/object.c (arrayndel): use memmove() instead of memcpy(). (arrayuniq_int): add * src/gtk/x11view.c (Evaluate): call file::modified when add mask points. * src/ofile.c (opendata): initialize fp->num. (closedata): add argument "f2dlocal". (closedata): set fp->datanum to f2dlocal->num. (f2ddone, getminmaxdata, f2ddraw, f2devaluate, f2dopendata) (f2dgetdata, f2dclosedata, f2dopendataraw, f2dgetdataraw) (f2dclosedataraw, f2dstat, f2dstat2, f2dboundings) (f2doutputfile): add argument to closedata(). (get_mtime): added. (f2dstat): use get_mtime() to check mtime. (fitout): remove closedata(). 2008-10-03 Ito Hiroyuki * src/ofile.c (update_mask): added. (file2d): use update_mask() for "mask" field. (getdataraw, getdata2, getdata_sub2): use bsearch_int() to check mask. * src/gtk/x11view.c (Evaluate): add masked line as sorted. * src/object.c (cmp_func_int, arraysort_int): added. * src/mathfn.c (bsearch_int): added. 2008-09-25 Ito Hiroyuki * src/gtk/x11view.c (ViewerEvKeyDown): add case "GDK_Page_Up" and "GDK_Page_Down". (ViewerEvKeyDown): in case of GDK_Down, GDK_Up, GDK_Left and GDK_Right, scroll screen if no objects are focused. 2008-09-24 Ito Hiroyuki * src/ofile.c (getdata_sub2, getdata_skip_step): added. (getdata_sub1): use getdata_sub2(). (struct f2ddata): use enum instead of int for 'type'. 2008-09-23 Ito Hiroyuki * initfile/.Ngraph (check_set): added. * initfile/.Ngraph: use check_set to initialize file object. 2008-09-22 Ito Hiroyuki * src/ofile.c (struct f2ddata): add member 'mtime' and 'interrupt'. (opendata): set mtime to 'fp->mtime'. (check_mtime): added. (getminmaxdata): call check_mtime() and hskipdata(). (f2ddraw, f2devaluate, f2dopendata, f2dstat, f2dstat2) (f2dboundings, f2doutputfile): remove check_mtime() placed before getminmaxdata(). (f2dstat): check if 'f2dlocal->mtime == fp->mtime'. 2008-09-19 Ito Hiroyuki * src/gtk/x11file.c (FileMoveDialogAdd, FileMoveDialogRemove) (FileMoveDialogCopy): set 'd->changed' as 'TRUE'. (FileMoveDialogClose, FileMaskDialogClose): do nothing when 'd->changed' is 'FALSE'. (FileMaskDialog, FileMoveDialog): initialize 'data->changed'. * src/gtk/gtk_widget.h (enum SPIN_BUTTON_TYPE): add 'SPIN_BUTTON_TYPE_NATURAL'. * src/gtk/gtk_widget.c (create_spin_entry_type): add case 'SPIN_BUTTON_TYPE_NATURAL' * src/gtk/x11dialg.h (struct FileMoveDialog) (struct FileMaskDialog): add member 'changed'. * src/gtk/x11view.c (ViewerWinFileUpdate, ViewUpdate): set 'NgraphApp.Changed' as 'TRUE' only when return value is 'IDDELETE'. * src/gtk/x11merge.c (CmMergeClose): set 'NgraphApp.Changed' as 'TRUE' only when return value is 'IDDELETE'. * src/gtk/x11lgnd.c (legend_dialog_close): check if the value is really changed. (CmLineUpdate, CmCurveUpdate, CmPolyUpdate, CmRectUpdate) (CmArcUpdate, CmMarkUpdate, CmTextUpdate, LegendWinLegendUpdate): set 'NgraphApp.Changed' as 'TRUE' only when return value is 'IDDELETE'. * src/gtk/x11file.c (MathDialogList): remove AddMathList(). (MathDialogList): check if the math text is really changed. (FitDialogApply): do not set 'TRUE' to 'NgraphApp.Changed'. (FileLoadDialogClose): check if the ifs text is really changed. (FileDialogCloseCommon): call SetObjAxisFieldFromWidget(). (FileDefDialogClose): remove duplicate settings. * src/gtk/x11axis.c (CmAxisUpdate, CmAxisGridUpdate): do not set 'TRUE' to 'NgraphApp.Changed' when the return value is not IDOK. * src/gtk/x11file.c (FileDialogCloseCommon): use SetObjAxisFieldFromWidget(). * src/gtk/x11axis.c (GridDialogClose, AxisPosDialogClose) (AxisDialogClose): use SetObjAxisFieldFromWidget(). * src/gtk/x11dialg.c (SetObjPointsFromText, SetObjFieldFromText) (SetObjFieldFromSpin, SetObjFieldFromToggle) (SetObjFieldFromStyle, SetObjFieldFromList) (SetObjFieldFromFontList, _putobj_color): check if the value is really changed. (SetObjAxisFieldFromWidget): add * src/gtk/gtk_subwin.c (update): do not set 'TRUE' to 'NgraphApp.Changed'. * src/ofile.c (struct f2dlocal): add member "sumx, sumy, sumxx, sumyy, sumxy, minx, maxx, miny, maxy, num and mtime". (f2dfile, f2dput): set 'f2dlocal->mtime' as 0. (update_field, foputabs, foputge1): added. (getminmaxdata): add argument 'local'. (f2ddraw, f2devaluate, f2dopendata, f2dstat, f2dstat2) (f2dboundings, f2doutputfile): add argument to getminmaxdata(). 2008-09-18 Ito Hiroyuki * src/ofile.c (opendata): check mtime of the file. (file2d): add field "mtime". * src/gtk/x11commn.c (FileAutoScale): return when fail to allocate memory. * src/ofile.c (f2dbounding): return 1 when error is occurred. * src/oaxis.c (axisautoscalefile): check the return value of getobj(). (axisautoscale): return 1 when the return value of axisautoscalefile() is not 0. * src/gtk/x11print.c (CmPrintDataFile): check the return value of exeobj(). * src/gtk/ogra2gtkprint.c (create_cairo): show error message when error is occurred. * src/ofile.c (f2doutputfile): show error message when error is occurred. * src/gtk/x11menu.c (PutStdout, PutStderr): convert string from locale to UTF-8. 2008-09-17 Ito Hiroyuki * src/gtk/x11print.c (draw_gra): check the return value of exeobj(). * src/gtk/x11gui.c (fsok): set NULL to data->ext when filer name is "All". (fsok): call error22() after call gdk_beep(). * src/gtk/ogra2cairofile.c (create_cairo): add argument 'err' and set cairo_status to err. (gra2cairofile_output): call error2() when some error is occurred in the case of 'I' and 'E'. (addgra2cairofile): add error messages. * src/gtk/ogra2cairo.c (check_cairo_status): added. (gra2cairo_flush): call check_cairo_status(). (gra2cairo_output): call check_cairo_status() in the case of 'I' and 'E'. (addgra2cairo): add error messages. * src/ogra.c (oGRAopen): check the return value of GRAinit(). * src/gra.c (GRAreopen, GRAdraw, GRAinit, GRAend): return int. * src/ogra.h (ERROPEN): added. 2008-09-16 Ito Hiroyuki * src/object.c (add_obj_to_hash): added. (addobject): set object name and table position to hash. (chkobject): use hash to search object. (chkobjtblpos): use hash to search table position. (chkobjoffset, chkobjfield): use chkobjtblpos(). * src/object.h (struct objlist): add member 'table_hash'. * src/nhash.h: added. * src/nhash.c: added. 2008-09-12 Ito Hiroyuki * src/gtk/x11opt.c (DefaultDialogClose, ExViewerDialogSetupItem) (ExViewerDialogSetup): add settings for 'use_external'. (use_external_toggled): added. * src/gtk/ox11menu.h (struct menulocal): add member "exwin_use_external". * src/gtk/x11dialg.h (struct ExViewerDialog): add member "use_external". * src/gtk/x11print.c (draw_gra): use 'exeobj()' to call "open" member function. (CmOutputViewer): add argument 'select_file'. (CmOutputViewer): use "menu::print" instead of "gra2gtk". (CmOutputMenu, CmOutputViewerB): add argument to call CmOutputViewer(). (CmOutputPrinterB): now second argument of CmOutputPrinter() is 'FALSE'. * src/shellcm.c (cmset): use memmove(). (cmobject): fix typo ("filed" to "field"). * src/object.c (arrayndel2): use memmove(). 2008-09-11 Ito Hiroyuki * src/gtk/x11print.c (CmOutputPrinter): add argument 'int show_dialog'. (CmOutputPrinter): check 'show_dialog' when call gtk_print_operation_run(). (CmOutputPrinterB): add argument when call CmOutputPrinter(). (init_graobj): added. (CmOutputPrinter, CmOutputDriver, CmOutputViewer) (CmPrintGRAFile, CmOutputImage): use init_graobj(). (draw_gra): added. (draw_page, CmOutputDriver, CmPrintGRAFile, CmOutputImage): use draw_gra(). * src/gtk/x11menu.c (SetPoint, SetZoom, ResetZoom, SetStatusBar) (SetStatusBarXm, ResetStatusBar): check 'NgraphApp.Message' is NULL or not. (SetCursor): check 'NgraphApp.Cursor' is NULL or not. * src/gtk/x11graph.c (CmGraphMenu): add argument when call CmOutputPrinter(). * src/gtk/ox11menu.c (mx_print): added. (gtkmenu): add member "print". * src/gtk/ogra2gtkprint.c (gra2gtkprint): remove member "next". * src/gtk/ogra2cairo.c (gra2cairo): remove member "next". * initfile/.Ngraph: add -p option. 2008-09-10 Ito Hiroyuki * src/gtk/x11print.c (CmPrintGRAFile): set base-name of ngp file as default GRA filename. (get_base_ngp_name): added. (CmPrintGRAFile, CmOutputImage): use get_base_ngp_name(). * src/gtk/ogra2cairo.c (draw_str, gra2cairo_charheight) (gra2cairo_charwidth): check font size. * src/gtk/x11view.c (new_merge_obj, new_file_obj): added. (data_dropped): add argument 'file_type'. use new_file_obj() and new_merge_obj(). * src/gtk/x11view.h: add prototype of data_dropped(). * src/gtk/x11merge.c: include "x11view.h" (drag_drop_cb, init_dnd): added. (CmMergeWindow): call init_dnd(). * src/gtk/x11file.c (drag_drop_cb, init_dnd): added. (CmFileWindow): call init_dnd(). * src/gtk/x11menu.c (createcommand2): set signal handler for "button-press-event". * src/gtk/x11view.h: add prototype of CmViewerButtonPressed(). * src/gtk/x11view.c: add 'KeepMouseMode'. (ViewerEvLButtonDblClk): call gtk_toggle_tool_button_set_active() when 'KeepMouseMode == FALSE'. (CmViewerButtonPressed): added. 2008-09-08 Ito Hiroyuki * src/gtk/x11view.c (Focus): remove 'gtk_toggle_tool_button_set_active()'. (check_focused_obj): now return index of found item. (ShowPoints): draw arc when 'd->Mode == ArcB'. (calc_snap_angle, calc_integer_ratio, SQRT3): added. (ViewerEvMouseMove): call calc_snap_angle() or calc_integer_ratio(). * src/gtk/gtk_subwin.c (ev_key_down_tree): add 'break;' in the case of 'GDK_space'. (ev_key_down_tree): return 'FALSE' when shift key is pressed in the case of 'GDK_Return'. 2008-09-05 Ito Hiroyuki * src/gtk/x11view.c (mouse_up_point): don't change cursor. (get_mouse_cursor_type): added. (set_mouse_cursor_hover): use get_mouse_cursor_type(). * src/gtk/x11menu.c (Command2_data): remove MoveB. 2008-09-04 Ito Hiroyuki * src/gtk/x11file.c (POPUP_ITEM_FIT): added. (popup_show_cb): check if the object associate with fit. * src/gtk/x11view.c (ViewerWinFileUpdate): call ProgressDialogCreate() before evaluate. (range_increment): added. (scrollbar_scroll_cb, ViewerEvScroll): use range_increment(). (ViewerEvMouseMove): scroll when mouse position is out of the widget. (AlignFocusedObj): align to the paper when number of focused object is 1. (do_popup): set sensitivity of d->popup_item[3] as TRUE when 'num > 0'. 2008-09-01 Ito Hiroyuki * src/gtk/gtk_subwin.c (start_editing): use snprintf() when 'list->type == G_TYPE_STRING' and 'chkobjfieldtype(d->obj, list->name) == NDOUBLE' to set value. (modify_string): check if the value is really modified. 2008-08-29 Ito Hiroyuki * src/gtk/gtk_subwin.c (ev_button_down, ev_button_down_tree): check 'event->time' to treat double click as double click. 2008-08-28 Ito Hiroyuki * src/gtk/x11lgnd.c (legend_dialog_close): bug fix: call SetObjPointsFromText(). 2008-08-27 Ito Hiroyuki * src/gtk/x11lgnd.c (legend_dialog_close): bug fix: call SetObjFieldFromStyle(). * src/gtk/x11opt.c (CmOptionViewer): uncomment 'ChangeDPI(TRUE);'. * src/gtk/x11dialg.h (struct MiscDialog): add 'data_head_lines'. * src/gtk/ox11menu.h (struct mxlocal): add 'data_head_lines'. * src/gtk/x11file.c (FileDialogSetup): use Mxlocal->data_head_lines. * src/gtk/ox11menu.c (mgtkloadconfig, menuinit): add settings for 'Mxlocal->data_head_lines'. (mx_data_head_lines): added. (gtkmenu): add 'data_head_lines'. * src/gtk/x11opt.c (DefaultDialogClose, MiscDialogSetupItem) (MiscDialogSetup, MiscDialogClose): add settings for 'Mxlocal->data_head_lines'. 2008-08-26 Ito Hiroyuki * src/ofile.c (f2dhead): check the return value of nstrnew() is NULL or not. * src/gtk/x11gui.c (dialog_key_down_cb): return FALSE when 'w' key is pressed without control key. * src/gtk/gtk_subwin.c (ev_sub_win_key_down): return FALSE when 'w' key is pressed without control key. * src/gtk/ogra2x11.c (ev_key_down): return FALSE when 'w' key is pressed without control key. * src/ofile.c (f2dhead): add line number. * src/ioutil.c (fgetnline): use fgetline(). 2008-08-25 Ito Hiroyuki * src/ofile.c (f2dhead): change length of 'buf' from 128 to 256. (f2dhead): use 'sizeof()' instead of immediate. * src/gtk/x11file.c (FileDialogSetup): change value of 'line' from 10 to 20. 2008-08-22 Ito Hiroyuki * src/ofile.c (struct f2ddata): add ifs_buf. (check_ifs_init, CHECK_IFS, CHECK_REMARK): added. (opendata): call check_ifs_init(). (getdataarray, getdata_sub1, getdata2, getdataraw): use CHECK_REMARK and CHECK_IFS instead of strchr(). * src/ioutil.c: added. (char_type_buf_init): added. (fgetline): use is_line_sep() when EOF == -1. * src/gtk/x11file.c (FileMoveDialogAdd): check if x and y are NaN or INF. * src/gtk/x11dialg.c (SetObjPointsFromText): check if d is NaN or INF. * src/gtk/gtk_subwin.c (numeric_cb): check if val is NaN or INF. * src/ofile.c (f2dsettings): check if f1, a2 and f3 are NaN or INF. 2008-08-21 Ito Hiroyuki * src/ofile.c (struct f2ddata_buf): added. (struct f2ddata, opendata, closedata, getdata_sub1, getdata): use 'struct f2ddata_buf'. * src/gra.c (GRAboundingbox): consider line width in the case 'R'. * src/ofile.c (reopendata): set fp->prev_datanum. (getdataraw): call set_data_progress(). (getdataraw): increment fp->datanum in loop. * src/ioutil.c (fgetline): bug fix: increment 'i' only after nstraddchar(). (fgetline) now '\r' is treated as line break. 2008-08-20 Ito Hiroyuki * src/ofile.c (getdataarray): bug fix: check if val is NaN or INF. * src/ioutil.c (fgetline): use switch instead of if. * src/ofile.c (getdata_sub1): added. (getdata): use getdata_sub1(). (getdata): use memmove() instead of loop. * src/axis.c (getaxispositionfirst): use alocal->inc instead of alocal->dposm to determine alocal->dposs. 2008-08-19 Ito Hiroyuki * src/gra.c (GRAboundingbox): now ch is int. (GRAboundingbox): first argument of Gracharwidth is '(ch & 0xff)'. 2008-08-18 Ito Hiroyuki * src/gtk/x11file.c (select_type): set selected item to d->select. * src/gtk/x11menu.c (add_underscore): added. (show_graphmwnu_cb, show_filemwnu_cb): call add_underscore(). 2008-08-15 Ito Hiroyuki * src/gtk/x11menu.c: added. (create_graphmenu, create_axismenu): add accelerator. (create_toggle_menu_item): added. (create_windowmenu): use create_toggle_menu_item(). * src/gtk/x11menu.h: added. * src/gtk/gtk_subwin.c (sub_window_create): add accel group to sub window. * src/gtk/x11view.c (AddList): bug fix: call GRAdellist() when inst2 == NULL. 2008-08-14 Ito Hiroyuki * src/gtk/x11opt.c (DefaultDialogClose): check NgraphApp.FileWin.Win->window etc. 2008-08-11 Ito Hiroyuki * src/gtk/x11menu.c (MARK_PIX_SIZE): change mark size from 28 to 24. * src/gtk/x11file.c (create_type_combo_box): added. (select_type, start_editing_type): modified for tree model. * src/gtk/gtk_liststore.c (start_editing_obj): use GtkTreeModel for combo_box. 2008-08-08 Ito Hiroyuki * src/gtk/gtk_liststore.c (start_editing_obj): added. (create_column): set some properties to GtkCellRenderer. set start_editing virtual function. * src/gtk/gtk_subwin.c (set_obj_cell_renderer_cb): added. * src/gtk/x11file.c (select_type, start_editing_type): added. (CmFileWindow): call set_obj_cell_renderer_cb. 2008-08-06 Ito Hiroyuki * initfile/.Ngraph: add save_image(). add -png, -ps, -eps, -pdf and -svg option. * src/gtk/main.c (inputynconsole): add message ' [yn] '. use strchr() to check input character. read while '\n' appear. 2008-08-05 Ito Hiroyuki * src/gtk/ox11menu.h (struct menulocal): add member 'expandtofullpath' * src/gtk/ox11menu.c (mgtkloadconfig): add condition for 'expand_to_fullpath' (menuinit): initialize Menulocal.expandtofullpath. * src/gtk/x11commn.c (ToFullPath): added. (LoadNgpFile): call ToFullPath() when 'Menulocal.expandtofullpath && (!ignorepath)' * src/ioutil.c (getfullpath): argument of changefilename() is 'name'. * src/object.c (memrealloc): add sleep(). * src/shellux.c (cmtest): add condition '(strcmp2(argv[i+1],"=")!=0) && (strcmp2(argv[i+1],"!=")!=0)' * src/jnstring.h: added. * src/jnstring.c: added. * src/ngraph.h (ALIGNSIZE): added. 2008-07-24 Ito Hiroyuki * src/gtk/x11file.c (get_axis_obj_str): added. (file_list_set_val): use get_axis_obj_str(). (start_editing): check axis object. 2008-07-23 Ito Hiroyuki * src/gtk/x11file.c (select_axis, select_axis_x, select_axis_y): added. (start_editing): use "changed" signal. * src/gtk/x11axis.c (select_type): added. (start_editing): use "changed" signal. 2008-07-22 Ito Hiroyuki * src/gtk/x11file.c (edited_y, edited_x, edited_axis) (start_editing): added. (CmFileWindow): call set_combo_cell_renderer_cb(). * src/gtk/x11axis.c (start_editing, edited): added. (CmAxisWindow): call set_combo_cell_renderer_cb(). * src/gtk/gtk_subwin.c (set_combo_cell_renderer_cb): added. * src/gtk/gtk_liststore.c (create_column): add case G_TYPE_ENUM. (create_tree_view): column type of G_TYPE_ENUM is string. * src/gtk/x11menu.c: add global variables RecentGraph and RecentData. (create_recent_graph_menu, create_recent_data_menu): added. (create_graphmenu): call create_recent_graph_menu. (create_filemenu): call create_recent_data_menu. * src/gtk/gtk_subwin.c (modify_numeric, modify_string): check the value is modified or not. (ev_button_down, ev_button_down_tree): return FALSE when locked. 2008-07-18 Ito Hiroyuki * src/gtk/x11dialg.c (search_id): added. (SelectDialogSetup, SelectDialogSetup): add id column. check id column insteadof index. * src/gtk/x11lgnd.c (LegendLineCB, LegendRectCB, LegendArcCB) (LegendTextCB): remove id. * src/gtk/x11file.c (FitCB): remove id. * src/gtk/x11commn.c (FileCB): remove id. * src/gtk/x11axis.c (AxisDialogFile): always get scale type. (AxisDialogSetup): bug fix: widget type of Scale setting is GtkComboBox. (AxisCB, GridCB): remove id. * src/gtk/x11file.c (MathDialogSetup, MathDialogList): now math dialog can be sorted. * src/gtk/gtk_liststore.c (list_store_path_get_int): added. * src/gtk/x11file.c (FileMoveDialogSetup, FileMaskDialogSetup): now lists of masked and moved data are sorted by line number. * src/gtk/gtk_liststore.c (list_store_set_sort_column) (list_store_set_sort_all): added. 2008-07-17 Ito Hiroyuki * src/gtk/ogra2cairo.c (gra2cairo_output): in the case 'V' call cairo_reset_clip() before clip rectangle and restore clip region when local->region is not NULL. * src/shell.c (checkcmd): bug fix: initialize prmcur->prmno as NULL when prmcur->str[1] == ';'. (checkcmd): fix indent. * src/gtk/ogra2x11.c (gtkinit): free gra2cairo_local when failed. * src/gtk/ogra2gdk.c (g2g_init): free gra2cairo_local when failed. * src/gtk/ox11menu.c (menuinit): free gra2cairo_local when failed. * src/gtk/ogra2cairo.c (gra2cairo_free): added. (gra2cairo_init): call free_conf() only when Instance == 0. * src/gtk/ogra2cairofile.c (gra2cairofile_init): free gra2cairo_local when failed. 2008-07-16 Ito Hiroyuki * src/gtk/gtk_subwin.c (start_editing, cancel_editing) (numeric_cb, string_cb): added. (set_cell_renderer_cb): set callback functions when type is G_TYPE_DOUBLE, G_TYPE_INT or G_TYPE_STRING. (modify_numeric, modify_string): added. * src/gtk/gtk_liststore.h (_list_store): add min, max, inc and page. * src/gtk/gtk_liststore.c (create_column): set "editable", "adjustment", "digits" and "user-data" properties to renderer when editable is TRUE. * src/ofile.c (closedata): call set_data_progress(); * src/gtk/x11dialg.c (SetObjFieldFromWidget) (SetWidgetFromObjField): added. 2008-07-15 Ito Hiroyuki * src/gtk/x11dialg.c (SetTextFromObjPoints) (SetObjPointsFromText): added. (SetObjFieldFromStyle): call SetObjPointsFromText() to set value. (SetStyleFromObjField): call SetTextFromObjPoints() to set value. * src/gtk/x11axis.c (Alist): type of 'x', 'y', 'dir' and 'len' are G_TYPE_DOUBLE. (axis_list_set_val): now position and length are shown in mm. direction is shown in degree. * src/gtk/x11file.c (Flist): type of 'size' and 'width' are G_TYPE_DOUBLE. (file_list_set_val): now size and width are shown in mm. * src/gtk/x11merge.c (Mlist): type of 'tm', 'lm' and 'zm' are G_TYPE_DOUBLE. (merge_list_set_val): now margin and zoom are shown in mm and percent respectively. * src/gtk/x11cood.c (CoordWinSetCoord): now position is shown in mm. * src/gtk/x11menu.c (SetPoint): now position is shown in mm. * src/gtk/x11lgnd.c (Llist): type of 'x' and 'y' are G_TYPE_DOUBLE. (LegendLineCB, LegendRectCB, LegendArcCB): now position is shown in mm. (legend_dialog_setup_item): use SetTextFromObjPoints() for "points" property. (legend_dialog_close): use SetObjPointsFromText() for "points" property. (legend_list_set_val): now position and size are shown in mm. * src/gtk/gtk_liststore.c (tree_store_set_double) (list_store_set_double): set formated string. (create_tree_view): set G_TYPE_STRING when type is G_TYPE_DOUBLE. 2008-07-14 Ito Hiroyuki * src/ofile.c (curveoutfile): remove condition "getposition2(fp, fp->axtype, fp->aytype, &(fp->dx), &(fp->dy)) == 0" (opendata): bug fix: initialize some variables when "axis" is FALSE. * src/gtk/x11gui.c (fsok): bug fix: : add braces as "(n + 1)" in argument of malloc. * src/orect.c (rectzoom): check if x1 and y1 are equal to x2 and y2 respectively. * src/oaxis.c (axisput): use TEXT_SIZE_MIN macro. * src/oarc.c (arczoom): check value of rx and ry. * src/otext.c (textgeometry): use macro; TEXT_OBJ_SCRIPT_SIZE_MIN, TEXT_OBJ_SCRIPT_SIZE_MAX and TEXT_SIZE_MIN. * src/gtk/x11print.c (OutputDataDialogSetupItem) (OutputDataDialogClose): use GtkSpinButton. * src/gtk/x11opt.c (MiscDialogSetupItem, MiscDialogSetup) (MiscDialogClose, ExViewerDialogSetupItem, ExViewerDialogSetup) (ExViewerDialogClose, ViewerDialogSetupItem, ViewerDialogSetup) (ViewerDialogClose): use GtkSpinButton. * src/gtk/x11merge.c (MergeDialogSetup): use GtkSpinButton. * src/gtk/x11lgndx.c (LegendGaussDialogSetup): use GtkSpinButton. * src/gtk/x11lgnd.c (legend_dialog_setup_item) (legend_dialog_close, width_setup, miter_setup) (LegendRectDialogSetup, LegendArcDialogSetup) (LegendMarkDialogSetup, legend_dialog_setup_sub) (LegendTextDialogSetup): use GtkSpinButton. * src/gtk/x11graph.c (PageDialogSetupItem, PageDialogPage) (PageDialogSetup, PageDialogClose): use GtkSpinButton. * src/gtk/x11file.c (FitDialogSetup, FileMaskDialogAdd) (FileLoadDialogSetup, FileMathDialogSetup) (FileDialogSetupCommon): use GtkSpinButton. * src/gtk/x11dialg.c (SetObjFieldFromSpin, SetSpinFromObjField): use GtkSpinButton. * src/gtk/x11axis.c (gauge_syle_setup, SectionDialogSetupItem) (SectionDialogSetup, SectionDialogClose, CrossDialogSetupItem) (CrossDialogSetup, CrossDialogClose, ZoomDialogSetup) (ZoomDialogClose, AxisBaseDialogSetup, AxisPosDialogSetup) (NumDialogSetup, AxisFontDialogSetup, AxisDialogSetup): use GtkSpinButton. * src/gtk/gtk_widget.c: added. 2008-07-11 Ito Hiroyuki * src/gtk/gtk_liststore.c (create_column): set "mode" attribute as GTK_CELL_RENDERER_MODE_ACTIVATABLE when the column is editable. * src/gtk/gtk_subwin.c (set_cell_renderer_cb, toggle_cb): added. (list_sub_window_create, tree_sub_window_create): call set_cell_renderer_cb(). 2008-07-05 Ito Hiroyuki * src/gtk/x11file.c (FileMoveDialogSetup, FileMaskDialogSetup): add copy button. (FileMaskDialogClose, FileMoveDialogClose): add case for IDCOPY. (FileMoveDialogCopy, FileMaskDialogCopy): added. 2008-07-04 Ito Hiroyuki * src/gtk/x11menu.c (SetCaption): free 'buf'. * src/ogra.c (set_progress_val): initialize progress bar when 'i == 0'. * src/gtk/ogra2cairo.c (gra2cairo_done): free 'local->fontalias'. * src/gtk/x11file.c (file_list_set_val, FileDialogSetupItem): free 'valstr'. * src/gtk/ogra2cairo.c (free_conf): free fontmap. * src/gtk/gtk_entry_completion.c (add_completion): free 'buf'. * src/gtk/ogra2gtkprint.c (create_cairo): remove cairo_destroy(). (gra2gtkprint_done): set NULL to local->cairo. * src/gtk/x11graph.c (PageDialogPage): width and height entry is sensitive only when paper type is custom. * src/gtk/ox11menu.h (struct menulocal): add PaperLandscape, PaperId and PaperName. (enum paper_id): added. * src/gtk/x11graph.c (PageDialogClose): check paper size. (set_paper_type): added. (struct pagelisttype, pagelist): add name, landscape and id; * src/gtk/x11commn.c (CheckPage): bug fix: remove redundant return. 2008-07-03 Ito Hiroyuki * src/gtk/x11graph.c (CmGraphMenu): call CmOutputPrinter() when sel == MenuIdOutputDriver. * src/gtk/ogra2gtkprint.c: added. * src/gtk/x11print.c (CmOutputPrinter, draw_page) (struct print_obj): added. add global variable PrintSettings. * src/gtk/ogra2cairo.c (gra2cairo_output): save current point after call cairo_stroke() for graphic command 'T'. * src/ofile.c (fitout): fitout is now static. * src/ofit.c (fitpoly): bug fix: write information in 'buf' instead of 'equation'. * src/gtk/x11file.c (FitDialogSetupItem, FitDialogSave) (FitDialogApply): bug fix: poly_dimension is active item + 1. * src/gtk/x11commn.c (GetDrawFiles): added. * src/gtk/x11print.c (CmPrintDataFile): now CmPrintDataFile() can output multi data files into one file. * src/gtk/x11commn.c (SetFileHidden): add arraydel(&ifarray) when return value of DialogExecute() is not IDOK. * src/ofile.c (f2doutputfile): add append mode. (file2d): change arguments of "output_file" from "si" to "sib". 2008-07-02 Ito Hiroyuki * src/gtk/x11view.c (create_pix): add settings for antialias. (OpenGC, ReopenGC): add settings for pixel_dot_x and pixel_dot_y. * src/gtk/x11opt.c (DefaultDialogClose, ViewerDialogSetupItem) (ViewerDialogSetup, ViewerDialogClose): add settings for antialias. * src/gtk/ox11menu.c (mgtkloadconfig, menuinit): add settings for antialias. (mxdpi): add settings for pixel_dot_x and pixel_dot_y. (mxd2p, mxd2px, mxd2py, mxp2d): use pixel_dot_x and pixel_dot_y. remove gtk_output(). * src/gtk/ogra2x11.c (gtkinit): add settings for dpix and dpiy. (dot2pixel): use pixel_dot_x. * src/gtk/ogra2gdk.c (g2g_init): add settings for dpix and dpiy. * src/gtk/ogra2cairofile.c (gra2cairofile_init): add settings for dpix and dpiy * src/gtk/ogra2cairo.c (gra2cairo_antialias_type) (gra2cairo_set_antialias, set_antialias): added. (gra2cairo_output, gra2cairo_init): add antialias settings. (gra2cairo): add member "antialias", "dpix" and "dpiy". (mxp2dw, mxd2pw, mxp2dh, mxd2ph, mxd2px, mxd2py): added. (gra2cairo_init, gra2cairo_set_dpi): add settings for pixel_dot_x and pixel_dot_y. (gra2cairo_set_dpi_x, gra2cairo_set_dpi_y): added. (draw_str, gra2cairo_output): use mxp2dw(), mxd2pw(), mxp2dh(), mxd2ph(), mxd2px() and mxd2py(). * src/gtk/ogra2cairo.h (struct gra2cairo_local): add antialias, pixel_dot_x and pixel_dot_y. 2008-07-01 Ito Hiroyuki * src/gtk/x11menu.c (create_image_outputmenu): added. (create_outputmenu): add "Export image" sub menu. * src/gtk/x11menu.h (enum MenuID): add MenuId MenuIdOutputPSFile, MenuIdOutputEPSFile, MenuIdOutputPDFFile, MenuIdOutputPNGFile and MenuIdOutputSVGFile. * src/gtk/x11print.c (OutputImageDialogSetupItem) (OutputImageDialogSetup, OutputImageDialogClose) (OutputImageDialog, CmOutputImage): added. (CmOutputMenu): add case MenuIdOutputPSFile, MenuIdOutputEPSFile, MenuIdOutputPDFFile, MenuIdOutputPNGFile and MenuIdOutputSVGFile. 2008-06-30 Ito Hiroyuki * src/gtk/x11menu.c (MARK_PIX_SIZE): change mark pix size. * src/gra.c (GRAmark): fix size of triangle. * src/gtk/ox11menu.c: remove mxsaveGC() and mxrestoreGC(). * src/gtk/x11file.c (draw_type_pixbuf): use gra2gdk. * src/gtk/x11lgndx.c (LegendGaussDialogPaint): use gra2gdk. * src/gtk/x11menu.c (create_markpixmap): use gra2gdk. (find_gra2gdk_inst): added. * src/gtk/x11view.c (ViewerWinSetup): call OpenGRA() after OpenGC(). * src/gtk/Makefile.am (libngraph_la_SOURCES): add ogra2cairo.c, ogra2cairo.h, ogra2cairofile.c, ogra2x11.h, ogra2gdk.c and ogra2gdk.h 2008-06-27 Ito Hiroyuki * src/gtk/ogra2x11.c (gtkinit): gtkclose() is now called when "delete-event" signal is emitted. object 'gra2gtk' is now child of 'gra2cairo'. 2008-06-25 Ito Hiroyuki * src/gtk/ogra2cairofile.c: added. * src/gtk/ogra2cairo.c: added. 2008-06-22 Ito Hiroyuki * src/gtk/x11merge.c: remove ev_key_down(). (CmMergeWindow): remove setting for d->ev_key. * src/gtk/x11axis.c: remove ev_key_down(). (CmAxisWindow): remove setting for d->ev_key. * src/gtk/strconv.c (ascii2greece): bug fix: dlen must be "slen * 2 + 1". (str2utf8): bug fix: dlen must be "slen * 6 + 1". * src/gtk/ogra2x11.c (gtk_charwidth, gtk_charheight): save and restore fontdir, fontsin and fontcos and set fontdir as 0 before call draw_str(). * src/gtk/gtk_subwin.c (ev_key_down): add case for "GDK_SPACE" * src/gtk/gtk_liststore.c (create_tree_view): bug fix: add braces as "(n + cnum)" in argument of malloc. 2008-06-19 Ito Hiroyuki * src/gtk/x11menu.c (detach_toolbar, create_toolbar): added. (setupwindow): use create_toolbar(). * src/gtk/x11view.c (reorder_object): added. (ViewTop, ViewLast): use reorder_object(). (ViewCopyAxis): added. (ViewCopy): use ViewCopyAxis(). 2008-06-18 Ito Hiroyuki * src/gtk/x11commn.c (ProgressDialogCreate): set cursor to GDK_WATCH. (ProgressDialogFinalize): restore cursor. * src/gtk/x11menu.c (GetCursor): added. * src/gtk/x11merge.c (ev_key_down): added. * src/gtk/x11view.c (Focus): now merge object can be focused. 2008-06-17 Ito Hiroyuki * src/gtk/x11view.c (mouse_down_move_data) (mouse_down_set_points, mouse_down_zoom): added. (ViewerEvLButtonDown): use mouse_down_move_data(), mouse_down_set_points() and mouse_down_zoom(). (ViewerEvRButtonDown): use mouse_down_zoom(); (ViewerEvRButtonDown): cancel make arc, rectangle, gauss and axis when Button3 is pressed. (create_axis, create_single_axis, create_legendx) (create_legend3, create_legend2, create_legend1): added. (ViewerEvLButtonDblClk): use create_axis(), create_single_axis(), create_legendx(), create_legend3(), create_legend2() and create_legend1(). (clear_focus_obj, UnFocus): add argument "int init_cursor". 2008-06-16 Ito Hiroyuki * src/gtk/x11view.c (add_focus_obj, clear_focus_obj) (mouse_down_point, mouse_down_move, mouse_up_point) (set_mouse_cursor_hover, mouse_up_drag, mouse_up_zoom) (mouse_up_change, mouse_up_lgend1, mouse_up_lgend2): added. (Match, Focus): use add_focus_obj(); (ViewerWinUpdate, UnFocus, ViewUpdate): use clear_focus_obj(); (ViewerEvLButtonUp): use mouse_down_point(), mouse_up_drag(), mouse_up_zoom() and mouse_up_change(). * src/gtk/x11menu.c (Command2_data): add move tool button. (createcommand2): default sensitivity of the MoveButton is false. (SetMoveButtonState): added. (SetCursor): add GDK_FLEUR. * src/gtk/x11view.c (enum ViewerPopupIdn): add alignment id. (struct viewer_popup): add member 'struct viewer_popup *submenu' (create_menu): added. (create_popup_menu): add alignment submenu. use create_menu. (AlignFocusedObj): added. (do_popup): add codes for alignment submenu. (check_focused_obj): added. (Focus): add argument "int add". add codes for multiple focus. (ViewerPopupMenu): call AlignFocusedObj(). * src/gtk/x11axis.c (ev_key_down): check 'e->state & GDK_SHIFT_MASK' when e->keyval == GDK_space. * src/gtk/gtk_subwin.c (focus, tree_focus): add argument "int add". (ev_key_down_tree): check 'e->state & GDK_SHIFT_MASK' when e->keyval == GDK_space. (list_sub_window_add_focus, tree_sub_window_add_focus): added. 2008-06-13 Ito Hiroyuki * src/gtk/x11lgnd.c (legend_dialog_close) (legend_dialog_setup_item, LegendRectDialogSetup): use width and height instaed of x2 and y2 for legend rectangle. * src/gtk/x11view.c (swapint): added. (ViewerEvLButtonDblClk): x2 and y2 are always greater than x1 and y2 respectivery. 2008-06-12 Ito Hiroyuki * src/gtk/x11view.c (EvalDialogSetup): now "X" and "Y" is string. (EvalDialogSetupItem): add string converted from double. * src/gtk/x11file.c (FileMoveDialogClose): x and y is converted from string to double. (FileMoveDialogSetup): now "X" and "Y" is string. (FileMoveDialogAdd): add string converted from double. * src/omerge.c (mergeinit): initialize "line_num". * src/ogra.c (set_progress_val): added. (oGRAdraw): use set_progress_val(). (oGRAdrawparent): call set_progress_val(). * src/omerge.c (mergeredraw): check redraw_num. * src/gra.c (_GRAredraw): set "redraw_flag" as FALSE when redrawf is zero. (GRAredraw2, GRAredraw, _GRAredraw): replace redrawf to redraw_num. * src/omerge.c (merge): add "line_num" * src/oaxis.c (axisautoscalefile): display "group" property when the property is not NULL. * src/gtk/x11axis.c (axis_list_set_val): get "group" instead of "name". * src/gtk/ox11menu.c (mx_redraw): remove set_draw_lock(). * src/gtk/x11view.c (AddInvalidateRect, Match): remove set_draw_lock(). * src/gtk/x11menu.c (ChkInterrupt): do gtk_main_iteration_do() only when DrawLock == DrawLockDraw. * src/gtk/ox11menu.c (mx_output): bug fix: add 360 to Mxlocal->fontdir when Mxlocal->fontdir is negative. * configure.in: required version of GTK+ is greater than 2.12 because gtk_tool_item_set_tooltip_text() is available since 2.12. 2008-06-10 Ito Hiroyuki * src/gtk/x11commn.c (FreeConsole): restore ninterrupt. * driver/gra2wmf.c (draw, getboundingbox): bug fix: reported at http://www2e.biglobe.ne.jp/~isizaka/bbs_old/light.cgi [670]. * src/gtk/ox11menu.c (mx_get_focused): added. (gtkmenu): add "focused". * src/gtk/x11dialg.c (CopyDialogSetup, SelectDialogSetup): select item if there is only one item. * src/gtk/x11view.c (Match, AddInvalidateRect): add set_draw_lock(). * src/gtk/x11menu.c (save_hist): bug fix: remove redundant return. * src/gtk/x11opt.c (ViewerDialogSetupItem, ViewerDialogSetup) (ViewerDialogClose): add settings for "redraw_num". * src/gtk/ox11menu.c (menuinit): set "redraw_num". (mxredraw_num): added. (mx_redraw): check Mxlocal->redrawf_num. (mgtkloadconfig): get Mxlocal->redrawf_num from init file. (menuinit): initialize Mxlocal->redrawf_num. (gtkmenu): add "redraw_num" * src/odraw.c (draw): add "redraw_num". * src/gra.c (_GRAredraw): set "redraw_num". * src/ofile.c (f2dredraw): check "redraw_num". * src/gtk/x11commn.c (ProgressDialogFinalize) (ProgressDialogCreate): call set_draw_lock(). * src/gtk/x11menu.c (ChkInterrupt): check DrawLock. (set_draw_lock): added. add DrawLock. * src/gtk/ox11menu.c (mx_redraw): call set_draw_lock(). * src/gtk/x11commn.c: add ProgressBar2. * src/ogra.c (oGRAdraw): call set_progress(). * src/gtk/x11print.c (CmOutputDriver, CmOutputViewer) (CmPrintGRAFile, CmPrintDataFile): call ProgressDialogCreate() and ProgressDialogFinalize(). 2008-06-09 Ito Hiroyuki * src/ofit.c (fituser): call set_progress() instead of ndisplaystatus(). * src/ioutil.c add ShowProgressFunc, set_progress_func() and set_progress(). * src/ofile.c add set_data_progress(). (getdata): call set_data_progress(). * src/gtk/x11menu.c (Command1_data): remove do_interrupt. (application): remove snooper_id, gtk_key_snooper_remove() and gtk_key_snooper_install(). * src/gtk/x11commn.c add global variables ProgressBar and ProgressDiaog. add ProgressDialogCreate(), ProgressDialogFinalize() and ProgressDialogSetTitle(). * src/gtk/x11view.c (Draw): call ProgressDialogCreate(), ProgressDialogFinalize() and ProgressDialogSetTitle(). * src/object.c (addobject): add alignment for 64bit architecture. 2008-06-08 Ito Hiroyuki * src/gtk/x11view.c (ViewerWinFileUpdate): bug fix: reported at http://www2e.biglobe.ne.jp/~isizaka/bbs_old/light.cgi [802]-[805]. (ViewerEvLButtonDown, ViewerEvRButtonDown): use nround() when change dpi. (ViewerEvScroll): bug fix: d->VScroll to d->HScroll. 2008-06-07 Ito Hiroyuki * src/gtk/main.c (main): add g_set_application_name(). * src/gtk/x11menu.c (application): remove g_set_application_name(). * src/gtk/x11gui.c (FileSelectionDialog): call ResetEvent() after gtk_widget_destroy(). 2008-06-04 Ito Hiroyuki * src/shell.c (ngraphenvironment): add $NGRAPHHOME to PATH. * src/ofile.c (f2dsettings): ignore remark character placed at the top of the line. 2008-06-03 Ito Hiroyuki * src/gtk/x11opt.c (DefaultDialogClose): add preserve_width. (MiscDialogSetupItem): add preserve_width. (MiscDialogSetup): add preserve_width. (MiscDialogClose): add preserve_width. (MiscDialogClose): add preserve_width. * src/gtk/ox11menu.c (mgtkloadconfig): add preserve_width. * src/gtk/x11view.c (ViewerEvLButtonUp): add preserve_width. * src/orect.c (rectzoom): add preserve_width. * src/omark.c (markzoom): add preserve_width. * src/olegend.c (legendzoom): add preserve_width. * src/oaxis.c (axiszoom2): add preserve_width. * src/oarc.c (arczoom): add preserve_width. * src/gtk/gtk_liststore.c (create_tree_view): add gtk_tree_view_column_set_resizable(); * src/gtk/x11file.c (FileDialogSetup): check string by g_utf8_validate(); * src/gtk/x11lgnd.c (legend_list_set_val): use g_utf8_strncpy() instead of strncpy(). 2008-06-02 Ito Hiroyuki * src/gtk/x11axis.c (AxisPosDialogSetupItem): add combo_box_clear(d->adjust). * src/gtk/ox11menu.c (mx_output): in the case 'V': remove Mxlocal->scrollx and Mxlocal->scrolly. (mx_output): in the case 'V': second argument must be mxd2py and third argument must be mxd2px. * src/gtk/x11view.c (MakeRuler): use mxd2p() instead of mxd2px() and mxd2y(). 2008-05-30 Ito Hiroyuki * src/gtk/x11view.c (CloseGC): fix conditional expression ("Mxlocal->font[i].fontalias != NULL" to "Mxlocal->font[i].fontalias != NULL"). * src/gtk/ox11menu.c (menudone): free Mxlocal->font[i].fontalias and Mxlocal->font[i].font only when Mxlocal->font[i].fontalias is not NULL. * src/gtk/gtk_subwin.c (sub_window_minimize): do nothing when a sub window is already iconified. 2008-05-27 gettextize * Makefile.am (SUBDIRS): Add po, m4. (ACLOCAL_AMFLAGS): New variable. (EXTRA_DIST): Add config.rpath. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in, m4/Makefile. ngraph-gtk-6.09.05/src/0000755000175000017500000000000014143613314011525 500000000000000ngraph-gtk-6.09.05/src/main.c0000644000175000017500000001346213624701076012551 00000000000000/* * $Id: main.c,v 1.47 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include #include #ifdef __APPLE__ #include #include #include #include #include #include #endif #include "ngraph.h" #define INIT_SCRIPT "Ngraph.nsc" static void exec_init_script(int argc, char **argv, struct objlist *obj, int id) { char *inifile; ngraph_arg *sarray, sarg; int ofst, r; ofst = 1; if (argc > 1 && strcmp(argv[1], "-i") == 0) { ofst++; if (argc > 2) { #if WINDOWS int i; #endif /* WINDOWS */ inifile = ngraph_strdup(argv[2]); if (inifile == NULL) { exit(1); } #if WINDOWS for (i = 0; inifile[i] != '\0'; i++) { if (inifile[i] == '\\') { inifile[i] = '/'; } } #endif /* WINDOWS */ ofst++; } else { inifile = NULL; } } else { inifile = ngraph_get_init_file(INIT_SCRIPT); } if (inifile) { int i, n; n = argc - ofst + 1; sarray = ngraph_malloc(sizeof(*sarray) + sizeof(ngraph_value) * n); if (sarray == NULL) { exit(1); } sarray->num = n; sarray->ary[0].str = inifile; for (i = 1; i < n; i++) { sarray->ary[i].str = argv[i - 1 + ofst]; } } else { sarray = ngraph_malloc(sizeof(*sarray)); sarray->num = 0; } sarg.num = 1; sarg.ary[0].ary = sarray; r = ngraph_object_exe(obj, "shell", id, &sarg); ngraph_free(sarray); ngraph_free(inifile); if (r) { exit(1); } } static char* get_login_shell(struct objlist *sys) { char *loginshell; ngraph_arg arg; ngraph_returned_value rval; arg.num = 0; arg.ary[0].str = NULL; if (ngraph_object_get(sys, "login_shell", 0, &arg, &rval) < 0) { exit(1); } if (rval.str) { loginshell = ngraph_strdup(rval.str); } else { loginshell = NULL; } return loginshell; } #ifdef __APPLE__ static void osx_set_env(const char *app) { char *bundle, rpath[PATH_MAX]; char bundle_contents[PATH_MAX], bundle_res[PATH_MAX], bundle_lib[PATH_MAX], bundle_bin[PATH_MAX], bundle_dat[PATH_MAX], bundle_etc[PATH_MAX]; char xdg[PATH_MAX], ruby[PATH_MAX], pango[PATH_MAX], pixbuf[PATH_MAX], immodule[PATH_MAX]; const char *home; int r; struct stat stat_buf; realpath(app, rpath); bundle = dirname(dirname(dirname(rpath))); snprintf(bundle_contents, PATH_MAX, "%s/%s", bundle, "Contents"); r = stat(bundle_contents, &stat_buf); if (r || ! S_ISDIR(stat_buf.st_mode)) { return; } snprintf(bundle_res, PATH_MAX, "%s/%s", bundle_contents, "Resources"); snprintf(bundle_lib, PATH_MAX, "%s/%s", bundle_res, "lib"); snprintf(bundle_bin, PATH_MAX, "%s/%s", bundle_res, "bin"); snprintf(bundle_dat, PATH_MAX, "%s/%s", bundle_res, "share"); snprintf(bundle_etc, PATH_MAX, "%s/%s", bundle_res, "etc"); setenv("DYLD_LIBRARY_PATH", bundle_lib, 1); snprintf(xdg, PATH_MAX, "%s/%s", bundle_etc, "xdg"); setenv("XDG_CONFIG_DIRS", xdg, 1); setenv("XDG_DATA_DIRS", bundle_dat, 1); setenv("GTK_DATA_PREFIX", bundle_res, 1); setenv("GTK_EXE_PREFIX", bundle_res, 1); setenv("GTK_PATH", bundle_res, 1); setenv("NGRAPH_APP_CONTENTS", bundle_contents, 1); snprintf(ruby, PATH_MAX, "%s/%s", bundle_lib, "ngraph-gtk/ruby"); setenv("RUBYLIB", ruby, 1); snprintf(pango, PATH_MAX, "%s/%s", bundle_etc, "pango/pangorc"); setenv("PANGO_RC_FILE", pango, 1); setenv("PANGO_SYSCONFDIR", bundle_etc, 1); setenv("PANGO_LIBDIR", bundle_lib, 1); snprintf(pixbuf, PATH_MAX, "%s/%s", bundle_lib, "gdk-pixbuf-2.0/2.10.0/loaders.cache"); setenv("GDK_PIXBUF_MODULE_FILE", pixbuf, 1); snprintf(immodule, PATH_MAX, "%s/%s", bundle_etc, "gtk-3.0/gtk.immodules"); setenv("GTK_IM_MODULE_FILE", immodule, 1); home = getenv("HOME"); if (home) { chdir(home); } } #endif int main(int argc, char **argv) { char *loginshell; struct objlist *sys, *obj; int id; #ifdef __APPLE__ /* remove MacOS session identifier from the command line args */ int i, newargc = 0; for (i = 0; i < argc; i++) { if (strncmp (argv[i], "-psn_", 5)){ argv[newargc] = argv[i]; newargc++; } } if (argc > newargc) { argv[newargc] = NULL; /* glib expects NULL terminated array */ argc = newargc; } osx_set_env(argv[0]); #endif if (ngraph_initialize(&argc, &argv)) { exit(1); } sys = ngraph_get_object("system"); obj = ngraph_get_object("shell"); if (obj == NULL || sys == NULL) { exit(1); } id = ngraph_object_new(obj); if (id < 0) { exit(1); } exec_init_script(argc, argv, obj, id); loginshell = get_login_shell(sys); #if 1 if (loginshell) { ngraph_exec_loginshell(loginshell, obj, id); ngraph_free(loginshell); } #else do { ngraph_value val; val.str = NULL; if (ngraph_object_put(sys, "login_shell", 0, &val) < 0) { exit(1); } ngraph_exec_loginshell(loginshell, obj, id); if (loginshell) { ngraph_free(loginshell); } loginshell = get_login_shell(sys); } while (loginshell); #endif ngraph_finalize(); ngraph_object_del(sys, 0); return 0; } ngraph-gtk-6.09.05/src/odarray.c0000644000175000017500000003142313636116342013262 00000000000000/* * $Id: odarray.c,v 1.6 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include "object.h" #include "oiarray.h" #include "math/math_equation.h" #define NAME "darray" #define PARENT "object" #define OVERSION "1.00.00" #define ERRILNAME 100 #define ERROUTBOUND 101 static char *darrayerrorlist[]={ "", "array index is out of array bounds.", }; struct darray_local { double sum, ssum, min, max; int num; int modified; }; #define ERRNUM (sizeof(darrayerrorlist) / sizeof(*darrayerrorlist)) static int darrayinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct darray_local *local; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; local = g_malloc0(sizeof(*local)); if (local == NULL) { return 1; } local->modified = TRUE; _putobj(obj, "_local", inst, local); return 0; } static int darraydone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int darrayget(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; double *po; num=*(int *)argv[2]; _getobj(obj,"@",inst,&array); num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } po=(double *)arraynget(array,num); if (po==NULL) { error(obj, ERROUTBOUND); return 1; } rval->d=*po; return 0; } static int darrayput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; double val; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; num=*(int *)argv[2]; val = arg_to_double(argv, 3); _getobj(obj,"@",inst,&array); num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayput(array,&val,num)==NULL) return 1; return 0; } static int darray_modified(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; return 0; } static int darrayadd(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; double val; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; val = arg_to_double(argv, 2); array = oarray_get_array(obj, inst, sizeof(double)); if (array==NULL) { return 1; } if (arrayadd(array,&val)==NULL) return 1; return 0; } static int darraypop(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; double val; int n; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; rval->d = 0.0; _getobj(obj,"@",inst,&array); if (array == NULL) { return 1; } n = arraynum(array) - 1; if (n < 0) { return 1; } val = arraynget_double(array, n); if (arrayndel(array, n) == NULL) { return 1; } if (arraynum(array) == 0) { arrayfree(array); if (_putobj(obj, "@", inst, NULL)) { return 1; } } rval->d = val; return 0; } static int darrayins(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; double val; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; num=*(int *)argv[2]; val = arg_to_double(argv, 3); array = oarray_get_array(obj, inst, sizeof(double)); if (array==NULL) { return 1; } num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayins(array,&val,num)==NULL) return 1; return 0; } static int darrayunshift(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; double val; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; val = arg_to_double(argv, 2); array = oarray_get_array(obj, inst, sizeof(double)); if (array == NULL) { return 1; } if (arrayins(array, &val, 0)==NULL) { return 1; } return 0; } static int darrayshift(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; double val; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; rval->d = 0; _getobj(obj,"@",inst,&array); if (array == NULL) { return 1; } val = arraynget_double(array, 0); if (arrayndel(array, 0) == NULL) { return 1; } if (arraynum(array) == 0) { arrayfree(array); if (_putobj(obj, "@", inst, NULL)) { return 1; } } rval->d = val; return 0; } static int darraydel(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; num=*(int *)argv[2]; _getobj(obj,"@",inst,&array); if (array==NULL) return 1; num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayndel(array,num)==NULL) { error(obj, ERROUTBOUND); return 1; } if (arraynum(array)==0) { arrayfree(array); if (_putobj(obj,"@",inst,NULL)) return 1; } return 0; } static int darraysort(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arraysort_double(array); return 0; } static int darrayrsort(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arrayrsort_double(array); return 0; } static int darrayuniq(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; _getobj(obj, "@", inst, &array); arrayuniq_double(array); return 0; } static int darrayjoin(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; GString *str; int i, n; char *sep, *ptr; struct darray_local *local; _getobj(obj, "_local", inst, &local); local->modified = TRUE; g_free(rval->str); rval->str = NULL; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } ptr = (char *) argv[2]; if (ptr) { sep = g_strcompress(ptr); } else { sep = g_strdup(","); } if (sep == NULL) { return 1; } str = g_string_sized_new(64); if (str == NULL) { g_free(sep); return 1; } for (i = 0; i < n; i++) { double val; val = arraynget_double(array, i); g_string_append_printf(str, "%.15e%s", val, (i == n - 1) ? "" : sep); } rval->str = g_string_free(str, FALSE); g_free(sep); return 0; } static void cache_data(struct objlist *obj, N_VALUE *inst, struct darray_local *local) { struct narray *array; double min, max, sum, ssum, *data; int n; _getobj(obj, "@", inst, &array); n = arraynum(array); data = arraydata(array); min = 0; max = 0; sum = 0; ssum = 0; if (n > 0) { int i; min = max = data[0]; for (i = 0; i < n; i++) { sum += data[i]; ssum += data[i] * data[i]; if (data[i] < min) { min = data[i]; } else if (data[i] > max) { max = data[i]; } } } local->num = n; local->min = min; local->max = max; local->sum = sum; local->ssum = ssum; local->modified = FALSE; } static int darray_sum(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct darray_local *local; rval->d = 0; _getobj(obj, "_local", inst, &local); if (local->modified) { cache_data(obj, inst, local); } rval->d = local->sum; return 0; } static int darray_average(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct darray_local *local; rval->d = 0; _getobj(obj, "_local", inst, &local); if (local->modified) { cache_data(obj, inst, local); } if (local->num == 0) { return 0; } rval->d = local->sum / local->num; return 0; } static int darray_rms(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct darray_local *local; rval->d = 0; _getobj(obj, "_local", inst, &local); if (local->modified) { cache_data(obj, inst, local); } if (local->num == 0) { return 0; } rval->d = sqrt(local->ssum / local->num); return 0; } static int darray_sdev(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { double sum, ssum, val; int n; struct darray_local *local; rval->d = 0; _getobj(obj, "_local", inst, &local); if (local->modified) { cache_data(obj, inst, local); } n = local->num; if (n == 0) { return 0; } sum = local->sum; ssum = local->ssum; sum /= n; val = ssum / n - sum * sum; rval->d = (val < 0) ? 0 : sqrt(val); return 0; } static int darray_min(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct darray_local *local; rval->d = 0; _getobj(obj, "_local", inst, &local); if (local->modified) { cache_data(obj, inst, local); } rval->d = local->min; return 0; } static int darray_max(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct darray_local *local; rval->d = 0; _getobj(obj, "_local", inst, &local); if (local->modified) { cache_data(obj, inst, local); } rval->d = local->max; return 0; } static int darray_map(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int i, n; double *data; MathEquation *code; MathValue val; if (argv[2] == NULL) { return 0; } _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 1; } code = oarray_create_math(obj, argv[1], argv[2]); if (code == NULL) { return 1; } data = arraydata(array); for (i = 0; i < n; i++) { val.val = data[i]; val.type = MATH_VALUE_NORMAL; math_equation_set_var(code, 0, &val); val.val = i; val.type = MATH_VALUE_NORMAL; math_equation_set_var(code, 1, &val); math_equation_calculate(code, &val); data[i] = val.val; } math_equation_free(code); return 0; } static struct objtable odarray[] = { {"init",NVFUNC,NEXEC,darrayinit,NULL,0}, {"done",NVFUNC,NEXEC,darraydone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"@",NDARRAY,NREAD|NWRITE,darray_modified,NULL,0}, {"get",NDFUNC,NREAD|NEXEC,darrayget,"i",0}, {"put",NVFUNC,NREAD|NEXEC,darrayput,"id",0}, {"add",NVFUNC,NREAD|NEXEC,darrayadd,"d",0}, {"push",NVFUNC,NREAD|NEXEC,darrayadd,"d",0}, {"pop",NDFUNC,NREAD|NEXEC,darraypop,"",0}, {"ins",NVFUNC,NREAD|NEXEC,darrayins,"id",0}, {"unshift",NVFUNC,NREAD|NEXEC,darrayunshift,"d",0}, {"shift",NDFUNC,NREAD|NEXEC,darrayshift,"",0}, {"del",NVFUNC,NREAD|NEXEC,darraydel,"i",0}, {"join",NSFUNC,NREAD|NEXEC,darrayjoin,"s",0}, {"sort",NVFUNC,NREAD|NEXEC,darraysort,"",0}, {"rsort",NVFUNC,NREAD|NEXEC,darrayrsort,"",0}, {"uniq",NVFUNC,NREAD|NEXEC,darrayuniq,"",0}, {"sum", NDFUNC, NREAD|NEXEC, darray_sum, "", 0}, {"average", NDFUNC, NREAD|NEXEC, darray_average, "", 0}, {"sdev", NDFUNC, NREAD|NEXEC, darray_sdev, "", 0}, {"RMS", NDFUNC, NREAD|NEXEC, darray_rms, "", 0}, {"min", NDFUNC, NREAD|NEXEC, darray_min, "", 0}, {"max", NDFUNC, NREAD|NEXEC, darray_max, "", 0}, {"num", NIFUNC, NREAD|NEXEC, oarray_num, "", 0}, {"seq", NSFUNC, NREAD|NEXEC, oarray_seq, "", 0}, {"rseq", NSFUNC, NREAD|NEXEC, oarray_reverse_seq, "", 0}, {"reverse", NVFUNC, NREAD|NEXEC, oarray_reverse, "", 0}, {"slice", NVFUNC, NREAD|NEXEC, oarray_slice, "ii", 0}, {"map", NVFUNC, NREAD|NEXEC, darray_map, "s", 0}, {"_local", NPOINTER, 0, NULL, NULL, 0}, }; #define TBLNUM (sizeof(odarray) / sizeof(*odarray)) void * adddarray(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,odarray,ERRNUM,darrayerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/terminal.c0000644000175000017500000000326213070106167013430 00000000000000#include "common.h" #include #include #ifdef HAVE_SYS_WAIT_H #include #endif #include #include #include #include #include #include #ifndef __MINGW32__ static void sig_handler(int sig) { } static void my_signal(int signum, void (* sighandler)) { struct sigaction act; act.sa_handler = sighandler; act.sa_flags = SA_RESTART; sigemptyset(&act.sa_mask); sigaction(signum, &act, NULL); } #endif int main(int argc,char **argv) { #ifndef __MINGW32__ int fdi, fdo, len; char *ptr, buf[256] = {0}; #ifdef HAVE_SIGSUSPEND sigset_t sig_mask; #endif if (argc < 3) { return 1; } if (! isatty(0) || ! isatty(1)) { return 1; } ptr = ttyname(0); if (ptr == NULL) { return 1; } fdo = open(argv[1], O_WRONLY); fdi = open(argv[2], O_RDONLY); while (1) { int n; n = read(fdi,buf,1); if (n != 1) { perror(""); break; } if (buf[0] == '\0') break; putchar(buf[0]); } close(fdi); len = strlen(ptr) + 1; if (write(fdo, ptr, len) < 0) { close(fdo); return 1; } len = snprintf(buf, sizeof(buf) - 1, "%d", getpid()) + 1; if (write(fdo, buf, len) < 0) { close(fdo); return 1; } close(fdo); close(fdi); my_signal(SIGTERM, sig_handler); #ifdef HAVE_SIGSUSPEND sigemptyset(&sig_mask); sigaddset(&sig_mask, SIGINT); #ifdef SIGWINCH sigaddset(&sig_mask, SIGWINCH); #endif sigsuspend(&sig_mask); #else /* HAVE_SIGSUSPEND */ my_signal(SIGINT, SIG_IGN); #ifdef SIGWINCH my_signal(SIGWINCH, SIG_IGN); #endif pause(); #endif /* HAVE_SIGSUSPEND */ #endif /* __MINGW32__ */ return 0; } ngraph-gtk-6.09.05/src/strconv.c0000644000175000017500000000306313717453502013320 00000000000000/* * $Id: strconv.c,v 1.2 2010-03-04 08:30:16 hito Exp $ */ #include "common.h" #include #include #include #include "object.h" gchar * ascii2greece(const gchar *src) { int i, j, k, c, slen, dlen; static char *u[] = {"Α", "Β", "Χ", "Δ", "Ε", "Φ", "Γ", "Η", "Ι", "ϑ", "Κ", "Λ", "Μ", "Ν", "Ο", "Π", "Θ", "Ρ", "Σ", "Τ", "Υ", "ϛ", "Ω", "Ξ", "Ψ", "Ζ"}; static char *l[] = {"α", "β", "χ", "δ", "ε", "ϕ", "γ", "η", "ι", "φ", "κ", "λ", "μ", "ν", "ο", "π", "θ", "ρ", "σ", "τ", "υ", "ϖ", "ω", "ξ", "ψ", "ζ"}; gchar *tmp, *ch, buf[2]; slen = strlen(src); dlen = slen * 6 + 1; tmp = g_malloc(dlen); if (tmp == NULL) return NULL; tmp[0] = '\0'; for (i = j = 0; i < slen; i++) { int len; if (src[i] >= 'a' && src[i] <= 'z') { c = src[i] - 'a'; ch = l[c]; } else if (src[i] >= 'A' && src[i] <= 'Z') { c = src[i] - 'A'; ch = u[c]; } else { buf[0] = src[i]; buf[1] = '\0'; ch = buf; } len = strlen(ch); for (k = 0; k < len; k++) { tmp[j++] = ch[k]; } tmp[j] = '\0'; } return tmp; } static char * str2utf8(const char *str, char *scode, char *dcode) { char *tmp; if (str == NULL) return NULL; tmp = g_convert(str, -1, dcode, scode, NULL, NULL, NULL); return tmp; } char * sjis_to_utf8(const char *src) { return str2utf8(src, "CP932", "utf-8//TRANSLIT"); } char * utf8_to_sjis(const char *src) { return str2utf8(src, "utf-8", "CP932//TRANSLIT"); } ngraph-gtk-6.09.05/src/ntime.c0000644000175000017500000002472213070106167012735 00000000000000/* * $Id: ntime.c,v 1.5 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include "object.h" #include "nstring.h" #include "ntime.h" #include "mathfn.h" char *weekstr[7]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; char *monthstr[12]={"Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug","Sep","Oct","Nov","Dec"}; char * ndate(time_t *timep,int style) { struct tm *ltime; char *c; ltime=localtime(timep); if (ltime == NULL) { return NULL; } switch (style) { case 1: c = g_strdup_printf("%d-%d-%d", ltime->tm_mon + 1, ltime->tm_mday, 1900 + ltime->tm_year); break; case 2: c = g_strdup_printf("%s %d %d", monthstr[ltime->tm_mon], ltime->tm_mday, 1900 + ltime->tm_year); break; case 3: c = g_strdup_printf("%d-%d-%d", ltime->tm_mday, ltime->tm_mon + 1, 1900 + ltime->tm_year); break; case 4: c = g_strdup_printf("%d/%d/%d", ltime->tm_mon + 1, ltime->tm_mday, 1900 + ltime->tm_year); break; default: c = g_strdup_printf("%s %s %d %d", weekstr[ltime->tm_wday], monthstr[ltime->tm_mon], ltime->tm_mday, 1900 + ltime->tm_year); break; } return c; } char * ntime(time_t *timep,int style) { struct tm *ltime; char *c; ltime=localtime(timep); if (ltime == NULL) { return NULL; } switch (style) { case 1: if (ltime->tm_hour<12) c = g_strdup_printf("%02d:%02d:%02d am", ltime->tm_hour, ltime->tm_min, ltime->tm_sec); else c = g_strdup_printf("%02d:%02d:%02d pm", ltime->tm_hour - 12, ltime->tm_min, ltime->tm_sec); break; case 2: c = g_strdup_printf("%02d:%02d", ltime->tm_hour, ltime->tm_min); break; case 3: if (ltime->tm_hour<12) { c = g_strdup_printf("%02d:%02d am", ltime->tm_hour, ltime->tm_min); } else { c = g_strdup_printf("%02d:%02d pm", ltime->tm_hour - 12, ltime->tm_min); } break; default: c = g_strdup_printf("%02d:%02d:%02d", ltime->tm_hour, ltime->tm_min, ltime->tm_sec); break; } return c; } int gettimeval(char *s,time_t *time) { char *endptr; struct tm tm; int year; tm.tm_mday=strtol(s,&endptr,10); if (endptr[0]!='-') return -1; s=endptr+1; tm.tm_mon=strtol(s,&endptr,10)-1; if (endptr[0]!='-') return -1; s=endptr+1; year=strtol(s,&endptr,10)-1900; if (year<0) year+=1900; tm.tm_year=year; if (endptr[0]!=' ') return -1; s=endptr+1; tm.tm_hour=strtol(s,&endptr,10); if (endptr[0]!=':') return -1; s=endptr+1; tm.tm_min=strtol(s,&endptr,10); if (endptr[0]!=':') return -1; s=endptr+1; tm.tm_sec=strtol(s,&endptr,10); tm.tm_isdst=0; *time=mktime(&tm); return 0; } void mjd2gd(double mjd, struct tm *tm) { double t; int wd, sec; /* Date */ #if 1 /* http://en.wikipedia.org/wiki/Julian_day */ int j, g, dg, c, dc, b, db, a, da, y, m, d, Y, M, D; j = floor(mjd + 2400001 + 32044); g = j / 146097; dg = j % 146097; c = (dg / 36524 + 1) * 3 / 4; dc = dg - c * 36524; b = dc / 1461; db = dc % 1461; a = (db / 365 + 1) * 3 / 4; da = db - a * 365; y = g * 400 + c * 100 + b * 4 + a; m = (da * 5 + 308) / 153 - 2; d = da - (m + 4) * 153 / 5 + 122; Y = y - 4800 + (m + 2) / 12; M = (m + 2) % 12 + 1; D = d + 1; #else /* http://www.astro.uu.nl/~strous/AA/en/reken/juliaansedag.html */ double x0, x1, x2, c1, c2; int Y, M, D, da; x2 = floor(mjd) + (2400000.5 - 1721119.5); c2 = floor((4 * x2 + 3) / 146097.0); x1 = x2 - floor(146097 * c2 / 4.0); c1 = floor((100 * x1 + 99) / 36525.0); x0 = x1 - floor(36525 * c1 / 100.0); Y = 100 * c2 + c1; M = floor((5 * x0 + 461) / 153.0); D = x0 - floor((153 * M - 457) / 5.0) + 1; if (M > 12) { M -= 12; Y += 1; } da = floor(x0); #endif wd = floor(mjd) + 2400000 + 2; wd %= 7; tm->tm_year = Y - 1900; tm->tm_mon = M - 1; tm->tm_mday = D; tm->tm_wday = wd; if (Y % 400 == 0) { da += 60; da %= 366; } else if (Y % 100 == 0) { da += 59; da %= 365; } else if (Y % 4 == 0) { da += 60; da %= 366; } else { da += 59; da %= 365; } tm->tm_yday = da; /* Time */ t = fmod(mjd, 1); t = (t < 0) ? 1 + t : t; sec = nround(t * 86400); tm->tm_hour = sec / 3600; sec %= 3600; tm->tm_min = sec / 60; sec %= 60; tm->tm_sec = sec; tm->tm_isdst = -1; } static int get_iso_8601_week(struct tm *t) { int y, w, a, b, c, x; w = t->tm_wday; a = t->tm_yday % 7; b = (w > a) ? w - a : 7 + w - a; c = (b == 0) ? 6 : b -1; x = (t->tm_yday + c) / 7; y = (b + 3) % 7; if (y > 4 || y == 0) { x += 1; } if ((t->tm_yday == 0 && (w == 5 || w == 6 || w == 0)) || (t->tm_yday == 1 && (w == 6 || w == 0)) || (t->tm_yday == 2 && w == 0)) { x = 53; } else if (t->tm_mon == 11) { if ((t->tm_mday == 31 && (w == 1 || w == 2 || w == 3)) || (t->tm_mday == 30 && (w == 1 || w == 2)) || (t->tm_mday == 29 && w == 1)) { x = 1; } } return x; } static int append_date_str(GString *str, const gchar *fmt, struct tm *t) { const char *wfname[]={"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; const char *mfname[]={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; int y, m, d, w, h24, h12, mm, s, a, b, c, x; if (fmt == NULL || *fmt == '\0') { return 0; } if (t == NULL || t->tm_mon < 0 || t->tm_mon > 11 || t->tm_wday < 0 || t->tm_wday > 6) { return 1; } y = t->tm_year + 1900; m = t->tm_mon + 1; d = t->tm_mday; w = t->tm_wday; h24 = t->tm_hour; if (h24 == 0) { h12 = 12; } else if (h24 > 12) { h12 = h24 - 12; } else { h12 = h24; } mm = t->tm_min; s = t->tm_sec; switch (*fmt) { case 'a': g_string_append_printf(str, "%s", weekstr[w]); break; case 'A': g_string_append_printf(str, "%s", wfname[w]); break; case 'b': case 'h': g_string_append_printf(str, "%s", monthstr[m - 1]); break; case 'B': g_string_append_printf(str, "%s", mfname[m - 1]); break; case 'c': g_string_append_printf(str, "%s %s % 2d %02d:%02d:%02d %d", weekstr[w], monthstr[m - 1], d, h24, mm, s, y); break; case 'C': g_string_append_printf(str, "%d", y / 100); break; case 'd': g_string_append_printf(str, "%02d", d); break; case 'D': case 'x': g_string_append_printf(str, "%02d/%02d/%02d", m, d, y % 100); break; case 'e': g_string_append_printf(str, "% 2d", d); break; case 'F': g_string_append_printf(str, "% 4d-%02d-%02d", y, m, d); break; case 'G': x = get_iso_8601_week(t); if (m == 1 && x == 53) { y -= 1; } else if (m == 12 && x == 1) { y += 1; } g_string_append_printf(str, "% 4d", y); break; case 'g': x = get_iso_8601_week(t); if (m == 1 && x == 53) { y -= 1; } else if (m == 12 && x == 1) { y += 1; } g_string_append_printf(str, "%02d", y % 100); break; case 'H': g_string_append_printf(str, "%02d", h24); break; case 'I': g_string_append_printf(str, "%02d", h12); break; case 'j': g_string_append_printf(str, "%03d", t->tm_yday + 1); break; case 'k': g_string_append_printf(str, "% 2d", h24); break; case 'l': g_string_append_printf(str, "% 2d", h12); break; case 'm': g_string_append_printf(str, "%02d", m); break; case 'M': g_string_append_printf(str, "%02d", mm); break; case 'n': g_string_append_c(str, '\n'); break; case 'p': g_string_append(str, (h24 > 11) ? "PM" : "AM"); break; case 'P': g_string_append(str, (h24 > 11) ? "pm" : "am"); break; case 'r': g_string_append_printf(str, "%02d:%02d:%02d %s", h12, mm, s, (h24 > 11) ? "PM" : "AM"); break; case 'R': g_string_append_printf(str, "%02d:%02d", h24, mm); break; case 's': break; case 'S': g_string_append_printf(str, "%02d", s); break; case 't': g_string_append_c(str, '\t'); break; case 'T': case 'X': g_string_append_printf(str, "%02d:%02d:%02d", h24, mm, s); break; case 'u': g_string_append_printf(str, "%d", (w == 0) ? 7 : w); break; case 'U': a = t->tm_yday % 7; b = (w > a) ? w - a : 7 + w - a; c = (b == 0) ? 7 : b; g_string_append_printf(str, "%02d", (t->tm_yday + c)/ 7); break; case 'V': x = get_iso_8601_week(t); g_string_append_printf(str, "%02d", x); break; case 'w': g_string_append_printf(str, "%d", w); break; case 'W': a = t->tm_yday % 7; b = (w > a) ? w - a : 7 + w - a; c = (b == 0) ? 6 : b -1; g_string_append_printf(str, "%02d", (t->tm_yday + c) / 7); break; case 'y': g_string_append_printf(str, "%02d", y % 100); break; case 'Y': g_string_append_printf(str, "%d", y); break; case 'z': g_string_append(str, "+0000"); break; case 'Z': g_string_append(str, "GMT"); break; case '+': g_string_append_printf(str, "%s %s % 2d %02d:%02d:%02d GMT %d", weekstr[w], monthstr[m - 1], d, h24, mm, s, y); break; case '%': default: g_string_append_c(str, *fmt); } return 1; } char * nstrftime(const gchar *fmt, double mjd) { GString *str; struct tm t; int n; if (fmt == NULL || fmt[0] == '\0') { return NULL; } mjd2gd(mjd, &t); str = g_string_sized_new(64); while (*fmt) { switch (*fmt) { case '%': fmt++; while (*fmt == 'O' || *fmt == 'E') { fmt++; } n = append_date_str(str, fmt, &t); fmt += n; break; default: g_string_append_c(str, *fmt); fmt++; } } return g_string_free(str, FALSE); } ngraph-gtk-6.09.05/src/shell.h0000644000175000017500000000732713667343676012763 00000000000000#ifndef _SHELL_HEADER #define _SHELL_HEADER /* * $Id: shell.h,v 1.14 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "ioutil.h" #define SHELLBUFSIZE 4096 struct prmlist; struct prmlist { struct prmlist *next; char *str; int prmno; int quoted; }; struct cmdlist; struct cmdlist { struct cmdlist *next; int cmdno; int cmdend; struct prmlist *prm; void *done; char *pipefile; }; struct vallist; struct vallist { struct vallist *next; char *name; void *val; int func; int arg; }; struct explist; struct explist { char *val; struct explist *next; }; struct nshell { struct objlist *obj; #if USE_HASH NHASH exproot, valroot; #else struct vallist *valroot; struct explist *exproot; #endif int argc; char **argv; int cmdexec; int status; int quit; int options; int optionf; int optione; int optionv; int optionx; int fd; char *readbuf; int readpo; int readbyte; int deleted; int (*sgetstdin)(); int (*sputstdout)(const char *s); int (*sprintfstdout)(const char *fmt,...); }; extern int CMDNUM; typedef int (* shell_proc)(struct nshell *nshell,int argc,char **argv); struct cmdtabletype { char *name; shell_proc proc; }; extern struct cmdtabletype cmdtable[]; extern int CPCMDNUM; extern char *cpcmdtable[]; shell_proc check_cmd(char *name); int check_cpcmd(char *name); int init_cmd_tbl(void); void nsleep(double a); int eval_script(const char *script, int security); char *addval(struct nshell *nshell,char *name,char *val); char *addexp(struct nshell *nshell,char *name); int delval(struct nshell *nshell,char *name); char *getval(struct nshell *nshell,char *name); struct cmdlist *getfunc(struct nshell *nshell,char *name); void setshhandle(struct nshell *shell, int fd); int getshhandle(struct nshell *nshell); int cmdexecute(struct nshell *nshell, const char *cline); struct nshell *newshell(void); void delshell(struct nshell *nshell); void sherror(int code); void sherror2(int code,char *mes); void sherror3(char *cmd,int code,char *mes); void sherror4(char *cmd,int code); void shellsavestdio(struct nshell *nshell); void shellrestorestdio(struct nshell *nshell); int setshelloption(struct nshell *nshell,char *opt); int getshelloption(struct nshell *nshell,char opt); int set_shell_args(struct nshell *nshell, int j, const char *argv0, int argc, char **argv); void setshellargument(struct nshell *nshell,int argc,char **argv); int printfconsole(const char *fmt,...); void ngraphenvironment(struct nshell *nshell); int msleep(int ms); void set_security(int state); int get_security(void); void set_environ(void); void set_childhandler(void); void unset_childhandler(void); int system_bg(char *cmd); void set_interrupt(void); int check_interrupt(void); void reset_interrupt(void); #if WINDOWS void show_system_error(void); #else int set_signal(int signal, int flags, void (*handler)(int), struct sigaction *oldact); #endif /* WINDOWS */ #endif ngraph-gtk-6.09.05/src/oarc.c0000644000175000017500000005125114002151415012532 00000000000000/* * $id: oarc.c,v 1.21 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include "object.h" #include "gra.h" #include "mathfn.h" #include "oroot.h" #include "odraw.h" #include "olegend.h" #include "oarc.h" #define NAME N_("arc") #define PARENT "legend" #define OVERSION "1.00.00" #define ERRSPL 100 static char *arcerrorlist[]={ "error: spline interpolation.", }; #define ERRNUM (sizeof(arcerrorlist) / sizeof(*arcerrorlist)) static int arcinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int angle2, width, pieslice, stroke, miter, join, alpha, headlen, headwidth; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; angle2 = 36000; width = DEFAULT_LINE_WIDTH; pieslice = TRUE; miter = 1000; join = JOIN_TYPE_BEVEL; stroke = TRUE; alpha = 255; headlen = 72426; headwidth = 60000; if (_putobj(obj, "pieslice", inst, &pieslice)) return 1; if (_putobj(obj, "angle2", inst, &angle2)) return 1; if (_putobj(obj, "width", inst, &width)) return 1; if (_putobj(obj, "miter_limit", inst, &miter)) return 1; if (_putobj(obj, "join", inst, &join)) return 1; if (_putobj(obj, "stroke", inst, &stroke)) return 1; if (_putobj(obj, "stroke_A", inst, &alpha)) return 1; if (_putobj(obj, "fill_A", inst, &alpha)) return 1; if (_putobj(obj, "arrow_length", inst, &headlen)) return 1; if (_putobj(obj, "arrow_width", inst, &headwidth)) return 1; return 0; } static int arcdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static void get_dx_dy(int rx, int ry, int angle, double *x, double *y, double *dx, double *dy) { *x = rx * cos(- angle * MPI / 18000); *y = ry * sin(- angle * MPI / 18000); if (*y == 0) { *dx = 0; if (*x < 0) { *dy = 1; } else { *dy = -1; } } else { double a, b; a = 1.0 * ry * ry * (*x) / rx / rx / (*y); b = 1 / sqrt(1 + a * a); if (*y < 0) { *dx = -b; } else { *dx = b; } *dy = - a * (*dx); } } static void get_position(int x, int y, int rx, int ry, int a0, int a1, double *x0, double *y0, double *x1, double *y1, double *dx0, double *dy0, double *dx1, double *dy1) { get_dx_dy(rx, ry, a0, x0, y0, dx0, dy0); *x0 += x; *y0 += y; *dx0 = -*dx0; *dy0 = -*dy0; get_dx_dy(rx, ry, a0 + a1, x1, y1, dx1, dy1); *x1 += x; *y1 += y; } static void draw_arrow(int GC, int join, int miter, int width, int headlen, int headwidth, int x, int y, double dx, double dy) { int ax0, ay0, ox, oy; double alen, alen2, awidth; int ap[6]; alen = width * (double) headlen / 10000; awidth = width * (double) headwidth / 20000; ax0 = nround(x - dx * alen); ay0 = nround(y - dy * alen); alen2 = alen * width / awidth / 2; ox = nround(dx * alen2); oy = nround(dy * alen2); ax0 += ox; ay0 += oy; ap[0] = nround(ax0 - dy * awidth); ap[1] = nround(ay0 + dx * awidth); ap[2] = x + nround(ox); ap[3] = y + nround(oy); ap[4] = nround(ax0 + dy * awidth); ap[5] = nround(ay0 - dx * awidth); GRAlinestyle(GC, 0, NULL, 1, GRA_LINE_CAP_BUTT, join, miter); GRAdrawpoly(GC, 3, ap, GRA_FILL_MODE_EVEN_ODD); } static void draw_marker(struct objlist *obj, N_VALUE *inst, int GC, int join, int miter, int width, int x, int y, int rx, int ry, int a0, int a1, int r, int g, int b, int a) { int headlen, headwidth, head_begin, head_end; double x0, y0, x1, y1, dx0, dy0, dx1, dy1; int type; _getobj(obj, "marker_begin", inst, &head_begin); _getobj(obj, "marker_end", inst, &head_end); _getobj(obj, "arrow_length", inst, &headlen); _getobj(obj, "arrow_width", inst, &headwidth); get_position(x, y, rx, ry, a0, a1, &x0, &y0, &x1, &y1, &dx0, &dy0, &dx1, &dy1); switch (head_begin) { case MARKER_TYPE_ARROW: draw_arrow(GC, join, miter, width, headlen, headwidth, x0, y0, dx0, dy0); break; case MARKER_TYPE_WAVE: draw_marker_wave(obj, inst, GC, width, headlen, headwidth, x0, y0, dx0, dy0, ERRSPL); break; case MARKER_TYPE_MARK: _getobj(obj, "mark_type_begin", inst, &type); draw_marker_mark(obj, inst, GC, width, headlen, headwidth, x0, y0, dx0, dy0, r, g, b, a, type); break; case MARKER_TYPE_BAR: draw_marker_bar(obj, inst, GC, width, headlen, headwidth, x0, y0, dx0, dy0); break; } switch (head_end) { case MARKER_TYPE_ARROW: draw_arrow(GC, join, miter, width, headlen, headwidth, x1, y1, dx1, dy1); break; case MARKER_TYPE_WAVE: draw_marker_wave(obj, inst, GC, width, headlen, headwidth, x1, y1, dx1, dy1, ERRSPL); break; case MARKER_TYPE_MARK: _getobj(obj, "mark_type_end", inst, &type); draw_marker_mark(obj, inst, GC, width, headlen, headwidth, x1, y1, dx1, dy1, r, g, b, a, type); break; case MARKER_TYPE_BAR: draw_marker_bar(obj, inst, GC, width, headlen, headwidth, x1, y1, dx1, dy1); break; } } static int arcdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; int x,y,rx,ry,angle1,angle2,width,ifill,fr,fg,fb,fa,w,h,stroke,close_path,br,bg,bb, ba, join, miter; int pieslice; struct narray *style; int snum,*sdata; int clip,zoom; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; _getobj(obj,"stroke_R",inst,&fr); _getobj(obj,"stroke_G",inst,&fg); _getobj(obj,"stroke_B",inst,&fb); _getobj(obj,"stroke_A",inst,&fa); _getobj(obj,"fill_R",inst,&br); _getobj(obj,"fill_G",inst,&bg); _getobj(obj,"fill_B",inst,&bb); _getobj(obj,"fill_A",inst,&ba); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"rx",inst,&rx); _getobj(obj,"ry",inst,&ry); _getobj(obj,"pieslice",inst,&pieslice); _getobj(obj,"angle1",inst,&angle1); _getobj(obj,"angle2",inst,&angle2); _getobj(obj,"width",inst,&width); _getobj(obj,"style",inst,&style); _getobj(obj, "join", inst, &join); _getobj(obj, "miter_limit", inst, &miter); _getobj(obj,"fill",inst,&ifill); _getobj(obj,"stroke",inst,&stroke); _getobj(obj,"close_path",inst,&close_path); _getobj(obj,"clip",inst,&clip); if (! ifill && ! stroke) { return 0; } snum=arraynum(style); sdata=arraydata(style); GRAregion(GC,&w,&h,&zoom); GRAview(GC,0,0,w*10000.0/zoom,h*10000.0/zoom,clip); if (ifill) { GRAcolor(GC,br,bg,bb, ba); GRAcircle(GC, x, y, rx, ry, angle1, angle2, (pieslice) ? 1 : 2); } if (stroke) { GRAcolor(GC,fr,fg,fb, fa); GRAlinestyle(GC, snum, sdata, width, GRA_LINE_CAP_BUTT, join, miter); GRAcircle(GC, x, y, rx, ry, angle1, angle2, (close_path) ? ((pieslice) ? 3 : 4) : 0); draw_marker(obj, inst, GC, join, miter, width, x, y, rx, ry, angle1, angle2, fr, fg, fb, fa); } return 0; } static int arcgeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *field; int val; field = (char *) (argv[1]); val = * (int *) (argv[2]); if (strcmp(field,"width")==0) { if (val < 1) val = 1; } else if (strcmp(field, "rx") == 0 || strcmp(field, "ry") == 0) { if (val < 1) val = 1; } else if (strcmp(field, "angle1") == 0){ if (val < 0) { val %= 36000; val += 36000; } else if (val > 36000) { val %= 36000; } } else if (strcmp(field, "angle2") == 0) { if (val < 0) { val = 0; } else if (val > 36000) { val = 36000; } } else if (strcmp(field, "arrow_length") == 0) { if (val < ARROW_SIZE_MIN) { val = ARROW_SIZE_MIN; } else if (val > ARROW_SIZE_MAX) { val = ARROW_SIZE_MAX; } } else if (strcmp(field, "arrow_width") == 0) { if (val < ARROW_SIZE_MIN) { val = ARROW_SIZE_MIN; } else if (val > ARROW_SIZE_MAX) { val = ARROW_SIZE_MAX; } } * (int *)(argv[2]) = val; if (clear_bbox(obj, inst)) return 1; return 0; } static int arcbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy; int x,y,x1,y1, head_begin, head_end; int x0,y0,angle1,angle2,rx,ry,pieslice,fill,stroke,close_path; struct narray *array; int i,width; array=rval->array; if (arraynum(array)!=0) return 0; _getobj(obj,"x",inst,&x0); _getobj(obj,"y",inst,&y0); _getobj(obj,"rx",inst,&rx); _getobj(obj,"ry",inst,&ry); _getobj(obj,"angle1",inst,&angle1); _getobj(obj,"angle2",inst,&angle2); _getobj(obj,"fill",inst,&fill); _getobj(obj,"stroke",inst,&stroke); _getobj(obj,"pieslice",inst,&pieslice); _getobj(obj,"close_path",inst,&close_path); _getobj(obj,"width",inst,&width); angle2+=angle1; if (! fill && ! stroke) { return 0; } if (angle2maxx) maxx=x; if (ymaxy) maxy=y; for (i=angle1/9000+1;i<=angle2/9000;i++) { x=x0+rx*cos(i*MPI/2); y=y0-ry*sin(i*MPI/2); if (xmaxx) maxx=x; if (ymaxy) maxy=y; } if (pieslice && (fill || close_path)) { x=x0; y=y0; if (xmaxx) maxx=x; if (ymaxy) maxy=y; } if (stroke) { minx-=width/2; miny-=width/2; maxx+=width/2; maxy+=width/2; } _getobj(obj, "marker_begin", inst, &head_begin); _getobj(obj, "marker_end", inst, &head_end); if (head_begin != MARKER_TYPE_NONE || head_end != MARKER_TYPE_NONE) { double awidth; int headwidth; _getobj(obj, "arrow_width", inst, &headwidth); awidth = width * (double) headwidth / 10000; if (((head_begin == MARKER_TYPE_MARK || head_begin == MARKER_TYPE_ARROW) && (head_end == MARKER_TYPE_MARK || head_end == MARKER_TYPE_ARROW)) || ((head_begin == MARKER_TYPE_MARK || head_begin == MARKER_TYPE_ARROW) && head_end == MARKER_TYPE_NONE) || (head_begin == MARKER_TYPE_NONE && (head_end == MARKER_TYPE_MARK || head_end == MARKER_TYPE_ARROW))) { awidth /= 2; } minx -= awidth; miny -= awidth; maxx += awidth; maxy += awidth; } arrayins(array,&maxy,0); arrayins(array,&maxx,0); arrayins(array,&miny,0); arrayins(array,&minx,0); /* ARC_POINT_TYPE_R */ x = x0 - rx; y = y0 - ry; arrayadd(array, &x); arrayadd(array, &y); /* ARC_POINT_TYPE_ANGLE1 */ arrayadd(array, &x1); arrayadd(array, &y1); /* ARC_POINT_TYPE_ANGLE2 */ if (angle2 - angle1 < 36000) { x = x0 + rx * cos(angle2 * MPI / 18000); y = y0 - ry * sin(angle2 * MPI / 18000); arrayadd(array, &x); arrayadd(array, &y); } if (arraynum(array) == 0) { arrayfree(array); rval->array = NULL; return 1; } rval->array = array; return 0; } static int arcmove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); x+=*(int *)argv[2]; y+=*(int *)argv[3]; if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int arcchange(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int point, a1, a2, rx, ry, ret; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; point = * (int *) argv[2]; a1 = * (int *) argv[3]; a2 = * (int *) argv[4]; ret = 1; switch (point) { case ARC_POINT_TYPE_R: _getobj(obj, "rx", inst, &rx); _getobj(obj, "ry", inst, &ry); rx -= a1; ry -= a2; if (rx > 0) ret = _putobj(obj, "rx", inst, &rx); if (ry > 0) ret = _putobj(obj, "ry", inst, &ry); break; case ARC_POINT_TYPE_ANGLE1: case ARC_POINT_TYPE_ANGLE2: _putobj(obj, "angle1", inst, &a1); ret = _putobj(obj, "angle2", inst, &a2); break; default: return 1; } if (ret) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int arcrotate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int angle, rx, ry, a, use_pivot, type_begin, type_end; _getobj(obj, "rx", inst, &rx); _getobj(obj, "ry", inst, &ry); _getobj(obj, "angle1", inst, &a); _getobj(obj, "mark_type_begin", inst, &type_begin); _getobj(obj, "mark_type_end", inst, &type_end); angle = *(int *) argv[2]; #if ! ROTATE_MARK type_begin = mark_rotate(angle, type_begin); type_end = mark_rotate(angle, type_end); _putobj(obj, "mark_type_begin", inst, &type_begin); _putobj(obj, "mark_type_end", inst, &type_end); #endif angle %= 36000; if (angle < 0) angle += 36000; switch (angle) { case 9000: case 27000: _putobj(obj, "rx", inst, &ry); _putobj(obj, "ry", inst, &rx); /* fall through */ case 18000: a += angle; break; default: return 1; } a %= 36000; _putobj(obj, "angle1", inst, &a); use_pivot = * (int *) argv[3]; if (use_pivot) { int x, y, px, py; px = *(int *) argv[4]; py = *(int *) argv[5]; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); rotate(px, py, angle, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); } if (clear_bbox(obj, inst)) return 1; return 0; } static int arcflip(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int rx, ry, a1, a2, use_pivot, head_begin, head_end, type_begin, type_end; enum FLIP_DIRECTION dir; _getobj(obj, "rx", inst, &rx); _getobj(obj, "ry", inst, &ry); _getobj(obj, "angle1", inst, &a1); _getobj(obj, "angle2", inst, &a2); _getobj(obj, "marker_begin", inst, &head_begin); _getobj(obj, "marker_end", inst, &head_end); _getobj(obj, "mark_type_begin", inst, &type_begin); _getobj(obj, "mark_type_end", inst, &type_end); dir = (* (int *) argv[2] == FLIP_DIRECTION_HORIZONTAL) ? FLIP_DIRECTION_HORIZONTAL : FLIP_DIRECTION_VERTICAL; _putobj(obj, "marker_begin", inst, &head_end); _putobj(obj, "marker_end", inst, &head_begin); #if ROTATE_MARK type_begin = mark_flip(FLIP_DIRECTION_HORIZONTAL, type_begin); type_end = mark_flip(FLIP_DIRECTION_HORIZONTAL, type_end); #else type_begin = mark_flip(dir, type_begin); type_end = mark_flip(dir, type_end); #endif _putobj(obj, "mark_type_begin", inst, &type_end); _putobj(obj, "mark_type_end", inst, &type_begin); switch (dir) { case FLIP_DIRECTION_VERTICAL: a1 = - a1 - a2; break; case FLIP_DIRECTION_HORIZONTAL: a1 = 18000 - a1 - a2; break; } a1 %= 36000; if (a1 < 0) a1 += 36000; _putobj(obj, "angle1", inst, &a1); use_pivot = * (int *) argv[3]; if (use_pivot) { int x, y, p; p = *(int *) argv[4]; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); flip(p, dir, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); } if (clear_bbox(obj, inst)) return 1; return 0; } static int arczoom(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int snum,*sdata,rx,ry,x,y,refx,refy,width,preserve_width; double zoom_x, zoom_y; struct narray *style; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; zoom_x = (*(int *) argv[2]) / 10000.0; zoom_y = (*(int *) argv[3]) / 10000.0; refx = (*(int *)argv[4]); refy = (*(int *)argv[5]); preserve_width = (*(int *)argv[6]); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"rx",inst,&rx); _getobj(obj,"ry",inst,&ry); _getobj(obj,"width",inst,&width); _getobj(obj,"style",inst,&style); snum=arraynum(style); sdata=arraydata(style); x=(x-refx)*zoom_x+refx; y=(y-refy)*zoom_y+refy; rx=rx*zoom_x; ry=ry*zoom_y; if (rx < 1) rx = 1; if (ry < 1) ry = 1; if (! preserve_width) { int i; double zoom; zoom = MIN(zoom_x, zoom_y); width=width*zoom; for (i=0;ii=FALSE; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if (_exeobj(obj,"bbox",inst,0,NULL)) return 1; _getobj(obj,"bbox",inst,&array); if (array==NULL) return 0; minx=*(int *)(argv[2]); miny=*(int *)(argv[3]); maxx=*(int *)(argv[4]); maxy=*(int *)(argv[5]); err=*(int *)(argv[6]); if (arraynum(array)<4) return 1; bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx==maxx) && (miny==maxy)) { bminx-=err; bminy-=err; bmaxx+=err; bmaxy+=err; if ((bminx<=minx) && (minx<=bmaxx) && (bminy<=miny) && (miny<=bmaxy)) rval->i=TRUE; } else { if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } return 0; } static struct objtable arc[] = { {"init",NVFUNC,NEXEC,arcinit,NULL,0}, {"done",NVFUNC,NEXEC,arcdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"x",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"y",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"rx",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"ry",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"angle1",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"angle2",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"pieslice",NBOOL,NREAD|NWRITE,arcgeometry,NULL,0}, {"fill_R",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_G",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_B",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_A",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_R",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_G",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_B",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_A",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill",NBOOL,NREAD|NWRITE,arcgeometry,NULL,0}, {"stroke",NBOOL,NREAD|NWRITE,arcgeometry,NULL,0}, {"close_path",NBOOL,NREAD|NWRITE,arcgeometry,NULL,0}, {"width",NINT,NREAD|NWRITE,arcgeometry,NULL,0}, {"style",NIARRAY,NREAD|NWRITE,oputstyle,NULL,0}, {"join",NENUM,NREAD|NWRITE,NULL,joinchar,0}, {"miter_limit",NINT,NREAD|NWRITE,oputge1,NULL,0}, {"marker_begin", NENUM, NREAD|NWRITE, arcgeometry, marker_type_char, 0}, {"marker_end", NENUM, NREAD|NWRITE, arcgeometry, marker_type_char, 0}, {"arrow_length", NINT, NREAD|NWRITE, arcgeometry, NULL, 0}, {"arrow_width", NINT, NREAD|NWRITE, arcgeometry, NULL, 0}, {"mark_type_begin",NINT,NREAD|NWRITE,oputmarktype,NULL,0}, {"mark_type_end",NINT,NREAD|NWRITE,oputmarktype,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,arcdraw,"i",0}, {"bbox",NIAFUNC,NREAD|NEXEC,arcbbox,"",0}, {"move",NVFUNC,NREAD|NEXEC,arcmove,"ii",0}, {"rotate",NVFUNC,NREAD|NEXEC,arcrotate,"iiii",0}, {"flip",NVFUNC,NREAD|NEXEC,arcflip,"iii",0}, {"change",NVFUNC,NREAD|NEXEC,arcchange,"iii",0}, {"zooming",NVFUNC,NREAD|NEXEC,arczoom,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,arcmatch,"iiiii",0}, {"fill_hsb", NVFUNC, NREAD|NEXEC, put_fill_hsb,"ddd",0}, {"stroke_hsb", NVFUNC, NREAD|NEXEC, put_stroke_hsb,"ddd",0}, /* following fields exist for backward compatibility */ {"R",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"G",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"B",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"A",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, }; #define TBLNUM (sizeof(arc) / sizeof(*arc)) void * addarc(void) /* addarc() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,arc,ERRNUM,arcerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/nhash.h0000644000175000017500000000222313070106167012717 00000000000000/* * $Id: nhash.h,v 1.6 2009-09-19 13:21:44 hito Exp $ */ #ifndef NHASH_HEADER #define NHASH_HEADER struct nhash { char *key; union { int i; void *p; } val; struct nhash *l, *r, *p; }; typedef struct nhash **NHASH; NHASH nhash_new(void); void nhash_free(NHASH hash); void nhash_free_with_memfree_ptr(NHASH hash); void nhash_clear(NHASH hash); int nhash_set_int(NHASH hash, const char *key, int val); int nhash_set_ptr(NHASH hash, const char *key, void *val); int nhash_get_int(NHASH hash, const char *key, int *val); int nhash_get_ptr(NHASH hash, const char *key, void **val); int nhash_each(NHASH hash, int(* func)(struct nhash *, void *), void *data); void nhash_del(NHASH hash, const char *key); int nhash_set_int_with_hkey(NHASH hash, const char *key, int hkey, int val); int nhash_set_ptr_with_hkey(NHASH hash, const char *key, int hkey, void *val); int nhash_get_int_with_hkey(NHASH hash, const char *key, int hkey, int *val); int nhash_get_ptr_with_hkey(NHASH hash, const char *key, int hkey, void **val); void nhash_del_with_hkey(NHASH hash, const char *key, int hkey); int nhash_num(NHASH hash); int nhash_hkey(const char *ptr); #endif ngraph-gtk-6.09.05/src/ngraph_api.c0000644000175000017500000003011513624701076013727 00000000000000#include "common.h" #include #include "gtk/init.h" #include "ngraph.h" #include "object.h" #include "mathfn.h" #include "shell.h" #include "osystem.h" union ngraph_val { int i; double d; char *str; struct narray *ary; }; static struct narray * allocate_iarray(ngraph_arg *arg) { struct narray *array; int i; if (arg == NULL) { return NULL; } if (arg->num < 1) { return NULL; } array = arraynew(sizeof(int)); if (array == NULL) { return NULL; } for (i = 0; i < arg->num; i++) { struct narray *ptr; ptr = arrayadd(array, &arg->ary[i].i); if (ptr == NULL) { arrayfree(array); return NULL; } } return array; } static struct narray * allocate_darray(ngraph_arg *arg) { struct narray *array; int i; if (arg == NULL) { return NULL; } if (arg->num < 1) { return NULL; } array = arraynew(sizeof(double)); if (array == NULL) { return NULL; } for (i = 0; i < arg->num; i++) { struct narray *ptr; ptr = arrayadd(array, &arg->ary[i].d); if (ptr == NULL) { arrayfree(array); return NULL; } } return array; } static struct narray * allocate_sarray(ngraph_arg *arg) { struct narray *array; int i; if (arg == NULL) { return NULL; } if (arg->num < 1) { return NULL; } array = arraynew(sizeof(char *)); if (array == NULL) { return NULL; } for (i = 0; i < arg->num; i++) { struct narray *ptr; ptr = arrayadd2(array, arg->ary[i].str); if (ptr == NULL) { arrayfree(array); return NULL; } } return array; } int ngraph_object_put(struct objlist *obj, const char *vname, int id, ngraph_value *val) { enum ngraph_object_field_type type; int r; void *valp; struct narray *array; r = -1; type = chkobjfieldtype(obj, vname); switch (type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: valp = NULL; r = putobj(obj, vname, id, valp); break; case NSTR: case NOBJ: if (val->str) { valp = g_strdup(val->str); } else { valp = NULL; } r = putobj(obj, vname, id, valp); if (r < 0 && valp) { g_free(valp); } break; case NPOINTER: /* these fields may not be writable */ case NBFUNC: case NIFUNC: case NDFUNC: case NSFUNC: case NIAFUNC: case NDAFUNC: case NSAFUNC: valp = NULL; r = putobj(obj, vname, id, valp); break; case NBOOL: case NINT: case NENUM: valp = &val->i; r = putobj(obj, vname, id, valp); break; case NDOUBLE: valp = &val->d; r = putobj(obj, vname, id, valp); break; case NIARRAY: array = allocate_iarray(val->ary); r = putobj(obj, vname, id, array); if (r < 0) { arrayfree(array); } break; case NDARRAY: array = allocate_darray(val->ary); r = putobj(obj, vname, id, array); if (r < 0) { arrayfree(array); } break; case NSARRAY: array = allocate_sarray(val->ary); r = putobj(obj, vname, id, array); if (r < 0) { arrayfree2(array); } break; } return r; } static const char ** allocate_obj_arg(struct objlist *obj, const char *vname, ngraph_arg *arg) { int i, num; const char *arglist; const char **ary; num = arg->num; if (num < 1) { /* If the type of the field is NENUM the number of the argument is 0. */ return NULL; } arglist = chkobjarglist(obj, vname); if (arglist && arglist[0] == '\0') { return NULL; } ary = g_malloc0(sizeof(*ary) * (num + 1)); if (ary == NULL) { return NULL; } if (arglist == NULL) { for (i = 0; i < num; i++) { ary[i] = arg->ary[i].str; } } else { int n; n = 0; for (i = 0; arglist[i]; i++) { int is_a; if (n >= num) { break; } is_a = (arglist[i + 1]== 'a'); switch (arglist[i]) { case 'b': case 'c': ary[n] = (char *) &arg->ary[n].i; break; case 'i': if (is_a) { ary[n] = (char *) allocate_iarray(arg->ary[n].ary); } else { ary[n] = (char *) &arg->ary[n].i; } break; case 'd': if (is_a) { ary[n] = (char *) allocate_darray(arg->ary[n].ary); } else { ary[n] = (char *) &arg->ary[n].d; } break; case 's': if (is_a) { ary[n] = (char *) allocate_sarray(arg->ary[n].ary); } else { ary[n] = arg->ary[n].str; } break; case 'p': ary[n] = NULL; break; case 'o': ary[n] = arg->ary[n].str; break; } if (is_a) { i++; } n++; } } return ary; } static void free_obj_arg(const char **ary, struct objlist *obj, const char *vname, ngraph_arg *arg) { int i, n, num; const char *arglist; num = arg->num; if (num < 1) { return; } arglist = chkobjarglist(obj, vname); if (arglist == NULL) { return; } n = 0; for (i = 0; arglist[i]; i++) { int is_a; if (n >= num) { break; } is_a = (arglist[i + 1]== 'a'); switch (arglist[i]) { case 'b': case 'c': break; case 'i': case 'd': if (is_a) { arrayfree((struct narray *) ary[n]); } break; case 's': if (is_a) { arrayfree2((struct narray *) ary[n]); } break; case 'p': break; case 'o': break; } if (is_a) { i++; } n++; } g_free(ary); return; } int ngraph_object_get(struct objlist *obj, const char *vname, int id, ngraph_arg *arg, ngraph_returned_value *val) { int r, argc; enum ngraph_object_field_type type; const char **argv; union ngraph_val nval; type = chkobjfieldtype(obj, vname); argc = arg->num; argv = allocate_obj_arg(obj, vname, arg); r = getobj(obj, vname, id, argc, (char **) argv, &nval); free_obj_arg(argv, obj, vname, arg); if (r < 0) { return r; } switch (type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NSFUNC: case NSTR: case NOBJ: val->str = nval.str; break; case NPOINTER: /* these fields may not be writable */ break; case NBFUNC: case NIFUNC: case NBOOL: case NINT: case NENUM: val->i = nval.i; break; case NDFUNC: case NDOUBLE: val->d = nval.d; break; case NIAFUNC: case NIARRAY: val->ary.num = arraynum(nval.ary); val->ary.data.ia = arraydata(nval.ary); break; case NDAFUNC: case NDARRAY: val->ary.num = arraynum(nval.ary); val->ary.data.da = arraydata(nval.ary); break; case NSAFUNC: case NSARRAY: val->ary.num = arraynum(nval.ary); val->ary.data.sa = arraydata(nval.ary); break; } return r; } int ngraph_object_exe(struct objlist *obj, const char *vname, int id, ngraph_arg *arg) { int r, argc; enum ngraph_object_field_type type; const char **argv; type = chkobjfieldtype(obj, vname); if (type < NVFUNC) { return -1; } argc = arg->num; argv = allocate_obj_arg(obj, vname, arg); r = exeobj(obj, vname, id, argc, (char **) argv); free_obj_arg(argv, obj, vname, arg); return r; } struct objlist * ngraph_get_object(const char *name) { return getobject(name); } struct objlist * ngraph_get_object_instances_by_str(const char *str, int *n, int **ids) { struct narray iarray; int *id_ary, *adata, anum, i, r; struct objlist *obj; if (n) { *n = 0; } if (ids == NULL) { return NULL; } *ids = NULL; if (str == NULL) { return NULL; } arrayinit(&iarray,sizeof(int)); r = chkobjilist((char *) str, &obj, &iarray, TRUE, NULL); if (r) { arraydel(&iarray); return NULL; } anum = arraynum(&iarray); adata = arraydata(&iarray); id_ary = g_malloc(sizeof(*id_ary) * (anum + 1)); if (id_ary == NULL) { arraydel(&iarray); return NULL; } for (i = 0; i < anum; i++) { id_ary[i] = adata[i]; } id_ary[i] = -1; arraydel(&iarray); if (n) { *n = anum; } *ids = id_ary; return obj; } int ngraph_object_get_id_by_oid(struct objlist *obj, int oid) { return chkobjoid(obj, oid); } int ngraph_object_move_top(struct objlist *obj, int id) { return movetopobj(obj, id); } int ngraph_object_move_last(struct objlist *obj, int id) { return movelastobj(obj, id); } int ngraph_object_move_up(struct objlist *obj, int id) { return moveupobj(obj, id); } int ngraph_object_move_down(struct objlist *obj, int id) { return movedownobj(obj, id); } int ngraph_object_exchange(struct objlist *obj, int id1, int id2) { return exchobj(obj, id1, id2); } int ngraph_object_copy(struct objlist *obj, int dist, int src) { return copy_obj_field(obj, dist, src, NULL); } int ngraph_object_new(struct objlist *obj) { return newobj(obj); } int ngraph_object_del(struct objlist *obj, int id) { return delobj(obj, id); } int ngraph_object_exist(struct objlist *obj, int id) { int last; if (obj == NULL) { return -1; } last = chkobjlastinst(obj); if (id < 0 || id > last) { return -1; } return id; } const char * ngraph_get_object_name(struct objlist *obj) { return chkobjectname(obj); } const char * ngraph_get_object_alias(struct objlist *obj) { return chkobjectalias(obj); } int ngraph_get_object_field_num(struct objlist *obj) { return chkobjfieldnum(obj); } const char * ngraph_get_object_field(struct objlist *obj, int i) { return chkobjfieldname(obj, i); } int ngraph_get_object_field_permission(struct objlist *obj, const char *field) { return chkobjperm(obj, field); } enum ngraph_object_field_type ngraph_get_object_field_type(struct objlist *obj, const char *field) { return chkobjfieldtype(obj, field); } const char * ngraph_get_object_field_args(struct objlist *obj, const char *field) { return chkobjarglist(obj, field); } struct objlist * ngraph_get_parent_object(struct objlist *obj) { return chkobjparent(obj); } struct objlist * ngraph_get_root_object(void) { return chkobjroot(); } const char * ngraph_get_object_version(struct objlist *obj) { return chkobjver(obj); } int ngraph_get_object_id(struct objlist *obj) { return chkobjectid(obj); } int ngraph_get_object_size(struct objlist *obj) { return chkobjsize(obj); } int ngraph_get_object_current_id(struct objlist *obj) { return chkobjcurinst(obj); } int ngraph_get_object_last_id(struct objlist *obj) { return chkobjlastinst(obj); } struct objlist * ngraph_get_next_object(struct objlist *obj) { return obj->next; } struct objlist * ngraph_get_child_object(struct objlist *obj) { return obj->child; } int ngraph_puts(const char *s) { return putstdout(s); } int ngraph_err_puts(const char *s) { return putstderr(s); } void ngraph_sleep(double t) { nsleep(t); } char * ngraph_get_init_file(const char *init_file) { char *homedir, *confdir, *inifile;; struct objlist *sys; if (init_file == NULL) { return NULL; } sys = chkobject("system"); getobj(sys, "home_dir", 0, 0, NULL, &homedir); getobj(sys, "conf_dir", 0, 0, NULL, &confdir); inifile = NULL; if (findfilename(homedir, CONFTOP, init_file)) { inifile = getfilename(homedir, CONFTOP, init_file); } else if (findfilename(confdir, CONFTOP, init_file)) { inifile = getfilename(confdir, CONFTOP, init_file); } return inifile; } int ngraph_exec_loginshell(char *loginshell, struct objlist *obj, int id) { int r, allocnow; struct objlist *lobj; struct narray iarray; char *arg; if (loginshell == NULL) { allocnow = nallocconsole(); r = exeobj(obj, "shell", id, 0, NULL); if (allocnow) { nfreeconsole(); } } else { arrayinit(&iarray, sizeof(int)); arg = loginshell; if (getobjilist2(&arg, &lobj, &iarray, TRUE)) { return -1; } arraydel(&iarray); if (lobj == obj) { allocnow = nallocconsole(); } else { allocnow = FALSE; } r = sexeobj(loginshell); if (allocnow) { nallocconsole(); } } return r; } int ngraph_initialize(int *argc, char ***argv) { return n_initialize(argc, argv); } void ngraph_save_shell_history(void) { n_save_shell_history(); } void ngraph_finalize(void) { n_finalize(); } void * ngraph_malloc(size_t size) { return g_malloc(size); } void ngraph_free(void *ptr) { return g_free(ptr); } char * ngraph_strdup(const char *str) { return g_strdup(str); } int ngraph_set_exec_func(const char *name, ngraph_plugin_exec func) { return system_set_exec_func(name, func); } ngraph-gtk-6.09.05/src/oarc.h0000644000175000017500000000022013070106167012535 00000000000000#ifndef OARC_HEADER #define OARC_HEADER enum arc_point_type { ARC_POINT_TYPE_R, ARC_POINT_TYPE_ANGLE1, ARC_POINT_TYPE_ANGLE2, }; #endif ngraph-gtk-6.09.05/src/shellcm.c0000644000175000017500000007523613775236405013271 00000000000000/* * $Id: shellcm.c,v 1.29 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include #define USE_HASH 1 #include "object.h" #include "nstring.h" #include "ioutil.h" #include "mathfn.h" #include "shell.h" #include "shell_error.h" #include "shellcm.h" #include "math/math_equation.h" #define ERR 128 int cmcd(struct nshell *nshell,int argc,char **argv) { char *home; if (argv[1]!=NULL) { if (nchdir(argv[1])!=0) { sherror3(argv[0],ERRNODIR,argv[1]); return ERR; } } else { if ((home=getval(nshell,"HOME"))!=NULL) { if (nchdir(home)!=0) { sherror3(argv[0],ERRNODIR,home); return ERR; } } } return 0; } int cmecho(struct nshell *nshell,int argc,char **argv) { int i, nbr; nbr = (argc > 1 && strcmp(argv[1], "-n") == 0); for (i = (nbr) ? 2 : 1; i < argc; i++) { printfstdout("%s",argv[i]); if (i != (argc - 1)) printfstdout(" "); } if (! nbr) putstdout(""); return 0; } int cmbasename(struct nshell *nshell,int argc,char **argv) { char *bname; if (argc < 2) { return 1; } if (argv[1] == NULL) { return 1; } bname = getbasename(argv[1]); if (bname == NULL) { return 1; } if (argc > 2) { int len, ext_len; len = strlen(bname); ext_len = strlen(argv[2]); if (ext_len < len && strcmp(bname + len - ext_len, argv[2]) == 0) { bname[len - ext_len] = '\0'; } } putstdout(bname); g_free(bname); return 0; } int cmdirname(struct nshell *nshell,int argc,char **argv) { char *tmp; if (argc < 2) { return 1; } if (argv[1] == NULL) return 1; tmp = getdirname(argv[1]); putstdout(tmp); g_free(tmp); return 0; } int cmseq(struct nshell *nshell, int argc, char **argv) { int i, f, l; double x, first, last, inc; char *endptr; switch (argc) { case 0: case 1: sherror4(argv[0], ERRSMLARG); return ERR; case 2: f = 0; i = 0; l = 1; first = 1.0; inc = 1.0; break; case 3: f = 1; i = 0; l = 2; inc = 1.0; break; default: f = 1; i = 2; l = 3; break; } if (f) { errno = 0; first= strtod(argv[f], &endptr); if (errno || endptr == argv[f]) { sherror4(argv[0], ERRNUMERIC); return ERR; } } if (l) { errno = 0; last= strtod(argv[l], &endptr); if (errno || endptr == argv[l]) { sherror4(argv[0], ERRNUMERIC); return ERR; } } if (i) { errno = 0; inc= strtod(argv[i], &endptr); if (errno || endptr == argv[i]) { sherror4(argv[0], ERRNUMERIC); return ERR; } } for (x = first; (inc < 0) ? (x >= last) : (x <= last); x += inc) { printfstdout("%G\n", x); } return 0; } int cmeval(struct nshell *nshell,int argc,char **argv) { GString *s; int i,rcode; s = g_string_sized_new(128); if (s == NULL) { return ERR; } for (i = 1; i < argc; i++) { g_string_append(s, argv[i]); g_string_append_c(s, ' '); } rcode = cmdexecute(nshell, s->str); g_string_free(s, TRUE); if (rcode != 0 && rcode != 1) { return ERR; } return 0; } int cmexit(struct nshell *nshell,int argc,char **argv) { int a; char *endptr; if (argc>2) { sherror4(argv[0],ERREXTARG); return ERREXTARG; } else if (argc==2) { a=strtol(argv[1],&endptr,10); if (endptr[0]!='\0') { sherror3(argv[0],ERRNUMERIC,argv[1]); return ERRNUMERIC; } else { nshell->quit=TRUE; return a; } } else { nshell->quit=TRUE; return nshell->status; } } #if USE_HASH static int printexp(struct nhash *h, void *data) { printfstdout("%.256s\n", h->key); return 0; } #endif int cmexport(struct nshell *nshell,int argc,char **argv) { #if USE_HASH if (argv[1] == NULL) { nhash_each(nshell->exproot, printexp, NULL); } else { int i; for (i = 1; i < argc; i++) { if (addexp(nshell, argv[i]) == NULL) return ERR; } } return 0; #else struct explist *valcur; if (argv[1]==NULL) { valcur=nshell->exproot; while (valcur!=NULL) { printfstdout("%.256s\n",valcur->val); valcur=valcur->next; } return 0; } else { int i; for (i=1;ival.p; if (!val->func) printfstdout("%.256s=%.256s\n", val->name, (char *)(val->val)); return 0; } static int print_func(struct nhash *h, void *data) { struct vallist *val; struct cmdlist *cmdcur; struct prmlist *prmcur; val = (struct vallist *) h->val.p; if (val->func) { printfstdout("%.256s=()\n", val->name); putstdout("{"); cmdcur = val->val; while (cmdcur) { prmcur = cmdcur->prm; printfstdout(" "); while (prmcur) { if (prmcur->str) printfstdout("%.256s ", prmcur->str); prmcur = prmcur->next; } printfstdout("\n"); cmdcur = cmdcur->next; } putstdout("}"); } return 0; } int cmset(struct nshell *nshell,int argc,char **argv) { #if USE_HASH char *s; int j, r, ops; if (argc < 2) { nhash_each(nshell->valroot, print_val, NULL); nhash_each(nshell->valroot, print_func, NULL); return 0; } for (j = 1; j < argc; j++) { s = argv[j]; if (s[0] == '-' && s[1] == '-' && s[2] == '\0') { j++; if (j == argc) { r = set_shell_args(nshell, j, nshell->argv[0], argc, argv); if (r) { r = ERR; } return r; } break; } else if (s[0] == '-' && s[1] == '\0') { nshell->optionv = FALSE; nshell->optionx = FALSE; j++; break; } else if (s[0] == '-' || s[0] == '+') { if (s[1] == '\0' || strchr("efvx", s[1]) == NULL) { sherror3(argv[0], ERRILOPS, s); return ERRILOPS; } } else { break; } } if (j != argc) { r = set_shell_args(nshell, j, nshell->argv[0], argc, argv); if (r) { return ERR; } } for (j = 1 ; j < argc; j++) { s = argv[j]; if (s[0] == '-') { ops=TRUE; } else if (s[0]=='+') { ops=FALSE; } else { break; } switch (s[1]) { case 'e': nshell->optione = ops; break; case 'f': nshell->optionf = ops; break; case 'v': nshell->optionv = ops; break; case 'x': nshell->optionx = ops; break; } } #else struct vallist *valcur; struct cmdlist *cmdcur; struct prmlist *prmcur; char *s; unsigned int n; int j,ops; char **argv2; int argc2; if (argc<2) { valcur=nshell->valroot; while (valcur!=NULL) { if (!valcur->func) printfstdout("%.256s=%.256s\n",valcur->name,(char *)(valcur->val)); valcur=valcur->next; } valcur=nshell->valroot; while (valcur!=NULL) { if (valcur->func) { printfstdout("%.256s=()\n",valcur->name); putstdout("{"); cmdcur=valcur->val; while (cmdcur!=NULL) { prmcur=cmdcur->prm; printfstdout(" "); while (prmcur!=NULL) { if (prmcur->str!=NULL) printfstdout("%.256s ",prmcur->str); prmcur=prmcur->next; } printfstdout("\n"); cmdcur=cmdcur->next; } putstdout("}"); } valcur=valcur->next; } } else { for (j=1;jargv)[0])+1))==NULL) return ERR; strcpy(s,(nshell->argv)[0]); if (arg_add(&argv2,s)==NULL) { g_free(s); arg_del(argv2); return ERR; } for (;jargv); nshell->argv=argv2; nshell->argc=argc2; } for (j=1;joptione=ops; break; case 'f': nshell->optionf=ops; break; case 'v': nshell->optionv=ops; break; case 'x': nshell->optionx=ops; break; } } } #endif return 0; } int cmshift(struct nshell *nshell,int argc,char **argv) { int i,a; char *arg,*endptr; if (argc>2) { sherror4(argv[0],ERREXTARG); return ERREXTARG; } else if (argc==2) { arg=argv[1]; a=strtol(arg,&endptr,10); if (endptr[0]!='\0') { sherror3(argv[0],ERRNUMERIC,arg); return ERRNUMERIC; } } else a=1; if (a<0) a=0; if ((a+1)>=nshell->argc) a=nshell->argc-1; for (i=a+1;iargc;i++) { g_free(nshell->argv[i-a]); nshell->argv[i-a]=nshell->argv[i]; nshell->argv[i]=NULL; } nshell->argc-=a; return 0; } int cmtype(struct nshell *nshell,int argc,char **argv) { struct prmlist *prm2; struct cmdlist *cmdcur; int j; char *cmdname; shell_proc proc; for (j=1;j= 0) { printfstdout("%.256s is a shell keyword.\n", argv[j]); } else if ((cmdcur=getfunc(nshell,argv[j]))!=NULL) { printfstdout("%.256s is a function.\n",argv[j]); printfstdout("%.256s=()\n",argv[j]); putstdout("{"); while (cmdcur!=NULL) { prm2=cmdcur->prm; printfstdout(" "); while (prm2!=NULL) { if (prm2->str!=NULL) printfstdout("%.256s ",prm2->str); prm2=prm2->next; } printfstdout("\n"); cmdcur=cmdcur->next; } putstdout("}"); } else if ((strcmp0(".",argv[j])==0) || (strcmp0("break",argv[j])==0) || (strcmp0("continue",argv[j])==0) || (strcmp0("return",argv[j])==0)) { printfstdout("%.256s is a shell built in.\n",argv[j]); } else { proc = check_cmd(argv[j]); if (proc) { printfstdout("%.256s is a shell built in.\n",argv[j]); } else { cmdname=nsearchpath(getval(nshell,"PATH"),argv[j],FALSE); if (cmdname==NULL) { sherror3(argv[0],ERRCFOUND,argv[j]); } else { printfstdout("%.256s is %.256s.\n",argv[j],cmdname); } g_free(cmdname); } } } return 0; } int cmunset(struct nshell *nshell,int argc,char **argv) { int i; for (i=1;iparent==parent) { for (i=1;i<*tab;i++) printfstdout("\t"); printfstdout("%.256s\n",objcur->name); objdisp(objcur,objcur,tab); } objcur=objcur->next; } (*tab)--; } static void dispfield(struct objlist *obj,char *name) { int j; enum ngraph_object_field_type ftype; char perm[4],type[10]; char **enumlist; ftype=chkobjfieldtype(obj,name); switch (ftype) { case NVOID: strcpy(type,"void"); break; case NBOOL: strcpy(type,"bool"); break; #if USE_NCHAR case NCHAR: strcpy(type,"char"); break; #endif case NINT: strcpy(type,"int"); break; case NDOUBLE: strcpy(type,"double"); break; case NSTR: strcpy(type,"char*"); break; case NPOINTER: strcpy(type,"void*"); break; case NIARRAY: strcpy(type,"int[]"); break; case NDARRAY: strcpy(type,"double[]"); break; case NSARRAY: strcpy(type,"char*[]"); break; case NENUM: strcpy(type,"enum("); break; case NOBJ: strcpy(type,"obj"); break; #if USE_NLABEL case NLABEL: strcpy(type,"label"); break; #endif case NVFUNC: strcpy(type,"void("); break; case NBFUNC: strcpy(type,"bool("); break; #if USE_NCHAR case NCFUNC: strcpy(type,"char("); break; #endif case NIFUNC: strcpy(type,"int("); break; case NDFUNC: strcpy(type,"double("); break; case NSFUNC: strcpy(type,"char*("); break; case NIAFUNC: strcpy(type,"int[]("); break; case NDAFUNC: strcpy(type,"double[]("); break; case NSAFUNC: strcpy(type,"char*[]("); break; default: strcpy(type,"unknown"); break; } if (chkobjperm(obj,name) & NREAD) perm[0]='r'; else perm[0]='-'; if (chkobjperm(obj,name) & NWRITE) perm[1]='w'; else perm[1]='-'; if (chkobjperm(obj,name) & NEXEC) perm[2]='x'; else perm[2]='-'; perm[3]='\0'; printfstdout("%3s %16.256s %.256s", (char *)perm,(char *)name,(char *)type); if (ftype>=NVFUNC) { const char *alist; if ((alist=chkobjarglist(obj,name))!=NULL) { if (alist[0]=='\0') printfstdout(" void"); else for (j=0;alist[j]!='\0';j++) { switch (alist[j]) { case 'b': printfstdout(" bool"); break; #if USE_NCHAR case 'c': printfstdout(" char"); break; #endif case 'i': printfstdout(" int"); break; case 'd': printfstdout(" double"); break; case 's': printfstdout(" char*"); break; case 'p': printfstdout(" void*"); break; case 'o': printfstdout(" obj"); break; } if (alist[j+1]=='a') { printfstdout("[]"); j++; } } } printfstdout(" )"); } else if (ftype==NENUM) { if ((enumlist=(char **)chkobjarglist(obj,name))!=NULL) { for (j=0;enumlist[j] && enumlist[j][0];j++) printfstdout(" %s",enumlist[j]); printfstdout(" )"); } } printfstdout("\n"); } int cmobject(struct nshell *nshell,int argc,char **argv) { struct objlist *obj; int i,j,tab; if (argc<2) { tab=0; objdisp(chkobjroot(),NULL,&tab); return 0; } else { if ((obj=getobject(argv[1]))==NULL) return ERR; } if (argc==2) { printfstdout("object: %.256s\n",chkobjectname(obj)); if (chkobjectalias(obj)!=NULL) printfstdout("alias: %.256s\n",chkobjectalias(obj)); else printfstdout("alias:\n"); printfstdout("version: %.256s\n",chkobjver(obj)); if (chkobjparent(obj)!=NULL) printfstdout("parent: %.256s\n",chkobjectname(chkobjparent(obj))); else printfstdout("parent: (null)\n"); printfstdout("object id: %d\n",chkobjectid(obj)); printfstdout("number of fields: %d\n",chkobjfieldnum(obj)); printfstdout("size of instance: %d\n",chkobjsize(obj)); printfstdout("current instance: %d\n",chkobjcurinst(obj)); printfstdout("last instance id: %d\n",chkobjlastinst(obj)); for (i=0;inext; } } int cmderive(struct nshell *nshell,int argc,char **argv) { struct objlist *obj; int i,noinst; noinst=FALSE; for (i=1;i2) { sherror4(argv[0],ERRMANYARG); return ERRMANYARG; } arrayinit(&iarray,sizeof(int)); if (getobjilist(argv[1],&obj,&iarray,TRUE,NULL)) return ERR; anum=arraynum(&iarray); if (anum==0) { sherror4(argv[0],ERRNONEINST); arraydel(&iarray); return ERRNONEINST; } adata=arraydata(&iarray); for (i=0;i3) { sherror4(argv[0],ERRMANYARG); return ERRMANYARG; } else { objname = argv[1]; } arrayinit(&iarray,sizeof(int)); if (chkobjilist(objname,&obj,&iarray,TRUE,NULL)) anum=0; else { anum=arraynum(&iarray); arraydel(&iarray); } if (! quiet) printfstdout("%d\n",anum); if (anum==0) return ERRNONEINST; return 0; } static void put_field_str(const char *valstr, int escape) { if (valstr == NULL) { return; } if (escape) { char *tmp; tmp = g_strescape(valstr, NULL); if (tmp == NULL) { return; } putstdout(tmp); g_free(tmp); } else { putstdout(valstr); } } int cmget(struct nshell*nshell,int argc,char **argv) { struct objlist *obj; struct narray iarray; char *field,*valstr; int i,j,k,l,anum,len,*adata; int nowrite,nofield,noid,quote,perm,multi,escape; if (argc<2) { sherror4(argv[0],ERROBJARG); return ERROBJARG; } arrayinit(&iarray,sizeof(int)); if (getobjilist(argv[1],&obj,&iarray,TRUE,NULL)) return ERR; anum=arraynum(&iarray); adata=arraydata(&iarray); if (anum==0) { sherror4(argv[0],ERRNONEINST); arraydel(&iarray); return ERRNONEINST; } nowrite=FALSE; nofield=FALSE; noid=FALSE; quote=FALSE; escape=FALSE; for (j=2;j2) { sherror4(argv[0],ERRMANYARG); return ERRMANYARG; } arrayinit(&iarray,sizeof(int)); if (getobjilist(argv[1],&obj,&iarray,TRUE,NULL)) return ERR; anum=arraynum(&iarray); adata=arraydata(&iarray); if (anum!=2) { sherror4(argv[0],ERRTWOINST); arraydel(&iarray); return ERRTWOINST; } id1=adata[0]; id2=adata[1]; arraydel(&iarray); if (strcmp0(argv[0],"move")==0) { if (moveobj(obj,id2,id1)==-1) return ERR; } else if (strcmp0(argv[0],"exch")==0) { if (exchobj(obj,id2,id1)==-1) return ERR; } return 0; } int cmmovetop(struct nshell*nshell,int argc,char **argv) { struct objlist *obj; struct narray iarray; int i,anum,top,rcode,*adata; if (argc<2) { sherror4(argv[0],ERROBJARG); return ERROBJARG; } else if (argc>2) { sherror4(argv[0],ERRMANYARG); return ERRMANYARG; } arrayinit(&iarray,sizeof(int)); if (getobjilist(argv[1],&obj,&iarray,TRUE,NULL)) return ERR; anum=arraynum(&iarray); adata=arraydata(&iarray); if (strcmp0(argv[0],"movetop")==0) top=0; else if (strcmp0(argv[0],"moveup")==0) top=1; else if (strcmp0(argv[0],"movedown")==0) top=2; else top=3; for (i=0;istr, &vd, &rcode, &err_msg); g_string_free(s, TRUE); if (ecode) { if (err_msg) { printfstderr("shell: %s\n", err_msg); g_free(err_msg); } else { sherror4(argv[0],ecode); } return ecode; } if (rcode == MATH_VALUE_NAN) { putstdout("nan"); return ERR; } else if (rcode == MATH_VALUE_UNDEF) { putstdout("undefined"); return ERR; } if (argv[0][0] == 'd') { printfstdout("%.15e\n", vd); } else { printfstdout("%.0f\n", round(vd)); } return 0; } int cmread(struct nshell *nshell,int argc,char **argv) { int c,len; char *po; GString *s; s = g_string_sized_new(64); if (s == NULL) { return ERR; } while (TRUE) { c = getstdin(); if (c == '\n' || c == EOF) { break; } g_string_append_c(s, c); } if (argc == 1) { addval(nshell, "REPLY", s->str); } else { char *ifs; int i; po = s->str; ifs = getval(nshell, "IFS"); for (i = 1; i < argc; i++) { char *s2; s2 = getitok2(&po, &len, ifs); if (s2) { addval(nshell, argv[i], s2); g_free(s2); } else { addval(nshell, argv[i], ""); } } } g_string_free(s, TRUE); return (c == EOF) ? ERR : 0; } int cmwhich(struct nshell*nshell,int argc,char **argv) { int i, r, start, quiet; char *path; if (strcmp0(argv[1], "-q")) { start = 1; quiet = FALSE; } else { start = 2; quiet = TRUE; } if (argc < 1 + start) { sherror4(argv[0], ERRSMLARG); return ERRSMLARG; } r = 0; for (i = start; i < argc; i++) { if (check_cmd(argv[i])) { if (! quiet) { printfstdout("%s: shell built-in command\n", argv[i]); } } else { path = g_find_program_in_path(argv[i]); if (path == NULL) { r = 1; } else { if (! quiet) { putstdout(path); } g_free(path); } } } return r; } ngraph-gtk-6.09.05/src/shellcm.h0000644000175000017500000000515713070106167013256 00000000000000/* * $Id: shellcm.h,v 1.8 2009-11-12 01:36:45 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef SHELLCM_HEADER #define SHELLCM_HEADER #include "shell.h" int cmcd(struct nshell *nshell,int argc,char **argv); int cmecho(struct nshell *nshell,int argc,char **argv); int cmbasename(struct nshell *nshell,int argc,char **argv); int cmdirname(struct nshell *nshell,int argc,char **argv); int cmeval(struct nshell *nshell,int argc,char **argv); int cmexit(struct nshell *nshell,int argc,char **argv); int cmexport(struct nshell *nshell,int argc,char **argv); int cmpwd(struct nshell *nshell,int argc,char **argv); int cmset(struct nshell *nshell,int argc,char **argv); int cmshift(struct nshell *nshell,int argc,char **argv); int cmtype(struct nshell *nshell,int argc,char **argv); int cmunset(struct nshell *nshell,int argc,char **argv); int cmobject(struct nshell *nshell,int argc,char **argv); int cmderive(struct nshell *nshell,int argc,char **argv); int cmnew(struct nshell *nshell,int argc,char **argv); int cmdel(struct nshell *nshell,int argc,char **argv); int cmexist(struct nshell *nshell,int argc,char **argv); int cmget(struct nshell *nshell,int argc,char **argv); int cmput(struct nshell *nshell,int argc,char **argv); int cmdup(struct nshell *nshell,int argc,char **argv); int cmcpy(struct nshell *nshell,int argc,char **argv); int cmmove(struct nshell *nshell,int argc,char **argv); int cmmovetop(struct nshell *nshell,int argc,char **argv); int cmcopy(struct nshell *nshell,int argc,char **argv); int cmexch(struct nshell *nshell,int argc,char **argv); int cmexe(struct nshell *nshell,int argc,char **argv); int cmdexpr(struct nshell *nshell,int argc,char **argv); int cmread(struct nshell *nshell,int argc,char **argv); int cmseq(struct nshell *nshell, int argc, char **argv); int cmwhich(struct nshell*nshell,int argc,char **argv); #endif ngraph-gtk-6.09.05/src/gettext.h0000644000175000017500000002311713070106167013307 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # undef gettext # define gettext(Msgid) ((const char *) (Msgid)) # undef dgettext # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # undef dcgettext # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # undef dngettext # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # undef dcngettext # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # undef textdomain # define textdomain(Domainname) ((const char *) (Domainname)) # undef bindtextdomain # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # undef bind_textdomain_codeset # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ ngraph-gtk-6.09.05/src/shell_error.h0000644000175000017500000000162113667344121014145 00000000000000#ifndef _SHELL_ERROR_HEADER #define _SHELL_ERROR_HEADER #define ERRUEXPEOF 100 #define ERRBADSUB 101 #define ERRSYNTAX 102 #define ERRUEXPTOK 103 #define ERRIDENT 104 #define ERRCFOUND 105 #define ERRSYSTEM 106 #define ERREXTARG 107 #define ERRSMLARG 108 #define ERRMANYARG 109 #define ERRNOFILE 110 #define ERREOF 111 #define ERRNOFIL 112 #define ERRREAD 113 #define ERROPEN 114 #define ERROBJARG 115 #define ERRINSTARG 116 #define ERRNEWINST 117 #define ERRCMFIELD 118 #define ERRVALUE 119 #define ERRTWOINST 120 #define ERRNONEINST 121 #define ERRNOFIELD 122 #define ERRNUMERIC 123 #define ERROPTION 124 #define ERRILOPS 125 #define ERRUNSET 126 #define ERRNODIR 127 #define ERRMSYNTAX 128 #define ERRMILLEGAL 129 #define ERRMNEST 130 #define ERRMARG 131 #define ERRMFAT 132 #define ERRTESTNEST 133 #define ERRTESTSYNTAX 134 #define ERRSECURITY 135 #define ERRMEMORY 136 #define ERRUNKNOWNSH 137 #endif ngraph-gtk-6.09.05/src/ogra2.c0000644000175000017500000001007313624701076012632 00000000000000/* * $Id: ogra2.c,v 1.7 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include "object.h" #define NAME "gra2" #define PARENT "object" #define OVERSION "1.00.00" #define ERRLOCK 100 static char *gra2errorlist[]={ "device is locked", }; #define ERRNUM (sizeof(gra2errorlist) / sizeof(*gra2errorlist)) static int gra2init(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC, layer; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; GC=-1; if (_putobj(obj,"_GC",inst,&GC)) return 1; layer = FALSE; if (_putobj(obj,"_layer",inst,&layer)) return 1; return 0; } static int gra2done(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; struct narray *sarray; struct objlist *gobj; int gid,deletegra,id,n; char *gfield; N_VALUE *ginst; char *device; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_GC",inst,&GC); _getobj(obj,"delete_gra",inst,&deletegra); _getobj(obj,"_list",inst,&sarray); n = arraynum(sarray); if (GC != -1 && (! deletegra || n == 0)) { error2(obj,ERRLOCK,argv[0]); return 1; } if (n < 1) { return 0; } gobj=getobjlist(arraynget_str(sarray,0),&gid,&gfield,NULL); if (gobj==NULL) return 0; if ((ginst=getobjinstoid(gobj,gid))==NULL) return 0; if (GC!=-1) _exeobj(gobj,"close",ginst,0,NULL); if (!_getobj(gobj,"_device",ginst,&device)) { g_free(device); _putobj(gobj,"_device",ginst,NULL); } if (deletegra) { if (_getobj(gobj,"id",ginst,&id)) return 0; delobj(gobj,id); } return 0; } static int gra2clear(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int i,num; struct narray *sarray; _getobj(obj,"_list",inst,&sarray); num=arraynum(sarray); for (i=num-1;i>0;i--) arrayndel2(sarray,i); return 0; } #ifdef COMPILE_UNUSED_FUNCTIONS static int gra2disconnect(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; struct narray *sarray; int gid; char *gfield; _getobj(obj,"_GC",inst,&GC); _getobj(obj,"_list",inst,&sarray); _putobj(obj,"_list",inst,NULL); if (arraynum(sarray)) { struct objlist *gobj; gobj=getobjlist(arraynget_str(sarray,0),&gid,&gfield,NULL); if (gobj) { char *ginst,*device; if ((ginst=getobjinstoid(gobj,gid))==NULL) return 0; if (GC!=-1) _exeobj(gobj,"close",ginst,0,NULL); if (!_getobj(gobj,"_device",ginst,&device)) { if (device) { g_free(device); } _putobj(gobj,"_device",ginst,NULL); } } } arrayfree2(sarray); return 0; } #endif /* COMPILE_UNUSED_FUNCTIONS */ static struct objtable gra2[] = { {"init",NVFUNC,NEXEC,gra2init,NULL,0}, {"done",NVFUNC,NEXEC,gra2done,NULL,0}, {"clear",NVFUNC,NREAD|NEXEC,gra2clear,"",0}, {"_list",NSARRAY,NREAD,NULL,NULL,0}, {"_GC",NINT,NREAD,NULL,NULL,0}, {"_layer",NBOOL,NREAD,NULL,NULL,0}, {"delete_gra",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"disconnect",NVFUNC,NREAD|NEXEC,NULL,"",0}, }; #define TBLNUM (sizeof(gra2) / sizeof(*gra2)) void * addgra2(void) /* addgra2() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,gra2,ERRNUM,gra2errorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/ngraph_resource.rc.in0000644000175000017500000000115213070106167015566 00000000000000101 ICON "ngraph.ico" 1 VERSIONINFO FILEVERSION %VERSION% PRODUCTVERSION %VERSION% BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "" VALUE "FileDescription", "Ngraph-gtk" VALUE "FileVersion", "%VERSION%" VALUE "InternalName", "ngraph" VALUE "LegalCopyright", "Copyright (C) 2003 Satoshi ISHIZAKA" VALUE "OriginalFilename", "ngraph.exe" VALUE "ProductName", "Ngraph-gtk" VALUE "ProductVersion", "%VERSION%" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END ngraph-gtk-6.09.05/src/shellux.c0000644000175000017500000002244513667344165013323 00000000000000/* * $Id: shellux.c,v 1.9 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "nstring.h" #include "object.h" #include "ioutil.h" #include "shell.h" #include "shell_error.h" #include "shellux.h" int cmtrue(struct nshell *nshell,int argc,char **argv) { return 0; } int cmfalse(struct nshell *nshell,int argc,char **argv) { return 1; } int cmsleep(struct nshell *nshell,int argc,char **argv) { double a; char *arg,*endptr; if (argc<2) { sherror4(argv[0],ERRSMLARG); return ERRSMLARG; } arg=argv[1]; a=strtod(arg, &endptr); if (endptr[0]!='\0') { sherror3(argv[0],ERRNUMERIC,arg); return ERRNUMERIC; } nsleep(a); return 0; } static int testexpand(int pre,int *oppo,int *numpo, int numbuf[],char *numbufc[],char opbuf[],int prebuf[]) { int argnum; int d1,d2; char *endptr1,*endptr2; GStatBuf buf; while ((*oppo>=0) && (pre<=prebuf[*oppo])) { if (strchr("!nzdefrswx",opbuf[*oppo])!=NULL) argnum=1; else argnum=2; switch (opbuf[*oppo]) { case 'n': if (numbufc[*numpo]==NULL) return FALSE; numbuf[*numpo]=(numbufc[*numpo][0]=='\0')?FALSE:TRUE; numbufc[*numpo]=NULL; break; case 'z': if (numbufc[*numpo]==NULL) return FALSE; numbuf[*numpo]=(numbufc[*numpo][0]=='\0')?TRUE:FALSE; numbufc[*numpo]=NULL; break; case 'd': case 'f': case 'e': case 'r': case 'w': case 'x': case 's': if (numbufc[*numpo]==NULL) return FALSE; if (nstat(numbufc[*numpo],&buf)!=0) { numbuf[*numpo]=FALSE; numbufc[*numpo]=NULL; break; } switch (opbuf[*oppo]) { case 'd': numbuf[*numpo]=((buf.st_mode & S_IFMT)==S_IFDIR)?TRUE:FALSE; break; case 'f': numbuf[*numpo]=((buf.st_mode & S_IFMT)==S_IFREG)?TRUE:FALSE; break; case 'e': numbuf[*numpo]=TRUE; break; case 'r': numbuf[*numpo]=((buf.st_mode & S_IREAD)!=0)?TRUE:FALSE; break; case 'w': numbuf[*numpo]=((buf.st_mode & S_IWRITE)!=0)?TRUE:FALSE; break; case 'x': numbuf[*numpo]=((buf.st_mode & S_IEXEC)!=0)?TRUE:FALSE; break; case 's': numbuf[*numpo]=(buf.st_size>0)?TRUE:FALSE; break; } numbufc[*numpo]=NULL; break; case '!': numbuf[*numpo]=(numbuf[*numpo])?FALSE:TRUE; numbufc[*numpo]=NULL; break; case 'o': numbuf[*numpo-1]=numbuf[*numpo-1] || numbuf[*numpo]; numbufc[*numpo]=NULL; break; case 'a': numbuf[*numpo-1]=numbuf[*numpo-1] && numbuf[*numpo]; numbufc[*numpo]=NULL; break; case '?': case '*': case '>': case '}': case '<': case '{': if ((numbufc[*numpo-1]==NULL) || (numbufc[*numpo]==NULL)) return FALSE; d1=strtol(numbufc[*numpo-1],&endptr1,10); d2=strtol(numbufc[*numpo],&endptr2,10); if ((endptr1[0]!='\0') || (endptr2[0]!='\0')) return FALSE; switch (opbuf[*oppo]) { case '?': numbuf[*numpo-1]=(d1==d2)?TRUE:FALSE; break; case '*': numbuf[*numpo-1]=(d1!=d2)?TRUE:FALSE; break; case '>': numbuf[*numpo-1]=(d1>d2)?TRUE:FALSE; break; case '}': numbuf[*numpo-1]=(d1>=d2)?TRUE:FALSE; break; case '<': numbuf[*numpo-1]=(d1=20) { sherror4(argv[0],ERRTESTNEST); return 1; } opbuf[oppo]='!'; prebuf[oppo]=4; i++; } else if (((strcmp2(argv[i],"-d")==0) || (strcmp2(argv[i],"-e")==0) || (strcmp2(argv[i],"-f")==0) || (strcmp2(argv[i],"-r")==0) || (strcmp2(argv[i],"-s")==0) || (strcmp2(argv[i],"-w")==0) || (strcmp2(argv[i],"-x")==0) || (strcmp2(argv[i],"-z")==0) || (strcmp2(argv[i],"-n")==0)) && ((i+1)=20) { sherror4(argv[0],ERRTESTNEST); return 1; } opbuf[oppo]='('; prebuf[oppo]=0; i++; } else { numpo++; if (numpo>=20) { sherror4(argv[0],ERRTESTNEST); return 1; } numbuf[numpo]=strlen(argv[i]); numbufc[numpo]=argv[i]; numeric=TRUE; i++; } } else { if (((strcmp2(argv[i],"-eq")==0) || (strcmp2(argv[i],"-ne")==0) || (strcmp2(argv[i],"-gt")==0) || (strcmp2(argv[i],"-ge")==0) || (strcmp2(argv[i],"-lt")==0) || (strcmp2(argv[i],"-le")==0) || (strcmp2(argv[i],"=")==0) || (strcmp2(argv[i],"!=")==0)) && ((i+1)=20) { sherror4(argv[0],ERRTESTNEST); return 1; } if (strcmp2(argv[i],"-eq")==0) opbuf[oppo]='?'; else if (strcmp2(argv[i],"-ne")==0) opbuf[oppo]='*'; else if (strcmp2(argv[i],"-gt")==0) opbuf[oppo]='>'; else if (strcmp2(argv[i],"-ge")==0) opbuf[oppo]='}'; else if (strcmp2(argv[i],"-lt")==0) opbuf[oppo]='<'; else if (strcmp2(argv[i],"-le")==0) opbuf[oppo]='{'; else if (strcmp2(argv[i],"=")==0) opbuf[oppo]='='; else if (strcmp2(argv[i],"!=")==0) opbuf[oppo]='+'; prebuf[oppo]=5; numeric=FALSE; i++; } else if (strcmp2(argv[i],")")==0) { if (!testexpand(1,&oppo,&numpo,numbuf,numbufc,opbuf,prebuf)) { sherror4(argv[0],ERRTESTSYNTAX); return 1; } if ((oppo!=-1) && (opbuf[oppo]=='(')) oppo--; numeric=TRUE; i++; } else if ((strcmp2(argv[i],"-a")==0) && ((i+1)=20) { sherror4(argv[0],ERRTESTNEST); return 1; } opbuf[oppo]=argv[i][1]; prebuf[oppo]=3; numeric=FALSE; i++; } else if ((strcmp2(argv[i],"-o")==0) && ((i+1)=20) { sherror4(argv[0],ERRTESTNEST); return 1; } opbuf[oppo]=argv[i][1]; prebuf[oppo]=2; numeric=FALSE; i++; } else if (strcmp2(argv[i],"]")==0) { i++; } else { sherror4(argv[0],ERRTESTSYNTAX); return 1; } } } if (!numeric || !testexpand(1,&oppo,&numpo,numbuf,numbufc,opbuf,prebuf)) { sherror4(argv[0],ERRTESTSYNTAX); return 1; } if ((oppo>-1) || (numpo!=0)) { sherror4(argv[0],ERRTESTSYNTAX); return 1; } if (numbuf[0]) return 0; else return 1; } ngraph-gtk-6.09.05/src/opath.h0000644000175000017500000000015413226510226012730 00000000000000#ifndef OPATH_HEADER #define OPATH_HEADER enum PATH_TYPE { PATH_TYPE_LINE, PATH_TYPE_CURVE, }; #endif ngraph-gtk-6.09.05/src/ngraph.h0000644000175000017500000000731013070106167013077 00000000000000#ifndef NGRAPH_HEADER #define NGRAPH_HEADER enum ngraph_object_field_type { NVOID = 0, NBOOL = 1, #if USE_NCHAR NCHAR = 2, #endif NINT = 3, NDOUBLE = 4, NSTR = 5, NPOINTER = 6, NIARRAY = 7, NDARRAY = 8, NSARRAY = 9, NENUM = 10, NOBJ = 11, #if USE_LABEL NLABEL = 12, #endif NVFUNC = 20, NBFUNC = 21, #if USE_NCHAR NCFUNC = 22, #endif NIFUNC = 23, NDFUNC = 24, NSFUNC = 25, NIAFUNC = 26, NDAFUNC = 27, NSAFUNC = 28, }; #define NREAD 1 #define NWRITE 2 #define NEXEC 4 struct ngraph_plugin; struct objlist; union _ngraph_value; struct ngraph_obj { struct objlist *obj; int id; }; struct ngraph_array; typedef struct ngraph_array ngraph_arg; typedef union _ngraph_value { int i; double d; const char *str; struct ngraph_array *ary; } ngraph_value; struct ngraph_array { int num; union _ngraph_value ary[1]; }; typedef union _ngraph_returned_value { int i; double d; const char *str; struct { int num; union { const int *ia; const double *da; const char * const *sa; } data; } ary; } ngraph_returned_value; typedef int (* ngraph_plugin_exec) (int argc, char *argv[]); typedef int (* ngraph_plugin_open) (void); typedef int (* ngraph_plugin_close) (void); int ngraph_initialize(int *argc, char ***argv); void ngraph_save_shell_history(void); void ngraph_finalize(void); char *ngraph_get_init_file(const char *init_file); int ngraph_exec_loginshell(char *loginshell, struct objlist *obj, int id); int ngraph_object_put(struct objlist *obj, const char *vname, int id, ngraph_value *val); int ngraph_object_get(struct objlist *obj, const char *vname, int id, ngraph_arg *arg, ngraph_returned_value *val); int ngraph_object_exe(struct objlist *obj, const char *vname, int id, ngraph_arg *arg); int ngraph_object_get_id_by_oid(struct objlist *obj, int oid); int ngraph_object_move_top(struct objlist *obj, int id); int ngraph_object_move_last(struct objlist *obj, int id); int ngraph_object_move_up(struct objlist *obj, int id); int ngraph_object_move_down(struct objlist *obj, int id); int ngraph_object_exchange(struct objlist *obj, int id1, int id2); int ngraph_object_copy(struct objlist *obj, int id_dest, int id_src); int ngraph_object_new(struct objlist *obj); int ngraph_object_del(struct objlist *obj, int id); int ngraph_object_exist(struct objlist *obj, int id); const char *ngraph_get_object_name(struct objlist *obj); const char *ngraph_get_object_alias(struct objlist *obj); const char *ngraph_get_object_field_args(struct objlist *obj, const char *field); const char *ngraph_get_object_field(struct objlist *obj, int i); const char *ngraph_get_object_version(struct objlist *obj); struct objlist *ngraph_get_object(const char *name); struct objlist *ngraph_get_parent_object(struct objlist *obj); struct objlist *ngraph_get_root_object(void); struct objlist *ngraph_get_next_object(struct objlist *obj); struct objlist *ngraph_get_child_object(struct objlist *obj); struct objlist *ngraph_get_object_instances_by_str(const char *str, int *n, int **ids); int ngraph_get_object_id(struct objlist *obj); int ngraph_get_object_size(struct objlist *obj); int ngraph_get_object_current_id(struct objlist *obj); int ngraph_get_object_last_id(struct objlist *obj); int ngraph_get_object_field_num(struct objlist *obj); int ngraph_get_object_field_permission(struct objlist *obj, const char *field); enum ngraph_object_field_type ngraph_get_object_field_type(struct objlist *obj, const char *field); int ngraph_puts(const char *s); int ngraph_err_puts(const char *s); void ngraph_sleep(double t); void *ngraph_malloc(size_t size); void ngraph_free(void *ptr); char *ngraph_strdup(const char *str); int ngraph_set_exec_func(const char *name, ngraph_plugin_exec func); #endif ngraph-gtk-6.09.05/src/ntime.h0000644000175000017500000000217613070106167012741 00000000000000/* * $Id: ntime.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ char *ndate(time_t *timep,int style); char *ntime(time_t *timep,int style); int gettimeval(char *s,time_t *time); char *nstrftime(const gchar *fmt, double mjd); void mjd2gd(double mjd, struct tm *tm); #define MJD2GD_YEAR_MIN (-1900 - 4800) ngraph-gtk-6.09.05/src/ogra2prn.c0000644000175000017500000001277713070106167013362 00000000000000/* * $Id: ogra2prn.c,v 1.8 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include "object.h" #include "nstring.h" #include "ioutil.h" #include "shell.h" #define NAME "gra2prn" #define PARENT "gra2" #define OVERSION "1.00.00" #define ERRFOPEN 100 static char *gra2perrorlist[]={ "I/O error: open file", }; #define ERRNUM (sizeof(gra2perrorlist) / sizeof(*gra2perrorlist)) struct gra2plocal { char *fname; FILE *fil; }; static int gra2pinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct gra2plocal *gra2plocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if ((gra2plocal=g_malloc(sizeof(struct gra2plocal)))==NULL) goto errexit; if (_putobj(obj,"_local",inst,gra2plocal)) goto errexit; gra2plocal->fname=NULL; gra2plocal->fil=NULL; return 0; errexit: g_free(gra2plocal); return 1; } static int gra2pdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct gra2plocal *gra2plocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&gra2plocal); if (gra2plocal->fname!=NULL) g_free(gra2plocal->fname); if (gra2plocal->fil!=NULL) fclose(gra2plocal->fil); return 0; } static FILE * mytempfile(char *pfx, char **name) { int fd; fd = n_mkstemp(NULL, pfx, name); if (fd < 0) { return NULL; } return fdopen(fd, "w+"); } static int gra2p_output(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct gra2plocal *gra2plocal; struct objlist *sys; char code; int *cpar; int i; char *cstr; char *graf,*sname,*sver; char *pfx; GString *s; char *driver,*option,*prn; struct nshell *nshell; gra2plocal=(struct gra2plocal *)argv[2]; code=*(char *)(argv[3]); cpar=(int *)argv[4]; cstr=argv[5]; if (code=='I') { if (gra2plocal->fil) fclose(gra2plocal->fil); gra2plocal->fil=NULL; if ((sys=getobject("system"))==NULL) return 1; if (getobj(sys,"temp_prefix",0,0,NULL,&pfx)) return 1; if (gra2plocal->fname) g_free(gra2plocal->fname); gra2plocal->fil = mytempfile(pfx, &gra2plocal->fname); if (gra2plocal->fil == NULL) { error2(obj,ERRFOPEN,gra2plocal->fname); g_free(gra2plocal->fname); gra2plocal->fname = NULL; return 1; } if (getobj(sys,"name",0,0,NULL,&sname)) return 1; if (getobj(sys,"version",0,0,NULL,&sver)) return 1; if (getobj(sys,"GRAF",0,0,NULL,&graf)) return 1; fprintf(gra2plocal->fil,"%s\n",graf); fprintf(gra2plocal->fil,"%%Creator: %s ver %s\n",sname,sver); } if (gra2plocal->fil) { fputc(code,gra2plocal->fil); if (cpar[0]==-1) { for (i=0;cstr[i]!='\0';i++) { fputc(cstr[i],gra2plocal->fil); } } else { fprintf(gra2plocal->fil,",%d",cpar[0]); for (i=1;i<=cpar[0];i++) { fprintf(gra2plocal->fil,",%d",cpar[i]); } } fputc('\n',gra2plocal->fil); if (code=='E') { fclose(gra2plocal->fil); gra2plocal->fil=NULL; _getobj(obj,"driver",inst,&driver); _getobj(obj,"option",inst,&option); _getobj(obj,"prn",inst,&prn); s = g_string_sized_new(256); if (s == NULL) { goto errexit; } if (driver) { g_string_append(s, driver); } g_string_append_c(s,' '); if (option) { g_string_append(s,option); } g_string_append(s," '"); if (gra2plocal->fname) { g_string_append(s, gra2plocal->fname); } g_string_append(s,"' "); if (prn) { g_string_append(s,prn); } nshell = newshell(); if (nshell == NULL) { g_string_free(s, TRUE); goto errexit; } ngraphenvironment(nshell); cmdexecute(nshell, s->str); delshell(nshell); g_string_free(s, TRUE); g_unlink(gra2plocal->fname); g_free(gra2plocal->fname); gra2plocal->fname=NULL; } } return 0; errexit: if (gra2plocal->fname) { g_unlink(gra2plocal->fname); g_free(gra2plocal->fname); gra2plocal->fname = NULL; } return 1; } static struct objtable gra2p[] = { {"init",NVFUNC,NEXEC,gra2pinit,NULL,0}, {"done",NVFUNC,NEXEC,gra2pdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"driver",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"option",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"prn",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"_local",NPOINTER,0,NULL,NULL,0}, {"_output",NVFUNC,0,gra2p_output,NULL,0}, }; #define TBLNUM (sizeof(gra2p) / sizeof(*gra2p)) void * addgra2prn(void) /* addgra2prn() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,gra2p,ERRNUM,gra2perrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/ngraph_export.map0000644000175000017500000000007513070106167015027 00000000000000{ global: ngraph_*; _IO_stdin_used; local: *; }; ngraph-gtk-6.09.05/src/Makefile.in0000644000175000017500000030127514143146775013536 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @OS_WIN32_TRUE@am__append_1 = -no-undefined -export-symbols ngraph.def -Wl,libngraph_resource.o @OS_WIN32_TRUE@am__append_2 = -Wl,ngraph_resource.o @OS_WIN32_FALSE@am__append_3 = @vsymldflags@ @OS_WIN32_FALSE@pkglibexec_PROGRAMS = terminal$(EXEEXT) @OS_OSX_TRUE@am__append_4 = $(MAC_INTEGRATION_LIBS) @OS_OSX_TRUE@am__append_5 = $(MAC_INTEGRATION_CFLAGS) bin_PROGRAMS = ngraph$(EXEEXT) subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" \ "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" PROGRAMS = $(bin_PROGRAMS) $(pkglibexec_PROGRAMS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } LTLIBRARIES = $(lib_LTLIBRARIES) libngraph_la_DEPENDENCIES = gtk/libngraphui.la math/libmath.la am_libngraph_la_OBJECTS = libngraph_la-axis.lo libngraph_la-nconfig.lo \ libngraph_la-gra.lo libngraph_la-ioutil.lo \ libngraph_la-mathcode.lo libngraph_la-mathfn.lo \ libngraph_la-nstring.lo libngraph_la-ntime.lo \ libngraph_la-oagrid.lo libngraph_la-oarc.lo \ libngraph_la-oaxis.lo libngraph_la-object.lo \ libngraph_la-odarray.lo libngraph_la-odouble.lo \ libngraph_la-odraw.lo libngraph_la-odata.lo \ libngraph_la-ofit.lo libngraph_la-ogra.lo \ libngraph_la-ogra2.lo libngraph_la-ogra2fil.lo \ libngraph_la-ogra2nul.lo libngraph_la-ogra2prn.lo \ libngraph_la-oiarray.lo libngraph_la-oint.lo \ libngraph_la-olegend.lo libngraph_la-omark.lo \ libngraph_la-omath.lo libngraph_la-omerge.lo \ libngraph_la-oprm.lo libngraph_la-orect.lo \ libngraph_la-oroot.lo libngraph_la-osarray.lo \ libngraph_la-oshell.lo libngraph_la-oregexp.lo \ libngraph_la-ostring.lo libngraph_la-osystem.lo \ libngraph_la-otext.lo libngraph_la-opath.lo \ libngraph_la-shell.lo libngraph_la-shellcm.lo \ libngraph_la-shellux.lo libngraph_la-spline.lo \ libngraph_la-nhash.lo libngraph_la-strconv.lo \ libngraph_la-oio.lo libngraph_la-ngraph_api.lo \ libngraph_la-oparameter.lo libngraph_la_OBJECTS = $(am_libngraph_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libngraph_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libngraph_la_CFLAGS) \ $(CFLAGS) $(libngraph_la_LDFLAGS) $(LDFLAGS) -o $@ am_ngraph_OBJECTS = main.$(OBJEXT) ngraph_OBJECTS = $(am_ngraph_OBJECTS) ngraph_LDADD = $(LDADD) ngraph_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(ngraph_LDFLAGS) $(LDFLAGS) -o $@ am__terminal_SOURCES_DIST = terminal.c @OS_WIN32_FALSE@am_terminal_OBJECTS = terminal-terminal.$(OBJEXT) terminal_OBJECTS = $(am_terminal_OBJECTS) terminal_LDADD = $(LDADD) terminal_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(terminal_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libngraph_la-axis.Plo \ ./$(DEPDIR)/libngraph_la-gra.Plo \ ./$(DEPDIR)/libngraph_la-ioutil.Plo \ ./$(DEPDIR)/libngraph_la-mathcode.Plo \ ./$(DEPDIR)/libngraph_la-mathfn.Plo \ ./$(DEPDIR)/libngraph_la-nconfig.Plo \ ./$(DEPDIR)/libngraph_la-ngraph_api.Plo \ ./$(DEPDIR)/libngraph_la-nhash.Plo \ ./$(DEPDIR)/libngraph_la-nstring.Plo \ ./$(DEPDIR)/libngraph_la-ntime.Plo \ ./$(DEPDIR)/libngraph_la-oagrid.Plo \ ./$(DEPDIR)/libngraph_la-oarc.Plo \ ./$(DEPDIR)/libngraph_la-oaxis.Plo \ ./$(DEPDIR)/libngraph_la-object.Plo \ ./$(DEPDIR)/libngraph_la-odarray.Plo \ ./$(DEPDIR)/libngraph_la-odata.Plo \ ./$(DEPDIR)/libngraph_la-odouble.Plo \ ./$(DEPDIR)/libngraph_la-odraw.Plo \ ./$(DEPDIR)/libngraph_la-ofit.Plo \ ./$(DEPDIR)/libngraph_la-ogra.Plo \ ./$(DEPDIR)/libngraph_la-ogra2.Plo \ ./$(DEPDIR)/libngraph_la-ogra2fil.Plo \ ./$(DEPDIR)/libngraph_la-ogra2nul.Plo \ ./$(DEPDIR)/libngraph_la-ogra2prn.Plo \ ./$(DEPDIR)/libngraph_la-oiarray.Plo \ ./$(DEPDIR)/libngraph_la-oint.Plo \ ./$(DEPDIR)/libngraph_la-oio.Plo \ ./$(DEPDIR)/libngraph_la-olegend.Plo \ ./$(DEPDIR)/libngraph_la-omark.Plo \ ./$(DEPDIR)/libngraph_la-omath.Plo \ ./$(DEPDIR)/libngraph_la-omerge.Plo \ ./$(DEPDIR)/libngraph_la-oparameter.Plo \ ./$(DEPDIR)/libngraph_la-opath.Plo \ ./$(DEPDIR)/libngraph_la-oprm.Plo \ ./$(DEPDIR)/libngraph_la-orect.Plo \ ./$(DEPDIR)/libngraph_la-oregexp.Plo \ ./$(DEPDIR)/libngraph_la-oroot.Plo \ ./$(DEPDIR)/libngraph_la-osarray.Plo \ ./$(DEPDIR)/libngraph_la-oshell.Plo \ ./$(DEPDIR)/libngraph_la-ostring.Plo \ ./$(DEPDIR)/libngraph_la-osystem.Plo \ ./$(DEPDIR)/libngraph_la-otext.Plo \ ./$(DEPDIR)/libngraph_la-shell.Plo \ ./$(DEPDIR)/libngraph_la-shellcm.Plo \ ./$(DEPDIR)/libngraph_la-shellux.Plo \ ./$(DEPDIR)/libngraph_la-spline.Plo \ ./$(DEPDIR)/libngraph_la-strconv.Plo ./$(DEPDIR)/main.Po \ ./$(DEPDIR)/terminal-terminal.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libngraph_la_SOURCES) $(ngraph_SOURCES) \ $(terminal_SOURCES) DIST_SOURCES = $(libngraph_la_SOURCES) $(ngraph_SOURCES) \ $(am__terminal_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ SUBDIRS = math gtk EXTRA_DIST = ngraph_export.map ngraph_resource.rc.in libngraph_resource.rc.in ngraph.ico libngraph_ldflags = -version-info $(LIBNGRAPH_VERSION) \ $(READLINE_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(GSL_LIBS) \ $(am__append_1) $(am__append_3) $(am__append_4) libngraph_cflags = $(am__append_5) ngraph_ldflags = -lngraph $(am__append_2) ngraph_lib = libngraph.la @OS_WIN32_TRUE@MINGW_DIR = $(top_srcdir)/mingw @OS_WIN32_TRUE@BUILT_SOURCES = ngraph.def libngraph_resource.o ngraph_resource.o @OS_WIN32_TRUE@CLEANFILES = $(BUILT_SOURCES) libngraph_resource.rc ngraph_resource.rc @OS_WIN32_FALSE@terminal_SOURCES = terminal.c @OS_WIN32_FALSE@terminal_CFLAGS = $(GTK_CFLAGS) lib_LTLIBRARIES = $(ngraph_lib) libngraph_la_SOURCES = axis.c axis.h nconfig.c nconfig.h gra.c gra.h \ ioutil.c ioutil.h mathcode.c mathcode.h mathfn.c mathfn.h \ nstring.c nstring.h ntime.c ntime.h oagrid.c oarc.c oarc.h \ oaxis.h oaxis.c object.c object.h odarray.c odouble.c odraw.c \ odraw.h odata.c odata.h ofit.c ofit.h ogra.c ogra.h \ ogra_error.h ogra2.c ogra2fil.c ogra2nul.c ogra2prn.c \ oiarray.c oiarray.h oint.c olegend.c olegend.h omark.c \ omath.c omerge.c omerge.h oprm.c orect.c oroot.c oroot.h \ osarray.c oshell.c oregexp.c ostring.c osystem.c osystem.h \ otext.c opath.c opath.h shell.c shell.h shell_error.h \ shellcm.c shellcm.h shellux.c shellux.h spline.c spline.h \ common.h nhash.h nhash.c strconv.c strconv.h oio.c gettext.h \ ngraph_api.c oparameter.c oparameter.h libngraph_la_CFLAGS = $(GTK_CFLAGS) $(GSL_CFLAGS) $(libngraph_cflags) -I$(top_builddir) -DCCNAME='"'$(CC)'"' $(GTKSOURCEVIEW_CFLAGS) libngraph_la_LIBADD = gtk/libngraphui.la math/libmath.la libngraph_la_LDFLAGS = $(libngraph_ldflags) ngraph_SOURCES = main.c ngraph_DEPENDENCIES = $(ngraph_lib) ngraph_LDFLAGS = $(ngraph_ldflags) include_HEADERS = ngraph.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj .rc $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkglibexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(pkglibexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(pkglibexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-pkglibexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(pkglibexec_PROGRAMS)'; test -n "$(pkglibexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files clean-pkglibexecPROGRAMS: @list='$(pkglibexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libngraph.la: $(libngraph_la_OBJECTS) $(libngraph_la_DEPENDENCIES) $(EXTRA_libngraph_la_DEPENDENCIES) $(AM_V_CCLD)$(libngraph_la_LINK) -rpath $(libdir) $(libngraph_la_OBJECTS) $(libngraph_la_LIBADD) $(LIBS) ngraph$(EXEEXT): $(ngraph_OBJECTS) $(ngraph_DEPENDENCIES) $(EXTRA_ngraph_DEPENDENCIES) @rm -f ngraph$(EXEEXT) $(AM_V_CCLD)$(ngraph_LINK) $(ngraph_OBJECTS) $(ngraph_LDADD) $(LIBS) terminal$(EXEEXT): $(terminal_OBJECTS) $(terminal_DEPENDENCIES) $(EXTRA_terminal_DEPENDENCIES) @rm -f terminal$(EXEEXT) $(AM_V_CCLD)$(terminal_LINK) $(terminal_OBJECTS) $(terminal_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-axis.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-gra.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ioutil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-mathcode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-mathfn.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-nconfig.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ngraph_api.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-nhash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-nstring.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ntime.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oagrid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oarc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oaxis.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-object.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-odarray.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-odata.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-odouble.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-odraw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ofit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ogra.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ogra2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ogra2fil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ogra2nul.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ogra2prn.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oiarray.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oint.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-olegend.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-omark.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-omath.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-omerge.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oparameter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-opath.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oprm.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-orect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oregexp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oroot.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-osarray.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-oshell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-ostring.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-osystem.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-otext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-shell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-shellcm.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-shellux.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-spline.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraph_la-strconv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terminal-terminal.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libngraph_la-axis.lo: axis.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-axis.lo -MD -MP -MF $(DEPDIR)/libngraph_la-axis.Tpo -c -o libngraph_la-axis.lo `test -f 'axis.c' || echo '$(srcdir)/'`axis.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-axis.Tpo $(DEPDIR)/libngraph_la-axis.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='axis.c' object='libngraph_la-axis.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-axis.lo `test -f 'axis.c' || echo '$(srcdir)/'`axis.c libngraph_la-nconfig.lo: nconfig.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-nconfig.lo -MD -MP -MF $(DEPDIR)/libngraph_la-nconfig.Tpo -c -o libngraph_la-nconfig.lo `test -f 'nconfig.c' || echo '$(srcdir)/'`nconfig.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-nconfig.Tpo $(DEPDIR)/libngraph_la-nconfig.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nconfig.c' object='libngraph_la-nconfig.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-nconfig.lo `test -f 'nconfig.c' || echo '$(srcdir)/'`nconfig.c libngraph_la-gra.lo: gra.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-gra.lo -MD -MP -MF $(DEPDIR)/libngraph_la-gra.Tpo -c -o libngraph_la-gra.lo `test -f 'gra.c' || echo '$(srcdir)/'`gra.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-gra.Tpo $(DEPDIR)/libngraph_la-gra.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gra.c' object='libngraph_la-gra.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-gra.lo `test -f 'gra.c' || echo '$(srcdir)/'`gra.c libngraph_la-ioutil.lo: ioutil.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ioutil.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ioutil.Tpo -c -o libngraph_la-ioutil.lo `test -f 'ioutil.c' || echo '$(srcdir)/'`ioutil.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ioutil.Tpo $(DEPDIR)/libngraph_la-ioutil.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ioutil.c' object='libngraph_la-ioutil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ioutil.lo `test -f 'ioutil.c' || echo '$(srcdir)/'`ioutil.c libngraph_la-mathcode.lo: mathcode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-mathcode.lo -MD -MP -MF $(DEPDIR)/libngraph_la-mathcode.Tpo -c -o libngraph_la-mathcode.lo `test -f 'mathcode.c' || echo '$(srcdir)/'`mathcode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-mathcode.Tpo $(DEPDIR)/libngraph_la-mathcode.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mathcode.c' object='libngraph_la-mathcode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-mathcode.lo `test -f 'mathcode.c' || echo '$(srcdir)/'`mathcode.c libngraph_la-mathfn.lo: mathfn.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-mathfn.lo -MD -MP -MF $(DEPDIR)/libngraph_la-mathfn.Tpo -c -o libngraph_la-mathfn.lo `test -f 'mathfn.c' || echo '$(srcdir)/'`mathfn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-mathfn.Tpo $(DEPDIR)/libngraph_la-mathfn.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mathfn.c' object='libngraph_la-mathfn.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-mathfn.lo `test -f 'mathfn.c' || echo '$(srcdir)/'`mathfn.c libngraph_la-nstring.lo: nstring.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-nstring.lo -MD -MP -MF $(DEPDIR)/libngraph_la-nstring.Tpo -c -o libngraph_la-nstring.lo `test -f 'nstring.c' || echo '$(srcdir)/'`nstring.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-nstring.Tpo $(DEPDIR)/libngraph_la-nstring.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nstring.c' object='libngraph_la-nstring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-nstring.lo `test -f 'nstring.c' || echo '$(srcdir)/'`nstring.c libngraph_la-ntime.lo: ntime.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ntime.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ntime.Tpo -c -o libngraph_la-ntime.lo `test -f 'ntime.c' || echo '$(srcdir)/'`ntime.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ntime.Tpo $(DEPDIR)/libngraph_la-ntime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ntime.c' object='libngraph_la-ntime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ntime.lo `test -f 'ntime.c' || echo '$(srcdir)/'`ntime.c libngraph_la-oagrid.lo: oagrid.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oagrid.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oagrid.Tpo -c -o libngraph_la-oagrid.lo `test -f 'oagrid.c' || echo '$(srcdir)/'`oagrid.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oagrid.Tpo $(DEPDIR)/libngraph_la-oagrid.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oagrid.c' object='libngraph_la-oagrid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oagrid.lo `test -f 'oagrid.c' || echo '$(srcdir)/'`oagrid.c libngraph_la-oarc.lo: oarc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oarc.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oarc.Tpo -c -o libngraph_la-oarc.lo `test -f 'oarc.c' || echo '$(srcdir)/'`oarc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oarc.Tpo $(DEPDIR)/libngraph_la-oarc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oarc.c' object='libngraph_la-oarc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oarc.lo `test -f 'oarc.c' || echo '$(srcdir)/'`oarc.c libngraph_la-oaxis.lo: oaxis.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oaxis.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oaxis.Tpo -c -o libngraph_la-oaxis.lo `test -f 'oaxis.c' || echo '$(srcdir)/'`oaxis.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oaxis.Tpo $(DEPDIR)/libngraph_la-oaxis.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oaxis.c' object='libngraph_la-oaxis.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oaxis.lo `test -f 'oaxis.c' || echo '$(srcdir)/'`oaxis.c libngraph_la-object.lo: object.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-object.lo -MD -MP -MF $(DEPDIR)/libngraph_la-object.Tpo -c -o libngraph_la-object.lo `test -f 'object.c' || echo '$(srcdir)/'`object.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-object.Tpo $(DEPDIR)/libngraph_la-object.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='object.c' object='libngraph_la-object.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-object.lo `test -f 'object.c' || echo '$(srcdir)/'`object.c libngraph_la-odarray.lo: odarray.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-odarray.lo -MD -MP -MF $(DEPDIR)/libngraph_la-odarray.Tpo -c -o libngraph_la-odarray.lo `test -f 'odarray.c' || echo '$(srcdir)/'`odarray.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-odarray.Tpo $(DEPDIR)/libngraph_la-odarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='odarray.c' object='libngraph_la-odarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-odarray.lo `test -f 'odarray.c' || echo '$(srcdir)/'`odarray.c libngraph_la-odouble.lo: odouble.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-odouble.lo -MD -MP -MF $(DEPDIR)/libngraph_la-odouble.Tpo -c -o libngraph_la-odouble.lo `test -f 'odouble.c' || echo '$(srcdir)/'`odouble.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-odouble.Tpo $(DEPDIR)/libngraph_la-odouble.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='odouble.c' object='libngraph_la-odouble.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-odouble.lo `test -f 'odouble.c' || echo '$(srcdir)/'`odouble.c libngraph_la-odraw.lo: odraw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-odraw.lo -MD -MP -MF $(DEPDIR)/libngraph_la-odraw.Tpo -c -o libngraph_la-odraw.lo `test -f 'odraw.c' || echo '$(srcdir)/'`odraw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-odraw.Tpo $(DEPDIR)/libngraph_la-odraw.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='odraw.c' object='libngraph_la-odraw.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-odraw.lo `test -f 'odraw.c' || echo '$(srcdir)/'`odraw.c libngraph_la-odata.lo: odata.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-odata.lo -MD -MP -MF $(DEPDIR)/libngraph_la-odata.Tpo -c -o libngraph_la-odata.lo `test -f 'odata.c' || echo '$(srcdir)/'`odata.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-odata.Tpo $(DEPDIR)/libngraph_la-odata.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='odata.c' object='libngraph_la-odata.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-odata.lo `test -f 'odata.c' || echo '$(srcdir)/'`odata.c libngraph_la-ofit.lo: ofit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ofit.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ofit.Tpo -c -o libngraph_la-ofit.lo `test -f 'ofit.c' || echo '$(srcdir)/'`ofit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ofit.Tpo $(DEPDIR)/libngraph_la-ofit.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ofit.c' object='libngraph_la-ofit.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ofit.lo `test -f 'ofit.c' || echo '$(srcdir)/'`ofit.c libngraph_la-ogra.lo: ogra.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ogra.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ogra.Tpo -c -o libngraph_la-ogra.lo `test -f 'ogra.c' || echo '$(srcdir)/'`ogra.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ogra.Tpo $(DEPDIR)/libngraph_la-ogra.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra.c' object='libngraph_la-ogra.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ogra.lo `test -f 'ogra.c' || echo '$(srcdir)/'`ogra.c libngraph_la-ogra2.lo: ogra2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ogra2.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ogra2.Tpo -c -o libngraph_la-ogra2.lo `test -f 'ogra2.c' || echo '$(srcdir)/'`ogra2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ogra2.Tpo $(DEPDIR)/libngraph_la-ogra2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2.c' object='libngraph_la-ogra2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ogra2.lo `test -f 'ogra2.c' || echo '$(srcdir)/'`ogra2.c libngraph_la-ogra2fil.lo: ogra2fil.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ogra2fil.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ogra2fil.Tpo -c -o libngraph_la-ogra2fil.lo `test -f 'ogra2fil.c' || echo '$(srcdir)/'`ogra2fil.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ogra2fil.Tpo $(DEPDIR)/libngraph_la-ogra2fil.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2fil.c' object='libngraph_la-ogra2fil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ogra2fil.lo `test -f 'ogra2fil.c' || echo '$(srcdir)/'`ogra2fil.c libngraph_la-ogra2nul.lo: ogra2nul.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ogra2nul.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ogra2nul.Tpo -c -o libngraph_la-ogra2nul.lo `test -f 'ogra2nul.c' || echo '$(srcdir)/'`ogra2nul.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ogra2nul.Tpo $(DEPDIR)/libngraph_la-ogra2nul.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2nul.c' object='libngraph_la-ogra2nul.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ogra2nul.lo `test -f 'ogra2nul.c' || echo '$(srcdir)/'`ogra2nul.c libngraph_la-ogra2prn.lo: ogra2prn.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ogra2prn.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ogra2prn.Tpo -c -o libngraph_la-ogra2prn.lo `test -f 'ogra2prn.c' || echo '$(srcdir)/'`ogra2prn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ogra2prn.Tpo $(DEPDIR)/libngraph_la-ogra2prn.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2prn.c' object='libngraph_la-ogra2prn.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ogra2prn.lo `test -f 'ogra2prn.c' || echo '$(srcdir)/'`ogra2prn.c libngraph_la-oiarray.lo: oiarray.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oiarray.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oiarray.Tpo -c -o libngraph_la-oiarray.lo `test -f 'oiarray.c' || echo '$(srcdir)/'`oiarray.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oiarray.Tpo $(DEPDIR)/libngraph_la-oiarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oiarray.c' object='libngraph_la-oiarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oiarray.lo `test -f 'oiarray.c' || echo '$(srcdir)/'`oiarray.c libngraph_la-oint.lo: oint.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oint.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oint.Tpo -c -o libngraph_la-oint.lo `test -f 'oint.c' || echo '$(srcdir)/'`oint.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oint.Tpo $(DEPDIR)/libngraph_la-oint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oint.c' object='libngraph_la-oint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oint.lo `test -f 'oint.c' || echo '$(srcdir)/'`oint.c libngraph_la-olegend.lo: olegend.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-olegend.lo -MD -MP -MF $(DEPDIR)/libngraph_la-olegend.Tpo -c -o libngraph_la-olegend.lo `test -f 'olegend.c' || echo '$(srcdir)/'`olegend.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-olegend.Tpo $(DEPDIR)/libngraph_la-olegend.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='olegend.c' object='libngraph_la-olegend.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-olegend.lo `test -f 'olegend.c' || echo '$(srcdir)/'`olegend.c libngraph_la-omark.lo: omark.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-omark.lo -MD -MP -MF $(DEPDIR)/libngraph_la-omark.Tpo -c -o libngraph_la-omark.lo `test -f 'omark.c' || echo '$(srcdir)/'`omark.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-omark.Tpo $(DEPDIR)/libngraph_la-omark.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='omark.c' object='libngraph_la-omark.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-omark.lo `test -f 'omark.c' || echo '$(srcdir)/'`omark.c libngraph_la-omath.lo: omath.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-omath.lo -MD -MP -MF $(DEPDIR)/libngraph_la-omath.Tpo -c -o libngraph_la-omath.lo `test -f 'omath.c' || echo '$(srcdir)/'`omath.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-omath.Tpo $(DEPDIR)/libngraph_la-omath.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='omath.c' object='libngraph_la-omath.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-omath.lo `test -f 'omath.c' || echo '$(srcdir)/'`omath.c libngraph_la-omerge.lo: omerge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-omerge.lo -MD -MP -MF $(DEPDIR)/libngraph_la-omerge.Tpo -c -o libngraph_la-omerge.lo `test -f 'omerge.c' || echo '$(srcdir)/'`omerge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-omerge.Tpo $(DEPDIR)/libngraph_la-omerge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='omerge.c' object='libngraph_la-omerge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-omerge.lo `test -f 'omerge.c' || echo '$(srcdir)/'`omerge.c libngraph_la-oprm.lo: oprm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oprm.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oprm.Tpo -c -o libngraph_la-oprm.lo `test -f 'oprm.c' || echo '$(srcdir)/'`oprm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oprm.Tpo $(DEPDIR)/libngraph_la-oprm.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oprm.c' object='libngraph_la-oprm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oprm.lo `test -f 'oprm.c' || echo '$(srcdir)/'`oprm.c libngraph_la-orect.lo: orect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-orect.lo -MD -MP -MF $(DEPDIR)/libngraph_la-orect.Tpo -c -o libngraph_la-orect.lo `test -f 'orect.c' || echo '$(srcdir)/'`orect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-orect.Tpo $(DEPDIR)/libngraph_la-orect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='orect.c' object='libngraph_la-orect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-orect.lo `test -f 'orect.c' || echo '$(srcdir)/'`orect.c libngraph_la-oroot.lo: oroot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oroot.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oroot.Tpo -c -o libngraph_la-oroot.lo `test -f 'oroot.c' || echo '$(srcdir)/'`oroot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oroot.Tpo $(DEPDIR)/libngraph_la-oroot.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oroot.c' object='libngraph_la-oroot.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oroot.lo `test -f 'oroot.c' || echo '$(srcdir)/'`oroot.c libngraph_la-osarray.lo: osarray.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-osarray.lo -MD -MP -MF $(DEPDIR)/libngraph_la-osarray.Tpo -c -o libngraph_la-osarray.lo `test -f 'osarray.c' || echo '$(srcdir)/'`osarray.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-osarray.Tpo $(DEPDIR)/libngraph_la-osarray.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='osarray.c' object='libngraph_la-osarray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-osarray.lo `test -f 'osarray.c' || echo '$(srcdir)/'`osarray.c libngraph_la-oshell.lo: oshell.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oshell.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oshell.Tpo -c -o libngraph_la-oshell.lo `test -f 'oshell.c' || echo '$(srcdir)/'`oshell.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oshell.Tpo $(DEPDIR)/libngraph_la-oshell.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oshell.c' object='libngraph_la-oshell.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oshell.lo `test -f 'oshell.c' || echo '$(srcdir)/'`oshell.c libngraph_la-oregexp.lo: oregexp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oregexp.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oregexp.Tpo -c -o libngraph_la-oregexp.lo `test -f 'oregexp.c' || echo '$(srcdir)/'`oregexp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oregexp.Tpo $(DEPDIR)/libngraph_la-oregexp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oregexp.c' object='libngraph_la-oregexp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oregexp.lo `test -f 'oregexp.c' || echo '$(srcdir)/'`oregexp.c libngraph_la-ostring.lo: ostring.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ostring.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ostring.Tpo -c -o libngraph_la-ostring.lo `test -f 'ostring.c' || echo '$(srcdir)/'`ostring.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ostring.Tpo $(DEPDIR)/libngraph_la-ostring.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ostring.c' object='libngraph_la-ostring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ostring.lo `test -f 'ostring.c' || echo '$(srcdir)/'`ostring.c libngraph_la-osystem.lo: osystem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-osystem.lo -MD -MP -MF $(DEPDIR)/libngraph_la-osystem.Tpo -c -o libngraph_la-osystem.lo `test -f 'osystem.c' || echo '$(srcdir)/'`osystem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-osystem.Tpo $(DEPDIR)/libngraph_la-osystem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='osystem.c' object='libngraph_la-osystem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-osystem.lo `test -f 'osystem.c' || echo '$(srcdir)/'`osystem.c libngraph_la-otext.lo: otext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-otext.lo -MD -MP -MF $(DEPDIR)/libngraph_la-otext.Tpo -c -o libngraph_la-otext.lo `test -f 'otext.c' || echo '$(srcdir)/'`otext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-otext.Tpo $(DEPDIR)/libngraph_la-otext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='otext.c' object='libngraph_la-otext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-otext.lo `test -f 'otext.c' || echo '$(srcdir)/'`otext.c libngraph_la-opath.lo: opath.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-opath.lo -MD -MP -MF $(DEPDIR)/libngraph_la-opath.Tpo -c -o libngraph_la-opath.lo `test -f 'opath.c' || echo '$(srcdir)/'`opath.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-opath.Tpo $(DEPDIR)/libngraph_la-opath.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='opath.c' object='libngraph_la-opath.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-opath.lo `test -f 'opath.c' || echo '$(srcdir)/'`opath.c libngraph_la-shell.lo: shell.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-shell.lo -MD -MP -MF $(DEPDIR)/libngraph_la-shell.Tpo -c -o libngraph_la-shell.lo `test -f 'shell.c' || echo '$(srcdir)/'`shell.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-shell.Tpo $(DEPDIR)/libngraph_la-shell.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shell.c' object='libngraph_la-shell.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-shell.lo `test -f 'shell.c' || echo '$(srcdir)/'`shell.c libngraph_la-shellcm.lo: shellcm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-shellcm.lo -MD -MP -MF $(DEPDIR)/libngraph_la-shellcm.Tpo -c -o libngraph_la-shellcm.lo `test -f 'shellcm.c' || echo '$(srcdir)/'`shellcm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-shellcm.Tpo $(DEPDIR)/libngraph_la-shellcm.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shellcm.c' object='libngraph_la-shellcm.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-shellcm.lo `test -f 'shellcm.c' || echo '$(srcdir)/'`shellcm.c libngraph_la-shellux.lo: shellux.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-shellux.lo -MD -MP -MF $(DEPDIR)/libngraph_la-shellux.Tpo -c -o libngraph_la-shellux.lo `test -f 'shellux.c' || echo '$(srcdir)/'`shellux.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-shellux.Tpo $(DEPDIR)/libngraph_la-shellux.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='shellux.c' object='libngraph_la-shellux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-shellux.lo `test -f 'shellux.c' || echo '$(srcdir)/'`shellux.c libngraph_la-spline.lo: spline.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-spline.lo -MD -MP -MF $(DEPDIR)/libngraph_la-spline.Tpo -c -o libngraph_la-spline.lo `test -f 'spline.c' || echo '$(srcdir)/'`spline.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-spline.Tpo $(DEPDIR)/libngraph_la-spline.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spline.c' object='libngraph_la-spline.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-spline.lo `test -f 'spline.c' || echo '$(srcdir)/'`spline.c libngraph_la-nhash.lo: nhash.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-nhash.lo -MD -MP -MF $(DEPDIR)/libngraph_la-nhash.Tpo -c -o libngraph_la-nhash.lo `test -f 'nhash.c' || echo '$(srcdir)/'`nhash.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-nhash.Tpo $(DEPDIR)/libngraph_la-nhash.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nhash.c' object='libngraph_la-nhash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-nhash.lo `test -f 'nhash.c' || echo '$(srcdir)/'`nhash.c libngraph_la-strconv.lo: strconv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-strconv.lo -MD -MP -MF $(DEPDIR)/libngraph_la-strconv.Tpo -c -o libngraph_la-strconv.lo `test -f 'strconv.c' || echo '$(srcdir)/'`strconv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-strconv.Tpo $(DEPDIR)/libngraph_la-strconv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strconv.c' object='libngraph_la-strconv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-strconv.lo `test -f 'strconv.c' || echo '$(srcdir)/'`strconv.c libngraph_la-oio.lo: oio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oio.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oio.Tpo -c -o libngraph_la-oio.lo `test -f 'oio.c' || echo '$(srcdir)/'`oio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oio.Tpo $(DEPDIR)/libngraph_la-oio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oio.c' object='libngraph_la-oio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oio.lo `test -f 'oio.c' || echo '$(srcdir)/'`oio.c libngraph_la-ngraph_api.lo: ngraph_api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-ngraph_api.lo -MD -MP -MF $(DEPDIR)/libngraph_la-ngraph_api.Tpo -c -o libngraph_la-ngraph_api.lo `test -f 'ngraph_api.c' || echo '$(srcdir)/'`ngraph_api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-ngraph_api.Tpo $(DEPDIR)/libngraph_la-ngraph_api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngraph_api.c' object='libngraph_la-ngraph_api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-ngraph_api.lo `test -f 'ngraph_api.c' || echo '$(srcdir)/'`ngraph_api.c libngraph_la-oparameter.lo: oparameter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -MT libngraph_la-oparameter.lo -MD -MP -MF $(DEPDIR)/libngraph_la-oparameter.Tpo -c -o libngraph_la-oparameter.lo `test -f 'oparameter.c' || echo '$(srcdir)/'`oparameter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraph_la-oparameter.Tpo $(DEPDIR)/libngraph_la-oparameter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='oparameter.c' object='libngraph_la-oparameter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraph_la_CFLAGS) $(CFLAGS) -c -o libngraph_la-oparameter.lo `test -f 'oparameter.c' || echo '$(srcdir)/'`oparameter.c terminal-terminal.o: terminal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(terminal_CFLAGS) $(CFLAGS) -MT terminal-terminal.o -MD -MP -MF $(DEPDIR)/terminal-terminal.Tpo -c -o terminal-terminal.o `test -f 'terminal.c' || echo '$(srcdir)/'`terminal.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/terminal-terminal.Tpo $(DEPDIR)/terminal-terminal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='terminal.c' object='terminal-terminal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(terminal_CFLAGS) $(CFLAGS) -c -o terminal-terminal.o `test -f 'terminal.c' || echo '$(srcdir)/'`terminal.c terminal-terminal.obj: terminal.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(terminal_CFLAGS) $(CFLAGS) -MT terminal-terminal.obj -MD -MP -MF $(DEPDIR)/terminal-terminal.Tpo -c -o terminal-terminal.obj `if test -f 'terminal.c'; then $(CYGPATH_W) 'terminal.c'; else $(CYGPATH_W) '$(srcdir)/terminal.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/terminal-terminal.Tpo $(DEPDIR)/terminal-terminal.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='terminal.c' object='terminal-terminal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(terminal_CFLAGS) $(CFLAGS) -c -o terminal-terminal.obj `if test -f 'terminal.c'; then $(CYGPATH_W) 'terminal.c'; else $(CYGPATH_W) '$(srcdir)/terminal.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(HEADERS) install-binPROGRAMS: install-libLTLIBRARIES install-pkglibexecPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool clean-pkglibexecPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/libngraph_la-axis.Plo -rm -f ./$(DEPDIR)/libngraph_la-gra.Plo -rm -f ./$(DEPDIR)/libngraph_la-ioutil.Plo -rm -f ./$(DEPDIR)/libngraph_la-mathcode.Plo -rm -f ./$(DEPDIR)/libngraph_la-mathfn.Plo -rm -f ./$(DEPDIR)/libngraph_la-nconfig.Plo -rm -f ./$(DEPDIR)/libngraph_la-ngraph_api.Plo -rm -f ./$(DEPDIR)/libngraph_la-nhash.Plo -rm -f ./$(DEPDIR)/libngraph_la-nstring.Plo -rm -f ./$(DEPDIR)/libngraph_la-ntime.Plo -rm -f ./$(DEPDIR)/libngraph_la-oagrid.Plo -rm -f ./$(DEPDIR)/libngraph_la-oarc.Plo -rm -f ./$(DEPDIR)/libngraph_la-oaxis.Plo -rm -f ./$(DEPDIR)/libngraph_la-object.Plo -rm -f ./$(DEPDIR)/libngraph_la-odarray.Plo -rm -f ./$(DEPDIR)/libngraph_la-odata.Plo -rm -f ./$(DEPDIR)/libngraph_la-odouble.Plo -rm -f ./$(DEPDIR)/libngraph_la-odraw.Plo -rm -f ./$(DEPDIR)/libngraph_la-ofit.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2fil.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2nul.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2prn.Plo -rm -f ./$(DEPDIR)/libngraph_la-oiarray.Plo -rm -f ./$(DEPDIR)/libngraph_la-oint.Plo -rm -f ./$(DEPDIR)/libngraph_la-oio.Plo -rm -f ./$(DEPDIR)/libngraph_la-olegend.Plo -rm -f ./$(DEPDIR)/libngraph_la-omark.Plo -rm -f ./$(DEPDIR)/libngraph_la-omath.Plo -rm -f ./$(DEPDIR)/libngraph_la-omerge.Plo -rm -f ./$(DEPDIR)/libngraph_la-oparameter.Plo -rm -f ./$(DEPDIR)/libngraph_la-opath.Plo -rm -f ./$(DEPDIR)/libngraph_la-oprm.Plo -rm -f ./$(DEPDIR)/libngraph_la-orect.Plo -rm -f ./$(DEPDIR)/libngraph_la-oregexp.Plo -rm -f ./$(DEPDIR)/libngraph_la-oroot.Plo -rm -f ./$(DEPDIR)/libngraph_la-osarray.Plo -rm -f ./$(DEPDIR)/libngraph_la-oshell.Plo -rm -f ./$(DEPDIR)/libngraph_la-ostring.Plo -rm -f ./$(DEPDIR)/libngraph_la-osystem.Plo -rm -f ./$(DEPDIR)/libngraph_la-otext.Plo -rm -f ./$(DEPDIR)/libngraph_la-shell.Plo -rm -f ./$(DEPDIR)/libngraph_la-shellcm.Plo -rm -f ./$(DEPDIR)/libngraph_la-shellux.Plo -rm -f ./$(DEPDIR)/libngraph_la-spline.Plo -rm -f ./$(DEPDIR)/libngraph_la-strconv.Plo -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/terminal-terminal.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \ install-pkglibexecPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/libngraph_la-axis.Plo -rm -f ./$(DEPDIR)/libngraph_la-gra.Plo -rm -f ./$(DEPDIR)/libngraph_la-ioutil.Plo -rm -f ./$(DEPDIR)/libngraph_la-mathcode.Plo -rm -f ./$(DEPDIR)/libngraph_la-mathfn.Plo -rm -f ./$(DEPDIR)/libngraph_la-nconfig.Plo -rm -f ./$(DEPDIR)/libngraph_la-ngraph_api.Plo -rm -f ./$(DEPDIR)/libngraph_la-nhash.Plo -rm -f ./$(DEPDIR)/libngraph_la-nstring.Plo -rm -f ./$(DEPDIR)/libngraph_la-ntime.Plo -rm -f ./$(DEPDIR)/libngraph_la-oagrid.Plo -rm -f ./$(DEPDIR)/libngraph_la-oarc.Plo -rm -f ./$(DEPDIR)/libngraph_la-oaxis.Plo -rm -f ./$(DEPDIR)/libngraph_la-object.Plo -rm -f ./$(DEPDIR)/libngraph_la-odarray.Plo -rm -f ./$(DEPDIR)/libngraph_la-odata.Plo -rm -f ./$(DEPDIR)/libngraph_la-odouble.Plo -rm -f ./$(DEPDIR)/libngraph_la-odraw.Plo -rm -f ./$(DEPDIR)/libngraph_la-ofit.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2fil.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2nul.Plo -rm -f ./$(DEPDIR)/libngraph_la-ogra2prn.Plo -rm -f ./$(DEPDIR)/libngraph_la-oiarray.Plo -rm -f ./$(DEPDIR)/libngraph_la-oint.Plo -rm -f ./$(DEPDIR)/libngraph_la-oio.Plo -rm -f ./$(DEPDIR)/libngraph_la-olegend.Plo -rm -f ./$(DEPDIR)/libngraph_la-omark.Plo -rm -f ./$(DEPDIR)/libngraph_la-omath.Plo -rm -f ./$(DEPDIR)/libngraph_la-omerge.Plo -rm -f ./$(DEPDIR)/libngraph_la-oparameter.Plo -rm -f ./$(DEPDIR)/libngraph_la-opath.Plo -rm -f ./$(DEPDIR)/libngraph_la-oprm.Plo -rm -f ./$(DEPDIR)/libngraph_la-orect.Plo -rm -f ./$(DEPDIR)/libngraph_la-oregexp.Plo -rm -f ./$(DEPDIR)/libngraph_la-oroot.Plo -rm -f ./$(DEPDIR)/libngraph_la-osarray.Plo -rm -f ./$(DEPDIR)/libngraph_la-oshell.Plo -rm -f ./$(DEPDIR)/libngraph_la-ostring.Plo -rm -f ./$(DEPDIR)/libngraph_la-osystem.Plo -rm -f ./$(DEPDIR)/libngraph_la-otext.Plo -rm -f ./$(DEPDIR)/libngraph_la-shell.Plo -rm -f ./$(DEPDIR)/libngraph_la-shellcm.Plo -rm -f ./$(DEPDIR)/libngraph_la-shellux.Plo -rm -f ./$(DEPDIR)/libngraph_la-spline.Plo -rm -f ./$(DEPDIR)/libngraph_la-strconv.Plo -rm -f ./$(DEPDIR)/main.Po -rm -f ./$(DEPDIR)/terminal-terminal.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-pkglibexecPROGRAMS .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-pkglibexecPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkglibexecPROGRAMS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-pkglibexecPROGRAMS .PRECIOUS: Makefile @OS_WIN32_TRUE@ngraph_resource.rc: ngraph_resource.rc.in @OS_WIN32_TRUE@ $(AWK) -f $(MINGW_DIR)/winrc_version.awk -v VERSION=$(VERSION) $^ > $@ @OS_WIN32_TRUE@libngraph_resource.rc: libngraph_resource.rc.in @OS_WIN32_TRUE@ $(AWK) -f $(MINGW_DIR)/winrc_version.awk -v VERSION=$(VERSION) $^ > $@ @OS_WIN32_TRUE@.rc.o: @OS_WIN32_TRUE@ $(WINDRES) -I $(top_srcdir)/src -o $@ $< @OS_WIN32_TRUE@ngraph.def: ngraph_api.c @OS_WIN32_TRUE@ echo "EXPORTS" > $@ @OS_WIN32_TRUE@ cat $^ | grep '^ngraph_' | sed 's/[^a-z0-9_].*//' >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/src/oroot.h0000644000175000017500000000410414142161773012765 00000000000000/* * $Id: oroot.h,v 1.3 2009-03-09 05:20:30 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef OROOT_HEADER #define OROOT_HEADER enum obj_config_type { OBJ_CONFIG_TYPE_NUMERIC, OBJ_CONFIG_TYPE_STRING, OBJ_CONFIG_TYPE_STYLE, OBJ_CONFIG_TYPE_OTHER, }; struct obj_config { char *name; enum obj_config_type type; int (* load_proc)(struct objlist *, N_VALUE *, char *, char *); void (* save_proc)(struct objlist *, N_VALUE *, char *, struct narray *); int checked; }; int obj_load_config(struct objlist *obj, N_VALUE *inst, char *title, NHASH hash); int obj_save_config(struct objlist *obj, N_VALUE *inst, char *title, struct obj_config *config, unsigned int n); void obj_save_config_string(struct objlist *obj, N_VALUE *inst, char *field, struct narray *conf); int oputabs(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int oputge1(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int oputangle(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int oputstyle(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int oputcolor(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int oputmarktype(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); #endif ngraph-gtk-6.09.05/src/shellux.h0000644000175000017500000000216113070106167013303 00000000000000/* * $Id: shellux.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ int cmtrue(struct nshell *nshell,int argc,char **argv); int cmfalse(struct nshell *nshell,int argc,char **argv); int cmtest(struct nshell *nshell,int argc,char **argv); int cmsleep(struct nshell *nshell,int argc,char **argv); ngraph-gtk-6.09.05/src/oio.c0000644000175000017500000002505413764127334012417 00000000000000/* * $Id: oio.c,v 1.6 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "nhash.h" #include "shell.h" #include "object.h" #include "ioutil.h" #include "nstring.h" #include "oroot.h" static char *io_errorlist[]={ "file is not specified.", "invalid mode.", "I/O error: open", "I/O error: read", "I/O error: write", "I/O error: seek", "IO is closed.", "IO is opened.", "I/O error:", "the method is forbidden for the security", }; #define ERRNUM (sizeof(io_errorlist) / sizeof(*io_errorlist)) #define NAME "io" #define PARENT "object" #define OVERSION "1.00.00" #define OIO_ERRFILE 100 #define OIO_ERRMODE 101 #define OIO_ERROPEN 102 #define OIO_ERRREAD 103 #define OIO_ERRWRITE 104 #define OIO_ERRSEEK 105 #define OIO_ERRCLOSED 106 #define OIO_ERROPENED 107 #define OIO_ERRSTD 108 #define OIO_ERRSYSSECURTY 109 char *seek_whence[]={ "set", "cur", "end", NULL }; enum IO_SEEK_WHENCE { IO_SEEK_SET, IO_SEEK_CUR, IO_SEEK_END, }; struct io_local { FILE *fp; int popen; }; static void io_error(struct objlist *obj) { const char *str; str = g_strerror(errno); error2(obj, OIO_ERRSTD, CHK_STR(str)); } static int io_init(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; char *mode; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; mode = g_strdup("r"); if (mode == NULL) { return 1; } if (_putobj(obj, "mode", inst, mode)) { g_free(mode); return 1; } io_local = g_malloc0(sizeof(struct io_local)); if (io_local == NULL) { g_free(mode); return 1; } if (_putobj(obj, "_local", inst, io_local)) { g_free(mode); g_free(io_local); return 1; } io_local->fp = NULL; io_local->popen = FALSE; return 0; } static int io_close_sub(struct io_local *io_local) { if (io_local->fp == NULL) { return 1; } if (io_local->popen) { pclose(io_local->fp); } else { fclose(io_local->fp); } io_local->fp = NULL; return 0; } static int io_done(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&io_local); if (io_local->fp) { io_close_sub(io_local); } return 0; } static int io_open(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; char *file, *mode; if (get_security()) { error(obj, OIO_ERRSYSSECURTY); return 1; } _getobj(obj, "_local", inst, &io_local); _getobj(obj, "mode", inst, &mode); if (mode == NULL || mode[0] == '\0') { mode = "r"; } if (io_local->fp) { error(obj, OIO_ERROPENED); return 1; } file = argv[2]; if (file == NULL) { return 1; } errno = 0; if (argv[1][0] == 'p') { fp = popen(file, mode); io_local->popen = TRUE; } else { fp = nfopen(file, mode); io_local->popen = FALSE; } if (fp == NULL) { io_error(obj); g_free(fp); return 1; } _putobj(obj, "file", inst, g_strdup(file)); io_local->fp = fp; return 0; } static int io_close(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; char *s; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { return 1; } _getobj(obj, "file", inst, &s); g_free(s); _putobj(obj, "file", inst, NULL); io_close_sub(io_local); return 0; } static int io_puts(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int rcode; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { return 1; } errno = 0; if (argv[2]) { fputs(argv[2], fp); } rcode = fputs("\n", fp); if (rcode == EOF) { io_error(obj); return 1; } return 0; } static int io_gets(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int rcode; char *buf; g_free(rval->str); rval->str = NULL; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } errno = 0; rcode = fgetline(fp, &buf); if (rcode < -1) { io_error(obj); return 1; } else if (rcode) { return 1; } rval->str = buf; return 0; } static int io_getc(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int rcode; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } errno = 0; rcode = fgetc(fp); if (rcode == EOF && ferror(fp)) { io_error(obj); return 1; } rval->i = rcode; return 0; } static int io_putc(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int c; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } c = *(int *) argv[2]; errno = 0; c = fputc(c, fp); if (c == EOF) { io_error(obj); return 1; } rval->i = c; return 0; } static int io_read(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int l; size_t len, rlen; char *buf; g_free(rval->str); rval->str = NULL; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } l = * (int *) argv[2]; if (l < 0) { return 1; } else if (l < 1) { return 0; } len = l; errno = 0; buf = g_malloc(len + 1); if (buf == NULL) { io_error(obj); return 1; } rlen = fread(buf, 1, len, fp); if (rlen == 0) { if (ferror(fp)) { io_error(obj); } g_free(buf); return 1; } buf[rlen] = '\0'; rval->str = buf; return 0; } static int io_write(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; size_t len, rlen; char *buf; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } buf = argv[2]; if (buf == NULL) { return 1; } len = strlen(buf); errno = 0; rlen = fwrite(buf, 1, len, fp); if (rlen < len) { io_error(obj); return 1; } rval->i = rlen; return 0; } static int io_seek(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int r, pos, w, whence; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } _getobj(obj, "whence", inst, &w); switch (w) { case IO_SEEK_SET: whence = SEEK_SET; break; case IO_SEEK_CUR: whence = SEEK_CUR; break; case IO_SEEK_END: whence = SEEK_END; break; default: return 1; } pos = *(int *) argv[2]; errno = 0; r = fseek(fp, pos, whence); if (r) { io_error(obj); return 1; } return 0; } static int io_rewind(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } rewind(fp); return 0; } static int io_tell(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; long pos; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } errno = 0; pos = ftell(fp); if (pos < 0) { error(obj, OIO_ERRSEEK); return 1; } rval->i = pos; return 0; } static int io_flush(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int r; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } errno = 0; r = fflush(fp); if (r) { io_error(obj); return 1; } return 0; } static int io_eof(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct io_local *io_local; FILE *fp; int r; _getobj(obj, "_local", inst, &io_local); fp = io_local->fp; if (fp == NULL) { error(obj, OIO_ERRCLOSED); return 1; } r = feof(fp); rval->i = (r) ? TRUE : FALSE; return r ? 0 : 1; } static struct objtable io[] = { {"init",NVFUNC,NEXEC,io_init,NULL,0}, {"done",NVFUNC,NEXEC,io_done,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"file",NSTR,NREAD,NULL,NULL,0}, {"mode",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"open",NVFUNC,NREAD|NEXEC,io_open,"s",0}, {"popen",NVFUNC,NREAD|NEXEC,io_open,"s",0}, {"close",NVFUNC,NREAD|NEXEC,io_close,"",0}, {"puts",NVFUNC,NREAD|NEXEC,io_puts,"s",0}, {"putc",NIFUNC,NREAD|NEXEC,io_putc,"i",0}, {"gets",NSFUNC,NREAD|NEXEC,io_gets,"",0}, {"getc",NIFUNC,NREAD|NEXEC,io_getc,"",0}, {"read",NSFUNC,NREAD|NEXEC,io_read,"i",0}, {"write",NIFUNC,NREAD|NEXEC,io_write,"s",0}, {"whence",NENUM,NREAD|NWRITE,NULL,seek_whence,0}, {"seek",NVFUNC,NREAD|NEXEC,io_seek,"i",0}, {"tell",NIFUNC,NREAD|NEXEC,io_tell,"",0}, {"rewind",NVFUNC,NREAD|NEXEC,io_rewind,"",0}, {"flush",NVFUNC,NREAD|NEXEC,io_flush,"",0}, {"eof",NBFUNC,NREAD|NEXEC,io_eof,"",0}, {"_local",NPOINTER,0,NULL,NULL,0}, }; #define OIO_TBLNUM (sizeof(io) / sizeof(*io)) void * addio(void) /* addio() returns NULL on error */ { return addobject(NAME, NULL, PARENT, OVERSION, OIO_TBLNUM, io, ERRNUM, io_errorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/omerge.h0000644000175000017500000000012113235044045013066 00000000000000#ifndef OMERGE_HEADER #define OMERGE_HEADER void merge_cache_clear(void); #endif ngraph-gtk-6.09.05/src/odraw.h0000644000175000017500000000614314000500707012727 00000000000000/* * $Id: odraw.h,v 1.6 2009-08-07 02:52:40 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef ODRAW_HEADER #define ODRAW_HEADER #define ARROW_SIZE_MIN 10000 #define ARROW_SIZE_MAX 200000 enum INTERPOLATION_TYPE { INTERPOLATION_TYPE_SPLINE, INTERPOLATION_TYPE_SPLINE_CLOSE, INTERPOLATION_TYPE_BSPLINE, INTERPOLATION_TYPE_BSPLINE_CLOSE, }; enum ARROW_POSITION_TYPE { ARROW_POSITION_NONE, ARROW_POSITION_END, ARROW_POSITION_BEGIN, ARROW_POSITION_BOTH, }; #define ARROW_POSITION_TYPE_NUM (ARROW_POSITION_BOTH + 1) enum MARKER_TYPE { MARKER_TYPE_NONE, MARKER_TYPE_ARROW, MARKER_TYPE_WAVE, MARKER_TYPE_MARK, MARKER_TYPE_BAR, }; #define MARKER_TYPE_NUM (MARKER_TYPE_BAR + 1) enum SAVE_PATH_TYPE { SAVE_PATH_UNCHANGE, SAVE_PATH_FULL, SAVE_PATH_RELATIVE, SAVE_PATH_BASE, }; enum JOIN_TYPE { JOIN_TYPE_MITER, JOIN_TYPE_ROUND, JOIN_TYPE_BEVEL, }; #define JOIN_TYPE_NUM (JOIN_TYPE_BEVEL + 1) enum FONT_TYPE { FONT_TYPE_SANS_SERIF, FONT_TYPE_SERIF, FONT_TYPE_MONOSPACE, }; enum FONT_STYLE { FONT_STYLE_NORMAL = 0, FONT_STYLE_BOLD = 1, FONT_STYLE_ITALIC = 2, }; #define INTERPOLATION_TYPE_NUM (INTERPOLATION_TYPE_BSPLINE_CLOSE + 1) #define DEFAULT_LINE_WIDTH 40 #define DEFAULT_MARK_SIZE 200 #define DEFAULT_FONT_PT 2000 #define DEFAULT_SCRIPT_SIZE 7000 #define SCRIPT_SIZE_MIN 1000 #define SCRIPT_SIZE_MAX 100000 extern char *pathchar[]; extern char *joinchar[]; extern char *fontchar[]; extern char *intpchar[]; extern char *arrowchar[]; extern char *marker_type_char[]; int pathsave(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int clear_bbox(struct objlist *obj, N_VALUE *inst); int put_hsb_color(struct objlist *obj, N_VALUE *inst, int argc, char **argv, char *format); int put_fill_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int put_stroke_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int put_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int put_hsb2(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int curve_expand_points(int *pdata, int num, int intp, struct narray *expand_points); void text_get_bbox(int x, int y, char *text, char *font, int style, int pt, int dir, int space, int scriptsize, int raw, int *bbox); #endif ngraph-gtk-6.09.05/src/odouble.c0000644000175000017500000000361613070106167013251 00000000000000/* * $Id: odouble.c,v 1.6 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include "object.h" #define NAME "double" #define PARENT "object" #define OVERSION "1.00.00" #define ERRILNAME 100 static char *doubleerrorlist[]={ "", }; #define ERRNUM (sizeof(doubleerrorlist) / sizeof(*doubleerrorlist)) static int doubleinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int doubledone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static struct objtable odouble[] = { {"init",NVFUNC,NEXEC,doubleinit,NULL,0}, {"done",NVFUNC,NEXEC,doubledone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"@",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, }; #define TBLNUM (sizeof(odouble) / sizeof(*odouble)) void * adddouble(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,odouble,ERRNUM,doubleerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/odraw.c0000644000175000017500000003123114000500707012716 00000000000000/* * $Id: odraw.c,v 1.14 2009-11-16 09:13:04 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "object.h" #include "ioutil.h" #include "spline.h" #include "gra.h" #include "oroot.h" #include "odraw.h" #include "nstring.h" #include "mathfn.h" #define NAME "draw" #define PARENT "object" #define OVERSION "1.00.00" #define ERRILGC 100 #define ERRGCOPEN 101 static char *drawerrorlist[]={ "illegal graphics context", "graphics context is not opened", }; #define ERRNUM (sizeof(drawerrorlist) / sizeof(*drawerrorlist)) char *pathchar[]={ N_("unchange"), N_("full"), N_("relative"), N_("base"), NULL, }; char *joinchar[]={ N_("miter"), N_("round"), N_("bevel"), NULL }; char *fontchar[]={ "Sans-serif", "Serif", "Monospace", NULL }; char *arrowchar[]={ N_("none"), N_("end"), N_("begin"), N_("both"), NULL }; char *marker_type_char[]={ N_("none"), N_("arrow"), N_("wave"), N_("mark"), N_("bar"), NULL }; char *intpchar[]={ N_("spline"), N_("spline_close"), N_("bspline"), N_("bspline_close"), NULL }; static int drawinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int clip,redrawf,alpha; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; clip=TRUE; redrawf=TRUE; alpha=255; if (_putobj(obj,"clip",inst,&clip)) return 1; if (_putobj(obj,"redraw_flag",inst,&redrawf)) return 1; if (_putobj(obj,"A",inst,&alpha)) return 1; return 0; } static int drawdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int drawdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC,hidden; GC=*(int *)(argv[2]); if (GRAopened(GC)<0) { error3(obj,ERRGCOPEN,GC); return 1; } _getobj(obj,"hidden",inst,&hidden); if (hidden) GC=-1; if (_putobj(obj,"GC",inst,&GC)) return 1; return 0; } int pathsave(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array,*array2; int anum; char **adata; int i,j; char *argv2[4]; char *file,*name,*valstr; int path; GString *s; array=(struct narray *)argv[2]; anum=arraynum(array); adata=arraydata(array); for (j=0;jstr); g_string_append_c(s, '\t'); g_string_append(s, argv[0]); g_string_append(s, "::file="); valstr = getvaluestr(obj, "file", &name, FALSE, TRUE); if (valstr == NULL) { g_free(s); goto errexit; } g_string_append(s, valstr); g_free(valstr); g_string_append_c(s, '\n'); g_free(name); g_free(rval->str); rval->str = g_string_free(s, FALSE); return 0; errexit: g_free(name); g_free(rval->str); rval->str=NULL; return 1; } int clear_bbox(struct objlist *obj, N_VALUE *inst) { struct narray *array; if (inst == NULL) return 1; if (_getobj(obj, "bbox", inst, &array)) return 1; arrayfree(array); if (_putobj(obj, "bbox", inst, NULL)) return 1; return 0; } int put_hsb_color(struct objlist *obj, N_VALUE *inst, int argc, char **argv, char *format) { double h, s, b; int rr, gg, bb; char buf[64]; h = arg_to_double(argv, 2); s = arg_to_double(argv, 3); b = arg_to_double(argv, 4); if (h < 0) { h = 0; } else if (h > 1) { h = 1; } if (s < 0) { s = 0; } else if (s > 1) { s = 1; } if (b < 0) { b = 0; } else if (b > 1) { b = 1; } HSB2RGB(h, s, b, &rr, &gg, &bb); snprintf(buf, sizeof(buf), format, 'R'); _putobj(obj, buf, inst, &rr); snprintf(buf, sizeof(buf), format, 'G'); _putobj(obj, buf, inst, &gg); snprintf(buf, sizeof(buf), format, 'B'); _putobj(obj, buf, inst, &bb); return 0; } int put_fill_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return put_hsb_color(obj, inst, argc, argv, "fill_%c"); } int put_stroke_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return put_hsb_color(obj, inst, argc, argv, "stroke_%c"); } int put_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return put_hsb_color(obj, inst, argc, argv, "%c"); } int put_hsb2(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return put_hsb_color(obj, inst, argc, argv, "%c2"); } static int curve_expand(double c[], double x0, double y0, diffunc gdiff, intpfunc gintpf, struct narray *expand_points) { double d, dx, dy, ddx, ddy, x, y; int gx2, gy2; d = 0; while (d < 1) { double dd; gdiff(d, c, &dx, &dy, &ddx, &ddy, NULL); if (fabs(dx) + fabs(ddx) / 3 <= 1E-100) { dx = 1; } else { dx = sqrt(fabs(2 / (fabs(dx) + fabs(ddx) / 3))); } if (fabs(dy) + fabs(ddy) / 3 <= 1E-100) { dy = 1; } else { dy = sqrt(fabs(2 / (fabs(dy) + fabs(ddy) / 3))); } dd = (dx < dy) ? dx : dy; d += dd; if (d > 1) { d = 1; } gintpf(d, c, x0, y0, &x, &y, NULL); gx2 = nround(x); gy2 = nround(y); arrayadd(expand_points, &gx2); arrayadd(expand_points, &gy2); } return TRUE; } int curve_expand_points(int *pdata, int num, int intp, struct narray *expand_points) { int i, j, bsize, spcond, x, y; double c[8]; double *buf; double bs1[7], bs2[7], bs3[4], bs4[4]; arrayclear(expand_points); switch (intp) { case INTERPOLATION_TYPE_SPLINE: case INTERPOLATION_TYPE_SPLINE_CLOSE: if (num < 2) return 0; bsize = num + 1; buf = g_malloc(sizeof(double) * 9 * bsize); if (buf == NULL) return 1; for (i = 0; i < bsize; i++) buf[i]=i; for (i = 0; i < num; i++) { buf[bsize + i] = pdata[i * 2]; buf[bsize * 2 + i] = pdata[i * 2 + 1]; } if (intp == INTERPOLATION_TYPE_SPLINE) { spcond = SPLCND2NDDIF; } else { spcond = SPLCNDPERIODIC; if (buf[num - 1 + bsize] != buf[bsize] || buf[num - 1 + 2 * bsize] != buf[2 * bsize]) { buf[num + bsize] = buf[bsize]; buf[num + 2 * bsize] = buf[2 * bsize]; num++; } } if (spline(buf, buf + bsize, buf + 3 * bsize, buf + 4 * bsize, buf + 5 * bsize, num, spcond, spcond, 0, 0)) { g_free(buf); return 1; } if (spline(buf, buf + 2 * bsize, buf + 6 * bsize, buf + 7 * bsize, buf + 8 * bsize, num, spcond, spcond, 0, 0)) { g_free(buf); return 1; } x = nround(buf[bsize]); y = nround(buf[bsize * 2]); arrayadd(expand_points, &x); arrayadd(expand_points, &y); for (i = 0; i < num - 1; i++) { for (j = 0; j < 6; j++) { c[j] = buf[i + (j + 3) * bsize]; } if (! curve_expand(c, buf[i + bsize], buf[i + 2 * bsize], splinedif, splineint, expand_points)) { break; } } g_free(buf); break; case INTERPOLATION_TYPE_BSPLINE: if (num < 7) { return 0; } for (i = 0; i < 7; i++) { bs1[i] = pdata[i * 2]; bs2[i] = pdata[i * 2 + 1]; } for (j = 0; j < 2; j++) { bspline(j + 1, bs1 + j, c); bspline(j + 1, bs2 + j, c + 4); if (j == 0) { x = nround(c[0]); y = nround(c[4]); arrayadd(expand_points, &x); arrayadd(expand_points, &y); } if (! curve_expand(c, c[0], c[4], bsplinedif, bsplineint, expand_points)) { return 0; } } for (; i < num; i++) { for (j = 1; j < 7; j++) { bs1[j - 1] = bs1[j]; bs2[j - 1] = bs2[j]; } bs1[6] = pdata[i*2]; bs2[6] = pdata[i*2+1]; bspline(0, bs1 + 1, c); bspline(0, bs2 + 1, c + 4); if (! curve_expand(c, c[0], c[4], bsplinedif, bsplineint, expand_points)) { return 0; } } for (j = 0; j < 2; j++) { bspline(j + 3, bs1 + j + 2, c); bspline(j + 3, bs2 + j + 2, c + 4); if (! curve_expand(c, c[0], c[4], bsplinedif, bsplineint, expand_points)) { return 0; } } break; case INTERPOLATION_TYPE_BSPLINE_CLOSE: if (num < 4) { return 0; } for (i = 0; i < 4; i++) { bs1[i] = pdata[i * 2]; bs3[i] = pdata[i * 2]; bs2[i] = pdata[i * 2 + 1]; bs4[i] = pdata[i * 2 + 1]; } bspline(0, bs1, c); bspline(0, bs2, c + 4); x = nround(c[0]); y = nround(c[4]); arrayadd(expand_points, &x); arrayadd(expand_points, &y); if (! curve_expand(c, c[0], c[4], bsplinedif, bsplineint, expand_points)) { return 0; } for (; i < num; i++) { for (j = 1; j < 4; j++) { bs1[j - 1] = bs1[j]; bs2[j - 1] = bs2[j]; } bs1[3] = pdata[i * 2]; bs2[3] = pdata[i * 2 + 1]; bspline(0, bs1, c); bspline(0, bs2, c + 4); if (! curve_expand(c, c[0], c[4], bsplinedif, bsplineint, expand_points)) { return 0; } } for (j = 0; j < 3; j++) { bs1[4 + j] = bs3[j]; bs2[4 + j] = bs4[j]; bspline(0, bs1 + j + 1, c); bspline(0, bs2 + j + 1, c + 4); if (! curve_expand(c, c[0], c[4], bsplinedif, bsplineint, expand_points)) { return 0; } } break; } return 0; } void text_get_bbox(int x, int y, char *text, char *font, int style, int pt, int dir, int space, int scriptsize, int raw, int *bbox) { int gx0, gy0, gx1, gy1; int i, ggx[4], ggy[4]; int minx, miny, maxx, maxy; double si, co, rdir; if (raw) { GRAtextextentraw(text, font, style, pt, space, &gx0, &gy0, &gx1, &gy1); } else { GRAtextextent(text, font, style, pt, space, scriptsize, &gx0, &gy0, &gx1, &gy1, FALSE); } rdir = dir / 18000.0 * MPI; si = -sin(rdir); co = cos(rdir); ggx[0] = x + gx0 * co - gy0 * si; ggy[0] = y + gx0 * si + gy0 * co; ggx[1] = x + gx1 * co - gy0 * si; ggy[1] = y + gx1 * si + gy0 * co; ggx[2] = x + gx0 * co - gy1 * si; ggy[2] = y + gx0 * si + gy1 * co; ggx[3] = x + gx1 * co - gy1 * si; ggy[3] = y + gx1 * si + gy1 * co; minx = ggx[0]; maxx = ggx[0]; miny = ggy[0]; maxy = ggy[0]; for (i = 1; i < 4; i++) { if (ggx[i]maxx) maxx = ggx[i]; if (ggy[i]maxy) maxy = ggy[i]; } bbox[0] = minx; bbox[1] = miny; bbox[2] = maxx; bbox[3] = maxy; } static struct objtable draw[] = { {"init",NVFUNC,0,drawinit,NULL,0}, {"done",NVFUNC,0,drawdone,NULL,0}, {"GC",NINT,0,NULL,NULL,0}, {"hidden",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,drawdraw,"i",0}, {"redraw",NVFUNC,NREAD|NEXEC,drawdraw,"i",0}, {"R",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"G",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"B",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"A",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"clip",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"redraw_flag",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"redraw_num",NINT,0,NULL,NULL,0}, }; #define TBLNUM (sizeof(draw) / sizeof(*draw)) void * adddraw(void) /* adddraw() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,draw,ERRNUM,drawerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/olegend.c0000644000175000017500000003563614002151431013232 00000000000000/* * $Id: olegend.c,v 1.18 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include "spline.h" #include "gra.h" #include "mathfn.h" #include "object.h" #include "odraw.h" #include "olegend.h" #define NAME N_("legend") #define PARENT "draw" #define OVERSION "1.00.00" static char *legenderrorlist[]={ "", }; #define ERRNUM (sizeof(legenderrorlist) / sizeof(*legenderrorlist)) static int legendinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int legenddone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } int legendgeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { if (clear_bbox(obj, inst)) return 1; return 0; } int legendmatch(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy,err; struct narray *array; rval->i=FALSE; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if (_exeobj(obj,"bbox",inst,0,NULL)) return 1; _getobj(obj,"bbox",inst,&array); if (array==NULL) return 0; minx=*(int *)argv[2]; miny=*(int *)argv[3]; maxx=*(int *)argv[4]; maxy=*(int *)argv[5]; err=*(int *)argv[6]; if ((minx==maxx) && (miny==maxy)) { int i, *data, num; num=arraynum(array)-4; data=arraydata(array); for (i=0;ii=TRUE; break; } if (r2!=0) { int ip; ip=((x2-x1)*(minx-x1)+(y2-y1)*(miny-y1))/r2; if ((0<=ip) && (ip<=r2)) { x2=x1+(x2-x1)*ip/r2; y2=y1+(y2-y1)*ip/r2; r=sqrt((minx-x2)*(minx-x2)+(miny-y2)*(miny-y2)); if (ri=TRUE; break; } } } } } else { int bminx, bminy, bmaxx, bmaxy; if (arraynum(array)<4) return 1; bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } return 0; } int legendbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy; int x,y,num; struct narray *points; int pnum; int *pdata; struct narray *array; int i,width; array=rval->array; if (arraynum(array)!=0) return 0; _getobj(obj,"points",inst,&points); _getobj(obj,"width",inst,&width); pnum=arraynum(points); pdata=arraydata(points); num=pnum/2; if (num<2) return 0; if ((array==NULL) && ((array=arraynew(sizeof(int)))==NULL)) return 1; maxx=minx=pdata[0]; maxy=miny=pdata[1]; arrayadd(array,&(pdata[0])); arrayadd(array,&(pdata[1])); for (i=1;imaxx) maxx=x; if (ymaxy) maxy=y; } minx-=width/2; miny-=width/2; maxx+=width/2; maxy+=width/2; arrayins(array,&(maxy),0); arrayins(array,&(maxx),0); arrayins(array,&(miny),0); arrayins(array,&(minx),0); if (arraynum(array)==0) { arrayfree(array); rval->array = NULL; return 1; } rval->array=array; return 0; } int legendmove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *points; int i,num,*pdata; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"points",inst,&points); num=arraynum(points); pdata=arraydata(points); for (i=0;i 255) { val = 255; } switch (col) { case 'R': _putobj(obj, "stroke_R", inst, &val); _putobj(obj, "fill_R", inst, &val); break; case 'G': _putobj(obj, "stroke_G", inst, &val); _putobj(obj, "fill_G", inst, &val); break; case 'B': _putobj(obj, "stroke_B", inst, &val); _putobj(obj, "fill_B", inst, &val); break; case 'A': _putobj(obj, "stroke_A", inst, &val); _putobj(obj, "fill_A", inst, &val); break; } return 0; } static struct objtable legend[] = { {"init",NVFUNC,0,legendinit,NULL,0}, {"done",NVFUNC,0,legenddone,NULL,0}, {"bbox",NIAFUNC,NREAD|NEXEC,NULL,"",0}, {"move",NVFUNC,NREAD|NEXEC,NULL,"ii",0}, {"zooming",NVFUNC,NREAD|NEXEC,NULL,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,NULL,"iiiii",0}, }; #define TBLNUM (sizeof(legend) / sizeof(*legend)) void * addlegend(void) /* addlegend() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,legend,ERRNUM,legenderrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/osystem.c0000644000175000017500000004377213720114732013331 00000000000000/* * $Id: osystem.c,v 1.17 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include #include "nstring.h" #include "object.h" #include "shell.h" #include "ioutil.h" #include "ntime.h" #include "osystem.h" #ifdef HAVE_LIBGSL #include #endif #define NAME "system" #define PARENT "object" #define SYSNAME "Ngraph" #define TEMPN "NGP" #define COPYRIGHT "Copyright (C) 2003, Satoshi ISHIZAKA." #define EMAIL "ZXB01226@nifty.com" #define WEB "https://github.com/htrb/ngraph-gtk/" #define ERRSYSNODIR 100 #define ERRSYSTMPFILE 101 #define ERRSYSSECURTY 102 #define ERRSYSMEM 103 #define ERRSYSNOMODULE 104 #define ERRSYSLOAD 105 #define ERRSYSLOADED 106 #define ERRSYSNOLOAD 107 #define ERRSYSINIT 108 #define ERRSYSINVALID 109 #define ERRSYSNOTEXECUTABLE 110 #define ERRSYSLOCKED 111 #define ERRSYSSMALLARGS 112 void resizeconsole(int col,int row); extern int consolecol,consolerow; static char *syserrorlist[]={ "no such directory", "can't create temporary file", "the method is forbidden for the security", "cannot allocate enough memory", "no module name is specified.", "cannot load module", "the module is already loaded", "a module is not loaded", "cannot initialize the plugin", "invalid module", "not executable", "the module is locked", "too small number of arguments.", }; #define ERRNUM (sizeof(syserrorlist) / sizeof(*syserrorlist)) struct ngraph_plugin { GModule *module; ngraph_plugin_exec exec; ngraph_plugin_open open; ngraph_plugin_close close; char *file; int lock; }; static NHASH Plugins = NULL; static DRAW_NOTIFY_FUNC DrawNotify = NULL; void system_set_draw_notify_func(DRAW_NOTIFY_FUNC func) { DrawNotify = func; } void system_draw_notify(void) { if (DrawNotify) { DrawNotify(TRUE); } } static int sysinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *wd; int expand, pid, status; char *exdir; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; expand=TRUE; if (_putobj(obj,"expand_file",inst,&expand)) return 1; exdir = g_strdup("./"); if (exdir == NULL) return 1; if (_putobj(obj,"expand_dir",inst,exdir)) return 1; if (_putobj(obj,"name",inst,SYSNAME)) return 1; if (_putobj(obj,"version",inst,VERSION)) return 1; if (_putobj(obj,"copyright",inst,COPYRIGHT)) return 1; if (_putobj(obj,"e-mail",inst,EMAIL)) return 1; if (_putobj(obj,"web",inst,WEB)) return 1; if (_putobj(obj,"compiler",inst, COMPILER_NAME)) return 1; if (_putobj(obj,"GRAF",inst,"%Ngraph GRAF")) return 1; if (_putobj(obj,"temp_prefix",inst,TEMPN)) return 1; if ((wd=ngetcwd())==NULL) return 1; pid = getpid(); if (_putobj(obj,"pid",inst,&pid)) return 1; status = 0; if (_putobj(obj, "shell_status", inst, &status)) return 1; if (_putobj(obj,"cwd",inst,wd)) { g_free(wd); return 1; } #ifdef HAVE_LIBGSL gsl_set_error_handler_off(); #endif return 0; } static int close_module(struct nhash *hash, void *data) { struct ngraph_plugin *plugin; plugin = (struct ngraph_plugin *) hash->val.p; if (plugin->close) { plugin->close(); } if (plugin->file) { g_free(plugin->file); } if (plugin->module) { g_module_close(plugin->module); } g_free(plugin); hash->val.p = NULL; return 0; } static int sysdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct objlist *objcur; int i, n, status; char *s; struct narray *array; struct objlist *objectcur; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; nhash_each(Plugins, close_module, NULL); nhash_clear(Plugins); objcur=chkobjroot(); while (objcur!=NULL) { if (objcur!=obj) { recoverinstance(objcur); for (i=chkobjlastinst(objcur);i>=0;i--) delobj(objcur,i); } objcur=objcur->next; } status = 0; _getobj(obj, "shell_status", inst, &status); _getobj(obj,"conf_dir",inst,&s); g_free(s); _getobj(obj,"data_dir",inst,&s); g_free(s); _getobj(obj,"doc_dir",inst,&s); g_free(s); _getobj(obj,"lib_dir",inst,&s); g_free(s); _getobj(obj,"plugin_dir",inst,&s); g_free(s); _getobj(obj,"home_dir",inst,&s); g_free(s); _getobj(obj,"cwd",inst,&s); g_free(s); _getobj(obj,"login_shell",inst,&s); g_free(s); _getobj(obj,"time",inst,&s); g_free(s); _getobj(obj,"date",inst,&s); g_free(s); _getobj(obj,"expand_dir",inst,&s); g_free(s); _getobj(obj,"temp_file",inst,&s); g_free(s); _getobj(obj,"temp_list",inst,&array); n = arraynum(array); if (n > 0) { char **data; data = arraydata(array); for (i = 0; i < n; i++) { g_unlink(data[i]); } } arrayfree2(array); objectcur=chkobjroot(); while (objectcur!=NULL) { struct objlist *objectdel; objectdel=objectcur; objectcur=objectcur->next; if (objectdel->doneproc) objectdel->doneproc(objectdel,objectdel->local); if (objectdel->table_hash) nhash_free(objectdel->table_hash); g_free(objectdel); } g_free(inst); g_free(argv); nhash_free(Plugins); exit(status); return 0; } static int syscwd(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *wd; const char *home; wd=argv[2]; if (wd!=NULL) { if (nchdir(wd)!=0) { error2(obj,ERRSYSNODIR,wd); return 1; } } else { if ((home=g_getenv("HOME"))!=NULL) { if (nchdir(home)!=0) { error2(obj,ERRSYSNODIR,home); return 1; } } } if ((wd=ngetcwd())==NULL) return 1; g_free(argv[2]); argv[2]=wd; return 0; } static int systime(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { time_t t; int style; t=time(NULL); style=*(int *)(argv[2]); g_free(rval->str); rval->str=ntime(&t,style); return 0; } static int sysdate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { time_t t; int style; t=time(NULL); style=*(int *)(argv[2]); g_free(rval->str); rval->str=ndate(&t,style); return 0; } static int systemp(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *pfx, *tmpfil; struct narray *array; int fd; g_free(rval->str); rval->str=NULL; _getobj(obj,"temp_prefix",inst,&pfx); _getobj(obj,"temp_list",inst,&array); if (array==NULL) { if ((array=arraynew(sizeof(char *)))==NULL) return 1; if (_putobj(obj,"temp_list",inst,array)) { arrayfree2(array); return 1; } } fd = n_mkstemp(NULL, pfx, &tmpfil); if (fd < 0) { error(obj, ERRSYSTMPFILE); return 1; } close(fd); arrayadd2(array,tmpfil); rval->str=tmpfil; return 0; } static int sysunlink(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *tmpfil; struct narray *array; int num; char **data; _getobj(obj,"temp_list",inst,&array); if (array==NULL) return 0; num=arraynum(array); data=arraydata(array); if (num>0) { int i; tmpfil=(char *)argv[2]; if (tmpfil==NULL) tmpfil=data[num-1]; for (i=num-1;i>=0;i--) if (strcmp(tmpfil,data[i])==0) break; if (i>=0) { g_unlink(data[i]); arrayndel2(array,i); } } if (arraynum(array)==0) { arrayfree2(array); _putobj(obj,"temp_list",inst,NULL); } _getobj(obj,"temp_file",inst,&tmpfil); g_free(tmpfil); _putobj(obj,"temp_file",inst,NULL); return 0; } static int syshideinstance(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char **objdata; int j,anum; array=(struct narray *)argv[2]; if (array == NULL) { return 0; } anum=arraynum(array); objdata=arraydata(array); for (j=0;jfile = module_file; plugin->module = module; plugin->exec = NULL; plugin->open = np_open; plugin->close = np_close; return 0; ErrorExit: if (module) { g_module_close(module); } g_free(module_file); return 1; } static struct ngraph_plugin * get_plugin_from_name(const char *name) { void *ptr; int r; r = nhash_get_ptr(Plugins, name, &ptr); if (r) { return NULL; } return ptr; } struct ngraph_plugin * load_plugin(struct objlist *obj, const char *arg, int *rval) { char *name; struct ngraph_plugin *plugin; if (arg == NULL) { error(obj, ERRSYSNOMODULE); return NULL; } name = get_basename(arg); if (name == NULL) { error(obj, ERRSYSNOMODULE); return NULL; } plugin = get_plugin_from_name(name); if (plugin) { error2(obj, ERRSYSLOADED, name); g_free(name); return NULL; } plugin = g_malloc0(sizeof(struct ngraph_plugin)); if (plugin == NULL) { g_free(name); error(obj, ERRSYSMEM); return NULL; } if (load_plugin_sub(obj, name, plugin)) { g_free(name); g_free(plugin); return NULL; } g_free(name); if (plugin->open) { int r; r = plugin->open(); if (rval) { *rval = r; } if (r) { error2(obj, ERRSYSINIT, arg); return NULL; } } return plugin; } static int system_plugin_load(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct ngraph_plugin *plugin; rval->i = 0; plugin = load_plugin(obj, argv[2], &rval->i); return (plugin) ? 0 : 1; } static int system_plugin_check(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *name, *module_file; name = get_basename(argv[2]); if (name == NULL) { return 1; } module_file = get_plugin_name(name); g_free(name); if (module_file == NULL) { return 1; } if (naccess(module_file, R_OK)) { g_free(module_file); return 1; } g_free(module_file); return 0; } static void free_argv(int argc, char **argv) { int i; for (i = 0; i < argc; i ++) { if (argv[i]) { g_free(argv[i]); argv[i] = NULL; } } g_free(argv); } static char ** allocate_argv(int argc, char * const *argv) { int i, new_argc; char **new_argv; new_argc = argc + 1; new_argv = g_malloc0(sizeof(*new_argv) * new_argc); if (new_argv == NULL) { return NULL; } for (i = 0; i < argc; i++) { new_argv[i] = g_strdup(argv[i]); if (new_argv[i] == NULL) { free_argv(new_argc, new_argv); return NULL; } } new_argv[i] = NULL; return new_argv; } static int system_plugin_exec(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct ngraph_plugin *plugin; char **new_argv; int r; rval->i = 0; if (argc < 4) { error2(obj, ERRSYSSMALLARGS, argv[1]); return 0; } if (get_security()) { error(obj, ERRSYSSECURTY); return 1; } plugin = get_plugin_from_name(argv[2]); if (plugin == NULL) { plugin = load_plugin(obj, argv[2], NULL); if (plugin == NULL) { return 1; } } if (plugin->exec == NULL) { error2(obj, ERRSYSNOTEXECUTABLE, argv[2]); return 1; } if (plugin->lock) { error2(obj, ERRSYSLOCKED, argv[2]); return 1; } new_argv = allocate_argv(argc - 3, argv + 3); if (new_argv == NULL) { error(obj, ERRSYSMEM); return 1; } plugin->lock = TRUE; r = plugin->exec(argc - 3, new_argv); plugin->lock = FALSE; rval->i = r; free_argv(argc - 3, new_argv); return r; } static int system_plugin_get_module(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct ngraph_plugin *plugin; g_free(rval->str); rval->str = NULL; if (argv[2] == NULL) { return 1; } plugin = get_plugin_from_name(argv[2]); if (plugin == NULL) { error(obj, ERRSYSNOLOAD); return 1; } if (plugin->file) { rval->str = g_strdup(plugin->file); } else { rval->str = g_strdup("internal"); } return 0; } static int list_module(struct nhash *hash, void *data) { struct narray *array; const char *name; array = (struct narray *) data; name = hash->key; arrayadd2(array, name); return 0; } static int system_plugin_modules(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; arrayfree2(rval->array); rval->array = NULL; array = arraynew(sizeof(char *)); if (array == NULL) { error(obj, ERRSYSMEM); return 1; } rval->array = array; nhash_each(Plugins, list_module, array); return 0; } int system_set_exec_func(const char *name, ngraph_plugin_exec func) { struct ngraph_plugin *plugin; if (name == NULL || func == NULL) { return 1; } plugin = get_plugin_from_name(name); if (plugin == NULL) { int r; plugin = g_malloc0(sizeof(struct ngraph_plugin)); if (plugin == NULL) { return 1; } r = nhash_set_ptr(Plugins, name, plugin); if (r) { return 1; } } plugin->exec = func; return 0; } static struct objtable nsystem[] = { {"init",NVFUNC,NEXEC,sysinit,NULL,0}, {"done",NVFUNC,NEXEC,sysdone,NULL,0}, {"name",NSTR,NREAD,NULL,NULL,0}, {"version",NSTR,NREAD,NULL,NULL,0}, {"copyright",NSTR,NREAD,NULL,NULL,0}, {"e-mail",NSTR,NREAD,NULL,NULL,0}, {"web",NSTR,NREAD,NULL,NULL,0}, {"compiler",NSTR,NREAD,NULL,NULL,0}, {"login_shell",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"cwd",NSTR,NREAD|NWRITE,syscwd,NULL,0}, {"ignore_path",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"expand_file",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"expand_dir",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"GRAF",NSTR,NREAD,NULL,NULL,0}, {"temp_prefix",NSTR,NREAD,NULL,NULL,0}, {"conf_dir",NSTR,NREAD,NULL,NULL,0}, {"data_dir",NSTR,NREAD,NULL,NULL,0}, {"doc_dir",NSTR,NREAD,NULL,NULL,0}, {"lib_dir",NSTR,NREAD,NULL,NULL,0}, {"plugin_dir",NSTR,NREAD,NULL,NULL,0}, {"home_dir",NSTR,NREAD,NULL,NULL,0}, {"pid",NINT,NREAD,NULL,NULL,0}, {"shell_status",NINT,NREAD,NULL,NULL,0}, {"time",NSFUNC,NREAD|NEXEC,systime,"i",0}, {"date",NSFUNC,NREAD|NEXEC,sysdate,"i",0}, {"temp_file",NSFUNC,NREAD|NEXEC,systemp,"",0}, {"temp_list",NSARRAY,NREAD,NULL,NULL,0}, {"unlink_temp_file",NVFUNC,NREAD|NEXEC,sysunlink,NULL,0}, {"hide_instance",NVFUNC,NREAD|NEXEC,syshideinstance,"sa",0}, {"recover_instance",NVFUNC,NREAD|NEXEC,sysrecoverinstance,"sa",0}, {"resize",NVFUNC,NREAD|NEXEC,systemresize,"ia",0}, {"plugin_check", NIFUNC, NREAD|NEXEC, system_plugin_check, "s", 0}, {"plugin_load", NIFUNC, NREAD|NEXEC, system_plugin_load, "s", 0}, {"plugin_exec",NIFUNC, NREAD|NEXEC, system_plugin_exec, NULL, 0}, {"plugin_module",NSFUNC, NREAD|NEXEC, system_plugin_get_module, "s", 0}, {"plugins",NSAFUNC, NREAD|NEXEC, system_plugin_modules, "", 0}, }; #define TBLNUM (sizeof(nsystem) / sizeof(*nsystem)) void * addsystem() /* addsystem() returns NULL on error */ { Plugins = nhash_new(); if (Plugins == NULL) { return NULL; } return addobject(NAME,NULL,PARENT,VERSION,TBLNUM,nsystem,ERRNUM,syserrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/shell.c0000644000175000017500000032373513674360720012745 00000000000000/* * $Id: shell.c,v 1.41 2010-04-01 06:08:23 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ /* * SYNTAX: * * name1=val1 name2=val2 ... command arg1 arg2 arg3 ... * * # comment * * keyword * for name [in word] do list done * case word in [patterm [|pattern] ...list;;] ... esac * if list then list [elif list then list]...[else list] fi * while list do list done * until list do list done * name() { list; } * { } is needed * * command replacement * `command` * * parameter replacement * name=value [ name=value ] ... * $# $? $num $* $@ * ${parameter} * ${parameter:-word} * ${parameter:=word} * ${parameter:?word} * ${parameter:+word} * ${parameter#word} * ${parameter##word} * ${parameter%word} * ${parameter%%word} * * object replacement * object:namelist:field=value * ${object:namelist:field=argument} * * input & output * < file * << word * > file * >> file * * special command * : * .file * break [n] * continue [n] * cd * echo * eval [arg] * exit [n] * export [name] * pwd * quit * read name ... * return [n] * set * shift [n] * test * unset * [ * new object [field:val, ...] * del object namelist * exist object namelist * get object namelist field:argument ... * put object namelist field:val ... * exe object namelist field:argument ... * cpy object sname dnamelist field * move object sname dname * movetop object name * moveup object name * movedown object name * movelast object name * exch object name1 name2 * dexpr * iexpr * */ #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_READLINE_READLINE_H #include #include static char *Prompt; static int MultiLine = FALSE; #endif /* HAVE_READLINE_READLINE_H */ #if ! WINDOWS #include #include #endif /* WINDOWS */ #include #define USE_HASH 1 #include "object.h" #include "nstring.h" #include "ioutil.h" #include "shell.h" #include "shell_error.h" #include "shellcm.h" #include "shellux.h" #include "math/math_equation.h" #define TEMPPFX "NGS" static char *cmderrorlist[] = { "unexpected EOF.", "bad substitution.", "syntax error near unexpected token", "unexpected token", "invalid identifier", "command not found", "system call", "extra arguments.", "not enough argument.", "too many arguments.", "cannot open file", "Use \"exit\" to leave the shell.", "no such file", "I/O error: read file", "I/O error: open file", "missing object argument.", "missing instance argument.", "new instance is specified", "illegal field identifier", "illegal type of argument", "illegal number of specified instance.", "no instance specified", "no field identifier.", "non-numeric argument", "unknown option", "illegal option", "cannot unset", "no such directory", "syntax error for math.", "not allowed function for math.", "sum() or dif(): deep nest for math.", "illegal argument for math.", "fatal error for math.", "deep nest.", "syntax error.", "security check.", "cannot allocate enough memory.", "unknown error.", }; #define ERRNUM (sizeof(cmderrorlist) / sizeof(*cmderrorlist)) static char **MainEnviron; static int Security=FALSE; #define WRITEBUFSIZE 4096 static char writebuf[WRITEBUFSIZE]; static int writepo; static int Interrupted = FALSE; static int storeshhandle(struct nshell *nshell,int fd, char **readbuf,int *readbyte,int *readpo); static void restoreshhandle(struct nshell *nshell,int fd, char *readbuf,int readbyte,int readpo); typedef struct { int sleep; int msec; } ThreadParam; gpointer sleep_thread(gpointer data) { ThreadParam *th; th = (ThreadParam *) data; msleep(th->msec); th->sleep = FALSE; return 0; } void nsleep(double a) { ThreadParam th; GThread *thread; if (a < 0 || a > 100000) { return; } th.sleep = TRUE; th.msec = a * 1000; if (th.msec < 1) { return; } thread= g_thread_new("sleep", sleep_thread, &th); while (th.sleep) { eventloop(); msleep(1); } g_thread_join(thread); return; } void set_environ(void) { int i, n; char **list, **env; MainEnviron = NULL; env = g_listenv(); if (env == NULL) { MainEnviron = NULL; return; } for (n = 0; env[n]; n++) ; list = g_malloc0(sizeof(*list) * (n + 1)); if (list == NULL) { g_strfreev(env); return; } for (i = 0; i < n; i++) { char *name; const char *val; name = env[i]; val = g_getenv(name); list[i] = g_strdup_printf("%s=%s", name, val); if (list[i] == NULL) { g_strfreev(env); g_strfreev(list); return; } } MainEnviron = list; g_strfreev(env); } void set_security(int state) { Security = state; } int get_security(void) { return Security; } static void unlinkfile(char **file) { if (*file!=NULL) { g_unlink(*file); g_free(*file); *file=NULL; } } #if ! WINDOWS int set_signal(int signal_id, int flags, void (*handler)(int), struct sigaction *oldact) { static struct sigaction act; memset(&act, 0, sizeof(act)); act.sa_handler = handler; act.sa_flags = (flags | SA_RESTART); sigemptyset(&act.sa_mask); return sigaction(signal_id, &act, oldact); } static void childhandler(int sig) { pid_t child_pid; do { child_pid = waitpid(-1, NULL, WNOHANG); } while (child_pid > 0); } void set_childhandler(void) { set_signal(SIGCHLD, SA_NOCLDSTOP, childhandler, NULL); } void unset_childhandler(void) { set_signal(SIGCHLD, 0, SIG_DFL, NULL); } #endif /* WINDOWS */ static int EvLoopActive = FALSE; static GThread *EvLoopThread = NULL; static void * shellevloop(void *ptr) { EvLoopActive = TRUE; while (EvLoopActive) { eventloop(); msleep(10); } return NULL; } static void set_shellevloop(int sig) { if (! has_eventloop()) return; if (EvLoopActive) return; EvLoopThread = g_thread_new("evloop", shellevloop, NULL); if (EvLoopThread == NULL) return; while (! EvLoopActive) { msleep(10); } } static void reset_shellevloop(void) { if (EvLoopActive) { EvLoopActive = FALSE; g_thread_join(EvLoopThread); } } static int shgetstdin(void) { char buf[2]; int byte; if (nisatty(stdinfd())) { set_shellevloop(0); do { byte=read(stdinfd(),buf,1); } while (byte<0); reset_shellevloop(); } else { do { byte=read(stdinfd(),buf,1); if (byte<=0) return EOF; } while (buf[0]=='\r'); } if (byte<=0) return EOF; return buf[0]; } #if HAVE_READLINE_READLINE_H static int ReadlineLock = FALSE; static void * readline_thread(void *prompt) { char *str; str = readline(prompt); ReadlineLock = FALSE; return str; } static char * nreadline(char *prompt) { GThread *thread; if (ReadlineLock) { return NULL; } ReadlineLock = TRUE; thread= g_thread_new("readline", readline_thread, prompt); if (thread == NULL) { ReadlineLock = FALSE; return NULL; } while (ReadlineLock) { eventloop(); msleep(10); } return (char *) g_thread_join(thread); } static void remove_duplicate_history(char *str) { HIST_ENTRY *entry; int pos; for(pos = history_length; pos >= 0; pos--) { pos = history_search_pos(str, -1, pos); if(pos >= 0 && strcmp(history_get(pos + history_base)->line, str) == 0) { entry = remove_history(pos); if (entry) { free_history_entry(entry); } break; } } } #endif static int shget(struct nshell *nshell) { char buf[2]; int byte; #ifdef HAVE_READLINE_READLINE_H static char *str_ptr = NULL, *line_str = NULL; #endif if (nisatty(nshell->fd)) { #ifdef HAVE_READLINE_READLINE_H if(str_ptr == NULL){ str_ptr = line_str = nreadline(Prompt); if(str_ptr == NULL){ byte = 0; } else if(strlen(str_ptr) > 0) { if (MultiLine && history_length > 0) { HIST_ENTRY *entry; entry = remove_history(history_length - 1); remove_duplicate_history(str_ptr); if (entry) { char *tmp; tmp = g_strdup_printf("%s\n%s", entry->line, str_ptr); free_history_entry(entry); if (tmp) { remove_duplicate_history(tmp); add_history(tmp); g_free(tmp); } } } else { remove_duplicate_history(str_ptr); add_history(str_ptr); } } } if(str_ptr != NULL){ if(*line_str == '\0'){ free(str_ptr); /* str_ptr is allocated by readline library */ str_ptr = line_str = NULL; buf[0] = '\0'; byte = 1; }else{ buf[0] = *line_str++; byte = 1; } } #else /* HAVE_READLINE_READLINE_H */ set_shellevloop(0); do { byte=read(nshell->fd,buf,1); } while (byte<0); reset_shellevloop(); #endif /* HAVE_READLINE_READLINE_H */ } else { do { byte=read(nshell->fd,buf,1); if (byte<=0) return EOF; } while (buf[0]=='\r'); } if (byte<=0) return EOF; return buf[0]; } static int puts_localized(int fd, const char *str) { int len, r; char *localized; localized = g_locale_from_utf8(str, -1, NULL, NULL, NULL); if (localized == NULL) { return 0; } len = strlen(localized); r = write(fd, localized, len); g_free(localized); return r; } static int shputstdout(const char *s) { int len, r; len = puts_localized(stdoutfd(), s); r = write(stdoutfd(), "\n", 1); if (r >= 0) len += r; return len; } #if WINDOWS static int shputstderr(const char *s) { int len, r; len=strlen(s); r = write(stderrfd(),s,len); if (r < 0){ return r; } r = write(stderrfd(),"\n",1); if (r < 0){ return r; } return len + 1; } #endif /* WINDOWS */ static int shprintfstdout(const char *fmt,...) { int len; char *buf; va_list ap; va_start(ap,fmt); buf = g_strdup_vprintf(fmt, ap); va_end(ap); if (buf == NULL) { return 0; } len = puts_localized(stdoutfd(), buf); g_free(buf); return len; } #ifdef COMPILE_UNUSED_FUNCTIONS static int shprintfstderr(const char *fmt,...) { int len; char buf[1024]; va_list ap; va_start(ap,fmt); len=vsprintf(buf,fmt,ap); va_end(ap); write(stderrfd(),buf,len); return len; } #endif /* COMPILE_UNUSED_FUNCTIONS */ struct cmdtabletype cmdtable[] = { {"cd", cmcd}, {"echo", cmecho}, {"basename", cmbasename}, {"dirname", cmdirname}, {"seq", cmseq}, {"eval", cmeval}, {"exit", cmexit}, {"export", cmexport}, {"pwd", cmpwd}, {"read", cmread}, {"set", cmset}, {"shift", cmshift}, {"type", cmtype}, {"unset", cmunset}, {":", cmtrue}, {"object", cmobject}, {"derive", cmderive}, {"new", cmnew}, {"exist", cmexist}, {"del", cmdel}, {"get", cmget}, {"put", cmput}, {"cpy", cmcpy}, {"dup", cmdup}, {"move", cmmove}, {"movetop", cmmovetop}, {"moveup", cmmovetop}, {"movedown", cmmovetop}, {"movelast", cmmovetop}, {"exch", cmmove}, {"exe", cmexe}, {"dexpr", cmdexpr}, {"iexpr", cmdexpr}, {"true", cmtrue}, {"false", cmfalse}, {"[", cmtest}, {"sleep", cmsleep}, {"test", cmtest}, {"which", cmwhich}, }; int CMDNUM = sizeof(cmdtable) / sizeof(*cmdtable); char *cpcmdtable[] = { ";&|", "if", "then", "else", "elif", "fi", "case", "esac", "for", "while", "until", "do", "done", "{", "}", }; int CPCMDNUM = sizeof(cpcmdtable) / sizeof(*cpcmdtable); enum {CPNULL=1,CPIF,CPTHEN,CPELSE,CPELIF,CPFI,CPCASE,CPESAC, CPFOR,CPWHILE,CPUNTIL,CPDO,CPDONE,CPBI,CPBO, CPPATI,CPPATO,CPFN,CPNO}; enum {PPNULL=0,PPNO,PPSETV,PPSETO,PPSO1,PPSO2,PPSI1,PPSI2,PPPATOR,PPPIPE, PPAND,PPEND}; struct cmdstack { int cmdno; char *val; int ival,iftrue,casetrue; char *pat; struct prmlist *prm; struct cmdlist *cmd; void *next; }; static NHASH CmdTblHash, CpCmdTblHash; int eval_script(const char *script, int security) { struct nshell *nshell; int security_save; nshell = newshell(); if (nshell == NULL) return 1; security_save = get_security(); set_security(security); ngraphenvironment(nshell); cmdexecute(nshell, script); set_security(security_save); delshell(nshell); return 0; } int init_cmd_tbl(void) { int i, r; CmdTblHash = nhash_new(); if (CmdTblHash == NULL) return 1; CpCmdTblHash = nhash_new(); if (CpCmdTblHash == NULL) return 1; for (i = 0; i < CMDNUM; i++) { r = nhash_set_ptr(CmdTblHash, cmdtable[i].name, cmdtable[i].proc); if (r) { goto Err; } } for (i = 1; i < CPCMDNUM; i++) { r = nhash_set_int(CpCmdTblHash, cpcmdtable[i], i); if (r) { goto Err; } } return 0; Err: nhash_free(CmdTblHash); nhash_free(CpCmdTblHash); return 1; } shell_proc check_cmd(char *name) { shell_proc proc; int r; r = nhash_get_ptr(CmdTblHash, name, (void **) &proc); if (r) return NULL; return proc; } int check_cpcmd(char *name) { int r, i; r = nhash_get_int(CpCmdTblHash, name, &i); if (r) i = -1; return i; } static void prmfree(struct prmlist *prmroot) { struct prmlist *prmcur; if (prmroot==NULL) return; prmcur=prmroot; while (prmcur!=NULL) { struct prmlist *prmdel; prmdel=prmcur; prmcur=prmcur->next; g_free(prmdel->str); g_free(prmdel); } } static void cmdfree(struct cmdlist *cmdroot) { struct cmdlist *cmdcur; cmdcur=cmdroot; while (cmdcur!=NULL) { struct cmdlist *cmddel; prmfree(cmdcur->prm); cmddel=cmdcur; cmdcur=cmdcur->next; g_free(cmddel); } } static void cmdstackfree(struct cmdstack *stroot) { struct cmdstack *stcur; stcur=stroot; while (stcur!=NULL) { struct cmdstack *stdel; stdel=stcur; stcur=stcur->next; prmfree(stdel->prm); g_free(stdel->pat); /* hito (mem leak of pat) */ g_free(stdel); } } static void * cmdstackcat(struct cmdstack **stroot,int cmdno) { struct cmdstack *stcur,*stnew; if ((stnew=g_malloc(sizeof(struct cmdstack)))==NULL) return NULL; stcur=*stroot; if (stcur==NULL) *stroot=stnew; else { while (stcur->next!=NULL) stcur=stcur->next; stcur->next=stnew; } stnew->next=NULL; stnew->prm=NULL; stnew->cmd=NULL; stnew->pat=NULL; /* hito (mem leak of pat) */ stnew->cmdno=cmdno; return stnew; } static struct cmdstack * cmdstackgetpo(struct cmdstack **stroot) { struct cmdstack *stcur,*stprev; stcur=*stroot; stprev=NULL; while (stcur!=NULL) { stprev=stcur; stcur=stcur->next; } return stprev; } static int cmdstackgetlast(struct cmdstack **stroot) { struct cmdstack *stcur,*stprev; stcur=*stroot; stprev=NULL; while (stcur!=NULL) { stprev=stcur; stcur=stcur->next; } if (stprev==NULL) return 0; else return stprev->cmdno; } static void cmdstackrmlast(struct cmdstack **stroot) { struct cmdstack *stcur,*stprev; stcur=*stroot; stprev=NULL; if (stcur==NULL) return; while (stcur->next!=NULL) { stprev=stcur; stcur=stcur->next; } if (stprev==NULL) *stroot=NULL; else stprev->next=NULL; prmfree(stcur->prm); g_free(stcur->pat); /* hito (mem leak of pat) */ g_free(stcur); } static struct vallist * create_vallist(char *name, char *val) { struct vallist *valnew; valnew = g_malloc(sizeof(* valnew)); if (valnew == NULL) return NULL; valnew->name = g_strdup(name); if (valnew->name == NULL) { g_free(valnew); return NULL; } if (val) { valnew->val = g_strdup(val); if (valnew->val == NULL) { g_free(valnew->name); g_free(valnew); return NULL; } } else { valnew->val = NULL; } return valnew; } static void free_vallist(struct vallist *val) { if (val == NULL) return; g_free(val->name); if (val->func) cmdfree(val->val); else g_free(val->val); g_free(val); } char * addval(struct nshell *nshell,char *name,char *val) /* addval() returns NULL on error */ { #if USE_HASH struct vallist *valnew, *valcur; int hkey; valnew = create_vallist(name, val); if (valnew == NULL) return NULL; valnew->func = FALSE; valnew->arg = FALSE; hkey = nhash_hkey(name); nhash_get_ptr_with_hkey(nshell->valroot, name, hkey, (void **) &valcur); if (valcur) { free_vallist(valcur); } nhash_set_ptr_with_hkey(nshell->valroot, valnew->name, hkey, valnew); return valnew->name; #else struct vallist *valcur,*valprev,*valnew; if ((valnew=g_malloc(sizeof(struct vallist)))==NULL) return NULL; if ((valnew->name=g_malloc(strlen(name)+1))==NULL) { g_free(valnew); return NULL; } if ((valnew->val=g_malloc(strlen(val)+1))==NULL) { g_free(valnew->name); g_free(valnew); return NULL; } valnew->func=FALSE; valnew->arg=FALSE; strcpy(valnew->name,name); strcpy(valnew->val,val); valcur=nshell->valroot; valprev=NULL; while (valcur!=NULL) { if (strcmp2(name,valcur->name)<=0) break; valprev=valcur; valcur=valcur->next; } if (valprev==NULL) nshell->valroot=valnew; else valprev->next=valnew; if (valcur==NULL) { valnew->next=NULL; } else if (strcmp0(name,valcur->name)==0) { valnew->next=valcur->next; g_free(valcur->name); if (valcur->func) cmdfree(valcur->val); else g_free(valcur->val); g_free(valcur); } else { valnew->next=valcur; } return valnew->name; #endif } static char * saveval(struct nshell *nshell,char *name,char *val, struct vallist **newvalroot) /* saveval() returns NULL on error */ { #if USE_HASH struct vallist *valnew, *valcur; int hkey; valnew = create_vallist(name, val); if (valnew == NULL) return NULL; valnew->func = FALSE; valnew->arg = TRUE; hkey = nhash_hkey(name); nhash_get_ptr_with_hkey(nshell->valroot, name, hkey, (void **) &valcur); if (valcur) { valcur->next = NULL; if (*newvalroot == NULL) { *newvalroot = valcur; } else { (*newvalroot)->next=valcur; } } nhash_set_ptr_with_hkey(nshell->valroot, name, hkey, valnew); return valnew->name; #else struct vallist *valcur,*valprev,*valnew; if ((valnew=g_malloc(sizeof(struct vallist)))==NULL) return NULL; if ((valnew->name=g_malloc(strlen(name)+1))==NULL) { g_free(valnew); return NULL; } if ((valnew->val=g_malloc(strlen(val)+1))==NULL) { g_free(valnew->name); g_free(valnew); return NULL; } valnew->func=FALSE; valnew->arg=TRUE; strcpy(valnew->name,name); strcpy(valnew->val,val); valcur=nshell->valroot; valprev=NULL; while (valcur!=NULL) { if (strcmp2(name,valcur->name)<=0) break; valprev=valcur; valcur=valcur->next; } if (valprev==NULL) nshell->valroot=valnew; else valprev->next=valnew; if (valcur==NULL) { valnew->next=NULL; } else if (strcmp0(name,valcur->name)==0) { valnew->next=valcur->next; // valcur->next = *newvalroot; /* this code may be wrong. */ valcur->next=NULL; if (*newvalroot==NULL) *newvalroot=valcur; else (*newvalroot)->next=valcur; } else { valnew->next=valcur; } return valnew->name; #endif } static int delete_save_val(struct nhash *hash, void *data) { struct vallist *val; struct nshell *nshell; val = (struct vallist *) hash->val.p; nshell = (struct nshell *) data; if (val->arg) { nhash_del(nshell->valroot, val->name); free_vallist(val); } return 0; } static void restoreval(struct nshell *nshell,struct vallist *newvalroot) /* restoreval() returns NULL on error */ { #if USE_HASH struct vallist *valcur,*valnext, *valcur2; nhash_each(nshell->valroot, delete_save_val, nshell); valcur = newvalroot; while (valcur) { int hk; valnext = valcur->next; hk = nhash_hkey(valcur->name); nhash_get_ptr_with_hkey(nshell->valroot, valcur->name, hk, (void **) &valcur2); if (valcur2) { free_vallist(valcur); } else { nhash_set_ptr_with_hkey(nshell->valroot, valcur->name, hk, (void *) valcur); } valcur = valnext; } #else struct vallist *valcur,*valprev,*valnext; struct vallist *valcur2,*valprev2; valcur=nshell->valroot; valprev=NULL; while (valcur!=NULL) { valnext=valcur->next; if (valcur->arg==1) { if (valprev==NULL) nshell->valroot=valcur->next; else valprev->next=valcur->next; g_free(valcur->name); g_free(valcur->val); g_free(valcur); } else valprev=valcur; valcur=valnext; } valcur=newvalroot; while (valcur!=NULL) { valnext=valcur->next; valcur2=nshell->valroot; valprev2=NULL; while (valcur2!=NULL) { if (strcmp2(valcur->name,valcur2->name)<=0) break; valprev2=valcur2; valcur2=valcur2->next; } if (valcur2==NULL) { if (valprev2==NULL) nshell->valroot=valcur; else valprev2->next=valcur; valcur->next=NULL; } else if (strcmp0(valcur->name,valcur2->name)==0) { g_free(valcur->name); if (valcur->func) cmdfree(valcur->val); else g_free(valcur->val); g_free(valcur); } else { if (valprev2==NULL) nshell->valroot=valcur; else valprev2->next=valcur; valcur->next=valcur2; } valcur=valnext; } #endif } char * addexp(struct nshell *nshell,char *name) /* addexp() returns NULL on error */ { #if USE_HASH if (nhash_set_int(nshell->exproot, name, TRUE)) return NULL; return name; #else struct explist *valcur,*valprev,*valnew; int cmp; valcur=nshell->exproot; valprev=NULL; while (valcur!=NULL) { cmp=strcmp2(name,valcur->val); if (cmp==0) return valcur->val; else if (cmp<0) break; valprev=valcur; valcur=valcur->next; } if ((valnew=g_malloc(sizeof(struct vallist)))==NULL) return NULL; if ((valnew->val=g_malloc(strlen(name)+1))==NULL) { g_free(valnew); return NULL; } if (valprev==NULL) nshell->exproot=valnew; else valprev->next=valnew; strcpy(valnew->val,name); valnew->next=valcur; return valnew->val; #endif } int delval(struct nshell *nshell,char *name) { #if USE_HASH struct vallist *val; int r, hkey; hkey = nhash_hkey(name); r = nhash_get_ptr_with_hkey(nshell->valroot, name, hkey, (void **) &val); if (r == 0) { free_vallist(val); nhash_del_with_hkey(nshell->valroot, name, hkey); return TRUE; } return FALSE; #else struct vallist *valcur,*valprev; valcur=nshell->valroot; valprev=NULL; while (valcur!=NULL) { if (strcmp0(valcur->name,name)==0) { if (valprev==NULL) nshell->valroot=valcur->next; else valprev->next=valcur->next; g_free(valcur->name); if (valcur->func) cmdfree(valcur->val); else g_free(valcur->val); g_free(valcur); return TRUE; } valprev=valcur; valcur=valcur->next; } return FALSE; #endif } char * getval(struct nshell *nshell,char *name) { #if USE_HASH struct vallist *val; nhash_get_ptr(nshell->valroot, name, (void **) &val); if (val && ! val->func) { return val->val; } return FALSE; #else struct vallist *valcur; valcur=nshell->valroot; while (valcur!=NULL) { if ((strcmp0(valcur->name,name)==0) && (!valcur->func)) return valcur->val; valcur=valcur->next; } return NULL; #endif } static int getexp(struct nshell *nshell,char *name) { #if USE_HASH int i, r; r = nhash_get_int(nshell->exproot, name, &i); return ! r; #else struct explist *valcur; valcur=nshell->exproot; while (valcur!=NULL) { if (strcmp0(valcur->val,name)==0) return TRUE; valcur=valcur->next; } return FALSE; #endif } static char * newfunc(struct nshell *nshell,char *name) /* newfunc() returns NULL on error */ { #if USE_HASH struct vallist *valnew, *valcur; int hkey; valnew = create_vallist(name, NULL); if (valnew == NULL) return NULL; valnew->func = TRUE; valnew->arg = FALSE; hkey = nhash_hkey(name); nhash_get_ptr_with_hkey(nshell->valroot, name, hkey, (void **) &valcur); if (valcur) { free_vallist(valcur); } nhash_set_ptr_with_hkey(nshell->valroot, valnew->name, hkey, valnew); return valnew->name; #else struct vallist *valcur,*valprev,*valnew; if ((valnew=g_malloc(sizeof(struct vallist)))==NULL) return NULL; if ((valnew->name=g_malloc(strlen(name)+1))==NULL) { g_free(valnew); return NULL; } valnew->func=TRUE; valnew->arg=FALSE; strcpy(valnew->name,name); valnew->val=NULL; valcur=nshell->valroot; valprev=NULL; while (valcur!=NULL) { if (strcmp2(name,valcur->name)<=0) break; valprev=valcur; valcur=valcur->next; } if (valprev==NULL) nshell->valroot=valnew; else valprev->next=valnew; if (valcur==NULL) { valnew->next=NULL; } else if (strcmp0(name,valcur->name)==0) { valnew->next=valcur->next; g_free(valcur->name); if (valcur->func) cmdfree(valcur->val); else g_free(valcur->val); g_free(valcur); } else { valnew->next=valcur; } return valnew->name; #endif } static char * addfunc(struct nshell *nshell,char *name,struct cmdlist *val) /* addfunc() returns NULL on error */ { #if USE_HASH struct vallist *valcur; struct cmdlist *cmdcur,*cmdprev,*cmdnew; struct prmlist *prmcur,*prmprev,*prmnew; char *snew; nhash_get_ptr(nshell->valroot, name, (void **) &valcur); if (valcur == NULL) { return NULL; } if (! valcur->func) { return NULL; } cmdcur = valcur->val; cmdprev = NULL; while (cmdcur) { cmdprev = cmdcur; cmdcur = cmdcur->next; } cmdnew = g_malloc(sizeof(* cmdnew)); if (cmdnew == NULL) { delval(nshell, name); return NULL; } if (cmdprev == NULL) { valcur->val = cmdnew; } else { cmdprev->next = cmdnew; } *cmdnew = *val; cmdnew->prm = NULL; cmdnew->next = NULL; prmcur = val->prm; prmprev = NULL; while (prmcur) { prmnew = g_malloc(sizeof(* prmnew)); if (prmnew == NULL) { delval(nshell, name); return NULL; } if (prmprev == NULL) { cmdnew->prm=prmnew; } else { prmprev->next=prmnew; } *prmnew = *prmcur; prmnew->next = NULL; if (prmcur->str) { snew = g_strdup(prmcur->str); if (snew == NULL) { delval(nshell, name); return NULL; } prmnew->str = snew; } prmprev = prmnew; prmcur = prmcur->next; } return valcur->name; #else struct vallist *valcur; struct cmdlist *cmdcur,*cmdprev,*cmdnew; struct prmlist *prmcur,*prmprev,*prmnew; char *snew; valcur=nshell->valroot; while (valcur!=NULL) { if ((strcmp0(valcur->name,name)==0) && (valcur->func)) { cmdcur=valcur->val; cmdprev=NULL; while (cmdcur!=NULL) { cmdprev=cmdcur; cmdcur=cmdcur->next; } if ((cmdnew=g_malloc(sizeof(struct cmdlist)))==NULL) { delval(nshell,name); return NULL; } if (cmdprev==NULL) valcur->val=cmdnew; else cmdprev->next=cmdnew; *cmdnew=*val; cmdnew->prm=NULL; cmdnew->next=NULL; prmcur=val->prm; prmprev=NULL; while (prmcur!=NULL) { if ((prmnew=g_malloc(sizeof(struct prmlist)))==NULL) { delval(nshell,name); return NULL; } if (prmprev==NULL) cmdnew->prm=prmnew; else prmprev->next=prmnew; *prmnew=*prmcur; prmnew->next=NULL; if (prmcur->str!=NULL) { if ((snew=g_malloc(strlen(prmcur->str)+1))==NULL) { delval(nshell,name); return NULL; } strcpy(snew,prmcur->str); prmnew->str=snew; } prmprev=prmnew; prmcur=prmcur->next; } break; } valcur=valcur->next; } return valcur->name; #endif } struct cmdlist * getfunc(struct nshell *nshell,char *name) { #if USE_HASH struct vallist *val; nhash_get_ptr(nshell->valroot, name, (void **) &val); if (val && val->func) { return val->val; } return FALSE; #else struct vallist *valcur; valcur=nshell->valroot; while (valcur!=NULL) { if ((strcmp0(valcur->name,name)==0) && (valcur->func)) return valcur->val; valcur=valcur->next; } return NULL; #endif } static char * gettok(char **s,int *len,int *quote,int *bquote,int *cend,int *escape) { int i; char *po,*spo; *len = 0; if (*s==NULL) return NULL; *cend='\0'; *escape=FALSE; po=*s; /* remove branck */ for (i=0;(po[i]!='\0') && !*quote && (strchr(" \t",po[i])!=NULL);i++); /* token ends */ if ((po[i]=='\0') || (!*quote && (po[i]=='#'))) { *len=0; return NULL; } spo=po+i; if (!*quote && !*bquote) { /* check speecial character */ if (strchr(";&|^<>()",po[i])!=NULL) { if (strchr(";&)",po[i])!=NULL) *cend=po[i]; if ((strchr("<>",po[i])!=NULL) && (po[i]==po[i+1])) { i++; if (po[i] == '<' && po[i + 1] == '-') { i++; } } if ((po[i]==';') && (po[i]==po[i+1])) i++; *s+=(i+1); *len=*s-spo; return spo; } } for (;(po[i]!='\0') && (*quote || *bquote || *escape || (strchr(";&|^<> \t()",po[i])==NULL)); i++) { /* check escapse */ if (*escape) *escape=FALSE; else if (po[i]=='\\') { if (!*quote || ((*quote=='"') && (strchr("\"\\'$",po[i+1])!=NULL)) || *bquote ) *escape=TRUE; /* check back quote */ } else if (*bquote) { if (po[i]=='`') *bquote='\0'; } else if ((po[i]=='`') && (*quote!='\'')) *bquote='`'; /* check quotation */ else if ((*quote=='"') || (*quote=='\'')) { if (po[i]==*quote) *quote='\0'; } else if (po[i]=='\'' || po[i]=='"') *quote=po[i]; } if (*escape) i--; *s+=i; *len=*s-spo; return spo; } static int getcmdline(struct nshell *nshell, struct cmdlist **rcmdroot,struct cmdlist *cmd, const char *str,int *istr) /* getcmdline() returns -2: unexpected eof detected -1: fatal error 0: noerror 1: eof detected */ { struct cmdlist *cmdroot,*cmdcur; struct prmlist *prmcur,*prmnew; int quote,quote2,bquote,bquote2,escape,escape2; int cend,l; char *spo,*po,*prompt,*tok,*tok2; char *ignoreeof,*endptr; int ch; int i,eofnum; int err,eofcount; err=-1; escape=escape2=FALSE; quote=quote2=bquote=bquote2='\0'; cend='\0'; cmdroot=NULL; cmdcur=NULL; prmcur=NULL; tok=NULL; eofcount=0; do { g_free(tok); tok=NULL; if (str==NULL) { if ((tok=nstrnew())==NULL) goto errexit; if (nisatty(nshell->fd)) { if (cmd == NULL && cmdroot == NULL) { prompt = getval(nshell, "PS1"); #ifdef HAVE_READLINE_READLINE_H MultiLine = FALSE; #endif } else { prompt = getval(nshell, "PS2"); #ifdef HAVE_READLINE_READLINE_H MultiLine = TRUE; #endif } #ifdef HAVE_READLINE_READLINE_H Prompt = prompt; #else if (prompt!=NULL) printfconsole("%.256s",prompt); #endif } do { ch=shget(nshell); if (ch==EOF) { if (strlen(tok)!=0) { if (!nisatty(nshell->fd)) break; else printfconsole("%c",(char )0x07); } else { if (!nisatty(nshell->fd)) { if ((cmd!=NULL) || (cmdroot!=NULL)) { sherror(ERRUEXPEOF); err=-2; } else err=1; goto errexit; } else { if ((cmd!=NULL) || (cmdroot!=NULL)) { sherror(ERRUEXPEOF); err=-2; goto errexit; } eofcount++; ignoreeof = getval(nshell,"IGNOREEOF"); if (ignoreeof == NULL) { eofnum=0; } else { if (ignoreeof[0] == '\0') { eofnum = 10; } else { eofnum = strtol(ignoreeof,&endptr,10); if (endptr[0] != '\0') eofnum = 10; } } if (eofcount > eofnum) { err=1; putconsole("exit"); nshell->quit=TRUE; goto errexit; } else { sherror(ERREOF); ch='\0'; } } } } else { eofcount=0; if (ch=='\n') ch='\0'; if ((tok=nstrccat(tok,ch))==NULL) goto errexit; } } while (ch!='\0'); } else { if (str[*istr]=='\0') { if ((cmd!=NULL) || (cmdroot!=NULL)) { sherror(ERRUEXPEOF); err=-2; } else { err=1; } goto errexit; } for (i=*istr;(str[i]!='\0') && (str[i]!='\n');i++); if ((tok=g_malloc(i-*istr+1))==NULL) { goto errexit; } strncpy(tok,str+*istr,i-*istr); tok[i-*istr]='\0'; if (str[i]=='\n') { *istr=i+1; } else { *istr=i; } } if (! g_utf8_validate(tok, -1, NULL)) { char *tmp; tmp = g_locale_to_utf8(tok, -1, NULL, NULL, NULL); if (tmp) { g_free(tok); tok = tmp; } } tok2=tok; do { int len; spo=gettok(&tok2,&len,"e,&bquote,&cend,&escape); if (quote2 || bquote2 || escape2) { l=strlen(prmcur->str); if (quote2 || bquote2) l++; if ((po=g_malloc(len+l+1))==NULL) goto errexit; strcpy(po,prmcur->str); if (quote2 || bquote2) *(po+l-1)='\n'; if (spo!=NULL) strncpy(po+l,spo,len); *(po+len+l)='\0'; g_free(prmcur->str); prmcur->str=po; } else if (spo!=NULL) { if (cmdroot==NULL) { if ((cmdcur=g_malloc(sizeof(struct cmdlist)))==NULL) goto errexit; cmdroot=cmdcur; cmdcur->next=NULL; cmdcur->prm=NULL; } if ((prmnew=g_malloc(sizeof(struct prmlist)))==NULL) goto errexit; if (cmdcur->prm==NULL) cmdcur->prm=prmnew; else prmcur->next=prmnew; prmcur=prmnew; prmcur->next=NULL; if ((prmcur->str=g_malloc(len+1))==NULL) goto errexit; strncpy(prmcur->str,spo,len); prmcur->str[len]='\0'; } if (cend) { if ((cmdcur->next=g_malloc(sizeof(struct cmdlist)))==NULL) goto errexit; cmdcur=cmdcur->next; cmdcur->next=NULL; cmdcur->prm=NULL; } quote2=quote; bquote2=bquote; escape2=escape; } while ((spo!=NULL) && (!escape) && (!quote) && (!bquote)); } while (quote || bquote || escape || (cmdroot==NULL)); *rcmdroot=cmdroot; g_free(tok); return 0; errexit: cmdfree(cmdroot); g_free(tok); *rcmdroot=NULL; return err; } static char * quotation(struct nshell *nshell,char *s,int quote) { int i,j,num; char *snew,*ifs; ifs=getval(nshell,"IFS"); num=0; for (i=0;s[i]!='\0';i++) if (strchr("\"\\'$",s[i])!=NULL) num++; if ((snew=g_malloc(strlen(s)+num+1))==NULL) return NULL; j=0; for (i=0;s[i]!='\0';i++) { if ((quote!='"') && (ifs!=NULL) && (ifs[0]!='\0') && (strchr(ifs,s[i])!=NULL)) snew[j++]=(char )0x01; else { if (strchr("\"\\'$",s[i])!=NULL) snew[j++]=(char )0x02; snew[j++]=s[i]; } } snew[j]='\0'; return snew; } static char * unquotation(char *s,int *quoted) { int escape,quote,i,j; char *snew,*po; if ((snew=g_malloc(strlen(s)+1))==NULL) return NULL; *quoted=FALSE; po=s; escape=FALSE; quote='\0'; j=0; for (i=0;po[i]!='\0';i++) { if (escape) { escape=FALSE; snew[j++]=po[i]; } else if (po[i]=='\\') { if (!quote || ((quote=='"') && (strchr("\"\\'$",po[i+1])!=NULL))) escape=TRUE; else snew[j++]=po[i]; } else if (po[i]==(char )0x02) escape=TRUE; else if (po[i]==(char )0x01) snew[j++]=' '; else if ((quote=='"') || (quote=='\'')) { if (po[i]==quote) quote='\0'; else snew[j++]=po[i]; } else if (po[i]=='\'' || po[i]=='"') { quote=po[i]; *quoted=TRUE; } else snew[j++]=po[i]; } snew[j]='\0'; return snew; } static char * fnexpand(struct nshell *nshell,char *str) { int escape,str_expand,str_noexpand,quote,i,j,len,num; char *po; char *s,*s2; char **namelist; po=str; escape=str_expand=str_noexpand=FALSE; quote='\0'; if ((s=nstrnew())==NULL) return NULL; if ((s2=nstrnew())==NULL) return NULL; len=strlen(po); for (i=0;i<=len;i++) { if (escape && (po[i]!='\0')) { escape=FALSE; if ((s=nstrccat(s,po[i]))==NULL) goto errexit; if (strchr("*?[",po[i])!=NULL) str_noexpand=TRUE; } else if (po[i]=='\\') { if (!quote || ((quote=='"') && (strchr("\"\\'$",po[i+1])!=NULL))) escape=TRUE; else if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } else if (po[i]==(char )0x02) escape=TRUE; else if ((po[i]==(char )0x01) || (po[i]=='\0')) { if (strlen(s)!=0) { if (!nshell->optionf && str_expand && !str_noexpand) { if ((num=nglob(s,&namelist))==-1) goto errexit; for (j=0;jstr; if (po==NULL) return 1; if ((s=nstrnew())==NULL) return -1; for (i=0;po[i]!='\0';i++) { if (po[i]==(char )0x02) { i++; if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } else if (po[i]==(char )0x01) { prmcur->str=s; if ((s=nstrnew())==NULL) goto errexit; if ((prmnew=g_malloc(sizeof(struct prmlist)))==NULL) goto errexit; prmnew->str=NULL; prmnew->next=prmcur->next; prmnew->prmno=prmcur->prmno; prmcur->next=prmnew; prmcur=prmnew; num++; } else if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } prmcur->str=s; num++; g_free(po); return num; errexit: g_free(s); g_free(po); return -1; } static char * wordunsplit(char *str) { int i,j; char *po; po=str; j=0; for (i=0;po[i]!='\0';i++) if (po[i]==(char )0x01) po[j++]=' '; else if (po[i]!=(char )0x02) po[j++]=po[i]; po[j]='\0'; return po; } static char * expand(struct nshell *nshell,char *str,int *quote,int *bquote, int ifsexp) { char *po; int quote2,bquote2,escape; int i,j,k,num; unsigned int u, n; char *c1,*c2,*name,*val,ch,valf,valf2,*ifs; char *s,*sb,*se; int sout,sout2; int rcode,dummy; int byte; char *tmpfil; struct objlist *sys; struct narray *sarray; char **sdata; int snum; char *tmp; if ((po=str)==NULL) return NULL; if ((s=nstrnew())==NULL) return NULL; name=NULL; sb=se=NULL; escape=FALSE; ifs=getval(nshell,"IFS"); for (i=0;po[i]!='\0';i++) { /* check escapse */ if (escape) { if (se==NULL) { if (sb!=NULL) { if ((sb=nstrccat(sb,po[i]))==NULL) goto errexit; } else { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } escape=FALSE; } else if (po[i]=='\\') { if (!*quote || ((*quote=='"') && (strchr("\"\\'$",po[i+1])!=NULL)) || *bquote ) { escape=TRUE; if ((se==NULL) && (sb==NULL)) { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } else if (se==NULL) { if (sb!=NULL) { if ((sb=nstrccat(sb,po[i]))==NULL) goto errexit; } else { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } } else if (po[i]==(char )0x02) { escape=TRUE; if ((se==NULL) && (sb==NULL)) { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } /* check back quote */ } else if (*bquote) { if (po[i]=='`') { *bquote='\0'; if (se==NULL) { /* command substitution */ if ((sys=getobject("system"))==NULL) goto errexit; /* fix-me: assigned value of the variable "sys" is never used */ sout = n_mkstemp(getval(nshell,"TMPDIR"), TEMPPFX, &tmpfil); if (sout < 0) goto errexit; sout2=nredirect(1,sout); rcode=cmdexecute(nshell,sb); if ((rcode!=0) && (rcode!=1)) { nredirect2(1,sout2); g_unlink(tmpfil); g_free(tmpfil); goto errexit; } g_free(sb); if ((sb=nstrnew())==NULL) { nredirect2(1,sout2); g_unlink(tmpfil); g_free(tmpfil); goto errexit; } nlseek(stdoutfd(),0L,SEEK_SET); while ((byte=nread(stdoutfd(),writebuf,WRITEBUFSIZE-1))>0) { writebuf[byte]='\0'; if ((sb=nstrcat(sb,writebuf))==NULL) { nredirect2(1,sout2); g_unlink(tmpfil); g_free(tmpfil); goto errexit; } } nredirect2(1,sout2); g_unlink(tmpfil); if (byte==-1) { sherror2(ERRREAD,tmpfil); g_free(tmpfil); goto errexit; } g_free(tmpfil); n = strlen(sb); for (u = 0; u < n; u++) { if (sb[u] == '\n') { sb[u] = ' '; } } for (j=strlen(sb)-1;(j>=0) && (sb[j]==' ');j--); sb[j+1]='\0'; if ((c1=quotation(nshell,sb,*quote))==NULL) goto errexit; s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; g_free(sb); sb=NULL; } } else if (se==NULL) { if (sb!=NULL) { if ((sb=nstrccat(sb,po[i]))==NULL) goto errexit; } else { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } } else if ((po[i]=='`') && (*quote!='\'')) { *bquote='`'; if (se==NULL) { if ((sb=nstrnew())==NULL) goto errexit; } /* check constant variable */ } else if ((po[i]=='$') && (po[i+1]!='\0') && (*quote!='\'') && (se==NULL)) { if (isdigit(po[i+1])) { for (j=i+1;(po[j]!='\0') && isdigit(po[j]);j++); g_free(name); if ((name=g_malloc(j-i))==NULL) goto errexit; strncpy(name,po+i+1,j-i-1); name[j-i-1]='\0'; num=atoi(name); if (numargc) { if ((c1=quotation(nshell,(nshell->argv)[num],*quote))==NULL) goto errexit; s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; } i=j-1; } else if (strchr("#?",po[i+1])!=NULL) { switch (po[i+1]) { case '#': g_free(name); if ((name=g_malloc(12))==NULL) goto errexit; sprintf(name,"%d",nshell->argc-1); break; case '?': g_free(name); if ((name=g_malloc(12))==NULL) goto errexit; sprintf(name,"%d",nshell->status); break; } if ((c1=quotation(nshell,name,*quote))==NULL) goto errexit; s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; i++; } else if (strchr("*@",po[i+1])!=NULL) { val=getval(nshell,"IFS"); if (val==NULL) ch='\0'; else ch=val[0]; for (j=1;jargc;j++) { if ((c1=quotation(nshell,(nshell->argv)[j],*quote))==NULL) goto errexit; s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; if (j!=(nshell->argc-1)) { if ((*quote=='"') && (po[i+1]=='*')) { if (ch!='\0') { if (strchr("\"\\'$",ch)!=NULL) { if ((s=nstrccat(s,'\\'))==NULL) goto errexit; } if ((s=nstrccat(s,ch))==NULL) goto errexit; } } else { if ((s=nstrccat(s,(char )0x01))==NULL) goto errexit; } } } i++; /* check variable */ } else if (po[i+1]=='{') { for (j=i+2;(po[j]!='\0') && (isalnum(po[j]) || (po[j]=='_'));j++); if ((po[j]=='\0') || (strchr(":-=?+#%}",po[j])==NULL) || (po[j-1]=='{')) { sherror(ERRBADSUB); goto errexit; } if (po[j]=='}') { g_free(name); if ((name=g_malloc(j-i-1))==NULL) goto errexit; strncpy(name,po+i+2,j-i-2); name[j-i-2]='\0'; val=getval(nshell,name); if (val!=NULL) { if ((c1=quotation(nshell,val,*quote))==NULL) goto errexit; s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; } i=j; } else { if ((po[j]==':') && (po[j+1]!='\0') && (strchr("-=?+",po[j+1])==NULL)) { valf='o'; if ((se=nstrnew())==NULL) goto errexit; i+=2; } else { g_free(name); if ((name=g_malloc(j-i-1))==NULL) goto errexit; strncpy(name,po+i+2,j-i-2); name[j-i-2]='\0'; val=getval(nshell,name); quote2=*quote; bquote2=*bquote; valf2=' '; if (po[j]==':') { valf2=':'; j++; } if (strchr("-=?+",po[j])!=NULL) { valf=po[j]; j++; } else if (strchr("#%",po[j])!=NULL) { if (po[j]==po[j+1]) { valf2=po[j]; j++; } valf=po[j]; j++; } else { sherror(ERRBADSUB); goto errexit; } if ((se=nstrnew())==NULL) goto errexit; i=j; } } } else { /* simple variable substitution */ for (j=i+1;(po[j]!='\0') && (isalnum(po[j]) || (po[j]=='_'));j++); g_free(name); if ((name=g_malloc(j-i))==NULL) goto errexit; strncpy(name,po+i+1,j-i-1); name[j-i-1]='\0'; if (name[0]=='\0') val="$"; else val=getval(nshell,name); if (val!=NULL) { if ((c1=quotation(nshell,val,*quote))==NULL) goto errexit; s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; } i=j-1; } /* check variable end */ } else if ((po[i]=='}') && (*quote!='\'') && (se!=NULL)) { if (valf=='o') { /* object replacement */ if ((tmp=unquotation(se,&dummy))==NULL) goto errexit; g_free(se); se=NULL; sarray=sgetobj(tmp,FALSE,FALSE,FALSE); g_free(tmp); sdata=arraydata(sarray); snum=arraynum(sarray); for (j=0;j=0;k--) { ch=c2[k]; c2[k]='\0'; if (wildmatch(c1,c2,WILD_PATHNAME)) { c2[k]=ch; break; } c2[k]=ch; } } else { for (k = 0; k <= (int) strlen(c2); k++) { ch=c2[k]; c2[k]='\0'; if (wildmatch(c1,c2,WILD_PATHNAME)) { c2[k]=ch; break; } c2[k]=ch; } } if (k > (int) strlen(c2)) { k=0; } else if (k < 0) { k = 0; /* fix-me: is it proper? */ } g_free(c1); c1=quotation(nshell,c2+k,quote2); g_free(c2); if (c1==NULL) goto errexit; } break; case '%': if ((val!=NULL) && (val[0]!='\0')) { if ((c2=nstrnew())==NULL) goto errexit; if ((c2=nstrcat(c2,val))==NULL) goto errexit; if ((c1=expand(nshell,se,"e2,&bquote2,TRUE))==NULL) { g_free(c2); goto errexit; } if (valf2=='%') { int len; len = strlen(c2) - 1; for (k = 0; k <= len; k++) { if (wildmatch(c1,c2+k,WILD_PATHNAME)) break; } } else { for (k=strlen(c2);k>=0;k--) { if (wildmatch(c1,c2+k,WILD_PATHNAME)) break; } } if (k<0) k=strlen(c2); c2[k]='\0'; g_free(c1); c1=quotation(nshell,c2,quote2); g_free(c2); if (c1==NULL) goto errexit; } break; } if (c1!=NULL) { s=nstrcat(s,c1); g_free(c1); if (s==NULL) goto errexit; } *quote=quote2; *bquote=bquote2; g_free(se); se=NULL; } /* check quotation */ } else if ((*quote=='"') || (*quote=='\'')) { if (po[i]==*quote) *quote='\0'; if (se==NULL) { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } else if (po[i]=='\'' || po[i]=='"') { *quote=po[i]; if (se==NULL) { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } else { if (se==NULL) { if (ifsexp && (ifs!=NULL) && (ifs[0]!='\0') && (strchr(ifs,po[i])!=NULL)) { if ((s=nstrccat(s,(char )0x01))==NULL) goto errexit; } else { if ((s=nstrccat(s,po[i]))==NULL) goto errexit; } } } if (se!=NULL) { if ((se=nstrccat(se,po[i]))==NULL) goto errexit; } } if ((se!=NULL) || (sb!=NULL)) { sherror(ERRBADSUB); goto errexit; } g_free(name); g_free(sb); g_free(se); return s; errexit: g_free(name); g_free(sb); g_free(se); g_free(s); return NULL; } static int checkcmd(struct nshell *nshell,struct cmdlist **cmdroot) /* checkcmd() returns -1: fatal error 0: noerror 2: error */ { struct cmdlist *cmdcur,*cmdprev,*cmddel,*cmdnew; struct prmlist *prmcur,*prmprev; int cmd,i; char *po; char *s,*eof, *prompt; int quoted,ch; int eoflen,match,len; char *tmpfil; int sout; int ignore_indent, remove_tab; cmdcur=*cmdroot; cmdprev=NULL; while (cmdcur!=NULL) { if (cmdcur->prm==NULL) { if (cmdprev==NULL) *cmdroot=cmdcur->next; else cmdprev->next=cmdcur->next; cmddel=cmdcur; cmdcur=cmdcur->next; g_free(cmddel); } else { /* remove zero length parameter */ prmcur=cmdcur->prm; cmd=CPNO; while (prmcur->next!=NULL) prmcur=prmcur->next; if (prmcur->str[0]==')') cmd=CPPATI; prmcur=cmdcur->prm; if ((prmcur->str[0]!='\0') && (strchr(cpcmdtable[0],prmcur->str[0])!=NULL)) cmd=CPNULL; i = check_cpcmd(prmcur->str); if (i >= 0) { cmd = i + 1; } else { prmcur=prmcur->next; if ((prmcur!=NULL) && (prmcur->str[0]=='(')) { prmcur=prmcur->next; if ((prmcur!=NULL) && (prmcur->str[0]==')')) cmd=CPFN; } } cmdcur->cmdno=cmd; if ((cmd!=CPNO) && (cmd!=CPCASE) && (cmd!=CPPATI) && (cmd!=CPPATO) && (cmd!=CPFOR) && (cmd!=CPFN) && ((cmdcur->prm)->next!=NULL)) { if ((cmdnew=g_malloc(sizeof(struct cmdlist)))==NULL) return -1; cmdnew->next=cmdcur->next; cmdcur->next=cmdnew; cmdnew->prm=(cmdcur->prm)->next; (cmdcur->prm)->next=NULL; cmdnew->cmdno=CPNO; } /* check pattern */ if (cmdcur->cmdno==CPCASE) { prmcur=cmdcur->prm; /* case */ if (prmcur->next!=NULL) { prmcur=prmcur->next; /* word */ if (prmcur->next!=NULL) { prmprev=prmcur->next; /* in */ if (prmprev->next!=NULL) { prmcur=prmprev->next; prmprev->next=NULL; if ((cmdnew=g_malloc(sizeof(struct cmdlist)))==NULL) return -1; cmdnew->next=cmdcur->next; cmdcur->next=cmdnew; cmdnew->prm=prmcur; } } } } /* check redirect and pipe */ cmdcur->cmdend=PPEND; cmdcur->pipefile=NULL; prmcur=cmdcur->prm; prmprev=NULL; while (prmcur!=NULL) { if (prmcur->str!=NULL) { if ((prmcur->str[0]=='>') || (prmcur->str[0]=='<')) { if ((prmcur->next==NULL) || ((prmcur->next)->str==NULL) || (strchr(";&|",(prmcur->next)->str[0])!=NULL)) { sherror2(ERRUEXPTOK,prmprev->str); return 2; } if (prmcur->str[0]==prmcur->str[1]) { if (prmcur->str[0]=='>') prmcur->prmno=PPSO2; else { struct objlist *sys; prmcur->prmno=PPSI2; if ((eof=unquotation((prmcur->next)->str,"ed))==NULL) return -1; g_free((prmcur->next)->str); (prmcur->next)->str=eof; (prmcur->next)->quoted=quoted; if (prmcur->str[2] == '-') { ignore_indent = TRUE; remove_tab = TRUE; } else { ignore_indent = FALSE; remove_tab = FALSE; } /* get << contents */ if ((sys=getobject("system"))==NULL) return -1; /* fix-me: assigned value of the variable "sys" is never used */ sout = n_mkstemp(getval(nshell,"TMPDIR"), TEMPPFX, &tmpfil); if (sout < 0) return -1; if ((quoted) && !nisatty(nshell->fd)) { eoflen=strlen(eof); match=0; writepo=0; while (TRUE) { ch=shget(nshell); if ((ch==EOF) || (ch=='\0')) break; if (remove_tab && ch == '\t') continue; remove_tab = FALSE; if (ch=='\n') { if (match==eoflen) break; writebuf[writepo]=ch; writepo++; if (writepo==WRITEBUFSIZE) { nwrite(sout,writebuf,WRITEBUFSIZE); writepo=0; } match=0; remove_tab = ignore_indent; } else if (match==-1) { writebuf[writepo]=ch; writepo++; if (writepo==WRITEBUFSIZE) { nwrite(sout,writebuf,WRITEBUFSIZE); writepo=0; } } else if ((match==eoflen) || (ch!=eof[match])) { for (i=0;ifd)) { prompt = getval(nshell,"PS2"); #ifdef HAVE_READLINE_READLINE_H Prompt = prompt; MultiLine = TRUE; #else if (prompt) printfconsole("%.256s", prompt); #endif } do { ch=shget(nshell); if (ch==EOF) { if (strlen(s)!=0) { if (!nisatty(nshell->fd)) break; else printfconsole("%c",(char )0x07); } else break; } else { if (ch=='\n') ch='\0'; if (remove_tab && ch == '\t') continue; remove_tab = FALSE; if ((s=nstrccat(s,ch))==NULL) { nclose(sout); unlinkfile(&tmpfil); return -1; } } } while (ch!='\0'); if (strcmp0(eof,s)!=0) { len=strlen(s); s[len]='\n'; nwrite(sout,s,len+1); g_free(s); } else { g_free(s); break; } } while (ch!=EOF); } nclose(sout); g_free((prmcur->next)->str); (prmcur->next)->str=tmpfil; } } else { if (prmcur->str[0]=='>') prmcur->prmno=PPSO1; else prmcur->prmno=PPSI1; } (prmcur->next)->prmno=prmcur->prmno; prmcur=prmcur->next; } else if (prmcur->str[0]=='|') { if (cmdcur->cmdno==CPPATI) { prmcur->prmno=PPPATOR; } else { cmdcur->cmdend=PPPIPE; prmcur->prmno=PPPIPE; if ((prmcur->next==NULL) || ((prmcur->next)->str==NULL) || (strchr(";&|",(prmcur->next)->str[0])!=NULL)) { sherror2(ERRUEXPTOK,prmcur->str); return 2; } if ((cmdnew=g_malloc(sizeof(struct cmdlist)))==NULL) return -1; cmdnew->next=cmdcur->next; cmdcur->next=cmdnew; cmdnew->prm=prmcur->next; prmcur->next=NULL; cmdnew->cmdno=CPNO; } } else if (prmcur->str[0]=='&') { prmcur->prmno=PPAND; cmdcur->cmdend=PPAND; } else if (prmcur->str[0]==';') { if (prmcur->str[1]==';') { cmdcur->cmdno=CPPATO; /* how is prmcur->prmno ? */ prmcur->prmno=PPNULL; /* is it right? */ } else { prmcur->prmno=PPEND; } } else { prmcur->prmno=PPNO; } } else { prmcur->prmno=PPNULL; } prmprev=prmcur; prmcur=prmcur->next; } /* check variable setting command */ prmcur=cmdcur->prm; while (prmcur!=NULL) { if (prmcur->prmno == PPNO) { po=prmcur->str; if (isobject(&po) && (po[0]=='=')) { prmcur->prmno=PPSETO; } else { po=prmcur->str; for (i=0;(po[i]!='\0') && (isalnum(po[i]) || (po[i]=='_'));i++); if ((i!=0) && (po[i]=='=')) prmcur->prmno=PPSETV; } if (prmcur->prmno==PPNO) break; } prmcur=prmcur->next; } cmdprev=cmdcur; cmdcur=cmdcur->next; } } return 0; } static int syntax(struct nshell *nshell, struct cmdlist *cmdroot,int *needcmd,struct cmdstack **sx) /* syntax() returns -1: fatal error 0: noerror 2: syntax error */ { struct cmdlist *cmdcur; struct prmlist *prmcur; int i; char *s; struct cmdstack *st; cmdcur=cmdroot; while (cmdcur!=NULL) { int cmd, c; cmd=cmdcur->cmdno; c=cmdstackgetlast(sx); if ((c==CPFOR) && (cmd!=CPDO)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((c==CPCASE) && (cmd!=CPPATI) && (cmd!=CPESAC)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((c==CPFN) && (cmd!=CPBI)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((*needcmd) && !((cmd==CPIF) || (cmd==CPCASE) || (cmd==CPFOR) || (cmd==CPWHILE) || (cmd==CPUNTIL) || (cmd==CPFN) || (cmd==CPNO))) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((cmd==CPIF) || (cmd==CPTHEN) || (cmd==CPELSE) || (cmd==CPELIF) || (cmd==CPWHILE) || (cmd==CPUNTIL) || (cmd==CPDO) || (cmd==CPBI)) *needcmd=TRUE; else if (cmdcur->cmdend==PPPIPE) *needcmd=TRUE; else *needcmd=FALSE; switch (cmd) { case CPNULL: sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; case CPIF: if ((st=cmdstackcat(sx,CPIF))==NULL) return -1; st->cmd=cmdcur; break; case CPTHEN: if (cmdstackgetlast(sx)!=CPIF) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); if ((st=cmdstackcat(sx,CPTHEN))==NULL) return -1; st->cmd=cmdcur; break; case CPELIF: if (cmdstackgetlast(sx)!=CPTHEN) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); if ((st=cmdstackcat(sx,CPIF))==NULL) return -1; st->cmd=cmdcur; break; case CPELSE: if (cmdstackgetlast(sx)!=CPTHEN) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); if ((st=cmdstackcat(sx,CPELSE))==NULL) return -1; st->cmd=cmdcur; break; case CPFI: c=cmdstackgetlast(sx); if ((c!=CPTHEN) && (c!=CPELSE)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); break; case CPCASE: if ((st=cmdstackcat(sx,CPCASE))==NULL) return -1; st->cmd=cmdcur; prmcur=(cmdcur->prm)->next; if ((prmcur==NULL) || (prmcur->next==NULL)) { sherror2(ERRSYNTAX,(cmdcur->prm)->str); return 2; } prmcur=prmcur->next; if ((prmcur->str==NULL) || (strcmp0("in",prmcur->str)!=0)) { sherror2(ERRSYNTAX,prmcur->str); return 2; } if (prmcur->next!=NULL) { sherror2(ERRUEXPTOK,(prmcur->next)->str); return 2; } break; case CPPATI: c=cmdstackgetlast(sx); if ((c!=CPCASE) && (c!=CPPATO)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } prmcur=cmdcur->prm; if (prmcur->str[0]==')') { sherror2(ERRUEXPTOK,prmcur->str); return 2; } prmcur=prmcur->next; while (TRUE) { if (prmcur->str[0]==')') break; if (prmcur->prmno!=PPPATOR) { sherror2(ERRUEXPTOK,prmcur->str); return 2; } if ((prmcur->next==NULL) || ((prmcur->next)->next==NULL)) { sherror2(ERRUEXPTOK,prmcur->str); return 2; } prmcur=(prmcur->next)->next; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); if ((st=cmdstackcat(sx,CPPATI))==NULL) return -1; st->cmd=cmdcur; break; case CPPATO: if (cmdstackgetlast(sx)!=CPPATI) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); if ((st=cmdstackcat(sx,CPPATO))==NULL) return -1; st->cmd=cmdcur; break; case CPESAC: c=cmdstackgetlast(sx); if ((c!=CPCASE) && (c!=CPPATI) && (c!=CPPATO)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); break; case CPFOR: if (cmdstackcat(sx,CPFOR)==NULL) return -1; prmcur=(cmdcur->prm)->next; if (prmcur==NULL) { sherror2(ERRSYNTAX,(cmdcur->prm)->str); return 2; } prmcur=prmcur->next; if (prmcur!=NULL) { if (strcmp0("in",prmcur->str)!=0) { sherror2(ERRSYNTAX,prmcur->str); return 2; } prmcur=prmcur->next; while (prmcur!=NULL) { if ((prmcur->prmno!=PPNO) && (prmcur->prmno!=PPEND)) { sherror2(ERRUEXPTOK,prmcur->str); return 2; } prmcur=prmcur->next; } } break; case CPWHILE: if (cmdstackcat(sx,CPWHILE)==NULL) return -1; break; case CPUNTIL: if (cmdstackcat(sx,CPUNTIL)==NULL) return -1; break; case CPDO: c=cmdstackgetlast(sx); if ((c!=CPFOR) && (c!=CPWHILE) && (c!=CPUNTIL)) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } cmdstackrmlast(sx); if ((st=cmdstackcat(sx,CPDO))==NULL) return -1; st->cmd=cmdcur; break; case CPDONE: if (cmdstackgetlast(sx)!=CPDO) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); break; case CPFN: s=(cmdcur->prm)->str; for (i=0;s[i]!='\0';i++) if (!isalnum(s[i]) && (s[i]!='_')) { sherror2(ERRIDENT,s); return 2; } if ((st=cmdstackcat(sx,CPFN))==NULL) return -1; st->cmd=cmdcur; break; case CPBI: if (cmdstackgetlast(sx)!=CPFN) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackcat(sx,CPBI))==NULL) return -1; st->cmd=cmdcur; break; case CPBO: if (cmdstackgetlast(sx)!=CPBI) { sherror2(ERRUEXPTOK,(cmdcur->prm)->str); return 2; } if ((st=cmdstackgetpo(sx))==NULL) return -1; (st->cmd)->done=cmdcur; cmdstackrmlast(sx); cmdstackrmlast(sx); break; default: break; } cmdcur=cmdcur->next; } return 0; } struct set_env_arg { struct nshell *nshell; char ***newenviron; }; static int set_env_val(struct nhash *h, void *data) { struct vallist *valcur; struct set_env_arg *arg; const char *val, *env; char *s; int r; valcur = (struct vallist *) h->val.p; arg = (struct set_env_arg *) data; if (valcur->func) return 0; r = getexp(arg->nshell, valcur->name); if (r || valcur->arg) { val = valcur->val; } else if ((env = g_getenv(valcur->name))) { val = env; } else { return 0; } s = g_strdup_printf("%s=%s", valcur->name, val); if (s == NULL) return 1; if (arg_add(arg->newenviron, s) == NULL) { g_free(s); return 1; } return 0; } int msleep(int ms) { #ifdef HAVE_NANOSLEEP struct timespec ts; ts.tv_sec = ms / 1000; ts.tv_nsec = (ms % 1000) * 1000000; return nanosleep(&ts, NULL); #else return usleep(ms * 1000); #endif } #if WINDOWS static int WaitProc; static void * proc_in_thread(void *ptr) { char *cmd; PROCESS_INFORMATION pi; STARTUPINFO si; DWORD exit_code; int r; if (ptr == NULL) { return NULL; } while (! WaitProc) { msleep(1); } cmd = (char *) ptr; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); r = CreateProcess(NULL, cmd, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi); if (r == 0) { show_system_error(); WaitProc = 0; return NULL; } CloseHandle(pi.hThread); WaitForSingleObject(pi.hProcess, INFINITE); GetExitCodeProcess(pi.hProcess, &exit_code); CloseHandle(pi.hProcess); WaitProc = 0; return GINT_TO_POINTER(exit_code); } static char * quote_args(char **args) { int len, i; char *cmd, *ptr; if (args == NULL) { return NULL; } for (len = i = 0; args[i]; i++) { len += strlen(args[i]) * 2 + 3; } cmd = g_malloc(len + 1); if (cmd == NULL) { return NULL; } ptr = cmd; for (i = 0; args[i]; i++) { char *arg; *ptr = '"'; ptr++; arg = args[i]; while (*arg) { char ch; ch = *arg; if (ch == '"') { *ptr = '\\'; ptr++; } *ptr = ch; ptr++; arg++; } *ptr = '"'; ptr++; *ptr = ' '; ptr++; } *ptr = '\0'; return cmd; } #endif /* WINDOWS */ void set_interrupt(void) { Interrupted = TRUE; } void reset_interrupt(void) { Interrupted = FALSE; } int check_interrupt(void) { int state; state = Interrupted; Interrupted = FALSE; return state; } int cmdexec(struct nshell *nshell,struct cmdlist *cmdroot,int namedfunc) { struct cmdlist *cmdcur,*cmdnew,*cmd; struct prmlist *prmcur,*prmprev,*prm,*prmnewroot; struct vallist *newvalroot; int err,quote,bquote,rcode,needcmd; char *str,*name,*val,*po,*cmdname; int i,j,num,pnum,errlevel,a,looplevel,len; char *arg,*endptr,**env; struct cmdstack *stroot,*stcur,*st; char *fstdout,*fstdin; int istdout,istdin; int sout,sout2,sin,sin2,sin3,fd; int lastc; int pipef; struct objlist *sys; char *tmpfil,*tmpfil2; char *cmds; char *s; char **argv,**newenviron; char **argvsave,**argvnew; int quoted; int argcsave,argcnew; int iftrue,casetrue; char *pat; char *readbuf; int readpo; int readbyte; int ch; char buf[2]; shell_proc proc; #if ! WINDOWS pid_t pid; #endif /* WINDOWS */ reset_interrupt(); nshell->cmdexec++; err=-1; stroot=NULL; prmnewroot=NULL; fstdout=fstdin=NULL; env=NULL; newenviron=NULL; newvalroot=NULL; cmdname=NULL; sout=sout2=sin=sin2=NOHANDLE; tmpfil2=NULL; if (nshell->optionv) { cmd=cmdroot; while (cmd!=NULL) { prm=cmd->prm; while (prm!=NULL) { printfconsole("%.256s ",prm->str); prm=prm->next; } printfconsole("\n"); cmd=cmd->next; } } cmdcur=cmdroot; while ((cmdcur!=NULL) && (!(nshell->quit))) { if (ninterrupt()) goto errexit; stcur=cmdstackgetpo(&stroot); if ((stcur!=NULL) && (stcur->cmdno==CPBI) && (stcur->cmd!=cmdcur)) { if (addfunc(nshell,stcur->val,cmdcur)==NULL) goto errexit; cmdcur=cmdcur->next; } else { switch (cmdcur->cmdno) { case CPNULL: cmdcur=cmdcur->next; break; case CPIF: if ((st=cmdstackcat(&stroot,CPIF))==NULL) goto errexit; st->iftrue=FALSE; cmdcur=cmdcur->next; break; case CPTHEN: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; iftrue=st->iftrue; if (iftrue || nshell->status) cmdcur=cmdcur->done; else { iftrue=TRUE; cmdcur=cmdcur->next; } cmdstackrmlast(&stroot); if ((st=cmdstackcat(&stroot,CPTHEN))==NULL) goto errexit; st->iftrue=iftrue; break; case CPELIF: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; iftrue=st->iftrue; if (iftrue) cmdcur=cmdcur->done; else cmdcur=cmdcur->next; cmdstackrmlast(&stroot); if ((st=cmdstackcat(&stroot,CPIF))==NULL) goto errexit; st->iftrue=iftrue; break; case CPELSE: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; iftrue=st->iftrue; if (iftrue) cmdcur=cmdcur->done; else cmdcur=cmdcur->next; cmdstackrmlast(&stroot); if ((st=cmdstackcat(&stroot,CPELSE))==NULL) goto errexit; st->iftrue=iftrue; break; case CPFI: cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; case CPCASE: if ((st=cmdstackcat(&stroot,CPCASE))==NULL) return -1; st->casetrue=FALSE; prmcur=(cmdcur->prm)->next; quote='\0'; bquote='\0'; if ((str=expand(nshell,prmcur->str,"e,&bquote,FALSE))==NULL) goto errexit; if (quote || bquote) { sherror(ERRUEXPEOF); goto errexit; } if ((str=fnexpand(nshell,str))==NULL) goto errexit; wordunsplit(str); st->pat=str; cmdcur=cmdcur->next; break; case CPPATI: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; casetrue=st->casetrue; pat=st->pat; st->pat = NULL; /* hito (mem leak of pat) */ if (casetrue) cmdcur=cmdcur->done; else { prm=cmdcur->prm; while (prm!=NULL) { if (wildmatch(prm->str,pat,0)) break; prm=prm->next; prm=prm->next; } if (prm!=NULL) { casetrue=TRUE; cmdcur=cmdcur->next; } else cmdcur=cmdcur->done; } cmdstackrmlast(&stroot); if ((st=cmdstackcat(&stroot,CPPATI))==NULL) goto errexit; st->casetrue=casetrue; st->pat=pat; break; case CPPATO: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; casetrue=st->casetrue; pat=st->pat; st->pat = NULL; /* hito (mem leak of pat) */ cmdstackrmlast(&stroot); if ((st=cmdstackcat(&stroot,CPPATO))==NULL) goto errexit; st->casetrue=casetrue; st->pat=pat; cmdcur=cmdcur->done; break; case CPESAC: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; casetrue=st->casetrue; pat=st->pat; st->pat = NULL; /* hito (mem leak of pat) */ g_free(pat); cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; case CPFOR: if ((stcur=cmdstackcat(&stroot,CPFOR))==NULL) goto errexit; stcur->cmd=cmdcur; prmcur=(cmdcur->prm)->next; stcur->val=prmcur->str; prmcur=prmcur->next; if (prmcur==NULL) stcur->ival=0; else { stcur->ival=-1; prmnewroot=NULL; prmprev=NULL; prmcur=prmcur->next; while (prmcur!=NULL) { if ((prm=g_malloc(sizeof(struct prmlist)))==NULL) goto errexit; if (prmprev==NULL) prmnewroot=prm; else prmprev->next=prm; prm->next=NULL; prm->str=NULL; prm->prmno=prmcur->prmno; quote='\0'; bquote='\0'; if ((str=expand(nshell,prmcur->str,"e,&bquote,FALSE))==NULL) goto errexit; if (quote || bquote) { sherror(ERRUEXPEOF); goto errexit; } if (str[0]!='\0') { if ((prm->str=fnexpand(nshell,str))==NULL) goto errexit; } else { g_free(str); prm->str=NULL; } if ((num=wordsplit(prm))==-1) goto errexit; for (j=0;jnext; } prmcur=prmcur->next; } /* remove null parameter and command end */ prmcur=prmnewroot; prmprev=NULL; while (prmcur!=NULL) { if ((prmcur->str==NULL) || (prmcur->prmno==PPEND)) { if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm->str); g_free(prm); } else { prmprev=prmcur; prmcur=prmcur->next; } } prmfree(stcur->prm); stcur->prm=prmnewroot; prmnewroot=NULL; } cmdcur=cmdcur->next; break; case CPWHILE: if ((stcur=cmdstackcat(&stroot,CPWHILE))==NULL) goto errexit; stcur->cmd=cmdcur; cmdcur=cmdcur->next; break; case CPUNTIL: if ((stcur=cmdstackcat(&stroot,CPUNTIL))==NULL) goto errexit; stcur->cmd=cmdcur; cmdcur=cmdcur->next; break; case CPDO: if ((stcur=cmdstackgetpo(&stroot))==NULL) goto errexit; if (stcur->cmdno==CPFOR) { if (stcur->ival==-1) { prmcur=stcur->prm; if (prmcur==NULL) { cmdcur=cmdcur->done; cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; } if (addval(nshell,stcur->val,prmcur->str)==NULL) goto errexit; stcur->prm=prmcur->next; g_free(prmcur->str); g_free(prmcur); } else { stcur->ival++; if (stcur->ivalargc) { if (addval(nshell,stcur->val,nshell->argv[stcur->ival])==NULL) goto errexit; } else { cmdcur=cmdcur->done; cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; } } } else if (stcur->cmdno==CPWHILE) { if (nshell->status) { cmdcur=cmdcur->done; cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; } } else if (stcur->cmdno==CPUNTIL) { if (!nshell->status) { cmdcur=cmdcur->done; cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; } } cmdcur=cmdcur->next; break; case CPDONE: if ((stcur=cmdstackgetpo(&stroot))==NULL) goto errexit; cmdcur=stcur->cmd; cmdcur=cmdcur->next; break; case CPFN: if ((stcur=cmdstackcat(&stroot,CPFN))==NULL) goto errexit; prmcur=cmdcur->prm; stcur->val=prmcur->str; if (newfunc(nshell,prmcur->str)==NULL) goto errexit; cmdcur=cmdcur->next; break; case CPBI: if ((st=cmdstackgetpo(&stroot))==NULL) goto errexit; if ((stcur=cmdstackcat(&stroot,CPBI))==NULL) goto errexit; stcur->val=st->val; stcur->cmd=cmdcur->done; cmdcur=cmdcur->next; break; case CPBO: cmdstackrmlast(&stroot); cmdstackrmlast(&stroot); cmdcur=cmdcur->next; break; case CPNO: prmnewroot=NULL; prmprev=NULL; prmcur=cmdcur->prm; while (prmcur!=NULL) { if (prmcur->prmno!=PPSI2) { quote='\0'; bquote='\0'; if ((str=expand(nshell,prmcur->str,"e,&bquote,FALSE))==NULL) goto errexit; if (quote || bquote) { g_free(str); sherror(ERRUEXPEOF); goto errexit; } prmcur->quoted=FALSE; } else { if ((str=g_malloc(strlen(prmcur->str)+1))==NULL) goto errexit; strcpy(str,prmcur->str); } if ((prmcur->prmno!=PPNO) || (str[0]!='\0')) { if ((prm=g_malloc(sizeof(struct prmlist)))==NULL) goto errexit; if (prmprev==NULL) prmnewroot=prm; else prmprev->next=prm; prm->next=NULL; prm->prmno=prmcur->prmno; prm->quoted=prmcur->quoted; if (prmcur->prmno!=PPSI2) { if ((prm->str=fnexpand(nshell,str))==NULL) goto errexit; if (prm->prmno==PPNO) { if ((num=wordsplit(prm))==-1) goto errexit; for (j=0;jprmno=PPNO; prm=prm->next; } } else { wordunsplit(prm->str); prmprev=prm; } } else { prm->str=str; prmprev=prm; } } else g_free(str); prmcur=prmcur->next; } /* remove null parameter & check redirect and pipe */ istdout=istdin=PPNO; pipef=FALSE; prmcur=prmnewroot; prmprev=NULL; pnum=0; while (prmcur!=NULL) { if (prmcur->str==NULL) { if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm->str); g_free(prm); } else if ((prmcur->prmno==PPSI1) || (prmcur->prmno==PPSI2) || (prmcur->prmno==PPSO1) || (prmcur->prmno==PPSO2)) { if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm->str); g_free(prm); switch (prmcur->prmno) { case PPSI1: g_free(fstdin); fstdin=prmcur->str; istdin=PPSI1; break; case PPSI2: g_free(fstdin); fstdin=prmcur->str; istdin=PPSI2; quoted=prmcur->quoted; break; case PPSO1: g_free(fstdout); fstdout=prmcur->str; istdout=PPSO1; break; case PPSO2: g_free(fstdout); fstdout=prmcur->str; istdout=PPSO2; break; } if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm); } else if (prmcur->prmno==PPPIPE) { pipef=TRUE; if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm->str); g_free(prm); } else if (prmcur->prmno==PPEND) { if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm->str); g_free(prm); } else if ((prmcur->prmno!=PPSETV) && (prmcur->prmno!=PPSETO)) { pnum++; prmprev=prmcur; prmcur=prmcur->next; } else { prmprev=prmcur; prmcur=prmcur->next; } } /* set variable */ prmcur=prmnewroot; prmprev=NULL; while (prmcur!=NULL) { if (prmcur->prmno==PPSETV) { po=strchr(prmcur->str,'='); if ((name=g_malloc(po-prmcur->str+1))==NULL) goto errexit; strncpy(name,prmcur->str,po-prmcur->str); name[po-prmcur->str]='\0'; if ((val=g_malloc(strlen(prmcur->str)-(po-prmcur->str)))==NULL) { g_free(name); goto errexit; } strcpy(val,po+1); if (pnum==0) po=addval(nshell,name,val); else po=saveval(nshell,name,val,&newvalroot); g_free(name); g_free(val); if (po==NULL) goto errexit; g_free(prmcur->str); if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm); } else if (prmcur->prmno==PPSETO) { /* set object */ if (sputobj(prmcur->str)==-1) goto errexit; g_free(prmcur->str); if (prmprev==NULL) prmnewroot=prmcur->next; else prmprev->next=prmcur->next; prm=prmcur; prmcur=prmcur->next; g_free(prm); } else { prmprev=prmcur; prmcur=prmcur->next; } } prmcur=prmnewroot; if ((prmcur!=NULL) && (prmcur->prmno==PPNO)) { /* set environment variable */ #if USE_HASH { struct set_env_arg se_arg; se_arg.nshell = nshell; se_arg.newenviron = &newenviron; if (nhash_each(nshell->valroot, set_env_val, &se_arg)) goto errexit; } #else struct vallist *valcur = nshell->valroot; while (valcur!=NULL) { if (!valcur->func && (getexp(nshell,valcur->name) || valcur->arg || (g_getenv(valcur->name)!=NULL))) { len=strlen(valcur->name); if (getexp(nshell,valcur->name) || valcur->arg) val=valcur->val; else val=g_getenv(valcur->name); if ((s=g_malloc(len+strlen(val)+2))==NULL) goto errexit; strcpy(s,valcur->name); s[len]='='; strcpy(s+len+1,val); if (arg_add(&newenviron,s)==NULL) { g_free(s); goto errexit; } } valcur=valcur->next; } #endif env=MainEnviron; MainEnviron=newenviron; newenviron=NULL; sout=sin=NOHANDLE; if (istdin!=PPNO) { if (istdin==PPSI1) sin=nopen(fstdin,O_RDONLY,NFMODE); else if (istdin==PPSI2) { sin=nopen(fstdin,O_RDONLY,NFMODE); if (!quoted) { fd = n_mkstemp(getval(nshell,"TMPDIR"), TEMPPFX, &tmpfil2); if (fd < 0) { nclose(sin); goto errexit; } do { if ((s=nstrnew())==NULL) { nclose(sin); nclose(fd); goto errexit; } do { if (nread(sin,buf,1)>0) ch=buf[0]; else ch=EOF; if (ch==EOF) break; else { if (ch=='\n') ch='\0'; if ((s=nstrccat(s,ch))==NULL) { nclose(sin); nclose(fd); goto errexit; } } } while (ch!='\0'); quote=bquote='\0'; str=s; s=expand(nshell,str,"e,&bquote,FALSE); g_free(str); if (s==NULL) { nclose(sin); nclose(fd); goto errexit; } wordunsplit(s); len=strlen(s); if (ch!=EOF) { s[len]='\n'; len++; } nwrite(fd,s,len); g_free(s); } while (ch!=EOF); nclose(sin); nclose(fd); sin=nopen(tmpfil2,O_RDONLY,NFMODE); } } } else if (cmdcur->pipefile!=NULL) { sin=nopen(cmdcur->pipefile,O_RDONLY,NFMODE); } if (sin!=NOHANDLE) sin2=nredirect(0,sin); /* redirect : stdout */ if (istdout!=PPNO) { if (Security) { sherror(ERRSECURITY); goto errexit; } if (istdout==PPSO2) sout=nopen(fstdout,O_APPEND|O_CREAT|O_WRONLY,NFMODE); else sout=nopen(fstdout,O_CREAT|O_WRONLY|O_TRUNC,NFMODE); /* pipe */ } else if (pipef) { if ((sys=getobject("system"))==NULL) goto errexit; /* fix-me: assigned value of the variable "sys" is never used */ sout = n_mkstemp(getval(nshell,"TMPDIR"), TEMPPFX, &tmpfil); if (sout < 0) goto errexit; unlinkfile(&((cmdcur->next)->pipefile)); (cmdcur->next)->pipefile=tmpfil; } if (sout!=NOHANDLE) sout2=nredirect(1,sout); if (nshell->optionx) { for (i=0;icmdexec;i++) printfconsole("+"); printfconsole(" "); prm=prmcur; while (prm!=NULL) { printfconsole("%.256s ",prm->str); prm=prm->next; } printfconsole("\n"); } cmds=prmcur->str; /* exec named function */ if ((cmdnew=getfunc(nshell,cmds))!=NULL) { needcmd=FALSE; st=NULL; rcode=syntax(nshell,cmdnew,&needcmd,&st); cmdstackfree(st); if ((rcode!=0) || (st!=NULL) || (needcmd)) goto errexit; argvnew=NULL; if ((s=g_malloc(strlen((nshell->argv)[0])+1))==NULL) goto errexit; strcpy(s,(nshell->argv)[0]); if (arg_add(&argvnew,s)==NULL) { g_free(s); arg_del(argvnew); goto errexit; } prmcur=prmcur->next; while (prmcur!=NULL) { if ((s=g_malloc(strlen(prmcur->str)+1))==NULL) { g_free(s); arg_del(argvnew); goto errexit; } strcpy(s,prmcur->str); if (arg_add(&argvnew,s)==NULL) { g_free(s); arg_del(argvnew); goto errexit; } prmcur=prmcur->next; } argcnew=getargc(argvnew); argcsave=nshell->argc; argvsave=nshell->argv; nshell->argc=argcnew; nshell->argv=argvnew; rcode=cmdexec(nshell,cmdnew,TRUE); arg_del(nshell->argv); nshell->argc=argcsave; nshell->argv=argvsave; if ((rcode==-1) || (rcode==1)) goto errexit; /* exec special command */ /* . */ } else if (strcmp0(".",cmds)==0) { prmcur=prmcur->next; if (prmcur!=NULL) { cmdname=nsearchpath(getval(nshell,"PATH"),prmcur->str,TRUE); if (cmdname!=NULL) { argvnew=NULL; if ((s=g_malloc(strlen((nshell->argv)[0])+1))==NULL) goto errexit; strcpy(s,(nshell->argv)[0]); if (arg_add(&argvnew,s)==NULL) { g_free(s); arg_del(argvnew); goto errexit; } prmcur=prmcur->next; while (prmcur!=NULL) { if ((s=g_malloc(strlen(prmcur->str)+1))==NULL) { g_free(s); arg_del(argvnew); goto errexit; } strcpy(s,prmcur->str); if (arg_add(&argvnew,s)==NULL) { g_free(s); arg_del(argvnew); goto errexit; } prmcur=prmcur->next; } argcnew=getargc(argvnew); sin=nopen(cmdname,O_RDONLY,NFMODE); g_free(cmdname); cmdname=NULL; if (sin==NOHANDLE) { sherror2(ERROPEN,cmdname); arg_del(argvnew); goto errexit; } argcsave=nshell->argc; argvsave=nshell->argv; nshell->argc=argcnew; nshell->argv=argvnew; sin3=storeshhandle(nshell,sin,&readbuf,&readbyte,&readpo); rcode=cmdexecute(nshell,NULL); restoreshhandle(nshell,sin3,readbuf,readbyte,readpo); nclose(sin); arg_del(nshell->argv); nshell->argc=argcsave; nshell->argv=argvsave; if ((rcode!=0) && (rcode!=1)) goto errexit; } else { sherror2(ERRNOFIL,prmcur->str); goto errexit; } } /* break */ } else if (strcmp0("break",cmds)==0) { if (pnum>2) { sherror(ERREXTARG); goto errexit; } else if (pnum==2) { arg=(prmcur->next)->str; a=strtol(arg,&endptr,10); if (endptr[0]!='\0') { sherror2(ERRNUMERIC,arg); goto errexit; } } else a=1; looplevel=0; stcur=stroot; while (stcur!=NULL) { if ((stcur->cmdno==CPFOR) || (stcur->cmdno==CPWHILE) || (stcur->cmdno==CPUNTIL)) looplevel++; stcur=stcur->next; } if (looplevel!=0) { while (a>0) { if ((stcur=cmdstackgetpo(&stroot))==NULL) break; if ((stcur->cmdno==CPFOR) && (stcur->ival==-1)) { prmfree(stcur->prm); stcur->prm=NULL; } if ((stcur->cmdno==CPFOR) || (stcur->cmdno==CPWHILE) || (stcur->cmdno==CPUNTIL)) { cmdcur=stcur->cmd; while (cmdcur->cmdno!=CPDO) cmdcur=cmdcur->next; cmdcur=cmdcur->done; cmdstackrmlast(&stroot); a--; } else cmdstackrmlast(&stroot); } } /* continue */ } else if (strcmp0("continue",cmds)==0) { if (pnum>2) { sherror(ERREXTARG); goto errexit; } else if (pnum==2) { arg=(prmcur->next)->str; a=strtol(arg,&endptr,10); if (endptr[0]!='\0') { sherror2(ERRNUMERIC,arg); goto errexit; } } else a=1; looplevel=0; stcur=stroot; while (stcur!=NULL) { if ((stcur->cmdno==CPFOR) || (stcur->cmdno==CPWHILE) || (stcur->cmdno==CPUNTIL)) looplevel++; stcur=stcur->next; } if (looplevel!=0) { while (a>0) { if ((stcur=cmdstackgetpo(&stroot))==NULL) break; if ((stcur->cmdno==CPFOR) || (stcur->cmdno==CPWHILE) || (stcur->cmdno==CPUNTIL)) { cmdcur=stcur->cmd; a--; if (a>0) { if ((stcur->cmdno==CPFOR) && (stcur->ival==-1)) { prmfree(stcur->prm); stcur->prm=NULL; } cmdstackrmlast(&stroot); } } else cmdstackrmlast(&stroot); } } /* return */ } else if (strcmp0("return",cmds)==0) { if (pnum>2) { sherror(ERREXTARG); goto errexit; } else if (pnum==2) { arg=(prmcur->next)->str; a=strtol(arg,&endptr,10); if (endptr[0]!='\0') { sherror2(ERRNUMERIC,arg); goto errexit; } nshell->status=a; } if (namedfunc) { err=0; goto errexit; } /* execute object */ } else if (isobject(&cmds)) { len=0; prm=prmcur; while (prm!=NULL) { len+=strlen(prm->str)+1; prm=prm->next; } if ((str=g_malloc(len))==NULL) goto errexit; str[0]='\0'; prm=prmcur; while (prm!=NULL) { strcat(str,prm->str); if (prm->next!=NULL) strcat(str," "); prm=prm->next; } errlevel=sexeobj(str); g_free(str); if (errlevel==-1) goto errexit; nshell->status=errlevel; lastc=cmdstackgetlast(&stroot); if ((lastc!=CPIF) && (lastc!=CPELIF) && (lastc!=CPWHILE) && (lastc!=CPUNTIL) && (nshell->optione) && (errlevel!=0)) { err=3; goto errexit; } nshell->status=errlevel; lastc=cmdstackgetlast(&stroot); if ((lastc!=CPIF) && (lastc!=CPELIF) && (lastc!=CPWHILE) && (lastc!=CPUNTIL) && (nshell->optione) && (errlevel!=0)) { err=3; goto errexit; } if (nshell->quit) break; /* exec inner command */ } else { proc = check_cmd(prmcur->str); if (proc) { argv = NULL; if (arg_add(&argv, NULL) == NULL) goto errexit; prm = prmnewroot; while (prm) { if (arg_add(&argv, prm->str) == NULL) { g_free(argv); goto errexit; } prm = prm->next; } errlevel = proc(nshell, pnum, (char **)argv); g_free(argv); } else { cmdname=nsearchpath(getval(nshell,"PATH"),prmcur->str,FALSE); if (cmdname==NULL) { sherror2(ERRCFOUND,prmcur->str); goto errexit; } else { if (Security) { sherror(ERRSECURITY); goto errexit; } argv=NULL; if (arg_add(&argv,NULL)==NULL) goto errexit; prm=prmnewroot; while (prm!=NULL) { if (arg_add(&argv,prm->str)==NULL) { g_free(argv); goto errexit; } prm=prm->next; } #if WINDOWS { GThread *thread; char *ptr, *win_cmd; ptr = quote_args(argv); if (ptr == NULL) { sherror(ERRMEMORY); goto errexit; } win_cmd = g_locale_from_utf8(ptr, -1, NULL, NULL, NULL); g_free(ptr); if (win_cmd == NULL) { sherror(ERRMEMORY); goto errexit; } errlevel = 0; thread= g_thread_new("process", proc_in_thread, win_cmd); if (thread) { WaitProc = 1; while (WaitProc) { msleep(1); eventloop(); } errlevel = GPOINTER_TO_INT(g_thread_join(thread)); } g_free(win_cmd); } #else /* WINDOWS */ unset_childhandler(); pid = fork(); if (pid < 0) { sherror2(ERRSYSTEM,"fork"); set_childhandler(); goto errexit; } else if (pid == 0) { errlevel=execve(cmdname,(char **)argv,MainEnviron); printfstderr("shell: %.64s: %.64s", argv[0],g_strerror(errno)); exit(errlevel); } else { if (has_eventloop()) { while (waitpid(pid,&errlevel,WNOHANG)==0) { eventloop(); msleep(10); } } else { waitpid(pid, &errlevel, 0); } errlevel = WIFEXITED(errlevel) ? WEXITSTATUS(errlevel) : 1; } set_childhandler(); #endif /* WINDOWS */ g_free(argv); g_free(cmdname); cmdname=NULL; } } nshell->status = errlevel; lastc=cmdstackgetlast(&stroot); if ((lastc!=CPIF) && (lastc!=CPELIF) && (lastc!=CPWHILE) && (lastc!=CPUNTIL) && (nshell->optione) && (errlevel!=0)) { err=3; goto errexit; } if (nshell->quit) break; } if (sout2!=NOHANDLE) { nredirect2(1,sout2); sout2=NOHANDLE; } if (sin2!=NOHANDLE) { nredirect2(0,sin2); sin2=NOHANDLE; } unlinkfile(&tmpfil2); arg_del(MainEnviron); MainEnviron=env; env=NULL; } restoreval(nshell,newvalroot); newvalroot=NULL; prmfree(prmnewroot); prmnewroot=NULL; g_free(fstdout); g_free(fstdin); fstdout=fstdin=NULL; unlinkfile(&(cmdcur->pipefile)); cmdcur=cmdcur->next; break; default: unlinkfile(&(cmdcur->pipefile)); cmdcur=cmdcur->next; break; } } } err=0; errexit: cmdstackfree(stroot); prmfree(prmnewroot); g_free(fstdout); g_free(fstdin); g_free(cmdname); arg_del(newenviron); if (env!=NULL) { arg_del(MainEnviron); MainEnviron=env; } if (newvalroot!=NULL) restoreval(nshell,newvalroot); if (sout2!=NOHANDLE) nredirect2(1,sout2); if (sin2!=NOHANDLE) nredirect2(0,sin2); unlinkfile(&tmpfil2); cmdcur=cmdroot; while (cmdcur!=NULL) { prmcur=cmdcur->prm; while (prmcur!=NULL) { if (prmcur->prmno == PPSI2 && prmcur->next!=NULL && prmcur->next->str != NULL) { g_unlink((prmcur->next)->str); prmcur=prmcur->next; } prmcur=prmcur->next; } unlinkfile(&(cmdcur->pipefile)); cmdcur=cmdcur->next; } nshell->cmdexec--; return err; } int cmdexecute(struct nshell *nshell, const char *cline) /* return -2: unexpected eof detected -1: fatal error 0: no error 1: eof detected 2: syntax error 3: runtime error */ { struct cmdlist *cmdroot,*cmdcur,*cmdnew; struct cmdstack *stroot; int needcmd,rcode; int istr; istr=0; nshell->quit=FALSE; while (TRUE) { needcmd=FALSE; cmdroot=NULL; cmdcur=cmdroot; cmdnew=NULL; stroot=NULL; if (nshell->deleted) { rcode = -1; break; } do { if ((rcode=getcmdline(nshell,&cmdnew,cmdroot,cline,&istr))!=0) break; if ((rcode=checkcmd(nshell,&cmdnew))!=0) break; if ((rcode=syntax(nshell,cmdnew,&needcmd,&stroot))!=0) break; if (cmdnew!=NULL) { if (cmdcur==NULL) cmdroot=cmdnew; else cmdcur->next=cmdnew; cmdcur=cmdnew; while (cmdcur->next!=NULL) cmdcur=cmdcur->next; cmdnew=NULL; } } while ((stroot!=NULL) || (needcmd)); if (rcode!=0) { cmdfree(cmdnew); cmdfree(cmdroot); cmdstackfree(stroot); if (nshell->quit) rcode=0; break; } else if (cmdroot!=NULL) { rcode=cmdexec(nshell,cmdroot,FALSE); cmdfree(cmdroot); if (nshell->quit) { rcode=0; break; } if (rcode!=0) break; } } nshell->quit=FALSE; return rcode; } void setshhandle(struct nshell *nshell,int fd) { nshell->fd=fd; nshell->readbyte=0; nshell->readpo=0; } static int storeshhandle(struct nshell *nshell,int fd, char **readbuf,int *readbyte,int *readpo) { int sfd; sfd=nshell->fd; *readbuf=nshell->readbuf; *readbyte=nshell->readbyte; *readpo=nshell->readpo; nshell->readbuf=g_malloc(SHELLBUFSIZE); nshell->readbyte=0; nshell->readpo=0; nshell->fd=fd; return sfd; } static void restoreshhandle(struct nshell *nshell,int fd, char *readbuf,int readbyte,int readpo) { g_free(nshell->readbuf); nshell->fd=fd; nshell->readbuf=readbuf; nshell->readbyte=readbyte; nshell->readpo=readpo; } int getshhandle(struct nshell *nshell) { return nshell->fd; } struct nshell * newshell(void) { struct nshell *nshell; char **env,*tok; int i,len; nshell = g_malloc(sizeof(struct nshell)); if (nshell == NULL) return NULL; #if USE_HASH nshell->valroot = nhash_new(); nshell->exproot = nhash_new(); #else nshell->valroot = NULL; nshell->exproot = NULL; #endif env = MainEnviron; i=0; while (env && env[i]) { char *name; tok=env[i]; name=getitok2(&tok,&len,"="); if (tok[0]=='=') tok++; if (addval(nshell,name,tok)==NULL) { g_free(name); delshell(nshell); return NULL; } g_free(name); i++; } if ((getval(nshell,"PATH")==NULL) && (g_getenv("Path")!=NULL)) { const char *path; char *tmp; path = g_getenv("Path"); tmp = g_strdup(path); if (tmp) { addval(nshell,"PATH", tmp); g_free(tmp); } } nshell->argc=0; nshell->argv=NULL; nshell->cmdexec=0; nshell->status=0; nshell->quit=0; nshell->fd=stdinfd(); nshell->options=TRUE; nshell->optionf=FALSE; nshell->optione=TRUE; nshell->optionv=FALSE; nshell->optionx=FALSE; nshell->readbuf=g_malloc(SHELLBUFSIZE); nshell->readbyte=0; nshell->readpo=0; nshell->deleted = 0; return nshell; } static int del_vallist(struct nhash *h, void *data) { struct vallist *val; val = (struct vallist *) h->val.p; free_vallist(val); return 0; } void delshell(struct nshell *nshell) { #if ! USE_HASH struct vallist *valcur, *valdel; struct explist *expcur,*expdel; #endif if (nshell==NULL) return; #if USE_HASH nhash_each(nshell->valroot, del_vallist, NULL); nhash_free(nshell->valroot); #else valcur=nshell->valroot; while (valcur!=NULL) { g_free(valcur->name); if (valcur->func) cmdfree(valcur->val); else g_free(valcur->val); valdel=valcur; valcur=valcur->next; g_free(valdel); } #endif #if USE_HASH nhash_free(nshell->exproot); #else expcur=nshell->exproot; while (expcur!=NULL) { g_free(expcur->val); expdel=expcur; expcur=expcur->next; g_free(expdel); } #endif arg_del(nshell->argv); g_free(nshell->readbuf); g_free(nshell); return; } void sherror(int code) { printfstderr("shell: %.64s\n",cmderrorlist[code-100]); } void sherror2(int code,char *mes) { if (mes!=NULL) { printfstderr("shell: %.64s `%.64s'.\n",cmderrorlist[code-100],mes); } else { printfstderr("shell: %.64s.\n",cmderrorlist[code-100]); } } void sherror3(char *cmd,int code,char *mes) { cmd = CHK_STR(cmd); if (mes!=NULL) { printfstderr("shell: %.64s: %.64s `%.64s'.\n", cmd,cmderrorlist[code-100],mes); } else { printfstderr("shell: %.64s: %.64s.\n",cmd,cmderrorlist[code-100]); } } void sherror4(char *cmd,int code) { cmd = CHK_STR(cmd); printfstderr("shell: %.64s: %.64s\n",cmd,cmderrorlist[code-100]); } void shellsavestdio(struct nshell *nshell) { nshell->sgetstdin=getstdin; nshell->sputstdout=putstdout; nshell->sprintfstdout=printfstdout; getstdin=shgetstdin; putstdout=shputstdout; printfstdout=shprintfstdout; } void shellrestorestdio(struct nshell *nshell) { getstdin=nshell->sgetstdin; putstdout=nshell->sputstdout; printfstdout=nshell->sprintfstdout; } int setshelloption(struct nshell *nshell,char *opt) { int flag; if ((opt[0]!='-') && (opt[0]!='+')) return 1; if (opt[0]=='-') flag=TRUE; else flag=FALSE; switch (opt[1]) { case 's': nshell->options=flag; break; case 'e': nshell->optione=flag; break; case 'v': nshell->optionv=flag; break; case 'x': nshell->optionx=flag; break; case 'f': nshell->optionf=flag; break; default: sherror2(ERRILOPS,opt); return -1; } return 0; } int getshelloption(struct nshell *nshell,char opt) { switch (opt) { case 's': return nshell->options; case 'e': return nshell->optione; case 'v': return nshell->optionv; case 'x': return nshell->optionx; case 'f': return nshell->optionf; default: break; } return 0; } int set_shell_args(struct nshell *nshell, int j, const char *argv0, int argc, char **argv) { char *s, **argv2; int argc2; argv2 = NULL; s = g_strdup(argv0); if (s == NULL) { return ERRMEMORY; } if (arg_add(&argv2, s) == NULL) { g_free(s); arg_del(argv2); return ERRMEMORY; } for (; j < argc; j++) { if (argv[j]) { s = g_strdup(argv[j]); if (s == NULL) { return ERRMEMORY; } if (arg_add(&argv2, s) == NULL) { g_free(s); arg_del(argv2); return ERRMEMORY; } } } argc2 = getargc(argv2); arg_del(nshell->argv); nshell->argv = argv2; nshell->argc = argc2; return 0; } void setshellargument(struct nshell *nshell,int argc,char **argv) { arg_del(nshell->argv); nshell->argc=argc; nshell->argv=argv; } void ngraphenvironment(struct nshell *nshell) { char *sver,*lib,*home,*conf,*data,*addin; struct objlist *sobj; char *systemname; sobj=chkobject("system"); getobj(sobj,"name",0,0,NULL,&systemname); getobj(sobj,"conf_dir",0,0,NULL,&conf); getobj(sobj,"data_dir",0,0,NULL,&data); getobj(sobj,"lib_dir",0,0,NULL,&lib); getobj(sobj,"home_dir",0,0,NULL,&home); sver=getobjver("system"); addval(nshell,"NGRAPH",systemname); addval(nshell,"VERSION",sver); addval(nshell,"NGRAPHCONF",conf); addval(nshell,"NGRAPHLIB",lib); addval(nshell,"NGRAPHHOME",home); if (getval(nshell,"PS1")==NULL) addval(nshell,"PS1","Ngraph$ "); if (getval(nshell,"PS2")==NULL) addval(nshell,"PS2",">"); if (getval(nshell,"IFS")==NULL) addval(nshell,"IFS"," \t\n"); if (getval(nshell,"IGNOREEOF")==NULL) addval(nshell,"IGNOREEOF","10"); addin = g_strdup_printf("%s/addin", data); if (addin) { char *pathset; pathset = g_strdup_printf("PATH='%s%s%s%s%s%s%s%s'$PATH", home, PATHSEP, addin, PATHSEP, lib, PATHSEP, ".", PATHSEP); if (pathset) { #if WINDOWS path_to_win(pathset); #endif /* WINDOWS */ cmdexecute(nshell,pathset); g_free(pathset); } g_free(addin); } } int str_calc(const char *str, double *val, int *r, char **err_msg) { int ecode, rcode; static MathEquation *eq = NULL; MathValue value = {0, 0}; if (r) { *r = MATH_VALUE_ERROR; } if (err_msg) { *err_msg = NULL; } if (str == NULL || val == NULL) { return ERRMILLEGAL; } *val = 0; if (eq == NULL) { eq = math_equation_basic_new(); if (eq == NULL) { return ERRMEMORY; } } ecode = math_equation_parse(eq, str); if (ecode) { if (err_msg) { *err_msg = math_err_get_error_message(eq, str, ecode); } return ERRMSYNTAX; } rcode = math_equation_calculate(eq, &value); ecode = (rcode) ? ERRMFAT : 0; *val = value.val; if (value.type == MATH_VALUE_NAN || value.type == MATH_VALUE_UNDEF) { rcode = value.type; } if (ecode) { return ecode; } if (r) { *r = rcode; } return 0; } #if WINDOWS void show_system_error(void) { LPVOID *msg; int r; r = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR) &msg, 0, NULL); if (r) { shputstderr((char *)msg); LocalFree(msg); } } static void * system_in_thread(void *ptr) { char *cmd; PROCESS_INFORMATION pi; STARTUPINFO si; int r; if (ptr == NULL) { return NULL; } cmd = (char *) ptr; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); r = CreateProcess(NULL, cmd, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi); if (r == 0) { show_system_error(); return NULL; } CloseHandle(pi.hThread); WaitForSingleObject(pi.hProcess, INFINITE); CloseHandle(pi.hProcess); g_free(cmd); return NULL; } #endif /* WINDOWS */ int system_bg(char *cmd) { #if WINDOWS GThread *thread; char *ptr; if (cmd == NULL) return 1; ptr = g_locale_from_utf8(cmd, -1, NULL, NULL, NULL); thread= g_thread_new("process", system_in_thread, ptr); if (thread == NULL) { return 1; } g_thread_unref(thread); return 0; #else /* WINDOWS */ if (cmd == NULL) return 1; return ! g_spawn_command_line_async(cmd, NULL); #endif /* WINDOWS */ } ngraph-gtk-6.09.05/src/ioutil.h0000644000175000017500000000556613070106167013140 00000000000000/* * $Id: ioutil.h,v 1.9 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef IOUTIL_HEADER #define IOUTIL_HEADER #include "common.h" #include #include #include #define DIRSEP '/' #define DIRSEP_STR "/" #define CONFSEP "/" #define CONFTOP "/" #define NOHANDLE -1 #if ! WINDOWS #define PATHSEP ":" #define NFMODE (S_IRUSR | S_IWUSR) #define NFMODE_NORMAL_FILE (NFMODE | S_IRGRP | S_IROTH) #else /* WINDOWS */ #define PATHSEP ";" #define NFMODE (S_IREAD | S_IWRITE) #define NFMODE_NORMAL_FILE NFMODE #endif /* WINDOWS */ void changefilename(char *name); void path_to_win(char *name); void char_type_buf_init(void); char *getfullpath(const char *name); char *getrelativepath(const char *name); char *getbasename(const char *name); char *getdirname(const char *name); char *getextention(char *name); char *getfilename(const char *dir, const char *sep, const char *file); int findfilename(const char *dir, const char *sep, const char *file); char *ngetcwd(void); char *nsearchpath(char *path,char *name,int shellscript); int nglob(char *path,char ***namelist); int fgetline(FILE *fp,char **buf); int fgetnline(FILE *fp,char *buf,int len); int nfgetc(FILE *fp); int nisatty(int fd); FILE *nfopen(const char *filename,const char *mode); int nopen(const char *path,int access,int mode); void nclose(int fd); int nredirect(int fd,int newfd); void nredirect2(int fd,int savefd); void nlseek(int fd,long offset,int fromwhere); int nread(int fd,char *buf,unsigned len); int nwrite(int fd,char *buf,unsigned len); int stdinfd(void); int stdoutfd(void); int stderrfd(void); void set_progress_func(void (* func)(int, const char *, double)); void set_progress(int pos, char *msg, double fraction); int n_mkstemp(const char *dir, char *templ, char **name); FILE *n_tmpfile(char **name); void n_tmpfile_close(FILE *fp, char *name); int nstat(const gchar *filename, GStatBuf *buf); int naccess(const gchar *filename, int mode); int nchdir(const gchar *path); char *get_utf8_filename(const char *name); char *get_localized_filename(const char *name); #endif /* IOUTIL_HEADER */ ngraph-gtk-6.09.05/src/spline.h0000644000175000017500000000346313070106167013117 00000000000000/* * $Id: spline.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define SPLCNDAUTO 0 #define SPLCND1STDIF 1 #define SPLCND2NDDIF 2 #define SPLCNDPERIODIC 3 int spline(double x[],double y[],double c1[],double c2[],double c3[], int num,int bc0,int bc1,double df0,double df1); void bspline(int edge,double x[],double c[]); void splinedif(double d,double c[], double *dx,double *dy,double *ddx,double *ddy,void *local); void splinedifxy(double d,double c[], double *dx,double *dy,double *ddx,double *ddy,void *local); void bsplinedif(double d,double c[], double *dx,double *dy,double *ddx,double *ddy,void *local); void splineint(double d,double c[],double x0,double y0,double *x,double *y, void *local); void splineintxy(double d,double c[],double x0,double y0,double *x,double *y, void *local); void bsplineint(double d,double c[],double x0,double y0,double *x,double *y, void *local); ngraph-gtk-6.09.05/src/opath.c0000644000175000017500000006312014002152336012722 00000000000000/* * $Id: oline.c,v 1.13 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include "object.h" #include "gra.h" #include "spline.h" #include "mathfn.h" #include "oroot.h" #include "odraw.h" #include "olegend.h" #include "opath.h" #define NAME N_("path") #define ALIAS "line:curve:polygon" #define PARENT "legend" #define OVERSION "1.00.01" #define ERRSPL 100 static char *patherrorlist[]={ "error: spline interpolation.", }; #define ERRNUM (sizeof(patherrorlist) / sizeof(*patherrorlist)) static char *path_fill_mode[]={ "false", "true", "\0empty", /* for backward compatibility */ "\0even_odd_rule", /* for backward compatibility */ "\0winding_rule", /* for backward compatibility */ NULL, }; enum PATH_FUILL_MODE { PATH_FILL_MODE_TRUE, PATH_FILL_MODE_FALSE, PATH_FILL_MODE_EMPTY, PATH_FILL_MODE_EVEN_ODD, PATH_FILL_MODE_WINDING, }; static char *path_fill_rule[]={ N_("even_odd_rule"), N_("winding_rule"), NULL, }; enum PATH_FUILL_RULE { PATH_FILL_RULE_EVEN_ODD, PATH_FILL_RULE_WINDING, }; static char *path_type[]={ N_("line"), N_("curve"), NULL, }; static int arrowinit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int width, headlen, headwidth, miter, stroke, join, prm, type, alpha; struct narray *expand_points; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) { return 1; } switch (argv[0][0]) { case 'l': /* line */ type = PATH_TYPE_LINE; break; case 'c': /* curve */ type = PATH_TYPE_CURVE; break; case 'p': /* polygon or path */ type = PATH_TYPE_LINE; prm = 1; if (strcmp(argv[0], "polygon") == 0) { _putobj(obj, "close_path", inst, &prm); } break; default: type = PATH_TYPE_LINE; } width = DEFAULT_LINE_WIDTH; headlen = 72426; headwidth = 60000; miter = 1000; join = JOIN_TYPE_BEVEL; stroke = 1; alpha = 255; if (_putobj(obj, "type", inst, &type)) return 1; if (_putobj(obj, "stroke", inst, &stroke)) return 1; if (_putobj(obj, "width", inst, &width)) return 1; if (_putobj(obj, "miter_limit", inst, &miter)) return 1; if (_putobj(obj, "arrow_length", inst, &headlen)) return 1; if (_putobj(obj, "arrow_width", inst, &headwidth)) return 1; if (_putobj(obj, "join", inst, &join)) return 1; if (_putobj(obj, "stroke_A", inst, &alpha)) return 1; if (_putobj(obj, "fill_A", inst, &alpha)) return 1; expand_points = arraynew(sizeof(int)); if (expand_points == NULL) { return 1; } if (_putobj(obj, "_points", inst, expand_points)) { arrayfree(expand_points); return 1; } return 0; } static int arrowdone(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; return 0; } static int arrowput(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *field; int *val_ptr; field = argv[1]; val_ptr = (int *) argv[2]; if (strcmp(field, "width") == 0) { if (*val_ptr < 1) { *val_ptr = 1; } } else if (strcmp(field, "arrow_length") == 0) { if (*val_ptr < ARROW_SIZE_MIN) { *val_ptr = ARROW_SIZE_MIN; } else if (*val_ptr > ARROW_SIZE_MAX) { *val_ptr = ARROW_SIZE_MAX; } } else if (strcmp(field, "arrow_width") == 0) { if (*val_ptr < ARROW_SIZE_MIN) { *val_ptr = ARROW_SIZE_MIN; } else if (*val_ptr > ARROW_SIZE_MAX) { *val_ptr = ARROW_SIZE_MAX; } } if (clear_bbox(obj, inst)) { return 1; } return 0; } static int opath_curve_expand_points(struct objlist *obj, N_VALUE *inst, int intp, struct narray *expand_points) { int num, r; struct narray *points; int *pdata; _getobj(obj, "points", inst, &points); num = arraynum(points) / 2; pdata = arraydata(points); r = curve_expand_points(pdata, num, intp, expand_points); if (r) { error(obj, ERRSPL); } return r; } static void curve_clear(struct objlist *obj,N_VALUE *inst) { struct narray *expand_points; _getobj(obj, "_points", inst, &expand_points); arrayclear(expand_points); } static double get_dx_dy(int x0, int y0, int x1, int y1, double *dx, double *dy) { double len, x, y; x = x0 - x1; y = y0 - y1; len = distance(x, y); *dx = x / len; *dy = y / len; return len; } static void get_arrow_pos(int *points2, int n, int width, int headlen, int headwidth, int x0, int y0, int x1, int y1, int *ap) { int ax0, ay0, ox, oy; double alen, alen2, awidth, len, dx, dy; alen = width * (double) headlen / 10000; awidth = width * (double) headwidth / 20000; len = get_dx_dy(x0, y0, x1, y1, &dx, &dy); ax0 = nround(x0 - dx * alen); ay0 = nround(y0 - dy * alen); alen2 = alen * width / awidth / 2; if (len >= alen2) { ox = oy = 0; if (points2) { points2[n] = nround(x0 - dx * alen2); points2[n + 1] = nround(y0 - dy * alen2); } } else { ox = nround(dx * alen2); oy = nround(dy * alen2); } ax0 += ox; ay0 += oy; ap[0] = nround(ax0 - dy * awidth); ap[1] = nround(ay0 + dx * awidth); ap[2] = x0 + nround(ox); ap[3] = y0 + nround(oy); ap[4] = nround(ax0 + dy * awidth); ap[5] = nround(ay0 - dx * awidth); } static void draw_marker(struct objlist *obj, N_VALUE *inst, int GC, int type, int mark_type, int *ap, int join, int miter, int x0, int y0, int x1, int y1, int width, int fr, int fg, int fb, int fa, int headlen, int headwidth) { double dx, dy; switch (type) { case MARKER_TYPE_ARROW: GRAlinestyle(GC, 0, NULL, 1, GRA_LINE_CAP_BUTT, join, miter); GRAdrawpoly(GC, 3, ap, GRA_FILL_MODE_EVEN_ODD); break; case MARKER_TYPE_WAVE: get_dx_dy(x0, y0, x1, y1, &dx, &dy); draw_marker_wave(obj, inst, GC, width, headlen, headwidth, x0, y0, dx, dy, ERRSPL); break; case MARKER_TYPE_MARK: get_dx_dy(x0, y0, x1, y1, &dx, &dy); draw_marker_mark(obj, inst, GC, width, headlen, headwidth, x0, y0, dx, dy, fr, fg, fb, fa, mark_type); break; case MARKER_TYPE_BAR: get_dx_dy(x0, y0, x1, y1, &dx, &dy); draw_marker_bar(obj, inst, GC, width, headlen, headwidth, x0, y0, dx, dy); break; } } static void draw_stroke(struct objlist *obj, N_VALUE *inst, int GC, int *points2, int *pdata, int num, int close_path) { int width, fr, fg, fb, fa, headlen, headwidth; int join, miter, head_begin, head_end; int x0, y0, x1, y1, x2, y2, x3, y3, type; struct narray *style; int snum, *sdata; int ap[6], ap2[6]; _getobj(obj, "stroke_R", inst, &fr); _getobj(obj, "stroke_G", inst, &fg); _getobj(obj, "stroke_B", inst, &fb); _getobj(obj, "stroke_A", inst, &fa); _getobj(obj, "width", inst, &width); _getobj(obj, "style", inst, &style); _getobj(obj, "join", inst, &join); _getobj(obj, "miter_limit", inst, &miter); _getobj(obj, "marker_begin", inst, &head_begin); _getobj(obj, "marker_end", inst, &head_end); _getobj(obj, "arrow_length", inst, &headlen); _getobj(obj, "arrow_width", inst, &headwidth); snum = arraynum(style); sdata = arraydata(style); GRAcolor(GC, fr, fg, fb, fa); GRAlinestyle(GC, snum, sdata, width, GRA_LINE_CAP_BUTT, join, miter); x0 = points2[0]; y0 = points2[1]; x1 = points2[2]; y1 = points2[3]; x2 = points2[2 * num - 4]; y2 = points2[2 * num - 3]; x3 = points2[2 * num - 2]; y3 = points2[2 * num - 1]; if (head_begin == MARKER_TYPE_ARROW) { get_arrow_pos(points2, 0, width, headlen, headwidth, x0, y0, x1, y1, ap); } if (head_end == MARKER_TYPE_ARROW) { get_arrow_pos(points2, num * 2 - 2, width, headlen, headwidth, x3, y3, x2, y2, ap2); } if (num > 2 && close_path) { GRAdrawpoly(GC, num, pdata, GRA_FILL_MODE_NONE); } else { int x, y, i; x = points2[0]; y = points2[1]; GRAmoveto(GC, x, y); for (i = 1; i < num; i++) { x = points2[i * 2]; y = points2[i * 2 + 1]; GRAlineto(GC, x, y); } } _getobj(obj, "mark_type_begin", inst, &type); draw_marker(obj, inst, GC, head_begin, type, ap, join, miter, x0, y0, x1, y1, width, fr, fg, fb, fa, headlen, headwidth); _getobj(obj, "mark_type_end", inst, &type); draw_marker(obj, inst, GC, head_end, type, ap2, join, miter, x3, y3, x2, y2, width, fr, fg, fb, fa, headlen, headwidth); } static void draw_fill(struct objlist *obj, N_VALUE *inst, int GC, int *points2, int num) { int br, bg, bb, ba, fill_rule; _getobj(obj, "fill_rule", inst, &fill_rule); _getobj(obj, "fill_R", inst, &br); _getobj(obj, "fill_G", inst, &bg); _getobj(obj, "fill_B", inst, &bb); _getobj(obj, "fill_A", inst, &ba); GRAcolor(GC, br, bg, bb, ba); GRAdrawpoly(GC, num, points2, fill_rule + 1); } static int arrowdraw(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int GC, w, h, intp, i, j, num, close_path; struct narray *points; int *points2, *pdata; int x1, y1, type, stroke, fill, clip, zoom; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) { return 1; } _getobj(obj, "GC", inst, &GC); if (GC < 0) { return 0; } _getobj(obj, "stroke", inst, &stroke); _getobj(obj, "fill", inst, &fill); if (fill == 0 && stroke == 0) { return 0; } _getobj(obj, "type", inst, &type); _getobj(obj, "clip", inst, &clip); _getobj(obj, "close_path", inst, &close_path); if (type == PATH_TYPE_CURVE) { _getobj(obj, "interpolation", inst, &intp); _getobj(obj, "_points", inst, &points); if (arraynum(points) == 0) { opath_curve_expand_points(obj, inst, intp, points); } if (intp == INTERPOLATION_TYPE_SPLINE_CLOSE || intp == INTERPOLATION_TYPE_BSPLINE_CLOSE) { close_path = TRUE; } } else { _getobj(obj, "points", inst, &points); } num = arraynum(points) / 2; pdata = arraydata(points); points2 = g_malloc(sizeof(int) * num * 2); if (points2 == NULL) { return 1; } j = 0; x1 = y1 = 0; for (i = 0; i < num; i++) { int x0, y0; x0 = pdata[2 * i]; y0 = pdata[2 * i + 1]; if (i == 0 || x0 != x1 || y0 != y1) { points2[2 * j] = x0; points2[2 * j + 1] = y0; j++; x1 = x0; y1 = y0; } } num = j; if (num < 2) { g_free(points2); return 0; } GRAregion(GC, &w, &h, &zoom); GRAview(GC, 0, 0, w * 10000.0 / zoom, h * 10000.0 / zoom, clip); if (fill) { draw_fill(obj, inst, GC, points2, num); } if (stroke) { draw_stroke(obj, inst, GC, points2, pdata, num, close_path); } g_free(points2); return 0; } static int arrowbbox(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int minx, miny, maxx, maxy; int x, y, num, num2, type, intp, stroke, fill; struct narray *points; int *pdata; struct narray *array; int i, j, width; int headlen, headwidth; int head_begin, head_end; int *points2; int x0, y0, x1, y1, x2, y2, x3, y3; int ap[6], ap2[6]; double dx, dy, awidth, w; array = rval->array; if (arraynum(array) != 0) { return 0; } _getobj(obj, "type", inst, &type); _getobj(obj, "fill", inst, &fill); _getobj(obj, "stroke", inst, &stroke); if (fill == 0 && stroke == 0) { return 0; } if (type == PATH_TYPE_CURVE) { _getobj(obj, "interpolation", inst, &intp); _getobj(obj, "_points", inst, &points); if (arraynum(points) == 0) { opath_curve_expand_points(obj, inst, intp, points); } } else { _getobj(obj, "points", inst, &points); } _getobj(obj, "width", inst, &width); _getobj(obj, "marker_begin", inst, &head_begin); _getobj(obj, "marker_end", inst, &head_end); _getobj(obj, "arrow_length", inst, &headlen); _getobj(obj, "arrow_width", inst, &headwidth); awidth = width * (double) headwidth / 10000; num = arraynum(points) / 2; pdata = arraydata(points); points2 = g_malloc(sizeof(int) * num * 2); if (points2 == NULL) { return 1; } j = 0; x1 = y1 = 0; for (i = 0; i < num; i++) { x0 = pdata[2 * i]; y0 = pdata[2 * i + 1]; if (i == 0 || x0 != x1 || y0 != y1) { points2[2 * j] = x0; points2[2 * j + 1] = y0; j++; x1 = x0; y1 = y0; } } num2 = j; if (num2 < 2) { g_free(points2); return 0; } x0 = points2[0]; y0 = points2[1]; x1 = points2[2]; y1 = points2[3]; x2 = points2[2 * num2 - 4]; y2 = points2[2 * num2 - 3]; x3 = points2[2 * num2 - 2]; y3 = points2[2 * num2 - 1]; g_free(points2); switch (head_begin) { case MARKER_TYPE_ARROW: get_arrow_pos(NULL, 0, width, headlen, headwidth, x0, y0, x1, y1, ap); break; case MARKER_TYPE_WAVE: case MARKER_TYPE_BAR: ap[0] = x0; ap[1] = y0 - awidth; ap[2] = x0 + 0.25 * awidth; ap[3] = y0 + 0.5 * awidth; ap[4] = x0; ap[5] = y0 + awidth; get_dx_dy(x0, y0, x1, y1, &dx, &dy); GRArotate(x0, y0, ap, ap, 3, dx, dy); break; case MARKER_TYPE_MARK: w = awidth / 2; ap[0] = x0 + w; ap[1] = y0 + w; ap[2] = x0 + w; ap[3] = y0 - w; ap[4] = x0; ap[5] = y0; get_dx_dy(x0, y0, x1, y1, &dx, &dy); GRArotate(x0, y0, ap, ap, 2, dx, dy); break; } switch (head_end) { case MARKER_TYPE_ARROW: get_arrow_pos(NULL, 0, width, headlen, headwidth, x3, y3, x2, y2, ap2); break; case MARKER_TYPE_WAVE: case MARKER_TYPE_BAR: ap2[0] = x3; ap2[1] = y3 - awidth; ap2[2] = x3 + 0.25 * awidth; ap2[3] = y3 + 0.5 * awidth; ap2[4] = x3; ap2[5] = y3 + awidth; get_dx_dy(x3, y3, x2, y2, &dx, &dy); GRArotate(x3, y3, ap2, ap2, 3, dx, dy); break; case MARKER_TYPE_MARK: w = awidth / 2; ap2[0] = x3 + w; ap2[1] = y3 + w; ap2[2] = x3 + w; ap2[3] = y3 - w; ap2[4] = x3; ap2[5] = y3; get_dx_dy(x3, y3, x2, y2, &dx, &dy); GRArotate(x3, y3, ap2, ap2, 2, dx, dy); break; } if (array == NULL && (array = arraynew(sizeof(int))) == NULL) { return 1; } maxx = minx = pdata[0]; maxy = miny = pdata[1]; arrayadd(array, &(pdata[0])); arrayadd(array, &(pdata[1])); for (i = 1; i < num; i++) { x = pdata[i * 2]; y = pdata[i * 2 + 1]; if (x < minx) minx = x; if (x > maxx) maxx = x; if (y < miny) miny = y; if (y > maxy) maxy = y; } if (type == PATH_TYPE_CURVE) { _getobj(obj, "points", inst, &points); num = arraynum(points) / 2; pdata = arraydata(points); } for (i = 1; i < num; i++) { x = pdata[i * 2]; y = pdata[i * 2 + 1]; arrayadd(array, &x); arrayadd(array, &y); } if (stroke) { if (head_begin != MARKER_TYPE_NONE) { for (i = 0; i < 3; i++) { if (ap[i * 2] < minx) minx = ap[i * 2]; if (ap[i * 2] > maxx) maxx = ap[i * 2]; if (ap[i * 2 + 1] < miny) miny = ap[i * 2 + 1]; if (ap[i * 2 + 1] > maxy) maxy = ap[i * 2 + 1]; } } if (head_end != MARKER_TYPE_NONE) { for (i = 0; i < 3 ; i++) { if (ap2[i * 2] < minx) minx = ap2[i * 2]; if (ap2[i * 2] > maxx) maxx = ap2[i * 2]; if (ap2[i * 2 + 1] < miny) miny = ap2[i * 2+ 1]; if (ap2[i * 2 + 1] > maxy) maxy = ap2[i * 2 + 1]; } } minx -= width / 2; miny -= width / 2; maxx += width / 2; maxy += width / 2; } arrayins(array, &(maxy), 0); arrayins(array, &(maxx), 0); arrayins(array, &(miny), 0); arrayins(array, &(minx), 0); if (arraynum(array) == 0) { arrayfree(array); rval->array = NULL; return 1; } rval->array = array; return 0; } static int set_points(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { curve_clear(obj, inst); return legendgeometry(obj, inst, rval, argc, argv); } static int check_point_match(int i, int j, int *pdata, int err, int x, int y) { double x1, y1, x2, y2, r, ip; x1 = pdata[i * 2]; y1 = pdata[i * 2 + 1]; x2 = pdata[j * 2]; y2 = pdata[j * 2 + 1]; r = distance(x - x1, y - y1); if (r <= err) { return TRUE; } r = distance(x - x2, y - y2); if (r <= err) { return TRUE; } r = distance(x1 - x2, y1 - y2); if (r == 0) { return FALSE; } ip = ((x2 - x1) * (x - x1) + (y2 - y1) * (y - y1)) / r; if (ip < 0 || ip > r) { return FALSE; } x2 = x1 + (x2 - x1) * ip / r; y2 = y1 + (y2 - y1) * ip / r; r = distance(x - x2, y - y2); if (r <= err) { return TRUE; } return FALSE; } static int point_match(struct objlist *obj, N_VALUE *inst, int type, int fill, int err, int x, int y) { struct narray *points; int *pdata, num, r, i; if (type == PATH_TYPE_CURVE) { int intp; _getobj(obj, "interpolation", inst, &intp); _getobj(obj, "_points", inst, &points); if (arraynum(points) == 0) { opath_curve_expand_points(obj, inst, intp, points); } } else { _getobj(obj, "points", inst, &points); } num = arraynum(points) / 2; pdata = arraydata(points); if (num == 0 || pdata == NULL) { return FALSE; } r = FALSE; for (i = 0; i < num - 1; i++) { r = check_point_match(i, i + 1, pdata, err, x, y); if (r) { break; } } if (r == FALSE) { int close_path; _getobj(obj, "close_path", inst, &close_path); if (fill || close_path) { r = check_point_match(0, num - 1, pdata, err, x, y); } } return r; } static int curvematch(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int minx, miny, maxx, maxy, err; int bminx, bminy, bmaxx, bmaxy; int fill, stroke, type; struct narray *array; rval->i = FALSE; if (_exeparent(obj,argv[1],inst,rval,argc,argv)) { return 1; } _getobj(obj, "type", inst, &type); _getobj(obj, "fill", inst, &fill); _getobj(obj, "stroke", inst, &stroke); if (fill == 0 && stroke == 0) { return 0; } minx = * (int *) argv[2]; miny = * (int *) argv[3]; maxx = * (int *) argv[4]; maxy = * (int *) argv[5]; err = * (int *) argv[6]; if (minx == maxx && miny == maxy) { rval->i = point_match(obj, inst, type, fill, err, minx, miny); return 0; } if (_exeobj(obj, "bbox", inst, 0, NULL)) { return 1; } _getobj(obj, "bbox", inst, &array); if (array == NULL) { return 0; } if (arraynum(array) < 4) { return 1; } bminx = arraynget_int(array, 0); bminy = arraynget_int(array, 1); bmaxx = arraynget_int(array, 2); bmaxy = arraynget_int(array, 3); if (minx <= bminx && bminx <= maxx && minx <= bmaxx && bmaxx <= maxx && miny <= bminy && bminy <= maxy && miny <= bmaxy && bmaxy <= maxy) { rval->i = TRUE; } return 0; } static int curve_flip(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { #if ! ROTATE_MARK int type_begin, type_end; enum FLIP_DIRECTION dir; dir = (* (int *) argv[2] == FLIP_DIRECTION_HORIZONTAL) ? FLIP_DIRECTION_HORIZONTAL : FLIP_DIRECTION_VERTICAL; _getobj(obj, "mark_type_begin", inst, &type_begin); _getobj(obj, "mark_type_end", inst, &type_end); type_begin = mark_flip(dir, type_begin); type_end = mark_flip(dir, type_end); _putobj(obj, "mark_type_begin", inst, &type_begin); _putobj(obj, "mark_type_end", inst, &type_end); #endif curve_clear(obj, inst); return legendflip(obj, inst, rval, argc, argv); } static int curve_move(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *points; int type; _getobj(obj, "type", inst, &type); if (type == PATH_TYPE_CURVE) { int i, num, *pdata; _getobj(obj, "_points", inst, &points); num = arraynum(points); pdata = arraydata(points); for (i = 0; i < num; i++) { if (i % 2 == 0) { pdata[i] += * (int *) argv[2]; } else { pdata[i] += * (int *) argv[3]; } } } return legendmove(obj, inst, rval, argc, argv); } static int curve_rotate(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { #if ! ROTATE_MARK int type_begin, type_end, angle; angle = *(int *) argv[2]; _getobj(obj, "mark_type_begin", inst, &type_begin); _getobj(obj, "mark_type_end", inst, &type_end); type_begin = mark_rotate(angle, type_begin); type_end = mark_rotate(angle, type_end); _putobj(obj, "mark_type_begin", inst, &type_begin); _putobj(obj, "mark_type_end", inst, &type_end); #endif curve_clear(obj, inst); return legendrotate(obj, inst, rval, argc, argv); } static int curve_zoom(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { curve_clear(obj, inst); return legendzoom(obj, inst, rval, argc, argv); } static int curve_change(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { curve_clear(obj, inst); return legendchange(obj, inst, rval, argc, argv); } static int put_fill_mode(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int mode, rule; mode = * (int *) argv[2]; switch (mode) { case PATH_FILL_MODE_TRUE: break; case PATH_FILL_MODE_FALSE: break; case PATH_FILL_MODE_EMPTY: * (int *) argv[2] = FALSE; break; case PATH_FILL_MODE_EVEN_ODD: * (int *) argv[2] = TRUE; rule = PATH_FILL_RULE_EVEN_ODD; _putobj(obj, "fill_rule", inst, &rule); break; case PATH_FILL_MODE_WINDING: * (int *) argv[2] = TRUE; rule = PATH_FILL_RULE_WINDING; _putobj(obj, "fill_rule", inst, &rule); break; default: * (int *) argv[2] = FALSE; } return legendgeometry(obj, inst, rval, argc, argv); } static int arrowput_arrow(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int arrow, type; arrow = * (int *) argv[2]; switch (arrow) { case ARROW_POSITION_NONE: type = MARKER_TYPE_NONE; _putobj(obj, "marker_begin", inst, &type); _putobj(obj, "marker_end", inst, &type); break; case ARROW_POSITION_END: type = MARKER_TYPE_NONE; _putobj(obj, "marker_begin", inst, &type); type = MARKER_TYPE_ARROW; _putobj(obj, "marker_end", inst, &type); break; case ARROW_POSITION_BEGIN: type = MARKER_TYPE_ARROW; _putobj(obj, "marker_begin", inst, &type); type = MARKER_TYPE_NONE; _putobj(obj, "marker_end", inst, &type); break; case ARROW_POSITION_BOTH: type = MARKER_TYPE_ARROW; _putobj(obj, "marker_begin", inst, &type); _putobj(obj, "marker_end", inst, &type); break; } if (clear_bbox(obj, inst)) { return 1; } return 0; } static struct objtable path_obj[] = { {"init", NVFUNC, NEXEC, arrowinit, NULL, 0}, {"done", NVFUNC, NEXEC, arrowdone, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"type", NENUM, NREAD|NWRITE, set_points, path_type, 0}, {"points", NIARRAY, NREAD|NWRITE, set_points, NULL, 0}, {"_points", NIARRAY, NREAD, NULL, NULL, 0}, {"interpolation", NENUM, NREAD|NWRITE, set_points, intpchar, 0}, {"fill_R", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"fill_G", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"fill_B", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"fill_A", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"stroke_R", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"stroke_G", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"stroke_B", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"stroke_A", NINT, NREAD|NWRITE, oputcolor, NULL, 0}, {"fill", NENUM, NREAD|NWRITE, put_fill_mode, path_fill_mode, 0}, {"fill_rule", NENUM, NREAD|NWRITE, NULL, path_fill_rule, 0}, {"stroke", NBOOL, NREAD|NWRITE, NULL, NULL, 0}, {"close_path", NBOOL, NREAD|NWRITE, NULL, NULL, 0}, {"width", NINT, NREAD|NWRITE, arrowput, NULL, 0}, {"style", NIARRAY, NREAD|NWRITE, oputstyle, NULL, 0}, {"join", NENUM, NREAD|NWRITE, NULL, joinchar, 0}, {"miter_limit", NINT, NREAD|NWRITE, oputge1, NULL, 0}, {"marker_begin", NENUM, NREAD|NWRITE, arrowput, marker_type_char, 0}, {"marker_end", NENUM, NREAD|NWRITE, arrowput, marker_type_char, 0}, {"arrow_length", NINT, NREAD|NWRITE, arrowput, NULL, 0}, {"arrow_width", NINT, NREAD|NWRITE, arrowput, NULL, 0}, {"mark_type_begin",NINT,NREAD|NWRITE,oputmarktype,NULL,0}, {"mark_type_end",NINT,NREAD|NWRITE,oputmarktype,NULL,0}, {"draw", NVFUNC, NREAD|NEXEC, arrowdraw, "i", 0}, {"bbox", NIAFUNC, NREAD|NEXEC, arrowbbox, "", 0}, {"move", NVFUNC, NREAD|NEXEC, curve_move, "ii", 0}, {"rotate", NVFUNC, NREAD|NEXEC, curve_rotate, "iiii", 0}, {"flip", NVFUNC, NREAD|NEXEC, curve_flip, "iii", 0}, {"change", NVFUNC, NREAD|NEXEC, curve_change, "iii", 0}, {"zooming", NVFUNC, NREAD|NEXEC, curve_zoom, "iiii", 0}, {"match", NBFUNC, NREAD|NEXEC, curvematch, "iiiii", 0}, {"fill_hsb", NVFUNC, NREAD|NEXEC, put_fill_hsb,"ddd",0}, {"stroke_hsb", NVFUNC, NREAD|NEXEC, put_stroke_hsb,"ddd",0}, /* following fields exist for backward compatibility */ {"R", NINT, NWRITE, put_color_for_backward_compatibility, NULL, 0}, {"G", NINT, NWRITE, put_color_for_backward_compatibility, NULL, 0}, {"B", NINT, NWRITE, put_color_for_backward_compatibility, NULL, 0}, {"A", NINT, NWRITE, put_color_for_backward_compatibility, NULL, 0}, {"arrow", NENUM, NWRITE, arrowput_arrow, arrowchar, 0}, }; #define TBLNUM (sizeof(path_obj) / sizeof(*path_obj)) void * addpath(void) /* addarrow() returns NULL on error */ { return addobject(NAME, ALIAS, PARENT, OVERSION, TBLNUM, path_obj, ERRNUM, patherrorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/ofit.c0000644000175000017500000010335214142161773012564 00000000000000/* * $Id: ofit.c,v 1.37 2010-02-24 00:52:44 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "nstring.h" #include "ioutil.h" #include "object.h" #include "mathfn.h" #include "oroot.h" #include "ofit.h" #include "odata.h" #include "shell.h" #include "math/math_equation.h" #define NAME "fit" #define PARENT "object" #define OVERSION "1.00.01" #define ERRSYNTAX 100 #define ERRILLEGAL 101 #define ERRNEST 102 #define ERRMANYPARAM 103 #define ERRLN 104 #define ERRSMLDATA 105 #define ERRPOINT 106 #define ERRMATH 107 #define ERRSINGULAR 108 #define ERRNOEQS 109 #define ERRTHROUGH 110 #define ERRRANGE 111 #define ERRNEGATIVEWEIGHT 112 #define ERRCONVERGE 113 #define ERR_INCONSISTENT_DATA_NUM 114 #define ERRINTERRUPT 115 static char *fiterrorlist[]={ "syntax error.", "not allowed function.", "sum() or dif(): deep nest.", "too many parameters.", "illegal data -> ignored.", "too small number of data.", "illegal point", "math error -> ignored.", "singular matrix.", "no fitting equation.", "`through_point' for type `user' is not supported.", "math range check.", "negative or zero weight -> ignored.", "convergence error.", "number of the data is not consistent.", }; #define ERRNUM (sizeof(fiterrorlist) / sizeof(*fiterrorlist)) static char *fittypechar[]={ N_("poly"), N_("pow"), N_("exp"), N_("log"), N_("user"), NULL }; #define PRECISION_DISP 7 #define PRECISION_SAVE 15 struct fitlocal { int id, oid; MathEquation *codedf[FIT_DIMENSION_MAX]; MathEquation *codef, *result_code; int dim; double coe[11]; int num; double derror,correlation; char *equation; }; static int fitinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int div,dimension; double converge; struct fitlocal *fitlocal; int i,disp, oid; if (_getobj(obj, "oid", inst, &oid) == -1) return 1; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; div=500; dimension=1; converge=1; disp=TRUE; if (_putobj(obj,"div",inst,&div)) return 1; if (_putobj(obj,"poly_dimension",inst,&dimension)) return 1; if (_putobj(obj,"converge",inst,&converge)) return 1; if (_putobj(obj,"display",inst,&disp)) return 1; if ((fitlocal=g_malloc(sizeof(struct fitlocal)))==NULL) return 1; fitlocal->codef=NULL; fitlocal->result_code = NULL; for (i=0;icodedf[i]=NULL; fitlocal->equation=NULL; fitlocal->oid = oid; if (_putobj(obj,"_local",inst,fitlocal)) { g_free(fitlocal); return 1; } return 0; } static int fitdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct fitlocal *fitlocal; int i; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&fitlocal); g_free(fitlocal->equation); math_equation_free(fitlocal->codef); math_equation_free(fitlocal->result_code); for (i = 0; i < FIT_DIMENSION_MAX; i++) math_equation_free(fitlocal->codedf[i]); return 0; } static int set_equation(struct objlist *obj, N_VALUE *inst, struct fitlocal *fitlocal, char *equation) { int r; char *old_equation; _getobj(obj, "equation", inst, &old_equation); r = _putobj(obj, "equation", inst, equation); if (r) { return 1; } if (old_equation) { g_free(old_equation); } if (fitlocal && fitlocal->result_code) { math_equation_free(fitlocal->result_code); fitlocal->result_code = NULL; } return 0; } static void show_eqn_error(struct objlist *obj, MathEquation *code, const char *math, const char *field, int rcode) { char *err_msg; err_msg = math_err_get_error_message(code, math, rcode); if (err_msg) { error22(obj, ERRUNKNOWN, field, err_msg); g_free(err_msg); } else { error(obj, ERRSYNTAX); } } static int fitequation(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct fitlocal *fitlocal; _getobj(obj,"_local",inst,&fitlocal); if (fitlocal->result_code) { math_equation_free(fitlocal->result_code); fitlocal->result_code = NULL; } return 0; } static MathEquation * create_math_equation(struct objlist *obj, char *math, const char *field) { MathEquation *code; int rcode, security; enum EOEQ_ASSIGN_TYPE type; security = get_security(); type = (security) ? EOEQ_ASSIGN_TYPE_BOTH : EOEQ_ASSIGN_TYPE_ASSIGN; code = ofile_create_math_equation(NULL, type, 2, FALSE, FALSE, FALSE, FALSE, TRUE); if (code == NULL) { return NULL; } rcode = math_equation_parse(code, math); if (rcode == 0 && code->use_eoeq_assign) { replace_eoeq_token(math); } else if (rcode) { show_eqn_error(obj, code, math, field, rcode); math_equation_free(code); return NULL; } if (math_equation_optimize(code)) { math_equation_free(code); return NULL; } return code; } static int fitput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *field; char *math; struct fitlocal *fitlocal; MathEquation *code; _getobj(obj,"_local",inst,&fitlocal); field=argv[1]; if (strcmp(field,"poly_dimension")==0) { if (*(int *)(argv[2])<1) *(int *)(argv[2])=1; else if (*(int *)(argv[2])>=FIT_DIMENSION_MAX) *(int *)(argv[2])=FIT_DIMENSION_MAX - 1; } else if ((strcmp(field,"user_func")==0) || ((strncmp(field,"derivative",10)==0) && (field[10]!='\0'))) { math=(char *)(argv[2]); if (math!=NULL) { MathEquationParametar *prm; code = create_math_equation(obj, math, field); if (code == NULL) { return 1; } prm = math_equation_get_parameter(code, 0, NULL); if (prm == NULL) { math_equation_free(code); return 1; } if (prm->id_max >= FIT_DIMENSION_MAX) { error(obj,ERRMANYPARAM); math_equation_free(code); return 1; } } else { code=NULL; } if (field[0]=='u') { math_equation_free(fitlocal->codef); fitlocal->codef = code; } else { math_equation_free(fitlocal->codedf[field[10] - '0']); fitlocal->codedf[field[10] - '0'] = code; } } if (set_equation(obj, inst, fitlocal, NULL)) return 1; return 0; } static int fit_put_weight_func(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *math; MathEquation *code; int rcode, security; enum EOEQ_ASSIGN_TYPE type; math = argv[2]; if (math == NULL) { return 0; } g_strstrip(math); if (math[0] == '\0') { g_free(argv[2]); argv[2] = NULL; return 0; } security = get_security(); type = (security) ? EOEQ_ASSIGN_TYPE_BOTH : EOEQ_ASSIGN_TYPE_ASSIGN; code = ofile_create_math_equation(NULL, type, 3, FALSE, TRUE, FALSE, FALSE, TRUE); if (code == NULL) return 1; rcode = math_equation_parse(code, math); if (rcode == 0 && code->use_eoeq_assign) { replace_eoeq_token(math); } else if (rcode) { show_eqn_error(obj, code, math, argv[1], rcode); } math_equation_free(code); return rcode; } enum FitError { FitError_Interrupt = -7, /* FitError_Convergence = -6, */ FitError_Range = -5, /* range check */ FitError_Syntax = -4, /* syntax error */ FitError_Equation = -3, /* equation is not specified */ FitError_Matrix = -2, /* singular matrix */ FitError_Small = -1, /* too small data */ FitError_Success = 0, /* no error */ FitError_Fatal = 1, /* fatal error */ }; static void display_equation(const char *equation) { if (equation == NULL) return; ndisplaydialog("\nEquation:\n"); ndisplaydialog(equation); ndisplaydialog("\n"); } static char * get_poly_equation(struct fitlocal *fitlocal, enum FIT_OBJ_TYPE type, vector coe, int disp) { GString *equation; int i, precision; equation = g_string_new(""); if (equation == NULL) { return NULL; } precision = (disp) ? PRECISION_DISP : PRECISION_SAVE; switch (type) { case FIT_TYPE_POLY: for (i = fitlocal->dim - 1; i > 0; i--) { g_string_append_printf(equation, (i == fitlocal->dim - 1) ? "%.*gx" : "%+.*gx", precision, coe[i]); if (i > 1) { g_string_append_printf(equation, "^%d", i); } } g_string_append_printf(equation, "%+.*g", precision, coe[0]); break; case FIT_TYPE_POW: g_string_printf(equation, "exp(%.*g)x^%.*g", precision, coe[0], precision, coe[1]); break; case FIT_TYPE_EXP: g_string_printf(equation, "exp(%.*gx%+.*g)", precision, coe[1], precision, coe[0]); break; case FIT_TYPE_LOG: g_string_printf(equation, "%.*gLn(x)%+.*g", precision, coe[1], precision, coe[0]); break; case FIT_TYPE_USER: /* never reached */ break; } return g_string_free(equation, FALSE); } static int show_poly_result(struct fitlocal *fitlocal, enum FIT_OBJ_TYPE type, vector coe) { int j; GString *info; char *eqn; info = g_string_new(""); if (info == NULL) { return 1; } g_string_append_printf(info, "--------\nfit:%d (^%d)\n", fitlocal->id, fitlocal->oid); switch (type) { case FIT_TYPE_POLY: g_string_append_printf(info,"Eq: %%0i*x^i (i=0-%d)\n\n", fitlocal->dim - 1); break; case FIT_TYPE_POW: g_string_append(info,"Eq: exp(%00)*x^%01\n\n"); break; case FIT_TYPE_EXP: g_string_append(info,"Eq: exp(%01*x+%00)\n\n"); break; case FIT_TYPE_LOG: g_string_append(info,"Eq: %01*Ln(x)+%00\n\n"); break; case FIT_TYPE_USER: /* never reached */ break; } for (j = 0; j < fitlocal->dim; j++) { g_string_append_printf(info, " %%0%d = %+.7e\n", j, coe[j]); } g_string_append_c(info, '\n'); g_string_append_printf(info, " points = %d\n", fitlocal->num); g_string_append_printf(info, " = %+.7e\n", fitlocal->derror); if (fitlocal->correlation >= 0) { g_string_append_printf(info, "|r| or |R| = %+.7e\n", fitlocal->correlation); } else { g_string_append(info, "|r| or |R| = -------------\n"); } ndisplaydialog(info->str); g_string_free(info, TRUE); eqn = get_poly_equation(fitlocal, type, coe, TRUE); if (eqn == NULL) { return 1; } display_equation(eqn); g_free(eqn); return 0; } static enum FitError fitpoly(struct fitlocal *fitlocal, enum FIT_OBJ_TYPE type,int dimension,int through,double x0,double y0, double *data,int num,int disp,int weight,double *wdata) /* return FitError_Range FitError_Matrix FitError_Small FitError_Success FitError_Fatal */ { int i,j,k,dim; double yy,derror,sy,correlation,wt,sum; vector b,x1,x2,coe; matrix m; char *eqn; if (type == FIT_TYPE_POLY) dim=dimension+1; else dim=2; if (!through && (num1e100) || (fabs(data[k*2])>1e100)) return FitError_Range; x1[i]=x1[i-1]*data[k*2]; if (fabs(x1[i])>1e100) return FitError_Range; } yy+=wt*y1*y1; if (fabs(yy)>1e100) return FitError_Range; for (i=0;i1e100) return FitError_Range; b[i]+=wt*y1*x1[i]; if (fabs(b[i])>1e100) return FitError_Range; } for (i=0;i1e100) return FitError_Range; } } if (through) { double y2; y2=y0; x2[0]=1; for (i=1;icoe[i]=coe[i]; for (;icoe[i]=0; fitlocal->dim=dim; fitlocal->derror=derror; fitlocal->correlation=correlation; fitlocal->num=num; eqn = get_poly_equation(fitlocal, type, coe, FALSE); if (eqn == NULL) { return FitError_Fatal; } fitlocal->equation = eqn; if (disp && show_poly_result(fitlocal, type, coe)) { return FitError_Fatal; } return FitError_Success; } static int show_user_result(struct fitlocal *fitlocal, const char *func, int dim, int *tbl, MathValue *par, int n, double dxxc, double derror, double correlation) { GString *info; int j; info = g_string_sized_new(1024); if (info == NULL) { return 1; } g_string_append_printf(info, "--------\nfit:%d (^%d)\n", fitlocal->id, fitlocal->oid); g_string_append(info, "Eq: User defined\n"); g_string_append_printf(info, " %s\n\n", func); for (j = 0; j < dim; j++) { g_string_append_printf(info, " %%0%d = %+.7e\n", tbl[j], par[tbl[j]].val); } g_string_append_c(info, '\n'); g_string_append_printf(info, " points = %d\n", n); g_string_append_printf(info, " delta = %+.7e\n", dxxc); g_string_append_printf(info, " = %+.7e\n", derror); if (correlation >= 0) { g_string_append_printf(info, "|r| or |R| = %+.7e\n", correlation); } else { g_string_append(info, "|r| or |R| = -------------\n"); } ndisplaydialog(info->str); g_string_free(info, TRUE); return 0; } static char * get_user_equation(const char *func, MathValue *par, int disp) { int i, prev_char, precision; GString *equation; equation = g_string_sized_new(256); if (equation == NULL) { return NULL; } precision = (disp) ? PRECISION_DISP : PRECISION_SAVE; prev_char = '\0'; for (i = 0; func[i] != '\0'; i++) { double val; char *format; int prm_index; switch (func[i]) { case '%': if (isdigit(func[i + 1]) && isdigit(func[i + 2]) && isdigit(func[i + 3])) { prm_index = (func[i + 1] - '0') * 100 + (func[i + 2] - '0') * 10 + (func[i + 3] - '0'); i += 3; } else if (isdigit(func[i + 1]) && isdigit(func[i + 2])) { prm_index = (func[i + 1] - '0') * 10 + (func[i + 2] - '0'); i += 2; } else { prm_index = (func[i + 1] - '0'); i += 1; } val = par[prm_index].val; switch (prev_char) { case '-': val = - val; /* fall-through */ case '+': g_string_truncate(equation, equation->len - 1); format = "%+.*g"; break; default: format = "%.*g"; } prev_char = '\0'; g_string_append_printf(equation, format, precision, val); break; case ' ': break; default: prev_char = func[i]; g_string_append_c(equation, toupper(prev_char)); } } return g_string_free(equation, FALSE); } static int show_user_equation(struct fitlocal *fitlocal, const char *func, MathValue *par, int disp) { char *eqn; if (disp) { eqn = get_user_equation(func, par, disp); if (eqn == NULL) { return 1; } display_equation(eqn); g_free(eqn); } eqn = get_user_equation(func, par, FALSE); if (eqn == NULL) { return 1; } fitlocal->equation = eqn; return 0; } static enum FitError fituser(struct objlist *obj,struct fitlocal *fitlocal, const char *func, int deriv,double converge,double *data,int num,int disp, int weight,double *wdata) /* return FitError_Interrupt FitError_Convergence FitError_Range FitError_syntax FitError_Equation FitError_Matrix FitError_Small FitError_Success FitError_Fatal */ { int ecode; int *needdata; int tbl[FIT_DIMENSION_MAX],dim,n,count,err,err2,err3; double yy,y,y1,y2,y3,sy,spx,spy,dxx,dxxc,xx,derror,correlation; vector b, x2, parerr; MathValue par[FIT_DIMENSION_MAX], par2[FIT_DIMENSION_MAX], var; MathEquationParametar *prm; matrix m; int i,j,k; char buf[1024]; double wt,sum; /* matrix m2; int count2; double sum2; double lambda,s0; */ if (num<1) return FitError_Small; if (fitlocal->codef==NULL) return FitError_Equation; prm = math_equation_get_parameter(fitlocal->codef, 0, NULL); dim = prm->id_num; needdata = prm->id; if (deriv) { for (i = 0; i < dim; i++) { if (fitlocal->codedf[needdata[i]] == NULL) return FitError_Equation; } } for (i = 0; i < dim; i++) tbl[i] = needdata[i]; for (i = 0; i < FIT_DIMENSION_MAX; i++) { par[i].type = MATH_VALUE_NORMAL; par[i].val = fitlocal->coe[i]; } ecode=FitError_Success; /* err2=FALSE; n=0; sum=0; yy=0; lambda=0.001; for (k=0;kcodef,1,spx,MATH_VALUE_NORMAL,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0, par,parstat,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,0,NULL,NULL,NULL,0,&y1); if (rcode!=MATH_VALUE_NORMAL) err=TRUE; if (!err) { if (fabs(yy)>1e100) return FitError_Range; y2=spy-y1; if ((fabs(y2)>1e50) || (fabs(spy)>1e50)) err=TRUE; } if (!err) { n++; yy+=wt*y2*y2; } else err2=TRUE; } if (err2) error(obj,ERRMATH); if (n<1) { ecode=FitError_Small; goto errexit; } s0=yy/sum; */ count=0; err3=FALSE; do { yy=0; y=0; y3=0; for (i=0;icodef, 0, par); math_equation_set_var(fitlocal->codef, 0, &var); math_equation_calculate(fitlocal->codef, &var); y1 = var.val; if (var.type!=MATH_VALUE_NORMAL) err=TRUE; if (deriv) { for (j=0;jcodedf[tbl[j]], 0, par); math_equation_set_var(fitlocal->codedf[tbl[j]], 0, &var); math_equation_calculate(fitlocal->codedf[tbl[j]], &var); x2[j] = var.val; if (var.type!=MATH_VALUE_NORMAL) err=TRUE; } } else { for (j=0;jcodef, 0, par2); math_equation_set_var(fitlocal->codef, 0, &var); math_equation_calculate(fitlocal->codef, &var); x2[j] = var.val; if (var.type!=MATH_VALUE_NORMAL) err=TRUE; x2[j]=(x2[j]-y1)/dxx; } } if (!err) { if ((fabs(yy)>1e100) || (fabs(y3)>1e100)) return FitError_Range; y2=spy-y1; if ((fabs(y2)>1e50) || (fabs(spy)>1e50)) err=TRUE; } if (!err) { n++; yy+=wt*y2*y2; y+=wt*spy; y3+=wt*spy*spy; for (j=0;j1) correlation=-1; derror=sqrt(derror); /* if (disp) { i=0; i += sprintf(buf + i, "fit:^%d\n", fitlocal->oid); i+=sprintf(buf+i,"Eq: User defined\n\n"); for (j=0;j = %+.7e\n",derror); if (correlation>=0) i+=sprintf(buf+i,"|r| or |R| = %+.7e\n",correlation); else i+=sprintf(buf+i,"|r| or |R| = -------------\n"); i+=sprintf(buf+i," Iteration = %d\n",count); ndisplaydialog(buf); } */ if (count & 0x100) { sprintf(buf,"fit:^%d Iteration = %d delta = %g", fitlocal->oid, count, dxxc); set_progress(0, buf, -1); } if (ninterrupt()) { ecode=FitError_Interrupt; goto errexit; } /* count2=0; sum2=sum; while (TRUE) { count2++; sprintf(buf,"Iteration = %d:%d",count,count2); ndisplaystatus(buf); for (j=0;jcodef,1,spx,MATH_VALUE_NORMAL,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0, par2,parstat,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,0,NULL,NULL,NULL,0,&y1); if (rcode!=MATH_VALUE_NORMAL) err=TRUE; if (!err) { if (fabs(yy)>1e100) goto repeat; y2=spy-y1; if ((fabs(y2)>1e50) || (fabs(spy)>1e50)) err=TRUE; } if (!err) { n++; yy+=wt*y2*y2; } } if (n<1) goto repeat; if (yy/sum<=s0) { s0=yy/sum; break; } repeat: lambda*=10; if (lambda>1e100) return FitError_Convergence; } lambda/=10; */ if (matsolv(dim,m,b,parerr)) return FitError_Matrix; dxxc=0; xx=0; for (i=0;ixx*converge/100) && ((xx>1e-6) || (dxxc>1e-6*converge/100))); if (disp && show_user_result(fitlocal, func, dim, tbl, par, n, dxxc, derror, correlation)) {; return FitError_Fatal; } errexit: if ((ecode==FitError_Success) || (ecode==FitError_Range)) { for (i = 0; i < FIT_DIMENSION_MAX; i++) { fitlocal->coe[i] = par[i].val; } fitlocal->dim=dim; fitlocal->derror=derror; fitlocal->correlation=correlation; fitlocal->num=n; if (show_user_equation(fitlocal, func, par, disp)) { ecode = FitError_Fatal; } } return ecode; } static int fitfit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct fitlocal *fitlocal; int i,through,dimension,deriv,disp; enum FIT_OBJ_TYPE type; double x0,y0,converge,wt; struct narray *darray; double *data,*wdata; char *equation,*func,prm[32]; int dnum,num,err,err2,err3; enum FitError rcode; double derror,correlation,pp; int ecode; int weight,anum; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&fitlocal); if (set_equation(obj, inst, fitlocal, NULL)) return 1; equation = g_strdup("undef"); if (equation == NULL) return 1; if (set_equation(obj, inst, fitlocal, equation)) { g_free(equation); return 1; } num=0; derror=0; correlation=0; pp=0; if (_putobj(obj,"number",inst,&num)) return 1; if (_putobj(obj,"error",inst,&derror)) return 1; if (_putobj(obj,"correlation",inst,&correlation)) return 1; for (i = 0; i < FIT_DIMENSION_MAX; i++) { snprintf(prm, sizeof(prm), "%%%02d", i); if (_putobj(obj, prm, inst, &pp)) return 1; } _getobj(obj,"type",inst,&type); _getobj(obj,"through_point",inst,&through); _getobj(obj,"point_x",inst,&x0); _getobj(obj,"point_y",inst,&y0); _getobj(obj,"poly_dimension",inst,&dimension); _getobj(obj,"user_func",inst,&func); _getobj(obj,"derivative",inst,&deriv); _getobj(obj,"converge",inst,&converge); _getobj(obj, "id", inst, &(fitlocal->id)); for (i = 0; i < FIT_DIMENSION_MAX; i++) { snprintf(prm, sizeof(prm), "parameter%d", i); _getobj(obj, prm, inst, &(fitlocal->coe[i])); } _getobj(obj,"display",inst,&disp); if (through && (type == FIT_TYPE_USER)) { error(obj,ERRTHROUGH); return 1; } darray = (struct narray *) (argv[2]); if (arraynum(darray) < 1) return FitError_Small; data=arraydata(darray); anum=arraynum(darray)-1; dnum=nround(data[0]); data += 1; if (dnum == (anum / 2)) { weight = FALSE; wt = 0; /* dummy code to avoid compile warnings */ wdata = NULL; /* dummy code to avoid compile warnings */ } else if (dnum == (anum / 3)) { weight = TRUE; wdata = data + 2 * dnum; } else { error(obj, ERR_INCONSISTENT_DATA_NUM); return 1; } num=0; err2=err3=FALSE; for (i=0;inum))) return 1; if (_putobj(obj,"error",inst,&(fitlocal->derror))) return 1; if (_putobj(obj,"correlation",inst,&(fitlocal->correlation))) return 1; for (i = 0; i < FIT_DIMENSION_MAX; i++) { snprintf(prm, sizeof(prm), "%%%02d", i); if (_putobj(obj, prm, inst, &(fitlocal->coe[i]))) return 1; } if (set_equation(obj, inst, fitlocal, fitlocal->equation)) return 1; fitlocal->equation = NULL; return 0; } static int fitcalc(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { MathValue val; int r; char *equation; double x; struct fitlocal *fitlocal; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; rval->d = 0; x = arg_to_double(argv, 2); _getobj(obj,"_local",inst,&fitlocal); if (fitlocal->result_code == NULL) { MathEquation *eq; _getobj(obj, "equation", inst, &equation); if (equation == NULL) { return 0; } eq = ofile_create_math_equation(NULL, EOEQ_ASSIGN_TYPE_ASSIGN, 0, FALSE, FALSE, FALSE, FALSE, TRUE); if (eq == NULL) { return 1; } if (math_equation_parse(eq, equation)) { math_equation_free(eq); return 1; } math_equation_optimize(eq); fitlocal->result_code = eq; } val.val = x; val.type = MATH_VALUE_NORMAL; math_equation_set_var(fitlocal->result_code, 0, &val); r = math_equation_calculate(fitlocal->result_code, &val); if (r) { return 1; } rval->d = val.val; return 0; } static int fit_inst_dup(struct objlist *obj, N_VALUE *src, N_VALUE *dest) { int i, pos, len; struct fitlocal *local_new, *local_src; char deriv[] = "derivative0", *math; pos = obj_get_field_pos(obj, "_local"); if (pos < 0) { return 1; } local_src = src[pos].ptr; #if GLIB_CHECK_VERSION(2, 68, 0) local_new = g_memdup2(local_src, sizeof(struct fitlocal)); #else local_new = g_memdup(local_src, sizeof(struct fitlocal)); #endif if (local_new == NULL) { return 1; } dest[pos].ptr = local_new; local_new->equation = g_strdup(local_src->equation); local_new->result_code = NULL; if (local_src->codef) { _getobj(obj, "user_func", src, &math); local_new->codef = create_math_equation(obj, math, "user_func"); if (local_new->codef == NULL) { return 1; } } len = sizeof(deriv); for (i = 0; i < FIT_DIMENSION_MAX; i++) { deriv[len - 2] = '0' + i; if (local_src->codedf[i]) { _getobj(obj, deriv, src, &math); local_new->codedf[i] = create_math_equation(obj, math, deriv); if (local_new->codedf[i] == NULL) { return 1; } } } return 0; } static int fit_inst_free(struct objlist *obj, N_VALUE *inst) { int i, pos; struct fitlocal *local; pos = obj_get_field_pos(obj, "_local"); if (pos < 0) { return 1; } local = inst[pos].ptr; if (local->equation) { g_free(local->equation); } if (local->result_code) { math_equation_free(local->result_code); } if (local->codef) { math_equation_free(local->codef); } for (i = 0; i < FIT_DIMENSION_MAX; i++) { if (local->codedf[i]) { math_equation_free(local->codedf[i]); } } g_free(local); return 0; } static struct objtable fit[] = { {"init",NVFUNC,NEXEC,fitinit,NULL,0}, {"done",NVFUNC,NEXEC,fitdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"profile",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"type",NENUM,NREAD|NWRITE,fitput,fittypechar,0}, {"min",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"max",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"div",NINT,NREAD|NWRITE,oputge1,NULL,0}, {"interpolation",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"through_point",NBOOL,NREAD|NWRITE,fitput,NULL,0}, {"point_x",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"point_y",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"equation",NSTR,NREAD|NWRITE,fitequation,NULL,0}, {"poly_dimension",NINT,NREAD|NWRITE,fitput,NULL,0}, {"weight_func",NSTR,NREAD|NWRITE,fit_put_weight_func,NULL,0}, {"user_func",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative",NBOOL,NREAD|NWRITE,fitput,NULL,0}, {"derivative0",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative1",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative2",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative3",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative4",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative5",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative6",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative7",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative8",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"derivative9",NSTR,NREAD|NWRITE,fitput,NULL,0}, {"converge",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter0",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter1",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter2",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter3",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter4",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter5",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter6",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter7",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter8",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"parameter9",NDOUBLE,NREAD|NWRITE,fitput,NULL,0}, {"%00",NDOUBLE,NREAD,NULL,NULL,0}, {"%01",NDOUBLE,NREAD,NULL,NULL,0}, {"%02",NDOUBLE,NREAD,NULL,NULL,0}, {"%03",NDOUBLE,NREAD,NULL,NULL,0}, {"%04",NDOUBLE,NREAD,NULL,NULL,0}, {"%05",NDOUBLE,NREAD,NULL,NULL,0}, {"%06",NDOUBLE,NREAD,NULL,NULL,0}, {"%07",NDOUBLE,NREAD,NULL,NULL,0}, {"%08",NDOUBLE,NREAD,NULL,NULL,0}, {"%09",NDOUBLE,NREAD,NULL,NULL,0}, {"number",NINT,NREAD,NULL,NULL,0}, {"error",NDOUBLE,NREAD,NULL,NULL,0}, {"correlation",NDOUBLE,NREAD,NULL,NULL,0}, {"display",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"fit",NVFUNC,NREAD|NEXEC,fitfit,"da",0}, {"calc",NDFUNC,NREAD|NEXEC,fitcalc,"d",0}, {"_local",NPOINTER,0,NULL,NULL,0}, }; #define TBLNUM (sizeof(fit) / sizeof(*fit)) void * addfit(void) /* addfit() returns NULL on error */ { struct objlist *fit_obj; fit_obj = addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,fit,ERRNUM,fiterrorlist,NULL,NULL); obj_set_undo_func(fit_obj, fit_inst_dup, fit_inst_free); return fit_obj; } ngraph-gtk-6.09.05/src/olegend.h0000644000175000017500000000477613452311500013243 00000000000000/* * $Id: olegend.h,v 1.6 2009-05-01 09:15:58 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef OLEGEND_HEADER #define OLEGEND_HEADER #define ROTATE_MARK 0 enum FLIP_DIRECTION { FLIP_DIRECTION_HORIZONTAL, FLIP_DIRECTION_VERTICAL, }; int legendgeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int legendbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int legendmove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int legendrotate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int legendchange(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int legendzoom(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int legendmatch(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); void rotate(int px, int py, int angle, int *x, int *y); void flip(int pivot, enum FLIP_DIRECTION dir, int *x, int *y); int legendflip(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); int put_color_for_backward_compatibility(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); void draw_marker_mark(struct objlist *obj, N_VALUE *inst, int GC, int width, int headlen, int headwidth, int x0, int y0, double dx, double dy, int r, int g, int b, int a, int type); void draw_marker_bar(struct objlist *obj, N_VALUE *inst, int GC, int width, int headlen, int headwidth, int x0, int y0, double dx, double dy); void draw_marker_wave(struct objlist *obj, N_VALUE *inst, int GC, int width, int headlen, int headwidth, int x0, int y0, double dx, double dy, int errspl); int mark_flip(int dir, int type); int mark_rotate(int angle, int type); #endif ngraph-gtk-6.09.05/src/gra.c0000644000175000017500000027456314142161772012410 00000000000000/* * $Id: gra.c,v 1.31 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include "object.h" #include "strconv.h" #include "nstring.h" #include "mathfn.h" #include "gra.h" #include "ogra.h" #include "ogra_error.h" #include "math/math_equation.h" #define FONT_STYLE_NORMAL '\x11' #define FONT_STYLE_BOLD '\x12' #define FONT_STYLE_ITALIC '\x13' struct GRAC { int open,init; const char *objname; const char *outputname; struct objlist *obj; N_VALUE *inst; int output,strwidth,charascent,chardescent; struct narray **list; void *local; directfunc direct; int viewf; int leftm,topm,width,height; double zoom; int gminx,gminy,gmaxx,gmaxy; int cpx,cpy; int clip; int linef; int linedashn; int *linedash; int linewidth,linecap,linejoin,linemiter; int colorf; int fr,fg,fb,fa; int textf; char *textfont; int textsize; int textdir; int textspace; int font_style; int mergetop,mergeleft,mergezoom; int mergefont,mergept,mergesp,mergedir; #if EXPAND_DOTTED_LINE int gdashn; int gdashi; double gdashlen; int gdotf; int *gdashlist; #endif clipfunc gclipf; transfunc gtransf; diffunc gdiff; intpfunc gintpf; void *gflocal; double x0,y0; int oldFR,oldFG,oldFB,oldBR,oldBG,oldBB; }; #if EXPAND_DOTTED_LINE #define INIT_DASH 0, 0, 0, TRUE, NULL, #else #define INIT_DASH #endif #define GRAC_INIT_VAL {FALSE, FALSE, NULL, NULL, NULL, NULL, \ -1, -1, -1, -1, NULL, NULL, NULL, \ FALSE, 0, 0, SHRT_MAX, SHRT_MAX, 1, 0, 0, SHRT_MAX, SHRT_MAX, \ 0, 0, 1, \ FALSE, 0, NULL, 1, 0, 0, 0, \ FALSE, 0, 0, 0, 255, \ FALSE, NULL, 0, 0, 0, GRA_FONT_STYLE_NORMAL, \ 0, 0, 10000, 0, 0, 0, 0, \ INIT_DASH \ NULL, NULL, NULL, NULL, NULL, 0, 0, \ 0, 0, 0, 0, 0, 0} static struct GRAC GRAClist[]= { GRAC_INIT_VAL, /* 1 */ GRAC_INIT_VAL, /* 2 */ GRAC_INIT_VAL, /* 3 */ GRAC_INIT_VAL, /* 4 */ GRAC_INIT_VAL, /* 5 */ GRAC_INIT_VAL, /* 6 */ GRAC_INIT_VAL, /* 7 */ GRAC_INIT_VAL, /* 8 */ GRAC_INIT_VAL, /* 9 */ GRAC_INIT_VAL, /* 10 */ GRAC_INIT_VAL, /* 11 */ }; #define GRAClimit ((int) (sizeof(GRAClist) / sizeof(*GRAClist) - 1)) #if ! CURVE_OBJ_USE_EXPAND_BUFFER static void GRAcmatchtod(double x,double y,struct cmatchtype *data); #endif static int GRAinview(int GC,int x,int y); static int GRArectclip(int GC,int *x0,int *y0,int *x1,int *y1); static int GRAlineclip(int GC,int *x0,int *y0,int *x1,int *y1); int calc_zoom_direction(int direction, double zx, double zy, double *zp, double *zn) { double x, y, dir; int new_dir; dir = (direction / 100.0) / 180 * MPI; if (zn) { x = sin(dir) * zx; y = cos(dir) * zy; *zn = sqrt(x * x + y * y); } x = cos(dir) * zx; y = sin(dir) * zy; if (zp) { *zp = sqrt(x * x + y * y); } if (x == 0) { if (y > 0) { new_dir = 9000; } else { new_dir = 27000; } } else if (x < 0) { new_dir = atan(y / x) / MPI * 18000 + 18000; new_dir %= 36000; } else { new_dir = atan(y / x) / MPI * 18000; } return new_dir; } int _GRAopencallback(directfunc direct,struct narray **list,void *local) { int i; for (i=0;i=GRAClimit) return ERRILGC; g_free(GRAClist[GC].linedash); #if EXPAND_DOTTED_LINE g_free(GRAClist[GC].gdashlist); GRAClist[GC].gdashlist=NULL; #endif g_free(GRAClist[GC].textfont); GRAClist[GC].linedashn=0; GRAClist[GC].linedash=NULL; GRAClist[GC].textfont=NULL; GRAClist[GC].viewf=FALSE; GRAClist[GC].linef=FALSE; GRAClist[GC].colorf=FALSE; GRAClist[GC].textf=FALSE; code='I'; cpar[0]=5; cpar[1]=GRAClist[GC].leftm; cpar[2]=GRAClist[GC].topm; cpar[3]=GRAClist[GC].width; cpar[4]=GRAClist[GC].height; cpar[5]=nround(GRAClist[GC].zoom*10000); if (GRAdraw(GC,code,cpar,NULL)) return ERROPEN; return 0; } int GRAopened(int GC) { if (GC<0) return -1; if (GC>=GRAClimit) return -1; if (!(GRAClist[GC].open)) return -1; return GC; } void _GRAclose(int GC) { if (GC<0) return; if (GC>=GRAClimit) return; g_free(GRAClist[GC].linedash); #if EXPAND_DOTTED_LINE g_free(GRAClist[GC].gdashlist); #endif g_free(GRAClist[GC].textfont); GRAClist[GC]=GRAClist[GRAClimit]; } void GRAclose(int GC) { int GC2,i; if (GC<0) return; if (GC>=GRAClimit) return; GC2=-1; if (GRAClist[GC].obj!=NULL) { if (!chkobjfield(GRAClist[GC].obj,"_lock")) { _putobj(GRAClist[GC].obj,"_GC",GRAClist[GC].inst,&GC2); } i=-1; if (!chkobjfield(GRAClist[GC].obj,"_GC")) { _putobj(GRAClist[GC].obj,"_GC",GRAClist[GC].inst,&i); } } g_free(GRAClist[GC].linedash); #if EXPAND_DOTTED_LINE g_free(GRAClist[GC].gdashlist); #endif g_free(GRAClist[GC].textfont); GRAClist[GC]=GRAClist[GRAClimit]; } static void GRAaddlist2(int GC,char *draw) { struct narray **array; if (GC<0) return; if (GC>=GRAClimit) return; if (GRAClist[GC].output==-1) return; array=GRAClist[GC].list; if (array!=NULL) { if (*array==NULL) *array=arraynew(sizeof(char *)); arrayadd(*array,&draw); } } void GRAaddlist(int GC,struct objlist *obj,N_VALUE *inst, const char *objname, const char *field) { int oid; char *draw; if (GRAClist[GC].output==-1) return; if (_getobj(obj,"oid",inst,&oid)==-1) return; if ((draw=mkobjlist(NULL,objname,oid,field,TRUE))==NULL) return; GRAaddlist2(GC,draw); } static int add_draw_obj(struct objlist *parent, char const **objects, int index) { struct objlist *ocur; const char *objname; ocur = chkobjroot(); while (ocur != NULL) { if (chkobjparent(ocur) == parent) { int instnum; instnum = chkobjlastinst(ocur); if (instnum != -1) { objname = chkobjectname(ocur); objects[index] = objname; index++; objects[index] = NULL; } index = add_draw_obj(ocur, objects, index); } ocur = ocur->next; } return index; } void GRAredraw(struct objlist *obj,N_VALUE *inst,int setredrawf,int redraw_num) { struct objlist *gobj; int gid, snum; char *gfield; N_VALUE *ginst; char const *objects[OBJ_MAX] = {NULL}; char **sdata; struct narray *sarray, *array; if (_getobj(obj, "_list", inst, &sarray)) { return; } snum = arraynum(sarray); if (snum == 0) { return; } sdata = arraydata(sarray); gobj = getobjlist(sdata[0], &gid, &gfield, NULL); if (gobj == NULL) { return; } ginst = getobjinstoid(gobj, gid); if (ginst == NULL) { return; } _getobj(gobj, "draw_obj", ginst, &array); if (array) { int i, n; n = arraynum(array); for (i = 0; i < n; i++) { objects[i] = arraynget_str(array, i); } objects[i] = NULL; } else { struct objlist *draw; draw = getobject("draw"); if (draw == NULL) { return; } add_draw_obj(draw, objects, 0); } GRAredraw_layers(obj,inst, setredrawf, redraw_num, objects); } void GRAredraw_layers(struct objlist *obj, N_VALUE *inst, int setredrawf, int redraw_num, char const **objects) { int i, n, snum; char *dargv[2], *device, **sdata; int redrawfsave; struct objlist *gobj; int xid, gid, oid, layer, GC, GCnew; char *dfield, *xfield, *gfield; N_VALUE *dinst, *ginst; struct narray *sarray; if (ninterrupt()) return; if (_getobj(obj,"_list",inst,&sarray)) return; if (_getobj(obj,"oid",inst,&oid)) return; if ((snum=arraynum(sarray))==0) return; sdata=arraydata(sarray); if (_getobj(obj,"_GC",inst,&GC)) { return; } if (((gobj=getobjlist(sdata[0],&gid,&gfield,NULL))==NULL) || ((ginst=getobjinstoid(gobj,gid))==NULL)) { return; } if (GC!=-1) { /* gra is still opened */ GCnew=GC; GRAreopen(GC); } else { struct objlist *xobj; /* gra is already closed */ /* check consistency */ if (_getobj(gobj,"_device",ginst,&device) || (device==NULL) || ((xobj=getobjlist(device,&xid,&xfield,NULL))==NULL) || (xobj!=obj) || (xid!=oid) || (strcmp(xfield,"_output")!=0)) { return; } /* open GRA */ if ((_exeobj(gobj,"open",ginst,0,NULL)) || (_getobj(gobj,"open",ginst,&GCnew)) || (GRAopened(GCnew)==-1)) { return; } } layer = GRAlayer_support(GC); dargv[0]=(char *)&GC; while (*objects) { struct objlist *dobj; dobj = getobject(*objects); objects++; if (dobj == NULL) { continue; } n = chkobjlastinst(dobj) + 1; if (n < 1) { continue; } if (layer) { GRAlayer(GC, dobj->name); } for (i = 0; i < n; i++) { if (ninterrupt()) { return; } if (chkobjfield(dobj, "file")) { dfield = "draw"; } else { dfield = "redraw"; } dinst = chkobjinst(dobj, i); if (dinst == NULL) { continue; } if (setredrawf) { int t = TRUE; _getobj(dobj, "redraw_flag", dinst, &redrawfsave); _putobj(dobj, "redraw_flag", dinst, &t); _putobj(dobj, "redraw_num", dinst, &redraw_num); } _exeobj(dobj, dfield, dinst, 1, dargv); if (setredrawf) { _putobj(dobj, "redraw_flag", dinst, &redrawfsave); } } } } int GRAdraw(int GC,char code,int *cpar,char *cstr) { double zoom; int i, zoomf, style, alpha; if (GC<0) return ERRILGC; if (GC>=GRAClimit) return ERRILGC; if (!(GRAClist[GC].open)) return ERRGRACLOSE; if ((GRAClist[GC].direct==NULL) && ((GRAClist[GC].output==-1) || (GRAClist[GC].obj==NULL))) return ERRNODEVICE; zoom=GRAClist[GC].zoom; if (zoom==1) zoomf=FALSE; else zoomf=TRUE; switch (code) { case 'I': if (GRAClist[GC].init) return 0; GRAClist[GC].init=TRUE; break; case 'V': if (GRAClist[GC].viewf && (cpar[1]==GRAClist[GC].gminx) && (cpar[3]==GRAClist[GC].gmaxx) && (cpar[2]==GRAClist[GC].gminy) && (cpar[4]==GRAClist[GC].gmaxy) && (cpar[5]==GRAClist[GC].clip)) return 0; GRAClist[GC].viewf=TRUE; GRAClist[GC].gminx=cpar[1]; GRAClist[GC].gminy=cpar[2]; GRAClist[GC].gmaxx=cpar[3]; GRAClist[GC].gmaxy=cpar[4]; GRAClist[GC].clip=cpar[5]; cpar[1]=cpar[1]*zoom+GRAClist[GC].leftm; cpar[2]=cpar[2]*zoom+GRAClist[GC].topm; cpar[3]=cpar[3]*zoom+GRAClist[GC].leftm; cpar[4]=cpar[4]*zoom+GRAClist[GC].topm; break; case 'A': if (GRAClist[GC].linef && (cpar[1]==GRAClist[GC].linedashn) && (cpar[2]==GRAClist[GC].linewidth) && (cpar[3]==GRAClist[GC].linecap) && (cpar[4]==GRAClist[GC].linejoin) && (cpar[5]==GRAClist[GC].linemiter)) { for (i=0;i 3) ? cpar[4] : 255; if (GRAClist[GC].colorf && cpar[1] == GRAClist[GC].fr && cpar[2] == GRAClist[GC].fg && cpar[3] == GRAClist[GC].fb && alpha == GRAClist[GC].fa) { return 0; } GRAClist[GC].colorf = TRUE; GRAClist[GC].fr = cpar[1]; GRAClist[GC].fg = cpar[2]; GRAClist[GC].fb = cpar[3]; GRAClist[GC].fa = alpha; break; case 'F': if ((GRAClist[GC].textfont!=NULL) && (strcmp(GRAClist[GC].textfont,cstr)==0)) return 0; g_free(GRAClist[GC].textfont); if ((GRAClist[GC].textfont=g_malloc(strlen(cstr)+1))==NULL) return 0; strcpy(GRAClist[GC].textfont,cstr); GRAClist[GC].textf=FALSE; break; case 'H': style = (cpar[0] > 3) ? cpar[4] : GRA_FONT_STYLE_NORMAL; if (GRAClist[GC].textf && cpar[1] == GRAClist[GC].textsize && cpar[2] == GRAClist[GC].textspace && cpar[3] == GRAClist[GC].textdir && style == GRAClist[GC].font_style) { return 0; } GRAClist[GC].textf=TRUE; GRAClist[GC].textsize=cpar[1]; GRAClist[GC].textspace=cpar[2]; GRAClist[GC].textdir=cpar[3]; GRAClist[GC].font_style = style; if (zoomf) { cpar[1]*=zoom; cpar[2]*=zoom; } break; case 'M': case 'N': case 'T': case 'P': if (zoomf) { cpar[1]*=zoom; cpar[2]*=zoom; } break; case 'L': case 'B': case 'C': if (zoomf) { cpar[1]*=zoom; cpar[2]*=zoom; cpar[3]*=zoom; cpar[4]*=zoom; } break; case 'R': if (zoomf) for (i=0;i= 0; i--) { if (GRAopened(i) == i && GRAClist[i].strwidth != -1) break; } if (i == -1) { return nround(25.4 / 72000.0 * size * 600); } argv[0] = (char *) GRAClist[i].objname; argv[1] = "_strwidth"; argv[2] = GRAClist[i].local; argv[3] = (char *) s; argv[4] = (char *) &size; argv[5] = font; argv[6] = (char *) &style; argv[7] = NULL; if (__exeobj(GRAClist[i].obj, GRAClist[i].strwidth, GRAClist[i].inst, 6, argv)) return nround(25.4 / 72000.0 * size * 600); idp = chkobjoffset2(GRAClist[i].obj, GRAClist[i].strwidth); return GRAClist[i].inst[idp].i; } static int GRAcharascent(char *font, int style, int size) { char *argv[7]; int i, idp; for (i = GRAClimit - 1; i >= 0; i--) { if (GRAopened(i) == i && GRAClist[i].charascent != -1) break; } if (i == -1) return nround(25.4 / 72000.0 * size * 563); argv[0] = (char *) GRAClist[i].objname; argv[1] = "_charascent"; argv[2] = GRAClist[i].local; argv[3] = (char *)&size; argv[4] = font; argv[5] = (char *) &style; argv[6] = NULL; if (__exeobj(GRAClist[i].obj, GRAClist[i].charascent, GRAClist[i].inst, 5, argv)) return nround(25.4 / 72000.0 * size * 563); idp = chkobjoffset2(GRAClist[i].obj, GRAClist[i].charascent); return GRAClist[i].inst[idp].i; } static int GRAchardescent(char *font,int style,int size) { char *argv[7]; int i, idp; for (i = GRAClimit - 1; i >= 0; i--) { if (GRAopened(i) == i && GRAClist[i].chardescent != -1) break; } if (i == -1) return nround(25.4 / 72000.0 * size * 250); argv[0] = (char *) GRAClist[i].objname; argv[1] = "_chardescent"; argv[2] = GRAClist[i].local; argv[3] = (char *)&size; argv[4] = font; argv[5] = (char *) &style; argv[6] = NULL; if (__exeobj(GRAClist[i].obj, GRAClist[i].chardescent, GRAClist[i].inst, 5, argv)) return nround(25.4 / 72000.0 * size * 250); idp = chkobjoffset2(GRAClist[i].obj, GRAClist[i].chardescent); return GRAClist[i].inst[idp].i; } int GRAinit(int GC,int leftm,int topm,int width,int height,int zoom) { char code; int cpar[6], r; code='I'; cpar[0]=5; cpar[1]=leftm; cpar[2]=topm; cpar[3]=width; cpar[4]=height; cpar[5]=zoom; r = GRAdraw(GC,code,cpar,NULL); GRAClist[GC].leftm=leftm; GRAClist[GC].topm=topm; GRAClist[GC].width=width; GRAClist[GC].height=height; GRAClist[GC].zoom=zoom/10000.0; return (r && GRAClist[GC].output != -1) ? ERROPEN: 0; } void GRAregion(int GC, int *width, int *height, int *zoom) { if (width) { if (GRAClist[GC].leftm < 0) { *width = GRAClist[GC].width; } else if (GRAClist[GC].leftm > GRAClist[GC].width) { *width = 0; } else{ *width = GRAClist[GC].width - GRAClist[GC].leftm; } } if (height) { if (GRAClist[GC].topm < 0) { *height = GRAClist[GC].height; } else if (GRAClist[GC].topm > GRAClist[GC].height) { *height = 0; } else{ *height = GRAClist[GC].height - GRAClist[GC].topm; } } if (zoom) { *zoom=GRAClist[GC].zoom*10000; } } #ifdef COMPILE_UNUSED_FUNCTIONS static void GRAdirect(int GC,int cpar[]) { char code; code='X'; GRAdraw(GC,code,cpar,NULL); } #endif /* COMPILE_UNUSED_FUNCTIONS */ int GRAend(int GC) { char code; int cpar[1]; code='E'; cpar[0]=0; return GRAdraw(GC,code,cpar,NULL); } #ifdef COMPILE_UNUSED_FUNCTIONS static void GRAremark(int GC,char *s) { char code; int cpar[1]; char *cstr; char s2[1]; code='%'; cpar[0]=-1; s2[0]='\0'; if (s==NULL) cstr=s2; else cstr=s; GRAdraw(GC,code,cpar,cstr); } #endif /* COMPILE_UNUSED_FUNCTIONS */ void GRAview(int GC,int x1,int y1,int x2,int y2,int clip) { char code; int cpar[6]; if (x1==x2) x2++; if (y1==y2) y2++; code='V'; cpar[0]=5; cpar[1]=x1; cpar[2]=y1; cpar[3]=x2; cpar[4]=y2; cpar[5]=clip; GRAdraw(GC,code,cpar,NULL); } void GRAlinestyle(int GC,int num,int *type,int width,enum GRA_LINE_CAP cap,enum GRA_LINE_JOIN join, int miter) { char code; int *cpar; int i; if ((cpar=g_malloc(sizeof(int)*(6+num)))==NULL) return; code='A'; cpar[0]=5+num; cpar[1]=num; cpar[2]=width; cpar[3]=cap; cpar[4]=join; cpar[5]=miter; for (i=0;i 255) { fr = 255; } else if (fr < 0) { fr = GRAClist[GC].fr; } if (fg > 255) { fg = 255; } else if (fg < 0) { fg = GRAClist[GC].fg; } if (fb > 255) { fb = 255; } else if (fb < 0) { fb = GRAClist[GC].fb; } if (fa > 255) { fa = 255; } else if (fa < 0) { fa = GRAClist[GC].fa; } code = 'G'; cpar[0] = 4; cpar[1] = fr; cpar[2] = fg; cpar[3] = fb; cpar[4] = fa; GRAdraw(GC, code, cpar, NULL); } void GRAtextstyle(int GC,char *font, int style, int size,int space,int dir) { char code; int cpar[5]; char *cstr; if (font==NULL) return; code='F'; cpar[0]=-1; cstr=font; GRAdraw(GC,code,cpar,cstr); code='H'; cpar[0]=4; cpar[1]=size; cpar[2]=space; cpar[3]=dir; cpar[4]=style; GRAdraw(GC,code,cpar,NULL); } void GRAmoveto(int GC,int x,int y) { char code; int cpar[3]; code='M'; cpar[0]=2; cpar[1]=x; cpar[2]=y; GRAdraw(GC,code,cpar,NULL); GRAClist[GC].cpx=x; GRAClist[GC].cpy=y; } void GRAcurrent_point(int GC, int *x, int *y) { *x = GRAClist[GC].cpx; *y = GRAClist[GC].cpy; } static void GRAmoverel(int GC,int x,int y) { GRAClist[GC].cpx+=x; GRAClist[GC].cpy+=y; if ((x!=0) || (y!=0)) { char code; int cpar[3]; /* if ((GRAClist[GC].clip==0) || (GRAinview(GC,GRAClist[GC].cpx,GRAClist[GC].cpy)==0)) { */ code='N'; cpar[0]=2; cpar[1]=x; cpar[2]=y; GRAdraw(GC,code,cpar,NULL); /* } */ } } void GRAline(int GC,int x0,int y0,int x1,int y1) { if ((GRAClist[GC].clip==0) || (GRAlineclip(GC,&x0,&y0,&x1,&y1)==0)) { char code; int cpar[5]; code='L'; cpar[0]=4; cpar[1]=x0; cpar[2]=y0; cpar[3]=x1; cpar[4]=y1; GRAdraw(GC,code,cpar,NULL); } } void GRAlineto(int GC,int x,int y) { int x0,y0,x1,y1; x0=GRAClist[GC].cpx; y0=GRAClist[GC].cpy; x1=x; y1=y; if ((GRAClist[GC].clip==0) || (GRAlineclip(GC,&x0,&y0,&x1,&y1)==0)) { char code; int cpar[3]; if ((x0==GRAClist[GC].cpx) && (y0==GRAClist[GC].cpy)) { code='T'; cpar[0]=2; cpar[1]=x1; cpar[2]=y1; GRAdraw(GC,code,cpar,NULL); } else { code='M'; cpar[0]=2; cpar[1]=x0; cpar[2]=y0; GRAdraw(GC,code,cpar,NULL); code='T'; cpar[0]=2; cpar[1]=x1; cpar[2]=y1; GRAdraw(GC,code,cpar,NULL); } } GRAClist[GC].cpx=x; GRAClist[GC].cpy=y; } void GRAcircle(int GC,int x,int y,int rx,int ry,int cs,int ce,int fil) { char code; int cpar[8]; code='C'; cpar[0]=7; cpar[1]=x; cpar[2]=y; cpar[3]=rx; cpar[4]=ry; cpar[5]=cs; cpar[6]=ce; cpar[7]=fil; GRAdraw(GC,code,cpar,NULL); } void GRArectangle(int GC,int x0,int y0,int x1,int y1,int fil) { if ((GRAClist[GC].clip==0) || (GRArectclip(GC,&x0,&y0,&x1,&y1)==0)) { char code; int cpar[6]; code='B'; cpar[0]=5; cpar[1]=x0; cpar[2]=y0; cpar[3]=x1; cpar[4]=y1; cpar[5]=fil; GRAdraw(GC,code,cpar,NULL); } } static void GRAputpixel(int GC,int x,int y) { if ((GRAClist[GC].clip==0) || (GRAinview(GC,x,y)==0)) { char code; int cpar[3]; code='P'; cpar[0]=2; cpar[1]=x; cpar[2]=y; GRAdraw(GC,code,cpar,NULL); } } void GRAdrawpoly(int GC,int num,int *point,enum GRA_FILL_MODE fil) { char code; int i,*cpar,num2; if (num<1) return; if ((point[0]!=point[num*2-2]) || (point[1]!=point[num*2-1])) num2=num+1; else num2=num; if ((cpar=g_malloc(sizeof(int)*(3+2*num2)))==NULL) return; code='D'; cpar[0]=2+2*num2; cpar[1]=num2; cpar[2]=fil; for (i=0;i<2*num;i++) cpar[i+3]=point[i]; if ((point[0]!=point[num*2-2]) || (point[1]!=point[num*2-1])) { cpar[2*num+3]=point[0]; cpar[2*num+4]=point[1]; } GRAdraw(GC,code,cpar,NULL); g_free(cpar); } void GRAlines(int GC,int num,int *point) { char code; int i,*cpar; if ((cpar=g_malloc(sizeof(int)*(2+2*num)))==NULL) return; code='R'; cpar[0]=1+2*num; cpar[1]=num; for (i=0;i<2*num;i++) cpar[i+2]=point[i]; GRAdraw(GC,code,cpar,NULL); g_free(cpar); } void GRArotate(int x0, int y0, int *pos, int *rpos, int n, double dx, double dy) { int i; for (i = 0; i < n; i++) { double x, y; x = pos[i * 2] - x0; y = pos[i * 2 + 1] - y0; rpos[i * 2] = nround(dx * x - dy * y) + x0; rpos[i * 2 + 1] = nround(dy * x + dx * y) + y0; } } void GRArectangle_rotate(int GC,double dx, double dy, int cx, int cy, int x0,int y0,int x1,int y1,int fil) { int po[8]; if (dy == 0) { GRArectangle(GC, x0, y0, x1, y1, fil); return; } po[0]=x0; po[1]=y0; po[2]=x0; po[3]=y1; po[4]=x1; po[5]=y1; po[6]=x1; po[7]=y0; GRArotate(cx, cy, po, po, 4, dx, dy); GRAdrawpoly(GC,4,po,fil); } void GRAmark_rotate(int GC,int type,int x0,int y0, double dx, double dy, int size, int fr,int fg,int fb, int fa, int br,int bg,int bb, int ba) { int x1,y1,x2,y2,r; int po[12],po2[12],rpo[12],rpo2[12]; int type2,sgn; double d; if ((GRAClist[GC].clip!=0) && (GRAinview(GC,x0,y0)!=0)) { return; } switch (type) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: type2=type-0; r=size/2; if (type2==0) { GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,1); } else if (type2==2) { GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,0); } else if (type2==5) { GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,1); r/=2; GRAcolor(GC,br,bg,bb, ba); GRAcircle(GC,x0,y0,r,r,0,36000,1); } else { GRAcolor(GC,br,bg,bb, ba); GRAcircle(GC,x0,y0,r,r,0,36000,1); GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,0); if (type2==3) { r/=2; GRAcircle(GC,x0,y0,r,r,0,36000,0); } else if (type!=1) { int ofst; if (dy == 0) { if (dx >= 0) { ofst = 0; } else { ofst = 18000; } } else if (dy > 0) { ofst = acos(-dx) / MPI * 18000 + 18000; } else { ofst = acos(dx) / MPI * 18000; } if (type2==4) { r/=2; GRAcircle(GC,x0,y0,r,r,0,36000,1); } else if (type2==6) { GRAcircle(GC,x0,y0,r,r,27000 + ofst,18000,1); } else if (type2==7) { GRAcircle(GC,x0,y0,r,r,9000 + ofst, 18000,1); } else if (type2==8) { GRAcircle(GC,x0,y0,r,r,ofst,18000,1); } else if (type2==9) { GRAcircle(GC,x0,y0,r,r,18000 + ofst, 18000,1); } } } break; case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: type2=type-10; x1=x0-size/2; y1=y0-size/2; x2=x0+size/2; y2=y0+size/2; if (type2==0) { GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } else if (type2==2) { GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); } else if (type2==5) { GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); x1=x0-size/4; y1=y0-size/4; x2=x0+size/4; y2=y0+size/4; GRAcolor(GC,br,bg,bb, ba); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } else { GRAcolor(GC,br,bg,bb, ba); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); if (type2==3) { x1=x0-size/4; y1=y0-size/4; x2=x0+size/4; y2=y0+size/4; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); } else if (type2!=1) { if (type2==4) { x1=x0-size/4; y1=y0-size/4; x2=x0+size/4; y2=y0+size/4; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } else if (type2==6) { x1=x0; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } else if (type2==7) { x2=x0; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } else if (type2==8) { y2=y0; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } else if (type2==9) { y1=y0; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,1); } } } break; case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: type2=type-20; po[0]=x0; po[1]=y0-size/2; po[2]=x0+size/2; po[3]=y0; po[4]=x0; po[5]=y0+size/2; po[6]=x0-size/2; po[7]=y0; po[8]=x0; po[9]=y0-size/2; GRArotate(x0, y0, po, rpo, 5, dx, dy); if (type2==0) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==2) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); } else if (type2==5) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); po[1]=y0-size/4; po[2]=x0+size/4; po[5]=y0+size/4; po[6]=x0-size/4; po[9]=y0-size/4; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); } else { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); if (type2==3) { po[1]=y0-size/4; po[2]=x0+size/4; po[5]=y0+size/4; po[6]=x0-size/4; po[9]=y0-size/4; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); } else if (type2!=1) { if (type2==4) { po[1]=y0-size/4; po[2]=x0+size/4; po[5]=y0+size/4; po[6]=x0-size/4; po[9]=y0-size/4; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==6) { po[6]=x0; po[7]=y0; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==7) { po[2]=x0; po[3]=y0; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==8) { po[4]=x0; po[5]=y0; GRArotate(x0, y0, rpo, rpo, 5, dx, dy); GRAdrawpoly(GC,5,po,GRA_FILL_MODE_EVEN_ODD); } else if (type2==9) { po[0]=x0; po[1]=y0; po[8]=x0; po[9]=y0; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_EVEN_ODD); } } } break; case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: if (type>=40) { type2=type-40; sgn=-1; } else { type2=type-30; sgn=1; } d=sqrt(3.0); po[0]=x0; po[1]=y0-sgn*size/2; po[2]=x0+size*d/4; po[3]=y0+sgn*size/4; po[4]=x0-size*d/4; po[5]=y0+sgn*size/4; po[6]=x0; po[7]=y0-sgn*size/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); if (type2==0) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==2) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); } else if (type2==5) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); po[1]=y0-sgn*size/d/2; po[2]=x0+size/4; po[3]=y0+sgn*size/d/4; po[4]=x0-size/4; po[5]=y0+sgn*size/d/4; po[7]=y0-sgn*size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); if (type2==3) { po[1]=y0-sgn*size/d/2; po[2]=x0+size/4; po[3]=y0+sgn*size/d/4; po[4]=x0-size/4; po[5]=y0+sgn*size/d/4; po[7]=y0-sgn*size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); } else if (type2!=1) { if (type2==4) { po[1]=y0-sgn*size/d/2; po[2]=x0+size/4; po[3]=y0+sgn*size/d/4; po[4]=x0-size/4; po[5]=y0+sgn*size/d/4; po[7]=y0-sgn*size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==6) { po[4]=x0; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==7) { po[2]=x0; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } } } break; case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 60: case 61: case 62: case 63: case 64: case 65: case 66: case 67: if (type>=60) { type2=type-60; sgn=-1; } else { type2=type-50; sgn=1; } d=sqrt(3.0); po[0]=x0-sgn*size/2; po[1]=y0; po[2]=x0+sgn*size/4; po[3]=y0+size*d/4; po[4]=x0+sgn*size/4; po[5]=y0-size*d/4; po[6]=x0-sgn*size/2; po[7]=y0; GRArotate(x0, y0, po, rpo, 4, dx, dy); if (type2==0) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==2) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); } else if (type2==5) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); po[0]=x0-sgn*size/d/2; po[2]=x0+sgn*size/d/4; po[3]=y0+size/4; po[4]=x0+sgn*size/d/4; po[5]=y0-size/4; po[6]=x0-sgn*size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); if (type2==3) { po[0]=x0-sgn*size/d/2; po[2]=x0+sgn*size/d/4; po[3]=y0+size/4; po[4]=x0+sgn*size/d/4; po[5]=y0-size/4; po[6]=x0-sgn*size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); } else if (type2!=1) { if (type2==4) { po[0]=x0-sgn*size/d/2; po[2]=x0+sgn*size/d/4; po[3]=y0+size/4; po[4]=x0+sgn*size/d/4; po[5]=y0-size/4; po[6]=x0-sgn*size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==6) { po[5]=y0; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } else if (type2==7) { po[3]=y0; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); } } } break; case 38: case 39: case 48: case 49: po[0]=x0; po[1]=y0; po[2]=x0-size/2; po[3]=y0-size/2; po[4]=x0+size/2; po[5]=y0-size/2; po[6]=x0; po[7]=y0; po2[0]=x0; po2[1]=y0; po2[2]=x0-size/2; po2[3]=y0+size/2; po2[4]=x0+size/2; po2[5]=y0+size/2; po2[6]=x0; po2[7]=y0; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRArotate(x0, y0, po2, rpo2, 4, dx, dy); if (type==38) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); } else if (type==39) { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_NONE); } else if (type==48) { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_NONE); } else if (type==49) { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_NONE); } break; case 58: case 59: case 68: case 69: po[0]=x0; po[1]=y0; po[2]=x0+size/2; po[3]=y0-size/2; po[4]=x0+size/2; po[5]=y0+size/2; po[6]=x0; po[7]=y0; po2[0]=x0; po2[1]=y0; po2[2]=x0-size/2; po2[3]=y0-size/2; po2[4]=x0-size/2; po2[5]=y0+size/2; po2[6]=x0; po2[7]=y0; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRArotate(x0, y0, po2, rpo2, 4, dx, dy); if (type==58) { GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); } else if (type==59) { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_NONE); } else if (type==68) { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_NONE); } else if (type==69) { GRAcolor(GC,br,bg,bb, ba); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_EVEN_ODD); GRAdrawpoly(GC,4,rpo,GRA_FILL_MODE_NONE); GRAdrawpoly(GC,4,rpo2,GRA_FILL_MODE_NONE); } break; case 70: po[0] = x0-size/2; po[1] = y0; po[2] = x0+size/2; po[3] = y0; po[4] = x0; po[5] = y0-size/2; po[6] = x0; po[7] = y0+size/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,rpo[0],rpo[1],rpo[2],rpo[3]); GRAline(GC,rpo[4],rpo[5],rpo[6],rpo[7]); break; case 71: d=sqrt(2.0); po[0] = x0-size/d/2; po[1] = y0-size/d/2; po[2] = x0+size/d/2; po[3] = y0+size/d/2; po[4] = x0+size/d/2; po[5] = y0-size/d/2; po[6] = x0-size/d/2; po[7] = y0+size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,rpo[0],rpo[1],rpo[2],rpo[3]); GRAline(GC,rpo[4],rpo[5],rpo[6],rpo[7]); break; case 72: d=sqrt(3.0); po[0] = x0; po[1] = y0+size/2; po[2] = x0; po[3] = y0-size/2; po[4] = x0+size*d/4; po[5] = y0-size/4; po[6] = x0-size*d/4; po[7] = y0+size/4; po[8] = x0-size*d/4; po[9] = y0-size/4; po[10] = x0+size*d/4; po[11] = y0+size/4; GRArotate(x0, y0, po, rpo, 6, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,rpo[0],rpo[1],rpo[2],rpo[3]); GRAline(GC,rpo[4],rpo[5],rpo[6],rpo[7]); GRAline(GC,rpo[8],rpo[9],rpo[10],rpo[11]); break; case 73: d=sqrt(3.0); po[0] = x0+size/2; po[1] = y0; po[2] = x0-size/2; po[3] = y0; po[4] = x0-size/4; po[5] = y0+size*d/4; po[6] = x0+size/4; po[7] = y0-size*d/4; po[8] = x0-size/4; po[9] = y0-size*d/4; po[10] = x0+size/4; po[11] = y0+size*d/4; GRArotate(x0, y0, po, rpo, 6, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,rpo[0],rpo[1],rpo[2],rpo[3]); GRAline(GC,rpo[4],rpo[5],rpo[6],rpo[7]); GRAline(GC,rpo[8],rpo[9],rpo[10],rpo[11]); break; case 74: d=sqrt(3.0); po[0] = x0; po[1] = y0-size/2; po[2] = x0-size*d/4; po[3] = y0+size/4; po[4] = x0+size*d/4; po[5] = y0+size/4; GRArotate(x0, y0, po, rpo, 3, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,x0,y0,rpo[0],rpo[1]); GRAline(GC,x0,y0,rpo[2],rpo[3]); GRAline(GC,x0,y0,rpo[4],rpo[5]); break; case 75: d=sqrt(3.0); po[0] = x0; po[1] = y0+size/2; po[2] = x0-size*d/4; po[3] = y0-size/4; po[4] = x0+size*d/4; po[5] = y0-size/4; GRArotate(x0, y0, po, rpo, 3, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,x0,y0,rpo[0],rpo[1]); GRAline(GC,x0,y0,rpo[2],rpo[3]); GRAline(GC,x0,y0,rpo[4],rpo[5]); break; case 76: d=sqrt(3.0); po[0] = x0-size/2; po[1] = y0; po[2] = x0+size/4; po[3] = y0-size*d/4; po[4] = x0+size/4; po[5] = y0+size*d/4; GRArotate(x0, y0, po, rpo, 3, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,x0,y0,rpo[0],rpo[1]); GRAline(GC,x0,y0,rpo[2],rpo[3]); GRAline(GC,x0,y0,rpo[4],rpo[5]); break; case 77: d=sqrt(3.0); po[0] = x0+size/2; po[1] = y0; po[2] = x0-size/4; po[3] = y0-size*d/4; po[4] = x0-size/4; po[5] = y0+size*d/4; GRArotate(x0, y0, po, rpo, 3, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAline(GC,x0,y0,rpo[0],rpo[1]); GRAline(GC,x0,y0,rpo[2],rpo[3]); GRAline(GC,x0,y0,rpo[4],rpo[5]); break; case 78: GRAcolor(GC,fr,fg,fb, fa); po[0] = x0-size/2; po[1] = y0; po[2] = x0+size/2; po[3] = y0; GRArotate(x0, y0, po, rpo, 2, dx, dy); GRAline(GC,x0-size/2,y0,x0+size/2,y0); break; case 79: GRAcolor(GC,fr,fg,fb, fa); po[0] = x0; po[1] = y0-size/2; po[2] = x0; po[3] = y0+size/2; GRArotate(x0, y0, po, rpo, 2, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); break; case 80: r=size/2; GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,0); r/=2; GRAcircle(GC,x0,y0,r,r,0,36000,0); break; case 81: r=size/2; GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,0); po[0] = x0-size/2; po[1] = y0; po[2] = x0+size/2; po[3] = y0; po[4] = x0; po[5] = y0-size/2; po[6] = x0; po[7] = y0+size/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); GRAline(GC, rpo[4], rpo[5], rpo[6], rpo[7]); break; case 82: r=size/2; d=sqrt(2.0); GRAcolor(GC,fr,fg,fb, fa); GRAcircle(GC,x0,y0,r,r,0,36000,0); po[0] = x0-size/d/2; po[1] = y0-size/d/2; po[2] = x0+size/d/2; po[3] = y0+size/d/2; po[4] = x0-size/d/2; po[5] = y0+size/d/2; po[6] = x0+size/d/2; po[7] = y0-size/d/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); GRAline(GC, rpo[4], rpo[5], rpo[6], rpo[7]); break; case 83: x1=x0-size/2; y1=y0-size/2; x2=x0+size/2; y2=y0+size/2; GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); x1=x0-size/4; y1=y0-size/4; x2=x0+size/4; y2=y0+size/4; GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); break; case 84: x1=x0-size/2; y1=y0-size/2; x2=x0+size/2; y2=y0+size/2; GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); po[0] = x0-size/2; po[1] = y0; po[2] = x0+size/2; po[3] = y0; po[4] = x0; po[5] = y0-size/2; po[6] = x0; po[7] = y0+size/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); GRAline(GC, rpo[4], rpo[5], rpo[6], rpo[7]); break; case 85: x1=x0-size/2; y1=y0-size/2; x2=x0+size/2; y2=y0+size/2; GRAcolor(GC,fr,fg,fb, fa); GRArectangle_rotate(GC,dx,dy,x0,y0,x1,y1,x2,y2,0); po[0] = x0-size/2; po[1] = y0-size/2; po[2] = x0+size/2; po[3] = y0+size/2; po[4] = x0+size/2; po[5] = y0-size/2; po[6] = x0-size/2; po[7] = y0+size/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); GRAline(GC, rpo[4], rpo[5], rpo[6], rpo[7]); break; case 86: po[0]=x0; po[1]=y0-size/2; po[2]=x0+size/2; po[3]=y0; po[4]=x0; po[5]=y0+size/2; po[6]=x0-size/2; po[7]=y0; po[8]=x0; po[9]=y0-size/2; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); po[1]=y0-size/4; po[2]=x0+size/4; po[5]=y0+size/4; po[6]=x0-size/4; po[9]=y0-size/4; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); break; case 87: po[0]=x0; po[1]=y0-size/2; po[2]=x0+size/2; po[3]=y0; po[4]=x0; po[5]=y0+size/2; po[6]=x0-size/2; po[7]=y0; po[8]=x0; po[9]=y0-size/2; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); po[0] = x0-size/2; po[1] = y0; po[2] = x0+size/2; po[3] = y0; po[4] = x0; po[5] = y0-size/2; po[6] = x0; po[7] = y0+size/2; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); GRAline(GC, rpo[4], rpo[5], rpo[6], rpo[7]); break; case 88: po[0]=x0; po[1]=y0-size/2; po[2]=x0+size/2; po[3]=y0; po[4]=x0; po[5]=y0+size/2; po[6]=x0-size/2; po[7]=y0; po[8]=x0; po[9]=y0-size/2; GRArotate(x0, y0, po, rpo, 5, dx, dy); GRAcolor(GC,fr,fg,fb, fa); GRAdrawpoly(GC,5,rpo,GRA_FILL_MODE_NONE); po[0] = x0-size/4; po[1] = y0-size/4; po[2] = x0+size/4; po[3] = y0+size/4; po[4] = x0-size/4; po[5] = y0+size/4; po[6] = x0+size/4; po[7] = y0-size/4; GRArotate(x0, y0, po, rpo, 4, dx, dy); GRAline(GC, rpo[0], rpo[1], rpo[2], rpo[3]); GRAline(GC, rpo[4], rpo[5], rpo[6], rpo[7]); break; default: GRAcolor(GC,fr,fg,fb, fa); GRAputpixel(GC,x0,y0); break; } } void GRAmark(int GC,int type,int x0,int y0,int size, int fr,int fg,int fb, int fa, int br,int bg,int bb, int ba) { GRAmark_rotate(GC, type, x0, y0, 1, 0, size, fr, fg, fb, fa, br, bg, bb, ba); } void GRAouttext(int GC,char *s) { char code; int cpar[1]; char *cstr; code='S'; cpar[0]=-1; cstr=s; GRAdraw(GC,code,cpar,cstr); } int GRAlayer_support(int GC) { int layer; if (GC < 0) { return FALSE; } if (GRAClist[GC].obj == NULL || GRAClist[GC].inst == NULL) { return FALSE; } if (_getobj(GRAClist[GC].obj, "_layer", GRAClist[GC].inst, &layer)) { return FALSE; } return layer; } void GRAlayer(int GC,const char *s) { char code; int cpar[1]; char *cstr; g_free(GRAClist[GC].linedash); GRAClist[GC].linedashn=0; GRAClist[GC].linedash=NULL; #if EXPAND_DOTTED_LINE g_free(GRAClist[GC].gdashlist); GRAClist[GC].gdashlist=NULL; #endif g_free(GRAClist[GC].textfont); GRAClist[GC].textfont=NULL; GRAClist[GC].viewf=FALSE; GRAClist[GC].linef=FALSE; GRAClist[GC].colorf=FALSE; GRAClist[GC].textf=FALSE; code='Z'; cpar[0]=-1; cstr=(char *) s; GRAdraw(GC,code,cpar,cstr); } static char *GRAexpandobj(char **s); static char *GRAexpandmath(char **s); static char * GRAexpandobj(char **s) { struct objlist *obj; int i,j,anum,*id; struct narray iarray; char *arg,*ret; GString *str, *garg; char *field; int len; int quote; *s=*s+2; field = arg = NULL; str = garg = NULL; arrayinit(&iarray,sizeof(int)); garg = g_string_sized_new(64); if (garg == NULL) { goto errexit; } if (chkobjilist2(s,&obj,&iarray,TRUE)) goto errexit; anum=arraynum(&iarray); if (anum<=0) goto errexit; id=arraydata(&iarray); if (((*s)==NULL) || (strchr(":= \t",(*s)[0])!=NULL) || ((field=getitok2(s,&len,":= \t}"))==NULL)) goto errexit; if (((*s)[0]!='\0') && ((*s)[0]!='}')) (*s)++; while (((*s)[0]==' ') || ((*s)[0]=='\t')) (*s)++; quote=FALSE; while (((*s)[0]!='\0') && (quote || ((*s)[0]!='}'))) { if (!quote && ((*s)[0]=='%') && ((*s)[1]=='{')) { ret=GRAexpandobj(s); if (ret) { g_string_append(garg, ret); g_free(ret); } } else if (!quote && ((*s)[0]=='%') && ((*s)[1]=='[')) { ret=GRAexpandmath(s); if (ret) { g_string_append(garg, ret); g_free(ret); } } else if (!quote && ((*s)[0]=='\\')) { quote=TRUE; (*s)++; } else { if (quote) quote=FALSE; g_string_append_c(garg, (*s)[0]); (*s)++; } } if ((*s)[0]!='}') goto errexit; (*s)++; arg = g_string_free(garg, FALSE); garg = NULL; str = g_string_sized_new(64); if (str == NULL) { goto errexit; } for (i=0;istr, &vd, &rcode, NULL); if (rcode != MATH_VALUE_NORMAL) { goto errexit; } g_string_free(str, TRUE); mod = fabs(fmod(vd, 1)); uvd = fabs(vd); if (uvd == 0) { ret = g_strdup("0"); } else if (uvd < 0.1) { ret = g_strdup_printf("%.15e", vd); } else if (uvd < 1E6 && mod < DBL_EPSILON) { ret = g_strdup_printf("%.0f", vd); } else if (uvd < 10) { ret = g_strdup_printf("%.15f", vd); } else if (uvd < 100) { ret = g_strdup_printf("%.14f", vd); } else if (uvd < 1000) { ret = g_strdup_printf("%.13f", vd); } else { ret = g_strdup_printf("%.15e", vd); } return ret; errexit: g_string_free(str, TRUE); return NULL; } static char * GRAexpandpf(char **s) { int i, len; char *format, *ret2; int quote; GString *str, *ret; *s = *s + 4; str = NULL; format = NULL; ret = g_string_sized_new(64); if (ret == NULL) { goto errexit; } str = g_string_sized_new(64); if (str == NULL) { goto errexit; } if ((*s)==NULL) goto errexit; if ((format=getitok2(s,&len," \t}"))==NULL) goto errexit; if (((*s)[0]!='\0') && ((*s)[0]!='}')) (*s)++; while (((*s)[0]==' ') || ((*s)[0]=='\t')) (*s)++; quote=FALSE; while (((*s)[0]!='\0') && (quote || ((*s)[0]!='}'))) { if (!quote && ((*s)[0]=='%') && ((*s)[1]=='{')) { ret2=GRAexpandobj(s); if (ret2) { g_string_append(str, ret2); g_free(ret2); } } else if (!quote && ((*s)[0]=='%') && ((*s)[1]=='[')) { ret2=GRAexpandmath(s); if (ret2) { g_string_append(str, ret2); g_free(ret2); } } else if (!quote && ((*s)[0]=='\\')) { quote=TRUE; (*s)++; } else { if (quote) quote=FALSE; g_string_append_c(str, (*s)[0]); (*s)++; } } if ((*s)[0]!='}') goto errexit; (*s)++; add_printf_formated_str(ret, format, str->str, &i); g_string_free(str, TRUE); g_free(format); return g_string_free(ret, FALSE); errexit: if (ret) { g_string_free(ret, TRUE); } if (str) { g_string_free(str, TRUE); } g_free(format); return NULL; } static gchar * GRAexpandtext(char *s) { int j,len; GString *str; char *snew,*s2; if (s == NULL) { return NULL; } str = g_string_sized_new(256); if (str == NULL) { return NULL; } len = strlen(s); j = 0; do { int i; i = j; while (j < len && s[j] != '\\' && s[j] != '%') { j++; } g_string_append_len(str, s + i, j - i); if (s[j] == '\\') { switch (s[j + 1]) { case 'n': g_string_append_c(str, '\n'); j += 2; break; case 'b': g_string_append_c(str, '\b'); j += 2; break; case '&': g_string_append_c(str, '\r'); j += 2; break; case 'N': g_string_append_c(str, FONT_STYLE_NORMAL); j += 2; break; case 'B': g_string_append_c(str, FONT_STYLE_BOLD); j += 2; break; case 'I': g_string_append_c(str, FONT_STYLE_ITALIC); j += 2; break; case '.': g_string_append_c(str, ' '); j += 2; break; case '-': g_string_append(str, "‐"); j += 2; break; case '\\': case '%': case '@': case '^': case '_': g_string_append_c(str, '\\'); g_string_append_c(str, s[j + 1]); j += 2; break; case 'x': if (g_ascii_isxdigit(s[j + 2]) && g_ascii_isxdigit(s[j + 3])) { if (s[j + 2] != '0' || s[j + 3] != '0') { g_string_append_c(str, '\\'); g_string_append_c(str, 'x'); g_string_append_c(str, toupper(s[j + 2])); g_string_append_c(str, toupper(s[j + 3])); } j += 4; } else { j++; } break; default: j++; } } else if ((s[j]=='%') && (s[j+1]=='{')) { s2=s+j; snew=GRAexpandobj(&s2); if (snew) { g_string_append(str, snew); g_free(snew); } j=(s2-s); } else if ((s[j]=='%') && (s[j+1]=='[')) { s2=s+j; snew=GRAexpandmath(&s2); if (snew) { g_string_append(str, snew); g_free(snew); } j=(s2-s); } else if ((s[j]=='%') && (s[j+1]=='p') && (s[j+2]=='f') && (s[j+3]=='{')) { s2=s+j; snew=GRAexpandpf(&s2); if (snew) { g_string_append(str, snew); g_free(snew); } j=(s2-s); } else if (jlen != 0) { GRAtextstyle(GC, font2, style2, size2, space2, dir); GRAouttext(GC, str->str); } if (style3 != style2) { style2 = style3; continue; } switch (ptr[0]) { case '\n': x0 += (int) (si * size * 25.4 / 72.0); y0 += (int) (cs * size * 25.4 / 72.0); if (scriptf) { scriptf = 0; g_free(font2); font2 = font3; font3 = NULL; size2 = size3; space2 = space3; } x0 += scx_max; y0 += scy_max + vspace; scdist_max = 0; scx_max = 0; scy_max = 0; scmovex = 0; scmovey = 0; if (alignlen != 0) { for (k = 1; ptr[k] != '\0' && ptr[k] != '\n' && ptr[k] != '\r'; k++); ch = ptr[k]; ptr[k] = '\0'; GRAtextextent(ptr, font2, style2, size2, space2, scriptsize, &fx0, &fy0, &fx1, &fy1, TRUE); ptr[k] = ch; x1 = x0 + (int) ( cs * (alignlen - fx1)); y1 = y0 + (int) (-si * (alignlen - fx1)); } else { x1 = x0; y1 = y0; } GRAmoveto(GC, x1, y1); ptr++; break; case '\b': GRAtextextent("h", font2, style2, size2, space2, scriptsize, &fx0, &fy0, &fx1, &fy1, TRUE); x1 = (int) (cs * (fx1 - fx0)); y1 = (int) (si * (fx1 - fx0)); GRAmoverel(GC, -x1, y1); ptr++; break; case '\r': ptr++; break; case '_': case '^': if (scriptf == 0) { font3 = g_strdup(font2); if (font3 == NULL) { goto errexit; } size3 = size2; space3 = space2; } height = size2; size2 = (int) (size2 * 1e-4 * scriptsize); space2 = (int) (space2 * 1e-4 * scriptsize); if (ptr[0] == '^') { x = (int) (-si * (height * 0.8 - size2 * 5e-5 * scriptsize) * 25.4 / 72.0); y = (int) (-cs * (height * 0.8 - size2 * 5e-5 * scriptsize) * 25.4 / 72.0); GRAmoverel(GC, x, y); scmovex += x; scmovey += y; scriptf = 1; } else { x = (int) (si * size2 * 5e-5 * scriptsize * 25.4 / 72.0); y = (int) (cs * size2 * 5e-5 * scriptsize * 25.4 / 72.0); GRAmoverel(GC, x, y); scmovex += x; scmovey += y; scriptf = 2; if (scdist_max < scmovex * si + scmovey * cs) { scdist_max = scmovex * si + scmovey * cs; scx_max = scmovex; scy_max = scmovey; } } ptr++; break; case '@': if (scriptf) { scriptf = 0; GRAmoverel(GC, -scmovex, -scmovey); g_free(font2); font2 = font3; font3 = NULL; size2 = size3; space2 = space3; } scmovex = 0; scmovey = 0; ptr++; break; case '%': if ((ptr[1]!='\0') && ( strchr("FJSPNXYCA", toupper(ptr[1]))!=NULL) && (ptr[2]=='{')) { for (i = 3; ptr[i] != '\0' && ptr[i] != '}'; i++); if (ptr[i] == '}') { tok = g_strndup(ptr + 3, i - 3); if (tok == NULL) { goto errexit; } if (tok[0] != '\0') { switch (toupper(ptr[1])) { case 'F': g_free(font2); font2 = g_strdup(tok); break; case 'J': break; case 'S': val=strtol(tok, &endptr, 10); if (endptr[0]=='\0') size2=val * 100; break; case 'P': val=strtol(tok, &endptr, 10); if (endptr[0]=='\0') space2=val * 100; break; case 'N': val=strtol(tok, &endptr, 10); if (endptr[0]=='\0') vspace=val * 100; break; case 'X': val=strtol(tok, &endptr, 10); if (endptr[0]=='\0') GRAmoverel(GC, (int) (val * 100 * 25.4 / 72.0), 0); break; case 'Y': val=strtol(tok, &endptr, 10); if (endptr[0]=='\0') GRAmoverel(GC, 0, (int) (val * 100 * 25.4 / 72.0)); break; case 'C': { char *tmp_ptr; tmp_ptr = tok; while (*tmp_ptr == '#' || g_ascii_isspace(*tmp_ptr)) { tmp_ptr++; } val = strtol(tmp_ptr, &endptr, 16); if (endptr[0]=='\0') { GRAcolor(GC, (val >> 16) & 0xff, (val >> 8) & 0xff, val & 0xff, -1); } } break; case 'A': val = strtol(tok, &endptr, 10); if (endptr[0]=='\0') { GRAcolor(GC, -1, -1, -1, val); } break; } } g_free(tok); } ptr += i + 1; } else { ptr = g_utf8_next_char(ptr); } break; } } errexit: if (str) { g_string_free(str, TRUE); } g_free(c); g_free(font2); g_free(font3); } void GRAdrawtextraw(int GC, char *s, char *font, int style, int size, int space, int dir) { GString *str; int len, j; if (font == NULL || s == NULL) { return; } str = g_string_sized_new(128); if (str == NULL) { return; } len = strlen(s); for (j = 0; j < len; j++) { if (s[j] == '\\') { g_string_append_c(str, '\\'); } g_string_append_c(str, s[j]); } if (str->len > 0) { GRAtextstyle(GC, font, style, size, space, dir); GRAouttext(GC, str->str); } g_string_free(str, TRUE); } void GRAtextextent(char *s, char *font, int style, int size, int space, int scriptsize, int *gx0, int *gy0, int *gx1, int *gy1, int raw) { gchar *c, *tok; GString *str; int w, h, d, len, scmovey, scriptf, scy_max; char *endptr; char *font2; int size2, space2, style2, vspace; char *font3; int size3, space3, style3; int i, j, k, y, val, x0, y0, ofsty; int height; int alignlen, fx0, fx1, fy0, fy1; char ch; *gx0 = *gy0 = *gx1 = *gy1 = 0; if (font == NULL || s == NULL) { return; } font2 = NULL; font3 = NULL; str = NULL; x0 = 0; y0 = 0; ofsty = 0; c = GRAexpandtext(s); if (c == NULL) { goto errexit; } if (c[0] == '\0') { goto errexit; } style3 = style2 = style; font2 = g_strdup(font); size2 = size; space2 = space; size3 = size; space3 = space; scriptf = 0; scmovey = 0; scy_max = 0; vspace = 0; len = strlen(c); if (! raw) { for (k = 0; (k < len) && (c[k] != '\n') && (c[k] != '\r'); k++); if (c[k] == '\r') { ch = c[k]; c[k] = '\0'; GRAtextextent(c, font2, style2, size2, space2, scriptsize, &fx0, &fy0, &fx1, &fy1, TRUE); c[k] = ch; alignlen = fx1; } else { alignlen = 0; } } else { alignlen = 0; /* dummy code to avoid compile warnings */ } j=0; str = g_string_sized_new(256); if (str == NULL) { goto errexit; } do { g_string_set_size(str, 0); while (j < len && strchr("\n\b\r_^@%",c[j]) == NULL) { switch (c[j]) { case '\\': if (c[j + 1]=='x' && g_ascii_isxdigit(c[j + 2]) && g_ascii_isxdigit(c[j + 3])) { gunichar wc; wc = g_ascii_xdigit_value(c[j + 2]) * 16 + g_ascii_xdigit_value(c[j + 3]); g_string_append_unichar(str, wc); j += 4; } else if (isprint(c[j + 1])) { g_string_append_c(str, c[j + 1]); j += 2; } else { j++; } break; case FONT_STYLE_NORMAL: style3 = GRA_FONT_STYLE_NORMAL; j++; break; case FONT_STYLE_BOLD: style3 |= GRA_FONT_STYLE_BOLD; j++; break; case FONT_STYLE_ITALIC: style3 |= GRA_FONT_STYLE_ITALIC; j++; break; default: g_string_append_c(str, c[j]); j++; } if (style3 != style2) { break; } } if (str->len > 0) { w = GRAstrwidth(str->str, font2, style2, size2) + nround(space2 / 72.0 * 25.4) * (str->len - 1); h = GRAcharascent(font2, style2, size2); d = GRAchardescent(font2, style2, size2); if (x0 < *gx0) *gx0 = x0; if (x0 + w < *gx0) *gx0 = x0 + w; if (x0 > *gx1) *gx1 = x0; if (x0 + w > *gx1) *gx1 = x0 + w; if (y0 - h < *gy0) *gy0 = y0 - h; if (y0 + d < *gy0) *gy0 = y0 + d; if (y0 - h > *gy1) *gy1 = y0 - h; if (y0 + d > *gy1) *gy1 = y0 + d; x0 += w; } if (style3 != style2) { style2 = style3; continue; } switch (c[j]) { case '\n': y0 += (int) (size * 25.4 / 72.0); if (scriptf) { y0 -= scmovey; scriptf = 0; g_free(font2); font2 = font3; font3 = NULL; size2 = size3; space2 = space3; } y0 += scy_max + vspace; scmovey = 0; scy_max = 0; if (! raw && alignlen) { for (k = j + 1; (k < len) && (c[k] != '\n') && (c[k] != '\r'); k++); ch = c[k]; c[k] = '\0'; GRAtextextent(c + j + 1, font2, style2, size2, space2, scriptsize, &fx0, &fy0, &fx1, &fy1, TRUE); c[k] = ch; x0 = alignlen - fx1; } else { x0 = 0; } y0 -= ofsty; ofsty = 0; j++; break; case '\b': GRAtextextent("h", font2, style2, size2, space2, scriptsize, &fx0, &fy0, &fx1, &fy1, TRUE); x0 -= (fx1 - fx0); j++; break; case '\r': j++; break; case '_': case '^': if (scriptf == 0) { font3 = g_strdup(font2); if (font3 == NULL) { goto errexit; } size3 = size2; space3 = space2; } height = size2; size2 = (int) (size2 * 1e-4 * scriptsize); space2 = (int) (space2 * 1e-4 * scriptsize); if (c[j]=='^') { y = (int) (-(height * 0.8 - size2 * 5e-5 * scriptsize) * 25.4 / 72.0); y0 += y; scmovey += y; scriptf = 1; } else { y = (int) (size2 * 5e-5 * scriptsize * 25.4 / 72.0); y0 += y; scmovey += y; scriptf = 2; if (scy_max < scmovey) { scy_max = scmovey; } } j++; break; case '@': if (scriptf) { scriptf = 0; y0 -= scmovey; g_free(font2); font2 = font3; font3 = NULL; size2 = size3; space2 = space3; } scmovey = 0; j++; break; case '%': if (c[j + 1] != '\0' && strchr("FJSPNXYCA", toupper(c[j + 1])) && c[j + 2] == '{') { for (i = j + 3; c[i] != '\0' && c[i] != '}'; i++); if (c[i] == '}') { tok = g_strndup(c + j + 3, i - j - 3); if (tok == NULL) { goto errexit; } if (tok[0] != '\0') { switch (toupper(c[j + 1])) { case 'F': g_free(font2); font2 = g_strdup(tok); break; case 'J': case 'C': case 'A': break; case 'S': val = strtol(tok, &endptr, 10); if (endptr[0] == '\0') { size2 = val * 100; } break; case 'P': val = strtol(tok, &endptr, 10); if (endptr[0] == '\0') { space2 = val * 100; } break; case 'N': val = strtol(tok, &endptr, 10); if (endptr[0] == '\0') { vspace = val * 100; } break; case 'X': val = strtol(tok, &endptr, 10); if (endptr[0] == '\0') { x0 += (int) (val * 100 * 25.4 / 72.0); } break; case 'Y': val = strtol(tok, &endptr, 10); if (endptr[0] == '\0') { y = (int) (val * 100 * 25.4 / 72.0); ofsty += y; y0 += y; } break; } } g_free(tok); } j = i + 1; } else { j++; } break; } } while (j < len); errexit: if (str) { g_string_free(str, TRUE); } g_free(c); g_free(font2); g_free(font3); } void GRAtextextentraw(char *s,char *font, int style, int size,int space,int *gx0,int *gy0,int *gx1,int *gy1) { int i, n, len, ha, hd; *gx0 = *gy0 = *gx1 = *gy1 = 0; if (s == NULL || font == NULL) return; len = strlen(s); if (len < 1) { return; } *gx1 = GRAstrwidth(s, font, style, size) + nround(space / 72.0 * 25.4) * (len - 1); for (n = 0, i = 0; i < len; i++) { if (s[i] == '\n') { n++; } } ha = GRAcharascent(font, style, size); *gy0 = - ha; hd = GRAchardescent(font, style, size); *gy1 = hd + (ha + hd) * n; } static int getintpar(char *s,int num,int cpar[]) { int i,pos1; char s2[256]; char *endptr; pos1=0; for (i=0;i= (int) sizeof(s2) - 1) return FALSE; s2[pos2]=s[pos1]; pos2++; pos1++; } s2[pos2]='\0'; cpar[i]=strtol(s2,&endptr,10); if (endptr[0]!='\0') return FALSE; } return TRUE; } int GRAinputdraw(int GC,int leftm,int topm,int rate_x,int rate_y, char code,int *cpar,char *cstr) { int i; double r, rx, ry; if (GRAClist[GC].mergezoom==0) { rx = ry = 1; } else { rx = ((double )rate_x)/GRAClist[GC].mergezoom; ry = ((double )rate_y)/GRAClist[GC].mergezoom; } r = MIN(rx, ry); switch (code) { case '%': case 'O': case 'Q': case 'F': case 'S': case 'K': case 'Z': break; case 'G': if (cpar[0] != 3 && cpar[0] != 4) return FALSE; break; case 'I': if (cpar[0] != 5) return FALSE; GRAClist[GC].mergeleft=cpar[1]; GRAClist[GC].mergetop=cpar[2]; GRAClist[GC].mergezoom=cpar[5]; code='\0'; break; case 'E': GRAClist[GC].mergeleft=0; GRAClist[GC].mergetop=0; GRAClist[GC].mergezoom=10000; code='\0'; break; case 'V': if (cpar[0] != 5) return FALSE; cpar[1]=(int )(((cpar[1]-GRAClist[GC].mergeleft)*rx)+leftm); cpar[2]=(int )(((cpar[2]-GRAClist[GC].mergetop)*ry)+topm); cpar[3]=(int )(((cpar[3]-GRAClist[GC].mergeleft)*rx)+leftm); cpar[4]=(int )(((cpar[4]-GRAClist[GC].mergetop)*ry)+topm); break; case 'A': if (cpar[0] != cpar[1] + 5) return FALSE; cpar[2]=(int )(cpar[2]*r); for (i=0;icstr) { g_free(data->cstr); } if (data->cpar) { g_free(data->cpar); } } int GRAparse(struct GRAdata *data, char *s) { int pos, num, i; char code; int *cpar; char *cstr; cpar =NULL; cstr = NULL; for (i = 0; s[i] != '\0'; i++) { if (strchr("\n\r", s[i]) != NULL) { s[i] = '\0'; break; } } pos = 0; while (s[pos] == ' ' || s[pos] == '\t') { pos++; } if (s[pos] == '\0') { return TRUE; } if (strchr("IE%VAGOMNLTCBPRDFHSK", s[pos]) == NULL) { return FALSE; } code = s[pos]; if (strchr("%FSK", code) == NULL) { if (! getintpar(s + pos + 1, 1, &num)) { return FALSE; } num++; cpar = g_malloc(sizeof(int) * num); if (cpar == NULL) { return FALSE; } if (! getintpar(s + pos + 1, num, cpar)) { goto errexit; } } else { cpar = g_malloc(sizeof(int)); if (cpar == NULL) { return FALSE; } cpar[0] = -1; cstr = g_strdup(s + pos + 1); if (cstr == NULL) { goto errexit; } } if (data) { data->code = code; data->cpar = cpar; data->cstr = cstr; data->next = NULL; } return TRUE; errexit: g_free(cpar); g_free(cstr); return FALSE; } int GRAinput(int GC,char *s,int leftm,int topm,int rate_x,int rate_y) { int r; struct GRAdata data; if (! GRAparse(&data, s)) { return FALSE; } r = GRAinputdraw(GC,leftm,topm,rate_x,rate_y,data.code,data.cpar,data.cstr); GRAdata_free(&data); return r; } static char *fonttbl[]={ "Times","TimesBold","TimesItalic","TimesBoldItalic", "Helvetica","HelveticaBold","HelveticaOblique","HelveticaBoldOblique", "Mincho","Mincho","Mincho","Mincho", "Gothic","Gothic","Gothic","Gothic", "Courier","CourierBold","CourierItalic","CourierBoldItalic", "Symbol"}; #define FONTTBL_NUM ((int) (sizeof(fonttbl) / sizeof(*fonttbl))) #define FONTTBL_SYMBOL (FONTTBL_NUM - 1) static char * get_gra_font(int i) { if (i < 0 || i >= FONTTBL_NUM) { i = 0; } return fonttbl[i]; } int GRAinputold(int GC,char *s,int leftm,int topm,int rate_x,int rate_y) { int pos,num,i; char code,code2; int cpar[50],cpar2[50]; char cstr[256],*ustr; int col,B,R,G; for (i=0;s[i]!='\0';i++) if (strchr("\n\r",s[i])!=NULL) { s[i]='\0'; break; } pos=0; while ((s[pos]==' ') || (s[pos]=='\t')) pos++; if (s[pos]=='\0') return TRUE; if (strchr("IEX%VAOMNLTCBPDFSK",s[pos])==NULL) return FALSE; code=s[pos]; if (strchr("%SK",code)==NULL) { if (!getintpar(s+pos+1,1,&num)) return FALSE; num++; if (!getintpar(s+pos+1,num,cpar)) return FALSE; } else { int j; char *po; cpar[0]=-1; if ((po=strchr(s+pos+1,','))==NULL) return FALSE; if ((po=strchr(po+1,','))==NULL) return FALSE; strcpy(cstr,po+1); j=0; for (i=0;cstr[i]!='\0';i++) { if (cstr[i]=='\\') { if ((cstr[i+1]!='n') && (cstr[i+1]!='r')) { cstr[j]=cstr[i+1]; j++; } i++; } else { cstr[j]=cstr[i]; j++; } } if ((j>0) && (cstr[j-1]==',')) j--; cstr[j]='\0'; } switch (code) { case 'X': break; case '%': case 'S': case 'Z': GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); break; case 'K': ustr = sjis_to_utf8(cstr); if (ustr) { GRAinputdraw(GC, leftm, topm, rate_x, rate_y, 'S', cpar, ustr); g_free(ustr); } break; case 'I': cpar[0]=5; cpar[5]=nround(cpar[3]/2.1); cpar[3]=21000; cpar[4]=29700; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); break; case 'E': case 'M': case 'N': case 'L': case 'T': case 'P': GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); break; case 'V': if (cpar[0]==4) { cpar[0]=5; cpar[5]=0; } GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); break; case 'A': col=cpar[3]; GRAClist[GC].oldFB=(col & 1)*256; GRAClist[GC].oldFG=(col & 2)*128; GRAClist[GC].oldFR=(col & 4)*64; code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldFR; cpar2[2]=GRAClist[GC].oldFG; cpar2[3]=GRAClist[GC].oldFB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); cpar[0]=5; cpar[3]=cpar[4]; cpar[4]=0; cpar[5]=1000; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); break; case 'O': col=cpar[1]; GRAClist[GC].oldBB=(col & 1)*256; GRAClist[GC].oldBG=(col & 2)*128; GRAClist[GC].oldBR=(col & 4)*64; break; case 'C': cpar2[7]=cpar[4]; if (cpar[0]>=5) cpar[4]=cpar[5]; else cpar[4]=cpar[3]; if (cpar[0]==7) { cpar[5]=cpar[6]*10; cpar[6]=cpar[7]*10-cpar[6]*10; if (cpar[6]<0) cpar[6]+=36000; } else { cpar[5]=0; cpar[6]=36000; } cpar[7]=cpar2[7]; cpar[0]=7; if (cpar[7]==1) { code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldBR; cpar2[2]=GRAClist[GC].oldBG; cpar2[3]=GRAClist[GC].oldBB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); } GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); if (cpar[7]==1) { code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldFR; cpar2[2]=GRAClist[GC].oldFG; cpar2[3]=GRAClist[GC].oldFB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); } break; case 'B': if (cpar[5]==1) { code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldBR; cpar2[2]=GRAClist[GC].oldBG; cpar2[3]=GRAClist[GC].oldBB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); } GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); if (cpar[5]==1) { code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldFR; cpar2[2]=GRAClist[GC].oldFG; cpar2[3]=GRAClist[GC].oldFB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); } break; case 'D': if (cpar[2]==1) { code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldBR; cpar2[2]=GRAClist[GC].oldBG; cpar2[3]=GRAClist[GC].oldBB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); } GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code,cpar,cstr); if (cpar[2]==1) { code2='G'; cpar2[0]=3; cpar2[1]=GRAClist[GC].oldFR; cpar2[2]=GRAClist[GC].oldFG; cpar2[3]=GRAClist[GC].oldFB; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); } break; case 'F': code2='F'; cpar2[0]=-1; GRAClist[GC].mergefont=cpar[1]*4+cpar[2]; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,get_gra_font(cpar[1]*4+cpar[2])); if (cpar[6] == 1) { cpar[6]=9000; } else if (cpar[6]<0) { cpar[6]=abs(cpar[6]); } code2='H'; cpar2[0]=3; cpar2[1]=cpar[3]*100; cpar2[2]=cpar[4]*100; cpar2[3]=cpar[6]; GRAClist[GC].mergept=cpar2[1]; GRAClist[GC].mergesp=cpar2[2]; GRAClist[GC].mergedir=cpar2[3]; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); col=cpar[5]; B=(col & 1)*256; G=(col & 2)*128; R=(col & 4)*64; code2='G'; cpar2[0]=3; cpar2[1]=R; cpar2[2]=G; cpar2[3]=B; GRAinputdraw(GC,leftm,topm,rate_x,rate_y,code2,cpar2,cstr); break; } return TRUE; } static int GRAlineclip(int GC,int *x0,int *y0,int *x1,int *y1) { int xl,yl,xg,yg; int minx,miny,maxx,maxy; if (GRAClist[GC].gminx>GRAClist[GC].gmaxx) { minx=GRAClist[GC].gmaxx-GRAClist[GC].gminx; maxx=0; } else { minx=0; maxx=GRAClist[GC].gmaxx-GRAClist[GC].gminx; } if (GRAClist[GC].gminy>GRAClist[GC].gmaxy) { miny=GRAClist[GC].gmaxy-GRAClist[GC].gminy; maxy=0; } else { miny=0; maxy=GRAClist[GC].gmaxy-GRAClist[GC].gminy; } if (*x0<*x1) { xl=*x0; yl=*y0; xg=*x1; yg=*y1; } else { xl=*x1; yl=*y1; xg=*x0; yg=*y0; } if ((xgmaxx)) return 1; if (xg>maxx) { xg=maxx; yg=(*y1-*y0)*(maxx-*x0)/(*x1-*x0)+*y0; } if (xlyg) { int a; a=yl; yl=yg; yg=a; a=xl; xl=xg; xg=a; } if ((ygmaxy)) return 1; if (yg>maxy) { yg=maxy; xg=(*x1-*x0)*(maxy-*y0)/(*y1-*y0)+*x0; } if (ylGRAClist[GC].gmaxx) { minx=GRAClist[GC].gmaxx-GRAClist[GC].gminx; maxx=0; } else { minx=0; maxx=GRAClist[GC].gmaxx-GRAClist[GC].gminx; } if (GRAClist[GC].gminy>GRAClist[GC].gmaxy) { miny=GRAClist[GC].gmaxy-GRAClist[GC].gminy; maxy=0; } else { miny=0; maxy=GRAClist[GC].gmaxy-GRAClist[GC].gminy; } if (*x0<*x1) { xl=*x0; xg=*x1; } else { xl=*x1; xg=*x0; } if (*y0<*y1) { yl=*y0; yg=*y1; } else { yl=*y1; yg=*y0; } if ((xgmaxx)) return 1; if ((ygmaxy)) return 1; if ((xg>maxx) && (xlmaxy) && (ylmaxx) xg=maxx; if (xlmaxy) yg=maxy; if (ylGRAClist[GC].gmaxx) { minx=GRAClist[GC].gmaxx-GRAClist[GC].gminx; maxx=0; } else { minx=0; maxx=GRAClist[GC].gmaxx-GRAClist[GC].gminx; } if (GRAClist[GC].gminy>GRAClist[GC].gmaxy) { miny=GRAClist[GC].gmaxy-GRAClist[GC].gminy; maxy=0; } else { miny=0; maxy=GRAClist[GC].gmaxy-GRAClist[GC].gminy; } if ((minx<=x) && (x<=maxx) && (miny<=y) && (y<=maxy)) return 0; else return 1; } void GRAcurvefirst(int GC,int num,int *dashlist, clipfunc clipf,transfunc transf,diffunc diff,intpfunc intpf,void *local, double x0,double y0) { int gx0,gy0; #if EXPAND_DOTTED_LINE int i; g_free(GRAClist[GC].gdashlist); GRAClist[GC].gdashlist=NULL; if (num!=0) { if ((GRAClist[GC].gdashlist=g_malloc(sizeof(int)*num))==NULL) num=0; } GRAClist[GC].gdashn=num; for (i=0;i1) d=1; GRAClist[GC].gintpf(d,c,x0,y0,&x,&y,GRAClist[GC].gflocal); GRAdashlinetod(GC,x,y); } return TRUE; } void GRAdashlinetod(int GC,double x,double y) { double x1,y1,x2,y2; int gx1,gy1,gx2,gy2; x1=GRAClist[GC].x0; y1=GRAClist[GC].y0; x2=x; y2=y; if ((GRAClist[GC].gclipf==NULL) || (GRAClist[GC].gclipf(&x1,&y1,&x2,&y2,GRAClist[GC].gflocal)==0)) { if (GRAClist[GC].gtransf==NULL) { gx1=nround(x1); gy1=nround(y1); gx2=nround(x2); gy2=nround(y2); } else { GRAClist[GC].gtransf(x1,y1,&gx1,&gy1,GRAClist[GC].gflocal); GRAClist[GC].gtransf(x2,y2,&gx2,&gy2,GRAClist[GC].gflocal); } if ((x1!=GRAClist[GC].x0) || (y1!=GRAClist[GC].y0)) GRAmoveto(GC,gx1,gy1); #if EXPAND_DOTTED_LINE if (GRAClist[GC].gdashn==0) GRAlineto(GC,gx2,gy2); else { double dx,dy,len,len2; dx=(gx2-gx1); dy=(gy2-gy1); len2=len=sqrt(dx*dx+dy*dy); while (len2 >((GRAClist[GC].gdashlist)[GRAClist[GC].gdashi]-GRAClist[GC].gdashlen)) { double dd; int gx,gy; dd=(len-len2+(GRAClist[GC].gdashlist)[GRAClist[GC].gdashi] -GRAClist[GC].gdashlen)/len; gx=gx1+nround(dx*dd); gy=gy1+nround(dy*dd); if (GRAClist[GC].gdotf) GRAlineto(GC,gx,gy); else GRAmoveto(GC,gx,gy); GRAClist[GC].gdotf=GRAClist[GC].gdotf ? FALSE : TRUE; len2-=((GRAClist[GC].gdashlist)[GRAClist[GC].gdashi] -GRAClist[GC].gdashlen); GRAClist[GC].gdashlen=0; GRAClist[GC].gdashi++; if (GRAClist[GC].gdashi>=GRAClist[GC].gdashn) { GRAClist[GC].gdashi=0; GRAClist[GC].gdotf=TRUE; } } if (GRAClist[GC].gdotf) GRAlineto(GC,gx2,gy2); GRAClist[GC].gdashlen+=len2; } #else GRAlineto(GC,gx2,gy2); #endif } GRAClist[GC].x0=x; GRAClist[GC].y0=y; } #if ! CURVE_OBJ_USE_EXPAND_BUFFER void GRAcmatchfirst(int pointx,int pointy,int err, clipfunc clipf,transfunc transf,diffunc diff,intpfunc intpf,void *local, struct cmatchtype *data,int bbox,double x0,double y0) { data->x0=x0; data->y0=y0; data->gclipf=clipf; data->gtransf=transf; data->gdiff=diff; data->gintpf=intpf; data->gflocal=local; data->err=err; data->pointx=pointx; data->pointy=pointy; data->bbox=bbox; data->minx=0; data->miny=0; data->maxx=0; data->maxy=0; data->bboxset=FALSE; data->match=FALSE; } static void GRAcmatchtod(double x,double y,struct cmatchtype *data) { double x1,y1,x2,y2; int gx1,gy1,gx2,gy2; double r,r2,r3,ip; x1=data->x0; y1=data->y0; x2=x; y2=y; if (data->bbox) { if (data->gtransf==NULL) { gx1=nround(x1); gy1=nround(y1); gx2=nround(x2); gy2=nround(y2); } else { data->gtransf(x1,y1,&gx1,&gy1,data->gflocal); data->gtransf(x2,y2,&gx2,&gy2,data->gflocal); } if (!data->bboxset || gx1minx) data->minx=gx1; if (!data->bboxset || gy1miny) data->miny=gy1; if (!data->bboxset || gx1>data->maxx) data->maxx=gx1; if (!data->bboxset || gy1>data->maxy) data->maxy=gy1; data->bboxset=TRUE; if (!data->bboxset || gx2minx) data->minx=gx2; if (!data->bboxset || gy2miny) data->miny=gy2; if (!data->bboxset || gx2>data->maxx) data->maxx=gx2; if (!data->bboxset || gy2>data->maxy) data->maxy=gy2; } else { if ((data->gclipf==NULL) || (data->gclipf(&x1,&y1,&x2,&y2,data->gflocal)==0)) { if (data->gtransf==NULL) { gx1=nround(x1); gy1=nround(y1); gx2=nround(x2); gy2=nround(y2); } else { data->gtransf(x1,y1,&gx1,&gy1,data->gflocal); data->gtransf(x2,y2,&gx2,&gy2,data->gflocal); } x1=gx1; y1=gy1; x2=gx2; y2=gy2; r2=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); r=sqrt((data->pointx-x1)*(data->pointx-x1)+(data->pointy-y1)*(data->pointy-y1)); r3=sqrt((data->pointx-x2)*(data->pointx-x2)+(data->pointy-y2)*(data->pointy-y2)); if ((r<=data->err) || (r3err)) { data->match=TRUE; } else if (r2!=0) { ip=((x2-x1)*(data->pointx-x1)+(y2-y1)*(data->pointy-y1))/r2; if ((0<=ip) && (ip<=r2)) { x2=x1+(x2-x1)*ip/r2; y2=y1+(y2-y1)*ip/r2; r=sqrt((data->pointx-x2)*(data->pointx-x2)+(data->pointy-y2)*(data->pointy-y2)); if (rerr) data->match=TRUE; } } } } data->x0=x; data->y0=y; } int GRAcmatch(double c[],double x0,double y0,struct cmatchtype *data) { double d,dx,dy,ddx,ddy,x,y; if (ninterrupt()) return FALSE; d=0; while (d<1) { double dd; data->gdiff(d,c,&dx,&dy,&ddx,&ddy,data->gflocal); if ((fabs(dx)+fabs(ddx)/3)==0) dx=1; else dx=sqrt(fabs(2/(fabs(dx)+fabs(ddx)/3))); if ((fabs(dy)+fabs(ddy)/3)==0) dy=1; else dy=sqrt(fabs(2/(fabs(dy)+fabs(ddy)/3))); dd=(dx1) d=1; data->gintpf(d,c,x0,y0,&x,&y,data->gflocal); GRAcmatchtod(x,y,data); } return TRUE; } #endif static void setbbminmax(struct GRAbbox *bbox,int x1,int y1,int x2,int y2,int lw) { if (x1>x2) { int x; x=x1; x1=x2; x2=x; } if (y1>y2) { int y; y=y1; y1=y2; y2=y; } if (lw) { x1-=bbox->linew; y1-=bbox->linew; x2+=bbox->linew; y2+=bbox->linew; } if (!bbox->clip || !((x2<0) || (y2<0) || (x1>bbox->clipsizex) || (y1>bbox->clipsizey))) { if (bbox->clip) { if (x1<0) x1=0; if (y1<0) y1=0; if (x2>bbox->clipsizex) x2=bbox->clipsizex; if (y2>bbox->clipsizey) y1=bbox->clipsizey; } x1+=bbox->offsetx; x2+=bbox->offsetx; y1+=bbox->offsety; y2+=bbox->offsety; if (!bbox->set || (x1minx)) bbox->minx=x1; if (!bbox->set || (y1miny)) bbox->miny=y1; if (!bbox->set || (x2>bbox->maxx)) bbox->maxx=x2; if (!bbox->set || (y2>bbox->maxy)) bbox->maxy=y2; if (!bbox->set) bbox->set=TRUE; } } void GRAinitbbox(struct GRAbbox *bbox) { bbox->set=FALSE; bbox->minx=0; bbox->miny=0; bbox->maxx=0; bbox->maxy=0; bbox->offsetx=0; bbox->offsety=0; bbox->posx=0; bbox->posy=0; bbox->pt=0; bbox->spc=0; bbox->dir=0; bbox->linew=0; bbox->clip=TRUE; bbox->clipsizex=21000; bbox->clipsizey=29700; bbox->fontalias=NULL; bbox->loadfont=FALSE; } void GRAendbbox(struct GRAbbox *bbox) { g_free(bbox->fontalias); } static int get_str_bbox(struct GRAbbox *bbox, char *cstr) { double x, y, csin, ccos; int w, h, d, x1, y1, x2, y2, x3, y3, x4, y4; gchar *ptr; GString *str; if (! bbox->loadfont) { return 0; } str = g_string_sized_new(256); if (str == NULL) { return 1; } csin = sin(bbox->dir / 18000.0 * MPI); ccos = cos(bbox->dir / 18000.0 * MPI); for (ptr = cstr; ptr[0]; ptr++) { if (ptr[0] == '\\') { if (ptr[1] == 'x' && g_ascii_isxdigit(ptr[2]) && g_ascii_isxdigit(ptr[3])) { gunichar wc; wc = g_ascii_xdigit_value(ptr[2]) * 16 + g_ascii_xdigit_value(ptr[3]); g_string_append_unichar(str, wc); ptr += 3; } else { ptr += 1; g_string_append_c(str, ptr[0]); } } else { g_string_append_c(str, ptr[0]); } } w = GRAstrwidth(str->str, bbox->fontalias, bbox->font_style, bbox->pt); h = GRAcharascent(bbox->fontalias, bbox->font_style, bbox->pt); d = GRAchardescent(bbox->fontalias, bbox->font_style, bbox->pt); x = 0; y = d; x1 = (int )(bbox->posx + ( x * ccos + y * csin)); y1 = (int )(bbox->posy + (-x * csin + y * ccos)); x = 0; y = -h; x2 = (int )(bbox->posx + ( x * ccos + y * csin)); y2 = (int )(bbox->posy + (-x * csin + y * ccos)); x = w; y = d; x3 = (int )(bbox->posx + ( x * ccos + y * csin)); y3 = (int )(bbox->posy + (-x * csin + y * ccos)); x = w; y = -h; x4 = (int )(bbox->posx + (int )( x * ccos + y * csin)); y4 = (int )(bbox->posy + (int )(-x * csin + y * ccos)); setbbminmax(bbox, x1, y1, x4, y4, FALSE); setbbminmax(bbox, x2, y2, x3, y3, FALSE); bbox->posx += (int )((w + bbox->spc * 25.4 / 72) * ccos); bbox->posy -= (int )((w + bbox->spc * 25.4 / 72) * csin); g_string_free(str, TRUE); return 0; } int GRAboundingbox(char code, int *cpar, char *cstr, void *local) { int lw, j; struct GRAbbox *bbox; char *tmp; bbox=local; switch (code) { case 'I': case 'X': case 'E': case '%': case 'G': case 'Z': break; case 'V': bbox->offsetx=cpar[1]; bbox->offsety=cpar[2]; bbox->posx=0; bbox->posy=0; if (cpar[5]==1) bbox->clip=TRUE; else bbox->clip=FALSE; bbox->clipsizex=cpar[3]-cpar[1]; bbox->clipsizey=cpar[4]-cpar[2]; break; case 'A': bbox->linew=cpar[2]/2; break; case 'M': bbox->posx=cpar[1]; bbox->posy=cpar[2]; break; case 'N': bbox->posx+=cpar[1]; bbox->posy+=cpar[2]; break; case 'L': setbbminmax(bbox,cpar[1],cpar[2],cpar[3],cpar[4],TRUE); break; case 'T': setbbminmax(bbox,bbox->posx,bbox->posy,cpar[1],cpar[2],TRUE); bbox->posx=cpar[1]; bbox->posy=cpar[2]; break; case 'C': lw = (cpar[7] == 0); if (cpar[7]==1) setbbminmax(bbox,cpar[1],cpar[2],cpar[1],cpar[2],lw); setbbminmax(bbox,cpar[1]+(int )(cpar[3]*cos(cpar[5]/18000.0*MPI)), cpar[2]-(int )(cpar[4]*sin(cpar[5]/18000.0*MPI)), cpar[1]+(int )(cpar[3]*cos((cpar[5]+cpar[6])/18000.0*MPI)), cpar[2]-(int )(cpar[4]*sin((cpar[5]+cpar[6])/18000.0*MPI)),lw); cpar[6]+=cpar[5]; cpar[5]-=9000; cpar[6]-=9000; if ((cpar[5]<0) && (cpar[6]>0)) setbbminmax(bbox,cpar[1],cpar[2]-cpar[4],cpar[1],cpar[2]-cpar[4],lw); cpar[5]-=9000; cpar[6]-=9000; if ((cpar[5]<0) && (cpar[6]>0)) setbbminmax(bbox,cpar[1]-cpar[3],cpar[2],cpar[1]-cpar[3],cpar[2],lw); cpar[5]-=9000; cpar[6]-=9000; if ((cpar[5]<0) && (cpar[6]>0)) setbbminmax(bbox,cpar[1],cpar[2]+cpar[4],cpar[1],cpar[2]+cpar[4],lw); cpar[5]-=9000; cpar[6]-=9000; if ((cpar[5]<0) && (cpar[6]>0)) setbbminmax(bbox,cpar[1]+cpar[3],cpar[2],cpar[1]+cpar[3],cpar[2],lw); break; case 'B': setbbminmax(bbox,cpar[1],cpar[2],cpar[3],cpar[4], cpar[5] == 0); break; case 'P': setbbminmax(bbox,cpar[1],cpar[2],cpar[1],cpar[2],FALSE); break; case 'R': for (j = 0; j < cpar[1] - 1; j++) setbbminmax(bbox, cpar[j * 2 + 2], cpar[j * 2 + 3], cpar[j * 2 + 4], cpar[j * 2 + 5], TRUE); break; case 'D': lw = (cpar[2] == 0); for (j = 0; j < cpar[1] - 1; j++) setbbminmax(bbox, cpar[j * 2 + 3], cpar[j * 2 + 4], cpar[j * 2 + 5], cpar[j * 2 + 6],lw); break; case 'F': g_free(bbox->fontalias); if ((bbox->fontalias=g_malloc(strlen(cstr)+1))!=NULL) strcpy(bbox->fontalias,cstr); break; case 'H': bbox->pt=cpar[1]; bbox->spc=cpar[2]; bbox->dir=cpar[3]; if (cpar[0] > 3) { bbox->font_style = cpar[4]; } bbox->loadfont=TRUE; break; case 'S': get_str_bbox(bbox, cstr); break; case 'K': tmp = sjis_to_utf8(cstr); if (tmp) { get_str_bbox(bbox, tmp); g_free(tmp); } break; } return 0; } ngraph-gtk-6.09.05/src/nstring.c0000644000175000017500000003311414001533616013276 00000000000000/* * $Id: nstring.c,v 1.10 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include "object.h" #include "nstring.h" #include "math/math_equation.h" #define NSTRLEN 0x400 static int Decimalsign = '.', SystemDecimalsign = '.'; char *decimalsign_char[] = { N_("locale"), N_("period"), N_("comma"), NULL }; void set_system_decimalsign(const char *decimalsign) { if (decimalsign && isprint(decimalsign[0])) { SystemDecimalsign = decimalsign[0]; } } int get_decimalsign(void) { return Decimalsign; } enum GRA_DECIMALSIGN_TYPE get_gra_decimalsign_type(int decimalsign) { enum GRA_DECIMALSIGN_TYPE gra_decimalsign = GRA_DECIMALSIGN_TYPE_PERIOD; switch (decimalsign) { case DECIMALSIGN_TYPE_LOCALE: switch (SystemDecimalsign) { case ',': gra_decimalsign = GRA_DECIMALSIGN_TYPE_COMMA; break; default: gra_decimalsign = GRA_DECIMALSIGN_TYPE_PERIOD; break; } break; case DECIMALSIGN_TYPE_COMMA: gra_decimalsign = GRA_DECIMALSIGN_TYPE_COMMA; break; case DECIMALSIGN_TYPE_PERIOD: default: gra_decimalsign = GRA_DECIMALSIGN_TYPE_PERIOD; break; } return gra_decimalsign; } int set_decimalsign(enum DECIMALSIGN_TYPE decimalsign) { switch (decimalsign) { case DECIMALSIGN_TYPE_LOCALE: Decimalsign = SystemDecimalsign; break; case DECIMALSIGN_TYPE_PERIOD: Decimalsign = '.'; break; case DECIMALSIGN_TYPE_COMMA: Decimalsign = ','; break; } return Decimalsign; } char * nstrnew(void) { char *po; if ((po=g_malloc(NSTRLEN))==NULL) return NULL; po[0]='\0'; return po; } char * nstrccat(char *po,char ch) { size_t len,num; char *po2; if (po==NULL) return NULL; len=strlen(po); num=len/NSTRLEN; if (len%NSTRLEN==NSTRLEN-1) { if ((po2=g_realloc(po,NSTRLEN*(num+2)))==NULL) { g_free(po); return NULL; } po=po2; } po[len]=ch; po[len+1]='\0'; return po; } char * nstraddchar(char *po, int len, char ch) { // if (po == NULL) return NULL; if (len >= NSTRLEN - 1 && ! ((len + 1) & (NSTRLEN - 1))) { char *po2; po2 = g_realloc(po, NSTRLEN * (len / NSTRLEN + 2)); if (po2 == NULL) { g_free(po); return NULL; } po = po2; } po[len] = ch; // po[len + 1] = '\0'; return po; } char * nstrcat(char *po,char *s) { size_t i, len; /* modified */ if (po == NULL) return NULL; if (s == NULL) return po; len = strlen(po); for (i = 0; s[i] != '\0'; i++) { po = nstraddchar(po, len + i, s[i]); if (po == NULL) { return NULL; } } po[len + i] = '\0'; /* nstraddchar() is not terminate string */ return po; } #ifdef COMPILE_UNUSED_FUNCTIONS char * nstrncat(char *po,char *s,size_t n) { size_t i; if (po==NULL) return NULL; if (s==NULL) return po; for (i=0; (i < n) && (s[i] != '\0'); i++) if ((po=nstrccat(po,s[i]))==NULL) return NULL; return po; } #endif int strcmp0(const char *s1, const char *s2) { const char *s3,*s4; if ((s1==NULL) || (s2==NULL)) return 1; s3=s1; s4=s2; while (s3[0]==s4[0]) { if ((s3[0]=='\0') && (s4[0]=='\0')) return 0; s3++; s4++; } return 1; } int strcmp2(char *s1,char *s2) { int len1,len2,len,c; len1=strlen(s1); len2=strlen(s2); if (len1len2) return 1; else return 0; } else return c; } static int wildmatch2(const char *pat, const char *s,int flags) { const char *spo,*patpo,*po; if ((s==NULL) || (pat==NULL)) return 0; spo=s; patpo=pat; while (1) { if ((*spo=='\0') && (*patpo=='\0')) return 1; else if (*patpo=='\0') return 0; else if ((flags & WILD_PATHNAME) && (*spo=='/')) { if (*patpo!='/') return 0; patpo++; spo++; } else if (*patpo=='?') { if (*spo=='\0') return 0; patpo++; spo++; } else if (*patpo=='*') { patpo++; while (1) { if (wildmatch2(patpo,spo,flags)) return 1; if (*spo=='\0') return 0; spo++; } } else if (*patpo=='[') { for(po=patpo+1;(*po!='\0') && (*po!=']');po++); if (*po=='\0') { if (*patpo==*spo) { patpo++; spo++; } else return 0; } else { patpo++; while (patpo!=po) { if ((*(patpo+1)=='-') && (*(patpo+2)!=']')) { if ((*patpo<=*spo) && (*spo<=*(patpo+2))) { patpo=po+1; spo++; break; } else patpo+=3; } else { if (*patpo==*spo) { patpo=po+1; spo++; break; } else patpo++; } } } } else if (*patpo==*spo) { patpo++; spo++; } else return 0; } } int wildmatch(const char *pat, const char *s,int flags) { if ((s==NULL) || (pat==NULL)) return 0; if (flags & WILD_PERIOD) { /* "." and ".." should not match "*" */ if (s[0]=='.') { if (pat[0]=='.') return wildmatch2(pat+1,s+1,flags); else return 0; } else return wildmatch2(pat,s,flags); } else return wildmatch2(pat,s,flags); } char * getitok(char **s, int *len, const char *ifs) { char *po,*spo; int i; if (*s == NULL) return NULL; po = *s; for (i = 0; (po[i]!='\0') && (strchr(ifs, po[i]) != NULL); i++); if (po[i]=='\0') { *len=0; return NULL; } spo=po+i; for (;(po[i]!='\0') && (strchr(ifs,po[i])==NULL);i++); *s+=i; *len=*s-spo; return spo; } char * getitok2(char **s, int *len, const char *ifs) { char *po,*s2; if ((s2 = getitok(s, len, ifs))==NULL) return NULL; if ((po=g_malloc(*len+1))==NULL) { *len=-1; return NULL; } strncpy(po,s2,*len); po[*len]='\0'; return po; } static char * get_printf_format_str(const char *str, int *len, int *pow) { int n; GString *format; if (pow) { *pow = FALSE; } if (len) { *len = 0; } n = 0; if (str[n] != '%') { return NULL; } format = g_string_new(""); if (format == NULL) { return NULL; } g_string_append_c(format, str[n]); n++; while (strchr("#0- +^", str[n])) { if (str[n] != '^') { g_string_append_c(format, str[n]); } else if (pow) { *pow = TRUE; } n++; } for (; isdigit(str[n]); n++) { g_string_append_c(format, str[n]); } if (str[n] == '.') { g_string_append_c(format, str[n]); n++; for (; isdigit(str[n]); n++) { g_string_append_c(format, str[n]); } } if (str[n] == 'l') { g_string_append_c(format, str[n]); n++; } if (str[n] == 'l') { g_string_append_c(format, str[n]); n++; } if (strchr("diouxXeEfFgGcs", str[n]) == NULL) { g_string_free(format, TRUE); return NULL; } g_string_append_c(format, str[n]); if (len) { *len = n; } return g_string_free(format, FALSE); } static char * str_to_pow(const char *str) { int n, i, len, pow; GString *pow_str; if (str == NULL) { return NULL; } n = -1; len = strlen(str); for (i = 0; i < len; i++) { if (str[i] == 'E' || str[i] == 'e') { n = i; break; } } if (n < 0) { return NULL; } pow_str = g_string_new(""); if (pow_str == NULL) { return NULL; } pow = atoi(str + n + 1); g_string_append_len(pow_str, str, n); if (pow) { g_string_append_printf(pow_str, "×10^%d@", pow); } return g_string_free(pow_str, FALSE); } static void replace_period(char *buf, int decimalsign) { char *ptr; if (buf == NULL) { return; } ptr = strchr(buf, '.'); if (ptr) { *ptr = decimalsign; } } void n_gstr_printf_double(GString *num, const char *format, double val) { int decimalsign; decimalsign = get_decimalsign(); g_string_printf(num, format, val); switch (decimalsign) { case ',': replace_period(num->str, decimalsign); break; } } void n_gstr_append_printf_double(GString *num, const char *format, double val) { char *str; str = n_strdup_printf_double(format, val); if (str == NULL) { return; } g_string_append(num, str); g_free(str); } char * n_strdup_printf_double(const char *format, double val) { int decimalsign; char *str; decimalsign = get_decimalsign(); str = g_strdup_printf(format, val); if (str == NULL) { return NULL; } switch (decimalsign) { case ',': replace_period(str, decimalsign); break; } return str; } int add_printf_formated_str(GString *str, const char *format, const char *arg, int *len) { int i, formated, pow; char *format2, *buf, *endptr; double vd; formated = FALSE; format2 = get_printf_format_str(format, &i, &pow); if (len) { *len = i; } if (format2 == NULL) { return formated; } buf = NULL; switch (format[i]) { case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': if (i > 2 && strncmp(format2 + i - 2, "ll", 2) == 0) { long long int vll; vll = 0; if (arg) { vll = strtod(arg, &endptr); } buf = g_strdup_printf(format2, vll); } else { int vi; vi = 0; if (arg) { vi = strtod(arg, &endptr); } buf = g_strdup_printf(format2, vi); } formated = TRUE; break; case 'e': case 'E': case 'f': case 'F': case 'g': case 'G': if (i > 2 && strncmp(format2 + i - 2, "ll", 2) == 0) { break; } vd = 0.0; if (arg) { vd = strtod(arg,&endptr); } buf = n_strdup_printf_double(format2, vd); if (pow) { char *new_buf; new_buf = str_to_pow(buf); if (new_buf) { g_free(buf); buf = new_buf; } } formated = TRUE; break; case 's': if (i > 1 && format2[i - 1] == 'l') { break; } if (arg) { buf = g_strdup_printf(format2, arg); } formated = TRUE; break; case 'c': if (i > 1 && format2[i - 1] == 'l') { break; } if (arg) { buf = g_strdup_printf(format2, arg[0]); } formated = TRUE; break; } if (buf) { g_string_append(str, buf); g_free(buf); } g_free(format2); return formated; } static int check_value_type(GString *str, MathValue *mval) { const char *s; s = math_special_value_to_string(mval); if (s == NULL) { return 0; } g_string_append(str, s); return 1; } int add_printf_formated_double(GString *str, const char *format, MathValue *mval, int *len) { int i, formated, pow; char *format2, *buf, *tmp; int vi; double val; formated = FALSE; format2 = get_printf_format_str(format, &i, &pow); if (len) { *len = i; } if (format2 == NULL) { return formated; } if (check_value_type(str, mval)) { return TRUE; } val = mval->val; buf = NULL; switch (format[i]) { case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': if (i > 2 && strncmp(format2 + i - 2, "ll", 2) == 0) { long long int vll; vll = val; buf = g_strdup_printf(format2, vll); }else { vi = val; buf = g_strdup_printf(format2, vi); } formated = TRUE; break; case 'e': case 'E': case 'f': case 'F': case 'g': case 'G': if (i > 2 && strncmp(format2 + i - 2, "ll", 2) == 0) { break; } buf = n_strdup_printf_double(format2, val); if (pow) { char *new_buf; new_buf = str_to_pow(buf); if (new_buf) { g_free(buf); buf = new_buf; } } formated = TRUE; break; case 's': if (i > 1 && format2[i - 1] == 'l') { break; } tmp = n_strdup_printf_double("%g", val); if (tmp) { buf = g_strdup_printf(format2, tmp); g_free(tmp); } break; case 'c': if (i > 1 && format2[i - 1] == 'l') { break; } vi = val; buf = g_strdup_printf(format2, vi); formated = TRUE; break; } if (buf) { g_string_append(str, buf); g_free(buf); } g_free(format2); return formated; } #ifdef COMPILE_UNUSED_FUNCTIONS char * getitok3(char **s,int *len,char *ifs) { char *po,*spo; int i,quote; if (*s==NULL) return NULL; quote=FALSE; po=*s; for (i=0;(po[i]!='\0') && (po[i]!='"') && (strchr(ifs,po[i])!=NULL);i++); if (po[i]=='\0') { *len=0; return NULL; } if (po[i]=='"') { quote=TRUE; i++; } spo=po+i; if (quote) { for (;(po[i]!='\0') && (po[i]!='"');i++); *s+=i; *len=*s-spo; if (po[i]=='"') (*s)++; } else { for (;(po[i]!='\0') && (strchr(ifs,po[i])==NULL);i++); *s+=i; *len=*s-spo; } return spo; } char * getitok4(char **s,int *len,char *ifs) { char *po,*s2; if ((s2=getitok3(s,len,ifs))==NULL) return NULL; if ((po=g_malloc(*len+1))==NULL) { *len=-1; return NULL; } strncpy(po,s2,*len); po[*len]='\0'; return po; } #endif /* COMPILE_UNUSED_FUNCTIONS */ char * n_locale_to_utf8(const char *s) { char *ustr; if (s == NULL) { return NULL; } if (g_utf8_validate(s, -1, NULL)) { ustr = g_strdup(s); } else { ustr = g_locale_to_utf8(s, -1, NULL, NULL, NULL); } return ustr; } ngraph-gtk-6.09.05/src/strconv.h0000644000175000017500000000026013717453502013321 00000000000000/* * $Id: strconv.h,v 1.1 2009-11-16 09:13:04 hito Exp $ */ char *sjis_to_utf8(const char *src); char *utf8_to_sjis(const char *src); gchar *ascii2greece(const gchar *src); ngraph-gtk-6.09.05/src/oiarray.h0000644000175000017500000000144213070106167013266 00000000000000#ifndef OIARRAY_HEADER #define OIARRAY_HEADER #include "math/math_equation.h" struct narray *oarray_get_array(struct objlist *obj, N_VALUE *inst, unsigned int size); MathEquation *oarray_create_math(struct objlist *obj, const char *fild, const char *eqn); int oarray_get_index(struct narray *array, int i); int oarray_seq(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int oarray_reverse_seq(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int oarray_reverse(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int oarray_slice(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int oarray_num(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); #endif /* OIARRAY_HEADER */ ngraph-gtk-6.09.05/src/mathfn.h0000644000175000017500000000271414142161773013105 00000000000000/* * $Id: mathfn.h,v 1.6 2009-12-04 16:11:20 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "ofit.h" #define MPI 3.1415926535897932385 #define MEXP1 2.71828182845905 #define MEULER 0.57721566490153286 #define N_EPSILON 1E-12 typedef double vector[FIT_DIMENSION_MAX + 1]; typedef vector matrix[FIT_DIMENSION_MAX + 1]; double cutdown(double x); double nraise(double x); double frand(double a); int nround(double x); int matsolv(int dim,matrix a,vector b,vector x); void HSB2RGB(double h,double s,double b,int *R,int *G,int *B); int bsearch_int(int *ary, int n, int val, int *idx); int compare_double(double x, double y); double distance(double x1, double y1); ngraph-gtk-6.09.05/src/oaxis.c0000644000175000017500000030744114142161773012753 00000000000000/* --*-coding:utf-8-*-- */ #include "common.h" #include #include #include #include #include #include #include #include "nhash.h" #include "ntime.h" #include "ioutil.h" #include "object.h" #include "mathfn.h" #include "spline.h" #include "gra.h" #include "oroot.h" #include "odraw.h" #include "oaxis.h" #include "olegend.h" #include "axis.h" #include "nstring.h" #include "nconfig.h" #include "shell.h" #include "math/math_equation.h" #define NAME "axis" #define PARENT "draw" #define OVERSION "1.00.00" #define AXIS_HISTORY_NUM 30 #define INST_ARRAY_NUM 4 #define ERRAXISTYPE 100 #define ERRAXISHEAD 101 #define ERRAXISGAUGE 102 #define ERRAXISSPL 103 #define ERRMINMAX 104 #define ERRFORMAT 105 #define ERRGROUPING 106 #define ERRNUMMATH 107 static char *axiserrorlist[]={ "illegal axis type.", "illegal arrow/wave type.", "illegal gauge type.", "error: spline interpolation.", "illegal value of min/max/inc.", "illegal format.", "illegal grouping type.", "error in math:", }; #define ERRNUM (sizeof(axiserrorlist) / sizeof(*axiserrorlist)) enum AXIS_TYPE { AXIS_TYPE_SINGLE, AXIS_TYPE_FRAME, AXIS_TYPE_SECTION, AXIS_TYPE_CROSS, }; char *axistypechar[]={ N_("linear"), N_("log"), N_("inverse"), N_("MJD"), NULL }; static char *axisgaugechar[]={ N_("none"), N_("both"), N_("left"), N_("right"), NULL }; enum AXIS_GAUGE { AXIS_GAUGE_NONE, AXIS_GAUGE_BOTH, AXIS_GAUGE_LEFT, AXIS_GAUGE_RIGHT, }; static char *axisnumchar[]={ N_("none"), N_("left"), N_("right"), NULL }; enum AXIS_NUM_POS { AXIS_NUM_POS_NONE, AXIS_NUM_POS_LEFT, AXIS_NUM_POS_RIGHT, }; static char *anumalignchar[]={ N_("center"), N_("left"), N_("right"), N_("point"), NULL }; enum AXIS_NUM_NO_ZERO { AXIS_NUM_NO_ZERO_REGULAR, AXIS_NUM_NO_ZERO_NO_ZERO, AXIS_NUM_NO_ZERO_NO_FLOATING_POINT, AXIS_NUM_NO_ZERO_FALSE, AXIS_NUM_NO_ZERO_TRUE, }; static char *anumnozero[]={ N_("regular"), N_("no_zero"), N_("no_floating_point"), "\0false", /* for backward compatibility */ "\0true", /* for backward compatibility */ NULL, }; enum AXIS_NUM_ALIGN { AXIS_NUM_ALIGN_CENTER, AXIS_NUM_ALIGN_LEFT, AXIS_NUM_ALIGN_RIGHT, AXIS_NUM_ALIGN_POINT, }; static char *anumdirchar[]={ N_("horizontal"), N_("parallel1"), N_("parallel2"), N_("normal1"), N_("normal2"), N_("oblique1"), N_("oblique2"), "\0normal", /* for backward compatibility */ "\0parallel", /* for backward compatibility */ NULL }; static struct obj_config AxisConfig[] = { {"R", OBJ_CONFIG_TYPE_NUMERIC}, {"G", OBJ_CONFIG_TYPE_NUMERIC}, {"B", OBJ_CONFIG_TYPE_NUMERIC}, {"A", OBJ_CONFIG_TYPE_NUMERIC}, {"type", OBJ_CONFIG_TYPE_NUMERIC}, {"direction", OBJ_CONFIG_TYPE_NUMERIC}, {"baseline", OBJ_CONFIG_TYPE_NUMERIC}, {"width", OBJ_CONFIG_TYPE_NUMERIC}, {"arrow", OBJ_CONFIG_TYPE_NUMERIC}, {"arrow_length", OBJ_CONFIG_TYPE_NUMERIC}, {"wave", OBJ_CONFIG_TYPE_NUMERIC}, {"wave_length", OBJ_CONFIG_TYPE_NUMERIC}, {"wave_width", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_length1", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_width1", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_length2", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_width2", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_length3", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_width3", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_R", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_G", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_B", OBJ_CONFIG_TYPE_NUMERIC}, {"gauge_A", OBJ_CONFIG_TYPE_NUMERIC}, {"num", OBJ_CONFIG_TYPE_NUMERIC}, {"num_auto_norm", OBJ_CONFIG_TYPE_NUMERIC}, {"num_log_pow", OBJ_CONFIG_TYPE_NUMERIC}, {"num_pt", OBJ_CONFIG_TYPE_NUMERIC}, {"num_space", OBJ_CONFIG_TYPE_NUMERIC}, {"num_script_size", OBJ_CONFIG_TYPE_NUMERIC}, {"num_align", OBJ_CONFIG_TYPE_NUMERIC}, {"num_no_zero", OBJ_CONFIG_TYPE_NUMERIC}, {"num_direction", OBJ_CONFIG_TYPE_NUMERIC}, {"num_shift_p", OBJ_CONFIG_TYPE_NUMERIC}, {"num_shift_n", OBJ_CONFIG_TYPE_NUMERIC}, {"num_R", OBJ_CONFIG_TYPE_NUMERIC}, {"num_G", OBJ_CONFIG_TYPE_NUMERIC}, {"num_B", OBJ_CONFIG_TYPE_NUMERIC}, {"num_A", OBJ_CONFIG_TYPE_NUMERIC}, {"num_head", OBJ_CONFIG_TYPE_STRING}, {"num_format", OBJ_CONFIG_TYPE_STRING}, {"num_tail", OBJ_CONFIG_TYPE_STRING}, {"num_font", OBJ_CONFIG_TYPE_STRING}, {"num_font_style", OBJ_CONFIG_TYPE_NUMERIC}, {"style", OBJ_CONFIG_TYPE_STYLE}, {"gauge_style", OBJ_CONFIG_TYPE_STYLE}, }; #define AXIS_CONFIG_TITLE "[axis]" static NHASH AxisConfigHash = NULL; static int get_axis_group_type(struct objlist *obj, N_VALUE *inst, N_VALUE **inst_array, int check_all); static N_VALUE * check_group(struct objlist *obj, char type, N_VALUE *inst, int num) { int n; char *group, *endptr; while (inst) { _getobj(obj, "group", inst, &group); if (group && group[0] == type) { n = strtol(group + 2, &endptr, 10); if (num == n) break; } inst = inst[obj->nextp].inst; } return inst; } static int axisuniqgroup(struct objlist *obj,char type) { int num; N_VALUE *inst; num = 0; do { num++; inst = check_group(obj, type, obj->root, num); if (inst == NULL) { inst = check_group(obj, type, obj->root2, num); } } while (inst); return num; } static int axisloadconfig(struct objlist *obj,N_VALUE *inst,char *conf) { return obj_load_config(obj, inst, conf, AxisConfigHash); } static int axisinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int width; int alen,awid,wlen,wwid,alpha; int bline; int len1,wid1,len2,wid2,len3,wid3; int pt,sx,sy,logpow,scriptsize; int autonorm,num,gnum,margin; char *font,*format,*group,*name; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; width=DEFAULT_LINE_WIDTH; alen=72426; awid=60000; wlen=300; wwid=DEFAULT_LINE_WIDTH; len1=100; wid1=DEFAULT_LINE_WIDTH; len2=200; wid2=DEFAULT_LINE_WIDTH; len3=300; wid3=DEFAULT_LINE_WIDTH; bline=TRUE; pt=DEFAULT_FONT_PT; sx=0; sy=100; autonorm=5; logpow=TRUE; scriptsize=DEFAULT_SCRIPT_SIZE; num=-1; alpha=255; margin=500; if (_putobj(obj,"baseline",inst,&bline)) return 1; if (_putobj(obj,"width",inst,&width)) return 1; if (_putobj(obj,"auto_scale_margin",inst,&margin)) return 1; if (_putobj(obj,"arrow_length",inst,&alen)) return 1; if (_putobj(obj,"arrow_width",inst,&awid)) return 1; if (_putobj(obj,"wave_length",inst,&wlen)) return 1; if (_putobj(obj,"wave_width",inst,&wwid)) return 1; if (_putobj(obj,"gauge_length1",inst,&len1)) return 1; if (_putobj(obj,"gauge_width1",inst,&wid1)) return 1; if (_putobj(obj,"gauge_length2",inst,&len2)) return 1; if (_putobj(obj,"gauge_width2",inst,&wid2)) return 1; if (_putobj(obj,"gauge_length3",inst,&len3)) return 1; if (_putobj(obj,"gauge_width3",inst,&wid3)) return 1; if (_putobj(obj,"gauge_A",inst,&alpha)) return 1; if (_putobj(obj,"num_pt",inst,&pt)) return 1; if (_putobj(obj,"num_script_size",inst,&scriptsize)) return 1; if (_putobj(obj,"num_auto_norm",inst,&autonorm)) return 1; if (_putobj(obj,"num_shift_p",inst,&sx)) return 1; if (_putobj(obj,"num_shift_n",inst,&sy)) return 1; if (_putobj(obj,"num_log_pow",inst,&logpow)) return 1; if (_putobj(obj,"num_num",inst,&num)) return 1; if (_putobj(obj,"num_A",inst,&alpha)) return 1; font = group = name = NULL; format = g_strdup("%g"); if (format == NULL) goto errexit; if (_putobj(obj,"num_format",inst,format)) goto errexit; font = g_strdup(fontchar[0]); if (font == NULL) goto errexit; if (_putobj(obj,"num_font",inst,font)) goto errexit; gnum = axisuniqgroup(obj,'a'); group = g_strdup_printf("a_%d", gnum); if (group == NULL) goto errexit; if (_putobj(obj,"group",inst,group)) goto errexit; name = g_strdup_printf("a_%d",gnum); if (name == NULL) goto errexit; if (_putobj(obj,"name",inst,name)) goto errexit; axisloadconfig(obj,inst,AXIS_CONFIG_TITLE); return 0; errexit: g_free(format); g_free(font); g_free(group); g_free(name); return 1; } static int axisdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { N_VALUE *inst_array[INST_ARRAY_NUM]; int i; get_axis_group_type(obj, inst, inst_array, TRUE); for (i = 0; i < INST_ARRAY_NUM; i++) { if (inst_array[i] && inst_array[i] != inst) { char *group, *group2; int gnum; gnum = axisuniqgroup(obj,'a'); group = g_strdup_printf("a_%d", gnum); if (group == NULL) break; _getobj(obj, "group", inst_array[i], &group2); g_free(group2); if (_putobj(obj, "group", inst_array[i], group)) break; } } if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int axisput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *field; char *format; int sharp,minus,plus; int i,j; field=argv[1]; if (strcmp(field,"arrow_length")==0) { if (*(int *)(argv[2])<10000) *(int *)(argv[2])=10000; else if (*(int *)(argv[2])>200000) *(int *)(argv[2])=200000; } else if (strcmp(field,"arrow_width")==0) { if (*(int *)(argv[2])<10000) *(int *)(argv[2])=10000; else if (*(int *)(argv[2])>200000) *(int *)(argv[2])=200000; } else if ((strcmp(field,"wave_length")==0) || (strcmp(field,"wave_width"))==0) { if (*(int *)(argv[2])<1) *(int *)(argv[2])=1; } else if (strcmp(field,"num_pt")==0) { if (*(int *)(argv[2])100000) *(int *)(argv[2])=100000; } else if (strcmp(field,"num_format")==0) { format=(char *)(argv[2]); if (format==NULL) { error(obj,ERRFORMAT); return 1; } if (format[0]!='%') { error(obj,ERRFORMAT); return 1; } sharp=minus=plus=FALSE; for (i=1;(format[i]!='\0') && (strchr("#-+",format[i])!=NULL);i++) { if (format[i]=='#') { if (sharp) { error(obj,ERRFORMAT); return 1; } else sharp=TRUE; } if (format[i]=='-') { if (minus) { error(obj,ERRFORMAT); return 1; } else minus=TRUE; } if (format[i]=='+') { if (plus) { error(obj,ERRFORMAT); return 1; } else plus=TRUE; } } if (format[i]=='0') i++; for (j=i;isdigit(format[i]);i++) ; if (j-i>2) { error(obj,ERRFORMAT); return 1; } if (format[i]=='.') { i++; for (j=i;isdigit(format[i]);i++) ; if ((j-i>2) || (j==i)) { error(obj,ERRFORMAT); return 1; } } if (format[i]=='\0') { error(obj,ERRFORMAT); return 1; } if (strchr("efgEG",format[i])==NULL) { error(obj,ERRFORMAT); return 1; } if (format[i+1]!='\0') { error(obj,ERRFORMAT); return 1; } } else if (strcmp(field,"num_num")==0) { if (*(int *)(argv[2])<-1) *(int *)(argv[2])=-1; } return 0; } static int axisgeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { N_VALUE *inst_array[INST_ARRAY_NUM]; int i; get_axis_group_type(obj, inst, inst_array, TRUE); for (i = 0; i < INST_ARRAY_NUM; i++) { if (inst_array[i]) { if (clear_bbox(obj, inst_array[i])) { return 1; } } } return 0; } static int axisdirection(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int dir; dir = * (int *) argv[2]; dir %= 36000; if (dir < 0) dir += 36000; * (int *) argv[2] = dir; return axisgeometry(obj, inst, rval, argc, argv); } static void axis_get_box(struct objlist *obj,N_VALUE *inst, int *pos) { int minx, miny, maxx, maxy; int x0, y0, x1, y1, length, direction; double dir; _getobj(obj, "x", inst, &x0); _getobj(obj, "y", inst, &y0); _getobj(obj, "length", inst, &length); _getobj(obj, "direction", inst, &direction); dir = direction / 18000.0 * MPI; x1 = x0 + nround(length * cos(dir)); y1 = y0 - nround(length * sin(dir)); maxx = minx = x0; maxy = miny = y0; if (x1 < minx) minx = x1; if (x1 > maxx) maxx = x1; if (y1 < miny) miny = y1; if (y1 > maxy) maxy = y1; pos[0] = minx; pos[1] = miny; pos[2] = maxx; pos[3] = maxy; pos[4] = x0; pos[5] = y0; pos[6] = x1; pos[7] = y1; #define POS_ARRAY_SIZE 8 } static int axisbbox2(struct objlist *obj, N_VALUE *inst, struct narray **rval) { int i, pos[POS_ARRAY_SIZE]; struct narray *array; if (inst == NULL) return 1; array = *rval; if (arraynum(array) != 0) return 0; if (array == NULL && (array = arraynew(sizeof(int))) == NULL) return 1; axis_get_box(obj, inst, pos); for (i = 0; i < POS_ARRAY_SIZE; i++) { arrayadd(array, pos + i); } if (arraynum(array) == 0) { arrayfree(array); return 1; } *rval = array; return 0; } static int check_direction(struct objlist *obj, int type, N_VALUE **inst_array) { int i, n, direction, normal_dir[] = {0, 9000, 0, 9000}; switch (type) { case 'f': case 's': for (i = 0; i < 2; i++) { int p1, p2, len1, len2; char *field; _getobj(obj, "length", inst_array[0 + i], &len1); _getobj(obj, "length", inst_array[2 + i], &len2); if ((len1 > 0 && len2 < 0) || (len1 < 0 && len2 > 0)) return 1; field = (i == 0) ? "x" : "y"; _getobj(obj, field, inst_array[1 - i], &p1); _getobj(obj, field, inst_array[3 - i], &p2); switch (i) { case 0: if ((len1 < 0 && p2 > p1) || (len1 > 0 && p2 < p1)) return 1; break; case 1: if ((len1 < 0 && p2 < p1) || (len1 > 0 && p2 > p1)) return 1; break; } } n = 4; break; case 'c': n = 2; break; case 'a': default: return 1; } for (i = 0; i < n; i++) { _getobj(obj, "direction", inst_array[i], &direction); if (direction != normal_dir[i]) { return 1; } } return 0; } #define FIND_X 1 #define FIND_Y 2 #define FIND_U 4 #define FIND_R 8 #define FIND_FRAME (FIND_X | FIND_Y | FIND_U | FIND_R) #define FIND_CROSS (FIND_X | FIND_Y) #define CHECK_FRAME(a) ((a & FIND_FRAME) == FIND_FRAME) #define CHECK_CROSS(a) ((a & FIND_CROSS) == FIND_CROSS) static int get_axis_group_type(struct objlist *obj, N_VALUE *inst, N_VALUE **inst_array, int check_all) { char *group, *group2; N_VALUE *inst2; char type; int find_axis, len, id, i; inst_array[0] = inst; for (i = 1; i < INST_ARRAY_NUM; i++) { inst_array[i] = NULL; } _getobj(obj, "group", inst, &group); if (group == NULL || group[0] == 'a') return 'a'; len = strlen(group); if (len < 3) return 'a'; if (check_all) { id = chkobjlastinst(obj); } else { _getobj(obj, "id", inst, &id); } find_axis = 0; type = group[0]; for (i = 0; i <= id; i++) { inst2 = chkobjinst(obj, i); _getobj(obj, "group", inst2, &group2); if (group2 == NULL || group2[0] != type) continue; len = strlen(group2); if (len < 3) continue; if (strcmp(group + 2, group2 + 2)) continue; switch (group2[1]) { case 'X': find_axis |= FIND_X; inst_array[0] = inst2; break; case 'Y': find_axis |= FIND_Y; inst_array[1] = inst2; break; case 'U': find_axis |= FIND_U; inst_array[2] = inst2; break; case 'R': find_axis |= FIND_R; inst_array[3] = inst2; break; } switch (type) { case 'f': case 's': if (CHECK_FRAME(find_axis)) { return type; } break; case 'c': if (CHECK_CROSS(find_axis)) { return type; } break; default: return 'a'; } } return -1; } static int get_axis_box(struct objlist *obj, N_VALUE *inst, int *minx, int *miny, int *maxx, int *maxy) { struct narray *rval2; rval2 = NULL; if (axisbbox2(obj, inst, &rval2)) return 1; *minx = arraynget_int(rval2, 0); *miny = arraynget_int(rval2, 1); *maxx = arraynget_int(rval2, 2); *maxy = arraynget_int(rval2, 3); arrayfree(rval2); return 0; } static struct narray * set_axis_box(struct narray *array, int minx, int miny, int maxx, int maxy, int add_point) { if (array == NULL && ((array = arraynew(sizeof(int))) == NULL)) return NULL; arrayadd(array,&minx); arrayadd(array,&miny); arrayadd(array,&maxx); arrayadd(array,&maxy); if (add_point) { arrayadd(array,&minx); arrayadd(array,&miny); arrayadd(array,&maxx); arrayadd(array,&miny); arrayadd(array,&maxx); arrayadd(array,&maxy); arrayadd(array,&minx); arrayadd(array,&maxy); } if (arraynum(array)==0) { arrayfree(array); return NULL; } return array; } static int get_axis_group_box(struct objlist *obj, N_VALUE **inst_array, int type, int *minx, int *miny, int *maxx, int *maxy) { int x0, y0, x1, y1, i; switch (type) { case 'a': if (get_axis_box(obj, inst_array[0], minx, miny, maxx, maxy)) return 1; break; case 'f': case 's': if (get_axis_box(obj, inst_array[0], minx, miny, maxx, maxy)) return 1; for (i = 1; i < 4; i++) { if (get_axis_box(obj, inst_array[i], &x0, &y0, &x1, &y1)) return 1; if (x0 < *minx) *minx = x0; if (y0 < *miny) *miny = y0; if (x1 > *maxx) *maxx = x1; if (y1 > *maxy) *maxy = y1; } break; case 'c': if (get_axis_box(obj, inst_array[0], minx, miny, maxx, maxy)) return 1; if (get_axis_box(obj, inst_array[1], &x0, &y0, &x1, &y1)) return 1; if (x0 < *minx) *minx = x0; if (y0 < *miny) *miny = y0; if (x1 > *maxx) *maxx = x1; if (y1 > *maxy) *maxy = y1; break; } return 0; } static int axisbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int type, dir; N_VALUE *inst_array[INST_ARRAY_NUM]; struct narray *array; int minx,miny,maxx,maxy; array = rval->array; if (arraynum(array) != 0) return 0; type = get_axis_group_type(obj, inst, inst_array, FALSE); switch (type) { case 'a': return axisbbox2(obj, inst, &rval->array); break; case 'f': case 's': case 'c': if (get_axis_group_box(obj, inst_array, type, &minx, &miny, &maxx, &maxy)) return 1; dir = check_direction(obj, type, inst_array); array = set_axis_box(array, minx, miny, maxx, maxy, ! dir); if (array == NULL) { rval->array = NULL; return 1; } rval->array = array; break; } return 0; } static int axismatch2(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy,err; int *data; struct narray *array; rval->i=FALSE; array=NULL; axisbbox2(obj,inst,&array); if (array==NULL) return 0; minx=*(int *)argv[2]; miny=*(int *)argv[3]; maxx=*(int *)argv[4]; maxy=*(int *)argv[5]; err=*(int *)argv[6]; if ((minx==maxx) && (miny==maxy)) { int i, num; num=arraynum(array)-4; data=arraydata(array); for (i=0;ii=TRUE; break; } if (r2!=0) { double ip; ip=((x2-x1)*(minx-x1)+(y2-y1)*(miny-y1))/r2; if ((0<=ip) && (ip<=r2)) { x2=x1+(x2-x1)*ip/r2; y2=y1+(y2-y1)*ip/r2; r=sqrt((minx-x2)*(minx-x2)+(miny-y2)*(miny-y2)); if (ri=TRUE; break; } } } } } else { int bminx,bminy,bmaxx,bmaxy; if (arraynum(array)<4) { arrayfree(array); return 1; } bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } arrayfree(array); return 0; } static int axismatch(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int n, type; N_VALUE *inst_array[INST_ARRAY_NUM]; int rval2; rval->i = FALSE; type = get_axis_group_type(obj, inst, inst_array, FALSE); n = 0; switch (type) { case 'a': return axismatch2(obj, inst, rval, argc, argv); break; case 'f': case 's': n = 4; break; case 'c': n = 2; break; } if (n) { int i, match; match = FALSE; for (i = 0; i < n; i++) { axismatch2(obj, inst_array[i], (void *)&rval2, argc, argv); match = match || rval2; } rval->i = match; } return 0; } static int axismove2(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); x+=*(int *)argv[2]; y+=*(int *)argv[3]; if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int axismove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int i; N_VALUE *inst_array[INST_ARRAY_NUM]; if (* (int *) argv[2] == 0 && * (int *) argv[3] == 0) return 0; if (get_axis_group_type(obj, inst, inst_array, FALSE) < 0) return 1; for (i = 0; i < INST_ARRAY_NUM; i++) { if (inst_array[i]) { axismove2(obj, inst_array[i], rval, argc, argv); } } return 0; } static int axisrotate2(struct objlist *obj, N_VALUE *inst, int px, int py, int angle) { int x, y, dir; if (inst == NULL) return 1; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); _getobj(obj, "direction", inst, &dir); rotate(px, py, angle, &x, &y); dir += angle; dir %= 36000; if (_putobj(obj, "x", inst, &x)) return 1; if (_putobj(obj, "y", inst, &y)) return 1; if (_putobj(obj, "direction", inst, &dir)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int axisrotate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int i, n, type, angle, use_pivot, px, py, minx, miny, maxx, maxy; N_VALUE *inst_array[INST_ARRAY_NUM]; angle = *(int *) argv[2]; use_pivot = * (int *) argv[3]; px = *(int *) argv[4]; py = *(int *) argv[5]; angle %= 36000; if (angle < 0) angle += 36000; type = get_axis_group_type(obj, inst, inst_array, FALSE); switch (type) { case 'a': n = 1; break; case 'f': case 's': n = 4; break; case 'c': n = 2; break; default: return 0; } if (! use_pivot) { if (get_axis_group_box(obj, inst_array, type, &minx, &miny, &maxx, &maxy)) return 1; px = (minx + maxx) / 2; py = (miny + maxy) / 2; } for (i = 0; i < n; i++) { axisrotate2(obj, inst_array[i], px, py, angle); } return 0; } static int axisflip2(struct objlist *obj, N_VALUE *inst, int px, int py, enum FLIP_DIRECTION dir) { int x, y, a, p, g_dir, n_dir, n_align; if (inst == NULL) return 1; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); _getobj(obj, "direction", inst, &a); _getobj(obj, "gauge", inst, &g_dir); _getobj(obj, "num", inst, &n_dir); _getobj(obj, "num_align", inst, &n_align); switch (dir) { case FLIP_DIRECTION_HORIZONTAL: a = 18000 - a; p = px; switch (n_align) { case AXIS_NUM_ALIGN_LEFT: n_align = AXIS_NUM_ALIGN_RIGHT; break; case AXIS_NUM_ALIGN_RIGHT: n_align= AXIS_NUM_ALIGN_LEFT; break; } break; case FLIP_DIRECTION_VERTICAL: a = -a; p = py; break; default: p = 0; } switch (g_dir) { case AXIS_GAUGE_LEFT: g_dir = AXIS_GAUGE_RIGHT; break; case AXIS_GAUGE_RIGHT: g_dir = AXIS_GAUGE_LEFT; break; }; switch (n_dir) { case AXIS_NUM_POS_LEFT: n_dir = AXIS_NUM_POS_RIGHT; break; case AXIS_NUM_POS_RIGHT: n_dir = AXIS_NUM_POS_LEFT; break; } a %= 36000; a += (a < 0) ? 36000 : 0; flip(p, dir, &x, &y); if (_putobj(obj, "x", inst, &x)) return 1; if (_putobj(obj, "y", inst, &y)) return 1; if (_putobj(obj, "direction", inst, &a)) return 1; if (_putobj(obj, "gauge", inst, &g_dir)) return 1; if (_putobj(obj, "num", inst, &n_dir)) return 1; if (_putobj(obj, "num_align", inst, &n_align)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int axisflip(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int i, n, type, use_pivot, px, py, minx, miny, maxx, maxy; N_VALUE *inst_array[INST_ARRAY_NUM]; enum FLIP_DIRECTION dir; dir = (* (int *) argv[2] == FLIP_DIRECTION_HORIZONTAL) ? FLIP_DIRECTION_HORIZONTAL : FLIP_DIRECTION_VERTICAL; use_pivot = * (int *) argv[3]; px = py = *(int *) argv[4]; type = get_axis_group_type(obj, inst, inst_array, FALSE); switch (type) { case 'a': n = 1; break; case 'f': case 's': n = 4; break; case 'c': n = 2; break; default: return 0; } if (! use_pivot) { if (get_axis_group_box(obj, inst_array, type, &minx, &miny, &maxx, &maxy)) return 1; px = (minx + maxx) / 2; py = (miny + maxy) / 2; } for (i = 0; i < n; i++) { axisflip2(obj, inst_array[i], px, py, dir); } return 0; } static int axischange2(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int len,dir,x,y; double x2,y2; int point,x0,y0; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"length",inst,&len); _getobj(obj,"direction",inst,&dir); x2=x+len*cos(dir*MPI/18000.0); y2=y-len*sin(dir*MPI/18000.0); point=*(int *)argv[2]; x0=*(int *)argv[3]; y0=*(int *)argv[4]; if (point==0) { x+=x0; y+=y0; } else if (point==1) { x2+=x0; y2+=y0; } len=sqrt((x2-x)*(x2-x)+(y2-y)*(y2-y)); if ((x2-x)==0) { if ((y2-y)==0) dir=0; else if ((y2-y)>0) dir=27000; else dir=9000; } else { dir=atan(-(y2-y)/(x2-x))/MPI*18000.0; if ((x2-x)<0) dir+=18000; if (dir<0) dir+=36000; } if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (_putobj(obj,"length",inst,&len)) return 1; if (_putobj(obj,"direction",inst,&dir)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static void axis_change_point0(struct objlist *obj, int type, N_VALUE **inst_array, int x0, int y0) { int len, x, y; switch (type) { case 'f': case 's': _getobj(obj, "x", inst_array[2], &x); _getobj(obj, "y", inst_array[2], &y); _getobj(obj, "length", inst_array[2], &len); x += x0; y += y0; len -= x0; _putobj(obj, "x", inst_array[2], &x); _putobj(obj, "y", inst_array[2], &y); _putobj(obj, "length", inst_array[2], &len); _getobj(obj, "length", inst_array[3], &len); len -= y0; _putobj(obj, "length", inst_array[3], &len); /* FALLTHROUGH */ case 'c': _getobj(obj, "x", inst_array[0], &x); _getobj(obj, "length", inst_array[0], &len); x += x0; len -= x0; _putobj(obj, "x", inst_array[0], &x); _putobj(obj, "length", inst_array[0], &len); _getobj(obj, "x", inst_array[1], &x); _getobj(obj, "length", inst_array[1], &len); x += x0; len -= y0; _putobj(obj, "x", inst_array[1], &x); _putobj(obj, "length", inst_array[1], &len); break; } } static void axis_change_point1(struct objlist *obj, int type, N_VALUE **inst_array, int x0, int y0) { int len, x, y; switch (type) { case 'f': case 's': _getobj(obj, "y", inst_array[2], &y); _getobj(obj, "length", inst_array[2], &len); y += y0; len += x0; _putobj(obj, "y", inst_array[2], &y); _putobj(obj, "length", inst_array[2], &len); _getobj(obj, "x", inst_array[3], &x); _getobj(obj, "length", inst_array[3], &len); x += x0; len -= y0; _putobj(obj, "x", inst_array[3], &x); _putobj(obj, "length", inst_array[3], &len); /* FALLTHROUGH */ case 'c': _getobj(obj, "length", inst_array[0], &len); len += x0; _putobj(obj, "length", inst_array[0], &len); _getobj(obj, "length", inst_array[1], &len); len -= y0; _putobj(obj, "length", inst_array[1], &len); break; } } static void axis_change_point2(struct objlist *obj, int type, N_VALUE **inst_array, int x0, int y0) { int len, x, y; switch (type) { case 'f': case 's': _getobj(obj, "length", inst_array[2], &len); len += x0; _putobj(obj, "length", inst_array[2], &len); _getobj(obj, "x", inst_array[3], &x); _getobj(obj, "y", inst_array[3], &y); _getobj(obj, "length", inst_array[3], &len); x += x0; y += y0; len += y0; _putobj(obj, "x", inst_array[3], &x); _putobj(obj, "y", inst_array[3], &y); _putobj(obj, "length", inst_array[3], &len); /* FALLTHROUGH */ case 'c': _getobj(obj, "y", inst_array[0], &y); _getobj(obj, "length", inst_array[0], &len); y += y0; len += x0; _putobj(obj, "y", inst_array[0], &y); _putobj(obj, "length", inst_array[0], &len); _getobj(obj, "y", inst_array[1], &y); _getobj(obj, "length", inst_array[1], &len); y += y0; len += y0; _putobj(obj, "y", inst_array[1], &y); _putobj(obj, "length", inst_array[1], &len); break; } } static void axis_change_point3(struct objlist *obj, int type, N_VALUE **inst_array, int x0, int y0) { int len, x, y; switch (type) { case 'f': case 's': _getobj(obj, "x", inst_array[2], &x); _getobj(obj, "length", inst_array[2], &len); x += x0; len -= x0; _putobj(obj, "x", inst_array[2], &x); _putobj(obj, "length", inst_array[2], &len); _getobj(obj, "y", inst_array[3], &y); _getobj(obj, "length", inst_array[3], &len); y += y0; len += y0; _putobj(obj, "y", inst_array[3], &y); _putobj(obj, "length", inst_array[3], &len); /* FALLTHROUGH */ case 'c': _getobj(obj, "x", inst_array[0], &x); _getobj(obj, "y", inst_array[0], &y); _getobj(obj, "length", inst_array[0], &len); x += x0; y += y0; len -= x0; _putobj(obj, "x", inst_array[0], &x); _putobj(obj, "y", inst_array[0], &y); _putobj(obj, "length", inst_array[0], &len); _getobj(obj, "x", inst_array[1], &x); _getobj(obj, "y", inst_array[1], &y); _getobj(obj, "length", inst_array[1], &len); x += x0; y += y0; len += y0; _putobj(obj, "x", inst_array[1], &x); _putobj(obj, "y", inst_array[1], &y); _putobj(obj, "length", inst_array[1], &len); break; } } static int axischange(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { N_VALUE *inst_array[INST_ARRAY_NUM]; int type, point, x0, y0, len; type = get_axis_group_type(obj, inst, inst_array, FALSE); point= * (int *) argv[2]; x0 = * (int *) argv[3]; y0 = * (int *) argv[4]; switch (type) { case 'a': return axischange2(obj, inst, rval, argc, argv); break; case 'f': case 's': case 'c': if (check_direction(obj, type, inst_array)) return 0; _getobj(obj, "length", inst_array[0], &len); if (len < 0) { switch (point) { case 0: point = 1; break; case 1: point = 0; break; case 2: point = 3; break; case 3: point = 2; break; } } _getobj(obj, "length", inst_array[1], &len); if (len < 0) { switch (point) { case 0: point = 3; break; case 1: point = 2; break; case 2: point = 1; break; case 3: point = 0; break; } } switch (point) { case 0: axis_change_point0(obj, type, inst_array, x0, y0); break; case 1: axis_change_point1(obj, type, inst_array, x0, y0); break; case 2: axis_change_point2(obj, type, inst_array, x0, y0); break; case 3: axis_change_point3(obj, type, inst_array, x0, y0); break; } if (clear_bbox(obj, inst)) return 1; break; } return 0; } static int axiszoom2(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y,len,refx,refy,preserve_width; double zoom_x, zoom_y, zoom_n, zoom_p, zoom; int pt,space,wid1,wid2,wid3,len1,len2,len3,wid,wlen,wwid,direction; struct narray *style,*gstyle; int snum,*sdata,gsnum,*gsdata; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; zoom_x = (*(int *) argv[2]) / 10000.0; zoom_y = (*(int *) argv[3]) / 10000.0; zoom = MIN(zoom_x, zoom_y); refx = (*(int *)argv[4]); refy = (*(int *)argv[5]); preserve_width = (*(int *)argv[6]); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"length",inst,&len); _getobj(obj,"width",inst,&wid); _getobj(obj,"num_pt",inst,&pt); _getobj(obj,"num_space",inst,&space); _getobj(obj,"wave_length",inst,&wlen); _getobj(obj,"wave_width",inst,&wwid); _getobj(obj,"gauge_length1",inst,&len1); _getobj(obj,"gauge_width1",inst,&wid1); _getobj(obj,"gauge_length2",inst,&len2); _getobj(obj,"gauge_width2",inst,&wid2); _getobj(obj,"gauge_length3",inst,&len3); _getobj(obj,"gauge_width3",inst,&wid3); _getobj(obj,"gauge_style",inst,&gstyle); _getobj(obj,"style",inst,&style); _getobj(obj,"direction",inst,&direction); snum=arraynum(style); sdata=arraydata(style); gsnum=arraynum(gstyle); gsdata=arraydata(gstyle); direction = calc_zoom_direction(direction, zoom_x, zoom_y, &zoom_p, &zoom_n); len*=zoom_p; wlen*=zoom_n; len1*=zoom_n; len2*=zoom_n; len3*=zoom_n; x=(x-refx)*zoom_x+refx; y=(y-refy)*zoom_y+refy; pt*=zoom; space*=zoom; if (! preserve_width) { int i; wid*=zoom; wid1*=zoom; wid2*=zoom; wid3*=zoom; wwid*=zoom; for (i=0;idirection<9000) { px0=hx1; py0=hy1; } else if (aconf->direction<18000) { px0=hx1; py0=hy0; } else if (aconf->direction<27000) { px0=hx0; py0=hy0; } else { px0=hx0; py0=hy1; } } else { if (aconf->direction<9000) { px0=hx0; py0=hy0; } else if (aconf->direction<18000) { px0=hx0; py0=hy1; } else if (aconf->direction<27000) { px0=hx1; py0=hy1; } else { px0=hx1; py0=hy0; } } switch (align) { case AXIS_NUM_ALIGN_CENTER: px1=(hx0+hx1)/2; break; case AXIS_NUM_ALIGN_LEFT: px1=hx0; break; case AXIS_NUM_ALIGN_RIGHT: px1=hx1; break; case AXIS_NUM_ALIGN_POINT: px1=ilenmax+plen/2; break; default: /* never reached */ px1 = 0; } py1=(hy0+hy1)/2; fx0=px1-px0; fy0=py1-py0; t=cos(aconf->dir)*fx0-sin(aconf->dir)*fy0; *x1=fx0-t*cos(aconf->dir); *y1=fy0+t*sin(aconf->dir); if (side==AXIS_NUM_POS_LEFT) { if (aconf->direction<9000) px1=hx1; else if (aconf->direction<18000) px1=hx1; else if (aconf->direction<27000) px1=hx0; else px1=hx0; } else { if (aconf->direction<9000) px1=hx0; else if (aconf->direction<18000) px1=hx0; else if (aconf->direction<27000) px1=hx1; else px1=hx1; } py1=(hy0+hy1)/2; fx0=px1-px0; fy0=py1-py0; t=cos(aconf->dir)*fx0-sin(aconf->dir)*fy0; *x2=fx0-t*cos(aconf->dir); *y2=fy0+t*sin(aconf->dir); *len=abs(hx1-hx0); } static void get_num_ofst_parallel(const struct axis_config *aconf, int side, int hx0, int hy0, int hx1, int hy1, int *x1, int *y1, int *x2, int *y2, int *len) { int py1; py1=(hy0+hy1)/2; if (side==AXIS_NUM_POS_LEFT) py1*=-1; *x1=-py1*sin(aconf->dir); *y1=-py1*cos(aconf->dir); *x2=-py1*sin(aconf->dir); *y2=-py1*cos(aconf->dir); *len=abs(hx1-hx0); } static void get_num_ofst_normal1(const struct axis_config *aconf, int align, int side, int ilenmax, int plen, int hx0, int hy0, int hx1, int hy1, int *x1, int *y1, int *x2, int *y2, int *len) { int py1; switch (side) { case AXIS_NUM_POS_LEFT: switch (align) { case AXIS_NUM_ALIGN_CENTER: py1 = (hx1 - hx0) / 2; break; case AXIS_NUM_ALIGN_LEFT: py1 = hx1 - hx0; break; case AXIS_NUM_ALIGN_RIGHT: py1 = 0; break; case AXIS_NUM_ALIGN_POINT: py1 = plen / 2; break; default: /* never reached */ py1 = 0; } break; case AXIS_NUM_POS_RIGHT: switch (align) { case AXIS_NUM_ALIGN_CENTER: py1 = (hx0 - hx1) / 2; break; case AXIS_NUM_ALIGN_LEFT: py1 = 0; break; case AXIS_NUM_ALIGN_RIGHT: py1 = hx0 - hx1; break; case AXIS_NUM_ALIGN_POINT: py1 = hx0 - hx1 + plen / 2; break; default: /* never reached */ py1 = 0; } break; default: /* never reached */ py1 = 0; } *x1 = -py1 * sin(aconf->dir); *y1 = -py1 * cos(aconf->dir); *x2 = *y2 = 0; *len = abs(hx1 - hx0); } static void get_num_ofst_normal2(const struct axis_config *aconf, int align, int side, int ilenmax, int plen, int hx0, int hy0, int hx1, int hy1, int *x1, int *y1, int *x2, int *y2, int *len) { int py1; switch (side) { case AXIS_NUM_POS_LEFT: switch (align) { case AXIS_NUM_ALIGN_CENTER: py1 = (hx1 - hx0) / 2; break; case AXIS_NUM_ALIGN_LEFT: py1 = hx1 - hx0; break; case AXIS_NUM_ALIGN_RIGHT: py1 = 0; break; case AXIS_NUM_ALIGN_POINT: py1 = hx1 - ilenmax - plen / 2; break; default: /* never reached */ py1 = 0; } break; case AXIS_NUM_POS_RIGHT: switch (align) { case AXIS_NUM_ALIGN_CENTER: py1 = (hx0 - hx1) / 2; break; case AXIS_NUM_ALIGN_LEFT: py1 = 0; break; case AXIS_NUM_ALIGN_RIGHT: py1 = hx0 - hx1; break; case AXIS_NUM_ALIGN_POINT: py1 = hx0 - ilenmax - plen / 2; break; default: /* never reached */ py1 = 0; } break; default: /* never reached */ py1 = 0; } *x1 = -py1 * sin(aconf->dir); *y1 = -py1 * cos(aconf->dir); *x2 = *y2 = 0; *len = abs(hx1 - hx0); } static void get_num_ofst_oblique1(const struct axis_config *aconf, int align, int side, int ilenmax, int plen, int hx0, int hy0, int hx1, int hy1, int *x1, int *y1, int *x2, int *y2, int *len) { int w, h; double sin_t, cos_t; switch (side) { case AXIS_NUM_POS_LEFT: w = abs(hx1 - hx0); h = abs(hy1 - hy0); cos_t = cos(aconf->dir + MPI / 4); sin_t = sin(aconf->dir + MPI / 4); *x1 = w * cos_t - h * sin_t; *y1 = - w * sin_t - h * cos_t; break; case AXIS_NUM_POS_RIGHT: *x1 = *y1 = 0; break; default: /* never reached */ *x1 = 0; *y1 = 0; } *x2 = *y2 = 0; *len = abs(hx1 - hx0); } static void get_num_ofst_oblique2(const struct axis_config *aconf, int align, int side, int ilenmax, int plen, int hx0, int hy0, int hx1, int hy1, int *x1, int *y1, int *x2, int *y2, int *len) { int w, h; double sin_t, cos_t; switch (side) { case AXIS_NUM_POS_LEFT: w = abs(hx1 - hx0); h = abs(hy1 - hy0); cos_t = cos(aconf->dir - MPI / 4); sin_t = sin(aconf->dir - MPI / 4); *x1 = - w * cos_t - h * sin_t; *y1 = w * sin_t - h * cos_t; break; case AXIS_NUM_POS_RIGHT: *x1 = *y1 = 0; break; default: /* never reached */ *x1 = 0; *y1 = 0; } *x2 = *y2 = 0; *len = abs(hx1 - hx0); } static char * mjd_to_date_str(const struct axis_config *aconf, double mjd, const gchar *date_format) { struct tm tm; const gchar *fmt_y = "%Y", *fmt_ym = "%Y-%m", *fmt_ymd = "%Y-%m-%d", *fmt_ymdhms = "%Y-%m-%d\\&\\n%H:%M:%S\\&", *fmt_ymdhm = "%Y-%m-%d\\&\\n%H:%M\\&", *fmt_hms = "%H:%M:%S", *fmt_hm = "%H:%M", *fmt; mjd2gd(mjd, &tm); if (tm.tm_year < MJD2GD_YEAR_MIN) { return NULL; } if (date_format && date_format[0]) { fmt = date_format; } else { if (fabs(aconf->max - aconf->min) < 1) { if (tm.tm_sec == 0) { fmt = fmt_hm; } else { fmt = fmt_hms; } } else if (fabs(aconf->max - aconf->min) > 365) { if (tm.tm_sec == 0) { if (tm.tm_hour == 0 && tm.tm_min == 0) { if (tm.tm_mday == 1) { if (tm.tm_mon == 0) { fmt = fmt_y; } else { fmt = fmt_ym; } } else { fmt = fmt_ymd; } } else { fmt = fmt_ymdhm; } } else { fmt = fmt_ymdhms; } } else { if (tm.tm_sec == 0) { if (tm.tm_hour == 0 && tm.tm_min == 0) { fmt = fmt_ymd; } else { fmt = fmt_ymdhm; } } else { fmt = fmt_ymdhms; } } } return nstrftime(fmt, mjd); } static char * get_axis_gauge_num_str(const char *format, double a, int no_flt_zero) { int i, j, len; char *s; char pm[] = "±"; GString *num; if (no_flt_zero && a == 0.0) { return g_strdup("0"); } num = g_string_sized_new(16); if (num == NULL) { return NULL; } s = strchr(format, '+'); if (a == 0 && s) { char format2[256]; len = strlen(format); for (j = 0; j < (int) sizeof(pm) - 1; j++) { format2[j] = pm[j]; } for (i = 0; i < len && j < (int) sizeof(format2) - 1; i++) { format2[j] = format[i]; if (format[i] != '+') { j++; } } format2[j] = '\0'; n_gstr_printf_double(num, format2, a); } else { n_gstr_printf_double(num, format, a); } len = num->len; for (i = 0; i < len; i++) { if (num->str[i] == 'E' || num->str[i] == 'e') { switch (num->str[i + 1]) { case '+': j = 2; if (i + 2 < len && num->str[i + 2] == '0') { j++; } g_string_erase(num, i, j); break; case '-': if (i + 2 < len && num->str[i + 2] == '0') { g_string_erase(num, i + 2, 1); } g_string_erase(num, i, 1); break; case '0': /* never reached */ g_string_erase(num, i, 2); break; default: /* never reached */ g_string_erase(num, i, 1); break; } g_string_insert(num, i, "×10^"); g_string_append_c(num, '@'); break; } } return g_string_free(num, FALSE); } static double calc_numbering_value(const struct axis_config *aconf, double po) { MathValue val; if (aconf->code) { val.val = po; val.type = MATH_VALUE_NORMAL; math_equation_set_var(aconf->code, 0, &val); math_equation_calculate(aconf->code, &val); if (val.type == MATH_VALUE_NORMAL) { po = val.val; } else { po = 0; } } return po; } static double numformat(char **text, int *nlen, const char *format, const struct axis_config *aconf, const struct axislocal *alocal, int logpow, double po, double norm, const char *head, const char *tail, const char *date_format, int nozero) { int lpow; char *num; double a; *text = NULL; *nlen = 0; if ((! logpow && (alocal->atype == AXISLOGBIG || alocal->atype == AXISLOGNORM)) || (alocal->atype == AXISLOGSMALL)) { po = calc_numbering_value(aconf, po); a = pow(10.0, po); } else if (alocal->atype == AXISINVERSE) { a = calc_numbering_value(aconf, 1.0 / po); } else { po = calc_numbering_value(aconf, po); a = po / norm; } if (aconf->type == AXIS_TYPE_MJD) { num = mjd_to_date_str(aconf, po, date_format); if (num) { logpow = 0; } else { num = get_axis_gauge_num_str(format, a, nozero == AXIS_NUM_NO_ZERO_NO_FLOATING_POINT); } } else { num = get_axis_gauge_num_str(format, a, nozero == AXIS_NUM_NO_ZERO_NO_FLOATING_POINT); } lpow = (logpow && (alocal->atype == AXISLOGBIG || alocal->atype == AXISLOGNORM)); *text = g_strdup_printf("%s%s%s%s%s", CHK_STR(head), (lpow) ? "10^" : "", CHK_STR(num), (lpow) ? "@" : "", CHK_STR(tail)); if (num) { *nlen = strlen(num); g_free(num); } else { *nlen = 0; } return a; } static int draw_numbering_normalize(int GC, int side, const struct axis_config *aconf, const struct font_config *font, double norm, int maxlen, int sx, int sy, int dlx2, int dly2, int ndir, double nndir, int ndirection) { int fx0, fy0, fx1, fy1, px0, px1, py0, py1, gx0, gy0; char num[256]; if (norm/pow(10.0,cutdown(log10(norm)))==1) { // sprintf(num,"[%%F{Symbol}%c%%F{%s}10^%+d@]", (char )0xb4,font,(int )cutdown(log10(norm))); snprintf(num, sizeof(num), "[×10^%+d@]", (int )cutdown(log10(norm))); } else { // sprintf(num,"[%g%%F{Symbol}%c%%F{%s}10^%+d@]", norm/pow(10.0,cutdown(log10(norm))), (char )0xb4,font,(int )cutdown(log10(norm))); snprintf(num, sizeof(num), "[%g×10^%+d@]", norm/pow(10.0,cutdown(log10(norm))), (int )cutdown(log10(norm))); } GRAtextextent(num,font->font, font->style, font->pt, font->space, font->scriptsize, &fx0,&fy0,&fx1,&fy1,FALSE); if (abs(fy1-fy0)>maxlen) maxlen=abs(fy1-fy0); gx0=aconf->x0+(aconf->length+maxlen*1.2)*cos(aconf->dir); switch (ndir) { case AXIS_NUM_POS_HORIZONTAL: if (abs(aconf->direction) > 30 && abs(aconf->direction - 18000) > 30) { maxlen = abs(fy1-fy0); } break; case AXIS_NUM_POS_PARALLEL1: case AXIS_NUM_POS_PARALLEL2: break; default: maxlen = abs(fy1-fy0); } gy0=aconf->y0-(aconf->length+maxlen*1.2)*sin(aconf->dir); gx0=gx0-sy*sin(aconf->dir)+sx*cos(aconf->dir)+dlx2; gy0=gy0-sy*cos(aconf->dir)-sx*sin(aconf->dir)+dly2; switch (ndir) { case AXIS_NUM_POS_HORIZONTAL: if (side==AXIS_NUM_POS_LEFT) { if ((aconf->direction>4500) && (aconf->direction<=22500)) px1=fx1; else px1=fx0; } else { if ((aconf->direction>13500) && (aconf->direction<=31500)) px1=fx1; else px1=fx0; } py1=(fy0+fy1)/2; break; case AXIS_NUM_POS_PARALLEL1: case AXIS_NUM_POS_PARALLEL2: if (ndir==AXIS_NUM_POS_PARALLEL1) { px0=fx0; } else { px0=fx1; } py0=(fy0+fy1)/2; px1=cos(nndir)*px0+sin(nndir)*py0; py1=-sin(nndir)*px0+cos(nndir)*py0; break; case AXIS_NUM_POS_NORMAL1: case AXIS_NUM_POS_NORMAL2: if (side==AXIS_NUM_POS_LEFT) { if (ndir==AXIS_NUM_POS_NORMAL1) { px0=fx0; } else { px0=fx1; } } else { if (ndir==AXIS_NUM_POS_NORMAL1) { px0=fx1; } else { px0=fx0; } } py0=(fy0+fy1)/2; px1=cos(nndir)*px0+sin(nndir)*py0; py1=-sin(nndir)*px0+cos(nndir)*py0; break; case AXIS_NUM_POS_OBLIQUE1: case AXIS_NUM_POS_OBLIQUE2: default: px1 = py1 = 0; break; } GRAmoveto(GC,gx0-px1,gy0-py1); GRAdrawtext(GC,num,font->font,font->style,font->pt,font->space,ndirection,font->scriptsize); return 0; } static int draw_numbering(struct objlist *obj, N_VALUE *inst, struct axislocal *alocal, int GC, int side, int align, int ndir, int ilenmax, int plen, struct axis_config *aconf, const struct font_config *font, int step, int nnum, int numcount, int begin, int autonorm, int nozero, int logpow, const char *format, double norm, const char *head, int headlen, const char *tail, const char *date_format, int hx0, int hy0, int hx1, int hy1, struct narray *array) { int fx0,fy0,fx1,fy1,px0,px1,py0,py1; int dlx,dly,dlx2,dly2,maxlen; int rcode; int gx0,gy0; double nndir, po, min1, max1, value; int numlen,i; char *text, ch; int sx, sy, ndirection, cstep; _getobj(obj,"num_shift_p",inst,&sx); _getobj(obj,"num_shift_n",inst,&sy); switch (aconf->type) { case AXIS_TYPE_LOG: min1=log10(aconf->min); max1=log10(aconf->max); break; case AXIS_TYPE_INVERSE: min1=1/aconf->min; max1=1/aconf->max; break; default: min1=aconf->min; max1=aconf->max; } switch (ndir) { case AXIS_NUM_POS_HORIZONTAL: ndirection = 0; break; case AXIS_NUM_POS_NORMAL1: ndirection = aconf->direction + 9000; break; case AXIS_NUM_POS_NORMAL2: ndirection = aconf->direction + 27000; break; case AXIS_NUM_POS_OBLIQUE1: ndirection = aconf->direction + 4500; break; case AXIS_NUM_POS_OBLIQUE2: ndirection = aconf->direction + 31500; break; case AXIS_NUM_POS_PARALLEL1: ndirection = aconf->direction; break; case AXIS_NUM_POS_PARALLEL2: ndirection = aconf->direction + 18000; break; default: /* never reached */ ndirection = 0; } if (ndirection > 36000) { ndirection -= 36000; } nndir = ndirection / 18000.0 * MPI; if (side==AXIS_NUM_POS_RIGHT) sy*=-1; switch (ndir) { case AXIS_NUM_POS_HORIZONTAL: get_num_ofst_horizontal(aconf, align, side, ilenmax, plen, hx0, hy0, hx1, hy1, &dlx, &dly, &dlx2, &dly2, &maxlen); break; case AXIS_NUM_POS_PARALLEL1: case AXIS_NUM_POS_PARALLEL2: get_num_ofst_parallel(aconf, side, hx0, hy0, hx1, hy1, &dlx, &dly, &dlx2, &dly2, &maxlen); break; case AXIS_NUM_POS_NORMAL1: get_num_ofst_normal1(aconf, align, side, ilenmax, plen, hx0, hy0, hx1, hy1, &dlx, &dly, &dlx2, &dly2, &maxlen); break; case AXIS_NUM_POS_NORMAL2: get_num_ofst_normal2(aconf, align, side, ilenmax, plen, hx0, hy0, hx1, hy1, &dlx, &dly, &dlx2, &dly2, &maxlen); break; case AXIS_NUM_POS_OBLIQUE1: get_num_ofst_oblique1(aconf, align, side, ilenmax, plen, hx0, hy0, hx1, hy1, &dlx, &dly, &dlx2, &dly2, &maxlen); break; case AXIS_NUM_POS_OBLIQUE2: get_num_ofst_oblique2(aconf, align, side, ilenmax, plen, hx0, hy0, hx1, hy1, &dlx, &dly, &dlx2, &dly2, &maxlen); break; default: /* never reached */ dlx = 0; dly = 0; dlx2 = 0; dly2 = 0; maxlen = 0; } if (getaxispositionini(alocal,aconf->type,aconf->min,aconf->max,aconf->inc,aconf->div,FALSE)!=0) return 1; if (begin<=0) begin=1; cstep = step - begin + 1; numcount = 0; while ((rcode=getaxisposition(alocal,&po))!=-2) { if (rcode>=2) { gx0=aconf->x0+(po-min1)*aconf->length/(max1-min1)*cos(aconf->dir); gy0=aconf->y0-(po-min1)*aconf->length/(max1-min1)*sin(aconf->dir); gx0=gx0-sy*sin(aconf->dir)+sx*cos(aconf->dir)+dlx; gy0=gy0-sy*cos(aconf->dir)-sx*sin(aconf->dir)+dly; if ((cstep==step) || ((alocal->atype==AXISLOGSMALL) && (rcode==3))) { numcount++; if (((numcount<=nnum) || (nnum==-1)) && ((po!=0) || (nozero != AXIS_NUM_NO_ZERO_NO_ZERO))) { value = numformat(&text, &numlen, format, aconf, alocal, logpow, po, norm, head, tail, date_format, nozero); if (text == NULL) { return 1; } if (align == AXIS_NUM_ALIGN_POINT) { for (i = headlen; i < headlen + numlen; i++) { if (text[i]=='.') { break; } } ch=text[i]; text[i]='\0'; GRAtextextent(text,font->font, font->style, font->pt, font->space, font->scriptsize, &fx0,&fy0,&fx1,&fy1,FALSE); if (abs(fx1-fx0)>ilenmax) ilenmax=abs(fx1-fx0); text[i]=ch; GRAtextextent(text,font->font, font->style, font->pt, font->space, font->scriptsize, &px0,&py0,&px1,&py1,FALSE); if (py0fy1) fy1=py1; } else { GRAtextextent(text,font->font, font->style, font->pt, font->space, font->scriptsize, &fx0,&fy0,&fx1,&fy1,FALSE); } switch (ndir) { case AXIS_NUM_POS_HORIZONTAL: get_num_pos_horizontal(align, plen, fx0, fy0, fx1, fy1, &px1, &py1); break; case AXIS_NUM_POS_PARALLEL1: case AXIS_NUM_POS_PARALLEL2: get_num_pos(align, plen, nndir, fx0, fy0, fx1, fy1, &px1, &py1); break; case AXIS_NUM_POS_NORMAL1: get_num_pos(align, plen, nndir, fx0, fy0, fx1, fy1, &px1, &py1); break; case AXIS_NUM_POS_NORMAL2: get_num_pos(align, plen, nndir, fx1, fy0, fx0, fy1, &px1, &py1); break; case AXIS_NUM_POS_OBLIQUE1: get_num_pos_oblique(AXIS_NUM_ALIGN_LEFT, plen, nndir, fx1, fy0, fx0, fy1, &px1, &py1); break; case AXIS_NUM_POS_OBLIQUE2: get_num_pos_oblique(AXIS_NUM_ALIGN_RIGHT, plen, nndir, fx1, fy0, fx0, fy1, &px1, &py1); break; default: px1 = 0; py1 = 0; } if (array == NULL) { GRAmoveto(GC,gx0-px1,gy0-py1); GRAdrawtext(GC,text,font->font,font->style,font->pt,font->space,ndirection,font->scriptsize); } else { char *s; s = g_strdup_printf("%5d %5d %5d %.14E %.14E", gx0 - px1, gy0 - py1, ndirection, value, po); arrayadd(array, &s); } g_free(text); } if ((alocal->atype==AXISLOGSMALL) && (rcode==3)) { cstep=step-begin; } else { cstep=0; } } cstep++; } } if (norm != 1 && array == NULL) { draw_numbering_normalize(GC, side, aconf, font, norm, maxlen, sx, sy, dlx2, dly2, ndir, nndir, ndirection); } return 0; } static int get_step(struct axislocal *alocal, int step, int *begin) { int n, count, rcode; double po; count = 0; while ((rcode = getaxisposition(alocal, &po)) != -2) { if (rcode >= 2) { count++; } } switch (alocal->atype) { case AXISINVERSE: if (step == 0) { if (count == 0) { n = 1; } else { n = nround(pow(10.0, (double) (int) (log10((double) count)))); } if (n != 1) { n--; } if (count >= 18 * n) { step = 9 * n; } else if (count >= 6 * n) { step = 3 * n; } else { step = n; } } if (*begin == 0) { *begin = 1; } break; case AXISLOGSMALL: if (step == 0) { step = 1; } if (*begin == 0) { *begin = 1; } break; default: if (step == 0) { if (count == 0) { n = 1; } else { n = nround(pow(10.0,(double )(int )(log10(count * 0.5)))); } if (count >= 10 * n) { step = 5 * n; } else if (count >= 5 * n) { step = 2 * n; } else { step = n; } } if (*begin == 0) { double min1, min2; min1 = roundmin(alocal->posst, alocal->dposl); min2 = roundmin(alocal->posst, alocal->dposm); *begin = nround(fabs((min1 - min2) / alocal->dposm)) % step + 1; } } return step; } static int numbering(struct objlist *obj, N_VALUE *inst, int GC, struct axis_config *aconf, struct narray *array) { int fr,fg,fb,fa; int side, begin,step,nnum,numcount,cstep; int autonorm,align,nozero; char *format,*head,*tail,*text,*date_format; int headlen,numlen; int logpow; double po; double norm; int rcode, i; int hx0,hy0,hx1,hy1,fx0,fy0,fx1,fy1,ndir; int ilenmax,flenmax,plen; struct font_config font; struct axislocal alocal; _getobj(obj, "num", inst, &side); if (side == AXIS_NUM_POS_NONE) return 0; _getobj(obj, "num_R", inst, &fr); _getobj(obj, "num_G", inst, &fg); _getobj(obj, "num_B", inst, &fb); _getobj(obj, "num_A", inst, &fa); _getobj(obj, "num_pt", inst, &font.pt); _getobj(obj, "num_space", inst, &font.space); _getobj(obj, "num_script_size", inst, &font.scriptsize); _getobj(obj, "num_begin", inst, &begin); _getobj(obj, "num_step", inst, &step); _getobj(obj, "num_num", inst, &nnum); _getobj(obj, "num_auto_norm", inst, &autonorm); _getobj(obj, "num_head", inst, &head); _getobj(obj, "num_format", inst, &format); _getobj(obj, "num_tail", inst, &tail); _getobj(obj, "num_date_format", inst, &date_format); _getobj(obj, "num_log_pow", inst, &logpow); _getobj(obj, "num_align", inst, &align); _getobj(obj, "num_no_zero", inst, &nozero); _getobj(obj, "num_font", inst, &font.font); _getobj(obj, "num_font_style", inst, &font.style); _getobj(obj, "num_direction",inst, &ndir); GRAcolor(GC, fr, fg, fb, fa); headlen = (head) ? strlen(head) : 0; if (getaxispositionini(&alocal, aconf->type, aconf->min, aconf->max, aconf->inc, aconf->div, FALSE)!=0) { error(obj, ERRMINMAX); return 1; } step = get_step(&alocal, step, &begin); norm = 1; if (alocal.atype == AXISNORMAL && aconf->code == NULL) { double abs_pos; abs_pos = fabs(alocal.dposm); if (abs_pos >= pow(10.0, (double) autonorm) || abs_pos <= pow(10.0, (double) - autonorm)) { norm = abs_pos; } } if (aconf->type == AXIS_TYPE_MJD) { norm = 1; if (align == AXIS_NUM_ALIGN_POINT) { align = AXIS_NUM_ALIGN_CENTER; } } if (ndir == AXIS_NUM_POS_OBLIQUE1 || ndir == AXIS_NUM_POS_OBLIQUE2) { align = AXIS_NUM_ALIGN_CENTER; } if (getaxispositionini(&alocal, aconf->type, aconf->min, aconf->max, aconf->inc, aconf->div, FALSE)) { return 1; } GRAtextextent(".", font.font, font.style, font.pt, font.space, font.scriptsize, &fx0, &fy0, &fx1, &fy1, FALSE); plen = abs(fx1 - fx0); hx0 = hy0 = hx1 = hy1 = 0; flenmax = ilenmax = 0; if (begin <= 0) { begin = 1; } cstep = step - begin + 1; numcount = 0; while ((rcode = getaxisposition(&alocal, &po)) != -2) { if (rcode < 2) { continue; } if (cstep == step || (alocal.atype == AXISLOGSMALL && rcode == 3)) { numcount++; if ((numcount <= nnum || nnum == -1) && (po != 0 || (nozero != AXIS_NUM_NO_ZERO_NO_ZERO))) { numformat(&text, &numlen, format, aconf, &alocal, logpow, po, norm, head, tail, date_format, nozero); if (text == NULL) { return 1; } if (align == AXIS_NUM_ALIGN_POINT) { for (i = headlen; i < headlen + numlen; i++) { if (text[i] == '.') { break; } } if (text[i] == '.') { GRAtextextent(text + i + 1, font.font, font.style, font.pt, font.space, font.scriptsize, &fx0, &fy0, &fx1, &fy1, FALSE); hy0 = MIN(hy0, fy0); hy1 = MAX(hy1, fy1); if (abs(fx1-fx0) > flenmax) { flenmax = abs(fx1 - fx0); } } text[i] = '\0'; GRAtextextent(text, font.font, font.style, font.pt, font.space, font.scriptsize, &fx0, &fy0, &fx1, &fy1, FALSE); if (abs(fx1 - fx0) > ilenmax) { ilenmax = abs(fx1 - fx0); } hy0 = MIN(hy0, fy0); hy1 = MAX(hy1, fy1); } else { GRAtextextent(text, font.font, font.style, font.pt, font.space, font.scriptsize, &fx0, &fy0, &fx1, &fy1, FALSE); hx0 = MIN(hx0, fx0); hx1 = MAX(hx1, fx1); hy0 = MIN(hy0, fy0); hy1 = MAX(hy1, fy1); } g_free(text); } if ((alocal.atype == AXISLOGSMALL) && (rcode == 3)) { cstep = step - begin; } else { cstep = 0; } } cstep++; } if (align == AXIS_NUM_ALIGN_POINT) { hx0 = 0; hx1 = flenmax + ilenmax + plen / 2; } if (hx0 != hx1 && hy0 != hy1) { draw_numbering(obj, inst, &alocal, GC, side, align, ndir, ilenmax, plen, aconf, &font, step, nnum, numcount, begin, autonorm, nozero, logpow, format, norm, head, headlen, tail, date_format, hx0, hy0, hx1, hy1, array); } return 0; } static int draw_gauge(struct objlist *obj,N_VALUE *inst, int GC, struct axis_config *aconf) { int fr,fg,fb,fa; struct narray *style; int snum,*sdata; struct axislocal alocal; double po,gmin,gmax,min1,max1,min2,max2; int len1,wid1,len2,wid2,len3,wid3,len,wid; int limit; int rcode; int gx0,gy0,gx1,gy1; int gauge; _getobj(obj,"gauge",inst,&gauge); if (gauge == AXIS_GAUGE_NONE) return 0; _getobj(obj,"gauge_R",inst,&fr); _getobj(obj,"gauge_G",inst,&fg); _getobj(obj,"gauge_B",inst,&fb); _getobj(obj,"gauge_A",inst,&fa); _getobj(obj,"gauge_min",inst,&gmin); _getobj(obj,"gauge_max",inst,&gmax); _getobj(obj,"gauge_style",inst,&style); _getobj(obj,"gauge_length1",inst,&len1); _getobj(obj,"gauge_width1",inst,&wid1); _getobj(obj,"gauge_length2",inst,&len2); _getobj(obj,"gauge_width2",inst,&wid2); _getobj(obj,"gauge_length3",inst,&len3); _getobj(obj,"gauge_width3",inst,&wid3); snum=arraynum(style); sdata=arraydata(style); GRAcolor(GC,fr,fg,fb, fa); if (getaxispositionini(&alocal,aconf->type,aconf->min,aconf->max,aconf->inc,aconf->div,FALSE)!=0) { error(obj,ERRMINMAX); return 1; } if ((gmin!=0) || (gmax!=0)) limit=TRUE; else limit=FALSE; switch (aconf->type) { case AXIS_TYPE_LOG: min1=log10(aconf->min); max1=log10(aconf->max); if (limit && (gmin>0) && (gmax>0)) { min2=log10(gmin); max2=log10(gmax); } else limit=FALSE; break; case AXIS_TYPE_INVERSE: min1=1/aconf->min; max1=1/aconf->max; if (limit && (gmin*gmax>0)) { min2=1/gmin; max2=1/gmax; } else limit=FALSE; break; default: min1=aconf->min; max1=aconf->max; if (limit) { min2=gmin; max2=gmax; } } while ((rcode=getaxisposition(&alocal,&po))!=-2) { if ((rcode>=0) && (!limit || ((min2-po)*(max2-po)<=0))) { gx0=aconf->x0+(po-min1)*aconf->length/(max1-min1)*cos(aconf->dir); gy0=aconf->y0-(po-min1)*aconf->length/(max1-min1)*sin(aconf->dir); if (rcode==1) { len=len1; wid=wid1; } else if (rcode==2) { len=len2; wid=wid2; } else { len=len3; wid=wid3; } GRAlinestyle(GC,snum,sdata,wid,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); if ((gauge==1) || (gauge==2)) { gx1=gx0-len*sin(aconf->dir); gy1=gy0-len*cos(aconf->dir); GRAline(GC,gx0,gy0,gx1,gy1); } if ((gauge==1) || (gauge==3)) { gx1=gx0+len*sin(aconf->dir); gy1=gy0+len*cos(aconf->dir); GRAline(GC,gx0,gy0,gx1,gy1); } } } return 0; } static int get_axis_parameter(struct objlist *obj, N_VALUE *inst, struct axis_config *aconf) { _getobj(obj, "min", inst, &aconf->min); _getobj(obj, "max", inst, &aconf->max); _getobj(obj, "inc", inst, &aconf->inc); _getobj(obj, "div", inst, &aconf->div); _getobj(obj, "type", inst, &aconf->type); return 0; } static MathEquation * get_axis_math(struct objlist *obj, char *math) { MathEquation *code; int rcode, security; code = math_equation_basic_new(); if (code == NULL) { return NULL; } security = get_security(); math_equation_set_eoeq_assign_type(code, (security) ? EOEQ_ASSIGN_TYPE_BOTH : EOEQ_ASSIGN_TYPE_ASSIGN); if (math_equation_add_var(code, "X") != 0) { math_equation_free(code); return NULL; } rcode = math_equation_parse(code, math); if (rcode == 0 && code->use_eoeq_assign) { replace_eoeq_token(math); } else if (rcode) { char *err_msg;; err_msg = math_err_get_error_message(code, math, rcode); error2(obj, ERRNUMMATH, err_msg); g_free(err_msg); math_equation_free(code); return NULL; } return code; } static int alloc_axis_math(struct objlist *obj, N_VALUE *inst, struct axis_config *aconf) { char *math; aconf->code = NULL; _getobj(obj, "num_math", inst, &math); if (math == NULL || math[0] == '\0') { return 0; } aconf->code = get_axis_math(obj, math); return 0; } static int free_axis_math(struct axis_config *aconf) { if (aconf->code) { math_equation_free(aconf->code); } aconf->code = NULL; return 0; } static int get_reference_parameter(struct objlist *obj, N_VALUE *inst, struct axis_config *aconf, int ids_num, int *ids) { char *axis; struct objlist *aobj; int anum; struct narray iarray; int type, myid; _getobj(obj,"reference",inst, &axis); if (axis == NULL) return 1; _getobj(obj, "id", inst, &myid); if (myid >= ids_num) { return 1; } ids[myid] = TRUE; arrayinit(&iarray,sizeof(int)); if (getobjilist(axis,&aobj,&iarray,FALSE,NULL)) return 1; type = aconf->type; anum=arraynum(&iarray); if (anum>0) { N_VALUE *inst1; int id; id=arraylast_int(&iarray); arraydel(&iarray); if (id >= ids_num || ids[id]) { return 1; } inst1 = getobjinst(aobj,id); if (inst1) { get_axis_parameter(aobj, inst1, aconf); if (aconf->min == 0 && aconf->max == 0 && aconf->inc == 0) { get_reference_parameter(obj, inst1, aconf, ids_num, ids); } } } if ((aconf->type == AXIS_TYPE_LINEAR || aconf->type == AXIS_TYPE_MJD) && (type == AXIS_TYPE_LINEAR || type == AXIS_TYPE_MJD)) { aconf->type = type; } /* AXIS_TYPE_LINEAR and AXIS_TYPE_MJD are compatible each other */ return 0; } static int draw_wave(struct objlist *obj, N_VALUE *inst, struct axis_config *aconf, int GC) { int wave, wwidth, wlength, i; double wx[5],wxc1[5],wxc2[5],wxc3[5]; double wy[5],wyc1[5],wyc2[5],wyc3[5]; double ww[5],c[6]; double dx, dy; _getobj(obj,"wave",inst,&wave); _getobj(obj,"wave_length",inst,&wlength); _getobj(obj,"wave_width",inst,&wwidth); for (i=0;i<5;i++) ww[i]=i; if ((wave==ARROW_POSITION_BEGIN) || (wave==ARROW_POSITION_BOTH)) { dx=cos(aconf->dir); dy=sin(aconf->dir); wx[0]=nround(aconf->x0-dy*wlength); wx[1]=nround(aconf->x0-dy*0.5*wlength-dx*0.25*wlength); wx[2]=aconf->x0; wx[3]=nround(aconf->x0+dy*0.5*wlength+dx*0.25*wlength); wx[4]=nround(aconf->x0+dy*wlength); if (spline(ww,wx,wxc1,wxc2,wxc3,5,SPLCND2NDDIF,SPLCND2NDDIF,0,0)) { error(obj,ERRAXISSPL); return 1; } wy[0]=nround(aconf->y0-dx*wlength); wy[1]=nround(aconf->y0-dx*0.5*wlength+dy*0.25*wlength); wy[2]=aconf->y0; wy[3]=nround(aconf->y0+dx*0.5*wlength-dy*0.25*wlength); wy[4]=nround(aconf->y0+dx*wlength); if (spline(ww,wy,wyc1,wyc2,wyc3,5,SPLCND2NDDIF,SPLCND2NDDIF,0,0)) { error(obj,ERRAXISSPL); return 1; } GRAlinestyle(GC,0,NULL,wwidth,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); GRAcurvefirst(GC,0,NULL,NULL,NULL,splinedif,splineint,NULL,wx[0],wy[0]); for (i=0;i<4;i++) { c[0]=wxc1[i]; c[1]=wxc2[i]; c[2]=wxc3[i]; c[3]=wyc1[i]; c[4]=wyc2[i]; c[5]=wyc3[i]; if (!GRAcurve(GC,c,wx[i],wy[i])) break; } } if ((wave==ARROW_POSITION_END) || (wave==ARROW_POSITION_BOTH)) { dx=cos(aconf->dir); dy=sin(aconf->dir); wx[0]=nround(aconf->x1-dy*wlength); wx[1]=nround(aconf->x1-dy*0.5*wlength-dx*0.25*wlength); wx[2]=aconf->x1; wx[3]=nround(aconf->x1+dy*0.5*wlength+dx*0.25*wlength); wx[4]=nround(aconf->x1+dy*wlength); if (spline(ww,wx,wxc1,wxc2,wxc3,5,SPLCND2NDDIF,SPLCND2NDDIF,0,0)) { error(obj,ERRAXISSPL); return 1; } wy[0]=nround(aconf->y1-dx*wlength); wy[1]=nround(aconf->y1-dx*0.5*wlength+dy*0.25*wlength); wy[2]=aconf->y1; wy[3]=nround(aconf->y1+dx*0.5*wlength-dy*0.25*wlength); wy[4]=nround(aconf->y1+dx*wlength); if (spline(ww,wy,wyc1,wyc2,wyc3,5,SPLCND2NDDIF,SPLCND2NDDIF,0,0)) { error(obj,ERRAXISSPL); return 1; } GRAlinestyle(GC,0,NULL,wwidth,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); GRAcurvefirst(GC,0,NULL,NULL,NULL,splinedif,splineint,NULL,wx[0],wy[0]); for (i=0;i<4;i++) { c[0]=wxc1[i]; c[1]=wxc2[i]; c[2]=wxc3[i]; c[3]=wyc1[i]; c[4]=wyc2[i]; c[5]=wyc3[i]; if (!GRAcurve(GC,c,wx[i],wy[i])) break; } } return 0; } static int draw_arrow(struct objlist *obj, N_VALUE *inst, struct axis_config *aconf, int GC) { int arrow,alength,awidth; double alen,awid,dx,dy; int ap[6]; _getobj(obj,"arrow",inst,&arrow); _getobj(obj,"arrow_length",inst,&alength); _getobj(obj,"arrow_width",inst,&awidth); alen=aconf->width*(double )alength/10000; awid=aconf->width*(double )awidth/20000; if ((arrow==ARROW_POSITION_BEGIN) || (arrow==ARROW_POSITION_BOTH)) { dx=-cos(aconf->dir); dy=sin(aconf->dir); ap[0]=nround(aconf->x0-dy*awid); ap[1]=nround(aconf->y0+dx*awid); ap[2]=nround(aconf->x0+dx*alen); ap[3]=nround(aconf->y0+dy*alen); ap[4]=nround(aconf->x0+dy*awid); ap[5]=nround(aconf->y0-dx*awid); GRAlinestyle(GC,0,NULL,1,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); GRAdrawpoly(GC,3,ap,GRA_FILL_MODE_EVEN_ODD); } if ((arrow==ARROW_POSITION_END) || (arrow==ARROW_POSITION_BOTH)) { dx=cos(aconf->dir); dy=-sin(aconf->dir); ap[0]=nround(aconf->x1-dy*awid); ap[1]=nround(aconf->y1+dx*awid); ap[2]=nround(aconf->x1+dx*alen); ap[3]=nround(aconf->y1+dy*alen); ap[4]=nround(aconf->x1+dy*awid); ap[5]=nround(aconf->y1-dx*awid); GRAlinestyle(GC,0,NULL,1,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); GRAdrawpoly(GC,3,ap,GRA_FILL_MODE_EVEN_ODD); } return 0; } static int axisdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; int fr, fg, fb, fa, w, h, bline; struct narray *style; int snum, *sdata; int clip, zoom; int hidden, hidden2; struct axis_config aconf; aconf.code = NULL; _getobj(obj,"hidden",inst,&hidden); hidden2=FALSE; _putobj(obj,"hidden",inst,&hidden2); if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _putobj(obj,"hidden",inst,&hidden); _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; if (hidden) goto exit; _getobj(obj,"R",inst,&fr); _getobj(obj,"G",inst,&fg); _getobj(obj,"B",inst,&fb); _getobj(obj,"A",inst,&fa); _getobj(obj,"x",inst,&aconf.x0); _getobj(obj,"y",inst,&aconf.y0); _getobj(obj,"direction",inst,&aconf.direction); _getobj(obj,"baseline",inst,&bline); _getobj(obj,"length",inst,&aconf.length); _getobj(obj,"width",inst,&aconf.width); _getobj(obj,"style",inst,&style); _getobj(obj,"clip",inst,&clip); snum=arraynum(style); sdata=arraydata(style); aconf.dir=aconf.direction/18000.0*MPI; aconf.x1=aconf.x0+nround(aconf.length*cos(aconf.dir)); aconf.y1=aconf.y0-nround(aconf.length*sin(aconf.dir)); alloc_axis_math(obj, inst, &aconf); GRAregion(GC,&w,&h,&zoom); GRAview(GC,0,0,w*10000.0/zoom,h*10000.0/zoom,clip); GRAcolor(GC,fr,fg,fb, fa); if (bline) { GRAlinestyle(GC,snum,sdata,aconf.width,GRA_LINE_CAP_PROJECTING,GRA_LINE_JOIN_MITER,1000); GRAline(GC,aconf.x0,aconf.y0,aconf.x1,aconf.y1); } draw_arrow(obj, inst, &aconf, GC); if (draw_wave(obj, inst, &aconf, GC)) goto exit; get_axis_parameter(obj, inst, &aconf); if (aconf.min == 0 && aconf.max == 0 && aconf.inc == 0) { int n, *ids; n = chkobjlastinst(obj) + 1; ids = g_malloc0(sizeof(*ids) * n); if (ids) { get_reference_parameter(obj, inst, &aconf, n, ids); g_free(ids); } } if (aconf.min != aconf.max && aconf.inc != 0 && draw_gauge(obj, inst, GC, &aconf)) { goto exit; } if (aconf.code == NULL) { get_axis_parameter(obj, inst, &aconf); } if (aconf.min != aconf.max && aconf.inc != 0) { numbering(obj, inst, GC, &aconf, NULL); } exit: free_axis_math(&aconf); return 0; } static int axis_get_numbering(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int GC; int hidden; struct axis_config aconf; struct narray *array; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; arrayfree2(rval->array); rval->array = NULL; _getobj(obj, "hidden", inst, &hidden); if (hidden) return 0; _getobj(obj, "GC", inst, &GC); if (GC < 0) return 0; _getobj(obj, "x", inst, &aconf.x0); _getobj(obj, "y", inst, &aconf.y0); _getobj(obj, "direction", inst, &aconf.direction); _getobj(obj, "length", inst, &aconf.length); _getobj(obj, "width", inst, &aconf.width); aconf.dir = aconf.direction / 18000.0 * MPI; aconf.x1 = aconf.x0+nround(aconf.length * cos(aconf.dir)); aconf.y1 = aconf.y0-nround(aconf.length * sin(aconf.dir)); alloc_axis_math(obj, inst, &aconf); get_axis_parameter(obj, inst, &aconf); if (aconf.min != aconf.max && aconf.inc != 0) { array = arraynew(sizeof(char *)); if (array == NULL) { free_axis_math(&aconf); return 1; } numbering(obj, inst, GC, &aconf, array); rval->array = array; } free_axis_math(&aconf); return 0; } static int axisclear(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { double min,max,inc; min=max=inc=0; if (_putobj(obj,"min",inst,&min)) return 1; if (_putobj(obj,"max",inst,&max)) return 1; if (_putobj(obj,"inc",inst,&inc)) return 1; return 0; } static int axisadjust(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *axis; int ad; struct objlist *aobj; int anum,id; struct narray iarray; N_VALUE *inst1; double min,max,inc,dir,po,dir1,x; int type,posx,posy,len,idir,posx1,posy1,div; struct axislocal alocal; int rcode; int first; int gx,gy,gx0,gy0,count; _getobj(obj,"x",inst,&posx1); _getobj(obj,"y",inst,&posy1); _getobj(obj,"direction",inst,&idir); _getobj(obj,"adjust_axis",inst,&axis); _getobj(obj,"adjust_position",inst,&ad); dir1=idir*MPI/18000; if (axis==NULL) return 0; arrayinit(&iarray,sizeof(int)); if (getobjilist(axis,&aobj,&iarray,FALSE,NULL)) return 1; anum=arraynum(&iarray); if (anum<1) { arraydel(&iarray); return 1; } id=arraylast_int(&iarray); arraydel(&iarray); if ((inst1=getobjinst(aobj,id))==NULL) return 1; if (_getobj(aobj,"min",inst1,&min)) return 1; if (_getobj(aobj,"max",inst1,&max)) return 1; if (_getobj(aobj,"inc",inst1,&inc)) return 1; if (_getobj(aobj,"div",inst1,&div)) return 1; if (_getobj(aobj,"type",inst1,&type)) return 1; if (_getobj(aobj,"x",inst1,&posx)) return 1; if (_getobj(aobj,"y",inst1,&posy)) return 1; if (_getobj(aobj,"length",inst1,&len)) return 1; if (_getobj(aobj,"direction",inst1,&idir)) return 1; dir=idir*MPI/18000; if (min==max) return 0; if (dir==dir1) return 0; if (getaxispositionini(&alocal,type,min,max,inc,div,FALSE)!=0) return 0; if (type==AXIS_TYPE_LOG) { min=log10(min); max=log10(max); } else if (type==AXIS_TYPE_INVERSE) { min=1/min; max=1/max; } gx0 = gy0 = 0; /* this initialization is added to avoid compile warnings. */ first=TRUE; count=0; while ((rcode=getaxisposition(&alocal,&po))!=-2) { if (rcode>=2) { count++; gx=posx+(po-min)*len/(max-min)*cos(dir); gy=posy-(po-min)*len/(max-min)*sin(dir); if (first) { gx0=gx; gy0=gy; first=FALSE; } if (((ad==0) && (po==0)) || (count==ad)) { gx0=gx; gy0=gy; } } } if (first) return 0; x=-sin(dir1)*(gx0-posx1)-cos(dir1)*(gy0-posy1); x=x/(-cos(dir)*sin(dir1)+sin(dir)*cos(dir1)); posx1=nround(posx1+x*cos(dir)); posy1=nround(posy1-x*sin(dir)); if (_putobj(obj,"x",inst,&posx1)) return 1; if (_putobj(obj,"y",inst,&posy1)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int axischangescale(struct objlist *obj,N_VALUE *inst, double *rmin,double *rmax,double *rinc,int room) { int type; double min,max,inc,ming,maxg,order; _getobj(obj,"type",inst,&type); ming=*rmin; maxg=*rmax; if (ming>maxg) { double a; a=ming; ming=maxg; maxg=a; } if (type==AXIS_TYPE_LOG) { if (ming<=0) return 1; if (maxg<=0) return 1; ming=log10(ming); maxg=log10(maxg); } else if (type==AXIS_TYPE_INVERSE) { if (ming*maxg<=0) return 1; } order=(fabs(ming)+fabs(maxg))*0.5; if (order==0) { maxg=1; ming=-1; } else if (fabs(maxg-ming)/order<1e-6) { maxg=maxg+order*0.5; ming=ming-order*0.5; } inc=scale(maxg-ming); if (room > 0) { max=maxg+(maxg-ming) * (room * 0.0001); max=nraise(max/inc*10)*inc/10; min=ming-(maxg-ming) * (room * 0.0001); min=cutdown(min/inc*10)*inc/10; if (type==AXIS_TYPE_LOG) { max=pow(10.0,max); min=pow(10.0,min); max=log10(nraise(max/scale(max))*scale(max)); min=log10(cutdown(min/scale(min)+1e-15)*scale(min)); } else if (type==AXIS_TYPE_INVERSE) { if (ming*min<=0) min=ming; if (maxg*max<=0) max=maxg; } } else { max=maxg; min=ming; } if (min==max) max=min+1; if (type!=AXIS_TYPE_INVERSE) { double mmin; inc=scale(max-min); if (max0) inc/=10; } else { inc=scale(max-min); } if ((type!=AXIS_TYPE_LOG) && (inc==0)) inc=1; if (type==AXIS_TYPE_LOG) inc=nround(inc); inc=fabs(inc); if (type==AXIS_TYPE_LOG) { min=pow(10.0,min); max=pow(10.0,max); inc=pow(10.0,inc); } *rmin=min; *rmax=max; *rinc=inc; return 0; } static int axisscale(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int type,room; double min,max,inc; _getobj(obj,"type",inst,&type); min = arg_to_double(argv, 2); max = arg_to_double(argv, 3); room=*(int *)argv[4]; axischangescale(obj,inst,&min,&max,&inc,room); if (_putobj(obj,"min",inst,&min)) return 1; if (_putobj(obj,"max",inst,&max)) return 1; if (_putobj(obj,"inc",inst,&inc)) return 1; return 0; } static int axiscoordinate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y,dx,dy,type,dir,len; double min,max,c,t,val; _getobj(obj,"type",inst,&type); _getobj(obj,"min",inst,&min); _getobj(obj,"max",inst,&max); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"length",inst,&len); _getobj(obj,"direction",inst,&dir); if (min==max) return 1; if (len==0) return 1; dx=*(int *)argv[2]; dy=*(int *)argv[3]; c=dir/18000.0*MPI; t=-(x-dx)*cos(c)+(y-dy)*sin(c); if (type==AXIS_TYPE_LOG) { if (min<=0) return 1; if (max<=0) return 1; min=log10(min); max=log10(max); } else if (type==AXIS_TYPE_INVERSE) { if (min*max<=0) return 1; min=1.0/min; max=1.0/max; } val=min+(max-min)*t/len; if (type==AXIS_TYPE_LOG) { val=pow(10.0,val); } else if (type==AXIS_TYPE_INVERSE) { if (val==0) return 1; val=1.0/val; } rval->d=val; return 0; } static int axisautoscalefile(struct objlist *obj,N_VALUE *inst,char *fileobj,double *rmin,double *rmax) { struct objlist *fobj; int fnum; int *fdata; struct narray iarray; double min,max,min1,max1; int i,id,set; char buf[20], msgbuf[64], *group; char *argv2[4]; struct narray *minmax; arrayinit(&iarray,sizeof(int)); if (getobjilist(fileobj,&fobj,&iarray,FALSE,NULL)) return 1; fnum=arraynum(&iarray); fdata=arraydata(&iarray); _getobj(obj,"id",inst,&id); snprintf(buf, sizeof(buf), "axis:%d",id); _getobj(obj,"group",inst,&group); argv2[0]=(void *)buf; argv2[1]=NULL; min = max = 0; /* this initialization is added to avoid compile warnings. */ set=FALSE; for (i=0;i=2) { min1=arraynget_double(minmax,0); max1=arraynget_double(minmax,1); if (!set) { min=min1; max=max1; set=TRUE; } else { if (min1max) max=max1; } } } arraydel(&iarray); if (!set) return 1; *rmin=min; *rmax=max; return 0; } static int axisautoscale(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *fileobj; int room; double omin,omax,oinc; double min,max,inc; fileobj=(char *)argv[2]; _getobj(obj,"auto_scale_margin",inst,&room); if (axisautoscalefile(obj,inst,fileobj,&min,&max)) return 0; axischangescale(obj,inst,&min,&max,&inc,room); _getobj(obj,"min",inst,&omin); _getobj(obj,"max",inst,&omax); _getobj(obj,"inc",inst,&oinc); if (omin==omax) { if (_putobj(obj,"min",inst,&min)) return 1; if (_putobj(obj,"max",inst,&max)) return 1; } if (oinc==0) { if (_putobj(obj,"inc",inst,&inc)) return 1; } return 0; } static int axisgetautoscale(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *fileobj; int room; double min,max,inc; struct narray *result; result=rval->array; arrayfree(result); rval->array=NULL; fileobj=(char *)argv[2]; _getobj(obj,"auto_scale_margin",inst,&room); if (axisautoscalefile(obj,inst,fileobj,&min,&max)==0) { axischangescale(obj,inst,&min,&max,&inc,room); result=arraynew(sizeof(double)); arrayadd(result,&min); arrayadd(result,&max); arrayadd(result,&inc); rval->array=result; } return 0; } static int axisautoscale_margin(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { int room; room = * (int *) argv[2]; if (room < 0) { * (int *) argv[2] = 0; } else if (room > 100000) { * (int *) argv[2] = 100000; } return 0; } static int axistight(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { obj_do_tighten(obj, inst, "reference"); obj_do_tighten(obj, inst, "adjust_axis"); return 0; } static void set_group(struct objlist *obj, int gnum, int id, char axis, char type) { char *group, *group2; N_VALUE *inst2; inst2 = chkobjinst(obj, id); if (inst2 == NULL) { return; } group = g_strdup_printf("%c%c%d", type, axis, gnum); if (group) { _getobj(obj, "group", inst2, &group2); g_free(group2); _putobj(obj, "group", inst2, group); } group = g_strdup_printf("%c%c%d", type, axis, gnum); if (group) { _getobj(obj, "name", inst2, &group2); g_free(group2); _putobj(obj, "name", inst2, group); } } static int axisgrouping(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct narray *iarray; int *data; int num,gnum; char type; iarray = (struct narray *)argv[2]; num = arraynum(iarray); if (num < 1) return 1; data = arraydata(iarray); switch (data[0]) { case AXIS_TYPE_FRAME: type='f'; break; case AXIS_TYPE_SECTION: type='s'; break; case AXIS_TYPE_CROSS: type='c'; break; default: error(obj, ERRGROUPING); return 1; } gnum = axisuniqgroup(obj, type); switch (data[0]) { case AXIS_TYPE_FRAME: case AXIS_TYPE_SECTION: if (num < 5) return 1; set_group(obj, gnum, data[1], 'X', type); set_group(obj, gnum, data[2], 'Y', type); set_group(obj, gnum, data[3], 'U', type); set_group(obj, gnum, data[4], 'R', type); break; case AXIS_TYPE_CROSS: if (num<3) return 1; set_group(obj, gnum, data[1], 'X', type); set_group(obj, gnum, data[2], 'Y', type); } return 0; } static void set_group_pos(struct objlist *obj, int id, int x, int y, int len, int dir) { N_VALUE *inst2; inst2 = chkobjinst(obj, id); if (inst2 == NULL) return; _putobj(obj, "direction", inst2, &dir); _putobj(obj, "x", inst2, &x); _putobj(obj, "y", inst2, &y); _putobj(obj, "length", inst2, &len); if (clear_bbox(obj, inst2)) return; } static int axisgrouppos(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int x, y, lx, ly; struct narray *iarray; int *data; int anum; iarray = (struct narray *)argv[2]; anum = arraynum(iarray); if (anum < 1) return 1; data = arraydata(iarray); switch (data[0]) { case AXIS_TYPE_FRAME: case AXIS_TYPE_SECTION: if (anum < 9) return 1; x = data[5]; y = data[6]; lx = data[7]; ly = data[8]; set_group_pos(obj, data[1], x, y, lx, 0); set_group_pos(obj, data[2], x, y, ly, 9000); set_group_pos(obj, data[3], x, y - ly, lx, 0); set_group_pos(obj, data[4], x + lx, y, ly, 9000); break; case AXIS_TYPE_CROSS: if (anum < 7) return 1; x = data[3]; y = data[4]; lx = data[5]; ly = data[6]; set_group_pos(obj, data[1], x, y, lx, 0); set_group_pos(obj, data[2], x, y, ly, 9000); break; } return 0; } static void axis_default(struct objlist *obj, int id, int *oid, int dir, enum AXIS_GAUGE gauge, enum AXIS_NUM_POS num, enum AXIS_NUM_ALIGN align, char *conf) { N_VALUE *inst2; inst2 = chkobjinst(obj, id); if (inst2 == NULL) return; _putobj(obj, "gauge", inst2, &gauge); _putobj(obj, "num", inst2, &num); _putobj(obj, "num_align", inst2, &align); _putobj(obj, "direction", inst2, &dir); if (oid) _getobj(obj, "oid", inst2, oid); if (conf) axisloadconfig(obj, inst2, conf); } static void axis_default_set(struct objlist *obj, int id, int oid, char *field, char *conf) { N_VALUE *inst2; char *ref, *ref2; inst2 = chkobjinst(obj, id); if (inst2 == NULL) return; ref = g_strdup_printf("axis:^%d", oid); if (ref == NULL) return; _getobj(obj, field, inst2, &ref2); g_free(ref2); _putobj(obj, field, inst2, ref); axisloadconfig(obj, inst2, conf); } static void axis_default_set_ref(struct objlist *obj, int id, int oid, char *conf) { axis_default_set(obj, id, oid, "reference", conf); } static void axis_default_set_adj(struct objlist *obj, int id, int oid, char *conf) { axis_default_set(obj, id, oid, "adjust_axis", conf); } static int axisdefgrouping(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { int oidx, oidy; struct narray *iarray; int *data; int anum; if (axisgrouping(obj, inst, rval, argc, argv)) return 1; iarray = (struct narray *) argv[2]; anum = arraynum(iarray); if (anum < 1) return 1; data = arraydata(iarray); switch (data[0]) { case AXIS_TYPE_FRAME: if (anum < 5) return 1; axis_default(obj, data[1], &oidx, 0, AXIS_GAUGE_LEFT, AXIS_NUM_POS_RIGHT, AXIS_NUM_ALIGN_CENTER, "[axis_fX]"); axis_default(obj, data[2], &oidy, 9000, AXIS_GAUGE_RIGHT, AXIS_NUM_POS_LEFT, AXIS_NUM_ALIGN_RIGHT, "[axis_fY]"); axis_default(obj, data[3], NULL, 0, AXIS_GAUGE_RIGHT, AXIS_NUM_POS_LEFT, AXIS_NUM_ALIGN_CENTER, NULL); axis_default(obj, data[4], NULL, 9000, AXIS_GAUGE_LEFT, AXIS_NUM_POS_RIGHT, AXIS_NUM_ALIGN_LEFT, NULL); axis_default_set_ref(obj, data[3], oidx, "[axis_fU]"); axis_default_set_ref(obj, data[4], oidy, "[axis_fR]"); if (anum < 9) return 0; break; case AXIS_TYPE_SECTION: if (anum < 5) return 1; axis_default(obj, data[1], &oidx, 0, AXIS_GAUGE_NONE, AXIS_NUM_POS_RIGHT, AXIS_NUM_ALIGN_CENTER, "[axis_sX]"); axis_default(obj, data[2], &oidy, 9000, AXIS_GAUGE_NONE, AXIS_NUM_POS_LEFT, AXIS_NUM_ALIGN_RIGHT, "[axis_sY]"); axis_default(obj, data[3], NULL, 0, AXIS_GAUGE_NONE, AXIS_NUM_POS_LEFT, AXIS_NUM_ALIGN_CENTER, NULL); axis_default(obj, data[4], NULL, 9000, AXIS_GAUGE_NONE, AXIS_NUM_POS_RIGHT, AXIS_NUM_ALIGN_LEFT, NULL); axis_default_set_ref(obj, data[3], oidx, "[axis_sU]"); axis_default_set_ref(obj, data[4], oidy, "[axis_sR]"); if (anum < 9) return 0; break; case AXIS_TYPE_CROSS: if (anum < 3) return 1; axis_default(obj, data[1], &oidx, 0, AXIS_GAUGE_BOTH, AXIS_NUM_POS_RIGHT, AXIS_NUM_ALIGN_CENTER, NULL); axis_default(obj, data[2], &oidy, 9000, AXIS_GAUGE_BOTH, AXIS_NUM_POS_LEFT, AXIS_NUM_ALIGN_RIGHT, NULL); axis_default_set_adj(obj, data[1], oidy, "[axis_cX]"); axis_default_set_adj(obj, data[2], oidx, "[axis_cY]"); if (anum < 7) return 0; break; default: return 1; } if (axisgrouppos(obj, inst, rval, argc, argv)) return 1; return 0; } static int axis_save_group(struct objlist *obj, int type, N_VALUE **inst_array, N_VALUE *rval) { char *str; int i, n, id; GString *s; switch (type) { case 'f': str = "\naxis::grouping 1 "; n = 4; break; case 's': str = "\naxis::grouping 2 "; n = 4; break; case 'c': str = "\naxis::grouping 3 "; n = 2; break; default: /* never reached */ return 1; } s = g_string_sized_new(64); if (s == NULL) return 1; if (rval->str) { g_string_append(s, rval->str); } g_string_append(s, str); for (i = 0; i < n; i++) { _getobj(obj, "id", inst_array[i], &id); g_string_append_printf(s, "%d%c", id, (i == n - 1) ? '\n' : ' '); } g_free(rval->str); rval->str = g_string_free(s, FALSE); return 0; } static int axissave(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int i, r, anum, type; struct narray *array; char **adata; N_VALUE *inst_array[INST_ARRAY_NUM]; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; array = (struct narray *) argv[2]; anum = arraynum(array); adata = arraydata(array); for (i = 0; i < anum; i++) { if (strcmp("grouping", adata[i]) == 0) return 0; } type = get_axis_group_type(obj, inst, inst_array, FALSE); r = 0; switch (type) { case 'a': break; case 'f': case 's': case 'c': r = axis_save_group(obj, type, inst_array, rval); break; } return r; } int axis_get_group(struct objlist *obj, N_VALUE *inst, struct AxisGroupInfo *info) { int i, lastinst, n; char *group, *group2; N_VALUE *inst2; char group3[20]; if (_getobj(obj, "group", inst, &group)) { return 1; } if (group == NULL || group[0] == 'a') { int id; _getobj(obj, "id", inst, &id); info->type = 'a'; info->num = 1; info->inst[0] = inst; info->id[0] = id; return 0; } lastinst = chkobjlastinst(obj); info->type = group[0]; strncpy(group3, group, sizeof(group3) - 1); group3[sizeof(group3) - 1] = '\0'; n = 0; for (i = lastinst; i >= 0; i--) { inst2 = chkobjinst(obj, i); _getobj(obj, "group", inst2, &group2); if (group2 && group2[0] == info->type && strcmp(group3 + 2, group2 + 2) == 0) { info->id[n] = i; info->inst[n] = inst2; n++; if (n >= AXIS_GROUPE_NUM_MAX) { break; } } } info->num = n; return 0; } static int axismanager(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int i,id,lastinst; char *group,*group2; char type; _getobj(obj,"id",inst,&id); _getobj(obj,"group",inst,&group); if ((group==NULL) || (group[0]=='a')) { rval->i=id; return 0; } lastinst=chkobjlastinst(obj); id=-1; type=group[0]; for (i=0;i<=lastinst;i++) { N_VALUE *inst2; inst2=chkobjinst(obj,i); _getobj(obj,"group",inst2,&group2); if ((group2!=NULL) && (group2[0]==type) && (strcmp(group+2,group2+2)==0)) id=i; } rval->i=id; return 0; } static int axisscalepush(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; int num; double min,max,inc,*data; _getobj(obj,"min",inst,&min); _getobj(obj,"max",inst,&max); _getobj(obj,"inc",inst,&inc); if ((min==0) && (max==0) && (inc==0)) return 0; _getobj(obj,"scale_history",inst,&array); if (array==NULL) { if ((array=arraynew(sizeof(double)))==NULL) return 1; if (_putobj(obj,"scale_history",inst,array)) { arrayfree(array); return 1; } } num=arraynum(array); data=arraydata(array); if ((num>=3) && (data[0]==min) && (data[1]==max) && (data[2]==inc)) return 0; if (num > AXIS_HISTORY_NUM) { arrayndel(array, AXIS_HISTORY_NUM - 1); arrayndel(array, AXIS_HISTORY_NUM - 2); arrayndel(array, AXIS_HISTORY_NUM - 3); } arrayins(array,&inc,0); arrayins(array,&max,0); arrayins(array,&min,0); return 0; } static int axisscalepop(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; int num; double *data; _getobj(obj,"scale_history",inst,&array); if (array==NULL) return 0; num=arraynum(array); data=arraydata(array); if (num>=3) { _putobj(obj,"min",inst,&(data[0])); _putobj(obj,"max",inst,&(data[1])); _putobj(obj,"inc",inst,&(data[2])); arrayndel(array,2); arrayndel(array,1); arrayndel(array,0); } if (arraynum(array)==0) { arrayfree(array); _putobj(obj,"scale_history",inst,NULL); } return 0; } static int anumnozeroput(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int type; type = * (int *) argv[2]; switch (type) { case AXIS_NUM_NO_ZERO_REGULAR: case AXIS_NUM_NO_ZERO_NO_ZERO: case AXIS_NUM_NO_ZERO_NO_FLOATING_POINT: break; case AXIS_NUM_NO_ZERO_TRUE: * (int *) argv[2] = AXIS_NUM_NO_ZERO_NO_ZERO; break; case AXIS_NUM_NO_ZERO_FALSE: * (int *) argv[2] = AXIS_NUM_NO_ZERO_REGULAR; break; } return 0; } static int anumdirput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { int type; type = * (int *) argv[2]; switch (type) { case AXIS_NUM_POS_HORIZONTAL: case AXIS_NUM_POS_PARALLEL1: case AXIS_NUM_POS_PARALLEL2: case AXIS_NUM_POS_NORMAL1: case AXIS_NUM_POS_NORMAL2: case AXIS_NUM_POS_OBLIQUE1: case AXIS_NUM_POS_OBLIQUE2: break; case AXIS_NUM_POS_NORMAL: * (int *) argv[2] = AXIS_NUM_POS_HORIZONTAL; break; case AXIS_NUM_POS_PARALLEL: * (int *) argv[2] = AXIS_NUM_POS_PARALLEL1; break; default: * (int *) argv[2] = AXIS_NUM_POS_HORIZONTAL; break; } return 0; } static int num_put_math(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { MathEquation *code; char *math; math = argv[2]; if (math == NULL) { return 0; } g_strstrip(math); if (math[0] == '\0') { g_free(argv[2]); argv[2] = NULL; return 0; } code = get_axis_math(obj, math); if (code) { math_equation_free(code); return 0; } return 1; } static int put_gauge_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return put_hsb_color(obj, inst, argc, argv, "gauge_%c"); } static int put_num_hsb(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return put_hsb_color(obj, inst, argc, argv, "num_%c"); } static int axissaveconfig(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return obj_save_config(obj, inst, AXIS_CONFIG_TITLE, AxisConfig, G_N_ELEMENTS(AxisConfig)); } static struct objtable axis_obj[] = { {"init",NVFUNC,NEXEC,axisinit,NULL,0}, {"done",NVFUNC,NEXEC,axisdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"group",NSTR,NREAD,NULL,NULL,0}, {"min",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"max",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"inc",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"div",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"type",NENUM,NREAD|NWRITE,NULL,axistypechar,0}, {"x",NINT,NREAD|NWRITE,axisgeometry,NULL,0}, {"y",NINT,NREAD|NWRITE,axisgeometry,NULL,0}, {"direction",NINT,NREAD|NWRITE,axisdirection,NULL,0}, {"baseline",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"length",NINT,NREAD|NWRITE,axisgeometry,NULL,0}, {"width",NINT,NREAD|NWRITE,NULL,NULL,0}, {"style",NIARRAY,NREAD|NWRITE,NULL,NULL,0}, {"auto_scale_margin",NINT,NREAD|NWRITE,axisautoscale_margin,NULL,0}, {"adjust_axis",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"adjust_position",NINT,NREAD|NWRITE,NULL,NULL,0}, {"arrow",NENUM,NREAD|NWRITE,NULL,arrowchar,0}, {"arrow_length",NINT,NREAD|NWRITE,axisput,NULL,0}, {"arrow_width",NINT,NREAD|NWRITE,axisput,NULL,0}, {"wave",NENUM,NREAD|NWRITE,NULL,arrowchar,0}, {"wave_length",NINT,NREAD|NWRITE,axisput,NULL,0}, {"wave_width",NINT,NREAD|NWRITE,axisput,NULL,0}, {"reference",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"gauge",NENUM,NREAD|NWRITE,NULL,axisgaugechar,0}, {"gauge_min",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"gauge_max",NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"gauge_style",NIARRAY,NREAD|NWRITE,NULL,NULL,0}, {"gauge_length1",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"gauge_width1",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"gauge_length2",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"gauge_width2",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"gauge_length3",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"gauge_width3",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"gauge_R",NINT,NREAD|NWRITE,NULL,NULL,0}, {"gauge_G",NINT,NREAD|NWRITE,NULL,NULL,0}, {"gauge_B",NINT,NREAD|NWRITE,NULL,NULL,0}, {"gauge_A",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num",NENUM,NREAD|NWRITE,NULL,axisnumchar,0}, {"num_begin",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"num_step",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"num_num",NINT,NREAD|NWRITE,axisput,NULL,0}, {"num_auto_norm",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"num_head",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"num_format",NSTR,NREAD|NWRITE,axisput,NULL,0}, {"num_tail",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"num_log_pow",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"num_pt",NINT,NREAD|NWRITE,axisput,NULL,0}, {"num_space",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_font",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"num_font_style",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_script_size",NINT,NREAD|NWRITE,axisput,NULL,0}, {"num_align",NENUM,NREAD|NWRITE,NULL,anumalignchar,0}, {"num_no_zero",NENUM,NREAD|NWRITE,anumnozeroput,anumnozero,0}, {"num_direction",NENUM,NREAD|NWRITE,anumdirput,anumdirchar,0}, {"num_shift_p",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_shift_n",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_R",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_G",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_B",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_A",NINT,NREAD|NWRITE,NULL,NULL,0}, {"num_date_format",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"num_math",NSTR,NREAD|NWRITE,num_put_math,NULL,0}, {"scale_push",NVFUNC,NREAD|NEXEC,axisscalepush,"",0}, {"scale_pop",NVFUNC,NREAD|NEXEC,axisscalepop,"",0}, {"scale_history",NDARRAY,NREAD,NULL,NULL,0}, {"scale",NVFUNC,NREAD|NEXEC,axisscale,"ddi",0}, {"auto_scale",NVFUNC,NREAD|NEXEC,axisautoscale,"o",0}, {"get_auto_scale",NDAFUNC,NREAD|NEXEC,axisgetautoscale,"o",0}, {"clear",NVFUNC,NREAD|NEXEC,axisclear,"",0}, {"adjust",NVFUNC,NREAD|NEXEC,axisadjust,"",0}, {"draw",NVFUNC,NREAD|NEXEC,axisdraw,"i",0}, {"bbox",NIAFUNC,NREAD|NEXEC,axisbbox,"",0}, {"move",NVFUNC,NREAD|NEXEC,axismove,"ii",0}, {"rotate",NVFUNC,NREAD|NEXEC,axisrotate,"iiii",0}, {"flip",NVFUNC,NREAD|NEXEC,axisflip,"iii",0}, {"change",NVFUNC,NREAD|NEXEC,axischange,"iii",0}, {"zooming",NVFUNC,NREAD|NEXEC,axiszoom,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,axismatch,"iiiii",0}, {"coordinate",NDFUNC,NREAD|NEXEC,axiscoordinate,"ii",0}, {"tight",NVFUNC,NREAD|NEXEC,axistight,"",0}, {"grouping",NVFUNC,NREAD|NEXEC,axisgrouping,"ia",0}, {"default_grouping",NVFUNC,NREAD|NEXEC,axisdefgrouping,"ia",0}, {"group_position",NVFUNC,NREAD|NEXEC,axisgrouppos,"ia",0}, {"group_manager",NIFUNC,NREAD|NEXEC,axismanager,"",0}, {"get_numbering",NSAFUNC,NREAD|NEXEC,axis_get_numbering,"",0}, {"save",NSFUNC,NREAD|NEXEC,axissave,"sa",0}, {"hsb", NVFUNC, NREAD|NEXEC, put_hsb,"ddd",0}, {"gauge_hsb", NVFUNC, NREAD|NEXEC, put_gauge_hsb,"ddd",0}, {"num_hsb", NVFUNC, NREAD|NEXEC, put_num_hsb,"ddd",0}, {"save_config",NVFUNC,NREAD|NEXEC,axissaveconfig,"",0}, /* following fields exist for backward compatibility */ {"num_jfont",NSTR,NWRITE,NULL,NULL,0}, }; #define TBLNUM (sizeof(axis_obj) / sizeof(*axis_obj)) void * addaxis(void) /* addaxis() returns NULL on error */ { if (AxisConfigHash == NULL) { unsigned int i; AxisConfigHash = nhash_new(); if (AxisConfigHash == NULL) return NULL; for (i = 0; i < sizeof(AxisConfig) / sizeof(*AxisConfig); i++) { if (nhash_set_ptr(AxisConfigHash, AxisConfig[i].name, (void *) &AxisConfig[i])) { nhash_free(AxisConfigHash); return NULL; } } } return addobject(NAME, NULL, PARENT, OVERSION, TBLNUM, axis_obj, ERRNUM, axiserrorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/math/0000755000175000017500000000000014143613314012456 500000000000000ngraph-gtk-6.09.05/src/math/math_constant.h0000644000175000017500000000077413674050433015426 00000000000000#ifndef MATH_SCANNER_CONST_HEADER #define MATH_SCANNER_CONST_HEADER #include "math_expression.h" #include "math_equation.h" enum MATH_SCANNER_VAL_TYPE { MATH_SCANNER_VAL_TYPE_NORMAL, MATH_SCANNER_VAL_TYPE_UNKNOWN }; struct math_const_parameter { char *str; enum MATH_SCANNER_VAL_TYPE type; MathValue val; }; int math_scanner_is_const(int chr); enum MATH_SCANNER_VAL_TYPE math_scanner_check_math_const_parameter(char *str, MathValue *val); int math_add_basic_constant(MathEquation *eq); #endif ngraph-gtk-6.09.05/src/math/math_parser.c0000644000175000017500000010772714102476313015066 00000000000000/* * $Id: math_parser.c,v 1.19 2010-03-04 08:30:17 hito Exp $ * */ #include "config.h" #include #include #include #include #include #include "object.h" #include "math_equation.h" #include "math_scanner.h" #include "math_function.h" #include "parse_bin_expression.h" #define MATH_ARG_NUM 16 #define DEBUG 1 MathValue MATH_VALUE_ZERO = {0.0, MATH_VALUE_NORMAL}; static struct math_token *st_look_ahead_token = NULL; static MathExpression * parse_expression(struct math_string *mstr, MathEquation *eq, int *err); static MathExpression * parse_expression_list(struct math_string *mstr, MathEquation *eq, int inside_block, int *err); static MathExpression * parse_unary_expression(struct math_string *mstr, MathEquation *eq, int *err); static MathExpression * parse_block_expression(struct math_string *str, MathEquation *eq, int *err); struct parsing_info { struct math_string str; struct math_token *st_look_ahead_token; MathExpression *exp; }; static struct math_token * my_get_token(struct math_string *str, MathEquation *eq) { struct math_token *token; if (st_look_ahead_token) { token = st_look_ahead_token; st_look_ahead_token = token->next; token->next = NULL; } else { token = math_scanner_get_token(str, eq); } return token; } static void unget_token(struct math_token *token) { token->next = st_look_ahead_token; st_look_ahead_token = token; } static void free_token(struct math_token *token) { struct math_token *tmp; while (token) { tmp = token->next; math_scanner_free_token(token); token = tmp; } } static void reset_token(struct math_token *cur) { free_token(st_look_ahead_token); st_look_ahead_token = cur; } static struct math_token * dup_token(struct math_token *token) { struct math_token *new_token; new_token = math_scanner_dup_token(token); if (token->next) { new_token->next = dup_token(token->next); } return new_token; } static struct parsing_info * save_parsing_info(struct math_string *str, MathExpression *exp) { struct parsing_info *info; info = g_malloc0(sizeof(*info)); if (info == NULL) { return NULL; } info->str = *str; if (st_look_ahead_token) { info->st_look_ahead_token = dup_token(st_look_ahead_token); if (info->st_look_ahead_token == NULL) { g_free(info); return NULL; } } info->exp = exp; return info; } static void free_parsing_info(struct parsing_info *info) { if (info == NULL) { return; } if (info->st_look_ahead_token) { free_token(info->st_look_ahead_token); } g_free(info); } static MathExpression * restore_parsing_info(struct parsing_info *info, struct math_string *str) { if (info == NULL) { return NULL; } *str = info->str; reset_token(info->st_look_ahead_token); info->st_look_ahead_token = NULL; return info->exp; } static MathExpression * parse_array_expression(struct math_string *str, MathEquation *eq, const char *name, int is_string, int *err) { struct math_token *token; MathExpression *operand, *exp; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return NULL; } math_scanner_free_token(token); operand = parse_expression(str, eq, err); if (operand == NULL) return NULL; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(operand); return NULL; } if (token->type != MATH_TOKEN_TYPE_RB) { *err = MATH_ERROR_MISS_RB; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(operand); return NULL; } math_scanner_free_token(token); exp = math_array_expression_new(eq, name, operand, is_string, err); if (exp == NULL) { math_expression_free(operand); return NULL; } return exp; } static MathExpression * parse_primary_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token, *token2; MathExpression *exp; MathValue val; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_NUMERIC: val.val = token->data.val.dnum; val.type = MATH_VALUE_NORMAL; exp = math_double_expression_new(eq, &val, err); break; case MATH_TOKEN_TYPE_DOUBLE_QUOTED_STRING: exp = math_string_expression_new(eq, token->data.str->str, TRUE, err); if (exp == NULL) { math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; } break; case MATH_TOKEN_TYPE_SINGLE_QUOTED_STRING: exp = math_string_expression_new(eq, token->data.str->str, FALSE, err); break; case MATH_TOKEN_TYPE_UNTERMINATED_STRING: *err = MATH_ERROR_UNTERMINATED_STRING; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; case MATH_TOKEN_TYPE_STRING_VARIABLE: token2 = my_get_token(str, eq); unget_token(token2); if (token2->type == MATH_TOKEN_TYPE_LB) { exp = parse_array_expression(str, eq, token->data.sym, TRUE, err); if (exp == NULL) { math_scanner_free_token(token); return NULL; } } else { exp = math_string_variable_expression_new(eq, token->data.sym, err); } break; case MATH_TOKEN_TYPE_SYMBOL: token2 = my_get_token(str, eq); unget_token(token2); if (token2->type == MATH_TOKEN_TYPE_LB) { exp = parse_array_expression(str, eq, token->data.sym, FALSE, err); if (exp == NULL) { math_scanner_free_token(token); return NULL; } } else { exp = math_constant_expression_new(eq, token->data.sym, err); if (exp == NULL) { if (token->data.sym[0] == '%') { exp = math_parameter_expression_new(eq, token->data.sym, err); if (exp == NULL) { math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; } #if 0 /* length of a variable expression is less than 3 other than start with "_". */ } else if (token->data.sym[0] == '_' || strlen(token->data.sym) < 3) { exp = math_variable_expression_new(eq, token->data.sym, err); } else { *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; #else /* length of a variable expression is not fixed. */ } else { exp = math_variable_expression_new(eq, token->data.sym, err); #endif } } } break; case MATH_TOKEN_TYPE_LP: math_scanner_free_token(token); exp = parse_expression(str, eq, err); if (exp == NULL) return NULL; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } if (token->type != MATH_TOKEN_TYPE_RP) { *err = MATH_ERROR_MISS_RP; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(exp); return NULL; } break; case MATH_TOKEN_TYPE_LC: exp = parse_block_expression(str, eq, err); break; case MATH_TOKEN_TYPE_EOEQ_ASSIGN: case MATH_TOKEN_TYPE_EOEQ: *err = MATH_ERROR_EOEQ; math_scanner_free_token(token); return NULL; default: *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; } math_scanner_free_token(token); return exp; } static void free_arg_list(MathExpression **argv) { int i; for (i = 0; argv[i]; i++) { math_expression_free(argv[i]); } } static MathExpression * get_argument(struct math_string *str, MathEquation *eq, struct math_function_parameter *fprm, int i, int *err) { MathExpression *exp; int argc; argc = math_function_get_arg_type_num(fprm); if (fprm->arg_type && i < argc) { struct math_token *token; switch (fprm->arg_type[i]) { case MATH_FUNCTION_ARG_TYPE_ARRAY: token = my_get_token(str, eq); if (token->type != MATH_TOKEN_TYPE_SYMBOL) { *err = MATH_ERROR_INVALID_ARG; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); /* invalid argument */ return NULL; } exp = math_array_argument_expression_new(eq, token->data.sym, err); math_scanner_free_token(token); break; case MATH_FUNCTION_ARG_TYPE_STRING_ARRAY: token = my_get_token(str, eq); if (token->type != MATH_TOKEN_TYPE_STRING_VARIABLE) { *err = MATH_ERROR_INVALID_ARG; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); /* invalid argument */ return NULL; } exp = math_string_array_argument_expression_new(eq, token->data.sym, err); math_scanner_free_token(token); break; case MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON: token = my_get_token(str, eq); if (token->type == MATH_TOKEN_TYPE_SYMBOL) { exp = math_array_argument_expression_new(eq, token->data.sym, err); math_scanner_free_token(token); } else if (token->type == MATH_TOKEN_TYPE_STRING_VARIABLE) { exp = math_string_array_argument_expression_new(eq, token->data.sym, err); math_scanner_free_token(token); } else { *err = MATH_ERROR_INVALID_ARG; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; /* invalid argument */ } break; default: exp = parse_expression(str, eq, err); break; } } else { exp = parse_expression(str, eq, err); } return exp; } static int parse_argument_list(struct math_string *str, MathEquation *eq, struct math_function_parameter *fprm, MathExpression ***buf, int argc, int *err) { struct math_token *token; int i, n; MathExpression *exp, **tmp, **argv; argv = *buf; token = my_get_token(str, eq); unget_token(token); if (token->type == MATH_TOKEN_TYPE_RP) { return 0; } n = 0; exp = get_argument(str, eq, fprm, n, err); if (exp == NULL) { return -1; } argv[0] = exp; argv[1] = NULL; for (i = 1; ; i++) { token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; free_arg_list(argv); return -1; } if (token->type != MATH_TOKEN_TYPE_COMMA) { unget_token(token); break; } math_scanner_free_token(token); n++; exp = get_argument(str, eq, fprm, n, err); if (exp == NULL) { free_arg_list(argv); return -1; } if (i >= argc) { int m; m = argc * 2 + 1; tmp = g_realloc(argv, m * sizeof(*argv)); if (tmp == NULL) { math_expression_free(exp); free_arg_list(argv); return -1; } argv = tmp; *buf = tmp; memset(argv + argc, 0, m - argc); argc = m - 1; } argv[i] = exp; argv[i + 1] = NULL; } *buf = argv; return i; } static MathExpression * create_math_func(struct math_string *str, MathEquation *eq, struct math_token *name, int *err) { struct math_function_parameter *fprm; int arg_max, argc, pos_id; MathExpression **argv, *exp; struct math_token *token; fprm = math_equation_get_func(eq, name->data.sym); if (fprm == NULL) { *err = MATH_ERROR_UNKNOWN_FUNC; math_equation_set_parse_error(eq, name->ptr, str); return NULL; } arg_max = (fprm->argc < 1) ? MATH_ARG_NUM : fprm->argc; argv = g_malloc0((arg_max + 1) * sizeof(*argv)); if (argv == NULL) { *err = MATH_ERROR_MEMORY; return NULL; } argc = parse_argument_list(str, eq, fprm, &argv, arg_max, err); if (argc < 0) { g_free(argv); return NULL; } token = my_get_token(str, eq); if (token->type != MATH_TOKEN_TYPE_RP) { *err = MATH_ERROR_MISS_RP; math_equation_set_parse_error(eq, token->ptr, str); free_arg_list(argv); g_free(argv); math_scanner_free_token(token); return NULL; } if (argc < fprm->argc) { int i; for (i = argc; i < fprm->argc; i++) { argv[i] = math_double_expression_new(eq, &MATH_VALUE_ZERO, err); if (argv[i] == NULL) { math_scanner_free_token(token); free_arg_list(argv); g_free(argv); return NULL; } } argc = fprm->argc; } else if (fprm->argc >= 0 && argc > fprm->argc) { *err = MATH_ERROR_ARG_NUM; math_equation_set_parse_error(eq, token->ptr, str); math_equation_set_func_arg_num_error(eq, fprm, argc); math_scanner_free_token(token); free_arg_list(argv); g_free(argv); return NULL; } pos_id = math_equation_add_pos_func(eq, fprm); if (pos_id == MATH_ERROR_INVALID_FUNC) { *err = MATH_ERROR_INVALID_FUNC; math_equation_set_parse_error(eq, token->ptr, str); math_equation_set_func_error(eq, fprm); math_scanner_free_token(token); free_arg_list(argv); g_free(argv); return NULL; } if (fprm->type == MATH_FUNCTION_TYPE_CALLBACK && eq->func_def) { *err = MATH_ERROR_INVALID_FUNC; math_equation_set_parse_error(eq, token->ptr, str); math_equation_set_func_error(eq, fprm); math_scanner_free_token(token); free_arg_list(argv); g_free(argv); return NULL; } exp = math_func_call_expression_new(eq, fprm, argc, argv, pos_id, err); if (exp == NULL) { if (*err == MATH_ERROR_INVALID_ARG) { math_equation_set_parse_error(eq, token->ptr, str); } math_scanner_free_token(token); free_arg_list(argv); g_free(argv); return NULL; } math_scanner_free_token(token); return exp; } static MathExpression * parse_func_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token1, *token2; MathExpression *exp; token1 = my_get_token(str, eq); if (token1 == NULL) { return NULL; } switch (token1->type) { case MATH_TOKEN_TYPE_SYMBOL: token2 = my_get_token(str, eq); if (token2 == NULL) { math_scanner_free_token(token1); return NULL; } switch (token2->type) { case MATH_TOKEN_TYPE_LP: exp = create_math_func(str, eq, token1, err); math_scanner_free_token(token2); math_scanner_free_token(token1); break; default: unget_token(token2); unget_token(token1); exp = parse_primary_expression(str, eq, err); } break; default: unget_token(token1); exp = parse_primary_expression(str, eq, err); } return exp; } static MathExpression * parse_factorial_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token; MathExpression *operand, *exp; exp = parse_func_expression(str, eq, err); if (exp == NULL) { return NULL; } for (;;) { token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_OPERATOR: switch (token->data.op) { case MATH_OPERATOR_TYPE_FACT: math_scanner_free_token(token); operand = exp; exp = math_unary_expression_new(MATH_EXPRESSION_TYPE_FACT, eq, operand, err); if (exp == NULL) { return NULL; } break; default: unget_token(token); goto End; } break; default: unget_token(token); goto End; } } End: return exp; } static MathExpression * parse_power_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token; MathExpression *left, *right, *exp; exp = parse_factorial_expression(str, eq, err); if (exp == NULL) { return NULL; } token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_OPERATOR: switch (token->data.op) { case MATH_OPERATOR_TYPE_POW: right = parse_unary_expression(str, eq, err); if (right == NULL) { math_scanner_free_token(token); return NULL; } left = exp; exp = math_binary_expression_new(MATH_EXPRESSION_TYPE_POW, eq, left, right, err); if (exp == NULL) { math_expression_free(left); math_expression_free(right); math_scanner_free_token(token); return NULL; } math_scanner_free_token(token); break; default: unget_token(token); goto End; } break; default: unget_token(token); goto End; } End: return exp; } static MathExpression * parse_unary_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token; MathExpression *exp, *operand; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_OPERATOR: switch (token->data.op) { case MATH_OPERATOR_TYPE_PLUS: exp = parse_unary_expression(str, eq, err); break; case MATH_OPERATOR_TYPE_MINUS: operand = parse_unary_expression(str, eq, err); if (operand == NULL) { math_scanner_free_token(token); return NULL; } exp = math_unary_expression_new(MATH_EXPRESSION_TYPE_MINUS, eq, operand, err); if (exp == NULL) { math_scanner_free_token(token); math_expression_free(operand); return NULL; } break; case MATH_OPERATOR_TYPE_FACT: operand = parse_unary_expression(str, eq, err); if (operand == NULL) { math_scanner_free_token(token); return NULL; } exp = math_unary_expression_new(MATH_EXPRESSION_TYPE_NOT, eq, operand, err); if (exp == NULL) { math_scanner_free_token(token); math_expression_free(operand); return NULL; } break; default: *err = MATH_ERROR_UNEXP_OPE; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); return NULL; } math_scanner_free_token(token); break; default: unget_token(token); exp = parse_power_expression(str, eq, err); } return exp; } static MathExpression * parse_multiplicative_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token; MathExpression *left, *right, *exp; enum MATH_EXPRESSION_TYPE type; exp = parse_unary_expression(str, eq, err); if (exp == NULL) { return NULL; } for (;;) { token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_OPERATOR: switch (token->data.op) { case MATH_OPERATOR_TYPE_MUL: case MATH_OPERATOR_TYPE_DIV: case MATH_OPERATOR_TYPE_MOD: right = parse_unary_expression(str, eq, err); if (right == NULL) { math_expression_free(exp); math_scanner_free_token(token); return NULL; } if (token->data.op == MATH_OPERATOR_TYPE_MUL) { type = MATH_EXPRESSION_TYPE_MUL; } else if (token->data.op == MATH_OPERATOR_TYPE_DIV) { type = MATH_EXPRESSION_TYPE_DIV; } else if (token->data.op == MATH_OPERATOR_TYPE_MOD) { type = MATH_EXPRESSION_TYPE_MOD; } else { type = 0; } left = exp; math_scanner_free_token(token); exp = math_binary_expression_new(type, eq, left, right, err); if (exp == NULL) { math_expression_free(left); math_expression_free(right); return NULL; } break; default: unget_token(token); goto End; } break; case MATH_TOKEN_TYPE_CONST: case MATH_TOKEN_TYPE_NUMERIC: case MATH_TOKEN_TYPE_SYMBOL: case MATH_TOKEN_TYPE_LP: case MATH_TOKEN_TYPE_LC: unget_token(token); right = parse_unary_expression(str, eq, err); if (right == NULL) { math_expression_free(exp); return NULL; } left = exp; exp = math_binary_expression_new(MATH_EXPRESSION_TYPE_MUL, eq, left, right, err); if (exp == NULL) { math_expression_free(left); math_expression_free(right); return NULL; } break; default: unget_token(token); goto End; } } End: return exp; } static MathExpression * CREATE_PARSER2_FUNC(additive, multiplicative, MATH_OPERATOR_TYPE_PLUS, MATH_EXPRESSION_TYPE_ADD, MATH_OPERATOR_TYPE_MINUS, MATH_EXPRESSION_TYPE_SUB); static MathExpression * CREATE_PARSER4_FUNC(relation, additive, MATH_OPERATOR_TYPE_GT, MATH_EXPRESSION_TYPE_GT, MATH_OPERATOR_TYPE_GE, MATH_EXPRESSION_TYPE_GE, MATH_OPERATOR_TYPE_LE, MATH_EXPRESSION_TYPE_LE, MATH_OPERATOR_TYPE_LT, MATH_EXPRESSION_TYPE_LT); static MathExpression * CREATE_PARSER2_FUNC(equality, relation, MATH_OPERATOR_TYPE_EQ, MATH_EXPRESSION_TYPE_EQ, MATH_OPERATOR_TYPE_NE, MATH_EXPRESSION_TYPE_NE); static MathExpression * CREATE_PARSER_FUNC(and, equality, MATH_OPERATOR_TYPE_AND, MATH_EXPRESSION_TYPE_AND); static MathExpression * CREATE_PARSER_FUNC(or, and, MATH_OPERATOR_TYPE_OR, MATH_EXPRESSION_TYPE_OR); static MathExpression * create_variable_assign_expression(MathEquation *eq, enum MATH_OPERATOR_TYPE op, MathExpression *lexp, MathExpression *rexp, int *err) { MathExpression *exp, *bin; bin = NULL; switch (op) { case MATH_OPERATOR_TYPE_ASSIGN: break; case MATH_OPERATOR_TYPE_POW_ASSIGN: bin = math_binary_expression_new(MATH_EXPRESSION_TYPE_POW, eq, lexp, rexp, err); if (bin == NULL) goto ErrEnd; rexp = bin; break; case MATH_OPERATOR_TYPE_MOD_ASSIGN: bin = math_binary_expression_new(MATH_EXPRESSION_TYPE_MOD, eq, lexp, rexp, err); if (bin == NULL) goto ErrEnd; rexp = bin; break; case MATH_OPERATOR_TYPE_DIV_ASSIGN: bin = math_binary_expression_new(MATH_EXPRESSION_TYPE_DIV, eq, lexp, rexp, err); if (bin == NULL) goto ErrEnd; rexp = bin; break; case MATH_OPERATOR_TYPE_MUL_ASSIGN: bin = math_binary_expression_new(MATH_EXPRESSION_TYPE_MUL, eq, lexp, rexp, err); if (bin == NULL) goto ErrEnd; rexp = bin; break; case MATH_OPERATOR_TYPE_PLUS_ASSIGN: bin = math_binary_expression_new(MATH_EXPRESSION_TYPE_ADD, eq, lexp, rexp, err); if (bin == NULL) goto ErrEnd; rexp = bin; break; case MATH_OPERATOR_TYPE_MINUS_ASSIGN: bin = math_binary_expression_new(MATH_EXPRESSION_TYPE_SUB, eq, lexp, rexp, err); if (bin == NULL) goto ErrEnd; rexp = bin; break; default: return NULL; } exp = math_expression_new(MATH_EXPRESSION_TYPE_VARIABLE, eq, err); if (exp == NULL) { math_expression_free(bin); return NULL; } exp->u.index = lexp->u.index; lexp = math_assign_expression_new(MATH_EXPRESSION_TYPE_ASSIGN, eq, exp, rexp, op, err); if (lexp == NULL) { math_expression_free(exp); math_expression_free(bin); } return lexp; ErrEnd: math_expression_free(lexp); math_expression_free(rexp); return NULL; } static MathExpression * parse_assign_expression(struct math_string *str, MathEquation *eq, enum MATH_OPERATOR_TYPE op, MathExpression *lexp, int *err) { MathExpression *exp, *rexp; rexp = parse_expression(str, eq, err); if (rexp == NULL) { return NULL; } if (lexp->type == MATH_EXPRESSION_TYPE_VARIABLE && op != MATH_OPERATOR_TYPE_ASSIGN) { exp = create_variable_assign_expression(eq, op, lexp, rexp, err); } else { exp = math_assign_expression_new(MATH_EXPRESSION_TYPE_ASSIGN, eq, lexp, rexp, op, err); if (exp == NULL) { math_expression_free(rexp); } } return exp; } static int parse_parameter_list(struct math_string *str, MathExpression *func, int *err) { struct math_token *token; enum MATH_FUNCTION_ARG_TYPE type; MathEquation *eq; eq = func->equation; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return 1; } if (token->type != MATH_TOKEN_TYPE_LP) { math_scanner_free_token(token); return 1; } math_scanner_free_token(token); token = my_get_token(str, eq); if (token->type == MATH_TOKEN_TYPE_RP) { return 0; } unget_token(token); for (;;) { token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return 1; } switch (token->type) { case MATH_TOKEN_TYPE_ARRAY_PREFIX: math_scanner_free_token(token); token = my_get_token(str, eq); if (token->type == MATH_TOKEN_TYPE_SYMBOL) { type = MATH_FUNCTION_ARG_TYPE_ARRAY; } else { type = MATH_FUNCTION_ARG_TYPE_STRING_ARRAY; } break; case MATH_TOKEN_TYPE_STRING_VARIABLE: type = MATH_FUNCTION_ARG_TYPE_STRING; break; default: type = MATH_FUNCTION_ARG_TYPE_DOUBLE; break; } if (token->type != MATH_TOKEN_TYPE_SYMBOL && token->type != MATH_TOKEN_TYPE_STRING_VARIABLE) { math_scanner_free_token(token); return 1; } if (math_function_expression_add_arg(func, token->data.sym, type)) { math_scanner_free_token(token); return 1; } math_scanner_free_token(token); token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return 1; } if (token->type != MATH_TOKEN_TYPE_COMMA) { unget_token(token); break; } math_scanner_free_token(token); } token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; return 1; } if (token->type != MATH_TOKEN_TYPE_RP) { math_scanner_free_token(token); return 1; } math_scanner_free_token(token); return 0; } static MathExpression * parse_block_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token; MathExpression *exp, *block; token = my_get_token(str, eq); if (token->type == MATH_TOKEN_TYPE_RC) { MathValue val; math_scanner_free_token(token); val.val = 0; val.type = MATH_VALUE_NORMAL; return math_double_expression_new(eq, &val, err); } unget_token(token); exp = parse_expression_list(str, eq, 1, err); if (exp == NULL) return NULL; token = my_get_token(str, eq); if (token->type != MATH_TOKEN_TYPE_RC) { *err = MATH_ERROR_MISS_RC; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(exp); return NULL; } math_scanner_free_token(token); block = math_expression_new(MATH_EXPRESSION_TYPE_BLOCK, eq, err); if (block == NULL) { math_expression_free(exp); return NULL; } block->u.exp = exp; return block; } static void free_func_prm(struct math_function_parameter *prm) { if (prm == NULL) return; if (prm->arg_type) { g_free(prm->arg_type); } if (prm->opt_usr) { math_expression_free(prm->opt_usr); } if (prm->name) { g_free(prm->name); } g_free(prm); } MathExpression * parse_func_def_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *fname; MathExpression *exp, *block; struct math_token *token; /* get name of the function */ fname = my_get_token(str, eq); if (fname == NULL) { return NULL; } if (fname->type != MATH_TOKEN_TYPE_SYMBOL) { math_scanner_free_token(fname); return NULL; } exp = math_function_expression_new(eq, fname->data.sym, err); if (exp == NULL) { math_scanner_free_token(fname); return NULL; } /* get parameters */ if (parse_parameter_list(str, exp, err)) { math_equation_finish_user_func_definition(eq, NULL, NULL, NULL, NULL); free_func_prm(exp->u.func.fprm); math_scanner_free_token(fname); math_expression_free(exp); return NULL; } if (math_function_expression_register_arg(exp)) { math_equation_finish_user_func_definition(eq, NULL, NULL, NULL, NULL); free_func_prm(exp->u.func.fprm); math_scanner_free_token(fname); math_expression_free(exp); } /* get block */ token = my_get_token(str, eq); if (token == NULL) { return NULL; } if (token->type != MATH_TOKEN_TYPE_LC) { math_scanner_free_token(token); return NULL; } math_scanner_free_token(token); block = parse_block_expression(str, eq, err); if (block == NULL) { math_equation_finish_user_func_definition(eq, NULL, NULL, NULL, NULL); free_func_prm(exp->u.func.fprm); math_scanner_free_token(fname); math_expression_free(exp); return NULL; } if (math_function_expression_set_function(eq, exp, fname->data.sym, block)) { math_equation_finish_user_func_definition(eq, NULL, NULL, NULL, NULL); free_func_prm(exp->u.func.fprm); math_scanner_free_token(fname); math_expression_free(exp); return NULL; } math_scanner_free_token(fname); return exp; } MathExpression * parse_const_def_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *cname, *token; MathExpression *exp, *cdef; if (eq->func_def) { *err = MATH_ERROR_INVALID_CDEF; return NULL; } /* get name of the constant */ cname = my_get_token(str, eq); if (cname == NULL) { return NULL; } if (cname->type != MATH_TOKEN_TYPE_SYMBOL) { *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, cname->ptr, str); math_scanner_free_token(cname); return NULL; } token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_scanner_free_token(cname); return NULL; } if ((token->type != MATH_TOKEN_TYPE_OPERATOR && token->type != MATH_TOKEN_TYPE_EOEQ_ASSIGN) || token->data.op != MATH_OPERATOR_TYPE_ASSIGN) { if (token->type == MATH_TOKEN_TYPE_EOEQ) { *err = MATH_ERROR_EOEQ; } else { *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, token->ptr, str); } math_scanner_free_token(token); math_scanner_free_token(cname); return NULL; } eq->func_def = TRUE; exp = parse_expression(str, eq, err); eq->func_def = FALSE; if (exp == NULL) { math_scanner_free_token(cname); math_scanner_free_token(token); return NULL; } cdef = math_constant_definition_expression_new(eq, cname->data.sym, exp, err); math_scanner_free_token(cname); if (cdef == NULL) { math_equation_set_parse_error(eq, token->ptr, str); math_expression_free(exp); math_scanner_free_token(token); return NULL; } math_scanner_free_token(token); return cdef; } static MathExpression * parse_string_assign_expression(struct math_string *str, MathEquation *eq, struct math_token *token, MathExpression *lexp, int *err) { MathExpression *exp, *rexp; if ((token->type != MATH_TOKEN_TYPE_OPERATOR && token->type != MATH_TOKEN_TYPE_EOEQ_ASSIGN) || token->data.op != MATH_OPERATOR_TYPE_ASSIGN) { *err = MATH_ERROR_UNEXP_OPE; math_equation_set_parse_error(eq, token->ptr, str); return NULL; } rexp = parse_expression(str, eq, err); if (rexp == NULL) { return NULL; } exp = math_assign_expression_new(MATH_EXPRESSION_TYPE_STRING_ASSIGN, eq, lexp, rexp, token->data.op, err); if (exp == NULL) { math_expression_free(rexp); return NULL; } return exp; } static MathExpression * parse_expression(struct math_string *str, MathEquation *eq, int *err) { struct math_token *token; MathExpression *exp; struct parsing_info *info; exp = parse_or_expression(str, eq, err); if (exp == NULL) return NULL; switch (exp->type) { case MATH_EXPRESSION_TYPE_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_VARIABLE: case MATH_EXPRESSION_TYPE_ARRAY: case MATH_EXPRESSION_TYPE_STRING_ARRAY: break; default: goto End; } token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_EOEQ_ASSIGN: case MATH_TOKEN_TYPE_OPERATOR: switch (token->data.op) { case MATH_OPERATOR_TYPE_POW_ASSIGN: case MATH_OPERATOR_TYPE_MOD_ASSIGN: case MATH_OPERATOR_TYPE_DIV_ASSIGN: case MATH_OPERATOR_TYPE_MUL_ASSIGN: case MATH_OPERATOR_TYPE_PLUS_ASSIGN: case MATH_OPERATOR_TYPE_MINUS_ASSIGN: if (exp->type == MATH_EXPRESSION_TYPE_STRING_VARIABLE || exp->type == MATH_EXPRESSION_TYPE_STRING_ARRAY) { *err = MATH_ERROR_UNEXP_OPE; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(exp); return NULL; } /* fall through */ case MATH_OPERATOR_TYPE_ASSIGN: info = save_parsing_info(str, exp); if (info == NULL) { *err = MATH_ERROR_MEMORY; math_scanner_free_token(token); math_expression_free(exp); return NULL; } if (exp->type == MATH_EXPRESSION_TYPE_STRING_VARIABLE || exp->type == MATH_EXPRESSION_TYPE_STRING_ARRAY) { exp = parse_string_assign_expression(str, eq, token, exp, err); } else { exp = parse_assign_expression(str, eq, token->data.op, exp, err); } if (exp == NULL) { if (token->type == MATH_TOKEN_TYPE_EOEQ_ASSIGN && *err != MATH_ERROR_NONE) { *err = MATH_ERROR_NONE; exp = restore_parsing_info(info, str); unget_token(token); } else { math_expression_free(info->exp); math_scanner_free_token(token); } } else { math_scanner_free_token(token); } free_parsing_info(info); break; default: *err = MATH_ERROR_UNEXP_OPE; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(exp); return NULL; } break; case MATH_TOKEN_TYPE_RC: case MATH_TOKEN_TYPE_RP: case MATH_TOKEN_TYPE_RB: case MATH_TOKEN_TYPE_EOEQ: case MATH_TOKEN_TYPE_COMMA: unget_token(token); break; default: *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(exp); return NULL; break; } End: return exp; } static MathExpression * parse_expression_list(struct math_string *str, MathEquation *eq, int inside_block, int *err) { struct math_token *token; MathExpression *exp, *prev, *top; top = prev = NULL; for (;;) { token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(top); return NULL; } switch (token->type) { case MATH_TOKEN_TYPE_DEF: if (inside_block) { *err = MATH_ERROR_FDEF_NEST; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(top); return NULL; } math_scanner_free_token(token); exp = parse_func_def_expression(str, eq, err); if (exp == NULL) { math_expression_free(top); return NULL; } continue; case MATH_TOKEN_TYPE_CONST: if (inside_block) { *err = MATH_ERROR_INVALID_CDEF; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(top); return NULL; } math_scanner_free_token(token); exp = parse_const_def_expression(str, eq, err); if (exp == NULL) { math_expression_free(top); return NULL; } continue; case MATH_TOKEN_TYPE_EOEQ_ASSIGN: eq->use_eoeq_assign = TRUE; /* fall-through */ case MATH_TOKEN_TYPE_EOEQ: if (str->cur[0] == '\0') { if (inside_block) { *err = MATH_ERROR_MISS_RC; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(top); return NULL; } math_scanner_free_token(token); goto End; } math_scanner_free_token(token); continue; case MATH_TOKEN_TYPE_RC: if (inside_block) { unget_token(token); goto End; } *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(top); return NULL; default: unget_token(token); exp = parse_expression(str, eq, err); } if (exp == NULL) { math_expression_free(top); return NULL; } if (prev) { prev->next = exp; } if (top == NULL) { top = exp; } prev = exp; token = my_get_token(str, eq); if (token == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(top); return NULL; } if (token->type != MATH_TOKEN_TYPE_EOEQ && token->type != MATH_TOKEN_TYPE_EOEQ_ASSIGN) { if (token->type == MATH_TOKEN_TYPE_RC && inside_block) { unget_token(token); goto End; } *err = MATH_ERROR_UNEXP_TOKEN; math_equation_set_parse_error(eq, token->ptr, str); math_scanner_free_token(token); math_expression_free(top); return NULL; } unget_token(token); } End: return top; } MathExpression * math_parser_parse(const char *line, MathEquation *eq, int *err) { MathExpression *exp; struct math_string str; *err = MATH_ERROR_NONE; math_scanner_init_string(&str, line); st_look_ahead_token = NULL; exp = parse_expression_list(&str, eq, 0, err); reset_token(NULL); return exp; } ngraph-gtk-6.09.05/src/math/math_operator.rb0000644000175000017500000000323013674050433015572 00000000000000#! /usr/bin/ruby N = 256 ope = [] ope_str = []; IO.foreach(ARGV[0]) { |l| l.chomp! next if (l.length < 1) ope.push(l[0]) ope_str.push(l.split) } ope_str = ope_str.uniq.sort {|a, b| b[0].length - a[0].length} OPE_PREFIX = "MATH_OPERATOR_TYPE" File.open("#{ARGV[1]}.h", "w") { |f| f.puts < #include "math_operator.h" struct ope_str { char *ope; int len; enum #{OPE_PREFIX} type; }; static struct ope_str OpeStr[] = { EOF ope_str.each {|s| f.puts(" {\"#{s[0].gsub('\\', '\\\\\\')}\", #{s[0].length}, #{OPE_PREFIX}_#{s[1]}},") } f.puts("};\n\n") f.puts("static char OpeChar[#{N}] = {") N.times {|i| c = sprintf("%c", i) f.puts(ope.include?(c) ? " 1, /* #{i.chr} */" : " 0,") } f.puts("};") f.puts < (int) (sizeof(OpeChar) / sizeof(*OpeChar))) return 0; return OpeChar[chr]; } enum #{OPE_PREFIX} math_scanner_check_ope_str(const char *str, int *len) { unsigned int i; for (i = 0; i < sizeof(OpeStr) / sizeof(*OpeStr); i++) { if (strncmp(str, OpeStr[i].ope, OpeStr[i].len) == 0) { *len = OpeStr[i].len; return OpeStr[i].type; } } return #{OPE_PREFIX}_UNKNOWN; } EOF } ngraph-gtk-6.09.05/src/math/math_operator.h.in0000644000175000017500000000051313674050433016024 00000000000000- MINUS + PLUS * MUL / DIV \ MOD ^ POW ! FACT : ASSIGN := ASSIGN > GT < LT >: GE >= GE <: LE <= LE :: EQ == EQ !: NE != NE || OR && AND -: MINUS_ASSIGN -= MINUS_ASSIGN +: PLUS_ASSIGN += PLUS_ASSIGN *: MUL_ASSIGN *= MUL_ASSIGN /: DIV_ASSIGN /= DIV_ASSIGN \: MOD_ASSIGN \= MOD_ASSIGN ^: POW_ASSIGN ^= POW_ASSIGN = EOEQ_ASSIGN ; EOEQ ngraph-gtk-6.09.05/src/math/math_constant.rb0000644000175000017500000000370513674050433015577 00000000000000#! /usr/bin/ruby const_str = []; IO.foreach(ARGV[0]) { |l| l.chomp! next if (l.length < 1) const_str.push(l.split) } const_str = const_str.uniq.sort {|a, b| b[0].length - a[0].length} File.open("#{ARGV[1]}.h", "w") { |f| f.puts < #include "math_expression.h" #include "math_equation.h" #include "math_constant.h" static struct math_const_parameter MathConstParameter[] = { EOF const_str.each {|s| if (s.length == 3) f.puts(" {\"#{s[0]}\", MATH_SCANNER_VAL_TYPE_NORMAL, {#{s[1]}, #{s[2]}}},") end } f.puts("};\n\n") f.puts < #include #include #include "math_expression.h" #include "math_equation.h" #include "math_function.h" struct funcs { char *name; struct math_function_parameter prm; }; static struct funcs FuncAry[] = { EOF func = [] i = 0; func_str.each {|s| type = MathFunctionType[s[3].to_i] if (s.length == 5) f.puts(" {\"#{s[0].upcase}\", {#{s[1]}, #{s[2]}, #{type}, math_func_#{s[0]}, NULL, NULL, NULL, NULL}},") if (s[4] != "NULL") func.push([i, s[4].split(","), s[0].upcase]) end i += 1 elsif (s.length == 6) f.puts("#ifdef HAVE_LIBGSL") f.puts(" {\"#{s[0].upcase}\", {#{s[1]}, #{s[2]}, #{type}, math_func_#{s[0]}, NULL, NULL, NULL, NULL}},") if (s[4] != "NULL") func.push([i, s[4].split(","), s[0].upcase]) end f.puts("#else") f.puts(" {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}},") f.puts("#endif") i += 1 end } f.puts("};\n\n") f.puts <&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/math ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmath_la_LIBADD = am_libmath_la_OBJECTS = libmath_la-math_function.lo \ libmath_la-math_operator.lo libmath_la-math_constant.lo \ libmath_la-math_expression.lo libmath_la-math_parser.lo \ libmath_la-math_basic_function.lo libmath_la-math_equation.lo \ libmath_la-math_scanner.lo libmath_la-math_error.lo libmath_la_OBJECTS = $(am_libmath_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libmath_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libmath_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libmath_la-math_basic_function.Plo \ ./$(DEPDIR)/libmath_la-math_constant.Plo \ ./$(DEPDIR)/libmath_la-math_equation.Plo \ ./$(DEPDIR)/libmath_la-math_error.Plo \ ./$(DEPDIR)/libmath_la-math_expression.Plo \ ./$(DEPDIR)/libmath_la-math_function.Plo \ ./$(DEPDIR)/libmath_la-math_operator.Plo \ ./$(DEPDIR)/libmath_la-math_parser.Plo \ ./$(DEPDIR)/libmath_la-math_scanner.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmath_la_SOURCES) DIST_SOURCES = $(libmath_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ noinst_LTLIBRARIES = libmath.la libmath_la_SOURCES = math_function.c math_function.h math_operator.c \ math_operator.h math_constant.c math_constant.h \ math_expression.c math_parser.c math_scanner.h \ parse_bin_expression.h math_basic_function.c math_equation.c \ math_expression.h math_parser.h math_equation.h \ math_scanner.c math_error.h math_error.c EXTRA_DIST = math_operator.h.in math_operator.rb math_constant.h.in \ math_constant.rb math_function.h.in math_function.rb BUILT_SOURCES = math_operator.h math_operator.c math_constant.h \ math_constant.c math_function.h math_function.c libmath_la_CFLAGS = $(GTK_CFLAGS) -I$(srcdir)/.. all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/math/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/math/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmath.la: $(libmath_la_OBJECTS) $(libmath_la_DEPENDENCIES) $(EXTRA_libmath_la_DEPENDENCIES) $(AM_V_CCLD)$(libmath_la_LINK) $(libmath_la_OBJECTS) $(libmath_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_basic_function.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_constant.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_equation.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_expression.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_function.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_operator.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_parser.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmath_la-math_scanner.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libmath_la-math_function.lo: math_function.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_function.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_function.Tpo -c -o libmath_la-math_function.lo `test -f 'math_function.c' || echo '$(srcdir)/'`math_function.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_function.Tpo $(DEPDIR)/libmath_la-math_function.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_function.c' object='libmath_la-math_function.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_function.lo `test -f 'math_function.c' || echo '$(srcdir)/'`math_function.c libmath_la-math_operator.lo: math_operator.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_operator.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_operator.Tpo -c -o libmath_la-math_operator.lo `test -f 'math_operator.c' || echo '$(srcdir)/'`math_operator.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_operator.Tpo $(DEPDIR)/libmath_la-math_operator.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_operator.c' object='libmath_la-math_operator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_operator.lo `test -f 'math_operator.c' || echo '$(srcdir)/'`math_operator.c libmath_la-math_constant.lo: math_constant.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_constant.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_constant.Tpo -c -o libmath_la-math_constant.lo `test -f 'math_constant.c' || echo '$(srcdir)/'`math_constant.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_constant.Tpo $(DEPDIR)/libmath_la-math_constant.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_constant.c' object='libmath_la-math_constant.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_constant.lo `test -f 'math_constant.c' || echo '$(srcdir)/'`math_constant.c libmath_la-math_expression.lo: math_expression.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_expression.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_expression.Tpo -c -o libmath_la-math_expression.lo `test -f 'math_expression.c' || echo '$(srcdir)/'`math_expression.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_expression.Tpo $(DEPDIR)/libmath_la-math_expression.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_expression.c' object='libmath_la-math_expression.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_expression.lo `test -f 'math_expression.c' || echo '$(srcdir)/'`math_expression.c libmath_la-math_parser.lo: math_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_parser.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_parser.Tpo -c -o libmath_la-math_parser.lo `test -f 'math_parser.c' || echo '$(srcdir)/'`math_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_parser.Tpo $(DEPDIR)/libmath_la-math_parser.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_parser.c' object='libmath_la-math_parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_parser.lo `test -f 'math_parser.c' || echo '$(srcdir)/'`math_parser.c libmath_la-math_basic_function.lo: math_basic_function.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_basic_function.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_basic_function.Tpo -c -o libmath_la-math_basic_function.lo `test -f 'math_basic_function.c' || echo '$(srcdir)/'`math_basic_function.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_basic_function.Tpo $(DEPDIR)/libmath_la-math_basic_function.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_basic_function.c' object='libmath_la-math_basic_function.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_basic_function.lo `test -f 'math_basic_function.c' || echo '$(srcdir)/'`math_basic_function.c libmath_la-math_equation.lo: math_equation.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_equation.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_equation.Tpo -c -o libmath_la-math_equation.lo `test -f 'math_equation.c' || echo '$(srcdir)/'`math_equation.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_equation.Tpo $(DEPDIR)/libmath_la-math_equation.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_equation.c' object='libmath_la-math_equation.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_equation.lo `test -f 'math_equation.c' || echo '$(srcdir)/'`math_equation.c libmath_la-math_scanner.lo: math_scanner.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_scanner.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_scanner.Tpo -c -o libmath_la-math_scanner.lo `test -f 'math_scanner.c' || echo '$(srcdir)/'`math_scanner.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_scanner.Tpo $(DEPDIR)/libmath_la-math_scanner.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_scanner.c' object='libmath_la-math_scanner.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_scanner.lo `test -f 'math_scanner.c' || echo '$(srcdir)/'`math_scanner.c libmath_la-math_error.lo: math_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -MT libmath_la-math_error.lo -MD -MP -MF $(DEPDIR)/libmath_la-math_error.Tpo -c -o libmath_la-math_error.lo `test -f 'math_error.c' || echo '$(srcdir)/'`math_error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmath_la-math_error.Tpo $(DEPDIR)/libmath_la-math_error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='math_error.c' object='libmath_la-math_error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmath_la_CFLAGS) $(CFLAGS) -c -o libmath_la-math_error.lo `test -f 'math_error.c' || echo '$(srcdir)/'`math_error.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libmath_la-math_basic_function.Plo -rm -f ./$(DEPDIR)/libmath_la-math_constant.Plo -rm -f ./$(DEPDIR)/libmath_la-math_equation.Plo -rm -f ./$(DEPDIR)/libmath_la-math_error.Plo -rm -f ./$(DEPDIR)/libmath_la-math_expression.Plo -rm -f ./$(DEPDIR)/libmath_la-math_function.Plo -rm -f ./$(DEPDIR)/libmath_la-math_operator.Plo -rm -f ./$(DEPDIR)/libmath_la-math_parser.Plo -rm -f ./$(DEPDIR)/libmath_la-math_scanner.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libmath_la-math_basic_function.Plo -rm -f ./$(DEPDIR)/libmath_la-math_constant.Plo -rm -f ./$(DEPDIR)/libmath_la-math_equation.Plo -rm -f ./$(DEPDIR)/libmath_la-math_error.Plo -rm -f ./$(DEPDIR)/libmath_la-math_expression.Plo -rm -f ./$(DEPDIR)/libmath_la-math_function.Plo -rm -f ./$(DEPDIR)/libmath_la-math_operator.Plo -rm -f ./$(DEPDIR)/libmath_la-math_parser.Plo -rm -f ./$(DEPDIR)/libmath_la-math_scanner.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile math_operator.c: math_operator.h math_operator.h: math_operator.h.in math_operator.rb ruby math_operator.rb math_operator.h.in math_operator math_constant.c: math_constant.h math_constant.h: math_constant.h.in math_constant.rb ruby math_constant.rb math_constant.h.in math_constant math_function.c: math_function.h math_operator.h math_function.h: math_function.h.in math_function.rb ruby math_function.rb math_function.h.in math_function # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/src/math/math_scanner.c0000644000175000017500000004276413777474442015244 00000000000000/* * $Id: math_scanner.c,v 1.5 2009-11-16 09:13:06 hito Exp $ * */ #include "config.h" #include #include #include #include #include #include #include #include "object.h" #include "math_scanner.h" static struct math_token *create_token(const char *str, enum MATH_TOKEN_TYPE type); static struct math_token *get_array_prefix(const char *str, const char ** rstr); static struct math_token *get_bracket(const char *str, const char ** rstr); static struct math_token *get_unknown(const char *str, const char ** rstr); static struct math_token *get_symbol(const char *str, const char ** rstr); static struct math_token *get_string(const char *str, const char ** rstr, int quate); static struct math_token *get_string_variable(const char *str, const char ** rstr); static struct math_token *get_paren(const char *str, const char ** rstr); static struct math_token *get_curly(const char *str, const char ** rstr); static struct math_token *get_comma(const char *str, const char ** rstr); static struct math_token *get_eoeq(const char *str, const char ** rstr); static struct math_token *get_ope(const char *str, const char ** rstr, MathEquation *eq); static struct math_token *get_num(const char *str, const char ** rstr); struct reserved { char *name; enum MATH_TOKEN_TYPE type; }; static struct reserved Reserved[] = { {"DEF", MATH_TOKEN_TYPE_DEF}, {"CONST", MATH_TOKEN_TYPE_CONST}, }; static enum MATH_TOKEN_TYPE check_reserved(char *str) { unsigned int i; for (i = 0; i < sizeof(Reserved) / sizeof(*Reserved); i++) { if (strcmp(Reserved[i].name, str) == 0) { return Reserved[i].type; } } return MATH_TOKEN_TYPE_UNKNOWN; } void math_scanner_free_token(struct math_token *token) { if (token == NULL) return; switch (token->type) { case MATH_TOKEN_TYPE_NUMERIC: case MATH_TOKEN_TYPE_OPERATOR: case MATH_TOKEN_TYPE_COMMA: case MATH_TOKEN_TYPE_EOEQ: case MATH_TOKEN_TYPE_EOEQ_ASSIGN: case MATH_TOKEN_TYPE_LP: case MATH_TOKEN_TYPE_RP: case MATH_TOKEN_TYPE_LB: case MATH_TOKEN_TYPE_RB: case MATH_TOKEN_TYPE_LC: case MATH_TOKEN_TYPE_RC: case MATH_TOKEN_TYPE_DEF: case MATH_TOKEN_TYPE_CONST: case MATH_TOKEN_TYPE_ARRAY_PREFIX: case MATH_TOKEN_TYPE_UNKNOWN: case MATH_TOKEN_TYPE_UNTERMINATED_STRING: break; case MATH_TOKEN_TYPE_SYMBOL: case MATH_TOKEN_TYPE_STRING_VARIABLE: g_free(token->data.sym); break; case MATH_TOKEN_TYPE_DOUBLE_QUOTED_STRING: case MATH_TOKEN_TYPE_SINGLE_QUOTED_STRING: g_string_free(token->data.str, TRUE); break; } g_free(token); } struct math_token * math_scanner_dup_token(struct math_token *token) { struct math_token *new_token; if (token == NULL) { return NULL; } new_token = g_malloc0(sizeof(*new_token)); if (new_token == NULL) { return NULL; } *new_token = *token; switch (token->type) { case MATH_TOKEN_TYPE_NUMERIC: case MATH_TOKEN_TYPE_OPERATOR: case MATH_TOKEN_TYPE_COMMA: case MATH_TOKEN_TYPE_EOEQ: case MATH_TOKEN_TYPE_EOEQ_ASSIGN: case MATH_TOKEN_TYPE_LP: case MATH_TOKEN_TYPE_RP: case MATH_TOKEN_TYPE_LB: case MATH_TOKEN_TYPE_RB: case MATH_TOKEN_TYPE_LC: case MATH_TOKEN_TYPE_RC: case MATH_TOKEN_TYPE_DEF: case MATH_TOKEN_TYPE_CONST: case MATH_TOKEN_TYPE_ARRAY_PREFIX: case MATH_TOKEN_TYPE_UNKNOWN: case MATH_TOKEN_TYPE_UNTERMINATED_STRING: break; case MATH_TOKEN_TYPE_SYMBOL: case MATH_TOKEN_TYPE_STRING_VARIABLE: new_token->data.sym = g_strdup(token->data.sym); if (new_token->data.sym == NULL) { g_free(new_token); new_token = NULL; } break; case MATH_TOKEN_TYPE_DOUBLE_QUOTED_STRING: case MATH_TOKEN_TYPE_SINGLE_QUOTED_STRING: new_token->data.str = g_string_new(token->data.str->str); if (new_token->data.str == NULL) { g_free(new_token); new_token = NULL; } break; } return new_token; } struct math_token * math_scanner_get_token(struct math_string *mstr, MathEquation *eq) { char c; const char *str; const char **rstr; struct math_token *token; str = mstr->cur; rstr = &(mstr->cur); if (str == NULL) { return NULL; } while (*str < 0 || *str == ' ' || *str == '\t' || *str == '\n') { mstr->ofst++; if (*str == '\n') { mstr->line++; mstr->ofst = 0; } str++; } c = str[0]; if (c == '\0') { token = get_eoeq(str, rstr); } else if (isdigit(c) || c == '.') { token = get_num(str, rstr); } else if (math_scanner_is_ope(c)) { token = get_ope(str, rstr, eq); } else if (isalpha(c) || c == '%' || c == '_') { token = get_symbol(str, rstr); } else if (c == '(' || c == ')') { token = get_paren(str, rstr); } else if (c == '[' || c == ']') { token = get_bracket(str, rstr); } else if (c == '{' || c == '}') { token = get_curly(str, rstr); } else if (c == ',') { token = get_comma(str, rstr); } else if (c == '@') { token = get_array_prefix(str, rstr); } else if (c == '"') { token = get_string(str, rstr, c); } else if (c == '\'') { token = get_string(str, rstr, c); } else if (c == '$') { token = get_string_variable(str, rstr); } else if (c == '#') { /* comment */ while (*str != '\0' && *str != '\n') { mstr->ofst++; str++; } mstr->cur = str; token = math_scanner_get_token(mstr, eq); } else { token = get_unknown(str, rstr); } mstr->ofst += (*rstr - str); return token; } static struct math_token * get_unknown(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, MATH_TOKEN_TYPE_UNKNOWN); if (tok == NULL) return NULL; return tok; } static struct math_token * get_paren(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, (str[0] == ')') ? MATH_TOKEN_TYPE_RP : MATH_TOKEN_TYPE_LP); if (tok == NULL) return NULL; *rstr = str + 1; return tok; } static struct math_token * get_bracket(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, (str[0] == ']') ? MATH_TOKEN_TYPE_RB : MATH_TOKEN_TYPE_LB); if (tok == NULL) return NULL; *rstr = str + 1; return tok; } static struct math_token * get_curly(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, (str[0] == '}') ? MATH_TOKEN_TYPE_RC : MATH_TOKEN_TYPE_LC); if (tok == NULL) return NULL; *rstr = str + 1; return tok; } static struct math_token * get_comma(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, MATH_TOKEN_TYPE_COMMA); if (tok == NULL) return NULL; *rstr = str + 1; return tok; } static struct math_token * get_array_prefix(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, MATH_TOKEN_TYPE_ARRAY_PREFIX); if (tok == NULL) return NULL; *rstr = str + 1; return tok; } static struct math_token * get_eoeq(const char *str, const char ** rstr) { struct math_token *tok; tok = create_token(str, MATH_TOKEN_TYPE_EOEQ); if (tok == NULL) return NULL; *rstr = str + ((*str) ? 1 : 0); return tok; } static struct math_token * get_ope(const char *str, const char ** rstr, MathEquation *eq) { struct math_token *tok; int len; enum MATH_OPERATOR_TYPE ope; ope = math_scanner_check_ope_str(str, &len); switch (ope) { case MATH_OPERATOR_TYPE_EOEQ: tok = create_token(str, MATH_TOKEN_TYPE_EOEQ); break; case MATH_OPERATOR_TYPE_EOEQ_ASSIGN: switch (eq->eoeq_assign_type) { case EOEQ_ASSIGN_TYPE_BOTH: tok = create_token(str, MATH_TOKEN_TYPE_EOEQ_ASSIGN); if (tok) { tok->data.op = MATH_OPERATOR_TYPE_ASSIGN; } break; case EOEQ_ASSIGN_TYPE_EOEQ: tok = create_token(str, MATH_TOKEN_TYPE_EOEQ); break; case EOEQ_ASSIGN_TYPE_ASSIGN: tok = create_token(str, MATH_TOKEN_TYPE_OPERATOR); if (tok) { tok->data.op = MATH_OPERATOR_TYPE_ASSIGN; } break; } break; case MATH_OPERATOR_TYPE_UNKNOWN: tok = create_token(str, MATH_TOKEN_TYPE_UNKNOWN); break; default: tok = create_token(str, MATH_TOKEN_TYPE_OPERATOR); if (tok) { tok->data.op = ope; } } *rstr = str + len; return tok; } static char * get_symbol_string(const char *str, char prefix, int *len) { char *buf; int n, i; if (str[0] == prefix) { n = 1; } else { n = 0; } for (; isalnum(str[n]) || str[n] == '_'; n++); buf = g_malloc(n + 1); if (buf == NULL) return NULL; for (i = 0; i < n; i++) { buf[i] = toupper(str[i]); } buf[i] = '\0'; *len = n; return buf; } static struct math_token * get_symbol(const char *str, const char ** rstr) { struct math_token *tok; char *buf; int n; enum MATH_TOKEN_TYPE type; buf = get_symbol_string(str, '%', &n); type = check_reserved(buf); if (type != MATH_TOKEN_TYPE_UNKNOWN) { g_free(buf); tok = create_token(str, type); if (tok == NULL) { g_free(buf); return NULL; } } else { tok = create_token(str, MATH_TOKEN_TYPE_SYMBOL); if (tok == NULL) { g_free(buf); return NULL; } tok->data.sym = buf; } *rstr = str + n; return tok; } static GString * get_single_quoted_string(const char *str, int *len) { int n, escape; GString *gstr; gstr = g_string_new(""); if (gstr == NULL) { return NULL; } escape = FALSE; for (n = 1; str[n]; n++) { if (escape) { switch (str[n]) { case '\'': g_string_append_c(gstr, '\''); break; case '\\': g_string_append_c(gstr, '\\'); break; default: g_string_append_c(gstr, '\\'); g_string_append_c(gstr, str[n]); break; } escape = FALSE; continue; } if (str[n] == '\'' || str[n] == '\n') { break; } else if (str[n] == '\\') { escape = TRUE; } else { g_string_append_c(gstr, str[n]); } } if (len) { * len = n; } return gstr; } static int append_hex(GString *gstr, const char *str) { int c, i; c = 0; for (i = 0; i < 2; i++) { if (g_ascii_isxdigit(str[i])) { c <<= 4; c += g_ascii_xdigit_value(str[i]); } else { break; } } if (c) { g_string_append_c(gstr, c); } return i; } static int append_oct(GString *gstr, const char *str) { int c, i; c = 0; for (i = 0; i < 3; i++) { if ('0' <= str[i] && str[i] <= '7') { c <<= 3; c += str[i] - '0'; } else { break; } } if (c) { g_string_append_c(gstr, c); } return i; } static GString * get_double_quoted_string(const char *str, int *len) { int n, escape, chr; GString *gstr; gstr = g_string_new(""); if (gstr == NULL) { return NULL; } escape = FALSE; for (n = 1; str[n]; n++) { if (escape) { switch (str[n]) { case 'a': g_string_append_c(gstr, '\a'); break; case 'b': g_string_append_c(gstr, '\b'); break; case 'f': g_string_append_c(gstr, '\f'); break; case 'n': g_string_append_c(gstr, '\n'); break; case 'r': g_string_append_c(gstr, '\r'); break; case 't': g_string_append_c(gstr, '\t'); break; case 'v': g_string_append_c(gstr, '\v'); break; case 'x': n += append_hex(gstr, str + n + 1); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': n += append_oct(gstr, str + n) - 1; break; default: g_string_append_c(gstr, str[n]); break; } escape = FALSE; continue; } if (str[n] == '"' || str[n] == '\n') { break; } else if (str[n] == '\\') { escape = TRUE; } else { if (str[n] == '#' && str[n + 1] == '{') { chr = MATH_VARIABLE_EXPAND_PREFIX; } else { chr = str[n]; } g_string_append_c(gstr, chr); } } if (len) { * len = n; } return gstr; } static struct math_token * get_string(const char *str, const char ** rstr, int quate) { struct math_token *tok; enum MATH_TOKEN_TYPE type; int n; GString *gstr; if (quate == '"') { gstr = get_double_quoted_string(str, &n); type = MATH_TOKEN_TYPE_DOUBLE_QUOTED_STRING; } else { gstr = get_single_quoted_string(str, &n); type = MATH_TOKEN_TYPE_SINGLE_QUOTED_STRING; } if (gstr == NULL) { return NULL; } if (str[n] == '\0' || str[n] == '\n') { tok = create_token(str, MATH_TOKEN_TYPE_UNTERMINATED_STRING); if (tok == NULL) { return NULL; } return tok; } tok = create_token(str, type); if (tok == NULL) { g_string_free(gstr, TRUE); return NULL; } tok->data.str = gstr; n++; *rstr = str + n; return tok; } static struct math_token * get_string_variable(const char *str, const char ** rstr) { struct math_token *tok; char *buf; int n; buf = get_symbol_string(str, '$', &n); if (buf == NULL) { return NULL; } tok = create_token(str, MATH_TOKEN_TYPE_STRING_VARIABLE); if (tok == NULL) { g_free(buf); return NULL; } tok->data.sym = buf; *rstr = str + n; return tok; } static const char * get_oct(const char *str, double *val) { double oct; char c; oct = 0; for (; *str; str++) { c = *str; switch (c) { case ' ': case '_': case '\t': continue; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': oct *= 8; oct += c - '0'; break; default: goto End; } } End: *val = oct; return str; } static const char * get_hex(const char *str, double *val) { double hex; char c; hex = 0; for (; *str; str++) { c = toupper(*str); switch (c) { case ' ': case '_': case '\t': continue; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': hex *= 16; hex += c - '0'; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': hex *= 16; hex += c - 'A' + 10; break; default: goto End; } } End: *val = hex; return str; } static const char * get_bin(const char *str, double *val) { double bin; char c; bin = 0; for (; *str; str++) { c = str[0]; switch (c) { case ' ': case '_': case '\t': continue; case '0': case '1': bin *= 2; bin += c - '0'; break; default: goto End; } } End: *val = bin; return str; } static const char * get_dec(const char *str, double *val) { int in_decimal, in_pow, pow_sign, pow_val, dec_order; long double dec, flaction; pow_val = 0; pow_sign = 1; dec_order = 0; flaction = 0; dec = 0; in_decimal = 0; in_pow = 0; for (; *str; str++) { char c; c = toupper(*str); if (c < 0) { break; } else if (c == ' ' || c == '\t' || c == '_') { continue; } else if (c == '.') { if (in_decimal || in_pow) { break; } in_decimal = 1; } else if (c == 'E' || c == 'D') { if (in_pow) { break; } in_pow = 1; } else if (c == '+' || c =='-') { if (in_pow != 1) { break; } pow_sign = (c == '+') ? 1 : -1; in_pow = 2; } else if (isdigit(c)) { switch (in_pow) { case 1: in_pow = 2; /* fall through */ case 2: if (pow_val < INT_MAX / 10) { pow_val *= 10; pow_val += c - '0'; } break; default: if (in_decimal) { if (flaction < 1E30) { /* dec and flaction is not negative */ dec_order++; flaction *= 10; flaction += c - '0'; } } else { dec *= 10; dec += c - '0'; } } } else { break; } } #if HAVE_POWL *val = dec * powl(10.0, pow_sign * pow_val) + flaction * powl(10.0, pow_sign * pow_val - dec_order); #else /* HAVE_POWL */ *val = dec * pow(10.0, pow_sign * pow_val) + flaction * pow(10.0, pow_sign * pow_val - dec_order); #endif /* HAVE_POWL */ return str; } static struct math_token * get_num(const char *str, const char ** rstr) { struct math_token *tok; const char *ptr; double val; tok = create_token(str, MATH_TOKEN_TYPE_NUMERIC); if (tok == NULL) { return NULL; } if (str[0] == '0' && str[1] == 'x') { str += 2; ptr = get_hex(str, &val); } else if (str[0] == '0' && str[1] == 'b') { str += 2; ptr = get_bin(str, &val); } else if (str[0] == '0' && str[1] == 'o') { str += 2; ptr = get_oct(str, &val); } else if (str[0] == '0' && (str[1] == '.' || str[1] == 'E' || str[1] == 'D')) { ptr = get_dec(str, &val); } else { ptr = get_dec(str, &val); } if (ptr == NULL) { tok->type = MATH_TOKEN_TYPE_UNKNOWN; return tok; } tok->data.val.dnum = val; tok->data.val.type = MATH_SCANNER_VAL_TYPE_NORMAL; *rstr = ptr; return tok; } static struct math_token * create_token(const char *str, enum MATH_TOKEN_TYPE type) { struct math_token *tok; tok = g_malloc0(sizeof(*tok)); if (tok == NULL) { return NULL; } tok->type = type; tok->ptr = str; return tok; } void math_scanner_init_string(struct math_string *str, const char *line) { str->top = line; str->cur = line; str->line = 0; str->ofst = 0; } void replace_eoeq_token(char *eq) { int i; if (eq == NULL) { return; } for (i = 0; eq[i]; i++) { const char *ptr; struct math_token *tok; switch (eq[i]) { case '=': if (eq[i + 1] == '=') { i++; } else { eq[i] = ';'; } break; case '!': case '-': case '+': case '*': case '/': case '>': case '<': case ':': case '\\': case '^': if (eq[i + 1] == '=') { i++; } break; case '"': case '\'': tok = get_string(eq + i, &ptr, eq[i]); if (tok == NULL) { return; } i = ptr - eq - 1; math_scanner_free_token(tok); break; } } } ngraph-gtk-6.09.05/src/math/math_expression.h0000644000175000017500000001553613674050433015776 00000000000000/* * $Id: math_expression.h,v 1.3 2009-11-10 04:12:20 hito Exp $ * */ #ifndef EXPRESSION_HEADER #define EXPRESSION_HEADER typedef struct _math_expression MathExpression; typedef struct _math_function_call_expression MathFunctionCallExpression; typedef union _math_function_argument MathFunctionArgument; #include "nhash.h" #include "object.h" #include "math_equation.h" #include "math_function.h" #include "math_operator.h" enum MATH_EXPRESSION_TYPE { MATH_EXPRESSION_TYPE_OR, MATH_EXPRESSION_TYPE_AND, MATH_EXPRESSION_TYPE_EQ, MATH_EXPRESSION_TYPE_NE, MATH_EXPRESSION_TYPE_ADD, MATH_EXPRESSION_TYPE_SUB, MATH_EXPRESSION_TYPE_MUL, MATH_EXPRESSION_TYPE_DIV, MATH_EXPRESSION_TYPE_MOD, MATH_EXPRESSION_TYPE_POW, MATH_EXPRESSION_TYPE_GT, MATH_EXPRESSION_TYPE_GE, MATH_EXPRESSION_TYPE_LT, MATH_EXPRESSION_TYPE_LE, MATH_EXPRESSION_TYPE_MINUS, MATH_EXPRESSION_TYPE_NOT, MATH_EXPRESSION_TYPE_FUNC, MATH_EXPRESSION_TYPE_FUNC_CALL, MATH_EXPRESSION_TYPE_FACT, MATH_EXPRESSION_TYPE_DOUBLE, MATH_EXPRESSION_TYPE_CONST, MATH_EXPRESSION_TYPE_CONST_DEF, MATH_EXPRESSION_TYPE_VARIABLE, MATH_EXPRESSION_TYPE_ARRAY, MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT, MATH_EXPRESSION_TYPE_PRM, MATH_EXPRESSION_TYPE_ASSIGN, MATH_EXPRESSION_TYPE_STRING, MATH_EXPRESSION_TYPE_STRING_VARIABLE, MATH_EXPRESSION_TYPE_STRING_ASSIGN, MATH_EXPRESSION_TYPE_STRING_ARRAY, MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT, MATH_EXPRESSION_TYPE_BLOCK, MATH_EXPRESSION_TYPE_EOEQ, }; struct math_func_arg_list { char *name; enum MATH_FUNCTION_ARG_TYPE type; struct math_func_arg_list *next; }; typedef struct _math_function_expression { int argc, local_num, local_string_num, local_array_num, local_string_array_num; MathExpression *exp; struct math_function_parameter *fprm; struct math_func_arg_list *arg_list, *arg_last; } MathFunctionExpression ; typedef struct _math_binary_expression { MathExpression *left; MathExpression *right; } MathBinaryExpression; typedef struct _math_assign_expression { enum MATH_OPERATOR_TYPE op; MathExpression *left; MathExpression *right; } MathAssignExpression; typedef struct _math_unary_expression { MathExpression *operand; } MathUnaryExpression; typedef struct _math_constant_definition_expression { int id; MathExpression *operand; } MathConstantDefinitionExpression; union _math_function_argument { MathValue val; struct math_variable_argument_common { enum DATA_TYPE type; union math_variable_argument_data { MathValue *vptr; GString *str; } data; } variable; MathExpression *exp; struct math_array_argument_common { enum DATA_TYPE array_type; int idx; } array; const char *cstr; }; struct _math_function_call_expression { MathExpression **argv; MathFunctionArgument *buf; int argc, pos_id; struct math_function_parameter *fprm; }; typedef struct _math_parameter_expression { int type, id, index; MathEquationParametar *prm; } MathParameterExpression; typedef struct _math_array_expression { int index; MathExpression *operand; } MathArrayExpression; struct embedded_expression { int start, end; MathExpression *exp; }; typedef struct _math_string_expression { char *string; GString *expanded; struct narray *variables; } MathStringExpression; struct _math_expression { enum MATH_EXPRESSION_TYPE type; int line_number; MathExpression *next; MathEquation *equation; union { MathValue value; char *symbol; char *string; int index; MathBinaryExpression bin; MathUnaryExpression unary; MathFunctionCallExpression func_call; MathFunctionExpression func; MathParameterExpression prm; MathArrayExpression array; MathConstantDefinitionExpression const_def; MathAssignExpression assign; MathStringExpression str; MathExpression *exp; } u; }; MathExpression *math_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, int *err); MathExpression *math_eoeq_expression_new(MathEquation *eq, int *err); MathExpression *math_array_expression_new(MathEquation *eq, const char *name, MathExpression *operand, int is_string, int *err); MathExpression *math_array_argument_expression_new(MathEquation *eq, const char *name, int *err); MathExpression *math_string_array_argument_expression_new(MathEquation *eq, const char *name, int *err); MathExpression *math_unary_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, MathExpression *operand, int *err); MathExpression *math_binary_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, MathExpression *left, MathExpression *right, int *err); MathExpression *math_assign_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, MathExpression *left, MathExpression *right, enum MATH_OPERATOR_TYPE op, int *err); MathExpression *math_double_expression_new(MathEquation *eq, const MathValue *val, int *err); MathExpression *math_constant_expression_new(MathEquation *eq, const char *name, int *err); MathExpression *math_variable_expression_new(MathEquation *eq, const char *name, int *err); MathExpression *math_func_call_expression_new(MathEquation *eq, struct math_function_parameter *fprm, int argc, MathExpression **argv, int pos_id, int *err); MathExpression *math_parameter_expression_new(MathEquation *eq, char *name, int *err); MathExpression *math_constant_definition_expression_new(MathEquation *eq, char *name, MathExpression *exp, int *err); MathExpression *math_function_expression_new(MathEquation *eq, const char *name, int *err); MathExpression *math_string_expression_new(MathEquation *eq, const char *str, int expand, int *err); MathExpression *math_string_variable_expression_new(MathEquation *eq, const char *str, int *err); int math_function_expression_add_arg(MathExpression *func, const char *arg_name, enum MATH_FUNCTION_ARG_TYPE type); int math_function_expression_set_function(MathEquation *eq, MathExpression *func, const char *name, MathExpression *exp); int math_function_expression_register_arg(MathExpression *func); MathExpression *math_expression_optimize(MathExpression *exp, int *err); void math_expression_free(MathExpression *exp); int math_expression_calculate(MathExpression *exp, MathValue *val); int math_function_get_arg_type_num(struct math_function_parameter *fprm); const char *math_expression_get_string_from_argument(MathFunctionCallExpression *exp, int i); GString *math_expression_get_string_variable_from_argument(MathFunctionCallExpression *exp, int i); MathValue *math_expression_get_variable_from_argument(MathFunctionCallExpression *exp, int i); enum DATA_TYPE math_expression_get_variable_type_from_argument(MathFunctionCallExpression *exp, int i); int math_function_call_expression_get_variable(MathFunctionCallExpression *exp, int i, MathVariable *var); int math_variable_set_common_value(MathVariable *variable, MathCommonValue *val); const char *math_expression_get_cstring(MathExpression *exp); #endif ngraph-gtk-6.09.05/src/math/math_function.h0000644000175000017500000003555713744175706015442 00000000000000#ifndef MATH_SCANNER_FUNC_HEADER #define MATH_SCANNER_FUNC_HEADER enum MATH_FUNCTION_ARG_TYPE { MATH_FUNCTION_ARG_TYPE_DOUBLE, MATH_FUNCTION_ARG_TYPE_STRING, MATH_FUNCTION_ARG_TYPE_ARRAY, MATH_FUNCTION_ARG_TYPE_STRING_ARRAY, MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON, MATH_FUNCTION_ARG_TYPE_VARIABLE, MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE, MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON, MATH_FUNCTION_ARG_TYPE_PROC, }; enum MATH_FUNCTION_TYPE { MATH_FUNCTION_TYPE_NORMAL, MATH_FUNCTION_TYPE_POSITIONAL, MATH_FUNCTION_TYPE_CALLBACK }; typedef int (* math_function) (MathFunctionCallExpression *exp, MathEquation *eq, MathValue *r); struct math_function_parameter { int argc; int side_effect; enum MATH_FUNCTION_TYPE type; math_function func; enum MATH_FUNCTION_ARG_TYPE *arg_type; MathExpression *opt_usr, *base_usr; char *name; }; int math_scanner_is_func(int chr); int math_add_basic_function(MathEquation *eq); int math_func_array_moving_average(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_float_array(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_split_float(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_substring(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_each_with_index(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_truncate(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_prepend(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_reverse(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_compare(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_replace(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_average(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_compact(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_length(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_append(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_insert(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_getobj_string(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_stdevp(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_float(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_strip(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_match(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_erase(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_split(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_getobj_array(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_clear(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_sumsq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_stdev(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_down(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_join(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_copy(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_zetam1_int(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_mjd2month(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_sum(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_min(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array_max(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_parameter(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_string_up(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_unix2mjd(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_mjd2year(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_mjd2wday(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_mjd2yday(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_isnormal(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_zeta_int(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_mjd2unix(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_strftime(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_mjd2day(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_zip_map(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_isundef(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_isbreak(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_unshift(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sprintf(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_icbeta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_unless(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_filter(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_reduce(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_iscont(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_zetam1(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_choose(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_string(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_printf(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_getobj(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_gauss(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_round(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_expm1(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_log1p(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_asinh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_acosh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_atanh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_srand(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_theta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_delta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_gamma(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_icgam(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_times(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_rsort(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_index(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_array(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_isnan(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_progn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_prog1(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_prog2(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_shift(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sumsq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sign(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_frac(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sqrt(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_ln1p(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_asin(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_acos(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_atan(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sinh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_cosh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_tanh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_rand(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_erfc(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_qinv(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_beta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sort(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_size(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_find(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_each(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_zeta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_push(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_time(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_fmod(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_puts(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_abs(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_int(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_min(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_max(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sqr(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_exp(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_log(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sin(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_cos(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_tan(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_erf(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_lgn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_mjd(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_neq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_not(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_and(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_xor(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_for(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_dif(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_sum(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_map(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_zip(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_jnu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_ynu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_inu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_knu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_pop(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_ln(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_ei(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_jn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_yn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_pn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_hn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_tn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_eq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_ge(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_gt(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_le(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_lt(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_or(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_rm(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_cm(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_am(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); int math_func_if(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #ifdef HAVE_LIBGSL int math_func_in(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_kn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_yl(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif #ifdef HAVE_LIBGSL int math_func_jl(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif int math_func_m(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); #endif ngraph-gtk-6.09.05/src/math/math_error.c0000644000175000017500000002340313674050433014713 00000000000000/* * $Id: math_error.c,v 1.10 2009-12-22 00:57:42 hito Exp $ * */ #include #include #include #include "common.h" #include "math_equation.h" #define ERR_MSG_EOEQ N_("syntax error, unexpected end of equation.") #define ERR_MSG_FUNC_NEST N_("syntax error, function definition cannot be nested.") #define ERR_MSG_UNEXP_OP N_("syntax error, unexpected operator.") #define ERR_MSG_UNEXP_TOK N_("syntax error, unexpected token.") #define ERR_MSG_ARG_NUM N_("syntax error, wrong number of arguments.") #define ERR_MSG_MISS_RP N_("syntax error, unexpected end of equation, expecting ')'.") #define ERR_MSG_MISS_RC N_("syntax error, unexpected end of equation, expecting '}'.") #define ERR_MSG_MISS_RB N_("syntax error, unexpected end of equation, expecting ']'.") #define ERR_MSG_INVALID_F N_("syntax error, invalid function definition.") #define ERR_MSG_INVALID_A N_("syntax error, invalid argument.") #define ERR_MSG_INVALID_C N_("syntax error, constant cannot be defined in a function definition.") #define ERR_MSG_INVALID_P N_("error, invalid parameter.") #define ERR_MSG_PRM_IN_DEF N_("error, a parameter cannot be used in a user function or a constant definition.") #define ERR_MSG_UNKNOWN_F N_("error, unknown function.") #define ERR_MSG_MEMORY N_("error, cannot allocate enough memory.") #define ERR_MSG_UNKNOWN N_("error, unknown error.") #define ERR_MSG_POS_FUNC N_("error, the function cannot be used in a user function or a constant definition.") #define ERR_MSG_CONST_EXIST N_("error, the constant is already defined.") #define ERR_MSG_CALCULATION N_("error, calculation error.") #define ERR_MSG_UNTERMINATED_STRING N_("syntax error, unterminated string.") static int ErrorLine = 1, ErrorOfst = 1; static char * check_error_position(MathEquation *eq, const char *code) { int i, l, len; char *buf; if (code == NULL) return NULL; if (eq->err_info.pos.pos == NULL) { return NULL; } len = strlen(code); l = eq->err_info.pos.pos - code; if (l < 0) return NULL; if (l >= len) return NULL; if (eq->err_info.pos.pos[0] == ';' || eq->err_info.pos.pos[0] == '=' || eq->err_info.pos.pos[0] == '\0') return NULL; len -= l; buf = g_malloc(len + 1); if (buf == NULL) return NULL; for (i = 0; i < len; i++) { if (eq->err_info.pos.pos[i] == ';' || eq->err_info.pos.pos[i] == '=') break; buf[i] = eq->err_info.pos.pos[i]; } buf[i] = '\0'; ErrorLine = eq->err_info.pos.line; ErrorOfst = eq->err_info.pos.ofst; return buf; } char * math_err_get_error_message(MathEquation *eq, const char *code, int err) { char *code_buf = NULL, *buf = NULL, *ptr; ErrorLine = 1; switch (err) { case MATH_ERROR_NONE: break; case MATH_ERROR_EOEQ: buf = g_strdup(_(ERR_MSG_EOEQ)); break; case MATH_ERROR_FDEF_NEST: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_FUNC_NEST), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_FUNC_NEST)); } break; case MATH_ERROR_UNEXP_OPE: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_UNEXP_OP), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_UNEXP_OP)); } break; case MATH_ERROR_ARG_NUM: code_buf = check_error_position(eq, code); if (eq->err_info.func.fprm) { buf = g_strdup_printf("%s (%d for %d) '%s()' (%d:%d)", _(ERR_MSG_ARG_NUM), eq->err_info.func.arg_num, eq->err_info.func.fprm->argc, eq->err_info.func.fprm->name, eq->err_info.pos.line, eq->err_info.pos.ofst); } else { buf = g_strdup(_(ERR_MSG_ARG_NUM)); } break; case MATH_ERROR_MISS_RP: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_MISS_RP), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_MISS_RP)); } break; case MATH_ERROR_MISS_RB: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_MISS_RB), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_MISS_RB)); } break; case MATH_ERROR_MISS_RC: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_MISS_RC), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_MISS_RC)); } break; case MATH_ERROR_UNKNOWN_FUNC: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_UNKNOWN_F), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_UNKNOWN_F)); } break; case MATH_ERROR_INVALID_FDEF: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_INVALID_F), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_INVALID_F)); } break; case MATH_ERROR_INVALID_ARG: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_INVALID_A), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_INVALID_A)); } break; case MATH_ERROR_INVALID_CDEF: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_INVALID_C), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_INVALID_C)); } break; case MATH_ERROR_UNEXP_TOKEN: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_UNEXP_TOK), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_UNEXP_TOK)); } break; case MATH_ERROR_INVALID_PRM: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_INVALID_P), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_INVALID_P)); } break; case MATH_ERROR_PRM_IN_DEF: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf(_("%s (%d:%d)\n the error is found at: %s"), _(ERR_MSG_PRM_IN_DEF), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_PRM_IN_DEF)); } break; case MATH_ERROR_MEMORY: buf = g_strdup(_(ERR_MSG_MEMORY)); break; case MATH_ERROR_UNKNOWN: buf = g_strdup(_(ERR_MSG_UNKNOWN)); break; case MATH_ERROR_INVALID_FUNC: code_buf = check_error_position(eq, code); if (eq->err_info.func.fprm) { buf = g_strdup_printf("%s '%s()' (%d:%d)", _(ERR_MSG_POS_FUNC), eq->err_info.func.fprm->name, eq->err_info.pos.line, eq->err_info.pos.ofst); } else { buf = g_strdup(_(ERR_MSG_POS_FUNC)); } break; case MATH_ERROR_CONST_EXIST: code_buf = check_error_position(eq, code); ptr = math_equation_get_const_name(eq, eq->err_info.const_id); if (ptr) { buf = g_strdup_printf("%s '%s' (%d:%d)", _(ERR_MSG_CONST_EXIST), ptr, eq->err_info.pos.line, eq->err_info.pos.ofst); } else { buf = g_strdup(_(ERR_MSG_CONST_EXIST)); } break; case MATH_ERROR_CALCULATION: buf = g_strdup(_(ERR_MSG_CALCULATION)); break; case MATH_ERROR_UNTERMINATED_STRING: code_buf = check_error_position(eq, code); if (code_buf) { buf = g_strdup_printf("%s (%d:%d)\n the error is found at: %s", _(ERR_MSG_UNTERMINATED_STRING), eq->err_info.pos.line, eq->err_info.pos.ofst, code_buf); } else { buf = g_strdup(_(ERR_MSG_UNTERMINATED_STRING)); } break; default: buf = g_strdup(_(ERR_MSG_UNKNOWN)); } if (code_buf) g_free(code_buf); if (buf) { gsize len; ptr = g_locale_from_utf8(buf, -1, NULL, &len, NULL); g_free(buf); buf = ptr; } return buf; } void math_err_get_recent_error_position(int *line, int *ofst) { if (line) { *line = ErrorLine; } if (ofst) { *ofst = ErrorOfst; } } ngraph-gtk-6.09.05/src/math/math_equation.c0000644000175000017500000013542414142161773015417 00000000000000/* * $Id: math_equation.c,v 1.13 2009-11-24 06:32:37 hito Exp $ * */ #include "config.h" #include #include #include #include "math_parser.h" #include "math_equation.h" #include "object.h" #include "nstring.h" #define BUF_UNIT 64 struct usr_func_array_info { int prev_num; MathEquationArray *prev, *local; }; struct scope_info { int variable_offset; int string_offset; struct usr_func_array_info array, string_array; }; static void init_parameter(MathEquation *eq); static void free_parameter(MathEquation *eq); static void free_func(NHASH func); static void optimize_func(NHASH func); static int optimize_const_definition(MathEquation *eq); static int math_equation_call_user_func(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval); static int check_const_in_expression_list(MathExpression *exp, int *constant, int n); static int check_const_sub(MathExpression *exp, int *constant, int n); static MathValue * add_to_ary(MathValue *buf, int *num, int *size, const MathValue *val) { MathValue *ptr; if (*num % BUF_UNIT == 0) { int n; n = *num / BUF_UNIT; ptr = g_realloc(buf, sizeof(*buf) * (n + 1) * BUF_UNIT); if (ptr == NULL) { g_free(buf); *num = 0; return NULL; } buf = ptr; if (size) *size = (n + 1) * BUF_UNIT; } if (val) { buf[*num] = *val; } else { buf[*num].val = 0; buf[*num].type = MATH_VALUE_NORMAL; } (*num)++; return buf; } static int * add_to_ary_int(int *buf, int *num, int val) { int *ptr; if (*num % BUF_UNIT == 0) { int n; n = *num / BUF_UNIT; ptr = g_realloc(buf, sizeof(*buf) * (n + 1) * BUF_UNIT); if (ptr == NULL) { g_free(buf); *num = 0; return NULL; } buf = ptr; } buf[*num] = val; (*num)++; return buf; } static MathEquationArray * add_to_ary_array(MathEquationArray *buf, int *num) { MathEquationArray *ptr; if (*num % BUF_UNIT == 0) { int n; n = *num / BUF_UNIT; ptr = g_realloc(buf, sizeof(*buf) * (n + 1) * BUF_UNIT); if (ptr == NULL) { g_free(buf); *num = 0; return NULL; } buf = ptr; } buf[*num].num = 0; buf[*num].size = 0; buf[*num].data.ptr = NULL; (*num)++; return buf; } MathEquation * math_equation_basic_new(void) { MathEquation *eq; eq = math_equation_new(); if (eq == NULL) { return NULL; } if (math_add_basic_constant(eq)) goto ErrEnd; if (math_add_basic_function(eq)) goto ErrEnd; return eq; ErrEnd: math_equation_free(eq); return NULL; } static int math_stack_init(MathStack *stack, int type) { int size; if (type == DATA_TYPE_STRING) { size = sizeof(*(stack->stack.str)); } else { size = sizeof(*(stack->stack.val)); } stack->type = type; stack->variable = nhash_new(); if (stack->variable == NULL) { return 1; } stack->local_variable = nhash_new(); if (stack->local_variable == NULL) { nhash_free(stack->variable); stack->variable = NULL; return 1; } stack->num = 0; stack->ofst = 0; stack->end = 0; stack->size = 0; stack->element_size = size; return 0; } static void free_stack_strings(MathStack *stack) { int i; for (i = 0; i < stack->end; i++) { GString *str; str = stack->stack.str[i]; if (str) { g_string_free(str, TRUE); stack->stack.str[i] = NULL; } } } static void math_stack_free(MathStack *stack) { if (stack->variable) { nhash_free(stack->variable); stack->variable = NULL; } if (stack->local_variable) { nhash_free(stack->local_variable); stack->local_variable = NULL; } if (stack->type == DATA_TYPE_STRING) { free_stack_strings(stack); } g_free(stack->stack.ptr); stack->stack.ptr = NULL; } static int math_array_init(MathArray *array, enum DATA_TYPE type) { array->type = type; array->array = nhash_new(); array->local_array = nhash_new(); if (array->array == NULL || array->local_array == NULL) { return 1; } array->buf = NULL; array->num = 0; array->local_num = 0; return 0; } void math_equation_set_eoeq_assign_type(MathEquation *eq, enum EOEQ_ASSIGN_TYPE type) { if (eq == NULL) { return; } eq->eoeq_assign_type = type; } MathEquation * math_equation_new(void) { MathEquation *eq; int r; eq = g_malloc(sizeof(*eq)); if (eq == NULL) return NULL; memset(eq, 0, sizeof(*eq)); eq->constant = nhash_new(); eq->function = nhash_new(); eq->scope_info = arraynew(sizeof(struct scope_info)); r = math_stack_init(&(eq->stack), DATA_TYPE_VALUE); if (r) { math_equation_free(eq); return NULL; } r = math_stack_init(&(eq->string_stack), DATA_TYPE_STRING); if (r) { math_equation_free(eq); return NULL; } r = math_array_init(&(eq->array), DATA_TYPE_VALUE); if (r) { math_equation_free(eq); return NULL; } r = math_array_init(&(eq->string_array), DATA_TYPE_STRING); if (r) { math_equation_free(eq); return NULL; } if (eq->function == NULL || eq->constant == NULL || eq->scope_info == NULL) { math_equation_free(eq); return NULL; } eq->eoeq_assign_type = EOEQ_ASSIGN_TYPE_BOTH; eq->use_eoeq_assign = FALSE; return eq; } static void clear_pos_func_buf(MathEquation *eq) { int i; if (eq->pos_func_buf == NULL) { return; } for (i = 0; i < eq->pos_func_num; i++) { eq->pos_func_buf[i].val = 0; eq->pos_func_buf[i].type = MATH_VALUE_UNDEF; } } static void clear_variable_array(MathValue *vbuf, int n) { memset(vbuf, 0, sizeof(*vbuf) * n); } static void clear_string_array(GString **gstr, int n) { int i; for (i = 0; i < n; i++) { g_string_set_size(gstr[i], 0); } } static void clear_arrays(MathArray *array) { int i, n; n = array->num; if (n <= 0) { return; } if (array->buf == NULL) { return; } for (i = 0; i < n; i++) { if (array->buf[i].num <= 0 || array->buf[i].data.ptr == NULL) { continue; } if (array->type == DATA_TYPE_VALUE) { clear_variable_array(array->buf[i].data.val, array->buf[i].num); } else { clear_string_array(array->buf[i].data.str, array->buf[i].num); } array->buf[i].num = 0; } } void math_equation_clear(MathEquation *eq) { if (eq == NULL) return; clear_pos_func_buf(eq); clear_variable_array(eq->stack.stack.val, eq->stack.num); clear_arrays(&eq->array); clear_arrays(&eq->string_array); } void math_equation_set_parse_error(MathEquation *eq, const char *ptr, const struct math_string *str) { if (eq == NULL) return; eq->err_info.pos.pos = ptr; eq->err_info.pos.line = str->line + 1; eq->err_info.pos.ofst = str->ofst + 1; } void math_equation_set_const_error(MathEquation *eq, int id) { if (eq == NULL) return; eq->err_info.const_id = id; } void math_equation_set_func_arg_num_error(MathEquation *eq, struct math_function_parameter *fprm, int arg_num) { if (eq == NULL) return; eq->err_info.func.fprm = fprm; eq->err_info.func.arg_num = arg_num; } void math_equation_set_func_error(MathEquation *eq, struct math_function_parameter *fprm) { math_equation_set_func_arg_num_error(eq, fprm, 0); } int math_equation_parse(MathEquation *eq, const char *str) { int err; if (eq == NULL) return MATH_ERROR_UNKNOWN; memset(&eq->err_info, 0, sizeof(eq->err_info)); if (eq->cnum > 0 && eq->cbuf == NULL) return MATH_ERROR_UNKNOWN; if (eq->pos_func_buf) { g_free(eq->pos_func_buf); eq->pos_func_buf = NULL; } eq->pos_func_num = 0; if (eq->opt_exp) { math_expression_free(eq->opt_exp); eq->opt_exp = NULL; } if (eq->exp) { math_expression_free(eq->exp); } init_parameter(eq); eq->use_eoeq_assign = FALSE; if (str) { eq->exp = math_parser_parse(str, eq, &err); } else { eq->exp = NULL; } if (eq->pos_func_num > 0) { eq->pos_func_buf = g_malloc(eq->pos_func_num * sizeof(*eq->pos_func_buf)); if (eq->pos_func_buf == NULL) { math_expression_free(eq->exp); return MATH_ERROR_MEMORY; } clear_pos_func_buf(eq); } return err; } static void free_array_buf(MathEquationArray *buf, int num) { int i; if (buf == NULL) return; for (i = 0; i < num; i++) { g_free(buf[i].data.ptr); } g_free(buf); } static void free_string_array_buf(MathEquationArray *buf, int num) { int i; if (buf == NULL) { return; } for (i = 0; i < num; i++) { int j, n; GString **ary; ary = buf[i].data.str; n = buf[i].size; for (j = 0; j < n; j++) { if (ary[j]) { g_string_free(ary[j], TRUE); } } g_free(buf[i].data.ptr); } g_free(buf); } static void math_array_free(MathArray *array) { if (array == NULL) { return; } if (array->array) { nhash_free(array->array); } if (array->local_array) { nhash_free(array->local_array); } switch (array->type) { case DATA_TYPE_VALUE: free_array_buf(array->buf, array->num); break; case DATA_TYPE_STRING: free_string_array_buf(array->buf, array->num); break; } } void math_equation_free(MathEquation *eq) { if (eq == NULL) return; if (eq->constant) nhash_free(eq->constant); math_stack_free(&eq->stack); math_stack_free(&eq->string_stack); math_array_free(&eq->array); math_array_free(&eq->string_array); if (eq->function) free_func(eq->function); if (eq->const_def) { math_expression_free(eq->const_def); } free_parameter(eq); arrayfree(eq->scope_info); math_expression_free(eq->exp); math_expression_free(eq->opt_exp); g_free(eq->cbuf); g_free(eq->pos_func_buf); g_free(eq); } int math_equation_optimize(MathEquation *eq) { int err; if ((eq == NULL) || (eq->exp == NULL) || (eq->cnum > 0 && eq->cbuf == NULL) || (eq->stack.num > 0 && eq->stack.stack.ptr == NULL) || (eq->string_stack.num > 0 && eq->string_stack.stack.ptr == NULL)) { return 1; } /* optimize_const_definition() must be called before any other optimization */ if (optimize_const_definition(eq)) { return 1; } /* optimize_func() must be called before optimize_expression() */ optimize_func(eq->function); if (eq->opt_exp) { math_expression_free(eq->opt_exp); } eq->opt_exp = math_expression_optimize(eq->exp, &err); return err; } int math_equation_calculate(MathEquation *eq, MathValue *val) { int r; if (val == NULL) { return 1; } val->val = 0; val->type = MATH_VALUE_ERROR; if ((eq == NULL) || (eq->exp == NULL) || (eq->cnum > 0 && eq->cbuf == NULL) || (eq->stack.num > 0 && eq->stack.stack.val == NULL) || (eq->string_stack.num > 0 && eq->string_stack.stack.ptr == NULL)) { return 1; } if (eq->opt_exp) { r = math_expression_calculate(eq->opt_exp, val); } else { r = math_expression_calculate(eq->exp, val); } return r; } int math_equation_add_parameter(MathEquation *eq, int type, int min, int max, int use_index) { MathEquationParametar *ptr, *prm; prm = g_malloc(sizeof(*prm)); if (prm == NULL) return 1; prm->type = type; prm->min_length = min; prm->max_length = max; prm->use_index = use_index; prm->id_num = 0; prm->id_max = -1; prm->next = NULL; prm->id = NULL; if (eq->parameter == NULL) { eq->parameter = prm; } else { ptr = eq->parameter; while (ptr->next) { ptr = ptr->next; } ptr->next = prm; prm->next = NULL; } return 0; } static int add_parameter_data(MathEquationParametar *ptr, int val) { if (ptr->id == NULL) { ptr->id = add_to_ary_int(ptr->id, &ptr->id_num, val); } else { int i; for (i = 0; i < ptr->id_num; i++) { if (ptr->id[i] == val) { return i; } } ptr->id = add_to_ary_int(ptr->id, &ptr->id_num, val); } if (ptr->id == NULL) { /* error: cannot allocate enough memory */ return -1; } if (val > ptr->id_max) { ptr->id_max = val; } return ptr->id_num - 1; } int math_equation_use_parameter(MathEquation *eq, int type, int val) { MathEquationParametar *ptr; if (eq->parameter == NULL) { /* error: the parameter is not exist */ return -1; } ptr = eq->parameter; while (ptr) { if (ptr->type == type) { break; } ptr = ptr->next; } if (ptr == NULL) { /* error: the parameter is not exist */ return -1; } return add_parameter_data(ptr, val); } int math_equation_set_parameter_data(MathEquation *eq, int type, MathValue *data) { MathEquationParametar *ptr; if (eq->parameter == NULL) { /* error: the parameter is not exist */ return 1; } ptr = eq->parameter; while (ptr) { if (ptr->type == type) { ptr->data = data; return 0; } ptr = ptr->next; } return 1; } MathEquationParametar * math_equation_get_parameter(MathEquation *eq, int type, int *err) { MathEquationParametar *ptr; if (eq == NULL || eq->parameter == NULL) { if (err) { *err = MATH_ERROR_INVALID_PRM; } return NULL; } if (eq->func_def) { if (err) { *err = MATH_ERROR_PRM_IN_DEF; } return NULL; } ptr = eq->parameter; while (ptr) { if (ptr->type == type) { break; } ptr = ptr->next; } return ptr; } static void init_parameter(MathEquation *eq) { MathEquationParametar *ptr; if (eq->parameter == NULL) { return; } ptr = eq->parameter; while (ptr) { if (ptr->id) { g_free(ptr->id); ptr->id = NULL; } ptr->id_num = 0; ptr->id_max = 0; ptr = ptr->next; } } static void free_parameter(MathEquation *eq) { MathEquationParametar *ptr, *next; if (eq->parameter == NULL) { return; } ptr = eq->parameter; while (ptr) { next = ptr->next; if (ptr->id) { g_free(ptr->id); } g_free(ptr); ptr = next; } } int math_equation_add_pos_func(MathEquation *eq, struct math_function_parameter *fprm) { int n; if (fprm->type != MATH_FUNCTION_TYPE_POSITIONAL) return -1; if (eq->func_def) return MATH_ERROR_INVALID_FUNC; n = eq->pos_func_num; eq->pos_func_num++; return n; } static void free_func_prm_sub(struct math_function_parameter *ptr) { g_free(ptr->name); if (ptr->opt_usr) { math_expression_free(ptr->opt_usr); ptr->opt_usr = NULL; } if (ptr->base_usr) { math_expression_free(ptr->base_usr); ptr->base_usr = NULL; } g_free(ptr->arg_type); } static void free_func_prm(struct math_function_parameter *ptr) { free_func_prm_sub(ptr); g_free(ptr); } static int free_func_cb(struct nhash *hash, void *ptr) { struct math_function_parameter *fprm; fprm = (struct math_function_parameter *) hash->val.p; free_func_prm(fprm); return 0; } static void free_func(NHASH func) { nhash_each(func, free_func_cb, NULL); nhash_free(func); return; } static int optimize_func_cb(struct nhash *hash, void *ptr) { struct math_function_parameter *fprm; int err; fprm = (struct math_function_parameter *) hash->val.p; if (fprm->opt_usr) { math_expression_free(fprm->opt_usr); fprm->opt_usr = NULL; } if (fprm->base_usr) { fprm->opt_usr = math_expression_optimize(fprm->base_usr, &err); } if (fprm->opt_usr && fprm->opt_usr->u.func.exp->type == MATH_EXPRESSION_TYPE_DOUBLE) { fprm->side_effect = 0; } else { fprm->side_effect = 1; } return 0; } static void optimize_func(NHASH func) { nhash_each(func, optimize_func_cb, NULL); return; } void math_equation_remove_func(MathEquation *eq, const char *name) { int r; struct math_function_parameter *ptr; r = nhash_get_ptr(eq->function, name, (void *) &ptr); if (r == 0) { free_func_prm(ptr); nhash_del(eq->function, name); if (eq->exp) { math_expression_free(eq->exp); eq->exp = NULL; } if (eq->opt_exp) { math_expression_free(eq->opt_exp); eq->opt_exp = NULL; } } } struct math_function_parameter * math_equation_start_user_func_definition(MathEquation *eq, const char *name) { struct math_function_parameter *fprm; if (eq == NULL || eq->func_def) return NULL; fprm = g_malloc(sizeof(*fprm)); if (fprm == NULL) return NULL; fprm->argc = 0; fprm->side_effect = 1; fprm->type = MATH_FUNCTION_TYPE_NORMAL; fprm->func = math_equation_call_user_func; fprm->base_usr = NULL; fprm->opt_usr = NULL; fprm->arg_type = NULL; fprm->name = g_strdup(name); if (fprm->name == NULL) { g_free(fprm); return NULL; } eq->stack.local_num = 0; eq->array.local_num = 0; eq->func_def = 1; return fprm; } int math_equation_register_user_func_definition(MathEquation *eq, const char *name, MathExpression *exp) { struct math_function_parameter *fprm; if (eq == NULL || ! eq->func_def || name == NULL || exp == NULL) return 1; fprm = math_equation_get_func(eq, name); if (fprm == NULL) { int r; r = nhash_set_ptr(eq->function, name, exp->u.func.fprm); return r; } #if 0 if (fprm->argc != exp->u.func.fprm->argc) { return 1; } if (fprm->argc > 0) { enum MATH_FUNCTION_ARG_TYPE *arg_type1, *arg_type2; arg_type1 = fprm->arg_type; arg_type2 = exp->u.func.fprm->arg_type; if (arg_type1 && arg_type2) { int i; for (i = 0; i < fprm->argc; i++) { if (arg_type1[i] != arg_type2[i]) { return 1; } } } else if ((arg_type1 && arg_type2 == NULL) || (arg_type1 == NULL && arg_type2)) { return 1; } } #endif free_func_prm_sub(fprm); memcpy(fprm, exp->u.func.fprm, sizeof(*fprm)); g_free(exp->u.func.fprm); exp->u.func.fprm = fprm; return 0; } static void clear_stack_local(MathStack *stack, int *vnum) { if (vnum) { *vnum = nhash_num(stack->local_variable); } nhash_clear(stack->local_variable); stack->local_num = 0; } int math_equation_finish_user_func_definition(MathEquation *eq, int *vnum, int *anum, int *str_anum, int *snum) { if (eq == NULL || ! eq->func_def) return 1; clear_stack_local(&eq->stack, vnum); clear_stack_local(&eq->string_stack, snum); if (anum) { *anum = nhash_num(eq->array.local_array); } nhash_clear(eq->array.local_array); if (str_anum) { *str_anum = nhash_num(eq->string_array.local_array); } nhash_clear(eq->string_array.local_array); eq->array.local_num = 0; eq->string_array.local_num = 0; eq->func_def = 0; return 0; } struct math_function_parameter * math_equation_add_func(MathEquation *eq, const char *name, struct math_function_parameter *prm) { int r; struct math_function_parameter *ptr; if (eq == NULL) return NULL; r = nhash_get_ptr(eq->function, name, (void *) &ptr); if (r == 0) { free_func_prm(ptr); } ptr = g_malloc(sizeof(*ptr)); if (ptr == NULL) return NULL; memcpy(ptr, prm, sizeof(*ptr)); ptr->name = g_strdup(name); if (ptr->name == NULL) { g_free(ptr); return NULL; } if (prm->arg_type) { int argc; argc = math_function_get_arg_type_num(prm); if (argc > 0) { ptr->arg_type = g_malloc(sizeof(*prm->arg_type) * argc); if (ptr->arg_type == NULL) { g_free(ptr->name); g_free(ptr); return NULL; } memcpy(ptr->arg_type, prm->arg_type, sizeof(*prm->arg_type) * argc); } } r = nhash_set_ptr(eq->function, name, ptr); if (r) { g_free(ptr->name); g_free(ptr->arg_type); g_free(ptr); return NULL; } return ptr; } struct math_function_parameter * math_equation_get_func(MathEquation *eq, const char *name) { int r; struct math_function_parameter *ptr; r = nhash_get_ptr(eq->function, name, (void *) &ptr); if (r) { return NULL; } return (struct math_function_parameter *) ptr; } int math_equation_add_const(MathEquation *eq, const char *name, const MathValue *val) { int i, r; if (eq == NULL) return -1; r = nhash_get_int(eq->constant, name, &i); if (r) { i = eq->cnum; eq->cbuf = add_to_ary(eq->cbuf, &eq->cnum, NULL, val); if (eq->cbuf == NULL) { /* error: cannot allocate enough memory */ return -1; } nhash_set_int(eq->constant, name, i); } else if (eq->cbuf && i < eq->cnum && val) { eq->cbuf[i] = *val; } return i; } int math_equation_add_const_definition(MathEquation *eq, const char *name, MathExpression *exp, int *err) { int i, r; MathValue val; if (eq == NULL) return -1; r = nhash_get_int(eq->constant, name, &i); if (r == 0) { /* error: the constant is already exist */ *err = MATH_ERROR_CONST_EXIST; eq->err_info.const_id = i; return -1; } if (math_expression_calculate(exp->u.const_def.operand, &val)) { *err = MATH_ERROR_CALCULATION; return -1; } i = math_equation_add_const(eq, name, &val); if (i < 0) { *err = MATH_ERROR_MEMORY; return -1; } exp->u.const_def.id = i; exp->next = eq->const_def; eq->const_def = exp; return i; } static int optimize_const_definition_sub(MathEquation *eq, MathExpression *exp) { MathValue val; int r; if (exp == NULL) { return 0; } r = optimize_const_definition_sub(eq, exp->next); if (r) { return r; } r = math_expression_calculate(exp->u.const_def.operand, &val); if (r) { return r; } return math_equation_set_const(eq, exp->u.const_def.id, &val); } static int optimize_const_definition(MathEquation *eq) { if (eq->const_def == NULL) { return 0; } return optimize_const_definition_sub(eq, eq->const_def); } static void init_string_array(GString **str, int n) { int i; for (i = 0; i < n; i++) { str[i] = g_string_new(""); } } static int expand_stack(MathStack *stack, int size) { char *ptr; int request_size; request_size = stack->end + size; if (stack->size <= request_size) { int n; n = (request_size / BUF_UNIT + 1) * BUF_UNIT; ptr = g_realloc(stack->stack.ptr, (gsize) stack->element_size * n); if (ptr == NULL) { return 1; } stack->stack.ptr = ptr; stack->size = n; } if (stack->stack.ptr == NULL) return 1; if (stack->type == DATA_TYPE_STRING) { init_string_array(stack->stack.str + stack->end, size); } else { memset(stack->stack.val + stack->end, 0, (size_t) stack->element_size * size); } stack->ofst = stack->end; stack->end = request_size; return 0; } int math_equation_add_var(MathEquation *eq, const char *name) { int i, r; if (eq == NULL) return -1; if (eq->func_def) { r = nhash_get_int(eq->stack.local_variable, name, &i); if (r) { i = eq->stack.local_num; nhash_set_int(eq->stack.local_variable, name, i); eq->stack.local_num++; } return i; } r = nhash_get_int(eq->stack.variable, name, &i); if (r) { i = eq->stack.num; if (expand_stack(&(eq->stack), 1)) { /* error: cannot allocate enough memory */ return -1; } eq->stack.ofst = 0; eq->stack.num++; nhash_set_int(eq->stack.variable, name, i); } return i; } int math_equation_add_var_string(MathEquation *eq, const char *name) { int i, r; if (eq == NULL) return -1; if (eq->func_def) { r = nhash_get_int(eq->string_stack.local_variable, name, &i); if (r) { i = eq->string_stack.local_num; nhash_set_int(eq->string_stack.local_variable, name, i); eq->string_stack.local_num++; } return i; } r = nhash_get_int(eq->string_stack.variable, name, &i); if (r) { i = eq->string_stack.num; if (expand_stack(&(eq->string_stack), 1)) { /* error: cannot allocate enough memory */ return -1; } eq->string_stack.ofst = 0; eq->string_stack.num++; nhash_set_int(eq->string_stack.variable, name, i); } return i; } int math_equation_set_const_by_name(MathEquation *eq, const char *name, const MathValue *val) { int i, r; r = nhash_get_int(eq->constant, name, &i); if (r) { return 1; } if (eq->cbuf == NULL) { return 1; } eq->cbuf[i] = *val; return 0; } struct search_val { int val; char *name; }; int search_val_cb(struct nhash *hash, void *ptr) { struct search_val *v; v = (struct search_val *) ptr; if (hash->val.i == v->val) { v->name = hash->key; } return 0; } char * math_equation_get_var_name(MathEquation *eq, int idx) { struct search_val v; if (eq == NULL) return NULL; v.val = idx; v.name = NULL; nhash_each(eq->stack.variable, search_val_cb, &v); return v.name; } char * math_equation_get_const_name(MathEquation *eq, int idx) { struct search_val v; if (eq == NULL) return NULL; v.val = idx; v.name = NULL; nhash_each(eq->constant, search_val_cb, &v); return v.name; } int math_equation_set_const(MathEquation *eq, int idx, const MathValue *val) { if (eq->cbuf == NULL || idx >= eq->cnum || idx < 0) { return 1; } eq->cbuf[idx] = *val; return 0; } int math_equation_set_var_string(MathEquation *eq, int idx, const char *str) { int i; i = idx + eq->string_stack.ofst; if (eq->string_stack.stack.str[i] == NULL) { eq->string_stack.stack.str[i] = g_string_new(str); } else { g_string_assign(eq->string_stack.stack.str[i], str); } return 0; } int math_equation_set_var(MathEquation *eq, int idx, const MathValue *val) { if (eq->stack.stack.val == NULL || idx + eq->stack.ofst >= eq->stack.end) { return 1; } eq->stack.stack.val[idx + eq->stack.ofst] = *val; return 0; } int math_equation_get_const_by_name(MathEquation *eq, const char *name, MathValue *val) { int i, r; r = nhash_get_int(eq->constant, name, &i); if (r) { /* error: cannot find the constant */ return -1; } if (eq->cbuf == NULL) { /* error: cannot find the constant */ return -1; } if (val) { *val = eq->cbuf[i]; } return i; } int math_equation_get_const(MathEquation *eq, int idx, MathValue *val) { if (eq->cbuf == NULL || idx >= eq->cnum) { return 1; } if (val) { *val = eq->cbuf[idx]; } return 0; } #define USER_FUNC_NEST_MAX 8192 static int local_array_alloc(MathFunctionExpression *func, MathFunctionArgument *argv, struct usr_func_array_info *info) { int i, j; info->local = NULL; if (func->local_array_num < 0) { return 0; } info->local = g_malloc(sizeof(*info->local) * func->local_array_num); if (info->local == NULL) { return 1; } memset(info->local, 0, sizeof(*info->local) * func->local_array_num); if (func->fprm->arg_type == NULL) { return 0; } j = 0; for (i = 0; i < func->argc; i++) { if (func->fprm->arg_type[i] == MATH_FUNCTION_ARG_TYPE_ARRAY) { info->local[j] = info->prev[argv[i].array.idx]; j++; } } return 0; } static int local_string_array_alloc(MathFunctionExpression *func, MathFunctionArgument *argv, struct usr_func_array_info *info) { int i, j; info->local = NULL; if (func->local_string_array_num < 0) { return 0; } info->local = g_malloc(sizeof(*info->local) * func->local_string_array_num); if (info->local == NULL) { return 1; } memset(info->local, 0, sizeof(*info->local) * func->local_string_array_num); if (func->fprm->arg_type == NULL) { return 0; } j = 0; for (i = 0; i < func->argc; i++) { if (func->fprm->arg_type[i] == MATH_FUNCTION_ARG_TYPE_STRING_ARRAY) { info->local[j] = info->prev[argv[i].array.idx]; j++; } } return 0; } static void local_array_free(MathFunctionExpression *func, MathFunctionArgument *argv, struct usr_func_array_info *info) { int i, j; if (func->fprm->arg_type == NULL) { return; } j = 0; for (i = 0; i < func->argc; i++) { if (func->fprm->arg_type[i] == MATH_FUNCTION_ARG_TYPE_ARRAY) { info->prev[argv[i].array.idx] = info->local[j]; info->local[j].num = 0; info->local[j].size = 0; info->local[j].data.val = NULL; j++; } } free_array_buf(info->local, func->local_array_num); } static void local_string_array_free(MathFunctionExpression *func, MathFunctionArgument *argv, struct usr_func_array_info *info) { int i, j; if (func->fprm->arg_type == NULL) { return; } j = 0; for (i = 0; i < func->argc; i++) { if (func->fprm->arg_type[i] == MATH_FUNCTION_ARG_TYPE_STRING_ARRAY) { info->prev[argv[i].array.idx] = info->local[j]; info->local[j].num = 0; info->local[j].size = 0; info->local[j].data.str = NULL; j++; } } free_string_array_buf(info->local, func->local_string_array_num); } struct scope_info * scope_info_push(MathFunctionExpression *func, MathFunctionArgument *argv, MathEquation *eq) { struct narray *array; struct scope_info scope; scope.variable_offset = eq->stack.ofst; scope.string_offset = eq->string_stack.ofst; scope.array.prev = eq->array.buf; scope.array.prev_num = eq->array.num; scope.array.local = NULL; scope.string_array.prev = eq->string_array.buf; scope.string_array.prev_num = eq->string_array.num; scope.string_array.local = NULL; local_array_alloc(func, argv, &scope.array); if (func->local_array_num > 0 && scope.array.local == NULL) { return NULL; } local_string_array_alloc(func, argv, &scope.string_array); if (func->local_string_array_num > 0 && scope.string_array.local == NULL) { return NULL; } eq->array.buf = scope.array.local; eq->array.num = func->local_array_num; eq->string_array.buf = scope.string_array.local; eq->string_array.num = func->local_string_array_num; array = arrayadd(eq->scope_info, &scope); if (array == NULL) { return NULL; } return arraylast(eq->scope_info); } static void scope_info_pop(MathFunctionExpression *func, MathFunctionArgument *argv, MathEquation *eq) { struct scope_info *scope; scope = arraylast(eq->scope_info); if (scope == NULL) { return; } local_array_free(func, argv, &scope->array); local_string_array_free(func, argv, &scope->string_array); eq->stack.ofst = scope->variable_offset; eq->string_stack.ofst = scope->string_offset; eq->array.buf = scope->array.prev; eq->array.num = scope->array.prev_num; eq->string_array.buf = scope->string_array.prev; eq->string_array.num = scope->string_array.prev_num; eq->scope_info->num--; } static int math_equation_call_user_func(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { static int nest = 0; int end, str_end, r, i, j, k; struct scope_info *scope; MathExpression *func; MathFunctionArgument *argv; const char *str; GString *gstr; enum MATH_FUNCTION_ARG_TYPE arg_type; if (nest > USER_FUNC_NEST_MAX) return 1; if (exp->fprm->opt_usr) { func = exp->fprm->opt_usr; } else if (exp->fprm->base_usr) { func = exp->fprm->base_usr; } else { return 1; } argv = exp->buf; scope = scope_info_push(&func->u.func, argv, eq); end = eq->stack.end; str_end = eq->string_stack.end; if (scope == NULL) { return 1; } if (expand_stack(&(eq->stack), func->u.func.local_num)) { scope_info_pop(&func->u.func, argv, eq); return 1; } if (expand_stack(&(eq->string_stack), func->u.func.local_string_num)) { scope_info_pop(&func->u.func, argv, eq); return 1; } j = k = 0; for (i = 0; i < exp->argc; i++) { arg_type = (func->u.func.fprm->arg_type) ? func->u.func.fprm->arg_type[i] : MATH_FUNCTION_ARG_TYPE_DOUBLE; switch (arg_type) { case MATH_FUNCTION_ARG_TYPE_DOUBLE: eq->stack.stack.val[eq->stack.ofst + j] = argv[i].val; j++; break; case MATH_FUNCTION_ARG_TYPE_STRING: case MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE: str = math_expression_get_string_from_argument(exp, i); if (str == NULL) { scope_info_pop(&func->u.func, argv, eq); return 1; } gstr = eq->string_stack.stack.str[eq->string_stack.ofst + k]; g_string_assign(gstr, str); k++; break; default: break; } } nest++; r = math_expression_calculate(func->u.func.exp, rval); nest--; for (i = 0; i < func->u.func.local_string_num; i++) { j = eq->string_stack.ofst + i; g_string_free(eq->string_stack.stack.str[j], TRUE); eq->string_stack.stack.str[j] = NULL; } scope_info_pop(&func->u.func, argv, eq); eq->stack.end = end; eq->string_stack.end = str_end; return r; } static int math_equation_check_var_common(MathStack *stack, const char *name, int func_def) { int r, i; if (func_def) { r = nhash_get_int(stack->local_variable, name, &i); } else { r = nhash_get_int(stack->variable, name, &i); } if (r) { return -1; } return i; } int math_equation_check_var(MathEquation *eq, const char *name) { return math_equation_check_var_common(&(eq->stack), name, eq->func_def); } int math_equation_check_string_var(MathEquation *eq, const char *name) { return math_equation_check_var_common(&(eq->string_stack), name, eq->func_def); } int math_equation_get_var(MathEquation *eq, int idx, MathValue *val) { if (eq->stack.stack.val == NULL || idx + eq->stack.ofst >= eq->stack.end) { return 1; } if (val) { *val = eq->stack.stack.val[idx + eq->stack.ofst]; } return 0; } MathValue * math_equation_get_var_ptr(MathEquation *eq, int idx) { if (eq->stack.stack.val == NULL || idx + eq->stack.ofst >= eq->stack.end) { return NULL; } return eq->stack.stack.val + (idx + eq->stack.ofst); } int math_equation_get_string_var(MathEquation *eq, int idx, GString **str) { if (eq->string_stack.stack.str == NULL || idx + eq->string_stack.ofst >= eq->string_stack.end) { return 1; } if (str) { *str = eq->string_stack.stack.str[idx + eq->string_stack.ofst]; } return 0; } void math_equation_clear_variable(MathEquation *eq) { if (eq->stack.stack.ptr) { switch (eq->stack.type) { case DATA_TYPE_VALUE: clear_variable_array(eq->stack.stack.val, eq->stack.num); /* which is better to use stack.num or stack.end? */ break; case DATA_TYPE_STRING: free_stack_strings(&(eq->stack)); break; } g_free(eq->stack.stack.ptr); eq->stack.num = 0; eq->stack.stack.ptr = NULL; } nhash_clear(eq->stack.variable); } int math_equation_check_array(MathEquation *eq, const char *name) { int r, i; if (eq->func_def) { r = nhash_get_int(eq->array.local_array, name, &i); } else { r = nhash_get_int(eq->array.array, name, &i); } if (r) { return -1; } return i; } int math_equation_check_string_array(MathEquation *eq, const char *name) { int r, i; if (eq->func_def) { r = nhash_get_int(eq->string_array.local_array, name, &i); } else { r = nhash_get_int(eq->string_array.array, name, &i); } if (r) { return -1; } return i; } int math_equation_add_array(MathEquation *eq, const char *name, int is_string) { int i, r; MathArray *array; if (eq == NULL) return -1; if (is_string) { array = &eq->string_array; } else { array = &eq->array; } if (eq->func_def) { r = nhash_get_int(array->local_array, name, &i); if (r) { i = array->local_num; if (nhash_set_int(array->local_array, name, i)) { /* error: cannot allocate enough memory */ return -1; } array->local_num++; } } else { r = nhash_get_int(array->array, name, &i); if (r) { i = array->num; array->buf = add_to_ary_array(array->buf, &array->num); if (array->array == NULL) { /* error: cannot allocate enough memory */ return -1; } if (nhash_set_int(array->array, name, i)) { /* error: cannot allocate enough memory */ return -1; } } } return i; } static int check_array(MathArray *array, int id, int index) { int i; MathEquationArray *ary; void *ptr; size_t element_size; if (array->buf == NULL || id < 0 || id >= array->num) { /* error: the array is not exist */ return -1; } ary = array->buf + id; if (index < 0) { i = ary->num + index; } else { i = index; } if (i < 0 || i > MATH_EQUATION_ARRAY_INDEX_MAX) { /* error: the index of the array is out of bound */ return -1; } element_size = (array->type == DATA_TYPE_STRING) ? sizeof(*ary->data.str) : sizeof(*ary->data.val); if (i >= ary->size) { int n; n = (i / BUF_UNIT + 1) * BUF_UNIT; ptr = g_realloc(ary->data.val, element_size * n); if (ptr == NULL) { /* error: cannot allocate enough memory */ return -1; } ary->data.ptr = ptr; if (array->type == DATA_TYPE_STRING) { init_string_array(ary->data.str + ary->num, n - ary->num); } else { memset(ary->data.val + ary->num, 0, element_size * (n - ary->num)); } ary->size = n; } if (i >= ary->num) { ary->num = i + 1; } return i; } int math_equation_clear_array(MathEquation *eq, int array) { int i; if (eq == NULL) { return 1; } i = check_array(&eq->array, array, 0); if (i < 0) return 1; clear_variable_array(eq->array.buf[array].data.val, eq->array.buf[array].num); eq->array.buf[array].num = 0; return 0; } int math_equation_clear_string_array(MathEquation *eq, int array) { int i; if (eq == NULL) { return 1; } i = check_array(&eq->string_array, array, 0); if (i < 0) return 1; clear_string_array(eq->string_array.buf[array].data.str, eq->string_array.buf[array].num); eq->string_array.buf[array].num = 0; return 0; } int math_equation_set_array_val(MathEquation *eq, int array, int index, const MathValue *val) { int i; if (eq == NULL) { return 1; } i = check_array(&eq->array, array, index); if (i < 0) return 1; eq->array.buf[array].data.val[i] = *val; return 0; } int math_equation_push_array_val(MathEquation *eq, int array, const MathValue *val) { MathEquationArray *ary; ary = math_equation_get_array(eq, array); if (ary == NULL) { return 1; } return math_equation_set_array_val(eq, array, ary->num, val); } int math_equation_get_array_val(MathEquation *eq, int array, int index, MathValue *val) { int i; if (eq == NULL) { return 1; } i = check_array(&eq->array, array, index); if (i < 0) return 1; if (val) { *val = eq->array.buf[array].data.val[i]; } return 0; } MathValue * math_equation_get_array_ptr(MathEquation *eq, int array, int index) { int i; if (eq == NULL) { return NULL; } i = check_array(&eq->array, array, index); if (i < 0) return NULL; return eq->array.buf[array].data.val + i; } int math_equation_set_array_str(MathEquation *eq, int array, int index, const char *str) { int i; if (str == NULL || eq == NULL) { return 1; } i = check_array(&eq->string_array, array, index); if (i < 0) return 1; g_string_assign(eq->string_array.buf[array].data.str[i], str); return 0; } int math_equation_push_array_str(MathEquation *eq, int array, const char *str) { MathEquationArray *ary; ary = math_equation_get_string_array(eq, array); if (ary == NULL) { return 1; } return math_equation_set_array_str(eq, array, ary->num, str); } int math_equation_unshift_array_val(MathEquation *eq, int array, const MathValue *val) { MathEquationArray *ary; if (math_equation_push_array_val(eq, array, val)) { return 1; } ary = math_equation_get_array(eq, array); if (ary == NULL) { return 1; } if (ary->num == 1) { return 0; } memmove(ary->data.val + 1, ary->data.val, sizeof(*ary->data.val) * (ary->num - 1)); ary->data.val[0] = *val; return 0; } int math_equation_unshift_array_str(MathEquation *eq, int array, const char *cstr) { MathEquationArray *ary; GString *str; if (math_equation_push_array_str(eq, array, cstr)) { return 1; } ary = math_equation_get_string_array(eq, array); if (ary == NULL) { return 1; } if (ary->num == 1) { return 0; } str = ary->data.str[ary->num - 1]; memmove(ary->data.str + 1, ary->data.str, sizeof(*ary->data.str) * (ary->num - 1)); ary->data.str[0] = str; return 0; } GString * math_equation_get_array_str(MathEquation *eq, int array, int index) { int i; if (eq == NULL) { return NULL; } i = check_array(&eq->string_array, array, index); if (i < 0) return NULL; return eq->string_array.buf[array].data.str[i]; } const char * math_equation_get_array_cstr(MathEquation *eq, int array, int index) { GString *str; str = math_equation_get_array_str(eq, array, index); if (str == NULL) { return NULL; } return str->str; } int math_equation_get_array_common_value(MathEquation *eq, int array, int index, enum DATA_TYPE type, MathCommonValue *val) { switch (type) { case DATA_TYPE_VALUE: val->type = DATA_TYPE_VALUE; return math_equation_get_array_val(eq, array, index, &val->data.val); break; case DATA_TYPE_STRING: val->type = DATA_TYPE_STRING; val->data.cstr = math_equation_get_array_cstr(eq, array, index); if (val->data.cstr == NULL) { return 1; } break; } return 0; } int math_equation_set_array_common_value(MathEquation *eq, int array, int index, MathCommonValue *val) { switch (val->type) { case DATA_TYPE_VALUE: return math_equation_set_array_val(eq, array, index, &val->data.val); break; case DATA_TYPE_STRING: return math_equation_set_array_str(eq, array, index, val->data.cstr); break; } return 0; } static MathEquationArray * math_equation_get_array_common(MathArray *array, int id) { if (id < 0 || id >= array->num || array->buf == NULL) { /* error: the array is not exist */ return NULL; } return &array->buf[id]; } int math_equation_pop_array(MathEquation *eq, int array, int type) { MathEquationArray *ary; int i; ary = math_equation_get_type_array(eq, type, array); if (ary == NULL) { return 1; } if (ary->num < 1) { return 1; } i = ary->num - 1; if (type == DATA_TYPE_VALUE) { ary->data.val[i].val = 0; ary->data.val[i].type = MATH_VALUE_NORMAL; } else { g_string_set_size(ary->data.str[i], 0); } ary->num--; return 0; } int math_equation_shift_array(MathEquation *eq, int array, int type) { MathEquationArray *ary; int i; ary = math_equation_get_type_array(eq, type, array); if (ary == NULL) { return 1; } if (ary->num < 1) { return 1; } i = ary->num - 1; if (type == DATA_TYPE_VALUE) { memmove(ary->data.val, ary->data.val + 1, sizeof(*ary->data.val) * (ary->num - 1)); ary->data.val[i].val = 0; ary->data.val[i].type = MATH_VALUE_NORMAL; } else { GString *str; str = ary->data.str[0]; memmove(ary->data.str, ary->data.str + 1, sizeof(*ary->data.str) * (ary->num - 1)); g_string_set_size(str, 0); ary->data.str[i] = str; } ary->num--; return 0; } MathEquationArray * math_equation_get_array(MathEquation *eq, int id) { return math_equation_get_array_common(&eq->array, id); } MathEquationArray * math_equation_get_string_array(MathEquation *eq, int id) { return math_equation_get_array_common(&eq->string_array, id); } MathEquationArray * math_equation_get_type_array(MathEquation *eq, enum DATA_TYPE type, int id) { switch (type) { case DATA_TYPE_VALUE: return math_equation_get_array(eq, id); break; case DATA_TYPE_STRING: return math_equation_get_string_array(eq, id); break; } return NULL; } void math_equation_set_user_data(MathEquation *eq, void *user_data) { if (eq) { eq->user_data = user_data; } } void * math_equation_get_user_data(MathEquation *eq) { return (eq) ? eq->user_data : NULL; } static int check_const_in_string(MathStringExpression *exp, int *constant, int n) { int i, array_size; struct embedded_expression *data; if (exp->variables == NULL) { return 0; } array_size = arraynum(exp->variables); data = arraydata(exp->variables); for (i = 0; i < array_size; i++) { int r; r = check_const_sub(data[i].exp, constant, n); if (r) { return r; } } return 0; } static int check_const_sub(MathExpression *exp, int *constant, int n) { int i, r; if (exp == NULL) return 0; r = 0; switch (exp->type) { case MATH_EXPRESSION_TYPE_OR: case MATH_EXPRESSION_TYPE_AND: case MATH_EXPRESSION_TYPE_EQ: case MATH_EXPRESSION_TYPE_NE: case MATH_EXPRESSION_TYPE_ADD: case MATH_EXPRESSION_TYPE_SUB: case MATH_EXPRESSION_TYPE_MUL: case MATH_EXPRESSION_TYPE_DIV: case MATH_EXPRESSION_TYPE_MOD: case MATH_EXPRESSION_TYPE_POW: case MATH_EXPRESSION_TYPE_GT: case MATH_EXPRESSION_TYPE_GE: case MATH_EXPRESSION_TYPE_LT: case MATH_EXPRESSION_TYPE_LE: r = check_const_sub(exp->u.bin.left, constant, n); if (r) { return r; } r = check_const_sub(exp->u.bin.right, constant, n); break; case MATH_EXPRESSION_TYPE_STRING_ASSIGN: case MATH_EXPRESSION_TYPE_ASSIGN: r = check_const_sub(exp->u.assign.right, constant, n); break; case MATH_EXPRESSION_TYPE_FUNC: r = check_const_sub(exp->u.func.exp, constant, n); break; case MATH_EXPRESSION_TYPE_FUNC_CALL: for (i = 0; i < exp->u.func_call.argc; i++) { r = check_const_sub(exp->u.func_call.argv[i], constant, n); if (r) { return r; } } break; case MATH_EXPRESSION_TYPE_MINUS: case MATH_EXPRESSION_TYPE_NOT: case MATH_EXPRESSION_TYPE_FACT: r = check_const_sub(exp->u.unary.operand, constant, n); break; case MATH_EXPRESSION_TYPE_CONST: for (i = 0; i < n; i++) { if (constant[i] == exp->u.index) { return 1; } } break; case MATH_EXPRESSION_TYPE_ARRAY: case MATH_EXPRESSION_TYPE_STRING_ARRAY: r = check_const_sub(exp->u.array.operand, constant, n); break; case MATH_EXPRESSION_TYPE_CONST_DEF: case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_VARIABLE: case MATH_EXPRESSION_TYPE_DOUBLE: case MATH_EXPRESSION_TYPE_PRM: case MATH_EXPRESSION_TYPE_EOEQ: case MATH_EXPRESSION_TYPE_STRING_VARIABLE: break; case MATH_EXPRESSION_TYPE_STRING: r = check_const_in_string(&(exp->u.str), constant, n); break; case MATH_EXPRESSION_TYPE_BLOCK: r = check_const_in_expression_list(exp->u.exp, constant, n); break; } return r; } struct search_const { int *constant, n, r; }; static int check_counst_in_func(struct nhash *hash, void *ptr) { int r; struct math_function_parameter *fprm; struct search_const *sc; fprm = (struct math_function_parameter *) hash->val.p; sc = (struct search_const *) ptr; r = check_const_sub(fprm->base_usr, sc->constant, sc->n); sc->r = r; return r; } static int check_const_in_expression_list(MathExpression *exp, int *constant, int n) { int r; r = 0; while (exp) { r = check_const_sub(exp, constant, n); if (r) { break; } exp = exp->next; } return r; } int math_equation_check_const(MathEquation *eq, int *constant, int n) { int r; struct search_const sc; if (eq == NULL || constant == NULL) return 0; sc.constant = constant; sc.n = n; sc.r = 0; nhash_each(eq->function, check_counst_in_func, &sc); if (sc.r) { return sc.r; } r = check_const_in_expression_list(eq->exp, constant, n); return r; } const char * math_special_value_to_string(MathValue *val) { char *str; if (val == NULL) { return NULL; } str = NULL; switch (val->type) { case MATH_VALUE_NORMAL: str = NULL; break; case MATH_VALUE_ERROR: str = "ERROR"; break; case MATH_VALUE_NAN: str = "NAN"; break; case MATH_VALUE_UNDEF: str = "UNDEF"; break; case MATH_VALUE_CONT: str = "CONTINUE"; break; case MATH_VALUE_BREAK: str = "BREAK"; break; case MATH_VALUE_NONUM: str = "NO-NUMBER"; break; case MATH_VALUE_MEOF: str = "EOF"; break; case MATH_VALUE_INTERRUPT: str = "INTERRUPTED"; break; } return str; } ngraph-gtk-6.09.05/src/math/math_basic_function.c0000644000175000017500000027771014117277000016556 00000000000000/* * $Id: math_basic_function.c,v 1.14 2010-03-04 08:30:17 hito Exp $ * */ #include "config.h" #include #include #include #include #include #ifdef HAVE_LIBGSL #include #include #include #endif #include "ntime.h" #include "odata.h" #include "nstring.h" #include "object.h" #include "math_equation.h" #include "math_function.h" #define MPI 3.14159265358979323846 #define MEXP1 2.71828182845905 #define MEULER 0.57721566490153286 #define MATH_CHECK_ARG(rval, v) if (v.val.type != MATH_VALUE_NORMAL) { \ *rval = v.val; \ return 0; \ } #define MATH_FUNCTION_MEMORY_NUM 65536 static MathValue *Memory = NULL; static int compare_double_with_prec(long double a, long double b, int prec); static int set_common_array(MathEquation *eq, int id, int i, enum DATA_TYPE type, MathVariable *variable); static int get_common_array(MathFunctionCallExpression *exp, MathEquation *eq, int ary_arg, int var_arg, int *id, enum DATA_TYPE *type, MathVariable *variable, MathEquationArray **src); int math_func_time(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { rval->val = time(NULL); return 0; } int math_func_atanh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v > 1) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = atanh(v); return 0; } int math_func_asinh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = asinh(exp->buf[0].val.val); return 0; } int math_func_acosh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v < 1) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = acosh(v); return 0; } int math_func_gauss(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int val; MATH_CHECK_ARG(rval, exp->buf[0]); if (exp->buf[0].val.val >= 0) { val = (int) (exp->buf[0].val.val); } else if (exp->buf[0].val.val - (int) exp->buf[0].val.val == 0) { val = (int) exp->buf[0].val.val; } else { val = (int) exp->buf[0].val.val - 1; } rval->val = (double) val; return 0; } int math_func_round(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { #if HAVE_ROUNDL long double val, prec; #else double val, prec; #endif int digit; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); val = exp->buf[0].val.val; digit = exp->buf[1].val.val; prec = powl(10, digit); val *= prec; #if HAVE_ROUNDL val = roundl(val); #else if (fabs(val - (int) val) >= 0.5) { if (val >= 0) { val = val - (val - (int) val) + 1; } else { val = val - (val - (int) val) - 1; } } else { val = val - (val - (int) val); } #endif val /= prec; rval->val = val; return 0; } int math_func_tanh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = tanh(exp->buf[0].val.val); return 0; } int math_func_sign(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = (exp->buf[0].val.val < 0) ? -1 : 1; return 0; } int math_func_frac(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = exp->buf[0].val.val - (int) exp->buf[0].val.val; return 0; } int math_func_cosh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = cosh(exp->buf[0].val.val); return 0; } int math_func_sqrt(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v < 0) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = sqrt(v); return 0; } int math_func_sinh(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = sinh(exp->buf[0].val.val); return 0; } int math_func_atan(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = atan(exp->buf[0].val.val); return 0; } int math_func_acos(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v < -1 || v > 1) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = acos(v); return 0; } int math_func_asin(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v < -1 || v > 1) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = asin(v); return 0; } int math_func_log(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v <= 0) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = log10(v); return 0; } int math_func_log1p(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v <= -1) { rval->type = MATH_VALUE_ERROR; return 1; } #if HAVE_LOG1P rval->val = log1p(v) * M_LOG10E; #else rval->val = log(1 + v) * M_LOG10E; #endif return 0; } int math_func_tan(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = tan(exp->buf[0].val.val); return 0; } int math_func_sin(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = sin(exp->buf[0].val.val); return 0; } int math_func_cos(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = cos(exp->buf[0].val.val); return 0; } int math_func_abs(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = fabs(exp->buf[0].val.val); return 0; } int math_func_exp(MathFunctionCallExpression *expl, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, expl->buf[0]); rval->val = exp(expl->buf[0].val.val); return 0; } int math_func_expm1(MathFunctionCallExpression *expl, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, expl->buf[0]); #if HAVE_EXPM1 rval->val = expm1(expl->buf[0].val.val); #else rval->val = exp(expl->buf[0].val.val) - 1; #endif return 0; } int math_func_int(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = (int) exp->buf[0].val.val; return 0; } int math_func_max(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double max; int i; if (exp->argc < 1) { rval->val = 0; return 0; } max = exp->buf[0].val.val; for (i = 1; i < exp->argc; i++) { MATH_CHECK_ARG(rval, exp->buf[i]); if (exp->buf[i].val.val > max) { max = exp->buf[i].val.val; } } rval->val = max; return 0; } int math_func_min(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double min; int i; if (exp->argc < 1) { rval->val = 0; return 0; } min = exp->buf[0].val.val; for (i = 1; i < exp->argc; i++) { MATH_CHECK_ARG(rval, exp->buf[i]); if (exp->buf[i].val.val < min) { min = exp->buf[i].val.val; } } rval->val = min; return 0; } int math_func_sumsq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double sum; int i; if (exp->argc < 1) { rval->val = 0; return 0; } sum = 0; for (i = 0; i < exp->argc; i++) { double val; MATH_CHECK_ARG(rval, exp->buf[i]); val = exp->buf[i].val.val; sum += val * val; } rval->val = sum; return 0; } int math_func_progn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { if (exp->argc < 1) { rval->val = 0; } else { *rval = exp->buf[exp->argc - 1].val; } return 0; } int math_func_prog2(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { if (exp->argc < 2) { rval->val = 0; } else { *rval = exp->buf[1].val; } return 0; } int math_func_prog1(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { if (exp->argc < 1) { rval->val = 0; } else { *rval = exp->buf[0].val; } return 0; } int math_func_sqr(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = exp->buf[0].val.val * exp->buf[0].val.val; return 0; } int math_func_ln(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v <= 0) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = log(v); return 0; } int math_func_ln1p(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double v; MATH_CHECK_ARG(rval, exp->buf[0]); v = exp->buf[0].val.val; if (v <= -1) { rval->type = MATH_VALUE_ERROR; return 1; } #if HAVE_LOG1P rval->val = log1p(v); #else rval->val = log(1 + v); #endif return 0; } int math_func_theta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = (exp->buf[0].val.val >= 0) ? 1 : 0; return 0; } int math_func_delta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = (exp->buf[0].val.val == 0) ? 1 : 0; return 0; } #ifndef HAVE_LIBGSL static int gamma2(double x, double *val) { double m, s, x1, xx; unsigned int i; static double gammacoe[] = { -0.42278433509846714, -0.23309373642178674, 0.19109110138769151, -0.24552490005400017E-1, -0.17645244550144320E-1, 0.80232730222673465E-2, -0.80432977560424699E-3, -0.3608378162548E-3, 0.1455961421399E-3, -0.175458597517E-4, -0.25889950224E-5, 0.13385015466E-5, -0.2054743152E-6, -0.1595268E-9, 0.62756218E-8, -0.12736143E-8, 0.923397E-10, 0.120028E-10, -0.42202E-11 }; if (((x <= 0) && ((x - (int) x) == 0)) || (x > 57)) return -1; m = 1; if (1.5 < x) while (1.5 < x) { x -= 1; m *= x; } else if (x < 0.5) while (x < 0.5) { if (x <= 1E-300) return -1; m /= x; x++; } s = 1; xx = 1; x1 = x - 1; for (i = 0; i < sizeof(gammacoe) / sizeof(*gammacoe); i++) { xx *= x1; s += xx * gammacoe[i]; } s *= x; if (s == 0) return -1; *val = m / s; return 0; } static int exp1(double x, double *val) { double x2, xx, xx2, qexp1, qexp2; int i, n; static double xo[18] = { 3.3, 4.0, 4.8, 5.8, 7.1, 8.6, 10.4, 12.5, 15.2, 18.4, 22.2, 26.9, 32.5, 39.4, 47.6, 57.6, 69.7, 83.0 }; static double eipt[18] = { 44.85377247567375, 35.95520078636207, 28.55548567959244, 22.28304130069319, 17.15083762120765, 13.52650411391756, 10.81282973538746, 8.781902021178544, 7.084719123528884, 5.769115302038587, 4.728746710237675, 3.867300609441438, 3.178040354772841, 2.606037129493851, 2.146957943513479, 1.767357146269297, 1.455922099180754, 1.219698244176420 }; static double eimt[18] = { 24.23610327385172, 20.63456499010558, 17.65538999222755, 14.96789725060241, 12.50401823871386, 10.51365383249826, 8.830924437781962, 7.443527518977505, 6.194083826443568, 5.167187241655524, 4.317774043309917, 3.588549395492134, 2.987594411636582, 2.476696474779806, 2.058451487317135, 1.706965828524471, 1.414702600059552, 1.190641095161813 }; x2 = fabs(x); if (x == 0 || x2 > 174) { return -1; } if (x2 >= 90) { n = 1; xx = 1; qexp2 = 1; do { xx *= n / x; n++; qexp1 = qexp2; qexp2 = qexp1 + xx; } while (qexp1 != qexp2); qexp1 /= x; if (x < 0) { qexp1 = -qexp1 * exp(-x2); } else { qexp1 *= exp(x2); } } else if (x2 >= 3) { i = 0; while ((i < 18) && (x2 >= 0.5 * (xo[i] + xo[i + 1]))) { i++; } if (x > 0) { xx = eipt[i] / 100; } else{ xx = eimt[i] / 100; } xx2 = 1 / (-xo[i]); qexp2 = xx; n = 1; do { qexp1 = qexp2; xx = (xo[i] - x2) / n * (xx + xx2); if (x < 0) { xx = -xx; } qexp2 = qexp1 + xx; xx2 *= (x2 - xo[i]) / (-xo[i]); n++; } while (qexp2 != qexp1); if (x < 0) { qexp1 = -qexp1 * exp(-x2); } else { qexp1 *= exp(x2); } } else { n = 1; xx = 1; qexp2 = 0; do { xx *= x / n; qexp1 = qexp2; qexp2 = qexp1 + xx / n; n++; } while (qexp1 != qexp2); qexp1 += MEULER + log(x2); } *val = qexp1; return 0; } #endif int math_func_icgam(MathFunctionCallExpression *expl, MathEquation *eq, MathValue *rval) { double mu, x; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else double a, u, p0, p1, q0, q1, val; int i, i2, i3; #endif MATH_CHECK_ARG(rval, expl->buf[0]); MATH_CHECK_ARG(rval, expl->buf[1]); mu = expl->buf[0].val.val; x = expl->buf[1].val.val; if (x < 0 || mu < 0) { rval->type = MATH_VALUE_ERROR; return -1; } #ifdef HAVE_LIBGSL r = gsl_sf_gamma_inc_e(mu, x, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else if (mu == 0) { if (exp1(-x, &val)) { rval->type = MATH_VALUE_ERROR; return -1; } else { val = -val; } } else if (x == 0) { if (gamma2(mu, &val)) { rval->type = MATH_VALUE_ERROR; return -1; } } else { i2 = 0; while (mu > 1) { i = 0; do { if (i == 56) { rval->type = MATH_VALUE_ERROR; return -1; } i++; mu--; } while (mu > 1); i2 = i; } u = exp(-x + mu * log(x)); if (x <= 1) { if (gamma2(mu, &p1)) { rval->type = MATH_VALUE_ERROR; return -1; } p0 = 1; q0 = 1; i = 0; do { i++; q0 *= x / (mu + i); p0 += q0; } while ((q0 > 1E-17) && (i != 20)); val = p1 - u / mu * p0; } else { i3 = (int) (120 / x + 5); p0 = 0; if (mu != 1) { p1 = 1E-78 / (1 - mu); } else { p1 = 1E-78; } q0 = p1; q1 = x * q0; for (i = 1; i <= i3; i++) { a = i - mu; p0 = p1 + a * p0; q0 = q1 + a * q0; p1 = x * p0 + i * p1; q1 = x * q0 + i * q1; if (i >= 50) { q0 /= i; p0 /= i; q1 /= i; p1 /= i; } } val = u / q1 * p1; } for (i = 1; i < i2; i++) { val = u + mu * val; u *= x; mu++; } } rval->val = val; return 0; #endif } int math_func_gamma(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #endif MATH_CHECK_ARG(rval, exp->buf[0]); #ifdef HAVE_LIBGSL r = gsl_sf_gamma_e (exp->buf[0].val.val, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else return gamma2(exp->buf[0].val.val, &rval->val); #endif } #ifdef HAVE_LIBGSL int math_func_erf(MathFunctionCallExpression *expl, MathEquation *eq, MathValue *rval) { double x; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, expl->buf[0]); x = expl->buf[0].val.val; r = gsl_sf_erf_e(x, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } #endif int math_func_erfc(MathFunctionCallExpression *expl, MathEquation *eq, MathValue *rval) { double x; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else int i, i2, sg; double x2, x3, sum, h, h2, val; #endif MATH_CHECK_ARG(rval, expl->buf[0]); x = expl->buf[0].val.val; #ifdef HAVE_LIBGSL r = gsl_sf_erfc_e(x, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else x2 = fabs(x); if (x2 <= 0.1) { sum = 0; sg = 1; x3 = x2; for (i = 0; i <= 5; i++) { if (i == 0) { i2 = 1; } else { i2 *= i; } sum += sg * x3 / i2 / (2 * i + 1); sg *= -1; x3 *= x2 * x2; } sum *= 2 / sqrt(MPI); val = 1 - sum; } else if (x2 <= 100) { h = 0.5; h2 = h * h; sum = 0; for (i = 1; i <= 13; i++) { i2 = i * i; sum += exp(-i2 * h2) / (i2 * h2 + x2 * x2); } if (x2 < 6) { sum += 0.5 / (x2 * x2); sum *= 2 * x2 / MPI * exp(-x2 * x2) * h; sum -= 2 / expm1(2 * MPI * x2 / h); } else { sum += 0.5 / (x2 * x2); sum *= 2 * x2 / MPI * exp(-x2 * x2) * h; } val = sum; } else { sum = 1; sg = -1; x3 = 2 * x2 * x2; i2 = 1; for (i = 1; i <= 5; i++) { i2 *= (2 * i - 1); sum += sg * i2 / x3; sg *= -1; x3 *= 2 * x2 * x2; } sum *= exp(-x2 * x2) / sqrt(MPI) / x2; val = sum; } if (x < 0) { val = 2 - (val); } rval->val = val; return 0; #endif } static double qinv3(double y) { double n, sum, y2, y3, i; sum = 0; y2 = y; y3 = y * y; i = 1; n = 0; do { i *= (2 * n + 1); sum += y2 / i; n = n + 1; y2 *= y3; } while (fabs(y2 / i) > 1e-16); return sum; } static double qinv2(double y) { int n, i; double a; if (y < 7.5) { n = (int) (110 / (y - 1)); } else if (y < 12.5) { n = (int) (-1.6 * y + 30); } else { n = 10; } a = 0; for (i = n; i > 0; i--) { a = i / (y + a); } return 1 / (y + a); } int math_func_qinv(MathFunctionCallExpression *expl, MathEquation *eq, MathValue *rval) { double x, x2, m2, y0, y1, val; MATH_CHECK_ARG(rval, expl->buf[0]); x = expl->buf[0].val.val; if (x <= 0 || x >= 1) { rval->type = MATH_VALUE_ERROR; return -1; } if (x > 0.5) { x2 = 1 - x; } else { x2 = x; } m2 = sqrt(2 * MPI); if (x2 <= 0.01) { double c0, c1; c0 = sqrt(-2 * log(m2 * 3 * x2)); c1 = c0 + 1 / c0; y1 = sqrt(-2 * log(m2 * c1 * x2)); do { y0 = y1; y1 = y0 + (qinv2(y0) - m2 * x2 * exp(0.5 * y0 * y0)); } while (fabs(y0 - y1) >= 1e-14); } else if (x2 <= 0.5) { y1 = m2 * (0.5 - x2) * 1.5; do { y0 = y1; y1 = y0 - (qinv3(y0) - m2 * (0.5 - x2) * exp(0.5 * y0 * y0)); } while (fabs(y0 - y1) >= 1e-14); } else { /* never reached */ y1 = 0; } if (x > 0.5) { val = -y1; } else { val = y1; } rval->val = val; return 0; } int math_func_rand(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = g_random_double() * exp->buf[0].val.val; return 0; } int math_func_srand(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); g_random_set_seed(exp->buf[0].val.val); rval->val = exp->buf[0].val.val; return 0; } #ifdef HAVE_LIBGSL int math_func_icbeta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int r; gsl_sf_result val; double a, b, x; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); a = exp->buf[0].val.val; b = exp->buf[1].val.val; x = exp->buf[2].val.val; if (x < 0 || x > 1) { rval->type = MATH_VALUE_ERROR; return -1; } r = gsl_sf_beta_inc_e(a, b, x, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_zeta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int r; gsl_sf_result val; double n; MATH_CHECK_ARG(rval, exp->buf[0]); n = exp->buf[0].val.val; if (n == 1) { rval->type = MATH_VALUE_ERROR; return -1; } r = gsl_sf_zeta_e(n, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_zetam1(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int r; gsl_sf_result val; double n; MATH_CHECK_ARG(rval, exp->buf[0]); n = exp->buf[0].val.val; if (n == 1) { rval->type = MATH_VALUE_ERROR; return -1; } r = gsl_sf_zetam1_e(n, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_zeta_int(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int r; gsl_sf_result val; int n; MATH_CHECK_ARG(rval, exp->buf[0]); n = exp->buf[0].val.val; if (n == 1) { rval->type = MATH_VALUE_ERROR; return -1; } r = gsl_sf_zeta_int_e(n, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_zetam1_int(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int r; gsl_sf_result val; int n; MATH_CHECK_ARG(rval, exp->buf[0]); n = exp->buf[0].val.val; if (n == 1) { rval->type = MATH_VALUE_ERROR; return -1; } r = gsl_sf_zetam1_int_e(n, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } #endif int math_func_beta(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double p, q; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else double a, b, c; #endif MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); p = exp->buf[0].val.val; q = exp->buf[1].val.val; #ifdef HAVE_LIBGSL r = gsl_sf_beta_e(p, q, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else if (gamma2(p, &a)) { rval->type = MATH_VALUE_ERROR; return -1; } if (gamma2(q, &b)) { rval->type = MATH_VALUE_ERROR; return -1; } if (gamma2(p + q, &c)) { rval->type = MATH_VALUE_ERROR; return -1; } if (fabs(c) < 1E-300) { rval->type = MATH_VALUE_ERROR; return -1; } rval->val = a * b / c; return 0; #endif } int math_func_lgn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x, alp; int n; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else double l1, val; #endif MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); n = exp->buf[0].val.val; alp = exp->buf[1].val.val; x = exp->buf[2].val.val; if (n < 0) { rval->type = MATH_VALUE_ERROR; return -1; } #ifdef HAVE_LIBGSL if (n == 1) { r = gsl_sf_laguerre_1_e(alp, x, &val); } else if (n == 2) { r = gsl_sf_laguerre_2_e(alp, x, &val); } else if (n == 3) { r = gsl_sf_laguerre_3_e(alp, x, &val); } else { r = gsl_sf_laguerre_n_e(n, alp, x, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else l1 = 1; if (n == 0) { val = l1; } else { double l2; l2 = 1 - x + alp; if (n == 1) { val = l2; } else { double tmp1, tmp2; int i; tmp1 = 1 + x - alp; tmp2 = 1 - alp; for (i = 2; i <= n; i++) { val = (l2 - l1) + l2 - (tmp1 * l2 - tmp2 * l1) / i; l1 = l2; l2 = val; } } } rval->val = val; return 0; #endif } static double mjd(int y, int m, int d, int hh, int mm, int ss) { int d0, d1, d2, d3, d4; if (m < 1) { m = 1; } if (d < 1) { d = 1; } d0 = (14 - m) / 12; d1 = (y - d0) * 365.25; d2 = (m + d0 * 12 - 2) * 30.59; d3 = (y - d0) / 100; d4 = (y - d0) / 400; return d1 + d2 - d3 + d4 + d + 1721088 - 2400000 + hh / 24.0 + mm / 1440.0 + ss / 86400.0; } int math_func_mjd(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); MATH_CHECK_ARG(rval, exp->buf[3]); MATH_CHECK_ARG(rval, exp->buf[4]); MATH_CHECK_ARG(rval, exp->buf[5]); rval->val = mjd(exp->buf[0].val.val, exp->buf[1].val.val, exp->buf[2].val.val, exp->buf[3].val.val, exp->buf[4].val.val, exp->buf[5].val.val); return 0; } int math_func_unix2mjd(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct tm *tm; time_t t; MATH_CHECK_ARG(rval, exp->buf[0]); t = exp->buf[0].val.val; tm = gmtime(&t); if (tm == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = mjd(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); return 0; } int math_func_mjd2unix(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = (exp->buf[0].val.val - 40587) * 86400; return 0; } int math_func_mjd2year(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct tm t; MATH_CHECK_ARG(rval, exp->buf[0]); mjd2gd(exp->buf[0].val.val, &t); if (t.tm_year < MJD2GD_YEAR_MIN) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = t.tm_year + 1900; return 0; } int math_func_mjd2month(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct tm t; MATH_CHECK_ARG(rval, exp->buf[0]); mjd2gd(exp->buf[0].val.val, &t); if (t.tm_year < MJD2GD_YEAR_MIN) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = t.tm_mon + 1; return 0; } int math_func_mjd2day(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct tm t; MATH_CHECK_ARG(rval, exp->buf[0]); mjd2gd(exp->buf[0].val.val, &t); if (t.tm_year < MJD2GD_YEAR_MIN) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = t.tm_mday; return 0; } int math_func_mjd2wday(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct tm t; MATH_CHECK_ARG(rval, exp->buf[0]); mjd2gd(exp->buf[0].val.val, &t); if (t.tm_year < MJD2GD_YEAR_MIN) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = (t.tm_wday == 0) ? 7 : t.tm_wday; return 0; } int math_func_mjd2yday(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct tm t; MATH_CHECK_ARG(rval, exp->buf[0]); mjd2gd(exp->buf[0].val.val, &t); if (t.tm_year < MJD2GD_YEAR_MIN) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = t.tm_yday + 1; return 0; } int math_func_xor(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); rval->val = ((exp->buf[0].val.val != 0) ^ (exp->buf[1].val.val != 0)) ? 1 : 0; return 0; } int math_func_and(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); rval->val = (exp->buf[0].val.val && exp->buf[1].val.val); return 0; } int math_func_not(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); rval->val = ! exp->buf[0].val.val; return 0; } int math_func_lt(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int prec, r; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); prec = exp->buf[2].val.val; r = compare_double_with_prec(exp->buf[0].val.val, exp->buf[1].val.val, prec); rval->val = (r < 0) ? 1 : 0; return 0; } int math_func_le(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int prec, r; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); prec = exp->buf[2].val.val; r = compare_double_with_prec(exp->buf[0].val.val, exp->buf[1].val.val, prec); rval->val = (r <= 0) ? 1 : 0; return 0; } int math_func_or(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); rval->val = (exp->buf[0].val.val || exp->buf[1].val.val); return 0; } int math_func_ge(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int prec, r; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); prec = exp->buf[2].val.val; r = compare_double_with_prec(exp->buf[0].val.val, exp->buf[1].val.val, prec); rval->val = (r >= 0) ? 1 : 0; return 0; } static int compare_double_with_prec(long double a, long double b, int prec) { #ifndef HAVE_LIBGSL long double scale, r, dif; int order, order_a, order_b; #endif if (a == b) { return 0; } if (prec < 1 || prec > 34) { /* long double (IEEE754-2008 binary128) */ return (a > b) ? 1 : -1; } #ifdef HAVE_LIBGSL return gsl_fcmp(a, b, pow(10, -prec)); #else if (a == 0.0 || b == 0.0) { return (a > b) ? 1 : -1; } if ((a > 0 && b < 0) || (a < 0 && b > 0)) { return (a > b) ? 1 : -1; } #if HAVE_FLOORL && HAVE_LOG10L && HAVE_FABSL order_a = floorl(log10l(fabsl(a))); order_b = floorl(log10l(fabsl(b))); #else /* HAVE_FLOORL && HAVE_LOG10L && HAVE_FABSL */ order_a = floor(log10(fabs(a))); order_b = floor(log10(fabs(b))); #endif if (order_a - order_b > 1) { return 1; } else if (order_a - order_b < -1) { return -1; } order = (order_a > order_b) ? order_a : order_b; #if HAVE_POWL scale = powl(10, - order); #else /* HAVE_POWL */ scale = pow(10, - order); #endif dif = a *scale - b * scale; #if HAVE_POWL scale = powl(10, prec - 1); #else /* HAVE_POWL */ scale = pow(10, prec - 1); #endif r = dif * scale; if (r >= 0.5) { return 1; } else if (r <= -0.5) { return -1; } return 0; #endif } int math_func_eq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int prec, r; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); prec = exp->buf[2].val.val; r = compare_double_with_prec(exp->buf[0].val.val, exp->buf[1].val.val, prec); rval->val = (r == 0) ? 1 : 0; return 0; } int math_func_neq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int prec, r; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); prec = exp->buf[2].val.val; r = compare_double_with_prec(exp->buf[0].val.val, exp->buf[1].val.val, prec); rval->val = (r != 0) ? 1 : 0; return 0; } int math_func_tn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double l1, x, val; int n; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; if (n < 0) { rval->type = MATH_VALUE_ERROR; return -1; } l1 = 1; if (n == 0) { val = l1; } else { double l2; l2 = x; if (n == 1) { val = l2; } else { int i; double tmp1; tmp1 = x + x; for (i = 2; i <= n; i++) { val = tmp1 * l2 - l1; l1 = l2; l2 = val; } } } rval->val = val; return 0; } int math_func_hn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double l1, val, x; int n; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; if (n < 0) { rval->type = MATH_VALUE_ERROR; return -1; } l1 = 1; if (n == 0) { val = l1; } else { double l2; l2 = 2 * x; if (n == 1) { val = l2; } else { int i; for (i = 2; i <= n; i++) { val = x * l2 - (i - 1) * l1; val += val; l1 = l2; l2 = val; } } } rval->val = val; return 0; } int math_func_gt(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int prec, r; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); prec = exp->buf[2].val.val; r = compare_double_with_prec(exp->buf[0].val.val, exp->buf[1].val.val, prec); rval->val = (r > 0) ? 1 : 0; return 0; } int math_func_if(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; n = (exp->buf[0].val.type == MATH_VALUE_NORMAL && exp->buf[0].val.val) ? 1 : 2; return math_expression_calculate(exp->buf[n].exp, rval); } int math_func_unless(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; n = (exp->buf[0].val.type == MATH_VALUE_NORMAL && exp->buf[0].val.val) ? 2 : 1; return math_expression_calculate(exp->buf[n].exp, rval); } #define CHECK_VAL_TYPE(R,V,T) (R)->val = ((V).val.type == T); \ (R)->type = MATH_VALUE_NORMAL; int math_func_isnormal(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { CHECK_VAL_TYPE(rval, exp->buf[0], MATH_VALUE_NORMAL); return 0; } int math_func_isnan(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { rval->val = (exp->buf[0].val.type == MATH_VALUE_NAN || (exp->buf[0].val.val != exp->buf[0].val.val)); rval->type = MATH_VALUE_NORMAL; return 0; } int math_func_isundef(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { CHECK_VAL_TYPE(rval, exp->buf[0], MATH_VALUE_UNDEF); return 0; } int math_func_isbreak(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { CHECK_VAL_TYPE(rval, exp->buf[0], MATH_VALUE_BREAK); return 0; } int math_func_iscont(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { CHECK_VAL_TYPE(rval, exp->buf[0], MATH_VALUE_CONT); return 0; } int math_func_pn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x; int n; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else double l1, val; #endif MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; #ifdef HAVE_LIBGSL if (n < 0 || fabs(x) > 1) { rval->type = MATH_VALUE_ERROR; return -1; } switch (n) { case 1: r = gsl_sf_legendre_P1_e(x, &val); break; case 2: r = gsl_sf_legendre_P2_e(x, &val); break; case 3: r = gsl_sf_legendre_P3_e(x, &val); break; default: r = gsl_sf_legendre_Pl_e(n, x, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else if (n < 0 || fabs(x) > 1000) { rval->type = MATH_VALUE_ERROR; return -1; } l1 = 1; if (n == 0) { val = l1; } else { double l2; l2 = x; if (n == 1) { val = l2; } else { int i; for (i = 2; i <= n; i++) { double tmp1, tmp2; tmp1 = x * l2; tmp2 = tmp1 - l1; val = tmp2 + tmp1 - tmp2 / i; l1 = l2; l2 = val; } } } rval->val = val; return 0; #endif } int math_func_yn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n2, n; double x2, x; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else int i; double t1, j0, j1, y0, y1, y2, val; #endif MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = abs(n); #ifdef HAVE_LIBGSL if (n2 == 0) { r = gsl_sf_bessel_Y0_e(x2, &val); } else if (n2 == 1) { r = gsl_sf_bessel_Y1_e(x2, &val); } else { r = gsl_sf_bessel_Yn_e(n2, x2, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else if ((n2 > 1000) || (x2 > 1000) || (x2 <= 1E-300)) { rval->type = MATH_VALUE_ERROR; return -1; } if (x2 <= 2E-5) { t1 = x2 * 0.5; j0 = 1 - t1 * t1; y0 = 2 / MPI * ((MEULER + log(t1)) * j0 + t1 * t1); if (n2 != 0) { j1 = t1 - 0.5 * t1 * t1 * t1; y1 = (j1 * y0 - 2 / MPI / x2) / j0; if (n2 >= -65 / log10(t1)) { rval->type = MATH_VALUE_ERROR; return -1; } for (i = 2; i <= n2; i++) { y2 = 2 * (i - 1) / x2 * y1 - y0; y0 = y1; y1 = y2; } } } else { int m; double t2, t3, s, ss; if (x2 >= 100) { m = (int) (1.073 * x2 + 47); } else if (x2 >= 10) { m = (int) (1.27 * x2 + 28); } else if (x2 >= 1) { m = (int) (2.4 * x2 + 15); } else if (x2 >= 0.1) { m = 17; } else { m = 10; } t3 = 0; t2 = 1E-75; s = 0; ss = 0; for (i = m - 1; i >= 0; i--) { t1 = 2 * (i + 1) / x2 * t2 - t3; if ((i % 2 == 0) && (i != 0)) { int l; s += t1; l = i / 2; if (l % 2 == 0) { ss -= t1 / l; } else { ss += t1 / l; } if (fabs(s) >= 1E55) { t1 *= 1E-55; t2 *= 1E-55; s *= 1E-55; ss *= 1E-55; } } t3 = t2; t2 = t1; } s = 2 * s + t1; j0 = t1 / s; j1 = t3 / s; ss /= s; y0 = 2 / MPI * ((MEULER + log(x2 * 0.5)) * j0 + 2 * ss); if (n2 != 0) { y1 = (j1 * y0 - 2 / MPI / x2) / j0; for (i = 2; i <= n2; i++) { if (y1 <= -1E65) { double w; w = y1 * 1E-10; y2 = 2 * (i - 1) / x2 * w - y0 * 1E-10; if (fabs(y2) >= 1E65) { rval->type = MATH_VALUE_ERROR; return -1; } y2 *= 1E10; } else { y2 = 2 * (i - 1) / x2 * y1 - y0; } y0 = y1; y1 = y2; } } } if (n == 0) { val = y0; } else { if ((n < 0) && (n2 % 2 == 1)) { y1 = -y1; } if ((x < 0) && (n2 % 2 == 1)){ y1 = -y1; } val = y1; } rval->val = val; return 0; #endif } int math_func_jn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n2, n; double x2, x; #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #else int i; double t1, t2, t3, j; #endif MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = abs(n); #ifdef HAVE_LIBGSL if (n2 == 0) { r = gsl_sf_bessel_J0_e(x2, &val); } else if (n2 == 1) { r = gsl_sf_bessel_J1_e(x2, &val); } else { r = gsl_sf_bessel_Jn_e(n2, x2, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else if (n2 > 1000 || x2 > 1000) { rval->type = MATH_VALUE_ERROR; return -1; } if (x2 <= 2E-5) { t1 = x2 * 0.5; if (n2 == 0) { j = 1 - t1 * t1; } else if (x2 <= 1E-77) { j = 0; } else { t2 = 1; t3 = 1; i = 1; while ((i <= n2) && (fabs(t3) > fabs(t2 / t1) * 1E-77)) { t3 *= t1 / t2; t2++; i++; } if (i <= n2) { j = 0; } else { j = t3 * (1 - t1 * t1 / t2); } } } else { double s; int m, l; if (n2 > x2) { m = n2; } else { m = (int) x2; } if (x2 >= 100) { l = (int) (0.073 * x2 + 47); } else if (x2 >= 10) { l = (int) (0.27 * x2 + 27); } else if (x2 > 1) { l = (int) (1.4 * x2 + 14); } else { l = 14; } m += l; t3 = 0; t2 = 1E-75; s = 0; for (i = m - 1; i >= 0; i--) { t1 = 2 * (i + 1) / x2 * t2 - t3; if (i == n2) { j = t1; } if ((i % 2 == 0) && (i != 0)) { s += t1; if (fabs(s) >= 1E55) { t1 *= 1E-55; t2 *= 1E-55; s *= 1E-55; j *= 1E-55; } } t3 = t2; t2 = t1; } s = 2 * s + t1; j /= s; } if ((n < 0) && (n2 % 2 == 1)) { j = -j; } if ((x < 0) && (n2 % 2 == 1)) { j = -j; } rval->val = j; return 0; #endif } #ifdef HAVE_LIBGSL int math_func_ynu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x2, x, n2, n; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = fabs(n); r = gsl_sf_bessel_Ynu_e(n2, x2, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_jnu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x2, x, n2, n; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = fabs(n); r = gsl_sf_bessel_Jnu_e(n2, x2, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_inu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x2, x, n2, n; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = fabs(n); r = gsl_sf_bessel_Inu_e(n2, x2, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_knu(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x2, x, n2, n; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = fabs(n); r = gsl_sf_bessel_Knu_e(n2, x2, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_in(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n2, n; double x2, x; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = abs(n); switch (n2) { case 0: r = gsl_sf_bessel_I0_e(x2, &val); break; case 1: r = gsl_sf_bessel_I1_e(x2, &val); break; default: r = gsl_sf_bessel_In_e(n2, x2, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_kn(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n2, n; double x2, x; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = abs(n); switch (n2) { case 0: r = gsl_sf_bessel_K0_e(x2, &val); break; case 1: r = gsl_sf_bessel_K1_e(x2, &val); break; default: r = gsl_sf_bessel_Kn_e(n2, x2, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_yl(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n2, n; double x2, x; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = abs(n); switch (n2) { case 0: r = gsl_sf_bessel_y0_e(x2, &val); break; case 1: r = gsl_sf_bessel_y1_e(x2, &val); break; default: r = gsl_sf_bessel_yl_e(n2, x2, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_jl(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n2, n; double x2, x; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[0].val.val; x = exp->buf[1].val.val; x2 = fabs(x); n2 = abs(n); switch (n2) { case 0: r = gsl_sf_bessel_j0_e(x2, &val); break; case 1: r = gsl_sf_bessel_j1_e(x2, &val); break; default: r = gsl_sf_bessel_jl_e(n2, x2, &val); } rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } int math_func_choose(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { unsigned int m, n; int r; gsl_sf_result val; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); if (exp->buf[0].val.val < 0 || exp->buf[1].val.val < 0) { rval->type = MATH_VALUE_ERROR; return 1; } n = exp->buf[0].val.val; m = exp->buf[1].val.val; r = gsl_sf_choose_e(n, m, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; } #endif int math_func_ei(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { #ifdef HAVE_LIBGSL int r; gsl_sf_result val; #endif MATH_CHECK_ARG(rval, exp->buf[0]); #ifdef HAVE_LIBGSL r = gsl_sf_expint_Ei_e(exp->buf[0].val.val, &val); rval->val = val.val; if (r) { rval->type = MATH_VALUE_ERROR; } return r; #else return exp1(exp->buf[0].val.val, &rval->val); #endif } static int init_memory(void) { if (Memory) { return 0; } Memory = g_malloc0(sizeof(*Memory) * MATH_FUNCTION_MEMORY_NUM); if (Memory == NULL) { return 1; } return 0; } int math_func_cm(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int start, n; MathValue val; if (Memory == NULL && init_memory()) { return 1; } MATH_CHECK_ARG(rval, exp->buf[1]); start = 0; n = exp->buf[1].val.val; if (abs(n) >= MATH_FUNCTION_MEMORY_NUM) { rval->type = MATH_VALUE_ERROR; return 1; } if (n == 0) { n = MATH_FUNCTION_MEMORY_NUM; } else if (n < 0) { start = MATH_FUNCTION_MEMORY_NUM + n; n = MATH_FUNCTION_MEMORY_NUM; } val = exp->buf[0].val; if (val.val == 0 && val.type == MATH_VALUE_NORMAL) { memset(Memory + start, 0, sizeof(*Memory) * (n - start)); } else { int i; for (i = start; i < n; i++) { Memory[i] = val; } } *rval = exp->buf[0].val; return 0; } int math_func_rm(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; MATH_CHECK_ARG(rval, exp->buf[0]); if (Memory == NULL && init_memory()) { return 1; } n = exp->buf[0].val.val; if (abs(n) >= MATH_FUNCTION_MEMORY_NUM) { rval->type = MATH_VALUE_ERROR; return 1; } else if (n < 0) { n += MATH_FUNCTION_MEMORY_NUM; } *rval = Memory[n]; return 0; } int math_func_m(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; MATH_CHECK_ARG(rval, exp->buf[0]); if (Memory == NULL && init_memory()) { return 1; } n = exp->buf[0].val.val; if (abs(n) >= MATH_FUNCTION_MEMORY_NUM) { rval->type = MATH_VALUE_ERROR; return 1; } else if (n < 0) { n += MATH_FUNCTION_MEMORY_NUM; } *rval = Memory[n] = exp->buf[1].val; return 0; } int math_func_am(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, n; MathEquationArray *ary; rval->val = 0; if (Memory == NULL && init_memory()) { return 1; } id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } n = (ary->num > MATH_FUNCTION_MEMORY_NUM) ? MATH_FUNCTION_MEMORY_NUM : ary->num; if (n > 0) { memcpy(Memory, ary->data.val, sizeof(*Memory) * n); } rval->val = n; return 0; } int math_func_for(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n, i; double v, start, stop, step; MathFunctionArgument *argv; if (Memory == NULL && init_memory()) { return 1; } argv = exp->buf; MATH_CHECK_ARG(rval, argv[0]); MATH_CHECK_ARG(rval, argv[1]); MATH_CHECK_ARG(rval, argv[2]); MATH_CHECK_ARG(rval, argv[3]); n = argv[0].val.val; start = argv[1].val.val; stop = argv[2].val.val; step = argv[3].val.val; if (n >= MATH_FUNCTION_MEMORY_NUM || (stop - start) * step <= 0) { rval->type = MATH_VALUE_ERROR; return 1; } if (n >= 0) { Memory[n].type = MATH_VALUE_NORMAL; } i = 0; rval->val = 0; for (v = start; (step < 0) ? (v >= stop) : (v <= stop); v += step) { int r; if ((i & 0xff) == 0 && ninterrupt()) { rval->type = MATH_VALUE_INTERRUPT; return 1; } if (n >= 0) { Memory[n].val = v; } r = math_expression_calculate(argv[4].exp, rval); if(r) { return r; } if (rval->type == MATH_VALUE_ERROR) { return 1; } i++; } return 0; } int math_func_times(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n, i; MathFunctionArgument *argv; MathValue *index; argv = exp->buf; MATH_CHECK_ARG(rval, argv[0]); n = argv[0].val.val; if (n <= 0) { return 0; } index = math_expression_get_variable_from_argument(exp, 1); if (index == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } index->type = MATH_VALUE_NORMAL; for (i = 0; i < n; i++) { int r; if ((i & 0xff) == 0 && ninterrupt()) { rval->type = MATH_VALUE_INTERRUPT; return 1; } index->val = i; r = math_expression_calculate(argv[2].exp, rval); if(r) { return r; } if (rval->type == MATH_VALUE_ERROR) { return 1; } } return 0; } int math_func_while(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n, i; MathFunctionArgument *argv; MathValue condition; if (Memory == NULL && init_memory()) { return 1; } argv = exp->buf; MATH_CHECK_ARG(rval, argv[0]); n = argv[0].val.val; if (n >= MATH_FUNCTION_MEMORY_NUM) { rval->type = MATH_VALUE_ERROR; return 1; } if (n >= 0) { Memory[n].type = MATH_VALUE_NORMAL; } rval->val = 0; rval->type = MATH_VALUE_UNDEF; condition.val = 0; condition.type = MATH_VALUE_NORMAL; for (i = 0; ; i++) { int r; if ((i & 0xff) == 0 && ninterrupt()) { rval->type = MATH_VALUE_INTERRUPT; return 1; } if (n >= 0) { Memory[n].val = i; } r = math_expression_calculate(argv[1].exp, &condition); if(r) { return r; } if (condition.type == MATH_VALUE_ERROR) { return 1; } if (condition.val == 0.0) { break; } r = math_expression_calculate(argv[2].exp, rval); if(r) { return r; } } return 0; } static int compare_double(const void *p1, const void *p2) { MathValue *v1, *v2; v1 = (MathValue *) p1; v2 = (MathValue *) p2; if (v1->type == MATH_VALUE_NORMAL && v2->type == MATH_VALUE_NORMAL) { if (v1->val > v2->val) { return 1; } else if (v1->val < v2->val) { return -1; } } else if (v1->type != MATH_VALUE_NORMAL && v2->type == MATH_VALUE_NORMAL) { return 1; } else if (v1->type == MATH_VALUE_NORMAL && v2->type != MATH_VALUE_NORMAL) { return -1; } return 0; } static int rcompare_double(const void *p1, const void *p2) { return -compare_double(p1, p2); } static int compare_str(const void *p1, const void *p2) { GString *s1, *s2; s1 = *(GString **) p1; s2 = *(GString **) p2; return g_strcmp0(s1->str, s2->str); } static int case_compare_str(const void *p1, const void *p2) { GString *s1, *s2; s1 = *(GString **) p1; s2 = *(GString **) p2; return g_ascii_strcasecmp(s1->str, s2->str); } static int rcompare_str(const void *p1, const void *p2) { return -compare_str(p1, p2); } static int rcase_compare_str(const void *p1, const void *p2) { return -case_compare_str(p1, p2); } int math_func_push(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { enum DATA_TYPE type; int id; MathEquationArray *ary; MathExpression *arg_exp; MathValue val; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; ary = math_equation_get_type_array(eq, type, id); if (ary == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } arg_exp = exp->buf[1].exp; if (type == DATA_TYPE_VALUE) { math_expression_calculate(arg_exp, &val); if (math_equation_push_array_val(eq, id, &val)) { rval->type = MATH_VALUE_ERROR; return 1; } } else { const char *str; str = math_expression_get_cstring(arg_exp); if (str == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_equation_push_array_str(eq, id, str)) { rval->type = MATH_VALUE_ERROR; return 1; } } rval->val = ary->num; rval->type = MATH_VALUE_NORMAL; return 0; } int math_func_pop(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { enum DATA_TYPE type; int id, i, n; MathEquationArray *ary; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; ary = math_equation_get_type_array(eq, type, id); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[1].val.val; if (ary == NULL || ary->num < 1) { rval->type = MATH_VALUE_ERROR; return 1; } if (n < 0) { rval->type = MATH_VALUE_ERROR; return 1; } if (n == 0) { n = 1; } if (n > ary->num) { n = ary->num; } for (i = 0; i < n; i++) { math_equation_pop_array(eq, id, type); } rval->val = ary->num; rval->type = MATH_VALUE_NORMAL; return 0; } int math_func_shift(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { enum DATA_TYPE type; int id, i, n; MathEquationArray *ary; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; ary = math_equation_get_type_array(eq, type, id); MATH_CHECK_ARG(rval, exp->buf[1]); n = exp->buf[1].val.val; if (ary == NULL || ary->num < 1 || ary->data.val == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (n < 0) { rval->type = MATH_VALUE_ERROR; return 1; } if (n == 0) { n = 1; } if (n > ary->num) { n = ary->num; } for (i = 0; i < n; i++) { math_equation_shift_array(eq, id, type); } rval->val = ary->num; rval->type = MATH_VALUE_NORMAL; return 0; } int math_func_unshift(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { enum DATA_TYPE type; int id; MathEquationArray *ary; MathExpression *arg_exp; MathValue val; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; ary = math_equation_get_type_array(eq, type, id); if (ary == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } arg_exp = exp->buf[1].exp; if (type == DATA_TYPE_VALUE) { math_expression_calculate(arg_exp, &val); if (math_equation_unshift_array_val(eq, id, &val)) { rval->type = MATH_VALUE_ERROR; return 1; } } else { const char *str; str = math_expression_get_cstring(arg_exp); if (str == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_equation_unshift_array_str(eq, id, str)) { rval->type = MATH_VALUE_ERROR; return 1; } } rval->val = ary->num; rval->type = MATH_VALUE_NORMAL; return 0; } int math_func_sort(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id; MathEquationArray *ary; enum DATA_TYPE type; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; if (type == DATA_TYPE_VALUE) { ary = math_equation_get_array(eq, id); } else { ary = math_equation_get_string_array(eq, id); } if (ary == NULL || ary->num < 1 || ary->data.str == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = ary->num; if (ary->num < 2) { return 0; } if (type == DATA_TYPE_VALUE) { qsort(ary->data.val, ary->num, sizeof(MathValue), compare_double); } else { int ignore_case; ignore_case = exp->buf[1].val.val; if (ignore_case) { qsort(ary->data.str, ary->num, sizeof(GString *), case_compare_str); } else { qsort(ary->data.str, ary->num, sizeof(GString *), compare_str); } } return 0; } int math_func_rsort(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id; MathEquationArray *ary; enum DATA_TYPE type; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; if (type == DATA_TYPE_VALUE) { ary = math_equation_get_array(eq, id); } else { ary = math_equation_get_string_array(eq, id); } if (ary == NULL || ary->num < 1 || ary->data.str == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = ary->num; if (ary->num < 2) { return 0; } if (type == DATA_TYPE_VALUE) { qsort(ary->data.val, ary->num, sizeof(MathValue), rcompare_double); } else { int ignore_case; ignore_case = exp->buf[1].val.val; if (ignore_case) { qsort(ary->data.str, ary->num, sizeof(GString *), rcase_compare_str); } else { qsort(ary->data.str, ary->num, sizeof(GString *), rcompare_str); } } return 0; } int math_func_size(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id; MathEquationArray *ary; enum DATA_TYPE type; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; if (type == DATA_TYPE_VALUE) { ary = math_equation_get_array(eq, id); } else { ary = math_equation_get_string_array(eq, id); } if (ary == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = ary->num; return 0; } int math_func_array(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, i, r; MathEquationArray *ary; rval->val = 0; id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } r = math_equation_clear_array(eq, id); if (r) { rval->type = MATH_VALUE_ERROR; return 1; } for (i = 1; i < exp->argc; i++) { if (math_equation_push_array_val(eq, id, &exp->buf[i].val)) { rval->type = MATH_VALUE_ERROR; return 1; } } rval->val = exp->argc - 1; return 0; } int math_func_array_sum(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, i; MathEquationArray *ary; double sum; rval->val = 0; id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL || ary->data.val == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } sum = 0; for (i = 0; i < ary->num; i++) { if (ary->data.val[i].type != MATH_VALUE_NORMAL) { rval->type = MATH_VALUE_ERROR; return 1; } sum += ary->data.val[i].val; } rval->val = sum; return 0; } int math_func_array_sumsq(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, i; MathEquationArray *ary; double sum; rval->val = 0; id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL || ary->data.val == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } sum = 0; for (i = 0; i < ary->num; i++) { double val; if (ary->data.val[i].type != MATH_VALUE_NORMAL) { rval->type = MATH_VALUE_ERROR; return 1; } val = ary->data.val[i].val; sum += val * val; } rval->val = sum; return 0; } int math_func_array_min(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, i; MathEquationArray *ary; double min; rval->val = 0; id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL || ary->num < 1 || ary->data.val == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } min = ary->data.val[0].val; for (i = 0; i < ary->num; i++) { if (ary->data.val[i].type != MATH_VALUE_NORMAL) { rval->type = MATH_VALUE_ERROR; return 1; } if (min > ary->data.val[i].val) { min = ary->data.val[i].val; } } rval->val = min; return 0; } int math_func_array_average(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; rval->val = 0; if (math_func_size(exp, eq, rval)) { return 1; } n = rval->val; if (math_func_array_sum(exp, eq, rval)) { return 1; } rval->val /= n; return 0; } static int moving_average(MathEquation *eq, int dest, MathEquationArray *src, int avg_n, int n, int type) { int i, r, dest_n; struct narray array; MathValue *val_array; arrayinit(&array, sizeof(*val_array)); r = (type) ? 1 : 0; avg_n = abs(avg_n); for (i = 0; i < n; i++) { int j, sum_n, weight; double sum; MathValue val; if (src->data.val[i].type != MATH_VALUE_NORMAL) { arrayadd(&array, src->data.val + i); continue; } weight = avg_n * r + 1; sum = src->data.val[i].val * weight; sum_n = weight; for (j = 0; j < avg_n; j++) { int k; weight = (avg_n - j - 1) * r + 1; k = i - j - 1; if (k >= 0 && src->data.val[k].type == MATH_VALUE_NORMAL) { sum += src->data.val[k].val * weight; sum_n += weight; } k = i + j + 1; if (k < n && src->data.val[k].type == MATH_VALUE_NORMAL) { sum += src->data.val[k].val * weight; sum_n += weight; } } val.val = sum / sum_n; val.type = MATH_VALUE_NORMAL; arrayadd(&array, &val); } dest_n = arraynum(&array); val_array = arraydata(&array); for (i = 0; i < n; i++) { if (math_equation_set_array_val(eq, dest, i, val_array + i)) { arraydel(&array); return 1; } } arraydel(&array); if (n != dest_n) { return 1; } return 0; } int math_func_array_moving_average(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n, dest_id, src_id, type, avg_n; MathEquationArray *src; MATH_CHECK_ARG(rval, exp->buf[2]); MATH_CHECK_ARG(rval, exp->buf[3]); dest_id = (int) exp->buf[0].array.idx; src_id = (int) exp->buf[1].array.idx; avg_n = exp->buf[2].val.val; type = exp->buf[3].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; src = math_equation_get_array(eq, src_id); if (src == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } n = src->num; if (moving_average(eq, dest_id, src, avg_n, n, type)) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = n; return 0; } int math_func_array_stdevp(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; double sum, sumsq, stdev; rval->val = 0; if (math_func_size(exp, eq, rval)) { return 1; } n = rval->val; if (n < 1) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_func_array_sum(exp, eq, rval)) { return 1; } sum = rval->val; if (math_func_array_sumsq(exp, eq, rval)) { return 1; } sumsq = rval->val; sum /= n; stdev = sumsq / n - sum * sum; if (stdev < 0) { stdev = 0; } rval->val = sqrt(stdev); return 0; } int math_func_array_stdev(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n; double stdev; rval->val = 0; if (math_func_size(exp, eq, rval)) { return 1; } n = rval->val; if (n < 2) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_func_array_stdevp(exp, eq, rval)) { return 1; } stdev = rval->val; stdev *= stdev * n; stdev /= n - 1; rval->val = sqrt(stdev); return 0; } int math_func_array_max(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, i; MathEquationArray *ary; double max; rval->val = 0; id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL || ary->num < 1 || ary->data.val == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } max = ary->data.val[0].val; for (i = 0; i < ary->num; i++) { if (ary->data.val[i].type != MATH_VALUE_NORMAL) { rval->type = MATH_VALUE_ERROR; return 1; } if (max < ary->data.val[i].val) { max = ary->data.val[i].val; } } rval->val = max; return 0; } int math_func_array_compact(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, i, n; MathEquationArray *ary; rval->val = 0; id = (int) exp->buf[0].array.idx; ary = math_equation_get_array(eq, id); if (ary == NULL || ary->num < 1 || ary->data.val == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } n = 0; for (i = 0; i < ary->num; i++) { if (ary->data.val[i].type != MATH_VALUE_NORMAL) { ary->num--; n++; if (i < ary->num) { memmove(ary->data.val + i, ary->data.val + i + 1, sizeof(*ary->data.val) * (ary->num - i)); } } } for (i = 0; i < n; i++) { ary->data.val[i + ary->num].type = MATH_VALUE_NORMAL; ary->data.val[i + ary->num].val = 0; } rval->val = ary->num; return 0; } int math_func_array_clear(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, r, type; rval->val = 0; id = (int) exp->buf[0].array.idx; type = exp->buf[0].array.array_type; if (type == DATA_TYPE_VALUE) { r = math_equation_clear_array(eq, id); } else { r = math_equation_clear_string_array(eq, id); } if (r) { rval->type = MATH_VALUE_ERROR; return 1; } return 0; } int math_func_sum(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { if (exp->buf[0].val.type == MATH_VALUE_NORMAL) { MathValue *ptr = eq->pos_func_buf + exp->pos_id; ptr->val += exp->buf[0].val.val; ptr->type = MATH_VALUE_NORMAL; *rval = *ptr; } else { *rval = exp->buf[0].val; } return 0; } int math_func_dif(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { if (exp->buf[0].val.type == MATH_VALUE_NORMAL) { MathValue *ptr = eq->pos_func_buf + exp->pos_id; if (ptr->type == MATH_VALUE_NORMAL) { rval->val = exp->buf[0].val.val - ptr->val; } else { rval->val = 0; } rval->type = ptr->type; *ptr = exp->buf[0].val; } else { *rval = exp->buf[0].val; } return 0; } int math_func_fmod(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double x, y; MATH_CHECK_ARG(rval, exp->buf[0]); MATH_CHECK_ARG(rval, exp->buf[1]); x = exp->buf[0].val.val; y = exp->buf[1].val.val; if (y == 0.0) { rval->type = MATH_VALUE_NAN; rval->val = 0.0; return 0; } rval->val = fmod(x, y); return 0; } int math_func_string_append(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *str; GString *dest; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); str = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || str == NULL) { return 1; } g_string_append(dest, str); return 0; } int math_func_string_prepend(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *str; GString *dest; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); str = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || str == NULL) { return 1; } g_string_prepend(dest, str); return 0; } int math_func_string_compare(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *str1, *str2; int ignore_case, result; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str1 = math_expression_get_string_from_argument(exp, 0); str2 = math_expression_get_string_from_argument(exp, 1); if (str1 == NULL || str2 == NULL) { return 1; } MATH_CHECK_ARG(rval, exp->buf[2]); ignore_case = exp->buf[2].val.val; if (ignore_case) { result = g_ascii_strcasecmp(str1, str2); } else { result = strcmp(str1, str2); } if (result < 0) { rval->val = -1; } else if (result > 0) { rval->val = 1; } else { rval->val = 0; } return 0; } int math_func_string_up(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *src; char *tmp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); src = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || src == NULL) { return 1; } tmp = g_ascii_strup(src, -1); if (tmp == NULL) { return 1; } g_string_assign(dest, tmp); g_free(tmp); return 0; } int math_func_string_down(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *src; char *tmp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); src = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || src == NULL) { return 1; } tmp = g_ascii_strdown(src, -1); if (tmp == NULL) { return 1; } g_string_assign(dest, tmp); g_free(tmp); return 0; } int math_func_string_length(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *str; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_from_argument(exp, 0); if (str == NULL) { return 1; } if (! g_utf8_validate(str, -1, NULL)) { return 1; } rval->val = g_utf8_strlen(str, -1); return 0; } int math_func_string_float(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *str; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_from_argument(exp, 0); if (str == NULL) { return 1; } n_strtod(str, rval); return 0; } int math_func_map(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, dest_id, i, n; enum DATA_TYPE src_type; MathEquationArray *src; MathValue val; MathVariable variable; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest_id = (int) exp->buf[0].array.idx; if (get_common_array(exp, eq, 1, 2, &src_id, &src_type, &variable, &src)) { rval->type = MATH_VALUE_ERROR; return 1; } n = src->num; for (i = 0; i < n; i++) { if (set_common_array(eq, src_id, i, src_type, &variable)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[3].exp, &val); if (math_equation_set_array_val(eq, dest_id, i, &val)) { return 1; } } rval->val = n; return 0; } int math_func_array_copy(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, dest_id, i, n; enum DATA_TYPE src_type, dest_type; MathEquationArray *src; MathCommonValue val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest_id = (int) exp->buf[0].array.idx; dest_type = exp->buf[0].array.array_type; src_id = (int) exp->buf[1].array.idx; src_type = exp->buf[1].array.array_type; if (dest_type != src_type) { rval->type = MATH_VALUE_ERROR; return 1; } src = math_equation_get_type_array(eq, src_type, src_id); n = src->num; for (i = 0; i < n; i++) { if(math_equation_get_array_common_value(eq, src_id, i, src_type, &val)) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_equation_set_array_common_value(eq, dest_id, i, &val)) { rval->type = MATH_VALUE_ERROR; return 1; } } rval->val = n; return 0; } int math_func_filter(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, dest_id, i, j, n; MathEquationArray *src; MathCommonValue cval; MathValue val; MathVariable variable; enum DATA_TYPE src_type, dest_type; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest_id = (int) exp->buf[0].array.idx; dest_type = exp->buf[0].array.array_type; src_id = (int) exp->buf[1].array.idx; src_type = exp->buf[1].array.array_type; if (src_type != dest_type) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_function_call_expression_get_variable(exp, 2, &variable)) { rval->type = MATH_VALUE_ERROR; return 1; } if (src_type != variable.type) { rval->type = MATH_VALUE_ERROR; return 1; } src = math_equation_get_type_array(eq, src_type, src_id); j = 0; n = src->num; for (i = 0; i < n; i++) { if(math_equation_get_array_common_value(eq, src_id, i, src_type, &cval)) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_variable_set_common_value(&variable, &cval)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[3].exp, &val); if (val.type == MATH_VALUE_NORMAL && val.val) { if (math_equation_set_array_common_value(eq, dest_id, j, &cval)) { rval->type = MATH_VALUE_ERROR; return 1; } j++; } } rval->val = j; return 0; } int math_func_find(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, i, n; MathEquationArray *src; MathValue val, *vptr; rval->val = 0; rval->type = MATH_VALUE_UNDEF; src_id = (int) exp->buf[0].array.idx; src = math_equation_get_array(eq, src_id); vptr = math_expression_get_variable_from_argument(exp, 1); if (vptr == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } n = src->num; for (i = 0; i < n; i++) { if (math_equation_get_array_val(eq, src_id, i, vptr)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[2].exp, &val); if (val.type == MATH_VALUE_NORMAL && val.val) { *rval = *vptr; return 0; } } return 0; } int math_func_index(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { enum DATA_TYPE src_type; int src_id, i, n; MathEquationArray *src; MathValue val; MathVariable variable; rval->val = 0; rval->type = MATH_VALUE_UNDEF; if (get_common_array(exp, eq, 0, 1, &src_id, &src_type, &variable, &src)) { rval->type = MATH_VALUE_ERROR; return 1; } n = src->num; for (i = 0; i < n; i++) { if (set_common_array(eq, src_id, i, src_type, &variable)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[2].exp, &val); if (val.type == MATH_VALUE_NORMAL && val.val) { rval->type = MATH_VALUE_NORMAL; rval->val = i; return 0; } } return 0; } static int get_common_array(MathFunctionCallExpression *exp, MathEquation *eq, int ary_arg, int var_arg, int *id, enum DATA_TYPE *type, MathVariable *variable, MathEquationArray **src) { int src_id; enum DATA_TYPE src_type; src_id = (int) exp->buf[ary_arg].array.idx; src_type = exp->buf[ary_arg].array.array_type; if (math_function_call_expression_get_variable(exp, var_arg, variable)) { return 1; } if (src_type != variable->type) { return 1; } *src = math_equation_get_type_array(eq, src_type, src_id); *id = src_id; *type = src_type; return 0; } static int set_common_array(MathEquation *eq, int id, int i, enum DATA_TYPE type, MathVariable *variable) { MathCommonValue cval; if(math_equation_get_array_common_value(eq, id, i, type, &cval)) { return 1; } if (math_variable_set_common_value(variable, &cval)) { return 1; } return 0; } int math_func_each(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, i, n; MathEquationArray *src; MathValue val; MathVariable variable; enum DATA_TYPE src_type; rval->val = 0; rval->type = MATH_VALUE_NORMAL; if (get_common_array(exp, eq, 0, 1, &src_id, &src_type, &variable, &src)) { rval->type = MATH_VALUE_ERROR; return 1; } n = src->num; for (i = 0; i < n; i++) { if (set_common_array(eq, src_id, i, src_type, &variable)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[2].exp, &val); } rval->val = n; return 0; } int math_func_each_with_index(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, i, n; MathEquationArray *src; MathValue val; MathVariable variable; enum DATA_TYPE src_type; MathValue *index; rval->val = 0; rval->type = MATH_VALUE_NORMAL; if (get_common_array(exp, eq, 0, 1, &src_id, &src_type, &variable, &src)) { rval->type = MATH_VALUE_ERROR; return 1; } index = math_expression_get_variable_from_argument(exp, 2); if (index == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } index->type = MATH_VALUE_NORMAL; n = src->num; for (i = 0; i < n; i++) { if (set_common_array(eq, src_id, i, src_type, &variable)) { rval->type = MATH_VALUE_ERROR; return 1; } index->val = i; math_expression_calculate(exp->buf[3].exp, &val); } rval->val = n; return 0; } int math_func_zip(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src1_id, src2_id, i, n; MathEquationArray *src1, *src2; MathValue val; MathVariable variable1, variable2; enum DATA_TYPE src1_type, src2_type; rval->val = 0; rval->type = MATH_VALUE_NORMAL; if (get_common_array(exp, eq, 0, 2, &src1_id, &src1_type, &variable1, &src1)) { rval->type = MATH_VALUE_ERROR; return 1; } if (get_common_array(exp, eq, 1, 3, &src2_id, &src2_type, &variable2, &src2)) { rval->type = MATH_VALUE_ERROR; return 1; } n = MIN(src1->num, src2->num); for (i = 0; i < n; i++) { if (set_common_array(eq, src1_id, i, src1_type, &variable1)) { rval->type = MATH_VALUE_ERROR; return 1; } if (set_common_array(eq, src2_id, i, src2_type, &variable2)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[4].exp, &val); } rval->val = n; return 0; } int math_func_zip_map(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int dest_id, src1_id, src2_id, i, n; MathEquationArray *src1, *src2; MathValue val; MathVariable variable1, variable2; enum DATA_TYPE src1_type, src2_type; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest_id = (int) exp->buf[0].array.idx; if (get_common_array(exp, eq, 1, 3, &src1_id, &src1_type, &variable1, &src1)) { rval->type = MATH_VALUE_ERROR; return 1; } if (get_common_array(exp, eq, 2, 4, &src2_id, &src2_type, &variable2, &src2)) { rval->type = MATH_VALUE_ERROR; return 1; } n = MIN(src1->num, src2->num); for (i = 0; i < n; i++) { if (set_common_array(eq, src1_id, i, src1_type, &variable1)) { rval->type = MATH_VALUE_ERROR; return 1; } if (set_common_array(eq, src2_id, i, src2_type, &variable2)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[5].exp, &val); if (math_equation_set_array_val(eq, dest_id, i, &val)) { return 1; } } rval->val = n; return 0; } int math_func_reduce(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, i, n; MathValue *result; MathEquationArray *src; MathCommonValue cval; MathValue val; MathVariable variable; enum DATA_TYPE src_type; rval->val = 0; rval->type = MATH_VALUE_NORMAL; src_id = (int) exp->buf[0].array.idx; src_type = exp->buf[0].array.array_type; if (math_function_call_expression_get_variable(exp, 1, &variable)) { rval->type = MATH_VALUE_ERROR; return 1; } if (src_type != variable.type) { rval->type = MATH_VALUE_ERROR; return 1; } result = math_expression_get_variable_from_argument(exp, 2); if (result == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } src = math_equation_get_type_array(eq, src_type, src_id); n = src->num; for (i = 0; i < n; i++) { if(math_equation_get_array_common_value(eq, src_id, i, src_type, &cval)) { rval->type = MATH_VALUE_ERROR; return 1; } if (math_variable_set_common_value(&variable, &cval)) { rval->type = MATH_VALUE_ERROR; return 1; } math_expression_calculate(exp->buf[3].exp, &val); *result = val; } *rval = *result; return 0; } int math_func_string_float_array(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int src_id, dest_id, i, n; MathEquationArray *src; MathValue val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest_id = (int) exp->buf[0].array.idx; src_id = (int) exp->buf[1].array.idx; src = math_equation_get_string_array(eq, src_id); if (src == NULL || src->data.str == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } val.type = MATH_VALUE_NORMAL; n = src->num; for (i = 0; i < n; i++) { n_strtod(src->data.str[i]->str, &val); if (math_equation_set_array_val(eq, dest_id, i, &val)) { rval->type = MATH_VALUE_ERROR; return 1; } } rval->val = n; return 0; } int math_func_string_replace(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *src, *pattern, *replacement; char *tmp; GRegex *regex; int compile_options, ignore_case; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); src = math_expression_get_string_from_argument(exp, 1); pattern = math_expression_get_string_from_argument(exp, 2); replacement = math_expression_get_string_from_argument(exp, 3); MATH_CHECK_ARG(rval, exp->buf[4]); ignore_case = exp->buf[4].val.val; if (dest == NULL || src == NULL || pattern == NULL || replacement == NULL) { return 1; } compile_options = (ignore_case) ? G_REGEX_CASELESS : 0; regex = g_regex_new(pattern, compile_options, 0, NULL); if (regex == NULL) { return 1; } tmp = g_regex_replace(regex, src, -1, 0, replacement, 0, NULL); g_regex_unref(regex); if (tmp == NULL) { return 1; } g_string_assign(dest, tmp); g_free(tmp); return 0; } int math_func_string_substring(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *src; char *tmp; int start, end, n; MATH_CHECK_ARG(rval, exp->buf[2]); MATH_CHECK_ARG(rval, exp->buf[3]); start = exp->buf[2].val.val; end = exp->buf[3].val.val; if (start < 0 || end < 0) { return 1; } if (start > end) { n = start; start = end; end = n; } rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); src = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || src == NULL) { return 1; } if (! g_utf8_validate(src, -1, NULL)) { return 1; } n = g_utf8_strlen(src, -1); if (start >= n) { return 1; } tmp = g_utf8_substring(src, start, end); if (tmp == NULL) { return 1; } g_string_assign(dest, tmp); g_free(tmp); return 0; } int math_func_string_reverse(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *src; char *tmp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); src = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || src == NULL) { return 1; } if (! g_utf8_validate(src, -1, NULL)) { return 1; } tmp = g_utf8_strreverse(src, -1); if (tmp == NULL) { return 1; } g_string_assign(dest, tmp); g_free(tmp); return 0; } int math_func_string_strip(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *src; char *tmp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; src = math_expression_get_string_variable_from_argument(exp, 0); if (src == NULL || src->str == NULL) { return 1; } tmp = g_strdup(src->str); if (tmp == NULL) { return 1; } g_strstrip(tmp); g_string_assign(src, tmp); g_free(tmp); return 0; } static int math_func_printf_common(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, GString *gstr, int index) { const char *str; char *format; int po, len, i; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_from_argument(exp, index); if (gstr == NULL || str == NULL) { return 1; } format = g_strdup(str); if (format == NULL) { return 1; } g_string_set_size(gstr, 0); po = 0; i = index + 1; for (po = 0; format[po]; po++) { if (format[po] == '%') { if (format[po + 1] == '%') { po++; } else if (i < exp->argc) { add_printf_formated_double(gstr, format + po, &exp->buf[i].val, &len); po += len; i++;; continue; } } g_string_append_c(gstr, format[po]); } g_free(format); if (g_utf8_validate(gstr->str, -1, NULL)) { rval->val = g_utf8_strlen(gstr->str, -1); } return 0; } int math_func_sprintf(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *gstr; rval->val = 0; rval->type = MATH_VALUE_NORMAL; gstr = math_expression_get_string_variable_from_argument(exp, 0); if (gstr == NULL) { return 1; } return math_func_printf_common(exp, eq, rval, gstr, 1); } int math_func_puts(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *str; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_from_argument(exp, 0); if (str == NULL) { str = ""; } putstdout(str); if (g_utf8_validate(str, -1, NULL)) { rval->val = g_utf8_strlen(str, -1); } return 0; } int math_func_printf(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *gstr; int r; rval->val = 0; rval->type = MATH_VALUE_NORMAL; gstr = g_string_new(""); if (gstr == NULL) { return 1; } r = math_func_printf_common(exp, eq, rval, gstr, 0); if (r) { g_string_free(gstr, TRUE); return r; } printfstdout("%s", gstr->str); g_string_free(gstr, TRUE); return 0; } int math_func_string(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *gstr; double val; MATH_CHECK_ARG(rval, exp->buf[1]); val = exp->buf[1].val.val; rval->val = val; rval->type = MATH_VALUE_NORMAL; gstr = math_expression_get_string_variable_from_argument(exp, 0); if (gstr == NULL) { return 1; } g_string_printf(gstr, "%g", val); return 0; } static char ** string_split(MathFunctionCallExpression *exp, MathValue *rval) { const char *delm, *src; char **ary; int use_regexp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; src = math_expression_get_string_from_argument(exp, 1); delm = math_expression_get_string_from_argument(exp, 2); if (src == NULL || delm == NULL) { return NULL; } MATH_CHECK_ARG(rval, exp->buf[3]); use_regexp = exp->buf[3].val.val; if (use_regexp) { int compile_options; compile_options = (use_regexp == 2) ? G_REGEX_CASELESS : 0; ary = g_regex_split_simple(delm, src, compile_options, 0); } else { ary = g_strsplit(src, delm, -1); } return ary; } int math_func_string_split(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { char **ary; int i, id; enum DATA_TYPE type; rval->val = 0; rval->type = MATH_VALUE_NORMAL; id = (int) exp->buf[0].array.idx; ary = string_split(exp, rval); if (ary == NULL) { return 1; } type = exp->buf[0].array.array_type; if (type == DATA_TYPE_VALUE) { for (i = 0; ary[i]; i++) { MathValue val; n_strtod(ary[i], &val); math_equation_set_array_val(eq, id, i, &val); } } else { for (i = 0; ary[i]; i++) { math_equation_set_array_str(eq, id, i, ary[i]); } } g_strfreev(ary); rval->val = i; return 0; } int math_func_string_split_float(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return math_func_string_split(exp, eq, rval); } static int get_pos_from_upos(const char *src, int upos) { const char *ptr; int n; n = g_utf8_strlen(src, -1); if (upos > n) { return -1; } if (upos < 0) { upos += n; } if (upos < 0) { return -1; } ptr = g_utf8_offset_to_pointer(src, upos); return ptr - src; } int math_func_string_insert(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *str; int upos, pos; MATH_CHECK_ARG(rval, exp->buf[2]); upos = exp->buf[2].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); str = math_expression_get_string_from_argument(exp, 1); if (dest == NULL || str == NULL) { return 1; } if (! g_utf8_validate(dest->str, -1, NULL)) { return 1; } pos = get_pos_from_upos(dest->str, upos); if (pos < 0) { return 1; } g_string_insert(dest, pos, str); return 0; } int math_func_string_erase(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *src; int upos, ulen, pos, len; MATH_CHECK_ARG(rval, exp->buf[1]); MATH_CHECK_ARG(rval, exp->buf[2]); upos = exp->buf[1].val.val; ulen = exp->buf[2].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; if (ulen < 1) { return 1; } src = math_expression_get_string_variable_from_argument(exp, 0); if (src == NULL || src->str == NULL) { return 1; } if (! g_utf8_validate(src->str, -1, NULL)) { return 1; } pos = get_pos_from_upos(src->str, upos); if (pos < 0) { return 1; } len = get_pos_from_upos(src->str, upos + ulen); if (len < 0) { return 1; } len -= pos; g_string_erase(src, pos, len); return 0; } int math_func_string_truncate(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *src; int ulen, len; MATH_CHECK_ARG(rval, exp->buf[1]); ulen = exp->buf[1].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; if (ulen < 1) { return 1; } src = math_expression_get_string_variable_from_argument(exp, 0); if (src == NULL || src->str == NULL) { return 1; } if (! g_utf8_validate(src->str, -1, NULL)) { return 1; } len = get_pos_from_upos(src->str, ulen); if (len < 0) { return 1; } g_string_truncate(src, len); return 0; } int math_func_string_match(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *src, *pattern; int compile_options, ignore_case; rval->val = 0; rval->type = MATH_VALUE_NORMAL; src = math_expression_get_string_from_argument(exp, 0); pattern = math_expression_get_string_from_argument(exp, 1); MATH_CHECK_ARG(rval, exp->buf[2]); ignore_case = exp->buf[2].val.val; if (src == NULL || pattern == NULL) { return 1; } compile_options = (ignore_case) ? G_REGEX_CASELESS : 0; rval->val = g_regex_match_simple(pattern, src, compile_options, 0); return 0; } int math_func_string_join(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { GString *dest; const char *sep; char **strv, *str; int i, n, id; MathEquationArray *ary; rval->val = 0; rval->type = MATH_VALUE_NORMAL; dest = math_expression_get_string_variable_from_argument(exp, 0); sep = math_expression_get_string_from_argument(exp, 1); id = (int) exp->buf[2].array.idx; ary = math_equation_get_string_array(eq, id); if (ary == NULL || ary->data.str == NULL || dest == NULL || sep == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (ary->num < 1) { g_string_set_size(dest, 0); return 0; } n = ary->num; strv = g_malloc(sizeof(*strv) * (n + 1)); if (strv == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } for (i = 0; i < n; i++) { strv[i] = ary->data.str[i]->str; } strv[i] = NULL; str = g_strjoinv(sep, strv); g_free(strv); g_string_assign(dest, str); g_free(str); return 0; } static struct objlist * math_func_getobj_common(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, int start, int *id, int *ret, enum ngraph_object_field_type *type) { const char *objname, *field; struct objlist *obj; int last, i, permission; rval->val = 0; *ret = 0; i = start; objname = math_expression_get_string_from_argument(exp, i); i++; field = math_expression_get_string_from_argument(exp, i); i++; if (objname == NULL || field == NULL) { return NULL; } if (exp->buf[i].val.type != MATH_VALUE_NORMAL) { return NULL; } *id = exp->buf[i].val.val; if (*id < 0) { rval->type = MATH_VALUE_ERROR; *ret = 1; return NULL; } obj = getobject(objname); if (obj == NULL) { rval->type = MATH_VALUE_ERROR; *ret = 1; return NULL; } last = chkobjlastinst(obj); if (*id > last) { return NULL; } if (chkobjfield(obj, field)) { rval->type = MATH_VALUE_ERROR; *ret = 1; return NULL; } permission = chkobjperm(obj, field); if ((permission & NREAD) == 0) { rval->type = MATH_VALUE_ERROR; *ret = 1; return NULL; } if (permission & NEXEC) { rval->type = MATH_VALUE_ERROR; *ret = 1; return NULL; } *type = chkobjfieldtype(obj, field); return obj; } int math_func_getobj(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *field; struct objlist *obj; enum ngraph_object_field_type type; int ival, id, ret; double dval; rval->val = 0; obj = math_func_getobj_common(exp, eq, rval, 0, &id, &ret, &type); if (obj == NULL) { return ret; } field = math_expression_get_string_from_argument(exp, 1); if (field == NULL) { return 0; } switch (type) { case NINT: case NENUM: case NBOOL: if (getobj(obj, field, id, 0, NULL, &ival) < 0) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = ival; break; case NDOUBLE: if (getobj(obj, field, id, 0, NULL, &dval) < 0) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = dval; break; default: rval->type = MATH_VALUE_ERROR; return 1; } return 0; } int math_func_getobj_string(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *field; struct objlist *obj; enum ngraph_object_field_type type; char *str; GString *gstr; int id, ret; rval->val = 0; gstr = math_expression_get_string_variable_from_argument(exp, 0); if (gstr == NULL) { return 0; } obj = math_func_getobj_common(exp, eq, rval, 1, &id, &ret, &type); if (obj == NULL) { return ret; } field = math_expression_get_string_from_argument(exp, 2); if (field == NULL) { return 0; } switch (type) { case NSTR: if (getobj(obj, field, id, 0, NULL, &str) < 0) { rval->type = MATH_VALUE_ERROR; return 1; } if (str == NULL) { str = ""; } else if (g_utf8_validate(str, -1, NULL)) { rval->val = g_utf8_strlen(str, -1); } g_string_assign(gstr, str); break; default: rval->type = MATH_VALUE_ERROR; return 1; } return 0; } int math_func_getobj_array(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { const char *field; struct objlist *obj; enum ngraph_object_field_type type; enum DATA_TYPE array_type; int array_id; struct narray *array; int id, ret, i, n; int *idata; double *ddata; char **sdata; MathValue val; rval->val = 0; array_id = exp->buf[0].array.idx; array_type = exp->buf[0].array.array_type; if (array_id < 0) { return 0; } obj = math_func_getobj_common(exp, eq, rval, 1, &id, &ret, &type); if (obj == NULL) { return ret; } field = math_expression_get_string_from_argument(exp, 2); if (field == NULL) { return 0; } val.type = MATH_VALUE_NORMAL; switch (type) { case NIARRAY: if (array_type != DATA_TYPE_VALUE) { rval->type = MATH_VALUE_ERROR; return 1; } if (getobj(obj, field, id, 0, NULL, &array) < 0) { rval->type = MATH_VALUE_ERROR; return 1; } n = arraynum(array); if (n < 0) { break; } idata = arraydata(array); if (idata == NULL) { break; } for (i = 0; i < n; i++) { val.val = idata[i]; math_equation_set_array_val(eq, array_id, i, &val); } rval->val = n; break; case NDARRAY: if (array_type != DATA_TYPE_VALUE) { rval->type = MATH_VALUE_ERROR; return 1; } if (getobj(obj, field, id, 0, NULL, &array) < 0) { rval->type = MATH_VALUE_ERROR; return 1; } n = arraynum(array); if (n < 0) { break; } ddata = arraydata(array); if (ddata == NULL) { break; } for (i = 0; i < n; i++) { val.val = ddata[i]; math_equation_set_array_val(eq, array_id, i, &val); } rval->val = n; break; case NSARRAY: if (array_type != DATA_TYPE_STRING) { rval->type = MATH_VALUE_ERROR; return 1; } if (getobj(obj, field, id, 0, NULL, &array) < 0) { rval->type = MATH_VALUE_ERROR; return 1; } n = arraynum(array); if (n < 0) { break; } sdata = arraydata(array); if (sdata == NULL) { break; } for (i = 0; i < n; i++) { char *str; str = sdata[i]; if (str == NULL) { str = ""; } math_equation_set_array_str(eq, array_id, i, str); } rval->val = n; break; default: rval->type = MATH_VALUE_ERROR; return 1; } return 0; } int math_func_parameter(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id, lastinst; double prm; struct objlist *obj; rval->val = 0; rval->type = MATH_VALUE_ERROR; MATH_CHECK_ARG(rval, exp->buf[0]); id = exp->buf[0].val.val; obj = chkobject("parameter"); if (obj == NULL) { return 1; } if (id < 0) { return 1; } lastinst = chkobjlastinst(obj); if (id > lastinst) { return 1; } if (getobj(obj, "parameter", id, 0, NULL, &prm) < 0) { return -1; } rval->type = MATH_VALUE_NORMAL; rval->val = prm; return 0; } int math_func_strftime(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { double date; const char *format; char *str; GString *gstr; int is_utc; time_t t; struct tm *tm; rval->val = 0; rval->type = MATH_VALUE_ERROR; gstr = math_expression_get_string_variable_from_argument(exp, 0); if (gstr == NULL) { return 0; } format = math_expression_get_string_from_argument(exp, 1); if (format == NULL) { return 0; } MATH_CHECK_ARG(rval, exp->buf[2]); t = exp->buf[2].val.val; MATH_CHECK_ARG(rval, exp->buf[3]); is_utc = exp->buf[3].val.val; if (is_utc) { tm = gmtime(&t); } else { tm = localtime(&t); } if (tm == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } date = mjd(tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); str = nstrftime(format, date); if (str) { g_string_assign(gstr, str); if (g_utf8_validate(str, -1, NULL)) { rval->val = g_utf8_strlen(str, -1); } g_free(str); } rval->type = MATH_VALUE_NORMAL; return 0; } ngraph-gtk-6.09.05/src/math/math_error.h0000644000175000017500000000314413674050433014720 00000000000000/* * $Id: math_error.h,v 1.5 2009-11-21 11:39:10 hito Exp $ * */ #ifndef MATH_ERROR_HEADER #define MATH_ERROR_HEADER #include "math_equation.h" #define MATH_ERROR_TYPE_SYNTAX 0x00010000 #define MATH_ERROR_TYPE_PARSE 0x00020000 #define MATH_ERROR_TYPE_RUNTIME 0x00040000 enum MATH_ERROR { MATH_ERROR_NONE = 0, MATH_ERROR_EOEQ = (MATH_ERROR_TYPE_SYNTAX | 0x0001), MATH_ERROR_FDEF_NEST = (MATH_ERROR_TYPE_SYNTAX | 0x0002), MATH_ERROR_UNEXP_OPE = (MATH_ERROR_TYPE_SYNTAX | 0x0003), MATH_ERROR_ARG_NUM = (MATH_ERROR_TYPE_SYNTAX | 0x0004), MATH_ERROR_MISS_RP = (MATH_ERROR_TYPE_SYNTAX | 0x0005), MATH_ERROR_MISS_RB = (MATH_ERROR_TYPE_SYNTAX | 0x0006), MATH_ERROR_MISS_RC = (MATH_ERROR_TYPE_SYNTAX | 0x0007), MATH_ERROR_UNKNOWN_FUNC = (MATH_ERROR_TYPE_SYNTAX | 0x0008), MATH_ERROR_INVALID_FDEF = (MATH_ERROR_TYPE_SYNTAX | 0x0009), MATH_ERROR_INVALID_CDEF = (MATH_ERROR_TYPE_PARSE | 0x000A), MATH_ERROR_UNEXP_TOKEN = (MATH_ERROR_TYPE_SYNTAX | 0x000B), MATH_ERROR_INVALID_ARG = (MATH_ERROR_TYPE_SYNTAX | 0x000C), MATH_ERROR_INVALID_PRM = (MATH_ERROR_TYPE_PARSE | 0x0010), MATH_ERROR_PRM_IN_DEF = (MATH_ERROR_TYPE_PARSE | 0x0020), MATH_ERROR_CONST_EXIST = (MATH_ERROR_TYPE_PARSE | 0x0040), MATH_ERROR_UNTERMINATED_STRING = (MATH_ERROR_TYPE_PARSE | 0x0080), MATH_ERROR_CALCULATION = (MATH_ERROR_TYPE_RUNTIME | 0x0010), MATH_ERROR_MEMORY = 0x0100, MATH_ERROR_UNKNOWN = 0x1000, MATH_ERROR_INVALID_FUNC = -2, }; char *math_err_get_error_message(MathEquation *eq, const char *code, int err); void math_err_get_recent_error_position(int *line, int *ofst); #endif ngraph-gtk-6.09.05/src/math/math_constant.c0000644000175000017500000000275313674050433015420 00000000000000#include "config.h" #include #include "math_expression.h" #include "math_equation.h" #include "math_constant.h" static struct math_const_parameter MathConstParameter[] = { {"EULER", MATH_SCANNER_VAL_TYPE_NORMAL, {0.57721566490153286061, MATH_VALUE_NORMAL}}, {"UNDEF", MATH_SCANNER_VAL_TYPE_NORMAL, {0, MATH_VALUE_UNDEF}}, {"BREAK", MATH_SCANNER_VAL_TYPE_NORMAL, {0, MATH_VALUE_BREAK}}, {"FALSE", MATH_SCANNER_VAL_TYPE_NORMAL, {0, MATH_VALUE_NORMAL}}, {"CONT", MATH_SCANNER_VAL_TYPE_NORMAL, {0, MATH_VALUE_CONT}}, {"TRUE", MATH_SCANNER_VAL_TYPE_NORMAL, {1, MATH_VALUE_NORMAL}}, {"NAN", MATH_SCANNER_VAL_TYPE_NORMAL, {0, MATH_VALUE_NAN}}, {"PI", MATH_SCANNER_VAL_TYPE_NORMAL, {3.14159265358979323846, MATH_VALUE_NORMAL}}, {"E", MATH_SCANNER_VAL_TYPE_NORMAL, {2.71828182845904523536, MATH_VALUE_NORMAL}}, }; int math_add_basic_constant(MathEquation *eq) { unsigned int i; for (i = 0; i < sizeof(MathConstParameter) / sizeof(*MathConstParameter); i++) { if (math_equation_add_const(eq, MathConstParameter[i].str, &MathConstParameter[i].val) < 0) { return 1; } } return 0; } enum MATH_SCANNER_VAL_TYPE math_scanner_check_math_const_parameter(char *str, MathValue *val) { unsigned int i; for (i = 0; i < sizeof(MathConstParameter) / sizeof(*MathConstParameter); i++) { if (strcmp(str, MathConstParameter[i].str) == 0) { *val = MathConstParameter[i].val; return MathConstParameter[i].type; } } return MATH_SCANNER_VAL_TYPE_UNKNOWN; } ngraph-gtk-6.09.05/src/math/parse_bin_expression.h0000644000175000017500000001270413674050433017001 00000000000000/* * $Id: parse_bin_expression.h,v 1.3 2009-11-10 04:12:20 hito Exp $ * */ #define CREATE_PARSER_FUNC(a, b, c, d) parse_ ## a ## _expression(struct math_string *str, MathEquation *eq, int *err) \ {\ struct math_token *token;\ MathExpression *left, *right, *exp;\ \ exp = parse_ ## b ## _expression(str, eq, err); \ if (exp == NULL) {\ return NULL;\ }\ \ for (;;) {\ token = my_get_token(str, eq);\ if (token == NULL) {\ *err = MATH_ERROR_MEMORY;\ math_expression_free(exp);\ return NULL;\ }\ \ switch (token->type) {\ case MATH_TOKEN_TYPE_OPERATOR:\ switch (token->data.op) {\ case c:\ right = parse_ ## b ## _expression(str, eq, err); \ if (right == NULL) {\ math_expression_free(exp);\ math_scanner_free_token(token);\ return NULL;\ }\ left = exp;\ math_scanner_free_token(token);\ exp = math_binary_expression_new(d, eq, left, right, err); \ if (exp == NULL) { \ math_expression_free(left); \ math_expression_free(right); \ return NULL; \ } \ break;\ default:\ unget_token(token);\ goto End;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ }\ \ End:\ return exp;\ } #define CREATE_PARSER2_FUNC(a, b, c, d, e, f) parse_ ## a ## _expression(struct math_string *str, MathEquation *eq, int *err) \ {\ struct math_token *token;\ MathExpression *left, *right, *exp;\ enum MATH_EXPRESSION_TYPE type;\ \ exp = parse_ ## b ## _expression(str, eq, err); \ if (exp == NULL) {\ return NULL;\ }\ \ for (;;) {\ token = my_get_token(str, eq);\ if (token == NULL) {\ *err = MATH_ERROR_MEMORY;\ math_expression_free(exp);\ return NULL;\ }\ \ switch (token->type) {\ case MATH_TOKEN_TYPE_OPERATOR:\ switch (token->data.op) {\ case c:\ case e:\ right = parse_ ## b ## _expression(str, eq, err); \ if (right == NULL) {\ math_expression_free(exp);\ math_scanner_free_token(token);\ return NULL;\ }\ if (token->data.op == c) {\ type = d;\ } else if (token->data.op == e) {\ type = f;\ } else {\ type = 0; /* never reached */\ }\ left = exp;\ math_scanner_free_token(token);\ exp = math_binary_expression_new(type, eq, left, right, err); \ if (exp == NULL) {\ math_expression_free(left);\ math_expression_free(right);\ return NULL;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ }\ \ End:\ return exp;\ } #define CREATE_PARSER3_FUNC(a, b, c, d, e, f, g, h) parse_ ## a ## _expression(struct math_string *str, MathEquation *eq, int *err) \ {\ struct math_token *token;\ MathExpression *left, *right, *exp;\ enum MATH_EXPRESSION_TYPE type;\ \ exp = parse_ ## b ## _expression(str, eq, err); \ if (exp == NULL) {\ return NULL;\ }\ \ for (;;) {\ token = my_get_token(str, eq);\ if (token == NULL) {\ *err = MATH_ERROR_MEMORY;\ math_expression_free(exp);\ return NULL;\ }\ \ switch (token->type) {\ case MATH_TOKEN_TYPE_OPERATOR:\ switch (token->data.op) {\ case c:\ case e:\ case g:\ right = parse_ ## b ## _expression(str, eq, err); \ if (right == NULL) {\ math_expression_free(exp);\ math_scanner_free_token(token);\ return NULL;\ }\ if (token->data.op == c) {\ type = d;\ } else if (token->data.op == e) {\ type = f;\ } else if (token->data.op == g) {\ type = h;\ } else {\ type = 0; /* never reached */\ }\ left = exp;\ math_scanner_free_token(token); \ exp = math_binary_expression_new(type, eq, left, right, err); \ if (exp == NULL) { \ math_expression_free(left);\ math_expression_free(right);\ return NULL;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ }\ \ End:\ return exp;\ } #define CREATE_PARSER4_FUNC(a, b, c, d, e, f, g, h, i, j) parse_ ## a ## _expression(struct math_string *str, MathEquation *eq, int *err) \ {\ struct math_token *token;\ MathExpression *left, *right, *exp;\ enum MATH_EXPRESSION_TYPE type;\ \ exp = parse_ ## b ## _expression(str, eq, err); \ if (exp == NULL) {\ return NULL;\ }\ \ for (;;) {\ token = my_get_token(str, eq);\ if (token == NULL) {\ *err = MATH_ERROR_MEMORY;\ math_expression_free(exp);\ return NULL;\ }\ \ switch (token->type) {\ case MATH_TOKEN_TYPE_OPERATOR:\ switch (token->data.op) {\ case c:\ case e:\ case g:\ case i:\ right = parse_ ## b ## _expression(str, eq, err); \ if (right == NULL) {\ math_expression_free(exp);\ math_scanner_free_token(token);\ return NULL;\ }\ if (token->data.op == c) {\ type = d;\ } else if (token->data.op == e) {\ type = f;\ } else if (token->data.op == g) {\ type = h;\ } else if (token->data.op == i) {\ type = j;\ } else {\ type = 0; /* never reached */\ }\ left = exp;\ math_scanner_free_token(token); \ exp = math_binary_expression_new(type, eq, left, right, err); \ if (exp == NULL) {\ math_expression_free(left);\ math_expression_free(right);\ return NULL;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ break;\ default:\ unget_token(token);\ goto End;\ }\ }\ \ End:\ return exp;\ } ngraph-gtk-6.09.05/src/math/math_operator.h0000644000175000017500000000163313674050433015423 00000000000000#ifndef MATH_SCANNER_OPE_HEADER #define MATH_SCANNER_OPE_HEADER enum MATH_OPERATOR_TYPE { MATH_OPERATOR_TYPE_AND, MATH_OPERATOR_TYPE_ASSIGN, MATH_OPERATOR_TYPE_DIV, MATH_OPERATOR_TYPE_DIV_ASSIGN, MATH_OPERATOR_TYPE_EOEQ, MATH_OPERATOR_TYPE_EOEQ_ASSIGN, MATH_OPERATOR_TYPE_EQ, MATH_OPERATOR_TYPE_FACT, MATH_OPERATOR_TYPE_GE, MATH_OPERATOR_TYPE_GT, MATH_OPERATOR_TYPE_LE, MATH_OPERATOR_TYPE_LT, MATH_OPERATOR_TYPE_MINUS, MATH_OPERATOR_TYPE_MINUS_ASSIGN, MATH_OPERATOR_TYPE_MOD, MATH_OPERATOR_TYPE_MOD_ASSIGN, MATH_OPERATOR_TYPE_MUL, MATH_OPERATOR_TYPE_MUL_ASSIGN, MATH_OPERATOR_TYPE_NE, MATH_OPERATOR_TYPE_OR, MATH_OPERATOR_TYPE_PLUS, MATH_OPERATOR_TYPE_PLUS_ASSIGN, MATH_OPERATOR_TYPE_POW, MATH_OPERATOR_TYPE_POW_ASSIGN, MATH_OPERATOR_TYPE_UNKNOWN }; int math_scanner_is_ope(int chr); enum MATH_OPERATOR_TYPE math_scanner_check_ope_str(const char *str, int *len); #endif ngraph-gtk-6.09.05/src/math/math_operator.c0000644000175000017500000000662313674050433015422 00000000000000#include "config.h" #include #include "math_operator.h" struct ope_str { char *ope; int len; enum MATH_OPERATOR_TYPE type; }; static struct ope_str OpeStr[] = { {":=", 2, MATH_OPERATOR_TYPE_ASSIGN}, {">:", 2, MATH_OPERATOR_TYPE_GE}, {">=", 2, MATH_OPERATOR_TYPE_GE}, {"<:", 2, MATH_OPERATOR_TYPE_LE}, {"<=", 2, MATH_OPERATOR_TYPE_LE}, {"::", 2, MATH_OPERATOR_TYPE_EQ}, {"==", 2, MATH_OPERATOR_TYPE_EQ}, {"!:", 2, MATH_OPERATOR_TYPE_NE}, {"!=", 2, MATH_OPERATOR_TYPE_NE}, {"||", 2, MATH_OPERATOR_TYPE_OR}, {"&&", 2, MATH_OPERATOR_TYPE_AND}, {"-:", 2, MATH_OPERATOR_TYPE_MINUS_ASSIGN}, {"-=", 2, MATH_OPERATOR_TYPE_MINUS_ASSIGN}, {"+:", 2, MATH_OPERATOR_TYPE_PLUS_ASSIGN}, {"+=", 2, MATH_OPERATOR_TYPE_PLUS_ASSIGN}, {"*:", 2, MATH_OPERATOR_TYPE_MUL_ASSIGN}, {"*=", 2, MATH_OPERATOR_TYPE_MUL_ASSIGN}, {"/:", 2, MATH_OPERATOR_TYPE_DIV_ASSIGN}, {"/=", 2, MATH_OPERATOR_TYPE_DIV_ASSIGN}, {"\\:", 2, MATH_OPERATOR_TYPE_MOD_ASSIGN}, {"\\=", 2, MATH_OPERATOR_TYPE_MOD_ASSIGN}, {"^:", 2, MATH_OPERATOR_TYPE_POW_ASSIGN}, {"^=", 2, MATH_OPERATOR_TYPE_POW_ASSIGN}, {"-", 1, MATH_OPERATOR_TYPE_MINUS}, {"+", 1, MATH_OPERATOR_TYPE_PLUS}, {"*", 1, MATH_OPERATOR_TYPE_MUL}, {"/", 1, MATH_OPERATOR_TYPE_DIV}, {"\\", 1, MATH_OPERATOR_TYPE_MOD}, {"^", 1, MATH_OPERATOR_TYPE_POW}, {"!", 1, MATH_OPERATOR_TYPE_FACT}, {":", 1, MATH_OPERATOR_TYPE_ASSIGN}, {">", 1, MATH_OPERATOR_TYPE_GT}, {"<", 1, MATH_OPERATOR_TYPE_LT}, {"=", 1, MATH_OPERATOR_TYPE_EOEQ_ASSIGN}, {";", 1, MATH_OPERATOR_TYPE_EOEQ}, }; static char OpeChar[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* ! */ 0, 0, 0, 0, 1, /* & */ 0, 0, 0, 1, /* * */ 1, /* + */ 0, 1, /* - */ 0, 1, /* / */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* : */ 1, /* ; */ 1, /* < */ 1, /* = */ 1, /* > */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* \ */ 0, 1, /* ^ */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, /* | */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; int math_scanner_is_ope(int chr) { if (chr < 0 || chr > (int) (sizeof(OpeChar) / sizeof(*OpeChar))) return 0; return OpeChar[chr]; } enum MATH_OPERATOR_TYPE math_scanner_check_ope_str(const char *str, int *len) { unsigned int i; for (i = 0; i < sizeof(OpeStr) / sizeof(*OpeStr); i++) { if (strncmp(str, OpeStr[i].ope, OpeStr[i].len) == 0) { *len = OpeStr[i].len; return OpeStr[i].type; } } return MATH_OPERATOR_TYPE_UNKNOWN; } ngraph-gtk-6.09.05/src/math/math_equation.h0000644000175000017500000001756413674050433015427 00000000000000/* * $Id: math_equation.h,v 1.8 2009-11-21 11:39:10 hito Exp $ * */ #ifndef MATH_EQUATION_HEADER #define MATH_EQUATION_HEADER typedef struct _math_equation MathEquation; typedef struct _math_parameter MathEquationParametar; typedef struct _math_array MathEquationArray; typedef struct _math_value MathValue; typedef struct _math_stack MathStack; typedef struct _math_array_info MathArray; typedef struct _math_variable MathVariable; typedef struct _math_common_value MathCommonValue; #include #include "math_error.h" #include "nhash.h" #include "object.h" #define MATH_EQUATION_ARRAY_INDEX_MAX 65535 struct _math_value { double val; enum { MATH_VALUE_NORMAL = 0, MATH_VALUE_ERROR = 1, MATH_VALUE_NAN = 2, MATH_VALUE_UNDEF = 3, // MATH_VALUE_SYNTAX = 4, MATH_VALUE_CONT = 5, MATH_VALUE_BREAK = 6, MATH_VALUE_NONUM = 7, MATH_VALUE_MEOF = 8, MATH_VALUE_INTERRUPT = 9, } type; }; struct _math_array { int num, size; union { void *ptr; /* using for memory manipulation */ MathValue *val; GString **str; } data; }; enum DATA_TYPE { DATA_TYPE_VALUE, DATA_TYPE_STRING, }; struct _math_variable { enum DATA_TYPE type; union { MathValue *vptr; GString *str; } data; }; struct _math_common_value { enum DATA_TYPE type; union { MathValue val; const char *cstr; } data; }; struct _math_array_info { enum DATA_TYPE type; NHASH array, local_array; int num, local_num; MathEquationArray *buf; }; #include "math_scanner.h" #include "math_expression.h" #include "math_function.h" #include "math_constant.h" struct _math_stack { enum DATA_TYPE type; NHASH variable; int num, ofst, end, size; NHASH local_variable; int local_num; int element_size; union { void *ptr; /* using for memory manipulation */ MathValue *val; GString **str; } stack; }; struct _math_equation { MathStack stack, string_stack; MathArray array, string_array; NHASH constant, function; int cnum, pos_func_num; int func_def; MathValue *cbuf, *pos_func_buf; MathExpression *exp, *opt_exp, *const_def; MathEquationParametar *parameter; enum EOEQ_ASSIGN_TYPE { EOEQ_ASSIGN_TYPE_BOTH, EOEQ_ASSIGN_TYPE_EOEQ, EOEQ_ASSIGN_TYPE_ASSIGN, } eoeq_assign_type; int use_eoeq_assign; struct narray *scope_info; struct { struct { const char *pos; int line, ofst; } pos; struct { int arg_num; struct math_function_parameter *fprm; } func; int const_id; } err_info; void *user_data; }; struct _math_parameter { int type; int min_length, max_length; int *id, id_num, id_max; MathValue *data; int use_index; struct _math_parameter *next; }; enum { MATH_EQUATION_PARAMETAR_USE_ID, MATH_EQUATION_PARAMETAR_USE_INDEX, }; MathEquation *math_equation_new(void); MathEquation *math_equation_basic_new(void); void math_equation_free(MathEquation *eq); int math_equation_optimize(MathEquation *eq); int math_equation_parse(MathEquation *eq, const char *str); void math_equation_clear(MathEquation *eq); int math_equation_calculate(MathEquation *eq, MathValue *val); void math_equation_clear_variable(MathEquation *eq); MathEquationParametar *math_equation_get_parameter(MathEquation *eq, int type, int *err); int math_equation_use_parameter(MathEquation *eq, int type, int val); int math_equation_add_parameter(MathEquation *eq, int type, int min, int max, int use_index); int math_equation_set_parameter_data(MathEquation *eq, int type, MathValue *data); int math_equation_add_pos_func(MathEquation *eq, struct math_function_parameter *fprm); struct math_function_parameter *math_equation_start_user_func_definition(MathEquation *eq, const char *name); int math_equation_register_user_func_definition(MathEquation *eq, const char *name, MathExpression *exp); int math_equation_finish_user_func_definition(MathEquation *eq, int *vnum, int *anum, int *str_anum, int *snum); struct math_function_parameter *math_equation_add_func(MathEquation *eq, const char *name, struct math_function_parameter *prm); struct math_function_parameter *math_equation_get_func(MathEquation *eq, const char *name); void math_equation_remove_func(MathEquation *eq, const char *name); int math_equation_add_const_definition(MathEquation *eq, const char *name, MathExpression *exp, int *err); int math_equation_add_const(MathEquation *eq, const char *name, const MathValue *val); int math_equation_set_const_by_name(MathEquation *eq, const char *name, const MathValue *val); int math_equation_set_const(MathEquation *eq, int idx, const MathValue *val); int math_equation_get_const_by_name(MathEquation *eq, const char *name, MathValue *val); int math_equation_get_const(MathEquation *eq, int idx, MathValue *val); char *math_equation_get_const_name(MathEquation *eq, int idx); int math_equation_add_var(MathEquation *eq, const char *name); int math_equation_set_var(MathEquation *eq, int idx, const MathValue *val); int math_equation_check_var(MathEquation *eq, const char *name); int math_equation_get_var(MathEquation *eq, int idx, MathValue *val); MathValue *math_equation_get_var_ptr(MathEquation *eq, int idx); int math_equation_check_string_var(MathEquation *eq, const char *name); int math_equation_get_string_var(MathEquation *eq, int idx, GString **str); int math_equation_add_var_string(MathEquation *eq, const char *name); int math_equation_set_var_string(MathEquation *eq, int idx, const char *str); int math_equation_check_array(MathEquation *eq, const char *name); int math_equation_check_string_array(MathEquation *eq, const char *name); int math_equation_add_array(MathEquation *eq, const char *name, int is_string); int math_equation_set_array_val(MathEquation *eq, int array, int index, const MathValue *val); int math_equation_push_array_val(MathEquation *eq, int array, const MathValue *val); int math_equation_get_array_val(MathEquation *eq, int array, int index, MathValue *val); MathValue * math_equation_get_array_ptr(MathEquation *eq, int array, int index); int math_equation_clear_array(MathEquation *eq, int array); int math_equation_clear_string_array(MathEquation *eq, int array); MathEquationArray *math_equation_get_array(MathEquation *eq, int array); MathEquationArray *math_equation_get_string_array(MathEquation *eq, int id); MathEquationArray *math_equation_get_type_array(MathEquation *eq, enum DATA_TYPE type, int id); void math_equation_set_user_data(MathEquation *eq, void *user_data); void *math_equation_get_user_data(MathEquation *eq); void math_equation_set_eoeq_assign_type(MathEquation *eq, enum EOEQ_ASSIGN_TYPE type); int math_equation_check_const(MathEquation *eq, int *constant, int n); void math_equation_set_parse_error(MathEquation *eq, const char *ptr, const struct math_string *str); void math_equation_set_func_arg_num_error(MathEquation *eq, struct math_function_parameter *fprm, int arg_num); void math_equation_set_func_error(MathEquation *eq, struct math_function_parameter *fprm); void math_equation_set_const_error(MathEquation *eq, int id); int math_equation_set_array_str(MathEquation *eq, int array, int index, const char *str); int math_equation_push_array_str(MathEquation *eq, int array, const char *str); GString *math_equation_get_array_str(MathEquation *eq, int array, int index); const char *math_equation_get_array_cstr(MathEquation *eq, int array, int index); int math_equation_get_array_common_value(MathEquation *eq, int array, int index, enum DATA_TYPE type, MathCommonValue *val); int math_equation_set_array_common_value(MathEquation *eq, int array, int index, MathCommonValue *val); int math_equation_pop_array(MathEquation *eq, int array, int type); int math_equation_shift_array(MathEquation *eq, int array, int type); int math_equation_unshift_array_val(MathEquation *eq, int array, const MathValue *val); int math_equation_unshift_array_str(MathEquation *eq, int array, const char *cstr); const char *math_special_value_to_string(MathValue *val); #endif ngraph-gtk-6.09.05/src/math/math_function.h.in0000644000175000017500000000714213744175332016027 00000000000000#name argc side_effect type arg_type use_GSL # #type 0: MATH_FUNCTION_TYPE_NORMAL # 1: MATH_FUNCTION_TYPE_POSITIONAL # 2: MATH_FUNCTION_TYPE_CALLBACK # #arg_type 0: MATH_FUNCTION_ARG_TYPE_DOUBLE # 1: MATH_FUNCTION_ARG_TYPE_STRING # 10: MATH_FUNCTION_ARG_TYPE_ARRAY # 11: MATH_FUNCTION_ARG_TYPE_STRING_ARRAY # 12: MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON # 20: MATH_FUNCTION_ARG_TYPE_VARIABLE # 21: MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE # 22: MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON # 30: MATH_FUNCTION_ARG_TYPE_PROC # abs 1 0 0 NULL sign 1 0 0 NULL int 1 0 0 NULL gauss 1 0 0 NULL frac 1 0 0 NULL round 2 0 0 NULL min -1 0 0 NULL max -1 0 0 NULL sqr 1 0 0 NULL sqrt 1 0 0 NULL exp 1 0 0 NULL expm1 1 0 0 NULL ln 1 0 0 NULL ln1p 1 0 0 NULL log 1 0 0 NULL log1p 1 0 0 NULL sin 1 0 0 NULL cos 1 0 0 NULL tan 1 0 0 NULL asin 1 0 0 NULL acos 1 0 0 NULL atan 1 0 0 NULL sinh 1 0 0 NULL cosh 1 0 0 NULL tanh 1 0 0 NULL asinh 1 0 0 NULL acosh 1 0 0 NULL atanh 1 0 0 NULL rand 1 0 0 NULL srand 1 0 0 NULL theta 1 0 0 NULL delta 1 0 0 NULL gamma 1 0 0 NULL icgam 2 0 0 NULL erf 1 0 0 NULL true erfc 1 0 0 NULL qinv 1 0 0 NULL ei 1 0 0 NULL beta 2 0 0 NULL icbeta 3 0 0 NULL true jn 2 0 0 NULL yn 2 0 0 NULL pn 2 0 0 NULL lgn 3 0 0 NULL hn 2 0 0 NULL tn 2 0 0 NULL mjd 6 0 0 NULL unix2mjd 1 0 0 NULL mjd2year 1 0 0 NULL mjd2month 1 0 0 NULL mjd2day 1 0 0 NULL mjd2wday 1 0 0 NULL mjd2yday 1 0 0 NULL eq 3 0 0 NULL neq 3 0 0 NULL ge 3 0 0 NULL gt 3 0 0 NULL le 3 0 0 NULL lt 3 0 0 NULL not 1 0 0 NULL or 2 0 0 NULL and 2 0 0 NULL xor 2 0 0 NULL m 2 1 0 NULL rm 1 1 0 NULL cm 2 1 0 NULL am 1 1 0 10 if 3 0 0 0,30,30 unless 3 0 0 0,30,30 for 5 1 0 0,0,0,0,30 times 3 1 0 0,20,30 dif 1 1 1 NULL sum 1 1 1 NULL sort 2 1 0 12,0 rsort 2 1 0 12,0 size 1 1 0 12 map 4 1 0 10,12,22,30 filter 4 1 0 12,12,22,30 find 3 1 0 10,20,30 index 3 1 0 12,22,30 each 3 1 0 12,22,30 each_with_index 4 1 0 12,22,20,30 zip 5 1 0 12,12,22,22,30 zip_map 6 1 0 10,12,12,22,22,30 reduce 4 1 0 12,22,20,30 array_copy 2 1 0 12,12 array_clear 1 1 0 12 array_sum 1 1 0 10 array_sumsq 1 1 0 10 array_average 1 1 0 10 array_moving_average 4 1 0 10,10,0,0 array_stdevp 1 1 0 10 array_stdev 1 1 0 10 array_compact 1 1 0 10 array_min 1 1 0 10 array_max 1 1 0 10 array -2 1 0 10 isnormal 1 0 0 NULL isnan 1 0 0 NULL isundef 1 0 0 NULL isbreak 1 0 0 NULL iscont 1 0 0 NULL zeta 1 0 0 NULL true zetam1 1 0 0 NULL true zeta_int 1 0 0 NULL true zetam1_int 1 0 0 NULL true in 2 0 0 NULL true kn 2 0 0 NULL true yl 2 0 0 NULL true jl 2 0 0 NULL true jnu 2 0 0 NULL true ynu 2 0 0 NULL true inu 2 0 0 NULL true knu 2 0 0 NULL true progn -1 0 0 NULL prog1 -1 0 0 NULL prog2 -1 0 0 NULL push 2 0 0 12,30 pop 2 0 0 12,0 unshift 2 0 0 12,30 shift 2 0 0 12,0 time 0 0 0 NULL choose 2 0 0 NULL true fmod 2 0 0 NULL mjd2unix 1 0 0 NULL sumsq -1 0 0 NULL parameter 1 1 0 NULL string_float 1 1 0 1 string_length 1 1 0 1 string_strip 1 1 0 21 string_float_array 2 1 0 10,11 string 2 1 0 21,0 string_truncate 2 1 0 21,0 string_up 2 1 0 21,1 string_down 2 1 0 21,1 string_append 2 1 0 21,1 string_prepend 2 1 0 21,1 string_reverse 2 1 0 21,1 string_compare 3 1 0 1,1,0 string_match 3 1 0 1,1,0 string_erase 3 1 0 21,0,0 sprintf -3 1 0 21,1 printf -2 1 0 1 puts 1 1 0 1 string_insert 3 1 0 21,1,0 string_join 3 1 0 21,1,11 string_substring 4 1 0 21,1,0,0 string_split 4 1 0 12,1,1,0 string_split_float 4 1 0 10,1,1,0 string_replace 5 1 0 21,1,1,1,0 getobj 3 1 0 1,1,0 getobj_string 4 1 0 21,1,1,0 getobj_array 4 1 0 12,1,1,0 strftime 4 1 0 21,1,0,0 #while 3 1 0 0,10,10 ngraph-gtk-6.09.05/src/math/math_function.c0000644000175000017500000011322513744175706015422 00000000000000#include "config.h" #include #include #include #include "math_expression.h" #include "math_equation.h" #include "math_function.h" struct funcs { char *name; struct math_function_parameter prm; }; static struct funcs FuncAry[] = { {"ARRAY_MOVING_AVERAGE", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_moving_average, NULL, NULL, NULL, NULL}}, {"STRING_FLOAT_ARRAY", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_float_array, NULL, NULL, NULL, NULL}}, {"STRING_SPLIT_FLOAT", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_split_float, NULL, NULL, NULL, NULL}}, {"STRING_SUBSTRING", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_substring, NULL, NULL, NULL, NULL}}, {"EACH_WITH_INDEX", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_each_with_index, NULL, NULL, NULL, NULL}}, {"STRING_TRUNCATE", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_truncate, NULL, NULL, NULL, NULL}}, {"STRING_PREPEND", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_prepend, NULL, NULL, NULL, NULL}}, {"STRING_REVERSE", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_reverse, NULL, NULL, NULL, NULL}}, {"STRING_COMPARE", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_compare, NULL, NULL, NULL, NULL}}, {"STRING_REPLACE", {5, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_replace, NULL, NULL, NULL, NULL}}, {"ARRAY_AVERAGE", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_average, NULL, NULL, NULL, NULL}}, {"ARRAY_COMPACT", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_compact, NULL, NULL, NULL, NULL}}, {"STRING_LENGTH", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_length, NULL, NULL, NULL, NULL}}, {"STRING_APPEND", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_append, NULL, NULL, NULL, NULL}}, {"STRING_INSERT", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_insert, NULL, NULL, NULL, NULL}}, {"GETOBJ_STRING", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_getobj_string, NULL, NULL, NULL, NULL}}, {"ARRAY_STDEVP", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_stdevp, NULL, NULL, NULL, NULL}}, {"STRING_FLOAT", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_float, NULL, NULL, NULL, NULL}}, {"STRING_STRIP", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_strip, NULL, NULL, NULL, NULL}}, {"STRING_MATCH", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_match, NULL, NULL, NULL, NULL}}, {"STRING_ERASE", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_erase, NULL, NULL, NULL, NULL}}, {"STRING_SPLIT", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_split, NULL, NULL, NULL, NULL}}, {"GETOBJ_ARRAY", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_getobj_array, NULL, NULL, NULL, NULL}}, {"ARRAY_CLEAR", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_clear, NULL, NULL, NULL, NULL}}, {"ARRAY_SUMSQ", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_sumsq, NULL, NULL, NULL, NULL}}, {"ARRAY_STDEV", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_stdev, NULL, NULL, NULL, NULL}}, {"STRING_DOWN", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_down, NULL, NULL, NULL, NULL}}, {"STRING_JOIN", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_join, NULL, NULL, NULL, NULL}}, {"ARRAY_COPY", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_copy, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"ZETAM1_INT", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_zetam1_int, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"MJD2MONTH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd2month, NULL, NULL, NULL, NULL}}, {"ARRAY_SUM", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_sum, NULL, NULL, NULL, NULL}}, {"ARRAY_MIN", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_min, NULL, NULL, NULL, NULL}}, {"ARRAY_MAX", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array_max, NULL, NULL, NULL, NULL}}, {"PARAMETER", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_parameter, NULL, NULL, NULL, NULL}}, {"STRING_UP", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string_up, NULL, NULL, NULL, NULL}}, {"UNIX2MJD", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_unix2mjd, NULL, NULL, NULL, NULL}}, {"MJD2YEAR", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd2year, NULL, NULL, NULL, NULL}}, {"MJD2WDAY", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd2wday, NULL, NULL, NULL, NULL}}, {"MJD2YDAY", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd2yday, NULL, NULL, NULL, NULL}}, {"ISNORMAL", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_isnormal, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"ZETA_INT", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_zeta_int, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"MJD2UNIX", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd2unix, NULL, NULL, NULL, NULL}}, {"STRFTIME", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_strftime, NULL, NULL, NULL, NULL}}, {"MJD2DAY", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd2day, NULL, NULL, NULL, NULL}}, {"ZIP_MAP", {6, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_zip_map, NULL, NULL, NULL, NULL}}, {"ISUNDEF", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_isundef, NULL, NULL, NULL, NULL}}, {"ISBREAK", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_isbreak, NULL, NULL, NULL, NULL}}, {"UNSHIFT", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_unshift, NULL, NULL, NULL, NULL}}, {"SPRINTF", {-3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_sprintf, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"ICBETA", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_icbeta, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"UNLESS", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_unless, NULL, NULL, NULL, NULL}}, {"FILTER", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_filter, NULL, NULL, NULL, NULL}}, {"REDUCE", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_reduce, NULL, NULL, NULL, NULL}}, {"ISCONT", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_iscont, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"ZETAM1", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_zetam1, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"CHOOSE", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_choose, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"STRING", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_string, NULL, NULL, NULL, NULL}}, {"PRINTF", {-2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_printf, NULL, NULL, NULL, NULL}}, {"GETOBJ", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_getobj, NULL, NULL, NULL, NULL}}, {"GAUSS", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_gauss, NULL, NULL, NULL, NULL}}, {"ROUND", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_round, NULL, NULL, NULL, NULL}}, {"EXPM1", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_expm1, NULL, NULL, NULL, NULL}}, {"LOG1P", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_log1p, NULL, NULL, NULL, NULL}}, {"ASINH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_asinh, NULL, NULL, NULL, NULL}}, {"ACOSH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_acosh, NULL, NULL, NULL, NULL}}, {"ATANH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_atanh, NULL, NULL, NULL, NULL}}, {"SRAND", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_srand, NULL, NULL, NULL, NULL}}, {"THETA", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_theta, NULL, NULL, NULL, NULL}}, {"DELTA", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_delta, NULL, NULL, NULL, NULL}}, {"GAMMA", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_gamma, NULL, NULL, NULL, NULL}}, {"ICGAM", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_icgam, NULL, NULL, NULL, NULL}}, {"TIMES", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_times, NULL, NULL, NULL, NULL}}, {"RSORT", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_rsort, NULL, NULL, NULL, NULL}}, {"INDEX", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_index, NULL, NULL, NULL, NULL}}, {"ARRAY", {-2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_array, NULL, NULL, NULL, NULL}}, {"ISNAN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_isnan, NULL, NULL, NULL, NULL}}, {"PROGN", {-1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_progn, NULL, NULL, NULL, NULL}}, {"PROG1", {-1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_prog1, NULL, NULL, NULL, NULL}}, {"PROG2", {-1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_prog2, NULL, NULL, NULL, NULL}}, {"SHIFT", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_shift, NULL, NULL, NULL, NULL}}, {"SUMSQ", {-1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_sumsq, NULL, NULL, NULL, NULL}}, {"SIGN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_sign, NULL, NULL, NULL, NULL}}, {"FRAC", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_frac, NULL, NULL, NULL, NULL}}, {"SQRT", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_sqrt, NULL, NULL, NULL, NULL}}, {"LN1P", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_ln1p, NULL, NULL, NULL, NULL}}, {"ASIN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_asin, NULL, NULL, NULL, NULL}}, {"ACOS", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_acos, NULL, NULL, NULL, NULL}}, {"ATAN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_atan, NULL, NULL, NULL, NULL}}, {"SINH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_sinh, NULL, NULL, NULL, NULL}}, {"COSH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_cosh, NULL, NULL, NULL, NULL}}, {"TANH", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_tanh, NULL, NULL, NULL, NULL}}, {"RAND", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_rand, NULL, NULL, NULL, NULL}}, {"ERFC", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_erfc, NULL, NULL, NULL, NULL}}, {"QINV", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_qinv, NULL, NULL, NULL, NULL}}, {"BETA", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_beta, NULL, NULL, NULL, NULL}}, {"SORT", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_sort, NULL, NULL, NULL, NULL}}, {"SIZE", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_size, NULL, NULL, NULL, NULL}}, {"FIND", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_find, NULL, NULL, NULL, NULL}}, {"EACH", {3, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_each, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"ZETA", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_zeta, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"PUSH", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_push, NULL, NULL, NULL, NULL}}, {"TIME", {0, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_time, NULL, NULL, NULL, NULL}}, {"FMOD", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_fmod, NULL, NULL, NULL, NULL}}, {"PUTS", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_puts, NULL, NULL, NULL, NULL}}, {"ABS", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_abs, NULL, NULL, NULL, NULL}}, {"INT", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_int, NULL, NULL, NULL, NULL}}, {"MIN", {-1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_min, NULL, NULL, NULL, NULL}}, {"MAX", {-1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_max, NULL, NULL, NULL, NULL}}, {"SQR", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_sqr, NULL, NULL, NULL, NULL}}, {"EXP", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_exp, NULL, NULL, NULL, NULL}}, {"LOG", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_log, NULL, NULL, NULL, NULL}}, {"SIN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_sin, NULL, NULL, NULL, NULL}}, {"COS", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_cos, NULL, NULL, NULL, NULL}}, {"TAN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_tan, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"ERF", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_erf, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"LGN", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_lgn, NULL, NULL, NULL, NULL}}, {"MJD", {6, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_mjd, NULL, NULL, NULL, NULL}}, {"NEQ", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_neq, NULL, NULL, NULL, NULL}}, {"NOT", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_not, NULL, NULL, NULL, NULL}}, {"AND", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_and, NULL, NULL, NULL, NULL}}, {"XOR", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_xor, NULL, NULL, NULL, NULL}}, {"FOR", {5, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_for, NULL, NULL, NULL, NULL}}, {"DIF", {1, 1, MATH_FUNCTION_TYPE_POSITIONAL, math_func_dif, NULL, NULL, NULL, NULL}}, {"SUM", {1, 1, MATH_FUNCTION_TYPE_POSITIONAL, math_func_sum, NULL, NULL, NULL, NULL}}, {"MAP", {4, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_map, NULL, NULL, NULL, NULL}}, {"ZIP", {5, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_zip, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"JNU", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_jnu, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"YNU", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_ynu, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"INU", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_inu, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"KNU", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_knu, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"POP", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_pop, NULL, NULL, NULL, NULL}}, {"LN", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_ln, NULL, NULL, NULL, NULL}}, {"EI", {1, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_ei, NULL, NULL, NULL, NULL}}, {"JN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_jn, NULL, NULL, NULL, NULL}}, {"YN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_yn, NULL, NULL, NULL, NULL}}, {"PN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_pn, NULL, NULL, NULL, NULL}}, {"HN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_hn, NULL, NULL, NULL, NULL}}, {"TN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_tn, NULL, NULL, NULL, NULL}}, {"EQ", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_eq, NULL, NULL, NULL, NULL}}, {"GE", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_ge, NULL, NULL, NULL, NULL}}, {"GT", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_gt, NULL, NULL, NULL, NULL}}, {"LE", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_le, NULL, NULL, NULL, NULL}}, {"LT", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_lt, NULL, NULL, NULL, NULL}}, {"OR", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_or, NULL, NULL, NULL, NULL}}, {"RM", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_rm, NULL, NULL, NULL, NULL}}, {"CM", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_cm, NULL, NULL, NULL, NULL}}, {"AM", {1, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_am, NULL, NULL, NULL, NULL}}, {"IF", {3, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_if, NULL, NULL, NULL, NULL}}, #ifdef HAVE_LIBGSL {"IN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_in, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"KN", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_kn, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"YL", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_yl, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif #ifdef HAVE_LIBGSL {"JL", {2, 0, MATH_FUNCTION_TYPE_NORMAL, math_func_jl, NULL, NULL, NULL, NULL}}, #else {NULL, {0, 0, 0, NULL, NULL, NULL, NULL, NULL}}, #endif {"M", {2, 1, MATH_FUNCTION_TYPE_NORMAL, math_func_m, NULL, NULL, NULL, NULL}}, }; int math_add_basic_function(MathEquation *eq) { unsigned int i; enum MATH_FUNCTION_ARG_TYPE *ptr; for (i = 0; i < sizeof(FuncAry) / sizeof(*FuncAry); i++) { if (FuncAry[i].name == NULL) { continue; } switch (i) { case 0: /* ARRAY_MOVING_AVERAGE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[1] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 1: /* STRING_FLOAT_ARRAY */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 2: /* STRING_SPLIT_FLOAT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 3: /* STRING_SUBSTRING */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 4: /* EACH_WITH_INDEX */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_VARIABLE; ptr[3] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 5: /* STRING_TRUNCATE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 6: /* STRING_PREPEND */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 7: /* STRING_REVERSE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 8: /* STRING_COMPARE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 9: /* STRING_REPLACE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 5); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[3] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[4] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 10: /* ARRAY_AVERAGE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 11: /* ARRAY_COMPACT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 12: /* STRING_LENGTH */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 13: /* STRING_APPEND */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 14: /* STRING_INSERT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 15: /* GETOBJ_STRING */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 16: /* ARRAY_STDEVP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 17: /* STRING_FLOAT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 18: /* STRING_STRIP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; FuncAry[i].prm.arg_type = ptr; break; case 19: /* STRING_MATCH */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 20: /* STRING_ERASE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 21: /* STRING_SPLIT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 22: /* GETOBJ_ARRAY */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 23: /* ARRAY_CLEAR */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; FuncAry[i].prm.arg_type = ptr; break; case 24: /* ARRAY_SUMSQ */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 25: /* ARRAY_STDEV */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 26: /* STRING_DOWN */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 27: /* STRING_JOIN */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_STRING_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 28: /* ARRAY_COPY */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; FuncAry[i].prm.arg_type = ptr; break; case 31: /* ARRAY_SUM */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 32: /* ARRAY_MIN */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 33: /* ARRAY_MAX */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 35: /* STRING_UP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 43: /* STRFTIME */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 45: /* ZIP_MAP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 6); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[1] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[3] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[4] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[5] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 48: /* UNSHIFT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 49: /* SPRINTF */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 51: /* UNLESS */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_PROC; ptr[2] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 52: /* FILTER */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[3] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 53: /* REDUCE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_VARIABLE; ptr[3] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 57: /* STRING */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 58: /* PRINTF */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 59: /* GETOBJ */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[1] = MATH_FUNCTION_ARG_TYPE_STRING; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 72: /* TIMES */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_VARIABLE; ptr[2] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 73: /* RSORT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 74: /* INDEX */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 75: /* ARRAY */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 80: /* SHIFT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 96: /* SORT */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 97: /* SIZE */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; FuncAry[i].prm.arg_type = ptr; break; case 98: /* FIND */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[1] = MATH_FUNCTION_ARG_TYPE_VARIABLE; ptr[2] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 99: /* EACH */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 101: /* PUSH */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 104: /* PUTS */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_STRING; FuncAry[i].prm.arg_type = ptr; break; case 122: /* FOR */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 5); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[2] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[3] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[4] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 125: /* MAP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 4); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; ptr[1] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[3] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 126: /* ZIP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 5); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[2] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[3] = MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON; ptr[4] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; case 131: /* POP */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 2); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON; ptr[1] = MATH_FUNCTION_ARG_TYPE_DOUBLE; FuncAry[i].prm.arg_type = ptr; break; case 147: /* AM */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 1); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_ARRAY; FuncAry[i].prm.arg_type = ptr; break; case 148: /* IF */ if (FuncAry[i].prm.arg_type) { break; } ptr = g_malloc(sizeof(enum MATH_FUNCTION_ARG_TYPE) * 3); if (ptr == NULL) { return 1; } ptr[0] = MATH_FUNCTION_ARG_TYPE_DOUBLE; ptr[1] = MATH_FUNCTION_ARG_TYPE_PROC; ptr[2] = MATH_FUNCTION_ARG_TYPE_PROC; FuncAry[i].prm.arg_type = ptr; break; } if (math_equation_add_func(eq, FuncAry[i].name, &FuncAry[i].prm) == NULL) return 1; } return 0; } ngraph-gtk-6.09.05/src/math/math_scanner.h0000644000175000017500000000272213777474442015237 00000000000000/* * $Id: math_scanner.h,v 1.2 2009-11-10 04:12:20 hito Exp $ * */ #ifndef MATH_SCANNER_HEADER #define MATH_SCANNER_HEADER #include #define MATH_VARIABLE_EXPAND_PREFIX 0x01 struct math_string { const char *top, *cur; int line, ofst; }; #include "math_operator.h" #include "math_constant.h" enum MATH_TOKEN_TYPE { MATH_TOKEN_TYPE_NUMERIC, MATH_TOKEN_TYPE_SYMBOL, MATH_TOKEN_TYPE_DOUBLE_QUOTED_STRING, MATH_TOKEN_TYPE_SINGLE_QUOTED_STRING, MATH_TOKEN_TYPE_UNTERMINATED_STRING, MATH_TOKEN_TYPE_STRING_VARIABLE, MATH_TOKEN_TYPE_OPERATOR, MATH_TOKEN_TYPE_LP, MATH_TOKEN_TYPE_RP, MATH_TOKEN_TYPE_LB, MATH_TOKEN_TYPE_RB, MATH_TOKEN_TYPE_LC, MATH_TOKEN_TYPE_RC, MATH_TOKEN_TYPE_DEF, MATH_TOKEN_TYPE_CONST, MATH_TOKEN_TYPE_COMMA, MATH_TOKEN_TYPE_ARRAY_PREFIX, MATH_TOKEN_TYPE_EOEQ, MATH_TOKEN_TYPE_EOEQ_ASSIGN, MATH_TOKEN_TYPE_UNKNOWN, }; struct math_token { enum MATH_TOKEN_TYPE type; union { struct { double dnum; enum MATH_SCANNER_VAL_TYPE type; } val; enum MATH_OPERATOR_TYPE op; char *sym; GString *str; } data; const char *ptr; struct math_token *next; }; struct math_token *math_scanner_get_token(struct math_string *rstr, MathEquation *eq); struct math_token *math_scanner_dup_token(struct math_token *token); void math_scanner_free_token(struct math_token *token); void math_scanner_init_string(struct math_string *str, const char *line); void replace_eoeq_token(char *eq); #endif ngraph-gtk-6.09.05/src/math/math_constant.h.in0000644000175000017500000000043513674050433016025 00000000000000E 2.71828182845904523536 MATH_VALUE_NORMAL PI 3.14159265358979323846 MATH_VALUE_NORMAL EULER 0.57721566490153286061 MATH_VALUE_NORMAL NAN 0 MATH_VALUE_NAN UNDEF 0 MATH_VALUE_UNDEF CONT 0 MATH_VALUE_CONT BREAK 0 MATH_VALUE_BREAK TRUE 1 MATH_VALUE_NORMAL FALSE 0 MATH_VALUE_NORMAL ngraph-gtk-6.09.05/src/math/Makefile.am0000644000175000017500000000212313674050433014435 00000000000000noinst_LTLIBRARIES = libmath.la libmath_la_SOURCES = math_function.c math_function.h math_operator.c \ math_operator.h math_constant.c math_constant.h \ math_expression.c math_parser.c math_scanner.h \ parse_bin_expression.h math_basic_function.c math_equation.c \ math_expression.h math_parser.h math_equation.h \ math_scanner.c math_error.h math_error.c EXTRA_DIST = math_operator.h.in math_operator.rb math_constant.h.in \ math_constant.rb math_function.h.in math_function.rb BUILT_SOURCES = math_operator.h math_operator.c math_constant.h \ math_constant.c math_function.h math_function.c math_operator.c: math_operator.h math_operator.h: math_operator.h.in math_operator.rb ruby math_operator.rb math_operator.h.in math_operator math_constant.c: math_constant.h math_constant.h: math_constant.h.in math_constant.rb ruby math_constant.rb math_constant.h.in math_constant math_function.c: math_function.h math_operator.h math_function.h: math_function.h.in math_function.rb ruby math_function.rb math_function.h.in math_function libmath_la_CFLAGS = $(GTK_CFLAGS) -I$(srcdir)/.. ngraph-gtk-6.09.05/src/math/math_parser.h0000644000175000017500000000036113674050433015061 00000000000000/* * $Id: math_parser.h,v 1.3 2009-11-10 04:12:20 hito Exp $ * */ #ifndef MATH_PARSER_HEADER #define MATH_PARSER_HEADER #include "math_equation.h" MathExpression *math_parser_parse(const char *line, MathEquation *eq, int *err); #endif ngraph-gtk-6.09.05/src/math/math_expression.c0000644000175000017500000016725114110334505015762 00000000000000/* * $Id: math_expression.c,v 1.16 2010-02-24 00:52:44 hito Exp $ * */ #include "config.h" #include #include #include #include #include #include #include #include "nhash.h" #include "nstring.h" #include "odata.h" #include "math_scanner.h" #include "math_parser.h" #include "math_expression.h" #include "math_function.h" static int calc(MathExpression *exp, MathValue *val); static MathExpression *optimize(MathExpression *exp, int *err); static const char *get_cstring_from_expression(MathExpression *exp); static int math_expression_kind_of_string(MathExpression *exp); #define CALC_EXPRESSION(e, v) \ ((e->type == MATH_EXPRESSION_TYPE_DOUBLE) ? \ ((v = e->u.value), 0) : \ calc(e, &v)) MathExpression * math_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, int *err) { MathExpression *exp; exp = g_malloc(sizeof(*exp)); if (exp == NULL) { if (err) { *err =MATH_ERROR_MEMORY; } return NULL; } exp->type = type; exp->next = NULL; exp->equation = eq; return exp; } MathExpression * math_constant_definition_expression_new(MathEquation *eq, char *name, MathExpression *exp, int *err) { MathExpression *cdef; int id; id = math_equation_get_const_by_name(eq, name, NULL); if (id >= 0) { /* already defined */ *err = MATH_ERROR_CONST_EXIST; math_equation_set_const_error(eq, id); return NULL; } cdef = math_expression_new(MATH_EXPRESSION_TYPE_CONST_DEF, eq, err); if (cdef == NULL) { return NULL; } cdef->u.const_def.operand = exp; if (math_equation_add_const_definition(eq, name, cdef, err) < 0) { g_free(cdef); return NULL; } return cdef; } MathExpression * math_function_expression_new(MathEquation *eq, const char *name, int *err) { MathExpression *func; struct math_function_parameter *prm; prm = math_equation_get_func(eq, name); if (prm && prm->base_usr == NULL) { /* embedded function */ return NULL; } func = math_expression_new(MATH_EXPRESSION_TYPE_FUNC, eq, err); if (func == NULL) return NULL; func->u.func.argc = 0; func->u.func.local_num = 0; func->u.func.exp = NULL; func->u.func.arg_list = NULL; func->u.func.fprm = math_equation_start_user_func_definition(eq, name); if (func->u.func.fprm == NULL) return NULL; return func; } static struct math_func_arg_list * create_arg(const char *name, enum MATH_FUNCTION_ARG_TYPE type) { struct math_func_arg_list *ptr; ptr = g_malloc(sizeof(*ptr)); if (ptr == NULL) { return NULL; } ptr->name = g_strdup(name); if (ptr->name == NULL) { g_free(ptr); return NULL; } ptr->next = NULL; ptr->type = type; return ptr; } static int register_arg(MathExpression *func, const char *arg_name, enum MATH_FUNCTION_ARG_TYPE type) { switch (type) { case MATH_FUNCTION_ARG_TYPE_DOUBLE: case MATH_FUNCTION_ARG_TYPE_VARIABLE: if (math_equation_check_var(func->equation, arg_name) >= 0) { /* the variable already exist */ return 1; } math_equation_add_var(func->equation, arg_name); break; case MATH_FUNCTION_ARG_TYPE_ARRAY: if (math_equation_check_array(func->equation, arg_name) >= 0) { /* the array already exist */ return 1; } math_equation_add_array(func->equation, arg_name, FALSE); break; case MATH_FUNCTION_ARG_TYPE_STRING_ARRAY: if (math_equation_check_string_array(func->equation, arg_name) >= 0) { /* the array already exist */ return 1; } math_equation_add_array(func->equation, arg_name, TRUE); break; case MATH_FUNCTION_ARG_TYPE_STRING: case MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE: if (math_equation_check_string_var(func->equation, arg_name) >= 0) { /* the string variable already exists */ return 1; } math_equation_add_var_string(func->equation, arg_name); break; case MATH_FUNCTION_ARG_TYPE_PROC: return 1; case MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON: case MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON: /* this function is called only at the user function definition. */ /* never reached */ return 1; } return 0; } int math_function_expression_add_arg(MathExpression *func, const char *arg_name, enum MATH_FUNCTION_ARG_TYPE type) { static struct math_func_arg_list *list; list = create_arg(arg_name, type); if (list == NULL) return 1; if (func->u.func.arg_list == NULL) { func->u.func.arg_list = list; } else { func->u.func.arg_last->next = list; } func->u.func.arg_last = list; return 0; } static int func_set_arg_buf(MathExpression *func) { static struct math_func_arg_list *list; int n, i, save_arg_type; enum MATH_FUNCTION_ARG_TYPE *arg_type_buf; save_arg_type = 0; list = func->u.func.arg_list; for (n = 0; list; n++) { switch (list->type) { case MATH_FUNCTION_ARG_TYPE_DOUBLE: break; case MATH_FUNCTION_ARG_TYPE_VARIABLE: case MATH_FUNCTION_ARG_TYPE_STRING: case MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE: case MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON: case MATH_FUNCTION_ARG_TYPE_ARRAY: case MATH_FUNCTION_ARG_TYPE_STRING_ARRAY: case MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON: save_arg_type = 1; break; case MATH_FUNCTION_ARG_TYPE_PROC: return 1; break; } list = list->next; } if (save_arg_type) { arg_type_buf = g_malloc(sizeof(*arg_type_buf) * n); if (arg_type_buf == NULL) return 1; list = func->u.func.arg_list; for (i = 0; list; i++) { arg_type_buf[i] = list->type; if (register_arg(func, list->name, list->type)) { g_free(arg_type_buf); return 1; } list = list->next; } func->u.func.fprm->arg_type = arg_type_buf; } else { list = func->u.func.arg_list; for (i = 0; list; i++) { if (register_arg(func, list->name, list->type)) { return 1; } list = list->next; } } func->u.func.argc = n; func->u.func.fprm->argc = func->u.func.argc; return 0; } static void free_arg_list(struct math_func_arg_list *list) { static struct math_func_arg_list *next; while (list) { next = list->next; g_free(list->name); g_free(list); list = next; } } int math_function_expression_register_arg(MathExpression *func) { return func_set_arg_buf(func); } int math_function_expression_set_function(MathEquation *eq, MathExpression *func, const char *name, MathExpression *exp) { int anum, str_anum, vnum, snum; func->u.func.exp = exp; if (func->u.func.fprm == NULL) { return 1; } if (math_equation_register_user_func_definition(eq, name, func)) { return 1; } func->u.func.fprm->base_usr = func; func->u.func.fprm->opt_usr = NULL; math_equation_finish_user_func_definition(eq, &vnum, &anum, &str_anum, &snum); func->u.func.local_num = vnum; func->u.func.local_string_num = snum; func->u.func.local_array_num = anum; func->u.func.local_string_array_num = str_anum; return 0; } MathExpression * math_parameter_expression_new(MathEquation *eq, char *name, int *err) { int ofst, i, type, n, id, id_pre, id_post, index; MathExpression *exp; MathEquationParametar *prm; if (isalpha(name[1])) { type = name[1]; ofst = 2; } else { type = 0; ofst = 1; } prm = math_equation_get_parameter(eq, type, err); if (prm == NULL) { *err = MATH_ERROR_INVALID_PRM; return NULL; } for (i = ofst; isdigit(name[i]); i++); if (name[i] != '\0' || i == ofst) { *err = MATH_ERROR_INVALID_PRM; return NULL; } n = i - ofst; if (n < prm->min_length || n > prm->max_length) { *err = MATH_ERROR_INVALID_PRM; return NULL; } id_pre = id_post = 0; for (i = 0; i < prm->min_length - 1; i++) { id_pre *= 10; id_pre += name[ofst + i] - '0'; } for (; i < n; i++) { id_post *= 10; id_post += name[ofst + i] - '0'; } for (i = 0; i < prm->max_length - prm->min_length + 1; i++) { id_pre *= 10; } id = id_pre + id_post; index = math_equation_use_parameter(eq, type, id); if (index < 0) { *err = MATH_ERROR_MEMORY; return NULL; } exp = math_expression_new(MATH_EXPRESSION_TYPE_PRM, eq, err); if (exp == NULL) { return NULL; } exp->u.prm.type = type; exp->u.prm.prm = prm; exp->u.prm.id = id; exp->u.prm.index = (prm->use_index == MATH_EQUATION_PARAMETAR_USE_INDEX) ? index : id; return exp; } MathExpression * math_constant_expression_new(MathEquation *eq, const char *name, int *err) { MathExpression *exp; MathValue val; int i; i = math_equation_get_const_by_name(eq, name, &val); if (i < 0) { return NULL; } exp = math_expression_new(MATH_EXPRESSION_TYPE_CONST, eq, err); if (exp == NULL) { return NULL; } exp->u.index = i; return exp; } MathExpression * math_variable_expression_new(MathEquation *eq, const char *name, int *err) { MathExpression *exp; int i; exp = math_expression_new(MATH_EXPRESSION_TYPE_VARIABLE, eq, err); if (exp == NULL) { return NULL; } i = math_equation_add_var(eq, name); if (i < 0) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } exp->u.index = i; return exp; } MathExpression * math_string_variable_expression_new(MathEquation *eq, const char *str, int *err) { MathExpression *exp; int i; exp = math_expression_new(MATH_EXPRESSION_TYPE_STRING_VARIABLE, eq, err); if (exp == NULL) { return NULL; } i = math_equation_add_var_string(eq, str); if (i < 0) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } exp->u.index = i; return exp; } MathExpression * math_array_expression_new(MathEquation *eq, const char *name, MathExpression *operand, int is_string, int *err) { MathExpression *exp; int i; enum MATH_EXPRESSION_TYPE type; type = (is_string) ? MATH_EXPRESSION_TYPE_STRING_ARRAY : MATH_EXPRESSION_TYPE_ARRAY; exp = math_expression_new(type, eq, err); if (exp == NULL) { return NULL; } i = math_equation_add_array(eq, name, is_string); if (i < 0) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } exp->u.array.index = i; exp->u.array.operand = operand; return exp; } MathExpression * math_array_argument_expression_new(MathEquation *eq, const char *name, int *err) { MathExpression *exp; int i; exp = math_expression_new(MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT, eq, err); if (exp == NULL) { return NULL; } i = math_equation_add_array(eq, name, FALSE); if (i < 0) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } exp->u.array.index = i; return exp; } MathExpression * math_string_array_argument_expression_new(MathEquation *eq, const char *name, int *err) { MathExpression *exp; int i; exp = math_expression_new(MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT, eq, err); if (exp == NULL) { return NULL; } i = math_equation_add_array(eq, name, TRUE); if (i < 0) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } exp->u.array.index = i; return exp; } int math_function_get_arg_type_num(struct math_function_parameter *fprm) { if (fprm->argc < 0) { return - 1 - fprm->argc; } return fprm->argc; } static int check_argument_sub(enum MATH_FUNCTION_ARG_TYPE arg_type, enum MATH_EXPRESSION_TYPE type) { switch (arg_type) { case MATH_FUNCTION_ARG_TYPE_DOUBLE: case MATH_FUNCTION_ARG_TYPE_PROC: switch (type) { case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: return 1; default: break; } break; case MATH_FUNCTION_ARG_TYPE_STRING: switch (type) { case MATH_EXPRESSION_TYPE_STRING: case MATH_EXPRESSION_TYPE_STRING_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_ARRAY: break; default: return 1; } break; case MATH_FUNCTION_ARG_TYPE_ARRAY: switch (type) { case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: break; default: return 1; } break; case MATH_FUNCTION_ARG_TYPE_STRING_ARRAY: switch (type) { case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: break; default: return 1; } break; case MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON: switch (type) { case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: break; default: return 1; } break; case MATH_FUNCTION_ARG_TYPE_VARIABLE: switch (type) { case MATH_EXPRESSION_TYPE_VARIABLE: case MATH_EXPRESSION_TYPE_ARRAY: break; default: return 1; } break; case MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE: switch (type) { case MATH_EXPRESSION_TYPE_STRING_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_ARRAY: break; default: return 1; } break; case MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON: switch (type) { case MATH_EXPRESSION_TYPE_VARIABLE: case MATH_EXPRESSION_TYPE_ARRAY: case MATH_EXPRESSION_TYPE_STRING_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_ARRAY: break; default: return 1; } break; } return 0; } static int check_argument(struct math_function_parameter *fprm, int argc, MathExpression **argv) { int i, arg_type_num; enum MATH_FUNCTION_ARG_TYPE arg_type; arg_type_num = math_function_get_arg_type_num(fprm); for (i = 0; i < argc; i++) { if (fprm->arg_type && i < arg_type_num) { arg_type = fprm->arg_type[i]; } else { arg_type = MATH_FUNCTION_ARG_TYPE_DOUBLE; } if (check_argument_sub(arg_type, argv[i]->type)) { return 1; } } return 0; } MathExpression * math_func_call_expression_new(MathEquation *eq, struct math_function_parameter *fprm, int argc, MathExpression **argv, int pos_id, int *err) { MathExpression *exp; MathFunctionArgument *buf; if (check_argument(fprm, argc, argv)) { *err = MATH_ERROR_INVALID_ARG; return NULL; } buf = NULL; if (argc > 0) { buf = g_malloc(sizeof(*buf) * argc); if (buf == NULL) { *err = MATH_ERROR_MEMORY; return NULL; } } exp = math_expression_new(MATH_EXPRESSION_TYPE_FUNC_CALL, eq, err); if (exp == NULL) { g_free(buf); return NULL; } exp->u.func_call.argv = argv; exp->u.func_call.argc = argc; exp->u.func_call.buf = buf; exp->u.func_call.pos_id = pos_id; exp->u.func_call.fprm = fprm; return exp; } MathExpression * math_binary_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, MathExpression *left, MathExpression *right, int *err) { MathExpression *exp; exp = math_expression_new(type, eq, err); if (exp == NULL) return NULL; exp->u.bin.left = left; exp->u.bin.right = right; return exp; } MathExpression * math_assign_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, MathExpression *left, MathExpression *right, enum MATH_OPERATOR_TYPE op, int *err) { MathExpression *exp; exp = math_expression_new(type, eq, err); if (exp == NULL) return NULL; exp->u.assign.op = op; exp->u.assign.left = left; exp->u.assign.right = right; return exp; } MathExpression * math_unary_expression_new(enum MATH_EXPRESSION_TYPE type, MathEquation *eq, MathExpression *operand, int *err) { MathExpression *exp; exp = math_expression_new(type, eq, err); if (exp == NULL) return NULL; exp->u.unary.operand = operand; return exp; } MathExpression * math_double_expression_new(MathEquation *eq, const MathValue *val, int *err) { MathExpression *exp; exp = math_expression_new(MATH_EXPRESSION_TYPE_DOUBLE, eq, err); if (exp == NULL) return NULL; exp->u.value = *val; return exp; } static int check_expand(MathEquation *eq, MathStringExpression *str, int *err) { char *ptr, *eqn, error; int in_variable, start, end, i; struct embedded_expression variable; MathExpression *exp; error = FALSE; in_variable = FALSE; ptr = str->string; for (i = 0; ptr[i]; i++) { switch (ptr[i]) { case MATH_VARIABLE_EXPAND_PREFIX: if (ptr[i + 1] == '{') { in_variable = TRUE; start = i; i++; continue; } break; case '}': if (in_variable) { end = i; variable.start = start; variable.end = end; eqn = g_strndup(ptr + start + 2, end - start - 2); if (eqn == NULL) { *err = MATH_ERROR_MEMORY; error =TRUE; goto End; } exp = math_parser_parse(eqn, eq, err); if (exp == NULL) { error = TRUE; g_free(eqn); goto End; } variable.exp = exp; if (arrayadd(str->variables, &variable) == NULL) { *err = MATH_ERROR_MEMORY; error = TRUE; math_expression_free(exp); } g_free(eqn); in_variable = FALSE; if (error) { goto End; } } break; } } if (! error && in_variable) { *err = MATH_ERROR_UNTERMINATED_STRING; error = TRUE; } End: return error; } MathExpression * math_string_expression_new(MathEquation *eq, const char *str, int expand, int *err) { MathExpression *exp; exp = math_expression_new(MATH_EXPRESSION_TYPE_STRING, eq, err); if (exp == NULL) return NULL; exp->u.str.variables = NULL; exp->u.str.expanded = NULL; exp->u.str.string = g_strdup(str); if (exp->u.str.string == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } if (! expand) { return exp; } exp->u.str.variables = arraynew(sizeof(struct embedded_expression)); if (exp->u.str.variables == NULL) { *err = MATH_ERROR_MEMORY; math_expression_free(exp); return NULL; } if (check_expand(eq, &exp->u.str, err)) { math_expression_free(exp); return NULL; } if (arraynum(exp->u.str.variables) == 0) { arrayfree(exp->u.str.variables); exp->u.str.variables = NULL; } if (exp->u.str.variables) { exp->u.str.expanded = g_string_new(""); if (exp->u.str.expanded == NULL) { arrayfree(exp->u.str.variables); exp->u.str.variables = NULL; } } return exp; } static const char * math_expression_get_string(MathExpression *expression) { int i, n; struct embedded_expression *var; GString *gstr; char *ptr; int top; MathStringExpression *str_exp; if (expression == NULL) { return NULL; } str_exp = &(expression->u.str); if (str_exp->variables == NULL) { return str_exp->string; } n = arraynum(str_exp->variables); if (n < 1) { return str_exp->string; } gstr = str_exp->expanded; g_string_set_size(gstr, 0); ptr = str_exp->string; top = 0; var = arraydata(str_exp->variables); for (i = 0; i < n; i++) { MathExpression *exp; MathValue val; int len; const char *cstr; len = var[i].start - top; g_string_append_len(gstr, ptr + top, len); exp = var[i].exp; switch (exp->type) { case MATH_EXPRESSION_TYPE_STRING: g_string_append(gstr, exp->u.str.string); break; case MATH_EXPRESSION_TYPE_STRING_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_ARRAY: cstr = get_cstring_from_expression(exp); if (cstr) { g_string_append(gstr, cstr); } break; default: if (math_expression_calculate(exp, &val) == 0) { if (val.type == MATH_VALUE_NORMAL) { n_gstr_append_printf_double(gstr, "%G", val.val); } else { const char *str; str = math_special_value_to_string(&val); if (str) { g_string_append_c(gstr, '['); g_string_append(gstr, str); g_string_append_c(gstr, ']'); } } } } top = var[i].end + 1; if (i == n - 1) { g_string_append(gstr, ptr + var[i].end + 1); } } return gstr->str; } static void free_expand_variables(struct narray *array) { int i, n; struct embedded_expression *data; if (array == NULL) { return; } n = arraynum(array); data = arraydata(array); for (i = 0; i < n; i++) { math_expression_free(data[i].exp); } } static void math_string_expression_free(MathStringExpression *exp) { if (exp->string) { g_free(exp->string); } if (exp->expanded) { g_string_free(exp->expanded, TRUE); } if (exp->variables) { free_expand_variables(exp->variables); arrayfree(exp->variables); } } MathExpression * math_eoeq_expression_new(MathEquation *eq, int *err) { MathExpression *exp; exp = math_expression_new(MATH_EXPRESSION_TYPE_EOEQ, eq, err); return exp; } static void math_expression_free_sub(MathExpression *exp) { int i; if (exp == NULL) return; switch (exp->type) { case MATH_EXPRESSION_TYPE_OR: case MATH_EXPRESSION_TYPE_AND: case MATH_EXPRESSION_TYPE_EQ: case MATH_EXPRESSION_TYPE_NE: case MATH_EXPRESSION_TYPE_ADD: case MATH_EXPRESSION_TYPE_SUB: case MATH_EXPRESSION_TYPE_MUL: case MATH_EXPRESSION_TYPE_DIV: case MATH_EXPRESSION_TYPE_MOD: case MATH_EXPRESSION_TYPE_POW: case MATH_EXPRESSION_TYPE_GT: case MATH_EXPRESSION_TYPE_GE: case MATH_EXPRESSION_TYPE_LT: case MATH_EXPRESSION_TYPE_LE: math_expression_free(exp->u.bin.left); math_expression_free(exp->u.bin.right); break; case MATH_EXPRESSION_TYPE_ASSIGN: case MATH_EXPRESSION_TYPE_STRING_ASSIGN: math_expression_free(exp->u.assign.left); math_expression_free(exp->u.assign.right); break; case MATH_EXPRESSION_TYPE_FUNC: math_expression_free(exp->u.func.exp); free_arg_list(exp->u.func.arg_list); break; case MATH_EXPRESSION_TYPE_CONST_DEF: math_expression_free(exp->u.const_def.operand); break; case MATH_EXPRESSION_TYPE_FUNC_CALL: for (i = 0; i < exp->u.func_call.argc; i++) { math_expression_free(exp->u.func_call.argv[i]); } g_free(exp->u.func_call.argv); g_free(exp->u.func_call.buf); break; case MATH_EXPRESSION_TYPE_MINUS: case MATH_EXPRESSION_TYPE_NOT: case MATH_EXPRESSION_TYPE_FACT: math_expression_free(exp->u.unary.operand); break; case MATH_EXPRESSION_TYPE_ARRAY: case MATH_EXPRESSION_TYPE_STRING_ARRAY: math_expression_free(exp->u.array.operand); break; case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_CONST: case MATH_EXPRESSION_TYPE_VARIABLE: break; case MATH_EXPRESSION_TYPE_STRING: math_string_expression_free(&exp->u.str); break; case MATH_EXPRESSION_TYPE_STRING_VARIABLE: break; case MATH_EXPRESSION_TYPE_DOUBLE: case MATH_EXPRESSION_TYPE_PRM: case MATH_EXPRESSION_TYPE_EOEQ: break; case MATH_EXPRESSION_TYPE_BLOCK: math_expression_free(exp->u.exp); break; } g_free(exp); } void math_expression_free(MathExpression *exp) { MathExpression *next; while (exp) { next = exp->next; math_expression_free_sub(exp); exp = next; } } static double Fact_data[] = { 1.000000000000000e+00, 1.000000000000000e+00, 2.000000000000000e+00, 6.000000000000000e+00, 2.400000000000000e+01, 1.200000000000000e+02, 7.200000000000000e+02, 5.040000000000000e+03, 4.032000000000000e+04, 3.628800000000000e+05, 3.628800000000000e+06, 3.991680000000000e+07, 4.790016000000000e+08, 6.227020800000000e+09, 8.717829120000000e+10, 1.307674368000000e+12, 2.092278988800000e+13, 3.556874280960000e+14, 6.402373705728000e+15, 1.216451004088320e+17, 2.432902008176640e+18, 5.109094217170944e+19, 1.124000727777608e+21, 2.585201673888498e+22, 6.204484017332394e+23, 1.551121004333099e+25, 4.032914611266057e+26, 1.088886945041835e+28, 3.048883446117139e+29, 8.841761993739702e+30, 2.652528598121911e+32, 8.222838654177922e+33, 2.631308369336935e+35, 8.683317618811886e+36, 2.952327990396042e+38, 1.033314796638615e+40, 3.719933267899013e+41, 1.376375309122635e+43, 5.230226174666011e+44, 2.039788208119744e+46, 8.159152832478977e+47, 3.345252661316381e+49, 1.405006117752880e+51, 6.041526306337383e+52, 2.658271574788449e+54, 1.196222208654802e+56, 5.502622159812089e+57, 2.586232415111682e+59, 1.241391559253607e+61, 6.082818640342675e+62, 3.041409320171338e+64, 1.551118753287382e+66, 8.065817517094388e+67, 4.274883284060025e+69, 2.308436973392414e+71, 1.269640335365828e+73, 7.109985878048635e+74, 4.052691950487721e+76, 2.350561331282878e+78, 1.386831185456898e+80, 8.320987112741390e+81, 5.075802138772248e+83, 3.146997326038794e+85, 1.982608315404440e+87, 1.268869321858842e+89, 8.247650592082472e+90, 5.443449390774431e+92, 3.647111091818868e+94, 2.480035542436831e+96, 1.711224524281413e+98, 1.197857166996989e+100, 8.504785885678623e+101, 6.123445837688608e+103, 4.470115461512684e+105, 3.307885441519386e+107, 2.480914081139540e+109, 1.885494701666050e+111, 1.451830920282859e+113, 1.132428117820630e+115, 8.946182130782976e+116, 7.156945704626381e+118, 5.797126020747368e+120, 4.753643337012842e+122, 3.945523969720659e+124, 3.314240134565353e+126, 2.817104114380550e+128, 2.422709538367273e+130, 2.107757298379528e+132, 1.854826422573984e+134, 1.650795516090846e+136, 1.485715964481762e+138, 1.352001527678403e+140, 1.243841405464131e+142, 1.156772507081642e+144, 1.087366156656743e+146, 1.032997848823906e+148, 9.916779348709496e+149, 9.619275968248212e+151, 9.426890448883248e+153, 9.332621544394415e+155, 9.332621544394415e+157, 9.425947759838360e+159, 9.614466715035127e+161, 9.902900716486180e+163, 1.029901674514563e+166, 1.081396758240291e+168, 1.146280563734708e+170, 1.226520203196138e+172, 1.324641819451829e+174, 1.443859583202494e+176, 1.588245541522743e+178, 1.762952551090245e+180, 1.974506857221074e+182, 2.231192748659814e+184, 2.543559733472188e+186, 2.925093693493016e+188, 3.393108684451898e+190, 3.969937160808721e+192, 4.684525849754291e+194, 5.574585761207606e+196, 6.689502913449127e+198, 8.094298525273444e+200, 9.875044200833601e+202, 1.214630436702533e+205, 1.506141741511141e+207, 1.882677176888926e+209, 2.372173242880047e+211, 3.012660018457659e+213, 3.856204823625804e+215, 4.974504222477287e+217, 6.466855489220474e+219, 8.471580690878821e+221, 1.118248651196004e+224, 1.487270706090686e+226, 1.992942746161519e+228, 2.690472707318050e+230, 3.659042881952549e+232, 5.012888748274992e+234, 6.917786472619489e+236, 9.615723196941089e+238, 1.346201247571753e+241, 1.898143759076171e+243, 2.695364137888163e+245, 3.854370717180073e+247, 5.550293832739304e+249, 8.047926057471992e+251, 1.174997204390911e+254, 1.727245890454639e+256, 2.556323917872865e+258, 3.808922637630570e+260, 5.713383956445855e+262, 8.627209774233240e+264, 1.311335885683452e+267, 2.006343905095682e+269, 3.089769613847351e+271, 4.789142901463394e+273, 7.471062926282894e+275, 1.172956879426414e+278, 1.853271869493735e+280, 2.946702272495038e+282, 4.714723635992062e+284, 7.590705053947219e+286, 1.229694218739449e+289, 2.004401576545303e+291, 3.287218585534296e+293, 5.423910666131589e+295, 9.003691705778438e+297, 1.503616514864999e+300, 2.526075744973198e+302, 4.269068009004705e+304, }; #define FACT_MAX (sizeof(Fact_data) / sizeof(*Fact_data)) static double factorial(unsigned int n) { if (n < FACT_MAX) { return Fact_data[n]; } return HUGE_VAL; } static int set_string_argument(MathFunctionCallExpression *exp, int i) { const char *str; if (! math_expression_kind_of_string(exp->argv[i])) { return 1; } str = get_cstring_from_expression(exp->argv[i]); if (str == NULL) { return 1; } exp->buf[i].cstr = str; return 0; } static int set_variable_argument(MathFunctionCallExpression *exp, MathEquation *eq, int i) { MathValue v, *ptr; switch (exp->argv[i]->type) { case MATH_EXPRESSION_TYPE_ARRAY: if (CALC_EXPRESSION(exp->argv[i]->u.array.operand, v)) { return 1; } if (v.type != MATH_VALUE_NORMAL) { return 1; } ptr = math_equation_get_array_ptr(eq, exp->argv[i]->u.array.index, v.val); break; case MATH_EXPRESSION_TYPE_VARIABLE: ptr = math_equation_get_var_ptr(eq, exp->argv[i]->u.index); break; default: return 1; } exp->buf[i].variable.data.vptr = ptr; exp->buf[i].variable.type = DATA_TYPE_VALUE; return 0; } static int set_string_variable_argument(MathFunctionCallExpression *exp, MathEquation *eq, int i) { MathValue v; GString *gstr; switch (exp->argv[i]->type) { case MATH_EXPRESSION_TYPE_STRING_ARRAY: if (CALC_EXPRESSION(exp->argv[i]->u.array.operand, v)) { return 1; } if (v.type != MATH_VALUE_NORMAL) { return 1; } gstr = math_equation_get_array_str(eq, exp->argv[i]->u.array.index, v.val); break; case MATH_EXPRESSION_TYPE_STRING_VARIABLE: math_equation_get_string_var(eq, exp->argv[i]->u.index, &gstr); break; default: return 1; } if (gstr == NULL) { return 1; } exp->buf[i].variable.type = DATA_TYPE_STRING; exp->buf[i].variable.data.str = gstr; return 0; } static int call_func(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *val) { int i, n, arg_type_num; enum MATH_FUNCTION_ARG_TYPE *type; type = exp->fprm->arg_type; if (exp->fprm->argc > 0 && exp->argc != exp->fprm->argc) { val->type = MATH_VALUE_ERROR; return 1; } arg_type_num = math_function_get_arg_type_num(exp->fprm); n = exp->argc; for (i = 0; i < n; i++) { if (type && i < arg_type_num) { switch (type[i]) { case MATH_FUNCTION_ARG_TYPE_VARIABLE: if (set_variable_argument(exp, eq, i)) { val->type = MATH_VALUE_ERROR; return 1; } break; case MATH_FUNCTION_ARG_TYPE_VARIABLE_COMMON: switch (exp->argv[i]->type) { case MATH_EXPRESSION_TYPE_ARRAY: case MATH_EXPRESSION_TYPE_VARIABLE: if (set_variable_argument(exp, eq, i)) { val->type = MATH_VALUE_ERROR; return 1; } break; case MATH_EXPRESSION_TYPE_STRING_ARRAY: case MATH_EXPRESSION_TYPE_STRING_VARIABLE: if (set_string_variable_argument(exp, eq, i)) { val->type = MATH_VALUE_ERROR; return 1; } break; default: val->type = MATH_VALUE_ERROR; return 1; break; } break; case MATH_FUNCTION_ARG_TYPE_ARRAY: switch (exp->argv[i]->type) { case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: exp->buf[i].array.array_type = DATA_TYPE_VALUE; exp->buf[i].array.idx = exp->argv[i]->u.array.index; break; default: val->type = MATH_VALUE_ERROR; return 1; break; } break; case MATH_FUNCTION_ARG_TYPE_PROC: if (exp->argv[i]->type == MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT) { val->type = MATH_VALUE_ERROR; return 1; } exp->buf[i].exp = exp->argv[i]; break; case MATH_FUNCTION_ARG_TYPE_DOUBLE: if (exp->argv[i]->type == MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT) { val->type = MATH_VALUE_ERROR; return 1; } if (CALC_EXPRESSION(exp->argv[i], exp->buf[i].val)) return 1; break; case MATH_FUNCTION_ARG_TYPE_STRING: if (set_string_argument(exp, i)) { val->type = MATH_VALUE_ERROR; return 1; } break; case MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE: if (set_string_variable_argument(exp, eq, i)) { val->type = MATH_VALUE_ERROR; return 1; } break; case MATH_FUNCTION_ARG_TYPE_STRING_ARRAY: switch (exp->argv[i]->type) { case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: exp->buf[i].array.array_type = DATA_TYPE_STRING; exp->buf[i].array.idx = exp->argv[i]->u.array.index; break; default: val->type = MATH_VALUE_ERROR; return 1; break; } break; case MATH_FUNCTION_ARG_TYPE_ARRAY_COMMON: switch (exp->argv[i]->type) { case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: exp->buf[i].array.array_type = DATA_TYPE_VALUE; exp->buf[i].array.idx = exp->argv[i]->u.array.index; break; case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: exp->buf[i].array.array_type = DATA_TYPE_STRING; exp->buf[i].array.idx = exp->argv[i]->u.array.index; break; default: return 1; break; } } } else if (CALC_EXPRESSION(exp->argv[i], exp->buf[i].val)) { return 1; } } return exp->fprm->func(exp, eq, val); } static MathExpression * reduce_expression(MathExpression *exp, int *err) { #if 1 MathValue val; int r; MathExpression *rexp; r = math_expression_calculate(exp, &val); if (r) { math_expression_free(exp); *err = MATH_ERROR_CALCULATION; return NULL; } rexp = math_double_expression_new(exp->equation, &val, NULL); math_expression_free(exp); return rexp; #else return exp; #endif } static MathExpression * optimize_usr_function(MathExpression *exp,int *err) { MathExpression *new_exp; new_exp = math_expression_new(MATH_EXPRESSION_TYPE_FUNC, exp->equation, NULL); if (new_exp == NULL) return NULL; new_exp->u.func.argc = exp->u.func.argc; new_exp->u.func.local_num = exp->u.func.local_num; new_exp->u.func.local_array_num = exp->u.func.local_array_num; new_exp->u.func.local_string_num = exp->u.func.local_string_num; new_exp->u.func.local_string_array_num = exp->u.func.local_string_array_num; new_exp->u.func.exp = math_expression_optimize(exp->u.func.exp, err); new_exp->u.func.fprm = exp->u.func.fprm; new_exp->u.func.arg_list = NULL; if (new_exp->u.func.exp == NULL) { math_expression_free(new_exp); return NULL; } return new_exp; } static void free_arg_array(int argc, MathExpression **argv) { int i; for (i = 0; i < argc; i++) { math_expression_free(argv[i]); } g_free(argv); } static MathExpression * optimize_func_call(MathExpression *exp, int *err) { MathExpression **argv, *new_exp; int can_reduce, i, error; can_reduce = 1; argv = g_malloc0(exp->u.func_call.argc * sizeof(*argv)); if (argv == NULL) { return NULL; } error = 0; for (i = 0; i < exp->u.func_call.argc; i++) { argv[i] = optimize(exp->u.func_call.argv[i], err); if (argv[i] == NULL) { error = 1; } else if (argv[i]->type != MATH_EXPRESSION_TYPE_DOUBLE) { can_reduce = 0; } } if (error) { free_arg_array(exp->u.func_call.argc, argv); return NULL; } new_exp = math_func_call_expression_new(exp->equation, exp->u.func_call.fprm, exp->u.func_call.argc, argv, exp->u.func_call.pos_id, &error); if (new_exp == NULL) { free_arg_array(exp->u.func_call.argc, argv); return NULL; } if (can_reduce && ! exp->u.func_call.fprm->side_effect) { new_exp = reduce_expression(new_exp, err); } return new_exp; } static MathExpression * optimize_or_expression(MathExpression *exp, int *err) { MathExpression *left, *right, *new_exp; new_exp = math_binary_expression_new(exp->type, exp->equation, NULL, NULL, err); if (new_exp == NULL) return NULL; left = optimize(exp->u.bin.left, err); new_exp->u.bin.left = left; if (left == NULL) { math_expression_free(new_exp); return NULL; } right = optimize(exp->u.bin.right, err); new_exp->u.bin.right = right; if (right == NULL) { math_expression_free(new_exp); return NULL; } if (left->type == MATH_EXPRESSION_TYPE_DOUBLE && right->type == MATH_EXPRESSION_TYPE_DOUBLE) { new_exp = reduce_expression(new_exp, err); } else if (left->type == MATH_EXPRESSION_TYPE_DOUBLE) { if (left->u.value.val == 0.0) { math_expression_free(new_exp); new_exp = right; } else { new_exp->u.bin.left = NULL; math_expression_free(new_exp); new_exp = left; } } return new_exp; } static MathExpression * optimize_and_expression(MathExpression *exp, int *err) { MathExpression *left, *right, *new_exp; new_exp = math_binary_expression_new(exp->type, exp->equation, NULL, NULL, err); if (new_exp == NULL) return NULL; left = optimize(exp->u.bin.left, err); new_exp->u.bin.left = left; if (left == NULL) { math_expression_free(new_exp); return NULL; } right = optimize(exp->u.bin.right, err); new_exp->u.bin.right = right; if (right == NULL) { math_expression_free(new_exp); return NULL; } if (left->type == MATH_EXPRESSION_TYPE_DOUBLE && right->type == MATH_EXPRESSION_TYPE_DOUBLE) { new_exp = reduce_expression(new_exp, err); } else if (left->type == MATH_EXPRESSION_TYPE_DOUBLE) { if (left->u.value.val == 0.0) { new_exp->u.bin.left = NULL; math_expression_free(new_exp); new_exp = left; } else { new_exp->u.bin.right = NULL; math_expression_free(new_exp); new_exp = right; } } return new_exp; } static MathExpression * optimize_bin_expression(MathExpression *exp, int *err) { MathExpression *left, *right, *new_exp; new_exp = math_binary_expression_new(exp->type, exp->equation, NULL, NULL, err); if (new_exp == NULL) return NULL; left = optimize(exp->u.bin.left, err); new_exp->u.bin.left = left; if (left == NULL) { math_expression_free(new_exp); return NULL; } right = optimize(exp->u.bin.right, err); new_exp->u.bin.right = right; if (right == NULL) { math_expression_free(new_exp); return NULL; } if (left->type == MATH_EXPRESSION_TYPE_DOUBLE && right->type == MATH_EXPRESSION_TYPE_DOUBLE) { new_exp = reduce_expression(new_exp, err); } return new_exp; } static MathExpression * optimize_assign_expression(MathExpression *exp, int *err) { MathExpression *left, *right, *new_exp; new_exp = math_assign_expression_new(exp->type, exp->equation, NULL, NULL, exp->u.assign.op, err); if (new_exp == NULL) return NULL; left = optimize(exp->u.assign.left, err); new_exp->u.assign.left = left; if (left == NULL) { math_expression_free(new_exp); return NULL; } right = optimize(exp->u.assign.right, err); new_exp->u.assign.right = right; if (right == NULL) { math_expression_free(new_exp); return NULL; } return new_exp; } static MathExpression * optimize_mul_expression(MathExpression *exp, int *err) { MathExpression *left, *right, *new_exp; new_exp = math_binary_expression_new(exp->type, exp->equation, NULL, NULL, err); if (new_exp == NULL) return NULL; left = optimize(exp->u.bin.left, err); new_exp->u.bin.left = left; if (left == NULL) { math_expression_free(new_exp); return NULL; } right = optimize(exp->u.bin.right, err); new_exp->u.bin.right = right; if (right == NULL) { math_expression_free(new_exp); return NULL; } if (left->type == MATH_EXPRESSION_TYPE_DOUBLE && right->type == MATH_EXPRESSION_TYPE_DOUBLE) { new_exp = reduce_expression(new_exp, err); } else if (left->type == MATH_EXPRESSION_TYPE_DOUBLE && left->u.value.val == 1.0) { new_exp->u.bin.right = NULL; math_expression_free(new_exp); new_exp = right; } else if (right->type == MATH_EXPRESSION_TYPE_DOUBLE && right->u.value.val == 1.0) { new_exp->u.bin.left = NULL; math_expression_free(new_exp); new_exp = left; } return new_exp; } static MathExpression * optimize_div_expression(MathExpression *exp, int *err) { MathExpression *left, *right, *new_exp; new_exp = math_binary_expression_new(exp->type, exp->equation, NULL, NULL, err); if (new_exp == NULL) return NULL; left = optimize(exp->u.bin.left, err); new_exp->u.bin.left = left; if (left == NULL) { math_expression_free(new_exp); return NULL; } right = optimize(exp->u.bin.right, err); new_exp->u.bin.right = right; if (right == NULL) { math_expression_free(new_exp); return NULL; } if (left->type == MATH_EXPRESSION_TYPE_DOUBLE && right->type == MATH_EXPRESSION_TYPE_DOUBLE) { new_exp = reduce_expression(new_exp, err); } else if (right->type == MATH_EXPRESSION_TYPE_DOUBLE) { if (right->u.value.val == 1.0) { new_exp->u.bin.left = NULL; math_expression_free(new_exp); new_exp = left; } else if (right->u.value.val == 0.0) { new_exp->type = MATH_EXPRESSION_TYPE_DIV; /* noting to do (a run-time error will be caused) */ } else { right->u.value.val = 1.0 / right->u.value.val; new_exp->type = MATH_EXPRESSION_TYPE_MUL; } } return new_exp; } static MathExpression * optimize_una_expression(MathExpression *exp, int *err) { MathExpression *operand, *new_exp; new_exp = math_unary_expression_new(exp->type, exp->equation, NULL, err); if (new_exp == NULL) return NULL; operand = optimize(exp->u.unary.operand, err); new_exp->u.unary.operand = operand; if (operand == NULL) { math_expression_free(new_exp); return NULL; } if (operand->type == MATH_EXPRESSION_TYPE_DOUBLE) { new_exp = reduce_expression(new_exp, err); } return new_exp; } static MathExpression * optimize_array_expression(MathExpression *exp, int *err) { MathExpression *operand, *new_exp; new_exp = math_expression_new(exp->type, exp->equation, err); if (new_exp == NULL) return NULL; operand = optimize(exp->u.array.operand, err); new_exp->u.array.operand = operand; new_exp->u.array.index = exp->u.array.index; if (operand == NULL) { math_expression_free(new_exp); return NULL; } return new_exp; } static MathExpression * optimize_block_expression(MathExpression *exp, int *err) { MathExpression *operand, *new_exp; operand = math_expression_optimize(exp->u.exp, err); if (operand == NULL) { return NULL; } new_exp = math_expression_new(exp->type, exp->equation, err); if (new_exp == NULL) { return NULL; } new_exp->u.exp = operand; return new_exp; } static MathExpression * optimize_string_expression(MathExpression *exp, int *err) { MathExpression *new_exp; int i, n, is_fail; struct embedded_expression *org_data, *new_data; new_exp = math_expression_new(MATH_EXPRESSION_TYPE_STRING, exp->equation, err); if (new_exp == NULL) { return NULL; } new_exp->u.str.expanded = NULL; new_exp->u.str.variables = NULL; new_exp->u.str.string = g_strdup(exp->u.str.string); if (new_exp->u.str.string == NULL) { g_free(new_exp); return NULL; } if (exp->u.str.expanded == NULL) { return new_exp; } new_exp->u.str.expanded = g_string_new(""); if (new_exp->u.str.expanded == NULL) { math_expression_free(new_exp); return NULL; } new_exp->u.str.variables = arraydup(exp->u.str.variables); if (new_exp->u.str.variables == NULL) { math_expression_free(new_exp); return NULL; } is_fail = FALSE; n = arraynum(new_exp->u.str.variables); new_data = arraydata(new_exp->u.str.variables); org_data = arraydata(exp->u.str.variables); for (i = 0; i < n; i++) { new_data[i].exp = optimize(org_data[i].exp, err); if (new_data[i].exp == NULL) { is_fail = TRUE; } } if (is_fail) { math_expression_free(new_exp); return NULL; } return new_exp; } static MathExpression * optimize(MathExpression *exp, int *err) { MathExpression *new_exp; switch (exp->type) { case MATH_EXPRESSION_TYPE_BLOCK: new_exp = optimize_block_expression(exp, err); break; case MATH_EXPRESSION_TYPE_OR: new_exp = optimize_or_expression(exp, err); break; case MATH_EXPRESSION_TYPE_AND: new_exp = optimize_and_expression(exp, err); break; case MATH_EXPRESSION_TYPE_EQ: case MATH_EXPRESSION_TYPE_NE: case MATH_EXPRESSION_TYPE_ADD: case MATH_EXPRESSION_TYPE_SUB: case MATH_EXPRESSION_TYPE_MOD: case MATH_EXPRESSION_TYPE_POW: case MATH_EXPRESSION_TYPE_GT: case MATH_EXPRESSION_TYPE_GE: case MATH_EXPRESSION_TYPE_LT: case MATH_EXPRESSION_TYPE_LE: new_exp = optimize_bin_expression(exp, err); break; case MATH_EXPRESSION_TYPE_ASSIGN: case MATH_EXPRESSION_TYPE_STRING_ASSIGN: new_exp = optimize_assign_expression(exp, err); break; case MATH_EXPRESSION_TYPE_MUL: new_exp = optimize_mul_expression(exp, err); break; case MATH_EXPRESSION_TYPE_DIV: new_exp = optimize_div_expression(exp, err); break; case MATH_EXPRESSION_TYPE_MINUS: case MATH_EXPRESSION_TYPE_NOT: case MATH_EXPRESSION_TYPE_FACT: new_exp = optimize_una_expression(exp, err); break; case MATH_EXPRESSION_TYPE_FUNC_CALL: new_exp = optimize_func_call(exp, err); break; case MATH_EXPRESSION_TYPE_FUNC: new_exp = optimize_usr_function(exp, err); break; case MATH_EXPRESSION_TYPE_DOUBLE: new_exp = math_double_expression_new(exp->equation, &exp->u.value, err); break; case MATH_EXPRESSION_TYPE_CONST: new_exp = math_expression_new(exp->type, exp->equation, err); if (new_exp) { new_exp->u.index = exp->u.index; new_exp = reduce_expression(new_exp, err); } break; case MATH_EXPRESSION_TYPE_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_VARIABLE: new_exp = math_expression_new(exp->type, exp->equation, err); if (new_exp) new_exp->u.index = exp->u.index; break; case MATH_EXPRESSION_TYPE_PRM: new_exp = math_expression_new(exp->type, exp->equation, err); if (new_exp) { new_exp->u.prm.type = exp->u.prm.type; new_exp->u.prm.index = exp->u.prm.index; new_exp->u.prm.prm = exp->u.prm.prm; new_exp->u.prm.id = exp->u.prm.id; } break; case MATH_EXPRESSION_TYPE_EOEQ: new_exp = math_eoeq_expression_new(exp->equation, err); break; case MATH_EXPRESSION_TYPE_ARRAY: case MATH_EXPRESSION_TYPE_STRING_ARRAY: new_exp = optimize_array_expression(exp, err); break; case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: new_exp = math_expression_new(exp->type, exp->equation, err); if (new_exp) { new_exp->u.array.index = exp->u.array.index; } break; case MATH_EXPRESSION_TYPE_STRING: new_exp = optimize_string_expression(exp, err); break; case MATH_EXPRESSION_TYPE_CONST_DEF: new_exp = NULL; /* never reached */ } return new_exp; } MathExpression * math_expression_optimize(MathExpression *exp, int *err) { MathExpression *prev, *rexp, *top; *err = MATH_ERROR_NONE; top = prev = NULL; while (exp) { rexp = optimize(exp, err); if (rexp == NULL || *err != MATH_ERROR_NONE) { math_expression_free(top); return NULL; } if (prev) { prev->next = rexp; } if (top == NULL) { top = rexp; } prev = rexp; exp = exp->next; } return top; } static int set_val_to_array(MathExpression *exp, MathValue *val, enum MATH_OPERATOR_TYPE op) { MathValue v; int i; if (CALC_EXPRESSION(exp->u.array.operand, v)) { return 1; } i = v.val; if (op == MATH_OPERATOR_TYPE_ASSIGN) { if (math_equation_set_array_val(exp->equation, exp->u.array.index, i, val)) { return 1; } } else { if (math_equation_get_array_val(exp->equation, exp->u.array.index, i, &v)) { return 1; } switch (op) { case MATH_OPERATOR_TYPE_POW_ASSIGN: v.val = pow(v.val, val->val); break; case MATH_OPERATOR_TYPE_MOD_ASSIGN: v.val = fmod(v.val, val->val); break; case MATH_OPERATOR_TYPE_DIV_ASSIGN: v.val /= val->val; break; case MATH_OPERATOR_TYPE_MUL_ASSIGN: v.val *= val->val; break; case MATH_OPERATOR_TYPE_PLUS_ASSIGN: v.val += val->val; break; case MATH_OPERATOR_TYPE_MINUS_ASSIGN: v.val -= val->val; break; default: /* never reached */ v.val = 0; } if (math_equation_set_array_val(exp->equation, exp->u.array.index, i, &v)) { return 1; } *val = v; } return 0; } #define MATH_CHECK_VAL(rval, v) if (v.type != MATH_VALUE_NORMAL) { \ *rval = v; \ break; \ } static char * val2str(MathValue *val) { char *str; const char *tmp; if (val == NULL) { return NULL; } tmp = math_special_value_to_string(val); if (tmp == NULL) { str = n_strdup_printf_double("%G", val->val); } else { str = g_strdup(tmp); } return str; } static int assign_string(MathExpression *exp) { const char *str; char *tmp; MathValue operand; MathExpression *left, *right; tmp = NULL; right = exp->u.assign.right; if (math_expression_kind_of_string(right)) { str = get_cstring_from_expression(right); } else { if (CALC_EXPRESSION(right, operand)) { return 1; } str = tmp = val2str(&operand); } left = exp->u.assign.left; if (left->type == MATH_EXPRESSION_TYPE_STRING_VARIABLE) { if (math_equation_set_var_string(exp->equation, left->u.index, str)) { return 1; } } else { MathValue v; int i; if (exp->u.assign.op != MATH_OPERATOR_TYPE_ASSIGN) { return 1; } if (CALC_EXPRESSION(left->u.array.operand, v)) { return 1; } i = v.val; if (math_equation_set_array_str(exp->equation, left->u.array.index, i, str)) { return 1; } } if (tmp) { g_free(tmp); } return 0; } static int math_expression_kind_of_string(MathExpression *exp) { switch (exp->type) { case MATH_EXPRESSION_TYPE_STRING_VARIABLE: case MATH_EXPRESSION_TYPE_STRING_ARRAY: case MATH_EXPRESSION_TYPE_STRING: return TRUE; default: return FALSE; } return FALSE; } static const char * get_cstring_from_expression(MathExpression *exp) { const char *cstr; GString *gstr; MathValue val; if (exp == NULL) { return NULL; } cstr = NULL; switch (exp->type) { case MATH_EXPRESSION_TYPE_STRING_VARIABLE: math_equation_get_string_var(exp->equation, exp->u.index, &gstr); if (gstr && gstr->str) { cstr = gstr->str; } break; case MATH_EXPRESSION_TYPE_STRING_ARRAY: if (CALC_EXPRESSION(exp->u.array.operand, val) == 0) { if (val.type == MATH_VALUE_NORMAL) { cstr = math_equation_get_array_cstr(exp->equation, exp->u.array.index, val.val); } } break; case MATH_EXPRESSION_TYPE_STRING: cstr = math_expression_get_string(exp); break; default: break; } return cstr; } const char * math_expression_get_cstring(MathExpression *exp) { return get_cstring_from_expression(exp); } static int compare_string(MathExpression *left, MathExpression *right, int equal, MathValue *val) { const char *lstr, *rstr; int result; lstr = get_cstring_from_expression(left); rstr = get_cstring_from_expression(right); if (left == NULL || right == NULL) { return 1; } result = g_strcmp0(lstr, rstr) ? 1 : 0; val->val = (equal) ? ! result : result; return 0; } static int calc(MathExpression *exp, MathValue *val) { MathValue left, right, operand; val->type = MATH_VALUE_NORMAL; switch (exp->type) { case MATH_EXPRESSION_TYPE_BLOCK: if (math_expression_calculate(exp->u.exp, &operand)) { return 1; } *val = operand; break; case MATH_EXPRESSION_TYPE_OR: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (left.type == MATH_VALUE_NORMAL && left.val) { *val = left; break; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } *val = right; break; case MATH_EXPRESSION_TYPE_AND: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (left.type != MATH_VALUE_NORMAL || ! left.val) { *val = left; break; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } *val = right; break; case MATH_EXPRESSION_TYPE_EQ: if (math_expression_kind_of_string(exp->u.bin.left) && math_expression_kind_of_string(exp->u.bin.right)) { if (compare_string(exp->u.bin.left, exp->u.bin.right, TRUE, val)) { return 1; } break; } if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = (left.val == right.val); break; case MATH_EXPRESSION_TYPE_NE: if (math_expression_kind_of_string(exp->u.bin.left) && math_expression_kind_of_string(exp->u.bin.right)) { if (compare_string(exp->u.bin.left, exp->u.bin.right, FALSE, val)) { return 1; } break; } if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = (left.val != right.val); break; case MATH_EXPRESSION_TYPE_ADD: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = left.val + right.val; break; case MATH_EXPRESSION_TYPE_SUB: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = left.val - right.val; break; case MATH_EXPRESSION_TYPE_MUL: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = left.val * right.val; break; case MATH_EXPRESSION_TYPE_DIV: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); if (right.val == 0.0) { if (left.val < 0) { val->val = - HUGE_VAL; } else if (left.val > 0) { val->val = HUGE_VAL; } else { val->val = 0; } val->type = MATH_VALUE_NAN; } else { val->val = left.val / right.val; } break; case MATH_EXPRESSION_TYPE_MOD: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); if (right.val == 0.0) { return 1; } val->val = fmod(left.val, right.val); break; case MATH_EXPRESSION_TYPE_POW: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = pow(left.val, right.val); break; case MATH_EXPRESSION_TYPE_GT: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = (left.val > right.val); break; case MATH_EXPRESSION_TYPE_GE: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = (left.val >= right.val); break; case MATH_EXPRESSION_TYPE_LT: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = (left.val < right.val); break; case MATH_EXPRESSION_TYPE_LE: if (CALC_EXPRESSION(exp->u.bin.left, left)) { return 1; } if (CALC_EXPRESSION(exp->u.bin.right, right)) { return 1; } MATH_CHECK_VAL(val, left); MATH_CHECK_VAL(val, right); val->val = (left.val <= right.val); break; case MATH_EXPRESSION_TYPE_MINUS: if (CALC_EXPRESSION(exp->u.unary.operand, operand)) { return 1; } MATH_CHECK_VAL(val, operand); val->val = - operand.val; break; case MATH_EXPRESSION_TYPE_NOT: if (CALC_EXPRESSION(exp->u.unary.operand, operand)) { return 1; } MATH_CHECK_VAL(val, operand); val->val = ! operand.val; break; case MATH_EXPRESSION_TYPE_FACT: if (CALC_EXPRESSION(exp->u.unary.operand, operand)) { return 1; } MATH_CHECK_VAL(val, operand); if (operand.val < 0 || operand.val >= FACT_MAX) { return 1; } val->val = factorial(operand.val); break; case MATH_EXPRESSION_TYPE_FUNC_CALL: if (call_func(&exp->u.func_call, exp->equation, val)) return 1; break; case MATH_EXPRESSION_TYPE_DOUBLE: *val = exp->u.value; break; case MATH_EXPRESSION_TYPE_CONST: if (math_equation_get_const(exp->equation, exp->u.index, val)) return 1; break; case MATH_EXPRESSION_TYPE_VARIABLE: if (math_equation_get_var(exp->equation, exp->u.index, val)) return 1; break; case MATH_EXPRESSION_TYPE_ASSIGN: if (CALC_EXPRESSION(exp->u.assign.right, right)) { return 1; } if (exp->u.assign.left->type == MATH_EXPRESSION_TYPE_VARIABLE) { if (math_equation_set_var(exp->equation, exp->u.assign.left->u.index, &right)) { return 1; } } else { if (set_val_to_array(exp->u.assign.left, &right, exp->u.assign.op)) { return 1; } } *val = right; break; case MATH_EXPRESSION_TYPE_ARRAY: if (CALC_EXPRESSION(exp->u.array.operand, operand)) { return 1; } if (operand.type != MATH_VALUE_NORMAL) { return 1; } if (math_equation_get_array_val(exp->equation, exp->u.array.index, operand.val, val)) { return 1; } break; case MATH_EXPRESSION_TYPE_STRING_ARRAY: if (CALC_EXPRESSION(exp->u.array.operand, operand)) { return 1; } if (operand.type != MATH_VALUE_NORMAL) { return 1; } val->val = 0; { const char *str; str = math_equation_get_array_cstr(exp->equation, exp->u.array.index, operand.val); if (str == NULL) { return 1; } n_strtod(str, val); } break; case MATH_EXPRESSION_TYPE_PRM: if (exp->u.prm.prm->data == NULL) { return 1; } *val = exp->u.prm.prm->data[exp->u.prm.index]; break; case MATH_EXPRESSION_TYPE_EOEQ: val->val = 0; break; case MATH_EXPRESSION_TYPE_ARRAY_ARGUMENT: case MATH_EXPRESSION_TYPE_STRING_ARRAY_ARGUMENT: return 1; case MATH_EXPRESSION_TYPE_STRING_VARIABLE: val->val = 0; { GString *gstr; math_equation_get_string_var(exp->equation, exp->u.index, &gstr); if (gstr && gstr->str) { n_strtod(gstr->str, val); } } break; case MATH_EXPRESSION_TYPE_STRING: val->val = 0; { const char *str; str = math_expression_get_string(exp); if (str) { n_strtod(str, val); } } break; case MATH_EXPRESSION_TYPE_STRING_ASSIGN: if (assign_string(exp)) { return 1; } val->val = 0; /* a string is always evaluated as zero */ break; case MATH_EXPRESSION_TYPE_FUNC: case MATH_EXPRESSION_TYPE_CONST_DEF: /* never reached */ val->val = 0; break; } return 0; } enum DATA_TYPE math_expression_get_variable_type_from_argument(MathFunctionCallExpression *exp, int i) { return exp->buf[i].variable.type; } const char * math_expression_get_string_from_argument(MathFunctionCallExpression *exp, int i) { return exp->buf[i].cstr; } GString * math_expression_get_string_variable_from_argument(MathFunctionCallExpression *exp, int i) { if (exp->buf[i].variable.type != DATA_TYPE_STRING) { return NULL; } return exp->buf[i].variable.data.str; } int math_function_call_expression_get_variable(MathFunctionCallExpression *exp, int i, MathVariable *var) { var->type = exp->buf[i].variable.type; switch (var->type) { case DATA_TYPE_VALUE: var->type = DATA_TYPE_VALUE; var->data.vptr = exp->buf[i].variable.data.vptr; break; case DATA_TYPE_STRING: var->type = DATA_TYPE_STRING; var->data.str = exp->buf[i].variable.data.str; break; } return 0; } int math_variable_set_common_value(MathVariable *variable, MathCommonValue *val) { if (variable->type != val->type) { return 1; } switch (variable->type) { case DATA_TYPE_VALUE: *(variable->data.vptr) = val->data.val; break; case DATA_TYPE_STRING: g_string_assign(variable->data.str, val->data.cstr); break; } return 0; } MathValue * math_expression_get_variable_from_argument(MathFunctionCallExpression *exp, int i) { if (exp->buf[i].variable.type != DATA_TYPE_VALUE) { return NULL; } return exp->buf[i].variable.data.vptr; } int math_expression_calculate(MathExpression *exp, MathValue *val) { MathExpression *ptr; MathValue v; if (exp == NULL) { return 1; } ptr = exp; while (ptr) { v.val = 0; v.type = MATH_VALUE_NORMAL; if (calc(ptr, &v)) { *val = v; if (val->type != MATH_VALUE_INTERRUPT) { val->type = MATH_VALUE_ERROR; } return 1; } ptr = ptr->next; } *val = v; return 0; } ngraph-gtk-6.09.05/src/spline.c0000644000175000017500000001564213624701076013121 00000000000000/* * $Id: spline.c,v 1.4 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include "mathfn.h" #include "spline.h" static int splinecheck(double d[],double mu[],double ram[],double x[],double y[], int num) { double h1; int i; h1=x[1]-x[0]; if (h1==0) return -1; for (i=1;i=0;i--) { double h; h=2-ram[i]*ram[i+1]; if (h==0) return -1; *xx=-ram[i]*(*xx)/h; d[i]=(d[i]-ram[i]*d[i+1])/h; ram[i]=mu[i]/h; } *xx-=ram[0]; return 0; } int splineperiod(double d[],double mu[],double ram[],double x[],double y[], int num,double *df0) { double h,xx,a,b,c,e; splinesetval(d,mu,ram,x,y,num); h=x[1]-x[0]; d[0]=6/h/h*(y[1]-y[0]); ram[0]=1; mu[0]=6/h; h=x[num-1]-x[num-2]; d[num-1]=-6/h/h*(y[num-1]-y[num-2]); mu[num-1]=1; ram[num-1]=-6/h; if (splinesolv(d,mu,ram,x,y,num,&xx)!=0) return -1; a=d[num-1]; b=xx; splinesetval(d,mu,ram,x,y,num); h=x[1]-x[0]; d[0]=6/h/h*(y[1]-y[0]); ram[0]=1; mu[0]=6/h; h=x[num-1]-x[num-2]; d[num-1]=-6/h/h*(y[num-1]-y[num-2]); mu[num-1]=1; ram[num-1]=-6/h; if (splinesolv2(d,mu,ram,x,y,num,&xx)) return -1; c=d[0]; e=xx; h=e-b; if (h==0) return -1; *df0=(a*e-b*c)/h; return 0; } static int splineboundary(double d[],double mu[],double ram[],double x[],double y[], int num,int bc0,int bc1,double df0,double df1) { vector b,coe; matrix m; double h; int i,j; if (bc0==SPLCNDAUTO) { for (i=0;i<4;i++) { m[i][3]=1; b[i]=y[i]; for (j=2;j>=0;j--) m[i][j]=m[i][j+1]*x[i]; } if (matsolv(4,m,b,coe)!=0) return -1; df0=3*coe[0]*m[0][1]+2*coe[1]*m[0][2]+coe[2]; } if (bc1==SPLCNDAUTO) { for (i=0;i<4;i++) { m[i][3]=1; b[i]=y[num+i-4]; for (j=2;j>=0;j--) m[i][j]=m[i][j+1]*x[num+i-4]; } if (matsolv(4,m,b,coe)!=0) return -1; df1=3*coe[0]*m[3][1]+2*coe[1]*m[3][2]+coe[2]; } if (bc0==SPLCNDPERIODIC) { if (splineperiod(d,mu,ram,x,y,num,&df0)!=0) return -1; bc0=SPLCND2NDDIF; bc1=SPLCND2NDDIF; df1=df0; } if (bc0==SPLCND2NDDIF) { d[0]=2*df0; ram[0]=0; } else if ((bc0==SPLCNDAUTO) || (bc0==SPLCND1STDIF)) { h=x[1]-x[0]; d[0]=6/h*((y[1]-y[0])/h-df0); ram[0]=1; } else return -1; if (bc1==2) { d[num-1]=2*df1; mu[num-1]=0; } else if ((bc1==0) || (bc1==1)) { h=x[num-1]-x[num-2]; d[num-1]=6/h*(df1-(y[num-1]-y[num-2])/h); mu[num-1]=1; } else return -1; return 0; } int spline(double x[],double y[],double c1[],double c2[],double c3[], int num,int bc0,int bc1,double df0,double df1) { int i; double xx; if (splinecheck(c1,c2,c3,x,y,num)!=0) return -1; if (splineboundary(c1,c2,c3,x,y,num,bc0,bc1,df0,df1)!=0) return -1; splinesetval(c1,c2,c3,x,y,num); if (splinesolv(c1,c2,c3,x,y,num,&xx)!=0) return -1; c3[num-1]=c1[num-1]; for (i=num-2;i>=0;i--) c3[i]=c1[i]-c2[i]*c3[i+1]; for (i=0;i #include #include #include "object.h" #include "oiarray.h" #define NAME "sarray" #define PARENT "object" #define OVERSION "1.00.00" #define ERRREGEXP 100 #define ERROUTBOUND 101 static char *sarrayerrorlist[]={ "invalid regular expression.", "array index is out of array bounds.", }; #define DEFAULT_DELIMITER "\\s+" struct osarray_local { GRegex *regexp; }; #define ERRNUM (sizeof(sarrayerrorlist) / sizeof(*sarrayerrorlist)) static int sarrayinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct osarray_local *local; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; local = g_malloc0(sizeof(*local)); if (local == NULL) { return 1; } if (_putobj(obj, "_local", inst, local)) { g_free(local); return 1; } local->regexp = g_regex_new(DEFAULT_DELIMITER, 0, 0, NULL); return 0; } static int sarraydone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct osarray_local *local; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj, "_local", inst, &local); if (local->regexp) { g_regex_unref(local->regexp); } return 0; } static int sarrayget(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; char **po; char *buf; g_free(rval->str); rval->str=NULL; num=*(int *)argv[2]; _getobj(obj,"@",inst,&array); num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } po=(char **)arraynget(array,num); if (po==NULL) { error(obj, ERROUTBOUND); return 1; } if ((buf=g_malloc(strlen(*po)+1))==NULL) return 1; strcpy(buf,*po); rval->str=buf; return 0; } static int sarrayput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; char *val; num=*(int *)argv[2]; val=(char *)argv[3]; _getobj(obj,"@",inst,&array); num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayput2(array,val,num)==NULL) return 1; return 0; } static int sarrayadd(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char *val; val=(char *)argv[2]; array = oarray_get_array(obj, inst, sizeof(char *)); if (array == NULL) { return 1; } if (arrayadd2(array,val)==NULL) return 1; return 0; } static int sarraypop(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char *val; int n; g_free(rval->str); rval->str = NULL; _getobj(obj, "@", inst, &array); if (array == NULL) { return 1; } n = arraynum(array) - 1; if (n < 0) { return 1; } val = arraynget_str(array, n); if (arrayndel(array, n) == NULL) { g_free(val); return 1; } if (arraynum(array) == 0) { arrayfree(array); if (_putobj(obj, "@", inst, NULL)) { g_free(val); return 1; } } rval->str = val; return 0; } static int sarrayins(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; char *val; num=*(int *)argv[2]; val=(char *)argv[3]; array = oarray_get_array(obj, inst, sizeof(char *)); if (array == NULL) { return 1; } num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayins2(array,val,num)==NULL) return 1; return 0; } static int sarrayunshift(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char *val; val = (char *) argv[2]; array = oarray_get_array(obj, inst, sizeof(char *)); if (array == NULL) { return 1; } if (arrayins2(array, val, 0)==NULL) { return 1; } return 0; } static int sarrayshift(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char *val; g_free(rval->str); rval->str = NULL; _getobj(obj, "@", inst, &array); if (array == NULL) { return 1; } val = arraynget_str(array, 0); if (arrayndel(array, 0) == NULL) { g_free(val); return 1; } if (arraynum(array) == 0) { arrayfree(array); if (_putobj(obj, "@", inst, NULL)) { g_free(val); return 1; } } rval->str = val; return 0; } static int sarraydel(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; num=*(int *)argv[2]; _getobj(obj,"@",inst,&array); if (array==NULL) return 1; num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayndel2(array,num)==NULL) { error(obj, ERROUTBOUND); return 1; } if (arraynum(array)==0) { arrayfree2(array); if (_putobj(obj,"@",inst,NULL)) return 1; } return 0; } static int set_delimiter(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct osarray_local *local; GRegex *regexp; char *str; str = (char *) argv[2]; if (str == NULL || str[0] == '\0') { str = DEFAULT_DELIMITER; } regexp = g_regex_new(str, 0, 0, NULL); if (regexp == NULL) { error(obj, ERRREGEXP); return 1; } _getobj(obj, "_local", inst, &local); if (local->regexp) { g_regex_unref(local->regexp); } local->regexp = regexp; return 0; } static int sarraysplit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct osarray_local *local; struct narray *array, *array2; int i; char *str, *delimiter, **sary; str = (char *) argv[2]; if (str == NULL) { return 0; } _getobj(obj, "_local", inst, &local); _getobj(obj, "delimiter", inst, &delimiter); if (delimiter == NULL) { delimiter = " "; } sary = g_regex_split(local->regexp, str, 0); if (sary == NULL) { return 1; } array = arraynew(sizeof(char *)); if (array == NULL) { g_strfreev(sary); return 1; } for (i = 0; sary[i]; i++) { if (arrayadd(array, sary + i) == NULL) { arrayfree(array); g_strfreev(sary); return 1; } } g_free(sary); /* don't free each element i.e. don't use g_strfreev() */ _getobj(obj, "@", inst, &array2); if (array2) { arrayfree2(array2); } if (_putobj(obj, "@", inst, array) == -1) { arrayfree2(array); return 1; } return 0; } static int sarrayjoin(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; GString *str; int i, n; char *sep, *ptr; g_free(rval->str); rval->str = NULL; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } ptr = (char *) argv[2]; if (ptr) { sep = g_strcompress(ptr); } else { sep = g_strdup(","); } if (sep == NULL) { return 1; } str = g_string_sized_new(64); if (str == NULL) { g_free(sep); return 1; } for (i = 0; i < n; i++) { char *val; val = arraynget_str(array, i); g_string_append_printf(str, "%s%s", val, (i == n - 1) ? "" : sep); } rval->str = g_string_free(str, FALSE); g_free(sep); return 0; } static int sarraysort(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arraysort_str(array); return 0; } static int sarrayrsort(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arrayrsort_str(array); return 0; } static int sarrayuniq(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arrayuniq_str(array); return 0; } static int sarray_slice(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int start, len; start = * (int *) argv[2]; len = * (int *) argv[3]; if (_getobj(obj, "@", inst, &array)) { return 1; } if (array_slice2(array, start, len) == NULL) { return 1; } return 0; } static struct objtable osarray[] = { {"init",NVFUNC,NEXEC,sarrayinit,NULL,0}, {"done",NVFUNC,NEXEC,sarraydone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"@",NSARRAY,NREAD|NWRITE,NULL,NULL,0}, {"delimiter",NSTR,NREAD|NWRITE,set_delimiter,NULL,0}, {"get",NSFUNC,NREAD|NEXEC,sarrayget,"i",0}, {"put",NVFUNC,NREAD|NEXEC,sarrayput,"is",0}, {"add",NVFUNC,NREAD|NEXEC,sarrayadd,"s",0}, {"push",NVFUNC,NREAD|NEXEC,sarrayadd,"s",0}, {"pop",NSFUNC,NREAD|NEXEC,sarraypop,"",0}, {"ins",NVFUNC,NREAD|NEXEC,sarrayins,"is",0}, {"unshift",NVFUNC,NREAD|NEXEC,sarrayunshift,"s",0}, {"shift",NSFUNC,NREAD|NEXEC,sarrayshift,"",0}, {"del",NVFUNC,NREAD|NEXEC,sarraydel,"i",0}, {"split",NVFUNC,NREAD|NEXEC,sarraysplit,"s",0}, {"join",NSFUNC,NREAD|NEXEC,sarrayjoin,"s",0}, {"sort",NVFUNC,NREAD|NEXEC,sarraysort,"s",0}, {"rsort",NVFUNC,NREAD|NEXEC,sarrayrsort,"s",0}, {"uniq", NSFUNC, NREAD|NEXEC, sarrayuniq, "", 0}, {"num", NIFUNC, NREAD|NEXEC, oarray_num, "", 0}, {"seq", NSFUNC, NREAD|NEXEC, oarray_seq, "", 0}, {"rseq", NSFUNC, NREAD|NEXEC, oarray_reverse_seq, "", 0}, {"reverse", NVFUNC, NREAD|NEXEC, oarray_reverse, "", 0}, {"slice", NVFUNC, NREAD|NEXEC, sarray_slice, "ii", 0}, {"_local",NPOINTER,0,NULL,NULL,0}, }; #define TBLNUM (sizeof(osarray) / sizeof(*osarray)) void * addsarray(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,osarray,ERRNUM,sarrayerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/nconfig.h0000644000175000017500000000237313070106167013247 00000000000000/* * $Id: nconfig.h,v 1.2 2009-03-09 05:20:30 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef NCONFIG_HEADER #define NCONFIG_HEADER char *getscriptname(char *file); char *searchscript(char *file); FILE *openconfig(char *section); char *getconfig(FILE *fp,char **val); void closeconfig(FILE *fp); int replaceconfig(char *section,struct narray *conf); int removeconfig(char *section,struct narray *conf); int writecheckconfig(); int copyconfig(); #endif ngraph-gtk-6.09.05/src/odata.h0000644000175000017500000000416014106646067012721 00000000000000#ifndef OFILE_HEADER #define OFILE_HEADER #define FILE_OBJ_MAXCOL 999 #define FILE_OBJ_SMOOTH_MAX 50 enum DATA_OBJ_SOURCE { DATA_SOURCE_FILE, DATA_SOURCE_ARRAY, DATA_SOURCE_RANGE, }; enum MOVING_AVERAGE_TYPE { MOVING_AVERAGE_SIMPLE, MOVING_AVERAGE_WEIGHTED, MOVING_AVERAGE_EXPONENTIAL, }; enum FILE_OBJ_PLOT_TYPE { PLOT_TYPE_MARK, PLOT_TYPE_LINE, PLOT_TYPE_POLYGON, PLOT_TYPE_POLYGON_SOLID_FILL, PLOT_TYPE_CURVE, PLOT_TYPE_DIAGONAL, PLOT_TYPE_ARROW, PLOT_TYPE_RECTANGLE, PLOT_TYPE_RECTANGLE_FILL, PLOT_TYPE_RECTANGLE_SOLID_FILL, PLOT_TYPE_ERRORBAR_X, PLOT_TYPE_ERRORBAR_Y, PLOT_TYPE_STAIRCASE_X, PLOT_TYPE_STAIRCASE_Y, PLOT_TYPE_BAR_X, PLOT_TYPE_BAR_Y, PLOT_TYPE_BAR_FILL_X, PLOT_TYPE_BAR_FILL_Y, PLOT_TYPE_BAR_SOLID_FILL_X, PLOT_TYPE_BAR_SOLID_FILL_Y, PLOT_TYPE_FIT, }; enum axis_instance_field_type{ AXIS_X, AXIS_Y, AXIS_REFERENCE, }; #include "math/math_equation.h" struct array_prm { struct objlist *obj; int data_num, col_num; int id[FILE_OBJ_MAXCOL]; struct narray *ary[FILE_OBJ_MAXCOL]; }; #define CHECK_TERMINATE(ch) ((ch) == '\0' || (ch) == '\n') #define CHECK_CHR(ifs, ch) (ch && strchr(ifs, ch)) MathEquation *ofile_create_math_equation(int *id, enum EOEQ_ASSIGN_TYPE type, int prm_digit, int use_fprm, int use_const, int usr_func, int use_fobj_func, int use_fit_func); int get_axis_id(struct objlist *obj, N_VALUE *inst, struct objlist **aobj, int axis); int ofile_calc_fit_equation(struct objlist *obj, int id, double x, double *y); int open_array(char *objstr, struct array_prm *ary); char *odata_get_functions(void); char *odata_get_constants(void); const char *parse_data_line(struct narray *array, const char *str, const char *ifs, int csv); int n_strtod(const char *str, MathValue *val); int load_file(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int load_dummy(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); char *store_dummy(struct objlist *obj, N_VALUE *inst, int argc, char **argv); int store(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv, int *endstore, FILE **storefd); #endif ngraph-gtk-6.09.05/src/otext.c0000644000175000017500000003166214142161773012772 00000000000000/* * $Id: otext.c,v 1.19 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "object.h" #include "gra.h" #include "oroot.h" #include "odraw.h" #include "olegend.h" #include "mathfn.h" #include "nstring.h" #include "nconfig.h" #include "strconv.h" #define NAME N_("text") #define PARENT "legend" #define OVERSION "1.00.00" #define TEXTCONF "[text]" #define ERR_INVALID_STR 100 static char *texterrorlist[]={ "invalid string.", }; #define ERRNUM (sizeof(texterrorlist) / sizeof(*texterrorlist)) static struct obj_config TextConfig[] = { {"space", OBJ_CONFIG_TYPE_NUMERIC}, {"direction", OBJ_CONFIG_TYPE_NUMERIC}, {"script_size", OBJ_CONFIG_TYPE_NUMERIC}, {"raw", OBJ_CONFIG_TYPE_NUMERIC}, }; static NHASH TextConfigHash = NULL; static int textloadconfig(struct objlist *obj,N_VALUE *inst) { return obj_load_config(obj, inst, TEXTCONF, TextConfigHash); } static int textsaveconfig(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { return obj_save_config(obj, inst, TEXTCONF, TextConfig, sizeof(TextConfig) / sizeof(*TextConfig)); } static int textinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int pt,scriptsize; char *font; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; pt=DEFAULT_FONT_PT; scriptsize=DEFAULT_SCRIPT_SIZE; if (_putobj(obj,"pt",inst,&pt)) return 1; if (_putobj(obj,"script_size",inst,&scriptsize)) return 1; font = g_strdup(fontchar[0]); if (font == NULL) { return 1; } if (_putobj(obj,"font",inst,font)) { g_free(font); return 1; } textloadconfig(obj,inst); return 0; } static int textdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int textgeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *field; field=(char *)(argv[1]); if (strcmp(field,"pt") == 0) { if (*(int *)(argv[2])SCRIPT_SIZE_MAX) { *(int *)(argv[2])=SCRIPT_SIZE_MAX; } } else if (strcmp(field,"style") == 0) { * (int *) (argv[2]) &= (GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC); } if (clear_bbox(obj, inst)) return 1; return 0; } static int textdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; int x,y,pt,space,dir,fr,fg,fb,fa,w,h,scriptsize,raw; char *font; char *text; int clip,zoom,style; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; _getobj(obj,"R",inst,&fr); _getobj(obj,"G",inst,&fg); _getobj(obj,"B",inst,&fb); _getobj(obj,"A",inst,&fa); _getobj(obj,"text",inst,&text); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"pt",inst,&pt); _getobj(obj,"space",inst,&space); _getobj(obj,"direction",inst,&dir); _getobj(obj,"script_size",inst,&scriptsize); _getobj(obj,"raw",inst,&raw); _getobj(obj,"font",inst,&font); _getobj(obj,"clip",inst,&clip); _getobj(obj,"style",inst,&style); GRAregion(GC,&w,&h,&zoom); GRAview(GC,0,0,w*10000.0/zoom,h*10000.0/zoom,clip); GRAcolor(GC,fr,fg,fb, fa); GRAmoveto(GC,x,y); if (raw) { GRAdrawtextraw(GC,text,font,style,pt,space,dir); } else { GRAdrawtext(GC,text,font,style,pt,space,dir,scriptsize); } return 0; } static int textprintf(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char **argv2; int argc2; char *format; int po, arg, i, r; GString *ret; char *arg_str; g_free(rval->str); rval->str=NULL; array=(struct narray *)argv[2]; argv2=arraydata(array); argc2=arraynum(array); if (argc2<1) return 0; format=argv2[0]; ret = g_string_sized_new(64); if (ret == NULL) { return 1; } po=0; arg=1; while (format[po]!='\0') { int quote; quote=FALSE; for (i=po;(quote || (format[i]!='%')) && (format[i]!='\0');i++) { if (quote) { quote=FALSE; } else if (format[i]=='\\') { quote=TRUE; } } if (i > po) { g_string_append_len(ret, format + po, i - po); } po = i; if (format[po] != '%') { continue; } if (format[po + 1] == '%') { g_string_append_c(ret, '%'); po += 2; continue; } arg_str = (arg < argc2 && argv2[arg]) ? argv2[arg] : NULL; r = add_printf_formated_str(ret, format + po, arg_str, &i); if (r) { arg++; } po += i + 1; } rval->str = g_string_free(ret, FALSE); return 0; } static int textbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int x,y,pt,space,dir,scriptsize,raw,style; char *font; char *text; int bbox[4]; array=rval->array; if (arraynum(array)!=0) return 0; _getobj(obj,"text",inst,&text); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"pt",inst,&pt); _getobj(obj,"space",inst,&space); _getobj(obj,"direction",inst,&dir); _getobj(obj,"script_size",inst,&scriptsize); _getobj(obj,"raw",inst,&raw); _getobj(obj,"font",inst,&font); _getobj(obj,"style",inst,&style); text_get_bbox(x, y, text, font, style, pt, dir, space, scriptsize, raw, bbox); if ((array==NULL) && ((array=arraynew(sizeof(int)))==NULL)) return 1; arrayins(array, bbox + 3, 0); arrayins(array, bbox + 2, 0); arrayins(array, bbox + 1, 0); arrayins(array, bbox, 0); if (arraynum(array)==0) { arrayfree(array); rval->array = NULL; return 1; } rval->array=array; return 0; } static int textmove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); x+=*(int *)argv[2]; y+=*(int *)argv[3]; if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int textrotate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int dir, angle, use_pivot; _getobj(obj, "direction", inst, &dir); angle = *(int *) argv[2]; use_pivot = * (int *) argv[3]; dir += angle; dir %= 36000; if (dir < 0) dir += 36000; if (use_pivot) { int px, py, x, y; px = *(int *) argv[4]; py = *(int *) argv[5]; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); rotate(px, py, angle, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); } _putobj(obj, "direction", inst, &dir); if (clear_bbox(obj, inst)) return 1; return 0; } static int textzoom(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y,pt,space,refx,refy,dir; double zoom, zoom_x, zoom_y, zoom_p, zoom_n; zoom_x = (*(int *) argv[2]) / 10000.0; zoom_y = (*(int *) argv[3]) / 10000.0; refx = (*(int *)argv[4]); refy = (*(int *)argv[5]); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"pt",inst,&pt); _getobj(obj,"space",inst,&space); _getobj(obj,"direction",inst,&dir); dir = calc_zoom_direction(dir, zoom_x, zoom_y, &zoom_p, &zoom_n); zoom = MIN(zoom_n, zoom_p); x=(x-refx)*zoom_x+refx; y=(y-refy)*zoom_y+refy; pt *= zoom; space *= zoom_p; if (pt < 1) pt = 1; if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (_putobj(obj,"pt",inst,&pt)) return 1; if (_putobj(obj,"space",inst,&space)) return 1; if (_putobj(obj,"direction",inst,&dir)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int textmatch(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy,err; struct narray *array; int gx0,gy0,gx1,gy1; int x,y,pt,space,dir,scriptsize,raw, style; char *font; char *text; rval->i=FALSE; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"text",inst,&text); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"pt",inst,&pt); _getobj(obj,"space",inst,&space); _getobj(obj,"direction",inst,&dir); _getobj(obj,"script_size",inst,&scriptsize); _getobj(obj,"raw",inst,&raw); _getobj(obj,"font",inst,&font); _getobj(obj,"style",inst,&style); minx=*(int *)(argv[2]); miny=*(int *)(argv[3]); maxx=*(int *)(argv[4]); maxy=*(int *)(argv[5]); err=*(int *)(argv[6]); if ((minx==maxx) && (miny==maxy)) { int px,py,px2,py2; double si,co; if (raw) { GRAtextextentraw(text,font,style,pt,space,&gx0,&gy0,&gx1,&gy1); } else { GRAtextextent(text,font,style,pt,space,scriptsize,&gx0,&gy0,&gx1,&gy1,FALSE); } si=sin(dir/18000.0*MPI); co=cos(dir/18000.0*MPI); px=minx-x; py=miny-y; px2=px*co-py*si; py2=px*si+py*co; if ((px2 >= gx0 - err) && (px2 <= gx1 + err) && (py2 >= gy0 - err) && (py2 <= gy1 + err)) { rval->i=TRUE; } } else { int bminx,bminy,bmaxx,bmaxy; if (_exeobj(obj,"bbox",inst,0,NULL)) return 1; _getobj(obj,"bbox",inst,&array); if (arraynum(array)<4) return 1; bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } return 0; } static int text_set_text(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *str, *ptr; gsize len; str = argv[2]; if (str == NULL) { return 0; } if (g_utf8_validate(str, -1, NULL)) { return textgeometry(obj, inst, rval, argc, argv); } ptr = sjis_to_utf8(str); if (ptr) { int r; r = textgeometry(obj, inst, rval, argc, argv); if (r) { g_free(ptr); } else { g_free(str); argv[2] = ptr; } return r; } ptr = g_locale_to_utf8(str, -1, NULL, &len, NULL); if (ptr) { int r; r = textgeometry(obj, inst, rval, argc, argv); if (r) { g_free(ptr); } else { g_free(str); argv[2] = ptr; } return r; } error(obj, ERR_INVALID_STR); return 1; } static struct objtable text_obj[] = { {"init",NVFUNC,NEXEC,textinit,NULL,0}, {"done",NVFUNC,NEXEC,textdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"text",NSTR,NREAD|NWRITE,text_set_text,NULL,0}, {"x",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"y",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"pt",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"font",NSTR,NREAD|NWRITE,textgeometry,NULL,0}, {"style",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"space",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"direction",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"script_size",NINT,NREAD|NWRITE,textgeometry,NULL,0}, {"raw",NBOOL,NREAD|NWRITE,textgeometry,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,textdraw,"i",0}, {"printf",NSFUNC,NREAD|NEXEC,textprintf,"sa",0}, {"bbox",NIAFUNC,NREAD|NEXEC,textbbox,"",0}, {"move",NVFUNC,NREAD|NEXEC,textmove,"ii",0}, {"rotate",NVFUNC,NREAD|NEXEC,textrotate,"iiii",0}, {"zooming",NVFUNC,NREAD|NEXEC,textzoom,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,textmatch,"iiiii",0}, {"save_config",NVFUNC,NREAD|NEXEC,textsaveconfig,"",0}, {"hsb", NVFUNC, NREAD|NEXEC, put_hsb,"ddd",0}, /* following fields exist for backward compatibility */ {"jfont",NSTR,NWRITE,textgeometry,NULL,0}, }; #define TBLNUM (sizeof(text_obj) / sizeof(*text_obj)) void * addtext() /* addtext() returns NULL on error */ { if (TextConfigHash == NULL) { unsigned int i; TextConfigHash = nhash_new(); if (TextConfigHash == NULL) return NULL; for (i = 0; i < sizeof(TextConfig) / sizeof(*TextConfig); i++) { if (nhash_set_ptr(TextConfigHash, TextConfig[i].name, (void *) &TextConfig[i])) { nhash_free(TextConfigHash); return NULL; } } } return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,text_obj,ERRNUM,texterrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/nstring.h0000644000175000017500000000435414001533577013315 00000000000000/* * $Id: nstring.h,v 1.4 2009-11-16 09:13:04 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef NSTRING_HEADER #define NSTRING_HEADER #include "math/math_equation.h" #include "ogra.h" #define STRLEN 256 #define CHK_STR(s) (((s) == NULL) ? "" : (s)) extern char *decimalsign_char[]; enum DECIMALSIGN_TYPE { DECIMALSIGN_TYPE_LOCALE, DECIMALSIGN_TYPE_PERIOD, DECIMALSIGN_TYPE_COMMA, }; char *nstrnew(void); char *nstrccat(char *po,char ch); char *nstrcat(char *po,char *s); char *nstraddchar(char *po, int len, char ch); int strcmp0(const char *s1,const char *s2); int strcmp2(char *s1,char *s2); #define WILD_PATHNAME 2 #define WILD_PERIOD 4 int wildmatch(const char *pat, const char *s,int flags); char *getitok(char **s, int *len, const char *ifs); char *getitok2(char **s, int *len, const char *ifs); int add_printf_formated_str(GString *str, const char *format, const char *arg, int *len); int add_printf_formated_double(GString *str, const char *format, MathValue *mval, int *len); char *n_locale_to_utf8(const char *s); enum GRA_DECIMALSIGN_TYPE get_gra_decimalsign_type(int decimalsign); int get_decimalsign(void); int set_decimalsign(enum DECIMALSIGN_TYPE decimalsign); void set_system_decimalsign(const char *decimalsign); void n_gstr_printf_double(GString *num, const char *format, double val); char *n_strdup_printf_double(const char *format, double val); void n_gstr_append_printf_double(GString *num, const char *format, double val); #endif ngraph-gtk-6.09.05/src/oaxis.h0000644000175000017500000000045314142161773012751 00000000000000#ifndef OAXIS_HEADER #define OAXIS_HEADER #define AXIS_GROUPE_NUM_MAX 4 struct AxisGroupInfo { int type, num; N_VALUE *inst[AXIS_GROUPE_NUM_MAX]; int id[AXIS_GROUPE_NUM_MAX]; }; int axis_get_group(struct objlist *obj, N_VALUE *inst, struct AxisGroupInfo *info); #endif /* OAXIS_HEADER */ ngraph-gtk-6.09.05/src/axis.c0000644000175000017500000001724613624701076012575 00000000000000/* * $Id: axis.c,v 1.7 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include "mathfn.h" #include "object.h" #include "axis.h" #ifdef HAVE_LIBGSL #include #endif double scale(double x) { return pow(10.0,cutdown(log10(fabs(x)))); } double roundmin(double min,double sc) { return nraise(min/sc)*sc; } static void getaxispositionfirst(struct axislocal *alocal) { double min,max,inc; int numlim1,numlim2,numlim3; if (alocal->tighten) { numlim1=6; numlim2=11; numlim3=21; } else { numlim1=2; numlim2=3; numlim3=6; } if ((alocal->atype==AXISNORMAL) || (alocal->atype==AXISLOGBIG)) { if (alocal->div<=0) { if (alocal->num<=numlim1) alocal->countsend=10; else if (alocal->num<=numlim2) alocal->countsend=5; else if (alocal->num<=numlim3) alocal->countsend=2; else alocal->countsend=1; } else alocal->countsend=alocal->div; alocal->dposl=alocal->inc*10; alocal->posl=roundmin(alocal->posst,alocal->dposl)-alocal->dposl; alocal->dposm=alocal->inc; alocal->posm=roundmin(alocal->posst,alocal->dposm)-alocal->dposm; alocal->countmend=10; alocal->countm= nround((roundmin(alocal->posst,alocal->dposm)-alocal->posl)/alocal->dposm); alocal->dposs=alocal->dposm/alocal->countsend; alocal->counts=1; } else if (alocal->atype==AXISINVERSE) { if (alocal->div<=0) { if (alocal->num<=numlim1) alocal->countsend=10; else if (alocal->num<=numlim2) alocal->countsend=5; else if (alocal->num<=numlim3) alocal->countsend=2; else alocal->countsend=1; } else alocal->countsend=alocal->div; if (((alocal->max>alocal->min) && (alocal->min>0)) || ((alocal->maxmin) && (alocal->min<0))) { max=alocal->min; min=alocal->max; inc=alocal->inc*(-1); } else { min=alocal->min; max=alocal->max; inc=alocal->inc; } alocal->dposm=inc; alocal->posm=roundmin(min,alocal->dposm)-alocal->dposm; alocal->countmend=(max-alocal->posm)/alocal->dposm; alocal->countm=1; alocal->dposl=alocal->dposm*alocal->countmend; alocal->posl=alocal->posm; alocal->dposs=alocal->dposm/alocal->countsend; alocal->counts=1; } else if (alocal->atype==AXISLOGNORM) { if (alocal->div==1) { alocal->countsend=1; if (alocal->inc>0) alocal->dposs=9; else alocal->dposs=-0.9; } else if (alocal->div==2) { alocal->countsend=2; if (alocal->inc>0) alocal->dposs=4; else alocal->dposs=-0.5; } else { alocal->countsend=9; if (alocal->inc>0) alocal->dposs=1; else alocal->dposs=-0.1; } alocal->dposl=alocal->inc*10; alocal->posl=roundmin(alocal->posst,alocal->dposl)-alocal->dposl; alocal->dposm=alocal->inc; alocal->posm=roundmin(alocal->posst,alocal->dposm)-alocal->dposm; alocal->countmend=10; alocal->countm= nround((roundmin(alocal->posst,alocal->dposm)-alocal->posl)/alocal->dposm); alocal->counts=1; } else if (alocal->atype==AXISLOGSMALL) { if (alocal->div<=0) { if (alocal->num<=numlim1) alocal->countsend=10; else if (alocal->num<=numlim2) alocal->countsend=5; else if (alocal->num<=numlim3) alocal->countsend=2; else alocal->countsend=1; } else alocal->countsend=alocal->div; alocal->dposl=alocal->inc; alocal->posl=roundmin(alocal->posst,alocal->dposl)-alocal->dposl; if (alocal->dposl>0) alocal->dposm=1; else alocal->dposm=-0.1; alocal->posm=alocal->posl; alocal->countmend=9; alocal->countm=1; alocal->dposs=1.0/alocal->countsend; alocal->counts=1; } alocal->count=0; } int getaxisposition(struct axislocal *alocal, /*@out@*/ double *po) { int rcode; if (alocal->counts>=alocal->countsend) { if (alocal->atype==AXISLOGSMALL) *po=alocal->posl+log10(1.0+alocal->countm*alocal->dposm); else *po=alocal->posm+alocal->dposm; alocal->posm=*po; alocal->counts=1; rcode=2; if (alocal->countm==alocal->countmend) { *po=alocal->posl+alocal->dposl; alocal->posl=*po; alocal->countm=1; rcode=3; if (alocal->atype==AXISINVERSE) { double dd; if (((alocal->dposm>=0) && (alocal->min>=0)) || ((alocal->dposm<0) && (alocal->min<0))) dd=10; else dd=0.1; alocal->dposl*=dd; alocal->dposm*=dd; alocal->dposs*=dd; alocal->countmend=-1; } } else alocal->countm++; } else { rcode=1; if (alocal->atype==AXISLOGNORM) *po=alocal->posm+log10(1.0+alocal->counts*alocal->dposs); else if (alocal->atype==AXISLOGSMALL) *po=log10(pow(10.0, alocal->posm) + alocal->counts * alocal->dposs * pow(10.0, alocal->posl) * alocal->dposm); else *po=alocal->posm+alocal->counts*alocal->dposs; alocal->counts++; } if (fabs(*po/alocal->dposs)<1E-14) *po=0; if ((*po-alocal->posst)*(*po-alocal->posed)>0 #ifdef HAVE_LIBGSL && gsl_fcmp(*po, alocal->posst, N_EPSILON) && gsl_fcmp(*po, alocal->posed, N_EPSILON) #endif ) { if (alocal->dposm>=0) { if (((alocal->posst<=alocal->posed) && (*poposst)) || ((alocal->posst>=alocal->posed) && (*poposed))) rcode=-1; else rcode=-2; } else { if (((alocal->posst<=alocal->posed) && (*po>alocal->posed)) || ((alocal->posst>=alocal->posed) && (*po>alocal->posst))) rcode=-1; else rcode=-2; } } if ((alocal->atype==AXISINVERSE) && (rcode>=0)) *po=1 / *po; alocal->count++; if (alocal->count>=10000) rcode=-2; return rcode; } int getaxispositionini(struct axislocal *alocal, int type, double min,double max,double inc,int div,int tighten) { double po; int rcode; int num; if (compare_double(min, max)) return -1; if (compare_double(inc, 0)) return -1; if (type==AXIS_TYPE_LOG) { if ((min<=0) || (max<=0)) return -1; if (compare_double(fabs(inc), 10)) { alocal->atype=AXISLOGNORM; } else if (compare_double(fabs(inc), 1)) { alocal->atype=AXISLOGSMALL; } else { alocal->atype=AXISLOGBIG; } alocal->min=log10(min); alocal->max=log10(max); alocal->inc=log10(fabs(inc)); if (alocal->atype==AXISLOGSMALL) alocal->inc=1; } else if (type==AXIS_TYPE_INVERSE) { if (min*max<=0) return -1; alocal->atype=AXISINVERSE; alocal->min=min; alocal->max=max; alocal->inc=inc; } else { alocal->atype=AXISNORMAL; alocal->min=min; alocal->max=max; alocal->inc=inc; } if (alocal->maxmin) alocal->inc=-fabs(alocal->inc); else alocal->inc=fabs(alocal->inc); alocal->div=div; alocal->posst=alocal->min; alocal->posed=alocal->max; alocal->num=100; alocal->tighten=tighten; getaxispositionfirst(alocal); num=0; while ((rcode=getaxisposition(alocal,&po))!=-2) { if (rcode>=2) num++; } alocal->num=num; if (alocal->count>1000) return -1; getaxispositionfirst(alocal); return 0; } ngraph-gtk-6.09.05/src/omerge.c0000644000175000017500000005651514106647111013104 00000000000000/* * $Id: omerge.c,v 1.16 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include #include #include "object.h" #include "nstring.h" #include "ntime.h" #include "ioutil.h" #include "gra.h" #include "oroot.h" #include "odata.h" #include "odraw.h" #include "osystem.h" #define NAME "merge" #define PARENT "draw" #define OVERSION "1.00.00" #define OLD_GRA_HEADER " Ngraph GRA file" #define ERRFILE 100 #define ERROPEN 101 #define ERRGRA 102 #define ERRGRAFM 103 static char *mergeerrorlist[]={ "GRA file is not specified.", "I/O error: open file", "not GRA file", "illegal GRA format", }; #define ERRNUM (sizeof(mergeerrorlist) / sizeof(*mergeerrorlist)) struct mergelocal { FILE *storefd; int endstore; time_t mtime; int bbox[4]; }; struct gra_info { int GC, lm, tm, zmx, zmy; GStatBuf gstat; struct objlist *obj; }; #define USE_MERGE_CACHE 1 #if USE_MERGE_CACHE struct gra_cache { struct GRAdata *data; GStatBuf gstat; }; static NHASH GraCache = NULL; #endif static void set_bbox(struct objlist *obj,N_VALUE *inst, struct narray *array, int l, int t, int zx, int zy) { int *bbox; double zoom_x, zoom_y; struct mergelocal *mergelocal; _getobj(obj,"_local",inst,&mergelocal); if (arraynum(array) != 4) { return; } bbox = arraydata(array); zoom_x = zx / 10000.0; zoom_y = zy / 10000.0; bbox[0] = (mergelocal->bbox[0]) * zoom_x + l; bbox[1] = (mergelocal->bbox[1]) * zoom_y + t; bbox[2] = (mergelocal->bbox[2]) * zoom_x + l; bbox[3] = (mergelocal->bbox[3]) * zoom_y + t; } #if USE_MERGE_CACHE static struct GRAdata * gra_data_new(void) { struct GRAdata *data; data = g_malloc(sizeof(*data)); if (data == NULL) { return NULL; } data->code = '\0'; data->cpar = NULL; data->cstr = NULL; data->next = NULL; return data; } static void gra_data_free(struct GRAdata *data) { struct GRAdata *next; while (data) { next = data->next; g_free(data->cpar); g_free(data->cstr); g_free(data); data = next; } } static struct gra_cache * gra_cache_new(const char *file) { struct gra_cache *cache; if (GraCache == NULL) { GraCache = nhash_new(); } if (GraCache == NULL) { return NULL; } cache = g_malloc(sizeof(*cache)); if (cache == NULL) { return NULL; } cache->data = NULL; cache->gstat.st_mtime = 0; cache->gstat.st_size = 0; nhash_set_ptr(GraCache, file, cache); return cache; } static struct gra_cache * gra_cache_get(const char *file) { void *ptr; if (GraCache == NULL) { return NULL; } nhash_get_ptr(GraCache, file, &ptr); return ptr; } static void gra_cache_free(const char *file) { struct gra_cache *cache; cache = gra_cache_get(file); if (cache == NULL) { return; } gra_data_free(cache->data); g_free(cache); nhash_del(GraCache, file); } #endif /* USE_MERGE_CACHE */ static int mergeinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int zm, n; struct mergelocal *mergelocal; char *ext; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; zm=10000; n = 0; ext = g_strdup("gra"); if (_putobj(obj,"zoom_x",inst,&zm)) return 1; if (_putobj(obj,"zoom_y",inst,&zm)) return 1; if (_putobj(obj,"line_num",inst,&n)) return 1; if (_putobj(obj,"ext",inst,ext)) return 1; if ((mergelocal=g_malloc(sizeof(struct mergelocal)))==NULL) goto errexit; if (_putobj(obj,"_local",inst,mergelocal)) goto errexit; mergelocal->storefd=NULL; mergelocal->endstore=FALSE; mergelocal->mtime = 0; mergelocal->bbox[0] = 0; mergelocal->bbox[1] = 0; mergelocal->bbox[2] = 0; mergelocal->bbox[3] = 0; return 0; errexit: g_free(mergelocal); return 1; } static int mergedone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } #if USE_MERGE_CACHE static void gra_cache_init(struct gra_cache *cache, struct gra_info *info) { if (cache->data) { gra_data_free(cache->data); cache->data = NULL; } if (info) { cache->gstat = info->gstat; } else { cache->gstat.st_mtime = 0; cache->gstat.st_size = 0; } } static int * dup_cpar(const int *cpar) { gsize n; n = cpar[0] + 1; if (n < 1) { n = 1; } #if GLIB_CHECK_VERSION(2, 68, 0) return g_memdup2(cpar, n * sizeof(*cpar)); #else return g_memdup(cpar, n * sizeof(*cpar)); #endif } static int draw_gra_data(struct gra_info *info, struct GRAdata *data) { int rcode, *cpar; cpar = dup_cpar(data->cpar); if (cpar == NULL) { return FALSE; } rcode = GRAinputdraw(info->GC, info->lm, info->tm, info->zmx, info->zmy, data->code, cpar, data->cstr); g_free(cpar); return rcode; } static int read_new_gra_file(struct gra_cache *cache, struct gra_info *info, FILE *fd) { int r; char *buf; int rcode; struct GRAdata *prev, *data; gra_cache_init(cache, info); r = 0; prev = NULL; while ((rcode = fgetline(fd, &buf)) != 1) { if (rcode == -1) { return 1; } data = gra_data_new(); if (data == NULL) { goto errexit; } rcode = GRAparse(data, buf); if (! rcode) { GRAdata_free(data); error2(info->obj, ERRGRAFM, buf); goto errexit; } rcode = draw_gra_data(info, data); if (! rcode) { GRAdata_free(data); error2(info->obj, ERRGRAFM, buf); goto errexit; } g_free(buf); if (prev) { prev->next = data; } else { cache->data = data; } prev = data; } return r; errexit: g_free(buf); gra_cache_init(cache, NULL); return 1; } static int read_old_gra_file(struct gra_cache *cache, struct gra_info *info, FILE *fd, const char *file) { int r; char *buf; int rcode; gra_cache_init(cache, NULL); rcode = fgetline(fd, &buf); if (rcode == 1) { error2(info->obj, ERRGRA, file); } g_free(buf); if (rcode != 0) { return 1; } r = 0; while ((rcode = fgetline(fd, &buf)) != 1) { if (rcode == -1) { return 1; } rcode = GRAinputold(info->GC, buf, info->lm, info->tm, info->zmx, info->zmy); if (!rcode) { error2(info->obj, ERRGRAFM, buf); g_free(buf); return 1; } g_free(buf); } return r; } static int read_gra_file(struct gra_cache *cache, struct gra_info *info, const char *graf, const char *file) { FILE *fd; char *buf; int newgra, rcode; fd = nfopen(file, "rt"); if (fd == NULL) { error2(info->obj, ERROPEN, file); return 1; } rcode = fgetline(fd, &buf); if (rcode == 1) { error2(info->obj,ERRGRA,file); } if (rcode != 0) { error2(info->obj, ERROPEN, file); fclose(fd); return 1; } if (strcmp(graf, buf) == 0) { newgra = TRUE; } else if (strcmp(OLD_GRA_HEADER, buf) == 0) { newgra = FALSE; } else { error2(info->obj, ERRGRA, file); g_free(buf); fclose(fd); return 1; } g_free(buf); if (newgra) { rcode = read_new_gra_file(cache, info, fd); } else { rcode = read_old_gra_file(cache, info, fd, file); } fclose(fd); return rcode; } static int draw_gra(struct gra_cache *cache, struct gra_info *info) { struct GRAdata *data; if (cache == NULL) { return 0; } data = cache->data; if (data == NULL) { return 0; } while (data) { int rcode; rcode = draw_gra_data(info, data); if (! rcode) { return 1; } data = data->next; } return 0; } static int free_cache(struct nhash *hash, void *data) { struct gra_cache *cache; cache = hash->val.p; if (cache == NULL) { return 0; } gra_data_free(cache->data); g_free(cache); hash->val.p = NULL; return 0; } static int read_gra(struct gra_info *info, const char *graf, const char *file) { struct gra_cache *cache; cache = gra_cache_get(file); if (cache == NULL) { cache = gra_cache_new(file); if (cache == NULL) { return 1; } } if (info->gstat.st_mtime != cache->gstat.st_mtime || info->gstat.st_size != cache->gstat.st_size) { if (read_gra_file(cache, info, graf, file)) { gra_cache_free(file); return 1; } } else { if (draw_gra(cache, info)) { error2(info->obj, ERRGRAFM, file); return 1; } } return 0; } #endif /* USE_MERGE_CACHE */ void merge_cache_clear(void) { #if USE_MERGE_CACHE if (GraCache == NULL) { return; } nhash_each(GraCache, free_cache, NULL); nhash_clear(GraCache); #endif } static int mergedraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct gra_info info; char *file,*graf; struct objlist *sys; struct mergelocal *mergelocal; #if ! USE_MERGE_CACHE FILE *fd; int newgra,rcode; char *buf; #endif if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"GC",inst,&info.GC); if (info.GC<0) return 0; _getobj(obj,"file",inst,&file); _getobj(obj,"left_margin",inst,&info.lm); _getobj(obj,"top_margin",inst,&info.tm); _getobj(obj,"zoom_x",inst,&info.zmx); _getobj(obj,"zoom_y",inst,&info.zmy); _getobj(obj,"_local",inst,&mergelocal); info.obj = obj; if (file==NULL) { error(obj,ERRFILE); return 1; } if (nstat(file, &info.gstat)) { clear_bbox(obj, inst); error2(obj, ERROPEN, file); return 1; } if (info.gstat.st_mtime != mergelocal->mtime) { clear_bbox(obj, inst); } mergelocal->mtime = info.gstat.st_mtime; if ((sys=getobject("system"))==NULL) return 1; if (getobj(sys,"GRAF",0,0,NULL,&graf)) return 1; #if USE_MERGE_CACHE read_gra(&info, graf, file); #else /* USE_MERGE_CACHE */ if ((fd=nfopen(file,"rt"))==NULL) { error2(obj,ERROPEN,file); return 1; } if ((rcode=fgetline(fd,&buf))==1) error2(obj,ERRGRA,file); if (rcode!=0) { fclose(fd); return 1; } if (strcmp(graf,buf)==0) newgra=TRUE; else if (strcmp(OLD_GRA_HEADER,buf)==0) newgra=FALSE; else { error2(obj,ERRGRA,file); g_free(buf); fclose(fd); return 1; } g_free(buf); if (!newgra) { if ((rcode=fgetline(fd,&buf))==1) error2(obj,ERRGRA,file); g_free(buf); if (rcode!=0) { fclose(fd); return 1; } } while ((rcode=fgetline(fd,&buf))!=1) { if (rcode==-1) { fclose(fd); return 1; } if (newgra) { rcode=GRAinput(info.GC, buf, info.lm, info.tm, info.zm); } else { rcode=GRAinputold(info.GC, buf, info.lm, info.tm, info.zm); } if (!rcode) { error2(obj,ERRGRAFM,buf); g_free(buf); fclose(fd); return 1; } g_free(buf); } fclose(fd); #endif /* USE_MERGE_CACHE */ return 0; } static int mergeredraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int hidden; #if ! USE_MERGE_CACHE int redrawf; #endif if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"hidden",inst,&hidden); #if USE_MERGE_CACHE if (! hidden) { mergedraw(obj,inst,rval,argc,argv); } #else /* USE_MERGE_CACHE */ _getobj(obj,"redraw_flag",inst,&redrawf); if (redrawf) { mergedraw(obj,inst,rval,argc,argv); } else { int GC; struct narray *array; int x1, x2, y1, y2, zoom, w, h; if (! hidden) { system_draw_notify(); } _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; if (_exeobj(obj, "bbox", inst, 0, NULL)) { return 1; } _getobj(obj, "bbox", inst, &array); if (array) { x1 = arraynget_int(array,0); y1 = arraynget_int(array,1); x2 = arraynget_int(array,2); y2 = arraynget_int(array,3); GRAregion(GC, &w, &h, &zoom); GRAview(GC, 0, 0, w * 10000.0 / zoom, h * 10000.0 / zoom, 1); GRAcolor(GC, 0, 0, 0, 255); GRAlinestyle(GC, 0, NULL, 10, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); GRArectangle(GC, x1, y1, x2, y2, 0); } } #endif /* USE_MERGE_CACHE */ return 0; } static int mergefile(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct objlist *sys; int ignorepath; char *file, *file2; sys=getobject("system"); getobj(sys, "ignore_path", 0, 0, NULL, &ignorepath); if (argv[2] == NULL) { return 0; } if (clear_bbox(obj, inst)) { /* argv[2] cannot be freed when a field returns TRUE. */ return 1; } file = get_utf8_filename(argv[2]); if (file == NULL) { return 1; } g_free(argv[2]); if (ignorepath) { file2 = getbasename(file); g_free(file); argv[2] = file2; } else { argv[2] = file; } return 0; } static int mergetime(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file; GStatBuf buf; int style; g_free(rval->str); rval->str=NULL; _getobj(obj,"file",inst,&file); if (file==NULL) return 0; if (nstat(file,&buf)!=0) return 1; style=*(int *)(argv[2]); rval->str=ntime((time_t *)&(buf.st_mtime),style); return 0; } static int mergedate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file; GStatBuf buf; int style; g_free(rval->str); rval->str=NULL; _getobj(obj,"file",inst,&file); if (file==NULL) return 0; if (nstat(file,&buf)!=0) return 1; style=*(int *)(argv[2]); rval->str=ndate((time_t *)&(buf.st_mtime),style); return 0; } static int mergestore(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct mergelocal *mergelocal; g_free(rval->str); rval->str=NULL; _getobj(obj,"_local",inst,&mergelocal); if (mergelocal->endstore) { mergelocal->endstore=FALSE; return 1; } return store(obj, inst, rval, argc, argv, &mergelocal->endstore, &mergelocal->storefd); } static int mergeload(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { return load_file(obj, inst, rval, argc, argv); } static int mergestoredum(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct mergelocal *mergelocal; char *buf; g_free(rval->str); rval->str=NULL; _getobj(obj,"_local",inst,&mergelocal); if (mergelocal->endstore) { mergelocal->endstore=FALSE; return 1; } buf = store_dummy(obj, inst, argc, argv); if (buf == NULL) { return 1; } rval->str=buf; mergelocal->endstore=TRUE; return 0; } static int mergeloaddum(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { return load_dummy(obj, inst, rval, argc, argv); } static int mergebbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; char *file,*graf; int lm,tm,zmx,zmy; int newgra,rcode; struct objlist *sys; FILE *fd; char *buf; struct GRAbbox bbox; int GC; struct mergelocal *mergelocal; array=rval->array; if (arraynum(array)!=0) return 0; _getobj(obj,"file",inst,&file); _getobj(obj,"left_margin",inst,&lm); _getobj(obj,"top_margin",inst,&tm); _getobj(obj,"zoom_x",inst,&zmx); _getobj(obj,"zoom_y",inst,&zmy); if (file==NULL) return 1; if ((sys=getobject("system"))==NULL) return 1; if (getobj(sys,"GRAF",0,0,NULL,&graf)) return 1; if ((fd=nfopen(file,"rt"))==NULL) return 1; if ((rcode=fgetline(fd,&buf))!=0) { fclose(fd); return 1; } if (strcmp(graf,buf)==0) newgra=TRUE; else if (strcmp(OLD_GRA_HEADER,buf)==0) newgra=FALSE; else { g_free(buf); fclose(fd); return 1; } g_free(buf); if (!newgra) { if ((rcode=fgetline(fd,&buf))!=0) { fclose(fd); return 1; } g_free(buf); } GRAinitbbox(&bbox); if ((GC=_GRAopencallback(GRAboundingbox,NULL,&bbox))==-1) { GRAendbbox(&bbox); fclose(fd); return 1; } GRAinit(GC,0,0,21000,29300,10000); while ((rcode=fgetline(fd,&buf))!=1) { if (rcode==-1) { fclose(fd); return 1; } if (newgra) rcode=GRAinput(GC,buf,0,0,10000,10000); else rcode=GRAinputold(GC,buf,0,0,10000,10000); if (!rcode) { g_free(buf); fclose(fd); return 1; } g_free(buf); } fclose(fd); _GRAclose(GC); GRAendbbox(&bbox); if ((array==NULL) && ((array=arraynew(sizeof(int)))==NULL)) return 1; arrayins(array,&bbox.maxy,0); arrayins(array,&bbox.maxx,0); arrayins(array,&bbox.miny,0); arrayins(array,&bbox.minx,0); if (arraynum(array)==0) { arrayfree(array); rval->array = NULL; return 1; } _getobj(obj,"_local",inst,&mergelocal); mergelocal->bbox[0] = bbox.minx; mergelocal->bbox[1] = bbox.miny; mergelocal->bbox[2] = bbox.maxx; mergelocal->bbox[3] = bbox.maxy; set_bbox(obj, inst, array, lm, tm, zmx, zmy); rval->array=array; return 0; } static int mergemove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int lm, tm, zmx, zmy, x, y; struct narray *array; _getobj(obj,"left_margin",inst,&lm); _getobj(obj,"top_margin",inst,&tm); x = *(int *)argv[2]; y = *(int *)argv[3]; lm += x; tm += y; if (_putobj(obj,"left_margin",inst,&lm)) return 1; if (_putobj(obj,"top_margin",inst,&tm)) return 1; #if 0 if (clear_bbox(obj, inst)) return 1; #else _getobj(obj, "bbox", inst, &array); if (arraynum(array) == 4) { _getobj(obj, "zoom_x", inst, &zmx); _getobj(obj, "zoom_y", inst, &zmy); set_bbox(obj, inst, array, lm, tm, zmx, zmy); } #endif return 0; } #define ZOOM_MAX 1000000 static int mergezoom(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int lm,tm,zmx,zmy; double zoom_x, zoom_y; int refx,refy; struct narray *array; zoom_x=(*(int *)argv[2])/10000.0; zoom_y=(*(int *)argv[3])/10000.0; refx=(*(int *)argv[4]); refy=(*(int *)argv[5]); _getobj(obj,"left_margin",inst,&lm); _getobj(obj,"top_margin",inst,&tm); _getobj(obj,"zoom_x",inst,&zmx); _getobj(obj,"zoom_y",inst,&zmy); lm=(lm-refx)*zoom_x+refx; tm=(tm-refy)*zoom_y+refy; if (zmx * zoom_x > ZOOM_MAX) { return 0; } if (zmy * zoom_y > ZOOM_MAX) { return 0; } zmx*=zoom_x; zmy*=zoom_y; if (_putobj(obj,"left_margin",inst,&lm)) return 1; if (_putobj(obj,"top_margin",inst,&tm)) return 1; if (_putobj(obj,"zoom_x",inst,&zmx)) return 1; if (_putobj(obj,"zoom_y",inst,&zmy)) return 1; #if 0 if (clear_bbox(obj, inst)) return 1; #else _getobj(obj, "bbox", inst, &array); if (arraynum(array) == 4) { set_bbox(obj, inst, array, lm, tm, zmx, zmy); } #endif return 0; } static int mergematch(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy,err; int bminx,bminy,bmaxx,bmaxy; struct narray *array; rval->i=FALSE; if (_exeobj(obj,"bbox",inst,0,NULL)) return 1; _getobj(obj,"bbox",inst,&array); if (array==NULL) return 0; minx=*(int *)argv[2]; miny=*(int *)argv[3]; maxx=*(int *)argv[4]; maxy=*(int *)argv[5]; err=*(int *)argv[6]; if (arraynum(array)<4) return 1; bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx==maxx) && (miny==maxy)) { bminx-=err; bminy-=err; bmaxx+=err; bmaxy+=err; if ((bminx<=minx) && (minx<=bmaxx) && (bminy<=miny) && (miny<=bmaxy)) rval->i=TRUE; } else { if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } return 0; } static int mergegeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *field; int zoom, val; struct narray *array; field=(char *)(argv[1]); if (field[0] == 'z') { zoom = * (int *) (argv[2]); if (zoom > ZOOM_MAX) { zoom = ZOOM_MAX; } else if (zoom < 1) { zoom = 1; } if (strcmp(field, "zoom") == 0) { _putobj(obj, "zoom_x", inst, &zoom); _putobj(obj, "zoom_y", inst, &zoom); } else { * (int *) (argv[2]) = zoom; } } #if 0 if (clear_bbox(obj, inst)){ return 1; } #else val = * (int *) (argv[2]); _getobj(obj, "bbox", inst, &array); if (arraynum(array) == 4) { int t, l, zx, zy; _getobj(obj, "top_margin", inst, &t); _getobj(obj, "left_margin", inst, &l); _getobj(obj, "zoom_x", inst, &zx); _getobj(obj, "zoom_y", inst, &zy); switch (field[0]) { case 't': t = val; break; case 'l': l = val; break; case 'z': if (strcmp(field, "zoom") == 0) { zx = zoom; zy = zoom; } else if (strcmp(field, "zoom_x") == 0) { zx = zoom; } else { zy = zoom; } break; } set_bbox(obj, inst, array, l, t, zx, zy); } #endif return 0; } static int merge_inst_dup(struct objlist *obj, N_VALUE *src, N_VALUE *dest) { int i; i = obj_get_field_pos(obj, "_local"); if (i < 0) { return 1; } #if GLIB_CHECK_VERSION(2, 68, 0) dest[i].ptr = g_memdup2(src[i].ptr, sizeof(struct mergelocal)); #else dest[i].ptr = g_memdup(src[i].ptr, sizeof(struct mergelocal)); #endif /* mergelocal->storefd may be NULL */ if (dest[i].ptr == NULL) { return 1; } return 0; } static int merge_inst_free(struct objlist *obj, N_VALUE *inst) { int i; i = obj_get_field_pos(obj, "_local"); if (i == -1) { return 1; } g_free(inst[i].ptr); /* mergelocal->storefd may be NULL */ return 0; } static struct objtable merge[] = { {"init",NVFUNC,NEXEC,mergeinit,NULL,0}, {"done",NVFUNC,NEXEC,mergedone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"file",NSTR,NREAD|NWRITE,mergefile,NULL,0}, {"save_path",NENUM,NREAD|NWRITE,NULL,pathchar,0}, {"top_margin",NINT,NREAD|NWRITE,mergegeometry,NULL,0}, {"left_margin",NINT,NREAD|NWRITE,mergegeometry,NULL,0}, {"zoom_x",NINT,NREAD|NWRITE,mergegeometry,NULL,0}, {"zoom_y",NINT,NREAD|NWRITE,mergegeometry,NULL,0}, {"zoom",NINT,NWRITE,mergegeometry,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,mergedraw,"i",0}, {"redraw",NVFUNC,NREAD|NEXEC,mergeredraw,"i",0}, {"save",NSFUNC,NREAD|NEXEC,pathsave,"sa",0}, {"store_data",NSFUNC,NREAD|NEXEC,mergestore,"",0}, {"load_data",NVFUNC,NREAD|NEXEC,mergeload,"s",0}, {"store_dummy",NSFUNC,NREAD|NEXEC,mergestoredum,"",0}, {"load_dummy",NVFUNC,NREAD|NEXEC,mergeloaddum,"s",0}, {"time",NSFUNC,NREAD|NEXEC,mergetime,"i",0}, {"date",NSFUNC,NREAD|NEXEC,mergedate,"i",0}, {"line_num",NINT,NREAD,NULL,NULL,0}, {"bbox",NIAFUNC,NREAD|NEXEC,mergebbox,"",0}, {"move",NVFUNC,NREAD|NEXEC,mergemove,"ii",0}, {"zooming",NVFUNC,NREAD|NEXEC,mergezoom,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,mergematch,"iiiii",0}, {"ext",NSTR,NREAD,NULL,NULL,0}, {"_local",NPOINTER,0,NULL,NULL,0}, {"symbol_greek",NBOOL,NWRITE,NULL,NULL,0}, }; #define TBLNUM (sizeof(merge) / sizeof(*merge)) void * addmerge(void) /* addmerge() returns NULL on error */ { struct objlist *merge_obj; merge_obj = addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,merge,ERRNUM,mergeerrorlist,NULL,NULL); obj_set_undo_func(merge_obj, merge_inst_dup, merge_inst_free); return merge_obj; } ngraph-gtk-6.09.05/src/ogra2fil.c0000644000175000017500000000757113624701076013336 00000000000000/* * $Id: ogra2fil.c,v 1.6 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include "object.h" #include "ioutil.h" #define NAME "gra2file" #define PARENT "gra2" #define OVERSION "1.00.00" #define ERRFOPEN 100 static char *gra2ferrorlist[]={ "I/O error: open file", }; #define ERRNUM (sizeof(gra2ferrorlist) / sizeof(*gra2ferrorlist)) struct gra2flocal { FILE *fil; }; static int gra2finit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct gra2flocal *gra2flocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if ((gra2flocal=g_malloc(sizeof(struct gra2flocal)))==NULL) goto errexit; if (_putobj(obj,"_local",inst,gra2flocal)) goto errexit; gra2flocal->fil=NULL; return 0; errexit: g_free(gra2flocal); return 1; } static int gra2fdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct gra2flocal *gra2flocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&gra2flocal); if (gra2flocal->fil!=NULL) fclose(gra2flocal->fil); return 0; } static int gra2f_output(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct gra2flocal *gra2flocal; char code; int *cpar; char *cstr; char *fname,*graf,*sname,*sver; gra2flocal=(struct gra2flocal *)argv[2]; code=*(char *)(argv[3]); cpar=(int *)argv[4]; cstr=argv[5]; if (code=='I') { struct objlist *sys; if (gra2flocal->fil!=NULL) fclose(gra2flocal->fil); gra2flocal->fil=NULL; _getobj(obj,"file",inst,&fname); if (fname==NULL) return 1; if ((gra2flocal->fil=nfopen(fname,"wt"))==NULL) { error2(obj,ERRFOPEN,fname); return 1; } if ((sys=getobject("system"))==NULL) return 1; if (getobj(sys,"name",0,0,NULL,&sname)) return 1; if (getobj(sys,"version",0,0,NULL,&sver)) return 1; if (getobj(sys,"GRAF",0,0,NULL,&graf)) return 1; fprintf(gra2flocal->fil,"%s\n",graf); fprintf(gra2flocal->fil,"%%Creator: %s ver %s\n",sname,sver); } if (gra2flocal->fil!=NULL) { int i; fputc(code,gra2flocal->fil); if (cpar[0]==-1) { for (i=0;cstr[i]!='\0';i++) fputc(cstr[i],gra2flocal->fil); } else { fprintf(gra2flocal->fil,",%d",cpar[0]); for (i=1;i<=cpar[0];i++) fprintf(gra2flocal->fil,",%d",cpar[i]); } fputc('\n',gra2flocal->fil); if (code=='E') { fclose(gra2flocal->fil); gra2flocal->fil=NULL; } } return 0; } static struct objtable gra2f[] = { {"init",NVFUNC,NEXEC,gra2finit,NULL,0}, {"done",NVFUNC,NEXEC,gra2fdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"file",NSTR,NREAD|NWRITE,NULL,NULL,0}, {"_local",NPOINTER,0,NULL,NULL,0}, {"_output",NVFUNC,0,gra2f_output,NULL,0}, }; #define TBLNUM (sizeof(gra2f) / sizeof(*gra2f)) void * addgra2file(void) /* addgra2file() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,gra2f,ERRNUM,gra2ferrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/omark.c0000644000175000017500000002264413635336366012750 00000000000000/* * $Id: omark.c,v 1.16 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include "object.h" #include "gra.h" #include "oroot.h" #include "odraw.h" #include "olegend.h" #define NAME "mark" #define PARENT "legend" #define OVERSION "1.00.00" #define MODIFY_MARK_TYPE 0 static char *markerrorlist[]={ "", }; #define ERRNUM (sizeof(markerrorlist) / sizeof(*markerrorlist)) static int markinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int size,width,r2,g2,b2,a2; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; size=DEFAULT_MARK_SIZE; width=DEFAULT_LINE_WIDTH; r2=255; g2=255; b2=255; a2=255; if (_putobj(obj,"size",inst,&size)) return 1; if (_putobj(obj,"width",inst,&width)) return 1; if (_putobj(obj,"R2",inst,&r2)) return 1; if (_putobj(obj,"G2",inst,&g2)) return 1; if (_putobj(obj,"B2",inst,&b2)) return 1; if (_putobj(obj,"A2",inst,&a2)) return 1; return 0; } static int markdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int markdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; int x,y,type,size,width,fr,fg,fb,fa,br,bg,bb,ba,w,h; struct narray *style; int snum,*sdata; int clip,zoom; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; _getobj(obj,"R",inst,&fr); _getobj(obj,"G",inst,&fg); _getobj(obj,"B",inst,&fb); _getobj(obj,"A",inst,&fa); _getobj(obj,"R2",inst,&br); _getobj(obj,"G2",inst,&bg); _getobj(obj,"B2",inst,&bb); _getobj(obj,"A2",inst,&ba); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"type",inst,&type); _getobj(obj,"size",inst,&size); _getobj(obj,"width",inst,&width); _getobj(obj,"style",inst,&style); _getobj(obj,"clip",inst,&clip); snum=arraynum(style); sdata=arraydata(style); GRAregion(GC,&w,&h,&zoom); GRAview(GC,0,0,w*10000.0/zoom,h*10000.0/zoom,clip); GRAlinestyle(GC,snum,sdata,width,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); GRAmark(GC,type,x,y,size,fr,fg,fb,fa,br,bg,bb,ba); return 0; } static int markbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy; int x,y,size,width; struct narray *array; array=rval->array; if (arraynum(array)!=0) return 0; _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"size",inst,&size); _getobj(obj,"width",inst,&width); if ((array==NULL) && ((array=arraynew(sizeof(int)))==NULL)) return 1; size+=4*width; minx=x-size/2; miny=y-size/2; maxx=x+size/2; maxy=y+size/2; arrayins(array,&maxy,0); arrayins(array,&maxx,0); arrayins(array,&miny,0); arrayins(array,&minx,0); if (arraynum(array)==0) { arrayfree(array); rval->array = NULL; return 1; } rval->array=array; return 0; } static int markmove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); x+=*(int *)argv[2]; y+=*(int *)argv[3]; if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int markrotate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int angle, use_pivot, px, py, x, y; #if MODIFY_MARK_TYPE int type; #endif angle = *(int *) argv[2]; use_pivot = * (int *) argv[3]; px = *(int *) argv[4]; py = *(int *) argv[5]; #if MODIFY_MARK_TYPE _getobj(obj, "type", inst, &type); type = mark_rotate(angle, type) _putobj(obj, "type", inst, &type); #endif if (! use_pivot) return 0; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); rotate(px, py, angle, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); if (clear_bbox(obj, inst)) return 1; return 0; } static int markflip(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x, y, p, use_pivot; enum FLIP_DIRECTION dir; #if MODIFY_MARK_TYPE int type; #endif dir = (* (int *) argv[2] == FLIP_DIRECTION_HORIZONTAL) ? FLIP_DIRECTION_HORIZONTAL : FLIP_DIRECTION_VERTICAL; use_pivot = * (int *) argv[3]; #if MODIFY_MARK_TYPE _getobj(obj, "type", inst, &type); type = mark_flip(dir, type); _putobj(obj, "type", inst, &type); #endif if (! use_pivot) return 0; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); p = *(int *) argv[4]; flip(p, dir, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); if (clear_bbox(obj, inst)) return 1; return 0; } static int markzoom(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y,size,refx,refy,width,snum,*sdata,preserve_width; double zoom, zoom_x, zoom_y; struct narray *style; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; zoom_x = (*(int *) argv[2]) / 10000.0; zoom_y = (*(int *) argv[3]) / 10000.0; zoom = MIN(zoom_x, zoom_y); refx = (*(int *)argv[4]); refy = (*(int *)argv[5]); preserve_width = (*(int *)argv[6]); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); _getobj(obj,"size",inst,&size); _getobj(obj,"width",inst,&width); _getobj(obj,"style",inst,&style); snum=arraynum(style); sdata=arraydata(style); x=(x-refx)*zoom_x+refx; y=(y-refy)*zoom_y+refy; size=size*zoom; if (! preserve_width) { int i; width=width*zoom; for (i=0;ii=FALSE; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if (_exeobj(obj,"bbox",inst,0,NULL)) return 1; _getobj(obj,"bbox",inst,&array); if (array==NULL) return 0; minx=*(int *)(argv[2]); miny=*(int *)(argv[3]); maxx=*(int *)(argv[4]); maxy=*(int *)(argv[5]); err=*(int *)(argv[6]); if (arraynum(array)<4) return 1; bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx==maxx) && (miny==maxy)) { bminx-=err; bminy-=err; bmaxx+=err; bmaxy+=err; if ((bminx<=minx) && (minx<=bmaxx) && (bminy<=miny) && (miny<=bmaxy)) rval->i=TRUE; } else { if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } return 0; } static struct objtable mark[] = { {"init",NVFUNC,NEXEC,markinit,NULL,0}, {"done",NVFUNC,NEXEC,markdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"x",NINT,NREAD|NWRITE,markgeometry,NULL,0}, {"y",NINT,NREAD|NWRITE,markgeometry,NULL,0}, {"size",NINT,NREAD|NWRITE,markgeometry,NULL,0}, {"type",NINT,NREAD|NWRITE,oputmarktype,NULL,0}, {"R2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"G2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"B2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"A2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"width",NINT,NREAD|NWRITE,markgeometry,NULL,0}, {"style",NIARRAY,NREAD|NWRITE,oputstyle,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,markdraw,"i",0}, {"bbox",NIAFUNC,NREAD|NEXEC,markbbox,"",0}, {"move",NVFUNC,NREAD|NEXEC,markmove,"ii",0}, {"rotate",NVFUNC,NREAD|NEXEC,markrotate,"iiii",0}, {"flip",NVFUNC,NREAD|NEXEC,markflip,"iii",0}, {"zooming",NVFUNC,NREAD|NEXEC,markzoom,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,markmatch,"iiiii",0}, {"hsb",NVFUNC,NREAD|NEXEC,put_hsb,"ddd",0}, {"hsb2",NVFUNC,NREAD|NEXEC,put_hsb2,"ddd",0}, }; #define TBLNUM (sizeof(mark) / sizeof(*mark)) void * addmark(void) /* addmark() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,mark,ERRNUM,markerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/oprm.c0000644000175000017500000014101214001231674012563 00000000000000/* * $Id: oprm.c,v 1.14 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "strconv.h" #include "mathfn.h" #include "ntime.h" #include "object.h" #include "gra.h" #include "ioutil.h" #include "odraw.h" #include "odata.h" #include "opath.h" #include "ogra.h" #define NAME "prm" #define PARENT "object" #define OVERSION "1.00.00" #define ERROPEN 100 #define ERRREAD 101 #define ERRPRM 102 #define ERREXIST 103 static char *prmerrorlist[]={ "I/O error: open file", "I/O error: read file", "unsupported PRM file", "skip existing file", }; #define ERRNUM (sizeof(prmerrorlist) / sizeof(*prmerrorlist)) static int prminit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int prmdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static char * pathconv(char *str,int ignorepath) { int i; char *file, *s; if (str==NULL) return NULL; if (str[0]=='\0') return NULL; s = sjis_to_utf8(str); if (s == NULL) { return NULL; } g_free(str); if (ignorepath) { file=getbasename(s); g_free(s); } else { file=s; } changefilename(file); for (i=0;file[i]!='\0';i++) { file[i]=tolower(file[i]); } return file; } static struct narray *linestyleconv(int attr,int dottedsize) { int i,dt[4],num; struct narray *array; if (attr==1) { dt[0]=dottedsize*10; dt[1]=dottedsize*10; num=2; } else if (attr==2) { dt[0]=dottedsize*30; dt[1]=dottedsize*10; num=2; } else if (attr==3) { dt[0]=dottedsize*30; dt[1]=dottedsize*10; dt[2]=dottedsize*10; dt[3]=dottedsize*10; num=4; } else { return NULL; } array=arraynew(sizeof(int)); for (i=0;i %F{} %d ---> %{system:0:date:1} %01C0101 ---> %{file:01:column:01 01} */ { int i,j,fchange[2],jchange[2],script,fff[2],ffj[2],ffb[2]; char *s2, *s; int file,line,col; s = sjis_to_utf8(str); if (s == NULL) { return NULL; } s2 = g_malloc(strlen(s) + 200); if (s2 == NULL) { return NULL; } j=0; script=0; for (i=0;i<2;i++) { fff[i]=ff; ffj[i]=fj; ffb[i]=fb; fchange[i]=FALSE; jchange[i]=FALSE; } for (i=0;s[i]!='\0';i++) { if ((s[i]=='\\') && (s[i+1]!='\0')) { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); s2[j]=s[i]; s2[j+1]=s[i+1]; i++; j+=2; } else if (s[i]=='%') { if ((toupper(s[i+1])=='S') && isdigit(s[i+2]) && isdigit(s[i+3])) { s2[j]=s[i]; s2[j+1]=s[i+1]; s2[j+2]='{'; s2[j+3]=s[i+2]; s2[j+4]=s[i+3]; s2[j+5]='}'; i+=3; j+=6; } else if ((strchr("PXYpxy",s[i+1])!=NULL) && ((s[i+2]=='+') || (s[i+2]=='-')) && isdigit(s[i+3]) && isdigit(s[i+4])) { s2[j]=s[i]; s2[j+1]=s[i+1]; s2[j+2]='{'; s2[j+3]=s[i+2]; s2[j+4]=s[i+3]; s2[j+5]=s[i+4]; s2[j+6]='}'; i+=4; j+=7; } else if ((toupper(s[i+1])=='F') && (strchr("THCthc",s[i+2])!=NULL)) { fchange[script]=TRUE; if (toupper(s[i+2])=='T') fff[script]=FONT_TYPE_SERIF; else if (toupper(s[i+2])=='H') fff[script]=FONT_TYPE_SANS_SERIF; else if (toupper(s[i+2])=='C') fff[script]=FONT_TYPE_MONOSPACE; i+=2; } else if ((toupper(s[i+1])=='J') && (strchr("GMgm",s[i+2])!=NULL)) { jchange[script]=TRUE; if (toupper(s[i+2])=='M') ffj[script]=0; else if (toupper(s[i+2])=='G') ffj[script]=1; i+=2; } else if (toupper(s[i+1])=='R') { fchange[script]=TRUE; ffb[script]=FONT_STYLE_NORMAL; i++; } else if (toupper(s[i+1])=='B') { fchange[script]=TRUE; ffb[script]=FONT_STYLE_BOLD; i++; } else if (toupper(s[i+1])=='I') { fchange[script]=TRUE; ffb[script]=FONT_STYLE_ITALIC; i++; } else if (toupper(s[i+1])=='O') { fchange[script]=TRUE; ffb[script]=(FONT_STYLE_BOLD | FONT_STYLE_ITALIC); i++; } else if (s[i+1]=='d') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{system:0:date:1}"); i++; } else if (s[i+1]=='D') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{system:0:date:0}"); i++; } else if (s[i+1]=='t') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{system:0:time:2}"); i++; } else if (s[i+1]=='T') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{system:0:time:3}"); i++; } else if (toupper(s[i+1])=='M') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%s",prmfile); i++; } else if ((toupper(s[i+1])=='C') && isdigit(s[i+2])) { i+=2; } else if (isdigit(s[i+1]) && isdigit(s[i+2])) { file=(s[i+1]-'0')*10+(s[i+2]-'0')-1; if (file==-1) file=0; if (toupper(s[i+3])=='N') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); if (file<20) { if (s[i+3]=='N') j+=sprintf(s2+j,"%%{file:%d:file}",fnameid[file]); else j+=sprintf(s2+j,"%%{file:%d:basename}",fnameid[file]); } i+=3; } else if (s[i+3]=='d') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{file:%d:date:1}",fnameid[file]); i+=3; } else if (s[i+3]=='D') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{file:%d:date:0}",fnameid[file]); i+=3; } else if (s[i+3]=='t') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{file:%d:time:4}",fnameid[file]); i+=3; } else if (s[i+3]=='T') { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); j+=sprintf(s2+j,"%%{system:%d:time:3}",fnameid[file]); i+=3; } else if ((toupper(s[i+3])=='C') && isdigit(s[i+4]) && isdigit(s[i+5]) && isdigit(s[i+6]) && isdigit(s[i+7])) { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); line=(s[i+4]-'0')*10+(s[i+5]-'0'); col=(s[i+6]-'0')*10+(s[i+7]-'0'); if (file<20) j+=sprintf(s2+j,"%%{file:%d:column:%d %d}", fnameid[file],line,col); i+=7; } } } else { addfontcontrol(s2,&j,fchange,jchange,fff,ffb,ffj,script); if ((s[i]=='^') || (s[i]=='_')) { script=1; } else if (s[i]=='@') { script=0; } s2[j]=s[i]; j++; } } s2[j]='\0'; g_free(s); return s2; } static char * mathconv(char *math) /* INTEG ---> sum NAN ---> CONT NONE ---> BREAK = ---> ; */ { int i; char *m; GString *new_math; new_math = g_string_new(""); if (new_math == NULL) { return NULL; } for (i = 0; math[i]; i++) { if (strncmp(math + i, "NAN", 3) == 0) { g_string_append(new_math, "CONT"); i += 2; } else if (strncmp(math + i, "NONE", 4) == 0) { g_string_append(new_math, "BREAK"); i += 3; } else if (strncmp(math + i, "INTEG", 5) == 0) { g_string_append(new_math, "sum"); i += 4; } else if (math[i] == '=') { g_string_append(new_math, ";\n"); } else if ((math[i] != ' ') && (math[i] != '\t')) { g_string_append_c(new_math, math[i]); } } if (new_math->len == 0) { g_string_free(new_math, TRUE); m = NULL; } else { m = g_string_free(new_math, FALSE); } return m; } #define BUFSIZE 512 static int prmloadline(struct objlist *obj,char *file,FILE *fp,char *buf,int err) { if (fgetnline(fp,buf,BUFSIZE)) { if (err) error2(obj,ERRREAD,file); return -1; } return 0; } static int sscanf2(char *buffer,char *format,...) { va_list ap; int i,num; char *s; char *endptr; va_start(ap,format); s=buffer; num=0; i=0; while (format[i]!='\0') { if (format[i]=='d') { int *d; d=va_arg(ap,int *); *d=strtol(s,&endptr,10); num++; if (endptr[0]=='\0') break; s=endptr; } else if (format[i]=='e') { double *e; e=va_arg(ap,double *); *e=strtod(s,&endptr); num++; if (endptr[0]=='\0') break; s=endptr; } i++; } va_end(ap); return num; } static int gettimeval2(char *s,time_t *time) { char *endptr; struct tm tm; tm.tm_year=strtol(s,&endptr,10)-1900; if (endptr[0]!='-') return -1; s=endptr+1; tm.tm_mon=strtol(s,&endptr,10)-1; if (endptr[0]!='-') return -1; s=endptr+1; tm.tm_mday=strtol(s,&endptr,10); if (endptr[0]!=' ') return -1; s=endptr+1; tm.tm_hour=strtol(s,&endptr,10); if (endptr[0]!=':') return -1; s=endptr+1; tm.tm_min=strtol(s,&endptr,10); if (endptr[0]!=':') return -1; s=endptr+1; tm.tm_sec=strtol(s,&endptr,10); tm.tm_isdst=0; *time=mktime(&tm); return 0; } char buf[BUFSIZE]; char buf2[BUFSIZE]; static int prmload(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file; FILE *fp,*fp2; int i,j,k,filetype,num,ignorepath,decimalsign; struct objlist *fobj,*fitobj,*aobj,*agdobj; struct objlist *pobj,*mobj,*tobj,*robj; struct objlist *mgobj,*gobj,*cmobj; int fid,fidroot,fitid,aid,agdid,lid,pid,mid,tid,rid,cid; int mgid,gid,cmid; char *s,*s2; int d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,R,G,B,gx[11],gy[11]; double f1,f2,f3,f4; int type,intp,mark,fittype; struct narray *iarray; int graphtype,vx,vy,szx,szy,dmode[3]; int fff[7],ffj[7],ffb[7],ffs[7],ffp[7],ffR[7],ffG[7],ffB[7]; char *argv2[5]; int anameid[4],anameoid[4]; int fitnameid[20],nameid; int fnameid[20]; int masknum,movenum; struct narray *mask,*move,*movex,*movey; double datax,datay,data2,data3; int statx,staty,stat2,stat3,line,plottype; char str4[5],*endptr; int hiddenaxis[4]; int setaxis[4],sccros[4]; int scnum,scstart,scstep,sczero,scplus,scposs,scpose; int scdir,sclr,sclog,scposx,scposy,scfull; char scfig[5]; int la0,la1,la2,la3,la4,lw0,lw1,lw2,lw3,lw4,lc0,lc1,lc4; int ll1,ll2,ll3; double amax,amin,ainc; int atype,aid2[4],posx,posy; char format[10],*EOD; char *filename; time_t ftime; struct utimbuf tm; int mkdata; struct narray group; int gtype; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"file",inst,&file); _getobj(obj,"ignore_path",inst,&ignorepath); str4[4]='\0'; if ((fobj=getobject("data"))==NULL) return 1; if ((fitobj=getobject("fit"))==NULL) return 1; if ((aobj=getobject("axis"))==NULL) return 1; if ((agdobj=getobject("axisgrid"))==NULL) return 1; if ((pobj=getobject("path"))==NULL) return 1; if ((mobj=getobject("mark"))==NULL) return 1; if ((robj=getobject("rectangle"))==NULL) return 1; if ((tobj=getobject("text"))==NULL) return 1; if ((mgobj=getobject("merge"))==NULL) return 1; if ((gobj=getobject("gra"))==NULL) return 1; if (file==NULL) return 0; if ((fp=nfopen(file,"rt"))==NULL) { error2(obj,ERROPEN,file); return 1; } if (prmloadline(obj,file,fp,buf,TRUE)!=0) goto errexit; if (strcmp(buf," Ngraph ver 5.2 PRM file")==0) filetype=2; else if (strcmp(buf," Ngraph ver. 5.3 PRM file")==0) filetype=3; else if (strcmp(buf," Ngraph ver 5.2 DPM file")==0) filetype=12; else if (strcmp(buf," Ngraph ver. 5.3 DPM file")==0) filetype=13; else { error2(obj,ERRPRM,file); goto errexit; } if (prmloadline(obj,file,fp,buf,TRUE)!=0) goto errexit; if (sscanf2(buf,"%d",(int *)&num)!=1) { error2(obj,ERRPRM,file); goto errexit; } anameid[0]=anameid[1]=anameid[2]=anameid[3]=-1; anameoid[0]=anameoid[1]=anameoid[2]=anameoid[3]=-1; /* FilePar */ for (i=0;i=26) { if ((rid=newobj(robj))==-1) goto errexit; putobj(robj,"x1",rid,&(gx[0])); putobj(robj,"y1",rid,&(gy[0])); putobj(robj,"x2",rid,&(gx[1])); putobj(robj,"y2",rid,&(gy[1])); if ((d3==26) || (d3==27)) d10=TRUE; else d10=FALSE; putobj(robj,"fill",rid,&d10); cmid=rid; cmobj=robj; if (d3==26) { d10 = FALSE; putobj(robj,"stroke",rid,&d10); } } else { if ((mid=newobj(mobj))==-1) goto errexit; putobj(mobj,"x",mid,&(gx[0])); putobj(mobj,"y",mid,&(gy[0])); if ((d3==5) || (d3==6)) type=0; else if (d3==7) type=1; else if (d3==8) type=2; else if (d3==9) type=3; else if (d3==10) type=80; else if (d3==11) type=10; else if (d3==12) type=11; else if (d3==13) type=12; else if (d3==14) type=20; else if (d3==15) type=21; else if (d3==16) type=22; else if (d3==17) type=30; else if (d3==18) type=31; else if (d3==19) type=32; else if (d3==20) type=40; else if (d3==21) type=41; else if (d3==22) type=42; else if (d3==23) type=70; else if (d3==24) type=71; putobj(mobj,"type",mid,&type); d6*=10; if (d3==5) d6/=2; putobj(mobj,"size",mid,&d6); cmobj=mobj; cmid=mid; } if ((d3<=3) || (d3==25)) { if ((iarray=arraynew(sizeof(int)))==NULL) goto errexit; for (j=0;j1)) { if ((s=g_malloc(30))==NULL) goto errexit; if (i==2) sprintf(s,"axis:^%d",anameoid[0]); else sprintf(s,"axis:^%d",anameoid[1]); putobj(aobj,"reference",aid,s); } putobj(aobj,"type",aid,&atype); putobj(aobj,"x",aid,&d1); putobj(aobj,"y",aid,&d2); putobj(aobj,"direction",aid,&d3); putobj(aobj,"length",aid,&d4); iarray=linestyleconv(la0,15); putobj(aobj,"style",aid,iarray); R=(lc0 & 4)?255:0; G=(lc0 & 2)?255:0; B=(lc0 & 1)?255:0; putobj(aobj,"R",aid,&R); putobj(aobj,"G",aid,&G); putobj(aobj,"B",aid,&B); putobj(aobj,"width",aid,&lw0); if ((graphtype==1) || ((i<=1) && (graphtype==2))) { d1=0; if ((i==0) || (i==3)) { if (scdir==0) d1=2; else if (scdir==1) d1=3; else if (scdir==2) d1=1; } else { if (scdir==0) d1=3; else if (scdir==1) d1=2; else if (scdir==2) d1=1; } putobj(aobj,"gauge",aid,&d1); iarray=linestyleconv(la4,15); putobj(aobj,"gauge_style",aid,iarray); R=(lc4 & 4)?255:0; G=(lc4 & 2)?255:0; B=(lc4 & 1)?255:0; putobj(aobj,"gauge_R",aid,&R); putobj(aobj,"gauge_G",aid,&G); putobj(aobj,"gauge_B",aid,&B); putobj(aobj,"gauge_width1",aid,&lw4); putobj(aobj,"gauge_width2",aid,&lw4); putobj(aobj,"gauge_width3",aid,&lw4); ll1*=10; ll2*=10; ll3*=10; putobj(aobj,"gauge_length1",aid,&ll1); putobj(aobj,"gauge_length2",aid,&ll2); putobj(aobj,"gauge_length3",aid,&ll3); } if ((i<=1) || ((i>=2) && (graphtype==1))) { putobj(aobj,"num_num",aid,&scnum); putobj(aobj,"num_begin",aid,&scstart); putobj(aobj,"num_step",aid,&scstep); if (sclog==0) sclog=FALSE; else sclog=TRUE; putobj(aobj,"num_log_pow",aid,&sclog); if (sclr==0) sclr=3; else if (sclr==1) sclr=2; else if (sclr==2) sclr=0; else if (sclr==3) sclr=1; putobj(aobj,"num_align",aid,&sclr); if (i==0){ d1=2; posx=scposx*10; posy=scposy*10; } else if (i==1) { d1=1; posy=-scposx*10; posx=-scposy*10; } else if (i==2) { d1=1; posx=scposx*10; posy=-scposy*10; } else if (i==3) { d1=2; posy=scposx*10; posx=-scposy*10; } putobj(aobj,"num",aid,&d1); putobj(aobj,"num_shift_p",aid,&posx); putobj(aobj,"num_shift_n",aid,&posy); j=0; format[j++]='%'; if (scplus) format[j++]='+'; if (sczero) { format[j++]=scfig[0]; format[j++]=scfig[1]; format[j++]=scfig[2]; format[j++]='f'; } else format[j++]='g'; format[j]='\0'; if ((s=g_malloc(strlen(format)+1))==NULL) goto errexit; strcpy(s,format); putobj(aobj,"num_format",aid,s); if ((s=g_malloc(strlen(fontchar[fff[3+i]])+1))==NULL) goto errexit; strcpy(s,fontchar[fff[3+i]]); putobj(aobj,"num_font",aid,s); putobj(aobj,"num_font_style",aid,&(ffb[3+i])); putobj(aobj,"num_pt",aid,&(ffs[3+i])); putobj(aobj,"num_space",aid,&(ffp[3+i])); putobj(aobj,"num_R",aid,&(ffR[3+i])); putobj(aobj,"num_G",aid,&(ffG[3+i])); putobj(aobj,"num_B",aid,&(ffB[3+i])); } if (hiddenaxis[i]) { d1=0; putobj(aobj,"baseline",aid,&d1); putobj(aobj,"gauge",aid,&d1); putobj(aobj,"num",aid,&d1); } } if (graphtype==0) { if ((agdid=newobj(agdobj))==-1) goto errexit; if ((s=g_malloc(30))==NULL) goto errexit; sprintf(s,"axis:^%d",anameoid[0]); putobj(agdobj,"axis_x",agdid,s); if ((s=g_malloc(30))==NULL) goto errexit; sprintf(s,"axis:^%d",anameoid[1]); putobj(agdobj,"axis_y",agdid,s); iarray=linestyleconv(la1,15); putobj(agdobj,"style1",agdid,iarray); iarray=linestyleconv(la2,15); putobj(agdobj,"style2",agdid,iarray); iarray=linestyleconv(la3,15); putobj(agdobj,"style3",agdid,iarray); R=(lc1 & 4)?255:0; G=(lc1 & 2)?255:0; B=(lc1 & 1)?255:0; putobj(agdobj,"R",agdid,&R); putobj(agdobj,"G",agdid,&G); putobj(agdobj,"B",agdid,&B); putobj(agdobj,"width1",agdid,&lw1); putobj(agdobj,"width2",agdid,&lw2); putobj(agdobj,"width3",agdid,&lw3); gtype=2; arrayinit(&group,sizeof(int)); arrayadd(&group,>ype); arrayadd(&group,&aid2[0]); arrayadd(&group,&aid2[1]); arrayadd(&group,&aid2[2]); arrayadd(&group,&aid2[3]); argv2[0]=(void *)&group; argv2[1]=NULL; exeobj(aobj,"grouping",aid2[3],1,argv2); arraydel(&group); } else if (graphtype==1) { gtype=1; arrayinit(&group,sizeof(int)); arrayadd(&group,>ype); arrayadd(&group,&aid2[0]); arrayadd(&group,&aid2[1]); arrayadd(&group,&aid2[2]); arrayadd(&group,&aid2[3]); argv2[0]=(void *)&group; argv2[1]=NULL; exeobj(aobj,"grouping",aid2[3],1,argv2); arraydel(&group); } else if (graphtype==2) { if ((s=g_malloc(30))==NULL) goto errexit; sprintf(s,"axis:^%d",anameoid[1]); putobj(aobj,"adjust_axis",aid2[0],s); putobj(aobj,"adjust_position",aid2[0],&sccros[1]); exeobj(aobj,"adjust",aid2[0],0,NULL); if ((s=g_malloc(30))==NULL) goto errexit; sprintf(s,"axis:^%d",anameoid[0]); putobj(aobj,"adjust_axis",aid2[1],s); putobj(aobj,"adjust_position",aid2[1],&sccros[0]); exeobj(aobj,"adjust",aid2[1],0,NULL); if (aid2[2]>aid2[3]) { delobj(aobj,aid2[2]); delobj(aobj,aid2[3]); } else { delobj(aobj,aid2[3]); delobj(aobj,aid2[2]); } gtype=3; arrayinit(&group,sizeof(int)); arrayadd(&group,>ype); arrayadd(&group,&aid2[0]); arrayadd(&group,&aid2[1]); argv2[0]=(void *)&group; argv2[1]=NULL; exeobj(aobj,"grouping",aid2[1],1,argv2); arraydel(&group); } /* Merge */ for (i=0;i<10;i++) { if (prmloadline(obj,file,fp,buf,TRUE)!=0) goto errexit; if (strlen(buf)!=0) { if ((mgid=newobj(mgobj))==-1) goto errexit; if ((s=g_malloc(strlen(buf)+1))==NULL) goto errexit; strcpy(s,buf); s=pathconv(s,ignorepath); putobj(mgobj,"file",mgid,s); if (prmloadline(obj,file,fp,buf,TRUE)!=0) goto errexit; if (sscanf2(buf,"%d%d%d",(int *)&d1,(int *)&d2,(int *)&d3)!=3) { error2(obj,ERRPRM,file); goto errexit; } d1*=10; d2*=10; d3=nround(d3/0.21); putobj(mgobj,"left_margin",mgid,&d1); putobj(mgobj,"top_margin",mgid,&d2); putobj(mgobj,"zoom",mgid,&d3); putobj(mgobj,"hidden",mgid,&(dmode[2])); } else { if (prmloadline(obj,file,fp,buf,TRUE)!=0) goto errexit; } } EOD="\n[EOF]\n"; if ((filetype==12) || (filetype==13)) { while (prmloadline(obj,file,fp,buf,FALSE)==0) { if (buf[0]=='[') { if ((s2=strchr(buf,']'))!=NULL) { int ch; if ((filename=g_malloc(s2-buf))==NULL) goto errexit; strncpy(filename,buf+1,s2-buf-1); filename[s2-buf-1]='\0'; filename=pathconv(filename,ignorepath); if (naccess(filename,R_OK)!=0) mkdata=TRUE; else { sprintf(buf2,"`%s' Overwrite existing file?",filename); mkdata=inputyn(buf2); } if (mkdata) { if ((fp2=nfopen(filename,"wt"))==NULL) { error2(obj,ERROPEN,filename); goto errexit; } } i=0; do { ch=nfgetc(fp); if (ch==EOD[i]) i++; else { if (mkdata) for (j=0;j #include #include #include "object.h" #define NAME "regexp" #define PARENT "object" #define OVERSION "1.00.00" #define ERR_REGEXP 100 #define ERR_INVALID_UTF8 101 static char *regexperrorlist[]={ "invalid regular expression.", "invalid UTF-8 string.", }; struct oregexp_local { GRegex *regexp; struct narray *array; }; #define ERRNUM (sizeof(regexperrorlist) / sizeof(*regexperrorlist)) static void del_array_element(struct narray *array) { int i, n; char ***data; n = arraynum(array); data = arraydata(array); for (i = 0; i < n; i++) { g_strfreev(data[i]); } arraydel(array); } static int regexpinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct oregexp_local *local; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; local = g_malloc0(sizeof(*local)); if (local == NULL) { return 1; } local->array = arraynew(sizeof(char **)); if (local->array == NULL) { g_free(local); return 1; } if (_putobj(obj, "_local", inst, local)) { g_free(local); return 1; } return 0; } static int regexpdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct oregexp_local *local; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj, "_local", inst, &local); if (local->regexp) { g_regex_unref(local->regexp); } if (local->array) { del_array_element(local->array); arrayfree(local->array); } return 0; } static int regexp_set(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct oregexp_local *local; GRegex *regexp; char *str; _getobj(obj, "_local", inst, &local); str = (char *) argv[2]; if (str == NULL || str[0] == '\0') { if (local->regexp) { g_regex_unref(local->regexp); } local->regexp = NULL; del_array_element(local->array); return 0; } if (! g_utf8_validate(str, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } regexp = g_regex_new(str, 0, 0, NULL); if (regexp == NULL) { error(obj, ERR_REGEXP); return 1; } if (local->regexp) { g_regex_unref(local->regexp); } local->regexp = regexp; del_array_element(local->array); return 0; } static int regexp_get(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct oregexp_local *local; int i, j, n; char ***strvp, **strv; i = * (int *) argv[2]; j = * (int *) argv[3]; g_free(rval->str); rval->str = NULL; if (i < 0) { return 1; } _getobj(obj, "_local", inst, &local); strvp = arraynget(local->array, i); if (strvp == NULL) { return 1; } strv = *strvp; for (n = 0; strv[n]; n++) { if (n == j) { rval->str = g_strdup(strv[n]); return 0; } } return 1; } static int regexp_num(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct oregexp_local *local; rval->i = 0; _getobj(obj, "_local", inst, &local); rval->i = arraynum(local->array); return 0; } static int regexp_match(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct oregexp_local *local; GMatchInfo *info; int r; char *str, **match; str = (char *) argv[2]; rval->i = 0; _getobj(obj, "_local", inst, &local); if (local->regexp == NULL) { return 1; } del_array_element(local->array); if (str == NULL || str[0] == '\0') { return 1; } info = NULL; r = g_regex_match(local->regexp, str, 0, &info); if (! r) { g_match_info_free(info); return 1; } while (g_match_info_matches(info)) { match = g_match_info_fetch_all(info); arrayadd(local->array, &match); g_match_info_next(info, NULL); } g_match_info_free(info); rval->i = arraynum(local->array); return 0; } static int regexp_replace(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct oregexp_local *local; char *str, *replace; g_free(rval->str); rval->str = NULL; str = (char *) argv[2]; replace = (char *) argv[3]; if (str == NULL || str[0] == '\0') { return 0; } if (replace == NULL) { replace = ""; } if (! g_utf8_validate(str, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } if (! g_utf8_validate(replace, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } _getobj(obj, "_local", inst, &local); if (local->regexp == NULL) { return 1; } rval->str = g_regex_replace(local->regexp, str, -1, 0, replace, 0, NULL); return 0; } int regexp_seq(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct oregexp_local *local; GString *str; int i, n; g_free(rval->str); rval->str = NULL; _getobj(obj, "_local", inst, &local); n = arraynum(local->array); if (n == 0) { return 0; } str = g_string_sized_new(64); if (str == NULL) { return 0; } for (i = 0; i < n; i++) { g_string_append_printf(str, "%d%s", i, (i == n - 1) ? "" : " "); } rval->str = g_string_free(str, FALSE); return 0; } int regexp_rseq(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct oregexp_local *local; GString *str; int i, n; g_free(rval->str); rval->str = NULL; _getobj(obj, "_local", inst, &local); n = arraynum(local->array); if (n == 0) { return 0; } str = g_string_sized_new(64); if (str == NULL) { return 0; } for (i = 0; i < n; i++) { g_string_append_printf(str, "%d%s", n - i - 1, (i == n - 1) ? "" : " "); } rval->str = g_string_free(str, FALSE); return 0; } static struct objtable oregexp[] = { {"init", NVFUNC, NEXEC, regexpinit, NULL, 0}, {"done", NVFUNC, NEXEC, regexpdone, NULL, 0}, {"next", NPOINTER,0, NULL, NULL, 0}, {"@", NSTR, NREAD|NWRITE,regexp_set, NULL, 0}, {"match", NIFUNC, NREAD|NEXEC, regexp_match,"s", 0}, {"replace", NSFUNC,NREAD|NEXEC, regexp_replace,"ss",0}, {"get", NSFUNC, NREAD|NEXEC, regexp_get, "ii", 0}, {"num", NIFUNC, NREAD|NEXEC, regexp_num, "", 0}, {"seq", NSFUNC, NREAD|NEXEC, regexp_seq, "", 0}, {"rseq", NSFUNC, NREAD|NEXEC, regexp_rseq, "", 0}, {"_local",NPOINTER,0, NULL, NULL, 0}, }; #define TBLNUM (sizeof(oregexp) / sizeof(*oregexp)) void * addregexp(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,oregexp,ERRNUM,regexperrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/oagrid.c0000644000175000017500000003031714142161773013070 00000000000000/* * $Id: oagrid.c,v 1.20 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include "object.h" #include "mathfn.h" #include "gra.h" #include "axis.h" #include "oroot.h" #include "odraw.h" #define NAME N_("axisgrid") #define PARENT "draw" #define OVERSION "1.00.00" #define ERRNOAXISINST 100 #define ERRMINMAX 101 #define ERRAXISDIR 102 static char *agriderrorlist[]={ "no instance for axis", "illegal axis min/max.", "illegal axis direction.", }; #define ERRNUM (sizeof(agriderrorlist) / sizeof(*agriderrorlist)) static struct obj_config GridConfig[] = { {"R", OBJ_CONFIG_TYPE_NUMERIC}, {"G", OBJ_CONFIG_TYPE_NUMERIC}, {"B", OBJ_CONFIG_TYPE_NUMERIC}, {"A", OBJ_CONFIG_TYPE_NUMERIC}, {"style1", OBJ_CONFIG_TYPE_STYLE}, {"style2", OBJ_CONFIG_TYPE_STYLE}, {"style3", OBJ_CONFIG_TYPE_STYLE}, {"background", OBJ_CONFIG_TYPE_NUMERIC}, {"BR", OBJ_CONFIG_TYPE_NUMERIC}, {"BG", OBJ_CONFIG_TYPE_NUMERIC}, {"BB", OBJ_CONFIG_TYPE_NUMERIC}, }; #define GRID_CONFIG_TITLE "[axisgrid]" static NHASH GridConfigHash = NULL; static int agridinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int wid1,wid2,wid3,dot,grid; int r,g,b,br,bg,bb,ba; struct narray *style1; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; wid1=5; wid2=10; wid3=20; r=0; g=255; b=255; br=255; bg=255; bb=255; ba=255; style1=arraynew(sizeof(int)); dot=150; grid=TRUE; arrayadd(style1,&dot); arrayadd(style1,&dot); if (_putobj(obj,"width1",inst,&wid1)) return 1; if (_putobj(obj,"width2",inst,&wid2)) return 1; if (_putobj(obj,"width3",inst,&wid3)) return 1; if (_putobj(obj,"style1",inst,style1)) return 1; if (_putobj(obj,"R",inst,&r)) return 1; if (_putobj(obj,"G",inst,&g)) return 1; if (_putobj(obj,"B",inst,&b)) return 1; if (_putobj(obj,"BR",inst,&br)) return 1; if (_putobj(obj,"BG",inst,&bg)) return 1; if (_putobj(obj,"BB",inst,&bb)) return 1; if (_putobj(obj,"BA",inst,&ba)) return 1; if (_putobj(obj,"grid_x",inst,&grid)) return 1; if (_putobj(obj,"grid_y",inst,&grid)) return 1; obj_load_config(obj, inst, GRID_CONFIG_TITLE, GridConfigHash); return 0; } static int agriddone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } struct axis_prm { int type, div; double amin, amax, inc; double min, max; }; struct axis_pos { int dir, len, x, y; double len_x, len_y; }; #define GRID_PRM_NUM 3 struct grid_prm { int wid[GRID_PRM_NUM]; int snum[GRID_PRM_NUM]; int *sdata[GRID_PRM_NUM]; }; static int calc_intersection(int x1, int y1, int dir1, int x2, int y2, int dir2, int *ix, int *iy) { double x, y, a, b; if (dir1 == dir2 || dir1 - dir2 == 18000 || dir1 - dir2 == -18000) return 1; if (x1 == x2 && y1 == y2) { *ix = x1; *iy = y1; return 0; } dir1 = -dir1; dir2 = -dir2; if (dir1 == -9000 || dir1 == -27000) { x = x1; b = tan(dir2 / 18000.0 * MPI); y = y2 + b * (x1 - x2); } else if (dir2 == -9000 || dir2 == -27000) { x = x2; a = tan(dir1 / 18000.0 * MPI); y = y1 + a * (x2 - x1); } else { a = tan(dir1 / 18000.0 * MPI); b = tan(dir2 / 18000.0 * MPI); x = (y2 - y1 + a * x1 - b * x2) / (a - b); y = y1 + a * (x - x1); } if (dir1 == 0 || dir1 == -18000) { y = y1; } else if (dir2 == 0 || dir2 == -18000) { y = y2; } *ix = nround(x); *iy = nround(y); return 0; } static int get_grid_prm(struct objlist *obj, char *axisy, struct axis_prm *prm, struct axis_pos *pos) { struct narray iarray; int anum, id; N_VALUE *inst1; char *raxis; struct objlist *aobj; if (axisy == NULL) { return -1; } arrayinit(&iarray, sizeof(int)); if (getobjilist(axisy, &aobj, &iarray, FALSE, NULL)) return 1; anum = arraynum(&iarray); if (anum < 1) { arraydel(&iarray); error2(obj, ERRNOAXISINST, axisy); return 1; } id = arraylast_int(&iarray); arraydel(&iarray); if ((inst1 = getobjinst(aobj, id)) == NULL) return 1; if (_getobj(aobj, "x", inst1, &pos->x)) return 1; if (_getobj(aobj, "y", inst1, &pos->y)) return 1; if (_getobj(aobj, "length", inst1, &pos->len)) return 1; if (_getobj(aobj, "direction", inst1, &pos->dir)) return 1; if (_getobj(aobj, "min", inst1, &prm->amin)) return 1; if (_getobj(aobj, "max", inst1, &prm->amax)) return 1; if (_getobj(aobj, "inc", inst1, &prm->inc)) return 1; if (_getobj(aobj, "div", inst1, &prm->div)) return 1; if (_getobj(aobj, "type", inst1, &prm->type)) return 1; if ((prm->amin == 0) && (prm->amax == 0) && (prm->inc == 0)) { if (_getobj(aobj, "reference", inst1, &raxis)) return 1; if (raxis) { arrayinit(&iarray, sizeof(int)); if (!getobjilist(raxis, &aobj, &iarray, FALSE, NULL)) { anum = arraynum(&iarray); if (anum > 0) { id = arraylast_int(&iarray); arraydel(&iarray); if (anum > 0 && (inst1 = getobjinst(aobj, id))) { _getobj(aobj, "min", inst1, &prm->amin); _getobj(aobj, "max", inst1, &prm->amax); _getobj(aobj, "inc", inst1, &prm->inc); _getobj(aobj, "div", inst1, &prm->div); _getobj(aobj, "type", inst1, &prm->type); } } } } } pos->dir %= 36000; if (pos->dir < 0) pos->dir += 36000; pos->len_x = pos->len * cos(pos->dir / 18000.0 * MPI); pos->len_y = pos->len * sin(pos->dir / 18000.0 * MPI); if (prm->amin == prm->amax) return 0; switch (prm->type) { case 1: prm->min = log10(prm->amin); prm->max = log10(prm->amax); break; case 2: prm->min = 1 / prm->amin; prm->max = 1 / prm->amax; break; default: prm->min = prm->amin; prm->max = prm->amax; } return 0; } static int draw_grid_line(struct objlist *obj, int GC, struct axis_prm *a1_prm, struct axis_pos *a1_pos, struct axis_pos *a2_pos, struct grid_prm *gprm) { int r, rcode, snum, wid, *sdata; double po; int x0, y0, x, y; struct axislocal alocal; if (getaxispositionini(&alocal, a1_prm->type, a1_prm->amin, a1_prm->amax, a1_prm->inc, a1_prm->div, TRUE)) { error(obj, ERRMINMAX); return 1; } r = calc_intersection(a1_pos->x, a1_pos->y, a2_pos->dir, a2_pos->x, a2_pos->y, a1_pos->dir, &x, &y); if (r) { error(obj, ERRAXISDIR); return 1; } while ((rcode = getaxisposition(&alocal, &po)) != -2) { switch (rcode) { case 1: case 2: case 3: snum = gprm->snum[rcode - 1]; sdata = gprm->sdata[rcode - 1]; wid = gprm->wid[rcode - 1]; break; default: wid = 0; } if (wid == 0) continue; GRAlinestyle(GC, snum, sdata, wid, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); x0 = x + (po - a1_prm->min) * a1_pos->len_x / (a1_prm->max - a1_prm->min); y0 = y - (po - a1_prm->min) * a1_pos->len_y / (a1_prm->max - a1_prm->min); GRAline(GC, x0, y0, x0 + a2_pos->len_x, y0 - a2_pos->len_y); } return 0; } static int draw_background(struct objlist *obj, N_VALUE *inst, int GC, struct axis_pos *ax, struct axis_pos *ay) { int r, br, bg, bb, ba, pos[8]; _getobj(obj, "BR", inst, &br); _getobj(obj, "BG", inst, &bg); _getobj(obj, "BB", inst, &bb); _getobj(obj, "BA", inst, &ba); GRAcolor(GC, br, bg, bb, ba); r = calc_intersection(ax->x, ax->y, ay->dir, ay->x, ay->y, ax->dir, pos + 0, pos + 1); if (r) return 1; pos[2] = pos[0] + ax->len_x; pos[3] = pos[1] - ax->len_y; pos[4] = pos[2] + ay->len_x; pos[5] = pos[3] - ay->len_y; pos[6] = pos[0] + ay->len_x; pos[7] = pos[1] - ay->len_y; GRAdrawpoly(GC, 4, pos, GRA_FILL_MODE_EVEN_ODD); return 0; } static int agriddraw(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int GC, clip, zoom, back; int i, fr, fg, fb, fa, w, h, r, grid_x, grid_y; char *axisx, *axisy; struct axis_prm ax_prm, ay_prm; struct axis_pos ax_pos, ay_pos; struct grid_prm gprm; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; _getobj(obj, "GC", inst, &GC); if (GC < 0) return 0; _getobj(obj, "R", inst, &fr); _getobj(obj, "G", inst, &fg); _getobj(obj, "B", inst, &fb); _getobj(obj, "A", inst, &fa); _getobj(obj, "axis_x", inst, &axisx); _getobj(obj, "axis_y", inst, &axisy); _getobj(obj, "clip", inst, &clip); _getobj(obj, "background", inst, &back); _getobj(obj, "grid_x", inst, &grid_x); _getobj(obj, "grid_y", inst, &grid_y); for (i = 0; i < GRID_PRM_NUM; i++) { char buf[32]; struct narray *st; snprintf(buf, sizeof(buf), "width%d", i + 1); _getobj(obj, buf, inst, &gprm.wid[i]); snprintf(buf, sizeof(buf), "style%d", i + 1); _getobj(obj, buf, inst, &st); gprm.snum[i] = arraynum(st); gprm.sdata[i] = arraydata(st); } r = get_grid_prm(obj, axisx, &ax_prm, &ax_pos); if (r) { return (r > 0) ? 1 : 0; } r = get_grid_prm(obj, axisy, &ay_prm, &ay_pos); if (r) { return (r > 0) ? 1 : 0; } GRAregion(GC, &w, &h, &zoom); GRAview(GC, 0, 0, w * 10000.0 / zoom, h * 10000.0 / zoom, clip); if (back && draw_background(obj, inst, GC, &ax_pos, &ay_pos)) { error(obj, ERRAXISDIR); return 1; } if (ax_prm.amin != ax_prm.amax && ay_prm.amin != ay_prm.amax) { GRAcolor(GC, fr, fg, fb, fa); if (grid_x && draw_grid_line(obj, GC, &ax_prm, &ax_pos, &ay_pos, &gprm)) { goto error_exit; } if (grid_y && draw_grid_line(obj, GC, &ay_prm, &ay_pos, &ax_pos, &gprm)) { goto error_exit; } } error_exit: return 0; } static int agridtight(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { obj_do_tighten(obj, inst, "axis_x"); obj_do_tighten(obj, inst, "axis_y"); return 0; } static int agridsaveconfig(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return obj_save_config(obj, inst, GRID_CONFIG_TITLE, GridConfig, G_N_ELEMENTS(GridConfig)); } static struct objtable agrid[] = { {"init",NVFUNC,NEXEC,agridinit,NULL,0}, {"done",NVFUNC,NEXEC,agriddone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"axis_x",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"axis_y",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"grid_x",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"grid_y",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"width1",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"style1",NIARRAY,NREAD|NWRITE,NULL,NULL,0}, {"width2",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"style2",NIARRAY,NREAD|NWRITE,NULL,NULL,0}, {"width3",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"style3",NIARRAY,NREAD|NWRITE,NULL,NULL,0}, {"background",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"BR",NINT,NREAD|NWRITE,NULL,NULL,0}, {"BG",NINT,NREAD|NWRITE,NULL,NULL,0}, {"BB",NINT,NREAD|NWRITE,NULL,NULL,0}, {"BA",NINT,NREAD|NWRITE,NULL,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,agriddraw,"i",0}, {"tight",NVFUNC,NREAD|NEXEC,agridtight,"",0}, {"hsb", NVFUNC, NREAD|NEXEC, put_hsb,"ddd",0}, {"save_config", NVFUNC, NREAD|NEXEC, agridsaveconfig, "", 0}, }; #define TBLNUM (sizeof(agrid) / sizeof(*agrid)) void * addagrid(void) { if (GridConfigHash == NULL) { unsigned int i; GridConfigHash = nhash_new(); if (GridConfigHash == NULL) return NULL; for (i = 0; i < sizeof(GridConfig) / sizeof(*GridConfig); i++) { if (nhash_set_ptr(GridConfigHash, GridConfig[i].name, (void *) &GridConfig[i])) { nhash_free(GridConfigHash); return NULL; } } } return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,agrid,ERRNUM,agriderrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/ngraph.ico0000644000175000017500000004107613070106167013431 00000000000000@@ (B(@ @  } uapp 0pp???ngraph-gtk-6.09.05/src/osystem.h0000644000175000017500000000037213211506204013315 00000000000000#ifndef OSYSTEM_HEADER #define OSYSTEM_HEADER typedef void (* DRAW_NOTIFY_FUNC)(int); int system_set_exec_func(const char *name, ngraph_plugin_exec func); void system_set_draw_notify_func(DRAW_NOTIFY_FUNC func); void system_draw_notify(void); #endif ngraph-gtk-6.09.05/src/object.h0000644000175000017500000003034114105654265013075 00000000000000/* * $Id: object.h,v 1.20 2010-01-04 05:11:28 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef N_OBJECT_HEADER #define N_OBJECT_HEADER #define TEXT_SIZE_MIN 500 #define OBJ_MAX 128 #include "nhash.h" #include "ngraph.h" struct objlist; struct objtable; enum OBJ_LIST_SPECIFIED_TYPE { OBJ_LIST_SPECIFIED_NOT_FOUND, OBJ_LIST_SPECIFIED_BY_ID, OBJ_LIST_SPECIFIED_BY_OID, OBJ_LIST_SPECIFIED_BY_NAME, OBJ_LIST_SPECIFIED_BY_OTHER, }; union n_value { int i; double d; char *str; struct narray *array; void *ptr; union n_value *inst; }; typedef union n_value N_VALUE; typedef int (*Proc)(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); typedef int (*DoneProc)(struct objlist *obj,void *local); typedef int (*UNDO_DUP_FUNC)(struct objlist *obj, N_VALUE *src, N_VALUE *dest); typedef int (*UNDO_FREE_FUNC)(struct objlist *obj, N_VALUE *inst); struct undo_inst { int operation; int curinst, lastinst, lastoid, lastinst2; N_VALUE *inst; struct undo_inst *next; }; struct objtable { char *name; enum ngraph_object_field_type type; int attrib; Proc proc; void *arglist; int offset; }; struct objlist { int id; int curinst; int lastinst; int lastoid; char *name; char *alias; char *ver; int tblnum, fieldnum; struct objtable *table; NHASH table_hash; int size; int errnum; char **errtable; N_VALUE *root; N_VALUE *root2; int lastinst2; struct undo_inst *undo, *redo; struct objlist *parent; struct objlist *next, *child; int idp,oidp,nextp; void *local; DoneProc doneproc; UNDO_DUP_FUNC dup_func; UNDO_FREE_FUNC free_func; }; struct narray { unsigned int size; unsigned int base; unsigned int num; void *data; }; struct loopproc; struct loopproc { struct loopproc *next; const char *objname; const char *evname; struct objlist *obj; int idn; N_VALUE *inst; void *local; }; #define ERRUNKNOWN 0 #define ERRHEAP 1 #define ERRPARENT 2 #define ERRDUP 3 #define ERROBJNUM 4 #define ERRINSTNUM 5 #define ERROBJFOUND 6 #define ERRVALFOUND 7 #define ERRNONEXT 8 #define ERRNOID 9 #define ERRIDFOUND 10 #define ERROIDFOUND 11 #define ERRNMFOUND 12 #define ERRDESTRUCT 13 #define ERRPERMISSION 14 #define ERROBJCINST 15 #define ERRNOINST 16 #define ERRILOBJ 17 #define ERRILINST 18 #define ERRFIELD 19 #define ERROEXTARG 20 #define ERROSMLARG 21 #define ERROVALUE 22 #define ERROVERWRITE 23 extern int (*getstdin)(void); extern int (*putstdout)(const char *s); extern int (*putstderr)(const char *s); extern int (*printfstdout)(const char *fmt,...); extern int (*printfstderr)(const char *fmt,...); extern int (*ninterrupt)(void); extern int (*inputyn)(const char *mes); extern void (*ndisplaydialog)(const char *str); extern void (*ndisplaystatus)(const char *str); struct savedstdio { int (*getstdin)(void); int (*putstdout)(const char *s); int (*putstderr)(const char *s); int (*printfstdout)(const char *fmt,...); int (*printfstderr)(const char *fmt,...); int (*ninterrupt)(void); int (*inputyn)(const char *mes); void (*ndisplaydialog)(const char *str); void (*ndisplaystatus)(const char *str); }; extern struct savedstdio stdiosave; int seputs(const char *s); int seprintf(const char *fmt,...); void error(struct objlist *obj,int code); void error2(struct objlist *obj,int code, const char *mes); void error22(struct objlist *obj,int code, const char *mes1, const char *mes2); void error3(struct objlist *obj,int code,int num); void ignorestdio(struct savedstdio *save); void restorestdio(struct savedstdio *save); void savestdio(struct savedstdio *save); void loadstdio(struct savedstdio *save); void arrayinit(struct narray *array,unsigned int base); struct narray *arraynew(unsigned int base); void *arraydata(struct narray *array); unsigned int arraynum(struct narray *array); void arraydel(struct narray *array); void arraydel2(struct narray *array); void arrayclear(struct narray *array); void arrayclear2(struct narray *array); void arrayfree(struct narray *array); void arrayfree2(struct narray *array); struct narray *arrayadd(struct narray *array,const void *val); struct narray *arrayadd2(struct narray *array,const char *val); struct narray *arrayins(struct narray *array,const void *val,unsigned int idx); struct narray *arrayins2(struct narray *array,const char *val,unsigned int idx); struct narray *arrayndel(struct narray *array,unsigned int idx); struct narray *arrayndel2(struct narray *array,unsigned int idx); struct narray *arrayput(struct narray *array,const void *val,unsigned int idx); struct narray *arrayput2(struct narray *array,const char *val,unsigned int idx); struct narray *array_reverse(struct narray *array); struct narray *array_slice(struct narray *array, int start, int length); struct narray *array_slice2(struct narray *array, int start, int length); struct narray *arraydup(struct narray *array); struct narray *arraydup2(struct narray *array); void *arraynget(struct narray *array,unsigned int idx); int arraynget_int(struct narray *array, unsigned int idx); double arraynget_double(struct narray *array, unsigned int idx); char *arraynget_str(struct narray *array, unsigned int idx); void *arraylast(struct narray *array); int arraylast_int(struct narray *array); int array_find_int(struct narray *array, int number); void arraysort_int(struct narray *array); void arrayrsort_int(struct narray *array); void arrayuniq_int(struct narray *array); void arraysort_double(struct narray *array); void arrayrsort_double(struct narray *array); void arrayuniq_double(struct narray *array); void arrayrsort_str(struct narray *array); void arraysort_str(struct narray *array); void arrayuniq_str(struct narray *array); void arrayuniq_all_str(struct narray *array); int arraycmp(struct narray *a, struct narray *b); int arraycpy(struct narray *a, struct narray *b); int getargc(char **arg); char **arg_add(char ***arg,void *ptr); void arg_del(char **arg); void registerevloop(const char *objname, const char *evname, struct objlist *obj,int idn,N_VALUE *inst,void *local); void unregisterevloop(struct objlist *obj,int idn,N_VALUE *inst); void eventloop(void); struct objlist *chkobjroot(void); void *addobject(char *name,char *alias,char *parentname, char *ver,int tblnum,struct objtable *table, int errnum,char **errtable,void *local,DoneProc doneproc); void hideinstance(struct objlist *obj); void recoverinstance(struct objlist *obj); struct objlist *chkobject(const char *name); int chkobjectid(struct objlist *obj); const char *chkobjectname(struct objlist *obj); const char *chkobjectalias(struct objlist *obj); struct objlist *chkobjparent(struct objlist *obj); int chkobjchild(struct objlist *parent,struct objlist *child); char *chkobjver(struct objlist *obj); int chkobjsize(struct objlist *obj); int chkobjlastinst(struct objlist *obj); int chkobjcurinst(struct objlist *obj); int chkobjoffset(struct objlist *obj, const char *name); int chkobjoffset2(struct objlist *obj,int tblpos); N_VALUE *chkobjinstoid(struct objlist *obj,int oid); N_VALUE *chkobjinst(struct objlist *obj,int id); int chkobjoid(struct objlist *obj,int oid); int chkobjfieldnum(struct objlist *obj); char *chkobjfieldname(struct objlist *obj,int num); int chkobjfield(struct objlist *obj, const char *name); int chkobjperm(struct objlist *obj, const char *name); enum ngraph_object_field_type chkobjfieldtype(struct objlist *obj, const char *name); const char *chkobjarglist(struct objlist *obj, const char *name); struct objlist *getobject(const char *name); char *getobjver(const char *name); char *getobjectname(struct objlist *obj); int getobjoffset(struct objlist *obj, const char *name); int getobjtblpos(struct objlist *obj, const char *name,struct objlist **robj); N_VALUE *getobjinstoid(struct objlist *obj,int oid); N_VALUE *getobjinst(struct objlist *obj,int id); int getobjfield(struct objlist *obj, const char *name); int _putobj(struct objlist *obj, const char *vname,N_VALUE *inst,void *val); int _getobj(struct objlist *obj, const char *vname,N_VALUE *inst,void *val); int _exeparent(struct objlist *obj,const char *vname,N_VALUE *inst,N_VALUE *rval, int argc,char **argv); int _exeobj(struct objlist *obj,const char *vname,N_VALUE *inst,int argc,char **argv); int __exeobj(struct objlist *obj,int idn,N_VALUE *inst,int argc,char **argv); int copyobj(struct objlist *obj, const char *vname,int did,int sid); int newobj(struct objlist *obj); int newobj_alias(struct objlist *obj, const char *name); int delobj(struct objlist *obj,int delid); int putobj(struct objlist *obj, const char *vname,int id,void *val); int getobj(struct objlist *obj, const char *vname,int id, int argc,char **argv,void *val); int exeobj(struct objlist *obj,const char *vname,int id,int argc,char **argv); int moveobj(struct objlist *obj,int did,int sid); int moveupobj(struct objlist *obj,int id); int movetopobj(struct objlist *obj,int id); int movedownobj(struct objlist *obj,int id); int movelastobj(struct objlist *obj,int id); int exchobj(struct objlist *obj,int id1,int id2); void set_newobj_cb(void (* newobj_cb)(struct objlist *obj)); void set_delobj_cb(void (* delobj_cb)(struct objlist *obj)); int getobjiname(char *s, char **name, char **ptr); int chkobjilist(char *s,struct objlist **obj,struct narray *iarray, int def,int *spc); int getobjilist(char *s,struct objlist **obj,struct narray *iarray, int def,int *spc); int chkobjilist2(char **s,struct objlist **obj,struct narray *iarray, int def); char *mkobjlist(struct objlist *obj, const char *objname,int id, const char *field,int oid); struct objlist *getobjlist(char *list,int *id,char **field,int *oid); char *chgobjlist(char *olist); char *getvaluestr(struct objlist *obj, const char *field,void *val,int cr,int quote); int isobject(char **s); int schkobjfield(struct objlist *obj,int id, const char *field,char *arg, char **valstr,int limittype,int cr,int quote); int sgetobjfield(struct objlist *obj,int id, const char *field,char *arg, char **valstr,int limittype,int cr,int quote); int sgetfield(struct objlist *obj,int id,char *arg,char **valstr, int limittype,int cr,int quote); struct narray *sgetobj(char *arg,int limittype,int cr,int quote); int sputobjfield(struct objlist *obj,int id, const char *field,char *arg); int sputfield(struct objlist *obj,int id,char *arg); int sputobj(char *arg); int sexefield(struct objlist *obj,int id,char *arg); int sexeobj(char *arg); int has_eventloop(void); void obj_do_tighten(struct objlist *obj, N_VALUE *inst, const char *field); void obj_do_tighten_all(struct objlist *obj, N_VALUE *inst, const char *field); int getobjilist2(char **s,struct objlist **obj,struct narray *iarray,int def); void delchildobj(struct objlist *parent); int vinterrupt(void); int vinputyn(const char *mes); int copy_obj_field(struct objlist *obj, int dist, int src, char **ignore_field); int str_calc(const char *str, double *val, int *r, char **err_msg); typedef int (*UNDO_FUNC)(struct objlist *obj); int undo_save(struct objlist *obj); int undo_undo(struct objlist *obj); int undo_redo(struct objlist *obj); int undo_clear(struct objlist *obj); int undo_delete(struct objlist *obj); void obj_set_undo_func(struct objlist *obj, UNDO_DUP_FUNC dup_func, UNDO_FREE_FUNC free_func); int obj_get_field_pos(struct objlist *obj, const char *field); int undo_check_undo(struct objlist *obj); int undo_check_redo(struct objlist *obj); double arg_to_double(char **argv, int index); #endif ngraph-gtk-6.09.05/src/ofit.h0000644000175000017500000000027014142161773012564 00000000000000#ifndef OFIT_HEADER #define OFIT_HEADER enum FIT_OBJ_TYPE { FIT_TYPE_POLY, FIT_TYPE_POW, FIT_TYPE_EXP, FIT_TYPE_LOG, FIT_TYPE_USER, }; #define FIT_DIMENSION_MAX 10 #endif ngraph-gtk-6.09.05/src/mathcode.c0000644000175000017500000000021213070106167013371 00000000000000#include char *matherrorchar[]={ "noerr", "err", "nan", "undef", "syntax", "cont", "break", "nonum", "eof", NULL }; ngraph-gtk-6.09.05/src/gtk/0000755000175000017500000000000014143613315012313 500000000000000ngraph-gtk-6.09.05/src/gtk/x11dialg.c0000644000175000017500000011431714142161773014025 00000000000000/* * $Id: x11dialg.c,v 1.53 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include #include "object.h" #include "mathfn.h" #include "nstring.h" #include "ogra2cairo.h" #include "ox11menu.h" #include "x11menu.h" #include "x11gui.h" #include "x11dialg.h" #include "gtk_liststore.h" #include "gtk_combo.h" #include "gtk_widget.h" #define LINE_ELEMENT_2(e1, e2) #e1 " " #e2, {e1, e2}, 2 #define LINE_ELEMENT_4(e1, e2, e3, e4) #e1 " " #e2 " " #e3 " " #e4, {e1, e2, e3, e4}, 4 #define LINE_ELEMENT_6(e1, e2, e3, e4, e5, e6) #e1 " " #e2 " " #e3 " " #e4 " " #e5 " " #e6, {e1, e2, e3, e4, e5, e6}, 6 struct line_style FwLineStyle[] = { {N_("solid"), "", {0}, 0}, {N_("dot"), LINE_ELEMENT_2(100, 100)}, {N_("short dash"), LINE_ELEMENT_2(150, 150)}, {N_("dash"), LINE_ELEMENT_2(450, 150)}, {N_("dot dash"), LINE_ELEMENT_4(450, 150, 150, 150)}, {N_("2-dot dash"), LINE_ELEMENT_6(450, 150, 150, 150, 150, 150)}, {N_("dot 2-dash"), LINE_ELEMENT_6(450, 150, 450, 150, 150, 150)}, {NULL, NULL, {0}, -1}, }; #define CLINESTYLE ((sizeof(FwLineStyle) / sizeof(*FwLineStyle)) - 1) char *FwNumStyle[] = {N_("auto"), "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; int FwNumStyleNum = sizeof(FwNumStyle) / sizeof(*FwNumStyle); struct FileDialog DlgFile; struct FileDialog DlgRange; struct FileDialog DlgArray; struct FileDialog DlgFileDef; struct EvalDialog DlgEval; struct MathDialog DlgMath; struct MathTextDialog DlgMathText; struct FitDialog DlgFit; struct FitLoadDialog DlgFitLoad; struct FitSaveDialog DlgFitSave; struct SectionDialog DlgSection; struct CrossDialog DlgCross; struct AxisDialog DlgAxis; struct GridDialog DlgGrid; struct GridDialog DlgGridDef; struct ZoomDialog DlgZoom; struct MergeDialog DlgMerge; struct ParameterDialog DlgParameter; struct LegendDialog DlgLegendArrow; struct LegendDialog DlgLegendRect; struct LegendDialog DlgLegendArc; struct LegendDialog DlgLegendMark; struct LegendDialog DlgLegendText; struct LegendDialog DlgLegendTextDef; struct LegendGaussDialog DlgLegendGauss; struct PageDialog DlgPage; struct SwitchDialog DlgSwitch; struct DirectoryDialog DlgDirectory; struct LoadDialog DlgLoad; struct SaveDialog DlgSave; struct OutputDataDialog DlgOutputData; struct DefaultDialog DlgDefault; struct SetScriptDialog DlgSetScript; struct PrefScriptDialog DlgPrefScript; struct PrefFontDialog DlgPrefFont; struct FontSettingDialog DlgFontSetting; struct MiscDialog DlgMisc; struct ExViewerDialog DlgExViewer; struct ViewerDialog DlgViewer; struct SelectDialog DlgSelect; struct CopyDialog DlgCopy; struct OutputImageDialog DlgImageOut; static void SetTextFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field); static int SetObjFieldFromSpin(GtkWidget *w, struct objlist *Obj, int Id, char *field); static void SetSpinFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field); static int SetObjFieldFromToggle(GtkWidget *w, struct objlist *Obj, int Id, char *field); static void SetToggleFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field); static int SetObjFieldFromList(GtkWidget *w, struct objlist *Obj, int Id, char *field); static void SetListFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field); static int SetObjFieldFromText(GtkWidget *w, struct objlist *Obj, int Id, char *field); void initdialog(void) { DlgFile.widget = NULL; DlgFile.focus = NULL; DlgFile.resource = N_("file"); DlgFile.mark.widget = NULL; DlgFile.mark.focus = NULL; DlgFile.mark.resource = N_("mark selection"); DlgRange.widget = NULL; DlgRange.focus = NULL; DlgRange.resource = N_("function"); DlgRange.mark.widget = NULL; DlgRange.mark.focus = NULL; DlgRange.mark.resource = NULL; DlgArray.widget = NULL; DlgArray.focus = NULL; DlgArray.resource = N_("array"); DlgArray.mark.widget = NULL; DlgArray.mark.focus = NULL; DlgArray.mark.resource = NULL; DlgFileDef.widget = NULL; DlgFileDef.focus = NULL; DlgFileDef.resource = N_("data default"); DlgFileDef.mark.widget = NULL; DlgFileDef.mark.focus = NULL; DlgFileDef.mark.resource = N_("mark selection"); DlgEval.widget = NULL; DlgEval.focus = NULL; DlgEval.resource = N_("evaluation"); DlgMath.widget = NULL; DlgMath.focus = NULL; DlgMath.resource = N_("math"); DlgMathText.widget = NULL; DlgMathText.focus = NULL; DlgMathText.resource = N_("math text"); DlgFit.widget = NULL; DlgFit.focus = NULL; DlgFit.resource = N_("fit"); DlgFitLoad.widget = NULL; DlgFitLoad.focus = NULL; DlgFitLoad.resource = N_("fit load"); DlgFitSave.widget = NULL; DlgFitSave.focus = NULL; DlgFitSave.Profile = NULL; DlgFitSave.resource = N_("fit save"); DlgSection.widget = NULL; DlgSection.focus = NULL; DlgSection.resource = N_("Frame/Section Graph"); DlgCross.widget = NULL; DlgCross.focus = NULL; DlgCross.resource = N_("Cross Graph"); DlgAxis.widget = NULL; DlgAxis.focus = NULL; DlgAxis.resource = N_("axis"); DlgGrid.widget = NULL; DlgGrid.focus = NULL; DlgGrid.resource = N_("grid"); DlgGridDef.widget = NULL; DlgGridDef.focus = NULL; DlgGridDef.resource = N_("grid default"); DlgZoom.widget = NULL; DlgZoom.focus = NULL; DlgZoom.resource = N_("Scale Zoom"); DlgZoom.zoom = 20000; DlgMerge.widget = NULL; DlgMerge.focus = NULL; DlgMerge.resource = N_("merge"); DlgParameter.widget = NULL; DlgParameter.focus = NULL; DlgParameter.resource = N_("parameter"); DlgLegendArrow.widget = NULL; DlgLegendArrow.focus = NULL; DlgLegendArrow.arrow_pixmap = NULL; DlgLegendArrow.resource = N_("legend line"); DlgLegendRect.widget = NULL; DlgLegendRect.focus = NULL; DlgLegendRect.resource = N_("legend rectangle"); DlgLegendArc.widget = NULL; DlgLegendArc.focus = NULL; DlgLegendArc.resource = N_("legend arc"); DlgLegendMark.widget = NULL; DlgLegendMark.focus = NULL; DlgLegendMark.resource = N_("legend mark"); DlgLegendMark.mark.widget = NULL; DlgLegendMark.mark.focus = NULL; DlgLegendMark.mark.resource = N_("mark selection"); DlgLegendText.widget = NULL; DlgLegendText.focus = NULL; DlgLegendText.resource = N_("legend text"); DlgLegendTextDef.widget = NULL; DlgLegendTextDef.focus = NULL; DlgLegendTextDef.resource = N_("text default"); DlgLegendGauss.widget = NULL; DlgLegendGauss.focus = NULL; DlgLegendGauss.resource = N_("legend gauss"); DlgPage.widget = NULL; DlgPage.focus = NULL; DlgPage.resource = N_("page"); DlgSwitch.widget = NULL; DlgSwitch.focus = NULL; DlgSwitch.resource = N_("drawobj"); DlgDirectory.widget = NULL; DlgDirectory.focus = NULL; DlgDirectory.resource = N_("directory"); DlgLoad.widget = NULL; DlgLoad.focus = NULL; DlgLoad.exdir = NULL; DlgLoad.resource = N_("load"); DlgSave.widget = NULL; DlgSave.focus = NULL; DlgSave.resource = N_("save"); DlgOutputData.widget = NULL; DlgOutputData.focus = NULL; DlgOutputData.resource = N_("output data"); DlgDefault.widget = NULL; DlgDefault.focus = NULL; DlgDefault.resource = N_("save default"); DlgSetScript.widget = NULL; DlgSetScript.focus = NULL; DlgSetScript.resource = N_("Add-in script"); DlgPrefScript.widget = NULL; DlgPrefScript.focus = NULL; DlgPrefScript.resource = N_("Add-in script setup"); DlgPrefFont.widget = NULL; DlgPrefFont.focus = NULL; DlgPrefFont.resource = N_("Font"); DlgMisc.widget = NULL; DlgMisc.focus = NULL; DlgMisc.resource = N_("Miscellaneous"); DlgExViewer.widget = NULL; DlgExViewer.focus = NULL; DlgExViewer.resource = N_("External viewer"); DlgViewer.widget = NULL; DlgViewer.focus = NULL; DlgViewer.resource = N_("Viewer"); DlgSelect.widget = NULL; DlgSelect.focus = NULL; DlgSelect.resource = N_("multi select"); DlgCopy.widget = NULL; DlgCopy.focus = NULL; DlgCopy.resource = N_("single select"); DlgImageOut.widget = NULL; DlgImageOut.focus = NULL; DlgImageOut.resource = N_("output image"); } static void multi_list_default_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { struct SelectDialog *d; GtkTreeSelection *sel; int n; d = (struct SelectDialog *) user_data; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); n = gtk_tree_selection_count_selected_rows(sel); if (n < 1) return; gtk_dialog_response(GTK_DIALOG(d->widget), GTK_RESPONSE_OK); } static gboolean key_pressed_cb(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct SelectDialog *d; d = (struct SelectDialog *) user_data; if (keyval == GDK_KEY_Return) { multi_list_default_cb(GTK_TREE_VIEW(d->list), NULL, NULL, user_data); return TRUE; } return FALSE; } static int search_id(GtkWidget *list, int id) { GtkTreeModel *model; GtkTreeIter iter; int r, a, i; model = gtk_tree_view_get_model(GTK_TREE_VIEW(list)); r = gtk_tree_model_get_iter_first(model, &iter); i = 0; while (r) { gtk_tree_model_get(model, &iter, 0, &a, -1); if (a == id) return i; r = gtk_tree_model_iter_next(model, &iter); i++; } return -1; } static void SelectDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct SelectDialog *d; int i, *seldata, selnum, a; GtkTreeIter iter; n_list_store list[] = { {"id", G_TYPE_INT, TRUE, FALSE, NULL, 0, 0, 0, 0, PANGO_ELLIPSIZE_NONE, 0}, {"property", G_TYPE_STRING, TRUE, FALSE, NULL, 0, 0, 0, 0, PANGO_ELLIPSIZE_END, 0}, }; d = (struct SelectDialog *) data; if (makewidget) { GtkWidget *swin, *w, *hbox; d->list = list_store_create(sizeof(list) / sizeof(*list), list); list_store_set_sort_all(d->list); list_store_set_selection_mode(d->list, GTK_SELECTION_MULTIPLE); add_event_key(d->list, G_CALLBACK(key_pressed_cb), NULL, d); g_signal_connect(d->list, "row-activated", G_CALLBACK(multi_list_default_cb), d); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), d->list); gtk_dialog_add_button(GTK_DIALOG(wi), _("_All"), IDSALL); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), swin); gtk_box_pack_start(GTK_BOX(d->vbox), w, TRUE, TRUE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = gtk_button_new_with_mnemonic(_("Select _All")); set_button_icon(w, "edit-select-all"); g_signal_connect(w, "clicked", G_CALLBACK(list_store_select_all_cb), d->list); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); gtk_window_set_default_size(GTK_WINDOW(wi), -1, 300); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } gtk_window_set_title(GTK_WINDOW(d->widget), (d->title) ? d->title : d->resource); list_store_clear(d->list); for (i = 0; i <= chkobjlastinst(d->Obj); i++) { char *s; s = d->cb(d->Obj, i); if (s) { list_store_append(d->list, &iter); list_store_set_int(d->list, &iter, 0, i); list_store_set_string(d->list, &iter, 1, CHK_STR(s)); g_free(s); } } /* if (makewidget) { XtManageChild(d->widget); d->widget = NULL; XtVaSetValues(XtNameToWidget(w, "*list"), XmNwidth, 200, NULL); } */ if (chkobjlastinst(d->Obj) == 0) { list_store_select_nth(d->list, 0); } else if (d->isel) { seldata = arraydata(d->isel); selnum = arraynum(d->isel); for (i = 0; i < selnum; i++) { a = search_id(d->list, seldata[i]); if (a >= 0) { list_store_multi_select_nth(d->list, a, a); } } } } static void select_tree_selection_foreach_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { int a; struct SelectDialog *d; d = (struct SelectDialog *) data; a = list_store_get_int(d->list, iter, 0); arrayadd(d->sel, &a); } static void SelectDialogClose(GtkWidget *w, void *data) { struct SelectDialog *d; d = (struct SelectDialog *) data; if (d->ret == IDOK) { GtkTreeSelection *gsel; gsel = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); gtk_tree_selection_selected_foreach(gsel, select_tree_selection_foreach_cb, data); } else if (d->ret == IDSALL) { int r, id; GtkTreeIter iter; r = list_store_get_iter_first(d->list, &iter); while (r) { id = list_store_get_int(d->list, &iter, 0); arrayadd(d->sel, &id); r = list_store_iter_next(d->list, &iter); } d->ret = IDOK; } } void SelectDialog(struct SelectDialog *data, struct objlist *obj, const char *title, char *(*callback) (struct objlist * obj, int id), struct narray *array, struct narray *iarray) { data->SetupWindow = SelectDialogSetup; data->CloseWindow = SelectDialogClose; data->Obj = obj; data->cb = callback; arrayinit(array, sizeof(int)); data->sel = array; data->isel = iarray; data->title = title; } static void single_list_default_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { struct CopyDialog *d; int i; d = (struct CopyDialog *) user_data; i = list_store_get_selected_index(d->list); if (i < 0) { return; } gtk_dialog_response(GTK_DIALOG(d->widget), GTK_RESPONSE_OK); } static void CopyDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct CopyDialog *d; int i, a; GtkTreeIter iter; n_list_store copy_list[] = { {"id", G_TYPE_INT, TRUE, FALSE, NULL, 0, 0, 0, 0, PANGO_ELLIPSIZE_NONE, 0}, {"property", G_TYPE_STRING, TRUE, FALSE, NULL, 0, 0, 0, 0, PANGO_ELLIPSIZE_END, 0}, }; d = (struct CopyDialog *) data; if (makewidget) { GtkWidget *swin, *w; d->list = list_store_create(sizeof(copy_list) / sizeof(*copy_list), copy_list); list_store_set_sort_all(d->list); list_store_set_selection_mode(d->list, GTK_SELECTION_SINGLE); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), d->list); g_signal_connect(d->list, "row-activated", G_CALLBACK(single_list_default_cb), d); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), swin); gtk_box_pack_start(GTK_BOX(d->vbox), w, TRUE, TRUE, 0); gtk_window_set_default_size(GTK_WINDOW(wi), -1, 300); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } gtk_window_set_title(GTK_WINDOW(d->widget), (d->title) ? d->title : d->resource); list_store_clear(d->list); for (i = 0; i <= chkobjlastinst(d->Obj); i++) { char *s; s = d->cb(d->Obj, i); if (s) { list_store_append(d->list, &iter); list_store_set_int(d->list, &iter, 0, i); list_store_set_string(d->list, &iter, 1, CHK_STR(s)); g_free(s); } } if (chkobjlastinst(d->Obj) == 0) { list_store_select_nth(d->list, 0); } else if (d->Id >= 0) { a = search_id(d->list, d->Id); if (a >= 0) { list_store_select_nth(d->list, a); } } /* if (makewidget) { XtManageChild(d->widget); d->widget = NULL; XtVaSetValues(XtNameToWidget(w, "*list"), XmNwidth, 200, NULL); } */ } static void CopyDialogClose(GtkWidget *w, void *data) { struct CopyDialog *d; d = (struct CopyDialog *) data; if (d->ret == IDCANCEL) { return; } d->sel = list_store_get_selected_int(d->list, 0); } void CopyDialog(struct CopyDialog *data, struct objlist *obj, int id, const char *title, char *(*callback) (struct objlist * obj, int id)) { data->SetupWindow = CopyDialogSetup; data->CloseWindow = CopyDialogClose; data->Obj = obj; data->Id = id; data->cb = callback; data->sel = id; data->title = title; } int CopyClick(GtkWidget *parent, struct objlist *obj, int Id, char *(*callback) (struct objlist * obj, int id)) { int sel; CopyDialog(&DlgCopy, obj, Id, _("copy property (single select)"), callback); if (DialogExecute(parent, &DlgCopy) == IDOK) { sel = DlgCopy.sel; } else { sel = -1; } return sel; } int SetObjPointsFromText(GtkWidget *w, struct objlist *Obj, int Id, char *field) { GtkTreeModel *list; GtkTreeIter iter; GtkTreeView *tree_view; struct narray *array, *atmp; unsigned int i; int r, ip; double point[2]; if (w == NULL) { return 0; } tree_view = GTK_TREE_VIEW(w); list = gtk_tree_view_get_model(tree_view); r = gtk_tree_model_get_iter_first(list, &iter); if (! r) { return -1; } array = arraynew(sizeof(int)); if (array == NULL) { return -1; } while (r) { gtk_tree_model_get(list, &iter, 0, point, 1, point + 1, -1); for (i = 0; i < sizeof(point) / sizeof(*point); i++) { ip = nround(point[i] * 100); atmp = arrayadd(array, &ip); if (atmp == NULL){ goto ErrEnd; } array = atmp; } r = gtk_tree_model_iter_next(list, &iter); } if (get_graph_modified()) { if (putobj(Obj, field, Id, array) < 0) { goto ErrEnd; } } else { char *str1, *str2; sgetobjfield(Obj, Id, field, NULL, &str1, FALSE, FALSE, FALSE); if (putobj(Obj, field, Id, array) < 0) { g_free(str1); goto ErrEnd; } sgetobjfield(Obj, Id, field, NULL, &str2, FALSE, FALSE, FALSE); if (str1 && str2 && strcmp(str1, str2)) { set_graph_modified(); } g_free(str2); g_free(str1); } return 0; ErrEnd: if (array) { arrayfree(array); } gtk_widget_grab_focus(w); return -1; } void SetTextFromObjPoints(GtkWidget *w, struct objlist *Obj, int Id, char *field) { GtkListStore *list; GtkTreeIter iter; GtkTreeView *tree_view; struct narray *array; int i, n, *points; if (w == NULL) { return; } tree_view = GTK_TREE_VIEW(w); list = GTK_LIST_STORE(gtk_tree_view_get_model(tree_view)); gtk_list_store_clear(list); getobj(Obj, field, Id, 0, NULL, &array); n = arraynum(array); points = arraydata(array); for (i = 0; i < n / 2; i++) { gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, 0, points[i * 2] / 100.0, 1, points[i * 2 + 1] / 100.0, -1); } } int chk_sputobjfield(struct objlist *obj, int id, char *field, char *str) { if (get_graph_modified()) { if (sputobjfield(obj, id, field, str)) { return 1; } } else { char *ptr, *org; sgetobjfield(obj, id, field, NULL, &org, FALSE, FALSE, FALSE); if (sputobjfield(obj, id, field, str)) { g_free(org); return 1; } sgetobjfield(obj, id, field, NULL, &ptr, FALSE, FALSE, FALSE); if ((ptr == NULL && org) || (ptr && org == NULL) || (ptr && org && strcmp(ptr, org))) { set_graph_modified(); } g_free(ptr); g_free(org); } return 0; } int SetObjFieldFromWidget(GtkWidget *w, struct objlist *Obj, int Id, char *field) { int r = 0; if (w == NULL) { return 0; } if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_SPIN_BUTTON)) { r = SetObjFieldFromSpin(w, Obj, Id, field); } else if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_ENTRY)) { r = SetObjFieldFromText(w, Obj, Id, field); } else if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_COMBO_BOX)) { if (gtk_combo_box_get_has_entry(GTK_COMBO_BOX(w))) { r = SetObjFieldFromText(gtk_bin_get_child(GTK_BIN(w)), Obj, Id, field); } else { r = SetObjFieldFromList(w, Obj, Id, field); } } else if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_TOGGLE_BUTTON)) { r = SetObjFieldFromToggle(w, Obj, Id, field); } if (r) { gtk_widget_grab_focus(w); } return r; } void SetWidgetFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field) { if (w == NULL) { return; } if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_SPIN_BUTTON)) { SetSpinFromObjField(w, Obj, Id, field); } else if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_ENTRY)) { SetTextFromObjField(w, Obj, Id, field); } else if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_COMBO_BOX)) { if (gtk_combo_box_get_has_entry(GTK_COMBO_BOX(w))) { SetTextFromObjField(gtk_bin_get_child(GTK_BIN(w)), Obj, Id, field); } else { SetListFromObjField(w, Obj, Id, field); } } else if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_TOGGLE_BUTTON)) { SetToggleFromObjField(w, Obj, Id, field); } } static int SetObjFieldFromText(GtkWidget *w, struct objlist *Obj, int Id, char *field) { const char *tmp; char *buf; if (w == NULL) { return 0; } tmp = gtk_entry_get_text(GTK_ENTRY(w)); if (tmp == NULL) { return -1; } buf = g_strdup(tmp); if (buf == NULL) { return -1; } if (chk_sputobjfield(Obj, Id, field, buf)) { g_free(buf); return -1; } g_free(buf); return 0; } static void SetTextFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field) { GtkEntry *entry; char *buf; if (w == NULL) { return; } entry = GTK_ENTRY(w); sgetobjfield(Obj, Id, field, NULL, &buf, FALSE, FALSE, FALSE); if (buf == NULL) { gtk_entry_set_text(entry, ""); return; } gtk_entry_set_text(entry, CHK_STR(buf)); g_free(buf); } static int SetObjFieldFromSpin(GtkWidget *w, struct objlist *Obj, int Id, char *field) { int val, oval; if (w == NULL) { return 0; } val = spin_entry_get_val(w); if (get_graph_modified()) { if (putobj(Obj, field, Id, &val) < 0) { return -1; } } else { getobj(Obj, field, Id, 0, NULL, &oval); if (putobj(Obj, field, Id, &val) < 0) { return -1; } getobj(Obj, field, Id, 0, NULL, &val); if (val != oval) { set_graph_modified(); } } return 0; } static void SetSpinFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field) { int val; if (w == NULL){ return; } getobj(Obj, field, Id, 0, NULL, &val); spin_entry_set_val(w, val); } static int SetObjFieldFromToggle(GtkWidget *w, struct objlist *Obj, int Id, char *field) { gboolean state; int a, oa; if (w == NULL) { return 0; } state = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); a = state ? TRUE : FALSE; getobj(Obj, field, Id, 0, NULL, &oa); oa = oa ? TRUE : FALSE; if (a != oa) { if (putobj(Obj, field, Id, &a) == -1){ return -1; } set_graph_modified(); } return 0; } static void SetToggleFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field) { int a; if (w == NULL) { return; } getobj(Obj, field, Id, 0, NULL, &a); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), a); } static int set_obj_points_from_text(GtkWidget *w, struct objlist *Obj, int Id, char *field) { double d; int ip; char *buf, *ptr, *tmp, *eptr; const char *ctmp; struct narray *array = NULL, *atmp; if (w == NULL) { return 0; } ctmp = gtk_entry_get_text(GTK_ENTRY(w)); if (ctmp == NULL) { return -1; } buf = g_strdup(ctmp); if (buf == NULL) { return -1; } array = arraynew(sizeof(int)); ptr = buf; while (1) { while (*ptr && isspace(*ptr)) ptr++; if (*ptr == '\0') { break; } tmp = strchr(ptr, ' '); if (tmp) { *tmp = '\0'; } d = strtod(ptr, &eptr); if (d != d || d == HUGE_VAL || d == - HUGE_VAL || eptr[0] != '\0') goto ErrEnd; ip = nround(d * 100); atmp = arrayadd(array, &ip); if (atmp == NULL) { goto ErrEnd; } array = atmp; if (tmp == NULL) { break; } ptr = tmp + 1; } if (get_graph_modified()) { if (putobj(Obj, field, Id, array) < 0) { goto ErrEnd; } } else { char *str1, *str2; sgetobjfield(Obj, Id, field, NULL, &str1, FALSE, FALSE, FALSE); if (putobj(Obj, field, Id, array) < 0) { g_free(str1); goto ErrEnd; } sgetobjfield(Obj, Id, field, NULL, &str2, FALSE, FALSE, FALSE); if (str1 && str2 && strcmp(str1, str2)) { set_graph_modified(); } g_free(str2); g_free(str1); } g_free(buf); return 0; ErrEnd: if (buf) { g_free(buf); } if (array) { arrayfree(array); } return -1; } int SetObjFieldFromStyle(GtkWidget *w, struct objlist *Obj, int Id, char *field) { unsigned int j; const char *ptr; if (w == NULL) { return 0; } ptr = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(w)))); if (ptr == NULL) { return -1; } for (j = 0; j < CLINESTYLE; j++) { if (strcmp(ptr, FwLineStyle[j].name) == 0 || strcmp(ptr, _(FwLineStyle[j].name)) == 0) { if (chk_sputobjfield(Obj, Id, field, FwLineStyle[j].list) != 0) { gtk_widget_grab_focus(w); return -1; } break; } } if (j == CLINESTYLE) { if (set_obj_points_from_text(gtk_bin_get_child(GTK_BIN(w)), Obj, Id, field)) { gtk_widget_grab_focus(w); return -1; } } return 0; } int get_style_index(struct objlist *obj, int id, char *field) { unsigned int j; int i; struct narray *array; int stylenum; int *style, a; char *s; getobj(obj, field, id, 0, NULL, &array); stylenum = arraynum(array); style = arraydata(array); for (j = 0; j < CLINESTYLE; j++) { if (stylenum == FwLineStyle[j].num) { s = FwLineStyle[j].list; for (i = 0; i < FwLineStyle[j].num; i++) { a = strtol(s, &s, 10); if (style[i] != a) { break; } } if (i == FwLineStyle[j].num) { return j; } } } return -1; } const char * get_style_string(struct objlist *obj, int id, char *field) { int i; i = get_style_index(obj, id, field); if (i < 0) { return NULL; } return FwLineStyle[i].name; } static void set_entry_from_obj_point(GtkEntry *entry, struct objlist *Obj, int Id, char *field) { struct narray *array; char buf[128]; int i, n, *points, pos; GtkEntryBuffer *t_buf; t_buf = gtk_entry_get_buffer(entry); gtk_entry_buffer_set_text(t_buf, "", 0); getobj(Obj, field, Id, 0, NULL, &array); n = arraynum(array); points = arraydata(array); pos = 0; for (i = 0; i < n / 2; i++) { int l; l = snprintf(buf, sizeof(buf), "%.2f %.2f ", points[i * 2] / 100.0, points[i * 2 + 1] / 100.0); gtk_entry_buffer_insert_text(t_buf, pos, buf, l); pos += l; } } void SetStyleFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field) { GtkEntry *entry; int count; const char *s; if (w == NULL) { return; } entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(w))); count = combo_box_get_num(w); if (count == 0) { unsigned int j; for (j = 0; j < CLINESTYLE; j++) { combo_box_append_text(w, _(FwLineStyle[j].name)); } } s = get_style_string(Obj, Id, field); if (s) { gtk_entry_set_text(entry, _(s)); } else { set_entry_from_obj_point(entry, Obj, Id, field); } } static int SetObjFieldFromList(GtkWidget *w, struct objlist *Obj, int Id, char *field) { int pos, opos; if (w == NULL) { return 0; } pos = combo_box_get_active(w); if (pos < 0) { return -1; } getobj(Obj, field, Id, 0, NULL, &opos); if (pos != opos) { if (putobj(Obj, field, Id, &pos) == -1) { return -1; } set_graph_modified(); } return 0; } static void SetListFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field) { int count, a; if (w == NULL) { return; } count = combo_box_get_num(w); if (count == 0) { char **enumlist; int j; enumlist = (char **) chkobjarglist(Obj, field); for (j = 0; enumlist[j] && enumlist[j][0]; j++) { combo_box_append_text(w, _(enumlist[j])); } } getobj(Obj, field, Id, 0, NULL, &a); combo_box_set_active(w, a); } struct compatible_font_info * SetFontListFromObj(GtkWidget *w, struct objlist *obj, int id, const char *name) { int j, selfont; struct fontmap *fcur; char *font; struct compatible_font_info *compatible; if (w == NULL) { return NULL; } compatible = NULL; getobj(obj, name, id, 0, NULL, &font); combo_box_clear(w); fcur = Gra2cairoConf->fontmap_list_root; j = 0; selfont = -1; while (fcur) { combo_box_append_text(w, fcur->fontalias); if (font && strcmp(font, fcur->fontalias) == 0) { selfont = j; } j++; fcur = fcur->next; } if (selfont < 0) { selfont = 0; compatible = gra2cairo_get_compatible_font_info(font); if (compatible) { fcur = Gra2cairoConf->fontmap_list_root; j = 0; while (fcur) { if (strcmp(compatible->name, fcur->fontalias) == 0) { selfont = j; break; } j++; fcur = fcur->next; } } } combo_box_set_active(w, selfont); return compatible; } void SetObjFieldFromFontList(GtkWidget *w, struct objlist *obj, int id, char *name) { struct fontmap *fcur; char *fontalias; if (w == NULL) { return; } fontalias = combo_box_get_active_text(w); if (fontalias == NULL) { return; } if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fcur)) { g_free(fontalias); return; } g_free(fontalias); chk_sputobjfield(obj, id, name, fcur->fontalias); } #define AXIS_COMBO_BOX_FLAGS_KEY "AXIS_COMBO_BOX_FLAGS" enum AXIS_COMBO_BOX_COLUMN { AXIS_COMBO_BOX_COLUMN_TITLE = 0, AXIS_COMBO_BOX_COLUMN_ID = 1, AXIS_COMBO_BOX_COLUMN_OID = 2, AXIS_COMBO_BOX_COLUMN_SENSITIVITY = 3, AXIS_COMBO_BOX_COLUMN_NUM = 4 }; GtkWidget * axis_combo_box_create(int flags) { GtkWidget *cbox; GtkTreeStore *list; GtkCellRenderer *rend_s; list = gtk_tree_store_new(AXIS_COMBO_BOX_COLUMN_NUM, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_BOOLEAN); cbox = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list)); rend_s = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend_s, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend_s, "text", AXIS_COMBO_BOX_COLUMN_TITLE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend_s, "sensitive", AXIS_COMBO_BOX_COLUMN_SENSITIVITY); g_object_set_data(G_OBJECT(cbox), AXIS_COMBO_BOX_FLAGS_KEY, GINT_TO_POINTER(flags)); return cbox; } static void axis_combo_box_clear(GtkWidget *cbox) { GtkTreeStore *list; list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); gtk_tree_store_clear(list); } static int axis_combo_box_get_flags(GtkWidget *cbox) { return GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cbox), AXIS_COMBO_BOX_FLAGS_KEY)); } struct axis_combo_box_each_data { GtkWidget *combo; int id; }; static gboolean axis_combo_box_each(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { int aid; struct axis_combo_box_each_data *adata; adata = data; gtk_tree_model_get(model, iter, AXIS_COMBO_BOX_COLUMN_ID, &aid, -1); if (aid == adata->id) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(adata->combo), iter); return TRUE; } return FALSE; } static void axis_combo_box_set_active_sub(GtkWidget *cbox, int id) { struct axis_combo_box_each_data adata; GtkTreeModel *model; adata.combo = cbox; adata.id = id; model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbox)); gtk_tree_model_foreach(model, axis_combo_box_each, &adata); } static void axis_combo_box_set_active(GtkWidget *cbox, struct objlist *obj, int id, const char *field) { char *valstr; struct narray axis_array; struct objlist *aobj; combo_box_set_active(cbox, 0); sgetobjfield(obj, id, field, NULL, &valstr, FALSE, FALSE, FALSE); if (valstr == NULL) { return; } g_strstrip(valstr); if (! g_ascii_isalpha(valstr[0])) { g_free(valstr); return; } arrayinit(&axis_array, sizeof(int)); if (getobjilist(valstr, &aobj, &axis_array, FALSE, NULL) == 0) { int aid; aid = arraylast_int(&axis_array); arraydel(&axis_array); axis_combo_box_set_active_sub(cbox, aid); } g_free(valstr); } struct axis_combo_box_iter { char axis; int exist; GtkTreeIter iter; }; static GtkTreeIter * axis_combo_box_get_parent(struct axis_combo_box_iter *axis_iter, GtkTreeStore *list, char axis) { int i; char name[] = "X"; for (i = 0; axis_iter[i].axis; i++) { if (axis_iter[i].axis == axis) { if (! axis_iter[i].exist) { name[0] = axis; gtk_tree_store_append(list, &axis_iter[i].iter, NULL); gtk_tree_store_set(list, &axis_iter[i].iter, AXIS_COMBO_BOX_COLUMN_TITLE, name, AXIS_COMBO_BOX_COLUMN_ID, -1, AXIS_COMBO_BOX_COLUMN_OID, -1, AXIS_COMBO_BOX_COLUMN_SENSITIVITY, TRUE, -1); axis_iter[i].exist = TRUE; } return &axis_iter[i].iter; } } return NULL; } void axis_combo_box_setup(GtkWidget *cbox, struct objlist *obj, int id, const char *field) { struct objlist *aobj; char *name; int aid, lastinst, self; GtkTreeStore *list; struct axis_combo_box_iter axis_iter[] = { {'X', FALSE}, {'Y', FALSE}, {'U', FALSE}, {'R', FALSE}, {'\0', FALSE}, /* sentinel value */ }; if (cbox == NULL) { return; } axis_combo_box_clear(cbox); list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); aobj = getobject("axis"); lastinst = chkobjlastinst(aobj); if (axis_combo_box_get_flags(cbox) & AXIS_COMBO_BOX_ADD_NONE) { GtkTreeIter iter; gtk_tree_store_append(list, &iter, NULL); gtk_tree_store_set(list, &iter, AXIS_COMBO_BOX_COLUMN_TITLE, _("none"), AXIS_COMBO_BOX_COLUMN_ID, -1, AXIS_COMBO_BOX_COLUMN_OID, -1, AXIS_COMBO_BOX_COLUMN_SENSITIVITY, TRUE, -1); } self = (aobj == obj) ? id : -1; for (aid = 0; aid <= lastinst; aid++) { GtkTreeIter iter, *parent; int aoid; getobj(aobj, "group", aid, 0, NULL, &name); getobj(aobj, "oid", aid, 0, NULL, &aoid); name = CHK_STR(name); parent = NULL; if (lastinst > AXIS_SELECTION_LIMIT) { parent = axis_combo_box_get_parent(axis_iter, list, name[1]); } gtk_tree_store_append(list, &iter, parent); gtk_tree_store_set(list, &iter, AXIS_COMBO_BOX_COLUMN_TITLE, name, AXIS_COMBO_BOX_COLUMN_ID, aid, AXIS_COMBO_BOX_COLUMN_OID, aoid, AXIS_COMBO_BOX_COLUMN_SENSITIVITY, aid != self, -1); } axis_combo_box_set_active(cbox, obj, id, field); } int SetObjAxisFieldFromWidget(GtkWidget *w, struct objlist *obj, int id, char *field) { char *buf; int r; GtkTreeIter iter; GtkTreeModel *list; int aoid, aid; if (w == NULL) { return 0; } r = gtk_combo_box_get_active_iter(GTK_COMBO_BOX(w), &iter); if (! r) { return 0; } list = gtk_combo_box_get_model(GTK_COMBO_BOX(w)); buf = NULL; gtk_tree_model_get(list, &iter, AXIS_COMBO_BOX_COLUMN_ID, &aid, AXIS_COMBO_BOX_COLUMN_OID, &aoid, -1); if (axis_combo_box_get_flags(w) & AXIS_COMBO_BOX_USE_OID) { if (aoid >= 0) { buf = g_strdup_printf("axis:^%d", aoid); } } else { if (aid >= 0) { buf = g_strdup_printf("axis:%d", aid); } } r = chk_sputobjfield(obj, id, field, buf); if (buf) { g_free(buf); } return r; } static void _set_color(GtkWidget *w, struct objlist *obj, int id, char *prefix, char *postfix) { GdkRGBA color; int r, g, b, a; char buf[64]; snprintf(buf, sizeof(buf), "%sR%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &r); snprintf(buf, sizeof(buf), "%sG%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &g); snprintf(buf, sizeof(buf), "%sB%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &b); snprintf(buf, sizeof(buf), "%sA%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &a); if (! Menulocal.use_opacity) { a = 255; } color.red = r / 255.0; color.green = g / 255.0; color.blue = b / 255.0; color.alpha = a / 255.0; gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(w), Menulocal.use_opacity); gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(w), &color); snprintf(buf, sizeof(buf), "#%02X%02X%02X", r, g, b); gtk_widget_set_tooltip_text(w, buf); } void set_color(GtkWidget *w, struct objlist *obj, int id, char *prefix) { _set_color(w, obj, id, prefix, NULL); } void set_color2(GtkWidget *w, struct objlist *obj, int id) { _set_color(w, obj, id, NULL, "2"); } void set_fill_color(GtkWidget *w, struct objlist *obj, int id) { _set_color(w, obj, id, "fill_", NULL); } void set_stroke_color(GtkWidget *w, struct objlist *obj, int id) { _set_color(w, obj, id, "stroke_", NULL); } static int _putobj_color(GtkWidget *w, struct objlist *obj, int id, char *prefix, char *postfix) { GdkRGBA color; int r, g, b, a, o; char buf[64]; gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(w), &color); a = (Menulocal.use_opacity) ? (color.alpha * 255) : 0xff; r = color.red * 255; g = color.green * 255; b = color.blue * 255; snprintf(buf, sizeof(buf), "%sR%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &o); if (o != r) { if (putobj(obj, buf, id, &r) == -1) { return TRUE; } set_graph_modified(); } snprintf(buf, sizeof(buf), "%sG%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &o); if (o != g) { if (putobj(obj, buf, id, &g) == -1) { return TRUE; } set_graph_modified(); } snprintf(buf, sizeof(buf), "%sB%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &o); if (o != b) { if (putobj(obj, buf, id, &b) == -1) { return TRUE; } set_graph_modified(); } snprintf(buf, sizeof(buf), "%sA%s", CHK_STR(prefix), CHK_STR(postfix)); getobj(obj, buf, id, 0, NULL, &o); if (o != a) { if (putobj(obj, buf, id, &a) == -1) { return TRUE; } set_graph_modified(); } return FALSE; } int putobj_color(GtkWidget *w, struct objlist *obj, int id, char *prefix) { return _putobj_color(w, obj, id, prefix, NULL); } int putobj_color2(GtkWidget *w, struct objlist *obj, int id) { return _putobj_color(w, obj, id, NULL, "2"); } int putobj_fill_color(GtkWidget *w, struct objlist *obj, int id) { return _putobj_color(w, obj, id, "fill_", NULL); } int putobj_stroke_color(GtkWidget *w, struct objlist *obj, int id) { return _putobj_color(w, obj, id, "stroke_", NULL); } ngraph-gtk-6.09.05/src/gtk/x11lgndx.c0000644000175000017500000004120114126071646014051 00000000000000/* * $Id: x11lgndx.c,v 1.20 2009-12-17 10:55:44 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include "object.h" #include "gra.h" #include "mathfn.h" #include "spline.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "ogra2cairo.h" #include "ogra2gdk.h" #include "ox11menu.h" #include "x11commn.h" #define VIEW_SIZE 128 enum LEGEND_DIRECTION { LEGEND_DIRECTION_RIGHT, LEGEND_DIRECTION_LEFT, LEGEND_DIRECTION_BOTTOM, LEGEND_DIRECTION_TOP, }; #define LEGEND_DIRECTION_NUM (LEGEND_DIRECTION_TOP + 1) static double *spx, *spy, *spz; static double *spc[6]; static void LegendGaussDialogScaleH(GtkWidget *w, gpointer client_data); static void LegendGaussDialogDiv(GtkWidget *w, gpointer client_data); #define DIV_MAX 200 #define SCALE_V_MAX 1000.0 #define SCALE_H_MAX 100.0 static void clear_view(struct LegendGaussDialog *d) { GdkWindow *win; win = gtk_widget_get_window(d->view); if (win) { gdk_window_invalidate_rect(win, NULL, TRUE); } } static void LegendGaussDialogSetupItem(GtkWidget *w, struct LegendGaussDialog *d, int id) { int n; SetStyleFromObjField(d->style, d->Obj, id, "style"); SetWidgetFromObjField(d->width, d->Obj, id, "width"); SetWidgetFromObjField(d->join, d->Obj, id, "join"); SetWidgetFromObjField(d->miter, d->Obj, id, "miter_limit"); set_stroke_color(d->color, d->Obj, id); n = d->Dir; if (n >= 0 && n < LEGEND_DIRECTION_NUM) { GtkToggleButton *btn; btn = GTK_TOGGLE_BUTTON(g_slist_nth_data(d->dir_list, n)); gtk_toggle_button_set_active(btn, TRUE); } n = d->Mode; if (n >=0 && n < 4) { GtkToggleButton *btn; btn = GTK_TOGGLE_BUTTON(g_slist_nth_data(d->func_list, n)); gtk_toggle_button_set_active(btn, TRUE); } gtk_range_set_value(GTK_RANGE(d->div), d->Div); gtk_range_set_value(GTK_RANGE(d->sch), d->Position * SCALE_H_MAX); gtk_range_set_value(GTK_RANGE(d->scv), d->Param * SCALE_V_MAX); } static gboolean LegendGaussDialogPaint(GtkWidget *w, cairo_t *cr, gpointer client_data) { struct LegendGaussDialog *d; int pw, dw, minx, miny, maxx, maxy, amp, wd, output, found; double ppd, dashes[] = {4.0}; GdkWindow *win; struct objlist *gobj, *robj; N_VALUE *inst; struct gra2cairo_local *local; cairo_surface_t *pix; d = (struct LegendGaussDialog *) client_data; win = gtk_widget_get_window(w); if (win == NULL) { return FALSE; } found = find_gra2gdk_inst(&gobj, &inst, &robj, &output, &local); if (! found) { return FALSE; } pix = gra2gdk_create_pixmap(local, VIEW_SIZE, VIEW_SIZE, Menulocal.bg_r, Menulocal.bg_g, Menulocal.bg_b); if (pix == NULL) { return FALSE; } pw = VIEW_SIZE - 1; dw = (d->Wdx < d->Wdy) ? d->Wdy : d->Wdx; ppd = pw / ((double) dw); minx = VIEW_SIZE / 2 - d->Wdx * ppd / 2; miny = VIEW_SIZE / 2 - d->Wdy * ppd / 2; maxx = VIEW_SIZE / 2 + d->Wdx * ppd / 2; maxy = VIEW_SIZE / 2 + d->Wdy * ppd / 2; switch (d->Dir) { case LEGEND_DIRECTION_TOP: case LEGEND_DIRECTION_BOTTOM: amp = d->Wdy; wd = d->Wdx; break; default: amp = d->Wdx; wd = d->Wdy; } if (d->alloc) { int GC; GC = _GRAopen("gra2gdk", "_output", robj, inst, output, -1, -1, -1, NULL, local); GRAlinestyle(GC, 0, NULL, 1, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); if (GC >= 0) { int i, j, k, spnum; double tmp, y = 0, spc2[6]; GRAview(GC, minx, miny, maxx, maxy, 1); if (d->Div > DIV_MAX) { d->Div = DIV_MAX; } for (i = 0; i <= (d->Div); i++) { double x; x = wd / ((double) (d->Div)) * i; if (d->Mode == 0) { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (wd / (1 + 10 * d->Param) / 2); y = amp * exp(-tmp * tmp); } else if (d->Mode == 1) { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (wd / (1 + 10 * d->Param) / 2); y = amp / (tmp * tmp + 1); } else if (d->Mode == 2) { if (d->Position >= 0) { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (-wd * 0.5 - wd * d->Position * 0.5); } else { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (wd * 0.5 - wd * d->Position * 0.5); } y = amp * tmp * tmp; } else if (d->Mode == 3) { tmp = x / (wd / (0.25 + 10 * d->Param)); y = amp * 0.5 * (sin(2.0 * MPI * (tmp - d->Position * 0.5)) + 1); } switch (d->Dir) { case LEGEND_DIRECTION_TOP: spx[i] = nround(x); spy[i] = d->Wdy - nround(y); break; case LEGEND_DIRECTION_BOTTOM: spx[i] = nround(x); spy[i] = nround(y); break; case LEGEND_DIRECTION_LEFT: spx[i] = d->Wdx - nround(y); spy[i] = d->Wdy - nround(x); break; case LEGEND_DIRECTION_RIGHT: spx[i] = nround(y); spy[i] = d->Wdy - nround(x); break; default: /* never reached*/ spx[i] = 0; spy[i] = 0; } spz[i] = i; spx[i] *= ppd; spy[i] *= ppd; } spnum = d->Div + 1; spline(spz, spx, spc[0], spc[1], spc[2], spnum, SPLCND2NDDIF, SPLCND2NDDIF, 0, 0); spline(spz, spy, spc[3], spc[4], spc[5], spnum, SPLCND2NDDIF, SPLCND2NDDIF, 0, 0); GRAcolor(GC, 0, 0, 0, 255); GRAcurvefirst(GC, 0, NULL, NULL, NULL, splinedif, splineint, NULL, spx[0], spy[0]); for (j = 0; j < spnum - 1; j++) { for (k = 0; k < 6; k++) { spc2[k] = spc[k][j]; } if (! GRAcurve(GC, spc2, spx[j], spy[j])) { break; } } } _GRAclose(GC); gra2cairo_draw_path(local); } cairo_set_source_surface(cr, pix, 0, 0); cairo_paint(cr); cairo_set_source_rgb(cr, 0, 0, 0); cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); cairo_set_line_width(cr, 1); cairo_set_dash(cr, dashes, sizeof(dashes) / sizeof(*dashes), 0); cairo_rectangle(cr, minx + CAIRO_COORDINATE_OFFSET, miny + CAIRO_COORDINATE_OFFSET, maxx - minx, maxy - miny); cairo_stroke(cr); cairo_surface_destroy(pix); return FALSE; } static void LegendGaussDialogScaleV(GtkWidget *w, gpointer client_data) { struct LegendGaussDialog *d; d = (struct LegendGaussDialog *) client_data; d->Param = gtk_range_get_value(GTK_RANGE(w)) / SCALE_V_MAX; clear_view(d); } static void LegendGaussDialogScaleH(GtkWidget *w, gpointer client_data) { struct LegendGaussDialog *d; d = (struct LegendGaussDialog *) client_data; d->Position = gtk_range_get_value(GTK_RANGE(w)) / SCALE_H_MAX; clear_view(d); } static int get_radio_index(GSList *top) { int i, n; GSList *list; n = g_slist_length(top); for (i = 0, list = top; i < n; i++, list = list->next) { GtkToggleButton *btn; btn = GTK_TOGGLE_BUTTON(list->data); if (gtk_toggle_button_get_active(btn)) { return i; } } return -1; } static void LegendGaussDialogMode(GtkWidget *w, gpointer client_data) { struct LegendGaussDialog *d; int i; gboolean active; active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); if (! active) return; d = (struct LegendGaussDialog *) client_data; i = get_radio_index(d->func_list); if (i < 0) return; d->Mode = i; clear_view(d); } static void LegendGaussDialogDir(GtkWidget *w, gpointer client_data) { int i; struct LegendGaussDialog *d; gboolean active; active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); if (! active) return; d = (struct LegendGaussDialog *) client_data; i= get_radio_index(d->dir_list); if (i < 0 || i >= LEGEND_DIRECTION_NUM) return; d->Dir = i; clear_view(d); } static void LegendGaussDialogDiv(GtkWidget *w, gpointer client_data) { struct LegendGaussDialog *d; d = (struct LegendGaussDialog *) client_data; d->Div = gtk_range_get_value(GTK_RANGE(w)); clear_view(d); } static void LegendGaussDialogSetup(GtkWidget *wi, void *data, int makewidget) { GSList *func_list, *dir_list; struct LegendGaussDialog *d; char title[256]; d = (struct LegendGaussDialog *) data; snprintf(title, sizeof(title), _("Legend Gaussian/Lorentzian/Parabola/Sin %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *button, *hbox, *hbox2, *vbox, *table; int i; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); button = NULL; button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), _("_Sin")); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogMode), d); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), _("_Parabola")); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogMode), d); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), _("_Lorentz")); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogMode), d); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), _("_Gauss")); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogMode), d); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); func_list = gtk_radio_button_get_group(GTK_RADIO_BUTTON(button)); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 0); d->func_list = func_list; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = combo_box_entry_create(); add_widget_to_table(table, w, _("Line _Style:"), TRUE, i++); d->style = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Line Width:"), FALSE, i++); d->width = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Miter:"), FALSE, i++); d->miter = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Join:"), FALSE, i++); d->join = w; w = create_color_button(wi); add_widget_to_table(table, w, _("_Color:"), FALSE, i++); d->color = w; w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 10, DIV_MAX, 1); set_scale_mark(w, GTK_POS_BOTTOM, 20, 20); add_widget_to_table(table, w, _("_Division:"), TRUE, i++); g_signal_connect(w, "value-changed", G_CALLBACK(LegendGaussDialogDiv), d); d->div = w; hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); button = NULL; button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), "_T"); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogDir), d); gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0); button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), "_B"); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogDir), d); gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0); button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), "_L"); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogDir), d); gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0); button = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(button), "_R"); g_signal_connect(button, "toggled", G_CALLBACK(LegendGaussDialogDir), d); gtk_box_pack_start(GTK_BOX(hbox2), button, FALSE, FALSE, 0); dir_list = gtk_radio_button_get_group(GTK_RADIO_BUTTON(button)); d->dir_list = dir_list; add_widget_to_table(table, hbox2, _("Direction:"), TRUE, i++); gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 0, SCALE_V_MAX, 1); set_scale_mark(w, GTK_POS_BOTTOM, 100, 200); g_signal_connect(w, "value-changed", G_CALLBACK(LegendGaussDialogScaleV), d); d->scv = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 0); w = gtk_drawing_area_new(); d->view = w; gtk_widget_set_size_request(w, VIEW_SIZE, VIEW_SIZE); g_signal_connect(w, "draw", G_CALLBACK(LegendGaussDialogPaint), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 0); w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, - SCALE_H_MAX, SCALE_H_MAX, 1); set_scale_mark(w, GTK_POS_TOP, -100, 25); g_signal_connect(w, "value-changed", G_CALLBACK(LegendGaussDialogScaleH), d); d->sch = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 0); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } LegendGaussDialogSetupItem(wi, d, d->Id); } static void LegendGaussDialogClose(GtkWidget *w, void *data) { struct LegendGaussDialog *d; int ret, a, i, amp, wd, gx, gy; double y = 0, tmp; struct narray *parray; d = (struct LegendGaussDialog *) data; if (d->ret != IDOK) return; ret = d->ret; d->ret = IDLOOP; if (SetObjFieldFromStyle(d->style, d->Obj, d->Id, "style")) return; if (SetObjFieldFromWidget(d->width, d->Obj, d->Id, "width")) return; if (SetObjFieldFromWidget(d->join, d->Obj, d->Id, "join")) return; if (SetObjFieldFromWidget(d->miter, d->Obj, d->Id, "miter_limit")) return; if (putobj_stroke_color(d->color, d->Obj, d->Id)) return; switch (d->Dir) { case LEGEND_DIRECTION_TOP: case LEGEND_DIRECTION_BOTTOM: amp = d->Wdy; wd = d->Wdx; break; default: amp = d->Wdx; wd = d->Wdy; } parray = arraynew(sizeof(int)); for (i = 0; i <= d->Div; i++) { double x; x = wd / ((double) (d->Div)) * i; if (d->Mode == 0) { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (wd / (1 + 10 * d->Param) / 2); y = amp * exp(-tmp * tmp); } else if (d->Mode == 1) { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (wd / (1 + 10 * d->Param) / 2); y = amp / (tmp * tmp + 1); } else if (d->Mode == 2) { if (d->Position >= 0) { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (-wd * 0.5 - wd * d->Position * 0.5); } else { tmp = (x - wd * 0.5 - wd * d->Position * 0.5) / (wd * 0.5 - wd * d->Position * 0.5); } y = amp * tmp * tmp; } else if (d->Mode == 3) { tmp = x / (wd / (0.25 + 10 * d->Param)); y = amp * 0.5 * (sin(2.0 * MPI * (tmp - d->Position * 0.5)) + 1); } switch (d->Dir) { case LEGEND_DIRECTION_TOP: gx = nround(x); gy = d->Wdy - nround(y); break; case LEGEND_DIRECTION_BOTTOM: gx = nround(x); gy = nround(y); break; case LEGEND_DIRECTION_LEFT: gx = d->Wdx - nround(y); gy = d->Wdy - nround(x); break; case LEGEND_DIRECTION_RIGHT: gx = nround(y); gy = d->Wdy - nround(x); break; default: /* never reached */ gx = 0; gy = 0; } gx += d->Minx; gy += d->Miny; arrayadd(parray, &gx); arrayadd(parray, &gy); } putobj(d->Obj, "points", d->Id, parray); a = 0; putobj(d->Obj, "interpolation", d->Id, &a); d->ret = ret; for (i = 0; i < 6; i++) g_free(spc[i]); g_free(spz); g_free(spy); g_free(spx); } void LegendGaussDialog(struct LegendGaussDialog *data, struct objlist *obj, int id, int minx, int miny, int wdx, int wdy) { int i; data->SetupWindow = LegendGaussDialogSetup; data->CloseWindow = LegendGaussDialogClose; data->Obj = obj; data->Id = id; data->Minx = minx; data->Miny = miny; data->Wdx = wdx; data->Wdy = wdy; data->Div = 20; data->Position = 0; data->Param = 0.175; data->Dir = LEGEND_DIRECTION_TOP; data->Mode = 0; data->alloc = TRUE; spx = (double *) g_malloc(sizeof(double) * (DIV_MAX + 1)); if (spx == NULL) data->alloc = FALSE; spy = (double *) g_malloc(sizeof(double) * (DIV_MAX + 1)); if (spy == NULL) data->alloc = FALSE; spz = (double *) g_malloc(sizeof(double) * (DIV_MAX + 1)); if (spz == NULL) data->alloc = FALSE; for (i = 0; i < 6; i++) { spc[i] = (double *) g_malloc(sizeof(double) * (DIV_MAX + 1)); if (spc[i] == NULL) { data->alloc = FALSE; } } } ngraph-gtk-6.09.05/src/gtk/completion_info_constants.txt0000644000175000017500000000445713672575776020316 00000000000000PI Pi E The base of natural logarithm (Napier's constant) EULER Euler's constant NAN Missing data with error indication UNDEF Missing data without error indication CONT Missing data (data lines are combined) BREAK Missing data (data lines are not combined) NUM The number of the data MINX The minimum value of X MAXX The maximum value of X MINY The minimum value of Y MAXY The maximum value of Y SUMX Sum of X SUMY Sum of Y SUMXX Square sum of X SUMYY Square sum of Y SUMXY Product sum of X and Y AVX The average of X AVY The average of X STDEVPX The standard deviation of X STDEVPY The standard deviation of Y STDEVX The corrected sample standard deviation of X STDEVY The corrected sample standard deviation of Y FIRST When conversion is performed twice with one line of data such as diagonal or errorbar plot,\ntrue (1) in the first call, false (0) in the second call. MASK Number of lines set for mask MOVE Number of lines set for move COLX The column number specified for X COLY The column number specified for Y AXISX The ID of the axis instance specified as X axis AXISX_MIN The minimum value of the X axis AXISX_MAX The maximum value of the X axis AXISX_LEN Length of the X axis AXISY The ID of the axis instance specified as Y axis AXISY_MIN The minimum value of the Y axis AXISY_MAX The maximum value of the Y axis AXISY_LEN Length of the Y axis HSKIP Number of lines specified as "Head skip" RSTEP Number of lines specified as "Read step" FLINE Number of lines specified as "Final line" DATA_OBJ The identification number of the data object PATH_OBJ The identification number of the path object RECT_OBJ The identification number of the rectangle object ARC_OBJ The identification number of the arc object MARK_OBJ The identification number of the mark object TEXT_OBJ The identification number of the text object FILE_OBJ The identification number of the file object %D The ID of the instance of the data object %N The number of instances of data object TRUE the TRUE value (1) FALSE the FALSE value (0) FILL_RULE_NONE Defined for the function draw_polygon().\ndon't fill the polygon. FILL_RULE_EVEN_ODD Defined for the function draw_polygon().\nfill the polygon with evin-odd rule. FILL_RULE_WINDING Defined for the function draw_polygon().\nfill the polygon with winding rule. ngraph-gtk-6.09.05/src/gtk/sourcecompletionwords.h0000644000175000017500000000472313242772500017064 00000000000000/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*- * modified from gtksourcecompletionproviderwords.h * This file is part of GtkSourceView * * Copyright (C) 2009 - Jesse van den Kieboom * * gtksourceview is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * gtksourceview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef SOURCE_COMPLETION_WORDS_H #define SOURCE_COMPLETION_WORDS_H #define GTK_SOURCE_H_INSIDE #include #include G_BEGIN_DECLS #define SOURCE_TYPE_COMPLETION_WORDS (source_completion_words_get_type ()) #define SOURCE_COMPLETION_WORDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOURCE_TYPE_COMPLETION_WORDS, SourceCompletionWords)) #define SOURCE_COMPLETION_WORDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOURCE_TYPE_COMPLETION_WORDS, SourceCompletionWordsClass)) #define SOURCE_IS_COMPLETION_WORDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOURCE_TYPE_COMPLETION_WORDS)) #define SOURCE_IS_COMPLETION_WORDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOURCE_TYPE_COMPLETION_WORDS)) #define SOURCE_COMPLETION_WORDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOURCE_TYPE_COMPLETION_WORDS, SourceCompletionWordsClass)) typedef struct _SourceCompletionWords SourceCompletionWords; typedef struct _SourceCompletionWordsClass SourceCompletionWordsClass; typedef struct _SourceCompletionWordsPrivate SourceCompletionWordsPrivate; struct _SourceCompletionWords { GObject parent; SourceCompletionWordsPrivate *priv; }; struct _SourceCompletionWordsClass { GObjectClass parent_class; }; GType source_completion_words_get_type (void) G_GNUC_CONST; typedef GList * (* populate_func)(const char *, int, GtkTextIter *); SourceCompletionWords *source_completion_words_new(const gchar *name, populate_func func); G_END_DECLS #endif /* SOURCE_COMPLETION_WORDS_H */ ngraph-gtk-6.09.05/src/gtk/dir_defs.h.in0000644000175000017500000000075013716106051014571 00000000000000/* * $Id: dir_defs.h.in,v 1.3 2009-06-18 11:32:11 hito Exp $ */ #ifndef _DIR_DEFS_HEADER #define _DIR_DEFS_HEADER extern char *DOCDIR, *NDATADIR, *ADDINDIR, *LIBDIR, *PLUGINDIR, *CONFDIR; #define _DOCDIR "DOCDIRDEF" #define _LIBDIR "LIBEXECDIRDEF" #define _PLUGINDIR "LIBDIRDEF/plugins" #define _NDATADIR "DATADIRDEF" #define _ADDINDIR "DATADIRDEF/addin" #define _CONFDIR "CONFDIRDEF" #if WINDOWS #define HOME_DIR "Ngraph" #else #define HOME_DIR ".Ngraph" #endif #endif ngraph-gtk-6.09.05/src/gtk/ogra2gdk.c0000644000175000017500000000621114142161773014104 00000000000000/* * $Id: ogra2gdk.c,v 1.5 2009-11-16 09:13:05 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include #include #include #include #include #include "mathfn.h" #include "object.h" #include "ioutil.h" #include "x11gui.h" #include "ogra2cairo.h" #include "oroot.h" #define NAME "gra2gdk" #define PARENT "gra2cairo" #define OVERSION "1.00.00" #ifndef M_PI #define M_PI 3.141592 #endif static int g2g_init(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; int dpi; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; dpi = DPI_MAX; if (_putobj(obj, "dpi", inst, &dpi) < 0) goto Err; if (_putobj(obj, "dpix", inst, &dpi) < 0) goto Err; if (_putobj(obj, "dpiy", inst, &dpi) < 0) goto Err; _getobj(obj, "_local", inst, &local); local->pixel_dot_x = local->pixel_dot_y = dpi / (DPI_MAX * 1.0); return 0; Err: local = gra2cairo_free(obj, inst); g_free(local); return 1; } static int g2g_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char code; int *cpar, force_opacity; struct gra2cairo_local *local; local = (struct gra2cairo_local *)argv[2]; code = *(char *)(argv[3]); cpar = (int *)argv[4]; if (local->cairo == NULL) { return -1; } if (code == 'G') { _getobj(obj, "force_opacity", inst, &force_opacity); if (force_opacity && cpar[0] > 3) { gra2cairo_draw_path(local); cairo_set_source_rgba(local->cairo, cpar[1] / 255.0, cpar[2] / 255.0, cpar[3] / 255.0, force_opacity / 255.0); return 0; } } if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) { return 1; } return 0; } static int g2g_done(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } cairo_surface_t * gra2gdk_create_pixmap(struct gra2cairo_local *local, int w, int h, double r, double g, double b) { cairo_t *cairo; cairo_surface_t *pix; pix = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); cairo = cairo_create(pix); if (cairo_status(cairo) != CAIRO_STATUS_SUCCESS) { cairo_destroy(cairo); cairo_surface_destroy(pix); return NULL; } if (r >= 0 && g >= 0 && b >= 0) { cairo_set_source_rgb(cairo, r, g, b); cairo_paint(cairo); } if (local->cairo) { cairo_destroy(local->cairo); } local->cairo = cairo; return pix; } static struct objtable gra2gdk[] = { {"init", NVFUNC, NEXEC, g2g_init, NULL, 0}, {"done", NVFUNC, NEXEC, g2g_done, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"_output", NVFUNC, 0, g2g_output, NULL, 0}, {"force_opacity", NINT, NREAD | NWRITE, oputcolor, NULL,0}, }; #define TBLNUM (sizeof(gra2gdk) / sizeof(*gra2gdk)) void * addgra2gdk() /* addgra2gdk() returns NULL on error */ { return addobject(NAME, NULL, PARENT, OVERSION, TBLNUM, gra2gdk, Gra2CairoErrMsgNum, Gra2CairoErrMsgs, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/sourcecompletionwords.c0000644000175000017500000001642013242772500017054 00000000000000/* -*- Mode: C; coding: utf-8 -*- * modified from gtksourcecompletionproviderwords.c * This file is part of GtkSourceView * * Copyright (C) 2009 - Jesse van den Kieboom * Copyright (C) 2013 - Sébastien Wilmet * * gtksourceview is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * gtksourceview is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include #endif #include "gtk_common.h" #include "sourcecompletionwords.h" #include #define MINIMUM_WORD_SIZE 2 #define INTERACTIVE_DELAY 50 #define PRIORITY 10 #define ACTIVATION (GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE | GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED) #define PROPOSALS_BATCH_SIZE 300 struct _SourceCompletionWordsPrivate { gchar *name; populate_func populate_func; }; static void source_completion_words_iface_init (GtkSourceCompletionProviderIface *iface); G_DEFINE_TYPE_WITH_CODE (SourceCompletionWords, source_completion_words, G_TYPE_OBJECT, G_ADD_PRIVATE (SourceCompletionWords) G_IMPLEMENT_INTERFACE (GTK_SOURCE_TYPE_COMPLETION_PROVIDER, source_completion_words_iface_init)) static gchar * source_completion_words_get_name (GtkSourceCompletionProvider *self) { return g_strdup (SOURCE_COMPLETION_WORDS (self)->priv->name); } static gboolean valid_start_char (gunichar ch) { return !g_unichar_isdigit (ch); } static gboolean valid_word_char (gunichar ch) { return g_unichar_isprint (ch) && (ch == '_' || ch == '%' || g_unichar_isalnum (ch)); } static gchar * get_end_word(gchar *text) { gchar *cur_char = text + strlen (text); gboolean word_found = FALSE; gunichar ch; while (TRUE) { gchar *prev_char = g_utf8_find_prev_char(text, cur_char); if (prev_char == NULL) { break; } ch = g_utf8_get_char (prev_char); if (!valid_word_char (ch)) { break; } word_found = TRUE; cur_char = prev_char; } if (! word_found) { return NULL; } ch = g_utf8_get_char (cur_char); if (! valid_start_char(ch)) { return NULL; } return g_ascii_strdown(cur_char, -1); } static gchar * get_word_at_iter (GtkTextIter *iter) { GtkTextBuffer *buffer; GtkTextIter start_line; gchar *line_text; gchar *word; buffer = gtk_text_iter_get_buffer (iter); start_line = *iter; gtk_text_iter_set_line_offset (&start_line, 0); line_text = gtk_text_buffer_get_text (buffer, &start_line, iter, FALSE); word = get_end_word (line_text); g_free (line_text); return word; } static gboolean text_char_predicate(gunichar ch, gpointer user_data) { return ch == '#'; } static int in_comment(GtkTextIter *iter) { GtkTextIter cur; cur = *iter; gtk_text_iter_set_line_offset(iter, 0); return gtk_text_iter_forward_find_char(iter, text_char_predicate, NULL, &cur); } static void source_completion_words_populate (GtkSourceCompletionProvider *provider, GtkSourceCompletionContext *context) { SourceCompletionWords *words = SOURCE_COMPLETION_WORDS (provider); GtkSourceCompletionActivation activation; GtkTextIter iter; gchar *word; GList *ret = NULL; if (!gtk_source_completion_context_get_iter (context, &iter)) { gtk_source_completion_context_add_proposals (context, provider, NULL, TRUE); return; } if (in_comment(&iter)) { gtk_source_completion_context_add_proposals (context, provider, NULL, TRUE); return; } word = get_word_at_iter (&iter); activation = gtk_source_completion_context_get_activation (context); if (word == NULL || (activation == GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE && g_utf8_strlen (word, -1) < MINIMUM_WORD_SIZE)) { g_free(word); gtk_source_completion_context_add_proposals(context, provider, NULL, TRUE); return; } ret = words->priv->populate_func(word, strlen(word), &iter); g_free(word); ret = g_list_reverse(ret); gtk_source_completion_context_add_proposals(context, GTK_SOURCE_COMPLETION_PROVIDER(words), ret, TRUE); g_list_free (ret); } static void source_completion_words_dispose (GObject *object) { SourceCompletionWords *provider = SOURCE_COMPLETION_WORDS (object); g_free (provider->priv->name); provider->priv->name = NULL; G_OBJECT_CLASS (source_completion_words_parent_class)->dispose (object); } static void source_completion_words_class_init (SourceCompletionWordsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = source_completion_words_dispose; } static gboolean source_completion_words_get_start_iter (GtkSourceCompletionProvider *provider, GtkSourceCompletionContext *context, GtkSourceCompletionProposal *proposal, GtkTextIter *iter) { gchar *word; glong nb_chars; if (!gtk_source_completion_context_get_iter (context, iter)) { return FALSE; } word = get_word_at_iter (iter); g_return_val_if_fail (word != NULL, FALSE); nb_chars = g_utf8_strlen (word, -1); gtk_text_iter_backward_chars (iter, nb_chars); g_free (word); return TRUE; } static gint source_completion_words_get_interactive_delay (GtkSourceCompletionProvider *provider) { return INTERACTIVE_DELAY; } static gint source_completion_words_get_priority (GtkSourceCompletionProvider *provider) { return PRIORITY; } static GtkSourceCompletionActivation source_completion_words_get_activation (GtkSourceCompletionProvider *provider) { return ACTIVATION; } static void source_completion_words_iface_init (GtkSourceCompletionProviderIface *iface) { iface->get_name = source_completion_words_get_name; iface->populate = source_completion_words_populate; iface->get_start_iter = source_completion_words_get_start_iter; iface->get_interactive_delay = source_completion_words_get_interactive_delay; iface->get_priority = source_completion_words_get_priority; iface->get_activation = source_completion_words_get_activation; } static void source_completion_words_init (SourceCompletionWords *self) { self->priv = source_completion_words_get_instance_private(self); } /** * gtk_source_completion_words_new: * @name: (nullable): The name for the provider, or %NULL. * @populate_func: : The function to populate completion. * * Returns: a new #GtkSourceCompletionWords provider */ SourceCompletionWords * source_completion_words_new (const gchar *name, populate_func populate_func) { SourceCompletionWords *self; self = g_object_new(SOURCE_TYPE_COMPLETION_WORDS, NULL); self->priv->name = g_strdup(name); self->priv->populate_func = populate_func; return self; } ngraph-gtk-6.09.05/src/gtk/gtk_entry_completion.h0000644000175000017500000000066213070106167016647 00000000000000/* * $Id: gtk_entry_completion.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ */ GtkEntryCompletion *entry_completion_create(void); void entry_completion_set_entry(GtkEntryCompletion *comp, GtkWidget *entry); int entry_completion_save(GtkEntryCompletion *comp, char *file, int size); int entry_completion_load(GtkEntryCompletion *comp, char *file, int size); void entry_completion_append(GtkEntryCompletion *comp, const char *str); ngraph-gtk-6.09.05/src/gtk/ogra2gtkprint.c0000644000175000017500000000466713070106167015211 00000000000000/* * $Id: ogra2gtkprint.c,v 1.6 2008-09-18 08:13:43 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include #include #include #include #include #include "mathfn.h" #include "object.h" #include "ioutil.h" #include "x11gui.h" #include "ogra2cairo.h" #define NAME "gra2gtkprint" #define PARENT "gra2cairo" #define OVERSION "1.00.00" #ifndef M_PI #define M_PI 3.141592 #endif static int gra2gtkprint_init(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) { return 1; } return 0; } static int gra2gtkprint_done(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; _getobj(obj, "_local", inst, &local); if (local && local->cairo) { gra2cairo_draw_path(local); local->cairo = NULL; /* the instance of cairo is created by GtkPrintContext */ } if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } static int create_cairo(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { cairo_t *cairo; int dpi, id, r; struct gra2cairo_local *local; GtkPrintContext *gpc; gpc = GTK_PRINT_CONTEXT(argv[2]); if (gpc == NULL) { error(obj, CAIRO_STATUS_NULL_POINTER + 100); return 1; } cairo = gtk_print_context_get_cairo_context(gpc); r = cairo_status(cairo); if (r != CAIRO_STATUS_SUCCESS) { error(obj, r + 100); return 1; } _getobj(obj, "id", inst, &id); dpi = gtk_print_context_get_dpi_x(gpc); if (putobj(obj, "dpix", id, &dpi) < 0) { error(obj, ERRFIELD); return 1; } dpi = gtk_print_context_get_dpi_y(gpc); if (putobj(obj, "dpiy", id, &dpi) < 0) { error(obj, ERRFIELD); return 1; } _getobj(obj, "_local", inst, &local); local->cairo = cairo; return 0; } static struct objtable gra2gtkprint[] = { {"init", NVFUNC, NEXEC, gra2gtkprint_init, NULL, 0}, {"done", NVFUNC, NEXEC, gra2gtkprint_done, NULL, 0}, {"_context", NVFUNC, 0, create_cairo, NULL,0}, }; #define TBLNUM (sizeof(gra2gtkprint) / sizeof(*gra2gtkprint)) void * addgra2gtkprint() /* addgra2gtkprint() returns NULL on error */ { return addobject(NAME, NULL, PARENT, OVERSION, TBLNUM, gra2gtkprint, Gra2CairoErrMsgNum, Gra2CairoErrMsgs, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/gtk_subwin.c0000644000175000017500000010315514045741540014563 00000000000000/* * $Id: gtk_subwin.c,v 1.68 2010-04-01 06:08:23 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include "dir_defs.h" #include "object.h" #include "nstring.h" #include "mathfn.h" #include "init.h" #include "ox11menu.h" #include "x11menu.h" #include "x11view.h" #include "x11gui.h" #include "x11dialg.h" #include "gtk_liststore.h" #include "gtk_widget.h" #include "gtk_combo.h" #include "gtk_subwin.h" #define DOUBLE_CLICK_PERIOD 250 static void hidden(struct obj_list_data *d); static void modify_numeric(struct obj_list_data *d, char *field, int val); static void modify_string(struct obj_list_data *d, char *field, char *str); static void toggle_boolean(struct obj_list_data *d, char *field, int sel); void set_cell_attribute_source(struct SubWin *d, const char *attr, int target_column, int source_column) { GList *list; GtkTreeViewColumn *col; GtkCellRenderer *renderer; col = gtk_tree_view_get_column(GTK_TREE_VIEW(d->data.data->text), target_column); list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col)); if (list == NULL) { return; } if (list->data == NULL) { return; } renderer = list->data; gtk_tree_view_column_add_attribute(col, renderer, attr, source_column); g_list_free(list); } static void file_select(GtkEntry *w, GtkEntryIconPosition icon_pos, GdkEvent *event, gpointer user_data) { struct obj_list_data *d; int sel, num; char *file, *ext; GtkWidget *parent; d = user_data; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } ext = NULL; if (chkobjfield(d->obj, "ext") == 0) { getobj(d->obj, "ext", sel, 0, NULL, &ext); } parent = TopLevel; if (nGetOpenFileName(parent, _("Open"), ext, NULL, gtk_entry_get_text(w), &file, TRUE, Menulocal.changedirectory) == IDOK && file) { if (file) { gtk_entry_set_text(w, file); modify_string(d, "file", file); g_free(file); } } } static void select_enum(GtkComboBox *w, gpointer user_data) { int j, val, sel; struct obj_list_data *d; n_list_store *list; d = (struct obj_list_data *) user_data; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); if (sel < 0) { return; } list = g_object_get_data(G_OBJECT(w), "user-data"); getobj(d->obj, list->name, sel, 0, NULL, &val); j = combo_box_get_active(GTK_WIDGET(w)); if (j < 0 || j == val) return; menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); if (putobj(d->obj, list->name, sel, &j) >= 0) { d->select = sel; } } static void start_editing_enum(GtkCellEditable *editable, struct obj_list_data *d, n_list_store *list) { GtkComboBox *cbox; int sel, type; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); cbox = GTK_COMBO_BOX(editable); g_object_set_data(G_OBJECT(cbox), "user-data", list); SetWidgetFromObjField(GTK_WIDGET(cbox), d->obj, sel, list->name); getobj(d->obj, list->name, sel, 0, NULL, &type); combo_box_set_active(GTK_WIDGET(cbox), type); d->select = -1; g_signal_connect(cbox, "changed", G_CALLBACK(select_enum), d); } static void start_editing(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path, gpointer user_data) { GtkTreeView *view; GtkTreeModel *model; GtkTreeIter iter; n_list_store *list; struct obj_list_data *d; menu_lock(TRUE); UnFocus(); d = user_data; view = GTK_TREE_VIEW(d->text); model = gtk_tree_view_get_model(view); list = (n_list_store *) g_object_get_data(G_OBJECT(renderer), "user-data"); if (list == NULL) return; if (! gtk_tree_model_get_iter_from_string(model, &iter, path)) return; list_store_select_iter(GTK_WIDGET(view), &iter); switch (list->type) { case G_TYPE_ENUM: start_editing_enum(editable, d, list); break; case G_TYPE_STRING: if (GTK_IS_ENTRY(editable)) { int sel; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); if (chkobjfieldtype(d->obj, list->name) == NDOUBLE) { char buf[64]; double val; getobj(d->obj, list->name, sel, 0, NULL, &val); snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, val); gtk_entry_set_text(GTK_ENTRY(editable), buf); } else { char *valstr; if (strcmp(list->name, "file") == 0) { gtk_entry_set_icon_from_icon_name(GTK_ENTRY(editable), GTK_ENTRY_ICON_SECONDARY, "document-open-symbolic"); g_signal_connect(editable, "icon-release", G_CALLBACK(file_select), d); } sgetobjfield(d->obj, sel, list->name, NULL, &valstr, FALSE, FALSE, FALSE); if (valstr) { gtk_entry_set_text(GTK_ENTRY(editable), CHK_STR(valstr)); g_free(valstr); } } } break; case G_TYPE_DOUBLE: case G_TYPE_INT: if (GTK_IS_SPIN_BUTTON(editable)) { gtk_entry_set_alignment(GTK_ENTRY(editable), 1.0); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(editable), FALSE); if (list->max == 36000) { gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(editable), TRUE); } } break; } } static void cancel_editing(GtkCellRenderer *renderer, gpointer user_data) { menu_lock(FALSE); if (user_data) { struct obj_list_data *d; d = (struct obj_list_data *) user_data; gtk_widget_grab_focus(d->text); } } static void toggle_cb(GtkCellRendererToggle *cell_renderer, gchar *path, gpointer user_data) { struct obj_list_data *d; n_list_store *list; long int sel; GtkTreeModel *model; GtkTreeIter iter; d = user_data; list = (n_list_store *) g_object_get_data(G_OBJECT(cell_renderer), "user-data"); if (list == NULL) { return; } model = gtk_tree_view_get_model(GTK_TREE_VIEW(d->text)); if (model == NULL) { return; } if (! gtk_tree_model_get_iter_from_string(model, &iter, path)) { return; } gtk_tree_model_get(model, &iter, COL_ID, &sel, -1); toggle_boolean(d, list->name, sel); } static void enum_cb(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { struct obj_list_data *d; menu_lock(FALSE); d = (struct obj_list_data *) user_data; gtk_widget_grab_focus(d->text); if (str == NULL || d->select < 0) return; d->update(d, FALSE, TRUE); set_graph_modified(); } static void numeric_cb(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { GtkTreeView *view; GtkTreeModel *model; struct obj_list_data *d; n_list_store *list; double val; int ecode; menu_lock(FALSE); d = user_data; if (str == NULL) return; view = GTK_TREE_VIEW(d->text); model = gtk_tree_view_get_model(view); list = (n_list_store *) g_object_get_data(G_OBJECT(cell_renderer), "user-data"); if (list == NULL) return; ecode = str_calc(str, &val, NULL, NULL); if (ecode || val != val || val == HUGE_VAL || val == - HUGE_VAL) { return; } if (list->type == G_TYPE_DOUBLE || list->type == G_TYPE_FLOAT) val *= 100; if (G_TYPE_CHECK_INSTANCE_TYPE(model, GTK_TYPE_LIST_STORE)) { modify_numeric(d, list->name, nround(val)); } } static void string_cb(GtkCellRenderer *renderer, gchar *path, gchar *str, gpointer user_data) { GtkTreeView *view; GtkTreeModel *model; GtkTreeIter iter; struct obj_list_data *d; n_list_store *list; menu_lock(FALSE); d = user_data; view = GTK_TREE_VIEW(d->text); model = gtk_tree_view_get_model(view); list = (n_list_store *) g_object_get_data(G_OBJECT(renderer), "user-data"); if (list == NULL) return; if (! gtk_tree_model_get_iter_from_string(model, &iter, path)) return; list_store_select_iter(GTK_WIDGET(view), &iter); if (G_TYPE_CHECK_INSTANCE_TYPE(model, GTK_TYPE_LIST_STORE)) { modify_string(d, list->name, str); } } static void set_cell_renderer_cb(struct obj_list_data *d, int n, n_list_store *list, GtkWidget *w) { int i; GtkTreeViewColumn *col; GtkCellRenderer *rend; GtkTreeView *view; GList *glist; view = GTK_TREE_VIEW(w); for (i = 0; i < n; i++) { if (! list[i].editable) continue; col = gtk_tree_view_get_column(view, i); glist = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col)); rend = GTK_CELL_RENDERER(glist->data); g_list_free(glist); switch (list[i].type) { case G_TYPE_BOOLEAN: g_signal_connect(rend, "toggled", G_CALLBACK(toggle_cb), d); break; case G_TYPE_DOUBLE: case G_TYPE_INT: list[i].edited_id = g_signal_connect(rend, "edited", G_CALLBACK(numeric_cb), d); g_signal_connect(rend, "editing-started", G_CALLBACK(start_editing), d); g_signal_connect(rend, "editing-canceled", G_CALLBACK(cancel_editing), NULL); break; case G_TYPE_ENUM: list[i].edited_id = g_signal_connect(rend, "edited", G_CALLBACK(enum_cb), d); g_signal_connect(rend, "editing-started", G_CALLBACK(start_editing), d); g_signal_connect(rend, "editing-canceled", G_CALLBACK(cancel_editing), d); break; case G_TYPE_STRING: list[i].edited_id = g_signal_connect(rend, "edited", G_CALLBACK(string_cb), d); g_signal_connect(rend, "editing-started", G_CALLBACK(start_editing), d); g_signal_connect(rend, "editing-canceled", G_CALLBACK(cancel_editing), NULL); break; } } } static GtkCellRenderer * get_cell_renderer_from_tree_view(GtkWidget *view, int i) { GtkTreeViewColumn *col; GtkCellRenderer *rend; GList *glist; col = gtk_tree_view_get_column(GTK_TREE_VIEW(view), i); glist = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col)); rend = GTK_CELL_RENDERER(glist->data); g_list_free(glist); return rend; } void set_editable_cell_renderer_cb(struct obj_list_data *d, int i, n_list_store *list, GCallback end) { GtkCellRenderer *rend; if (list == NULL || end == NULL || i < 0) return; if (! list[i].editable) return; rend = get_cell_renderer_from_tree_view(d->text, i); if (list[i].edited_id) { g_signal_handler_disconnect(rend, list[i].edited_id); } list[i].edited_id = g_signal_connect(rend, "edited", G_CALLBACK(end), d); } static void combo_edited_cb(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { struct obj_list_data *d; menu_lock(FALSE); d = (struct obj_list_data *) user_data; gtk_widget_grab_focus(d->text); } void set_combo_cell_renderer_cb(struct obj_list_data *d, int i, n_list_store *list, GCallback start, GCallback end) { GtkCellRenderer *rend; if (list == NULL || i < 0) return; if (! list[i].editable || (list[i].type != G_TYPE_ENUM && list[i].type != G_TYPE_PARAM)) return; rend = get_cell_renderer_from_tree_view(d->text, i); if (list[i].edited_id) { g_signal_handler_disconnect(rend, list[i].edited_id); } if (end) { list[i].edited_id = g_signal_connect(rend, "edited", G_CALLBACK(end), d); } else { list[i].edited_id = g_signal_connect(rend, "edited", G_CALLBACK(combo_edited_cb), d); } if (start) g_signal_connect(rend, "editing-started", G_CALLBACK(start), d); g_signal_connect(rend, "editing-canceled", G_CALLBACK(cancel_editing), d); } void set_obj_cell_renderer_cb(struct obj_list_data *d, int i, n_list_store *list, GCallback start) { GtkCellRenderer *rend; if (list == NULL || i < 0) return; if (! list[i].editable || list[i].type != G_TYPE_OBJECT) return; rend = get_cell_renderer_from_tree_view(d->text, i); if (start) g_signal_connect(rend, "editing-started", G_CALLBACK(start), d); g_signal_connect(rend, "editing-canceled", G_CALLBACK(cancel_editing), d); } void update_viewer(struct obj_list_data *d) { char const *objects[2]; objects[0] = d->obj->name; objects[1] = NULL; ViewerWinUpdate(objects); } static void obj_copy(struct objlist *obj, int dest, int src) { char *field[] = {"name", NULL}; copy_obj_field(obj, dest, src, field); } static void copy(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel >= 0 && sel <= num) { int id, undo; undo = menu_save_undo_single(UNDO_TYPE_COPY, d->obj->name); id = newobj(d->obj); if (id < 0) { menu_delete_undo(undo); return; } obj_copy(d->obj, id, sel); set_graph_modified(); d->select = id; d->update(d, FALSE, TRUE); } } static void delete(struct obj_list_data *d) { int sel, inst_num; int updated; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); inst_num = chkobjlastinst(d->obj); if (sel < 0 || sel > inst_num) { return; } UnFocus(); menu_save_undo_single(UNDO_TYPE_DELETE, d->obj->name); if (d->delete) { d->delete(d, sel); } else { delobj(d->obj, sel); } inst_num = chkobjlastinst(d->obj); if (inst_num < 0) { d->select = -1; updated = TRUE; } else if (sel > inst_num) { d->select = inst_num; updated = FALSE; } else { d->select = sel; updated = FALSE; } d->update(d, updated, TRUE); set_graph_modified(); } static void move_top(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } UnFocus(); menu_save_undo_single(UNDO_TYPE_ORDER, d->obj->name); movetopobj(d->obj, sel); d->select = 0; d->update(d, FALSE, TRUE); set_graph_modified(); } static void move_last(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } menu_save_undo_single(UNDO_TYPE_ORDER, d->obj->name); movelastobj(d->obj, sel); d->select = num; d->update(d, FALSE, TRUE); set_graph_modified(); } static void move_up(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 1) && (sel <= num)) { menu_save_undo_single(UNDO_TYPE_ORDER, d->obj->name); moveupobj(d->obj, sel); d->select = sel - 1; d->update(d, FALSE, TRUE); set_graph_modified(); } } static void move_down(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel < num)) { menu_save_undo_single(UNDO_TYPE_ORDER, d->obj->name); movedownobj(d->obj, sel); d->select = sel + 1; d->update(d, FALSE, TRUE); set_graph_modified(); } } static void swin_update(struct obj_list_data *d) { int sel, ret, num, undo; GtkWidget *parent; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } parent = TopLevel; d->setup_dialog(d, sel, -1); d->select = sel; if (d->undo_save) { undo = d->undo_save(UNDO_TYPE_EDIT); } else { undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); } ret = DialogExecute(parent, d->dialog); switch (ret) { case IDCANCEL: menu_undo_internal(undo); break; case IDDELETE: if (d->delete) { d->delete(d, sel); } else { delobj(d->obj, sel); } d->select = -1; d->update(d, FALSE, DRAW_REDRAW); break; default: d->update(d, FALSE, DRAW_NOTIFY); } } static void focus(struct obj_list_data *d, enum FOCUS_MODE add) { int sel, num; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) Focus(d->obj, sel, add); } static void focus_all(struct obj_list_data *d) { if (Menulock || Globallock) return; ViewerSelectAllObj(d->obj); } static void toggle_boolean(struct obj_list_data *d, char *field, int sel) { int v1, num; if (Menulock || Globallock) return; num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); getobj(d->obj, field, sel, 0, NULL, &v1); v1 = ! v1; if (putobj(d->obj, field, sel, &v1) < 0) { return; } d->select = sel; d->update(d, FALSE, TRUE); set_graph_modified(); } static void modify_numeric(struct obj_list_data *d, char *field, int val) { int sel, v1, v2, num, undo; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); getobj(d->obj, field, sel, 0, NULL, &v1); if (putobj(d->obj, field, sel, &val) < 0) { return; } getobj(d->obj, field, sel, 0, NULL, &v2); if (v1 != v2) { d->select = sel; d->update(d, FALSE, TRUE); set_graph_modified(); } else { menu_delete_undo(undo); } } static void modify_string(struct obj_list_data *d, char *field, char *str) { int sel, num, undo; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); if (chk_sputobjfield(d->obj, sel, field, str)) { menu_delete_undo(undo); return; } d->select = sel; d->update(d, FALSE, TRUE); } static void hidden(struct obj_list_data *d) { int sel, num; int hidden; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } UnFocus(); menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); getobj(d->obj, "hidden", sel, 0, NULL, &hidden); hidden = hidden ? FALSE : TRUE; putobj(d->obj, "hidden", sel, &hidden); d->select = sel; d->update(d, FALSE, TRUE); set_graph_modified(); } static void do_popup(GdkEventButton *event, struct obj_list_data *d) { if (d->parent->type == TypeFileWin || d->parent->type == TypeAxisWin || d->parent->type == TypeMergeWin || d->parent->type == TypePathWin || d->parent->type == TypeRectWin || d->parent->type == TypeArcWin || d->parent->type == TypeMarkWin || d->parent->type == TypeTextWin) { d->select = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); } gtk_menu_popup_at_pointer(GTK_MENU(d->popup), ((GdkEvent *)event)); } #if GTK_CHECK_VERSION(3, 99, 0) static void ev_button_down(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer user_data) { struct obj_list_data *d; #if GTK_CHECK_VERSION(4, 0, 0) static guint32 time = 0; guint32 current_time; int tdif; #endif guint button; if (Menulock || Globallock) return; #if GTK_CHECK_VERSION(4, 0, 0) current_time = gtk_event_controller_get_current_event_time(GTK_EVENT_CONTROLLER(gesture)); tdif = current_time - time; time = current_time; /* following check is necessary for editable column. */ if (tdif > 0 && tdif < DOUBLE_CLICK_PERIOD) return; #endif d = user_data; button = gtk_gesture_single_get_current_button(GTK_GESTURE_SINGLE(gesture)); switch (button) { case 1: if (n_press > 1) { swin_update(d); } break; } } static void ev_button_up(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer user_data) { struct obj_list_data *d; guint button; if (Menulock || Globallock) return; d = user_data; button = gtk_gesture_single_get_current_button(GTK_GESTURE_SINGLE(gesture)); switch (button) { case 3: if (d->popup) { do_popup(NULL, d); } break; } } static gboolean ev_key_down(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct obj_list_data *d; GtkWidget *w; if (Menulock || Globallock) return TRUE; d = user_data; w = gtk_event_controller_get_widget(GTK_EVENT_CONTROLLER(controller)); if (d->ev_key && d->ev_key(w, keyval, state, user_data)) return TRUE; switch (keyval) { case GDK_KEY_Delete: delete(d); break; case GDK_KEY_Insert: copy(d); break; case GDK_KEY_Home: if (state & GDK_SHIFT_MASK) move_top(d); else return FALSE; break; case GDK_KEY_End: if (state & GDK_SHIFT_MASK) move_last(d); else return FALSE; break; case GDK_KEY_Up: if (state & GDK_SHIFT_MASK) move_up(d); else return FALSE; break; case GDK_KEY_Down: if (state & GDK_SHIFT_MASK) move_down(d); else return FALSE; break; case GDK_KEY_Return: if (state & GDK_SHIFT_MASK) { // e->state &= ~ GDK_SHIFT_MASK; return FALSE; } swin_update(d); break; case GDK_KEY_BackSpace: hidden(d); break; case GDK_KEY_space: if (state & GDK_CONTROL_MASK) return FALSE; if (! d->can_focus) return FALSE; if (state & GDK_SHIFT_MASK) { list_sub_window_add_focus(NULL, d); } else { list_sub_window_focus(NULL, d); } break; default: return FALSE; } return TRUE; } #else static gboolean ev_button_down(GtkWidget *w, GdkEventButton *event, gpointer user_data) { struct obj_list_data *d; static guint32 time = 0; int tdif; if (Menulock || Globallock) return FALSE; g_return_val_if_fail(w != NULL, FALSE); g_return_val_if_fail(event != NULL, FALSE); tdif = event->time - time; time = event->time; /* following check is necessary for editable column. */ if (tdif > 0 && tdif < DOUBLE_CLICK_PERIOD) return TRUE; d = user_data; switch (event->button) { case 1: if (event->type == GDK_2BUTTON_PRESS) { swin_update(d); return TRUE; } break; } return FALSE; } static gboolean ev_button_up(GtkWidget *w, GdkEventButton *event, gpointer user_data) { struct obj_list_data *d; if (Menulock || Globallock) return FALSE; g_return_val_if_fail(w != NULL, FALSE); g_return_val_if_fail(event != NULL, FALSE); d = user_data; switch (event->button) { case 3: if (d->popup) { do_popup(event, d); return TRUE; } break; } return FALSE; } static gboolean ev_key_down(GtkWidget *w, GdkEvent *event, gpointer user_data) { struct obj_list_data *d; GdkEventKey *e; g_return_val_if_fail(w != NULL, FALSE); g_return_val_if_fail(event != NULL, FALSE); if (Menulock || Globallock) return TRUE; d = user_data; e = (GdkEventKey *)event; if (d->ev_key && d->ev_key(w, e->keyval, e->state, user_data)) return TRUE; switch (e->keyval) { case GDK_KEY_Delete: delete(d); break; case GDK_KEY_Insert: copy(d); break; case GDK_KEY_Home: if (e->state & GDK_SHIFT_MASK) move_top(d); else return FALSE; break; case GDK_KEY_End: if (e->state & GDK_SHIFT_MASK) move_last(d); else return FALSE; break; case GDK_KEY_Up: if (e->state & GDK_SHIFT_MASK) move_up(d); else return FALSE; break; case GDK_KEY_Down: if (e->state & GDK_SHIFT_MASK) move_down(d); else return FALSE; break; case GDK_KEY_Return: if (e->state & GDK_SHIFT_MASK) { e->state &= ~ GDK_SHIFT_MASK; return FALSE; } swin_update(d); break; case GDK_KEY_BackSpace: hidden(d); break; case GDK_KEY_space: if (e->state & GDK_CONTROL_MASK) return FALSE; if (! d->can_focus) return FALSE; if (e->state & GDK_SHIFT_MASK) { list_sub_window_add_focus(NULL, d); } else { list_sub_window_focus(NULL, d); } break; default: return FALSE; } return TRUE; } #endif static void swin_realized(GtkWidget *widget, gpointer user_data) { struct obj_list_data *ptr; ptr = (struct obj_list_data *) user_data; ptr->update(ptr, TRUE, TRUE); } GtkWidget * text_sub_window_create(struct SubWin *d) { GtkWidget *view, *swin; GtkTextBuffer *buf; buf = gtk_text_buffer_new(NULL); view = gtk_text_view_new_with_buffer(buf); gtk_text_view_set_editable(GTK_TEXT_VIEW(view), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(view), FALSE); d->data.text = view; swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), view); d->Win = swin; return swin; } GtkWidget * label_sub_window_create(struct SubWin *d) { GtkWidget *label, *swin; label = gtk_label_new(NULL); gtk_widget_set_halign(label, GTK_ALIGN_START); gtk_widget_set_valign(label, GTK_ALIGN_START); gtk_label_set_selectable(GTK_LABEL(label), TRUE); gtk_label_set_line_wrap(GTK_LABEL(label), FALSE); gtk_label_set_single_line_mode(GTK_LABEL(label), FALSE); d->data.text = label; swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), label); d->Win = swin; return swin; } GtkWidget * parameter_sub_window_create(struct SubWin *d) { GtkWidget *grid, *swin; struct obj_list_data *data; grid = gtk_grid_new(); gtk_grid_set_column_spacing(GTK_GRID(grid), 4); data = g_malloc0(sizeof(*data)); if (data == NULL) { return NULL; } data->select = -1; data->parent = d; data->undo_save = NULL; data->can_focus = FALSE; data->list = NULL; data->list_col_num = 0; data->text = grid; swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), grid); d->data.data = data; d->Win = swin; return swin; } static gboolean list_focused(GtkWidget *widget, GdkEvent *ev, gpointer user_data) { set_focus_insensitive(&NgraphApp.Viewer); return FALSE; } #if GTK_CHECK_VERSION(3, 99, 0) static void add_event_controller(GtkWidget *widget, struct obj_list_data *data) { GtkGesture *gesture; GtkEventController *controller; gesture = gtk_gesture_multi_press_new(widget); gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(gesture), 0); g_signal_connect(gesture, "pressed", G_CALLBACK(ev_button_down), data); g_signal_connect(gesture, "released", G_CALLBACK(ev_button_up), data); controller = gtk_event_controller_key_new(widget); g_signal_connect(controller, "key-pressed", G_CALLBACK(ev_key_down), data); } #endif static struct obj_list_data * list_widget_create(struct SubWin *d, int lisu_num, n_list_store *list, int can_focus, GtkWidget **w) { struct obj_list_data *data; GtkWidget *lstor, *swin; GList *col_list, *col; data = g_malloc0(sizeof(*data)); data->select = -1; data->parent = d; data->undo_save = NULL; data->can_focus = can_focus; data->list = list; data->list_col_num = lisu_num; lstor = list_store_create(lisu_num, list); data->text = lstor; set_cell_renderer_cb(data, lisu_num, list, lstor); #if GTK_CHECK_VERSION(3, 99, 0) add_event_controller(lstor, data); #else g_signal_connect(lstor, "button-press-event", G_CALLBACK(ev_button_down), data); g_signal_connect(lstor, "button-release-event", G_CALLBACK(ev_button_up), data); g_signal_connect(lstor, "key-press-event", G_CALLBACK(ev_key_down), data); #endif /* to handle key-press-event correctly in single window mode */ g_signal_connect(lstor, "focus-in-event", G_CALLBACK(list_focused), NULL); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(lstor), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(lstor), COL_ID); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), lstor); col_list = gtk_tree_view_get_columns(GTK_TREE_VIEW(lstor)); for (col = g_list_next(col_list); col; col = g_list_next(col)) { GList *rend_list; rend_list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col->data)); gtk_tree_view_column_add_attribute(GTK_TREE_VIEW_COLUMN(col->data), GTK_CELL_RENDERER(rend_list->data), "sensitive", 0); g_list_free(rend_list); } g_list_free(col_list); g_signal_connect(swin, "realize", G_CALLBACK(swin_realized), data); *w = swin; return data; } GtkWidget * list_sub_window_create(struct SubWin *d, int lisu_num, n_list_store *list) { GtkWidget *swin; struct obj_list_data *data; data = list_widget_create(d, lisu_num, list, d->type != TypeFileWin, &swin); d->data.data = data; d->Win = swin; return swin; } gboolean list_sub_window_must_rebuild(struct obj_list_data *d) { int n, num; num = chkobjlastinst(d->obj); n = list_store_get_num(GTK_WIDGET(d->text)); return (n != num + 1); } void list_sub_window_build(struct obj_list_data *d, list_sub_window_set_val_func func) { GtkTreeIter iter; int i, num; num = chkobjlastinst(d->obj); list_store_clear(d->text); for (i = 0; i <= num; i++) { list_store_append(GTK_WIDGET(d->text), &iter); func(d, &iter, i); } } void list_sub_window_set(struct obj_list_data *d, list_sub_window_set_val_func func) { GtkTreeIter iter; int i, num; gboolean state; state = list_store_get_iter_first(GTK_WIDGET(d->text), &iter); if (! state) return; num = chkobjlastinst(d->obj); for (i = 0; i <= num; i++) { func(d, &iter, i); if (! list_store_iter_next(GTK_WIDGET(d->text), &iter)) { break; } } } void list_sub_window_delete(GtkMenuItem *item, gpointer user_data) { delete((struct obj_list_data *) user_data); } void list_sub_window_copy(GtkMenuItem *item, gpointer user_data) { copy((struct obj_list_data *) user_data); } void list_sub_window_move_top(GtkMenuItem *item, gpointer user_data) { move_top((struct obj_list_data *) user_data); } void list_sub_window_move_last(GtkMenuItem *item, gpointer user_data) { move_last((struct obj_list_data *) user_data); } void list_sub_window_move_up(GtkMenuItem *item, gpointer user_data) { move_up((struct obj_list_data *) user_data); } void list_sub_window_move_down(GtkMenuItem *item, gpointer user_data) { move_down((struct obj_list_data *) user_data); } void list_sub_window_update(GtkMenuItem *item, gpointer user_data) { swin_update((struct obj_list_data *) user_data); } void list_sub_window_focus(GtkMenuItem *item, gpointer user_data) { focus((struct obj_list_data *) user_data, FOCUS_MODE_NORMAL); } void list_sub_window_focus_all(GtkMenuItem *item, gpointer user_data) { focus_all((struct obj_list_data *) user_data); } void list_sub_window_add_focus(GtkMenuItem *item, gpointer user_data) { focus((struct obj_list_data *) user_data, FOCUS_MODE_TOGGLE); } static gboolean ev_popup_menu(GtkWidget *w, gpointer client_data) { struct obj_list_data *d; if (Menulock || Globallock) return TRUE; d = (struct obj_list_data *) client_data; do_popup(NULL, d); return TRUE; } static int set_object_name(struct objlist *obj, int id) { char *name, *new_name, buf[256]; int r; getobj(obj, "name", id, 0, NULL, &name); new_name = NULL; snprintf(buf, sizeof(buf), "%s:%d:name", chkobjectname(obj), id); r = DialogInput(TopLevel, _("Instance name"), buf, name, NULL, NULL, &new_name, NULL, NULL); if (r != IDOK) { return 0; } if (g_strcmp0(name, new_name) == 0) { return 0; } if (new_name == NULL) { putobj(obj, "name", id, new_name); return 1; } g_strstrip(new_name); if (new_name[0] == '\0') { g_free(new_name); new_name = NULL; } if (putobj(obj, "name", id, new_name) < 0) { g_free(new_name); return 0; } return 1; } void list_sub_window_object_name(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data*) client_data; int sel, update, num; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { return; } update = set_object_name(d->obj, sel); if (update) { set_graph_modified(); } } static GtkWidget * create_popup_menu_sub(struct obj_list_data *d, int top, struct subwin_popup_list *list) { GtkWidget *menu, *item, *submenu; int i; menu = gtk_menu_new(); for (i = 0; list[i].type != POP_UP_MENU_ITEM_TYPE_END; i++) { switch (list[i].type) { case POP_UP_MENU_ITEM_TYPE_NORMAL: item = gtk_menu_item_new_with_mnemonic(_(list[i].title)); g_signal_connect(item, "activate", list[i].func, d); break; case POP_UP_MENU_ITEM_TYPE_CHECK: item = gtk_check_menu_item_new_with_mnemonic(_(list[i].title)); g_signal_connect(item, "toggled", list[i].func, d); break; case POP_UP_MENU_ITEM_TYPE_MENU: item = gtk_menu_item_new_with_mnemonic(_(list[i].title)); submenu = create_popup_menu_sub(d, FALSE, list[i].submenu); gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu); break; case POP_UP_MENU_ITEM_TYPE_RECENT_DATA: item = gtk_menu_item_new_with_mnemonic(_(list[i].title)); submenu = create_recent_menu(RECENT_TYPE_DATA); gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), submenu); break; case POP_UP_MENU_ITEM_TYPE_SEPARATOR: default: item = gtk_separator_menu_item_new(); break; } if (top) { d->popup_item[i] = item; } gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); } return menu; } GtkWidget * sub_win_create_popup_menu(struct obj_list_data *d, int n, struct subwin_popup_list *list, GCallback cb) { GtkWidget *menu; if (d->popup_item) g_free(d->popup_item); d->popup_item = g_malloc(sizeof(GtkWidget *) * n); menu = create_popup_menu_sub(d, TRUE, list); d->popup = menu; gtk_widget_show_all(menu); gtk_menu_attach_to_widget(GTK_MENU(menu), GTK_WIDGET(d->text), NULL); g_signal_connect(d->text, "popup-menu", G_CALLBACK(ev_popup_menu), d); if (cb) g_signal_connect(menu, "show", cb, d); return menu; } ngraph-gtk-6.09.05/src/gtk/init.h0000644000175000017500000000116313777542101013356 00000000000000#ifndef _INIT_HEADER #define _INIT_HEADER #include "gtk_common.h" extern char *AppName, *AppClass, *Auther[], *Translator, *Documenter[]; extern GtkApplication *GtkApp; #define NGRAPH_GRAPH_MIME "application/x-ngraph" #define NGRAPH_DATA_MIME "text/plain" #define NGRAPH_TEXT_MIME "text/" int OpenApplication(void); int nallocconsole(void); void nfreeconsole(void); void nforegroundconsole(void); void hide_console(void); void resotre_console(void); const char *n_getlocale(void); int n_initialize(int *argc, char ***argv); void n_save_shell_history(void); void n_finalize(void); void n_application_ready(void); #endif ngraph-gtk-6.09.05/src/gtk/gtk_common.h0000644000175000017500000000110314050121151014521 00000000000000#ifndef GTK_COMMON_HEADER #define GTK_COMMON_HEADER #include "common.h" #include #include #include #include #include #include #ifndef GTK_WIDGET_VISIBLE #define GTK_WIDGET_VISIBLE(w) gtk_widget_get_visible(w) #endif #if WINDOWS || OSX #define USE_HEADER_BAR 0 #else #define USE_HEADER_BAR 1 #endif #define RECENT_CHOOSER_LIMIT 25 #define APPLICATION_ID "com.github.htrb.ngraph-gtk" #define RESOURCE_PATH "/com/github/htrb/ngraph-gtk" #define CAIRO_COORDINATE_OFFSET 1 #endif ngraph-gtk-6.09.05/src/gtk/init.c0000644000175000017500000010267314045741645013364 00000000000000/* * $id: main.c,v 1.47 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #ifdef HAVE_SYS_WAIT_H #include #endif /* HAVE_SYS_WAIT_H */ #include #include #include #include #include #include #include #include #if OSX #include static GtkosxApplication *GtkMacIntegration = NULL; #endif char *DOCDIR, *NDATADIR, *ADDINDIR, *LIBDIR, *PLUGINDIR, *CONFDIR, *NLOCALEDIR, *BINDIR; #include "dir_defs.h" #include "object.h" #include "ioutil.h" #include "nstring.h" #include "nconfig.h" #include "shell.h" #include "gtk_action.h" #include "init.h" #ifdef HAVE_READLINE_READLINE_H #include #include #include "ox11menu.h" #include "x11menu.h" #include "ogra2x11.h" #include "ogra2cairo.h" #include "x11commn.h" #include static char **attempt_shell_completion(char *text, int start, int end); char *HistoryFile = NULL; #define HIST_SIZE 100 #define HIST_FILE "shell_history" #endif /* HAVE_READLINE_READLINE_H */ GtkApplication *GtkApp = NULL; #define CSS_PATH RESOURCE_PATH "/css/ngraph.css" #define SYSCONF "[Ngraph]" static char *systemname, *locale; static int consolefdout, consolefdin, ConsoleAc = FALSE; static int consolecol = 80, consolerow = 25; static int Initialized = FALSE; void *addobjectroot(void); void *addint(void); void *adddouble(void); void *addio(void); void *addstring(void); void *addregexp(void); void *addiarray(void); void *adddarray(void); void *addsarray(void); void *addsystem(void); void *addshell(void); void *adddraw(void); void *addfile(void); void *addmath(void); void *addfit(void); void *addgra(void); void *addgra2(void); void *addgra2null(void); void *addgra2file(void); void *addgra2prn(void); void *addgra2cairo(void); void *addgra2cairofile(void); void *addgra2gtkprint(void); void *addgra2gdk(void); void *addmerge(void); void *addlegend(void); void *addrectangle(void); void *addarc(void); void *addmark(void); void *addtext(void); void *addaxis(void); void *addagrid(void); void *addprm(void); void *addpath(void); void *addparameter(void); void *addgra2gtk(void); void *addmenu(void); void *adddialog(void); #if WINDOWS void *addgra2emf(void); #endif /* WINDOWS */ void resizeconsole(int col, int row); // XtAppContext Application=NULL; char *AppName = "Ngraph", *AppClass = "Ngraph", *Home; #if ! OSX static const char *Snap = NULL; #endif char *Auther[] = { "Satoshi ISHIZAKA", "Ito Hiroyuki", NULL }; char *Translator = "Satoshi ISHIZAKA\n" \ "Ito Hiroyuki" \ ; char *Documenter[] = { "Satoshi ISHIZAKA", "Ito Hiroyuki", NULL }; static int OpenDisplay = FALSE; static void * ( * obj_add_func_ary[]) (void) = { addshell, addgra, addgra2, addgra2null, addgra2file, addgra2prn, addgra2cairo, addgra2cairofile, addgra2gtkprint, addgra2gtk, addgra2gdk, addio, addint, adddouble, addstring, addregexp, addiarray, adddarray, addsarray, addmath, addfit, addprm, adddraw, addagrid, addaxis, addfile, addmerge, addlegend, addrectangle, addarc, addpath, addmark, addtext, addparameter, addmenu, adddialog, #if WINDOWS addgra2emf, #endif }; int OpenApplication(void) { return OpenDisplay; } int putconsole(const char *s) { int len; len = strlen(s); if (write(consolefdout, s, len) < 0) return 0; if (write(consolefdout, "\n", 1) < 0) return 0; return len + 1; } int printfconsole(const char *fmt, ...) { int len; char buf[1024]; va_list ap; va_start(ap, fmt); len = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); if (write(consolefdout, buf, len) < 0) return 0; return len; } static int inputynconsole(const char *mes) { int len, r; char buf[10], yn[] = " [yn] "; len = strlen(mes); if (write(consolefdout, mes, len)) return FALSE; if (write(consolefdout, yn, sizeof(yn) - 1)) return FALSE; do { r = read(consolefdin, buf, 1); } while (strchr("yYnN", buf[0]) == NULL && r >= 0); if (r < 0) return FALSE; do { r = read(consolefdin, buf, 1); } while(buf[0] != '\n' && r >= 0); if ((buf[0] == 'y') || (buf[0] == 'Y')) return TRUE; return FALSE; } static void displaydialogconsole(const char *str) { putconsole(str); } static void displaystatusconsole(const char *str) { } void resizeconsole(int col, int row) { } static char *Terminal = NULL; #if WINDOWS static HWND ConsoleHandle = NULL; static int check_console(int allocconsole) { DWORD console_pid; pid_t pid; if (allocconsole) { return TRUE; } ConsoleHandle = GetConsoleWindow(); if (ConsoleHandle == NULL) { return TRUE; } GetWindowThreadProcessId(ConsoleHandle, &console_pid); pid = getpid(); return (pid != console_pid); } int nallocconsole(void) { if (ConsoleAc) { return TRUE; } if (ConsoleHandle) { ShowWindow(ConsoleHandle, SW_RESTORE); return TRUE; } return FALSE; } void nfreeconsole(void) { if (ConsoleAc) { return; } if (ConsoleHandle) { ShowWindow(ConsoleHandle, SW_HIDE); } } void hide_console(void) { HMENU menu; if (ConsoleHandle == NULL || ConsoleAc) { return; } menu = GetSystemMenu(ConsoleHandle, FALSE); RemoveMenu(menu, SC_CLOSE, MF_BYCOMMAND); nfreeconsole(); } void resotre_console(void) { if (ConsoleHandle == NULL || ConsoleAc) { return; } GetSystemMenu(ConsoleHandle, TRUE); nallocconsole(); } #else /* WINDOWS */ static pid_t consolepid = -1; static struct savedstdio consolesave; static int consolefd[3]; static int interruptconsole(void) { return FALSE; } static void reset_fifo(char *fifo_in, char *fifo_out) { int fdi, fdo; fdi = nopen(fifo_in, O_WRONLY, 0); fdo = nopen(fifo_out, O_RDONLY, 0); if (fdi >= 0) nclose(fdi); if (fdo >= 0) nclose(fdo); } void hide_console(void) { /* do nothing */ } void resotre_console(void) { /* do nothing */ } static int exec_console(char *fifo_in, char *fifo_out) { pid_t pid; pid = fork(); if (pid == -1) { g_unlink(fifo_in); g_unlink(fifo_out); return 1; } else if (pid == 0) { pid = fork(); if (pid == 0) { char buf[2049]; #if OSX snprintf(buf, sizeof(buf), "%s -e %s/terminal %s %s", Terminal, LIBDIR, fifo_in, fifo_out); system(buf); exit(0); #else char **argv, *s2, *s; int len; snprintf(buf, sizeof(buf), "%s %s %s", Terminal, fifo_in, fifo_out); argv = NULL; s = buf; while ((s2 = getitok2(&s, &len, " \t")) != NULL) { if (Snap && g_str_has_suffix(s2, "/terminal")) { g_free(s2); s2 = g_strdup_printf("%s/terminal", LIBDIR); } arg_add(&argv, s2); } execvp(argv[0], argv); #endif } else if (pid != -1) { int status; waitpid(pid, &status, 0); } reset_fifo(fifo_in, fifo_out); exit(0); } return 0; } int nallocconsole(void) { int fd[3] = {-1, -1, -1}, fdi, fdo; unsigned int i; char buf[256], ttyname[256], fifo_in[1024], fifo_out[1024]; struct objlist *sys; char *sysname; char *version; if (ConsoleAc) return FALSE; if (Terminal == NULL) return FALSE; #if OSX { char *path; path = g_find_program_in_path(Terminal); if (path == NULL) { PutStderr("To use this function, please install XQuartz."); return FALSE; } g_free(path); } #endif snprintf(fifo_in, sizeof(fifo_in) - 1, "/tmp/nterm1_%d", getpid()); snprintf(fifo_out, sizeof(fifo_out) - 1, "/tmp/nterm2_%d", getpid()); if (mkfifo(fifo_in, 0600)) { return FALSE; } if (mkfifo(fifo_out, 0600)) { g_unlink(fifo_in); return FALSE; } if (exec_console(fifo_in, fifo_out)) return FALSE; fdi = nopen(fifo_in, O_RDONLY, 0); fdo = nopen(fifo_out, O_WRONLY, 0); g_unlink(fifo_in); g_unlink(fifo_out); sys = chkobject("system"); getobj(sys, "name", 0, 0, NULL, &sysname); getobj(sys, "version", 0, 0, NULL, &version); snprintf(buf, sizeof(buf), "%c]2;Ngraph shell%c%s version %s. Script interpreter.\n", 0x1b, 0x07, sysname, version); if (write(fdo, buf, strlen(buf) + 1) < 0) { nclose(fdi); nclose(fdo); return FALSE; } nclose(fdo); for (i = 0; i < sizeof(ttyname) - 1; i++) { if (read(fdi, ttyname + i, 1) != 1) break; if (ttyname[i] == '\0') break; } ttyname[i] = '\0'; if (i == 0) { nclose(fdi); return FALSE; } for (i = 0; i < sizeof(buf) - 1; i++) { if (read(fdi, buf + i, 1) != 1) break; if (buf[0] == '\0') break; } nclose(fdi); if (i == 0) return FALSE; buf[i] = '\0'; fd[0] = nopen(ttyname, O_RDONLY, 0); if (fd[0] < 0) { goto ErrEnd; } fd[1] = nopen(ttyname, O_WRONLY, 0); if (fd[1] < 0) { goto ErrEnd; } fd[2] = nopen(ttyname, O_WRONLY, 0); if (fd[2] < 0) { goto ErrEnd; } consolepid = atoi(buf); consolefd[0] = dup(0); nclose(0); dup2(fd[0], 0); consolefd[1] = dup(1); nclose(1); dup2(fd[1], 1); consolefd[2] = dup(2); nclose(2); dup2(fd[2], 2); nclose(fd[0]); nclose(fd[1]); nclose(fd[2]); consolefdin = dup(0); consolefdout = dup(2); ConsoleAc = TRUE; savestdio(&consolesave); putstderr = putconsole; printfstderr = printfconsole; ninterrupt = interruptconsole; inputyn = inputynconsole; ndisplaydialog = displaydialogconsole; ndisplaystatus = displaystatusconsole; return TRUE; ErrEnd: if (fd[0] < 0) { nclose(fd[0]); } if (fd[1] < 0) { nclose(fd[1]); } if (fd[2] < 0) { nclose(fd[2]); } return FALSE; } void nfreeconsole(void) { if (ConsoleAc) { nclose(0); if (consolefd[0] != -1) { dup2(consolefd[0], 0); nclose(consolefd[0]); } nclose(1); if (consolefd[1] != -1) { dup2(consolefd[1], 1); nclose(consolefd[1]); } nclose(2); if (consolefd[2] != -1) { dup2(consolefd[2], 2); nclose(consolefd[2]); } kill(consolepid, SIGTERM); consolepid = -1; nclose(consolefdin); nclose(consolefdout); consolefdin = 0; consolefdout = 2; ConsoleAc = FALSE; loadstdio(&consolesave); } } #endif /* WINDOWS */ void nforegroundconsole() { } static void #ifdef HAVE_READLINE_READLINE_H load_config(struct objlist *sys, N_VALUE *inst, int *allocconsole, int *history_size) #else load_config(struct objlist *sys, N_VALUE *inst, int *allocconsole) #endif { FILE *fp; char *tok, *str, *f1, *endptr, *s2; int len; long val; fp = openconfig(SYSCONF); if (fp == NULL) { return; } while ((tok = getconfig(fp, &str)) != NULL) { s2 = str; if (strcmp(tok, "login_shell") == 0) { f1 = getitok2(&s2, &len, " \t,"); if (_putobj(sys, "login_shell", inst, f1)) exit(1); } else if (strcmp(tok, "create_object") == 0) { while ((f1 = getitok2(&s2, &len, " \t,")) != NULL) { struct objlist *obj; obj = getobject(f1); if (obj) { newobj(obj); } g_free(f1); } } else if (strcmp(tok, "alloc_console") == 0) { f1 = getitok2(&s2, &len, " \t,"); val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') { if (val == 0) *allocconsole = FALSE; else *allocconsole = TRUE; } g_free(f1); } else if (strcmp(tok, "console_size") == 0) { f1 = getitok2(&s2, &len, " \x09,"); val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') consolecol = val; g_free(f1); f1 = getitok2(&s2, &len, " \x09,"); val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') consolerow = val; g_free(f1); #ifdef HAVE_READLINE_READLINE_H } else if (strcmp(tok, "history_size") == 0) { f1 = getitok2(&s2, &len, " \t,"); val = strtol(f1, &endptr, 10); if (endptr[0] == '\0' && val > 0) { *history_size = val; } g_free(f1); #endif } else if (strcmp(tok, "terminal") == 0) { Terminal = getitok2(&s2, &len, ""); } else { fprintf(stderr, "(%s): configuration '%s' in section %s is not used.\n", AppName, tok, SYSCONF); } g_free(tok); g_free(str); } closeconfig(fp); } #if WINDOWS static int set_dir_defs(char *app) { char *utf8_name, *app_path, *tmp; utf8_name = n_locale_to_utf8(app); if (utf8_name == NULL) { return 1; } changefilename(utf8_name); tmp = g_canonicalize_filename(utf8_name, NULL); g_free(utf8_name); utf8_name = tmp; tmp = g_path_get_dirname(utf8_name); g_free(utf8_name); if (tmp == NULL) { return 1; } app_path = g_path_get_dirname(tmp); g_free(tmp); if (app_path == NULL) { return 1; } BINDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "bin"); DOCDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/doc/ngraph-gtk"); LIBDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "lib/ngraph-gtk"); PLUGINDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "lib/ngraph-gtk/plugins"); NDATADIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/ngraph-gtk"); ADDINDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/ngraph-gtk/addin"); CONFDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "etc/ngraph-gtk"); NLOCALEDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/locale"); g_free(app_path); return 0; } #elif OSX static int set_dir_defs(char *app) { const char *app_contents; char *app_path, *bin_path; app_contents = g_getenv("NGRAPH_APP_CONTENTS"); app_path = gtkosx_application_get_resource_path(); if (app_contents) { bin_path = gtkosx_application_get_executable_path(); LIBDIR = g_path_get_dirname(bin_path); g_free(bin_path); } else { bin_path = g_path_get_dirname(app_path); g_free(app_path); app_path = bin_path; LIBDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "libexec/ngraph-gtk"); } if (app_path == NULL) { return 1; } BINDIR = NULL; DOCDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/doc/ngraph-gtk"); PLUGINDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "lib/ngraph-gtk/plugins"); NDATADIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/ngraph-gtk"); ADDINDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/ngraph-gtk/addin"); CONFDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "etc/ngraph-gtk"); NLOCALEDIR = g_strdup_printf("%s%c%s", app_path, DIRSEP, "share/locale"); g_free(app_path); return 0; } #else static int set_dir_defs(char *app) { const char *snap; snap = g_getenv("SNAP"); if (snap) { BINDIR = g_strdup_printf("%s%c%s", snap, DIRSEP, "bin"); Snap = snap; } else { BINDIR = NULL; snap = ""; } DOCDIR = g_strdup_printf("%s%s", snap, _DOCDIR); LIBDIR = g_strdup_printf("%s%s", snap, _LIBDIR); PLUGINDIR = g_strdup_printf("%s%s", snap, _PLUGINDIR); NDATADIR = g_strdup_printf("%s%s", snap, _NDATADIR); ADDINDIR = g_strdup_printf("%s%s", snap, _ADDINDIR); CONFDIR = g_strdup_printf("%s%s", snap, _CONFDIR); NLOCALEDIR = g_strdup_printf("%s%s", snap, LOCALEDIR); return 0; } #endif static void set_path_env(char *homedir) { const char *path; char *pathset; if (BINDIR == NULL) { return; } path = g_getenv("PATH"); pathset = g_strdup_printf("%s%s%s%s%s%s%s%s%s%s%s", homedir, PATHSEP, ADDINDIR, PATHSEP, LIBDIR, PATHSEP, BINDIR, PATHSEP, ".", PATHSEP, CHK_STR(path)); path_to_win(pathset); g_setenv("PATH", pathset, TRUE); g_setenv("NGRAPHLIB", LIBDIR, TRUE); g_setenv("NGRAPHCONF", CONFDIR, TRUE); g_free(pathset); } const char * n_getlocale(void) { return locale; } static void load_css(void) { GtkCssProvider *css_provider; css_provider = gtk_css_provider_new(); gtk_css_provider_load_from_resource(css_provider, CSS_PATH); gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css_provider), GTK_STYLE_PROVIDER_PRIORITY_USER); } void n_application_ready(void) { #if OSX if (GtkMacIntegration) { gtkosx_application_ready(GtkMacIntegration); } #endif } #if OSX static gboolean osx_open_file(GtkosxApplication *app, gchar *path, gpointer user_data) { char *dir; if (path == NULL) { return TRUE; } dir = getdirname(path); if (dir) { nchdir(dir); g_free(dir); } LoadNgpFile(path, FALSE, "-f"); return TRUE; } static void create_app_menu(GtkApplication *app) { GtkBuilder *builder; GObject *app_menu; /* only for remove "Settings" menu item */ builder = gtk_builder_new_from_resource(RESOURCE_PATH "/gtk/menus-appmenu.ui"); app_menu = gtk_builder_get_object(builder, "app-menu"); gtk_application_set_app_menu(app, G_MENU_MODEL(app_menu)); g_object_unref(builder); } #endif int n_initialize(int *argc, char ***argv) { char *homedir, *datadir, *docdir, *libdir, *plugindir, *confdir; const char *home; N_VALUE *inst; struct objlist *sys; unsigned int j; int allocconsole = FALSE; #ifdef HAVE_READLINE_READLINE_H int history_size = HIST_SIZE; #endif struct lconv *lconv; if (Initialized) { return 0; } #if EOF == -1 char_type_buf_init(); #endif #if ! WINDOWS set_childhandler(); #endif /* WINDOWS */ set_dir_defs((*argv)[0]); #ifdef HAVE_GETTEXT setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, NLOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); textdomain(PACKAGE); #endif /* HAVE_GETTEXT */ OpenDisplay = gtk_init_check(argc, argv); if (OpenDisplay) { GtkApp = gtk_application_new(APPLICATION_ID, G_APPLICATION_NON_UNIQUE); g_application_register(G_APPLICATION(GtkApp), NULL, NULL); setup_actions(GtkApp); } g_set_application_name(AppName); #if OSX GtkMacIntegration = gtkosx_application_get(); g_signal_connect(GtkMacIntegration, "NSApplicationOpenFile", G_CALLBACK(osx_open_file), NULL); if (OpenDisplay) { create_app_menu(GtkApp); } #endif if (init_cmd_tbl()) { exit(1); } ignorestdio(NULL); inputyn = vinputyn; ninterrupt = vinterrupt; printfstderr = seprintf; putstderr = seputs; consolefdin = 0; consolefdout = 2; if (OpenDisplay) { load_css(); } #if WINDOWS locale = g_win32_getlocale(); #else /* WINDOWS */ locale = setlocale(LC_ALL, NULL); locale = g_strdup(CHK_STR(locale)); #endif /* WINDOWS */ /* to use a period as a decimal separator */ lconv = localeconv(); set_system_decimalsign(lconv->decimal_point); setlocale(LC_NUMERIC, "C"); libdir = g_strdup(LIBDIR); if (libdir == NULL) exit(1); plugindir = g_strdup(PLUGINDIR); if (plugindir == NULL) exit(1); docdir = g_strdup(DOCDIR); if (docdir == NULL) exit(1); datadir = g_strdup(NDATADIR); if (datadir == NULL) exit(1); confdir = g_strdup(CONFDIR); if (confdir == NULL) { exit(1); } if ((home = g_getenv("HOME")) != NULL) { homedir = g_strdup_printf("%s/%s", home, HOME_DIR); if (homedir == NULL) { exit(1); } changefilename(homedir); } else { if ((home = g_get_user_config_dir()) != NULL) { homedir = g_strdup_printf("%s/%s", home, HOME_DIR); if (homedir == NULL) { exit(1); } changefilename(homedir); } else { homedir = g_strdup(confdir); if (homedir == NULL) { exit(1); } } } set_path_env(homedir); set_environ(); if (addobjectroot() == NULL) exit(1); if (addsystem() == NULL) exit(1); sys = getobject("system"); if (sys == NULL) exit(1); if (newobj(sys) < 0) exit(1); inst = chkobjinst(sys, 0); if (inst == NULL) exit(1); if (_putobj(sys, "conf_dir", inst, confdir)) exit(1); if (_putobj(sys, "data_dir", inst, datadir)) exit(1); if (_putobj(sys, "doc_dir", inst, docdir)) exit(1); if (_putobj(sys, "lib_dir", inst, libdir)) exit(1); if (_putobj(sys, "plugin_dir", inst, plugindir)) exit(1); if (_putobj(sys, "home_dir", inst, homedir)) exit(1); if (_getobj(sys, "conf_dir", inst, &confdir) == -1) exit(1); if (_getobj(sys, "data_dir", inst, &datadir) == -1) exit(1); if (_getobj(sys, "doc_dir", inst, &docdir) == -1) exit(1); if (_getobj(sys, "lib_dir", inst, &libdir) == -1) exit(1); if (_getobj(sys, "plugin_dir", inst, &plugindir) == -1) exit(1); if (_getobj(sys, "home_dir", inst, &homedir) == -1) exit(1); if (_getobj(sys, "name", inst, &systemname) == -1) exit(1); for (j = 0; j < sizeof(obj_add_func_ary) / sizeof(*obj_add_func_ary); j++) { if (obj_add_func_ary[j]() == NULL) exit(1); } #ifdef HAVE_READLINE_READLINE_H load_config(sys, inst, &allocconsole, &history_size); rl_readline_name = "ngraph"; rl_completer_word_break_characters = " \t\n\"'@><;|&({}`"; rl_attempted_completion_function = (rl_completion_func_t *) attempt_shell_completion; rl_completion_entry_function = NULL; HistoryFile = g_strdup_printf("%s/%s", homedir, HIST_FILE); if (HistoryFile) { read_history(HistoryFile); } using_history(); stifle_history(history_size); #else load_config(sys, inst, &allocconsole); #endif putstderr = putconsole; printfstderr = printfconsole; inputyn = inputynconsole; ndisplaydialog = displaydialogconsole; ndisplaystatus = displaystatusconsole; if (allocconsole) { nallocconsole(); } #if WINDOWS ConsoleAc = check_console(allocconsole); if (isatty(0) && isatty(1) && isatty(2)) { if (! allocconsole) { consolefdin = dup(0); consolefdout = dup(2); } } #else if (isatty(0) && isatty(1) && isatty(2)) { ConsoleAc = TRUE; if (! allocconsole) { consolefdin = dup(0); consolefdout = dup(2); } } else { ConsoleAc = FALSE; } #endif Initialized = TRUE; return 0; } void n_save_shell_history(void) { #ifdef HAVE_READLINE_READLINE_H if (HistoryFile) { write_history(HistoryFile); } #endif } void n_finalize(void) { #ifdef HAVE_READLINE_READLINE_H if (HistoryFile != NULL) { n_save_shell_history(); g_free(HistoryFile); HistoryFile = NULL; } #endif #if ! WINDOWS if (ConsoleAc && (consolepid != -1)) { nfreeconsole(); } #endif if (Terminal) { g_free(Terminal); Terminal = NULL; } } #ifdef HAVE_READLINE_READLINE_H struct mylist { struct mylist *next; int len; char str[1]; }; static char **obj_name_matching(const char *text); static char *obj_member_completion_function(const char *text, int state); static char *obj_name_completion_function(const char *text, int state); static char *my_completion_function(const char *text, int state, char **func(const char *)); static char *command_word_completion_function(const char *hint_text, int state); static char **cmd_name_matching(const char *text); static char **get_obj_member_list(struct objlist *objcur, char *member); static char **get_obj_enum_list(struct objlist *objcur, char *member, char *val); static char **get_obj_bool_list(struct objlist *objcur, char *member, char *val); static char **get_obj_font_list(struct objlist *objcur, char *member, char *val); static int get_obj_num(void); static struct mylist *mylist_add(struct mylist *parent, const char *text); static struct mylist *mylist_cat(struct mylist *list_top, struct mylist *list); static void mylist_free(struct mylist *list); static int mylist_num(const struct mylist *list); static struct mylist *get_file_list(const char *path, int type, int mode); static struct mylist *get_exec_file_list(void); static char ** attempt_shell_completion(char *text, int start, int end) { char **matches = NULL; int in_command_position, ti; char *command_separator_chars = ";|(`"; ti = start - 1; while ((ti > -1) && (whitespace(rl_line_buffer[ti]))) ti--; in_command_position = 0; if (ti < 0) { in_command_position++; } else if (strchr(command_separator_chars, rl_line_buffer[ti])) { in_command_position++; } if (in_command_position) matches = rl_completion_matches(text, command_word_completion_function); if (!matches) matches = rl_completion_matches(text, obj_name_completion_function); if (!matches) matches = rl_completion_matches(text, obj_member_completion_function); return matches; } static char * obj_member_completion_function(const char *text, int state) { static char **list = (char **) NULL; static int list_index = 0, first_char_loc; /* If we don't have any state, make some. */ if (!state) { static char *obj, *instances, *member, *val; struct objlist *objcur; if (list) g_free(list); list = (char **) NULL; first_char_loc = 0; obj = g_strdup(text); if (obj == NULL) return NULL; if ((instances = strchr(obj, ':')) && (member = strchr(instances + 1, ':'))) { *instances = *member = '\0'; instances++; member++; } else { g_free(obj); return NULL; } objcur = getobject(obj); if (objcur == NULL) { g_free(obj); return NULL; } if ((val = strchr(member, '=')) != NULL) { *val = '\0'; val++; first_char_loc = val - obj; list = get_obj_enum_list(objcur, member, val); if (list == NULL) list = get_obj_bool_list(objcur, member, val); if (list == NULL) list = get_obj_font_list(objcur, member, val); } else { first_char_loc = member - obj; list = get_obj_member_list(objcur, member); } list_index = 0; g_free(obj); } if (list && list[list_index]) { char *t, *tt; t = g_strdup_printf("%.*s%s", first_char_loc, text, list[list_index]); tt = strdup(t); g_free(t); list_index++; return tt; } return NULL; } static char ** get_obj_member_list(struct objlist *objcur, char *member) { char **list = (char **) NULL, *field; int i, j, len, n; n = chkobjfieldnum(objcur); list = g_malloc(sizeof(*list) * (n + 1)); if (list == NULL) { return NULL; } len = strlen(member); j = 0; for (i = 0; i < n; i++) { field = chkobjfieldname(objcur, i); if (field == NULL) { continue; } if (strncmp(field, member, len) == 0) { list[j++] = field; } } list[j] = NULL; return list; } static char ** get_obj_enum_list(struct objlist *objcur, char *member, char *val) { char **list = (char **) NULL, **enumlist; int i, j, len; if (chkobjfieldtype(objcur, member) != NENUM) return NULL; enumlist = (char **) chkobjarglist(objcur, member); for (i = 0; enumlist[i] != NULL; i++); list = g_malloc((sizeof(*list)) * (i + 1)); if (list == NULL) return NULL; len = strlen(val); j = 0; for (i = 0; enumlist[i] && enumlist[i][0]; i++) { if (strncmp(enumlist[i], val, len) == 0) { list[j++] = enumlist[i]; } } list[j] = NULL; return list; } static char ** get_obj_bool_list(struct objlist *objcur, char *member, char *val) { char **list = (char **) NULL; static char *boollist[] = { "true", "false", NULL }; int i, j, len; if (chkobjfieldtype(objcur, member) != NBOOL) return NULL; list = g_malloc(sizeof(boollist)); if (list == NULL) return NULL; len = strlen(val); j = 0; for (i = 0; boollist[i] != NULL; i++) { if (strncmp(boollist[i], val, len) == 0) { list[j++] = boollist[i]; } } list[j] = NULL; return list; } static char ** get_obj_font_list(struct objlist *objcur, char *member, char *val) { char **list = (char **) NULL; struct fontmap *fontmap, *fontmaproot; int j, len; if (Gra2cairoConf == NULL) return NULL; fontmaproot = Gra2cairoConf->fontmap_list_root; if (fontmaproot == NULL) return NULL; if (chkobjfieldtype(objcur, member) != NSTR) return NULL; if (strstr(member, "font") == NULL) return NULL; list = g_malloc((sizeof(*list)) * (Gra2cairoConf->font_num + 1)); if (list == NULL) return NULL; len = strlen(val); j = 0; for (fontmap = fontmaproot; fontmap != NULL; fontmap = fontmap->next) { if (strncmp(fontmap->fontalias, val, len) == 0) { list[j++] = fontmap->fontalias; } } list[j] = NULL; return list; } static char * command_word_completion_function(const char *text, int state) { return my_completion_function(text, state, cmd_name_matching); } static char * obj_name_completion_function(const char *text, int state) { return my_completion_function(text, state, obj_name_matching); } static char * my_completion_function(const char *text, int state, char **func(const char *)) { static char **list = (char **) NULL; static int list_index = 0; static int first_char_loc; /* If we don't have any state, make some. */ if (!state) { if (list) g_free(list); list = (char **) NULL; first_char_loc = 0; list = func(&text[first_char_loc]); list_index = 0; } if (list && list[list_index]) { char *t = strdup(list[list_index]); if (t == NULL) return NULL; list_index++; return t; } return NULL; } static int get_obj_num(void) { static int num = 0; if (num == 0) { struct objlist *objcur; for (objcur = chkobjroot(); objcur != NULL; objcur = objcur->next) num++; } return num; } static char ** obj_name_matching(const char *text) { int j, text_len; struct objlist *objcur; char **list; list = g_malloc((get_obj_num() + 1) * sizeof(*list)); if (list == NULL) return NULL; text_len = strlen(text); j = 0; for (objcur = chkobjroot(); objcur != NULL; objcur = objcur->next) { if (strncmp(objcur->name, text, text_len) == 0) list[j++] = objcur->name; } if (j == 0) { g_free(list); list = NULL; } else { list[j] = NULL; } assert(j < get_obj_num() + 1); return list; } static char ** cmd_name_matching(const char *text) { int i, j, text_len, file_len; struct objlist *objcur; char **list; struct mylist *file_list = NULL, *file_list_cur = NULL; file_list = get_exec_file_list(); file_len = mylist_num(file_list); list = g_malloc((CMDNUM + CPCMDNUM + get_obj_num() + file_len + 1) * sizeof(*list)); if (list == NULL) return NULL; text_len = strlen(text); j = 0; for (file_list_cur = file_list; file_list_cur != NULL; file_list_cur = file_list_cur->next) { if (strncmp(file_list_cur->str, text, text_len) == 0) { list[j++] = file_list_cur->str; } } for (i = 0; i < CMDNUM; i++) { if (strncmp(cmdtable[i].name, text, text_len) == 0) { list[j++] = cmdtable[i].name; } } for (i = 0; i < CPCMDNUM; i++) { if (strncmp(cpcmdtable[i], text, text_len) == 0) { list[j++] = cpcmdtable[i]; } } for (objcur = chkobjroot(); objcur != NULL; objcur = objcur->next) { if (strncmp(objcur->name, text, text_len) == 0) list[j++] = objcur->name; } if (j == 0) { g_free(list); list = NULL; } else { list[j] = NULL; } assert(j < CMDNUM + CPCMDNUM + get_obj_num() + file_len + 1); return list; } struct mylist * get_exec_file_list(void) { char *path, *next_ptr, *path_ptr; const char *path_env; static struct mylist *list = NULL, *list_next = NULL; if (list != NULL) { return list; /* mylist_free(list); list = NULL; */ } if ((path_env = g_getenv("PATH")) == NULL) return NULL; if ((path = path_ptr = g_strdup(path_env)) == NULL) return NULL; while ((next_ptr = strchr(path_ptr, ':')) != NULL) { *next_ptr = '\0'; next_ptr++; list_next = get_file_list(path_ptr, S_IFREG, S_IXUSR); list = mylist_cat(list, list_next); path_ptr = next_ptr; } g_free(path); return list; } static struct mylist * get_file_list(const char *path, int type, int mode) { GDir *dir; const char *ent; GStatBuf statbuf; struct mylist *list = NULL, *list_next = list; char *full_path_name; if ((dir = g_dir_open(path, 0, NULL)) == NULL) { return NULL; } while ((ent = g_dir_read_name(dir)) != NULL) { full_path_name = g_strdup_printf("%s/%s", path, ent); if (full_path_name == NULL) { if (list != NULL) { mylist_free(list); } list = NULL; break; } nstat(full_path_name, &statbuf); if ((statbuf.st_mode & type) && (statbuf.st_mode & mode)) { list_next = mylist_add(list_next, ent); if (list == NULL) { list = list_next; } } } g_dir_close(dir); return list; } static struct mylist * mylist_add(struct mylist *parent, const char *text) { struct mylist *list; int len; len = strlen(text) + 1; if ((list = g_malloc(sizeof(struct mylist) + len)) == NULL) return NULL; memcpy(list->str, text, len); list->next = NULL; list->len = len; if (parent != NULL) parent->next = list; return list; } static void mylist_free(struct mylist *list) { struct mylist *tmp; while (list != NULL) { tmp = list->next; g_free(list); list = tmp; } } static int mylist_num(const struct mylist *list) { int num = 0; while (list != NULL) { num++; list = list->next; } return num; } static struct mylist * mylist_cat(struct mylist *list_top, struct mylist *list) { struct mylist *list_ptr; if (list_top == NULL) return list; list_ptr = list_top; while (list_ptr->next != NULL) list_ptr = list_ptr->next; list_ptr->next = list; return list_top; } #endif ngraph-gtk-6.09.05/src/gtk/ogra2x11.c0000644000175000017500000005323714143146756013767 00000000000000/* * $Id: ogra2x11.c,v 1.34 2010-01-04 05:11:28 hito Exp $ * * This file is part of "Ngraph for GTK". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for GTK" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for GTK" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include #include #include "strconv.h" #include "object.h" #include "ioutil.h" #include "gra.h" #include "nstring.h" #include "mathfn.h" #include "nconfig.h" #include "shell.h" #include "init.h" #include "gtk_widget.h" #include "x11menu.h" #include "x11gui.h" #include "ogra2x11.h" #include "ogra2cairo.h" #define NAME "gra2gtk" #define ALIAS "gra2win:gra2x11" #define PARENT "gra2cairo" #define NVERSION "1.00.00" #define GRA2GTKCONF "[gra2gtk]" #define ERRDISPLAY 100 #define ERRCMAP 101 #define WINWIDTH 578 #define WINHEIGHT 819 #define WINSIZE_MAX 10000 static char *gtkerrorlist[] = { "cannot open display.", "not enough color cell.", }; #define ERRNUM (sizeof(gtkerrorlist)/sizeof(*gtkerrorlist)) struct action_type { enum { ACTION_TYPE_NONE, ACTION_TYPE_KEY, ACTION_TYPE_BUTTON, ACTION_TYPE_SCROLL, } type; int val; }; struct gtklocal { struct objlist *obj; GdkCursor *blank_cursor; N_VALUE *inst; GtkWidget *mainwin, *View; cairo_surface_t *surface; GdkWindow *window; char *title; int redraw, fit, frame; unsigned int windpi; int PaperWidth, PaperHeight; struct action_type action; double bg_r, bg_g, bg_b; struct gra2cairo_local *local; #if OSX int menulock; #endif }; static void gtkMakeRuler(cairo_t *cr, struct gtklocal *gtklocal); static int gtk_evloop(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); static int gtkclose(GtkWidget *widget, GdkEvent *event, gpointer user_data); static void gtkchangedpi(struct gtklocal *gtklocal); static gboolean gtkevpaint(GtkWidget * w, cairo_t * e, gpointer user_data); static int gtkinit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); static int gtkdone(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); static int gtkclear(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); static int gtkredraw(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); static int dot2pixel(struct gtklocal *gtklocal, int r); static int gtk_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); static gboolean gtkevpaint(GtkWidget *w, cairo_t *cr, gpointer user_data) { struct gtklocal *gtklocal; gtklocal = (struct gtklocal *) user_data; if (gtklocal->surface == NULL) { return FALSE; } if (gtklocal->redraw) { GRAredraw(gtklocal->obj, gtklocal->inst, TRUE, 0); gtklocal->redraw = FALSE; } cairo_set_source_surface(cr, gtklocal->surface, 0, 0); cairo_paint(cr); gtkMakeRuler(cr, gtklocal); return FALSE; } static int gtkclose(GtkWidget *widget, GdkEvent *event, gpointer user_data) { struct gtklocal *local; int i, id; struct objlist *obj; obj = chkobject("gra2gtk"); for (i = 0; i <= chkobjlastinst(obj); i++) { N_VALUE *inst; inst = chkobjinst(obj, i); _getobj(obj, "_gtklocal", inst, &local); if (local->mainwin == widget) { _getobj(obj, "id", inst, &id); delobj(obj, id); break; } } return TRUE; } static gboolean ev_key_down(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct gtklocal *gtklocal; gtklocal = (struct gtklocal *) user_data; gtklocal->action.type = ACTION_TYPE_KEY; gtklocal->action.val = keyval; switch (keyval) { case GDK_KEY_w: if (state & GDK_CONTROL_MASK) { gtkclose(gtklocal->mainwin, NULL, NULL); return TRUE; } return FALSE; } return FALSE; } void size_allocate(GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { struct gtklocal *local; double w, h, rh, rw, ratio; int pw, ph, dpi; local = (struct gtklocal *) user_data; if (local == NULL) { return; } if (! local->fit) { return; } w = allocation->width; h = allocation->height; pw = local->PaperWidth; ph = local->PaperHeight; if (pw < 1 || ph < 1) { return; } rw = w / pw; rh = h / ph; ratio = (rh > rw) ? rw : rh; dpi = ratio * DPI_MAX; local->windpi = dpi; local->local->pixel_dot_x = local->local->pixel_dot_y = ratio; _putobj(local->obj, "dpi", local->inst, &dpi); gtkchangedpi(local); } static void cursor_moved(GtkEventControllerMotion *controller, gdouble x, gdouble y, gpointer user_data) { struct gtklocal *gtklocal; gtklocal = (struct gtklocal *) user_data; if (gtklocal->blank_cursor) { gdk_window_set_cursor(gtk_widget_get_window(gtklocal->mainwin), NULL); g_object_unref(gtklocal->blank_cursor); gtklocal->blank_cursor = NULL; } } static void button_released(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer user_data) { struct gtklocal *gtklocal; guint button; gtklocal = (struct gtklocal *) user_data; button = gtk_gesture_single_get_current_button(GTK_GESTURE_SINGLE(gesture)); gtklocal->action.type = ACTION_TYPE_BUTTON; gtklocal->action.val = button; } static gboolean scrolled(GtkWidget *widget, GdkEventScroll *event, gpointer user_data) { struct gtklocal *gtklocal; gtklocal = (struct gtklocal *) user_data; switch (event->direction) { case GDK_SCROLL_UP: case GDK_SCROLL_DOWN: case GDK_SCROLL_LEFT: case GDK_SCROLL_RIGHT: gtklocal->action.type = ACTION_TYPE_SCROLL; gtklocal->action.val = event->direction; break; case GDK_SCROLL_SMOOTH: break; } return FALSE; } static void add_event_button(GtkWidget *widget, struct gtklocal *gtklocal) { GtkGesture *ev; ev = gtk_gesture_multi_press_new(widget); gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(ev), 0); g_signal_connect(ev, "released", G_CALLBACK(button_released), gtklocal); } static void add_event_motion(GtkWidget *widget, struct gtklocal *gtklocal) { GtkEventController *ev; ev = gtk_event_controller_motion_new(widget); g_signal_connect(ev, "motion", G_CALLBACK(cursor_moved), gtklocal); } static int gtkinit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *gtklocal; struct gra2cairo_local *local; struct objlist *robj; int idn, oid, width, height; GtkWidget *scrolled_window = NULL; if (_exeparent(obj, (char *) argv[1], inst, rval, argc, argv)) return 1; gtklocal = g_malloc(sizeof(*gtklocal)); if (gtklocal == NULL) goto errexit; gtklocal->obj = obj; gtklocal->inst = inst; gtklocal->title = NULL; gtklocal->mainwin = NULL; gtklocal->fit = FALSE; gtklocal->frame = TRUE; gtklocal->blank_cursor = NULL; gtklocal->action.type = ACTION_TYPE_NONE; gtklocal->action.val = 0; if (_putobj(obj, "_gtklocal", inst, gtklocal)) goto errexit; if (_getobj(obj, "oid", inst, &oid)) goto errexit; if (_getobj(obj, "_local", inst, &local)) goto errexit; if (_getobj(obj, "fit", inst, >klocal->fit)) goto errexit; if (_getobj(obj, "frame", inst, >klocal->frame)) goto errexit; gtklocal->PaperWidth = 0; gtklocal->PaperHeight = 0; gtklocal->windpi = DEFAULT_DPI / 2; gtklocal->bg_r = 1.0; gtklocal->bg_g = 1.0; gtklocal->bg_b = 1.0; gtklocal->local = local; #if OSX gtklocal->menulock = FALSE; #endif if (gtklocal->windpi < 1) gtklocal->windpi = 1; if (gtklocal->windpi > DPI_MAX) gtklocal->windpi = DPI_MAX; if (_putobj(obj, "dpi", inst, &(gtklocal->windpi))) goto errexit; if (_putobj(obj, "dpix", inst, &(gtklocal->windpi))) goto errexit; if (_putobj(obj, "dpiy", inst, &(gtklocal->windpi))) goto errexit; local->pixel_dot_x = local->pixel_dot_y = gtklocal->windpi / (DPI_MAX * 1.0); width = WINWIDTH; height = WINHEIGHT; if (_putobj(obj, "width", inst, &width)) goto errexit; if (_putobj(obj, "height", inst, &height)) goto errexit; if (! OpenApplication()) { error(obj, ERRDISPLAY); goto errexit; } gtklocal->title = mkobjlist(obj, NULL, oid, NULL, TRUE); gtklocal->mainwin = gtk_window_new(GTK_WINDOW_TOPLEVEL); if (TopLevel) { gtk_window_set_modal(GTK_WINDOW(gtklocal->mainwin), TRUE); gtk_window_set_transient_for(GTK_WINDOW(gtklocal->mainwin), GTK_WINDOW(TopLevel)); #if OSX gtklocal->menulock = Menulock; Menulock = TRUE; #endif } gtk_window_set_default_size(GTK_WINDOW(gtklocal->mainwin), width, height); g_signal_connect_swapped(gtklocal->mainwin, "delete-event", G_CALLBACK(gtkclose), gtklocal->mainwin); add_event_key(gtklocal->mainwin, G_CALLBACK(ev_key_down), NULL, gtklocal); gtk_window_set_title((GtkWindow *) gtklocal->mainwin, gtklocal->title); scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(gtklocal->mainwin), scrolled_window); gtklocal->View = gtk_drawing_area_new(); gtk_widget_set_halign(gtklocal->View, GTK_ALIGN_CENTER); gtk_widget_set_valign(gtklocal->View, GTK_ALIGN_CENTER); g_signal_connect(gtklocal->View, "draw", G_CALLBACK(gtkevpaint), gtklocal); g_signal_connect(gtklocal->mainwin, "size-allocate", G_CALLBACK(size_allocate), gtklocal); gtk_container_add(GTK_CONTAINER(scrolled_window), gtklocal->View); gtk_widget_show_all(gtklocal->mainwin); gtklocal->surface= NULL; gtklocal->redraw = TRUE; gtk_widget_add_events(gtklocal->mainwin, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK); add_event_motion(gtklocal->mainwin, gtklocal); add_event_button(gtklocal->mainwin, gtklocal); g_signal_connect(gtklocal->mainwin, "scroll-event", G_CALLBACK(scrolled), gtklocal); if (chkobjfield(obj, "_evloop")) { goto errexit; } idn = getobjtblpos(obj, "_evloop", &robj); if (idn == -1) { goto errexit; } registerevloop(chkobjectname(obj), "_evloop", robj, idn, inst, gtklocal); gtkchangedpi(gtklocal); gtk_evloop(obj, inst, NULL, argc, argv); return 0; errexit: if (gtklocal) { if (gtklocal->mainwin) { gtk_widget_destroy(gtklocal->mainwin); } if (gtklocal->mainwin) { g_free(gtklocal->title); } g_free(gtklocal); } local = gra2cairo_free(obj, inst); g_free(local); return 1; } static int gtkdone(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *gtklocal; int idn; struct objlist *robj; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; if (_getobj(obj, "_gtklocal", inst, >klocal)) return 1; if (gtklocal->blank_cursor) { g_object_unref(gtklocal->blank_cursor); } if (gtklocal->mainwin != NULL) { gtk_widget_destroy(gtklocal->mainwin); gtklocal->mainwin = NULL; while (gtk_events_pending()) { gtk_main_iteration(); } } if (gtklocal->surface) { cairo_surface_destroy(gtklocal->surface); } idn = getobjtblpos(obj, "_evloop", &robj); if (idn != -1) unregisterevloop(robj, idn, inst); g_free(gtklocal->title); #if OSX if (TopLevel) { Menulock = gtklocal->menulock; } #endif return 0; } static void clear_pixmap(struct gtklocal *local) { cairo_t *cr; cr = cairo_create(local->surface); cairo_set_source_rgb(cr, local->bg_r, local->bg_g, local->bg_b); cairo_paint(cr); cairo_destroy(cr); } static void redraw_window(struct gtklocal *local) { GdkWindow *win; if (local->View == NULL) { return; } win = gtk_widget_get_window(local->View); if (win == NULL) { return; } gdk_window_invalidate_rect(win, NULL, TRUE); } static int gtkclear(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *local; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; if (_getobj(obj, "_gtklocal", inst, &local)) return 1; clear_pixmap(local); redraw_window(local); return 0; } static int gtkpresent(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *local; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; if (_getobj(obj, "_gtklocal", inst, &local)) return 1; reset_event(); msleep(100); gtk_window_present(GTK_WINDOW(local->mainwin)); return 0; } static int gtkfullscreen(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *local; int state; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; if (_getobj(obj, "_gtklocal", inst, &local)) return 1; state = *(int *) argv[2]; if (state) { gtk_window_fullscreen(GTK_WINDOW(local->mainwin)); } else { gtk_window_unfullscreen(GTK_WINDOW(local->mainwin)); } return 0; } static int gtkflush(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *local; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; if (_getobj(obj, "_gtklocal", inst, &local)) return 1; redraw_window(local); return 0; } static double get_color(struct gtklocal *gtklocal, int argc, char **argv) { int c; c = abs(*(int *) argv[2]); if (c < 0) { c = 0; } else if (c > 255) { c = 255; } return c / 255.0; } static int gtkbg(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *gtklocal; const char *field; if (_getobj(obj, "_gtklocal", inst, >klocal)) return 1; field = argv[1]; switch(field[1]) { case 'R': gtklocal->bg_r = get_color(gtklocal, argc, argv); break; case 'G': gtklocal->bg_g = get_color(gtklocal, argc, argv); break; case 'B': gtklocal->bg_b = get_color(gtklocal, argc, argv); break; } return 0; } static int gtkredraw(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *gtklocal; if (_getobj(obj, "_gtklocal", inst, >klocal)) return 1; redraw_window(gtklocal); return 0; } static int gtk_evloop(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { while (gtk_events_pending()) { gtk_main_iteration(); } return 0; } static int dot2pixel(struct gtklocal *gtklocal, int r) { return nround(r * gtklocal->local->pixel_dot_x); } static void gtkchangedpi(struct gtklocal *gtklocal) { int width, height; cairo_surface_t *pixmap; if ((gtklocal->PaperWidth == 0) || (gtklocal->PaperHeight == 0)) { return; } width = dot2pixel(gtklocal, gtklocal->PaperWidth); height = dot2pixel(gtklocal, gtklocal->PaperHeight); pixmap = gtklocal->surface; if (pixmap) { int pw, ph; ph = cairo_image_surface_get_height(pixmap); pw = cairo_image_surface_get_width(pixmap); if (pw != width || ph != height) { cairo_surface_destroy(pixmap); pixmap = NULL; } } if (pixmap == NULL) { pixmap = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height); gtklocal->surface = pixmap; clear_pixmap(gtklocal); gtklocal->redraw = TRUE; if (gtklocal->local->cairo) { cairo_destroy(gtklocal->local->cairo); } gtklocal->local->cairo = cairo_create(pixmap); } gtk_widget_set_size_request(gtklocal->View, width, height); } static void gtkMakeRuler(cairo_t *cr, struct gtklocal *gtklocal) { int width, height; width = gtklocal->PaperWidth; height = gtklocal->PaperHeight; if (width == 0 || height == 0 || gtklocal->surface == NULL || ! gtklocal->frame) return; cairo_save(cr); cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); cairo_set_line_width(cr, 1); cairo_set_source_rgb(cr, 0, 0, 0); cairo_rectangle(cr, CAIRO_COORDINATE_OFFSET, CAIRO_COORDINATE_OFFSET, dot2pixel(gtklocal, width) - 1, dot2pixel(gtklocal, height) - 1); cairo_stroke(cr); cairo_restore(cr); } static int gtk_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char code; int *cpar; struct gtklocal *gtklocal; code = *(char *) (argv[3]); cpar = (int *) argv[4]; switch (code) { case 'I': if (_getobj(obj, "_gtklocal", inst, >klocal)) return 1; gtklocal->PaperWidth = cpar[3]; gtklocal->PaperHeight = cpar[4]; gtkchangedpi(gtklocal); break; case 'E': break; } if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } static int gtk_set_dpi(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int dpi, fit; struct gtklocal *local; dpi = abs(*(int *) argv[2]); _getobj(obj, "_gtklocal", inst, &local); fit = FALSE; local->fit = FALSE; _putobj(obj, "fit", inst, &fit); if (dpi < 1) dpi = 1; if (dpi > DPI_MAX) dpi = DPI_MAX; local->windpi = dpi; local->local->pixel_dot_x = local->local->pixel_dot_y = dpi / (DPI_MAX * 1.0); *(int *) argv[2] = dpi; gtkchangedpi(local); return 0; } static int gtk_set_fit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int fit; struct gtklocal *local; _getobj(obj, "_gtklocal", inst, &local); fit = *(int *) argv[2]; local->fit = fit; if (fit) { GtkAllocation allocation; gtk_widget_get_allocation(local->mainwin, &allocation); size_allocate(local->mainwin, &allocation, local); } return 0; } static int gtk_set_frame(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *local; _getobj(obj, "_gtklocal", inst, &local); local->frame = *(int *) argv[2]; return 0; } static int gtk_set_size(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int width, height, size; struct gtklocal *local; _getobj(obj, "_gtklocal", inst, &local); size = *(int *) argv[2]; if (size < 1 || size > WINSIZE_MAX) { return 1; } switch (argv[1][0]) { case 'h': height = size; _getobj(obj, "width", inst, &width); gtk_window_resize(GTK_WINDOW(local->mainwin), width, height); break; case 'w': width = size; _getobj(obj, "height", inst, &height); gtk_window_resize(GTK_WINDOW(local->mainwin), width, height); break; } return 0; } static int gtkwait_action(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gtklocal *local; char *name; _getobj(obj, "_gtklocal", inst, &local); g_free(rval->str); rval->str = NULL; if (local->mainwin == NULL) { return 1; } if (local->blank_cursor == NULL) { local->blank_cursor = gdk_cursor_new_for_display(gdk_display_get_default(), GDK_BLANK_CURSOR); gdk_window_set_cursor(gtk_widget_get_window(local->mainwin), local->blank_cursor); } local->action.type = ACTION_TYPE_NONE; local->action.val = 0; while (local->action.type == ACTION_TYPE_NONE) { gtk_evloop(NULL, NULL, NULL, 0, NULL); msleep(100); } switch (local->action.type) { case ACTION_TYPE_NONE: break; case ACTION_TYPE_KEY: name = gdk_keyval_name(local->action.val); if (name) { rval->str = g_strdup(name); } break; case ACTION_TYPE_BUTTON: rval->str = g_strdup_printf("button%d", local->action.val); break; case ACTION_TYPE_SCROLL: switch (local->action.val) { case GDK_SCROLL_UP: rval->str = g_strdup("scroll_up"); break; case GDK_SCROLL_DOWN: rval->str = g_strdup("scroll_down"); break; case GDK_SCROLL_LEFT: rval->str = g_strdup("scroll_left"); break; case GDK_SCROLL_RIGHT: rval->str = g_strdup("scroll_right"); break; } break; } return 0; } static struct objtable gra2gtk[] = { {"init", NVFUNC, NEXEC, gtkinit, NULL, 0}, {"done", NVFUNC, NEXEC, gtkdone, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"dpi", NINT, NREAD | NWRITE, gtk_set_dpi, NULL, 0}, {"dpix", NINT, NREAD | NWRITE, gtk_set_dpi, NULL, 0}, {"dpiy", NINT, NREAD | NWRITE, gtk_set_dpi, NULL, 0}, {"width", NINT, NREAD | NWRITE, gtk_set_size, NULL, 0}, {"height", NINT, NREAD | NWRITE, gtk_set_size, NULL, 0}, {"fit", NBOOL, NREAD | NWRITE, gtk_set_fit, NULL, 0}, {"frame", NBOOL, NREAD | NWRITE, gtk_set_frame, NULL, 0}, {"expose", NVFUNC, NREAD | NEXEC, gtkredraw, "", 0}, {"flush", NVFUNC, NREAD | NEXEC, gtkflush, "", 0}, {"clear", NVFUNC, NREAD | NEXEC, gtkclear, "", 0}, {"present", NVFUNC, NREAD | NEXEC, gtkpresent, "", 0}, {"fullscreen", NVFUNC, NREAD | NEXEC, gtkfullscreen, "b", 0}, {"BR", NINT, NREAD | NWRITE, gtkbg, NULL, 0}, {"BG", NINT, NREAD | NWRITE, gtkbg, NULL, 0}, {"BB", NINT, NREAD | NWRITE, gtkbg, NULL, 0}, {"wait_action",NSFUNC, NREAD | NEXEC, gtkwait_action, "", 0}, {"_gtklocal", NPOINTER, 0, NULL, NULL, 0}, {"_output", NVFUNC, 0, gtk_output, NULL, 0}, {"_strwidth", NIFUNC, 0, gra2cairo_strwidth, NULL, 0}, {"_charascent", NIFUNC, 0, gra2cairo_charheight, NULL, 0}, {"_chardescent", NIFUNC, 0, gra2cairo_charheight, NULL, 0}, {"_evloop", NVFUNC, 0, gtk_evloop, NULL, 0}, }; #define TBLNUM (sizeof(gra2gtk) / sizeof(*gra2gtk)) void * addgra2gtk(void) /* addgra2gtk() returns NULL on error */ { return addobject(NAME, ALIAS, PARENT, NVERSION, TBLNUM, gra2gtk, ERRNUM, gtkerrorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/x11print.c0000644000175000017500000005366114116571314014102 00000000000000/* * $Id: x11print.c,v 1.52 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include "nstring.h" #include "object.h" #include "ioutil.h" #include "gtk_liststore.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "x11gui.h" #include "x11dialg.h" #include "ox11menu.h" #include "ogra2cairofile.h" #include "x11menu.h" #include "x11print.h" #include "x11file.h" #include "x11commn.h" #include "x11view.h" #define DEVICE_BUF_SIZE 20 #define MESSAGE_BUF_SIZE 1024 static char *PsVersion[] = { "PostScript Level 3", "PostScript Level 2", NULL, }; static char *SvgVersion[] = { "SVG version 1.1", "SVG version 1.2", NULL, }; struct print_obj { struct objlist *graobj, *g2wobj; int id; N_VALUE *g2winst; }; static GtkPrintSettings *PrintSettings = NULL; static void OutputDataDialogSetupItem(GtkWidget *w, struct OutputDataDialog *d) { spin_entry_set_val(d->div_entry, d->div); } static void OutputDataDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct OutputDataDialog *d; d = (struct OutputDataDialog *) data; if (makewidget) { GtkWidget *w, *hbox; w = create_spin_entry(0, 200, 1, FALSE, TRUE); d->div_entry = w; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); item_setup(hbox, w, _("_Div:"), TRUE); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } OutputDataDialogSetupItem(wi, d); } static void OutputDataDialogClose(GtkWidget *w, void *data) { struct OutputDataDialog *d; d = (struct OutputDataDialog *) data; if (d->ret != IDOK) return; d->div = spin_entry_get_val(d->div_entry); } void OutputDataDialog(struct OutputDataDialog *data, int div) { data->SetupWindow = OutputDataDialogSetup; data->CloseWindow = OutputDataDialogClose; data->div = div; } static void OutputImageDialogSetupItem(struct OutputImageDialog *d) { int i; GtkWidget *vlabel; GtkWidget *window; GtkRequisition minimum_size; vlabel = get_mnemonic_label(d->version); gtk_label_set_text(GTK_LABEL(vlabel), ""); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_opacity), FALSE); combo_box_clear(d->version); switch (d->DlgType) { case MenuIdOutputPSFile: case MenuIdOutputEPSFile: for (i = 0; PsVersion[i]; i++) { combo_box_append_text(d->version, PsVersion[i]); } set_widget_visibility_with_label(d->dpi, FALSE); set_widget_visibility_with_label(d->version, TRUE); gtk_widget_set_visible(d->t2p, TRUE); gtk_label_set_markup_with_mnemonic(GTK_LABEL(vlabel), _("_PostScript Version:")); gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->dpi), 72); combo_box_set_active(d->version, Menulocal.ps_version); break; case MenuIdOutputPNGFile: set_widget_visibility_with_label(d->dpi, TRUE); set_widget_visibility_with_label(d->version, FALSE); gtk_widget_set_visible(d->t2p, FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->dpi), Menulocal.png_dpi); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_opacity), Menulocal.use_opacity); break; case MenuIdOutputPDFFile: set_widget_visibility_with_label(d->dpi, FALSE); set_widget_visibility_with_label(d->version, FALSE); gtk_widget_set_visible(d->t2p, TRUE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->dpi), 72); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_opacity), Menulocal.use_opacity); break; case MenuIdOutputSVGFile: for (i = 0; PsVersion[i]; i++) { combo_box_append_text(d->version, SvgVersion[i]); } set_widget_visibility_with_label(d->dpi, FALSE); set_widget_visibility_with_label(d->version, TRUE); gtk_widget_set_visible(d->t2p, TRUE); gtk_label_set_markup_with_mnemonic(GTK_LABEL(vlabel), _("_SVG Version:")); gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->dpi), 72); combo_box_set_active(d->version, Menulocal.svg_version); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_opacity), Menulocal.use_opacity); break; #ifdef CAIRO_HAS_WIN32_SURFACE case MenuIdOutputCairoEMFFile: set_widget_visibility_with_label(d->dpi, TRUE); set_widget_visibility_with_label(d->version, FALSE); gtk_widget_set_visible(d->t2p, FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->dpi), Menulocal.emf_dpi); break; #endif /* CAIRO_HAS_WIN32_SURFACE */ } window = gtk_widget_get_parent(GTK_WIDGET(d->vbox)); if (GTK_IS_WINDOW(window)) { gtk_widget_get_preferred_size(GTK_WIDGET(d->vbox), &minimum_size, NULL); gtk_window_resize(GTK_WINDOW(window), minimum_size.width, minimum_size.height); } } static void OutputImageDialogSetup(GtkWidget *wi, void *data, int makewidget) { GtkWidget *w; struct OutputImageDialog *d; char *title; d = (struct OutputImageDialog *) data; if (makewidget) { w = gtk_check_button_new_with_mnemonic(_("_Convert texts to paths")); d->t2p = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); w = gtk_check_button_new_with_mnemonic(_("_Use opacity")); d->use_opacity = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); w = gtk_spin_button_new_with_range(1, DPI_MAX, 1); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(w), TRUE); gtk_entry_set_activates_default(GTK_ENTRY(w), TRUE); d->dpi = w; item_setup(GTK_WIDGET(d->vbox), w, "_DPI:", FALSE); w = combo_box_create(); d->version = w; item_setup(GTK_WIDGET(d->vbox), w, "", FALSE); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } switch (d->DlgType) { case MenuIdOutputPSFile: title = N_("Cairo PS Output"); break; case MenuIdOutputEPSFile: title = N_("Cairo EPS Output"); break; case MenuIdOutputPNGFile: title = N_("Cairo PNG Output"); break; case MenuIdOutputPDFFile: title = N_("Cairo PDF Output"); break; case MenuIdOutputSVGFile: title = N_("Cairo SVG Output"); break; #ifdef CAIRO_HAS_WIN32_SURFACE case MenuIdOutputCairoEMFFile: title = N_("Cairo EMF Output"); break; #endif /* CAIRO_HAS_WIN32_SURFACE */ default: title = NULL; /* not reachable */ } gtk_window_set_title(GTK_WINDOW(wi), _(title)); OutputImageDialogSetupItem(d); } static void OutputImageDialogClose(GtkWidget *w, void *data) { struct OutputImageDialog *d; int a; d = (struct OutputImageDialog *) data; if (d->ret != IDOK) return; d->Dpi = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(d->dpi)); d->UseOpacity = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->use_opacity)); switch (d->DlgType) { case MenuIdOutputPSFile: d->text2path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->t2p)); a = combo_box_get_active(d->version); switch (a) { case 0: d->Version = TYPE_PS3; break; case 1: default: d->Version = TYPE_PS2; break; } Menulocal.ps_version = a; break; case MenuIdOutputEPSFile: d->text2path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->t2p)); a = combo_box_get_active(d->version); switch (a) { case 0: d->Version = TYPE_EPS3; break; case 1: default: d->Version = TYPE_EPS2; break; } Menulocal.ps_version = a; break; case MenuIdOutputPNGFile: d->Version = TYPE_PNG; Menulocal.png_dpi = d->Dpi; break; #ifdef CAIRO_HAS_WIN32_SURFACE case MenuIdOutputCairoEMFFile: d->Version = TYPE_EMF; Menulocal.emf_dpi = d->Dpi; break; #endif /* CAIRO_HAS_WIN32_SURFACE */ case MenuIdOutputPDFFile: d->text2path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->t2p)); d->Version = TYPE_PDF; break; case MenuIdOutputSVGFile: d->text2path = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->t2p)); a = combo_box_get_active(d->version); switch (a) { case 0: d->Version = TYPE_SVG1_1; break; case 1: default: d->Version = TYPE_SVG1_2; break; } Menulocal.svg_version = a; break; } } void OutputImageDialog(struct OutputImageDialog *data, int type) { data->SetupWindow = OutputImageDialogSetup; data->CloseWindow = OutputImageDialogClose; data->DlgType = type; } static void draw_gra(struct objlist *graobj, int id, char *msg, int close) { ProgressDialogCreate(msg); SetStatusBar(msg); if (exeobj(graobj, "open", id, 0, NULL) == 0) { exeobj(graobj, "draw", id, 0, NULL); exeobj(graobj, "flush", id, 0, NULL); if (close) { exeobj(graobj, "close", id, 0, NULL); } } ProgressDialogFinalize(); ResetStatusBar(); main_window_redraw(); } static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context, int page_nr, gpointer user_data) { struct objlist *graobj, *g2wobj; char *argv[2]; struct print_obj *pobj; int id, r; N_VALUE *g2winst; pobj = (struct print_obj *) user_data; graobj = pobj->graobj; g2wobj = pobj->g2wobj; id = pobj->id; g2winst = pobj->g2winst; argv[0] = (char *) context; argv[1] = NULL; r = _exeobj(g2wobj, "_context", g2winst, 1, argv); if (r == 0) { draw_gra(graobj, id, _("Printing."), TRUE); } } static void init_graobj(struct objlist *graobj, int id, char *dev_name, int dev_oid) { struct narray *drawrable; char *device; putobj(graobj, "paper_width", id, &(Menulocal.PaperWidth)); putobj(graobj, "paper_height", id, &(Menulocal.PaperHeight)); putobj(graobj, "left_margin", id, &(Menulocal.LeftMargin)); putobj(graobj, "top_margin", id, &(Menulocal.TopMargin)); putobj(graobj, "zoom", id, &(Menulocal.PaperZoom)); putobj(graobj, "decimalsign", id, &(Menulocal.Decimalsign)); if (arraynum(&(Menulocal.drawrable)) > 0) { unsigned int i, n; drawrable = arraynew(sizeof(char *)); n = arraynum(&(Menulocal.drawrable)); for (i = 0; i < n; i++) { arrayadd2(drawrable, *(char **) arraynget(&(Menulocal.drawrable), i)); } } else { drawrable = NULL; } putobj(graobj, "draw_obj", id, drawrable); device = (char *) g_malloc(DEVICE_BUF_SIZE); snprintf(device, DEVICE_BUF_SIZE, "%s:^%d", dev_name, dev_oid); putobj(graobj, "device", id, device); } void CmOutputPrinter(int select_file, int show_dialog) { GtkPrintOperation *print; GtkPrintOperationResult res; struct objlist *graobj, *g2wobj; int id, g2wid, g2woid, opt, landscape, w, h; N_VALUE *g2winst; GError *error; struct print_obj pobj; GtkPaperSize *paper_size; GtkPageSetup *page_setup; if (Menulock || Globallock) return; if (select_file && ! SetFileHidden()) return; FileAutoScale(); AdjustAxis(); graobj = chkobject("gra"); if (graobj == NULL) return; g2wobj = chkobject("gra2gtkprint"); if (g2wobj == NULL) return; g2wid = newobj(g2wobj); if (g2wid < 0) return; putobj(g2wobj, "use_opacity", g2wid, &Menulocal.use_opacity); g2winst = chkobjinst(g2wobj, g2wid); _getobj(g2wobj, "oid", g2winst, &g2woid); id = newobj(graobj); init_graobj(graobj, id, "gra2gtkprint", g2woid); print = gtk_print_operation_new(); gtk_print_operation_set_n_pages(print, 1); gtk_print_operation_set_has_selection(print, FALSE); gtk_print_operation_set_support_selection(print, FALSE); gtk_print_operation_set_embed_page_setup(print, FALSE); gtk_print_operation_set_use_full_page(print, TRUE); if (PrintSettings == NULL) PrintSettings = gtk_print_settings_new(); landscape = Menulocal.PaperLandscape; switch (Menulocal.PaperId) { case PAPER_ID_CUSTOM: case PAPER_ID_NORMAL: case PAPER_ID_WIDE: case PAPER_ID_WIDE2: if (landscape) { h = Menulocal.PaperWidth; w = Menulocal.PaperHeight; } else { w = Menulocal.PaperWidth; h = Menulocal.PaperHeight; } paper_size = gtk_paper_size_new_custom(Menulocal.PaperName, Menulocal.PaperName, w / 100.0, h / 100.0, GTK_UNIT_MM); break; default: paper_size = gtk_paper_size_new(Menulocal.PaperName); } page_setup = gtk_page_setup_new(); gtk_page_setup_set_paper_size(page_setup, paper_size); gtk_paper_size_free(paper_size); if (landscape) { gtk_page_setup_set_orientation(page_setup, GTK_PAGE_ORIENTATION_LANDSCAPE); } else { gtk_page_setup_set_orientation(page_setup, GTK_PAGE_ORIENTATION_PORTRAIT); } gtk_print_operation_set_default_page_setup(print, page_setup); g_object_unref(page_setup); gtk_print_operation_set_print_settings(print, PrintSettings); pobj.graobj = graobj; pobj.id = id; pobj.g2wobj = g2wobj; pobj.g2winst = g2winst; g_signal_connect(print, "draw_page", G_CALLBACK(draw_page), &pobj); switch (show_dialog) { case PRINT_SHOW_DIALOG_NONE: opt = GTK_PRINT_OPERATION_ACTION_PRINT; break; case PRINT_SHOW_DIALOG_PREVIEW: opt = GTK_PRINT_OPERATION_ACTION_PREVIEW; break; case PRINT_SHOW_DIALOG_DIALOG: opt = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; break; default: opt = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG; } res = gtk_print_operation_run(print, opt, GTK_WINDOW(TopLevel), &error); if (res == GTK_PRINT_OPERATION_RESULT_ERROR) { char buf[MESSAGE_BUF_SIZE]; snprintf(buf, sizeof(buf), _("Printing error: %s"), error->message); message_box(NULL, buf, _("Print"), RESPONS_ERROR); g_error_free(error); } else if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { if (PrintSettings) g_object_unref(PrintSettings); PrintSettings = g_object_ref(gtk_print_operation_get_print_settings(print)); } g_object_unref(print); delobj(graobj, id); delobj(g2wobj, g2wid); if (select_file && NgraphApp.FileWin.data.data) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, TRUE); } } void CmOutputViewerB(void *wi, gpointer client_data) { if (Menulock || Globallock) return; FileAutoScale(); AdjustAxis(); if (Menulocal.exwin_use_external) { struct objlist *menuobj; int show_dialog, s; char *argv[3]; menuobj = chkobject("menu"); if (menuobj == NULL) return; s = FALSE; show_dialog = PRINT_SHOW_DIALOG_PREVIEW; argv[0] = (char *) &s; argv[1] = (char *) &show_dialog; argv[2] = NULL; exeobj(menuobj, "print", 0, 2, argv); } else { struct objlist *graobj, *g2wobj; int id, g2wid, g2woid, c; N_VALUE *g2winst; int delgra; if ((graobj = chkobject("gra")) == NULL) return; if ((g2wobj = chkobject("gra2gtk")) == NULL) return; g2wid = newobj(g2wobj); if (g2wid < 0) return; g2winst = chkobjinst(g2wobj, g2wid); _getobj(g2wobj, "oid", g2winst, &g2woid); putobj(g2wobj, "dpi", g2wid, &(Menulocal.exwindpi)); putobj(g2wobj, "width", g2wid, &Menulocal.exwinwidth); putobj(g2wobj, "height", g2wid, &Menulocal.exwinheight); c = Menulocal.bg_r * 255.0; putobj(g2wobj, "BR", g2wid, &c); c = Menulocal.bg_g * 255.0; putobj(g2wobj, "BG", g2wid, &c); c = Menulocal.bg_b * 255.0; putobj(g2wobj, "BB", g2wid, &c); putobj(g2wobj, "use_opacity", g2wid, &Menulocal.use_opacity); id = newobj(graobj); init_graobj(graobj, id, "gra2gtk", g2woid); draw_gra(graobj, id, _("Spawning external viewer."), FALSE); delgra = TRUE; _putobj(g2wobj, "delete_gra", g2winst, &delgra); exeobj(g2wobj, "present", g2wid, 0, NULL); } } static char * get_base_ngp_name(void) { char *ptr, *tmp; if (NgraphApp.FileName == NULL) return NULL; tmp = g_strdup(NgraphApp.FileName); if (tmp == NULL) return NULL; ptr = strrchr(tmp, '.'); if (ptr && strcmp(ptr, ".ngp") == 0) { *ptr = '\0'; } return tmp; } static void CmPrintGRAFile(void) { struct objlist *graobj, *g2wobj; int id, g2wid, g2woid, ret; N_VALUE *g2winst; char *tmp, *file; if (Menulock || Globallock) return; tmp = get_base_ngp_name(); ret = nGetSaveFileName(TopLevel, _("GRA file"), "gra", NULL, tmp, &file, FALSE, Menulocal.changedirectory); if (tmp) g_free(tmp); if (ret != IDOK) return; if (file == NULL) { return; } if (Menulocal.select_data && ! SetFileHidden()) return; FileAutoScale(); AdjustAxis(); if ((graobj = chkobject("gra")) == NULL) { g_free(file); return; } if ((g2wobj = chkobject("gra2file")) == NULL) { g_free(file); return; } g2wid = newobj(g2wobj); if (g2wid < 0) { g_free(file); return; } g2winst = chkobjinst(g2wobj, g2wid); _getobj(g2wobj, "oid", g2winst, &g2woid); putobj(g2wobj, "file", g2wid, file); id = newobj(graobj); init_graobj(graobj, id, "gra2file", g2woid); draw_gra(graobj, id, _("Making GRA file."), TRUE); delobj(graobj, id); delobj(g2wobj, g2wid); if (Menulocal.select_data) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, TRUE); } } static void CmOutputImage(int type) { struct objlist *graobj, *g2wobj; int id, g2wid, g2woid; N_VALUE *g2winst; int ret; char *title, *ext_str; char *file, *tmp; if (Menulock || Globallock) return; switch (type) { case MenuIdOutputPSFile: title = "Save as PostScript"; ext_str = "ps"; break; case MenuIdOutputEPSFile: title = "Save as Encapsulated PostScript"; ext_str = "eps"; break; case MenuIdOutputPDFFile: title = "Save as Portable Document Format (PDF)"; ext_str = "pdf"; break; case MenuIdOutputPNGFile: title = "Save as Portable Network Graphics (PNG)"; ext_str = "png"; break; case MenuIdOutputSVGFile: title = "Save as Scalable Vector Graphics (SVG)"; ext_str = "svg"; break; #ifdef CAIRO_HAS_WIN32_SURFACE case MenuIdOutputCairoEMFFile: title = "Save as Windows Enhanced Metafile (EMF)"; ext_str = "emf"; break; #endif /* CAIRO_HAS_WIN32_SURFACE */ default: /* not reachable */ title = NULL; ext_str = NULL; } tmp = get_base_ngp_name(); ret = nGetSaveFileName(TopLevel, title, ext_str, NULL, tmp, &file, FALSE, Menulocal.changedirectory); if (tmp) { g_free(tmp); } if (ret != IDOK) { return; } if (file == NULL) { return; } OutputImageDialog(&DlgImageOut, type); ret = DialogExecute(TopLevel, &DlgImageOut); if (ret != IDOK) { g_free(file); return; } if (Menulocal.select_data && ! SetFileHidden()) return; FileAutoScale(); AdjustAxis(); graobj = chkobject("gra"); if (graobj == NULL) { g_free(file); return; } g2wobj = chkobject("gra2cairofile"); if (g2wobj == NULL) { g_free(file); return; } g2wid = newobj(g2wobj); if (g2wid < 0) { g_free(file); return; } g2winst = chkobjinst(g2wobj, g2wid); _getobj(g2wobj, "oid", g2winst, &g2woid); id = newobj(graobj); putobj(g2wobj, "file", g2wid, file); switch (type) { case MenuIdOutputPSFile: case MenuIdOutputEPSFile: case MenuIdOutputSVGFile: case MenuIdOutputPDFFile: #ifdef CAIRO_HAS_WIN32_SURFACE case MenuIdOutputCairoEMFFile: #endif /* CAIRO_HAS_WIN32_SURFACE */ putobj(g2wobj, "text2path", g2wid, &DlgImageOut.text2path); break; case MenuIdOutputPNGFile: break; } putobj(g2wobj, "use_opacity", g2wid, &DlgImageOut.UseOpacity); putobj(g2wobj, "dpi", g2wid, &DlgImageOut.Dpi); putobj(g2wobj, "format", g2wid, &DlgImageOut.Version); init_graobj(graobj, id, "gra2cairofile", g2woid); draw_gra(graobj, id, _("Drawing."), TRUE); delobj(graobj, id); delobj(g2wobj, g2wid); if (Menulocal.select_data) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, TRUE); } } #if WINDOWS static void CmOutputEMF(int type) { struct objlist *graobj, *g2wobj; int id, g2wid, g2woid; N_VALUE *g2winst; char *title, *file; if (Menulock || Globallock) return; title = "Save as Windows Enhanced Metafile (EMF)"; file = NULL; if (type == MenuIdOutputEMFFile) { int ret; char *ext_str, *tmp; ext_str = "emf"; tmp = get_base_ngp_name(); ret = nGetSaveFileName(TopLevel, title, ext_str, NULL, tmp, &file, FALSE, Menulocal.changedirectory); if (tmp) { g_free(tmp); } if (ret != IDOK) { return; } if (file == NULL) { return; } } if (Menulocal.select_data && ! SetFileHidden()) return; FileAutoScale(); AdjustAxis(); graobj = chkobject("gra"); if (graobj == NULL) { g_free(file); return; } g2wobj = chkobject("gra2emf"); if (g2wobj == NULL) { g_free(file); return; } g2wid = newobj(g2wobj); if (g2wid < 0) { g_free(file); return; } g2winst = chkobjinst(g2wobj, g2wid); _getobj(g2wobj, "oid", g2winst, &g2woid); id = newobj(graobj); putobj(g2wobj, "file", g2wid, file); init_graobj(graobj, id, "gra2emf", g2woid); draw_gra(graobj, id, _("Drawing."), TRUE); delobj(graobj, id); delobj(g2wobj, g2wid); if (Menulocal.select_data) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, TRUE); } } #endif void CmOutputPrinterB(void *wi, gpointer client_data) { CmOutputPrinter(FALSE, PRINT_SHOW_DIALOG_DIALOG); } void CmOutputMenu(void *wi, gpointer client_data) { switch (GPOINTER_TO_INT(client_data)) { case MenuIdOutputGRAFile: CmPrintGRAFile(); break; case MenuIdOutputPSFile: case MenuIdOutputEPSFile: case MenuIdOutputPDFFile: case MenuIdOutputPNGFile: case MenuIdOutputSVGFile: #ifdef CAIRO_HAS_WIN32_SURFACE case MenuIdOutputCairoEMFFile: #endif /* CAIRO_HAS_WIN32_SURFACE */ CmOutputImage(GPOINTER_TO_INT(client_data)); break; #if WINDOWS case MenuIdOutputEMFFile: case MenuIdOutputEMFClipboard: CmOutputEMF(GPOINTER_TO_INT(client_data)); break; #endif } } ngraph-gtk-6.09.05/src/gtk/gtk_presettings.c0000644000175000017500000016260514142161772015631 00000000000000#include "gtk_common.h" #include #include "gtk_presettings.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "object.h" #include "mathfn.h" #include "gra.h" #include "ogra2cairo.h" #include "odraw.h" #include "oaxis.h" #include "odata.h" #include "x11view.h" #include "x11menu.h" #include "x11dialg.h" #include "x11gui.h" #include "x11file.h" #define SETTING_PANEL_MARGIN 4 #define LINE_WIDTH_ICON_NUM 7 #define LINE_STYLE_ICON_NUM 7 #define DEFAULT_JOIN_TYPE JOIN_TYPE_MITER #define DEFAULT_JOIN_STR "'miter'" #define DEFAULT_MARKER_TYPE MARKER_TYPE_NONE #define DEFAULT_MARKER_STR "'none'" #define DEFAULT_STROKE_FILL_TYPE 1 #define STROKE_FILL_ICON_NUM 8 struct widget_info { GtkWidget *widget; int visibility; }; struct presetting_widgets { struct widget_info line_width, line_style; struct widget_info color1, color2; struct widget_info path_type; struct widget_info join_type; GtkWidget *join_icon[JOIN_TYPE_NUM]; struct widget_info marker_type_begin; GtkWidget *marker_begin_icon[MARKER_TYPE_NUM]; struct widget_info marker_type_end; GtkWidget *marker_end_icon[MARKER_TYPE_NUM]; struct widget_info mark_type_begin, mark_type_end; struct widget_info stroke_fill; GtkWidget *stroke_fill_icon[STROKE_FILL_ICON_NUM]; struct widget_info font, bold, italic, pt; struct widget_info mark_type, mark_size; enum JOIN_TYPE join; enum MARKER_TYPE marker_begin, marker_end; struct MarkDialog mark, mark_begin, mark_end; int lw, fill, stroke, close_path; }; static struct presetting_widgets Widgets = {{NULL}}; static int UpdateFieldsLock = TRUE; static void update_focused_obj(GtkWidget *widget, gpointer user_data); static int check_selected_item(GSimpleAction *action, GVariant *parameter, char **item, GtkWidget *button, GtkWidget **icon) { const char *state; int i, selected; selected = 0; state = g_variant_get_string(parameter, NULL); for (i = 0; item[i]; i++) { if (g_strcmp0(state, item[i]) == 0) { gtk_button_set_image(GTK_BUTTON(button), icon[i]); selected = i; break; } } g_simple_action_set_state(action, parameter); return selected; } static void JoinTypeAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { Widgets.join = check_selected_item(action, parameter, joinchar, Widgets.join_type.widget, Widgets.join_icon); update_focused_obj(Widgets.join_type.widget, GINT_TO_POINTER(Widgets.join)); } static void MarkerTypeBeginAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { Widgets.marker_begin = check_selected_item(action, parameter, marker_type_char, Widgets.marker_type_begin.widget, Widgets.marker_begin_icon); gtk_widget_set_sensitive(Widgets.mark_type_begin.widget, Widgets.marker_begin == MARKER_TYPE_MARK); update_focused_obj(Widgets.marker_type_begin.widget, GINT_TO_POINTER(Widgets.marker_begin)); } static void MarkerTypeEndAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { Widgets.marker_end = check_selected_item(action, parameter, marker_type_char, Widgets.marker_type_end.widget, Widgets.marker_end_icon); gtk_widget_set_sensitive(Widgets.mark_type_end.widget, Widgets.marker_end == MARKER_TYPE_MARK); update_focused_obj(Widgets.marker_type_end.widget, GINT_TO_POINTER(Widgets.marker_end)); } #define PATH_TYPE_STROKE 1 #define PATH_TYPE_FILL 2 #define PATH_TYPE_CLOSE 4 static void set_stroke_fill_icon(void) { int i; i = 0; if (Widgets.stroke) { i |= PATH_TYPE_STROKE; } if (Widgets.fill) { i |= PATH_TYPE_FILL; } if (Widgets.close_path) { i |= PATH_TYPE_CLOSE; } gtk_button_set_image(GTK_BUTTON(Widgets.stroke_fill.widget), Widgets.stroke_fill_icon[i]); update_focused_obj(Widgets.stroke_fill.widget, GINT_TO_POINTER(i)); } static void StrokeFillClosePathAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { int state; state = g_variant_get_boolean(parameter); Widgets.close_path = state; set_stroke_fill_icon(); g_simple_action_set_state(action, parameter); } static void StrokeFillFillAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { int state; state = g_variant_get_boolean(parameter); Widgets.fill = state; set_stroke_fill_icon(); g_simple_action_set_state(action, parameter); } static void StrokeFillStrokeAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { int state; state = g_variant_get_boolean(parameter); Widgets.stroke = state; set_stroke_fill_icon(); g_simple_action_set_state(action, parameter); } static GActionEntry ToolMenuEntries[] = { {"JoinTypeAction", NULL, "s", DEFAULT_JOIN_STR, JoinTypeAction_activated}, {"MarkerTypeBeginAction", NULL, "s", DEFAULT_MARKER_STR, MarkerTypeBeginAction_activated}, {"MarkerTypeEndAction", NULL, "s", DEFAULT_MARKER_STR, MarkerTypeEndAction_activated}, {"StrokeFillStrokeAction", NULL, NULL, "true", StrokeFillStrokeAction_activated}, {"StrokeFillFillAction", NULL, NULL, "false", StrokeFillFillAction_activated}, {"StrokeFillClosePathAction", NULL, NULL, "false", StrokeFillClosePathAction_activated}, }; static void create_images_sub(const char *prefix, char **item, GtkWidget **icon) { int i; GtkWidget *img; char img_file[256]; for (i = 0; item[i]; i++) { snprintf(img_file, sizeof(img_file), "%s_%s-symbolic", prefix, item[i]); img = gtk_image_new_from_icon_name(img_file, GTK_ICON_SIZE_LARGE_TOOLBAR); icon[i] = img; g_object_ref(img); } } static void create_marker_images_sub(const char *postfix, char **item, GtkWidget **icon) { int i; GtkWidget *img; char img_file[256]; for (i = 0; item[i]; i++) { snprintf(img_file, sizeof(img_file), "%s_%s-symbolic", item[i], postfix); img = gtk_image_new_from_icon_name(img_file, GTK_ICON_SIZE_LARGE_TOOLBAR); icon[i] = img; g_object_ref(img); } } static void create_images(struct presetting_widgets *widgets) { int i; create_marker_images_sub("begin", marker_type_char, widgets->marker_begin_icon); create_marker_images_sub("end", marker_type_char, widgets->marker_end_icon); create_images_sub("join", joinchar, widgets->join_icon); for (i = 0; i < STROKE_FILL_ICON_NUM; i++) { GtkWidget *img; char img_file[256]; snprintf(img_file, sizeof(img_file), "stroke_fill_%d-symbolic", i); img = gtk_image_new_from_icon_name(img_file, GTK_ICON_SIZE_LARGE_TOOLBAR); widgets->stroke_fill_icon[i] = img; g_object_ref(img); } } static void set_rgba(GtkWidget *cbutton, int *r, int *g, int *b, int *a) { GdkRGBA color; gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(cbutton), &color); *r = color.red * 255; *g = color.green * 255; *b = color.blue * 255; *a = color.alpha * 255; } static void get_rgba(struct objlist *obj, int id, int r1, int g1, int b1, int a1, int r2, int g2, int b2, int a2) { putobj(obj, "stroke_R", id, &r1); putobj(obj, "stroke_G", id, &g1); putobj(obj, "stroke_B", id, &b1); putobj(obj, "stroke_A", id, &a1); putobj(obj, "fill_R", id, &r2); putobj(obj, "fill_G", id, &g2); putobj(obj, "fill_B", id, &b2); putobj(obj, "fill_A", id, &a2); } static void set_font_style(struct objlist *obj, int id, const char *field) { int style, bold, italic; bold = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Widgets.bold.widget)); italic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Widgets.italic.widget)); style = 0; if (bold) { style |= GRA_FONT_STYLE_BOLD; } if (italic) { style |= GRA_FONT_STYLE_ITALIC; } putobj(obj, field, id, &style); } static int modify_font_style(struct objlist *obj, N_VALUE *inst, const char *field, int new_style, int apply, const char *font_field) { int style, old_style, id; if (chkobjfield(obj, field)) { return 0; } style = old_style = get_font_style(obj, inst, field, font_field); style &= (~ new_style); if (apply) { style |= new_style; } _getobj(obj, "id", inst, &id); putobj(obj, field, id, &style); return (style != old_style); } static void set_font(struct objlist *obj, int id, const char *field) { char *fontalias; fontalias = combo_box_get_active_text(Widgets.font.widget); if (fontalias) { putobj(obj, field, id, fontalias); } } static void set_text_obj(struct objlist *obj, int id) { int r, g, b, a, pt; set_font_style(obj, id, "style"); set_font(obj, id, "font"); set_rgba(Widgets.color1.widget, &r, &g, &b, &a); putobj(obj, "R", id, &r); putobj(obj, "G", id, &g); putobj(obj, "B", id, &b); putobj(obj, "A", id, &a); pt = gtk_spin_button_get_value(GTK_SPIN_BUTTON(Widgets.pt.widget)) * 100; putobj(obj, "pt", id, &pt); } static void set_path_type(struct objlist *obj, int id) { int type, interpolation; type = combo_box_get_active(Widgets.path_type.widget); if (type == 0) { putobj(obj, "type", id, &type); } else { interpolation = type - 1; type = 1; putobj(obj, "type", id, &type); putobj(obj, "interpolation", id, &interpolation); } } static int get_line_width_setting(void) { return (2 << combo_box_get_active(Widgets.line_width.widget)) * 10; } void presetting_set_obj_field(struct objlist *obj, int id) { const char *name; int ival, r1, g1, b1, a1, r2, g2, b2, a2, width; if (obj == NULL) { return; } name = chkobjectname(obj); if (name == NULL) { return; } set_rgba(Widgets.color1.widget, &r1, &g1, &b1, &a1); set_rgba(Widgets.color2.widget, &r2, &g2, &b2, &a2); width = get_line_width_setting(); if (strcmp(name, "axis") == 0) { putobj(obj, "width", id, &width); putobj(obj, "gauge_width1", id, &width); putobj(obj, "gauge_width2", id, &width); putobj(obj, "gauge_width3", id, &width); putobj(obj, "wave_width", id, &width); putobj(obj, "R", id, &r1); putobj(obj, "G", id, &g1); putobj(obj, "B", id, &b1); putobj(obj, "A", id, &a1); putobj(obj, "gauge_R", id, &r1); putobj(obj, "gauge_G", id, &g1); putobj(obj, "gauge_B", id, &b1); putobj(obj, "gauge_A", id, &a1); putobj(obj, "num_R", id, &r1); putobj(obj, "num_G", id, &g1); putobj(obj, "num_B", id, &b1); putobj(obj, "num_A", id, &a1); set_font_style(obj, id, "num_font_style"); set_font(obj, id, "num_font"); ival = gtk_spin_button_get_value(GTK_SPIN_BUTTON(Widgets.pt.widget)) * 100; putobj(obj, "num_pt", id, &ival); ival = combo_box_get_active(Widgets.line_style.widget); sputobjfield(obj, id, "style", FwLineStyle[ival].list); sputobjfield(obj, id, "gauge_style", FwLineStyle[ival].list); } else if (strcmp(name, "axisgrid") == 0) { ival = width / 2; putobj(obj, "width3", id, &ival); ival = width / 4; putobj(obj, "width2", id, &ival); ival = width / 8; putobj(obj, "width1", id, &ival); } else if (strcmp(name, "path") == 0) { putobj(obj, "stroke", id, &(Widgets.stroke)); putobj(obj, "fill", id, &(Widgets.fill)); putobj(obj, "close_path", id, &(Widgets.close_path)); ival = Widgets.join; putobj(obj, "join", id, &ival); ival = Widgets.marker_begin; putobj(obj, "marker_begin", id, &ival); ival = Widgets.marker_end; putobj(obj, "marker_end", id, &ival); putobj(obj, "mark_type_begin", id, &(Widgets.mark_begin.Type)); putobj(obj, "mark_type_end", id, &(Widgets.mark_end.Type)); putobj(obj, "width", id, &width); get_rgba(obj, id, r1, g1, b1, a1, r2, g2, b2, a2); ival = combo_box_get_active(Widgets.line_style.widget); sputobjfield(obj, id, "style", FwLineStyle[ival].list); set_path_type(obj, id); } else if (strcmp(name, "rectangle") == 0) { putobj(obj, "stroke", id, &(Widgets.stroke)); putobj(obj, "fill", id, &(Widgets.fill)); putobj(obj, "width", id, &width); get_rgba(obj, id, r1, g1, b1, a1, r2, g2, b2, a2); ival = combo_box_get_active(Widgets.line_style.widget); sputobjfield(obj, id, "style", FwLineStyle[ival].list); } else if (strcmp(name, "arc") == 0) { putobj(obj, "stroke", id, &(Widgets.stroke)); putobj(obj, "fill", id, &(Widgets.fill)); putobj(obj, "close_path", id, &(Widgets.close_path)); ival = Widgets.join; putobj(obj, "join", id, &ival); putobj(obj, "width", id, &width); get_rgba(obj, id, r1, g1, b1, a1, r2, g2, b2, a2); ival = combo_box_get_active(Widgets.line_style.widget); sputobjfield(obj, id, "style", FwLineStyle[ival].list); ival = Widgets.marker_begin; putobj(obj, "marker_begin", id, &ival); ival = Widgets.marker_end; putobj(obj, "marker_end", id, &ival); putobj(obj, "mark_type_begin", id, &(Widgets.mark_begin.Type)); putobj(obj, "mark_type_end", id, &(Widgets.mark_end.Type)); } else if (strcmp(name, "mark") == 0) { putobj(obj, "width", id, &width); putobj(obj, "R", id, &r1); putobj(obj, "G", id, &g1); putobj(obj, "B", id, &b1); putobj(obj, "A", id, &a1); putobj(obj, "R2", id, &r2); putobj(obj, "G2", id, &g2); putobj(obj, "B2", id, &b2); putobj(obj, "A2", id, &a2); ival = gtk_spin_button_get_value(GTK_SPIN_BUTTON(Widgets.mark_size.widget)) * 100; putobj(obj, "size", id, &ival); putobj(obj, "type", id, &(Widgets.mark.Type)); ival = combo_box_get_active(Widgets.line_style.widget); sputobjfield(obj, id, "style", FwLineStyle[ival].list); } else if (strcmp(name, "text") == 0) { set_text_obj(obj, id); } } static void set_font_family(GtkWidget *cbox) { struct fontmap *fcur; combo_box_clear(cbox); fcur = Gra2cairoConf->fontmap_list_root; while (fcur) { combo_box_append_text(cbox, fcur->fontalias); fcur = fcur->next; } combo_box_set_active(cbox, 0); } static GtkWidget * create_toggle_button(GtkWidget *box, GtkWidget *img, const char *tooltip, int state) { GtkWidget *w; w = gtk_toggle_button_new(); gtk_container_add(GTK_CONTAINER(w), img); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), state); gtk_widget_set_tooltip_text(w, tooltip); g_signal_connect(w, "toggled", G_CALLBACK(update_focused_obj), NULL); return w; } static void set_boolean_action(const char *name, int state) { GAction *action; action = g_action_map_lookup_action(G_ACTION_MAP(GtkApp), name); if (action) { GVariant *parameter; parameter = g_variant_new_boolean(state); g_action_change_state(action, parameter); } } static void widget_set_stroke_fill(struct objlist *obj, N_VALUE *inst) { _getobj(obj, "stroke", inst, &(Widgets.stroke)); _getobj(obj, "fill", inst, &(Widgets.fill)); if (! chkobjfield(obj, "close_path")) { _getobj(obj, "close_path", inst, &(Widgets.close_path)); } set_boolean_action("StrokeFillStrokeAction", Widgets.stroke); set_boolean_action("StrokeFillFillAction", Widgets.fill); set_boolean_action("StrokeFillClosePathAction", Widgets.close_path); } static void set_radio_action(struct objlist *obj, N_VALUE *inst, const char *field, char **prm_str, const char *action_name) { int type; GAction *action; if (_getobj(obj, field, inst, &type)) { return; } action = g_action_map_lookup_action(G_ACTION_MAP(GtkApp), action_name); if (action) { GVariant *parameter; parameter = g_variant_new_string(prm_str[type]); g_action_change_state(action, parameter); } } static void widget_set_join(struct objlist *obj, N_VALUE *inst) { set_radio_action(obj, inst, "join", joinchar, "JoinTypeAction"); } static void widget_set_line_width(struct objlist *obj, N_VALUE *inst) { int width, index; if (_getobj(obj, "width", inst, &width)) { return; } index = nround(log(width / 10) / log(2)) - 1; if (index >= LINE_WIDTH_ICON_NUM) { index = LINE_WIDTH_ICON_NUM - 1; } else if (index < 0) { index = 0; } gtk_combo_box_set_active(GTK_COMBO_BOX(Widgets.line_width.widget), index); } static void widget_set_rgba_color(struct objlist *obj, N_VALUE *inst, GtkWidget *button, const char *prefix, const char *postfix) { char field[256], *color_str[] = {"R", "G", "B", "A"}; int color[4], i; GdkRGBA gcolor; for (i = 0; i < (int) G_N_ELEMENTS(color); i++) { snprintf(field, sizeof(field), "%s%s%s", (prefix) ? prefix : "", color_str[i], (postfix) ? postfix : ""); if (_getobj(obj, field, inst, color + i)) { return; } } gcolor.red = color[0] / 255.0; gcolor.green = color[1] / 255.0; gcolor.blue = color[2] / 255.0; gcolor.alpha = color[3] / 255.0; gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(button), &gcolor); } static void widget_set_marker_type_begin(struct objlist *obj, N_VALUE *inst) { set_radio_action(obj, inst, "marker_begin", marker_type_char, "MarkerTypeBeginAction"); } static void widget_set_marker_type_end(struct objlist *obj, N_VALUE *inst) { set_radio_action(obj, inst, "marker_end", marker_type_char, "MarkerTypeEndAction"); } static void widget_set_marker_type(struct objlist *obj, N_VALUE *inst) { widget_set_marker_type_begin(obj, inst); widget_set_marker_type_end(obj, inst); } static void widget_set_mark_type(struct objlist *obj, N_VALUE *inst, GtkWidget *button, const char *field, struct MarkDialog *d) { int type; if (_getobj(obj, field, inst, &type)) { return; } button_set_mark_image(button, type); d->Type = type; } static void widget_set_line_style(struct objlist *obj, N_VALUE *inst, char *field) { int style, id; _getobj(obj, "id", inst, &id); style = get_style_index(obj, id, field); if (style < 0) { style = 0; } gtk_combo_box_set_active(GTK_COMBO_BOX(Widgets.line_style.widget), style); } static void widget_set_path_type(struct objlist *obj, N_VALUE *inst) { int type; _getobj(obj, "type", inst, &type); if (type) { int interpolation; _getobj(obj, "interpolation", inst, &interpolation); type = interpolation + 1; } gtk_combo_box_set_active(GTK_COMBO_BOX(Widgets.path_type.widget), type); } static void widget_set_spin_value(struct objlist *obj, N_VALUE *inst, GtkWidget *spin, const char *field) { int val; _getobj(obj, field, inst, &val); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), val / 100.0); } static void widget_set_font_style(struct objlist *obj, N_VALUE *inst, const char *field) { int style, bold, italic; _getobj(obj, field, inst, &style); bold = (style & GRA_FONT_STYLE_BOLD) ? 1 : 0; italic = (style & GRA_FONT_STYLE_ITALIC) ? 1 : 0; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Widgets.bold.widget), bold); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Widgets.italic.widget), italic); } static int check_font_index(const char *font) { int i; struct fontmap *fcur; if (font == NULL) { return 0; } fcur = Gra2cairoConf->fontmap_list_root; i = 0; while (fcur) { if (strcmp(font, fcur->fontalias) == 0) { return i; } i++; fcur = fcur->next; } return 0; } static void widget_set_font(struct objlist *obj, N_VALUE *inst, const char *field) { int index; char *font; if (_getobj(obj, field, inst, &font)) { return; } index = check_font_index(font); gtk_combo_box_set_active(GTK_COMBO_BOX(Widgets.font.widget), index); } static int get_focused_obj_type_array(struct narray *focusobj, struct FocusObj *objs) { int i, j, obj_n, n; struct objlist *obj; struct FocusObj **focus; n = arraynum(focusobj); focus = arraydata(focusobj); obj_n = 0; for (i = 0; i < n; i++) { obj = focus[i]->obj; for (j = 0; j < obj_n; j++) { if (objs[j].obj == obj) { memmove(objs + j, objs + j + 1, (obj_n - j - 1) * sizeof(*objs)); objs[obj_n - 1].obj = obj; objs[obj_n - 1].oid = focus[i]->oid; break; } } if (j == obj_n) { objs[obj_n].obj = obj; objs[obj_n].oid = focus[i]->oid; obj_n++; } } return obj_n; } void presetting_set_parameters(struct Viewer *d) { struct FocusObj *focus; N_VALUE *inst; int i, num; struct objlist *obj, *axis_obj, *path_obj, *rect_obj, *text_obj, *arc_obj, *mark_obj; struct FocusObj objs[OBJ_MAX]; num = get_focused_obj_type_array(d->focusobj, objs); if (num < 1) { return; } axis_obj = chkobject("axis"); path_obj = chkobject("path"); rect_obj = chkobject("rectangle"); text_obj = chkobject("text"); arc_obj = chkobject("arc"); mark_obj = chkobject("mark"); UpdateFieldsLock = TRUE; for (i = 0; i < num; i++) { focus = &objs[i]; if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (obj == axis_obj) { widget_set_line_width(obj, inst); widget_set_rgba_color(obj, inst, Widgets.color1.widget, NULL, NULL); widget_set_line_style(obj, inst, "style"); widget_set_font_style(obj, inst, "num_font_style"); widget_set_spin_value(obj, inst, Widgets.pt.widget, "num_pt"); widget_set_font(obj, inst, "num_font"); } else if (obj == path_obj) { widget_set_stroke_fill(obj, inst); widget_set_join(obj, inst); widget_set_line_width(obj, inst); widget_set_rgba_color(obj, inst, Widgets.color1.widget, "stroke_", NULL); widget_set_rgba_color(obj, inst, Widgets.color2.widget, "fill_", NULL); widget_set_marker_type(obj, inst); widget_set_mark_type(obj, inst, Widgets.mark_type_begin.widget, "mark_type_begin", &(Widgets.mark_begin)); widget_set_mark_type(obj, inst, Widgets.mark_type_end.widget, "mark_type_end", &(Widgets.mark_end)); widget_set_line_style(obj, inst, "style"); widget_set_path_type(obj, inst); } else if (obj == rect_obj) { widget_set_stroke_fill(obj, inst); widget_set_line_width(obj, inst); widget_set_rgba_color(obj, inst, Widgets.color1.widget, "stroke_", NULL); widget_set_rgba_color(obj, inst, Widgets.color2.widget, "fill_", NULL); widget_set_line_style(obj, inst, "style"); } else if (obj == text_obj) { widget_set_font_style(obj, inst, "style"); widget_set_spin_value(obj, inst, Widgets.pt.widget, "pt"); widget_set_font(obj, inst, "font"); widget_set_rgba_color(obj, inst, Widgets.color1.widget, NULL, NULL); } else if (obj == arc_obj) { widget_set_stroke_fill(obj, inst); widget_set_join(obj, inst); widget_set_line_width(obj, inst); widget_set_rgba_color(obj, inst, Widgets.color1.widget, "stroke_", NULL); widget_set_rgba_color(obj, inst, Widgets.color2.widget, "fill_", NULL); widget_set_marker_type(obj, inst); widget_set_mark_type(obj, inst, Widgets.mark_type_begin.widget, "mark_type_begin", &(Widgets.mark_begin)); widget_set_mark_type(obj, inst, Widgets.mark_type_end.widget, "mark_type_end", &(Widgets.mark_end)); widget_set_line_style(obj, inst, "style"); } else if (obj == mark_obj) { widget_set_line_width(obj, inst); widget_set_rgba_color(obj, inst, Widgets.color1.widget, NULL, NULL); widget_set_rgba_color(obj, inst, Widgets.color2.widget, NULL, "2"); widget_set_mark_type(obj, inst, Widgets.mark_type.widget, "type", &(Widgets.mark)); widget_set_line_style(obj, inst, "style"); widget_set_spin_value(obj, inst, Widgets.mark_size.widget, "size"); } } UpdateFieldsLock = FALSE; } enum FOCUS_OBJ { FOCUS_OBJ_AXIS, FOCUS_OBJ_MERGE, FOCUS_OBJ_PATH, FOCUS_OBJ_RECTANGLE, FOCUS_OBJ_ARC, FOCUS_OBJ_MARK, FOCUS_OBJ_TEXT, FOCUS_OBJ_N, }; struct FOCUS_OBJ_INFO { struct FOCUS_OBJ_INFO_INFO { struct objlist *obj; enum FOCUS_OBJ type; int focused; } info[FOCUS_OBJ_N]; }; static int init_focus_obj_info(struct FOCUS_OBJ_INFO *info) { char *objs[FOCUS_OBJ_N] = {"axis", "merge", "path", "rectangle", "arc", "mark", "text"}; int i; for (i = 0; i < FOCUS_OBJ_N; i++) { info->info[i].obj = chkobject(objs[i]); info->info[i].type = i; info->info[i].focused = FALSE; if (info->info[i].obj == NULL) { return 1; } } return 0; } static void presetting_set_invisible_all(void) { Widgets.stroke_fill.visibility = FALSE; Widgets.line_width.visibility = FALSE; Widgets.line_style.visibility = FALSE; Widgets.color1.visibility = FALSE; Widgets.color2.visibility = FALSE; Widgets.path_type.visibility = FALSE; Widgets.join_type.visibility = FALSE; Widgets.marker_type_begin.visibility = FALSE; Widgets.marker_type_end.visibility = FALSE; Widgets.font.visibility = FALSE; Widgets.bold.visibility = FALSE; Widgets.italic.visibility = FALSE; Widgets.pt.visibility = FALSE; Widgets.mark_size.visibility = FALSE; Widgets.mark_type.visibility = FALSE; Widgets.mark_type_begin.visibility = FALSE; Widgets.mark_type_end.visibility = FALSE; } static void presetting_set_visible(enum FOCUS_OBJ type) { switch (type) { case FOCUS_OBJ_PATH: Widgets.stroke_fill.visibility = TRUE; Widgets.line_width.visibility = TRUE; Widgets.line_style.visibility = TRUE; Widgets.color1.visibility = TRUE; Widgets.color2.visibility = TRUE; Widgets.path_type.visibility = TRUE; Widgets.join_type.visibility = TRUE; Widgets.marker_type_begin.visibility = TRUE; Widgets.marker_type_end.visibility = TRUE; Widgets.mark_type_begin.visibility = TRUE; Widgets.mark_type_end.visibility = TRUE; break; case FOCUS_OBJ_RECTANGLE: Widgets.stroke_fill.visibility = TRUE; Widgets.line_width.visibility = TRUE; Widgets.line_style.visibility = TRUE; Widgets.color1.visibility = TRUE; Widgets.color2.visibility = TRUE; break; case FOCUS_OBJ_ARC: Widgets.stroke_fill.visibility = TRUE; Widgets.line_width.visibility = TRUE; Widgets.line_style.visibility = TRUE; Widgets.color1.visibility = TRUE; Widgets.color2.visibility = TRUE; Widgets.join_type.visibility = TRUE; Widgets.marker_type_begin.visibility = TRUE; Widgets.marker_type_end.visibility = TRUE; Widgets.mark_type_begin.visibility = TRUE; Widgets.mark_type_end.visibility = TRUE; break; case FOCUS_OBJ_MARK: Widgets.line_width.visibility = TRUE; Widgets.line_style.visibility = TRUE; Widgets.color1.visibility = TRUE; Widgets.color2.visibility = TRUE; Widgets.mark_size.visibility = TRUE; Widgets.mark_type.visibility = TRUE; break; case FOCUS_OBJ_TEXT: Widgets.color1.visibility = TRUE; Widgets.font.visibility = TRUE; Widgets.bold.visibility = TRUE; Widgets.italic.visibility = TRUE; Widgets.pt.visibility = TRUE; break; case FOCUS_OBJ_AXIS: Widgets.line_width.visibility = TRUE; Widgets.line_style.visibility = TRUE; Widgets.color1.visibility = TRUE; Widgets.font.visibility = TRUE; Widgets.bold.visibility = TRUE; Widgets.italic.visibility = TRUE; Widgets.pt.visibility = TRUE; break; case FOCUS_OBJ_MERGE: case FOCUS_OBJ_N: break; } } static void presetting_set_widget_visibility(void) { gtk_widget_set_visible(Widgets.stroke_fill.widget, Widgets.stroke_fill.visibility); gtk_widget_set_visible(Widgets.line_width.widget, Widgets.line_width.visibility); gtk_widget_set_visible(Widgets.line_style.widget, Widgets.line_style.visibility); gtk_widget_set_visible(Widgets.color1.widget, Widgets.color1.visibility); gtk_widget_set_visible(Widgets.color2.widget, Widgets.color2.visibility); gtk_widget_set_visible(Widgets.path_type.widget, Widgets.path_type.visibility); gtk_widget_set_visible(Widgets.join_type.widget, Widgets.join_type.visibility); gtk_widget_set_visible(Widgets.marker_type_begin.widget, Widgets.marker_type_begin.visibility); gtk_widget_set_visible(Widgets.marker_type_end.widget, Widgets.marker_type_end.visibility); gtk_widget_set_visible(Widgets.font.widget, Widgets.font.visibility); gtk_widget_set_visible(Widgets.bold.widget, Widgets.bold.visibility); gtk_widget_set_visible(Widgets.italic.widget, Widgets.italic.visibility); gtk_widget_set_visible(Widgets.pt.widget, Widgets.pt.visibility); gtk_widget_set_visible(Widgets.mark_size.widget, Widgets.mark_size.visibility); gtk_widget_set_visible(Widgets.mark_type.widget, Widgets.mark_type.visibility); gtk_widget_set_visible(Widgets.mark_type_begin.widget, Widgets.mark_type_begin.visibility); gtk_widget_set_visible(Widgets.mark_type_end.widget, Widgets.mark_type_end.visibility); presetting_set_parameters(&NgraphApp.Viewer); } void presetting_set_visibility(enum PointerType type) { enum FOCUS_OBJ obj_type; presetting_set_invisible_all(); switch (type) { case PointB: case AxisB: case LegendB: case DataB: case EvalB: case TrimB: case ZoomB: break; case PathB: obj_type = FOCUS_OBJ_PATH; presetting_set_visible(obj_type); break; case RectB: obj_type = FOCUS_OBJ_RECTANGLE; presetting_set_visible(obj_type); break; case ArcB: obj_type = FOCUS_OBJ_ARC; presetting_set_visible(obj_type); break; case MarkB: obj_type = FOCUS_OBJ_MARK; presetting_set_visible(obj_type); break; case TextB: obj_type = FOCUS_OBJ_TEXT; presetting_set_visible(obj_type); break; case GaussB: Widgets.line_width.visibility = TRUE; Widgets.line_style.visibility = TRUE; Widgets.color1.visibility = TRUE; Widgets.join_type.visibility = TRUE; break; case FrameB: case SectionB: case CrossB: case SingleB: obj_type = FOCUS_OBJ_AXIS; presetting_set_visible(obj_type); break; } presetting_set_widget_visibility(); } static int check_focused_obj(struct FOCUS_OBJ_INFO *info) { int num, i, j; struct FocusObj objs[OBJ_MAX]; if (init_focus_obj_info(info)) { return 1; } num = get_focused_obj_type_array(NgraphApp.Viewer.focusobj, objs); for (i = 0; i < num; i++) { struct FocusObj *focus; focus = &objs[i]; for (j = 0; j < FOCUS_OBJ_N; j++) { if (info->info[j].obj == focus->obj) { info->info[j].focused = TRUE; } } } return 0; } void presetting_show_focused(void) { int i; struct FOCUS_OBJ_INFO info; presetting_set_invisible_all(); if (check_focused_obj(&info)) { return; } for (i = 0; i < FOCUS_OBJ_N; i++) { if (info.info[i].focused) { presetting_set_visible(info.info[i].type); } } presetting_set_widget_visibility(); } #if 0 static GtkWidget * create_mark_combo_box(const char *tooltop) { GtkWidget *cbox; GtkListStore *list; GtkTreeIter iter; int j; GtkCellRenderer *rend; list = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_OBJECT); cbox = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list)); gtk_widget_set_tooltip_text(cbox, tooltop); rend = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "text", 0); rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "pixbuf", 1); for (j = 0; j < MARK_TYPE_NUM; j++) { GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_get_from_surface(NgraphApp.markpix[j], 0, 0, MARK_PIX_SIZE, MARK_PIX_SIZE); if (pixbuf) { char buf[64]; gtk_list_store_append(list, &iter); snprintf(buf, sizeof(buf), "%02d", j); gtk_list_store_set(list, &iter, 0, buf, 1, pixbuf, -1); g_object_unref(pixbuf); } } gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 0); return cbox; } #endif static int chk_update_field(struct objlist *obj, N_VALUE *inst, const char *field, int new_val) { int val, id; if (chkobjfield(obj, field)) { return 0; } if (_getobj(obj, field, inst, &val) == -1) { return 0; } if (val == new_val) { return 0; } _getobj(obj, "id", inst, &id); putobj(obj, field, id, &new_val); return 1; } typedef int (* AXISGRID_CALLBACK)(struct objlist *, N_VALUE *, void *); static int check_axis_id(struct AxisGroupInfo *info, int id) { int i; for (i = 0; i < info->num; i++) { if (info->id[i] == id) { return 1; } } return 0; } static int check_axisgrid(struct objlist *aobj, struct AxisGroupInfo *info, AXISGRID_CALLBACK cb, void *usr_data) { int i, n, aid, r; struct objlist *obj; if (cb == NULL){ return 0; } obj = getobject("axisgrid"); if (obj == NULL) { return 0; } r = 0; n = chkobjlastinst(obj); if (n < 0) { return 0; } n++; for (i = 0; i < n; i++) { N_VALUE *inst; inst = chkobjinst(obj, i); if (inst == NULL) { continue; } aid = get_axis_id(obj, inst, &aobj, AXIS_X); if (check_axis_id(info, aid)) { r = cb(obj, inst, usr_data); continue; } aid = get_axis_id(obj, inst, &aobj, AXIS_Y); if (check_axis_id(info, aid)) { r = cb(obj, inst, usr_data); } } return r; } static int set_axisgrid_width(struct objlist *obj, N_VALUE *inst, void *user_data) { int width, pw, modified, i; char *fields[] = {"width3", "width2", "width1"}; modified = FALSE; width = * (int *) user_data; for (i = 0; i < (int) G_N_ELEMENTS(fields); i++) { width /= 2; _getobj(obj, fields[i], inst, &pw); if (pw > 0 && pw != width) { _putobj(obj, fields[i], inst, &width); modified = TRUE; } } return modified; } static int update_focused_obj_width_axis(struct objlist *obj, N_VALUE *inst, int new_width) { int modified; struct AxisGroupInfo info; int i, j; char *fields[] = {"width", "gauge_width1", "gauge_width2", "gauge_width3", "wave_width"}; modified = FALSE; if (axis_get_group(obj, inst, &info)) { return modified; } for (i = 0; i < info.num; i++) { for (j = 0; j < (int) G_N_ELEMENTS(fields); j++) { if (chk_update_field(obj, info.inst[i], fields[j], new_width)) { modified = TRUE; } } } if (check_axisgrid(obj, &info, set_axisgrid_width, &new_width)) { modified = TRUE; } return modified; } static int update_focused_obj_width(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, width; struct objlist *obj, *axis_obj; modified = FALSE; axis_obj = chkobject("axis"); width = get_line_width_setting(); for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) continue; obj = focus->obj; if (chkobjfield(obj, "width")) { continue; } if (obj == axis_obj) { if (update_focused_obj_width_axis(obj, inst, width)) { modified = TRUE; } } else { if (chk_update_field(obj, inst, "width", width)) { modified = TRUE; } } } return modified; } static int update_focused_obj_line_style_axis(struct objlist *obj, N_VALUE *inst, char *style_str) { int modified; struct AxisGroupInfo info; int i; modified = FALSE; if (axis_get_group(obj, inst, &info)) { return modified; } for (i = 0; i < info.num; i++) { sputobjfield(obj, info.id[i], "gauge_style", style_str); sputobjfield(obj, info.id[i], "style", style_str); modified = TRUE; /* really modified */ } return modified; } static int update_focused_obj_line_style(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, style, id; struct objlist *obj, *axis_obj, *text_obj; char *style_str; modified = FALSE; axis_obj = chkobject("axis"); text_obj = chkobject("text"); style = combo_box_get_active(widget); style_str = FwLineStyle[style].list; for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; _getobj(obj, "id", inst, &id); if (chkobjfield(obj, "style")) { continue; } if (obj == text_obj) { continue; } if (obj == axis_obj) { if (update_focused_obj_line_style_axis(obj, inst, style_str)) { modified = TRUE; } } else { sputobjfield(obj, id, "style", style_str); modified = TRUE; /* really modified */ } } return modified; } static int update_focused_obj_color1_axis(struct objlist *obj, N_VALUE *inst, int r, int g, int b, int a) { int modified; struct AxisGroupInfo info; int i; modified = FALSE; if (axis_get_group(obj, inst, &info)) { return modified; } for (i = 0; i < info.num; i++) { _putobj(obj, "R", info.inst[i], &r); _putobj(obj, "G", info.inst[i], &g); _putobj(obj, "B", info.inst[i], &b); _putobj(obj, "A", info.inst[i], &a); _putobj(obj, "gauge_R", info.inst[i], &r); _putobj(obj, "gauge_G", info.inst[i], &g); _putobj(obj, "gauge_B", info.inst[i], &b); _putobj(obj, "gauge_A", info.inst[i], &a); _putobj(obj, "num_R", info.inst[i], &r); _putobj(obj, "num_G", info.inst[i], &g); _putobj(obj, "num_B", info.inst[i], &b); _putobj(obj, "num_A", info.inst[i], &a); modified = TRUE; /* really modified */ } return modified; } static int update_focused_obj_color1(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, r, g, b, a; struct objlist *obj, *text_obj, *mark_obj, *axis_obj; modified = FALSE; text_obj = chkobject("text"); mark_obj = chkobject("mark"); axis_obj = chkobject("axis"); set_rgba(widget, &r, &g, &b, &a); for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (! chkobjfield(obj, "stroke_R")) { _putobj(obj, "stroke_R", inst, &r); _putobj(obj, "stroke_G", inst, &g); _putobj(obj, "stroke_B", inst, &b); _putobj(obj, "stroke_A", inst, &a); modified = TRUE; /* really modified */ } else if (obj == text_obj || obj == mark_obj) { _putobj(obj, "R", inst, &r); _putobj(obj, "G", inst, &g); _putobj(obj, "B", inst, &b); _putobj(obj, "A", inst, &a); modified = TRUE; /* really modified */ } else if (obj == axis_obj) { if (update_focused_obj_color1_axis(obj, inst,r, g, b, a)) { modified = TRUE; } } } return modified; } static int update_focused_obj_color2(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, r, g, b, a; struct objlist *obj, *mark_obj; modified = FALSE; mark_obj = chkobject("mark"); set_rgba(widget, &r, &g, &b, &a); for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (! chkobjfield(obj, "fill_R")) { _putobj(obj, "fill_R", inst, &r); _putobj(obj, "fill_G", inst, &g); _putobj(obj, "fill_B", inst, &b); _putobj(obj, "fill_A", inst, &a); modified = TRUE; /* really modified */ } else if (obj == mark_obj) { _putobj(obj, "R2", inst, &r); _putobj(obj, "G2", inst, &g); _putobj(obj, "B2", inst, &b); _putobj(obj, "A2", inst, &a); modified = TRUE; /* really modified */ } } return modified; } static int update_focused_obj_path_type(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, id; struct objlist *obj, *path_obj; modified = FALSE; path_obj = chkobject("path"); for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; _getobj(obj, "id", inst, &id); if (obj == path_obj) { set_path_type(obj, id); modified = TRUE; /* really modified */ } } return modified; } static int update_focused_obj_font_axis(struct objlist *obj, N_VALUE *inst) { int modified; struct AxisGroupInfo info; int i; modified = FALSE; if (axis_get_group(obj, inst, &info)) { return modified; } for (i = 0; i < info.num; i++) { set_font(obj, info.id[i], "num_font"); modified = TRUE; /* really modified */ } return modified; } static int update_focused_obj_font(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, id; struct objlist *obj, *text_obj, *axis_obj; modified = FALSE; text_obj = chkobject("text"); axis_obj = chkobject("axis"); for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; _getobj(obj, "id", inst, &id); if (obj == text_obj) { set_font(obj, id, "font"); modified = TRUE; /* really modified */ } else if (obj == axis_obj) { if (update_focused_obj_font_axis(obj, inst)) { modified = TRUE; } } } return modified; } static int update_focused_obj_font_size_axis(struct objlist *obj, N_VALUE *inst, int pt) { int modified; struct AxisGroupInfo info; int i; modified = FALSE; if (axis_get_group(obj, inst, &info)) { return modified; } for (i = 0; i < info.num; i++) { if (chk_update_field(obj, info.inst[i], "num_pt", pt)) { modified = TRUE; } } return modified; } static int update_focused_obj_font_size(GtkWidget *widget, struct Viewer *d, int num) { struct FocusObj *focus; N_VALUE *inst; int i, modified, pt; struct objlist *obj, *axis_obj; modified = FALSE; axis_obj = chkobject("axis"); pt = gtk_spin_button_get_value(GTK_SPIN_BUTTON(Widgets.pt.widget)) * 100; for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (chk_update_field(obj, inst, "pt", pt)) { modified = TRUE; } else if (obj == axis_obj) { if (update_focused_obj_font_size_axis(obj, inst, pt)) { modified = TRUE; } } } return modified; } static int update_focused_obj_field_value(struct Viewer *d, int num, const char *field, int value, struct objlist *target) { struct FocusObj *focus; N_VALUE *inst; int i, modified, old_value, id; struct objlist *obj; modified = FALSE; for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (target && obj != target) { continue; } if (! chkobjfield(obj, field)) { _getobj(obj, field, inst, &old_value); if (value != old_value) { _getobj(obj, "id", inst, &id); putobj(obj, field, id, &value); modified = TRUE; } } } return modified; } static int update_focused_obj_stroke_fill(struct Viewer *d, int num, int mode) { struct FocusObj *focus; N_VALUE *inst; int i, modified, fill, stroke, close_path; struct objlist *obj; modified = FALSE; stroke = (mode & PATH_TYPE_STROKE) ? 1 : 0; fill = (mode & PATH_TYPE_FILL) ? 1 : 0; close_path = (mode & PATH_TYPE_CLOSE) ? 1 : 0; for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (chk_update_field(obj, inst, "stroke", stroke)) { modified = TRUE; } if (chk_update_field(obj, inst, "fill", fill)) { modified = TRUE; } if (chk_update_field(obj, inst, "close_path", close_path)) { modified = TRUE; } } return modified; } static int update_focused_obj_font_style_axis(struct objlist *obj, N_VALUE *inst, int style, int apply) { int modified; struct AxisGroupInfo info; int i; modified = FALSE; if (axis_get_group(obj, inst, &info)) { return modified; } for (i = 0; i < info.num; i++) { if (modify_font_style(obj, info.inst[i], "num_font_style", style, apply, "num_font")) { modified = TRUE; } } return modified; } static int update_focused_obj_font_style(struct Viewer *d, int num, int style, int apply) { struct FocusObj *focus; N_VALUE *inst; int i, modified; struct objlist *obj, *text_obj, *axis_obj; modified = FALSE; text_obj = chkobject("text"); axis_obj = chkobject("axis"); for (i = 0; i < num; i++) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; if (obj == text_obj) { if (modify_font_style(obj, inst, "style", style, apply, "font")) { modified = TRUE; } } else if (obj == axis_obj) { if (update_focused_obj_font_style_axis(obj, inst, style, apply)) { modified = TRUE; } } } return modified; } static void update_focused_obj(GtkWidget *widget, gpointer user_data) { int undo, modified, num; char *objs[OBJ_MAX]; struct Viewer *d; if (UpdateFieldsLock) { return; } modified = FALSE; d = &NgraphApp.Viewer; num = arraynum(d->focusobj); if (num < 1) { return; } get_focused_obj_array(d->focusobj, objs); undo = menu_save_undo(UNDO_TYPE_EDIT, objs); if (widget == Widgets.line_width.widget) { modified = update_focused_obj_width(widget, d, num); } else if (widget == Widgets.line_style.widget) { modified = update_focused_obj_line_style(widget, d, num); } else if (widget == Widgets.color1.widget) { modified = update_focused_obj_color1(widget, d, num); } else if (widget == Widgets.color2.widget) { modified = update_focused_obj_color2(widget, d, num); } else if (widget == Widgets.path_type.widget) { modified = update_focused_obj_path_type(widget, d, num); } else if (widget == Widgets.join_type.widget) { modified = update_focused_obj_field_value(d, num, "join", GPOINTER_TO_INT(user_data), NULL); } else if (widget == Widgets.marker_type_begin.widget) { modified = update_focused_obj_field_value(d, num, "marker_begin", GPOINTER_TO_INT(user_data), NULL); } else if (widget == Widgets.marker_type_end.widget) { modified = update_focused_obj_field_value(d, num, "marker_end", GPOINTER_TO_INT(user_data), NULL); } else if (widget == Widgets.mark_type_begin.widget) { modified = update_focused_obj_field_value(d, num, "mark_type_begin", GPOINTER_TO_INT(user_data), NULL); } else if (widget == Widgets.mark_type_end.widget) { modified = update_focused_obj_field_value(d, num, "mark_type_end", GPOINTER_TO_INT(user_data), NULL); } else if (widget == Widgets.stroke_fill.widget) { modified = update_focused_obj_stroke_fill(d, num, GPOINTER_TO_INT(user_data)); } else if (widget == Widgets.font.widget) { modified = update_focused_obj_font(widget, d, num); } else if (widget == Widgets.bold.widget) { int apply; apply = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); modified = update_focused_obj_font_style(d, num, GRA_FONT_STYLE_BOLD, apply); } else if (widget == Widgets.italic.widget) { int apply; apply = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); modified = update_focused_obj_font_style(d, num, GRA_FONT_STYLE_ITALIC, apply); } else if (widget == Widgets.pt.widget) { modified = update_focused_obj_font_size(widget, d, num); } else if (widget == Widgets.mark_type.widget) { struct objlist *mark_obj; mark_obj = chkobject("mark"); modified = update_focused_obj_field_value(d, num, "type", GPOINTER_TO_INT(user_data), mark_obj); } else if (widget == Widgets.mark_size.widget) { int size; struct objlist *mark_obj; mark_obj = chkobject("mark"); size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(Widgets.mark_size.widget)) * 100; modified = update_focused_obj_field_value(d, num, "size", size, mark_obj); } if (modified) { set_graph_modified(); } else { menu_undo_internal(undo); } UpdateAll(objs); } static GtkWidget * create_line_width_combo_box(void) { GtkWidget *cbox; GtkListStore *list; GtkTreeIter iter; int j; GtkCellRenderer *rend; list = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT); cbox = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list)); rend = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "text", 0); rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "icon-name", 1); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "stock-size", 2); for (j = 0; j < LINE_WIDTH_ICON_NUM; j++) { char buf[64], img_file[256]; snprintf(img_file, sizeof(img_file), "linewidth_%03d-symbolic", 2 << j); gtk_list_store_append(list, &iter); snprintf(buf, sizeof(buf), "%4.1f", (2 << j) / 10.0); gtk_list_store_set(list, &iter, 0, buf, 1, img_file, 2, GTK_ICON_SIZE_LARGE_TOOLBAR, -1); } gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 1); g_signal_connect(cbox, "changed", G_CALLBACK(update_focused_obj), NULL); return cbox; } static GtkWidget * create_line_style_combo_box(void) { GtkWidget *cbox; int j; cbox = gtk_combo_box_text_new(); for (j = 0; j < LINE_STYLE_ICON_NUM; j++) { gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(cbox), NULL, _(FwLineStyle[j].name)); } gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 0); g_signal_connect(cbox, "changed", G_CALLBACK(update_focused_obj), NULL); return cbox; } static GtkWidget * create_path_type_combo_box(void) { GtkWidget *cbox; int j; cbox = gtk_combo_box_text_new(); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(cbox), NULL, _("line")); for (j = 0; intpchar[j]; j++) { gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(cbox), NULL, _(intpchar[j])); } gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 0); g_signal_connect(cbox, "changed", G_CALLBACK(update_focused_obj), NULL); return cbox; } GtkWidget * create_menu_button(GtkBuilder *builder, const char *menu_name, const char *tooltip) { GtkWidget *w; GMenuModel *menu; w = gtk_menu_button_new(); menu = G_MENU_MODEL(gtk_builder_get_object(builder, menu_name)); gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(w), FALSE); gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(w), menu); gtk_widget_set_tooltip_text(w, tooltip); return w; } static void select_mark(GtkWidget *w, gpointer client_data) { struct MarkDialog *d; int ret; d = (struct MarkDialog *) client_data; ret = DialogExecute(d->parent, d); if (ret == IDOK) { button_set_mark_image(w, d->Type); update_focused_obj(w, GINT_TO_POINTER(d->Type)); } } static void setup_mark_type(GtkWidget *type, struct MarkDialog *mark) { button_set_mark_image(type, 0); MarkDialog(mark, TopLevel, 0); } void presetting_set_fonts(void) { int lock; GtkTreeIter iter; char *font; GtkComboBox *cbox; cbox = GTK_COMBO_BOX(Widgets.font.widget); if (cbox == NULL) { return; } font = NULL; if (gtk_combo_box_get_active_iter(cbox, &iter)) { GtkTreeModel *model; model = gtk_combo_box_get_model(cbox); gtk_tree_model_get(model, &iter, 0, &font, -1); } lock = UpdateFieldsLock; UpdateFieldsLock = TRUE; set_font_family(GTK_WIDGET(cbox)); if (font) { int index; index = check_font_index(font); gtk_combo_box_set_active(cbox, index); g_free(font); } UpdateFieldsLock = lock; } GtkWidget * presetting_create_panel(GtkApplication *app) { GtkWidget *w, *box, *img; GtkBuilder *builder; GdkRGBA color; g_action_map_add_action_entries(G_ACTION_MAP(app), ToolMenuEntries, G_N_ELEMENTS(ToolMenuEntries), app); create_images(&Widgets); builder = gtk_builder_new_from_resource(RESOURCE_PATH "/gtk/menus-tool.ui"); box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_widget_set_margin_start(box, SETTING_PANEL_MARGIN); gtk_widget_set_margin_end(box, SETTING_PANEL_MARGIN); gtk_widget_set_margin_top(box, SETTING_PANEL_MARGIN); gtk_widget_set_margin_bottom(box, SETTING_PANEL_MARGIN); w = combo_box_create(); set_font_family(w); gtk_widget_set_tooltip_text(w, _("Font name")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); g_signal_connect(w, "changed", G_CALLBACK(update_focused_obj), NULL); Widgets.font.widget = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POINT, FALSE, FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), DEFAULT_FONT_PT / 100.0); gtk_entry_set_width_chars(GTK_ENTRY(w), 5); gtk_widget_set_tooltip_text(w, _("Font size")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); g_signal_connect(w, "value-changed", G_CALLBACK(update_focused_obj), NULL); Widgets.pt.widget = w; img = gtk_image_new_from_icon_name("format-text-bold-symbolic", GTK_ICON_SIZE_BUTTON); Widgets.bold.widget = create_toggle_button(box, img, _("Bold"), FALSE); img = gtk_image_new_from_icon_name("format-text-italic-symbolic", GTK_ICON_SIZE_BUTTON); Widgets.italic.widget = create_toggle_button(box, img, _("Italic"), FALSE); gtk_widget_set_margin_end(Widgets.italic.widget, SETTING_PANEL_MARGIN * 4); w = create_path_type_combo_box(); gtk_widget_set_margin_end(w, SETTING_PANEL_MARGIN * 4); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.path_type.widget = w; w = gtk_button_new(); g_signal_connect(w, "clicked", G_CALLBACK(select_mark), &(Widgets.mark)); setup_mark_type(w, &(Widgets.mark)); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.mark_type.widget = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, FALSE, FALSE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), DEFAULT_MARK_SIZE / 100.0); gtk_entry_set_width_chars(GTK_ENTRY(w), 5); gtk_widget_set_tooltip_text(w, _("Mark size")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); g_signal_connect(w, "value-changed", G_CALLBACK(update_focused_obj), NULL); Widgets.mark_size.widget = w; w = create_menu_button(builder, "stroke-fill-menu", _("stroke/fill")); Widgets.stroke_fill.widget = w; Widgets.stroke = TRUE; gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); set_stroke_fill_icon(); w = create_line_width_combo_box(); gtk_widget_set_tooltip_text(w, _("Line Width")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.line_width.widget = w; w = create_line_style_combo_box(); gtk_widget_set_tooltip_text(w, _("Line Style")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.line_style.widget = w; w = create_color_button(NULL); color.red = color.green = color.blue = 0; color.alpha = 1; gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(w), &color); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.color1.widget = w; gtk_widget_set_name(Widgets.color1.widget, "StrokeColorButton"); g_signal_connect(w, "color-set", G_CALLBACK(update_focused_obj), NULL); w = create_color_button(NULL); color.red = color.green = color.blue = 1; color.alpha = 1; gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(w), &color); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); g_signal_connect(w, "color-set", G_CALLBACK(update_focused_obj), NULL); Widgets.color2.widget = w; w = create_menu_button(builder, "join-type-menu", _("Join")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.join_type.widget = w; gtk_button_set_image(GTK_BUTTON(Widgets.join_type.widget), Widgets.join_icon[DEFAULT_JOIN_TYPE]); w = gtk_button_new(); g_signal_connect(w, "clicked", G_CALLBACK(select_mark), &(Widgets.mark_begin)); setup_mark_type(w, &(Widgets.mark_begin)); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.mark_type_begin.widget = w; w = create_menu_button(builder, "marker-type-begin-menu", _("Marker begin")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.marker_type_begin.widget = w; Widgets.marker_begin = DEFAULT_MARKER_TYPE; gtk_button_set_image(GTK_BUTTON(Widgets.marker_type_begin.widget), Widgets.marker_begin_icon[DEFAULT_MARKER_TYPE]); w = create_menu_button(builder, "marker-type-end-menu", _("Marker end")); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.marker_type_end.widget = w; Widgets.marker_end = DEFAULT_MARKER_TYPE; gtk_button_set_image(GTK_BUTTON(Widgets.marker_type_end.widget), Widgets.marker_end_icon[DEFAULT_MARKER_TYPE]); w = gtk_button_new(); g_signal_connect(w, "clicked", G_CALLBACK(select_mark), &(Widgets.mark_end)); setup_mark_type(w, &(Widgets.mark_end)); gtk_box_pack_start(GTK_BOX(box), w, FALSE, FALSE, 0); Widgets.mark_type_end.widget = w; gtk_widget_set_sensitive(Widgets.mark_type_begin.widget, Widgets.marker_begin == MARKER_TYPE_MARK); gtk_widget_set_sensitive(Widgets.mark_type_end.widget, Widgets.marker_end == MARKER_TYPE_MARK); g_object_unref(builder); return box; } void presetting_get(struct presettings *setting) { setting->line_width = get_line_width_setting();; setting->line_style = combo_box_get_active(Widgets.line_style.widget);; setting->type = combo_box_get_active(Widgets.path_type.widget); setting->interpolation = setting->type - 1; if (setting->type) { setting->type = 1; } setting->join = Widgets.join; setting->mark_type_begin = Widgets.mark_begin.Type; setting->mark_type_end = Widgets.mark_end.Type; setting->mark_type = Widgets.mark.Type; setting->mark_size = gtk_spin_button_get_value(GTK_SPIN_BUTTON(Widgets.mark_size.widget)) * 100;; setting->marker_begin = Widgets.marker_begin; setting->marker_end = Widgets.marker_end; setting->fill = Widgets.fill; setting->stroke = Widgets.stroke; setting->close_path = Widgets.close_path; set_rgba(Widgets.color1.widget, &setting->r1, &setting->g1, &setting->b1, &setting->a1); set_rgba(Widgets.color2.widget, &setting->r2, &setting->g2, &setting->b2, &setting->a2); } ngraph-gtk-6.09.05/src/gtk/ogra2cairo.h0000644000175000017500000000425414126205402014434 00000000000000#ifndef _O_GRA2CAIRO_HEADER #define _O_GRA2CAIRO_HEADER #include "object.h" #include "nhash.h" extern struct gra2cairo_config *Gra2cairoConf; extern char *gra2cairo_antialias_type[], **Gra2CairoErrMsgs; extern int Gra2CairoErrMsgNum; enum antialias_type_id { ANTIALIAS_TYPE_NONE, ANTIALIAS_TYPE_DEFAULT, ANTIALIAS_TYPE_GRAY, ANTIALIAS_TYPE_SUBPIXEL, }; struct fontmap { char *fontalias, *fontname, *alternative; PangoFontDescription *font; struct fontmap *next; }; struct compatible_font_info { char *old_name; int style; int symbol; char *name; }; struct gra2cairo_config { NHASH fontmap; struct fontmap *fontmap_list_root; int font_num; }; struct gra2cairo_local { cairo_t *cairo; PangoLayout *layout; int linetonum, text2path, antialias, use_opacity; struct fontmap *loadfont; char *fontalias; int font_style, symbol; double pixel_dot_x, pixel_dot_y, offsetx, offsety, fontdir, fontcos, fontsin, fontspace, fontsize; cairo_region_t *region; }; int gra2cairo_clip_region(struct gra2cairo_local *local, cairo_region_t *region); int gra2cairo_strwidth(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); int gra2cairo_charheight(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); void gra2cairo_set_antialias(struct gra2cairo_local *local, int antialias); void set_cairo_antialias(cairo_t *cairo, int antialias); struct gra2cairo_local *gra2cairo_free(struct objlist *obj, N_VALUE *inst); void gra2cairo_update_fontmap(const char *fontalias, const char *fontname); struct fontmap *gra2cairo_get_fontmap(const char *font_alias); void gra2cairo_remove_fontmap(const char *fontalias); void gra2cairo_add_fontmap(const char *fontalias, const char *fontname); int gra2cairo_get_fontmap_num(void); void gra2cairo_save_config(void); void gra2cairo_draw_path(struct gra2cairo_local *local); struct compatible_font_info *gra2cairo_get_compatible_font_info(const char *name); void gra2cairo_set_alternative_font(const char *fontalias, const char *fontname); char *gra2cairo_get_utf8_str(const char *cstr, int symbol); int get_font_style(struct objlist *obj, N_VALUE *inst, const char *field, const char *font_field); #endif ngraph-gtk-6.09.05/src/gtk/gtk_subwin.h0000644000175000017500000000664613702004142014564 00000000000000/* * $Id: gtk_subwin.h,v 1.14 2009-07-22 14:53:31 hito Exp $ */ #ifndef _GTK_SUBWIN_HEADER #define _GTK_SUBWIN_HEADER #include "common.h" #include "gtk_common.h" #include "gtk_liststore.h" #include "object.h" #include "ogra2cairo.h" #include "x11menu.h" #include "ox11menu.h" #define COL_ID 1 typedef void (* list_sub_window_set_val_func) (struct obj_list_data *d, GtkTreeIter *iter, int i); struct subwin_popup_list { char *title; GCallback func; struct subwin_popup_list *submenu; enum pop_up_menu_item_type type; }; GtkWidget *label_sub_window_create(struct SubWin *d); GtkWidget *text_sub_window_create(struct SubWin *d); GtkWidget *list_sub_window_create(struct SubWin *d, int lisu_num, n_list_store *list); GtkWidget *parameter_sub_window_create(struct SubWin *d); GtkWidget *tree_sub_window_create(struct SubWin *d, int page_num, int *lisu_num, n_list_store **list, GtkWidget **icons); void sub_window_set_geometry(struct SubWin *d, int resize); void sub_window_save_geometry(struct SubWin *d); void sub_window_set_visibility(struct SubWin *d, int state); void sub_window_save_visibility(struct SubWin *d); //GtkWidget *sub_window_get_nth_content(struct LegendWin *d, int n); void set_editable_cell_renderer_cb(struct obj_list_data *d, int i, n_list_store *list, GCallback end); void set_combo_cell_renderer_cb(struct obj_list_data *d, int col, n_list_store *list, GCallback start, GCallback end); void set_obj_cell_renderer_cb(struct obj_list_data *d, int col, n_list_store *list, GCallback start); void set_cell_attribute_source(struct SubWin *d, const char *attr, int target_column, int source_column); gboolean list_sub_window_must_rebuild(struct obj_list_data *d); void list_sub_window_build(struct obj_list_data *d, list_sub_window_set_val_func func); void list_sub_window_set(struct obj_list_data *d, list_sub_window_set_val_func func); void list_sub_window_object_name(GtkMenuItem *w, gpointer client_data); void list_sub_window_delete(GtkMenuItem *item, gpointer user_data); void list_sub_window_copy(GtkMenuItem *item, gpointer user_data); void list_sub_window_move_top(GtkMenuItem *item, gpointer user_data); void list_sub_window_move_last(GtkMenuItem *item, gpointer user_data); void list_sub_window_move_up(GtkMenuItem *item, gpointer user_data); void list_sub_window_move_down(GtkMenuItem *item, gpointer user_data); void list_sub_window_update(GtkMenuItem *item, gpointer user_data); void list_sub_window_focus(GtkMenuItem *item, gpointer user_data); void list_sub_window_focus_all(GtkMenuItem *item, gpointer user_data); void list_sub_window_add_focus(GtkMenuItem *item, gpointer user_data); void tree_sub_window_delete(GtkMenuItem *item, gpointer user_data); void tree_sub_window_copy(GtkMenuItem *item, gpointer user_data); void tree_sub_window_move_top(GtkMenuItem *item, gpointer user_data); void tree_sub_window_move_last(GtkMenuItem *item, gpointer user_data); void tree_sub_window_move_up(GtkMenuItem *item, gpointer user_data); void tree_sub_window_move_down(GtkMenuItem *item, gpointer user_data); void tree_sub_window_update(GtkMenuItem *item, gpointer user_data); void tree_sub_window_hide(GtkMenuItem *item, gpointer user_data); void tree_sub_window_focus(GtkMenuItem *item, gpointer user_data); void tree_sub_window_add_focus(GtkMenuItem *item, gpointer user_data); void update_viewer(struct obj_list_data *d); GtkWidget *sub_win_create_popup_menu(struct obj_list_data *d, int n, struct subwin_popup_list *list, GCallback cb); #endif ngraph-gtk-6.09.05/src/gtk/x11info.c0000644000175000017500000000512514045741722013674 00000000000000/* * $Id: x11info.c,v 1.9 2009-07-22 14:53:31 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include "object.h" #include "gtk_widget.h" #include "gtk_subwin.h" #include "x11bitmp.h" #include "x11gui.h" #include "ox11menu.h" #include "x11menu.h" #include "x11info.h" void InfoWinSetFont(char *font) { if (NgraphApp.InfoWin.data.text && font) { set_widget_font(NgraphApp.InfoWin.data.text, font); } } void InfoWinDrawInfoText(const char *str) { GtkTextBuffer *buf; GtkTextIter iter; gint len; GtkTextMark *mark; if (str == NULL) return; if (NgraphApp.InfoWin.Win == NULL) { return; } if (NgraphApp.InfoWin.data.text == NULL) { return; } buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(NgraphApp.InfoWin.data.text)); gtk_text_buffer_get_end_iter(buf, &iter); gtk_text_buffer_insert(buf, &iter, str, -1); len = gtk_text_buffer_get_line_count(buf); if (len > Menulocal.info_size) { GtkTextIter start, end; gtk_text_buffer_get_start_iter(buf, &start); gtk_text_buffer_get_iter_at_line(buf, &end, len - Menulocal.info_size); gtk_text_buffer_delete(buf, &start, &end); } gtk_text_buffer_get_end_iter(buf, &iter); gtk_text_buffer_place_cursor(buf, &iter); mark = gtk_text_buffer_get_selection_bound(buf); gtk_text_view_scroll_mark_onscreen(GTK_TEXT_VIEW(NgraphApp.InfoWin.data.text), mark); } void InfoWinClear(void) { GtkTextBuffer *buf; if (NgraphApp.InfoWin.data.text == NULL) return; buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(NgraphApp.InfoWin.data.text)); gtk_text_buffer_set_text(buf, "", 0); } void InfoWinUpdate(int clear) { } GtkWidget * InfoWinCreate(struct SubWin *d) { if (d->Win) { return d->Win; } text_sub_window_create(d); InfoWinSetFont(Menulocal.infowin_font); return d->Win; } ngraph-gtk-6.09.05/src/gtk/x11opt_proto.h0000644000175000017500000001717614054607500014777 00000000000000#ifndef HAVE_UPDATE_FUNC static void CREATE_NAME(Pref, DialogUpdate)(GtkWidget *w, gpointer client_data) { struct CREATE_NAME(Pref, Dialog) *d; int a, j; struct LIST_TYPE *fcur; d = (struct CREATE_NAME(Pref, Dialog) *) client_data; a = list_store_get_selected_index(d->list); j = 0; fcur = LIST_ROOT; while (fcur) { if (j == a) break; fcur = fcur->next; j++; } #ifdef SET_DIALOG if (fcur) { CREATE_NAME(Set, Dialog)(&SET_DIALOG, fcur); DialogExecute(d->widget, &SET_DIALOG); CREATE_NAME(Pref, DialogSetupItem)(d); } #endif } #endif #ifdef LIST_INIT static void CREATE_NAME(Pref, DialogAdd)(GtkWidget *w, gpointer client_data) { struct LIST_TYPE *fcur, *fprev, *fnew; struct CREATE_NAME(Pref, Dialog) *d; d = (struct CREATE_NAME(Pref, Dialog) *) client_data; fprev = NULL; fcur = LIST_ROOT; while (fcur) { fprev = fcur; fcur = fcur->next; } fnew = (struct LIST_TYPE *) g_malloc(sizeof(struct LIST_TYPE)); if (fnew == NULL) { return; } LIST_INIT(fnew); if (fprev == NULL) { LIST_ROOT = fnew; } else { fprev->next = fnew; } CREATE_NAME(Set, Dialog)(&SET_DIALOG, fnew); if (DialogExecute(d->widget, &SET_DIALOG) != IDOK) { if (fprev == NULL) { LIST_ROOT = NULL; } else { fprev->next = NULL; } g_free(fnew); } CREATE_NAME(Pref, DialogSetupItem)(d); } #endif #ifdef LIST_FREE static void CREATE_NAME(Pref, DialogRemove)(GtkWidget *w, gpointer client_data) { int a, j; struct LIST_TYPE *fcur, *fprev, *fdel; struct CREATE_NAME(Pref, Dialog) *d; d = (struct CREATE_NAME(Pref, Dialog) *) client_data; a = list_store_get_selected_index(d->list); j = 0; fprev = NULL; fcur = LIST_ROOT; while (fcur) { if (j == a) { fdel = fcur; if (fprev == NULL) LIST_ROOT = fcur->next; else fprev->next = fcur->next; fcur = fcur->next; LIST_FREE(fdel); CREATE_NAME(Pref, DialogSetupItem)(d); break; } else { fprev = fcur; fcur = fcur->next; } j++; } } #endif static int CREATE_NAME(Pref, DialogMoveSub)(struct CREATE_NAME(Pref, Dialog) *d, int a) { int j, n; struct LIST_TYPE *fcur, *fprev, *next; n = list_store_get_num(d->list); if (a < 0 || a >= n - 1) return -1; j = 0; fprev = NULL; fcur = LIST_ROOT; while (fcur) { if (j == a) { next = fcur->next; if (next == NULL) { break; } else if (fprev == NULL) { LIST_ROOT = next; } else { fprev->next = next; } fcur->next = next->next; next->next = fcur; break; } fprev = fcur; fcur = fcur->next; j++; } CREATE_NAME(Pref, DialogSetupItem)(d); return a; } static void CREATE_NAME(Pref, DialogUp)(GtkWidget *w, gpointer client_data) { struct CREATE_NAME(Pref, Dialog) *d; int a; d = (struct CREATE_NAME(Pref, Dialog) *) client_data; a = list_store_get_selected_index(d->list); a = CREATE_NAME(Pref, DialogMoveSub)(d, a - 1); if (a >= 0) { list_store_select_nth(d->list, a); } } static void CREATE_NAME(Pref, DialogDown)(GtkWidget *w, gpointer client_data) { struct CREATE_NAME(Pref, Dialog) *d; int a; d = (struct CREATE_NAME(Pref, Dialog) *) client_data; a = list_store_get_selected_index(d->list); a = CREATE_NAME(Pref, DialogMoveSub)(d, a); if (a >= 0) { list_store_select_nth(d->list, a + 1); } } static gboolean CREATE_NAME(Pref, ListDefailtCb)(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct CREATE_NAME(Pref, Dialog) *d; int i; d = (struct CREATE_NAME(Pref, Dialog) *) user_data; i = list_store_get_selected_index(d->list); if (i < 0) return FALSE; switch (keyval) { case GDK_KEY_Up: if (state & GDK_SHIFT_MASK) { CREATE_NAME(Pref, DialogUp)(NULL, d); return TRUE; } break; case GDK_KEY_Down: if (state & GDK_SHIFT_MASK) { CREATE_NAME(Pref, DialogDown)(NULL, d); return TRUE; } break; case GDK_KEY_Delete: CREATE_NAME(Pref, DialogRemove)(NULL, d); return TRUE; break; } return FALSE; } static void CREATE_NAME(Pref, ListActivatedCb)(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { struct CREATE_NAME(Pref, Dialog) *d; int i; d = (struct CREATE_NAME(Pref, Dialog) *) user_data; i = list_store_get_selected_index(d->list); if (i < 0) return; CREATE_NAME(Pref, DialogUpdate)(NULL, d); } static gboolean CREATE_NAME(Pref, ListSelCb)(GtkTreeSelection *sel, gpointer user_data) { int a, n; struct CREATE_NAME(Pref, Dialog) *d; d = (struct CREATE_NAME(Pref, Dialog) *) user_data; a = list_store_get_selected_index(d->list); n = list_store_get_num(d->list); gtk_widget_set_sensitive(d->update_b, a >= 0); gtk_widget_set_sensitive(d->del_b, a >= 0); gtk_widget_set_sensitive(d->up_b, a > 0); gtk_widget_set_sensitive(d->down_b, a >= 0 && a < n - 1); return FALSE; } static void CREATE_NAME(Pref, DialogCreateWidgets)(struct CREATE_NAME(Pref, Dialog) *d, GtkWidget *win_box, int n, n_list_store * list) { GtkWidget *w, *hbox, *vbox, *swin; GtkTreeSelection *sel; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); w = list_store_create(n, list); d->list = w; g_signal_connect(d->list, "row-activated", G_CALLBACK(CREATE_NAME(Pref, ListActivatedCb)), d); add_event_key(d->list, G_CALLBACK(CREATE_NAME(Pref, ListDefailtCb)), NULL, d); gtk_container_add(GTK_CONTAINER(swin), w); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); g_signal_connect(sel, "changed", G_CALLBACK(CREATE_NAME(Pref, ListSelCb)), d); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), swin); if (win_box) { gtk_box_pack_start(GTK_BOX(win_box), w, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox), win_box, TRUE, TRUE, 4); } else { gtk_box_pack_start(GTK_BOX(hbox), w, TRUE, TRUE, 4); } vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w= gtk_button_new_with_mnemonic(_("_Add")); set_button_icon(w, "list-add"); g_signal_connect(w, "clicked", G_CALLBACK(CREATE_NAME(Pref, DialogAdd)), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_button_new_with_mnemonic(_("_Preferences")); set_button_icon(w, "preferences-system"); g_signal_connect(w, "clicked", G_CALLBACK(CREATE_NAME(Pref, DialogUpdate)), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->update_b = w; w = gtk_button_new_with_mnemonic(_("_Remove")); set_button_icon(w, "list-remove"); g_signal_connect(w, "clicked", G_CALLBACK(CREATE_NAME(Pref, DialogRemove)), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->del_b = w; w = gtk_button_new_with_mnemonic(_("_Down")); set_button_icon(w, "go-down"); g_signal_connect(w, "clicked", G_CALLBACK(CREATE_NAME(Pref, DialogDown)), d); gtk_box_pack_end(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->down_b = w; w = gtk_button_new_with_mnemonic(_("_Up")); set_button_icon(w, "go-up"); g_signal_connect(w, "clicked", G_CALLBACK(CREATE_NAME(Pref, DialogUp)), d); gtk_box_pack_end(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->up_b = w; gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); d->show_cancel = FALSE; d->ok_button = _("_Close"); } #undef LIST_TYPE #undef LIST_ROOT #undef LIST_FREE #undef LIST_INIT #undef SET_DIALOG #undef CREATE_NAME #undef HAVE_UPDATE_FUNC ngraph-gtk-6.09.05/src/gtk/x11opt.c0000644000175000017500000013560414142161773013551 00000000000000/* * $Id: x11opt.c,v 1.81 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include "object.h" #include "ioutil.h" #include "nstring.h" #include "nconfig.h" #include "odraw.h" #include "oaxis.h" #include "gtk_liststore.h" #include "gtk_subwin.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "gtk_presettings.h" #include "x11gui.h" #include "x11dialg.h" #include "ox11menu.h" #include "x11menu.h" #include "x11file.h" #include "x11graph.h" #include "x11view.h" #include "x11lgnd.h" #include "x11opt.h" #include "x11commn.h" #include "x11cood.h" #include "x11info.h" #define MESSAGE_BUF_SIZE 4096 #define WIN_SIZE_MIN 100 #define WIN_SIZE_MAX 2048 #define GRID_MAX 1000 static void DefaultDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct DefaultDialog *d; GtkWidget *w; d = (struct DefaultDialog *) data; if (makewidget) { w = gtk_check_button_new_with_mnemonic(_("_Viewer")); d->viewer = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); w = gtk_check_button_new_with_mnemonic(_("_External Viewer")); d->external_viewer = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); w = gtk_check_button_new_with_mnemonic(_("_Font aliases")); d->fonts = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); w = gtk_check_button_new_with_mnemonic(_("_Add-in Script")); d->addin_script = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); w = gtk_check_button_new_with_mnemonic(_("_Miscellaneous")); d->misc = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->viewer), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->external_viewer), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->addin_script), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->misc), FALSE); } static int save_config(int type) { if (!CheckIniFile()) { return 1; } if (type & SAVE_CONFIG_TYPE_X11MENU) { menu_save_config(type); } if (type & SAVE_CONFIG_TYPE_FONTS) { gra2cairo_save_config(); } return 0; } static void DefaultDialogClose(GtkWidget *win, void *data) { struct DefaultDialog *d; unsigned int i; int ret, type; struct { GtkWidget *btn; enum SAVE_CONFIG_TYPE type; } btns[] = { {NULL, SAVE_CONFIG_TYPE_VIEWER}, {NULL, SAVE_CONFIG_TYPE_ADDIN_SCRIPT}, {NULL, SAVE_CONFIG_TYPE_MISC}, {NULL, SAVE_CONFIG_TYPE_EXTERNAL_VIEWER}, {NULL, SAVE_CONFIG_TYPE_FONTS}, }; d = (struct DefaultDialog *) data; if (d->ret != IDOK) return; ret = d->ret; d->ret = IDLOOP; btns[0].btn = d->viewer; btns[1].btn = d->addin_script; btns[2].btn = d->misc; btns[3].btn = d->external_viewer; btns[4].btn = d->fonts; type = 0; for (i = 0; i < sizeof(btns) / sizeof(*btns); i++) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btns[i].btn))) { type |= btns[i].type; } } if (save_config(type)) { d->ret = ret; return; } d->ret = ret; } void DefaultDialog(struct DefaultDialog *data) { data->SetupWindow = DefaultDialogSetup; data->CloseWindow = DefaultDialogClose; } static void active_script_changed(GtkComboBox *widget, gpointer user_data) { struct SetScriptDialog *d; struct script *addin; int i, n; d = (struct SetScriptDialog *) user_data; n = gtk_combo_box_get_active(widget); if (n < 1) { gtk_entry_set_text(GTK_ENTRY(d->name), ""); gtk_entry_set_text(GTK_ENTRY(d->script), ""); gtk_entry_set_text(GTK_ENTRY(d->option), ""); gtk_entry_set_text(GTK_ENTRY(d->description), ""); return; } addin = Menulocal.addin_list; for (i = 0; i < n - 1; i++) { if (addin == NULL) { return; } addin = addin->next; } gtk_entry_set_text(GTK_ENTRY(d->name), CHK_STR(addin->name)); gtk_entry_set_text(GTK_ENTRY(d->script), CHK_STR(addin->script)); gtk_entry_set_text(GTK_ENTRY(d->option), CHK_STR(addin->option)); gtk_entry_set_text(GTK_ENTRY(d->description), CHK_STR(addin->description)); return; } static void remove_char(char *str, int c) { int i, j, n; if (str == NULL) { return; } n = strlen(str); for (i = 0; i < n; i++) { if (str[i] == c) { for (j = i; j < n; j++) { str[j] = str[j + 1]; } n--; } } } static void SetScriptDialogSetupItem(GtkWidget *w, struct SetScriptDialog *d) { struct script *addin; combo_box_clear(d->addins); combo_box_append_text(d->addins, "Custom"); if (Menulocal.addin_list == NULL) { set_widget_sensitivity_with_label(d->addins, FALSE); } else { set_widget_sensitivity_with_label(d->addins, TRUE); for (addin = Menulocal.addin_list; addin; addin = addin->next) { char *title; title = g_strdup(addin->name); if (title) { remove_char(title, '_'); combo_box_append_text(d->addins, title); g_free(title); } } active_script_changed(GTK_COMBO_BOX(d->addins), d); } if (d->Script->name) { combo_box_set_active(d->addins, 0); gtk_entry_set_text(GTK_ENTRY(d->name), CHK_STR(d->Script->name)); gtk_entry_set_text(GTK_ENTRY(d->script), CHK_STR(d->Script->script)); gtk_entry_set_text(GTK_ENTRY(d->option), CHK_STR(d->Script->option)); gtk_entry_set_text(GTK_ENTRY(d->description), CHK_STR(d->Script->description)); } else { combo_box_set_active(d->addins, 1); } } static void SetScriptDialogBrowse(GtkEntry *w, GtkEntryIconPosition icon_pos, GdkEvent *event, gpointer user_data) { char *file; if (nGetOpenFileName(TopLevel, _("Add-in Script"), "nsc", NULL, NULL, &file, TRUE, FALSE) == IDOK) { entry_set_filename(GTK_WIDGET(w), file); } g_free(file); } static void SetScriptDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct SetScriptDialog *d; d = (struct SetScriptDialog *) data; if (makewidget) { GtkWidget *w, *table; int i; table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Add-in:"), TRUE, i++); g_signal_connect(w, "changed", G_CALLBACK(active_script_changed), d); d->addins = w; w = create_text_entry(FALSE, TRUE); add_widget_to_table(table, w, _("_Name:"), TRUE, i++); d->name = w; w = create_file_entry_with_cb(G_CALLBACK(SetScriptDialogBrowse), NULL); add_widget_to_table(table, w, _("_Script file:"), TRUE, i++); d->script = w; w = create_text_entry(FALSE, TRUE); add_widget_to_table(table, w, _("_Option:"), TRUE, i++); d->option = w; w = create_text_entry(FALSE, TRUE); add_widget_to_table(table, w, _("_Description:"), TRUE, i++); d->description = w; gtk_box_pack_start(GTK_BOX(d->vbox), table, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } SetScriptDialogSetupItem(wi, d); } static int set_scrpt_option(GtkWidget *entry, char **opt, char *msg) { const char *buf; char *buf2; buf = gtk_entry_get_text(GTK_ENTRY(entry)); if (msg && strlen(buf) == 0) { message_box(NULL, msg, NULL, RESPONS_OK); return 1; } buf2 = g_strdup(buf); if (buf2) { g_free(*opt); *opt = buf2; } return 0; } static int set_scrpt_file(GtkWidget *entry, char **opt, char *msg) { char *buf; buf = entry_get_filename(entry); if (buf == NULL) { return 1; } if (msg && strlen(buf) == 0) { message_box(NULL, msg, NULL, RESPONS_OK); g_free(buf); return 1; } g_free(*opt); *opt = buf; return 0; } static void SetScriptDialogClose(GtkWidget *w, void *data) { int ret; struct SetScriptDialog *d; d = (struct SetScriptDialog *) data; if (d->ret != IDOK) return; ret = d->ret; d->ret = IDLOOP; if (set_scrpt_option(d->name, &(d->Script->name), _("Please specify script name."))) { return; } if (set_scrpt_file(d->script, &(d->Script->script), _("Please specify script file name."))) { return; } if (set_scrpt_option(d->option, &(d->Script->option), NULL)) { return; } if (set_scrpt_option(d->description, &(d->Script->description), _("Please specify script description."))) { return; } d->ret = ret; } void SetScriptDialog(struct SetScriptDialog *data, struct script *sc) { data->SetupWindow = SetScriptDialogSetup; data->CloseWindow = SetScriptDialogClose; data->Script = sc; } static void PrefScriptDialogSetupItem(struct PrefScriptDialog *d) { struct script *fcur; GtkTreeIter iter; list_store_clear(d->list); fcur = Menulocal.scriptroot; while (fcur) { list_store_append(d->list, &iter); list_store_set_string(d->list, &iter, 0, fcur->name); list_store_set_string(d->list, &iter, 1, fcur->script); list_store_set_string(d->list, &iter, 2, fcur->description); fcur = fcur->next; } } static void script_free(struct script *fdel) { g_free(fdel->name); g_free(fdel->script); g_free(fdel->description); g_free(fdel->option); g_free(fdel); } static void script_init(struct script *fnew) { fnew->next = NULL; fnew->name = NULL; fnew->script = NULL; fnew->option = NULL; fnew->description = NULL; } #define LIST_TYPE script #define LIST_ROOT Menulocal.scriptroot #define SET_DIALOG DlgSetScript #define LIST_FREE script_free #define LIST_INIT script_init #define CREATE_NAME(a, c) a ## Script ## c #include "x11opt_proto.h" static void PrefScriptDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct PrefScriptDialog *d; n_list_store list[] = { {N_("name"), G_TYPE_STRING, TRUE, FALSE, NULL}, {N_("file"), G_TYPE_STRING, TRUE, FALSE, NULL}, {N_("description"), G_TYPE_STRING, TRUE, FALSE, NULL}, }; d = (struct PrefScriptDialog *) data; if (makewidget) { gtk_dialog_add_button(GTK_DIALOG(wi), _("_Save"), IDSAVE); PrefScriptDialogCreateWidgets(d, NULL, sizeof(list) / sizeof(*list), list); gtk_window_set_default_size(GTK_WINDOW(wi), 400, 300); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } PrefScriptDialogSetupItem(d); } static void PrefScriptDialogClose(GtkWidget *w, void *data) { struct PrefScriptDialog *d; d = (struct PrefScriptDialog *) data; switch (d->ret) { case IDSAVE: save_config(SAVE_CONFIG_TYPE_ADDIN_SCRIPT); /* fall through */ case IDOK: create_addin_menu(); break; } } void PrefScriptDialog(struct PrefScriptDialog *data) { data->SetupWindow = PrefScriptDialogSetup; data->CloseWindow = PrefScriptDialogClose; } static void FontSettingDialogSetupItem(GtkWidget *w, struct FontSettingDialog *d) { gtk_entry_set_text(GTK_ENTRY(d->alias), CHK_STR(d->alias_str)); gtk_editable_set_editable(GTK_EDITABLE(d->alias), ! d->is_update); if (d->font_str) { char *tmp; tmp = g_strdup_printf("%s, 16", d->font_str); gtk_font_chooser_set_font(GTK_FONT_CHOOSER(d->font_b), tmp); g_free(tmp); } list_store_clear(d->list); if (d->alternative_str) { GtkTreeIter iter; gchar **ary; int i; ary = g_strsplit(d->alternative_str, ",", 0); for (i = 0; ary[i]; i++) { list_store_append(d->list, &iter); list_store_set_string(d->list, &iter, 0, ary[i]); } g_strfreev(ary); } d->alias_str = NULL; d->font_str = NULL; d->alternative_str = NULL; } static gboolean AlternativeFontListSelCb(GtkTreeSelection *sel, gpointer user_data) { int a, n; struct FontSettingDialog *d; d = (struct FontSettingDialog *) user_data; a = list_store_get_selected_index(d->list); n = list_store_get_num(d->list); gtk_widget_set_sensitive(d->del_b, a >= 0); gtk_widget_set_sensitive(d->up_b, a > 0); gtk_widget_set_sensitive(d->down_b, a >= 0 && a < n - 1); return FALSE; } static gchar * get_font_family(const gchar *font_name) { gchar *ptr; const gchar *family; PangoFontDescription *pdesc; pdesc = pango_font_description_from_string(font_name); family = pango_font_description_get_family(pdesc); if (family == NULL) { return NULL; } ptr = g_strdup(family); pango_font_description_free(pdesc); return ptr; } static void FontSettingDialogAddAlternative(GtkWidget *w, gpointer client_data) { struct FontSettingDialog *d; GtkWidget *dialog; d = (struct FontSettingDialog *) client_data; dialog = gtk_font_chooser_dialog_new(_("Alternative font"), NULL); if (ndialog_run(dialog) != GTK_RESPONSE_CANCEL) { PangoFontFamily *family; GtkTreeIter iter; family = gtk_font_chooser_get_font_family(GTK_FONT_CHOOSER(dialog)); if (family) { const gchar *font_name; font_name = pango_font_family_get_name(family); list_store_append(d->list, &iter); list_store_set_string(d->list, &iter, 0, font_name); } } gtk_widget_destroy (dialog); } static void FontSettingDialogRemoveAlternative(GtkWidget *w, gpointer client_data) { struct FontSettingDialog *d; GtkTreeIter iter; d = (struct FontSettingDialog *) client_data; if (list_store_get_selected_iter(d->list, &iter)) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(d->list)); gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } } static void FontSettingDialogDownAlternative(GtkWidget *wi, gpointer data) { struct FontSettingDialog *d; GtkTreeIter iter, next_iter; GtkTreeModel *model; GtkTreeSelection *sel; d = (struct FontSettingDialog *) data; if (! list_store_get_selected_iter(d->list, &iter)) { return; } model = gtk_tree_view_get_model(GTK_TREE_VIEW(d->list)); next_iter = iter; if (! gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &next_iter)) { return; } gtk_list_store_move_after(GTK_LIST_STORE(model), &iter, &next_iter); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); AlternativeFontListSelCb(sel, data); } static void FontSettingDialogUpAlternative(GtkWidget *wi, gpointer data) { struct FontSettingDialog *d; GtkTreeIter iter, prev_iter; GtkTreeModel *model; GtkTreePath *path; GtkTreeSelection *sel; d = (struct FontSettingDialog *) data; if (! list_store_get_selected_iter(d->list, &iter)) { return; } model = gtk_tree_view_get_model(GTK_TREE_VIEW(d->list)); path = gtk_tree_model_get_path(GTK_TREE_MODEL(model), &iter); if (gtk_tree_path_prev(path)) { gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &prev_iter, path); gtk_list_store_move_before(GTK_LIST_STORE(model), &iter, &prev_iter); } gtk_tree_path_free(path); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); AlternativeFontListSelCb(sel, data); } static void FontSettingDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FontSettingDialog *d; d = (struct FontSettingDialog *) data; if (makewidget) { GtkWidget *w, *hbox, *vbox, *table, *frame, *swin; GtkTreeSelection *sel; n_list_store list[] = { {N_("Font name"), G_TYPE_STRING, TRUE, FALSE, NULL}, }; int j; table = gtk_grid_new(); j = 0; w = gtk_entry_new(); add_widget_to_table(table, w, _("_Alias:"), TRUE, j++); d->alias = w; w = gtk_font_button_new(); gtk_font_button_set_show_size(GTK_FONT_BUTTON(w), FALSE); gtk_font_button_set_show_style(GTK_FONT_BUTTON(w), FALSE); add_widget_to_table(table, w, _("_Font:"), TRUE, j++); d->font_b = w; gtk_box_pack_start(GTK_BOX(d->vbox), table, FALSE, FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); w = list_store_create(sizeof(list) / sizeof(*list), list); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(w), TRUE); d->list = w; gtk_container_add(GTK_CONTAINER(swin), w); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); g_signal_connect(sel, "changed", G_CALLBACK(AlternativeFontListSelCb), d); gtk_box_pack_start(GTK_BOX(hbox), swin, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w= gtk_button_new_with_mnemonic(_("_Add")); set_button_icon(w, "list-add"); g_signal_connect(w, "clicked", G_CALLBACK(FontSettingDialogAddAlternative), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_button_new_with_mnemonic(_("_Remove")); set_button_icon(w, "list-remove"); g_signal_connect(w, "clicked", G_CALLBACK(FontSettingDialogRemoveAlternative), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->del_b = w; w = gtk_button_new_with_mnemonic(_("_Down")); set_button_icon(w, "go-down"); g_signal_connect(w, "clicked", G_CALLBACK(FontSettingDialogDownAlternative), d); gtk_box_pack_end(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->down_b = w; w = gtk_button_new_with_mnemonic(_("_Up")); set_button_icon(w, "go-up"); g_signal_connect(w, "clicked", G_CALLBACK(FontSettingDialogUpAlternative), d); gtk_box_pack_end(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); d->up_b = w; gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 4); frame = gtk_frame_new(_("Alternative fonts")); gtk_container_add(GTK_CONTAINER(frame), hbox); gtk_box_pack_start(GTK_BOX(d->vbox), frame, TRUE, TRUE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } FontSettingDialogSetupItem(wi, d); } static char * get_font_alias(struct FontSettingDialog *d) { const char *alias; char *tmp, *ptr; alias = gtk_entry_get_text(GTK_ENTRY(d->alias)); tmp = g_strdup(alias); if (tmp == NULL) return NULL; g_strstrip(tmp); for (ptr = tmp; *ptr != '\0'; ptr++) { if (*ptr == '\t') *ptr = ' '; } if (tmp[0] == '\0') { g_free(tmp); tmp = NULL; } return tmp; } static void FontSettingDialogClose(GtkWidget *wi, void *data) { struct FontSettingDialog *d; gchar *alias, *family, *font; gchar *font_name; struct fontmap *fmap; GString *alt; GtkTreeIter iter; d = (struct FontSettingDialog *) data; if (d->ret == IDCANCEL) { return; } alias = get_font_alias(d); if (alias == NULL) { if (! d->is_update) { message_box(d->widget, _("Please specify a new alias name."), NULL, RESPONS_OK); } d->ret = IDLOOP; return; } fmap = gra2cairo_get_fontmap(alias); if (fmap && ! d->is_update) { message_box(d->widget, _("Alias name already exists."), NULL, RESPONS_OK); d->ret = IDLOOP; g_free(alias); return; } font_name = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(d->font_b)); if (font_name == NULL) { g_free(alias); return; } family = get_font_family(font_name); g_free(font_name); if (family == NULL) { g_free(alias); return; } if (d->is_update) { gra2cairo_update_fontmap(alias, family); } else { gra2cairo_add_fontmap(alias, family); } g_free(family); if (! list_store_get_iter_first(d->list, &iter)) { gra2cairo_set_alternative_font(alias, NULL); g_free(alias); return; } font = list_store_get_string(d->list, &iter, 0); alt = g_string_new(font); g_free(font); while (list_store_iter_next(d->list, &iter)) { font = list_store_get_string(d->list, &iter, 0); g_string_append_printf(alt, ",%s", font); g_free(font); } gra2cairo_set_alternative_font(alias, alt->str); g_string_free(alt, TRUE); g_free(alias); } void FontSettingDialog(struct FontSettingDialog *d, const char *alias, const char *font, const char *alternative) { d->SetupWindow = FontSettingDialogSetup; d->CloseWindow = FontSettingDialogClose; d->alias_str = alias; d->font_str = font; d->alternative_str = alternative; d->is_update = (alias != NULL); } static void PrefFontDialogSetupItem(struct PrefFontDialog *d) { struct fontmap *fcur; GtkTreeIter iter; list_store_clear(d->list); fcur = Gra2cairoConf->fontmap_list_root; while (fcur) { list_store_append(d->list, &iter); list_store_set_string(d->list, &iter, 0, fcur->fontalias); list_store_set_string(d->list, &iter, 1, fcur->fontname); list_store_set_string(d->list, &iter, 2, fcur->alternative); fcur = fcur->next; } } static void PrefFontDialogUpdate(GtkWidget *w, gpointer client_data) { struct PrefFontDialog *d; struct fontmap *fcur; char *fontalias; int ret; d = (struct PrefFontDialog *) client_data; fontalias = list_store_get_selected_string(d->list, 0); if (fontalias == NULL) return; fcur = gra2cairo_get_fontmap(fontalias); g_free(fontalias); if (fcur == NULL) return; FontSettingDialog(&DlgFontSetting, fcur->fontalias, fcur->fontname, fcur->alternative); ret = DialogExecute(d->widget, &DlgFontSetting); if (ret == IDOK) { PrefFontDialogSetupItem(d); } } static void PrefFontDialogRemove(GtkWidget *w, gpointer client_data) { struct PrefFontDialog *d; char *fontalias; d = (struct PrefFontDialog *) client_data; fontalias = list_store_get_selected_string(d->list, 0); gra2cairo_remove_fontmap(fontalias); g_free(fontalias); PrefFontDialogSetupItem(d); } static void PrefFontDialogAdd(GtkWidget *w, gpointer client_data) { struct PrefFontDialog *d; int ret; d = (struct PrefFontDialog *) client_data; FontSettingDialog(&DlgFontSetting, NULL, NULL, NULL); ret = DialogExecute(d->widget, &DlgFontSetting); if (ret == IDOK) { PrefFontDialogSetupItem(d); } } #define HAVE_UPDATE_FUNC #define LIST_TYPE fontmap #define LIST_ROOT Gra2cairoConf->fontmap_list_root #define CREATE_NAME(a, c) a ## Font ## c #include "x11opt_proto.h" static void PrefFontDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct PrefFontDialog *d; n_list_store list[] = { {N_("alias"), G_TYPE_STRING, TRUE, FALSE, NULL}, {N_("name"), G_TYPE_STRING, TRUE, FALSE, NULL}, {N_("alternative fonts"), G_TYPE_STRING, TRUE, FALSE, NULL}, }; d = (struct PrefFontDialog *) data; if (makewidget) { GtkWidget *vbox; gtk_dialog_add_button(GTK_DIALOG(wi), _("_Save"), IDSAVE); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); PrefFontDialogCreateWidgets(d, vbox, sizeof(list) / sizeof(*list), list); gtk_window_set_default_size(GTK_WINDOW(wi), 550, 300); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } PrefFontDialogSetupItem(d); } static void PrefFontDialogClose(GtkWidget *w, void *data) { struct PrefFontDialog *d; d = (struct PrefFontDialog *) data; presetting_set_fonts(); if (d->ret == IDSAVE) { save_config(SAVE_CONFIG_TYPE_FONTS); } } void PrefFontDialog(struct PrefFontDialog *data) { data->SetupWindow = PrefFontDialogSetup; data->CloseWindow = PrefFontDialogClose; } static void MiscDialogSetupItem(GtkWidget *w, struct MiscDialog *d) { if (Menulocal.editor) gtk_entry_set_text(GTK_ENTRY(d->editor), Menulocal.editor); if (Menulocal.help_browser) gtk_entry_set_text(GTK_ENTRY(d->help_browser), Menulocal.help_browser); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->directory), Menulocal.changedirectory); combo_box_set_active(d->path, Menulocal.savepath); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->datafile), Menulocal.savewithdata); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->mergefile), Menulocal.savewithmerge); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->expand), Menulocal.expand); if (Menulocal.expanddir) gtk_entry_set_text(GTK_ENTRY(d->expanddir), Menulocal.expanddir); combo_box_set_active(d->loadpath, Menulocal.loadpath); spin_entry_set_val(d->hist_size, Menulocal.hist_size); spin_entry_set_val(d->info_size, Menulocal.info_size); spin_entry_set_val(d->data_head_lines, Menulocal.data_head_lines); if (Menulocal.coordwin_font) { gtk_font_chooser_set_font(GTK_FONT_CHOOSER(d->coordwin_font), Menulocal.coordwin_font); } if (Menulocal.infowin_font) { gtk_font_chooser_set_font(GTK_FONT_CHOOSER(d->infowin_font), Menulocal.infowin_font); } if (Menulocal.file_preview_font) { gtk_font_chooser_set_font(GTK_FONT_CHOOSER(d->file_preview_font), Menulocal.file_preview_font); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_opacity), Menulocal.use_opacity); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->select_data), Menulocal.select_data); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_custom_palette), Menulocal.use_custom_palette); arraycpy(&(d->tmp_palette), &(Menulocal.custom_palette)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_dark_theme), Menulocal.use_dark_theme); if (Menulocal.source_style_id) { GtkSourceStyleSchemeManager *sman; GtkSourceStyleScheme *style; sman = gtk_source_style_scheme_manager_get_default(); style = gtk_source_style_scheme_manager_get_scheme(sman, Menulocal.source_style_id); gtk_source_style_scheme_chooser_set_style_scheme(GTK_SOURCE_STYLE_SCHEME_CHOOSER(d->source_style), style); } combo_box_set_active(d->decimalsign, Menulocal.default_decimalsign); } static void set_file_in_entry(GtkEntry *w, GtkEntryIconPosition icon_pos, GdkEvent *event, gpointer user_data) { char *file; struct MiscDialog *d; d = (struct MiscDialog *) user_data; if (nGetOpenFileName(d->widget, _("Select program"), NULL, NULL, NULL, &file, TRUE, FALSE) == IDOK) { entry_set_filename(GTK_WIDGET(w), file); } g_free(file); } #define PALETTE_COLUMN 9 static GtkWidget ** create_custom_palette_buttons(struct MiscDialog *d, GtkWidget *box) { struct narray *palette; GdkRGBA *colors; GtkWidget *btn, *bbox, **btns; int i, n; GValue value = G_VALUE_INIT; g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, TRUE); palette = &(d->tmp_palette); n = arraynum(palette); if (n < 1) { return NULL; } btns = g_malloc(sizeof(*btns) * (n + 1)); if (btns == NULL) { return NULL; } colors = arraydata(palette); bbox = NULL; for (i = 0; i < n; i++) { if (i % PALETTE_COLUMN == 0) { if (bbox) { gtk_box_pack_start(GTK_BOX(box), bbox, FALSE, FALSE, 0); } bbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_START); } btn = gtk_color_button_new_with_rgba(colors + i); g_object_set_property(G_OBJECT(btn), "show-editor", &value); gtk_box_pack_start(GTK_BOX(bbox), btn, FALSE, FALSE, 4); btns[i] = btn; } btns[i] = NULL; if (bbox) { gtk_box_pack_start(GTK_BOX(box), bbox, FALSE, FALSE, 0); } return btns; } static void save_custom_palette(struct MiscDialog *d, GtkWidget **btns) { struct narray *palette; GdkRGBA rgba; palette = &(d->tmp_palette); arrayclear(palette); while (*btns) { gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(*btns), &rgba); arrayadd(palette, &rgba); btns++; } } static void edit_custom_palette(GtkWidget *w, gpointer data) { GtkWidget *dialog, *box, **btns; struct MiscDialog *d; gint r; d = data; dialog = gtk_dialog_new_with_buttons(_("custom palette"), GTK_WINDOW(d->widget), GTK_DIALOG_MODAL, _("_OK"), GTK_RESPONSE_ACCEPT, _("_Cancel"), GTK_RESPONSE_REJECT, NULL); box = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); btns = create_custom_palette_buttons(d, box); if (btns == NULL) { gtk_widget_destroy(dialog); return; } gtk_widget_show_all(dialog); r = gtk_dialog_run(GTK_DIALOG(dialog)); if (r == GTK_RESPONSE_ACCEPT) { save_custom_palette(d, btns); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_custom_palette), TRUE); } g_free(btns); gtk_widget_destroy(dialog); } static void MiscDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct MiscDialog *d; d = (struct MiscDialog *) data; if (makewidget) { GtkWidget *w, *hbox2, *vbox2, *frame, *table; int i, j; arrayinit(&(d->tmp_palette), sizeof(GdkRGBA)); gtk_dialog_add_button(GTK_DIALOG(wi), _("_Save"), IDSAVE); hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); frame = gtk_frame_new(_("External programs")); table = gtk_grid_new(); i = 0; w = create_file_entry_with_cb(G_CALLBACK(set_file_in_entry), d); add_widget_to_table(table, w, _("_Editor:"), TRUE, i++); d->editor = w; w = create_file_entry_with_cb(G_CALLBACK(set_file_in_entry), d); add_widget_to_table(table, w, _("_Help browser:"), TRUE, i++); d->help_browser = w; gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(vbox2), frame, FALSE, FALSE, 4); frame = gtk_frame_new(NULL); gtk_frame_set_label(GTK_FRAME(frame), _("Save graph")); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Path:"), FALSE, i++); for (j = 0; pathchar[j]; j++) { combo_box_append_text(w, _(pathchar[j])); } d->path = w; w = gtk_check_button_new_with_mnemonic(_("include _Data file")); d->datafile = w; add_widget_to_table(table, w, NULL, FALSE, i++); w = gtk_check_button_new_with_mnemonic(_("include _Merge file")); d->mergefile = w; add_widget_to_table(table, w, NULL, FALSE, i++); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(vbox2), frame, FALSE, FALSE, 4); frame = gtk_frame_new(NULL); gtk_frame_set_label(GTK_FRAME(frame), _("Load graph")); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Path:"), FALSE, i++); for (j = 0; LoadPathStr[j]; j++) { combo_box_append_text(w, _(LoadPathStr[j])); } d->loadpath = w; w = gtk_check_button_new_with_mnemonic(_("_Expand include file")); add_widget_to_table(table, w, NULL, FALSE, i++); d->expand = w; w = create_text_entry(FALSE, TRUE); add_widget_to_table(table, w, _("_Expand directory:"), TRUE, i++); d->expanddir = w; gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(vbox2), frame, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 4); frame = gtk_frame_new(_("Size")); table = gtk_grid_new(); i = 0; w = create_spin_entry(1, HIST_SIZE_MAX, 1, FALSE, TRUE); add_widget_to_table(table, w, _("_Size of completion history:"), FALSE, i++); d->hist_size = w; w = create_spin_entry(1, INFOWIN_SIZE_MAX, 1, FALSE, TRUE); add_widget_to_table(table, w, _("_Length of information view:"), FALSE, i++); d->info_size = w; w = create_spin_entry(0, HIST_SIZE_MAX, 1, FALSE, TRUE); add_widget_to_table(table, w, _("_Length of data preview:"), FALSE, i++); d->data_head_lines = w; gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(vbox2), frame, FALSE, FALSE, 4); vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); frame = gtk_frame_new(_("Font")); table = gtk_grid_new(); i = 0; w = gtk_font_button_new(); add_widget_to_table(table, w, _("_Coordinate view:"), FALSE, i++); d->coordwin_font = w; w = gtk_font_button_new(); add_widget_to_table(table, w, _("_Information view:"), FALSE, i++); d->infowin_font = w; w = gtk_font_button_new(); add_widget_to_table(table, w, _("data _Preview:"), FALSE, i++); d->file_preview_font = w; gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(vbox2), frame, FALSE, FALSE, 4); frame = gtk_frame_new(_("Miscellaneous")); table = gtk_grid_new(); i = 0; w = gtk_check_button_new_with_mnemonic(_("_Check \"change current directory\"")); add_widget_to_table(table, w, NULL, FALSE, i++); d->directory = w; w = gtk_check_button_new_with_mnemonic(_("_Use opacity")); add_widget_to_table(table, w, NULL, FALSE, i++); d->use_opacity = w; w = gtk_check_button_new_with_mnemonic(_("_Show select data dialog on exporting")); add_widget_to_table(table, w, NULL, FALSE, i++); d->select_data = w; w = gtk_check_button_new_with_mnemonic(_("use custom _Palette")); add_widget_to_table(table, w, NULL, FALSE, i++); d->use_custom_palette = w; w = gtk_button_new_with_mnemonic(_("_Edit custom palette")); g_signal_connect(w, "clicked", G_CALLBACK(edit_custom_palette), d); add_widget_to_table(table, w, NULL, FALSE, i++); w = gtk_source_style_scheme_chooser_button_new(); add_widget_to_table(table, w, _("_Source style:"), FALSE, i++); d->source_style = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Default decimalsign:"), FALSE, i++); for (j = 0; decimalsign_char[j]; j++) { combo_box_append_text(w, _(decimalsign_char[j])); } d->decimalsign = w; w = gtk_check_button_new_with_mnemonic(_("use _Dark theme")); add_widget_to_table(table, w, NULL, FALSE, i++); d->use_dark_theme = w; gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(vbox2), frame, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox2), vbox2, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox2, TRUE, TRUE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } MiscDialogSetupItem(wi, d); } static int set_font(char **cfg, GtkWidget *btn) { char *buf; buf = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(btn)); if (buf && *cfg) { if (strcmp(*cfg, buf)) { g_free(*cfg); } else { g_free(buf); buf = NULL; } } if (buf) { *cfg = buf; return 1; } return 0; } static void set_program_name(GtkWidget *entry, char **prm) { const char *buf; char *buf2; buf = gtk_entry_get_text(GTK_ENTRY(entry)); if (buf) { buf2 = g_strdup(buf); if (buf2) { changefilename(buf2); g_free(*prm); } *prm = buf2; } else { g_free(*prm); *prm = NULL; } } static void MiscDialogClose(GtkWidget *w, void *data) { struct MiscDialog *d; int a, ret; const char *buf, *source_style_id; char *buf2; GtkSourceStyleScheme *source_style; d = (struct MiscDialog *) data; if (d->ret != IDOK && d->ret != IDSAVE) return; ret = d->ret; d->ret = IDLOOP; set_program_name(d->editor, &Menulocal.editor); set_program_name(d->help_browser, &Menulocal.help_browser); Menulocal.changedirectory = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->directory)); a = combo_box_get_active(d->path); if (a >= 0) { Menulocal.savepath = a; } Menulocal.savewithdata = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->datafile)); Menulocal.savewithmerge = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->mergefile)); Menulocal.expand = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->expand)); buf = gtk_entry_get_text(GTK_ENTRY(d->expanddir)); if (buf) { buf2 = g_strdup(buf); if (buf2) { g_free(Menulocal.expanddir); Menulocal.expanddir = buf2; } } Menulocal.loadpath = combo_box_get_active(d->loadpath); a = spin_entry_get_val(d->hist_size); if (a <= HIST_SIZE_MAX && a > 0) Menulocal.hist_size = a; a = spin_entry_get_val(d->info_size); if (a <= INFOWIN_SIZE_MAX && a > 0) Menulocal.info_size = a; a = spin_entry_get_val(d->data_head_lines); putobj(d->Obj, "data_head_lines", d->Id, &a); if (set_font(&Menulocal.coordwin_font, d->coordwin_font)) { CoordWinSetFont(Menulocal.coordwin_font); } if (set_font(&Menulocal.infowin_font, d->infowin_font)) { InfoWinSetFont(Menulocal.infowin_font); } set_font(&Menulocal.file_preview_font, d->file_preview_font); Menulocal.use_opacity = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->use_opacity)); putobj(d->Obj, "use_opacity", d->Id, &Menulocal.use_opacity); Menulocal.select_data = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->select_data)); Menulocal.use_custom_palette = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->use_custom_palette)); if (arraycmp(&(Menulocal.custom_palette), &(d->tmp_palette))) { arraycpy(&(Menulocal.custom_palette), &(d->tmp_palette)); } arraydel(&(d->tmp_palette)); menu_use_dark_theme_set(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->use_dark_theme))); d->ret = ret; source_style = gtk_source_style_scheme_chooser_get_style_scheme(GTK_SOURCE_STYLE_SCHEME_CHOOSER(d->source_style)); source_style_id = gtk_source_style_scheme_get_id(source_style); if (g_strcmp0(Menulocal.source_style_id, source_style_id)) { if (Menulocal.source_style_id) { g_free(Menulocal.source_style_id); } Menulocal.source_style_id = g_strdup(source_style_id); } Menulocal.default_decimalsign = combo_box_get_active(d->decimalsign); gra_set_default_decimalsign(get_gra_decimalsign_type(Menulocal.default_decimalsign)); if (d->ret == IDSAVE) { save_config(SAVE_CONFIG_TYPE_MISC); } } void MiscDialog(struct MiscDialog *data, struct objlist *obj, int id) { data->SetupWindow = MiscDialogSetup; data->CloseWindow = MiscDialogClose; data->Obj = obj; data->Id = id; } static void ExViewerDialogSetupItem(GtkWidget *w, struct ExViewerDialog *d) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->use_external), Menulocal.exwin_use_external); gtk_range_set_value(GTK_RANGE(d->dpi), Menulocal.exwindpi); spin_entry_set_val(d->width, Menulocal.exwinwidth); spin_entry_set_val(d->height, Menulocal.exwinheight); } static void use_external_toggled(GtkToggleButton *togglebutton, gpointer user_data) { gboolean state; struct ExViewerDialog *d; d = (struct ExViewerDialog *) user_data; state = ! gtk_toggle_button_get_active(togglebutton); set_widget_sensitivity_with_label(d->dpi, state); set_widget_sensitivity_with_label(d->width, state); set_widget_sensitivity_with_label(d->height, state); } static void ExViewerDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct ExViewerDialog *d; d = (struct ExViewerDialog *) data; if (makewidget) { GtkWidget *w, *table; int i; gtk_dialog_add_button(GTK_DIALOG(wi), _("_Save"), IDSAVE); table = gtk_grid_new(); i = 0; w = gtk_check_button_new_with_mnemonic(_("use _External previewer")); add_widget_to_table(table, w, NULL, FALSE, i++); g_signal_connect(w, "toggled", G_CALLBACK(use_external_toggled), d); d->use_external = w; w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 20, 620, 1); d->dpi = w; add_widget_to_table(table, w, "_DPI:", TRUE, i++); w = create_spin_entry(WIN_SIZE_MIN, WIN_SIZE_MAX, 1, FALSE, TRUE); add_widget_to_table(table, w, _("Window _Width:"), FALSE, i++); d->width = w; w = create_spin_entry(WIN_SIZE_MIN, WIN_SIZE_MAX, 1, FALSE, TRUE); add_widget_to_table(table, w, _("Window _Height:"), FALSE, i++); d->height = w; gtk_box_pack_start(GTK_BOX(d->vbox), table, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } ExViewerDialogSetupItem(wi, d); } static void ExViewerDialogClose(GtkWidget *w, void *data) { struct ExViewerDialog *d; d = (struct ExViewerDialog *) data; if (d->ret != IDOK && d->ret != IDSAVE) return; Menulocal.exwindpi = gtk_range_get_value(GTK_RANGE(d->dpi)); Menulocal.exwinwidth = spin_entry_get_val(d->width); Menulocal.exwinheight = spin_entry_get_val(d->height); Menulocal.exwin_use_external = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->use_external)); if (d->ret == IDSAVE) { save_config(SAVE_CONFIG_TYPE_EXTERNAL_VIEWER); } } void ExViewerDialog(struct ExViewerDialog *data) { data->SetupWindow = ExViewerDialogSetup; data->CloseWindow = ExViewerDialogClose; } static void ViewerDialogSetupItem(GtkWidget *w, struct ViewerDialog *d) { int a; GdkRGBA color; getobj(d->Obj, "dpi", d->Id, 0, NULL, &(d->dpis)); gtk_range_set_value(GTK_RANGE(d->dpi), d->dpis); getobj(d->Obj, "antialias", d->Id, 0, NULL, &a); combo_box_set_active(d->antialias, a); getobj(d->Obj, "redraw_flag", d->Id, 0, NULL, &a); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->loadfile), a); spin_entry_set_val(d->data_num, Menulocal.redrawf_num); spin_entry_set_val(d->grid, Menulocal.grid); combo_box_set_active(d->fftype, (Menulocal.focus_frame_type == N_LINE_TYPE_SOLID) ? 0 : 1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->preserve_width), Menulocal.preserve_width); color.red = Menulocal.bg_r; color.green = Menulocal.bg_g; color.blue = Menulocal.bg_b; color.alpha = 1; gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(d->bgcol), FALSE); gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(d->bgcol), &color); } static void load_file_toggled(GtkToggleButton *togglebutton, gpointer user_data) { gboolean state; struct ViewerDialog *d; d = (struct ViewerDialog *) user_data; state = gtk_toggle_button_get_active(togglebutton); set_widget_sensitivity_with_label(d->data_num, state); } static void ViewerDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct ViewerDialog *d; d = (struct ViewerDialog *) data; if (makewidget) { GtkWidget *w, *table; int i, j; gtk_dialog_add_button(GTK_DIALOG(wi), _("_Save"), IDSAVE); table = gtk_grid_new(); i = 0; w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 20, 620, 1); d->dpi = w; add_widget_to_table(table, w, "_DPI:", TRUE, i++); w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, FALSE, TRUE); spin_entry_set_range(w, 1, GRID_MAX); add_widget_to_table(table, w, _("_Grid:"), FALSE, i++); d->grid = w; w = create_color_button(wi); add_widget_to_table(table, w, _("_Background Color:"), FALSE, i++); d->bgcol = w; w = combo_box_create(); combo_box_append_text(w, _("solid")); combo_box_append_text(w, _("dot")); add_widget_to_table(table, w, _("_Line attribute of focus frame:"), FALSE, i++); d->fftype = w; w = combo_box_create(); for (j = 0; gra2cairo_antialias_type[j]; j++) { combo_box_append_text(w, _(gra2cairo_antialias_type[j])); } d->antialias = w; add_widget_to_table(table, w, _("_Antialias:"), FALSE, i++); w = gtk_check_button_new_with_mnemonic(_("_Preserve line width and style")); d->preserve_width = w; add_widget_to_table(table, w, NULL, FALSE, i++); w = gtk_check_button_new_with_mnemonic(_("_Load files on redraw")); g_signal_connect(w, "toggled", G_CALLBACK(load_file_toggled), d); d->loadfile = w; add_widget_to_table(table, w, NULL, FALSE, i++); w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Maximum number of data on redraw:"), FALSE, i++); d->data_num = w; gtk_box_pack_start(GTK_BOX(d->vbox), table, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } ViewerDialogSetupItem(wi, d); } static void ViewerDialogClose(GtkWidget *w, void *data) { struct ViewerDialog *d; int ret, dpi, a, bg; GdkRGBA color; d = (struct ViewerDialog *) data; if (d->ret != IDOK && d->ret != IDSAVE) return; ret = d->ret; d->ret = IDLOOP; dpi = gtk_range_get_value(GTK_RANGE(d->dpi)); if (d->dpis != dpi) { if (putobj(d->Obj, "dpi", d->Id, &dpi) == -1) return; d->Clear = TRUE; } a = combo_box_get_active(d->antialias); if (putobj(d->Obj, "antialias", d->Id, &a) == -1) return; Menulocal.antialias = a; a = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->loadfile)); a = a ? TRUE : FALSE; if (putobj(d->Obj, "redraw_flag", d->Id, &a) == -1) return; a = spin_entry_get_val(d->data_num); if (putobj(d->Obj, "redraw_num", d->Id, &a) == -1) return; Menulocal.preserve_width = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->preserve_width)); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(d->bgcol), &color); bg = (Menulocal.bg_r != color.red || Menulocal.bg_g != color.green || Menulocal.bg_b != color.blue); Menulocal.bg_r = color.red; Menulocal.bg_g = color.green; Menulocal.bg_b = color.blue; Menulocal.grid = spin_entry_get_val(d->grid); a = combo_box_get_active(d->fftype); Menulocal.focus_frame_type = ((a == 0) ? N_LINE_TYPE_SOLID : N_LINE_TYPE_DOT); d->ret = ret; if (d->ret == IDSAVE) { save_config(SAVE_CONFIG_TYPE_VIEWER); } if (bg) { update_bg(); UpdateAll2(NULL, TRUE); } } void ViewerDialog(struct ViewerDialog *data, struct objlist *obj, int id) { data->SetupWindow = ViewerDialogSetup; data->CloseWindow = ViewerDialogClose; data->Obj = obj; data->Id = id; data->Clear = FALSE; } static void save_default_axis_config(void) { int n; struct objlist *obj; obj = chkobject("axis"); if (obj == NULL) { return; } n = chkobjlastinst(obj); if (n < 0) { return; } if (CheckIniFile()) { exeobj(obj, "save_config", 0, 0, NULL); } } void CmOptionSaveNgp(void *w, gpointer client_data) { char *ngpfile; char mes[MESSAGE_BUF_SIZE]; int i, path; struct objlist *obj; if (Menulock || Globallock) return; ngpfile = getscriptname("Ngraph.ngp"); if (ngpfile == NULL) return; path = 1; obj = chkobject("data"); if (obj) { for (i = 0; i <= chkobjlastinst(obj); i++) { putobj(obj, "save_path", i, &path); } } obj = chkobject("merge"); if (obj) { for (i = 0; i <= chkobjlastinst(obj); i++) { putobj(obj, "save_path", i, &path); } } if (naccess(ngpfile, 04) == 0) { snprintf(mes, sizeof(mes), _("`%s'\n\nOverwrite existing file?"), ngpfile); if (message_box(NULL, mes, _("Save as Ngraph.ngp"), RESPONS_YESNO) != IDYES) { g_free(ngpfile); return; } } snprintf(mes, sizeof(mes), _("Saving `%.128s'."), ngpfile); SetStatusBar(mes); SaveDrawrable(ngpfile, FALSE, FALSE, FALSE); ResetStatusBar(); menu_default_axis_size(&Menulocal); save_default_axis_config(); g_free(ngpfile); return; } void CmOptionViewer(void *w, gpointer client_data) { int r; if (Menulock || Globallock) return; ViewerDialog(&DlgViewer, Menulocal.obj, 0); r = DialogExecute(TopLevel, &DlgViewer); if (r == IDOK && DlgViewer.Clear) { ChangeDPI(); } } void CmOptionExtViewer(void *w, gpointer client_data) { if (Menulock || Globallock) return; ExViewerDialog(&DlgExViewer); DialogExecute(TopLevel, &DlgExViewer); } void CmOptionPrefFont(void *w, gpointer client_data) { if (Menulock || Globallock) return; PrefFontDialog(&DlgPrefFont); DialogExecute(TopLevel, &DlgPrefFont); } void CmOptionScript(void *w, gpointer client_datavoid) { if (Menulock || Globallock) return; PrefScriptDialog(&DlgPrefScript); DialogExecute(TopLevel, &DlgPrefScript); } void CmOptionMisc(void *w, gpointer client_data) { if (Menulock || Globallock) return; MiscDialog(&DlgMisc, Menulocal.obj, 0); DialogExecute(TopLevel, &DlgMisc); } void CmOptionSaveDefault(void *w, gpointer client_data) { if (Menulock || Globallock) return; DefaultDialog(&DlgDefault); DialogExecute(TopLevel, &DlgDefault); } ngraph-gtk-6.09.05/src/gtk/x11opt.h0000644000175000017500000000240713070106167013543 00000000000000/* * $Id: x11opt.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ void CmOptionViewer(void *w, gpointer client_data); void CmOptionExtViewer(void *w, gpointer client_data); void CmOptionPrefFont(void *w, gpointer client_data); void CmOptionScript(void *w, gpointer client_datavoid); void CmOptionMisc(void *w, gpointer client_data); void CmOptionSaveDefault(void *w, gpointer client_data); void CmOptionSaveNgp(void *w, gpointer client_data); ngraph-gtk-6.09.05/src/gtk/x11parameter.h0000644000175000017500000000043513702004142014710 00000000000000GtkWidget *create_parameter_list(struct SubWin *d); void CmParameterAdd(void *w, gpointer client_data); void CmParameterDelete(void *w, gpointer client_data); void CmParameterUpdate(void *w, gpointer client_data); void ParameterWinUpdate(struct obj_list_data *d, int clear, int draw); ngraph-gtk-6.09.05/src/gtk/x11gui.c0000644000175000017500000007010214002536420013510 00000000000000/* * $Id: x11gui.c,v 1.41 2010-04-01 06:08:23 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include #include #include "object.h" #include "nstring.h" #include "ioutil.h" #include "gtk_widget.h" #include "gtk_combo.h" #include "ox11menu.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "x11commn.h" struct nGetOpenFileData { GtkWidget *widget, *chdir_cb; int ret; char *title; char **init_dir; const char *init_file; int chdir; char *ext; char **file; const char *button; int type; int mustexist; int overwrite; int multi; int changedir; }; static int add_buttons(GtkWidget *dlg, struct narray *array); void set_sensitivity_by_check_instance(GtkWidget *widget, gpointer user_data) { char *name; struct objlist *obj; int n; name = (char *) user_data; obj = chkobject(name); n = chkobjlastinst(obj); gtk_widget_set_sensitive(widget, n > 0); } static void dialog_destroyed_cb(GtkWidget *w, gpointer user_data) { ((struct DialogType *) user_data)->widget = NULL; } int ndialog_run(GtkWidget *dlg) { int lock_state, r; if (dlg == NULL) { return GTK_RESPONSE_CANCEL; } lock_state = DnDLock; r = gtk_dialog_run(GTK_DIALOG(dlg)); DnDLock = lock_state; return r; } int DialogExecute(GtkWidget *parent, void *dialog) { GtkWidget *dlg, *win_ptr; struct DialogType *data; gint res_id, lockstate; #if OSX int menulock; #endif lockstate = DnDLock; DnDLock = TRUE; data = (struct DialogType *) dialog; if (data->widget && (data->parent != parent)) { #if 1 gtk_window_set_transient_for(GTK_WINDOW(data->widget), GTK_WINDOW(parent)); data->parent = parent; #else gtk_widget_destroy(data->widget); reset_event(); data->widget = NULL; #endif } if (data->widget == NULL) { dlg = gtk_dialog_new_with_buttons(_(data->resource), GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, NULL); gtk_window_set_resizable(GTK_WINDOW(dlg), TRUE); g_signal_connect(dlg, "delete-event", G_CALLBACK(gtk_true), data); g_signal_connect(dlg, "destroy", G_CALLBACK(dialog_destroyed_cb), data); data->parent = parent; data->widget = dlg; data->vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); data->show_cancel = TRUE; data->ok_button = _("_OK"); data->SetupWindow(dlg, data, TRUE); gtk_dialog_add_button(GTK_DIALOG(dlg), data->ok_button, GTK_RESPONSE_OK); if (! data->show_cancel) { GtkWidget *btn; btn = gtk_dialog_get_widget_for_response(GTK_DIALOG(dlg), GTK_RESPONSE_CANCEL); gtk_widget_hide(btn); } gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); } else { dlg = data->widget; data->SetupWindow(dlg, data, FALSE); } gtk_widget_hide(dlg); gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); data->widget = dlg; data->ret = IDLOOP; #if OSX menulock = Menulock; Menulock = TRUE; #endif gtk_widget_show(dlg); win_ptr = get_current_window(); set_current_window(dlg); if (data->focus) gtk_widget_grab_focus(data->focus); while (data->ret == IDLOOP) { res_id = ndialog_run(dlg); if (res_id < 0) { switch (res_id) { case GTK_RESPONSE_OK: data->ret = IDOK; break; default: data->ret = IDCANCEL; break; } } else { data->ret = res_id; } if (data->CloseWindow) { data->CloseWindow(dlg, data); } } #if OSX Menulock = menulock; #endif // gtk_widget_destroy(dlg); // data->widget = NULL; set_current_window(win_ptr); gtk_widget_hide(dlg); reset_event(); DnDLock = lockstate; return data->ret; } void message_beep(GtkWidget * parent) { if (parent) { GdkWindow *window; window = gtk_widget_get_window(parent); gdk_window_beep(window); } else { GdkDisplay *disp; disp = gdk_display_get_default(); if (disp) { gdk_display_beep(disp); } } // reset_event(); } static void set_dialog_position(GtkWidget *w, const int *x, const int *y) { if (x == NULL || y == NULL || *x < 0 || *y < 0) return; gtk_window_move(GTK_WINDOW(w), *x, *y); } static void get_dialog_position(GtkWidget *w, int *x, int *y) { if (x == NULL || y == NULL) return; gtk_window_get_position(GTK_WINDOW(w), x, y); if (*x < 0) *x = 0; if (*y < 0) *y = 0; } int message_box(GtkWidget * parent, const char *message, const char *title, int mode) { return markup_message_box(parent, message, title, mode, FALSE); } int markup_message_box(GtkWidget * parent, const char *message, const char *title, int mode, int markup) { GtkWidget *dlg; int data; GtkMessageType dlg_type; GtkButtonsType dlg_button; gint res_id; if (title == NULL) { title = _("Error"); } switch (mode) { case RESPONS_YESNOCANCEL: dlg_button = GTK_BUTTONS_CANCEL; dlg_type = GTK_MESSAGE_QUESTION; break; case RESPONS_YESNO: dlg_button = GTK_BUTTONS_YES_NO; dlg_type = GTK_MESSAGE_QUESTION; break; case RESPONS_ERROR: dlg_button = GTK_BUTTONS_OK; dlg_type = GTK_MESSAGE_ERROR; break; default: dlg_button = GTK_BUTTONS_OK; dlg_type = GTK_MESSAGE_INFO; } if (parent == NULL) parent = get_current_window(); dlg = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, dlg_type, dlg_button, "%.512s", message); if (markup) { gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(dlg), message); } switch (mode) { case RESPONS_YESNOCANCEL: gtk_dialog_add_button(GTK_DIALOG(dlg), _("_No"), GTK_RESPONSE_NO); gtk_dialog_add_button(GTK_DIALOG(dlg), _("_Yes"), GTK_RESPONSE_YES); /* fall through */ case RESPONS_YESNO: gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_YES); break; } gtk_window_set_title(GTK_WINDOW(dlg), title); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); switch (res_id) { case GTK_RESPONSE_OK: data = IDYES; break; case GTK_RESPONSE_YES: data = IDYES; break; case GTK_RESPONSE_NO: data = IDNO; break; case GTK_RESPONSE_CANCEL: data = IDCANCEL; break; default: if ((mode == RESPONS_OK) || (mode == RESPONS_ERROR)) { data = IDOK; } else if (mode == RESPONS_YESNO) { data = IDNO; } else { data = IDCANCEL; } } gtk_widget_destroy(dlg); reset_event(); return data; } int DialogInput(GtkWidget * parent, const char *title, const char *mes, const char *init_str, struct narray *buttons, int *res_btn, char **s, int *x, int *y) { GtkWidget *dlg, *text; GtkBox *vbox; int data; gint res_id; dlg = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL); if (add_buttons(dlg, buttons)) { gtk_dialog_add_buttons(GTK_DIALOG(dlg), _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); } gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); if (mes) { GtkWidget *label; label = gtk_label_new(mes); gtk_box_pack_start(vbox, label, FALSE, FALSE, 5); } text = create_text_entry(FALSE, TRUE); if (init_str) { gtk_entry_set_text(GTK_ENTRY(text), init_str); } gtk_box_pack_start(vbox, text, FALSE, FALSE, 5); set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); if (res_id > 0 || res_id == GTK_RESPONSE_OK) { *s = g_strdup(gtk_entry_get_text(GTK_ENTRY(text))); data = IDOK; } else { data = IDCANCEL; } if (buttons && res_btn) { *res_btn = res_id; } get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return data; } int DialogRadio(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int *r, int *x, int *y) { GtkWidget *dlg, *btn, **btn_ary; GtkBox *vbox; int data; gint res_id; char **d; int i, anum; d = arraydata(array); anum = arraynum(array); btn_ary = g_malloc(anum * sizeof(*btn_ary)); if (btn_ary == NULL) return IDCANCEL; dlg = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL); if (add_buttons(dlg, buttons)) { gtk_dialog_add_buttons(GTK_DIALOG(dlg), _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); } gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); if (caption) { GtkWidget *label; label = gtk_label_new(caption); gtk_box_pack_start(vbox, label, FALSE, FALSE, 5); } btn = NULL; for (i = 0; i < anum; i++) { btn = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(btn), d[i]); gtk_box_pack_start(vbox, btn, FALSE, FALSE, 2); btn_ary[i] = btn; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(btn), i == *r); } set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); if (res_id > 0 || res_id == GTK_RESPONSE_OK) { *r = -1; for (i = 0; i < anum; i++) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btn_ary[i]))) { *r = i; break; } } data = IDOK; } else { data = IDCANCEL; } if (buttons && res_btn) { *res_btn = res_id; } g_free(btn_ary); get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return data; } static int add_buttons(GtkWidget *dlg, struct narray *array) { char **d; int i, anum; if (array == NULL) { return 1; } d = arraydata(array); anum = arraynum(array); if (anum < 1) { return 1; } for (i = 0; i < anum; i++) { if (d[i] && g_utf8_validate(d[i], -1, NULL)) { gtk_dialog_add_button(GTK_DIALOG(dlg), d[i], i + 1); } } return 0; } int DialogButton(GtkWidget *parent, const char *title, const char *caption, struct narray *buttons, int *x, int *y) { GtkWidget *dlg; gint res_id; dlg = gtk_dialog_new(); if (add_buttons(dlg, buttons)) { return 1; } if (title && g_utf8_validate(title, -1, NULL)) { gtk_window_set_title(GTK_WINDOW(dlg), title); } if (caption && g_utf8_validate(caption, -1, NULL)) { GtkWidget *box, *label; box = gtk_dialog_get_content_area(GTK_DIALOG(dlg)); label = gtk_label_new(caption); gtk_box_pack_start(GTK_BOX(box), label, TRUE, TRUE, 4); } gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); if (parent) { gtk_window_set_transient_for(GTK_WINDOW(dlg), GTK_WINDOW(parent)); gtk_window_set_modal(GTK_WINDOW(parent), TRUE); } set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return res_id; } int DialogCombo(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int sel, char **r, int *x, int *y) { GtkWidget *dlg, *combo; GtkBox *vbox; int data; gint res_id; char **d; int i, anum; d = arraydata(array); anum = arraynum(array); *r = NULL; dlg = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL); if (add_buttons(dlg, buttons)) { gtk_dialog_add_buttons(GTK_DIALOG(dlg), _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); } gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); if (caption) { GtkWidget *label; label = gtk_label_new(caption); gtk_box_pack_start(vbox, label, FALSE, FALSE, 5); } combo = combo_box_create(); for (i = 0; i < anum; i++) { combo_box_append_text(combo, d[i]); } if (sel < 0 || sel >= anum) { sel = 0; } combo_box_set_active(combo, sel); gtk_box_pack_start(vbox, combo, FALSE, FALSE, 2); set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); if (res_id > 0 || res_id == GTK_RESPONSE_OK) { i = combo_box_get_active(combo); if (i >= 0) { *r = g_strdup(d[i]); } data = IDOK; } else { data = IDCANCEL; } if (buttons && res_btn) { *res_btn = res_id; } get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return data; } int DialogComboEntry(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int sel, char **r, int *x, int *y) { GtkWidget *dlg, *combo; GtkBox *vbox; int data; gint res_id; char **d; int i, anum; d = arraydata(array); anum = arraynum(array); *r = NULL; dlg = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL); if (add_buttons(dlg, buttons)) { gtk_dialog_add_buttons(GTK_DIALOG(dlg), _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); } gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); if (caption) { GtkWidget *label; label = gtk_label_new(caption); gtk_box_pack_start(vbox, label, FALSE, FALSE, 5); } combo = combo_box_entry_create(); for (i = 0; i < anum; i++) { combo_box_append_text(combo, d[i]); } if (sel >= 0 && sel < anum) { combo_box_set_active(combo, sel); } gtk_box_pack_start(vbox, combo, FALSE, FALSE, 2); set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); if (res_id > 0 || res_id == GTK_RESPONSE_OK) { const char *s; s = combo_box_entry_get_text(combo); if (s) { *r = g_strdup(s); } else { *r = NULL; } data = IDOK; } else { data = IDCANCEL; } if (buttons && res_btn) { *res_btn = res_id; } get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return data; } int DialogSpinEntry(GtkWidget *parent, const char *title, const char *caption, double min, double max, double inc, struct narray *buttons, int *res_btn, double *r, int *x, int *y) { GtkWidget *dlg, *spin; GtkBox *vbox; int data, n; gint res_id; double prec; dlg = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL); if (add_buttons(dlg, buttons)) { gtk_dialog_add_buttons(GTK_DIALOG(dlg), _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); } gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); if (caption) { GtkWidget *label; label = gtk_label_new(caption); gtk_box_pack_start(vbox, label, FALSE, FALSE, 5); } if (inc == 0) inc = 1; spin = gtk_spin_button_new_with_range(min, max, inc); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(spin), TRUE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), *r); gtk_box_pack_start(vbox, spin, FALSE, FALSE, 2); gtk_entry_set_activates_default(GTK_ENTRY(spin), TRUE); prec = log10(fabs(inc)); if (prec < 0) { n = ceil(- prec); } else { n = 0; } gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spin), n); set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); if (res_id > 0 || res_id == GTK_RESPONSE_OK) { *r = gtk_spin_button_get_value(GTK_SPIN_BUTTON(spin)); data = IDOK; } else { data = IDCANCEL; } if (buttons && res_btn) { *res_btn = res_id; } get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return data; } int DialogCheck(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int *r, int *x, int *y) { GtkWidget *dlg, *btn, **btn_ary; GtkBox *vbox; int data; gint res_id; char **d; int i, anum; d = arraydata(array); anum = arraynum(array); btn_ary = g_malloc(anum * sizeof(*btn_ary)); if (btn_ary == NULL) return IDCANCEL; dlg = gtk_dialog_new_with_buttons(title, GTK_WINDOW(parent), #if USE_HEADER_BAR GTK_DIALOG_USE_HEADER_BAR | #endif GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL, NULL); if (add_buttons(dlg, buttons)) { gtk_dialog_add_buttons(GTK_DIALOG(dlg), _("_Cancel"), GTK_RESPONSE_CANCEL, _("_OK"), GTK_RESPONSE_OK, NULL); } gtk_dialog_set_default_response(GTK_DIALOG(dlg), GTK_RESPONSE_OK); gtk_window_set_resizable(GTK_WINDOW(dlg), FALSE); vbox = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dlg))); if (caption) { GtkWidget *label; label = gtk_label_new(caption); gtk_box_pack_start(vbox, label, FALSE, FALSE, 5); } btn = NULL; for (i = 0; i < anum; i++) { btn = gtk_check_button_new_with_mnemonic(d[i]); gtk_box_pack_start(vbox, btn, FALSE, FALSE, 2); btn_ary[i] = btn; } for (i = 0; i < anum; i++) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(btn_ary[i]), r[i]); } set_dialog_position(dlg, x, y); gtk_widget_show_all(dlg); res_id = ndialog_run(dlg); if (res_id > 0 || res_id == GTK_RESPONSE_OK) { for (i = 0; i < anum; i++) { r[i] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(btn_ary[i])); } data = IDOK; } else { data = IDCANCEL; } if (buttons && res_btn) { *res_btn = res_id; } g_free(btn_ary); get_dialog_position(dlg, x, y); gtk_widget_destroy(dlg); reset_event(); return data; } static void free_str_list(GSList *top) { int i, n; GSList *list; n = g_slist_length(top); for (i = 0, list = top; i < n; i++, list = list->next) { g_free(list->data); } g_slist_free(top); } static void fsok(GtkWidget *dlg, struct nGetOpenFileData *data) { char *file, *file2, **farray; const char *filter_name; int i, k, len, n; GStatBuf buf; GSList *top, *list; GtkFileFilter *filter; top = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dlg)); filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(dlg)); if (filter) { filter_name = gtk_file_filter_get_name(filter); } else { filter_name = NULL; } if (filter_name == NULL || strcmp(filter_name, _("All")) == 0) { data->ext = NULL; } n = g_slist_length(top); farray = g_malloc(sizeof(*farray) * (n + 1)); if (farray == NULL) { free_str_list(top); return; } data->file = farray; k = 0; for (list = top; list; list = list->next) { char *tmp; tmp = (char *) list->data; if (tmp == NULL || strlen(tmp) < 1) { message_beep(TopLevel); continue; } file = get_utf8_filename(tmp); for (i = strlen(file) - 1; (i > 0) && (file[i] != '/') && (file[i] != '.'); i--); if ((file[i] != '.') && data->ext) { len = strlen(data->ext) + 1; } else { len = 0; } if (len) { file2 = g_strdup_printf("%s.%s", file, data->ext); g_free(file); } else { file2 = file; } if (file2) { if (data->mustexist) { if ((nstat(file2, &buf) != 0) || ((buf.st_mode & S_IFMT) != S_IFREG) || (naccess(file2, R_OK) != 0)) { message_beep(TopLevel); error22(NULL, 0, "I/O error", file2); g_free(file2); continue; } } else { if ((nstat(file2, &buf) == 0) && ((buf.st_mode & S_IFMT) != S_IFREG)) { message_beep(TopLevel); error22(NULL, 0, "I/O error", file2); g_free(file2); continue; } } farray[k] = file2; k++; } } if (k == 0) return; if (data->changedir && k > 0) { data->chdir = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->chdir_cb)); if (data->chdir && data->init_dir) { char *dir; g_free(*(data->init_dir)); dir = g_path_get_dirname(farray[0]); *(data->init_dir) = dir; } } farray[k] = NULL; free_str_list(top); data->ret = IDOK; } static void file_dialog_set_current_neme(GtkWidget *dlg, const char *full_name) { char *name; if (dlg == NULL || full_name == NULL) return; name = getbasename(full_name); if (name) { gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dlg), name); g_free(name); } } static int check_overwrite(GtkWidget *parent, const char *filename) { int r; char *buf; if (filename == NULL || naccess(filename, W_OK)) return 0; buf = g_strdup_printf(_("`%s'\n\nOverwrite existing file?"), CHK_STR(filename)); r = message_box(parent, buf, "Driver", RESPONS_YESNO); g_free(buf); return r != IDYES; } static char * get_filename_with_ext(const char *basename, const char *ext) { char *filename; int len, ext_len, i; if (basename == NULL) { return NULL; } if (ext == NULL || ext[0] == '\0') { return g_strdup(basename); } ext_len = strlen(ext); len = strlen(basename); i = len - ext_len; if (i > 0 && g_strcmp0(basename + i, ext) == 0 && basename[i - 1] == '.') { return g_strdup(basename); } filename = g_strdup_printf("%s%s%s", basename, (basename[len -1] == '.') ? "" : ".", ext); return filename; } static int FileSelectionDialog(GtkWidget *parent, struct nGetOpenFileData *data) { GtkWidget *dlg, *rc; GtkFileFilter *filter; char *fname; dlg = gtk_file_chooser_dialog_new(data->title, GTK_WINDOW((parent) ? parent : TopLevel), data->type, _("_Cancel"), GTK_RESPONSE_CANCEL, data->button, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(dlg), TRUE); rc = gtk_check_button_new_with_mnemonic(_("_Change current directory")); gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(dlg), rc); data->chdir_cb = rc; gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(dlg), data->multi); data->widget = dlg; if (data->ext) { char *filter_str, *filter_name, *ext_name; filter_str = g_strdup_printf("*.%s", data->ext); ext_name = g_ascii_strup(data->ext, -1); filter_name = g_strdup_printf(_("%s file (*.%s)"), ext_name, data->ext); g_free(ext_name); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter, filter_str); gtk_file_filter_set_name(filter, filter_name); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg), filter); g_free(filter_str); g_free(filter_name); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter, "*"); gtk_file_filter_set_name(filter, _("All")); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg), filter); } else { filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter, "*"); gtk_file_filter_set_name(filter, _("All")); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg), filter); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter, "*.txt"); gtk_file_filter_set_name(filter, "Text file (*.txt)"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg), filter); filter = gtk_file_filter_new(); gtk_file_filter_add_pattern(filter, "*.dat"); gtk_file_filter_set_name(filter, "Data file (*.dat)"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dlg), filter); } if (data->init_dir && *(data->init_dir)) { gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dlg), *(data->init_dir)); } gtk_widget_show_all(dlg); if (data->changedir && data->init_dir) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->chdir_cb), data->chdir); } else { gtk_widget_hide(data->chdir_cb); } fname = get_filename_with_ext(data->init_file, data->ext); if (fname) { if (data->type == GTK_FILE_CHOOSER_ACTION_SAVE) { file_dialog_set_current_neme(dlg, fname); } else { gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dlg), fname); } g_free(fname); } data->ret = IDCANCEL; while (1) { if (ndialog_run(dlg) != GTK_RESPONSE_ACCEPT) break; fsok(dlg, data); if (data->ret == IDOK && data->type == GTK_FILE_CHOOSER_ACTION_SAVE) { file_dialog_set_current_neme(dlg, data->file[0]); if (! data->overwrite && check_overwrite(dlg, data->file[0])) { data->ret = IDCANCEL; continue; } } break; } gtk_widget_destroy(dlg); reset_event(); data->widget = NULL; return data->ret; } int nGetOpenFileNameMulti(GtkWidget * parent, char *title, char *defext, char **init_dir, const char *init_file, char ***file, int chd) { int ret; struct nGetOpenFileData data; data.title = title; data.init_dir = init_dir; data.init_file = init_file; data.file = NULL; data.chdir = chd; data.ext = defext; data.mustexist = TRUE; data.overwrite = FALSE; data.multi = TRUE; data.changedir = TRUE; data.type = GTK_FILE_CHOOSER_ACTION_OPEN; data.button = _("_Open"); ret = FileSelectionDialog(parent, &data); if (ret == IDOK) { *file = data.file; if (data.chdir && init_dir && nchdir(*init_dir)) { ErrorMessage(); } } else { *file = NULL; } return ret; } int nGetOpenFileName(GtkWidget *parent, char *title, char *defext, char **init_dir, const char *init_file, char **file, int exist, int chd) { struct nGetOpenFileData data; int ret; data.title = title; data.init_dir = init_dir; data.init_file = init_file; data.file = NULL; data.chdir = chd; data.ext = defext; data.mustexist = exist; data.overwrite = FALSE; data.multi = FALSE; data.changedir = TRUE; data.type = (exist) ? GTK_FILE_CHOOSER_ACTION_OPEN : GTK_FILE_CHOOSER_ACTION_SAVE; data.button = _("_Open"); ret = FileSelectionDialog(parent, &data); if (ret == IDOK) { *file = data.file[0]; g_free(data.file); if (data.chdir && init_dir && nchdir(*init_dir)) { ErrorMessage(); } } else { *file = NULL; } return ret; } int nGetSaveFileName(GtkWidget * parent, char *title, char *defext, char **init_dir, const char *init_file, char **file, int overwrite, int chd) { struct nGetOpenFileData data; int ret; data.title = title; data.init_dir = init_dir; data.init_file = init_file; data.file = NULL; data.chdir = chd; data.ext = defext; data.mustexist = FALSE; data.overwrite = overwrite; data.multi = FALSE; data.changedir = TRUE; data.type = GTK_FILE_CHOOSER_ACTION_SAVE, data.button = _("_Save"); ret = FileSelectionDialog(parent, &data); if (ret == IDOK) { *file = data.file[0]; g_free(data.file); if (data.chdir && init_dir && nchdir(*init_dir)) { ErrorMessage(); } } else { *file = NULL; } return ret; } void get_window_geometry(GtkWidget *win, gint *x, gint *y, gint *w, gint *h) { gtk_window_get_size(GTK_WINDOW(win), w, h); gtk_window_get_position(GTK_WINDOW(win), x, y); } ngraph-gtk-6.09.05/src/gtk/x11commn.h0000644000175000017500000000376614001231674014060 00000000000000/* * $Id: x11commn.h,v 1.11 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define FILL_STRING ".........." void OpenGRA(void); void CloseGRA(void); void ChangeGRA(void); void CheckPage(void); void SetPageSettingsToGRA(void); void GetPageSettingsFromGRA(void); void AxisDel(int id); void AxisMove(int id1, int id2); void AdjustAxis(void); void FitCopy(struct objlist *obj, int did, int sid); void FitDel(struct objlist *obj, int id); void ArrayDel(struct objlist *obj, int id); void FitClear(void); int LoadNgpFile(char *File, int console, char *option); int SaveDrawrable(char *name, int storedata, int storemerge, int save_decimalsign); int GraphSave(int overwrite); void DeleteDrawable(void); void FileAutoScale(void); int CheckSave(void); void AddDataFileList(const char *file); void SetFileName(char *name); int CheckIniFile(void); int allocate_console(void); void free_console(int allocnow); char *FileCB(struct objlist *obj, int id); char *PlotFileCB(struct objlist *obj, int id); char *MergeFileCB(struct objlist *obj, int id); int SetFileHidden(void); void ProgressDialogCreate(char *title); void ProgressDialogSetTitle(char *title); void ProgressDialogFinalize(void); void ErrorMessage(void); ngraph-gtk-6.09.05/src/gtk/gtk_liststore.c0000644000175000017500000006636014143146756015321 00000000000000/* * $Id: gtk_liststore.c,v 1.27 2010-02-03 01:18:12 hito Exp $ */ #include "gtk_common.h" #include #include "gra.h" #include "gtk_liststore.h" #include "x11dialg.h" static gboolean tree_view_set_tooltip_query_cb(GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data) { char *str; GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *model; GtkTreeView *tree_view = GTK_TREE_VIEW(widget); int column; if (!gtk_tree_view_get_tooltip_context(GTK_TREE_VIEW(widget), &x, &y, keyboard_tip, &model, &path, &iter)) { return FALSE; } column = GPOINTER_TO_INT(data); if (column < 0) { return FALSE; } str = NULL; gtk_tree_model_get(model, &iter, column, &str, -1); if (str == NULL) { return FALSE; } gtk_tooltip_set_text(tooltip, str); gtk_tree_view_set_tooltip_row(tree_view, tooltip, path); g_free(str); gtk_tree_path_free(path); return TRUE; } void tree_view_set_tooltip_column(GtkTreeView *tree_view, gint column) { g_signal_connect(tree_view, "query-tooltip", G_CALLBACK(tree_view_set_tooltip_query_cb), GINT_TO_POINTER(column)); gtk_widget_set_has_tooltip(GTK_WIDGET(tree_view), TRUE); } static gboolean combo_box_separator_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { char *str; int r; gtk_tree_model_get(model, iter, OBJECT_COLUMN_TYPE_STRING, &str, -1); r = ! str; if (str) { g_free(str); } return r; } void init_object_combo_box(GtkWidget *cbox) { GtkCellRenderer *rend; GtkTreeViewRowSeparatorFunc func; func = gtk_combo_box_get_row_separator_func(GTK_COMBO_BOX(cbox)); if (func == NULL) { gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(cbox), combo_box_separator_func, NULL, NULL); } gtk_cell_layout_clear(GTK_CELL_LAYOUT(cbox)); rend = gtk_cell_renderer_toggle_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(cbox), rend, "active", OBJECT_COLUMN_TYPE_TOGGLE, "visible", OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, "radio", OBJECT_COLUMN_TYPE_TOGGLE_IS_RADIO, NULL); rend = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "text", OBJECT_COLUMN_TYPE_STRING); rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "pixbuf", OBJECT_COLUMN_TYPE_PIXBUF); } static GtkTreeModel * create_object_tree_model(void) { return GTK_TREE_MODEL(gtk_tree_store_new(OBJECT_COLUMN_TYPE_NUM, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_OBJECT, G_TYPE_INT, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN)); } static GtkWidget * create_object_cbox(void) { GtkTreeModel *model; GtkWidget *cbox; model = create_object_tree_model(); cbox = gtk_combo_box_new_with_model(model); init_object_combo_box(cbox); g_object_set(cbox, "has-frame", FALSE, NULL); return cbox; } void add_separator_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent) { add_text_combo_item_to_cbox(list, iter, parent, -1, -1, NULL, TOGGLE_NONE, FALSE); } void add_font_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id) { struct fontmap *fcur; char *font; getobj(obj, field, id, 0, NULL, &font); fcur = Gra2cairoConf->fontmap_list_root; while (fcur) { int match; match = ! g_strcmp0(font, fcur->fontalias); add_text_combo_item_to_cbox(list, iter, parent, column_id, -1, fcur->fontalias, TOGGLE_RADIO, match); fcur = fcur->next; } } void add_font_style_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id_bold, int column_id_italic, struct objlist *obj, const char *field, int id) { int style; getobj(obj, field, id, 0, NULL, &style); add_text_combo_item_to_cbox(list, iter, parent, column_id_bold, -1, _("Bold"), TOGGLE_CHECK, style & GRA_FONT_STYLE_BOLD); add_text_combo_item_to_cbox(list, iter, parent, column_id_italic, -1, _("Italic"), TOGGLE_CHECK, style & GRA_FONT_STYLE_ITALIC); } void add_text_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, int enum_id, const char *title, enum TOGGLE_TYPE type, int active) { GtkTreeIter locl_iter; if (iter == NULL) { iter = &locl_iter; } gtk_tree_store_append(list, iter, parent); gtk_tree_store_set(list, iter, OBJECT_COLUMN_TYPE_STRING, title, OBJECT_COLUMN_TYPE_PIXBUF, NULL, OBJECT_COLUMN_TYPE_INT, column_id, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, type != TOGGLE_NONE, OBJECT_COLUMN_TYPE_TOGGLE_IS_RADIO, type == TOGGLE_RADIO, OBJECT_COLUMN_TYPE_TOGGLE, active, OBJECT_COLUMN_TYPE_PIXBUF_VISIBLE, FALSE, OBJECT_COLUMN_TYPE_ENUM, enum_id, -1); } void add_mark_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id) { int j, type; GtkTreeIter locl_iter; if (iter == NULL) { iter = &locl_iter; } type = -1; getobj(obj, field, id, 0, NULL, &type); for (j = 0; j < MARK_TYPE_NUM; j++) { GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_get_from_surface(NgraphApp.markpix[j], 0, 0, MARK_PIX_SIZE, MARK_PIX_SIZE); if (pixbuf) { char buf[64]; gtk_tree_store_append(list, iter, parent); snprintf(buf, sizeof(buf), "%02d ", j); gtk_tree_store_set(list, iter, OBJECT_COLUMN_TYPE_STRING, buf, OBJECT_COLUMN_TYPE_PIXBUF, pixbuf, OBJECT_COLUMN_TYPE_INT, column_id, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, TRUE, OBJECT_COLUMN_TYPE_TOGGLE_IS_RADIO, TRUE, OBJECT_COLUMN_TYPE_TOGGLE, j == type, OBJECT_COLUMN_TYPE_ENUM, j, -1); g_object_unref(pixbuf); } } } void add_enum_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id) { char **enum_array; int state, i; getobj(obj, field, id, 0, NULL, &state); enum_array = (char **) chkobjarglist(obj, field); if (enum_array == NULL) { return; } for (i = 0; enum_array[i] && enum_array[i][0]; i++) { add_text_combo_item_to_cbox(list, iter, parent, column_id, i, _(enum_array[i]), TOGGLE_RADIO, i == state); } } void add_bool_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id, const char *title) { GtkTreeIter locl_iter; int state; if (iter == NULL) { iter = &locl_iter; } getobj(obj, field, id, 0, NULL, &state); add_text_combo_item_to_cbox(list, iter, parent, column_id, -1, title, TOGGLE_CHECK, state); } void add_line_style_item_to_cbox(GtkTreeStore *list, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id) { GtkTreeIter iter; int i; char *str; sgetobjfield(obj, id, field, NULL, &str, FALSE, FALSE, FALSE); if (str == NULL) { return; } add_text_combo_item_to_cbox(list, &iter, parent, -1, -1, _("Line style"), TOGGLE_NONE, FALSE); for (i = 0; FwLineStyle[i].name; i++) { int active; active = ! g_strcmp0(str, FwLineStyle[i].list); add_text_combo_item_to_cbox(list, NULL, &iter, column_id, i, _(FwLineStyle[i].name), TOGGLE_RADIO, active); } g_free(str); } GtkCellEditable * start_editing_obj(GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) { return GTK_CELL_EDITABLE(create_object_cbox()); } static GtkTreeViewColumn * create_column(n_list_store *list, int i) { GtkCellRenderer *renderer; GtkTreeViewColumn *col; GtkTreeModel *model; switch (list[i].type) { case G_TYPE_BOOLEAN: renderer = gtk_cell_renderer_toggle_new(); col = gtk_tree_view_column_new_with_attributes(_(list[i].title), renderer, "active", i, NULL); if (list[i].editable) { g_object_set(renderer, "mode", GTK_CELL_RENDERER_MODE_ACTIVATABLE, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); } break; case G_TYPE_INT: case G_TYPE_UINT: case G_TYPE_LONG: case G_TYPE_ULONG: case G_TYPE_INT64: case G_TYPE_UINT64: case G_TYPE_FLOAT: case G_TYPE_DOUBLE: renderer = gtk_cell_renderer_spin_new(); col = gtk_tree_view_column_new_with_attributes(_(list[i].title), renderer, "text", i, NULL); gtk_tree_view_column_set_resizable(col, TRUE); g_object_set((GObject *) renderer, "xalign", (gfloat) 1.0, NULL); if (list[i].editable) { if (list[i].type == G_TYPE_DOUBLE || list[i].type == G_TYPE_FLOAT) { g_object_set((GObject *) renderer, "editable", list[i].editable, "adjustment", gtk_adjustment_new(0, list[i].min / 100.0, list[i].max / 100.0, list[i].inc / 100.0, list[i].page / 100.0, 0), "digits", 2, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); } else { g_object_set((GObject *) renderer, "editable", list[i].editable, "adjustment", gtk_adjustment_new(0, list[i].min, list[i].max, list[i].inc, list[i].page, 0), "digits", 0, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); } } if (list[i].editable) { gtk_tree_view_column_set_expand(col, TRUE); } break; case G_TYPE_OBJECT: renderer = gtk_cell_renderer_pixbuf_new(); g_object_set((GObject *) renderer, "mode", (list[i].editable) ? GTK_CELL_RENDERER_MODE_EDITABLE : GTK_CELL_RENDERER_MODE_INERT, "sensitive", list[i].editable, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); GTK_CELL_RENDERER_GET_CLASS(renderer)->start_editing = start_editing_obj; col = gtk_tree_view_column_new_with_attributes(_(list[i].title), renderer, "pixbuf", i, NULL); break; case G_TYPE_PARAM: renderer = gtk_cell_renderer_combo_new(); model = create_object_tree_model(); g_object_set((GObject *) renderer, "has-entry", FALSE, "model", model, "text-column", OBJECT_COLUMN_TYPE_STRING, "editable", list[i].editable, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); col = gtk_tree_view_column_new_with_attributes(_(list[i].title), renderer, "text", i, NULL); break; case G_TYPE_ENUM: renderer = gtk_cell_renderer_combo_new(); model = GTK_TREE_MODEL(gtk_list_store_new(1, G_TYPE_STRING)); g_object_set((GObject *) renderer, "has-entry", FALSE, "model", model, "text-column", 0, "editable", list[i].editable, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); col = gtk_tree_view_column_new_with_attributes(_(list[i].title), renderer, "text", i, NULL); break; case G_TYPE_STRING: default: renderer = gtk_cell_renderer_text_new(); g_object_set((GObject *) renderer, "editable", list[i].editable, "ellipsize", list[i].ellipsize, NULL); g_object_set_data(G_OBJECT(renderer), "user-data", &list[i]); col = gtk_tree_view_column_new_with_attributes(_(list[i].title), renderer, "text", i, NULL); gtk_tree_view_column_set_resizable(col, TRUE); if (list[i].ellipsize != PANGO_ELLIPSIZE_NONE || list[i].editable) { gtk_tree_view_column_set_expand(col, TRUE); } } return col; } void tree_view_set_no_expand_column(GtkWidget *tview, const int *columns, int n) { int i; for (i = 0; i < n; i++) { GtkTreeViewColumn *col; col = gtk_tree_view_get_column(GTK_TREE_VIEW(tview), columns[i]); gtk_tree_view_column_set_expand(col, FALSE); } } void list_store_set_align(GtkWidget *tview, int n, double align) { GtkTreeViewColumn *col; GList *list; col = gtk_tree_view_get_column(GTK_TREE_VIEW(tview), n); if (col == NULL) { return; } list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col)); if (list == NULL || list->data == NULL) { return; } g_object_set((GObject *) list->data, "xalign", (gfloat) align, NULL); g_list_free(list); } static GtkWidget * create_tree_view(int n, n_list_store *list, int tree) { GType *tarray; GtkTreeModel *lstore; GtkWidget *tview; GtkTreeViewColumn *col; GtkTreeSelection *sel; int i; if (n < 1 || list == NULL) return NULL; tarray = g_malloc(sizeof(*tarray) * n); if (tarray == NULL) return NULL; for (i = 0; i < n; i++) { if (list[i].type == G_TYPE_DOUBLE || list[i].type == G_TYPE_ENUM || list[i].type == G_TYPE_PARAM) { tarray[i] = G_TYPE_STRING; } else { tarray[i] = list[i].type; } list[i].edited_id = 0; } if (tree) { lstore = GTK_TREE_MODEL(gtk_tree_store_newv(n, tarray)); } else { lstore = GTK_TREE_MODEL(gtk_list_store_newv(n, tarray)); } g_free(tarray); tview = gtk_tree_view_new_with_model(lstore); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(tview), TRUE); gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(tview), GTK_TREE_VIEW_GRID_LINES_VERTICAL); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tview)); gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); for (i = 0; i < n; i++) { if (list[i].visible) { col = create_column(list, i); gtk_tree_view_column_set_visible(col, list[i].visible); gtk_tree_view_append_column(GTK_TREE_VIEW(tview), col); } } gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tview), n > 1); return tview; } void list_store_set_sort_all(GtkWidget *tview) { GList *list, *ptr; int i; list = gtk_tree_view_get_columns(GTK_TREE_VIEW(tview)); if (list == NULL) return; for (ptr = list, i = 0; ptr; ptr = ptr->next, i++) { GtkTreeViewColumn *column; column = GTK_TREE_VIEW_COLUMN(ptr->data); gtk_tree_view_column_set_sort_column_id(column, i); gtk_tree_view_column_set_clickable(column, TRUE); } gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tview), TRUE); g_list_free(list); } void list_store_set_sort_column(GtkWidget *tview, int col) { GList *list, *ptr; list = gtk_tree_view_get_columns(GTK_TREE_VIEW(tview)); if (list == NULL) return; ptr = g_list_nth(list, col); if (ptr) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(ptr->data); gtk_tree_view_column_set_sort_column_id(column, col); gtk_tree_view_column_set_clickable(column, TRUE); } gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tview), TRUE); g_list_free(list); } GtkWidget * list_store_create(int n, n_list_store *list) { return create_tree_view(n, list, FALSE); } GtkWidget * tree_store_create(int n, n_list_store *list) { return create_tree_view(n, list, TRUE); } int list_store_get_int(GtkWidget *w, GtkTreeIter *iter, int col) { GtkTreeModel *model; int v = 0; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_model_get(model, iter, col, &v, -1); return v; } void list_store_set_int(GtkWidget *w, GtkTreeIter *iter, int col, int v) { GtkListStore *list; list = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w))); gtk_list_store_set(list, iter, col, v, -1); } void tree_store_set_int(GtkWidget *w, GtkTreeIter *iter, int col, int v) { GtkTreeStore *list; list = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w))); gtk_tree_store_set(list, iter, col, v, -1); } int list_store_path_get_int(GtkWidget *w, GtkTreePath *path, int col, int *val) { GtkTreeModel *model; gboolean found; GtkTreeIter iter; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); found = gtk_tree_model_get_iter(model, &iter, path); if (! found) return 1; gtk_tree_model_get(model, &iter, col, val, -1); return 0; } void list_store_set_double(GtkWidget *w, GtkTreeIter *iter, int col, double v) { char buf[128]; snprintf(buf, sizeof(buf), "%.2f", v); list_store_set_string(w, iter, col, buf); } void tree_store_set_double(GtkWidget *w, GtkTreeIter *iter, int col, double v) { char buf[128]; snprintf(buf, sizeof(buf), "%.2f", v); tree_store_set_string(w, iter, col, buf); } gboolean list_store_get_boolean(GtkWidget *w, GtkTreeIter *iter, int col) { GtkTreeModel *model; gboolean v; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_model_get(model, iter, col, &v, -1); return v; } void list_store_set_boolean(GtkWidget *w, GtkTreeIter *iter, int col, gboolean v) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_list_store_set(GTK_LIST_STORE(model), iter, col, v, -1); } void tree_store_set_boolean(GtkWidget *w, GtkTreeIter *iter, int col, gboolean v) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_store_set(GTK_TREE_STORE(model), iter, col, v, -1); } char * list_store_get_string(GtkWidget *w, GtkTreeIter *iter, int col) { GtkTreeModel *model; char *v; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_model_get(model, iter, col, &v, -1); return v; } char * list_store_path_get_string(GtkWidget *w, GtkTreePath *path, int col) { GtkTreeModel *model; gboolean found; GtkTreeIter iter; char *v; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); found = gtk_tree_model_get_iter(model, &iter, path); if (! found) return NULL; gtk_tree_model_get(model, &iter, col, &v, -1); return v; } void list_store_set_string(GtkWidget *w, GtkTreeIter *iter, int col, const char *v) { GtkListStore *list; list = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w))); gtk_list_store_set(list, iter, col, v, -1); } void list_store_path_set_string(GtkWidget *w, GtkTreePath *path, int col, const char *v) { GtkListStore *list; gboolean found; GtkTreeIter iter; list = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w))); found = gtk_tree_model_get_iter(GTK_TREE_MODEL(list), &iter, path); if (! found) return; gtk_list_store_set(list, &iter, col, v, -1); } void tree_store_set_string(GtkWidget *w, GtkTreeIter *iter, int col, const char *v) { GtkTreeStore *list; list = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w))); gtk_tree_store_set(list, iter, col, v, -1); } void list_store_set_pixbuf(GtkWidget *w, GtkTreeIter *iter, int col, GdkPixbuf *v) { GtkListStore *list; list = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w))); gtk_list_store_set(list, iter, col, v, -1); } GdkPixbuf * list_store_get_pixbuf(GtkWidget *w, GtkTreeIter *iter, int col) { GtkTreeModel *model; GObject *v; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_model_get(model, iter, col, &v, -1); return GDK_PIXBUF(v); } void list_store_set_val(GtkWidget *w, GtkTreeIter *iter, int col, GType type, void *ptr) { int v; gboolean b; char *s; switch (type) { case G_TYPE_BOOLEAN: b = *((int *)ptr); list_store_set_boolean(w, iter, col, b); break; case G_TYPE_INT: v = *((int *)ptr); list_store_set_int(w, iter, col, v); break; case G_TYPE_STRING: s = (char *)ptr; list_store_set_string(w, iter, col, s); break; } } void tree_store_set_val(GtkWidget *w, GtkTreeIter *iter, int col, GType type, void *ptr) { int v; gboolean b; char *s; switch (type) { case G_TYPE_BOOLEAN: b = *((int *)ptr); tree_store_set_boolean(w, iter, col, b); break; case G_TYPE_INT: v = *((int *)ptr); tree_store_set_int(w, iter, col, v); break; case G_TYPE_STRING: s = (char *)ptr; tree_store_set_string(w, iter, col, s); break; } } void list_store_clear(GtkWidget *w) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_list_store_clear(GTK_LIST_STORE(model)); } void tree_store_clear(GtkWidget *w) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_store_clear(GTK_TREE_STORE(model)); } void list_store_append(GtkWidget *w, GtkTreeIter *iter) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_list_store_append(GTK_LIST_STORE(model), iter); } void tree_store_append(GtkWidget *w, GtkTreeIter *iter, GtkTreeIter *parent) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_store_append(GTK_TREE_STORE(model), iter, parent); } void tree_store_prepend(GtkWidget *w, GtkTreeIter *iter, GtkTreeIter *parent) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); gtk_tree_store_prepend(GTK_TREE_STORE(model), iter, parent); } gboolean list_store_get_iter_first(GtkWidget *w, GtkTreeIter *iter) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); return gtk_tree_model_get_iter_first(model, iter); } gboolean list_store_iter_next(GtkWidget *w, GtkTreeIter *iter) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); return gtk_tree_model_iter_next(GTK_TREE_MODEL(model), iter); } gboolean tree_store_get_iter_children(GtkWidget *w, GtkTreeIter *child, GtkTreeIter *iter) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); return gtk_tree_model_iter_children(model, child, iter); } gboolean list_store_get_selected_iter(GtkWidget *w, GtkTreeIter *iter) { GtkTreeSelection *sel; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); return gtk_tree_selection_get_selected(sel, NULL, iter); } int list_store_get_selected_int(GtkWidget *w, int col) { GtkTreeIter iter; if (! list_store_get_selected_iter(w, &iter)) return -1; return list_store_get_int(w, &iter, col); } char * list_store_get_selected_string(GtkWidget *w, int col) { GtkTreeIter iter; if (! list_store_get_selected_iter(w, &iter)) return NULL; return list_store_get_string(w, &iter, col); } gboolean tree_store_get_selected_nth(GtkWidget *w, int *n, int *m) { GtkTreeSelection *sel; GtkTreeIter iter; GtkTreeModel *model; GtkTreePath* path; int depth, *ary; gboolean state; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); state = gtk_tree_selection_get_selected(sel, &model, &iter); if (! state) return FALSE; path = gtk_tree_model_get_path(model, &iter); depth = gtk_tree_path_get_depth(path); ary = gtk_tree_path_get_indices(path); *n = ary[0]; if (depth < 2) { *m = -1; } else { *m = ary[1]; } gtk_tree_path_free(path); return TRUE; } int list_store_get_selected_index(GtkWidget *w) { int m, n; gboolean state; state = tree_store_get_selected_nth(w, &n, &m); if (state) return n; return -1; } gboolean list_store_get_selected_nth(GtkWidget *w, int *n) { int m; return tree_store_get_selected_nth(w, n, &m); } void list_store_select_all(GtkWidget *w) { GtkTreeSelection *sel; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); gtk_tree_selection_select_all(sel); } void list_store_select_iter(GtkWidget *w, GtkTreeIter *iter) { GtkTreeModel *model; GtkTreeSelection *sel; GtkTreePath *path; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); gtk_tree_selection_select_iter(sel, iter); path = gtk_tree_model_get_path(model, iter); gtk_tree_view_set_cursor(GTK_TREE_VIEW(w), path, NULL, FALSE); gtk_tree_path_free(path); } void list_store_select_int(GtkWidget *w, int col, int id) { GtkTreeIter iter; GtkTreeModel *model; gboolean state; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); state = gtk_tree_model_get_iter_first(model, &iter); while (state) { int val; val = list_store_get_int(w, &iter, col); if (val == id) { list_store_select_iter(w, &iter); break; } state = gtk_tree_model_iter_next(model, &iter); } } static void select_path_str(GtkWidget *w, char *str) { GtkTreePath *path; GtkTreeSelection *sel; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); path = gtk_tree_path_new_from_string(str); if (! path) return; gtk_tree_selection_select_path(sel, path); gtk_tree_view_set_cursor(GTK_TREE_VIEW(w), path, NULL, FALSE); /* this line is commented out before (I forgot the reason). */ gtk_tree_path_free(path); } static void select_range_path_str(GtkWidget *w, char *from, char *to) { GtkTreePath *path1, *path2; GtkTreeSelection *sel; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); path1 = gtk_tree_path_new_from_string(from); if (! path1) return; path2 = gtk_tree_path_new_from_string(to); if (! path2) { gtk_tree_path_free(path1); return; } gtk_tree_selection_select_range(sel, path1, path2); gtk_tree_path_free(path2); gtk_tree_path_free(path1); } void list_store_select_nth(GtkWidget *w, int n) { char buf[1024]; snprintf(buf, sizeof(buf), "%d", n); select_path_str(w, buf); } void tree_store_select_nth(GtkWidget *w, int n, int m) { char buf[1024]; snprintf(buf, sizeof(buf), "%d:%d", n, m); select_path_str(w, buf); } void list_store_multi_select_nth(GtkWidget *w, int n, int m) { char buf1[1024], buf2[1024]; snprintf(buf1, sizeof(buf1), "%d", n); snprintf(buf2, sizeof(buf2), "%d", m); select_range_path_str(w, buf1, buf2); } int list_store_get_num(GtkWidget *w) { return tree_store_get_child_num(w, NULL); } int tree_store_get_child_num(GtkWidget *w, GtkTreeIter *iter) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); return gtk_tree_model_iter_n_children(model, iter); } void list_store_set_selection_mode(GtkWidget *w, GtkSelectionMode mode) { GtkTreeSelection *gsel; gsel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); gtk_tree_selection_set_mode(gsel, mode); } void list_store_select_all_cb(GtkButton *w, gpointer client_data) { list_store_select_all(GTK_WIDGET(client_data)); } void list_store_remove_selected_cb(GtkWidget *w, gpointer client_data) { GtkTreeSelection *sel; GList *selected, *data; GtkTreeModel *model; gboolean found; GtkTreeIter iter; GtkTreePath *first_path = NULL; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(client_data)); selected = gtk_tree_selection_get_selected_rows(sel, &model); if (selected == NULL) return; for (data = g_list_last(selected); data; data = data->prev) { found = gtk_tree_model_get_iter(model, &iter, data->data); if (found) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } first_path = data->data; } if (first_path) { if (! gtk_tree_model_get_iter(model, &iter, first_path)) { gtk_tree_path_prev(first_path); } gtk_tree_view_set_cursor(GTK_TREE_VIEW(client_data), first_path, NULL, FALSE); } g_list_free_full(selected, (GDestroyNotify) gtk_tree_path_free); } void tree_store_selected_toggle_expand(GtkWidget *w) { GtkTreeIter iter; GtkTreePath *path; GtkTreeModel *model; if (! list_store_get_selected_iter(w, &iter)) return; model = gtk_tree_view_get_model(GTK_TREE_VIEW(w)); path = gtk_tree_model_get_path(model, &iter); if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(w), path)) { gtk_tree_view_collapse_row(GTK_TREE_VIEW(w), path); } else { gtk_tree_view_expand_row(GTK_TREE_VIEW(w), path, FALSE); } } int tree_view_get_selected_row_int_from_path(GtkWidget *view, gchar *path, GtkTreeIter *iter, int col) { GtkTreeModel *model; int sel; model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); if (! gtk_tree_model_get_iter_from_string(model, iter, path)) { return -1; } list_store_select_iter(GTK_WIDGET(view), iter); gtk_tree_model_get(model, iter, col, &sel, -1); return sel; } ngraph-gtk-6.09.05/src/gtk/ogra2cairofile.c0000644000175000017500000002006514002211264015261 00000000000000/* * $Id: ogra2cairofile.c,v 1.16 2009-11-16 09:13:05 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include #include #include #include #include #ifdef CAIRO_HAS_WIN32_SURFACE #include #endif /* CAIRO_HAS_WIN32_SURFACE */ #include "mathfn.h" #include "object.h" #include "ioutil.h" #include "init.h" #include "x11gui.h" #include "ogra2cairo.h" #include "ogra2cairofile.h" #define NAME "gra2cairofile" #define PARENT "gra2cairo" #define OVERSION "1.00.00" #ifndef M_PI #define M_PI 3.141592 #endif char *surface_type[] = { "ps2", "ps3", "eps2", "eps3", "pdf", "svg1.1", "svg1.2", "png", #ifdef CAIRO_HAS_WIN32_SURFACE "emf", #endif /* CAIRO_HAS_WIN32_SURFACE */ NULL, }; static int gra2cairofile_init(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int dpi; struct gra2cairo_local *local; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; dpi = 72; if (_putobj(obj, "dpi", inst, &dpi) < 0) goto Err; if (_putobj(obj, "dpix", inst, &dpi) < 0) goto Err; if (_putobj(obj, "dpiy", inst, &dpi) < 0) goto Err; _getobj(obj, "_local", inst, &local); local->pixel_dot_x = local->pixel_dot_y = dpi / (DPI_MAX * 1.0); return 0; Err: local = gra2cairo_free(obj, inst); g_free(local); return 1; } static int gra2cairofile_done(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } #ifdef CAIRO_HAS_WIN32_SURFACE static cairo_surface_t * open_emf(int dpi, const char *fname) { HDC hdc; cairo_surface_t *surface; XFORM xform = {1, 0, 0, 1, 0, 0}; int disp_dpi; hdc = CreateEnhMetaFile(NULL, fname, NULL, NULL); if (hdc == NULL) { return NULL; } SetGraphicsMode(hdc, GM_ADVANCED); disp_dpi = GetDeviceCaps(hdc, LOGPIXELSX); xform.eM11 = xform.eM22 = 1.0 * disp_dpi / dpi; SetWorldTransform(hdc, &xform); surface = cairo_win32_printing_surface_create(hdc); StartPage(hdc); return surface; } static int close_emf(cairo_surface_t *surface) { HDC hdc; HENHMETAFILE emf; int r; hdc = cairo_win32_surface_get_dc(surface); cairo_surface_flush(surface); cairo_surface_copy_page(surface); cairo_surface_finish(surface); r = 1; EndPage(hdc); emf = CloseEnhMetaFile(hdc); if (emf == NULL) { return 1; } DeleteEnhMetaFile(emf); /* DeleteDC() is called in the cairo library */ return r; } #endif /* CAIRO_HAS_WIN32_SURFACE */ static cairo_t * create_cairo(struct objlist *obj, N_VALUE *inst, char *fname, int iw, int ih, int *err) { cairo_surface_t *ps; cairo_t *cairo; double w, h; int format, dpi, r; struct gra2cairo_local *local; fname = g_filename_from_utf8(fname, -1, NULL, NULL, NULL); if (fname == NULL) { *err = CAIRO_STATUS_NO_MEMORY; return NULL; } *err = 0; _getobj(obj, "format", inst, &format); _getobj(obj, "dpi", inst, &dpi); _getobj(obj, "_local", inst, &local); w = iw * dpi / 25.4 / 100; h = ih * dpi / 25.4 / 100; switch (format) { case TYPE_PS2: ps = cairo_ps_surface_create(fname, w, h); cairo_ps_surface_restrict_to_level(ps, CAIRO_PS_LEVEL_2); cairo_ps_surface_set_eps(ps, FALSE); break; case TYPE_PS3: ps = cairo_ps_surface_create(fname, w, h); cairo_ps_surface_restrict_to_level(ps, CAIRO_PS_LEVEL_3); cairo_ps_surface_set_eps(ps, FALSE); break; case TYPE_EPS2: ps = cairo_ps_surface_create(fname, w, h); cairo_ps_surface_restrict_to_level(ps, CAIRO_PS_LEVEL_2); cairo_ps_surface_set_eps(ps, TRUE); break; case TYPE_EPS3: ps = cairo_ps_surface_create(fname, w, h); cairo_ps_surface_restrict_to_level(ps, CAIRO_PS_LEVEL_3); cairo_ps_surface_set_eps(ps, TRUE); break; case TYPE_PDF: ps = cairo_pdf_surface_create(fname, w, h); break; case TYPE_SVG1_1: ps = cairo_svg_surface_create(fname, w, h); cairo_svg_surface_restrict_to_version(ps, CAIRO_SVG_VERSION_1_1); break; case TYPE_SVG1_2: ps = cairo_svg_surface_create(fname, w, h); cairo_svg_surface_restrict_to_version(ps, CAIRO_SVG_VERSION_1_2); break; case TYPE_PNG: ps = cairo_image_surface_create(CAIRO_FORMAT_RGB24, w, h); break; #ifdef CAIRO_HAS_WIN32_SURFACE case TYPE_EMF: ps = open_emf(dpi, fname); if (ps == NULL) { g_free(fname); return NULL; } break; #endif /* CAIRO_HAS_WIN32_SURFACE */ default: ps = cairo_ps_surface_create(fname, w, h); } g_free(fname); r = cairo_surface_status(ps); if (r != CAIRO_STATUS_SUCCESS) { *err = r; cairo_surface_destroy(ps); return NULL; } cairo = cairo_create(ps); /* cairo_create() references target, so you can immediately call cairo_surface_destroy() on it */ cairo_surface_destroy(ps); r = cairo_status(cairo); if (r != CAIRO_STATUS_SUCCESS) { *err = r; cairo_destroy(cairo); return NULL; } switch (format) { case TYPE_PNG: cairo_set_source_rgb(cairo, 1, 1, 1); cairo_paint(cairo); cairo_new_path(cairo); break; } return cairo; } static int init_cairo(struct objlist *obj, N_VALUE *inst, struct gra2cairo_local *local, int w, int h) { char *fname; cairo_t *cairo; int t2p, r; _getobj(obj, "file", inst, &fname); if (fname == NULL) return CAIRO_STATUS_NULL_POINTER; cairo = create_cairo(obj, inst, fname, w, h, &r); if (cairo == NULL) { return r; } if (local->cairo) cairo_destroy(local->cairo); local->cairo = cairo; _getobj(obj, "text2path", inst, &t2p); local->text2path = t2p; return 0; } static int gra2cairofile_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char code, *fname; int *cpar, format, r; struct gra2cairo_local *local; local = (struct gra2cairo_local *)argv[2]; code = *(char *)(argv[3]); cpar = (int *)argv[4]; switch (code) { case 'I': r = init_cairo(obj, inst, local, cpar[3], cpar[4]); if (r) { _getobj(obj, "file", inst, &fname); error2(obj, r + 100, fname); return 1; } break; case 'E': _getobj(obj, "format", inst, &format); if (local->cairo) { cairo_surface_t *surface; switch (format) { case TYPE_PNG: gra2cairo_draw_path(local); _getobj(obj, "file", inst, &fname); if (fname == NULL) return 1; fname = g_filename_from_utf8(fname, -1, NULL, NULL, NULL); if (fname == NULL) { error(obj, CAIRO_STATUS_NO_MEMORY + 100); return 1; } surface = cairo_get_target(local->cairo); r = cairo_surface_write_to_png(surface, fname); g_free(fname); if (r) { _getobj(obj, "file", inst, &fname); error2(obj, r + 100, fname); return 1; } break; #ifdef CAIRO_HAS_WIN32_SURFACE case TYPE_EMF: gra2cairo_draw_path(local); surface = cairo_get_target(local->cairo); r = close_emf(surface); if (r) { _getobj(obj, "file", inst, &fname); error2(obj, CAIRO_STATUS_WRITE_ERROR + 100, fname); return 1; } break; #endif /* CAIRO_HAS_WIN32_SURFACE */ } } break; } if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } static struct objtable gra2cairofile[] = { {"init", NVFUNC, NEXEC, gra2cairofile_init, NULL, 0}, {"done", NVFUNC, NEXEC, gra2cairofile_done, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"file", NSTR, NREAD | NWRITE, NULL, NULL,0}, {"text2path", NBOOL, NREAD | NWRITE, NULL, NULL,0}, {"format", NENUM, NREAD | NWRITE, NULL, surface_type, 0}, {"_output", NVFUNC, 0, gra2cairofile_output, NULL, 0}, {"_strwidth", NIFUNC, 0, gra2cairo_strwidth, NULL, 0}, {"_charascent", NIFUNC, 0, gra2cairo_charheight, NULL, 0}, {"_chardescent", NIFUNC, 0, gra2cairo_charheight, NULL, 0}, }; #define TBLNUM (sizeof(gra2cairofile) / sizeof(*gra2cairofile)) void * addgra2cairofile() /* addgra2cairofile() returns NULL on error */ { return addobject(NAME, NULL, PARENT, OVERSION, TBLNUM, gra2cairofile, Gra2CairoErrMsgNum, Gra2CairoErrMsgs, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/x11cood.c0000644000175000017500000000533014045741661013665 00000000000000/* * $Id: x11cood.c,v 1.15 2009-11-16 09:13:05 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include "ntime.h" #include "object.h" #include "axis.h" #include "gtk_subwin.h" #include "gtk_widget.h" #include "x11bitmp.h" #include "x11gui.h" #include "ox11menu.h" #include "x11menu.h" #include "x11cood.h" void CoordWinSetFont(const char *font) { if (NgraphApp.CoordWin.data.text && font) { set_widget_font(NgraphApp.CoordWin.data.text, font); } } void CoordWinSetCoord(int x, int y) { struct objlist *obj; int i, num, type; char *argv[3]; double a; char *name; struct SubWin *d; static GString *str = NULL; static int lock = FALSE; d = &(NgraphApp.CoordWin); obj = chkobject("axis"); if (d->Win == NULL || obj == NULL || d->data.text == NULL) { return; } num = chkobjlastinst(obj) + 1; if (lock) { return; } lock = TRUE; if (str == NULL) { str = g_string_new(""); gtk_label_set_text(GTK_LABEL(d->data.text), ""); if (str == NULL) { lock = FALSE; return; } } g_string_printf(str, "(X:%6.2f Y:%6.2f)", x / 100.0, y / 100.0); argv[0] = (char *) &x; argv[1] = (char *) &y; argv[2] = NULL; for (i = 0; i < num; i++) { if (getobj(obj, "coordinate", i, 2, argv, &a) == -1) { continue; } getobj(obj, "group", i, 0, NULL, &name); getobj(obj, "type", i, 0, NULL, &type); g_string_append_printf(str, "\n%2d %5s %+.7e", i, name, a); if (type == AXIS_TYPE_MJD) { char *s; s = nstrftime("\n %F %T", a); if (s) { g_string_append(str, s); g_free(s); } } } gtk_label_set_text(GTK_LABEL(d->data.text), str->str); lock = FALSE; } void CoordWinUpdate(int clear) { } GtkWidget * CoordWinCreate(struct SubWin *d) { if (d->Win) { return d->Win; } label_sub_window_create(d); CoordWinSetFont(Menulocal.coordwin_font); return d->Win; } ngraph-gtk-6.09.05/src/gtk/Makefile.in0000644000175000017500000023032314143146775014316 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @OS_OSX_TRUE@@OS_WIN32_FALSE@am__append_1 = $(MAC_INTEGRATION_CFLAGS) subdir = src/gtk ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libngraphui_la_LIBADD = am_libngraphui_la_OBJECTS = libngraphui_la-gtk_combo.lo \ libngraphui_la-gtk_entry_completion.lo \ libngraphui_la-gtk_liststore.lo libngraphui_la-gtk_subwin.lo \ libngraphui_la-ogra2x11.lo libngraphui_la-ogra2cairo.lo \ libngraphui_la-ogra2emf.lo libngraphui_la-ogra2cairofile.lo \ libngraphui_la-ogra2gtkprint.lo libngraphui_la-ogra2gdk.lo \ libngraphui_la-ox11dlg.lo libngraphui_la-ox11menu.lo \ libngraphui_la-x11axis.lo libngraphui_la-x11commn.lo \ libngraphui_la-x11cood.lo libngraphui_la-x11dialg.lo \ libngraphui_la-x11file.lo libngraphui_la-x11graph.lo \ libngraphui_la-x11gui.lo libngraphui_la-x11info.lo \ libngraphui_la-x11lgnd.lo libngraphui_la-x11lgndx.lo \ libngraphui_la-x11menu.lo libngraphui_la-x11merge.lo \ libngraphui_la-x11opt.lo libngraphui_la-x11print.lo \ libngraphui_la-x11view.lo libngraphui_la-gtk_widget.lo \ libngraphui_la-gtk_ruler.lo libngraphui_la-init.lo \ libngraphui_la-gtk_action.lo \ libngraphui_la-sourcecompletionwords.lo \ libngraphui_la-completion_info.lo \ libngraphui_la-completion_info_data.lo \ libngraphui_la-gtk_presettings.lo \ libngraphui_la-x11parameter.lo nodist_libngraphui_la_OBJECTS = libngraphui_la-ngraphui.resources.lo libngraphui_la_OBJECTS = $(am_libngraphui_la_OBJECTS) \ $(nodist_libngraphui_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libngraphui_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libngraphui_la_CFLAGS) $(CFLAGS) $(libngraphui_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libngraphui_la-completion_info.Plo \ ./$(DEPDIR)/libngraphui_la-completion_info_data.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_action.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_combo.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_entry_completion.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_liststore.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_presettings.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_ruler.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_subwin.Plo \ ./$(DEPDIR)/libngraphui_la-gtk_widget.Plo \ ./$(DEPDIR)/libngraphui_la-init.Plo \ ./$(DEPDIR)/libngraphui_la-ngraphui.resources.Plo \ ./$(DEPDIR)/libngraphui_la-ogra2cairo.Plo \ ./$(DEPDIR)/libngraphui_la-ogra2cairofile.Plo \ ./$(DEPDIR)/libngraphui_la-ogra2emf.Plo \ ./$(DEPDIR)/libngraphui_la-ogra2gdk.Plo \ ./$(DEPDIR)/libngraphui_la-ogra2gtkprint.Plo \ ./$(DEPDIR)/libngraphui_la-ogra2x11.Plo \ ./$(DEPDIR)/libngraphui_la-ox11dlg.Plo \ ./$(DEPDIR)/libngraphui_la-ox11menu.Plo \ ./$(DEPDIR)/libngraphui_la-sourcecompletionwords.Plo \ ./$(DEPDIR)/libngraphui_la-x11axis.Plo \ ./$(DEPDIR)/libngraphui_la-x11commn.Plo \ ./$(DEPDIR)/libngraphui_la-x11cood.Plo \ ./$(DEPDIR)/libngraphui_la-x11dialg.Plo \ ./$(DEPDIR)/libngraphui_la-x11file.Plo \ ./$(DEPDIR)/libngraphui_la-x11graph.Plo \ ./$(DEPDIR)/libngraphui_la-x11gui.Plo \ ./$(DEPDIR)/libngraphui_la-x11info.Plo \ ./$(DEPDIR)/libngraphui_la-x11lgnd.Plo \ ./$(DEPDIR)/libngraphui_la-x11lgndx.Plo \ ./$(DEPDIR)/libngraphui_la-x11menu.Plo \ ./$(DEPDIR)/libngraphui_la-x11merge.Plo \ ./$(DEPDIR)/libngraphui_la-x11opt.Plo \ ./$(DEPDIR)/libngraphui_la-x11parameter.Plo \ ./$(DEPDIR)/libngraphui_la-x11print.Plo \ ./$(DEPDIR)/libngraphui_la-x11view.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libngraphui_la_SOURCES) $(nodist_libngraphui_la_SOURCES) DIST_SOURCES = $(libngraphui_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ NGRAPH_ICONS = data/pixmaps/ngraph_align_b.png \ data/pixmaps/ngraph_align_hc.png \ data/pixmaps/ngraph_align_l.png \ data/pixmaps/ngraph_align_r.png \ data/pixmaps/ngraph_align_t.png \ data/pixmaps/ngraph_align_vc.png data/pixmaps/ngraph_icon.png \ data/pixmaps/ngraph_icon64.png data/pixmaps/ngraph_math.png \ data/pixmaps/none_begin-symbolic.svg \ data/pixmaps/none_end-symbolic.svg \ data/pixmaps/arrow_begin-symbolic.svg \ data/pixmaps/arrow_end-symbolic.svg \ data/pixmaps/wave_begin-symbolic.svg \ data/pixmaps/wave_end-symbolic.svg \ data/pixmaps/mark_begin-symbolic.svg \ data/pixmaps/mark_end-symbolic.svg \ data/pixmaps/bar_begin-symbolic.svg \ data/pixmaps/bar_end-symbolic.svg \ data/pixmaps/stroke_fill_0-symbolic.svg \ data/pixmaps/stroke_fill_1-symbolic.svg \ data/pixmaps/stroke_fill_2-symbolic.svg \ data/pixmaps/stroke_fill_3-symbolic.svg \ data/pixmaps/stroke_fill_4-symbolic.svg \ data/pixmaps/stroke_fill_5-symbolic.svg \ data/pixmaps/stroke_fill_6-symbolic.svg \ data/pixmaps/stroke_fill_7-symbolic.svg \ data/pixmaps/join_bevel-symbolic.svg \ data/pixmaps/join_miter-symbolic.svg \ data/pixmaps/join_round-symbolic.svg data/pixmaps/ngraph.svg \ data/pixmaps/ngraph_draw-symbolic.svg \ data/pixmaps/ngraph_draw-attention-symbolic.svg \ data/pixmaps/ngraph_eval-symbolic.svg \ data/pixmaps/ngraph_line-symbolic.svg \ data/pixmaps/ngraph_single-symbolic.svg \ data/pixmaps/ngraph_arc-symbolic.svg \ data/pixmaps/ngraph_filewin-symbolic.svg \ data/pixmaps/ngraph_mark-symbolic.svg \ data/pixmaps/ngraph_text-symbolic.svg \ data/pixmaps/ngraph_axispoint-symbolic.svg \ data/pixmaps/ngraph_frame-symbolic.svg \ data/pixmaps/ngraph_mergewin-symbolic.svg \ data/pixmaps/ngraph_trimming-symbolic.svg \ data/pixmaps/ngraph_axiswin-symbolic.svg \ data/pixmaps/ngraph_gauss-symbolic.svg \ data/pixmaps/ngraph_point-symbolic.svg \ data/pixmaps/ngraph_zoom-symbolic.svg \ data/pixmaps/ngraph_rect-symbolic.svg \ data/pixmaps/ngraph_cross-symbolic.svg \ data/pixmaps/ngraph_legendpoint-symbolic.svg \ data/pixmaps/ngraph_scale-symbolic.svg \ data/pixmaps/ngraph_datapoint-symbolic.svg \ data/pixmaps/ngraph_section-symbolic.svg \ data/pixmaps/ngraph_exchange-symbolic.svg \ data/pixmaps/ngraph_link-symbolic.svg \ data/pixmaps/linewidth_002-symbolic.svg \ data/pixmaps/linewidth_004-symbolic.svg \ data/pixmaps/linewidth_008-symbolic.svg \ data/pixmaps/linewidth_016-symbolic.svg \ data/pixmaps/linewidth_032-symbolic.svg \ data/pixmaps/linewidth_064-symbolic.svg \ data/pixmaps/linewidth_128-symbolic.svg \ data/pixmaps/ngraph_parameter-symbolic.svg EXTRA_DIST = dir_defs.h.in data/css/ngraph.css \ data/gtk/menus-common.ui.in data/gtk/menus-common-win.ui.in \ data/gtk/menus-common.ui.osx data/gtk/menus-appmenu.ui \ data/gtk/help-overlay.ui data/gtk/menus-tool.ui \ create_completion_info.rb completion_info_functions.txt \ completion_info_constants.txt data/ngraphui.resources.xml.in \ data/ngraphui.resources.xml.osx $(NGRAPH_ICONS) AM_CPPFLAGS = -DLOCALEDIR=\""@localedir@"\" noinst_LTLIBRARIES = libngraphui.la nodist_libngraphui_la_SOURCES = dir_defs.h ngraphui.resources.c libngraphui_la_SOURCES = gtk_common.h gtk_combo.c gtk_combo.h \ gtk_entry_completion.c gtk_entry_completion.h gtk_liststore.c \ gtk_liststore.h gtk_subwin.c gtk_subwin.h ogra2x11.c \ ogra2cairo.c ogra2emf.c ogra2cairo.h ogra2cairofile.c \ ogra2gtkprint.c ogra2cairofile.h ogra2x11.h ogra2gdk.c \ ogra2gdk.h ox11dlg.c ox11menu.c ox11menu.h x11axis.c \ x11axis.h x11bitmp.h x11commn.c x11commn.h x11cood.c \ x11cood.h x11dialg.c x11dialg.h x11file.c x11file.h \ x11graph.c x11graph.h x11gui.c x11gui.h x11info.c x11info.h \ x11lgnd.c x11lgnd.h x11lgndx.c x11menu.c x11menu.h x11merge.c \ x11merge.h x11opt.c x11opt.h x11opt_proto.h x11print.c \ x11print.h x11view.c x11view.h gtk_widget.c gtk_widget.h \ gtk_ruler.c gtk_ruler.h init.c init.h gtk_action.c \ gtk_action.h sourcecompletionwords.c sourcecompletionwords.h \ completion_info.c completion_info.h completion_info_data.c \ gtk_presettings.c gtk_presettings.h x11parameter.c \ x11parameter.h libngraph_cflags = $(am__append_1) @OS_OSX_FALSE@@OS_WIN32_FALSE@UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.in @OS_OSX_TRUE@@OS_WIN32_FALSE@UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.osx @OS_WIN32_TRUE@UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.in @OS_OSX_FALSE@@OS_WIN32_FALSE@MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common.ui.in @OS_OSX_TRUE@@OS_WIN32_FALSE@MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common.ui.osx @OS_WIN32_TRUE@MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common-win.ui.in uidir = data/gtk BUILT_SOURCES = ${nodist_libngraphui_la_SOURCES} ngraphconfdir = $(sysconfdir)/$(PACKAGE) pixmapdir = $(datadir)/pixmaps/$(PACKAGE) libngraphui_la_CFLAGS = $(GTK_CFLAGS) $(libngraph_cflags) -I$(top_builddir) -I$(builddir) -I$(srcdir)/.. -I$(srcdir)/../math $(GTKSOURCEVIEW_CFLAGS) libngraphui_la_LDFLAGS = $(GTKSOURCEVIEW_LIBS) CLEANFILES = dir_defs.h $(builddir)/data/gtk/menus-common.ui $(builddir)/data/ngraphui.resources.xml $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gtk/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/gtk/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libngraphui.la: $(libngraphui_la_OBJECTS) $(libngraphui_la_DEPENDENCIES) $(EXTRA_libngraphui_la_DEPENDENCIES) $(AM_V_CCLD)$(libngraphui_la_LINK) $(libngraphui_la_OBJECTS) $(libngraphui_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-completion_info.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-completion_info_data.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_action.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_combo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_entry_completion.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_liststore.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_presettings.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_ruler.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_subwin.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-gtk_widget.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ngraphui.resources.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ogra2cairo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ogra2cairofile.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ogra2emf.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ogra2gdk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ogra2gtkprint.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ogra2x11.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ox11dlg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-ox11menu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-sourcecompletionwords.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11axis.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11commn.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11cood.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11dialg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11file.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11graph.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11gui.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11info.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11lgnd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11lgndx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11menu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11merge.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11opt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11parameter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11print.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngraphui_la-x11view.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libngraphui_la-gtk_combo.lo: gtk_combo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_combo.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_combo.Tpo -c -o libngraphui_la-gtk_combo.lo `test -f 'gtk_combo.c' || echo '$(srcdir)/'`gtk_combo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_combo.Tpo $(DEPDIR)/libngraphui_la-gtk_combo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_combo.c' object='libngraphui_la-gtk_combo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_combo.lo `test -f 'gtk_combo.c' || echo '$(srcdir)/'`gtk_combo.c libngraphui_la-gtk_entry_completion.lo: gtk_entry_completion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_entry_completion.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_entry_completion.Tpo -c -o libngraphui_la-gtk_entry_completion.lo `test -f 'gtk_entry_completion.c' || echo '$(srcdir)/'`gtk_entry_completion.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_entry_completion.Tpo $(DEPDIR)/libngraphui_la-gtk_entry_completion.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_entry_completion.c' object='libngraphui_la-gtk_entry_completion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_entry_completion.lo `test -f 'gtk_entry_completion.c' || echo '$(srcdir)/'`gtk_entry_completion.c libngraphui_la-gtk_liststore.lo: gtk_liststore.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_liststore.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_liststore.Tpo -c -o libngraphui_la-gtk_liststore.lo `test -f 'gtk_liststore.c' || echo '$(srcdir)/'`gtk_liststore.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_liststore.Tpo $(DEPDIR)/libngraphui_la-gtk_liststore.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_liststore.c' object='libngraphui_la-gtk_liststore.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_liststore.lo `test -f 'gtk_liststore.c' || echo '$(srcdir)/'`gtk_liststore.c libngraphui_la-gtk_subwin.lo: gtk_subwin.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_subwin.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_subwin.Tpo -c -o libngraphui_la-gtk_subwin.lo `test -f 'gtk_subwin.c' || echo '$(srcdir)/'`gtk_subwin.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_subwin.Tpo $(DEPDIR)/libngraphui_la-gtk_subwin.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_subwin.c' object='libngraphui_la-gtk_subwin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_subwin.lo `test -f 'gtk_subwin.c' || echo '$(srcdir)/'`gtk_subwin.c libngraphui_la-ogra2x11.lo: ogra2x11.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ogra2x11.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ogra2x11.Tpo -c -o libngraphui_la-ogra2x11.lo `test -f 'ogra2x11.c' || echo '$(srcdir)/'`ogra2x11.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ogra2x11.Tpo $(DEPDIR)/libngraphui_la-ogra2x11.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2x11.c' object='libngraphui_la-ogra2x11.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ogra2x11.lo `test -f 'ogra2x11.c' || echo '$(srcdir)/'`ogra2x11.c libngraphui_la-ogra2cairo.lo: ogra2cairo.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ogra2cairo.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ogra2cairo.Tpo -c -o libngraphui_la-ogra2cairo.lo `test -f 'ogra2cairo.c' || echo '$(srcdir)/'`ogra2cairo.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ogra2cairo.Tpo $(DEPDIR)/libngraphui_la-ogra2cairo.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2cairo.c' object='libngraphui_la-ogra2cairo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ogra2cairo.lo `test -f 'ogra2cairo.c' || echo '$(srcdir)/'`ogra2cairo.c libngraphui_la-ogra2emf.lo: ogra2emf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ogra2emf.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ogra2emf.Tpo -c -o libngraphui_la-ogra2emf.lo `test -f 'ogra2emf.c' || echo '$(srcdir)/'`ogra2emf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ogra2emf.Tpo $(DEPDIR)/libngraphui_la-ogra2emf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2emf.c' object='libngraphui_la-ogra2emf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ogra2emf.lo `test -f 'ogra2emf.c' || echo '$(srcdir)/'`ogra2emf.c libngraphui_la-ogra2cairofile.lo: ogra2cairofile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ogra2cairofile.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ogra2cairofile.Tpo -c -o libngraphui_la-ogra2cairofile.lo `test -f 'ogra2cairofile.c' || echo '$(srcdir)/'`ogra2cairofile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ogra2cairofile.Tpo $(DEPDIR)/libngraphui_la-ogra2cairofile.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2cairofile.c' object='libngraphui_la-ogra2cairofile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ogra2cairofile.lo `test -f 'ogra2cairofile.c' || echo '$(srcdir)/'`ogra2cairofile.c libngraphui_la-ogra2gtkprint.lo: ogra2gtkprint.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ogra2gtkprint.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ogra2gtkprint.Tpo -c -o libngraphui_la-ogra2gtkprint.lo `test -f 'ogra2gtkprint.c' || echo '$(srcdir)/'`ogra2gtkprint.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ogra2gtkprint.Tpo $(DEPDIR)/libngraphui_la-ogra2gtkprint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2gtkprint.c' object='libngraphui_la-ogra2gtkprint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ogra2gtkprint.lo `test -f 'ogra2gtkprint.c' || echo '$(srcdir)/'`ogra2gtkprint.c libngraphui_la-ogra2gdk.lo: ogra2gdk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ogra2gdk.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ogra2gdk.Tpo -c -o libngraphui_la-ogra2gdk.lo `test -f 'ogra2gdk.c' || echo '$(srcdir)/'`ogra2gdk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ogra2gdk.Tpo $(DEPDIR)/libngraphui_la-ogra2gdk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ogra2gdk.c' object='libngraphui_la-ogra2gdk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ogra2gdk.lo `test -f 'ogra2gdk.c' || echo '$(srcdir)/'`ogra2gdk.c libngraphui_la-ox11dlg.lo: ox11dlg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ox11dlg.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ox11dlg.Tpo -c -o libngraphui_la-ox11dlg.lo `test -f 'ox11dlg.c' || echo '$(srcdir)/'`ox11dlg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ox11dlg.Tpo $(DEPDIR)/libngraphui_la-ox11dlg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ox11dlg.c' object='libngraphui_la-ox11dlg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ox11dlg.lo `test -f 'ox11dlg.c' || echo '$(srcdir)/'`ox11dlg.c libngraphui_la-ox11menu.lo: ox11menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ox11menu.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ox11menu.Tpo -c -o libngraphui_la-ox11menu.lo `test -f 'ox11menu.c' || echo '$(srcdir)/'`ox11menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ox11menu.Tpo $(DEPDIR)/libngraphui_la-ox11menu.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ox11menu.c' object='libngraphui_la-ox11menu.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ox11menu.lo `test -f 'ox11menu.c' || echo '$(srcdir)/'`ox11menu.c libngraphui_la-x11axis.lo: x11axis.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11axis.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11axis.Tpo -c -o libngraphui_la-x11axis.lo `test -f 'x11axis.c' || echo '$(srcdir)/'`x11axis.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11axis.Tpo $(DEPDIR)/libngraphui_la-x11axis.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11axis.c' object='libngraphui_la-x11axis.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11axis.lo `test -f 'x11axis.c' || echo '$(srcdir)/'`x11axis.c libngraphui_la-x11commn.lo: x11commn.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11commn.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11commn.Tpo -c -o libngraphui_la-x11commn.lo `test -f 'x11commn.c' || echo '$(srcdir)/'`x11commn.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11commn.Tpo $(DEPDIR)/libngraphui_la-x11commn.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11commn.c' object='libngraphui_la-x11commn.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11commn.lo `test -f 'x11commn.c' || echo '$(srcdir)/'`x11commn.c libngraphui_la-x11cood.lo: x11cood.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11cood.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11cood.Tpo -c -o libngraphui_la-x11cood.lo `test -f 'x11cood.c' || echo '$(srcdir)/'`x11cood.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11cood.Tpo $(DEPDIR)/libngraphui_la-x11cood.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11cood.c' object='libngraphui_la-x11cood.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11cood.lo `test -f 'x11cood.c' || echo '$(srcdir)/'`x11cood.c libngraphui_la-x11dialg.lo: x11dialg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11dialg.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11dialg.Tpo -c -o libngraphui_la-x11dialg.lo `test -f 'x11dialg.c' || echo '$(srcdir)/'`x11dialg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11dialg.Tpo $(DEPDIR)/libngraphui_la-x11dialg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11dialg.c' object='libngraphui_la-x11dialg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11dialg.lo `test -f 'x11dialg.c' || echo '$(srcdir)/'`x11dialg.c libngraphui_la-x11file.lo: x11file.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11file.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11file.Tpo -c -o libngraphui_la-x11file.lo `test -f 'x11file.c' || echo '$(srcdir)/'`x11file.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11file.Tpo $(DEPDIR)/libngraphui_la-x11file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11file.c' object='libngraphui_la-x11file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11file.lo `test -f 'x11file.c' || echo '$(srcdir)/'`x11file.c libngraphui_la-x11graph.lo: x11graph.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11graph.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11graph.Tpo -c -o libngraphui_la-x11graph.lo `test -f 'x11graph.c' || echo '$(srcdir)/'`x11graph.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11graph.Tpo $(DEPDIR)/libngraphui_la-x11graph.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11graph.c' object='libngraphui_la-x11graph.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11graph.lo `test -f 'x11graph.c' || echo '$(srcdir)/'`x11graph.c libngraphui_la-x11gui.lo: x11gui.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11gui.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11gui.Tpo -c -o libngraphui_la-x11gui.lo `test -f 'x11gui.c' || echo '$(srcdir)/'`x11gui.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11gui.Tpo $(DEPDIR)/libngraphui_la-x11gui.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11gui.c' object='libngraphui_la-x11gui.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11gui.lo `test -f 'x11gui.c' || echo '$(srcdir)/'`x11gui.c libngraphui_la-x11info.lo: x11info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11info.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11info.Tpo -c -o libngraphui_la-x11info.lo `test -f 'x11info.c' || echo '$(srcdir)/'`x11info.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11info.Tpo $(DEPDIR)/libngraphui_la-x11info.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11info.c' object='libngraphui_la-x11info.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11info.lo `test -f 'x11info.c' || echo '$(srcdir)/'`x11info.c libngraphui_la-x11lgnd.lo: x11lgnd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11lgnd.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11lgnd.Tpo -c -o libngraphui_la-x11lgnd.lo `test -f 'x11lgnd.c' || echo '$(srcdir)/'`x11lgnd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11lgnd.Tpo $(DEPDIR)/libngraphui_la-x11lgnd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11lgnd.c' object='libngraphui_la-x11lgnd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11lgnd.lo `test -f 'x11lgnd.c' || echo '$(srcdir)/'`x11lgnd.c libngraphui_la-x11lgndx.lo: x11lgndx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11lgndx.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11lgndx.Tpo -c -o libngraphui_la-x11lgndx.lo `test -f 'x11lgndx.c' || echo '$(srcdir)/'`x11lgndx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11lgndx.Tpo $(DEPDIR)/libngraphui_la-x11lgndx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11lgndx.c' object='libngraphui_la-x11lgndx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11lgndx.lo `test -f 'x11lgndx.c' || echo '$(srcdir)/'`x11lgndx.c libngraphui_la-x11menu.lo: x11menu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11menu.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11menu.Tpo -c -o libngraphui_la-x11menu.lo `test -f 'x11menu.c' || echo '$(srcdir)/'`x11menu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11menu.Tpo $(DEPDIR)/libngraphui_la-x11menu.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11menu.c' object='libngraphui_la-x11menu.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11menu.lo `test -f 'x11menu.c' || echo '$(srcdir)/'`x11menu.c libngraphui_la-x11merge.lo: x11merge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11merge.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11merge.Tpo -c -o libngraphui_la-x11merge.lo `test -f 'x11merge.c' || echo '$(srcdir)/'`x11merge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11merge.Tpo $(DEPDIR)/libngraphui_la-x11merge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11merge.c' object='libngraphui_la-x11merge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11merge.lo `test -f 'x11merge.c' || echo '$(srcdir)/'`x11merge.c libngraphui_la-x11opt.lo: x11opt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11opt.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11opt.Tpo -c -o libngraphui_la-x11opt.lo `test -f 'x11opt.c' || echo '$(srcdir)/'`x11opt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11opt.Tpo $(DEPDIR)/libngraphui_la-x11opt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11opt.c' object='libngraphui_la-x11opt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11opt.lo `test -f 'x11opt.c' || echo '$(srcdir)/'`x11opt.c libngraphui_la-x11print.lo: x11print.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11print.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11print.Tpo -c -o libngraphui_la-x11print.lo `test -f 'x11print.c' || echo '$(srcdir)/'`x11print.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11print.Tpo $(DEPDIR)/libngraphui_la-x11print.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11print.c' object='libngraphui_la-x11print.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11print.lo `test -f 'x11print.c' || echo '$(srcdir)/'`x11print.c libngraphui_la-x11view.lo: x11view.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11view.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11view.Tpo -c -o libngraphui_la-x11view.lo `test -f 'x11view.c' || echo '$(srcdir)/'`x11view.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11view.Tpo $(DEPDIR)/libngraphui_la-x11view.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11view.c' object='libngraphui_la-x11view.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11view.lo `test -f 'x11view.c' || echo '$(srcdir)/'`x11view.c libngraphui_la-gtk_widget.lo: gtk_widget.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_widget.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_widget.Tpo -c -o libngraphui_la-gtk_widget.lo `test -f 'gtk_widget.c' || echo '$(srcdir)/'`gtk_widget.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_widget.Tpo $(DEPDIR)/libngraphui_la-gtk_widget.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_widget.c' object='libngraphui_la-gtk_widget.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_widget.lo `test -f 'gtk_widget.c' || echo '$(srcdir)/'`gtk_widget.c libngraphui_la-gtk_ruler.lo: gtk_ruler.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_ruler.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_ruler.Tpo -c -o libngraphui_la-gtk_ruler.lo `test -f 'gtk_ruler.c' || echo '$(srcdir)/'`gtk_ruler.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_ruler.Tpo $(DEPDIR)/libngraphui_la-gtk_ruler.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_ruler.c' object='libngraphui_la-gtk_ruler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_ruler.lo `test -f 'gtk_ruler.c' || echo '$(srcdir)/'`gtk_ruler.c libngraphui_la-init.lo: init.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-init.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-init.Tpo -c -o libngraphui_la-init.lo `test -f 'init.c' || echo '$(srcdir)/'`init.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-init.Tpo $(DEPDIR)/libngraphui_la-init.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='init.c' object='libngraphui_la-init.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-init.lo `test -f 'init.c' || echo '$(srcdir)/'`init.c libngraphui_la-gtk_action.lo: gtk_action.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_action.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_action.Tpo -c -o libngraphui_la-gtk_action.lo `test -f 'gtk_action.c' || echo '$(srcdir)/'`gtk_action.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_action.Tpo $(DEPDIR)/libngraphui_la-gtk_action.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_action.c' object='libngraphui_la-gtk_action.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_action.lo `test -f 'gtk_action.c' || echo '$(srcdir)/'`gtk_action.c libngraphui_la-sourcecompletionwords.lo: sourcecompletionwords.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-sourcecompletionwords.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-sourcecompletionwords.Tpo -c -o libngraphui_la-sourcecompletionwords.lo `test -f 'sourcecompletionwords.c' || echo '$(srcdir)/'`sourcecompletionwords.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-sourcecompletionwords.Tpo $(DEPDIR)/libngraphui_la-sourcecompletionwords.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sourcecompletionwords.c' object='libngraphui_la-sourcecompletionwords.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-sourcecompletionwords.lo `test -f 'sourcecompletionwords.c' || echo '$(srcdir)/'`sourcecompletionwords.c libngraphui_la-completion_info.lo: completion_info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-completion_info.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-completion_info.Tpo -c -o libngraphui_la-completion_info.lo `test -f 'completion_info.c' || echo '$(srcdir)/'`completion_info.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-completion_info.Tpo $(DEPDIR)/libngraphui_la-completion_info.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='completion_info.c' object='libngraphui_la-completion_info.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-completion_info.lo `test -f 'completion_info.c' || echo '$(srcdir)/'`completion_info.c libngraphui_la-completion_info_data.lo: completion_info_data.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-completion_info_data.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-completion_info_data.Tpo -c -o libngraphui_la-completion_info_data.lo `test -f 'completion_info_data.c' || echo '$(srcdir)/'`completion_info_data.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-completion_info_data.Tpo $(DEPDIR)/libngraphui_la-completion_info_data.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='completion_info_data.c' object='libngraphui_la-completion_info_data.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-completion_info_data.lo `test -f 'completion_info_data.c' || echo '$(srcdir)/'`completion_info_data.c libngraphui_la-gtk_presettings.lo: gtk_presettings.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-gtk_presettings.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-gtk_presettings.Tpo -c -o libngraphui_la-gtk_presettings.lo `test -f 'gtk_presettings.c' || echo '$(srcdir)/'`gtk_presettings.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-gtk_presettings.Tpo $(DEPDIR)/libngraphui_la-gtk_presettings.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk_presettings.c' object='libngraphui_la-gtk_presettings.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-gtk_presettings.lo `test -f 'gtk_presettings.c' || echo '$(srcdir)/'`gtk_presettings.c libngraphui_la-x11parameter.lo: x11parameter.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-x11parameter.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-x11parameter.Tpo -c -o libngraphui_la-x11parameter.lo `test -f 'x11parameter.c' || echo '$(srcdir)/'`x11parameter.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-x11parameter.Tpo $(DEPDIR)/libngraphui_la-x11parameter.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11parameter.c' object='libngraphui_la-x11parameter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-x11parameter.lo `test -f 'x11parameter.c' || echo '$(srcdir)/'`x11parameter.c libngraphui_la-ngraphui.resources.lo: ngraphui.resources.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -MT libngraphui_la-ngraphui.resources.lo -MD -MP -MF $(DEPDIR)/libngraphui_la-ngraphui.resources.Tpo -c -o libngraphui_la-ngraphui.resources.lo `test -f 'ngraphui.resources.c' || echo '$(srcdir)/'`ngraphui.resources.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngraphui_la-ngraphui.resources.Tpo $(DEPDIR)/libngraphui_la-ngraphui.resources.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngraphui.resources.c' object='libngraphui_la-ngraphui.resources.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libngraphui_la_CFLAGS) $(CFLAGS) -c -o libngraphui_la-ngraphui.resources.lo `test -f 'ngraphui.resources.c' || echo '$(srcdir)/'`ngraphui.resources.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libngraphui_la-completion_info.Plo -rm -f ./$(DEPDIR)/libngraphui_la-completion_info_data.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_action.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_combo.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_entry_completion.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_liststore.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_presettings.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_ruler.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_subwin.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_widget.Plo -rm -f ./$(DEPDIR)/libngraphui_la-init.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ngraphui.resources.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2cairo.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2cairofile.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2emf.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2gdk.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2gtkprint.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2x11.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ox11dlg.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ox11menu.Plo -rm -f ./$(DEPDIR)/libngraphui_la-sourcecompletionwords.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11axis.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11commn.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11cood.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11dialg.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11file.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11graph.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11gui.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11info.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11lgnd.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11lgndx.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11menu.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11merge.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11opt.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11parameter.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11print.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11view.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libngraphui_la-completion_info.Plo -rm -f ./$(DEPDIR)/libngraphui_la-completion_info_data.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_action.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_combo.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_entry_completion.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_liststore.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_presettings.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_ruler.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_subwin.Plo -rm -f ./$(DEPDIR)/libngraphui_la-gtk_widget.Plo -rm -f ./$(DEPDIR)/libngraphui_la-init.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ngraphui.resources.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2cairo.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2cairofile.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2emf.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2gdk.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2gtkprint.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ogra2x11.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ox11dlg.Plo -rm -f ./$(DEPDIR)/libngraphui_la-ox11menu.Plo -rm -f ./$(DEPDIR)/libngraphui_la-sourcecompletionwords.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11axis.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11commn.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11cood.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11dialg.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11file.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11graph.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11gui.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11info.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11lgnd.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11lgndx.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11menu.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11merge.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11opt.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11parameter.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11print.Plo -rm -f ./$(DEPDIR)/libngraphui_la-x11view.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile data/ngraphui.resources.xml: $(UI_RESOURCES_SOURCE) $(MKDIR_P) $(uidir) cp $< $@ $(uidir)/menus-common.ui: $(MENU_UI_SOURCE) $(MKDIR_P) $(uidir) cp $< $@ ngraphui.resources.c: data/ngraphui.resources.xml $(uidir)/menus-common.ui $(srcdir)/data/gtk/menus-tool.ui $(srcdir)/data/css/ngraph.css $(srcdir)/data/gtk/help-overlay.ui $(uidir)/menus-appmenu.ui $(NGRAPH_ICONS) $(GLIB_COMPILE_RESOURCES) --target=$@ --generate-source --sourcedir $(srcdir)/data --sourcedir $(builddir)/data $< dir_defs.h: dir_defs.h.in $(top_srcdir)/pathconv.sh $(SHELL) $(top_srcdir)/pathconv.sh $(srcdir)/dir_defs.h.in completion_info_data.c: $(srcdir)/completion_info_functions.txt $(srcdir)/completion_info_constants.txt $(srcdir)/create_completion_info.rb ruby $(srcdir)/create_completion_info.rb $(srcdir)/completion_info_functions.txt $(srcdir)/completion_info_constants.txt completion_info_data.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/src/gtk/ogra2x11.h0000644000175000017500000000164413070106167013755 00000000000000/* * $Id: ogra2x11.h,v 1.2 2008-12-31 12:30:49 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ void *addgra2gtk(void); ngraph-gtk-6.09.05/src/gtk/gtk_presettings.h0000644000175000017500000000142414142161773015626 00000000000000#ifndef GTK_PRESETTINGS_HEADER #define GTK_PRESETTINGS_HEADER #include "object.h" #include "odraw.h" #include "x11menu.h" struct presettings { int line_width, line_style; int type, interpolation; int mark_type_begin, mark_type_end; int mark_type, mark_size; enum JOIN_TYPE join; enum MARKER_TYPE marker_begin, marker_end; int fill, stroke, close_path; int r1, g1, b1, a1, r2, g2, b2, a2; }; GtkWidget *presetting_create_panel(GtkApplication *app); void presetting_set_obj_field(struct objlist *obj, int id); void presetting_set_visibility(enum PointerType type); void presetting_set_parameters(struct Viewer *d); void presetting_show_focused(void); void presetting_set_fonts(void); void presetting_get(struct presettings *setting); #endif /* GTK_PRESETTINGS_HEADER */ ngraph-gtk-6.09.05/src/gtk/x11merge.h0000644000175000017500000000223113702004142014023 00000000000000/* * $Id: x11merge.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ void MergeWinUpdate(struct obj_list_data *d, int clear, int draw); void CmMergeOpen(void *w, gpointer client_data); void CmMergeClose(void *w, gpointer client_data); void CmMergeUpdate(void *w, gpointer client_data); GtkWidget *create_merge_list(struct SubWin *d); ngraph-gtk-6.09.05/src/gtk/completion_info.c0000644000175000017500000000317214050120433015555 00000000000000#include "completion_info.h" static int check_paren(GtkTextIter *iter) { GtkTextIter cur; gunichar ch, paren; paren = g_utf8_get_char("("); cur = *iter; while (1) { ch = gtk_text_iter_get_char(&cur); if (! g_unichar_isspace(ch)) { break; } gtk_text_iter_forward_char(&cur); } return (ch == paren); } static GList * completion_info_populate(struct completion_info *info, const char *word, int len, GtkTextIter *iter) { GList *ret = NULL; int i; const char *text; for (i = 0; info[i].lower_text; i++) { int r; r = strncmp(info[i].lower_text, word, len); if (r < 0) { continue; } else if (r > 0) { break; } if (info[i].proposal == NULL) { GtkSourceCompletionItem *proposal; proposal = gtk_source_completion_item_new(); gtk_source_completion_item_set_label(proposal, info[i].text); gtk_source_completion_item_set_text(proposal, info[i].text); gtk_source_completion_item_set_info(proposal, _(info[i].info)); info[i].proposal = proposal; } if (info[i].text_wo_paren && check_paren(iter)) { text = info[i].text_wo_paren; } else { text = info[i].text; } gtk_source_completion_item_set_text(info[i].proposal, text); ret = g_list_prepend (ret, info[i].proposal); } return ret; } GList * completion_info_func_populate(const char *word, int len, GtkTextIter *iter) { return completion_info_populate(completion_info_func, word, len, iter); } GList * completion_info_const_populate(const char *word, int len, GtkTextIter *iter) { return completion_info_populate(completion_info_const, word, len, iter); } ngraph-gtk-6.09.05/src/gtk/x11view.h0000644000175000017500000000460014105343057013711 00000000000000/* * $Id: x11view.h,v 1.12 2009-05-01 09:15:59 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define DROP_TYPE_FILE 0 #define DROP_TYPE_TEXT 1 #define FILE_TYPE_AUTO 0 #define FILE_TYPE_MERGE 1 #define FILE_TYPE_DATA 2 #define ROTATE_CLOCKWISE 0 #define ROTATE_COUNTERCLOCKWISE 1 struct Point { int x, y; }; struct FocusObj { struct objlist *obj; int oid; }; enum FOCU_OBJ_TYPE { FOCUS_OBJ_TYPE_AXIS = 0x01, FOCUS_OBJ_TYPE_MERGE = 0x02, FOCUS_OBJ_TYPE_LEGEND = 0x04, FOCUS_OBJ_TYPE_TEXT = 0x08, }; enum FOCUS_MODE { FOCUS_MODE_NORMAL = 0, FOCUS_MODE_APPEND = 1, FOCUS_MODE_TOGGLE = 2, }; void ViewerWinSetup(void); void ViewerWinClose(void); void ViewerWinUpdate(char const **objects); void ViewerSelectAllObj(struct objlist *obj); void OpenGC(void); void CloseGC(void); void SetScroller(void); void Focus(struct objlist *fobj, int id, enum FOCUS_MODE mode); void UnFocus(void); void ChangeDPI(void); void Draw(int SelectFile); void CmViewerClear(void *w, gpointer client_data); void CmViewerDraw(void *w, gpointer client_data); gboolean CmViewerButtonPressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data); int data_dropped(char **filenames, int num, int file_type); void draw_paper_frame(void); void CmEditMenuCB(void *w, gpointer client_data); void ViewCross(int state); void ViewerUpdateCB(void *w, gpointer client_data); int check_focused_obj_type(const struct Viewer *d, int *type); void move_data_cancel(struct Viewer *d, gboolean show_message); int check_paint_lock(void); void update_bg(void); int get_focused_obj_array(struct narray *focusobj, char **objs); ngraph-gtk-6.09.05/src/gtk/x11menu.h0000644000175000017500000002106514142166331013706 00000000000000/* * $Id: x11menu.h,v 1.48 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for GTK". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for GTK" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for GTK" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef GTK_MENU_HEADER #define GTK_MENU_HEADER #include "common.h" #include "gtk_liststore.h" #include "ogra2cairo.h" #define N2GTK_RULER_METRIC(v) ((v) / 100.0 * 72.0 / 25.4 * 10) #define MARK_PIX_SIZE 24 enum MenuID { MenuIdGraphNewFrame, MenuIdGraphNewSection, MenuIdGraphNewCross, MenuIdGraphAllClear, MenuIdEditRedo, MenuIdEditUndo, MenuIdEditCut, MenuIdEditCopy, MenuIdEditPaste, MenuIdEditDelete, MenuIdEditDuplicate, MenuIdEditSelectAll, MenuIdAlignLeft, MenuIdAlignVCenter, MenuIdAlignRight, MenuIdAlignTop, MenuIdAlignHCenter, MenuIdAlignBottom, MenuIdEditRotateCW, MenuIdEditRotateCCW, MenuIdEditFlipHorizontally, MenuIdEditFlipVertically, MenuIdOutputGRAFile, MenuIdOutputPSFile, MenuIdOutputEPSFile, MenuIdOutputPNGFile, MenuIdOutputCairoEMFFile, MenuIdOutputEMFFile, MenuIdOutputEMFClipboard, MenuIdOutputPDFFile, MenuIdOutputSVGFile, MenuIdToggleSidebar, MenuIdToggleStatusbar, MenuIdToggleRuler, MenuIdToggleScrollbar, MenuIdToggleCToolbar, MenuIdTogglePToolbar, MenuIdToggleCrossGauge, MenuIdToggleGridLine, MenuIdEditOrderTop, MenuIdEditOrderUp, MenuIdEditOrderDown, MenuIdEditOrderBottom, }; enum { RECENT_TYPE_GRAPH, RECENT_TYPE_DATA, }; enum DrawLockVal {DrawLockNone, DrawLockDraw, DrawLockExpose}; enum PointerType { PointB = 0x000001, LegendB = 0x000002, PathB = 0x000004, RectB = 0x000008, ArcB = 0x000010, MarkB = 0x000020, TextB = 0x000040, GaussB = 0x000080, AxisB = 0x000100, TrimB = 0x000200, FrameB = 0x000400, SectionB = 0x000800, CrossB = 0x001000, SingleB = 0x002000, DataB = 0x004000, EvalB = 0x008000, ZoomB = 0x010000, }; #define POINT_TYPE_POINT (PointB | LegendB | AxisB) #define POINT_TYPE_DRAW1 (ArcB | RectB | GaussB | FrameB | SectionB | CrossB) #define POINT_TYPE_DRAW2 (PathB | SingleB) #define POINT_TYPE_DRAW3 (TextB | MarkB) #define POINT_TYPE_DRAW_ALL (POINT_TYPE_DRAW1 | POINT_TYPE_DRAW2 | POINT_TYPE_DRAW3) #define POINT_TYPE_TRIM (TrimB | DataB | EvalB) enum _n_line_type { N_LINE_TYPE_SOLID, N_LINE_TYPE_DOT, }; enum MouseMode { MOUSENONE, MOUSEPOINT, MOUSEDRAG, MOUSEZOOM1, MOUSEZOOM2, MOUSEZOOM3, MOUSEZOOM4, MOUSECHANGE, MOUSESCROLLE, }; enum PointerMode { PointerModeBoth, PointerModeLegend, PointerModeAxis, PointerModeData, PointerModeNum, PointerModeDefault, PointerModeFocus, PointerModeFocusAxis, PointerModeFocusLegend, }; enum pop_up_menu_item_type { POP_UP_MENU_ITEM_TYPE_NORMAL, POP_UP_MENU_ITEM_TYPE_CHECK, POP_UP_MENU_ITEM_TYPE_MENU, POP_UP_MENU_ITEM_TYPE_SEPARATOR, POP_UP_MENU_ITEM_TYPE_RECENT_GRAPH, POP_UP_MENU_ITEM_TYPE_RECENT_DATA, POP_UP_MENU_ITEM_TYPE_END, }; struct ScrollPrm { double x, y; }; struct ZoomPrm { int x, y, dpi; int focused; double scale; }; struct DragPrm { int x, y; int active; double vx, vy; }; struct DecelerationPrm { guint id; guint64 start; }; #define VIEWER_POPUP_ITEM_NUM 14 struct Viewer { GtkWidget *Win; GtkWidget *VScroll, *HScroll, *popup, *VRuler, *HRuler, *side_pane1, *side_pane2, *side_pane3, *main_pane; int ShowFrame, ShowLine, ShowRect; int Capture, MoveData, KeyMask; enum MouseMode MouseMode; enum PointerType Mode; struct narray *focusobj, *points; int FrameOfsX, FrameOfsY; int MouseX1, MouseY1, MouseX2, MouseY2, MouseDX, MouseDY; int RefX1, RefY1, RefX2, RefY2, ChangePoint; int LineX, LineY, Angle; int cx, cy; int ignoreredraw; double vscroll, hscroll, ZoomX, ZoomY, CrossX, CrossY; struct ZoomPrm zoom_prm; struct DragPrm drag_prm; struct DecelerationPrm deceleration_prm; struct ScrollPrm scroll_prm; cairo_surface_t *focused_pix; }; enum SubWinType { TypeFileWin, TypeAxisWin, TypePathWin, TypeRectWin, TypeArcWin, TypeMarkWin, TypeTextWin, TypeMergeWin, TypeParameterWin, TypeCoordWin, TypeInfoWin, }; struct SubWin; struct obj_list_data { GtkWidget *popup, **popup_item; GtkWidget *text; int select, can_focus; void (* update)(struct obj_list_data *data, int, int); void (* delete)(struct obj_list_data *data, int); void (* setup_dialog)(struct obj_list_data *data, int id, int user_data); int (* undo_save)(int type); void *dialog; gboolean (* ev_key) (GtkWidget *, guint, GdkModifierType, gpointer); struct objlist *obj; struct SubWin *parent; n_list_store *list; int list_col_num; }; typedef void (* sub_window_state_func) (struct SubWin *d, int state); struct SubWin { enum SubWinType type; GtkWidget *Win; union { struct obj_list_data *data; GtkWidget *text; } data; }; #define MENU_HISTORY_NUM 10 struct NgraphApp { char *FileName; GtkWidget *Message, *Message_pos, *Message_extra; gint Message1; GtkRecentManager *recent_manager; GtkEntryCompletion *legend_text_list, *x_math_list, *y_math_list, *func_list, *fit_list; cairo_surface_t *markpix[MARK_TYPE_NUM]; GdkCursor **cursor; struct Viewer Viewer; struct SubWin FileWin; struct SubWin AxisWin; struct SubWin PathWin; struct SubWin RectWin; struct SubWin ArcWin; struct SubWin MarkWin; struct SubWin TextWin; struct SubWin MergeWin; struct SubWin ParameterWin; struct SubWin CoordWin; struct SubWin InfoWin; }; extern int Menulock, DnDLock; extern struct NgraphApp NgraphApp; extern GtkWidget *TopLevel; extern GtkApplication *GtkApp; enum MENU_UNDO_TYPE { UNDO_TYPE_EDIT, UNDO_TYPE_MOVE, UNDO_TYPE_ROTATE, UNDO_TYPE_FLIP, UNDO_TYPE_DELETE, UNDO_TYPE_CREATE, UNDO_TYPE_ALIGN, UNDO_TYPE_ORDER, UNDO_TYPE_COPY, UNDO_TYPE_SHLL, UNDO_TYPE_ADDIN, UNDO_TYPE_CLEAR_SCALE, UNDO_TYPE_UNDO_SCALE, UNDO_TYPE_OPEN_FILE, UNDO_TYPE_ADD_RANGE, UNDO_TYPE_PASTE, UNDO_TYPE_ZOOM, UNDO_TYPE_AUTOSCALE, UNDO_TYPE_TRIMMING, UNDO_TYPE_DUMMY, UNDO_TYPE_NUM, }; struct EventLoopInfo { int type; guint32 time; }; enum RerawFlag { DRAW_NONE = 0, DRAW_REDRAW = 1, DRAW_NOTIFY = 2, DRAW_AXIS_ONLY = 4, }; enum TOOLBOX_MODE { TOOLBOX_MODE_TOOLBAR, TOOLBOX_MODE_SETTING_PANEL, }; void set_toolbox_mode(enum TOOLBOX_MODE mode); enum TOOLBOX_MODE get_toolbox_mode(void); int application(char *file); void set_current_window(GtkWidget *w); GtkWidget *get_current_window(void); GtkWidget *create_recent_menu(int type); void UpdateAll(char **objects); void UpdateAll2(char **objects, int redraw); void ChangePage(void); void NSetCursor(unsigned int type); unsigned int NGetCursor(void); void reset_event(void); void SetStatusBar(const char *mes); void ResetStatusBar(void); int PutStderr(const char *s); int PutStdout(const char *s); void DisplayDialog(const char *str); int ChkInterrupt(void); int InputYN(const char *mes); void QuitGUI(void); void menu_lock(int lock); void set_draw_lock(int lock); int find_gra2gdk_inst(struct objlist **o, N_VALUE **i, struct objlist **ro, int *routput, struct gra2cairo_local **rlocal); void set_axis_undo_button_sensitivity(int state); void set_modified_state(int state); void set_focus_insensitive(const struct Viewer *d); void set_focus_sensitivity(const struct Viewer *d); void create_addin_menu(void); void create_recent_data_menu(void); void set_pointer_mode(int id); void set_toggle_action_widget_state(int id, int state); void script_exec(GtkWidget *w, gpointer client_data); int toggle_view(int type, int state); void show_recent_dialog(int type); int menu_save_undo(enum MENU_UNDO_TYPE type, char **obj); int menu_save_undo_single(enum MENU_UNDO_TYPE type, char *obj); void menu_delete_undo(int id); void menu_clear_undo(void); void menu_undo_internal(int id); void menu_undo(void); void menu_redo(void); int get_graph_modified(void); void set_graph_modified(void); void set_graph_modified_gra(void); void reset_graph_modified(void); void draw_notify(int notify); #endif ngraph-gtk-6.09.05/src/gtk/create_completion_info.rb0000644000175000017500000000345213624701076017300 00000000000000# -*- coding: utf-8 -*- class CompletionInfo DataTypeFunc = 0 DataTypeConst = 1 def initialize(func_file, const_file) @func_data = [] @const_data = [] load_data(DataTypeFunc, func_file, @func_data) load_data(DataTypeConst, const_file, @const_data) end def func_struct(info) function = info[0].sub(/\(.+\)/, '()') args = ($&) ? $&.gsub(/[()]/, '') : "" func_name = function.split("(")[0] lfunc = func_name.downcase title = "#{func_name}(#{args})" info_text = info[1].gsub('"', '\\"') %Q!{"#{lfunc}", "#{function}", "#{func_name}", N_("#{title}\\n#{info_text}"), NULL},! end def const_struct(info) info_text = info[1].gsub('"', '\\"') %Q!{"#{info[0].downcase}", "#{info[0]}", NULL, N_("#{info[0]}\\n#{info_text}"), NULL},! end def load_data(type, file, ary) File.open(file, "r:utf-8") { |info_file| info_file.each { |l| info = l.chomp.split(/\t+/) data = if (type == DataTypeFunc) func_struct(info) else const_struct(info) end ary.push(data) } } ary.sort! end def save_sruct(type, data, c_file) c_file.puts("struct completion_info completion_info_#{type}[] = {") data.each {|info| c_file.puts(info) } c_file.puts("{NULL, NULL, NULL, NULL, NULL}") c_file.puts("};") end def save_data(filename) File.open(filename, "w:utf-8") { |c_file| c_file.puts('/* -*- Mode: C; coding: utf-8 -*- */') c_file.puts('#include "gtk_common.h"') c_file.puts('#include "completion_info.h"') save_sruct("func", @func_data, c_file) save_sruct("const", @const_data, c_file) } end end completion_info = CompletionInfo.new(ARGV[0], ARGV[1]) completion_info.save_data(ARGV[2]) ngraph-gtk-6.09.05/src/gtk/x11file.h0000644000175000017500000000352713702004142013654 00000000000000/* * $Id: x11file.h,v 1.4 2009-07-26 13:01:40 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ struct evaltype { int id; int line; double x, y; }; const char *get_plot_info_str(struct objlist *obj, int id, int src); void FileWinUpdate(struct obj_list_data *data, int clear, int draw); void CmFileHistory(GtkRecentChooser *w, gpointer client_data); void CmRangeAdd(void *w, gpointer client_data); void CmFileNew(void *w, gpointer client_data); void CmFileOpen(void *w, gpointer client_data); void CmFileClose(void *w, gpointer client_data); void CmFileUpdate(void *w, gpointer client_data); void CmFileEdit(void *w, gpointer client_data); void CmFileMath(void *w, gpointer client_data); void CmFileSaveData(void *w, gpointer client_data); GtkWidget *create_data_list(struct SubWin *d); void CmOptionFileDef(void *w, gpointer client_data); int update_file_obj_multi(struct objlist *obj, struct narray *farray, int newfile); void copy_file_obj_field(struct objlist *obj, int id, int sel, int copy_filename); void button_set_mark_image(GtkWidget *w, int type); ngraph-gtk-6.09.05/src/gtk/data/0000755000175000017500000000000014143613315013224 500000000000000ngraph-gtk-6.09.05/src/gtk/data/ngraphui.resources.xml.osx0000644000175000017500000000704413716736105020341 00000000000000 gtk/menus-common.ui gtk/menus-appmenu.ui gtk/help-overlay.ui gtk/menus-tool.ui pixmaps/ngraph_align_b.png pixmaps/ngraph_align_hc.png pixmaps/ngraph_align_l.png pixmaps/ngraph_align_r.png pixmaps/ngraph_align_t.png pixmaps/ngraph_align_vc.png pixmaps/ngraph_arc-symbolic.svg pixmaps/ngraph_axispoint-symbolic.svg pixmaps/ngraph_axiswin-symbolic.svg pixmaps/ngraph_cross-symbolic.svg pixmaps/ngraph_datapoint-symbolic.svg pixmaps/ngraph_draw-symbolic.svg pixmaps/ngraph_draw-attention-symbolic.svg pixmaps/ngraph_eval-symbolic.svg pixmaps/ngraph_parameter-symbolic.svg pixmaps/ngraph_filewin-symbolic.svg pixmaps/ngraph_frame-symbolic.svg pixmaps/ngraph_gauss-symbolic.svg pixmaps/ngraph.svg pixmaps/ngraph_icon.png pixmaps/ngraph_icon64.png pixmaps/ngraph_legendpoint-symbolic.svg pixmaps/ngraph_line-symbolic.svg pixmaps/ngraph_mark-symbolic.svg pixmaps/ngraph_math.png pixmaps/ngraph_mergewin-symbolic.svg pixmaps/ngraph_point-symbolic.svg pixmaps/ngraph_rect-symbolic.svg pixmaps/ngraph_scale-symbolic.svg pixmaps/ngraph_section-symbolic.svg pixmaps/ngraph_single-symbolic.svg pixmaps/ngraph_text-symbolic.svg pixmaps/ngraph_trimming-symbolic.svg pixmaps/ngraph_zoom-symbolic.svg pixmaps/ngraph_exchange-symbolic.svg pixmaps/ngraph_link-symbolic.svg pixmaps/none_begin-symbolic.svg pixmaps/none_end-symbolic.svg pixmaps/arrow_begin-symbolic.svg pixmaps/arrow_end-symbolic.svg pixmaps/wave_begin-symbolic.svg pixmaps/wave_end-symbolic.svg pixmaps/mark_begin-symbolic.svg pixmaps/mark_end-symbolic.svg pixmaps/bar_begin-symbolic.svg pixmaps/bar_end-symbolic.svg pixmaps/join_bevel-symbolic.svg pixmaps/join_miter-symbolic.svg pixmaps/join_round-symbolic.svg pixmaps/stroke_fill_0-symbolic.svg pixmaps/stroke_fill_1-symbolic.svg pixmaps/stroke_fill_2-symbolic.svg pixmaps/stroke_fill_3-symbolic.svg pixmaps/stroke_fill_4-symbolic.svg pixmaps/stroke_fill_5-symbolic.svg pixmaps/stroke_fill_6-symbolic.svg pixmaps/stroke_fill_7-symbolic.svg pixmaps/linewidth_002-symbolic.svg pixmaps/linewidth_004-symbolic.svg pixmaps/linewidth_008-symbolic.svg pixmaps/linewidth_016-symbolic.svg pixmaps/linewidth_032-symbolic.svg pixmaps/linewidth_064-symbolic.svg pixmaps/linewidth_128-symbolic.svg css/ngraph.css ngraph-gtk-6.09.05/src/gtk/data/css/0000755000175000017500000000000014143613315014014 500000000000000ngraph-gtk-6.09.05/src/gtk/data/css/ngraph.css0000644000175000017500000000053413630431460015726 00000000000000@binding-set CloseWindow1 { bind "w" { "close" () }; } dialog { -gtk-key-bindings: CloseWindow1; } button#StrokeColorButton > colorswatch > overlay { background-color: @theme_bg_color; margin: 3px; border-color: rgba(0,0,0,0); } combobox#MarkerType > box > button > box > arrow { opacity: 0; min-width: 0; } ngraph-gtk-6.09.05/src/gtk/data/ngraphui.resources.xml.in0000644000175000017500000000674113716736105020141 00000000000000 gtk/menus-common.ui gtk/help-overlay.ui gtk/menus-tool.ui pixmaps/ngraph_align_b.png pixmaps/ngraph_align_hc.png pixmaps/ngraph_align_l.png pixmaps/ngraph_align_r.png pixmaps/ngraph_align_t.png pixmaps/ngraph_align_vc.png pixmaps/ngraph_arc-symbolic.svg pixmaps/ngraph_axispoint-symbolic.svg pixmaps/ngraph_axiswin-symbolic.svg pixmaps/ngraph_cross-symbolic.svg pixmaps/ngraph_datapoint-symbolic.svg pixmaps/ngraph_draw-symbolic.svg pixmaps/ngraph_draw-attention-symbolic.svg pixmaps/ngraph_eval-symbolic.svg pixmaps/ngraph_parameter-symbolic.svg pixmaps/ngraph_filewin-symbolic.svg pixmaps/ngraph_frame-symbolic.svg pixmaps/ngraph_gauss-symbolic.svg pixmaps/ngraph.svg pixmaps/ngraph_icon.png pixmaps/ngraph_icon64.png pixmaps/ngraph_legendpoint-symbolic.svg pixmaps/ngraph_line-symbolic.svg pixmaps/ngraph_mark-symbolic.svg pixmaps/ngraph_math.png pixmaps/ngraph_mergewin-symbolic.svg pixmaps/ngraph_point-symbolic.svg pixmaps/ngraph_rect-symbolic.svg pixmaps/ngraph_scale-symbolic.svg pixmaps/ngraph_section-symbolic.svg pixmaps/ngraph_single-symbolic.svg pixmaps/ngraph_text-symbolic.svg pixmaps/ngraph_trimming-symbolic.svg pixmaps/ngraph_zoom-symbolic.svg pixmaps/ngraph_exchange-symbolic.svg pixmaps/ngraph_link-symbolic.svg pixmaps/none_begin-symbolic.svg pixmaps/none_end-symbolic.svg pixmaps/arrow_begin-symbolic.svg pixmaps/arrow_end-symbolic.svg pixmaps/wave_begin-symbolic.svg pixmaps/wave_end-symbolic.svg pixmaps/mark_begin-symbolic.svg pixmaps/mark_end-symbolic.svg pixmaps/bar_begin-symbolic.svg pixmaps/bar_end-symbolic.svg pixmaps/join_bevel-symbolic.svg pixmaps/join_miter-symbolic.svg pixmaps/join_round-symbolic.svg pixmaps/stroke_fill_0-symbolic.svg pixmaps/stroke_fill_1-symbolic.svg pixmaps/stroke_fill_2-symbolic.svg pixmaps/stroke_fill_3-symbolic.svg pixmaps/stroke_fill_4-symbolic.svg pixmaps/stroke_fill_5-symbolic.svg pixmaps/stroke_fill_6-symbolic.svg pixmaps/stroke_fill_7-symbolic.svg pixmaps/linewidth_002-symbolic.svg pixmaps/linewidth_004-symbolic.svg pixmaps/linewidth_008-symbolic.svg pixmaps/linewidth_016-symbolic.svg pixmaps/linewidth_032-symbolic.svg pixmaps/linewidth_064-symbolic.svg pixmaps/linewidth_128-symbolic.svg css/ngraph.css ngraph-gtk-6.09.05/src/gtk/data/pixmaps/0000755000175000017500000000000014143613315014705 500000000000000ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_align_t.png0000644000175000017500000000070413070106167020310 00000000000000PNG  IHDR szzsRGBbKGDlIDATXJQsgjRk@F _"r!Bzh#F" h*Q,C ehӢf*Wwq.= Oe<`MCtf%e04zk ,e_e `c!~pCGӎ4Si^EJX}m[\VE=[#;S|PhE# L>n0#d1F (%<<PEV :fyicж @pUMF9R~B5ub ^ b)GTM& G7k[b$8e&3C4_spA+OIENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_002-symbolic.svg0000644000175000017500000000363413342673665021561 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_frame-symbolic.svg0000644000175000017500000001620213342520666021625 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_7-symbolic.svg0000644000175000017500000000567613351432267021753 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_point-symbolic.svg0000644000175000017500000000374313342456602021670 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/none_begin-symbolic.svg0000644000175000017500000000555413342667422021311 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_eval-symbolic.svg0000644000175000017500000000752313342475263021472 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_section-symbolic.svg0000644000175000017500000001127013342520773022176 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_2-symbolic.svg0000644000175000017500000000456513351432267021742 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/wave_begin-symbolic.svg0000644000175000017500000001511313342667351021305 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_gauss-symbolic.svg0000644000175000017500000001676713344733021021666 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_parameter-symbolic.svg0000644000175000017500000000573313702004142022504 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_032-symbolic.svg0000644000175000017500000000363413342674077021562 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_line-symbolic.svg0000644000175000017500000000622413344750361021464 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_align_l.png0000644000175000017500000000073113070106167020300 00000000000000PNG  IHDR szzsRGBbKGDIDATXKQǿ=]CAdbt(B) @4`ѱkEPj]\x17oQ>'",W*opE+z?oQ*VpPW[Gzf@׃)afo40%K!ŒP`73H03hiaZh?@0KT @~ kX=W3+nK!6 09L>oN) 0|2mHT,>3dh@#@gs2G֜}7)qn֭"N:=C|7nTo`ƚ>e+u!ZIENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_draw-symbolic.svg0000644000175000017500000000731013351432267021467 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_align_vc.png0000644000175000017500000000111513070106167020452 00000000000000PNG  IHDR szzsRGBbKGDIDATXJ[A3wLlbJ"DJoU! + A7.!>PdHR?JۖpX] h]:*kvuu0UL7Q/rޭcDF|~ِ/McBN(Բ H$jz|Y[Xq.⦑_K2IENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_mergewin-symbolic.svg0000644000175000017500000001771513342522211022346 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_016-symbolic.svg0000644000175000017500000000363413342674050021553 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_3-symbolic.svg0000644000175000017500000000552613351432267021741 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_icon.png0000644000175000017500000000130013070106167017614 00000000000000PNG  IHDR00,gAMA a cHRMz&u0`:pQ<!PLTE0tRNS@fbKGDf |dtIME &-!OIDAT8un0H2T]kΕ*/JZ9L:vJ. XHS+s|Q֬2*&(P9U4V2R~Vd7!յ,-0(=*0l͂N53ҧʾW:Q{g? FMȃOH;BK]ɀ bJ_Č1+P'f`0 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_text-symbolic.svg0000644000175000017500000000615413344733442021524 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_axispoint-symbolic.svg0000644000175000017500000000707713342473263022563 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/mark_end-symbolic.svg0000644000175000017500000000640713342671560020762 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_cross-symbolic.svg0000644000175000017500000001004213342471657021665 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_filewin-symbolic.svg0000644000175000017500000002004313342520045022155 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_datapoint-symbolic.svg0000644000175000017500000000454113342463501022513 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_axiswin-symbolic.svg0000644000175000017500000001115313342517050022206 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/none_end-symbolic.svg0000644000175000017500000000560113342672242020760 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_1-symbolic.svg0000644000175000017500000000447013351432267021734 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_zoom-symbolic.svg0000644000175000017500000001074313342476724021530 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_link-symbolic.svg0000644000175000017500000001274313707744002021473 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_008-symbolic.svg0000644000175000017500000000363113342674012021547 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_trimming-symbolic.svg0000644000175000017500000001511713342661721022363 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_single-symbolic.svg0000644000175000017500000000624213342473512022014 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/arrow_begin-symbolic.svg0000644000175000017500000000615713342667224021504 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/wave_end-symbolic.svg0000644000175000017500000001466113342672154020773 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_scale-symbolic.svg0000644000175000017500000001051713342453266021626 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_128-symbolic.svg0000644000175000017500000000362213342674167021565 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_math.png0000644000175000017500000000031313070106167017620 00000000000000PNG  IHDR'ՆbKGD#2 pHYs  tIME   \IDAT( 0C_anuy$9f 5Rf0}0S;ўÑ-h4,us:[Gu;)7{p?\DIENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/join_bevel-symbolic.svg0000644000175000017500000000576113342664120021312 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_icon64.png0000644000175000017500000000152013070106167017772 00000000000000PNG  IHDR@@XGlgAMA a cHRMz&u0`:pQ<!PLTEStRNS@fbKGDf |dtIME &/#ZIDATHDž1o0ajꦁ0b 2z N )2EKІVLnn X"BKEF&7w?gþE,#Doߤkė%Mj*=OA) brTf1V(s8@sf-+"= `@AD"6x,H|#}1$b9D:!Ray ;]NGm}οZ,{E^z"!Ԇ| (׆^88)ʀ&)/ 7ؗ 1!9/H"1>d!!H"bxǛ Ы4BlvP lhl5ʆG"=HwnA[,C:7!#286h ұl] :-#Q?aiA pu.dYO2$ AVv&jCPF&"P9lȰN|Ri-OشQ"g%tEXtdate:create2016-12-22T17:38:47+09:00k3y%tEXtdate:modify2016-12-22T17:38:47+09:00m6IENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_004-symbolic.svg0000644000175000017500000000363313342673744021560 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/bar_end-symbolic.svg0000644000175000017500000001030013342672075020561 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_rect-symbolic.svg0000644000175000017500000000410713342521030021453 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_exchange-symbolic.svg0000644000175000017500000003126313707540741022322 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/bar_begin-symbolic.svg0000644000175000017500000001040613342667276021115 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph.svg0000644000175000017500000004313013342643670016635 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_align_r.png0000644000175000017500000000070313070106167020305 00000000000000PNG  IHDR szzsRGBbKGDkIDATXJQ;NӦE(J"N D}`Ao sѲehs۴mlww=߹p>.RP*wŢPP*uyi!J"q_Lw `Di`&6`E<q|Dx _6Z8)?R'$^2qaH󽧪njsՊ,р nky;{X `ýny|4|)&kx:0d;ׄ2٩>:nFhW@,;pk< h6τk0&Hv@14}ЩV_g$pVWo3pIENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_mark-symbolic.svg0000644000175000017500000000510113342362656021464 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/linewidth_064-symbolic.svg0000644000175000017500000000362513342674126021562 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_arc-symbolic.svg0000644000175000017500000000434213342521054021272 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/join_round-symbolic.svg0000644000175000017500000000611013342664140021333 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/arrow_end-symbolic.svg0000644000175000017500000000604413342672033021153 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_align_b.png0000644000175000017500000000072713070106167020273 00000000000000PNG  IHDR szzsRGBbKGD pHYs  tIME 5FWIDATX핽JAF;3Y46؊)B}b_N00 ,DmوsmEv.0̙T争"5f@/iV>9([$kBDU(d;X1]@m@h=7" LXV1܏KE*G?ONM0,Țy~}6kz U22  P;vsXYDnj1 3F#2O!x^כ&Rp\wnJ9#cMpP1XJt.Y&c0$Kx+9i!aSEfwSIENDB`ngraph-gtk-6.09.05/src/gtk/data/pixmaps/mark_begin-symbolic.svg0000644000175000017500000000643613342667613021306 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_legendpoint-symbolic.svg0000644000175000017500000001124713342461515023044 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_5-symbolic.svg0000644000175000017500000000464013351432267021737 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_draw-attention-symbolic.svg0000644000175000017500000001153113630431460023464 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_0-symbolic.svg0000644000175000017500000000352713351432267021735 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/stroke_fill_4-symbolic.svg0000644000175000017500000000352713351432267021741 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/join_miter-symbolic.svg0000644000175000017500000000572213342664163021341 00000000000000 image/svg+xml ngraph-gtk-6.09.05/src/gtk/data/pixmaps/ngraph_align_hc.png0000644000175000017500000000101513070106167020433 00000000000000PNG  IHDR szzsRGBbKGDIDATXO/QϝyZ B ahB+k>`!NbeR#baAig̵n4Rfe޻fΙ Ty  DlUY1.*Kxt(9&H=0 kt##-IIpX.(%!ˉ⭭/l˩Ɇg@ѳjʔ25%b6ug{z/ B?*up*~N62D+KK0 dYH S@ flݛh?io_ab*ԚD 0Y-ht8tusWWxOP+13;?B&rm8 @<$~a3P22Z<%Tc.{de<@;<,JOg lIENDB`ngraph-gtk-6.09.05/src/gtk/data/gtk/0000755000175000017500000000000014143613315014011 500000000000000ngraph-gtk-6.09.05/src/gtk/data/gtk/menus-tool.ui0000644000175000017500000000645713337723153016414 00000000000000
_Stroke app.StrokeFillStrokeAction _Fill app.StrokeFillFillAction _Close path app.StrokeFillClosePathAction action-disabled
miter app.JoinTypeAction miter round app.JoinTypeAction round bevel app.JoinTypeAction bevel
none app.MarkerTypeBeginAction none arrow app.MarkerTypeBeginAction arrow wave app.MarkerTypeBeginAction wave mark app.MarkerTypeBeginAction mark bar app.MarkerTypeBeginAction bar
none app.MarkerTypeEndAction none arrow app.MarkerTypeEndAction arrow wave app.MarkerTypeEndAction wave mark app.MarkerTypeEndAction mark bar app.MarkerTypeEndAction bar
ngraph-gtk-6.09.05/src/gtk/data/gtk/menus-common.ui.in0000644000175000017500000006311314142161772017322 00000000000000 _Graph
_New graph
_Frame graph app.GraphNewFrameAction _Section graph app.GraphNewSectionAction _Cross graph app.GraphNewCrossAction
_All clear app.GraphNewClearAction
_Load graph app.GraphLoadAction <Primary>R
_Save app.GraphSaveAction <Primary>S Save _As app.GraphSaveAsAction <Primary><Shift>S
_Export image _GRA file app.GraphExportGRAAction _PS file app.GraphExportPSAction _EPS file app.GraphExportEPSAction P_DF file app.GraphExportPDFAction _SVG file app.GraphExportSVGAction P_NG file app.GraphExportPNGAction
_Draw order app.GraphDrawOrderAction
Page Set_up app.GraphPageSetupAction Pre_view app.GraphPrintPreviewAction _Print app.GraphPrintAction <Primary>P
_Current directory app.GraphCurrentDirectoryAction
_Ngraph shell app.GraphShellAction
_Quit app.quit <Primary>Q
_Edit
_Redo app.EditRedoAction <Primary>Y _Undo app.EditUndoAction <Primary>Z
Cu_t app.EditCutAction <Primary>X _Copy app.EditCopyAction <Primary>C _Paste app.EditPasteAction <Primary>V _Delete app.EditDeleteAction Delete _Duplicate app.EditDuplicateAction Insert Select _All app.EditSelectAllAction <Primary>A
draw _Order
_Top app.EditOrderTopAction <Shift>Home _Up app.EditOrderUpAction _Down app.EditOrderDownAction _Bottom app.EditOrderBottomAction <Shift>End
_Align
Align _Left app.EditAlignLeftAction Align _Horizontal Center app.EditAlignHCenterAction Align _Right app.EditAlignRightAction
Align _Top app.EditAlignTopAction Align _Vertical Center app.EditAlignVCenterAction Align _Bottom app.EditAlignBottomAction
rotate _90 degree clockwise app.EditRotateCWAction rotate 9_0 degree counter-clockwise app.EditRotateCCWAction flip _Horizontally app.EditFlipHAction flip _Vertically app.EditFlipVAction
_View
_Draw app.ViewDrawAction <Primary>D
_Clear information view app.ViewClearInformationWindowAction
_Sidebar app.ViewSidebarAction _Statusbar app.ViewStatusbarAction _Ruler app.ViewRulerAction _Scrollbar app.ViewScrollbarAction _Command toolbar app.ViewCommandToolbarAction _Toolbox app.ViewToolboxAction cross _Gauge app.ViewCrossGaugeAction <Primary>G _Grid app.ViewGridLineAction
_Object
_Data
_Add
_File app.DataAddFileAction <Primary>O _Range app.DataAddRangeAction
_Properties app.DataPropertyAction _Close app.DataCloseAction _Edit app.DataEditAction
_Save data app.DataSaveAction _Math Transformation app.DataMathAction
_Axis
_Add
_Frame graph app.AxisAddFrameAction _Section graph app.AxisAddSectionAction _Cross graph app.AxisAddCrossAction Single _Axis app.AxisAddSingleAction
_Properties app.AxisPropertyAction _Delete app.AxisDeleteAction Scale _Zoom app.AxisScaleZoomAction Scale _Clear app.AxisScaleClearAction <Primary><Shift>C Scale _Undo app.AxisScaleUndoAction _Grid
_Add app.AxisGridNewAction _Properties app.AxisGridPropertyAction _Delete app.AxisGridDeleteAction
_Path
_Properties app.LegendPathPropertyAction _Delete app.LegendPathDeleteAction
_Rectangle
_Properties app.LegendRectanglePropertyAction _Delete app.LegendRectangleDeleteAction
_Arc
_Properties app.LegendArcPropertyAction _Delete app.LegendArcDeleteAction
_Mark
_Properties app.LegendMarkPropertyAction _Delete app.LegendMarkDeleteAction
_Text
_Properties app.LegendTextPropertyAction _Delete app.LegendTextDeleteAction
_Merge
_Add app.MergeAddAction _Properties app.MergePropertyAction _Close app.MergeCloseAction
_Parameter
_Add app.ParameterAddAction _Properties app.ParameterPropertyAction _Delete app.ParameterDeleteAction
_Preference
_Viewer app.PreferenceViewerAction _External viewer app.PreferenceExternalViewerAction _Font aliases app.PreferenceFontAction _Add-in script app.PreferenceAddinAction _Miscellaneous app.PreferenceMiscAction
save as default (_Settings) app.PreferenceSaveSettingAction save as default (_Graph) app.PreferenceSaveGraphAction
_Data file default app.PreferenceDataDefaultAction _Legend text default app.PreferenceTextDefaultAction _Axis grid default app.PreferenceGridDefaultAction
_Help
_Help app.help F1 _Keyboard shortcus win.show-help-overlay _Demonstration app.demo _About app.about
Cu_t app.EditCutAction _Copy app.EditCopyAction _Paste app.EditPasteAction _Delete app.EditDeleteAction _Duplicate app.EditDuplicateAction
_Properties app.PopupUpdateAction
_Align
Align _Left app.EditAlignLeftAction Align _Horizontal Center app.EditAlignHCenterAction Align _Right app.EditAlignRightAction
Align _Top app.EditAlignTopAction Align _Vertical Center app.EditAlignVCenterAction Align _Bottom app.EditAlignBottomAction
_Rotate
rotate _90 degree clockwise app.EditRotateCWAction rotate 9_0 degree counter-clockwise app.EditRotateCCWAction
_Flip
flip _Horizontally app.EditFlipHAction flip _Vertically app.EditFlipVAction
_Top app.EditOrderTopAction _Up app.EditOrderUpAction _Down app.EditOrderDownAction _Bottom app.EditOrderBottomAction
cross _Gauge app.ViewCrossGaugeAction
_Save app.GraphSaveAction Save _As app.GraphSaveAsAction
_Export image _GRA file app.GraphExportGRAAction _PS file app.GraphExportPSAction _EPS file app.GraphExportEPSAction P_DF file app.GraphExportPDFAction _SVG file app.GraphExportSVGAction P_NG file app.GraphExportPNGAction
_Save data app.DataSaveAction
ngraph-gtk-6.09.05/src/gtk/data/gtk/menus-common.ui.osx0000644000175000017500000006234514142161772017533 00000000000000 _Graph
_New graph
_Frame graph app.GraphNewFrameAction _Section graph app.GraphNewSectionAction _Cross graph app.GraphNewCrossAction
_All clear app.GraphNewClearAction
_Load graph app.GraphLoadAction <Primary>R
_Save app.GraphSaveAction <Primary>S Save _As app.GraphSaveAsAction <Primary><Shift>S
_Export image _GRA file app.GraphExportGRAAction _PS file app.GraphExportPSAction _EPS file app.GraphExportEPSAction P_DF file app.GraphExportPDFAction _SVG file app.GraphExportSVGAction P_NG file app.GraphExportPNGAction
_Draw order app.GraphDrawOrderAction
Page Set_up app.GraphPageSetupAction Pre_view app.GraphPrintPreviewAction _Print app.GraphPrintAction <Primary>P
_Current directory app.GraphCurrentDirectoryAction
_Ngraph shell app.GraphShellAction
_Edit
_Redo app.EditRedoAction <Primary>Y _Undo app.EditUndoAction <Primary>Z
Cu_t app.EditCutAction <Primary>X _Copy app.EditCopyAction <Primary>C _Paste app.EditPasteAction <Primary>V _Delete app.EditDeleteAction Delete _Duplicate app.EditDuplicateAction Insert Select _All app.EditSelectAllAction <Primary>A
draw _Order
_Top app.EditOrderTopAction <Shift>Home _Up app.EditOrderUpAction _Down app.EditOrderDownAction _Bottom app.EditOrderBottomAction <Shift>End
_Align
Align _Left app.EditAlignLeftAction Align _Horizontal Center app.EditAlignHCenterAction Align _Right app.EditAlignRightAction
Align _Top app.EditAlignTopAction Align _Vertical Center app.EditAlignVCenterAction Align _Bottom app.EditAlignBottomAction
rotate _90 degree clockwise app.EditRotateCWAction rotate 9_0 degree counter-clockwise app.EditRotateCCWAction flip _Horizontally app.EditFlipHAction flip _Vertically app.EditFlipVAction
_View
_Draw app.ViewDrawAction <Primary>D
_Clear information view app.ViewClearInformationWindowAction
_Sidebar app.ViewSidebarAction _Statusbar app.ViewStatusbarAction _Ruler app.ViewRulerAction _Scrollbar app.ViewScrollbarAction _Command toolbar app.ViewCommandToolbarAction _Toolbox app.ViewToolboxAction cross _Gauge app.ViewCrossGaugeAction <Primary>G _Grid app.ViewGridLineAction
_Object
_Data
_Add
_File app.DataAddFileAction <Primary>O _Range app.DataAddRangeAction
_Properties app.DataPropertyAction _Close app.DataCloseAction _Edit app.DataEditAction
_Save data app.DataSaveAction _Math Transformation app.DataMathAction
_Axis
_Add
_Frame graph app.AxisAddFrameAction _Section graph app.AxisAddSectionAction _Cross graph app.AxisAddCrossAction Single _Axis app.AxisAddSingleAction
_Properties app.AxisPropertyAction _Delete app.AxisDeleteAction Scale _Zoom app.AxisScaleZoomAction Scale _Clear app.AxisScaleClearAction <Primary><Shift>C Scale _Undo app.AxisScaleUndoAction _Grid
_Add app.AxisGridNewAction _Properties app.AxisGridPropertyAction _Delete app.AxisGridDeleteAction
_Path
_Properties app.LegendPathPropertyAction _Delete app.LegendPathDeleteAction
_Rectangle
_Properties app.LegendRectanglePropertyAction _Delete app.LegendRectangleDeleteAction
_Arc
_Properties app.LegendArcPropertyAction _Delete app.LegendArcDeleteAction
_Mark
_Properties app.LegendMarkPropertyAction _Delete app.LegendMarkDeleteAction
_Text
_Properties app.LegendTextPropertyAction _Delete app.LegendTextDeleteAction
_Merge
_Add app.MergeAddAction _Properties app.MergePropertyAction _Close app.MergeCloseAction
_Parameter
_Add app.ParameterAddAction _Properties app.ParameterPropertyAction _Delete app.ParameterDeleteAction
_Preference
_Viewer app.PreferenceViewerAction _External viewer app.PreferenceExternalViewerAction _Font aliases app.PreferenceFontAction _Add-in script app.PreferenceAddinAction _Miscellaneous app.PreferenceMiscAction
save as default (_Settings) app.PreferenceSaveSettingAction save as default (_Graph) app.PreferenceSaveGraphAction
_Data file default app.PreferenceDataDefaultAction _Legend text default app.PreferenceTextDefaultAction _Axis grid default app.PreferenceGridDefaultAction
_Help
_Help app.help F1 _Keyboard shortcus win.show-help-overlay _Demonstration app.demo
Cu_t app.EditCutAction _Copy app.EditCopyAction _Paste app.EditPasteAction _Delete app.EditDeleteAction _Duplicate app.EditDuplicateAction
_Properties app.PopupUpdateAction
_Align
Align _Left app.EditAlignLeftAction Align _Horizontal Center app.EditAlignHCenterAction Align _Right app.EditAlignRightAction
Align _Top app.EditAlignTopAction Align _Vertical Center app.EditAlignVCenterAction Align _Bottom app.EditAlignBottomAction
_Rotate
rotate _90 degree clockwise app.EditRotateCWAction rotate 9_0 degree counter-clockwise app.EditRotateCCWAction
_Flip
flip _Horizontally app.EditFlipHAction flip _Vertically app.EditFlipVAction
_Top app.EditOrderTopAction _Up app.EditOrderUpAction _Down app.EditOrderDownAction _Bottom app.EditOrderBottomAction
cross _Gauge app.ViewCrossGaugeAction
_Save app.GraphSaveAction Save _As app.GraphSaveAsAction
_Export image _GRA file app.GraphExportGRAAction _PS file app.GraphExportPSAction _EPS file app.GraphExportEPSAction P_DF file app.GraphExportPDFAction _SVG file app.GraphExportSVGAction P_NG file app.GraphExportPNGAction
_Save data app.DataSaveAction
ngraph-gtk-6.09.05/src/gtk/data/gtk/menus-appmenu.ui0000644000175000017500000000435513574543271017103 00000000000000
About %s app.about replace-appname
Services services-submenu
Hide %s hide-this gtkinternal.hide Hide Others hide-others gtkinternal.hide-others Show All show-all gtkinternal.show-all
Quit %s app.quit replace-appname
ngraph-gtk-6.09.05/src/gtk/data/gtk/menus-common-win.ui.in0000644000175000017500000006435714142161772020130 00000000000000 _Graph
_New graph
_Frame graph app.GraphNewFrameAction _Section graph app.GraphNewSectionAction _Cross graph app.GraphNewCrossAction
_All clear app.GraphNewClearAction
_Load graph app.GraphLoadAction <Primary>R
_Save app.GraphSaveAction <Primary>S Save _As app.GraphSaveAsAction <Primary><Shift>S
_Export image _GRA file app.GraphExportGRAAction _PS file app.GraphExportPSAction _EPS file app.GraphExportEPSAction P_DF file app.GraphExportPDFAction _SVG file app.GraphExportSVGAction P_NG file app.GraphExportPNGAction E_MF file app.GraphExportEMFAction _Clipboard (EMF) app.GraphExportEMFClipboardAction
_Draw order app.GraphDrawOrderAction
Page Set_up app.GraphPageSetupAction Pre_view app.GraphPrintPreviewAction _Print app.GraphPrintAction <Primary>P
_Current directory app.GraphCurrentDirectoryAction
_Ngraph shell app.GraphShellAction
_Quit app.quit <Primary>Q
_Edit
_Redo app.EditRedoAction <Primary>Y _Undo app.EditUndoAction <Primary>Z
Cu_t app.EditCutAction <Primary>X _Copy app.EditCopyAction <Primary>C _Paste app.EditPasteAction <Primary>V _Delete app.EditDeleteAction Delete _Duplicate app.EditDuplicateAction Insert Select _All app.EditSelectAllAction <Primary>A
draw _Order
_Top app.EditOrderTopAction <Shift>Home _Up app.EditOrderUpAction _Down app.EditOrderDownAction _Bottom app.EditOrderBottomAction <Shift>End
_Align
Align _Left app.EditAlignLeftAction Align _Horizontal Center app.EditAlignHCenterAction Align _Right app.EditAlignRightAction
Align _Top app.EditAlignTopAction Align _Vertical Center app.EditAlignVCenterAction Align _Bottom app.EditAlignBottomAction
rotate _90 degree clockwise app.EditRotateCWAction rotate 9_0 degree counter-clockwise app.EditRotateCCWAction flip _Horizontally app.EditFlipHAction flip _Vertically app.EditFlipVAction
_View
_Draw app.ViewDrawAction <Primary>D
_Clear information view app.ViewClearInformationWindowAction
_Sidebar app.ViewSidebarAction _Statusbar app.ViewStatusbarAction _Ruler app.ViewRulerAction _Scrollbar app.ViewScrollbarAction _Command toolbar app.ViewCommandToolbarAction _Toolbox app.ViewToolboxAction cross _Gauge app.ViewCrossGaugeAction <Primary>G _Grid app.ViewGridLineAction
_Object
_Data
_Add
_File app.DataAddFileAction <Primary>O _Range app.DataAddRangeAction
_Properties app.DataPropertyAction _Close app.DataCloseAction _Edit app.DataEditAction
_Save data app.DataSaveAction _Math Transformation app.DataMathAction
_Axis
_Add
_Frame graph app.AxisAddFrameAction _Section graph app.AxisAddSectionAction _Cross graph app.AxisAddCrossAction Single _Axis app.AxisAddSingleAction
_Properties app.AxisPropertyAction _Delete app.AxisDeleteAction Scale _Zoom app.AxisScaleZoomAction Scale _Clear app.AxisScaleClearAction <Primary><Shift>C Scale _Undo app.AxisScaleUndoAction _Grid
_Add app.AxisGridNewAction _Properties app.AxisGridPropertyAction _Delete app.AxisGridDeleteAction
_Path
_Properties app.LegendPathPropertyAction _Delete app.LegendPathDeleteAction
_Rectangle
_Properties app.LegendRectanglePropertyAction _Delete app.LegendRectangleDeleteAction
_Arc
_Properties app.LegendArcPropertyAction _Delete app.LegendArcDeleteAction
_Mark
_Properties app.LegendMarkPropertyAction _Delete app.LegendMarkDeleteAction
_Text
_Properties app.LegendTextPropertyAction _Delete app.LegendTextDeleteAction
_Merge
_Add app.MergeAddAction _Properties app.MergePropertyAction _Close app.MergeCloseAction
_Parameter
_Add app.ParameterAddAction _Properties app.ParameterPropertyAction _Delete app.ParameterDeleteAction
_Preference
_Viewer app.PreferenceViewerAction _External viewer app.PreferenceExternalViewerAction _Font aliases app.PreferenceFontAction _Add-in script app.PreferenceAddinAction _Miscellaneous app.PreferenceMiscAction
save as default (_Settings) app.PreferenceSaveSettingAction save as default (_Graph) app.PreferenceSaveGraphAction
_Data file default app.PreferenceDataDefaultAction _Legend text default app.PreferenceTextDefaultAction _Axis grid default app.PreferenceGridDefaultAction
_Help
_Help app.help F1 _Keyboard shortcus win.show-help-overlay _Demonstration app.demo _About app.about
Cu_t app.EditCutAction _Copy app.EditCopyAction _Paste app.EditPasteAction _Delete app.EditDeleteAction _Duplicate app.EditDuplicateAction
_Properties app.PopupUpdateAction
_Align
Align _Left app.EditAlignLeftAction Align _Horizontal Center app.EditAlignHCenterAction Align _Right app.EditAlignRightAction
Align _Top app.EditAlignTopAction Align _Vertical Center app.EditAlignVCenterAction Align _Bottom app.EditAlignBottomAction
_Rotate
rotate _90 degree clockwise app.EditRotateCWAction rotate 9_0 degree counter-clockwise app.EditRotateCCWAction
_Flip
flip _Horizontally app.EditFlipHAction flip _Vertically app.EditFlipVAction
_Top app.EditOrderTopAction _Up app.EditOrderUpAction _Down app.EditOrderDownAction _Bottom app.EditOrderBottomAction
cross _Gauge app.ViewCrossGaugeAction
_Save app.GraphSaveAction Save _As app.GraphSaveAsAction
_Export image _GRA file app.GraphExportGRAAction _PS file app.GraphExportPSAction _EPS file app.GraphExportEPSAction P_DF file app.GraphExportPDFAction _SVG file app.GraphExportSVGAction P_NG file app.GraphExportPNGAction E_MF file app.GraphExportEMFAction _Clipboard (EMF) app.GraphExportEMFClipboardAction
_Save data app.DataSaveAction
ngraph-gtk-6.09.05/src/gtk/data/gtk/help-overlay.ui0000644000175000017500000001433513721442614016710 00000000000000 1 1 shortcuts 12 1 General 1 app.GraphLoadAction Load a graph (NGP file) 1 app.GraphSaveAction Save the graph 1 app.GraphSaveAsAction Save the graph with a new filename 1 app.GraphPrintAction Print the graph 1 app.DataAddFileAction Add data file 1 app.AxisScaleClearAction Clear Scale 1 app.ViewDrawAction Draw on Viewer Window 1 app.ViewCrossGaugeAction Show cross gauge 1 app.quit Quit the application 1 Editing 1 app.EditUndoAction Undo previous command 1 app.EditRedoAction Redo previous command 1 app.EditCutAction Cut selected object to clipboard 1 app.EditCopyAction Copy selected object to clipboard 1 app.EditPasteAction Paste object from clipboard 1 app.EditDeleteAction Delete the selected object 1 app.EditDuplicateAction Duplicate the selected object 1 app.EditOrderTopAction Rise selection to top 1 app.EditOrderBottomAction Lower selection to bottom 1 Help 1 app.help Show the help document 1 win.show-help-overlay Show shortcut keys ngraph-gtk-6.09.05/src/gtk/ox11menu.h0000644000175000017500000001134014121303350014047 00000000000000/* * $Id: ox11menu.h,v 1.37 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for GTK". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for GTK" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for GTK" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "nhash.h" #include "ogra.h" #include "nstring.h" #ifndef _O_X11_MENU_HEADER #define _O_X11_MENU_HEADER #define LINETOLIMIT 500 #define DEFAULT_GEOMETRY -100000 #define ERRRUN 100 #define ERRCMAP 101 #define ERRFONT 102 #define HIST_SIZE_MAX 10000 #define INFOWIN_SIZE_MAX 10000 extern int Globallock; extern struct savedstdio GtkIOSave; enum paper_id { PAPER_ID_A3, PAPER_ID_A4, PAPER_ID_A5, PAPER_ID_B4, PAPER_ID_B5, PAPER_ID_LETTER, PAPER_ID_LEGAL, PAPER_ID_EXECUTIVE, PAPER_ID_NORMAL, PAPER_ID_WIDE, PAPER_ID_WIDE2, PAPER_ID_CUSTOM, }; struct script { char *name; char *script; char *description; char *option; struct script *next; }; struct character_map_list { char *title, *data; struct character_map_list *next; }; struct layer { cairo_surface_t *pix; cairo_t *cairo; }; struct menulocal { cairo_surface_t *pix, *bg; NHASH layers; int redrawf, redrawf_num; int windpi, data_head_lines; int grid, show_grid; int modified; int lock; struct gra2cairo_local *local; int antialias; char *editor, *browser, *help_browser, *help_file; struct objlist *obj; N_VALUE *inst; struct objlist *GRAobj; int GRAoid; int GC; int PaperWidth, PaperHeight, PaperLandscape; enum GRA_DECIMALSIGN_TYPE Decimalsign; enum DECIMALSIGN_TYPE default_decimalsign; char *PaperName; enum paper_id PaperId; int LeftMargin, TopMargin; int PaperZoom; struct narray drawrable; struct script *scriptroot, *addin_list; int menuheight, menuwidth, menux, menuy; int exwindpi, exwinwidth, exwinheight, exwin_use_external; char *fileopendir, *graphloaddir, *expanddir, *coordwin_font, *infowin_font, *file_preview_font; int expand, loadpath, expandtofullpath, changedirectory, savehistory; int savepath, savewithdata, savewithmerge; int scriptconsole, addinconsole; int statusbar, sidebar, ruler, scrollbar, ctoolbar, ptoolbar, show_cross, showtip, preserve_width; int hist_size, info_size; double bg_r, bg_g, bg_b; int focus_frame_type, use_opacity, select_data; int side_pane1_pos, side_pane2_pos, side_pane3_pos, main_pane_pos; int file_tab, axis_tab, merge_tab, path_tab, rectangle_tab, arc_tab, mark_tab, text_tab, parameter_tab; #ifdef WINDOWS int emf_dpi; #endif int png_dpi, ps_version, svg_version; struct character_map_list *char_map; int use_custom_palette; struct narray custom_palette; char *source_style_id; int math_input_mode, use_dark_theme; int default_axis_width, default_axis_height; }; extern struct menulocal Menulocal; enum SAVE_CONFIG_TYPE { SAVE_CONFIG_TYPE_GEOMETRY = 0x0001, SAVE_CONFIG_TYPE_VIEWER = 0x0002, SAVE_CONFIG_TYPE_ADDIN_SCRIPT = 0x0008, SAVE_CONFIG_TYPE_MISC = 0x0010, SAVE_CONFIG_TYPE_EXTERNAL_VIEWER = 0x0020, SAVE_CONFIG_TYPE_FONTS = 0x0040, SAVE_CONFIG_TYPE_TOGGLE_VIEW = 0x0080, SAVE_CONFIG_TYPE_OTHERS = 0x0100, }; #define SAVE_CONFIG_TYPE_X11MENU (SAVE_CONFIG_TYPE_GEOMETRY \ | SAVE_CONFIG_TYPE_VIEWER \ | SAVE_CONFIG_TYPE_EXTERNAL_VIEWER \ | SAVE_CONFIG_TYPE_ADDIN_SCRIPT \ | SAVE_CONFIG_TYPE_MISC) void mx_redraw(struct objlist *obj, N_VALUE *inst, char const **objects); void mx_clear(cairo_region_t *region, char const **objects); void mgtkdisplaydialog(const char *str); void mgtkdisplaystatus(const char *str); int mgtkputstderr(const char *s); int mgtkprintfstderr(const char *fmt, ...); int mgtkinterrupt(void); int mgtkinputyn(const char *mes); int mgtkputstdout(const char *s); int mgtkprintfstdout(const char *fmt, ...); void initwindowconfig(void); int mgtkwindowconfig(void); void menuadddrawrable(struct objlist *parent, struct narray *drawrable); int menu_save_config(int type); void menu_use_dark_theme_set(int state); void main_window_redraw(void); void init_layer(const char *obj); void menu_default_axis_size(struct menulocal *local); #endif ngraph-gtk-6.09.05/src/gtk/ogra2emf.c0000644000175000017500000012015714002715723014107 00000000000000#include "common.h" #if WINDOWS #include #include #include #include #include #include #include #include #include #include "gtk_common.h" #include "object.h" #include "nstring.h" #include "ioutil.h" #include "shell.h" #include "strconv.h" #include "gra.h" #include "ogra2cairo.h" #define NAME "gra2emf" #define PARENT "gra2" #define OVERSION "1.00.00" #define DEFAULT_FONT "Sans-serif" #define USE_LINE_TO 1 #ifndef MPI #define MPI 3.14159265358979323846 #endif #define ERRFOPEN 100 #define ERREMF 101 #define USE_EnumFontFamiliesExW 0 /* FixMe: the program will be crashed when use EnumLogFontExW */ static char *gra2emf_errorlist[]={ "I/O error: open file", "EMF error", }; #define ERRNUM (sizeof(gra2emf_errorlist) / sizeof(*gra2emf_errorlist)) #define CHAR_SET_NUM 32 struct gra2emf_fontmap { char *name; int char_set[CHAR_SET_NUM + 1]; struct gra2emf_fontmap *next; }; struct gra2emf_local { HDC hdc, hdc_dummy; int r, g, b, x, y, offsetx, offsety; char *fontalias, *fontname; int font_style, line_join, line_cap, line_width, line_style_num, symbol; int update_pen_attribute, update_brush_attribute; double fontdir, fontcos, fontsin, fontspace, fontsize; DWORD *line_style; #if USE_LINE_TO int line; #else struct narray line; #endif NHASH fontmap; HPEN null_pen, the_pen; HBRUSH the_brush; }; static void draw_lines(struct gra2emf_local *local); static int close_emf(struct gra2emf_local *local, const char *fname); static int #if USE_EnumFontFamiliesExW enum_font_cb(ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, DWORD FontType, LPARAM lParam) #else enum_font_cb(ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, DWORD FontType, LPARAM lParam) #endif { int char_set, i; struct gra2emf_fontmap *fontmap; if (lpelfe == NULL || lpntme == NULL || lParam == 0) { return 0; } if (FontType == 0) { return 0; /* this check may necessary to avoid crash on Windows8 */ } if (FontType & ~(TRUETYPE_FONTTYPE | RASTER_FONTTYPE | DEVICE_FONTTYPE)) { return 0; /* this check may necessary to avoid crash on Windows8 */ } if (lpntme->ntmTm.tmWeight != FW_NORMAL || lpntme->ntmTm.tmItalic) { return 1; } fontmap = (struct gra2emf_fontmap *) lParam; char_set = lpntme->ntmTm.tmCharSet; for (i = 0; i < CHAR_SET_NUM; i++) { if (fontmap->char_set[i] < 0) { fontmap->char_set[i] = char_set; fontmap->char_set[i + 1] = -1; break; } } return 1; } static int get_char_set(gunichar ch) { GUnicodeScript script; int char_set; script = g_unichar_get_script(ch); switch (script) { case G_UNICODE_SCRIPT_COMMON: char_set = ANSI_CHARSET; break; case G_UNICODE_SCRIPT_INHERITED: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_ARABIC: char_set = ARABIC_CHARSET; break; case G_UNICODE_SCRIPT_ARMENIAN: char_set = EASTEUROPE_CHARSET; break; case G_UNICODE_SCRIPT_BENGALI: case G_UNICODE_SCRIPT_BOPOMOFO: case G_UNICODE_SCRIPT_CHEROKEE: case G_UNICODE_SCRIPT_COPTIC: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_CYRILLIC: char_set = RUSSIAN_CHARSET; break; case G_UNICODE_SCRIPT_DESERET: case G_UNICODE_SCRIPT_DEVANAGARI: case G_UNICODE_SCRIPT_ETHIOPIC: case G_UNICODE_SCRIPT_GEORGIAN: case G_UNICODE_SCRIPT_GOTHIC: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_GREEK: char_set = GREEK_CHARSET; break; case G_UNICODE_SCRIPT_GUJARATI: case G_UNICODE_SCRIPT_GURMUKHI: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_HAN: /* char_set = CHINESEBIG5_CHARSET; char_set = GB2312_CHARSET; */ char_set = SHIFTJIS_CHARSET; break; case G_UNICODE_SCRIPT_HANGUL: char_set = HANGEUL_CHARSET; break; case G_UNICODE_SCRIPT_HEBREW: char_set = HEBREW_CHARSET; break; case G_UNICODE_SCRIPT_HIRAGANA: char_set = SHIFTJIS_CHARSET; break; case G_UNICODE_SCRIPT_KANNADA: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_KATAKANA: char_set = SHIFTJIS_CHARSET; break; case G_UNICODE_SCRIPT_KHMER: case G_UNICODE_SCRIPT_LAO: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_LATIN: char_set = ANSI_CHARSET; break; case G_UNICODE_SCRIPT_MALAYALAM: case G_UNICODE_SCRIPT_MONGOLIAN: case G_UNICODE_SCRIPT_MYANMAR: case G_UNICODE_SCRIPT_OGHAM: case G_UNICODE_SCRIPT_OLD_ITALIC: case G_UNICODE_SCRIPT_ORIYA: case G_UNICODE_SCRIPT_RUNIC: case G_UNICODE_SCRIPT_SINHALA: case G_UNICODE_SCRIPT_SYRIAC: case G_UNICODE_SCRIPT_TAMIL: case G_UNICODE_SCRIPT_TELUGU: case G_UNICODE_SCRIPT_THAANA: char_set = DEFAULT_CHARSET; break; case G_UNICODE_SCRIPT_THAI: char_set = THAI_CHARSET; break; case G_UNICODE_SCRIPT_TIBETAN: case G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL: case G_UNICODE_SCRIPT_YI: case G_UNICODE_SCRIPT_TAGALOG: case G_UNICODE_SCRIPT_HANUNOO: case G_UNICODE_SCRIPT_BUHID: case G_UNICODE_SCRIPT_TAGBANWA: case G_UNICODE_SCRIPT_BRAILLE: case G_UNICODE_SCRIPT_CYPRIOT: case G_UNICODE_SCRIPT_LIMBU: case G_UNICODE_SCRIPT_OSMANYA: case G_UNICODE_SCRIPT_SHAVIAN: case G_UNICODE_SCRIPT_LINEAR_B: case G_UNICODE_SCRIPT_TAI_LE: case G_UNICODE_SCRIPT_UGARITIC: case G_UNICODE_SCRIPT_NEW_TAI_LUE: case G_UNICODE_SCRIPT_BUGINESE: case G_UNICODE_SCRIPT_GLAGOLITIC: case G_UNICODE_SCRIPT_TIFINAGH: case G_UNICODE_SCRIPT_SYLOTI_NAGRI: case G_UNICODE_SCRIPT_OLD_PERSIAN: case G_UNICODE_SCRIPT_KHAROSHTHI: case G_UNICODE_SCRIPT_UNKNOWN: case G_UNICODE_SCRIPT_BALINESE: case G_UNICODE_SCRIPT_CUNEIFORM: case G_UNICODE_SCRIPT_PHOENICIAN: case G_UNICODE_SCRIPT_PHAGS_PA: case G_UNICODE_SCRIPT_NKO: case G_UNICODE_SCRIPT_KAYAH_LI: case G_UNICODE_SCRIPT_LEPCHA: case G_UNICODE_SCRIPT_REJANG: case G_UNICODE_SCRIPT_SUNDANESE: case G_UNICODE_SCRIPT_SAURASHTRA: case G_UNICODE_SCRIPT_CHAM: case G_UNICODE_SCRIPT_OL_CHIKI: case G_UNICODE_SCRIPT_VAI: case G_UNICODE_SCRIPT_CARIAN: case G_UNICODE_SCRIPT_LYCIAN: case G_UNICODE_SCRIPT_LYDIAN: case G_UNICODE_SCRIPT_AVESTAN: case G_UNICODE_SCRIPT_BAMUM: case G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS: case G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC: case G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI: case G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN: case G_UNICODE_SCRIPT_JAVANESE: case G_UNICODE_SCRIPT_KAITHI: case G_UNICODE_SCRIPT_LISU: case G_UNICODE_SCRIPT_MEETEI_MAYEK: case G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN: char_set = DEFAULT_CHARSET; break; default: char_set = DEFAULT_CHARSET; } /* 0: 'ANSI_CHARSET'; 1: 'DEFAULT_CHARSET'; 2: 'SYMBOL_CHARSET'; 77: 'MAC_CHARSET'; 128: 'SHIFTJIS_CHARSET'; 129: 'HANGEUL_CHARSET'; 130: 'JOHAB_CHARSET'; 134: 'GB2312_CHARSET'; 136: 'CHINESEBIG5_CHARSET'; 161: 'GREEK_CHARSET'; 162: 'TURKISH_CHARSET'; 163: 'VIETNAMESE_CHARSET'; 177: 'HEBREW_CHARSET'; 178: 'ARABIC_CHARSET'; 186: 'BALTIC_CHARSET'; 204: 'RUSSIAN_CHARSET'; 222: 'THAI_CHARSET'; 238: 'EASTEUROPE_CHARSET'; 255: 'OEM_CHARSET '; */ #if 0 { char *script_name; char str[16], *sstr; int l; switch (script) { case G_UNICODE_SCRIPT_COMMON: script_name = "G_UNICODE_SCRIPT_COMMON"; break; case G_UNICODE_SCRIPT_INHERITED: script_name = "G_UNICODE_SCRIPT_INHERITED"; break; case G_UNICODE_SCRIPT_ARABIC: script_name = "G_UNICODE_SCRIPT_ARABIC"; break; case G_UNICODE_SCRIPT_ARMENIAN: script_name = "G_UNICODE_SCRIPT_ARMENIAN"; break; case G_UNICODE_SCRIPT_BENGALI: script_name = "G_UNICODE_SCRIPT_BENGALI"; break; case G_UNICODE_SCRIPT_BOPOMOFO: script_name = "G_UNICODE_SCRIPT_BOPOMOFO"; break; case G_UNICODE_SCRIPT_CHEROKEE: script_name = "G_UNICODE_SCRIPT_CHEROKEE"; break; case G_UNICODE_SCRIPT_COPTIC: script_name = "G_UNICODE_SCRIPT_COPTIC"; break; case G_UNICODE_SCRIPT_CYRILLIC: script_name = "G_UNICODE_SCRIPT_CYRILLIC"; break; case G_UNICODE_SCRIPT_DESERET: script_name = "G_UNICODE_SCRIPT_DESERET"; break; case G_UNICODE_SCRIPT_DEVANAGARI: script_name = "G_UNICODE_SCRIPT_DEVANAGARI"; break; case G_UNICODE_SCRIPT_ETHIOPIC: script_name = "G_UNICODE_SCRIPT_ETHIOPIC"; break; case G_UNICODE_SCRIPT_GEORGIAN: script_name = "G_UNICODE_SCRIPT_GEORGIAN"; break; case G_UNICODE_SCRIPT_GOTHIC: script_name = "G_UNICODE_SCRIPT_GOTHIC"; break; case G_UNICODE_SCRIPT_GREEK: script_name = "G_UNICODE_SCRIPT_GREEK"; break; case G_UNICODE_SCRIPT_GUJARATI: script_name = "G_UNICODE_SCRIPT_GUJARATI"; break; case G_UNICODE_SCRIPT_GURMUKHI: script_name = "G_UNICODE_SCRIPT_GURMUKHI"; break; case G_UNICODE_SCRIPT_HAN: script_name = "G_UNICODE_SCRIPT_HAN"; break; case G_UNICODE_SCRIPT_HANGUL: script_name = "G_UNICODE_SCRIPT_HANGUL"; break; case G_UNICODE_SCRIPT_HEBREW: script_name = "G_UNICODE_SCRIPT_HEBREW"; break; case G_UNICODE_SCRIPT_HIRAGANA: script_name = "G_UNICODE_SCRIPT_HIRAGANA"; break; case G_UNICODE_SCRIPT_KANNADA: script_name = "G_UNICODE_SCRIPT_KANNADA"; break; case G_UNICODE_SCRIPT_KATAKANA: script_name = "G_UNICODE_SCRIPT_KATAKANA"; break; case G_UNICODE_SCRIPT_KHMER: script_name = "G_UNICODE_SCRIPT_KHMER"; break; case G_UNICODE_SCRIPT_LAO: script_name = "G_UNICODE_SCRIPT_LAO"; break; case G_UNICODE_SCRIPT_LATIN: script_name = "G_UNICODE_SCRIPT_LATIN"; break; case G_UNICODE_SCRIPT_MALAYALAM: script_name = "G_UNICODE_SCRIPT_MALAYALAM"; break; case G_UNICODE_SCRIPT_MONGOLIAN: script_name = "G_UNICODE_SCRIPT_MONGOLIAN"; break; case G_UNICODE_SCRIPT_MYANMAR: script_name = "G_UNICODE_SCRIPT_MYANMAR"; break; case G_UNICODE_SCRIPT_OGHAM: script_name = "G_UNICODE_SCRIPT_OGHAM"; break; case G_UNICODE_SCRIPT_OLD_ITALIC: script_name = "G_UNICODE_SCRIPT_OLD_ITALIC"; break; case G_UNICODE_SCRIPT_ORIYA: script_name = "G_UNICODE_SCRIPT_ORIYA"; break; case G_UNICODE_SCRIPT_RUNIC: script_name = "G_UNICODE_SCRIPT_RUNIC"; break; case G_UNICODE_SCRIPT_SINHALA: script_name = "G_UNICODE_SCRIPT_SINHALA"; break; case G_UNICODE_SCRIPT_SYRIAC: script_name = "G_UNICODE_SCRIPT_SYRIAC"; break; case G_UNICODE_SCRIPT_TAMIL: script_name = "G_UNICODE_SCRIPT_TAMIL"; break; case G_UNICODE_SCRIPT_TELUGU: script_name = "G_UNICODE_SCRIPT_TELUGU"; break; case G_UNICODE_SCRIPT_THAANA: script_name = "G_UNICODE_SCRIPT_THAANA"; break; case G_UNICODE_SCRIPT_THAI: script_name = "G_UNICODE_SCRIPT_THAI"; break; case G_UNICODE_SCRIPT_TIBETAN: script_name = "G_UNICODE_SCRIPT_TIBETAN"; break; case G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL: script_name = "G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL"; break; case G_UNICODE_SCRIPT_YI: script_name = "G_UNICODE_SCRIPT_YI"; break; case G_UNICODE_SCRIPT_TAGALOG: script_name = "G_UNICODE_SCRIPT_TAGALOG"; break; case G_UNICODE_SCRIPT_HANUNOO: script_name = "G_UNICODE_SCRIPT_HANUNOO"; break; case G_UNICODE_SCRIPT_BUHID: script_name = "G_UNICODE_SCRIPT_BUHID"; break; case G_UNICODE_SCRIPT_TAGBANWA: script_name = "G_UNICODE_SCRIPT_TAGBANWA"; break; case G_UNICODE_SCRIPT_BRAILLE: script_name = "G_UNICODE_SCRIPT_BRAILLE"; break; case G_UNICODE_SCRIPT_CYPRIOT: script_name = "G_UNICODE_SCRIPT_CYPRIOT"; break; case G_UNICODE_SCRIPT_LIMBU: script_name = "G_UNICODE_SCRIPT_LIMBU"; break; case G_UNICODE_SCRIPT_OSMANYA: script_name = "G_UNICODE_SCRIPT_OSMANYA"; break; case G_UNICODE_SCRIPT_SHAVIAN: script_name = "G_UNICODE_SCRIPT_SHAVIAN"; break; case G_UNICODE_SCRIPT_LINEAR_B: script_name = "G_UNICODE_SCRIPT_LINEAR_B"; break; case G_UNICODE_SCRIPT_TAI_LE: script_name = "G_UNICODE_SCRIPT_TAI_LE"; break; case G_UNICODE_SCRIPT_UGARITIC: script_name = "G_UNICODE_SCRIPT_UGARITIC"; break; case G_UNICODE_SCRIPT_NEW_TAI_LUE: script_name = "G_UNICODE_SCRIPT_NEW_TAI_LUE"; break; case G_UNICODE_SCRIPT_BUGINESE: script_name = "G_UNICODE_SCRIPT_BUGINESE"; break; case G_UNICODE_SCRIPT_GLAGOLITIC: script_name = "G_UNICODE_SCRIPT_GLAGOLITIC"; break; case G_UNICODE_SCRIPT_TIFINAGH: script_name = "G_UNICODE_SCRIPT_TIFINAGH"; break; case G_UNICODE_SCRIPT_SYLOTI_NAGRI: script_name = "G_UNICODE_SCRIPT_SYLOTI_NAGRI"; break; case G_UNICODE_SCRIPT_OLD_PERSIAN: script_name = "G_UNICODE_SCRIPT_OLD_PERSIAN"; break; case G_UNICODE_SCRIPT_KHAROSHTHI: script_name = "G_UNICODE_SCRIPT_KHAROSHTHI"; break; case G_UNICODE_SCRIPT_UNKNOWN: script_name = "G_UNICODE_SCRIPT_UNKNOWN"; break; case G_UNICODE_SCRIPT_BALINESE: script_name = "G_UNICODE_SCRIPT_BALINESE"; break; case G_UNICODE_SCRIPT_CUNEIFORM: script_name = "G_UNICODE_SCRIPT_CUNEIFORM"; break; case G_UNICODE_SCRIPT_PHOENICIAN: script_name = "G_UNICODE_SCRIPT_PHOENICIAN"; break; case G_UNICODE_SCRIPT_PHAGS_PA: script_name = "G_UNICODE_SCRIPT_PHAGS_PA"; break; case G_UNICODE_SCRIPT_NKO: script_name = "G_UNICODE_SCRIPT_NKO"; break; case G_UNICODE_SCRIPT_KAYAH_LI: script_name = "G_UNICODE_SCRIPT_KAYAH_LI"; break; case G_UNICODE_SCRIPT_LEPCHA: script_name = "G_UNICODE_SCRIPT_LEPCHA"; break; case G_UNICODE_SCRIPT_REJANG: script_name = "G_UNICODE_SCRIPT_REJANG"; break; case G_UNICODE_SCRIPT_SUNDANESE: script_name = "G_UNICODE_SCRIPT_SUNDANESE"; break; case G_UNICODE_SCRIPT_SAURASHTRA: script_name = "G_UNICODE_SCRIPT_SAURASHTRA"; break; case G_UNICODE_SCRIPT_CHAM: script_name = "G_UNICODE_SCRIPT_CHAM"; break; case G_UNICODE_SCRIPT_OL_CHIKI: script_name = "G_UNICODE_SCRIPT_OL_CHIKI"; break; case G_UNICODE_SCRIPT_VAI: script_name = "G_UNICODE_SCRIPT_VAI"; break; case G_UNICODE_SCRIPT_CARIAN: script_name = "G_UNICODE_SCRIPT_CARIAN"; break; case G_UNICODE_SCRIPT_LYCIAN: script_name = "G_UNICODE_SCRIPT_LYCIAN"; break; case G_UNICODE_SCRIPT_LYDIAN: script_name = "G_UNICODE_SCRIPT_LYDIAN"; break; case G_UNICODE_SCRIPT_AVESTAN: script_name = "G_UNICODE_SCRIPT_AVESTAN"; break; case G_UNICODE_SCRIPT_BAMUM: script_name = "G_UNICODE_SCRIPT_BAMUM"; break; case G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS: script_name = "G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS"; break; case G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC: script_name = "G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC"; break; case G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI: script_name = "G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI"; break; case G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN: script_name = "G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN"; break; case G_UNICODE_SCRIPT_JAVANESE: script_name = "G_UNICODE_SCRIPT_JAVANESE"; break; case G_UNICODE_SCRIPT_KAITHI: script_name = "G_UNICODE_SCRIPT_KAITHI"; break; case G_UNICODE_SCRIPT_LISU: script_name = "G_UNICODE_SCRIPT_LISU"; break; case G_UNICODE_SCRIPT_MEETEI_MAYEK: script_name = "G_UNICODE_SCRIPT_MEETEI_MAYEK"; break; case G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN: script_name = "G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN"; break; default: script_name = "UNKNOWN"; } l = g_unichar_to_utf8(ch, str); str[l] = '\0'; sstr = utf8_to_sjis(str); printf("%s (%d): %s\n", script_name, script, sstr); g_free(sstr); } #endif return char_set; } static void fontmap_append(struct gra2emf_local *local, const char *font_name, struct gra2emf_fontmap *fontmap) { struct gra2emf_fontmap *cur; if (nhash_get_ptr(local->fontmap, font_name, (void *) &cur)) { nhash_set_ptr(local->fontmap, font_name, fontmap); return; } while (cur) { if (cur->next == NULL) { cur->next = fontmap; fontmap->next = NULL; break; } cur = cur->next; } } static void check_fonts(struct gra2emf_local *local, HDC hdc, const char *alias, const char *font_name) { #if USE_EnumFontFamiliesExW LOGFONTW logfont; #else LOGFONT logfont; #endif glong len, size; gunichar2 *ustr; struct gra2emf_fontmap *fontmap; ustr = g_utf8_to_utf16(font_name, -1, NULL, &len, NULL); len *= 2; logfont.lfCharSet = DEFAULT_CHARSET; logfont.lfPitchAndFamily = 0; size = (len > LF_FACESIZE - 2) ? LF_FACESIZE - 2: len; memcpy(logfont.lfFaceName, ustr, size); memset(((char *) logfont.lfFaceName) + size, 0, 2); g_free(ustr); fontmap = g_malloc0(sizeof(*fontmap)); if (fontmap == NULL) { return; } fontmap->char_set[0] = -1; fontmap->next = NULL; fontmap->name = g_strdup(font_name); if (fontmap->name == NULL) { g_free(fontmap); return; } fontmap_append(local, alias, fontmap); /* fontmap_append() should be called before EnumFontFamiliesExW() when compiled with -O2 option */ #if USE_EnumFontFamiliesExW EnumFontFamiliesExW(hdc, &logfont, (FONTENUMPROCW) enum_font_cb, (LPARAM) fontmap, 0); #else EnumFontFamiliesEx(hdc, &logfont, (FONTENUMPROC) enum_font_cb, (LPARAM) fontmap, 0); #endif } static int gra2emf_init(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2emf_local *local = NULL; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) { return 1; } local = g_malloc0(sizeof(struct gra2emf_local)); if (local == NULL){ goto errexit; } local->fontmap = nhash_new(); local->hdc_dummy = CreateDC("DISPLAY", NULL, NULL, NULL); if (local->hdc_dummy == NULL) { g_free(local); goto errexit; } if (_putobj(obj, "_local", inst, local)) { goto errexit; } local->null_pen = CreatePen(PS_NULL, 0, RGB(0, 0, 0)); #if USE_LINE_TO local->line = 0; #else arrayinit(&local->line, sizeof(int)); #endif return 0; errexit: g_free(local); return 1; } static void free_fontmap_sub(NHASH fontmap, const char *name) { struct gra2emf_fontmap *cur, *next; if (nhash_get_ptr(fontmap, name, (void *) &cur)) { return; } while (cur) { if (cur->name) { g_free(cur->name); } next = cur->next; g_free(cur); cur = next; } nhash_del(fontmap, name); } static void free_fontmap(NHASH fontmap) { free_fontmap_sub(fontmap, "Serif"); free_fontmap_sub(fontmap, "Sans-serif"); free_fontmap_sub(fontmap, "Monospace"); } static int gra2emf_done(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2emf_local *local; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) { return 1; } _getobj(obj, "_local", inst, &local); if (local == NULL) { return 0; } if (local->hdc) { close_emf(local, NULL); } if (local->null_pen) { DeleteObject(local->null_pen); } DeleteDC(local->hdc_dummy); #if USE_LINE_TO draw_lines(local); #else arraydel(&local->line); #endif free_fontmap(local->fontmap); nhash_free(local->fontmap); return 0; } static void add_fontmap(struct gra2emf_local *local, HDC hdc, const char *alias) { struct fontmap *font_map; font_map = gra2cairo_get_fontmap(alias); if (font_map == NULL) { return; } if (font_map->fontname) { check_fonts(local, hdc, alias, font_map->fontname); } if (font_map->alternative) { gchar **alternative; int i; alternative = g_strsplit(font_map->alternative, ",", 0); for (i = 0; alternative[i]; i++) { check_fonts(local, hdc, alias, alternative[i]); } g_strfreev(alternative); } } static int open_emf(struct gra2emf_local *local) { HDC hdc; XFORM xform = {1, 0, 0, -1, 0, 0}; hdc = CreateEnhMetaFile(NULL, NULL, NULL, NULL); if (hdc == NULL) { return 1; } add_fontmap(local, hdc, "Serif"); add_fontmap(local, hdc, "Sans-serif"); add_fontmap(local, hdc, "Monospace"); StartPage(hdc); SaveDC(hdc); SetGraphicsMode(hdc, GM_ADVANCED); SetMapMode(hdc, MM_HIMETRIC); SetWorldTransform(hdc, &xform); SetBkMode(hdc, TRANSPARENT); SetArcDirection(hdc, AD_COUNTERCLOCKWISE); local->update_pen_attribute = TRUE; local->update_brush_attribute = TRUE; local->the_brush = NULL; local->the_pen = NULL; local->hdc = hdc; return 0; } static int close_emf(struct gra2emf_local *local, const char *fname) { HENHMETAFILE emf; int r; HPEN pen; HBRUSH brush; if (local->hdc == NULL) { return 1; } r = 1; if (local->the_pen) { pen = SelectObject(local->hdc, local->the_pen); DeleteObject(pen); local->the_pen = NULL; } if (local->the_brush) { brush = SelectObject(local->hdc, local->the_brush); DeleteObject(brush); local->the_brush = NULL; } RestoreDC(local->hdc, -1); EndPage(local->hdc); emf = CloseEnhMetaFile(local->hdc); if (emf == NULL) { return 1; } if (fname) { HENHMETAFILE emf2; emf2 = CopyEnhMetaFile(emf, fname); if (emf2) { DeleteEnhMetaFile(emf2); r = 0; } } else { if (OpenClipboard(NULL)) { EmptyClipboard(); SetClipboardData(CF_ENHMETAFILE, emf); CloseClipboard(); r = 0; } } DeleteEnhMetaFile(emf); DeleteDC(local->hdc); local->hdc = NULL; if (local->fontalias) { g_free(local->fontalias); local->fontalias = NULL; } if (local->fontname) { g_free(local->fontname); local->fontname = NULL; } free_fontmap(local->fontmap); return r; } static HFONT select_font(struct gra2emf_local *local, const char *fontname, int charset) { LOGFONTW id_font; gunichar2 *ustr; id_font.lfHeight = - local->fontsize; id_font.lfWidth = 0; id_font.lfEscapement = local->fontdir * 10; id_font.lfOrientation = local->fontdir * 10; id_font.lfUnderline = 0; id_font.lfStrikeOut = 0; id_font.lfWeight = (local->font_style & GRA_FONT_STYLE_BOLD) ? FW_BOLD : FW_NORMAL; id_font.lfItalic = (local->font_style & GRA_FONT_STYLE_ITALIC) ? TRUE : FALSE; if (local->fontalias == NULL) { id_font.lfPitchAndFamily = (VARIABLE_PITCH | FF_SWISS); } else if (g_ascii_strncasecmp(local->fontalias, "Sans-serif", 5) == 0) { id_font.lfPitchAndFamily = (VARIABLE_PITCH | FF_SWISS); } else if (g_ascii_strncasecmp(local->fontalias, "Serif", 5) == 0) { id_font.lfPitchAndFamily = (VARIABLE_PITCH | FF_ROMAN); } else if (g_ascii_strncasecmp(local->fontalias, "Monospace", 7) == 0) { id_font.lfPitchAndFamily = (FIXED_PITCH | FF_MODERN); } else { id_font.lfPitchAndFamily = (VARIABLE_PITCH | FF_SWISS); } id_font.lfCharSet = charset; // id_font.lfOutPrecision = OUT_DEFAULT_PRECIS; id_font.lfOutPrecision = OUT_TT_ONLY_PRECIS; id_font.lfClipPrecision = CLIP_STROKE_PRECIS; id_font.lfQuality = PROOF_QUALITY; ustr = g_utf8_to_utf16(fontname, -1, NULL, NULL, NULL); wcsncpy(id_font.lfFaceName, ustr, LF_FACESIZE - 1); g_free(ustr); id_font.lfFaceName[LF_FACESIZE - 1] = L'\0'; return CreateFontIndirectW(&id_font); } void draw_text_rect(struct gra2emf_local *local, int w, int h) { POINT pos[4]; HGDIOBJ brush, old_brush; pos[0].x = local->x - h * local->fontsin; pos[0].y = local->y - h * local->fontcos; pos[1].x = local->x; pos[1].y = local->y; pos[2].x = local->x + w * local->fontcos; pos[2].y = local->y - w * local->fontsin; pos[3].x = local->x + w * local->fontcos - h * local->fontsin; pos[3].y = local->y - w * local->fontsin - h * local->fontcos; brush = GetStockObject(NULL_BRUSH); old_brush = SelectObject(local->hdc, brush); BeginPath(local->hdc); Polygon(local->hdc, pos, 4); EndPath(local->hdc); FillPath(local->hdc); SelectObject(local->hdc, old_brush); } static void draw_str_sub(struct gra2emf_local *local, const char *str, const char *fontname, int charset) { gunichar2 *ustr; glong len; HDC hdc; char *utf8_str; HFONT font, old_font; SIZE str_size; UINT align; if (str == NULL || str[0] == '\0') { return; } hdc = local->hdc; align = TA_BASELINE; if (charset == HEBREW_CHARSET || charset == ARABIC_CHARSET) { align |= TA_RTLREADING; } SetTextCharacterExtra(hdc, local->fontspace); SetTextColor(hdc, RGB(local->r, local->g, local->b)); font = select_font(local, fontname, charset); old_font = SelectObject(hdc, font); SetTextAlign(hdc, align); utf8_str = gra2cairo_get_utf8_str(str, local->symbol); ustr = g_utf8_to_utf16(utf8_str, -1, NULL, &len, NULL); g_free(utf8_str); ExtTextOutW(hdc, local->x, local->y, 0, NULL, ustr, len, NULL); GetTextExtentPoint32W(hdc, ustr, len, &str_size); SelectObject(hdc, old_font); DeleteObject(font); draw_text_rect(local, str_size.cx, str_size.cy); local->x += str_size.cx * local->fontcos; local->y -= str_size.cx * local->fontsin; g_free(ustr); } static const char * check_font_indices(struct gra2emf_local *local, gunichar ch) { WORD indices[2]; HFONT font, old_font; gunichar str[2]; gunichar2 *ustr; struct gra2emf_fontmap *cur; DWORD r; str[0] = ch; str[1] = 0; if (local->fontalias == NULL) { return NULL; } if (nhash_get_ptr(local->fontmap, local->fontalias, (void *) &cur)) { return NULL; } ustr = g_ucs4_to_utf16(str, 1, NULL, NULL, NULL); if (ustr == NULL) { return NULL; } while (cur) { font = select_font(local, cur->name, ANSI_CHARSET); old_font = SelectObject(local->hdc_dummy, font); r = GetGlyphIndicesW(local->hdc_dummy, ustr, 1, indices, GGI_MARK_NONEXISTING_GLYPHS); SelectObject(local->hdc_dummy, old_font); DeleteObject(font); if (r != GDI_ERROR && indices[0] != 0xffff) { g_free(ustr); return cur->name; } cur = cur->next; } g_free(ustr); return NULL; } static void draw_str(struct gra2emf_local *local, const char *str) { gunichar ch; const char *ptr; GString *sub_str; const char *font, *prev_font; int prev_charset; sub_str = g_string_new(""); prev_font = NULL; prev_charset = DEFAULT_CHARSET; for (ptr = str; *ptr; ptr = g_utf8_next_char(ptr)) { int charset; ch = g_utf8_get_char(ptr); charset = get_char_set(ch); font = check_font_indices(local, ch); if (font == NULL) { font = "Arial"; } if (prev_font == NULL) { prev_charset = charset; prev_font = font; } else if (prev_font != font) { draw_str_sub(local, sub_str->str, prev_font, prev_charset); g_string_truncate(sub_str, 0); prev_font = font; prev_charset = charset; } if (prev_charset < charset) { prev_charset = charset; } g_string_append_unichar(sub_str, ch); } draw_str_sub(local, sub_str->str, prev_font, prev_charset); g_string_free(sub_str, TRUE); } static int gra2emf_flush(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2emf_local *local; _getobj(obj, "_local", inst, &local); if (local->hdc == NULL) { return -1; } return 0; } static void create_pen(struct gra2emf_local *local) { HPEN old; DWORD line_attr; LOGBRUSH log_brush; HPEN pen; if (! local->update_pen_attribute) { return; } line_attr = PS_GEOMETRIC; switch (local->line_cap) { case 2: line_attr |= PS_ENDCAP_SQUARE; break; case 1: line_attr |= PS_ENDCAP_ROUND; break; default: line_attr |= PS_ENDCAP_FLAT; } switch (local->line_join) { case 2: line_attr |= PS_JOIN_BEVEL; break; case 1: line_attr |= PS_JOIN_ROUND; break; default: line_attr |= PS_JOIN_MITER; } if (local->line_style) { line_attr |= PS_USERSTYLE; } else { line_attr |= PS_SOLID; } log_brush.lbStyle = BS_SOLID; log_brush.lbColor = RGB(local->r, local->g, local->b); pen = ExtCreatePen(line_attr, local->line_width, &log_brush, local->line_style_num, local->line_style); old = SelectObject(local->hdc, pen); if (local->the_pen) { DeleteObject(old); } else { local->the_pen = old; } local->update_pen_attribute = FALSE; } static void create_brush(struct gra2emf_local *local) { HBRUSH brush, old_brush; if (! local->update_brush_attribute) { return; } brush = CreateSolidBrush(RGB(local->r, local->g, local->b)); old_brush = SelectObject(local->hdc, brush); if (local->the_brush) { DeleteObject(old_brush); } else { local->the_brush = old_brush; } local->update_brush_attribute = FALSE; } static void draw_arc(struct gra2emf_local *local, int x, int y, int w, int h, int start, int angle, int style) { double a1, a2; HPEN old_pen; if (angle == 0) { return; } if (angle % 36000 == 0 && (style == 1 || style == 2)) { create_brush(local); old_pen = SelectObject(local->hdc, local->null_pen); Ellipse(local->hdc, x - w, y - h, x + w, y + h); SelectObject(local->hdc, old_pen); return; } a1 = start * (MPI / 18000.0); a2 = angle * (MPI / 18000.0) + a1; switch (style) { case 1: create_brush(local); old_pen = SelectObject(local->hdc, local->null_pen); Pie(local->hdc, x - w, y - h, x + w, y + h, x + w * cos(a1), y - h * sin(a1), x + w * cos(a2), y - h * sin(a2) ); SelectObject(local->hdc, old_pen); break; case 2: create_brush(local); old_pen = SelectObject(local->hdc, local->null_pen); Chord(local->hdc, x - w, y - h, x + w, y + h, x + w * cos(a1), y - h * sin(a1), x + w * cos(a2), y - h * sin(a2)); SelectObject(local->hdc, old_pen); break; case 3: create_pen(local); MoveToEx(local->hdc, x, y, NULL); BeginPath(local->hdc); ArcTo(local->hdc, x - w, y - h, x + w, y + h, x + w * cos(a1), y - h * sin(a1), x + w * cos(a2), y - h * sin(a2) ); CloseFigure(local->hdc); EndPath(local->hdc); StrokePath(local->hdc); break; case 4: create_pen(local); BeginPath(local->hdc); Arc(local->hdc, x - w, y - h, x + w, y + h, x + w * cos(a1), y - h * sin(a1), x + w * cos(a2), y - h * sin(a2) ); CloseFigure(local->hdc); EndPath(local->hdc); StrokePath(local->hdc); break; default: create_pen(local); Arc(local->hdc, x - w, y - h, x + w, y + h, x + w * cos(a1), y - h * sin(a1), x + w * cos(a2), y - h * sin(a2) ); break; } } static void set_alternative_font(struct gra2emf_local *local) { struct compatible_font_info *info; if (local->fontalias) { g_free(local->fontalias); } local->fontalias = NULL; if (local->fontname == NULL || local->fontname[0] == '\0') { return; } info = gra2cairo_get_compatible_font_info(local->fontname); if (info == NULL) { local->fontalias = g_strdup(local->fontname); local->symbol = FALSE; return; } local->fontalias = g_strdup(info->name); local->font_style = info->style; local->symbol = info->symbol; } static void draw_rectangle(struct gra2emf_local *local, int x1, int y1, int x2, int y2, int fill) { x1 += local->offsetx; y1 += local->offsety; x2 += local->offsetx; y2 += local->offsety; #if USE_LINE_TO if (fill) { create_brush(local); } else { create_pen(local); } BeginPath(local->hdc); MoveToEx(local->hdc, x1, y1, NULL); LineTo(local->hdc, x1, y2); LineTo(local->hdc, x2, y2); LineTo(local->hdc, x2, y1); CloseFigure(local->hdc); EndPath(local->hdc); if (fill) { FillPath(local->hdc); } else { StrokePath(local->hdc); } #else /* USE_LINE_TO */ if (fill) { HPEN old_pen; create_brush(local); old_pen = SelectObject(local->hdc, local->null_pen); Rectangle(local->hdc, x1, y1, x2, y2); SelectObject(local->hdc, old_pen); } else { HBRUSH old_brush; create_pen(local); old_brush = SelectObject(local->hdc, GetStockObject(NULL_BRUSH)); Rectangle(local->hdc, x1, y1, x2, y2); SelectObject(local->hdc, old_brush); } #endif /* USE_LINE_TO */ } static void draw_polygon(struct gra2emf_local *local, int n, int *points, int fill) { int i; #if USE_LINE_TO if (n < 2) { return; } switch (fill) { case 0: create_pen(local); break; case 1: create_brush(local); SetPolyFillMode(local->hdc, ALTERNATE); break; case 2: create_brush(local); SetPolyFillMode(local->hdc, WINDING); break; } BeginPath(local->hdc); MoveToEx(local->hdc, points[0] + local->offsetx, points[1] + local->offsety, NULL); for (i = 1; i < n; i++) { LineTo(local->hdc, points[i * 2 + 0] + local->offsetx, points[i * 2 + 1] + local->offsety); } CloseFigure(local->hdc); EndPath(local->hdc); switch (fill) { case 0: StrokePath(local->hdc); break; case 1: case 2: FillPath(local->hdc); break; } #else /* USE_LINE_TO */ HPEN old_pen; HBRUSH old_brush; POINT *pos; if (n < 2) { return; } pos = g_malloc(sizeof(*pos) * n); if (pos == NULL) { return; } for (i = 0; i < n; i++) { pos[i].x = points[i * 2] + local->offsetx; pos[i].y = points[i * 2 + 1] + local->offsety; } switch (fill) { case 0: create_pen(local); old_brush = SelectObject(local->hdc, GetStockObject(NULL_BRUSH)); Polygon(local->hdc, pos, n); SelectObject(local->hdc, old_brush); break; case 1: create_brush(local); SetPolyFillMode(local->hdc, ALTERNATE); old_pen = SelectObject(local->hdc, local->null_pen); Polygon(local->hdc, pos, n); SelectObject(local->hdc, old_pen); break; case 2: create_brush(local); SetPolyFillMode(local->hdc, WINDING); old_pen = SelectObject(local->hdc, local->null_pen); Polygon(local->hdc, pos, n); SelectObject(local->hdc, old_pen); break; } #endif /* USE_LINE_TO */ } static void draw_polyline(struct gra2emf_local *local, int n, int *points) { int i; #if USE_LINE_TO if (n < 2) { return; } create_pen(local); BeginPath(local->hdc); MoveToEx(local->hdc, points[0] + local->offsetx, points[1] + local->offsety, NULL); for (i = 1; i < n; i++) { LineTo(local->hdc, points[i * 2 + 0] + local->offsetx, points[i * 2 + 1] + local->offsety); } EndPath(local->hdc); StrokePath(local->hdc); #else /* USE_LINE_TO */ POINT *pos; if (n < 2) { return; } pos = g_malloc(sizeof(*pos) * n); if (pos == NULL) { return; } for (i = 0; i < n; i++) { pos[i].x = points[i * 2 + 0] + local->offsetx; pos[i].y = points[i * 2 + 1] + local->offsety; } create_pen(local); Polyline(local->hdc, pos, n); #endif /* USE_LINE_TO */ } static void draw_lines(struct gra2emf_local *local) { #if USE_LINE_TO if (local->line > 0) { EndPath(local->hdc); StrokePath(local->hdc); } local->line = 0; #else POINT *pos; int i, n, *data; n = arraynum(&local->line) / 2; if (n < 2) { arrayclear(&local->line); return; } data = arraydata(&local->line); pos = g_malloc(sizeof(*pos) * n); if (pos == NULL) { return; } for (i = 0; i < n; i++) { pos[i].x = data[i * 2]; pos[i].y = data[i * 2 + 1]; } create_pen(local); Polyline(local->hdc, pos, n); arrayclear(&local->line); #endif } static int gra2emf_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char code, *cstr, *tmp, *fname; int *cpar, r; double x, y, w, h, fontdir; struct gra2emf_local *local; POINT lpoint[2]; local = (struct gra2emf_local *)argv[2]; code = *(char *)(argv[3]); cpar = (int *)argv[4]; cstr = argv[5]; if (code != 'I' && local->hdc == NULL) { return 1; } if (code != 'T') { draw_lines(local); } switch (code) { case 'I': if (open_emf(local)) { error(obj, ERREMF); return 1; } break; case '%': case 'X': case 'Z': break; case 'E': r = 0; _getobj(obj, "file", inst, &fname); if (fname) { fname = g_win32_locale_filename_from_utf8(fname); } r = close_emf(local, fname); if (fname) { g_free(fname); } if (r) { error(obj, ERREMF); return 1; } break; case 'V': local->offsetx = cpar[1]; local->offsety = cpar[2]; if (cpar[5]) { BeginPath(local->hdc); Rectangle(local->hdc,cpar[1], cpar[2], cpar[3], cpar[4]); EndPath(local->hdc); SelectClipPath(local->hdc, RGN_COPY); } else { SelectClipRgn(local->hdc, NULL); } break; case 'A': if (local->line_style) { g_free(local->line_style); } local->line_style = NULL; local->line_style_num = 0; if (cpar[1]) { int i; local->line_style = g_malloc(sizeof(* (local->line_style)) * cpar[1]); if (local->line_style == NULL) { break; } for (i = 0; i < cpar[1]; i++) { local->line_style[i] = cpar[6 + i]; } local->line_style_num = cpar[1]; } local->line_width = cpar[2]; local->line_cap = cpar[3]; local->line_join = cpar[4]; SetMiterLimit(local->hdc, cpar[5] / 100.0, NULL); local->update_pen_attribute = TRUE; break; case 'G': local->r = cpar[1]; local->g = cpar[2]; local->b = cpar[3]; local->update_pen_attribute = TRUE; local->update_brush_attribute = TRUE; break; case 'M': local->x = cpar[1] + local->offsetx; local->y = cpar[2] + local->offsety; break; case 'N': local->x += cpar[1]; local->y += cpar[2]; break; case 'L': lpoint[0].x = cpar[1] + local->offsetx; lpoint[0].y = cpar[2] + local->offsety; lpoint[1].x = cpar[3] + local->offsetx; lpoint[1].y = cpar[4] + local->offsety; create_pen(local); Polyline(local->hdc, lpoint, 2); break; case 'T': #if USE_LINE_TO if (local->line == 0) { create_pen(local); BeginPath(local->hdc); MoveToEx(local->hdc, local->x, local->y, NULL); } local->x = cpar[1] + local->offsetx; local->y = cpar[2] + local->offsety; LineTo(local->hdc, local->x, local->y); local->line++; #else /* USE_LINE_TO */ /* it seems that the function LineTo() cannot handle dotted line correctly when the points exist very closely. */ if (arraynum(&local->line) < 1) { arrayclear(&local->line); arrayadd(&local->line, &local->x); arrayadd(&local->line, &local->y); } local->x = cpar[1] + local->offsetx; local->y = cpar[2] + local->offsety; arrayadd(&local->line, &local->x); arrayadd(&local->line, &local->y); #endif /* USE_LINE_TO */ break; case 'C': x = cpar[1] + local->offsetx; y = cpar[2] + local->offsety; w = cpar[3]; h = cpar[4]; draw_arc(local, x, y, w, h, cpar[5], cpar[6], cpar[7]); break; case 'B': draw_rectangle(local, cpar[1], cpar[2], cpar[3], cpar[4], cpar[5]); break; case 'P': SetPixel(local->hdc, cpar[1] + local->offsetx, cpar[2] + local->offsety, RGB(local->r, local->g, local->b)); break; case 'R': draw_polyline(local, cpar[1], cpar + 2); break; case 'D': draw_polygon(local, cpar[1], cpar + 3, cpar[2]); break; case 'F': if (local->fontname) { g_free(local->fontname); } local->fontname = g_strdup(cstr); break; case 'H': local->fontspace = cpar[2] / 72.0 * 25.4; local->fontsize = cpar[1] / 72.0 * 25.4; fontdir = cpar[3] * (MPI / 18000.0); local->fontdir = (cpar[3] % 36000) / 100.0; if (local->fontdir < 0) { local->fontdir += 360; } local->fontsin = sin(fontdir); local->fontcos = cos(fontdir); local->font_style = (cpar[0] > 3) ? cpar[4] : 0; set_alternative_font(local); break; case 'S': draw_str(local, argv[5]); break; case 'K': tmp = sjis_to_utf8(cstr); if (tmp) { draw_str(local, tmp); g_free(tmp); } break; default: break; } return 0; } static struct objtable gra2emf[] = { {"init", NVFUNC, NEXEC, gra2emf_init, NULL, 0}, {"done", NVFUNC, NEXEC, gra2emf_done, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"file", NSTR, NREAD | NWRITE, NULL, NULL,0}, {"flush", NVFUNC,NREAD|NEXEC, gra2emf_flush,"",0}, {"_output", NVFUNC, 0, gra2emf_output, NULL, 0}, {"_local", NPOINTER, 0, NULL, NULL, 0}, }; #define TBLNUM (sizeof(gra2emf) / sizeof(*gra2emf)) void * addgra2emf(void) /* addgra2emfile() returns NULL on error */ { return addobject(NAME, NULL, PARENT, OVERSION, TBLNUM, gra2emf, ERRNUM, gra2emf_errorlist, NULL, NULL); } #endif /* WINDOWS */ ngraph-gtk-6.09.05/src/gtk/gtk_ruler.c0000644000175000017500000003325513705547617014423 00000000000000/* GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #include "gtk_common.h" #include "gtk_ruler.h" #include "mathfn.h" #include "x11menu.h" #include #include #define RULER_FONT_SIZE 7000 #define RULER_WIDTH 14 #define MINIMUM_INCR 5 #define MAXIMUM_SUBDIVIDE 5 #define MAXIMUM_SCALES 10 typedef struct _Nruler { int orientation, ofst, length, size; cairo_surface_t *backing_store; double lower, upper, position; double save_l, save_u; GtkWidget *widget, *parent; GtkStyleContext *saved_style; GdkRGBA saved_fg; } Nruler; struct _NrulerMetric { /* This should be points_per_unit. This is the size of the unit * in 1/72nd's of an inch and has nothing to do with screen pixels */ gdouble pixels_per_unit; gdouble ruler_scale[MAXIMUM_SCALES]; gint subdivide[MAXIMUM_SUBDIVIDE]; /* five possible modes of subdivision */ }; static const struct _NrulerMetric Metric = { 28.35, { 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 }, { 1, 5, 10, 50, 100 } }; #define RULER_DATA_KEY "nruler" static void nruler_make_pixmap(Nruler *ruler, GtkWidget *widget, GtkWidget *parent); static void nruler_draw_ticks(Nruler *ruler, GtkWidget *widget); static void nruler_realize(GtkWidget *widget, gpointer user_data); static void nruler_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data); static gboolean nruler_destroy(GtkWidget *widget, gpointer user_data); static void nruler_draw_pos(Nruler *ruler, GtkWidget *widget, cairo_t *cr); static gboolean nruler_expose(GtkWidget *widget, cairo_t *cr, gpointer user_data); static GtkStyleContext *nruler_get_color(Nruler *ruler, GdkRGBA *fg); GtkWidget * nruler_new(GtkOrientation orientation) { Nruler *ruler; GtkWidget *w, *frame; ruler = g_malloc0(sizeof(*ruler)); if (ruler == NULL) { return NULL; } w = gtk_drawing_area_new(); if (orientation == GTK_ORIENTATION_VERTICAL) { gtk_widget_set_size_request(w, RULER_WIDTH, -1); } else { gtk_widget_set_size_request(w, -1, RULER_WIDTH); } frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); gtk_container_add(GTK_CONTAINER(frame), w); ruler->orientation = orientation; ruler->widget = w; ruler->parent = frame; ruler->saved_style = NULL; g_object_set_data(G_OBJECT(frame), RULER_DATA_KEY, ruler); g_signal_connect(w, "draw", G_CALLBACK(nruler_expose), ruler); g_signal_connect(w, "realize", G_CALLBACK(nruler_realize), ruler); g_signal_connect(w, "size-allocate", G_CALLBACK(nruler_size_allocate), ruler); g_signal_connect(frame, "unrealize", G_CALLBACK(nruler_destroy), ruler); return frame; } void nruler_set_range(GtkWidget *frame, double lower, double upper) { Nruler *ruler; if (frame == NULL) { return; } ruler = g_object_get_data(G_OBJECT(frame), RULER_DATA_KEY); if (ruler == NULL) { return; } ruler->lower = lower; ruler->upper = upper; if (gtk_widget_is_drawable(ruler->widget)) { gtk_widget_queue_draw(ruler->widget); } } void nruler_set_position(GtkWidget *frame, double position) { Nruler *ruler; if (frame == NULL) { return; } ruler = g_object_get_data(G_OBJECT(frame), RULER_DATA_KEY); if (ruler == NULL) { return; } ruler->position = position; if (gtk_widget_is_drawable(ruler->widget)) { gtk_widget_queue_draw(ruler->widget); } } static gboolean nruler_destroy(GtkWidget *widget, gpointer user_data) { Nruler *ruler; g_object_set_data(G_OBJECT(widget), RULER_DATA_KEY, NULL); ruler = (Nruler *) user_data; if (ruler) { if (ruler->backing_store) { cairo_surface_destroy(ruler->backing_store); } g_free(ruler); } return FALSE; } static void nruler_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { Nruler *ruler; ruler = (Nruler *) user_data; nruler_make_pixmap(ruler, widget, ruler->parent); } static void nruler_realize(GtkWidget *widget, gpointer user_data) { Nruler *ruler; ruler = (Nruler *) user_data; nruler_make_pixmap(ruler, widget, ruler->parent); } static gboolean nruler_expose(GtkWidget *widget, cairo_t *cr, gpointer user_data) { if (gtk_widget_is_drawable(widget)) { Nruler *ruler = (Nruler *) user_data; nruler_draw_ticks(ruler, widget); nruler_draw_pos(ruler, widget, cr); } return FALSE; } static void nruler_make_pixmap(Nruler *ruler, GtkWidget *widget, GtkWidget *parent) { gint width; gint height; GtkAllocation allocation, parent_allocation; if (! gtk_widget_is_drawable(widget)) { return; } gtk_widget_get_allocation(widget, &allocation); gtk_widget_get_allocation(parent, &parent_allocation); if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { ruler->length = parent_allocation.width; ruler->size = allocation.height; ruler->ofst = (parent_allocation.width - allocation.width) / 2; } else { ruler->length = parent_allocation.height; ruler->size = allocation.width; ruler->ofst = (parent_allocation.height - allocation.height) / 2; } if (ruler->backing_store) { width = cairo_image_surface_get_width(ruler->backing_store); height = cairo_image_surface_get_height(ruler->backing_store); if ((width == allocation.width) && (height == allocation.height)) { return; } cairo_surface_destroy(ruler->backing_store); } ruler->backing_store = cairo_image_surface_create(CAIRO_FORMAT_RGB24, allocation.width, allocation.height); ruler->save_l = 0; ruler->save_u = 0; } static void nruler_draw_ticks(Nruler *ruler, GtkWidget *widget) { cairo_t *cr; gint i, j, len; gint length, ideal_length; gdouble lower, upper; /* Upper and lower limits, in ruler units */ gdouble increment; /* Number of pixels per unit */ gint scale; /* Number of units per major unit */ gdouble subd_incr; gdouble start, end, cur; gchar unit_str[32]; gint digit_height; gint text_width; gint text_height; gint pos; PangoLayout *layout; PangoRectangle logical_rect, ink_rect; PangoFontDescription *fs; GtkAllocation allocation; GdkRGBA fg; GtkStyleContext *context; if (! gtk_widget_is_drawable(widget)) { return; } if (ruler->save_l == ruler->lower && ruler->save_u == ruler->upper) { return; } gtk_widget_get_allocation(widget, &allocation); layout = gtk_widget_create_pango_layout(widget, "012456789"); fs = pango_font_description_new(); pango_font_description_set_size(fs, RULER_FONT_SIZE); pango_layout_set_font_description(layout, fs); pango_font_description_free(fs); pango_layout_get_extents(layout, &ink_rect, &logical_rect); digit_height = PANGO_PIXELS(ink_rect.height) + 2; context = nruler_get_color(ruler, &fg); cr = cairo_create(ruler->backing_store); gtk_render_background(context, cr, 0, 0, allocation.width, allocation.height); gdk_cairo_set_source_rgba(cr, &fg); if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { cairo_rectangle(cr, 0, allocation.height - 1, allocation.width, 1); } else { cairo_rectangle(cr, allocation.width - 1, 0, 1, allocation.height); } upper = ruler->upper / Metric.pixels_per_unit; lower = ruler->lower / Metric.pixels_per_unit; if (upper - lower == 0) { goto out; } increment = (gdouble) ruler->length / (upper - lower); /* determine the scale H * We calculate the text size as for the vruler instead of using * text_width = gdk_string_width(font, unit_str), so that the result * for the scale looks consistent with an accompanying vruler */ /* determine the scale V * use the maximum extents of the ruler to determine the largest * possible number to be displayed. Calculate the height in pixels * of this displayed text. Use this height to find a scale which * leaves sufficient room for drawing the ruler. */ scale = ceil(ruler->upper / Metric.pixels_per_unit); len = g_snprintf(unit_str, sizeof(unit_str), "%d", scale); if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { text_width = len * digit_height + 1; for (scale = 0; scale < MAXIMUM_SCALES; scale++) { if (Metric.ruler_scale[scale] * fabs(increment) > 2 * text_width) { break; } } } else { text_height = len * digit_height + 1; for (scale = 0; scale < MAXIMUM_SCALES; scale++) { if (Metric.ruler_scale[scale] * fabs(increment) > 2 * text_height){ break; } } } if (scale == MAXIMUM_SCALES) { scale = MAXIMUM_SCALES - 1; } /* drawing starts here */ length = 0; for (i = MAXIMUM_SUBDIVIDE - 1; i >= 0; i--) { subd_incr = Metric.ruler_scale[scale] / Metric.subdivide[i]; if (subd_incr * fabs(increment) <= MINIMUM_INCR) { continue; } /* Calculate the length of the tickmarks. Make sure that * this length increases for each set of ticks */ ideal_length = ruler->size / (i + 1) - 1; if (ideal_length > ++length) { length = ideal_length; } if (lower < upper) { start = floor(lower / subd_incr) * subd_incr; end = ceil(upper / subd_incr) * subd_incr; } else { start = floor(upper / subd_incr) * subd_incr; end = ceil(lower / subd_incr) * subd_incr; } for (cur = start; cur <= end; cur += subd_incr) { pos = nround((cur - lower) * increment) - ruler->ofst; if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { cairo_rectangle(cr, pos, ruler->size - length, 1, length); } else { cairo_rectangle(cr, ruler->size - length, pos, length, 1); } /* draw label */ if (i == 0) { int ofst; len = g_snprintf(unit_str, sizeof(unit_str), "%d", (int) cur); ofst = PANGO_PIXELS(logical_rect.y - ink_rect.y); if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { pango_layout_set_text(layout, unit_str, -1); cairo_move_to(cr, pos + 2, ofst + 1); pango_cairo_show_layout(cr, layout); } else { for (j = 0; j < len; j++) { pango_layout_set_text(layout, unit_str + j, 1); cairo_move_to(cr, 1, pos + digit_height * j + 2 + ofst); pango_cairo_show_layout(cr, layout); } } } } } cairo_fill(cr); ruler->save_l = ruler->lower; ruler->save_u = ruler->upper; out: cairo_destroy(cr); g_object_unref(layout); } static void style_changed(GtkStyleContext *stylecontext, gpointer user_data) { Nruler *ruler; ruler = user_data; gtk_style_context_get_color(stylecontext, GTK_STATE_FLAG_NORMAL, &ruler->saved_fg); } static GtkStyleContext * nruler_get_color(Nruler *ruler, GdkRGBA *fg) { if (ruler->saved_style == NULL) { ruler->saved_style = gtk_widget_get_style_context(TopLevel); gtk_style_context_get_color(ruler->saved_style, GTK_STATE_FLAG_NORMAL, &ruler->saved_fg); g_signal_connect(ruler->saved_style, "changed", G_CALLBACK(style_changed), ruler); } if (fg == NULL) { return ruler->saved_style; } *fg = ruler->saved_fg; return ruler->saved_style; } static void nruler_draw_pos(Nruler *ruler, GtkWidget *widget, cairo_t *cr) { gint x, y; gint width, height; gint bs_width, bs_height; gdouble increment; GtkAllocation allocation; GdkRGBA fg; gtk_widget_get_allocation(widget, &allocation); if (! gtk_widget_is_drawable(widget)) { return; } if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { width = ruler->length; height = ruler->size; bs_width = height / 2 + 2; bs_width |= 1; /* make sure it's odd */ bs_height = bs_width / 2 + 1; } else { width = ruler->size; height = ruler->length; bs_height = width / 2 + 2; bs_height |= 1; /* make sure it's odd */ bs_width = bs_height / 2 + 1; } if (bs_width <= 0 || bs_height <= 0) { return; } /* If a backing store exists, restore the ruler */ if (ruler->backing_store) { cairo_set_source_surface(cr, ruler->backing_store, 0, 0); cairo_rectangle(cr, 0, 0, allocation.width, allocation.height); cairo_fill(cr); } if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { increment = (gdouble) width / (ruler->upper - ruler->lower); x = nround((ruler->position - ruler->lower) * increment) - bs_width / 2 - ruler->ofst; y = (height + bs_height) / 2 - 1; } else { increment = (gdouble) height / (ruler->upper - ruler->lower); x = (width + bs_width) / 2 - 1; y = nround((ruler->position - ruler->lower) * increment) - bs_height / 2 - ruler->ofst; } nruler_get_color(ruler, &fg); gdk_cairo_set_source_rgba(cr, &fg); cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); cairo_move_to(cr, x, y); if (ruler->orientation == GTK_ORIENTATION_HORIZONTAL) { cairo_line_to(cr, x + bs_width / 2.0, y + bs_height); cairo_line_to(cr, x + bs_width, y); } else { cairo_line_to(cr, x + bs_width, y + bs_height / 2.0); cairo_line_to(cr, x, y + bs_height); } cairo_fill(cr); } ngraph-gtk-6.09.05/src/gtk/gtk_entry_completion.c0000644000175000017500000000654713764127565016671 00000000000000/* * $Id: gtk_entry_completion.c,v 1.8 2010-03-04 08:30:16 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include "ioutil.h" #include "object.h" static int HistSize; GtkEntryCompletion * entry_completion_create(void) { GtkListStore *list; GtkEntryCompletion *comp; list = gtk_list_store_new(1, G_TYPE_STRING); comp = gtk_entry_completion_new(); gtk_entry_completion_set_model(comp, GTK_TREE_MODEL(list)); gtk_entry_completion_set_inline_completion(comp, FALSE); gtk_entry_completion_set_popup_completion(comp, TRUE); gtk_entry_completion_set_popup_set_width(comp, TRUE); gtk_entry_completion_set_text_column(comp, 0); return comp; } void entry_completion_set_entry(GtkEntryCompletion *comp, GtkWidget *entry) { GtkWidget *old_entry; if (comp == NULL || entry == NULL) { return; } old_entry = gtk_entry_completion_get_entry(comp); if (old_entry) { gtk_entry_set_completion(GTK_ENTRY(old_entry), NULL); } gtk_entry_set_completion(GTK_ENTRY(entry), comp); } static gboolean save_history_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { FILE *fp; int *a; char *v; fp = (FILE *) data; a = gtk_tree_path_get_indices(path); if (a == NULL || a[0] >= HistSize) return TRUE; gtk_tree_model_get(model, iter, 0, &v, -1); if (v) { fprintf(fp, "%s\n", v); g_free(v); } return FALSE; } static gboolean add_completion(GtkListStore *list, FILE *fp) { char *buf; GtkTreeIter iter; int r; r = fgetline(fp, &buf); if (r || buf == NULL) return TRUE; g_strchomp(buf); if (g_utf8_validate(buf, -1, NULL)) { gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, 0, buf, -1); } g_free(buf); return FALSE; } int entry_completion_save(GtkEntryCompletion *comp, char *file, int size) { FILE *fp; GtkTreeModel *model; model = gtk_entry_completion_get_model(comp); if (model == NULL) return 1; fp = nfopen(file, "w"); if (fp == NULL) return 1; HistSize = size; gtk_tree_model_foreach(model, save_history_cb, fp); fclose(fp); return 0; } int entry_completion_load(GtkEntryCompletion *comp, char *file, int size) { FILE *fp; int i; GtkTreeModel *model; model = gtk_entry_completion_get_model(comp); if (model == NULL) return 1; gtk_list_store_clear(GTK_LIST_STORE(model)); fp = nfopen(file, "r"); if (fp == NULL) return 1; for (i = 0; i < size; i++) { if (add_completion(GTK_LIST_STORE(model), fp)) break; } fclose(fp); return 0; } void entry_completion_append(GtkEntryCompletion *comp, const char *str) { gboolean found; GtkTreeModel *model; GtkTreeIter iter; char *v = NULL; if (comp == NULL || str == NULL || strlen(str) == 0) return; if (strchr(str, '\n')) { return; } model = gtk_entry_completion_get_model(comp); if (model == NULL) return; found = gtk_tree_model_get_iter_first(model, &iter); while (found) { gtk_tree_model_get(model, &iter, 0, &v, -1); if (v) { if (strcmp(str, v) == 0) { gtk_list_store_remove(GTK_LIST_STORE(model), &iter); g_free(v); break; } g_free(v); } found = gtk_tree_model_iter_next(model, &iter); } gtk_list_store_prepend(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, str, -1); } ngraph-gtk-6.09.05/src/gtk/x11lgnd.h0000644000175000017500000000343013351432267013667 00000000000000/* * $Id: x11lgnd.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ typedef void (* legend_cb_func)(GtkMenuItem *w, gpointer client_data); void LegendWinUpdate(char **objects, int clear, int draw); void CmLineUpdate(void *w, gpointer client_data); void CmLineDel(void *w, gpointer client_data); void CmRectUpdate(void *w, gpointer client_data); void CmRectDel(void *w, gpointer client_data); void CmArcUpdate(void *w, gpointer client_data); void CmArcDel(void *w, gpointer client_data); void CmMarkUpdate(void *w, gpointer client_data); void CmMarkDel(void *w, gpointer client_data); void CmTextUpdate(void *w, gpointer client_data); void CmTextDel(void *w, gpointer client_data); GtkWidget *create_path_list(struct SubWin *d); GtkWidget *create_rect_list(struct SubWin *d); GtkWidget *create_arc_list(struct SubWin *d); GtkWidget *create_mark_list(struct SubWin *d); GtkWidget *create_text_list(struct SubWin *d); void CmOptionTextDef(void *w, gpointer client_data); ngraph-gtk-6.09.05/src/gtk/x11commn.c0000644000175000017500000012730214106653057014055 00000000000000/* * $Id: x11commn.c,v 1.60 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include #include #include #include #include "dir_defs.h" #include "object.h" #include "ioutil.h" #include "shell.h" #include "nstring.h" #include "odata.h" #include "odraw.h" #include "nconfig.h" #include "init.h" #include "gtk_widget.h" #include "x11gui.h" #include "x11graph.h" #include "x11dialg.h" #include "ox11menu.h" #include "x11menu.h" #include "x11commn.h" #include "x11info.h" #include "x11file.h" #include "x11view.h" #define COMMENT_BUF_SIZE 1024 static GtkWidget *ProgressDialog = NULL; static GtkProgressBar *ProgressBar, *ProgressBar2; static unsigned int SaveCursor; static void AddNgpFileList(const char *file); static void ToFullPath(void); static void ToBasename(void); static void ToRalativePath(void); void OpenGRA(void) { int i, id, otherGC; char *device, *name, *name_str = "viewer"; struct narray *drawrable; N_VALUE *gra_inst; gra_inst = chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid); if (gra_inst) { return; } CloseGRA(); for (i = chkobjlastinst(Menulocal.GRAobj); i >= 0; i--) { getobj(Menulocal.GRAobj, "GC", i, 0, NULL, &otherGC); if (otherGC < 0) break; } if (i == -1) { /* closed gra object is not found. generate new gra object */ id = newobj(Menulocal.GRAobj); gra_inst = chkobjinst(Menulocal.GRAobj, id); _getobj(Menulocal.GRAobj, "oid", gra_inst, &(Menulocal.GRAoid)); /* set page settings */ putobj(Menulocal.GRAobj, "paper_width", id, &(Menulocal.PaperWidth)); putobj(Menulocal.GRAobj, "paper_height", id, &(Menulocal.PaperHeight)); putobj(Menulocal.GRAobj, "left_margin", id, &(Menulocal.LeftMargin)); putobj(Menulocal.GRAobj, "top_margin", id, &(Menulocal.TopMargin)); putobj(Menulocal.GRAobj, "zoom", id, &(Menulocal.PaperZoom)); putobj(Menulocal.GRAobj, "decimalsign", id, &(Menulocal.Decimalsign)); CheckPage(); } else { /* find closed gra object */ id = i; gra_inst = chkobjinst(Menulocal.GRAobj, id); _getobj(Menulocal.GRAobj, "oid", gra_inst, &(Menulocal.GRAoid)); /* get page settings */ CheckPage(); } if (arraynum(&(Menulocal.drawrable)) > 0) { unsigned int j; drawrable = arraynew(sizeof(char *)); for (j = 0; j < arraynum(&(Menulocal.drawrable)); j++) { arrayadd2(drawrable, *(char **)arraynget(&(Menulocal.drawrable), j)); } } else { drawrable = NULL; } putobj(Menulocal.GRAobj, "draw_obj", id, drawrable); device = g_strdup("menu:0"); putobj(Menulocal.GRAobj, "device", id, device); name = g_strdup(name_str); putobj(Menulocal.GRAobj, "name", id, name); getobj(Menulocal.GRAobj, "open", id, 0, NULL, &(Menulocal.GC)); } void CheckPage(void) { N_VALUE *gra_inst; gra_inst = chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid); if (gra_inst == NULL) { return; } _getobj(Menulocal.GRAobj, "paper_width", gra_inst, &(Menulocal.PaperWidth)); _getobj(Menulocal.GRAobj, "paper_height", gra_inst, &(Menulocal.PaperHeight)); _getobj(Menulocal.GRAobj, "left_margin", gra_inst, &(Menulocal.LeftMargin)); _getobj(Menulocal.GRAobj, "top_margin", gra_inst, &(Menulocal.TopMargin)); _getobj(Menulocal.GRAobj, "zoom", gra_inst, &(Menulocal.PaperZoom)); _getobj(Menulocal.GRAobj, "decimalsign", gra_inst, &(Menulocal.Decimalsign)); set_paper_type(Menulocal.PaperWidth, Menulocal.PaperHeight); } static int ValidGRA(void) { int id; struct objlist *graobj; N_VALUE *inst; if ((graobj = chkobject("gra")) == NULL) return -1; id = -1; if ((inst = chkobjinstoid(graobj, Menulocal.GRAoid)) != NULL) _getobj(graobj, "id", inst, &id); if (id == -1) id = chkobjlastinst(graobj); return id; } void CloseGRA(void) { int id; N_VALUE *gra_inst; gra_inst = chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid); if (gra_inst == NULL) { return; } _getobj(Menulocal.GRAobj, "id", gra_inst, &id); exeobj(Menulocal.GRAobj, "close", id, 0, NULL); delobj(Menulocal.GRAobj, id); Menulocal.GRAoid = -1; } void ChangeGRA(void) { int i, otherGC; /* search for closed gra object */ for (i = chkobjlastinst(Menulocal.GRAobj); i >= 0; i--) { getobj(Menulocal.GRAobj, "GC", i, 0, NULL, &otherGC); if (otherGC < 0) break; } if (i == -1) { /* closed gra is not find. maintain present gra object */ if (chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid) == NULL) { ChangePage(); } } else { /* use closed gra object */ ChangePage(); } CheckPage(); } void SetPageSettingsToGRA(void) { int i, otherGC; struct objlist *obj; struct narray *drawrable; if ((obj = chkobject("gra")) == NULL) return; for (i = chkobjlastinst(obj); i >= 0; i--) { getobj(obj, "GC", i, 0, NULL, &otherGC); if (otherGC < 0) break; } if (i >= 0) { int id, j, num; N_VALUE *inst; id = i; inst = chkobjinst(obj, id); putobj(obj, "paper_width", id, &(Menulocal.PaperWidth)); putobj(obj, "paper_height", id, &(Menulocal.PaperHeight)); putobj(obj, "left_margin", id, &(Menulocal.LeftMargin)); putobj(obj, "top_margin", id, &(Menulocal.TopMargin)); putobj(obj, "zoom", id, &(Menulocal.PaperZoom)); putobj(obj, "decimalsign", id, &(Menulocal.Decimalsign)); _getobj(obj, "draw_obj", inst, &drawrable); arrayfree2(drawrable); drawrable = arraynew(sizeof(char *)); num = arraynum(&(Menulocal.drawrable)); for (j = 0; j < num; j++) { arrayadd2(drawrable, *(char **) arraynget(&(Menulocal.drawrable), j)); } _putobj(obj, "draw_obj", inst, drawrable); } } void GetPageSettingsFromGRA(void) { int i, otherGC; struct objlist *obj; struct narray *drawrable; if ((obj = chkobject("gra")) == NULL) return; for (i = chkobjlastinst(obj); i >= 0; i--) { getobj(obj, "GC", i, 0, NULL, &otherGC); if (otherGC < 0) break; } if (i >= 0) { int id, num; N_VALUE *inst; id = i; inst = chkobjinst(obj, id); CheckPage(); _getobj(obj, "draw_obj", inst, &drawrable); arraydel2(&(Menulocal.drawrable)); num = arraynum(drawrable); if (num == 0) { menuadddrawrable(chkobject("draw"), &(Menulocal.drawrable)); } else { struct objlist *dobj; int j; for (j = 0; j < num; j++) { char *name; name = arraynget_str(drawrable, j); if (name == NULL) { continue; } dobj = chkobject(name); if (dobj == NULL) { continue; } arrayadd2(&(Menulocal.drawrable), chkobjectname(dobj)); } arrayuniq_all_str(&(Menulocal.drawrable)); } } ChangeGRA(); } static int get_new_axis_id(struct objlist *obj, struct objlist **aobj, int fid, int id, int a) { int spc, aid = 0; char *axis; struct narray iarray; int anum; if (getobj(obj, (a == AXIS_X) ? "axis_x" : "axis_y", fid, 0, NULL, &axis) < 0) { return -1; } if (axis == NULL) { return -1; } arrayinit(&iarray, sizeof(int)); if (getobjilist(axis, aobj, &iarray, FALSE, &spc)) { return -1; } anum = arraynum(&iarray); if (anum > 0 && spc == OBJ_LIST_SPECIFIED_BY_ID) { aid = arraylast_int(&iarray); if (aid > id) { aid--; } } else { aid = -1; } arraydel(&iarray); return aid; } static void AxisDel2(int id) { struct objlist *obj, *aobj; int i, aid1; char *axis2; obj = getobject("axisgrid"); if (obj) { for (i = chkobjlastinst(obj); i >= 0; i--) { N_VALUE *inst; inst = chkobjinst(obj, i); if (inst == NULL) { continue; } aid1 = get_axis_id(obj, inst, &aobj, AXIS_X); if (aid1 == id) { delobj(obj, i); continue; } aid1 = get_axis_id(obj, inst, &aobj, AXIS_Y); if (aid1 == id) { delobj(obj, i); } } } obj = getobject("data"); if (obj == NULL) { return; } for (i = 0; i <= chkobjlastinst(obj); i++) { int aid2; aid1 = get_new_axis_id(obj, &aobj, i, id, AXIS_X); aid2 = get_new_axis_id(obj, &aobj, i, id, AXIS_Y); if ((aid1 >= 0) && (aid2 >= 0)) { if (aid1 == aid2) { aid2 = aid1 + 1; } axis2 = g_strdup_printf("%s:%d", chkobjectname(aobj), aid1); if (axis2) { putobj(obj, "axis_x", i, axis2); } axis2 = g_strdup_printf("%s:%d", chkobjectname(aobj), aid2); if (axis2) { putobj(obj, "axis_y", i, axis2); } } } } void AxisDel(int id) { struct objlist *obj; int i, lastinst, *id_array, n; char *group, *group2; char type; N_VALUE *inst; char group3[20]; obj = chkobject("axis"); if (obj == NULL) return; inst = chkobjinst(obj, id); if (inst == NULL) return; _getobj(obj, "group", inst, &group); if (group == NULL || group[0] == 'a') { AxisDel2(id); delobj(obj, id); return; } lastinst = chkobjlastinst(obj); type = group[0]; strncpy(group3, group, sizeof(group3) - 1); group3[sizeof(group3) - 1] = '\0'; id_array = g_malloc(sizeof(*id_array) * (lastinst + 1)); if (id_array == NULL) return; n = 0; for (i = lastinst; i >= 0; i--) { N_VALUE *inst2; inst2 = chkobjinst(obj, i); _getobj(obj, "group", inst2, &group2); if (group2 && group2[0] == type) { if (strcmp(group3 + 2, group2 + 2) == 0) { AxisDel2(i); id_array[n] = i; n++; } } } for (i = 0; i < n; i++) { delobj(obj, id_array[i]); } g_free(id_array); } static void axis_move_each_obj(char *axis_str, int i, struct objlist *obj, int id1, int id2) { struct objlist *aobj; int spc; char *axis; struct narray iarray; int anum; if (getobj(obj, axis_str, i, 0, NULL, &axis) < 0 || axis == NULL) return; arrayinit(&iarray, sizeof(int)); if (getobjilist(axis, &aobj, &iarray, FALSE, &spc)) return; anum = arraynum(&iarray); if (anum > 0 && spc == OBJ_LIST_SPECIFIED_BY_ID) { int aid; char *axis2; aid = arraylast_int(&iarray); if (aid == id1) { aid = id2; } else { if (aid > id1) aid--; if (aid >= id2) aid++; } axis2 = g_strdup_printf("%s:%d", chkobjectname(aobj), aid); if (axis2) { putobj(obj, axis_str, i, axis2); } } arraydel(&iarray); } void AxisMove(int id1, int id2) { struct objlist *obj; int i; if ((obj = getobject("data")) == NULL) return; for (i = 0; i <= chkobjlastinst(obj); i++) { axis_move_each_obj("axis_x", i, obj, id1, id2); axis_move_each_obj("axis_y", i, obj, id1, id2); } } static void AxisNameToGroup(void) /* this function may exist for compatibility with older version. */ { int idx, idy, idu, idr; int findX, findY, findU, findR, graphtype; int id, id2, num; struct objlist *obj; char *name, *name2, *gp; struct narray group, iarray; int a, j; char *argv[2]; if ((obj = (struct objlist *) chkobject("axis")) == NULL) return; num = chkobjlastinst(obj); arrayinit(&iarray, sizeof(int)); for (id = 0; id <= num; id++) { int anum; int *data; N_VALUE *inst; anum = arraynum(&iarray); data = arraydata(&iarray); for (j = 0; j < anum; j++) if (data[j] == id) break; inst = chkobjinst(obj, id); _getobj(obj, "name", inst, &name); _getobj(obj, "group", inst, &gp); if ((j == anum) && (gp[0] == 'a')) { findX = findY = findU = findR = FALSE; graphtype = -1; if (name != NULL) { if (strncmp(name, "sectionX", 8) == 0) { graphtype = 0; findX = TRUE; idx = id; } else if (strncmp(name, "sectionY", 8) == 0) { graphtype = 0; findY = TRUE; idy = id; } else if (strncmp(name, "sectionU", 8) == 0) { graphtype = 0; findU = TRUE; idu = id; } else if (strncmp(name, "sectionR", 8) == 0) { graphtype = 0; findR = TRUE; idr = id; } else if (strncmp(name, "frameX", 6) == 0) { graphtype = 1; findX = TRUE; idx = id; } else if (strncmp(name, "frameY", 6) == 0) { graphtype = 1; findY = TRUE; idy = id; } else if (strncmp(name, "frameU", 6) == 0) { graphtype = 1; findU = TRUE; idu = id; } else if (strncmp(name, "frameR", 6) == 0) { graphtype = 1; findR = TRUE; idr = id; } else if (strncmp(name, "crossX", 6) == 0) { graphtype = 2; findX = TRUE; idx = id; } else if (strncmp(name, "crossY", 6) == 0) { graphtype = 2; findY = TRUE; idy = id; } } for (id2 = id + 1; id2 <= num; id2++) { for (j = 0; j < anum; j++) if (data[j] == id2) break; inst = chkobjinst(obj, id2); _getobj(obj, "name", inst, &name2); _getobj(obj, "group", inst, &gp); if ((j == anum) && (gp[0] == 'a')) { if (graphtype == 0) { if (name2 != NULL) { if ((strncmp(name2, "sectionX", 8) == 0) && (strcmp(name + 8, name2 + 8) == 0)) { findX = TRUE; idx = id2; } else if ((strncmp(name2, "sectionY", 8) == 0) && (strcmp(name + 8, name2 + 8) == 0)) { findY = TRUE; idy = id2; } else if ((strncmp(name2, "sectionU", 8) == 0) && (strcmp(name + 8, name2 + 8) == 0)) { findU = TRUE; idu = id2; } else if ((strncmp(name2, "sectionR", 8) == 0) && (strcmp(name + 8, name2 + 8) == 0)) { findR = TRUE; idr = id2; } } } else if (graphtype == 1) { if (name2 != NULL) { if ((strncmp(name2, "frameX", 6) == 0) && (strcmp(name + 6, name2 + 6) == 0)) { findX = TRUE; idx = id2; } else if ((strncmp(name2, "frameY", 6) == 0) && (strcmp(name + 6, name2 + 6) == 0)) { findY = TRUE; idy = id2; } else if ((strncmp(name2, "frameU", 6) == 0) && (strcmp(name + 6, name2 + 6) == 0)) { findU = TRUE; idu = id2; } else if ((strncmp(name2, "frameR", 6) == 0) && (strcmp(name + 6, name2 + 6) == 0)) { findR = TRUE; idr = id2; } } } else if (graphtype == 2) { if (name2 != NULL) { if ((strncmp(name2, "crossX", 6) == 0) && (strcmp(name + 6, name2 + 6) == 0)) { findX = TRUE; idx = id2; } else if ((strncmp(name2, "crossY", 6) == 0) && (strcmp(name + 6, name2 + 6) == 0)) { findY = TRUE; idy = id2; } } } } } if ((graphtype == 0) && findX && findY && findU && findR) { arrayinit(&group, sizeof(int)); a = 2; arrayadd(&group, &a); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &idu); arrayadd(&group, &idr); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "grouping", id, 1, argv); arraydel(&group); arrayadd(&iarray, &idx); arrayadd(&iarray, &idy); arrayadd(&iarray, &idu); arrayadd(&iarray, &idr); } else if ((graphtype == 1) && findX && findY && findU && findR) { arrayinit(&group, sizeof(int)); a = 1; arrayadd(&group, &a); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &idu); arrayadd(&group, &idr); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "grouping", id, 1, argv); arraydel(&group); arrayadd(&iarray, &idx); arrayadd(&iarray, &idy); arrayadd(&iarray, &idu); arrayadd(&iarray, &idr); } else if ((graphtype == 2) && findX && findY) { arrayinit(&group, sizeof(int)); a = 3; arrayadd(&group, &a); arrayadd(&group, &idx); arrayadd(&group, &idy); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "grouping", id, 1, argv); arraydel(&group); arrayadd(&iarray, &idx); arrayadd(&iarray, &idy); } } } arraydel(&iarray); } static void field_obj_del(struct objlist *obj, int id, const char *field) { char *fit; struct objlist *fitobj; struct narray iarray; if ((getobj(obj, field, id, 0, NULL, &fit) >= 0) && (fit != NULL)) { arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, &fitobj, &iarray, FALSE, NULL) == 0) { int idnum, i; idnum = arraynum(&iarray); arraysort_int(&iarray); for (i = idnum - 1; i >= 0; i--) { int fitid; fitid = arraynget_int(&iarray, i); delobj(fitobj, fitid); } } arraydel(&iarray); } } void FitDel(struct objlist *obj, int id) { field_obj_del(obj, id, "fit"); } void ArrayDel(struct objlist *obj, int id) { field_obj_del(obj, id, "array"); } void FitCopy(struct objlist *obj, int did, int sid) { char *fit; struct objlist *fitobj; struct narray iarray; struct narray iarray2; int fitoid; if ((getobj(obj, "fit", sid, 0, NULL, &fit) >= 0) && (fit != NULL)) { arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, &fitobj, &iarray, FALSE, NULL) == 0) { int idnum; idnum = arraynum(&iarray); if (idnum >= 1) { int fitid, id2; fitid = arraylast_int(&iarray); if ((getobj(obj, "fit", did, 0, NULL, &fit) >= 0) && (fit != NULL)) { arrayinit(&iarray2, sizeof(int)); if (getobjilist(fit, &fitobj, &iarray2, FALSE, NULL) == 0) { int idnum2; idnum2 = arraynum(&iarray2); if (idnum2 >= 1) { id2 = arraylast_int(&iarray2); } else id2 = newobj(fitobj); } else id2 = newobj(fitobj); arraydel(&iarray2); } else { id2 = newobj(fitobj); } if (id2 >= 0) { char *field[] = {"name", "equation", NULL}; N_VALUE *inst; copy_obj_field(fitobj, id2, fitid, field); inst = getobjinst(fitobj, id2); _getobj(fitobj, "oid", inst, &fitoid); if ((fit = mkobjlist(fitobj, NULL, fitoid, NULL, TRUE)) != NULL) { if (putobj(obj, "fit", did, fit) == -1) g_free(fit); } } } } arraydel(&iarray); } } void FitClear(void) { struct objlist *obj, *fitobj; int i, anum, id, hidden; char *fit; struct narray iarray; if (Menulock || Globallock) return; if ((obj = chkobject("data")) == NULL) return; if ((fitobj = chkobject("fit")) == NULL) return; for (i = 0; i <= chkobjlastinst(obj); i++) { getobj(obj, "fit", i, 0, NULL, &fit); if (fit == NULL) { continue; } arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, &fitobj, &iarray, FALSE, NULL) == 0) { anum = arraynum(&iarray); if (anum >= 1) { id = arraylast_int(&iarray); getobj(obj, "hidden", i, 0, NULL, &hidden); if (! hidden) { putobj(fitobj, "equation", id, NULL); } } arraydel(&iarray); } } } static void del_darray(struct objlist *data_obj) { char *array; int i, j, n, last; struct array_prm ary; struct narray *id_array; struct objlist *darray_obj; darray_obj = chkobject("darray"); if (darray_obj == NULL) { return; } last = chkobjlastinst(data_obj); if (last < 0) { return; } id_array = arraynew(sizeof(int)); if (id_array == NULL) { return; } for (i = 0; i <= last; i++) { getobj(data_obj, "array", i, 0, NULL, &array); if (array == NULL) { continue; } open_array(array, &ary); for (j = 0; j < ary.col_num; j++) { arrayadd(id_array, &ary.id[j]); } } arraysort_int(id_array); arrayuniq_int(id_array); n = arraynum(id_array); for (i = 0; i < n; i++) { int id; id = arraynget_int(id_array, n - 1 - i); delobj(darray_obj, id); } arrayfree(id_array); } static void delete_instances(struct objlist *obj) { int instnum, i; instnum = chkobjlastinst(obj); if (instnum == -1) { return; } for (i = instnum; i >= 0; i--) { delobj(obj, i); } } void DeleteDrawable(void) { struct objlist *fileobj, *drawobj, *prmobj; fileobj = chkobject("data"); if (fileobj) { int i; for (i = 0; i <= chkobjlastinst(fileobj); i++) { FitDel(fileobj, i); } del_darray(fileobj); } drawobj = chkobject("draw"); if (drawobj) { delchildobj(drawobj); } prmobj = chkobject("parameter"); if (prmobj) { delete_instances(prmobj); } set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); Menulocal.Decimalsign = get_gra_decimalsign_type(Menulocal.default_decimalsign); gra_set_default_decimalsign(Menulocal.Decimalsign); } static void store_file(struct objlist *ocur, int hFile, int i) { char *s, *fname, *fname2; int j; N_VALUE *inst; getobj(ocur, "file", i, 0, NULL, &fname); if (fname == NULL) { return; } for (j = i - 1; j >= 0; j--) { getobj(ocur, "file", j, 0, NULL, &fname2); if ((fname2 != NULL) && (strcmp0(fname, fname2) == 0)) { break; } } inst = chkobjinst(ocur, i); if (j == -1) { while (_exeobj(ocur, "store_data", inst, 0, NULL) == 0) { _getobj(ocur, "store_data", inst, &s); nwrite(hFile, s, strlen(s)); nwrite(hFile, "\n", 1); } } else { while (_exeobj(ocur, "store_dummy", inst, 0, NULL) == 0) { _getobj(ocur, "store_dummy", inst, &s); nwrite(hFile, s, strlen(s)); nwrite(hFile, "\n", 1); } } } static void save_array(struct objlist *ocur, int hFile, int i, GString *str) { char *s, *array, *array2, iarray_str[] = "iarray:!:push ${darray:!:oid}\n\n"; int j, k, l, n, id; struct array_prm ary, ary2; struct narray *id_array; getobj(ocur, "array", i, 0, NULL, &array); if (array == NULL) { return; } id_array = arraynew(sizeof(int)); for (j = 0; j < i; j++) { getobj(ocur, "array", j, 0, NULL, &array2); if (array2 == NULL) { continue; } open_array(array2, &ary2); for (k = 0; k < ary2.col_num; k++) { n = arraynum(id_array); for (l = 0; l < n; l++) { id = arraynget_int(id_array, l); if (id == ary2.id[k]) { break; } } if (l == n) { arrayadd(id_array, &ary2.id[k]); } } } open_array(array, &ary); for (k = 0; k < ary.col_num; k++) { n = arraynum(id_array); for (l = 0; l < n; l++) { id = arraynget_int(id_array, l); if (id == ary2.id[k]) { break; } } if (l == n) { arrayadd(id_array, &ary.id[k]); if (getobj(ary.obj, "save", ary.id[k], 0, NULL, &s) != -1) { nwrite(hFile, s, strlen(s)); nwrite(hFile, "\n", 1); nwrite(hFile, iarray_str, sizeof(iarray_str) - 1); } } g_string_append_printf(str, "%s^${iarray:!:get:%d}", (k == 0) ? "darray:\"" : ",", l); } arrayfree(id_array); } static void save_merge(struct objlist *ocur, int hFile, int storemerge, int i) { char *s; getobj(ocur, "save", i, 0, NULL, &s); nwrite(hFile, s, strlen(s)); nwrite(hFile, "\n", 1); if (storemerge) { store_file(ocur, hFile, i); } } static void save_data(struct objlist *ocur, int hFile, int storedata, int i, int *array_data) { char *s; int source, argc; char *argv2[3], **argv; struct narray *array; GString *str; str = NULL; argc = 0; argv = NULL; array = NULL; getobj(ocur, "source", i, 0, NULL, &source); switch (source) { case DATA_SOURCE_FILE: break; case DATA_SOURCE_ARRAY: array = arraynew(sizeof(char *)); if (array == NULL) { error(NULL, ERRHEAP); return; } s = "array"; arrayadd(array, &s); argv2[0] = (char *) array; argv2[1] = NULL; argv = argv2; argc = 1; str = g_string_new("\tdata::array="); if (str == NULL) { error(NULL, ERRHEAP); return; } if (! *array_data) { char iarray_str[] = "new iarray\n\n"; *array_data = TRUE; nwrite(hFile, iarray_str, sizeof(iarray_str) - 1); } save_array(ocur, hFile, i, str); break; case DATA_SOURCE_RANGE: break; } getobj(ocur, "save", i, argc, argv, &s); nwrite(hFile, s, strlen(s)); if (storedata) { store_file(ocur, hFile, i); } if (array) { arrayfree(array); } if (str) { nwrite(hFile, str->str, str->len); nwrite(hFile, "\"\n", 2); g_string_free(str, TRUE); } nwrite(hFile, "\n", 1); } static void save_inst(int hFile, struct objlist *ocur) { int i, instnum; char *s; instnum = chkobjlastinst(ocur); if (instnum == -1) { return; } for (i = 0; i <= instnum; i++) { getobj(ocur, "save", i, 0, NULL, &s); nwrite(hFile, s, strlen(s)); nwrite(hFile, "\n", 1); } } static void SaveParent(int hFile, struct objlist *parent, int storedata, int storemerge) { struct objlist *ocur, *odata, *omerge; int i, instnum, array_data; char *s; ocur = chkobjroot(); odata = chkobject("data"); omerge = chkobject("merge"); array_data = FALSE; while (ocur) { if (chkobjparent(ocur) == parent) { if ((instnum = chkobjlastinst(ocur)) != -1) { for (i = 0; i <= instnum; i++) { if (ocur == odata) { save_data(ocur, hFile, storedata, i, &array_data); } else if (ocur == omerge) { save_merge(ocur, hFile, storemerge, i); } else { getobj(ocur, "save", i, 0, NULL, &s); nwrite(hFile, s, strlen(s)); nwrite(hFile, "\n", 1); } } if (ocur == odata && array_data) { char iarray_str[] = "del iarray:!\n\n"; nwrite(hFile, iarray_str, sizeof(iarray_str) -1); } } SaveParent(hFile, ocur, storedata, storemerge); } ocur = ocur->next; } } int SaveDrawrable(char *name, int storedata, int storemerge, int save_decimalsign) { int hFile; int error; struct narray sarray; char *ver, *sysname, *s, *opt; error = FALSE; hFile = nopen(name, O_CREAT | O_TRUNC | O_RDWR, NFMODE_NORMAL_FILE); if (hFile < 0) { error = TRUE; } else { int len; struct objlist *sysobj, *drawobj, *prmobj; N_VALUE *inst; char comment[COMMENT_BUF_SIZE]; sysobj = chkobject("system"); inst = chkobjinst(sysobj, 0); _getobj(sysobj, "name", inst, &sysname); _getobj(sysobj, "version", inst, &ver); len = snprintf(comment, sizeof(comment), "#!ngraph\n#%%creator: %s \n#%%version: %s\n", sysname, ver); if (nwrite(hFile, comment, len) != len) error = TRUE; prmobj = chkobject("parameter"); if (prmobj) { save_inst(hFile, prmobj); } if ((drawobj = chkobject("draw")) != NULL) { struct objlist *graobj; SaveParent(hFile, drawobj, storedata, storemerge); if ((graobj = chkobject("gra")) != NULL) { int id; id = ValidGRA(); if (id != -1) { char *arg[2]; arrayinit(&sarray, sizeof(char *)); opt = "device"; arrayadd(&sarray, &opt); if (! save_decimalsign) { opt = "decimalsign"; arrayadd(&sarray, &opt); } arg[0] = (char *) &sarray; arg[1] = NULL; getobj(graobj, "save", id, 1, arg, &s); arraydel(&sarray); len = strlen(s); if (nwrite(hFile, s, len) != len) error = TRUE; } else { error = TRUE; } } } nclose(hFile); } if (error) ErrorMessage(); return error; } static int get_save_opt(int *sdata, int *smerge, int *path) { int ret, fnum, mnum, i, src; struct objlist *fobj, *mobj; *path = SAVE_PATH_UNCHANGE; *sdata = FALSE; *smerge = FALSE; fobj = chkobject("data"); mobj = chkobject("merge"); fnum = chkobjlastinst(fobj) + 1; mnum = chkobjlastinst(mobj) + 1; /* there are no instances of data and merge objects */ if (fnum < 1 && mnum < 1) { return IDOK; } /* check source field of data objects */ for (i = 0; i < fnum; i++) { getobj(fobj, "source", i, 0, NULL, &src); if (src == DATA_SOURCE_FILE) { break; } } if (fnum > 0 && mnum < 1 && i == fnum) { return IDOK; } SaveDialog(&DlgSave, sdata, smerge); ret = DialogExecute(TopLevel, &DlgSave); if (ret != IDOK) return IDCANCEL; *path = DlgSave.Path; for (i = 0; i < fnum; i++) { putobj(fobj, "save_path", i, path); } for (i = 0; i < mnum; i++) { putobj(mobj, "save_path", i, path); } return IDOK; } int GraphSave(int overwrite) { int path; int sdata, smerge; int ret; char *initfil; char *file, *prev_wd, *current_wd; if (NgraphApp.FileName != NULL) { initfil = NgraphApp.FileName; } else { initfil = NULL; overwrite = FALSE; } prev_wd = current_wd = NULL; if ((initfil == NULL) || (! overwrite || (naccess(initfil, 04) == -1))) { prev_wd = ngetcwd(); ret = nGetSaveFileName(TopLevel, _("Save NGP file"), "ngp", &(Menulocal.graphloaddir), initfil, &file, overwrite, Menulocal.changedirectory); current_wd = ngetcwd(); if (prev_wd && current_wd && strcmp(prev_wd, current_wd) == 0) { g_free(prev_wd); g_free(current_wd); prev_wd = NULL; current_wd = NULL; } } else { file = g_strdup(initfil); if (file == NULL) return IDCANCEL; ret = IDOK; } if (ret == IDOK) { if (prev_wd && nchdir(prev_wd)) { ErrorMessage(); } ret = get_save_opt(&sdata, &smerge, &path); if (ret == IDOK) { char mes[256]; snprintf(mes, sizeof(mes), _("Saving `%.128s'."), file); SetStatusBar(mes); if(SaveDrawrable(file, sdata, smerge, TRUE)) { ret = IDCANCEL; } else { switch (path) { case SAVE_PATH_BASE: ToBasename(); break; case SAVE_PATH_RELATIVE: ToRalativePath(); break; case SAVE_PATH_FULL: ToFullPath(); break; } changefilename(file); AddNgpFileList(file); SetFileName(file); reset_graph_modified(); } ResetStatusBar(); } g_free(file); if (current_wd && nchdir(current_wd)) { ErrorMessage(); } } g_free(prev_wd); g_free(current_wd); return ret; } static void change_filename(char * (*func)(const char *)) { int i; unsigned int j; char *file, *file2, *objname[] = {"data", "merge"}; for (j = 0; j < sizeof(objname) / sizeof(*objname); j++) { struct objlist *obj; obj = chkobject(objname[j]); if (obj == NULL) continue; for (i = 0; i <= chkobjlastinst(obj); i++) { getobj(obj, "file", i, 0, NULL, &file); if (file == NULL) continue; file2 = func(file); if (file2 == NULL) return; if (strcmp(file, file2) == 0) { g_free(file2); continue; } set_graph_modified(); putobj(obj, "file", i, file2); } } } static void ToFullPath(void) { change_filename(getfullpath); } static void ToRalativePath(void) { change_filename(getrelativepath); } static char * get_basename(const char *file) { char *ptr; ptr = getbasename(file); if (ptr == NULL) return NULL; return ptr; } static void ToBasename(void) { change_filename(get_basename); } int LoadNgpFile(char *file, int console, char *option) { struct objlist *sys; char *expanddir; struct objlist *obj; char *name; int r, newid, allocnow = FALSE, tmp; char *s; int len; char *argv[2]; struct narray sarray; char mes[256]; int sec; N_VALUE *inst; struct objlist *robj; int idn; int loadpath, expand; LoadDialog(&DlgLoad); if (DialogExecute(TopLevel, &DlgLoad) != IDOK) { return 1; } changefilename(file); if (naccess(file, R_OK)) { ErrorMessage(); return 1; } sys = chkobject("system"); if (sys == NULL) { return 1; } loadpath = DlgLoad.loadpath; expand = DlgLoad.expand; expanddir = DlgLoad.exdir; DlgLoad.exdir = NULL; if (expanddir == NULL) return 1; putobj(sys, "expand_dir", 0, expanddir); putobj(sys, "expand_file", 0, &expand); tmp = FALSE; putobj(sys, "ignore_path", 0, &tmp); obj = chkobject("shell"); if (obj == NULL) return 1; newid = newobj(obj); if (newid < 0) return 1; inst = chkobjinst(obj, newid); arrayinit(&sarray, sizeof(char *)); while ((s = getitok2(&option, &len, " \t")) != NULL) { if (arrayadd(&sarray, &s) == NULL) { g_free(s); arraydel2(&sarray); return 1; } } name = g_strdup(file); if (name == NULL) { arraydel2(&sarray); return 1; } if (arrayadd(&sarray, &name) == NULL) { g_free(name); arraydel2(&sarray); return 1; } DeleteDrawable(); if (console) { allocnow = allocate_console(); } sec = TRUE; argv[0] = (char *) &sec; argv[1] = NULL; _exeobj(obj, "security", inst, 1, argv); argv[0] = (char *) &sarray; argv[1] = NULL; snprintf(mes, sizeof(mes), _("Loading `%.128s'."), name); SetStatusBar(mes); menu_lock(TRUE); idn = getobjtblpos(Menulocal.obj, "_evloop", &robj); registerevloop(chkobjectname(Menulocal.obj), "_evloop", robj, idn, Menulocal.inst, NULL); r = _exeobj(obj, "shell", inst, 1, argv); unregisterevloop(robj, idn, Menulocal.inst); menu_lock(FALSE); sec = FALSE; argv[0] = (char *) &sec; argv[1] = NULL; _exeobj(obj, "security", inst, 1, argv); if (r == 0) { struct objlist *aobj; int i; if ((aobj = getobject("axis")) != NULL) { for (i = 0; i <= chkobjlastinst(aobj); i++) exeobj(aobj, "tight", i, 0, NULL); } if ((aobj = getobject("axisgrid")) != NULL) { for (i = 0; i <= chkobjlastinst(aobj); i++) exeobj(aobj, "tight", i, 0, NULL); } SetFileName(file); AddNgpFileList(name); reset_graph_modified(); switch (loadpath) { case LOAD_PATH_BASE: ToBasename(); break; case LOAD_PATH_FULL: ToFullPath(); break; } InfoWinClear(); } AxisNameToGroup(); ResetStatusBar(); arraydel2(&sarray); if (console) { free_console(allocnow); } set_axis_undo_button_sensitivity(FALSE); GetPageSettingsFromGRA(); CmViewerDraw(NULL, GINT_TO_POINTER(FALSE)); UpdateAll2(NULL, FALSE); delobj(obj, newid); menu_clear_undo(); return 0; } static int check_ref_axis(char *ref, const char *group) { int anum, aid; char *refgroup; struct narray iarray; struct objlist *aobj; N_VALUE *inst; if (ref == NULL) { return FALSE; } arrayinit(&iarray, sizeof(int)); if (getobjilist(ref, &aobj, &iarray, FALSE, NULL)) { arraydel(&iarray); return TRUE; } anum = arraynum(&iarray); if (anum < 1) { arraydel(&iarray); return TRUE; } aid = arraylast_int(&iarray); arraydel(&iarray); inst = getobjinst(aobj, aid); if (inst == NULL) { return TRUE; } _getobj(aobj, "group", inst, &refgroup); if (refgroup && group && refgroup[0] == group[0] && strcmp(refgroup + 2, group + 2) == 0) { return FALSE; } return TRUE; } static int file_auto_scale(char *file_obj, struct objlist *aobj, int anum) { int i; double min, max, inc; char *group, *ref, *argv[2]; argv[0] = (char *) file_obj; argv[1] = NULL; for (i = 0; i <= anum; i++) { int refother; getobj(aobj, "min", i, 0, NULL, &min); getobj(aobj, "max", i, 0, NULL, &max); getobj(aobj, "inc", i, 0, NULL, &inc); getobj(aobj, "group", i, 0, NULL, &group); getobj(aobj, "reference", i, 0, NULL, &ref); refother = check_ref_axis(ref, group); if (! refother && (min == max || inc == 0)) { exeobj(aobj, "auto_scale", i, 1, argv); } } return 0; } void FileAutoScale(void) { int anum; struct objlist *aobj; char *buf; struct objlist *fobj; int lastinst; int i, hidden; GString *str; if ((fobj = chkobject("data")) == NULL) return; lastinst = chkobjlastinst(fobj); aobj = chkobject("axis"); anum = chkobjlastinst(aobj); if (lastinst < 0 || aobj == NULL || anum == 0) return; str = g_string_new("data:"); if (str == NULL) { error(NULL, ERRHEAP); return; } for (i = 0; i <= lastinst; i++) { getobj(fobj, "hidden", i, 0, NULL, &hidden); if (! hidden) { g_string_append_printf(str, "%d,", i); } } i = str->len - 1; buf = g_string_free(str, FALSE); if (buf[i] != ',') { g_free(buf); return; } buf[i] = '\0'; file_auto_scale(buf, aobj, anum); g_free(buf); } void AdjustAxis(void) { struct objlist *aobj; int i, anum; if ((aobj = chkobject("axis")) == NULL) return; anum = chkobjlastinst(aobj); for (i = 0; i <= anum; i++) exeobj(aobj, "adjust", i, 0, NULL); } int CheckSave(void) { if (get_graph_modified()) { int ret; ret = message_box(TopLevel, _("This graph is modified.\nSave this graph?"), _("Confirm"), RESPONS_YESNOCANCEL); if (ret == IDYES) { if (GraphSave(TRUE) == IDCANCEL) return FALSE; } else if (ret != IDNO) return FALSE; } return TRUE; } static void add_hist(const char *file, char *mime) { char *full_name, *uri; GtkRecentData recent_data = { NULL, AppName, NULL, AppName, "ngraph %f", NULL, FALSE, }; if (! g_utf8_validate(file, -1, NULL)) { return; } full_name = getfullpath(file); if (full_name == NULL) { return; } recent_data.mime_type = mime; uri = g_filename_to_uri(full_name, NULL, NULL); g_free(full_name); gtk_recent_manager_add_full(NgraphApp.recent_manager, uri, &recent_data); g_free(uri); } static void AddNgpFileList(const char *file) { add_hist(file, NGRAPH_GRAPH_MIME); } void AddDataFileList(const char *file) { add_hist(file, NGRAPH_DATA_MIME); } void SetFileName(char *str) { char *ngp, *name; name = g_strdup(str); g_free(NgraphApp.FileName); if (name == NULL) { NgraphApp.FileName = NULL; ngp = NULL; } else { NgraphApp.FileName = getfullpath(name); ngp = getfullpath(name); g_free(name); } putobj(Menulocal.obj, "fullpath_ngp", 0, ngp); } int allocate_console(void) { int allocnow; loadstdio(&GtkIOSave); allocnow = nallocconsole(); nforegroundconsole(); return allocnow; } void free_console(int allocnow) { if (allocnow) nfreeconsole(); putstderr = mgtkputstderr; printfstderr = mgtkprintfstderr; putstdout = mgtkputstdout; printfstdout = mgtkprintfstdout; inputyn = mgtkinputyn; ndisplaydialog = mgtkdisplaydialog; ndisplaystatus = mgtkdisplaystatus; ninterrupt = mgtkinterrupt; } static char * get_plot_cb_str(struct objlist *obj, int id, int source) { char *s; const char *str; str = get_plot_info_str(obj, id, source); if (str == NULL) { return g_strdup(FILL_STRING); } if (source == DATA_SOURCE_FILE) { char *valstr; valstr = getbasename(str); s = g_strdup_printf("%s", (valstr) ? valstr : FILL_STRING); if (valstr != NULL) { g_free(valstr); } } else { s = g_strdup(str); } return s; } char * MergeFileCB(struct objlist *obj, int id) { char *file, *bname; getobj(obj, "file", id, 0, NULL, &file); if (file == NULL) { return g_strdup(FILL_STRING); } bname = getbasename(file); if (bname == NULL) { return g_strdup(FILL_STRING); } return bname; } char * FileCB(struct objlist *obj, int id) { int source; getobj(obj, "source", id, 0, NULL, &source); return get_plot_cb_str(obj, id, source); } char * PlotFileCB(struct objlist *obj, int id) { int source; getobj(obj, "source", id, 0, NULL, &source); if (source != DATA_SOURCE_FILE) { return NULL; } return get_plot_cb_str(obj, id, source); } int SetFileHidden(void) { struct objlist *fobj; int lastinst; struct narray farray, ifarray; int i, a, r; fobj = chkobject("data"); if (fobj == NULL) { return 1; } lastinst = chkobjlastinst(fobj); if (lastinst < 0) { return 1; } arrayinit(&ifarray, sizeof(int)); for (i = 0; i <= lastinst; i++) { getobj(fobj, "hidden", i, 0, NULL, &a); if (!a) { arrayadd(&ifarray, &i); } } r = 0; SelectDialog(&DlgSelect, fobj, NULL, FileCB, &farray, &ifarray); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int num, inum, *array; a = TRUE; for (i = 0; i <= lastinst; i++) { putobj(fobj, "hidden", i, &a); } num = arraynum(&farray); array = arraydata(&farray); a = FALSE; for (i = 0; i < num; i++) { putobj(fobj, "hidden", array[i], &a); } inum = arraynum(&ifarray); if (inum != num) { set_graph_modified(); } else { for (i = 0; i < num; i++) { if (arraynget_int(&ifarray, i) != array[i]) { set_graph_modified(); break; } } } r = 1; } arraydel(&ifarray); arraydel(&farray); return r; } int CheckIniFile(void) { int ret; ret = writecheckconfig(); if (ret == 0) { message_box(TopLevel, _("Ngraph.ini is not found."), "Ngraph.ini", RESPONS_ERROR); return FALSE; } else if ((ret == -1) || (ret == -3)) { message_box(TopLevel, _("Ngraph.ini is write protected."), "Ngraph.ini", RESPONS_ERROR); return FALSE; } else if ((ret == -2) || (ret == 2)) { struct objlist *sys; char *homedir, *buf; sys = getobject("system"); if (sys == NULL) { return FALSE; } if (getobj(sys, "home_dir", 0, 0, NULL, &homedir) == -1) { return FALSE; } buf = g_strdup_printf(_("Install `Ngraph.ini' to %s ?"), homedir); if (message_box(TopLevel, buf, "Ngraph.ini", RESPONS_YESNO) == IDYES) { g_free(buf); if (!copyconfig()) { message_box(TopLevel, _("Ngraph.ini could not be copied."), "Ngraph.ini", RESPONS_ERROR); return FALSE; } } else { g_free(buf); return FALSE; } } return TRUE; } void ProgressDialogSetTitle(char *title) { if (ProgressDialog) gtk_window_set_title(GTK_WINDOW(ProgressDialog), title); } static void show_progress(int pos, const char *msg, double fraction) { GtkProgressBar *bar; if (! ProgressDialog) return; if (pos) { bar = ProgressBar2; } else { bar = ProgressBar; } if (fraction < 0) { gtk_progress_bar_pulse(bar); } else { gtk_progress_bar_set_fraction(bar, fraction); } gtk_progress_bar_set_text(bar, msg); } static void stop_btn_clicked(GtkButton *button, gpointer user_data) { set_interrupt(); } void ProgressDialogCreate(char *title) { GtkWidget *btn, *vbox, *hbox; if (TopLevel == NULL) return; reset_interrupt(); SaveCursor = NGetCursor(); NSetCursor(GDK_WATCH); set_draw_lock(DrawLockDraw); if (ProgressDialog) { ProgressDialogSetTitle(title); show_progress(0, "", 0); show_progress(1, "", 0); set_progress_func(show_progress); gtk_widget_show_all(ProgressDialog); return; } ProgressDialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(ProgressDialog, "delete-event", G_CALLBACK(gtk_true), NULL); gtk_window_set_title(GTK_WINDOW(ProgressDialog), title); gtk_window_set_transient_for(GTK_WINDOW(ProgressDialog), GTK_WINDOW(TopLevel)); gtk_window_set_modal(GTK_WINDOW(ProgressDialog), TRUE); gtk_window_set_position(GTK_WINDOW(ProgressDialog), GTK_WIN_POS_CENTER); gtk_window_set_type_hint(GTK_WINDOW(ProgressDialog), GDK_WINDOW_TYPE_HINT_DIALOG); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); ProgressBar = GTK_PROGRESS_BAR(gtk_progress_bar_new()); gtk_progress_bar_set_ellipsize(ProgressBar, PANGO_ELLIPSIZE_MIDDLE); gtk_progress_bar_set_show_text(ProgressBar, TRUE); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(ProgressBar), FALSE, FALSE, 4); ProgressBar2 = GTK_PROGRESS_BAR(gtk_progress_bar_new()); gtk_progress_bar_set_ellipsize(ProgressBar2, PANGO_ELLIPSIZE_MIDDLE); gtk_progress_bar_set_show_text(ProgressBar2, TRUE); gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(ProgressBar2), FALSE, FALSE, 4); btn = gtk_button_new_with_mnemonic(_("_Stop")); set_button_icon(btn, "process-stop"); g_signal_connect(btn, "clicked", G_CALLBACK(stop_btn_clicked), NULL); #if USE_HEADER_BAR hbox = gtk_header_bar_new(); gtk_header_bar_set_title(GTK_HEADER_BAR(hbox), title); gtk_header_bar_pack_end(GTK_HEADER_BAR(hbox), btn); gtk_window_set_titlebar(GTK_WINDOW(ProgressDialog), hbox); #else hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_pack_end(GTK_BOX(hbox), btn, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 4); #endif gtk_container_add(GTK_CONTAINER(ProgressDialog), vbox); gtk_window_set_default_size(GTK_WINDOW(ProgressDialog), 400, -1); gtk_widget_show_all(ProgressDialog); set_progress_func(show_progress); } void ProgressDialogFinalize(void) { if (TopLevel == NULL) return; gtk_widget_hide(ProgressDialog); NSetCursor(SaveCursor); set_progress_func(NULL); set_draw_lock(DrawLockNone); } void ErrorMessage(void) { const char *s; char *ptr; s = g_strerror(errno); ptr = g_strdup(s); message_box(NULL, CHK_STR(ptr), _("error"), RESPONS_ERROR); g_free(ptr); } ngraph-gtk-6.09.05/src/gtk/x11graph.h0000644000175000017500000000342614100703761014042 00000000000000/* * $Id: x11graph.h,v 1.3 2009-06-09 06:38:53 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef X11GRAPH_HEADER void CmGraphQuit(void *w, gpointer client_data); void CmGraphNewMenu(void *w, gpointer client_data); void CmGraphHistory(GtkRecentChooser *w, gpointer client_data); void CmGraphLoad(void *w, gpointer client_data); void CmGraphSave(void *w, gpointer client_data); void CmGraphOverWrite(void *w, gpointer client_data); void CmGraphShell(void *w, gpointer client_data); void CmGraphDirectory(void *w, gpointer client_data); void CmHelpHelp(void *w, gpointer client_data); void CmHelpAbout(void *w, gpointer client_data); void CmHelpDemo(void *w, gpointer client_data); void CmGraphSwitch(void *w, gpointer client_data); void CmGraphPage(void *w, gpointer client_data); int chdir_to_ngp(const char *fname); int set_paper_type(int w, int h); enum LOAD_PATH_TYPE { LOAD_PATH_UNCHANGE, LOAD_PATH_FULL, LOAD_PATH_BASE, }; extern char *LoadPathStr[]; #endif /* X11GRAPH_HEADER */ ngraph-gtk-6.09.05/src/gtk/x11menu.c0000644000175000017500000023027314143146756013716 00000000000000/* --*-coding:utf-8-*-- */ /* * $Id: x11menu.c,v 1.116 2010-04-01 06:08:23 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include #include #include #include #include #include #include "dir_defs.h" #include "object.h" #include "ioutil.h" #include "shell.h" #include "nstring.h" #include "nconfig.h" #include "mathfn.h" #include "gra.h" #include "spline.h" #include "gtk_entry_completion.h" #include "gtk_subwin.h" #include "gtk_widget.h" #include "gtk_ruler.h" #include "gtk_presettings.h" #include "init.h" #include "osystem.h" #include "omerge.h" #include "x11bitmp.h" #include "x11dialg.h" #include "ogra2cairo.h" #include "ogra2gdk.h" #include "ox11menu.h" #include "x11menu.h" #include "x11info.h" #include "x11cood.h" #include "x11gui.h" #include "x11merge.h" #include "x11parameter.h" #include "x11commn.h" #include "x11lgnd.h" #include "x11axis.h" #include "x11file.h" #include "x11graph.h" #include "x11print.h" #include "x11opt.h" #include "x11view.h" #define TEXT_HISTORY "text_history" #define MATH_X_HISTORY "math_x_history" #define MATH_Y_HISTORY "math_y_history" #define FUNCTION_HISTORY "function_history" #define FIT_HISTORY "fit_history" #define FUNC_MATH_HISTORY "func_math_history" #define FUNC_FUNC_HISTORY "func_func_history" #define USE_EXT_DRIVER 0 #define SIDE_PANE_TAB_ID "side_pane" int Menulock = FALSE, DnDLock = FALSE; struct NgraphApp NgraphApp = {0}; GtkWidget *TopLevel = NULL, *DrawButton = NULL; static GtkWidget *CurrentWindow = NULL, *CToolbar = NULL, *PToolbar = NULL, *SettingPanel = NULL, *ToolBox = NULL; static enum {APP_CONTINUE, APP_QUIT, APP_QUIT_FORCE} Hide_window = APP_CONTINUE; static int DrawLock = FALSE; static unsigned int CursorType; #if USE_EXT_DRIVER static GtkWidget *ExtDrvOutMenu = NULL #endif struct MenuItem; struct ToolItem; static void create_menu(struct MenuItem *item); static GtkWidget *create_toolbar(struct ToolItem *item, int n, GCallback btn_press_cb); static void CmViewerButtonArm(GtkToggleToolButton *action, gpointer client_data); static GdkCursorType Cursor[] = { GDK_LEFT_PTR, GDK_XTERM, GDK_CROSSHAIR, GDK_TOP_LEFT_CORNER, GDK_TOP_RIGHT_CORNER, GDK_BOTTOM_RIGHT_CORNER, GDK_BOTTOM_LEFT_CORNER, GDK_TARGET, GDK_SIZING, GDK_SIZING, GDK_WATCH, GDK_FLEUR, GDK_PENCIL, GDK_TCROSS, }; #define CURSOR_TYPE_NUM (sizeof(Cursor) / sizeof(*Cursor)) enum FOCUS_TYPE { FOCUS_TYPE_1 = 0, FOCUS_TYPE_2, FOCUS_TYPE_3, FOCUS_TYPE_4, FOCUS_TYPE_5, FOCUS_TYPE_6, FOCUS_TYPE_NUM, }; enum ACTION_TYPE { ACTION_TYPE_FILE, ACTION_TYPE_PARAMETER, ACTION_TYPE_AXIS, ACTION_TYPE_GRID, ACTION_TYPE_PATH, ACTION_TYPE_ARC, ACTION_TYPE_RECTANGLE, ACTION_TYPE_MARK, ACTION_TYPE_TEXT, ACTION_TYPE_MERGE, ACTION_TYPE_FOCUS_EDIT1, ACTION_TYPE_FOCUS_EDIT2, ACTION_TYPE_FOCUS_EDIT_PASTE, ACTION_TYPE_FOCUS_ROTATE, ACTION_TYPE_FOCUS_FLIP, ACTION_TYPE_FOCUS_UP, ACTION_TYPE_FOCUS_DOWN, ACTION_TYPE_AXIS_UNDO, ACTION_TYPE_MODIFIED, ACTION_TYPE_NONE, }; struct ActionWidget { GAction *action; enum ACTION_TYPE type; }; enum ActionWidgetIndex { GraphSaveAction, EditRedoAction, EditUndoAction, EditCutAction, EditCopyAction, EditRotateCCWAction, EditRotateCWAction, EditFlipVAction, EditFlipHAction, EditDeleteAction, EditDuplicateAction, EditSelectAllAction, EditAlignLeftAction, EditAlignRightAction, EditAlignHCenterAction, EditAlignTopAction, EditAlignBottomAction, EditAlignVCenterAction, EditOrderTopAction, EditOrderUpAction, EditOrderDownAction, EditOrderBottomAction, EditPasteAction, ViewSidebarAction, ViewStatusbarAction, ViewRulerAction, ViewScrollbarAction, ViewCommandToolbarAction, ViewToolboxAction, ViewCrossGaugeAction, ViewGridLineAction, DataPropertyAction, DataCloseAction, DataEditAction, DataSaveAction, DataMathAction, ParameterPropertyAction, ParameterDeleteAction, AxisPropertyAction, AxisDeleteAction, AxisScaleZoomAction, AxisScaleClearAction, AxisGridPropertyAction, AxisGridDeleteAction, AxisScaleUndoAction, LegendPathPropertyAction, LegendPathDeleteAction, LegendRectanglePropertyAction, LegendRectangleDeleteAction, LegendArcPropertyAction, LegendArcDeleteAction, LegendMarkPropertyAction, LegendMarkDeleteAction, LegendTextPropertyAction, LegendTextDeleteAction, MergePropertyAction, MergeCloseAction, ActionWidgetNum, }; struct ActionWidget ActionWidget[ActionWidgetNum]; static GtkToolItem *PointerModeButtons[PointerModeNum]; static int DefaultMode = PointerModeBoth; struct ToolItem { enum { TOOL_TYPE_NORMAL, TOOL_TYPE_DRAW, TOOL_TYPE_SAVE, TOOL_TYPE_RADIO, TOOL_TYPE_RECENT_GRAPH, TOOL_TYPE_RECENT_DATA, TOOL_TYPE_SEPARATOR, } type; const char *label; const char *tip; const char *caption; const char *icon; GCallback callback; int user_data; int button; const char *action_name; }; #define PointerModeOffset 10 static struct ToolItem PointerToolbar[] = { { TOOL_TYPE_RADIO, N_("Point"), N_("Pointer"), N_("Legend and Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: Fine)"), NGRAPH_POINT_ICON, G_CALLBACK(CmViewerButtonArm), PointB, PointerModeBoth + PointerModeOffset, }, { TOOL_TYPE_RADIO, N_("Legend"), N_("Legend Pointer"), N_("Legend Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: Fine)"), NGRAPH_LEGENDPOINT_ICON, G_CALLBACK(CmViewerButtonArm), LegendB, PointerModeLegend + PointerModeOffset, }, { TOOL_TYPE_RADIO, N_("Axis"), N_("Axis Pointer"), N_("Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: Fine)"), NGRAPH_AXISPOINT_ICON, G_CALLBACK(CmViewerButtonArm), AxisB, PointerModeAxis + PointerModeOffset, }, { TOOL_TYPE_RADIO, N_("Data"), N_("Data Pointer"), N_("Data Pointer"), NGRAPH_DATAPOINT_ICON, G_CALLBACK(CmViewerButtonArm), DataB, PointerModeData + PointerModeOffset, }, { TOOL_TYPE_SEPARATOR, }, { TOOL_TYPE_RADIO, N_("Path"), N_("Path"), N_("New Legend Path (+SHIFT: Fine +CONTROL: snap angle)"), NGRAPH_LINE_ICON, G_CALLBACK(CmViewerButtonArm), PathB, }, { TOOL_TYPE_RADIO, N_("Rectangle"), N_("Rectangle"), N_("New Legend Rectangle (+SHIFT: Fine +CONTROL: square integer ratio rectangle)"), NGRAPH_RECT_ICON, G_CALLBACK(CmViewerButtonArm), RectB, }, { TOOL_TYPE_RADIO, N_("Arc"), N_("Arc"), N_("New Legend Arc (+SHIFT: Fine +CONTROL: circle or integer ratio ellipse)"), NGRAPH_ARC_ICON, G_CALLBACK(CmViewerButtonArm), ArcB, }, { TOOL_TYPE_RADIO, N_("Mark"), N_("Mark"), N_("New Legend Mark (+SHIFT: Fine)"), NGRAPH_MARK_ICON, G_CALLBACK(CmViewerButtonArm), MarkB, }, { TOOL_TYPE_RADIO, N_("Text"), N_("Text"), N_("New Legend Text (+SHIFT: Fine)"), NGRAPH_TEXT_ICON, G_CALLBACK(CmViewerButtonArm), TextB, }, { TOOL_TYPE_RADIO, N_("Gauss"), N_("Gaussian"), N_("New Legend Gaussian (+SHIFT: Fine +CONTROL: integer ratio)"), NGRAPH_GAUSS_ICON, G_CALLBACK(CmViewerButtonArm), GaussB, }, { TOOL_TYPE_SEPARATOR, }, { TOOL_TYPE_RADIO, N_("Frame axis"), N_("Frame Graph"), N_("New Frame Graph (+SHIFT: Fine +CONTROL: integer ratio)"), NGRAPH_FRAME_ICON, G_CALLBACK(CmViewerButtonArm), FrameB, }, { TOOL_TYPE_RADIO, N_("Section axis"), N_("Section Graph"), N_("New Section Graph (+SHIFT: Fine +CONTROL: integer ratio)"), NGRAPH_SECTION_ICON, G_CALLBACK(CmViewerButtonArm), SectionB, }, { TOOL_TYPE_RADIO, N_("Cross axis"), N_("Cross Graph"), N_("New Cross Graph (+SHIFT: Fine +CONTROL: integer ratio)"), NGRAPH_CROSS_ICON, G_CALLBACK(CmViewerButtonArm), CrossB, }, { TOOL_TYPE_RADIO, N_("Single axis"), N_("Single Axis"), N_("New Single Axis (+SHIFT: Fine +CONTROL: snap angle)"), NGRAPH_SINGLE_ICON, G_CALLBACK(CmViewerButtonArm), SingleB, }, { TOOL_TYPE_SEPARATOR, }, { TOOL_TYPE_RADIO, N_("Trimming"), N_("Axis Trimming"), N_("Axis Trimming (+SHIFT: Fine)"), NGRAPH_TRIMMING_ICON, G_CALLBACK(CmViewerButtonArm), TrimB, }, { TOOL_TYPE_RADIO, N_("Evaluate"), N_("Evaluate Data"), N_("Evaluate Data Point"), NGRAPH_EVAL_ICON, G_CALLBACK(CmViewerButtonArm), EvalB, }, { TOOL_TYPE_RADIO, N_("Zoom"), N_("Viewer Zoom"), N_("Viewer Zoom-In (+CONTROL: Zoom-Out +SHIFT: Centering)"), NGRAPH_ZOOM_ICON, G_CALLBACK(CmViewerButtonArm), ZoomB, }, }; static struct ToolItem CommandToolbar[] = { { TOOL_TYPE_RECENT_DATA, N_("_Add"), N_("Add Data"), N_("Add Data file"), "text-x-generic-symbolic", NULL, 0, 0, "app.DataAddFileAction", }, { TOOL_TYPE_SEPARATOR, NULL, }, { TOOL_TYPE_RECENT_GRAPH, N_("_Load graph"), N_("Load NGP"), N_("Load NGP file"), "document-open-symbolic", NULL, 0, 0, "app.GraphLoadAction", }, { TOOL_TYPE_SAVE, N_("_Save"), N_("Save NGP"), N_("Save NGP file"), "document-save-symbolic", NULL, 0, 0, "app.GraphSaveAction", }, { TOOL_TYPE_SEPARATOR, NULL, }, { TOOL_TYPE_NORMAL, N_("Scale _Clear"), N_("Clear Scale"), N_("Clear Scale"), NGRAPH_SCALE_ICON, NULL, 0, 0, "app.AxisScaleClearAction", }, { TOOL_TYPE_DRAW, N_("_Draw"), N_("Draw"), N_("Draw on Viewer Window"), "ngraph_draw-symbolic", NULL, 0, 0, "app.ViewDrawDirectAction", }, { TOOL_TYPE_NORMAL, N_("_Print"), N_("Print"), N_("Print"), "document-print-symbolic", NULL, 0, 0, "app.GraphPrintAction", }, { TOOL_TYPE_SEPARATOR, NULL, }, { TOOL_TYPE_NORMAL, N_("_Math Transformation"), N_("Math Transformation"), N_("Set Math Transformation"), "accessories-calculator-symbolic", NULL, 0, 0, "app.DataMathAction", }, { TOOL_TYPE_NORMAL, N_("Scale _Undo"), N_("Scale Undo"), N_("Undo Scale Settings"), "edit-undo-symbolic", NULL, 0, 0, "app.AxisScaleUndoAction", }, }; struct MenuItem { struct ActionWidget *action; const char *action_name; }; static struct MenuItem MenuAction[] = { { ActionWidget + MergePropertyAction, "MergePropertyAction", }, { ActionWidget + MergeCloseAction, "MergeCloseAction", }, { ActionWidget + LegendTextPropertyAction, "LegendTextPropertyAction", }, { ActionWidget + LegendTextDeleteAction, "LegendTextDeleteAction", }, { ActionWidget + LegendMarkPropertyAction, "LegendMarkPropertyAction", }, { ActionWidget + LegendMarkDeleteAction, "LegendMarkDeleteAction", }, { ActionWidget + LegendArcPropertyAction, "LegendArcPropertyAction", }, { ActionWidget + LegendArcDeleteAction, "LegendArcDeleteAction", }, { ActionWidget + LegendRectanglePropertyAction, "LegendRectanglePropertyAction", }, { ActionWidget + LegendRectangleDeleteAction, "LegendRectangleDeleteAction", }, { ActionWidget + LegendPathPropertyAction, "LegendPathPropertyAction", }, { ActionWidget + LegendPathDeleteAction, "LegendPathDeleteAction", }, { ActionWidget + AxisGridPropertyAction, "AxisGridPropertyAction", }, { ActionWidget + AxisGridDeleteAction, "AxisGridDeleteAction", }, { ActionWidget + AxisPropertyAction, "AxisPropertyAction", }, { ActionWidget + AxisDeleteAction, "AxisDeleteAction", }, { ActionWidget + AxisScaleZoomAction, "AxisScaleZoomAction", }, { ActionWidget + AxisScaleClearAction, "AxisScaleClearAction", }, { ActionWidget + AxisScaleUndoAction, "AxisScaleUndoAction", }, { ActionWidget + ParameterPropertyAction, "ParameterPropertyAction", }, { ActionWidget + ParameterDeleteAction, "ParameterDeleteAction", }, { ActionWidget + DataPropertyAction, "DataPropertyAction", }, { ActionWidget + DataCloseAction, "DataCloseAction", }, { ActionWidget + DataEditAction, "DataEditAction", }, { ActionWidget + DataSaveAction, "DataSaveAction", }, { ActionWidget + DataMathAction, "DataMathAction", }, { ActionWidget + ViewSidebarAction, "ViewSidebarAction", }, { ActionWidget + ViewStatusbarAction, "ViewStatusbarAction", }, { ActionWidget + ViewRulerAction, "ViewRulerAction", }, { ActionWidget + ViewScrollbarAction, "ViewScrollbarAction", }, { ActionWidget + ViewCommandToolbarAction, "ViewCommandToolbarAction", }, { ActionWidget + ViewToolboxAction, "ViewToolboxAction", }, { ActionWidget + ViewCrossGaugeAction, "ViewCrossGaugeAction", }, { ActionWidget + ViewGridLineAction, "ViewGridLineAction", }, { ActionWidget + EditOrderTopAction, "EditOrderTopAction", }, { ActionWidget + EditOrderUpAction, "EditOrderUpAction", }, { ActionWidget + EditOrderDownAction, "EditOrderDownAction", }, { ActionWidget + EditOrderBottomAction, "EditOrderBottomAction", }, { ActionWidget + EditAlignLeftAction, "EditAlignLeftAction", }, { ActionWidget + EditAlignHCenterAction, "EditAlignHCenterAction", }, { ActionWidget + EditAlignRightAction, "EditAlignRightAction", }, { ActionWidget + EditAlignTopAction, "EditAlignTopAction", }, { ActionWidget + EditAlignVCenterAction, "EditAlignVCenterAction", }, { ActionWidget + EditAlignBottomAction, "EditAlignBottomAction", }, { ActionWidget + EditRedoAction, "EditRedoAction", }, { ActionWidget + EditUndoAction, "EditUndoAction", }, { ActionWidget + EditCutAction, "EditCutAction", }, { ActionWidget + EditCopyAction, "EditCopyAction", }, { ActionWidget + EditPasteAction, "EditPasteAction", }, { ActionWidget + EditDeleteAction, "EditDeleteAction", }, { ActionWidget + EditDuplicateAction, "EditDuplicateAction", }, { ActionWidget + EditSelectAllAction, "EditSelectAllAction", }, { ActionWidget + EditRotateCWAction, "EditRotateCWAction", }, { ActionWidget + EditRotateCCWAction, "EditRotateCCWAction", }, { ActionWidget + EditFlipHAction, "EditFlipHAction", }, { ActionWidget + EditFlipVAction, "EditFlipVAction", }, { ActionWidget + GraphSaveAction, "GraphSaveAction", }, { NULL, }, }; void set_pointer_mode(int id) { GtkToolItem *button; button = NULL; switch (id) { case PointerModeDefault: button = PointerModeButtons[DefaultMode]; break; case PointerModeFocus: button = PointerModeButtons[(DefaultMode == PointerModeData) ? PointerModeBoth : DefaultMode]; break; case PointerModeFocusAxis: switch (DefaultMode) { case PointerModeLegend: case PointerModeData: id = PointerModeBoth; break; default: id = DefaultMode; break; } button = PointerModeButtons[id]; break; case PointerModeFocusLegend: switch (DefaultMode) { case PointerModeAxis: case PointerModeData: id = PointerModeBoth; break; default: id = DefaultMode; break; } button = PointerModeButtons[id]; break; case PointerModeBoth: case PointerModeLegend: case PointerModeAxis: case PointerModeData: button = PointerModeButtons[id]; break; } if (button) { gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(button), TRUE); } } static void init_action_widget_list(void) { int i; for (i = 0; i < ActionWidgetNum; i++) { switch (i) { case GraphSaveAction: ActionWidget[i].type = ACTION_TYPE_MODIFIED; break; case EditCutAction: case EditCopyAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_EDIT1; break; case EditRotateCCWAction: case EditRotateCWAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_ROTATE; break; case EditFlipVAction: case EditFlipHAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_FLIP; break; case EditDeleteAction: case EditDuplicateAction: case EditAlignLeftAction: case EditAlignRightAction: case EditAlignHCenterAction: case EditAlignTopAction: case EditAlignBottomAction: case EditAlignVCenterAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_EDIT2; break; case EditOrderTopAction: case EditOrderUpAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_UP; break; case EditOrderDownAction: case EditOrderBottomAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_DOWN; break; case EditPasteAction: ActionWidget[i].type = ACTION_TYPE_FOCUS_EDIT_PASTE; break; case DataPropertyAction: case DataCloseAction: case DataEditAction: case DataSaveAction: case DataMathAction: ActionWidget[i].type = ACTION_TYPE_FILE; break; case ParameterPropertyAction: case ParameterDeleteAction: ActionWidget[i].type = ACTION_TYPE_PARAMETER; break; case AxisPropertyAction: case AxisDeleteAction: case AxisScaleZoomAction: case AxisScaleClearAction: ActionWidget[i].type = ACTION_TYPE_AXIS; break; case AxisGridPropertyAction: case AxisGridDeleteAction: ActionWidget[i].type = ACTION_TYPE_GRID; break; case AxisScaleUndoAction: ActionWidget[i].type = ACTION_TYPE_AXIS_UNDO; break; case LegendPathPropertyAction: case LegendPathDeleteAction: ActionWidget[i].type = ACTION_TYPE_PATH; break; case LegendRectanglePropertyAction: case LegendRectangleDeleteAction: ActionWidget[i].type = ACTION_TYPE_RECTANGLE; break; case LegendArcPropertyAction: case LegendArcDeleteAction: ActionWidget[i].type = ACTION_TYPE_ARC; break; case LegendMarkPropertyAction: case LegendMarkDeleteAction: ActionWidget[i].type = ACTION_TYPE_MARK; break; case LegendTextPropertyAction: case LegendTextDeleteAction: ActionWidget[i].type = ACTION_TYPE_TEXT; break; case MergePropertyAction: case MergeCloseAction: ActionWidget[i].type = ACTION_TYPE_MERGE; break; default: ActionWidget[i].type = ACTION_TYPE_NONE; } } } void set_current_window(GtkWidget *w) { CurrentWindow = w; } GtkWidget * get_current_window(void) { return (CurrentWindow) ? CurrentWindow : TopLevel; } void menu_lock(int lock) { GtkWidget *w; static int count = 0; if (lock) { count++; } else { count--; } if (count > 0) { Menulock = TRUE; } else { Menulock = FALSE; count = 0; } #if 0 gtk_widget_set_sensitive(NgraphApp.Viewer.menu, ! Menulock); #endif w = gtk_paned_get_child1(GTK_PANED(NgraphApp.Viewer.main_pane)); if (w) { gtk_widget_set_sensitive(w, ! Menulock); } gtk_widget_set_sensitive(ToolBox, ! Menulock); } static void set_action_widget_sensitivity(int id, int state) { if (ActionWidget[id].action) { g_simple_action_set_enabled(G_SIMPLE_ACTION(ActionWidget[id].action), state); } } void set_axis_undo_button_sensitivity(int state) { set_action_widget_sensitivity(AxisScaleUndoAction, state); } void set_draw_lock(int lock) { DrawLock = lock; } #if ! WINDOWS static void kill_signal_handler(int sig) { if (Menulock || check_paint_lock()) { set_interrupt(); /* accept SIGINT */ } else { Hide_window = APP_QUIT; } } static void term_signal_handler(int sig) { Hide_window = APP_QUIT_FORCE; } #endif /* WINDOWS */ static int AppMainLoop(void) { Hide_window = APP_CONTINUE; while (TRUE) { gtk_main_iteration(); if (Hide_window != APP_CONTINUE && ! gtk_events_pending()) { int state = Hide_window; Hide_window = APP_CONTINUE; switch (state) { case APP_QUIT: if (CheckSave()) { menu_clear_undo(); return 0; } break; case APP_QUIT_FORCE: menu_clear_undo(); return 1; } } } return 0; } void reset_event(void) { while (gtk_events_pending()) { gtk_main_iteration(); } } static gboolean CloseCallback(GtkWidget *w, GdkEvent *event, gpointer user_data) { CmGraphQuit(NULL, user_data); return TRUE; } void QuitGUI(void) { if (TopLevel) { Hide_window = TRUE; } } int find_gra2gdk_inst(struct objlist **o, N_VALUE **i, struct objlist **ro, int *routput, struct gra2cairo_local **rlocal) { static struct objlist *obj = NULL, *robj = NULL; static int pos; N_VALUE *inst = NULL; if (obj == NULL) { obj = chkobject("gra2gdk"); pos = getobjtblpos(obj, "_output", &robj); } if (obj == NULL) return FALSE; inst = chkobjinst(obj, 0); if (inst == NULL) { int id; id = newobj(obj); if (id < 0) return FALSE; inst = chkobjinst(obj, 0); } if (inst == NULL) { return FALSE; } _getobj(obj, "_local", inst, rlocal); *routput = pos; *i = inst; *o = obj; *ro = robj; return TRUE; } #define ADDIN_MENU_SECTION_INDEX 6 void create_addin_menu(void) { GMenuModel *menu; GMenu *addin_menu; struct script *fcur; GMenuItem *item; int i, n; char buf[1024]; menu = gtk_application_get_menubar(GtkApp); if (menu == NULL) { return; } menu = g_menu_model_get_item_link(G_MENU_MODEL(menu), 0, G_MENU_LINK_SUBMENU); if (menu == NULL) { return; } n = g_menu_model_get_n_items(menu); if (n < ADDIN_MENU_SECTION_INDEX) { return; } menu = g_menu_model_get_item_link(menu, ADDIN_MENU_SECTION_INDEX, G_MENU_LINK_SECTION); if (menu == NULL) { return; } n = g_menu_model_get_n_items(menu); if (n > 1) { g_menu_remove(G_MENU(menu), 0); } addin_menu = g_menu_new(); i = 0; fcur = Menulocal.scriptroot; while (fcur) { if (fcur->name && fcur->script) { snprintf(buf, sizeof(buf), "app.GraphAddinAction(%d)", i); item = g_menu_item_new(fcur->name, buf); g_menu_append_item(addin_menu, item); g_object_unref(item); } fcur = fcur->next; i++; } g_menu_prepend_submenu(G_MENU(menu), _("_Add-in"), G_MENU_MODEL(addin_menu)); } static void set_focus_sensitivity_sub(const struct Viewer *d, int insensitive) { int i, num, type, state, up_state, down_state; GtkClipboard *clip; num = check_focused_obj_type(d, &type); up_state = down_state = FALSE; if (num == 1 && (type & (FOCUS_OBJ_TYPE_LEGEND | FOCUS_OBJ_TYPE_MERGE))) { int id, last_id; struct FocusObj *focus; focus= * (struct FocusObj **) arraynget(d->focusobj, 0); id = chkobjoid(focus->obj, focus->oid); last_id = chkobjlastinst(focus->obj); up_state = (id > 0); down_state = (id < last_id); } for (i = 0; i < ActionWidgetNum; i++) { switch (ActionWidget[i].type) { case ACTION_TYPE_FOCUS_EDIT1: if (insensitive) { state = FALSE; } else { state = (! (type & FOCUS_OBJ_TYPE_AXIS) && (type & (FOCUS_OBJ_TYPE_MERGE | FOCUS_OBJ_TYPE_LEGEND))); } set_action_widget_sensitivity(i, state); break; case ACTION_TYPE_FOCUS_EDIT2: if (insensitive) { state = FALSE; } else { state = (type & (FOCUS_OBJ_TYPE_AXIS | FOCUS_OBJ_TYPE_LEGEND | FOCUS_OBJ_TYPE_MERGE)); } set_action_widget_sensitivity(i, state); break; case ACTION_TYPE_FOCUS_EDIT_PASTE: if (insensitive) { state = FALSE; } else { switch (d->Mode) { case PointB: case LegendB: clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); state = gtk_clipboard_wait_is_text_available(clip); break; default: state = FALSE; } } set_action_widget_sensitivity(i, state); break; case ACTION_TYPE_FOCUS_ROTATE: if (insensitive) { state = FALSE; } else { state = (! (type & FOCUS_OBJ_TYPE_MERGE) && (type & (FOCUS_OBJ_TYPE_AXIS | FOCUS_OBJ_TYPE_LEGEND))); } set_action_widget_sensitivity(i, state); break; case ACTION_TYPE_FOCUS_FLIP: if (insensitive) { state = FALSE; } else { state = (! (type & (FOCUS_OBJ_TYPE_MERGE | FOCUS_OBJ_TYPE_TEXT)) && (type & (FOCUS_OBJ_TYPE_AXIS | FOCUS_OBJ_TYPE_LEGEND))); } set_action_widget_sensitivity(i, state); break; case ACTION_TYPE_FOCUS_UP: state = up_state; set_action_widget_sensitivity(i, state); break; case ACTION_TYPE_FOCUS_DOWN: state = down_state; set_action_widget_sensitivity(i, state); break; default: continue; } } } void set_focus_insensitive(const struct Viewer *d) { set_focus_sensitivity_sub(d, TRUE); } void set_focus_sensitivity(const struct Viewer *d) { set_focus_sensitivity_sub(d, FALSE); } static char * get_home(void) { struct objlist *sysobj; N_VALUE *inst; char *home; sysobj = chkobject("system"); inst = chkobjinst(sysobj, 0); _getobj(sysobj, "home_dir", inst, &home); return home; } static void create_markpixmap(GtkWidget *win) { cairo_surface_t *pix; int gra, i, R, G, B, R2, G2, B2, found, output; struct objlist *obj, *robj; N_VALUE *inst; struct gra2cairo_local *local; GdkWindow *window; R = G = B = 0; R2 = 0; G2 = B2 = 255; window = gtk_widget_get_window(win); found = find_gra2gdk_inst(&obj, &inst, &robj, &output, &local); for (i = 0; i < MARK_TYPE_NUM; i++) { pix = NULL; if (window && found) { pix = gra2gdk_create_pixmap(local, MARK_PIX_SIZE, MARK_PIX_SIZE, 1.0, 1.0, 1.0); if (pix) { gra = _GRAopen("gra2gdk", "_output", robj, inst, output, -1, -1, -1, NULL, local); if (gra >= 0) { GRAview(gra, 0, 0, MARK_PIX_SIZE, MARK_PIX_SIZE, 0); GRAlinestyle(gra, 0, NULL, 1, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); GRAmark(gra, i, MARK_PIX_SIZE / 2, MARK_PIX_SIZE / 2, MARK_PIX_SIZE - 4, R, G, B, 255, R2, G2, B2, 255); } _GRAclose(gra); } } NgraphApp.markpix[i] = pix; } } static void free_markpixmap(void) { int i; for (i = 0; i < MARK_TYPE_NUM; i++) { if (NgraphApp.markpix[i]) { cairo_surface_destroy(NgraphApp.markpix[i]); } NgraphApp.markpix[i] = NULL; } } static void create_icon(void) { GList *list = NULL; GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_new_from_resource(NGRAPH_SVG_ICON_FILE, NULL); if (pixbuf) { list = g_list_append(list, pixbuf); } pixbuf = gdk_pixbuf_new_from_resource(NGRAPH_ICON_FILE, NULL); if (pixbuf) { list = g_list_append(list, pixbuf); } pixbuf = gdk_pixbuf_new_from_resource(NGRAPH_ICON64_FILE, NULL); if (pixbuf) { list = g_list_append(list, pixbuf); } if (list) { gtk_window_set_default_icon_list(list); gtk_window_set_icon_list(GTK_WINDOW(TopLevel), list); g_list_free_full(list, g_object_unref); } } static int create_cursor(void) { unsigned int i; NgraphApp.cursor = g_malloc(sizeof(GdkCursor *) * CURSOR_TYPE_NUM); if (NgraphApp.cursor == NULL) return 1; for (i = 0; i < CURSOR_TYPE_NUM; i++) { NgraphApp.cursor[i] = gdk_cursor_new_for_display(gdk_display_get_default(), Cursor[i]); } return 0; } static void free_cursor(void) { unsigned int i; for (i = 0; i < CURSOR_TYPE_NUM; i++) { g_object_unref(NgraphApp.cursor[i]); NgraphApp.cursor[i] = NULL; } g_free(NgraphApp.cursor); NgraphApp.cursor = NULL; } static gboolean tool_button_enter_leave_cb(GtkWidget *w, GdkEventCrossing *e, gpointer data) { char *str; str = (char *) data; if (e->type == GDK_ENTER_NOTIFY) { SetStatusBar(str); } else { ResetStatusBar(); } return FALSE; } static GtkWidget * create_message_box(GtkWidget **label1, GtkWidget **label2) { GtkWidget *frame, *w, *hbox; frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = gtk_label_new(NULL); gtk_widget_set_halign(w, GTK_ALIGN_END); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); *label1 = w; w = gtk_label_new(NULL); gtk_widget_set_halign(w, GTK_ALIGN_START); gtk_label_set_width_chars(GTK_LABEL(w), 16); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); *label2 = w; gtk_container_add(GTK_CONTAINER(frame), hbox); return frame; } #define OBJ_ID_KEY "ngraph_object_id" static void setup_object_tab(struct SubWin *win, GtkWidget *tab, const char *icon_name, const char *tip) { GtkWidget *icon; int obj_id; obj_id = chkobjectid(win->data.data->obj); g_object_set_data(G_OBJECT(win->Win), OBJ_ID_KEY, GINT_TO_POINTER(obj_id)); icon = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_set_tooltip_text(icon, tip); gtk_notebook_append_page(GTK_NOTEBOOK(tab), win->Win, icon); gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(tab), win->Win, TRUE); gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(tab), win->Win, TRUE); gtk_notebook_set_menu_label_text(GTK_NOTEBOOK(tab), win->Win, tip); } static void get_pane_position(void) { Menulocal.main_pane_pos = gtk_paned_get_position(GTK_PANED(NgraphApp.Viewer.main_pane)); Menulocal.side_pane1_pos = gtk_paned_get_position(GTK_PANED(NgraphApp.Viewer.side_pane1)); Menulocal.side_pane2_pos = gtk_paned_get_position(GTK_PANED(NgraphApp.Viewer.side_pane2)); Menulocal.side_pane3_pos = gtk_paned_get_position(GTK_PANED(NgraphApp.Viewer.side_pane3)); } static void set_pane_position(void) { gtk_paned_set_position(GTK_PANED(NgraphApp.Viewer.main_pane), Menulocal.main_pane_pos); gtk_paned_set_position(GTK_PANED(NgraphApp.Viewer.side_pane3), Menulocal.side_pane3_pos); gtk_paned_set_position(GTK_PANED(NgraphApp.Viewer.side_pane1), Menulocal.side_pane1_pos); gtk_paned_set_position(GTK_PANED(NgraphApp.Viewer.side_pane2), Menulocal.side_pane2_pos); } struct obj_tab_info { int tab, order; int *conf; int obj_id; const char *obj_name; GtkWidget * (* init_func)(struct SubWin *); struct SubWin *d; const char *icon; }; static int tab_info_compare(const void * a, const void * b) { const struct obj_tab_info *info_a, *info_b; info_a = (const struct obj_tab_info *) a; info_b = (const struct obj_tab_info *) b; return info_a->order + info_a->tab * 100 - info_b->order - info_b->tab * 100; } static void init_tab_info(struct obj_tab_info *info, int n) { int i; for (i = 0; i < n; i++) { int position; struct objlist *obj; position = *info[i].conf; if (position > 99) { info[i].tab = 1; } else { info[i].tab = 0; } obj = chkobject(info[i].obj_name); info[i].obj_id = chkobjectid(obj); info[i].order = position % 100; } qsort(info, n, sizeof(*info), tab_info_compare); } static void save_tab_position_sub(GtkWidget *tab, struct obj_tab_info *tab_info, int offset) { int i, n; n = gtk_notebook_get_n_pages(GTK_NOTEBOOK(tab)); for (i = 0; i < n; i++){ int obj_id; GtkWidget *w; w = gtk_notebook_get_nth_page(GTK_NOTEBOOK(tab), i); obj_id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), OBJ_ID_KEY)); if (obj_id == tab_info->obj_id) { *tab_info->conf = offset + i; break; } } } static void save_tab_position(void) { int i, n; struct obj_tab_info tab_info[] = { {0, 0, &Menulocal.file_tab, 0, "data"}, {0, 0, &Menulocal.axis_tab, 0, "axis"}, {0, 0, &Menulocal.merge_tab, 0, "merge"}, {0, 0, &Menulocal.path_tab, 0, "path"}, {0, 0, &Menulocal.rectangle_tab, 0, "rectangle"}, {0, 0, &Menulocal.arc_tab, 0, "arc"}, {0, 0, &Menulocal.mark_tab, 0, "mark"}, {0, 0, &Menulocal.text_tab, 0, "text"}, {0, 0, &Menulocal.parameter_tab, 0, "parameter"}, }; n = sizeof(tab_info) / sizeof(*tab_info); init_tab_info(tab_info, n); for (i = 0; i < n; i++) { GtkWidget *tab; tab = gtk_paned_get_child1(GTK_PANED(NgraphApp.Viewer.side_pane2)); save_tab_position_sub(tab, tab_info + i, 0); tab = gtk_paned_get_child2(GTK_PANED(NgraphApp.Viewer.side_pane2)); save_tab_position_sub(tab, tab_info + i, 100); } } static void create_object_tabs(void) { int j, tab_n; GtkWidget *tab; struct obj_tab_info tab_info[] = { {0, 0, &Menulocal.file_tab, 0, "data", create_data_list, &NgraphApp.FileWin, NGRAPH_FILEWIN_ICON}, {0, 0, &Menulocal.axis_tab, 0, "axis", create_axis_list, &NgraphApp.AxisWin, NGRAPH_AXISWIN_ICON}, {0, 0, &Menulocal.merge_tab, 0, "merge", create_merge_list, &NgraphApp.MergeWin, NGRAPH_MERGEWIN_ICON}, {0, 0, &Menulocal.path_tab, 0, "path", create_path_list, &NgraphApp.PathWin, NGRAPH_LINE_ICON}, {0, 0, &Menulocal.rectangle_tab, 0, "rectangle", create_rect_list, &NgraphApp.RectWin, NGRAPH_RECT_ICON}, {0, 0, &Menulocal.arc_tab, 0, "arc", create_arc_list, &NgraphApp.ArcWin, NGRAPH_ARC_ICON}, {0, 0, &Menulocal.mark_tab, 0, "mark", create_mark_list, &NgraphApp.MarkWin, NGRAPH_MARK_ICON}, {0, 0, &Menulocal.text_tab, 0, "text", create_text_list, &NgraphApp.TextWin, NGRAPH_TEXT_ICON}, {0, 0, &Menulocal.parameter_tab, 0, "parameter", create_parameter_list, &NgraphApp.ParameterWin, NGRAPH_PARAMETER_ICON}, }; tab_n = sizeof(tab_info) / sizeof(*tab_info); init_tab_info(tab_info, tab_n); for (j = 0; j < tab_n; j++) { if (tab_info[j].tab > 0) { tab = gtk_paned_get_child2(GTK_PANED(NgraphApp.Viewer.side_pane2)); } else { tab = gtk_paned_get_child1(GTK_PANED(NgraphApp.Viewer.side_pane2)); } tab_info[j].init_func(tab_info[j].d); setup_object_tab(tab_info[j].d, tab, tab_info[j].icon, _(tab_info[j].obj_name)); } CoordWinCreate(&NgraphApp.CoordWin); gtk_paned_pack1(GTK_PANED(NgraphApp.Viewer.side_pane3), NgraphApp.CoordWin.Win, FALSE, TRUE); InfoWinCreate(&NgraphApp.InfoWin); gtk_paned_pack2(GTK_PANED(NgraphApp.Viewer.side_pane3), NgraphApp.InfoWin.Win, TRUE, TRUE); set_pane_position(); if (Menulocal.sidebar) { gtk_widget_show(NgraphApp.Viewer.side_pane1); } } static void edit_menu_shown(GtkWidget *w, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; set_focus_sensitivity(d); } static void clipboard_changed(GtkWidget *w, GdkEvent *e, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; set_focus_sensitivity(d); } #define USE_APP_HEADER_BAR 0 static void setup_toolbar(GtkWidget *window) { GtkWidget *w; #if USE_APP_HEADER_BAR GtkWidget *hbar; #endif w = create_toolbar(CommandToolbar, sizeof(CommandToolbar) / sizeof(*CommandToolbar), NULL); CToolbar = w; gtk_toolbar_set_style(GTK_TOOLBAR(w), GTK_TOOLBAR_ICONS); #if USE_APP_HEADER_BAR hbar = gtk_header_bar_new(); gtk_header_bar_set_title(GTK_HEADER_BAR(hbar), AppName); gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(hbar), TRUE); gtk_window_set_titlebar(GTK_WINDOW(window), hbar); #endif w = create_toolbar(PointerToolbar, sizeof(PointerToolbar) / sizeof(*PointerToolbar), G_CALLBACK(CmViewerButtonPressed)); PToolbar = w; gtk_orientable_set_orientation(GTK_ORIENTABLE(w), GTK_ORIENTATION_VERTICAL); gtk_toolbar_set_style(GTK_TOOLBAR(w), GTK_TOOLBAR_ICONS); } static void setupwindow(GtkApplication *app) { GtkWidget *w, *hbox, *hbox2, *vbox2, *table, *hpane1, *hpane2, *vpane1, *vpane2; #if ! USE_APP_HEADER_BAR GtkWidget *vbox; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); #endif vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); create_menu(MenuAction); ToolBox = gtk_stack_new(); SettingPanel = presetting_create_panel(app); gtk_stack_add_named(GTK_STACK(ToolBox), CToolbar, "CommandToolbar"); gtk_stack_add_named(GTK_STACK(ToolBox), SettingPanel, "SettingPanel"); gtk_box_pack_start(GTK_BOX(vbox2), ToolBox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), PToolbar, FALSE, FALSE, 0); if (NgraphApp.Viewer.popup) { g_signal_connect(NgraphApp.Viewer.popup, "show", G_CALLBACK(edit_menu_shown), &NgraphApp.Viewer); } NgraphApp.Viewer.HScroll = gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL); NgraphApp.Viewer.VScroll = gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, NULL); NgraphApp.Viewer.HRuler = nruler_new(GTK_ORIENTATION_HORIZONTAL); NgraphApp.Viewer.VRuler = nruler_new(GTK_ORIENTATION_VERTICAL); NgraphApp.Viewer.Win = gtk_drawing_area_new(); table = gtk_grid_new(); gtk_widget_set_hexpand(NgraphApp.Viewer.HRuler, TRUE); gtk_grid_attach(GTK_GRID(table), NgraphApp.Viewer.HRuler, 1, 0, 1, 1); gtk_widget_set_vexpand(NgraphApp.Viewer.VRuler, TRUE); gtk_grid_attach(GTK_GRID(table), NgraphApp.Viewer.VRuler, 0, 1, 1, 1); gtk_widget_set_hexpand(NgraphApp.Viewer.HScroll, TRUE); gtk_grid_attach(GTK_GRID(table), NgraphApp.Viewer.HScroll, 1, 2, 1, 1); gtk_widget_set_vexpand(NgraphApp.Viewer.VScroll, TRUE); gtk_grid_attach(GTK_GRID(table), NgraphApp.Viewer.VScroll, 2, 1, 1, 1); gtk_widget_set_hexpand(NgraphApp.Viewer.Win, TRUE); gtk_widget_set_vexpand(NgraphApp.Viewer.Win, TRUE); gtk_grid_attach(GTK_GRID(table), NgraphApp.Viewer.Win, 1, 1, 1, 1); vpane2 = gtk_paned_new(GTK_ORIENTATION_VERTICAL); NgraphApp.Viewer.side_pane2 = vpane2; w = gtk_notebook_new(); gtk_notebook_popup_enable(GTK_NOTEBOOK(w)); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(w), GTK_POS_LEFT); gtk_notebook_set_group_name(GTK_NOTEBOOK(w), SIDE_PANE_TAB_ID); gtk_notebook_set_scrollable(GTK_NOTEBOOK(w), TRUE); gtk_paned_add1(GTK_PANED(vpane2), w); w = gtk_notebook_new(); gtk_notebook_popup_enable(GTK_NOTEBOOK(w)); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(w), GTK_POS_LEFT); gtk_notebook_set_group_name(GTK_NOTEBOOK(w), SIDE_PANE_TAB_ID); gtk_notebook_set_scrollable(GTK_NOTEBOOK(w), TRUE); gtk_paned_add2(GTK_PANED(vpane2), w); hpane2 = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); NgraphApp.Viewer.side_pane3 = hpane2; vpane1 = gtk_paned_new(GTK_ORIENTATION_VERTICAL); gtk_paned_pack1(GTK_PANED(vpane1), vpane2, TRUE, TRUE); gtk_paned_pack2(GTK_PANED(vpane1), hpane2, FALSE, TRUE); NgraphApp.Viewer.side_pane1 = vpane1; hpane1 = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL); #if USE_APP_HEADER_BAR gtk_paned_add1(GTK_PANED(hpane1), hbox); #else gtk_paned_add1(GTK_PANED(hpane1), vbox); #endif gtk_paned_add2(GTK_PANED(hpane1), vpane1); NgraphApp.Viewer.main_pane = hpane1; gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 0); #if ! USE_APP_HEADER_BAR gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); #endif gtk_box_pack_start(GTK_BOX(hbox2), hpane1, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox2), hbox2, TRUE, TRUE, 0); NgraphApp.Message = gtk_statusbar_new(); gtk_box_pack_end(GTK_BOX(NgraphApp.Message), create_message_box(&NgraphApp.Message_extra, &NgraphApp.Message_pos), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox2), NgraphApp.Message, FALSE, FALSE, 0); NgraphApp.Message1 = gtk_statusbar_get_context_id(GTK_STATUSBAR(NgraphApp.Message), "Message1"); set_axis_undo_button_sensitivity(FALSE); gtk_container_add(GTK_CONTAINER(TopLevel), vbox2); create_object_tabs(); } static void load_hist_file(GtkEntryCompletion *list, char *home, char *name) { char *filename; filename = g_strdup_printf("%s/%s", home, name); entry_completion_load(list, filename, Menulocal.hist_size); g_free(filename); } static void save_hist_file(GtkEntryCompletion *list, char *home, char *name) { char *filename; filename = g_strdup_printf("%s/%s", home, name); entry_completion_save(list, filename, Menulocal.hist_size); g_free(filename); } static void load_hist(void) { char *home; NgraphApp.legend_text_list = entry_completion_create(); NgraphApp.x_math_list = entry_completion_create(); NgraphApp.y_math_list = entry_completion_create(); NgraphApp.func_list = entry_completion_create(); NgraphApp.fit_list = entry_completion_create(); home = get_home(); if (home == NULL) return; load_hist_file(NgraphApp.legend_text_list, home, TEXT_HISTORY); load_hist_file(NgraphApp.x_math_list, home, MATH_X_HISTORY); load_hist_file(NgraphApp.y_math_list, home, MATH_Y_HISTORY); load_hist_file(NgraphApp.func_list, home, FUNCTION_HISTORY); load_hist_file(NgraphApp.fit_list, home, FIT_HISTORY); } static void unref_entry_history(void) { g_object_unref(NgraphApp.legend_text_list); g_object_unref(NgraphApp.x_math_list); g_object_unref(NgraphApp.y_math_list); g_object_unref(NgraphApp.func_list); g_object_unref(NgraphApp.fit_list); NgraphApp.legend_text_list = NULL; NgraphApp.x_math_list = NULL; NgraphApp.y_math_list = NULL; NgraphApp.func_list = NULL; NgraphApp.fit_list = NULL; } static void save_entry_history(void) { char *home; home = get_home(); if (home == NULL) return; save_hist_file(NgraphApp.legend_text_list, home, TEXT_HISTORY); save_hist_file(NgraphApp.x_math_list, home, MATH_X_HISTORY); save_hist_file(NgraphApp.y_math_list, home, MATH_Y_HISTORY); save_hist_file(NgraphApp.func_list, home, FUNCTION_HISTORY); save_hist_file(NgraphApp.fit_list, home, FIT_HISTORY); } static void init_ngraph_app_struct(void) { NgraphApp.Viewer.Win = NULL; NgraphApp.Viewer.popup = NULL; memset(&NgraphApp.FileWin, 0, sizeof(NgraphApp.FileWin)); NgraphApp.FileWin.type = TypeFileWin; memset(&NgraphApp.AxisWin, 0, sizeof(NgraphApp.AxisWin)); NgraphApp.AxisWin.type = TypeAxisWin; memset(&NgraphApp.PathWin, 0, sizeof(NgraphApp.PathWin)); NgraphApp.PathWin.type = TypePathWin; memset(&NgraphApp.RectWin, 0, sizeof(NgraphApp.RectWin)); NgraphApp.RectWin.type = TypeRectWin; memset(&NgraphApp.ArcWin, 0, sizeof(NgraphApp.ArcWin)); NgraphApp.ArcWin.type = TypeArcWin; memset(&NgraphApp.MarkWin, 0, sizeof(NgraphApp.MarkWin)); NgraphApp.MarkWin.type = TypeMarkWin; memset(&NgraphApp.TextWin, 0, sizeof(NgraphApp.TextWin)); NgraphApp.TextWin.type = TypeTextWin; memset(&NgraphApp.MergeWin, 0, sizeof(NgraphApp.MergeWin)); NgraphApp.MergeWin.type = TypeMergeWin; memset(&NgraphApp.ParameterWin, 0, sizeof(NgraphApp.ParameterWin)); NgraphApp.ParameterWin.type = TypeParameterWin; memset(&NgraphApp.InfoWin, 0, sizeof(NgraphApp.InfoWin)); NgraphApp.InfoWin.type = TypeInfoWin; memset(&NgraphApp.CoordWin, 0, sizeof(NgraphApp.CoordWin)); NgraphApp.CoordWin.type = TypeCoordWin; NgraphApp.legend_text_list = NULL; NgraphApp.x_math_list = NULL; NgraphApp.y_math_list = NULL; NgraphApp.func_list = NULL; NgraphApp.fit_list = NULL; } void set_modified_state(int state) { set_action_widget_sensitivity(GraphSaveAction, state); } int toggle_view(int type, int state) { static int lock = FALSE; GtkWidget *w1 = NULL, *w2 = NULL; if (Menulock || Globallock) { return FALSE; } if (lock) { return FALSE; } lock = TRUE; switch (type) { case MenuIdToggleSidebar: Menulocal.sidebar = state; w1 = NgraphApp.Viewer.side_pane1; break; case MenuIdToggleStatusbar: Menulocal.statusbar = state; w1 = NgraphApp.Message; break; case MenuIdToggleRuler: Menulocal.ruler = state; w1 = NgraphApp.Viewer.HRuler; w2 = NgraphApp.Viewer.VRuler; break; case MenuIdToggleScrollbar: Menulocal.scrollbar = state; w1 = NgraphApp.Viewer.HScroll; w2 = NgraphApp.Viewer.VScroll; break; case MenuIdToggleCToolbar: Menulocal.ctoolbar = state; w1 = ToolBox; break; case MenuIdTogglePToolbar: Menulocal.ptoolbar = state; w1 = PToolbar; break; case MenuIdToggleCrossGauge: ViewCross(state); set_toggle_action_widget_state(ViewCrossGaugeAction, state); lock = FALSE; return TRUE; break; case MenuIdToggleGridLine: Menulocal.show_grid = state; set_toggle_action_widget_state(ViewGridLineAction, state); update_bg(); gtk_widget_queue_draw(NgraphApp.Viewer.Win); lock = FALSE; return TRUE; break; } if (w1) { gtk_widget_set_visible(w1, state); } if (w2) { gtk_widget_set_visible(w2, state); } lock = FALSE; return TRUE; } void set_toggle_action_widget_state(int id, int state) { if (ActionWidget[id].action) { GVariant *value; value = g_variant_new_boolean(state); g_action_change_state(ActionWidget[id].action, value); } } static void set_widget_visibility(void) { int i, state; for (i = 0; i < ActionWidgetNum; i++) { switch (i) { case ViewSidebarAction: state = Menulocal.sidebar; break; case ViewStatusbarAction: state = Menulocal.statusbar; break; case ViewRulerAction: state = Menulocal.ruler; break; case ViewScrollbarAction: state = Menulocal.scrollbar; break; case ViewCommandToolbarAction: state = Menulocal.ctoolbar; break; case ViewToolboxAction: state = Menulocal.ptoolbar; break; case ViewCrossGaugeAction: state = Menulocal.show_cross; break; case ViewGridLineAction: state = Menulocal.show_grid; break; default: continue; } set_toggle_action_widget_state(i, state); } } static void check_instance(struct objlist *obj) { int i; for (i = 0; i < ActionWidgetNum; i++) { struct objlist *dobj; dobj = NULL; switch (i) { case DataPropertyAction: case DataCloseAction: case DataEditAction: case DataSaveAction: case DataMathAction: dobj = chkobject("data"); break; case ParameterPropertyAction: case ParameterDeleteAction: dobj = chkobject("parameter"); break; case AxisPropertyAction: case AxisDeleteAction: case AxisScaleZoomAction: case AxisScaleClearAction: dobj = chkobject("axis"); if (obj == dobj && obj->lastinst < 0) { set_axis_undo_button_sensitivity(FALSE); } break; case AxisGridPropertyAction: case AxisGridDeleteAction: dobj = chkobject("axisgrid"); break; case LegendPathPropertyAction: case LegendPathDeleteAction: dobj = chkobject("path"); break; case LegendRectanglePropertyAction: case LegendRectangleDeleteAction: dobj = chkobject("rectangle"); break; case LegendArcPropertyAction: case LegendArcDeleteAction: dobj = chkobject("arc"); break; case LegendMarkPropertyAction: case LegendMarkDeleteAction: dobj = chkobject("mark"); break; case LegendTextPropertyAction: case LegendTextDeleteAction: dobj = chkobject("text"); break; case MergePropertyAction: case MergeCloseAction: dobj = chkobject("merge"); break; default: continue; } if (obj == dobj) { set_action_widget_sensitivity(i, obj->lastinst >= 0); } } } static void check_exist_instances(struct objlist *parent) { struct objlist *ocur; ocur = chkobjroot(); while (ocur) { if (chkobjparent(ocur) == parent) { check_instance(ocur); check_exist_instances(ocur); } ocur = ocur->next; } } static gboolean recent_filter(const GtkRecentFilterInfo *filter_info, gpointer user_data) { int i; if (filter_info->mime_type == NULL) { return FALSE; } switch (GPOINTER_TO_INT(user_data)) { case RECENT_TYPE_GRAPH: if (g_ascii_strcasecmp(filter_info->mime_type, NGRAPH_GRAPH_MIME)) { return FALSE; } break; case RECENT_TYPE_DATA: if (g_ascii_strncasecmp(filter_info->mime_type, NGRAPH_TEXT_MIME, strlen(NGRAPH_TEXT_MIME))) { return FALSE; } break; default: return FALSE; } for (i = 0; filter_info->applications[i]; i++) { if (g_strcmp0(AppName, filter_info->applications[i]) == 0) { return TRUE; } } return FALSE; } static void create_recent_filter(GtkWidget *w, int type) { GtkRecentFilter *filter; GtkRecentChooser *recent; recent = GTK_RECENT_CHOOSER(w); filter = gtk_recent_filter_new(); gtk_recent_filter_set_name(filter, (type == RECENT_TYPE_GRAPH) ? "NGP file" : "Data file"); gtk_recent_filter_add_custom(filter, GTK_RECENT_FILTER_URI | GTK_RECENT_FILTER_MIME_TYPE | GTK_RECENT_FILTER_APPLICATION, recent_filter, GINT_TO_POINTER(type), NULL); gtk_recent_chooser_set_filter(recent, filter); gtk_recent_chooser_set_show_tips(recent, TRUE); gtk_recent_chooser_set_show_icons(recent, FALSE); gtk_recent_chooser_set_local_only(recent, TRUE); #if ! WINDOWS gtk_recent_chooser_set_show_not_found(recent, FALSE); #endif gtk_recent_chooser_set_sort_type(recent, GTK_RECENT_SORT_MRU); } GtkWidget * create_recent_menu(int type) { GtkWidget *submenu; submenu = gtk_recent_chooser_menu_new_for_manager(NgraphApp.recent_manager); create_recent_filter(submenu, type); gtk_recent_chooser_menu_set_show_numbers(GTK_RECENT_CHOOSER_MENU(submenu), TRUE); gtk_recent_chooser_set_limit(GTK_RECENT_CHOOSER(submenu), RECENT_CHOOSER_LIMIT); switch (type) { case RECENT_TYPE_GRAPH: g_signal_connect(GTK_RECENT_CHOOSER(submenu), "item-activated", G_CALLBACK(CmGraphHistory), NULL); break; case RECENT_TYPE_DATA: g_signal_connect(GTK_RECENT_CHOOSER(submenu), "item-activated", G_CALLBACK(CmFileHistory), NULL); break; } return submenu; } static GtkWidget* create_save_menu(void) { GtkWidget *menu; GMenu *gmenu; gmenu = gtk_application_get_menu_by_id(GtkApp, "save-menu"); if (gmenu == NULL) { return NULL; } menu = gtk_menu_new_from_model(G_MENU_MODEL(gmenu)); gtk_widget_show_all(menu); return menu; } void draw_notify(int notify) { static int state = FALSE; const char *icon_name; if (state == notify) { return; } state = notify; if (DrawButton == NULL) { return; } icon_name = (state) ? "ngraph_draw-attention-symbolic" : "ngraph_draw-symbolic"; gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(DrawButton), icon_name); gtk_widget_queue_draw(DrawButton); } static GtkWidget * create_toolbar(struct ToolItem *item, int n, GCallback btn_press_cb) { int i; GSList *list; GtkToolItem *widget; GtkWidget *toolbar, *menu; toolbar = gtk_toolbar_new(); list = NULL; for (i = 0; i < n; i++) { switch (item[i].type) { case TOOL_TYPE_SEPARATOR: widget = gtk_separator_tool_item_new(); gtk_separator_tool_item_set_draw(GTK_SEPARATOR_TOOL_ITEM(widget), TRUE); break; case TOOL_TYPE_NORMAL: widget = gtk_tool_button_new(NULL, _(item[i].label)); break; case TOOL_TYPE_DRAW: widget = gtk_tool_button_new(NULL, _(item[i].label)); DrawButton = GTK_WIDGET(widget); break; case TOOL_TYPE_SAVE: widget = gtk_menu_tool_button_new(NULL, _(item[i].label)); menu = create_save_menu(); gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(widget), menu); gtk_menu_tool_button_set_arrow_tooltip_text(GTK_MENU_TOOL_BUTTON(widget), _("Save menu")); break; case TOOL_TYPE_RECENT_GRAPH: widget = gtk_menu_tool_button_new(NULL, _(item[i].label)); menu = create_recent_menu(RECENT_TYPE_GRAPH); gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(widget), menu); gtk_menu_tool_button_set_arrow_tooltip_text(GTK_MENU_TOOL_BUTTON(widget), _("Recent Graphs")); break; case TOOL_TYPE_RECENT_DATA: widget = gtk_menu_tool_button_new(NULL, _(item[i].label)); menu = create_recent_menu(RECENT_TYPE_DATA); gtk_menu_tool_button_set_menu(GTK_MENU_TOOL_BUTTON(widget), menu); gtk_menu_tool_button_set_arrow_tooltip_text(GTK_MENU_TOOL_BUTTON(widget), _("Recent Data Files")); break; case TOOL_TYPE_RADIO: widget = gtk_radio_tool_button_new(list); list = gtk_radio_tool_button_get_group(GTK_RADIO_TOOL_BUTTON(widget)); gtk_tool_button_set_label(GTK_TOOL_BUTTON(widget), _(item[i].label)); if (btn_press_cb) { g_signal_connect(gtk_bin_get_child(GTK_BIN(widget)), "button-press-event", btn_press_cb, NULL); } break; default: widget = NULL; } if (widget == NULL) { continue; } if (item[i].icon) { gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON(widget), item[i].icon); } if (item[i].action_name) { gtk_actionable_set_action_name(GTK_ACTIONABLE(widget), item[i].action_name); } else if (item[i].callback) { g_signal_connect(widget, "clicked", G_CALLBACK(item[i].callback), GINT_TO_POINTER(item[i].user_data)); } if (item[i].tip) { gtk_tool_item_set_tooltip_text(GTK_TOOL_ITEM(widget), _(item[i].tip)); } if (item[i].caption) { g_signal_connect(gtk_bin_get_child(GTK_BIN(widget)), "enter-notify-event", G_CALLBACK(tool_button_enter_leave_cb), (gpointer) _(item[i].caption)); g_signal_connect(gtk_bin_get_child(GTK_BIN(widget)), "leave-notify-event", G_CALLBACK(tool_button_enter_leave_cb), NULL); } if (item[i].button >= PointerModeOffset) { int id; id = item[i].button - PointerModeOffset; PointerModeButtons[id]= widget; } gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(widget), -1); } return toolbar; } static void create_menu(struct MenuItem *item) { int i; for (i = 0; item[i].action_name; i++) { if (item[i].action) { item[i].action->action = g_action_map_lookup_action(G_ACTION_MAP(GtkApp), item[i].action_name); } } } static GtkWidget * create_popup_menu(GtkApplication *app) { GtkWidget *popup; GMenu *menu; menu = gtk_application_get_menu_by_id(app, "popup-menu"); popup = gtk_menu_new_from_model(G_MENU_MODEL(menu)); return popup; } static int create_toplevel_window(void) { int i; struct objlist *aobj; int x, y, width, height, w, h; GdkDisplay *disp; GtkWidget *popup; GtkClipboard *clip; NgraphApp.recent_manager = gtk_recent_manager_get_default(); init_action_widget_list(); init_ngraph_app_struct(); w = 800; h = 600; disp = gdk_display_get_default(); if (disp) { GdkMonitor *monitor; monitor = gdk_display_get_primary_monitor(disp); if (monitor) { GdkRectangle rect; gdk_monitor_get_geometry(monitor, &rect); w = rect.width; h = rect.height; } } if (Menulocal.menux == DEFAULT_GEOMETRY) Menulocal.menux = w * 3 / 8; if (Menulocal.menuy == DEFAULT_GEOMETRY) Menulocal.menuy = h / 8; if (Menulocal.menuwidth == DEFAULT_GEOMETRY) Menulocal.menuwidth = w / 2; if (Menulocal.menuheight == DEFAULT_GEOMETRY) Menulocal.menuheight = h / 1.2; x = Menulocal.menux; y = Menulocal.menuy; width = Menulocal.menuwidth; height = Menulocal.menuheight; load_hist(); CurrentWindow = TopLevel = gtk_application_window_new(GtkApp); gtk_application_window_set_show_menubar(GTK_APPLICATION_WINDOW(TopLevel), TRUE); popup = create_popup_menu(GtkApp); if (popup) { NgraphApp.Viewer.popup = popup; } clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); g_signal_connect(clip, "owner-change", G_CALLBACK(clipboard_changed), &NgraphApp.Viewer); gtk_window_set_title(GTK_WINDOW(TopLevel), AppName); gtk_window_set_default_size(GTK_WINDOW(TopLevel), width, height); gtk_window_move(GTK_WINDOW(TopLevel), x, y); g_signal_connect(TopLevel, "delete-event", G_CALLBACK(CloseCallback), NULL); g_signal_connect(TopLevel, "destroy-event", G_CALLBACK(CloseCallback), NULL); create_icon(); initdialog(); setup_toolbar(TopLevel); gtk_widget_show_all(GTK_WIDGET(TopLevel)); reset_event(); create_markpixmap(TopLevel); setupwindow(GtkApp); create_addin_menu(); NgraphApp.FileName = NULL; NgraphApp.Viewer.Mode = PointB; gtk_widget_show_all(GTK_WIDGET(TopLevel)); ViewerWinSetup(); if (create_cursor()) return 1; reset_graph_modified(); NSetCursor(GDK_LEFT_PTR); putstderr = mgtkputstderr; printfstderr = mgtkprintfstderr; putstdout = mgtkputstdout; printfstdout = mgtkprintfstdout; ndisplaydialog = mgtkdisplaydialog; ndisplaystatus = mgtkdisplaystatus; ninterrupt = mgtkinterrupt; inputyn = mgtkinputyn; aobj = getobject("axis"); if (aobj) { for (i = 0; i <= chkobjlastinst(aobj); i++) { exeobj(aobj, "tight", i, 0, NULL); } } aobj = getobject("axisgrid"); if (aobj) { for (i = 0; i <= chkobjlastinst(aobj); i++) { exeobj(aobj, "tight", i, 0, NULL); } } gtk_widget_show_all(GTK_WIDGET(TopLevel)); set_widget_visibility(); set_focus_sensitivity(&NgraphApp.Viewer); check_exist_instances(chkobject("draw")); check_instance(chkobject("parameter")); set_newobj_cb(check_instance); set_delobj_cb(check_instance); return 0; } static void souce_view_set_search_path(void) { const gchar * const *dirs; gchar **new_dirs; gchar *dir; int n; GtkSourceLanguageManager *lm; lm = gtk_source_language_manager_get_default(); dirs = gtk_source_language_manager_get_search_path(lm); dir = g_strdup_printf("%s/%s", NDATADIR, "gtksourceview"); if (dir == NULL) { return; } if (g_strv_contains(dirs, dir)) { g_free(dir); return; } for (n = 0; dirs[n]; n++); new_dirs = g_malloc((n + 2) * sizeof(*new_dirs)); if (new_dirs == NULL) { g_free(dir); return; } memcpy(new_dirs, dirs, n * sizeof(*new_dirs)); new_dirs[n] = dir; new_dirs[n + 1] = NULL; gtk_source_language_manager_set_search_path(lm, new_dirs); g_free(dir); g_free(new_dirs); } int application(char *file) { int terminated; if (TopLevel) { if (gtk_widget_is_visible(TopLevel)) { return 1; } gtk_widget_show(TopLevel); OpenGC(); OpenGRA(); } else { GtkIconTheme *theme; theme = gtk_icon_theme_get_default(); gtk_icon_theme_add_resource_path(theme, NGRAPH_ICON_PATH); if (create_toplevel_window()) { return 1; } } souce_view_set_search_path(); #if ! WINDOWS set_signal(SIGINT, 0, kill_signal_handler, NULL); set_signal(SIGTERM, 0, term_signal_handler, NULL); #endif /* WINDOWS */ if (file != NULL) { char *ext; ext = getextention(file); if (ext && ((strcmp0(ext, "NGP") == 0) || (strcmp0(ext, "ngp") == 0))) { LoadNgpFile(file, FALSE, NULL); } else { CmViewerDraw(NULL, GINT_TO_POINTER(FALSE)); } } else { CmViewerDraw(NULL, GINT_TO_POINTER(FALSE)); } system_set_draw_notify_func(draw_notify); reset_event(); /* to set pane position correctly */ set_pane_position(); /* to set pane position correctly */ n_application_ready(); terminated = AppMainLoop(); system_set_draw_notify_func(NULL); if (CheckIniFile()) { save_tab_position(); get_pane_position(); menu_save_config(SAVE_CONFIG_TYPE_GEOMETRY); save_entry_history(); menu_save_config(SAVE_CONFIG_TYPE_TOGGLE_VIEW | SAVE_CONFIG_TYPE_OTHERS); } set_newobj_cb(NULL); set_delobj_cb(NULL); #if ! WINDOWS set_signal(SIGTERM, 0, SIG_DFL, NULL); set_signal(SIGINT, 0, SIG_DFL, NULL); #endif /* WINDOWS */ gtk_widget_hide(TopLevel); reset_event(); CloseGC(); CloseGRA(); if (terminated) { unref_entry_history(); ViewerWinClose(); g_free(NgraphApp.FileName); NgraphApp.FileName = NULL; gtk_widget_destroy(TopLevel); NgraphApp.Viewer.Win = NULL; CurrentWindow = TopLevel = PToolbar = CToolbar = ToolBox = NULL; free_markpixmap(); free_cursor(); reset_event(); delobj(getobject("system"), 0); } return 0; } void UpdateAll(char **objects) { UpdateAll2(objects, TRUE); } static void check_update_obj(char **objects, struct obj_list_data *file, int *update_file, struct obj_list_data *axis, int *update_axis, struct obj_list_data *merge, int *update_merge, int *update_axisgrid) { char **ptr; if (objects == NULL) { *update_file = TRUE; *update_axis = TRUE; *update_merge = TRUE; return; } *update_file = FALSE; *update_axis = FALSE; *update_merge = FALSE; for (ptr = objects; *ptr; ptr++) { struct objlist *obj; obj = getobject(*ptr); if (obj == file->obj) { *update_file = TRUE; } else if (obj == axis->obj) { *update_axis = TRUE; } else if (obj == merge->obj) { *update_merge = TRUE; } else if (strcmp0(*ptr, "axisgrid") == 0) { *update_axisgrid = TRUE; } } } void UpdateAll2(char **objs, int redraw) { int update_axisgrid, update_axis, update_file, update_merge; check_update_obj(objs, NgraphApp.FileWin.data.data, &update_file, NgraphApp.AxisWin.data.data, &update_axis, NgraphApp.MergeWin.data.data, &update_merge, &update_axisgrid); if (update_file) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, redraw && ! update_axis); } if (update_axis) { AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, redraw); } else if (update_axisgrid) { update_viewer_axisgrid(); } if (update_merge) { MergeWinUpdate(NgraphApp.MergeWin.data.data, TRUE, redraw); } LegendWinUpdate(objs, TRUE, redraw); InfoWinUpdate(TRUE); CoordWinUpdate(TRUE); ParameterWinUpdate(NgraphApp.ParameterWin.data.data, FALSE, redraw); presetting_set_parameters(&NgraphApp.Viewer); } void ChangePage(void) { CloseGRA(); OpenGRA(); CloseGC(); CloseGRA(); OpenGRA(); OpenGC(); SetScroller(); ChangeDPI(); draw_notify(TRUE); } static void SetStatusBarSub(const char *mes, guint id) { if (NgraphApp.Message) { gtk_statusbar_push(GTK_STATUSBAR(NgraphApp.Message), id, mes); } } static void ResetStatusBarSub(guint id) { if (NgraphApp.Message) { gtk_statusbar_pop(GTK_STATUSBAR(NgraphApp.Message), id); } } void SetStatusBar(const char *mes) { SetStatusBarSub(mes, NgraphApp.Message1); } void ResetStatusBar(void) { ResetStatusBarSub(NgraphApp.Message1); } unsigned int NGetCursor(void) { return CursorType; } void NSetCursor(unsigned int type) { GdkWindow *win; if (NgraphApp.Viewer.Win == NULL || NgraphApp.cursor == NULL || CursorType == type) return; win = gtk_widget_get_window(NgraphApp.Viewer.Win); if (win == NULL) { return; } CursorType = type; switch (type) { case GDK_LEFT_PTR: gdk_window_set_cursor(win, NgraphApp.cursor[0]); break; case GDK_XTERM: gdk_window_set_cursor(win, NgraphApp.cursor[1]); break; case GDK_CROSSHAIR: gdk_window_set_cursor(win, NgraphApp.cursor[2]); break; case GDK_TOP_LEFT_CORNER: gdk_window_set_cursor(win, NgraphApp.cursor[3]); break; case GDK_TOP_RIGHT_CORNER: gdk_window_set_cursor(win, NgraphApp.cursor[4]); break; case GDK_BOTTOM_RIGHT_CORNER: gdk_window_set_cursor(win, NgraphApp.cursor[5]); break; case GDK_BOTTOM_LEFT_CORNER: gdk_window_set_cursor(win, NgraphApp.cursor[6]); break; case GDK_TARGET: gdk_window_set_cursor(win, NgraphApp.cursor[7]); break; case GDK_PLUS: gdk_window_set_cursor(win, NgraphApp.cursor[8]); break; case GDK_SIZING: gdk_window_set_cursor(win, NgraphApp.cursor[9]); break; case GDK_WATCH: gdk_window_set_cursor(win, NgraphApp.cursor[10]); break; case GDK_FLEUR: gdk_window_set_cursor(win, NgraphApp.cursor[11]); break; case GDK_PENCIL: gdk_window_set_cursor(win, NgraphApp.cursor[12]); break; case GDK_TCROSS: gdk_window_set_cursor(win, NgraphApp.cursor[13]); break; } } void DisplayDialog(const char *str) { char *ustr; if (str == NULL) return; ustr = n_locale_to_utf8(CHK_STR(str)); if (ustr == NULL) { return; } InfoWinDrawInfoText(ustr); g_free(ustr); } int PutStdout(const char *s) { gssize len; if (s == NULL) return 0; len = strlen(s); DisplayDialog(s); return len + 1; } int PutStderr(const char *s) { size_t len; char *ustr; if (s == NULL) return 0; ustr = n_locale_to_utf8(s); if (ustr == NULL) { return 0; } message_box(NULL, ustr, _("Error:"), RESPONS_ERROR); len = strlen(ustr); g_free(ustr); return len + 1; } int ChkInterrupt(void) { #if 0 GdkEvent *e; GtkWidget *w; e = gtk_get_current_event(); if(e == NULL) return FALSE; w = gtk_get_event_widget(e); if (w && (e->type == GDK_BUTTON_PRESS || e->type == GDK_BUTTON_RELEASE)) { // if (w && e->type != GDK_EXPOSE) { gtk_propagate_event(w, e); } gdk_event_free(e); if (check_interrupt()) { return TRUE; } #else if (DrawLock != DrawLockDraw) { return check_interrupt(); } while (gtk_events_pending()) { gtk_main_iteration_do(FALSE); if (check_interrupt()) { return TRUE; } } #endif return FALSE; } int InputYN(const char *mes) { int ret; ret = message_box(get_current_window(), mes, _("Question"), RESPONS_YESNO); return (ret == IDYES) ? TRUE : FALSE; } void script_exec(GtkWidget *w, gpointer client_data) { char *name, *option, *s, *argv[2], mes[256]; int newid, allocnow = FALSE, len, idn; struct narray sarray; struct objlist *robj, *shell; struct script *fcur; if (Menulock || Globallock || client_data == NULL) { return; } shell = chkobject("shell"); if (shell == NULL) return; fcur = (struct script *) client_data; if (fcur->script == NULL) return; name = g_strdup(fcur->script); if (name == NULL) return; newid = newobj(shell); if (newid < 0) { g_free(name); return; } arrayinit(&sarray, sizeof(char *)); if (arrayadd(&sarray, &name) == NULL) { delobj(shell, newid); g_free(name); arraydel2(&sarray); return; } option = fcur->option; while ((s = getitok2(&option, &len, " \t")) != NULL) { if (arrayadd(&sarray, &s) == NULL) { delobj(shell, newid); g_free(s); arraydel2(&sarray); return; } } if (Menulocal.addinconsole) { allocnow = allocate_console(); } snprintf(mes, sizeof(mes), _("Executing `%.128s'."), name); SetStatusBar(mes); menu_lock(TRUE); menu_save_undo(UNDO_TYPE_ADDIN, NULL); idn = getobjtblpos(Menulocal.obj, "_evloop", &robj); registerevloop(chkobjectname(Menulocal.obj), "_evloop", robj, idn, Menulocal.inst, NULL); argv[0] = (char *) &sarray; argv[1] = NULL; exeobj(shell, "shell", newid, 1, argv); unregisterevloop(robj, idn, Menulocal.inst); menu_lock(FALSE); ResetStatusBar(); arraydel2(&sarray); if (Menulocal.addinconsole) { free_console(allocnow); } GetPageSettingsFromGRA(); UpdateAll(NULL); delobj(shell, newid); main_window_redraw(); } static void CmViewerButtonArm(GtkToggleToolButton *action, gpointer client_data) { int mode = PointB; struct Viewer *d; d = &NgraphApp.Viewer; if (! gtk_toggle_tool_button_get_active(action)) { return; } mode = GPOINTER_TO_INT(client_data); UnFocus(); NgraphApp.Viewer.Mode = mode; switch (mode) { case PointB: DefaultMode = PointerModeBoth; NSetCursor(GDK_LEFT_PTR); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); break; case LegendB: DefaultMode = PointerModeLegend; NSetCursor(GDK_LEFT_PTR); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); break; case AxisB: DefaultMode = PointerModeAxis; NSetCursor(GDK_LEFT_PTR); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); break; case DataB: DefaultMode = PointerModeData; NSetCursor(GDK_LEFT_PTR); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); break; case TrimB: case EvalB: NSetCursor(GDK_LEFT_PTR); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); break; case TextB: NSetCursor(GDK_XTERM); set_toolbox_mode(TOOLBOX_MODE_SETTING_PANEL); break; case ZoomB: NSetCursor(GDK_TARGET); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); break; default: NSetCursor(GDK_PENCIL); set_toolbox_mode(TOOLBOX_MODE_SETTING_PANEL); } NgraphApp.Viewer.Capture = FALSE; NgraphApp.Viewer.MouseMode = MOUSENONE; presetting_set_visibility(mode); if (d->MoveData) { move_data_cancel(d, TRUE); } gtk_widget_queue_draw(d->Win); } void set_toolbox_mode(enum TOOLBOX_MODE mode) { GtkWidget *widget; switch (mode) { case TOOLBOX_MODE_TOOLBAR: switch (NgraphApp.Viewer.Mode) { case PointB: case LegendB: case AxisB: case DataB: case TrimB: case EvalB: case ZoomB: widget = CToolbar; break; default: widget = SettingPanel; break; } break; case TOOLBOX_MODE_SETTING_PANEL: presetting_show_focused(); widget = SettingPanel; break; } gtk_stack_set_visible_child(GTK_STACK(ToolBox), widget); #if ! GTK_CHECK_VERSION(3, 99, 0) gtk_window_set_modal(GTK_WINDOW(TopLevel), widget == SettingPanel); /* for the GtkColorButton (modal GtkColorChooserDialog) */ #endif } enum TOOLBOX_MODE get_toolbox_mode(void) { GtkWidget *widget; widget = gtk_stack_get_visible_child(GTK_STACK(ToolBox)); return (widget == CToolbar) ? TOOLBOX_MODE_TOOLBAR: TOOLBOX_MODE_SETTING_PANEL; } #define MODIFIED_TYPE_UNMODIFIED 0 #define MODIFIED_TYPE_DRAWOBJ 1 #define MODIFIED_TYPE_GRAOBJ 2 struct undo_info { enum MENU_UNDO_TYPE type; char **obj; time_t time; struct undo_info *next; int modified, id; }; static struct undo_info *UndoInfo = NULL, *RedoInfo = NULL; static void iterate_undo_func(struct objlist *parent, UNDO_FUNC func) { struct objlist *obj; obj = parent->child; while (obj) { if (obj->parent != parent) { break; } func(obj); if (obj->child) { iterate_undo_func(obj, func); } obj = obj->next; } } static int menu_undo_iteration(UNDO_FUNC func, char **objs) { struct objlist *obj; int r; r = 0; if (objs) { while (*objs) { obj = getobject(*objs); if (obj) { func(obj); } objs++; } } else { char *extra_objs[] = {"fit", "parameter", NULL}; int i; obj = getobject("draw"); if (obj == NULL) { return 1; } iterate_undo_func(obj, func); for (i = 0; extra_objs[i]; i++) { obj = getobject(extra_objs[i]); if (obj == NULL) { return 1; } r = func(obj);; } } return r; } static int menu_check_undo(void) { return UndoInfo ? 1 : 0; } static int menu_check_redo(void) { return RedoInfo ? 1 : 0; } static struct undo_info * undo_info_push(enum MENU_UNDO_TYPE type, char **obj) { static int id = 0; struct undo_info *info; time_t t; t = time(NULL); if (UndoInfo && (type == UndoInfo->type) && (t - UndoInfo->time < 2)) { UndoInfo->time = t; return NULL; } info = g_malloc(sizeof(*info)); if (info == NULL) { return NULL; } info->type = type; info->obj = g_strdupv(obj); info->next = UndoInfo; info->time = t; info->modified = get_graph_modified(); info->id = id++; UndoInfo = info; return info; } static struct undo_info * undo_info_pop(struct undo_info *undo_info) { struct undo_info *info, *next; if (undo_info == NULL) { return NULL; } info = undo_info; next = info->next; g_strfreev(info->obj); g_free(info); return next; } static char *UndoTypeStr[UNDO_TYPE_NUM] = { N_("edit"), N_("move"), N_("rotate"), N_("flip"), N_("delete object"), N_("create object"), N_("align"), N_("order"), N_("duplicate"), N_("execute shell"), N_("execute add-in"), N_("scale clear"), N_("scale undo"), N_("open file"), N_("add range"), N_("paste"), N_("scale"), N_("auto scale"), N_("scale trimming"), N_("edit"), /* dummy message */ }; #define EDIT_MENU_INDEX 1 #define UNDO_MENU_SECTION_INDEX 0 static void set_undo_menu_label(void) { GMenuModel *menu; GMenuItem *item; int i, n; char buf[1024], *label; menu = gtk_application_get_menubar(GtkApp); if (menu == NULL) { return; } menu = g_menu_model_get_item_link(G_MENU_MODEL(menu), EDIT_MENU_INDEX, G_MENU_LINK_SUBMENU); if (menu == NULL) { return; } n = g_menu_model_get_n_items(menu); if (n < UNDO_MENU_SECTION_INDEX) { return; } menu = g_menu_model_get_item_link(menu, UNDO_MENU_SECTION_INDEX, G_MENU_LINK_SECTION); if (menu == NULL) { return; } n = g_menu_model_get_n_items(menu); for (i = 0; i < n; i++) { g_menu_remove(G_MENU(menu), 0); } if (RedoInfo) { snprintf(buf, sizeof(buf), _("_Redo: %s"), _(UndoTypeStr[RedoInfo->type])); label = buf; } else { label = _("_Redo"); } item = g_menu_item_new(label, "app.EditRedoAction"); g_menu_insert_item(G_MENU(menu), 0, item); g_object_unref(item); if (UndoInfo) { snprintf(buf, sizeof(buf), _("_Undo: %s"), _(UndoTypeStr[UndoInfo->type])); label = buf; } else { label = _("_Undo"); } item = g_menu_item_new(label, "app.EditUndoAction"); g_menu_insert_item(G_MENU(menu), 0, item); g_object_unref(item); } int menu_save_undo(enum MENU_UNDO_TYPE type, char **obj) { struct undo_info *info; info = undo_info_push(type, obj); if (info == NULL) { return -1; } menu_undo_iteration(undo_save, obj); while (RedoInfo) { RedoInfo = undo_info_pop(RedoInfo); } set_undo_menu_label(); set_action_widget_sensitivity(EditUndoAction, menu_check_undo()); set_action_widget_sensitivity(EditRedoAction, menu_check_redo()); return info->id; } int menu_save_undo_single(enum MENU_UNDO_TYPE type, char *obj) { char *objs[2]; objs[0] = obj; objs[1] = NULL; return menu_save_undo(type, objs); } void menu_delete_undo(int id) { if (UndoInfo == NULL) { return; } if (UndoInfo->id != id) { return; } menu_undo_iteration(undo_delete, UndoInfo->obj); UndoInfo = undo_info_pop(UndoInfo); set_undo_menu_label(); if (! menu_check_undo()) { set_action_widget_sensitivity(EditUndoAction, FALSE); } } void menu_clear_undo(void) { while (UndoInfo) { UndoInfo = undo_info_pop(UndoInfo); } while (RedoInfo) { RedoInfo = undo_info_pop(RedoInfo); } menu_undo_iteration(undo_clear, NULL); set_undo_menu_label(); set_action_widget_sensitivity(EditUndoAction, menu_check_undo()); set_action_widget_sensitivity(EditRedoAction, menu_check_redo()); merge_cache_clear(); } static void undo_update_widgets(struct undo_info *info) { set_action_widget_sensitivity(EditUndoAction, menu_check_undo()); set_action_widget_sensitivity(EditRedoAction, menu_check_redo()); check_exist_instances(chkobject("draw")); check_instance(chkobject("parameter")); set_axis_undo_button_sensitivity(axis_check_history()); if (info->obj == NULL) { UpdateAll(NULL); } else { char **ptr, *objs[OBJ_MAX]; int i, axis, data, axisgrid; axis = FALSE; data = FALSE; axisgrid = FALSE; ptr = info->obj; i = 0; while (ptr[i]) { objs[i] = ptr[i]; if (strcmp(ptr[i], "axis") == 0) { axis = TRUE; } else if (strcmp(ptr[i], "data") == 0) { data = TRUE; } else if (strcmp(ptr[i], "axisgrid") == 0) { axisgrid = TRUE; } i++; } if (axis) { if (! data) { objs[i] = "data"; i++; } if (! axisgrid) { objs[i] = "axisgrid"; i++; } } objs[i] = NULL; UpdateAll(objs); } } static void graph_modified_sub(int a) { if (Menulocal.obj == NULL) return; putobj(Menulocal.obj, "modified", 0, &a); } static int undo_check_modified(struct undo_info *info) { int modified_saved, modified_current; modified_saved = info->modified; modified_current = get_graph_modified(); if (modified_current) { if (! (modified_current & (modified_saved | MODIFIED_TYPE_GRAOBJ))) { graph_modified_sub(MODIFIED_TYPE_UNMODIFIED); } } else { if (modified_saved) { set_graph_modified(); } } return modified_current; } static struct undo_info * menu_undo_common(int *is_modify) { int r, modified; struct undo_info *info; r = menu_undo_iteration(undo_undo, UndoInfo->obj); if (r) { return NULL; } modified = undo_check_modified(UndoInfo); info = UndoInfo; UndoInfo = info->next; if (is_modify) { *is_modify = modified; } return info; } void menu_undo_internal(int id) { struct undo_info *info; if (UndoInfo == NULL) { return; } if (UndoInfo->id != id) { return; } info = menu_undo_common(NULL); if (info == NULL) { return; } undo_info_pop(info); set_action_widget_sensitivity(EditUndoAction, menu_check_undo()); set_action_widget_sensitivity(EditRedoAction, menu_check_redo()); set_undo_menu_label(); } void menu_undo(void) { int modified; struct undo_info *info; if (UndoInfo == NULL) { return; } info = menu_undo_common(&modified); if (info == NULL) { return; } info->next = RedoInfo; info->modified = modified; RedoInfo = info; undo_update_widgets(info); set_undo_menu_label(); } void menu_redo(void) { int r, modified; struct undo_info *info; if (RedoInfo == NULL) { return; } r = menu_undo_iteration(undo_redo, RedoInfo->obj); if (r) { return; } modified = undo_check_modified(RedoInfo); info = RedoInfo; RedoInfo = info->next; info->next = UndoInfo; info->modified = modified; UndoInfo = info; undo_update_widgets(info); set_undo_menu_label(); } int get_graph_modified(void) { return Menulocal.modified; } void set_graph_modified(void) { graph_modified_sub(MODIFIED_TYPE_DRAWOBJ); } void set_graph_modified_gra(void) { graph_modified_sub(MODIFIED_TYPE_GRAOBJ); } static void reset_modified_info(struct undo_info *info) { for (; info; info = info->next) { info->modified = 1; } } void reset_graph_modified(void) { graph_modified_sub(MODIFIED_TYPE_UNMODIFIED); reset_modified_info(UndoInfo); reset_modified_info(RedoInfo); } ngraph-gtk-6.09.05/src/gtk/gtk_combo.c0000644000175000017500000000553214143146756014362 00000000000000/* * $Id: gtk_combo.c,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ */ #include "gtk_common.h" #include #include "gtk_widget.h" #include "gtk_combo.h" static void set_model(GtkComboBox *cbox, int renderer) { GtkListStore *list; list = gtk_list_store_new(1, G_TYPE_STRING); gtk_combo_box_set_model(cbox, GTK_TREE_MODEL(list)); if (renderer) { GtkCellRenderer *rend_s; rend_s = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend_s, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend_s, "text", 0); } /* rend_n = gtk_cell_renderer_text_new(); g_object_set_data((GObject *) rend_n, "visible", FALSE); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend_n, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend_s, "text", 1); */ } GtkWidget * combo_box_create(void) { GtkComboBox *cbox; cbox = GTK_COMBO_BOX(gtk_combo_box_new()); set_model(cbox, TRUE); return GTK_WIDGET(cbox); } GtkWidget * combo_box_entry_create(void) { GtkComboBox *cbox; cbox = GTK_COMBO_BOX(gtk_combo_box_new_with_entry()); set_model(cbox, FALSE); gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(cbox), 0); gtk_entry_set_activates_default(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(cbox))), TRUE); return GTK_WIDGET(cbox); } void combo_box_entry_set_text(GtkWidget *cbox, char *str) { gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(cbox))), str); } const char * combo_box_entry_get_text(GtkWidget *cbox) { return gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(cbox)))); } void combo_box_entry_set_width(GtkWidget *cbox, int width) { gtk_entry_set_width_chars(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(cbox))), width); } void combo_box_append_text(GtkWidget *cbox, char *str) { GtkListStore *list; GtkTreeIter iter; list = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, 0, str, -1); } int combo_box_get_active(GtkWidget *cbox) { return gtk_combo_box_get_active(GTK_COMBO_BOX(cbox)); } char * combo_box_get_active_text(GtkWidget *cbox) { GtkTreeIter iter; gboolean ret; GtkTreeModel *model; char *str; ret = gtk_combo_box_get_active_iter(GTK_COMBO_BOX(cbox), &iter); if (! ret) return NULL; model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbox)); gtk_tree_model_get(model, &iter, 0, &str, -1); return str; } void combo_box_set_active(GtkWidget *cbox, int i) { gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), i); } void combo_box_clear(GtkWidget *cbox) { GtkListStore *list; list = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); gtk_list_store_clear(list); } int combo_box_get_num(GtkWidget *cbox) { GtkTreeModel *model; model = gtk_combo_box_get_model(GTK_COMBO_BOX(cbox)); return gtk_tree_model_iter_n_children(model, NULL); } ngraph-gtk-6.09.05/src/gtk/gtk_action.c0000644000175000017500000006026614142161772014537 00000000000000#include "gtk_common.h" #include "dir_defs.h" #include "x11menu.h" #include "x11info.h" #include "x11cood.h" #include "x11merge.h" #include "x11lgnd.h" #include "x11axis.h" #include "x11file.h" #include "x11parameter.h" #include "x11graph.h" #include "x11print.h" #include "x11opt.h" #include "x11view.h" #include "ox11menu.h" static void help_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmHelpHelp(NULL, NULL); } static void about_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmHelpAbout(NULL, NULL); } static void demo_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmHelpDemo(NULL, NULL); } static void quit_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphQuit(NULL, NULL); } static void GraphNewFrameAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphNewMenu(NULL, GINT_TO_POINTER(MenuIdGraphNewFrame)); } static void GraphNewSectionAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphNewMenu(NULL, GINT_TO_POINTER(MenuIdGraphNewSection)); } static void GraphNewCrossAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphNewMenu(NULL, GINT_TO_POINTER(MenuIdGraphNewCross)); } static void GraphNewClearAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphNewMenu(NULL, GINT_TO_POINTER(MenuIdGraphAllClear)); } static void GraphLoadAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphLoad(NULL, NULL); } static void GraphSaveAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphOverWrite(NULL, NULL); } static void GraphSaveAsAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphSave(NULL, NULL); } static void GraphExportGRAAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputGRAFile)); } static void GraphExportPSAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputPSFile)); } static void GraphExportEPSAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputEPSFile)); } static void GraphExportPDFAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputPDFFile)); } static void GraphExportSVGAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputSVGFile)); } static void GraphExportPNGAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputPNGFile)); } #if WINDOWS static void GraphExportEMFAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputEMFFile)); } static void GraphExportEMFClipboardAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputMenu(NULL, GINT_TO_POINTER(MenuIdOutputEMFClipboard)); } #endif static void GraphDrawOrderAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphSwitch(NULL, NULL); } static void GraphPageSetupAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphPage(NULL, GINT_TO_POINTER(FALSE)); } static void GraphPrintPreviewAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputViewerB(NULL, NULL); } static void GraphPrintAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOutputPrinterB(NULL, NULL); } static void GraphCurrentDirectoryAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphDirectory(NULL, NULL); } static void GraphShellAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmGraphShell(NULL, NULL); } static void GraphAddinAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { int i, n; struct script *fcur; n = g_variant_get_int32(parameter); if (n < 0) { return; } fcur = Menulocal.scriptroot; for (i = 0; i < n; i++) { if (fcur == NULL) { return; } fcur = fcur->next; } script_exec(NULL, fcur); } static void EditRedoAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditRedo)); } static void EditUndoAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditUndo)); } static void EditCutAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditCut)); } static void EditCopyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditCopy)); } static void EditPasteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditPaste)); } static void EditDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditDelete)); } static void EditDuplicateAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditDuplicate)); } static void EditSelectAllAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditSelectAll)); } static void EditOrderTopAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditOrderTop)); } static void EditOrderUpAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditOrderUp)); } static void EditOrderDownAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditOrderDown)); } static void EditOrderBottomAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditOrderBottom));} static void EditAlignLeftAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdAlignLeft)); } static void EditAlignVCenterAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdAlignVCenter)); } static void EditAlignRightAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdAlignRight)); } static void EditAlignTopAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdAlignTop)); } static void EditAlignHCenterAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdAlignHCenter)); } static void EditAlignBottomAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdAlignBottom)); } static void EditRotateCWAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditRotateCW)); } static void EditRotateCCWAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditRotateCCW)); } static void EditFlipHAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditFlipHorizontally)); } static void EditFlipVAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmEditMenuCB(NULL, GINT_TO_POINTER(MenuIdEditFlipVertically)); } static void ViewDrawDirectAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmViewerDraw(NULL, GINT_TO_POINTER(FALSE)); } static void ViewDrawAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmViewerDraw(NULL, GINT_TO_POINTER(TRUE)); } static void ViewClearInformationWindowAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { InfoWinClear(); } static void toggle_action(GSimpleAction *action, GVariant *parameter, enum MenuID id) { int state; state = g_variant_get_boolean(parameter); if (toggle_view(id, state)) { g_simple_action_set_state(action, parameter); } } static void ViewSidebarAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleSidebar); } static void ViewStatusbarAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleStatusbar); } static void ViewRulerAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleRuler); } static void ViewScrollbarAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleScrollbar); } static void ViewCommandToolbarAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleCToolbar); } static void ViewToolboxAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdTogglePToolbar); } static void ViewCrossGaugeAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleCrossGauge); } static void ViewGridLineAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { toggle_action(action, parameter, MenuIdToggleGridLine); } static void DataAddFileAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmFileOpen(NULL, NULL); } static void DataAddRangeAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmRangeAdd(NULL, NULL); } static void DataPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmFileUpdate(NULL, NULL); } static void DataCloseAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmFileClose(NULL, NULL); } static void DataEditAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmFileEdit(NULL, NULL); } static void DataSaveAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmFileSaveData(NULL, NULL); } static void DataMathAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmFileMath(NULL, NULL); } static void ParameterAddAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmParameterAdd(NULL, NULL); } static void ParameterPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmParameterUpdate(NULL, NULL); } static void ParameterDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmParameterDelete(NULL, NULL); } static void AxisAddFrameAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisAddFrame(NULL, NULL); } static void AxisAddSectionAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisAddSection(NULL, NULL); } static void AxisAddCrossAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisAddCross(NULL, NULL); } static void AxisAddSingleAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisAddSingle(NULL, NULL); } static void AxisPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisUpdate(NULL, NULL); } static void AxisDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisDel(NULL, NULL); } static void AxisScaleZoomAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisZoom(NULL, NULL); } static void AxisScaleClearAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisClear(NULL, NULL); } static void AxisScaleUndoAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisScaleUndo(NULL, NULL); } static void AxisGridNewAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisGridNew(NULL, NULL); } static void AxisGridPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisGridUpdate(NULL, NULL); } static void AxisGridDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmAxisGridDel(NULL, NULL); } static void LegendPathPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmLineUpdate(NULL, NULL); } static void LegendPathDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmLineDel(NULL, NULL); } static void LegendRectanglePropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmRectUpdate(NULL, NULL); } static void LegendRectangleDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmRectDel(NULL, NULL); } static void LegendArcPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmArcUpdate(NULL, NULL); } static void LegendArcDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmArcDel(NULL, NULL); } static void LegendMarkPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmMarkUpdate(NULL, NULL); } static void LegendMarkDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmMarkDel(NULL, NULL); } static void LegendTextPropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmTextUpdate(NULL, NULL); } static void LegendTextDeleteAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmTextDel(NULL, NULL); } static void MergeAddAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmMergeOpen(NULL, NULL); } static void MergePropertyAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmMergeUpdate(NULL, NULL); } static void MergeCloseAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmMergeClose(NULL, NULL); } static void PreferenceViewerAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionViewer(NULL, NULL); } static void PreferenceExternalViewerAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionExtViewer(NULL, NULL); } static void PreferenceFontAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionPrefFont(NULL, NULL); } static void PreferenceAddinAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionScript(NULL, NULL); } static void PreferenceMiscAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionMisc(NULL, NULL); } static void PreferenceSaveSettingAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionSaveDefault(NULL, NULL); } static void PreferenceSaveGraphAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionSaveNgp(NULL, NULL); } static void PreferenceDataDefaultAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionFileDef(NULL, NULL); } static void PreferenceTextDefaultAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionTextDef(NULL, NULL); } static void PreferenceGridDefaultAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { CmOptionGridDef(NULL, NULL); } static void PopupUpdateAction_activated(GSimpleAction *action, GVariant *parameter, gpointer app) { ViewerUpdateCB(NULL, NULL); } static GActionEntry AppEntries[] = { { "help", help_activated, NULL, NULL, NULL }, { "about", about_activated, NULL, NULL, NULL }, { "demo", demo_activated, NULL, NULL, NULL }, { "quit", quit_activated, NULL, NULL, NULL }, { "preferences", PreferenceMiscAction_activated, NULL, NULL, NULL }, { "GraphNewFrameAction", GraphNewFrameAction_activated, NULL, NULL, NULL }, { "GraphNewSectionAction", GraphNewSectionAction_activated, NULL, NULL, NULL }, { "GraphNewCrossAction", GraphNewCrossAction_activated, NULL, NULL, NULL }, { "GraphNewClearAction", GraphNewClearAction_activated, NULL, NULL, NULL }, { "GraphLoadAction", GraphLoadAction_activated, NULL, NULL, NULL }, { "GraphSaveAction", GraphSaveAction_activated, NULL, NULL, NULL }, { "GraphSaveAsAction", GraphSaveAsAction_activated, NULL, NULL, NULL }, { "GraphExportGRAAction", GraphExportGRAAction_activated, NULL, NULL, NULL }, { "GraphExportPSAction", GraphExportPSAction_activated, NULL, NULL, NULL }, { "GraphExportEPSAction", GraphExportEPSAction_activated, NULL, NULL, NULL }, { "GraphExportPDFAction", GraphExportPDFAction_activated, NULL, NULL, NULL }, { "GraphExportSVGAction", GraphExportSVGAction_activated, NULL, NULL, NULL }, { "GraphExportPNGAction", GraphExportPNGAction_activated, NULL, NULL, NULL }, #if WINDOWS { "GraphExportEMFAction", GraphExportEMFAction_activated, NULL, NULL, NULL }, { "GraphExportEMFClipboardAction", GraphExportEMFClipboardAction_activated, NULL, NULL, NULL }, #endif { "GraphDrawOrderAction", GraphDrawOrderAction_activated, NULL, NULL, NULL }, { "GraphPageSetupAction", GraphPageSetupAction_activated, NULL, NULL, NULL }, { "GraphPrintPreviewAction", GraphPrintPreviewAction_activated, NULL, NULL, NULL }, { "GraphPrintAction", GraphPrintAction_activated, NULL, NULL, NULL }, { "GraphCurrentDirectoryAction", GraphCurrentDirectoryAction_activated, NULL, NULL, NULL }, { "GraphAddinAction", GraphAddinAction_activated, "i", NULL, NULL }, { "GraphShellAction", GraphShellAction_activated, NULL, NULL, NULL }, { "EditRedoAction", EditRedoAction_activated, NULL, NULL, NULL }, { "EditUndoAction", EditUndoAction_activated, NULL, NULL, NULL }, { "EditCutAction", EditCutAction_activated, NULL, NULL, NULL }, { "EditCopyAction", EditCopyAction_activated, NULL, NULL, NULL }, { "EditPasteAction", EditPasteAction_activated, NULL, NULL, NULL }, { "EditDeleteAction", EditDeleteAction_activated, NULL, NULL, NULL }, { "EditDuplicateAction", EditDuplicateAction_activated, NULL, NULL, NULL }, { "EditSelectAllAction", EditSelectAllAction_activated, NULL, NULL, NULL }, { "EditOrderTopAction", EditOrderTopAction_activated, NULL, NULL, NULL }, { "EditOrderUpAction", EditOrderUpAction_activated, NULL, NULL, NULL }, { "EditOrderDownAction", EditOrderDownAction_activated, NULL, NULL, NULL }, { "EditOrderBottomAction", EditOrderBottomAction_activated, NULL, NULL, NULL }, { "EditAlignLeftAction", EditAlignLeftAction_activated, NULL, NULL, NULL }, { "EditAlignHCenterAction", EditAlignHCenterAction_activated, NULL, NULL, NULL }, { "EditAlignRightAction", EditAlignRightAction_activated, NULL, NULL, NULL }, { "EditAlignTopAction", EditAlignTopAction_activated, NULL, NULL, NULL }, { "EditAlignVCenterAction", EditAlignVCenterAction_activated, NULL, NULL, NULL }, { "EditAlignBottomAction", EditAlignBottomAction_activated, NULL, NULL, NULL }, { "EditRotateCWAction", EditRotateCWAction_activated, NULL, NULL, NULL }, { "EditRotateCCWAction", EditRotateCCWAction_activated, NULL, NULL, NULL }, { "EditFlipHAction", EditFlipHAction_activated, NULL, NULL, NULL }, { "EditFlipVAction", EditFlipVAction_activated, NULL, NULL, NULL }, { "ViewDrawDirectAction", ViewDrawDirectAction_activated, NULL, NULL, NULL }, { "ViewDrawAction", ViewDrawAction_activated, NULL, NULL, NULL }, { "ViewClearInformationWindowAction", ViewClearInformationWindowAction_activated, NULL, NULL, NULL }, { "ViewSidebarAction", NULL, NULL, "true", ViewSidebarAction_activated }, { "ViewStatusbarAction", NULL, NULL, "true", ViewStatusbarAction_activated }, { "ViewRulerAction", NULL, NULL, "true", ViewRulerAction_activated }, { "ViewScrollbarAction", NULL, NULL, "true", ViewScrollbarAction_activated }, { "ViewCommandToolbarAction", NULL, NULL, "true", ViewCommandToolbarAction_activated }, { "ViewToolboxAction", NULL, NULL, "true", ViewToolboxAction_activated }, { "ViewCrossGaugeAction", NULL, NULL, "true", ViewCrossGaugeAction_activated }, { "ViewGridLineAction", NULL, NULL, "true", ViewGridLineAction_activated }, { "DataAddFileAction", DataAddFileAction_activated, NULL, NULL, NULL }, { "DataAddRangeAction", DataAddRangeAction_activated, NULL, NULL, NULL }, { "DataPropertyAction", DataPropertyAction_activated, NULL, NULL, NULL }, { "DataCloseAction", DataCloseAction_activated, NULL, NULL, NULL }, { "DataEditAction", DataEditAction_activated, NULL, NULL, NULL }, { "DataSaveAction", DataSaveAction_activated, NULL, NULL, NULL }, { "DataMathAction", DataMathAction_activated, NULL, NULL, NULL }, { "ParameterAddAction", ParameterAddAction_activated, NULL, NULL, NULL }, { "ParameterPropertyAction", ParameterPropertyAction_activated, NULL, NULL, NULL }, { "ParameterDeleteAction", ParameterDeleteAction_activated, NULL, NULL, NULL }, { "AxisAddFrameAction", AxisAddFrameAction_activated, NULL, NULL, NULL }, { "AxisAddSectionAction", AxisAddSectionAction_activated, NULL, NULL, NULL }, { "AxisAddCrossAction", AxisAddCrossAction_activated, NULL, NULL, NULL }, { "AxisAddSingleAction", AxisAddSingleAction_activated, NULL, NULL, NULL }, { "AxisPropertyAction", AxisPropertyAction_activated, NULL, NULL, NULL }, { "AxisDeleteAction", AxisDeleteAction_activated, NULL, NULL, NULL }, { "AxisScaleZoomAction", AxisScaleZoomAction_activated, NULL, NULL, NULL }, { "AxisScaleClearAction", AxisScaleClearAction_activated, NULL, NULL, NULL }, { "AxisScaleUndoAction", AxisScaleUndoAction_activated, NULL, NULL, NULL }, { "AxisGridNewAction", AxisGridNewAction_activated, NULL, NULL, NULL }, { "AxisGridPropertyAction", AxisGridPropertyAction_activated, NULL, NULL, NULL }, { "AxisGridDeleteAction", AxisGridDeleteAction_activated, NULL, NULL, NULL }, { "LegendPathPropertyAction", LegendPathPropertyAction_activated, NULL, NULL, NULL }, { "LegendPathDeleteAction", LegendPathDeleteAction_activated, NULL, NULL, NULL }, { "LegendRectanglePropertyAction", LegendRectanglePropertyAction_activated, NULL, NULL, NULL }, { "LegendRectangleDeleteAction", LegendRectangleDeleteAction_activated, NULL, NULL, NULL }, { "LegendArcPropertyAction", LegendArcPropertyAction_activated, NULL, NULL, NULL }, { "LegendArcDeleteAction", LegendArcDeleteAction_activated, NULL, NULL, NULL }, { "LegendMarkPropertyAction", LegendMarkPropertyAction_activated, NULL, NULL, NULL }, { "LegendMarkDeleteAction", LegendMarkDeleteAction_activated, NULL, NULL, NULL }, { "LegendTextPropertyAction", LegendTextPropertyAction_activated, NULL, NULL, NULL }, { "LegendTextDeleteAction", LegendTextDeleteAction_activated, NULL, NULL, NULL }, { "MergeAddAction", MergeAddAction_activated, NULL, NULL, NULL }, { "MergePropertyAction", MergePropertyAction_activated, NULL, NULL, NULL }, { "MergeCloseAction", MergeCloseAction_activated, NULL, NULL, NULL }, { "PreferenceViewerAction", PreferenceViewerAction_activated, NULL, NULL, NULL }, { "PreferenceExternalViewerAction", PreferenceExternalViewerAction_activated, NULL, NULL, NULL }, { "PreferenceFontAction", PreferenceFontAction_activated, NULL, NULL, NULL }, { "PreferenceAddinAction", PreferenceAddinAction_activated, NULL, NULL, NULL }, { "PreferenceMiscAction", PreferenceMiscAction_activated, NULL, NULL, NULL }, { "PreferenceSaveSettingAction", PreferenceSaveSettingAction_activated, NULL, NULL, NULL }, { "PreferenceSaveGraphAction", PreferenceSaveGraphAction_activated, NULL, NULL, NULL }, { "PreferenceDataDefaultAction", PreferenceDataDefaultAction_activated, NULL, NULL, NULL }, { "PreferenceTextDefaultAction", PreferenceTextDefaultAction_activated, NULL, NULL, NULL }, { "PreferenceGridDefaultAction", PreferenceGridDefaultAction_activated, NULL, NULL, NULL }, { "PopupUpdateAction", PopupUpdateAction_activated, NULL, NULL, NULL }, }; static int Initialized = FALSE; void setup_actions(GtkApplication *app) { if (Initialized) { return; } g_action_map_add_action_entries(G_ACTION_MAP(app), AppEntries, G_N_ELEMENTS(AppEntries), app); Initialized = TRUE; } ngraph-gtk-6.09.05/src/gtk/x11cood.h0000644000175000017500000000204513351432267013670 00000000000000/* * $Id: x11cood.h,v 1.2 2009-02-06 08:25:14 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ void CoordWinSetFont(const char *font); void CoordWinUpdate(int clear); void CoordWinSetCoord(int x, int y); GtkWidget *CoordWinCreate(struct SubWin *d); ngraph-gtk-6.09.05/src/gtk/gtk_combo.h0000644000175000017500000000135113070106167014350 00000000000000/* * $Id: gtk_combo.h,v 1.1.1.1 2008-05-29 09:37:33 hito Exp $ */ #ifndef GTKCOMBO_HEADER #define GTKCOMBO_HEADER GtkWidget *combo_box_create(void); GtkWidget *combo_box_entry_create(void); void combo_box_entry_set_width(GtkWidget *cbox, int width); void combo_box_entry_set_text(GtkWidget *cbox, char *str); const char *combo_box_entry_get_text(GtkWidget *cbox); int combo_box_get_active(GtkWidget *cbox); char *combo_box_get_active_text(GtkWidget *cbox); void combo_box_set_active(GtkWidget *cbox, int i); void combo_box_clear(GtkWidget *cbox); int combo_box_get_num(GtkWidget *cbox); void combo_box_append_text(GtkWidget *cbox, char *str); int combo_box_get_selected_row(GtkWidget *view, gchar *path, GtkTreeIter *iter, int col); #endif ngraph-gtk-6.09.05/src/gtk/ox11dlg.c0000644000175000017500000004037713636116342013675 00000000000000/* * $Id: ox11dlg.c,v 1.29 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include "object.h" #include "mathfn.h" #include "nstring.h" #include "ioutil.h" #include "x11menu.h" #include "ox11menu.h" #include "init.h" #include "x11gui.h" #define NAME "dialog" #define PARENT "object" #define NVERSION "1.00.00" #define ERRDISPLAY 100 #define ERRNODLGINST 101 static char *dlgerrorlist[] = { "cannot open display.", "no instance for dialog", }; #define ERRNUM (sizeof(dlgerrorlist) / sizeof(*dlgerrorlist)) static GtkWidget *DLGTopLevel = NULL; static GtkWidget * get_toplevel_window(void) { if (TopLevel) { return TopLevel; } if (DLGTopLevel == NULL) { DLGTopLevel = gtk_window_new(GTK_WINDOW_TOPLEVEL); } return DLGTopLevel; } static int dlginit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int pos = -1; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) { return 1; } if (!OpenApplication()) { error(obj, ERRDISPLAY); return 1; } _putobj(obj, "x", inst, &pos); _putobj(obj, "y", inst, &pos); return 0; } static int dlgdone(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } static int dlgconfirm(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *mes, *title; int rcode, locksave; if (_getobj(obj, "title", inst, &title)) { title = NULL; } mes = (char *)argv[2]; locksave = Globallock; Globallock = TRUE; mes = CHK_STR(mes); rcode = message_box(get_toplevel_window(), mes, (title) ? title : _("Confirm"), RESPONS_YESNO); Globallock = locksave; if (rcode == IDYES) { rval->i = 1; } else { rval->i = 0; } return (rcode == IDYES)? 0 : 1; } static int dlgmessage(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *mes, *title; int locksave; if (_getobj(obj, "title", inst, &title)) { title = NULL; } mes = (char *)argv[2]; locksave = Globallock; Globallock = TRUE; message_box(get_toplevel_window(), CHK_STR(mes), (title) ? title : _("Message"), RESPONS_OK); Globallock = locksave; return 0; } static struct narray * dlg_get_buttons(struct objlist *obj, N_VALUE *inst) { struct narray *sarray; int num; if (_getobj(obj, "buttons", inst, &sarray)) { return NULL; } if (sarray == NULL) { return NULL; } num = arraynum(sarray); if (num < 1) { return NULL; } return sarray; } static int dlginput(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *mes, *title, *init_str; int locksave, x, y, r; char *inputbuf; struct narray *buttons; int btn = -1; locksave = Globallock; Globallock = TRUE; init_str = (char *)argv[2]; g_free(rval->str); rval->str = NULL; inputbuf = NULL; if (_getobj(obj, "title", inst, &title)) { title = NULL; } if (_getobj(obj, "caption", inst, &mes)) { mes = NULL; } if (_getobj(obj, "x", inst, &x)) { x = -1; } if (_getobj(obj, "y", inst, &y)) { y = -1; } buttons = dlg_get_buttons(obj, inst); r = DialogInput(get_toplevel_window(), (title) ? title : _("Input"), mes, init_str, buttons, &btn, &inputbuf, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); _putobj(obj, "response_button", inst, &btn); if (r == IDOK && inputbuf != NULL) { rval->str = inputbuf; } else { g_free(inputbuf); Globallock = locksave; return 1; } Globallock = locksave; return 0; } struct narray * get_sarray_argument(struct narray *sarray) { int m, n, i, j, id; char *ptr, sa[] = "sarray:", *argv[2]; struct narray iarray; struct objlist *saobj; n = arraynum(sarray); if (n != 1) return sarray; ptr = * (char **) arraydata(sarray); if (ptr == NULL) return sarray; if (strncmp(ptr, sa, sizeof(sa) / sizeof(*sa) - 1)) return sarray; arrayinit(&iarray, sizeof(int)); if (getobjilist(ptr, &saobj, &iarray, FALSE, NULL)) return sarray; n = arraynum(&iarray); for (j = 0; j < n; j++) { id = arraynget_int(&iarray, j); if (getobj(saobj, "num", id, 0, NULL, &m) == -1) continue; if (m < 1) continue; for (i = 0; i < m; i++) { argv[0] = (char *) & i; argv[1] = NULL; getobj(saobj, "get", id, 1, argv, &ptr); if (arrayadd2(sarray, ptr) == NULL) goto End; } } End: if (arraynum(sarray) > 1) { arrayndel2(sarray, 0); } arraydel(&iarray); return sarray; } static int dlgbutton(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *title, *caption; int rcode, x, y; struct narray *sarray; sarray = get_sarray_argument((struct narray *) argv[2]); if (arraynum(sarray) == 0) { return -1; } if (_getobj(obj, "title", inst, &title)) { title = NULL; } if (_getobj(obj, "caption", inst, &caption)) { caption = NULL; } if (_getobj(obj, "x", inst, &x)) { x = -1; } if (_getobj(obj, "y", inst, &y)) { y = -1; } g_free(rval->str); rval->str = NULL; rcode = DialogButton(get_toplevel_window(), (title) ? title : _("Select"), caption, sarray, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); if (rcode >= 0) { const char *str; str = arraynget_str(sarray, rcode); if (str) { rval->str = g_strdup(str); } } return 0; } static int dlgradio(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *title, *caption; int locksave, r, x, y, ret; struct narray *iarray, *sarray; struct narray *buttons; int btn = -1; sarray = get_sarray_argument((struct narray *) argv[2]); if (arraynum(sarray) == 0) return 1; locksave = Globallock; Globallock = TRUE; if (_getobj(obj, "title", inst, &title)) { title = NULL; } if (_getobj(obj, "caption", inst, &caption)) { caption = NULL; } if (_getobj(obj, "select", inst, &iarray)) { iarray = NULL; } if (_getobj(obj, "x", inst, &x)) { x = -1; } if (_getobj(obj, "y", inst, &y)) { y = -1; } r = arraylast_int(iarray); buttons = dlg_get_buttons(obj, inst); ret = DialogRadio(get_toplevel_window(), (title) ? title : _("Select"), caption, sarray, buttons, &btn, &r, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); _putobj(obj, "response_button", inst, &btn); if (ret != IDOK) { Globallock = locksave; return 1; } rval->i = r; Globallock = locksave; return 0; } static int dlgcombo(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int locksave, sel, ret, x, y; char *r, *title, *caption; struct narray *iarray, *sarray; struct narray *buttons; int btn = -1; sarray = get_sarray_argument((struct narray *) argv[2]); if (arraynum(sarray) == 0) return 1; locksave = Globallock; Globallock = TRUE; g_free(rval->str); rval->str = NULL; if (_getobj(obj, "title", inst, &title)) { title = NULL; } if (_getobj(obj, "caption", inst, &caption)) { caption = NULL; } if (_getobj(obj, "select", inst, &iarray)) { iarray = NULL; } if (_getobj(obj, "x", inst, &x)) { x = -1; } if (_getobj(obj, "y", inst, &y)) { y = -1; } sel = arraylast_int(iarray); buttons = dlg_get_buttons(obj, inst); if (strcmp(argv[1], "combo") == 0) { ret = DialogCombo(get_toplevel_window(), (title) ? title : _("Select"), caption, sarray, buttons, &btn, sel, &r, &x, &y); } else { ret = DialogComboEntry(get_toplevel_window(), (title) ? title : _("Input"), caption, sarray, buttons, &btn, sel, &r, &x, &y); } _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); _putobj(obj, "response_button", inst, &btn); if (ret != IDOK) { Globallock = locksave; return 1; } rval->str = r; Globallock = locksave; return 0; } static int dlgspin(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int locksave, ret, type, x, y; char *title, *caption; double min, max, inc, r; struct narray *buttons; int btn = -1; locksave = Globallock; Globallock = TRUE; if (_getobj(obj, "title", inst, &title)) { title = NULL; } if (_getobj(obj, "caption", inst, &caption)) { caption = NULL; } if (_getobj(obj, "x", inst, &x)) { x = -1; } if (_getobj(obj, "y", inst, &y)) { y = -1; } type = argv[1][0]; switch (type) { case 'd': min = arg_to_double(argv, 2); max = arg_to_double(argv, 3); inc = arg_to_double(argv, 4); r = arg_to_double(argv, 5); break; case 'i': min = * (int *) argv[2]; max = * (int *) argv[3]; inc = * (int *) argv[4]; r = * (int *) argv[5]; break; default: Globallock = locksave; return 1; } buttons = dlg_get_buttons(obj, inst); ret = DialogSpinEntry(get_toplevel_window(), (title) ? title : _("Input"), caption, min, max, inc, buttons, &btn, &r, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); _putobj(obj, "response_button", inst, &btn); if (ret != IDOK) { Globallock = locksave; return 1; } switch (type) { case 'd': rval->d = r; break; case 'i': rval->i = nround(r); break; default: Globallock = locksave; return 1; } Globallock = locksave; return 0; } static int dlgcheck(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int locksave, *r, i, n, inum, x, y, ret; struct narray *array, *sarray, *iarray; char *title, *caption; struct narray *buttons; int btn = -1; sarray = get_sarray_argument((struct narray *) argv[2]); n = arraynum(sarray); if (n == 0) return 1; arrayfree(rval->array); rval->array = NULL; array = arraynew(sizeof(int)); if (array == NULL) { return 1; } if (_getobj(obj, "title", inst, &title)) { title = NULL; } if (_getobj(obj, "caption", inst, &caption)) { caption = NULL; } if (_getobj(obj, "select", inst, &iarray)) { iarray = NULL; } if (_getobj(obj, "x", inst, &x)) { x = -1; } if (_getobj(obj, "y", inst, &y)) { y = -1; } r = g_malloc(n * sizeof(int)); if (r == NULL) { arrayfree(array); return 1; } memset(r, 0, n * sizeof(int)); locksave = Globallock; Globallock = TRUE; inum = arraynum(iarray); for (i = 0; i < inum; i++) { int *ptr; ptr = (int *) arraynget(iarray, i); if (ptr && *ptr >= 0 && *ptr < n) r[*ptr] = 1; } buttons = dlg_get_buttons(obj, inst); ret = DialogCheck(get_toplevel_window(), (title) ? title : _("Select"), caption, sarray, buttons, &btn, r, &x, &y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); _putobj(obj, "response_button", inst, &btn); if (ret != IDOK) { arrayfree(array); g_free(r); Globallock = locksave; return 1; } for (i = 0; i < n; i++) { if (r[i]) arrayadd(array, &i); } g_free(r); rval->array = array; Globallock = locksave; return 0; } static int dlgbeep(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int locksave; locksave = Globallock; Globallock = TRUE; message_beep(get_toplevel_window()); Globallock = locksave; return 0; } static int dlggetopenfile(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; char **d; int anum; char *filter = NULL, *initfile = NULL; int locksave; int ret; char *file; locksave = Globallock; Globallock = TRUE; g_free(rval->str); rval->str = NULL; array = (struct narray *)argv[2]; d = arraydata(array); anum = arraynum(array); switch (anum) { case 0: break; case 2: initfile = d[1]; /* fall through */ case 1: filter = d[0]; break; default: filter = d[0]; initfile = d[1]; } ret = nGetOpenFileName(get_toplevel_window(), _("Open file"), filter, NULL, initfile, &file, TRUE, TRUE); if (ret == IDOK) { if (file) { changefilename(file); rval->str = file; } } Globallock = locksave; return (ret == IDOK)? 0 : 1; } static int dlggetopenfiles(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; char **d; int anum; char *filter = NULL, *initfile = NULL; int locksave; int ret; char **file = NULL; struct narray *farray; locksave = Globallock; Globallock = TRUE; arrayfree2(rval->array); rval->array = NULL; array = (struct narray *)argv[2]; d = arraydata(array); anum = arraynum(array); switch (anum) { case 0: break; case 2: initfile = d[1]; /* fall through */ case 1: filter = d[0]; break; default: filter = d[0]; initfile = d[1]; } ret = nGetOpenFileNameMulti(get_toplevel_window(), _("Open files"), filter, NULL, initfile, &file, TRUE); if (ret == IDOK) { int i; farray = arraynew(sizeof(char *)); for (i = 0; file[i]; i++) { changefilename(file[i]); arrayadd(farray, file + i); } rval->array = farray; } g_free(file); Globallock = locksave; return (ret == IDOK)? 0 : 1; } static int dlggetsavefile(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; char **d; int anum; char *filter = NULL, *initfile = NULL; int locksave; int ret; char *file; locksave = Globallock; Globallock = TRUE; g_free(rval->str); rval->str = NULL; array = (struct narray *)argv[2]; d = arraydata(array); anum = arraynum(array); switch (anum) { case 0: break; case 2: initfile = d[1]; /* fall through */ case 1: filter = d[0]; break; default: filter = d[0]; initfile = d[1]; } ret = nGetSaveFileName(get_toplevel_window(), _("Save file"), filter, NULL, initfile, &file, FALSE, TRUE); if (ret == IDOK) { if (file) { changefilename(file); rval->str = file; } } Globallock = locksave; return (ret == IDOK) ? 0 : 1; } static struct objtable dialog[] = { {"init", NVFUNC, NEXEC, dlginit, NULL, 0}, {"done", NVFUNC, NEXEC, dlgdone, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"x", NINT, NREAD | NWRITE, NULL, NULL, 0}, {"y", NINT, NREAD | NWRITE, NULL, NULL, 0}, {"title", NSTR, NREAD | NWRITE, NULL, NULL, 0}, {"caption", NSTR, NREAD | NWRITE, NULL, NULL, 0}, {"select", NIARRAY, NREAD | NWRITE, NULL, NULL, 0}, {"buttons", NSARRAY, NREAD | NWRITE, NULL, NULL, 0}, {"response_button", NINT, NREAD, NULL, NULL, 0}, {"yesno", NIFUNC, NREAD | NEXEC, dlgconfirm, "s", 0}, {"message", NVFUNC, NREAD | NEXEC, dlgmessage, "s", 0}, {"input", NSFUNC, NREAD | NEXEC, dlginput, "s", 0}, {"radio", NIFUNC, NREAD | NEXEC, dlgradio, "sa", 0}, {"check", NIAFUNC, NREAD | NEXEC, dlgcheck, "sa", 0}, {"button", NSFUNC, NREAD | NEXEC, dlgbutton, "sa", 0}, {"combo", NSFUNC, NREAD | NEXEC, dlgcombo, "sa", 0}, {"combo_entry", NSFUNC, NREAD | NEXEC, dlgcombo, "sa", 0}, {"double_entry", NDFUNC, NREAD | NEXEC, dlgspin, "dddd", 0}, {"integer_entry", NIFUNC, NREAD | NEXEC, dlgspin, "iiii", 0}, {"beep", NVFUNC, NREAD | NEXEC, dlgbeep, "", 0}, {"get_open_file", NSFUNC, NREAD | NEXEC, dlggetopenfile, "sa", 0}, {"get_open_files", NSAFUNC, NREAD | NEXEC, dlggetopenfiles, "sa", 0}, {"get_save_file", NSFUNC, NREAD | NEXEC, dlggetsavefile, "sa", 0}, }; #define TBLNUM (sizeof(dialog) / sizeof(*dialog)) void * adddialog() { return addobject(NAME, NULL, PARENT, NVERSION, TBLNUM, dialog, ERRNUM, dlgerrorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/x11parameter.c0000644000175000017500000007472114142161773014731 00000000000000/* * $Id: x11parameter.c,v 1.33 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include "object.h" #include "shell.h" #include "oparameter.h" #include "gtk_liststore.h" #include "gtk_subwin.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "ox11menu.h" #include "x11commn.h" #include "x11view.h" #include "x11parameter.h" static void set_parameter(double prm, gpointer user_data); static int check_min_max(double *min, double *max, double *inc); struct parameter_data { int playing; GtkWidget *scale, *repeat; struct objlist *obj; int id; struct obj_list_data *obj_list_data; }; static void ParameterDialogSetupItem(struct ParameterDialog *d, int id) { char *text; GtkTextBuffer *buf; SetWidgetFromObjField(d->title, d->Obj, id, "title"); SetWidgetFromObjField(d->type, d->Obj, id, "type"); SetWidgetFromObjField(d->min, d->Obj, id, "min"); SetWidgetFromObjField(d->max, d->Obj, id, "max"); SetWidgetFromObjField(d->step, d->Obj, id, "step"); SetWidgetFromObjField(d->start, d->Obj, id, "start"); SetWidgetFromObjField(d->stop, d->Obj, id, "stop"); SetWidgetFromObjField(d->transition_step, d->Obj, id, "step"); SetWidgetFromObjField(d->wait, d->Obj, id, "wait"); SetWidgetFromObjField(d->wrap, d->Obj, id, "wrap"); SetWidgetFromObjField(d->redraw, d->Obj, id, "redraw"); SetWidgetFromObjField(d->checked, d->Obj, id, "active"); SetWidgetFromObjField(d->selected, d->Obj, id, "selected"); SetWidgetFromObjField(d->value, d->Obj, id, "value"); SetWidgetFromObjField(d->transition, d->Obj, id, "transition"); getobj(d->Obj, "items", id, 0, NULL, &text); if (text == NULL) { text = ""; } buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(d->items)); gtk_text_buffer_set_text(buf, text, -1); } static char * ParameterCB(struct objlist *obj, int id) { char *s, *title; getobj(obj, "title", id, 0, NULL, &title); if (title == NULL) { title = ""; } s = g_strdup(title); return s; } static void ParameterDialogCopy(GtkWidget *w, gpointer data) { struct ParameterDialog *d; int sel; d = (struct ParameterDialog *) data; sel = CopyClick(d->widget, d->Obj, d->Id, ParameterCB); if (sel != -1) { ParameterDialogSetupItem(d, sel); } } #define TYPE_SPIN_NAME "spin" #define TYPE_CHECK_NAME "check" #define TYPE_COMBO_NAME "combo" #define TYPE_TRANSITION_NAME "transition" static void add_page_spin(struct ParameterDialog *d) { GtkWidget *w, *table; int i; table = gtk_grid_new(); i = 0; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Min:"), TRUE, i++); d->min = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Max:"), TRUE, i++); d->max = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Step:"), TRUE, i++); d->step = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Initial value:"), TRUE, i++); d->value = w; w = gtk_check_button_new_with_mnemonic(_("_Wrap")); add_widget_to_table(table, w, NULL, FALSE, i++); d->wrap = w; gtk_stack_add_named(GTK_STACK(d->stack), table, TYPE_SPIN_NAME); } static void exchange_start_stop(GtkButton *btn, gpointer user_data) { struct ParameterDialog *d; const char *str; char *start, *stop; d = user_data; str = gtk_entry_get_text(GTK_ENTRY(d->start)); if (str == NULL) { str = ""; } start = g_strdup(str); str = gtk_entry_get_text(GTK_ENTRY(d->stop)); if (str == NULL) { str = ""; } stop = g_strdup(str); gtk_entry_set_text(GTK_ENTRY(d->start), stop); gtk_entry_set_text(GTK_ENTRY(d->stop), start); g_free(start); g_free(stop); } static void add_page_transition(struct ParameterDialog *d) { GtkWidget *w, *table; int i; table = gtk_grid_new(); i = 0; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Start:"), TRUE, i++); d->start = w; add_button(table, i++, 1, "ngraph_exchange-symbolic", _("Exchange"), G_CALLBACK(exchange_start_stop), d); w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Stop:"), TRUE, i++); d->stop = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Step:"), TRUE, i++); d->transition_step = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); gtk_spin_button_set_range(GTK_SPIN_BUTTON(w), OPARAMETER_WAIT_MIN / 100.0, OPARAMETER_WAIT_MAX / 100.0); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(w), 0.1, 1); add_widget_to_table(table, w, _("_Wait:"), TRUE, i++); d->wait = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Initial value:"), TRUE, i++); d->transition = w; gtk_stack_add_named(GTK_STACK(d->stack), table, TYPE_TRANSITION_NAME); } static void add_page_check(struct ParameterDialog *d) { GtkWidget *w; w = gtk_check_button_new_with_mnemonic(_("_Active (initial state)")); gtk_widget_set_valign(GTK_WIDGET(w), GTK_ALIGN_START); d->checked = w; gtk_stack_add_named(GTK_STACK(d->stack), w, TYPE_CHECK_NAME); } static void add_page_combo(struct ParameterDialog *d) { GtkWidget *w, *table, *swin; GtkTextBuffer *buf; int i; table = gtk_grid_new(); i = 0; buf = gtk_text_buffer_new(NULL); w = gtk_text_view_new_with_buffer(buf); gtk_widget_set_vexpand(w, TRUE); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), w); add_widget_to_table(table, swin, _("_Items:"), TRUE, i++); d->items = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Selected:"), FALSE, i++); d->selected = w; gtk_stack_add_named(GTK_STACK(d->stack), table, TYPE_COMBO_NAME); } static void parameter_type_changed(GtkComboBox *combo, gpointer user_data) { struct ParameterDialog *d; int type; d = user_data; type = gtk_combo_box_get_active(combo); if (type < 0) { return; } switch (type) { case PARAMETER_TYPE_SPIN: gtk_widget_show(d->wrap); gtk_stack_set_visible_child_name(GTK_STACK(d->stack), TYPE_SPIN_NAME); break; case PARAMETER_TYPE_SCALE: gtk_widget_hide(d->wrap); gtk_stack_set_visible_child_name(GTK_STACK(d->stack), TYPE_SPIN_NAME); break; case PARAMETER_TYPE_SWITCH: case PARAMETER_TYPE_CHECK: gtk_stack_set_visible_child_name(GTK_STACK(d->stack), TYPE_CHECK_NAME); break; case PARAMETER_TYPE_COMBO: gtk_stack_set_visible_child_name(GTK_STACK(d->stack), TYPE_COMBO_NAME); break; case PARAMETER_TYPE_TRANSITION: gtk_stack_set_visible_child_name(GTK_STACK(d->stack), TYPE_TRANSITION_NAME); break; } } static void ParameterDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct ParameterDialog *d; char title[64]; d = (struct ParameterDialog *) data; snprintf(title, sizeof(title), _("Parameter %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *frame, *table; int i; table = gtk_grid_new(); i = 0; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Title:"), TRUE, i++); d->title = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Type:"), TRUE, i++); g_signal_connect(w, "changed", G_CALLBACK(parameter_type_changed), d); d->type = w; w = gtk_stack_new(); add_widget_to_table(table, w, NULL, TRUE, i++); d->stack = w; add_page_spin(d); add_page_check(d); add_page_combo(d); add_page_transition(d); w = gtk_check_button_new_with_mnemonic(_("_Redraw")); add_widget_to_table(table, w, NULL, FALSE, i++); d->redraw = w; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(d->vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(ParameterDialogCopy), d, "parameter"); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } ParameterDialogSetupItem(d, d->Id); } static void ParameterDialogClose(GtkWidget *w, void *data) { struct ParameterDialog *d; GtkTextBuffer *buf; int ret, type; char *text; double min, max, value, step; d = (struct ParameterDialog *) data; switch(d->ret) { case IDOK: break; default: return; } ret = d->ret; d->ret = IDLOOP; if (SetObjFieldFromWidget(d->title, d->Obj, d->Id, "title")) return; if (SetObjFieldFromWidget(d->type, d->Obj, d->Id, "type")) return; if (SetObjFieldFromWidget(d->min, d->Obj, d->Id, "min")) return; if (SetObjFieldFromWidget(d->max, d->Obj, d->Id, "max")) return; if (SetObjFieldFromWidget(d->wrap, d->Obj, d->Id, "wrap")) return; if (SetObjFieldFromWidget(d->start, d->Obj, d->Id, "start")) return; if (SetObjFieldFromWidget(d->stop, d->Obj, d->Id, "stop")) return; if (SetObjFieldFromWidget(d->wait, d->Obj, d->Id, "wait")) return; if (SetObjFieldFromWidget(d->checked, d->Obj, d->Id, "active")) return; if (SetObjFieldFromWidget(d->redraw, d->Obj, d->Id, "redraw")) return; if (SetObjFieldFromWidget(d->selected, d->Obj, d->Id, "selected")) return; if (SetObjFieldFromWidget(d->value, d->Obj, d->Id, "value")) return; if (SetObjFieldFromWidget(d->transition, d->Obj, d->Id, "transition")) return; type = gtk_combo_box_get_active(GTK_COMBO_BOX(d->type)); if (type == PARAMETER_TYPE_TRANSITION) { if (SetObjFieldFromWidget(d->transition_step, d->Obj, d->Id, "step")) { return; } } else { if (SetObjFieldFromWidget(d->step, d->Obj, d->Id, "step")) { return; } } buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(d->items)); text = get_text_from_buffer(buf); if (chk_sputobjfield(d->Obj, d->Id, "items", text)) { g_free(text); return; } g_free(text); getobj(d->Obj, "min", d->Id, 0, NULL, &min); getobj(d->Obj, "max", d->Id, 0, NULL, &max); getobj(d->Obj, "step", d->Id, 0, NULL, &step); getobj(d->Obj, "value", d->Id, 0, NULL, &value); check_min_max(&min, &max, &step); if (value < min) { value = min; } else if (value > max) { value = max; } putobj(d->Obj, "min", d->Id, &min); putobj(d->Obj, "max", d->Id, &max); putobj(d->Obj, "step", d->Id, &step); putobj(d->Obj, "value", d->Id, &value); d->ret = ret; } void ParameterDialog(struct obj_list_data *data, int id, int user_data) { struct ParameterDialog *d; d = (struct ParameterDialog *) data->dialog; d->SetupWindow = ParameterDialogSetup; d->CloseWindow = ParameterDialogClose; d->Obj = data->obj; d->Id = id; } void CmParameterAdd(void *w, gpointer client_data) { int id, undo, ret; struct obj_list_data *d; if (Menulock || Globallock) return; d = NgraphApp.ParameterWin.data.data; undo = menu_save_undo_single(UNDO_TYPE_CREATE, d->obj->name); id = newobj(d->obj); if (id < 0) { return; } ParameterDialog(d, id, -1); ret = DialogExecute(TopLevel, &DlgParameter); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } ParameterWinUpdate(d, FALSE, FALSE); } void CmParameterDelete(void *w, gpointer client_data) { struct narray farray; struct obj_list_data *d; if (Menulock || Globallock) return; d = NgraphApp.ParameterWin.data.data; if (chkobjlastinst(d->obj) == -1) return; SelectDialog(&DlgSelect, d->obj, _("delete parameter (multi select)"), ParameterCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i, num, *array; num = arraynum(&farray); if (num > 0) { menu_save_undo_single(UNDO_TYPE_DELETE, d->obj->name); } array = arraydata(&farray); for (i = num - 1; i >= 0; i--) { delobj(d->obj, array[i]); set_graph_modified(); } ParameterWinUpdate(d, FALSE, FALSE); } arraydel(&farray); } static void update_parameter(struct obj_list_data *d) { char const *objects[] = {"data", NULL}; ParameterWinUpdate(d, FALSE, FALSE); ViewerWinUpdate(objects); } void CmParameterUpdate(void *w, gpointer client_data) { struct narray farray; int modified; struct obj_list_data *d; int i, *array, num, undo; if (Menulock || Globallock) return; d = NgraphApp.ParameterWin.data.data; if (chkobjlastinst(d->obj) == -1) { return; } SelectDialog(&DlgSelect, d->obj, _("parameter property (multi select)"), ParameterCB, (struct narray *) &farray, NULL); modified = FALSE; if (DialogExecute(TopLevel, &DlgSelect) != IDOK) { goto EndUpdate; } num = arraynum(&farray); if (num <= 0) { goto EndUpdate; } undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); array = arraydata(&farray); for (i = 0; i < num; i++) { int ret; ParameterDialog(d, array[i], -1); ret = DialogExecute(TopLevel, &DlgParameter); if (ret != IDCANCEL) { modified = TRUE; } } if (modified) { update_parameter(d); } else if (undo >= 0) { menu_undo_internal(undo); } EndUpdate: arraydel(&farray); } static void parameter_update(GtkButton *btn, gpointer data) { int undo, ret; struct parameter_data *d; if (Menulock || Globallock) return; d = data; undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); ParameterDialog(d->obj_list_data, d->id, -1); ret = DialogExecute(TopLevel, &DlgParameter); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { update_parameter(d->obj_list_data); } } static void parameter_up(GtkButton *btn, gpointer data) { struct parameter_data *d; if (Menulock || Globallock) return; d = data; menu_save_undo_single(UNDO_TYPE_ORDER, d->obj->name); moveupobj(d->obj, d->id); ParameterWinUpdate(d->obj_list_data, FALSE, FALSE); set_graph_modified(); } static void parameter_down(GtkButton *btn, gpointer data) { struct parameter_data *d; if (Menulock || Globallock) return; d = data; menu_save_undo_single(UNDO_TYPE_ORDER, d->obj->name); movedownobj(d->obj, d->id); ParameterWinUpdate(d->obj_list_data, FALSE, FALSE); set_graph_modified(); } static void parameter_delete(GtkButton *btn, gpointer data) { struct parameter_data *d; if (Menulock || Globallock) return; d = data; menu_save_undo_single(UNDO_TYPE_DELETE, d->obj->name); delobj(d->obj, d->id); ParameterWinUpdate(d->obj_list_data, FALSE, FALSE); set_graph_modified(); } static void set_pause_icon(GtkButton *btn) { GtkWidget *icon; icon = gtk_image_new_from_icon_name("media-playback-pause-symbolic", GTK_ICON_SIZE_BUTTON); gtk_widget_set_tooltip_text(GTK_WIDGET(btn), _("Pause")); gtk_button_set_image(btn, icon); } static void set_play_icon(GtkButton *btn) { GtkWidget *icon; icon = gtk_image_new_from_icon_name("media-playback-start-symbolic", GTK_ICON_SIZE_BUTTON); gtk_widget_set_tooltip_text(GTK_WIDGET(btn), _("Play")); gtk_button_set_image(btn, icon); } static void parameter_play(GtkButton *btn, gpointer user_data) { int wait; double start, stop, step, prm; GtkWidget *scale; struct parameter_data *data; data = user_data; if (data->playing) { data->playing = FALSE; } if (Menulock || Globallock) return; scale = data->scale; getobj(data->obj, "start", data->id, 0, NULL, &start); getobj(data->obj, "stop", data->id, 0, NULL, &stop); getobj(data->obj, "step", data->id, 0, NULL, &step); getobj(data->obj, "wait", data->id, 0, NULL, &wait); if (start == stop) { return; } if (step == 0) { return; } menu_lock(TRUE); set_pause_icon(btn); prm = gtk_range_get_value(GTK_RANGE(scale)); if (start > stop) { step = -step; if (prm + step < stop) { prm = start; } } else { if (prm + step > stop) { prm = start; } } data->playing = TRUE; while (1) { while (fabs(prm - start) <= fabs(stop - start)) { int i; gtk_range_set_value(GTK_RANGE(scale), prm); set_parameter(prm, data); for (i = 1; i < wait; i++) { msleep(10); reset_event(); if (! data->playing) { goto EndPlaying; } } prm = gtk_range_get_value(GTK_RANGE(scale)); prm += step; } if (! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(data->repeat))) { break; } prm = start; } EndPlaying: prm = gtk_range_get_value(GTK_RANGE(scale)); set_parameter(prm, data); data->playing = FALSE; set_play_icon(btn); menu_lock(FALSE); } static void parameter_skip_backward(GtkButton *btn, gpointer user_data) { double start; struct parameter_data *data; data = user_data; if ((! data->playing) && (Menulock || Globallock)) { return; } getobj(data->obj, "start", data->id, 0, NULL, &start); gtk_range_set_value(GTK_RANGE(data->scale), start); } static void parameter_skip_forward(GtkButton *btn, gpointer user_data) { double stop; struct parameter_data *data; data = user_data; if ((! data->playing) && (Menulock || Globallock)) { return; } getobj(data->obj, "stop", data->id, 0, NULL, &stop); gtk_range_set_value(GTK_RANGE(data->scale), stop); } static GtkWidget * create_combo_box(char *str, int selected) { char **items; int i; GtkWidget *w; w = combo_box_create(); if (str == NULL) { return w; } items = g_strsplit(str, "\n", -1); if (items == NULL) { return w; } for (i = 0; items[i]; i++) { combo_box_append_text(w, items[i]); } g_strfreev(items); if (selected < 0 || selected >= i) { selected = 0; } combo_box_set_active(w, selected); return w; } struct redraw_info { int redraw_flag, redraw_num; }; static int get_redraw_info(struct redraw_info *info) { if (getobj(Menulocal.obj, "redraw_num", 0, 0, NULL, &info->redraw_num) == -1) { return 1; } if (getobj(Menulocal.obj, "redraw_flag", 0, 0, NULL, &info->redraw_flag) == -1) { return 1; } return 0; } static int put_redraw_info(struct redraw_info *info) { if (putobj(Menulocal.obj, "redraw_num", 0, &info->redraw_num) == -1) { return 1; } if (putobj(Menulocal.obj, "redraw_flag", 0, &info->redraw_flag) == -1) { return 1; } return 0; } static void set_parameter(double prm, gpointer user_data) { int redraw; struct parameter_data *d; char *argv[2]; d = user_data; argv[0] = (char *) &prm; argv[1] = NULL; exeobj(d->obj, "set", d->id, 1, argv); getobj(d->obj, "redraw", d->id, 0, NULL, &redraw); if (redraw) { char const *objects[] = {"data", NULL}; struct redraw_info save_info, info; if (get_redraw_info(&save_info)) { return; } info.redraw_num = 0; info.redraw_flag = TRUE; if (put_redraw_info(&info)) { return; } ViewerWinUpdate(objects); if (put_redraw_info(&save_info)) { return; } } } static void scale_changed(GtkRange *range, gpointer user_data) { double value; if (Menulock || Globallock) return; value = gtk_range_get_value(range); set_parameter(value, user_data); } static void value_changed(GtkAdjustment *adjustment, gpointer user_data) { double value; if (Menulock || Globallock) return; value = gtk_adjustment_get_value(adjustment); set_parameter(value, user_data); } static void toggled(GtkToggleButton *toggle_button, gpointer user_data) { int active; if (Menulock || Globallock) { gtk_toggle_button_set_inconsistent(toggle_button, TRUE); return; } gtk_toggle_button_set_inconsistent(toggle_button, FALSE); active = gtk_toggle_button_get_active(toggle_button); set_parameter(active, user_data); } static void switched(GtkSwitch *sw, GParamSpec *pspec, gpointer user_data) { int active; if (Menulock || Globallock) return; active = gtk_switch_get_active(sw); set_parameter(active, user_data); } static gboolean switch_set(GtkSwitch *sw, gboolean state, gpointer user_data) { return (Menulock || Globallock); } static void combo_changed(GtkComboBox *combo_box, gpointer user_data) { int selected; if (Menulock || Globallock) return; selected = gtk_combo_box_get_active(combo_box); set_parameter(selected, user_data); } static int check_min_max(double *min, double *max, double *inc) { double span; int inverted; inverted = FALSE; span = fabs(*max - *min); if (*inc == 0) { *inc = span / 10; } if (*min == *max) { *max += *inc; } else if (*min > *max) { double tmp; inverted = TRUE; tmp = *min; *min = *max; *max = tmp; } return inverted; } static GtkWidget * create_spin_button(double min, double max, double inc, int wrap, double value) { GtkWidget *spin_button; check_min_max(&min, &max, &inc); spin_button = gtk_spin_button_new_with_range(min, max, inc); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin_button), value); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(spin_button), wrap); gtk_widget_set_halign(GTK_WIDGET(spin_button), GTK_ALIGN_START); gtk_widget_set_hexpand(GTK_WIDGET(spin_button), FALSE); return spin_button; } static GtkWidget * create_scale(double min, double max, double inc, double value) { GtkWidget *scale; int inverted; inverted = check_min_max(&min, &max, &inc); scale = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, min, max, inc); gtk_widget_set_size_request(GTK_WIDGET(scale), 200, -1); gtk_widget_set_hexpand(GTK_WIDGET(scale), TRUE); gtk_range_set_value(GTK_RANGE(scale), value); gtk_range_set_inverted(GTK_RANGE(scale), inverted); return scale; } static void delete_parameter_data(gpointer data) { g_free(data); } static struct parameter_data * create_parameter_data(struct obj_list_data *d, int id) { struct parameter_data *data; data = g_malloc(sizeof(*data)); if (data == NULL) { return NULL; } data->playing = FALSE; data->scale = NULL; data->repeat = NULL; data->obj = d->obj; data->id = id; data->obj_list_data = d; return data; } static int create_play_buttons(GtkWidget *grid, int id, int col, GtkWidget *scale, struct parameter_data *data) { GtkWidget *button; add_button(grid, id, col, "media-skip-backward-symbolic", _("To start"), G_CALLBACK(parameter_skip_backward), data); col++; add_button(grid, id, col, "media-playback-start-symbolic", _("Play"), G_CALLBACK(parameter_play), data); col++; add_button(grid, id, col, "media-skip-forward-symbolic", _("To stop"), G_CALLBACK(parameter_skip_forward), data); col++; button = add_toggle_button(grid, id, col, "media-playlist-repeat-symbolic", _("Repeat"), NULL, NULL); data->repeat = button; data->scale = scale; return col; } static int create_widget(struct obj_list_data *d, int id, int n) { int type, checked, col, selected, width, wrap; double min, max, step, parameter, start, stop; GtkWidget *w, *label, *separator; char buf[32], *title, *items; GtkAdjustment *adj; struct parameter_data *data; width = 1; getobj(d->obj, "title", id, 0, NULL, &title); getobj(d->obj, "type", id, 0, NULL, &type); getobj(d->obj, "min", id, 0, NULL, &min); getobj(d->obj, "max", id, 0, NULL, &max); getobj(d->obj, "step", id, 0, NULL, &step); getobj(d->obj, "wrap", id, 0, NULL, &wrap); getobj(d->obj, "start", id, 0, NULL, &start); getobj(d->obj, "stop", id, 0, NULL, &stop); getobj(d->obj, "items", id, 0, NULL, &items); getobj(d->obj, "parameter", id, 0, NULL, ¶meter); checked = selected = parameter; data = create_parameter_data(d, id); if (data == NULL) { return 0; } switch (type) { case PARAMETER_TYPE_SPIN: w = create_spin_button(min, max, step, wrap, parameter); adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(w)); g_signal_connect(adj, "value-changed", G_CALLBACK(value_changed), data); break; case PARAMETER_TYPE_SCALE: w = create_scale(min, max, step, parameter); g_signal_connect(w, "value-changed", G_CALLBACK(scale_changed), data); break; case PARAMETER_TYPE_CHECK: if (title) { w = gtk_check_button_new_with_mnemonic(title); title = NULL; } else { w = gtk_check_button_new(); } width = 2; g_signal_connect(w, "toggled", G_CALLBACK(toggled), data); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), checked); break; case PARAMETER_TYPE_COMBO: w = create_combo_box(items, selected); gtk_widget_set_halign(GTK_WIDGET(w), GTK_ALIGN_START); gtk_widget_set_hexpand(w, FALSE); g_signal_connect(w, "changed", G_CALLBACK(combo_changed), data); break; case PARAMETER_TYPE_SWITCH: w = gtk_switch_new(); gtk_switch_set_state(GTK_SWITCH(w), checked); gtk_widget_set_hexpand(GTK_WIDGET(w), FALSE); gtk_widget_set_vexpand(GTK_WIDGET(w), FALSE); gtk_widget_set_halign(GTK_WIDGET(w), GTK_ALIGN_START); gtk_widget_set_valign(GTK_WIDGET(w), GTK_ALIGN_CENTER); g_signal_connect(w, "notify::active", G_CALLBACK(switched), data); g_signal_connect(w, "state-set", G_CALLBACK(switch_set), NULL); break; case PARAMETER_TYPE_TRANSITION: w = create_scale(start, stop, step, parameter); gtk_scale_set_has_origin(GTK_SCALE(w), FALSE); g_signal_connect(w, "value-changed", G_CALLBACK(scale_changed), data); break; default: g_free(data); return 0; } col = 0; snprintf(buf, sizeof(buf), (id < 10) ? "_%d" : "%d", id); label = gtk_button_new_with_mnemonic(buf); g_signal_connect(label, "clicked", G_CALLBACK(parameter_update), data); g_object_set_data_full(G_OBJECT(label), "user-data", data, delete_parameter_data); gtk_grid_attach(GTK_GRID(d->text), label, col, id, 1, 1); col++; separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); gtk_grid_attach(GTK_GRID(d->text), separator, col, id, 1, 1); col++; if (title) { label = gtk_label_new_with_mnemonic(title); gtk_widget_set_halign(GTK_WIDGET(label), GTK_ALIGN_START); gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); gtk_grid_attach(GTK_GRID (d->text), label, col, id, 1, 1); } col++; gtk_grid_attach(GTK_GRID(d->text), w, col - width + 1, id, width, 1); col++; if (type == PARAMETER_TYPE_TRANSITION) { col = create_play_buttons(d->text, id, col, w, data); if (col < 0) { return 0; } } else { col += 3; } col++; separator = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(separator), GTK_SHADOW_NONE); gtk_widget_set_hexpand(GTK_WIDGET(separator), TRUE); gtk_grid_attach(GTK_GRID(d->text), separator, col, id, 1, 1); col++; separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); gtk_grid_attach(GTK_GRID(d->text), separator, col, id, 1, 1); col++; if (id > 0) { add_button(d->text, id, col, "go-up-symbolic", _("Up"), G_CALLBACK(parameter_up), data); } col++; if (id < n) { add_button(d->text, id, col, "go-down-symbolic", _("Down"), G_CALLBACK(parameter_down), data); } col++; add_button(d->text, id, col, "edit-delete-symbolic", _("Delete"), G_CALLBACK(parameter_delete), data); return col + 1; } static void remove_child(GtkWidget *widget, gpointer data) { GtkContainer *container = data; gtk_container_remove(container, widget); } static void save_as_default(GtkButton *button, gpointer user_data) { struct obj_list_data *d; int i, num, type, modified, undo; double parameter, value; d = (struct obj_list_data *) user_data; num = chkobjlastinst(d->obj) + 1; modified = FALSE; undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); for (i = 0; i < num; i++) { int ival; getobj(d->obj, "type", i, 0, NULL, &type); if (type == PARAMETER_TYPE_TRANSITION) { continue; } getobj(d->obj, "parameter", i, 0, NULL, ¶meter); switch (type) { case PARAMETER_TYPE_SPIN: case PARAMETER_TYPE_SCALE: getobj(d->obj, "value", i, 0, NULL, &value); if (value != parameter) { putobj(d->obj, "value", i, ¶meter); modified = TRUE; } break; case PARAMETER_TYPE_SWITCH: case PARAMETER_TYPE_CHECK: getobj(d->obj, "active", i, 0, NULL, &ival); if (ival != parameter) { ival = parameter; putobj(d->obj, "active", i, &ival); modified = TRUE; } break; case PARAMETER_TYPE_COMBO: getobj(d->obj, "selected", i, 0, NULL, &ival); if (ival != parameter) { ival = parameter; putobj(d->obj, "selected", i, &ival); modified = TRUE; } break; } } if (modified) { set_graph_modified(); } else { menu_delete_undo(undo); } } static void add_save_as_default_button(struct obj_list_data *d, int row, int width) { GtkWidget *button, *box; button = gtk_button_new_with_mnemonic(_("_Save as default")); g_signal_connect(button, "clicked", G_CALLBACK(save_as_default), d); box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0); gtk_grid_attach(GTK_GRID(d->text), box, 1, row, width, 1); } void ParameterWinUpdate(struct obj_list_data *d, int clear, int draw) { int num, i, col, add_save_button; if (Menulock || Globallock) return; if (d == NULL) { return; } add_save_button = FALSE; gtk_container_foreach(GTK_CONTAINER(d->text), remove_child, d->text); num = chkobjlastinst(d->obj); for (i = 0; i <= num; i++) { int type; getobj(d->obj, "type", i, 0, NULL, &type); if (! add_save_button && (type != PARAMETER_TYPE_TRANSITION)) { add_save_button = TRUE; } col = create_widget(d, i, num); } if (num >= 0) { GtkWidget *separator; num++; separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); gtk_grid_attach(GTK_GRID(d->text), separator, 1, num, col - 4, 1); } add_button(d->text, num + 1, 0, "list-add-symbolic", _("Add"), G_CALLBACK(CmParameterAdd), NULL); if (add_save_button) { add_save_as_default_button(d, num + 1, col - 4); } gtk_widget_show_all(GTK_WIDGET(d->text)); } GtkWidget * create_parameter_list(struct SubWin *d) { if (d->Win) { return d->Win; } parameter_sub_window_create(d); d->data.data->update = ParameterWinUpdate; d->data.data->setup_dialog = ParameterDialog; d->data.data->dialog = &DlgParameter; d->data.data->obj = chkobject("parameter"); ParameterWinUpdate(d->data.data, FALSE, FALSE); return d->Win; } ngraph-gtk-6.09.05/src/gtk/x11graph.c0000644000175000017500000010372214126274413014042 00000000000000/* * $Id: x11graph.c,v 1.57 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include "dir_defs.h" #include "object.h" #include "ioutil.h" #include "shell.h" #include "nstring.h" #include "odraw.h" #include "init.h" #include "x11dialg.h" #include "ox11menu.h" #include "x11menu.h" #include "x11gui.h" #include "x11graph.h" #include "x11view.h" #include "x11axis.h" #include "x11print.h" #include "x11commn.h" #include "x11info.h" #include "gtk_liststore.h" #include "gtk_combo.h" #include "gtk_widget.h" #define PAPER_SIZE_MIN 1000 char *LoadPathStr[] = { N_("unchange"), N_("full"), N_("base"), NULL, }; struct pagelisttype { char *paper, *name; enum paper_id id; int width, height; }; static struct pagelisttype pagelist[] = { {N_("Custom"), "custom", PAPER_ID_CUSTOM, 0, 0}, {N_("normal display (4:3)"), "normal display", PAPER_ID_NORMAL, 21000, 28000}, {N_("wide display (16:9)"), "wide display", PAPER_ID_WIDE, 21600, 38400}, {N_("wide display (16:10)"), "wide display", PAPER_ID_WIDE2, 21000, 33600}, {"A3 (297.00x420.00)", GTK_PAPER_NAME_A3, PAPER_ID_A3, 29700, 42000}, {"A4 (210.00x297.00)", GTK_PAPER_NAME_A4, PAPER_ID_A4, 21000, 29700}, {"A5 (148.00x210.00)", GTK_PAPER_NAME_A5, PAPER_ID_A5, 14800, 21000}, {"B4 (257.00x364.00)", "iso_b4", PAPER_ID_B4, 25700, 36400}, {"B5 (182.00x257.00)", GTK_PAPER_NAME_B5, PAPER_ID_B5, 18200, 25700}, {N_("Letter (215.90x279.40)"), GTK_PAPER_NAME_LETTER, PAPER_ID_LETTER, 21590, 27940}, {N_("Legal (215.90x355.60)"), GTK_PAPER_NAME_LEGAL, PAPER_ID_LEGAL, 21590, 35560}, {N_("Executive (184.2x266.7)"), GTK_PAPER_NAME_EXECUTIVE, PAPER_ID_EXECUTIVE, 18420, 26670}, }; #define PAGELISTNUM (sizeof(pagelist) / sizeof(*pagelist)) #define DEFAULT_PAPER_SIZE 0 int set_paper_type(int w, int h) { unsigned int j; int landscape = FALSE; if (w < 1 || h < 1) return 0; Menulocal.PaperWidth = w; Menulocal.PaperHeight = h; for (j = 0; j < PAGELISTNUM; j++) { if (w == pagelist[j].width && h == pagelist[j].height) { landscape = FALSE; break; } else if (h == pagelist[j].width && w == pagelist[j].height) { landscape = TRUE; break; } } if (j == PAGELISTNUM) { j = DEFAULT_PAPER_SIZE; } Menulocal.PaperName = pagelist[j].name; Menulocal.PaperId = pagelist[j].id; Menulocal.PaperLandscape = landscape; return j; } static void PageDialogSetupItem(GtkWidget *w, struct PageDialog *d) { int j; spin_entry_set_val(d->leftmargin, Menulocal.LeftMargin); spin_entry_set_val(d->topmargin, Menulocal.TopMargin); spin_entry_set_val(d->paperzoom, Menulocal.PaperZoom); j = set_paper_type(Menulocal.PaperWidth, Menulocal.PaperHeight); if (Menulocal.PaperLandscape) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->landscape), TRUE); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->portrait), TRUE); } spin_entry_set_val(d->paperwidth, Menulocal.PaperWidth); spin_entry_set_val(d->paperheight, Menulocal.PaperHeight); combo_box_set_active(d->paper, j); combo_box_set_active(d->decimalsign, Menulocal.Decimalsign); } static void PageDialogPage(GtkWidget *w, gpointer client_data) { struct PageDialog *d; int paper, landscape; d = (struct PageDialog *) client_data; paper = combo_box_get_active(d->paper); landscape = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->landscape)); if (paper < 0) return; set_widget_sensitivity_with_label(d->paperwidth, paper == 0); set_widget_sensitivity_with_label(d->paperheight, paper == 0); if (paper > 0) { if (landscape) { spin_entry_set_val(d->paperwidth, pagelist[paper].height); spin_entry_set_val(d->paperheight, pagelist[paper].width); } else { spin_entry_set_val(d->paperwidth, pagelist[paper].width); spin_entry_set_val(d->paperheight, pagelist[paper].height); } } } static void PageDialogOrientation(GtkWidget *widget, gpointer client_data) { struct PageDialog *d; int w, h; d = (struct PageDialog *) client_data; w = spin_entry_get_val(d->paperwidth); h = spin_entry_get_val(d->paperheight); spin_entry_set_val(d->paperwidth, h); spin_entry_set_val(d->paperheight, w); } static void PageDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct PageDialog *d; d = (struct PageDialog *) data; if (makewidget) { GtkWidget *w, *table; unsigned int j; int i; table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, FALSE, TRUE); spin_entry_set_range(w, PAPER_SIZE_MIN, G_MAXUSHORT); add_widget_to_table(table, w, _("paper _Width:"), FALSE, i++); d->paperwidth = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, FALSE, TRUE); spin_entry_set_range(w, PAPER_SIZE_MIN, G_MAXUSHORT); add_widget_to_table(table, w, _("paper _Height:"), FALSE, i++); d->paperheight = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Paper:"), FALSE, i++); d->paper = w; g_signal_connect(w, "changed", G_CALLBACK(PageDialogPage), d); for (j = 0; j < PAGELISTNUM; j++) { combo_box_append_text(d->paper, _(pagelist[j].paper)); } w = gtk_radio_button_new_with_mnemonic(NULL, _("_Portrait")); add_widget_to_table(table, w, _("_Orientation:"), FALSE, i++); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), TRUE); d->portrait = w; w = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(w), _("L_andscape")); add_widget_to_table_sub(table, w, NULL,FALSE, 1, 1, 1, i++); d->landscape = w; g_signal_connect(w, "toggled", G_CALLBACK(PageDialogOrientation), d); w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, FALSE, TRUE); add_widget_to_table(table, w, _("_Left margin:"), FALSE, i++); d->leftmargin = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, FALSE, TRUE); add_widget_to_table(table, w, _("_Top margin:"), FALSE, i++); d->topmargin = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, FALSE, TRUE); add_widget_to_table(table, w, _("paper _Zoom:"), FALSE, i++); d->paperzoom = w; w = combo_box_create(); gtk_widget_set_hexpand(w, TRUE); add_widget_to_table(table, w, _("_Decimalsign:"), FALSE, i++); for (j = 0; gra_decimalsign_char[j]; j++) { combo_box_append_text(w, _(gra_decimalsign_char[j])); } d->decimalsign = w; gtk_box_pack_start(GTK_BOX(d->vbox), table, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } PageDialogSetupItem(wi, d); d->show_cancel = ! d->new_graph; } static void PageDialogClose(GtkWidget *wi, void *data) { struct PageDialog *d; int w, h; d = (struct PageDialog *) data; if (d->ret != IDOK) return; w = spin_entry_get_val(d->paperwidth); h = spin_entry_get_val(d->paperheight); if (w < PAPER_SIZE_MIN || h < PAPER_SIZE_MIN) { d->ret = IDLOOP; return; } set_paper_type(w, h); Menulocal.LeftMargin = spin_entry_get_val(d->leftmargin); Menulocal.TopMargin = spin_entry_get_val(d->topmargin); Menulocal.PaperZoom = spin_entry_get_val(d->paperzoom); Menulocal.Decimalsign = combo_box_get_active(d->decimalsign); } void PageDialog(struct PageDialog *data, int new_graph) { data->SetupWindow = PageDialogSetup; data->CloseWindow = PageDialogClose; data->new_graph = new_graph; } static void set_objlist_btn_state(struct SwitchDialog *d, gboolean b) { gtk_widget_set_sensitive(d->add, b); gtk_widget_set_sensitive(d->ins, b); } static void set_drawlist_btn_state(struct SwitchDialog *d, gboolean b) { gtk_widget_set_sensitive(d->top, b); gtk_widget_set_sensitive(d->bottom, b); gtk_widget_set_sensitive(d->up, b); gtk_widget_set_sensitive(d->down, b); gtk_widget_set_sensitive(d->del, b); } static void SwitchDialogSetupItem(GtkWidget *w, struct SwitchDialog *d) { int j, num; GtkTreeIter iter; d->btn_lock = TRUE; list_store_clear(d->drawlist); num = arraynum(&(d->idrawrable)); for (j = 0; j < num; j++) { char **buf; buf = (char **) arraynget(&(d->drawrable), arraynget_int(&(d->idrawrable), j)); list_store_append(d->drawlist, &iter); list_store_set_string(d->drawlist, &iter, 0, _(*buf)); } d->btn_lock = FALSE; } static void SwitchDialogAdd(GtkWidget *w, gpointer client_data) { struct SwitchDialog *d; GtkTreeSelection *selected; GList *list, *ptr; int num, *data, i; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->objlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); data = arraydata(&(d->idrawrable)); num = arraynum(&(d->idrawrable)); for (ptr = list; ptr; ptr = ptr->next) { int *ary, a, duplicate; duplicate = FALSE; ary = gtk_tree_path_get_indices((GtkTreePath *)(ptr->data)); a = ary[0]; for (i = 0; i < num; i++) { if (data[i] == a) { duplicate = TRUE; break; } } if (!duplicate) { arrayadd(&(d->idrawrable), &a); } } if (list) { g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } SwitchDialogSetupItem(d->widget, d); set_drawlist_btn_state(d, FALSE); } static void SwitchDialogInsert(GtkWidget *w, gpointer client_data) { struct SwitchDialog *d; int i, a, pos, num2; int *data; GtkTreeSelection *selected; GList *list, *last; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->drawlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); pos = 0; if (list) { last = g_list_last(list); if (last) { int *ptr; ptr = gtk_tree_path_get_indices((GtkTreePath *)(last->data)); pos = ptr[0]; } g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } data = arraydata(&(d->idrawrable)); num2 = arraynum(&(d->idrawrable)); selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->objlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); for (last = list; last; last = last->next) { int *ptr; ptr = gtk_tree_path_get_indices((GtkTreePath *)(last->data)); a = ptr[0]; for (i = 0; i < num2; i++) { if (data[i] == a) { break; } } if (i == num2) { arrayins(&(d->idrawrable), &a, pos); } } if (list) { g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } SwitchDialogSetupItem(d->widget, d); set_drawlist_btn_state(d, FALSE); } static void switch_dialog_top_cb(gpointer data, gpointer user_data) { GtkTreePath *path; int *ary, i, k; struct SwitchDialog *d; path = (GtkTreePath *) data; d = (struct SwitchDialog *) user_data; ary = gtk_tree_path_get_indices(path); if (! ary) return; i = ary[0]; k = arraynget_int(&(d->idrawrable), i); arrayndel(&(d->idrawrable), i); arrayins(&(d->idrawrable), &k, 0); } static void switch_dialog_last_cb(gpointer data, gpointer user_data) { GtkTreePath *path; int *ary, i, k; struct SwitchDialog *d; path = (GtkTreePath *) data; d = (struct SwitchDialog *) user_data; ary = gtk_tree_path_get_indices(path); if (! ary) return; i = ary[0]; k = arraynget_int(&(d->idrawrable), i); arrayndel(&(d->idrawrable), i); arrayadd(&(d->idrawrable), &k); } static void SwitchDialogUp(GtkWidget *w, gpointer client_data) { GtkTreeSelection *selected; GList *list, *ptr; struct SwitchDialog *d; int k, modified, *ary; GtkTreePath *path; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->drawlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); if (list == NULL) { return; } modified = FALSE; for (ptr = list; ptr; ptr = g_list_next(ptr)) { int i; path = (GtkTreePath *) ptr->data; ary = gtk_tree_path_get_indices(path); if (ary == NULL) { break; } i = ary[0]; if (i <= 0) { break; } k = arraynget_int(&(d->idrawrable), i); arrayndel(&(d->idrawrable), i); i--; arrayins(&(d->idrawrable), &k, i); modified = TRUE; } if (modified) { SwitchDialogSetupItem(d->widget, d); for (ptr = list; ptr; ptr = g_list_next(ptr)) { path = (GtkTreePath *) ptr->data; ary = gtk_tree_path_get_indices(path); if (ary == NULL) break; list_store_select_nth(d->drawlist, ary[0] - 1); } } g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } static void SwitchDialogDown(GtkWidget *w, gpointer client_data) { GtkTreeSelection *selected; GList *list, *ptr; struct SwitchDialog *d; int k, num, modified, *ary; GtkTreePath *path; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->drawlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); if (list == NULL) { return; } num = list_store_get_num(d->drawlist); modified = FALSE; for (ptr = g_list_last(list); ptr; ptr = g_list_previous(ptr)) { int i; path = (GtkTreePath *) ptr->data; ary = gtk_tree_path_get_indices(path); if (ary == NULL) break; i = ary[0]; if (i >= num - 1) { break; } k = arraynget_int(&(d->idrawrable), i); arrayndel(&(d->idrawrable), i); i++; arrayins(&(d->idrawrable), &k, i); modified = TRUE; } if (modified) { SwitchDialogSetupItem(d->widget, d); for (ptr = g_list_last(list); ptr; ptr = g_list_previous(ptr)) { path = (GtkTreePath *) ptr->data; ary = gtk_tree_path_get_indices(path); if (ary == NULL) break; list_store_select_nth(d->drawlist, ary[0] + 1); } } g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } static void SwitchDialogTop(GtkWidget *w, gpointer client_data) { GtkTreeSelection *selected; GList *list; struct SwitchDialog *d; int i, num = 0; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->drawlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); if (list) { num = g_list_length(list); g_list_foreach(list, switch_dialog_top_cb, d); g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } SwitchDialogSetupItem(d->widget, d); for (i = 0; i < num; i++) { list_store_select_nth(d->drawlist, i); } } static void SwitchDialogLast(GtkWidget *w, gpointer client_data) { struct SwitchDialog *d; GtkTreeSelection *selected; GList *list; int n, i, num = 0; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->drawlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); if (list) { num = g_list_length(list); list = g_list_reverse(list); g_list_foreach(list, switch_dialog_last_cb, d); g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } SwitchDialogSetupItem(d->widget, d); n = list_store_get_num(d->drawlist); for (i = 0; i < num; i++) { list_store_select_nth(d->drawlist, n - i - 1); } } static void switch_dialog_remove_cb(gpointer data, gpointer user_data) { GtkTreePath *path; int *ary; struct SwitchDialog *d; path = (GtkTreePath *) data; d = (struct SwitchDialog *) user_data; ary = gtk_tree_path_get_indices(path); if (! ary) return; arrayndel(&(d->idrawrable), ary[0]); } static void SwitchDialogRemove(GtkWidget *w, gpointer client_data) { struct SwitchDialog *d; GtkTreeSelection *selected; GList *list; d = (struct SwitchDialog *) client_data; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->drawlist)); list = gtk_tree_selection_get_selected_rows(selected, NULL); if (list) { list = g_list_reverse(list); g_list_foreach(list, switch_dialog_remove_cb, d); g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } SwitchDialogSetupItem(d->widget, d); set_drawlist_btn_state(d, FALSE); } static gboolean drawlist_sel_cb(GtkTreeSelection *sel, gpointer user_data) { struct SwitchDialog *d; d = (struct SwitchDialog *) user_data; if (! d->btn_lock) { int n; n = gtk_tree_selection_count_selected_rows(sel); set_drawlist_btn_state(d, n); } return FALSE; } static gboolean objlist_sel_cb(GtkTreeSelection *sel, gpointer user_data) { struct SwitchDialog *d; d = (struct SwitchDialog *) user_data; if (! d->btn_lock) { int n; n = gtk_tree_selection_count_selected_rows(sel); set_objlist_btn_state(d, n); } return FALSE; } static void SwitchDialogSetup(GtkWidget *wi, void *data, int makewidget) { GtkTreeIter iter; struct SwitchDialog *d; int num2, num1, j, k, *obj_check; char **buf; static n_list_store list[] = { {N_("Object"), G_TYPE_STRING, TRUE, FALSE, NULL}, }; d = (struct SwitchDialog *) data; if (makewidget) { GtkWidget *w, *hbox, *vbox, *vbox2, *label, *frame; GtkTreeSelection *sel; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); label = gtk_label_new_with_mnemonic(_("_Draw order")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 4); w = list_store_create(sizeof(list) / sizeof(*list), list); list_store_set_selection_mode(w, GTK_SELECTION_MULTIPLE); d->drawlist = w; gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); g_signal_connect(sel, "changed", G_CALLBACK(drawlist_sel_cb), d); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), w); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_Add")); set_button_icon(w, "list-add"); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogAdd), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->add = w; w = gtk_button_new_with_mnemonic(_("_Insert")); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogInsert), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->ins = w; w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_button_new_with_mnemonic(_("_Top")); set_button_icon(w, "go-top"); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogTop), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->top =w; w = gtk_button_new_with_mnemonic(_("_Up")); set_button_icon(w, "go-up"); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogUp), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->up = w; w = gtk_button_new_with_mnemonic(_("_Down")); set_button_icon(w, "go-down"); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogDown), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->down = w; w = gtk_button_new_with_mnemonic(_("_Bottom")); set_button_icon(w, "go-bottom"); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogLast), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->bottom = w; w = gtk_button_new_with_mnemonic(_("_Remove")); set_button_icon(w, "list-remove"); g_signal_connect(w, "clicked", G_CALLBACK(SwitchDialogRemove), d); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->del = w; vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_end(GTK_BOX(vbox2), vbox, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); label = gtk_label_new_with_mnemonic(_("_Objects")); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 4); w = list_store_create(sizeof(list) / sizeof(*list), list); list_store_set_selection_mode(w, GTK_SELECTION_MULTIPLE); d->objlist = w; gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(w)); g_signal_connect(sel, "changed", G_CALLBACK(objlist_sel_cb), d); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), w); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); d->btn_lock = FALSE; } menuadddrawrable(chkobject("draw"), &(d->drawrable)); list_store_clear(d->objlist); num2 = arraynum(&(d->drawrable)); for (j = 0; j < num2; j++) { buf = (char **) arraynget(&(d->drawrable), j); list_store_append(d->objlist, &iter); list_store_set_string(d->objlist, &iter, 0, _(*buf)); } num1 = arraynum(&(Menulocal.drawrable)); obj_check = g_malloc0(sizeof(*obj_check) * num2); if (obj_check == NULL) { return; } for (j = 0; j < num1; j++) { struct objlist *obj; buf = (char **) arraynget(&(Menulocal.drawrable), j); obj = chkobject(*buf); if (obj == NULL) { continue; } for (k = 0; k < num2; k++) { if (strcmp0(arraynget_str(&(d->drawrable), k), obj->name) == 0) { break; } } if (k != num2 && obj_check[k] == 0) { obj_check[k] = 1; arrayadd(&(d->idrawrable), &k); } } g_free(obj_check); SwitchDialogSetupItem(wi, d); set_objlist_btn_state(d, FALSE); set_drawlist_btn_state(d, FALSE); } static void SwitchDialogClose(GtkWidget *w, void *data) { struct SwitchDialog *d; d = (struct SwitchDialog *) data; if (d->ret == IDOK) { int num; arraydel2(&(Menulocal.drawrable)); num = arraynum(&(d->idrawrable)); if (num == 0) { menuadddrawrable(chkobject("draw"), &(Menulocal.drawrable)); } else { int j; for (j = 0; j < num; j++) { char **buf; buf = (char **) arraynget(&(d->drawrable), arraynget_int(&(d->idrawrable), j)); if ((*buf) != NULL) arrayadd2(&(Menulocal.drawrable), *buf); } } } arraydel2(&(d->drawrable)); arraydel(&(d->idrawrable)); } void SwitchDialog(struct SwitchDialog *data) { data->SetupWindow = SwitchDialogSetup; data->CloseWindow = SwitchDialogClose; arrayinit(&(data->drawrable), sizeof(char *)); arrayinit(&(data->idrawrable), sizeof(int)); } static void DirectoryDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct DirectoryDialog *d; char *cwd; d = (struct DirectoryDialog *) data; if (makewidget) { GtkWidget *w, *table; table = gtk_grid_new(); w = gtk_file_chooser_button_new(_("directory"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(w), TRUE); d->dir = w; add_widget_to_table(table, w, _("_Select Dir:"), TRUE, 0); w = gtk_label_new(_("Current Dir:")); gtk_widget_set_halign(w, GTK_ALIGN_START); g_object_set(w, "margin", GINT_TO_POINTER(4), NULL); gtk_grid_attach(GTK_GRID(table), w, 0, 1, 1, 1); w = gtk_label_new(""); gtk_label_set_ellipsize(GTK_LABEL(w), PANGO_ELLIPSIZE_START); d->dir_label = w; gtk_widget_set_hexpand(w, TRUE); gtk_widget_set_halign(w, GTK_ALIGN_START); g_object_set(w, "margin", GINT_TO_POINTER(4), NULL); gtk_grid_attach(GTK_GRID(table), w, 1, 1, 1, 1); gtk_box_pack_start(GTK_BOX(d->vbox), table, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } cwd = ngetcwd(); if (cwd) { gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(d->dir), cwd); gtk_label_set_text(GTK_LABEL(d->dir_label), cwd); g_free(cwd); } } static void DirectoryDialogClose(GtkWidget *w, void *data) { struct DirectoryDialog *d; char *s; d = (struct DirectoryDialog *) data; if (d->ret == IDCANCEL) return; s = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(d->dir)); if (s && strlen(s) > 0) { if (nchdir(s)) { ErrorMessage(); } } if (s) g_free(s); } void DirectoryDialog(struct DirectoryDialog *data) { data->SetupWindow = DirectoryDialogSetup; data->CloseWindow = DirectoryDialogClose; } static void set_directory_name(GtkFileChooserButton *widget, gpointer user_data) { char *path; path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget)); gtk_widget_set_tooltip_text(GTK_WIDGET(widget), path); if (path) { g_free(path); } } static void LoadDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct LoadDialog *d; d = (struct LoadDialog *) data; if (makewidget) { GtkWidget *w, *vbox; int j; vbox = gtk_grid_new(); w = gtk_check_button_new_with_mnemonic(_("_Expand included file")); d->expand_file = w; gtk_grid_attach(GTK_GRID(vbox), w, 0, 0, 2, 1); w = gtk_file_chooser_button_new(_("Expand directory"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(w), TRUE); g_signal_connect(w, "file-set", G_CALLBACK(set_directory_name), NULL); add_widget_to_table(vbox, w, _("expand _Directory:"), FALSE, 1); d->dir = w; w = combo_box_create(); add_widget_to_table(vbox, w, _("_Path:"), FALSE, 2); for (j = 0; LoadPathStr[j]; j++) { combo_box_append_text(w, _(LoadPathStr[j])); } d->load_path = w; gtk_box_pack_start(GTK_BOX(d->vbox), vbox, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->expand_file), d->expand); combo_box_set_active(d->load_path, d->loadpath); gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(d->dir), d->exdir); set_directory_name(GTK_FILE_CHOOSER_BUTTON(d->dir), NULL); } static void LoadDialogClose(GtkWidget *w, void *data) { struct LoadDialog *d; d = (struct LoadDialog *) data; if (d->ret == IDCANCEL) return; d->expand = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->expand_file)); if (d->exdir) { g_free(d->exdir); } d->exdir = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(d->dir)); d->loadpath = combo_box_get_active(d->load_path); } void LoadDialog(struct LoadDialog *data) { data->SetupWindow = LoadDialogSetup; data->CloseWindow = LoadDialogClose; data->expand = Menulocal.expand; if (data->exdir) { g_free(data->exdir); } data->exdir = g_strdup(Menulocal.expanddir); data->loadpath = Menulocal.loadpath; } static void SaveDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct SaveDialog *d; d = (struct SaveDialog *) data; if (makewidget) { GtkWidget *w, *vbox; int j; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = combo_box_create(); item_setup(vbox, w, _("_Path:"), FALSE); for (j = 0; pathchar[j] != NULL; j++) { combo_box_append_text(w, _(pathchar[j])); } d->path = w; w = gtk_check_button_new_with_mnemonic(_("_Include data file")); d->include_data = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_check_button_new_with_mnemonic(_("_Include merge file")); d->include_merge = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), vbox, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } combo_box_set_active(d->path, Menulocal.savepath); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->include_data), Menulocal.savewithdata); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->include_merge), Menulocal.savewithmerge); d->focus = d->include_data; } static void SaveDialogClose(GtkWidget *w, void *data) { int num; struct SaveDialog *d; d = (struct SaveDialog *) data; if (d->ret == IDCANCEL) return; num = combo_box_get_active(d->path); if (num >= 0) { d->Path = num; } *(d->SaveData) = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->include_data)); *(d->SaveMerge) = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->include_merge)); } void SaveDialog(struct SaveDialog *data, int *sdata, int *smerge) { data->SetupWindow = SaveDialogSetup; data->CloseWindow = SaveDialogClose; data->SaveData = sdata; data->SaveMerge = smerge; } void CmGraphNewMenu(void *w, gpointer client_data) { int sel; if (Menulock || Globallock) return; if (!CheckSave()) return; DeleteDrawable(); CmGraphPage(NULL, GINT_TO_POINTER(TRUE)); sel = GPOINTER_TO_INT(client_data); switch (sel) { case MenuIdGraphNewFrame: CmAxisNewFrame(FALSE); break; case MenuIdGraphNewSection: CmAxisNewSection(FALSE); break; case MenuIdGraphNewCross: CmAxisNewCross(FALSE); break; case MenuIdGraphAllClear: default: break; } SetFileName(NULL); set_axis_undo_button_sensitivity(FALSE); reset_graph_modified(); CmViewerDraw(NULL, GINT_TO_POINTER(TRUE)); UpdateAll2(NULL, FALSE); InfoWinClear(); menu_clear_undo(); } void CmGraphLoad(void *w, gpointer client_data) { char *file, *cwd; if (Menulock || Globallock) return; if (!CheckSave()) return; cwd = ngetcwd(); if (nGetOpenFileName(TopLevel, _("Load NGP file"), "ngp", &(Menulocal.graphloaddir), NULL, &file, TRUE, Menulocal.changedirectory) != IDOK) { if (cwd) { g_free(cwd); } return; } if (LoadNgpFile(file, Menulocal.scriptconsole, "-f") && cwd) { nchdir(cwd); } if (cwd) { g_free(cwd); } g_free(file); } void CmGraphSave(void *w, gpointer client_data) { if (Menulock || Globallock) return; GraphSave(FALSE); } void CmGraphOverWrite(void *w, gpointer client_data) { if (Menulock || Globallock) return; GraphSave(TRUE); } void CmGraphSwitch(void *w, gpointer client_data) { if (Menulock || Globallock) return; SwitchDialog(&DlgSwitch); if (DialogExecute(TopLevel, &DlgSwitch) == IDOK) { set_graph_modified_gra(); ChangePage(); } } void CmGraphPage(void *w, gpointer client_data) { int new_graph; new_graph = GPOINTER_TO_INT(client_data); if (Menulock || Globallock) return; PageDialog(&DlgPage, new_graph); if (DialogExecute(TopLevel, &DlgPage) == IDOK) { SetPageSettingsToGRA(); ChangePage(); GetPageSettingsFromGRA(); if (! new_graph) { set_graph_modified_gra(); } } } void CmGraphDirectory(void *w, gpointer client_data) { if (Menulock || Globallock) return; DirectoryDialog(&DlgDirectory); DialogExecute(TopLevel, &DlgDirectory); } void CmGraphShell(void *w, gpointer client_data) { struct objlist *obj, *robj, *shell; N_VALUE *inst; int idn; if (Menulock || Globallock) return; menu_lock(TRUE); menu_save_undo(UNDO_TYPE_SHLL, NULL); obj = Menulocal.obj; inst = Menulocal.inst; idn = getobjtblpos(obj, "_evloop", &robj); registerevloop(chkobjectname(obj), "_evloop", robj, idn, inst, NULL); if ((shell = chkobject("shell")) != NULL) { int allocnow, n; n = chkobjlastinst(shell); if (n < 0) { newobj(shell); } allocnow = allocate_console(); exeobj(shell, "shell", 0, 0, NULL); free_console(allocnow); } unregisterevloop(robj, idn, inst); menu_lock(FALSE); set_graph_modified(); UpdateAll(NULL); } void CmGraphQuit(void *w, gpointer client_data) { if (Menulock || Globallock) return; QuitGUI(); } int chdir_to_ngp(const char *fname) { char *path; int r; path = g_path_get_dirname(fname); if (path == NULL) { return 0; } r = nchdir(path); g_free(path); return r; } void CmGraphHistory(GtkRecentChooser *w, gpointer client_data) { char *uri, *fname, *cwd; if (Menulock || Globallock) return; uri = gtk_recent_chooser_get_current_uri(w); if (uri == NULL) { return; } fname = g_filename_from_uri(uri, NULL, NULL); g_free(uri); if (fname == NULL) { return; } if (!CheckSave()) { g_free(fname); return; } cwd = ngetcwd(); if (chdir_to_ngp(fname)) { ErrorMessage(); g_free(fname); if (cwd) { g_free(cwd); } return; } if (LoadNgpFile(fname, Menulocal.scriptconsole, "-f") && cwd) { nchdir(cwd); } if (cwd) { g_free(cwd); } g_free(fname); } void CmHelpAbout(void *w, gpointer client_data) { struct objlist *obj; char *web, *copyright; if (Menulock || Globallock) return; if ((obj = chkobject("system")) == NULL) return; getobj(obj, "copyright", 0, 0, NULL, ©right); getobj(obj, "web", 0, 0, NULL, &web); gtk_show_about_dialog(GTK_WINDOW(TopLevel), "program-name", PACKAGE, "copyright", copyright, "version", VERSION, "website", web, "license-type", GTK_LICENSE_GPL_2_0, "wrap-license", TRUE, "authors", Auther, "translator-credits", Translator, "documenters", Documenter, "comments", _("Ngraph is the program to create scientific 2-dimensional graphs for researchers and engineers."), NULL); } void CmHelpDemo(void *w, gpointer client_data) { struct objlist *obj; char *demo_file, *data_dir; if (Menulock || Globallock) return; obj = chkobject("system"); if (obj == NULL) { return; } getobj(obj, "data_dir", 0, 0, NULL, &data_dir); if (data_dir == NULL) { return; } if (!CheckSave()) { return; } demo_file = g_strdup_printf("%s/demo/demo.ngp", data_dir); if (demo_file == NULL) { return; } LoadNgpFile(demo_file, Menulocal.scriptconsole, "-f"); g_free(demo_file); } void CmHelpHelp(void *w, gpointer client_data) { char *cmd; if (Menulock || Globallock) return; if (Menulocal.help_browser == NULL) return; cmd = g_strdup_printf("%s \"%s/%s\"", Menulocal.help_browser, DOCDIR, Menulocal.help_file); system_bg(cmd); g_free(cmd); } ngraph-gtk-6.09.05/src/gtk/x11info.h0000644000175000017500000000207313351432267013700 00000000000000/* * $Id: x11info.h,v 1.2 2009-07-08 10:13:03 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ void InfoWinClear(void); void InfoWinUpdate(int clear); void InfoWinDrawInfoText(const char *str); void InfoWinSetFont(char *font); GtkWidget *InfoWinCreate(struct SubWin *d); ngraph-gtk-6.09.05/src/gtk/gtk_liststore.h0000644000175000017500000001425114110441553015301 00000000000000/* * $Id: gtk_liststore.h,v 1.11 2009-08-19 06:44:16 hito Exp $ */ #ifndef _GTK_LISTSTORE_HEADER #define _GTK_LISTSTORE_HEADER #include "gtk_common.h" #include "object.h" enum TOGGLE_TYPE { TOGGLE_NONE, TOGGLE_CHECK, TOGGLE_RADIO, }; enum OBJECT_COLUMN_TYPE { OBJECT_COLUMN_TYPE_TOGGLE, OBJECT_COLUMN_TYPE_STRING, OBJECT_COLUMN_TYPE_PIXBUF, OBJECT_COLUMN_TYPE_INT, OBJECT_COLUMN_TYPE_ENUM, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, OBJECT_COLUMN_TYPE_TOGGLE_IS_RADIO, OBJECT_COLUMN_TYPE_PIXBUF_VISIBLE, OBJECT_COLUMN_TYPE_NUM, }; typedef struct _list_store { char *title; GType type; gboolean visible, editable; char *name; int min, max, inc, page; PangoEllipsizeMode ellipsize; gulong edited_id; } n_list_store; void tree_view_set_tooltip_column(GtkTreeView *tree_view, gint column); void tree_view_set_no_expand_column(GtkWidget *tview, const int *columns, int n); void init_object_combo_box(GtkWidget *cbox); void add_separator_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent); void add_line_style_item_to_cbox(GtkTreeStore *list, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id); void add_bool_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id, const char *title); void add_mark_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id); void add_enum_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id); void add_font_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, struct objlist *obj, const char *field, int id); void add_text_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id, int enum_id, const char *title, enum TOGGLE_TYPE type, int active); void add_font_style_combo_item_to_cbox(GtkTreeStore *list, GtkTreeIter *iter, GtkTreeIter *parent, int column_id_bold, int column_id_italic, struct objlist *obj, const char *field, int id); GtkWidget *list_store_create(int n, n_list_store *list); void list_store_set_val(GtkWidget *w, GtkTreeIter *iter, int col, GType type, void *ptr); void list_store_set_sort_all(GtkWidget *tview); void list_store_set_sort_column(GtkWidget *tview, int col); void list_store_set_align(GtkWidget *tview, int col, double align); int list_store_get_int(GtkWidget *w, GtkTreeIter *iter, int col); void list_store_set_int(GtkWidget *w, GtkTreeIter *iter, int col, int v); int list_store_path_get_int(GtkWidget *w, GtkTreePath *path, int col, int *val); void list_store_set_double(GtkWidget *w, GtkTreeIter *iter, int col, double v); void tree_store_set_double(GtkWidget *w, GtkTreeIter *iter, int col, double v); char *list_store_get_string(GtkWidget *w, GtkTreeIter *iter, int col); void list_store_set_string(GtkWidget *w, GtkTreeIter *iter, int col, const char *v); gboolean list_store_get_boolean(GtkWidget *w, GtkTreeIter *iter, int col); void list_store_set_boolean(GtkWidget *w, GtkTreeIter *iter, int col, int v); void list_store_path_set_string(GtkWidget *w, GtkTreePath *path, int col, const char *v); char *list_store_path_get_string(GtkWidget *w, GtkTreePath *path, int col); gboolean list_store_get_iter_first(GtkWidget *w, GtkTreeIter *iter); gboolean list_store_iter_next(GtkWidget *w, GtkTreeIter *iter); void list_store_append(GtkWidget *w, GtkTreeIter *iter); void list_store_clear(GtkWidget *w); gboolean list_store_get_selected_iter(GtkWidget *w, GtkTreeIter *iter); int list_store_get_selected_int(GtkWidget *w, int col); void list_store_select_int(GtkWidget *w, int col, int id); char *list_store_get_selected_string(GtkWidget *w, int col); int list_store_get_num(GtkWidget *w); void list_store_set_selection_mode(GtkWidget *w, GtkSelectionMode mode); void list_store_select_nth(GtkWidget *w, int n); void list_store_select_iter(GtkWidget *w, GtkTreeIter *iter); void list_store_multi_select_nth(GtkWidget *w, int n, int m); gboolean list_store_get_selected_nth(GtkWidget *w, int *n); int list_store_get_selected_index(GtkWidget *w); void list_store_set_pixbuf(GtkWidget *w, GtkTreeIter *iter, int col, GdkPixbuf *v); GdkPixbuf *list_store_get_pixbuf(GtkWidget *w, GtkTreeIter *iter, int col); void list_store_select_all(GtkWidget *w); GtkWidget *tree_store_create(int n, n_list_store *list); void tree_store_append(GtkWidget *w, GtkTreeIter *iter, GtkTreeIter *parent); void tree_store_prepend(GtkWidget *w, GtkTreeIter *iter, GtkTreeIter *parent); gboolean tree_store_get_iter_children(GtkWidget *w, GtkTreeIter *child, GtkTreeIter *iter); gboolean tree_store_get_selected_nth(GtkWidget *w, int *n, int *m); void tree_store_select_nth(GtkWidget *w, int n, int m); void tree_store_clear(GtkWidget *w); int tree_store_get_child_num(GtkWidget *w, GtkTreeIter *iter); void tree_store_set_int(GtkWidget *w, GtkTreeIter *iter, int col, int v); void tree_store_set_string(GtkWidget *w, GtkTreeIter *iter, int col, const char *v); void tree_store_set_boolean(GtkWidget *w, GtkTreeIter *iter, int col, int v); void tree_store_set_val(GtkWidget *w, GtkTreeIter *iter, int col, GType type, void *ptr); void list_store_select_all_cb(GtkButton *w, gpointer client_data); void list_store_remove_selected_cb(GtkWidget *w, gpointer client_data); void tree_store_selected_toggle_expand(GtkWidget *w); int tree_view_get_selected_row_int_from_path(GtkWidget *view, gchar *path, GtkTreeIter *iter, int col); #define tree_store_get_int list_store_get_int #define tree_store_get_boolean list_store_get_boolean #define tree_store_get_string list_store_get_string #define tree_store_get_iter_first list_store_get_iter_first #define tree_store_iter_next list_store_iter_next #define tree_store_get_selected_iter list_store_get_selected_iter #define tree_store_set_selection_mode list_store_set_selection_mode #define tree_store_path_get_string list_store_path_get_string #define tree_store_set_sort_all list_store_set_sort_all #define tree_store_set_sort_column list_store_set_sort_column #define tree_store_select_all_cb list_store_select_all_cb #define tree_store_set_align list_store_set_align #endif ngraph-gtk-6.09.05/src/gtk/x11gui.h0000644000175000017500000000701413213743342013525 00000000000000/* * $Id: x11gui.h,v 1.15 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef GTK_GUI_HEADER #define GTK_GUI_HEADER #define RESPONS_OK 1 #define RESPONS_YESNOCANCEL 2 #define RESPONS_YESNO 3 #define RESPONS_OKCANCEL 4 #define RESPONS_ERROR 5 #ifdef IDOK #undef IDOK #undef IDCANCEL #undef IDYES #undef IDNO #undef IDCLOSE #endif /* IDOK */ #define IDLOOP 0 #define IDOK 1 #define IDCANCEL 2 #define IDYES 3 #define IDNO 4 #define IDDELETE 101 #define IDFAPPLY 102 #define IDCOPY 103 #define IDLOAD 104 #define IDSAVE 105 #define IDCLOSE 106 #define IDSALL 201 #define IDCOPYALL 202 #define DPI_MAX 2540 #define DEFAULT_DPI 70 typedef struct _tpoint { int x, y; } TPoint; int DialogExecute(GtkWidget *parent, void *dialog); void message_beep(GtkWidget *parent); int markup_message_box(GtkWidget * parent, const char *message, const char *title, int mode, int markup); int message_box(GtkWidget *parent, const char *message, const char *title, int yesno); int DialogInput(GtkWidget *parent, const char *title, const char *mes, const char *init_str, struct narray *buttons, int *res_btn, char **s, int *x, int *y); int DialogRadio(GtkWidget *parent, const char *title, const char *caption, struct narray *ary, struct narray *buttons, int *res_btn, int *r, int *x, int *y); int DialogButton(GtkWidget *parent, const char *title, const char *caption, struct narray *array, int *x, int *y); int DialogCheck(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int *r, int *x, int *y); int DialogCombo(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int sel, char **r, int *x, int *y); int DialogComboEntry(GtkWidget *parent, const char *title, const char *caption, struct narray *array, struct narray *buttons, int *res_btn, int sel, char **r, int *x, int *y); int DialogSpinEntry(GtkWidget *parent, const char *title, const char *caption, double min, double max, double inc, struct narray *buttons, int *res_btn, double *r, int *x, int *y); int nGetOpenFileNameMulti(GtkWidget * parent, char *title, char *defext, char **initdir, const char *initfil, char ***file, int chd); int nGetOpenFileName(GtkWidget * parent, char *title, char *defext, char **initdir, const char *initfil, char **file, int exist, int chd); int nGetSaveFileName(GtkWidget * parent, char *title, char *defext, char **initdir, const char *initfil, char **file, int overwrite, int chdir); void get_window_geometry(GtkWidget *win, gint *x, gint *y, gint *w, gint *h); void set_sensitivity_by_check_instance(GtkWidget *widget, gpointer user_data); int ndialog_run(GtkWidget *dlg); #endif ngraph-gtk-6.09.05/src/gtk/x11axis.h0000644000175000017500000000367714142161773013724 00000000000000/* * $Id: x11axis.h,v 1.3 2009-05-14 10:25:27 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ char *AxisCB(struct objlist *obj, int id); void CmAxisNewFrame(int use_presettings); void CmAxisNewSection(int use_presettings); void CmAxisNewCross(int use_presettings); void CmAxisAddFrame(void *w, gpointer client_data); void CmAxisAddSection(void *w, gpointer client_data); void CmAxisAddCross(void *w, gpointer client_data); void CmAxisAddSingle(void *w, gpointer client_data); void CmAxisUpdate(void *w, gpointer client_data); void CmAxisDel(void *w, gpointer client_data); void CmAxisZoom(void *w, gpointer client_data); void CmAxisClear(void *w, gpointer client_data); void CmAxisScaleUndo(void *w, gpointer client_data); void CmAxisGridNew(void *w, gpointer client_data); void CmAxisGridDel(void *w, gpointer client_data); void CmAxisGridUpdate(void *w, gpointer client_data); void CmOptionGridDef(void *w, gpointer client_data); GtkWidget *create_axis_list(struct SubWin *d); void axis_scale_push(struct objlist *obj, int id); void AxisWinUpdate(struct obj_list_data *data, int clear, int draw); int axis_check_history(void); void update_viewer_axisgrid(void); ngraph-gtk-6.09.05/src/gtk/x11bitmp.h0000644000175000017500000000545213716736105014067 00000000000000/* * $Id: x11bitmp.h,v 1.5 2009-01-07 02:39:34 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include "ioutil.h" #include "dir_defs.h" #define NGRAPH_ICON_PATH RESOURCE_PATH "/pixmaps" #define NGRAPH_ALIGN_B_ICON "ngraph_align_b" #define NGRAPH_ALIGN_HC_ICON "ngraph_align_hc" #define NGRAPH_ALIGN_L_ICON "ngraph_align_l" #define NGRAPH_ALIGN_R_ICON "ngraph_align_r" #define NGRAPH_ALIGN_T_ICON "ngraph_align_t" #define NGRAPH_ALIGN_VC_ICON "ngraph_align_vc" #define NGRAPH_MATH_ICON "ngraph_math" #define NGRAPH_SVG_ICON_FILE RESOURCE_PATH "/pixmaps/ngraph.svg" #define NGRAPH_ICON_FILE RESOURCE_PATH "/pixmaps/ngraph_icon.png" #define NGRAPH_ICON64_FILE RESOURCE_PATH "/pixmaps/ngraph_icon64.png" #define NGRAPH_DRAW_ICON "ngraph_draw-symbolic" #define NGRAPH_POINT_ICON "ngraph_point-symbolic" #define NGRAPH_LEGENDPOINT_ICON "ngraph_legendpoint-symbolic" #define NGRAPH_AXISPOINT_ICON "ngraph_axispoint-symbolic" #define NGRAPH_DATAPOINT_ICON "ngraph_datapoint-symbolic" #define NGRAPH_TEXT_ICON "ngraph_text-symbolic" #define NGRAPH_ARC_ICON "ngraph_arc-symbolic" #define NGRAPH_GAUSS_ICON "ngraph_gauss-symbolic" #define NGRAPH_LINE_ICON "ngraph_line-symbolic" #define NGRAPH_MARK_ICON "ngraph_mark-symbolic" #define NGRAPH_RECT_ICON "ngraph_rect-symbolic" #define NGRAPH_CROSS_ICON "ngraph_cross-symbolic" #define NGRAPH_FRAME_ICON "ngraph_frame-symbolic" #define NGRAPH_SECTION_ICON "ngraph_section-symbolic" #define NGRAPH_SINGLE_ICON "ngraph_single-symbolic" #define NGRAPH_SCALE_ICON "ngraph_scale-symbolic" #define NGRAPH_TRIMMING_ICON "ngraph_trimming-symbolic" #define NGRAPH_EVAL_ICON "ngraph_eval-symbolic" #define NGRAPH_ZOOM_ICON "ngraph_zoom-symbolic" #define NGRAPH_AXISWIN_ICON "ngraph_axiswin-symbolic" #define NGRAPH_FILEWIN_ICON "ngraph_filewin-symbolic" #define NGRAPH_MERGEWIN_ICON "ngraph_mergewin-symbolic" #define NGRAPH_PARAMETER_ICON "ngraph_parameter-symbolic" #define NGRAPH_EXCHANGE_ICON "ngraph_exchange-symbolic" #define NGRAPH_LINK_ICON "ngraph_link-symbolic" ngraph-gtk-6.09.05/src/gtk/Makefile.am0000644000175000017500000001376714122071430014276 00000000000000NGRAPH_ICONS = data/pixmaps/ngraph_align_b.png \ data/pixmaps/ngraph_align_hc.png \ data/pixmaps/ngraph_align_l.png \ data/pixmaps/ngraph_align_r.png \ data/pixmaps/ngraph_align_t.png \ data/pixmaps/ngraph_align_vc.png data/pixmaps/ngraph_icon.png \ data/pixmaps/ngraph_icon64.png data/pixmaps/ngraph_math.png \ data/pixmaps/none_begin-symbolic.svg \ data/pixmaps/none_end-symbolic.svg \ data/pixmaps/arrow_begin-symbolic.svg \ data/pixmaps/arrow_end-symbolic.svg \ data/pixmaps/wave_begin-symbolic.svg \ data/pixmaps/wave_end-symbolic.svg \ data/pixmaps/mark_begin-symbolic.svg \ data/pixmaps/mark_end-symbolic.svg \ data/pixmaps/bar_begin-symbolic.svg \ data/pixmaps/bar_end-symbolic.svg \ data/pixmaps/stroke_fill_0-symbolic.svg \ data/pixmaps/stroke_fill_1-symbolic.svg \ data/pixmaps/stroke_fill_2-symbolic.svg \ data/pixmaps/stroke_fill_3-symbolic.svg \ data/pixmaps/stroke_fill_4-symbolic.svg \ data/pixmaps/stroke_fill_5-symbolic.svg \ data/pixmaps/stroke_fill_6-symbolic.svg \ data/pixmaps/stroke_fill_7-symbolic.svg \ data/pixmaps/join_bevel-symbolic.svg \ data/pixmaps/join_miter-symbolic.svg \ data/pixmaps/join_round-symbolic.svg data/pixmaps/ngraph.svg \ data/pixmaps/ngraph_draw-symbolic.svg \ data/pixmaps/ngraph_draw-attention-symbolic.svg \ data/pixmaps/ngraph_eval-symbolic.svg \ data/pixmaps/ngraph_line-symbolic.svg \ data/pixmaps/ngraph_single-symbolic.svg \ data/pixmaps/ngraph_arc-symbolic.svg \ data/pixmaps/ngraph_filewin-symbolic.svg \ data/pixmaps/ngraph_mark-symbolic.svg \ data/pixmaps/ngraph_text-symbolic.svg \ data/pixmaps/ngraph_axispoint-symbolic.svg \ data/pixmaps/ngraph_frame-symbolic.svg \ data/pixmaps/ngraph_mergewin-symbolic.svg \ data/pixmaps/ngraph_trimming-symbolic.svg \ data/pixmaps/ngraph_axiswin-symbolic.svg \ data/pixmaps/ngraph_gauss-symbolic.svg \ data/pixmaps/ngraph_point-symbolic.svg \ data/pixmaps/ngraph_zoom-symbolic.svg \ data/pixmaps/ngraph_rect-symbolic.svg \ data/pixmaps/ngraph_cross-symbolic.svg \ data/pixmaps/ngraph_legendpoint-symbolic.svg \ data/pixmaps/ngraph_scale-symbolic.svg \ data/pixmaps/ngraph_datapoint-symbolic.svg \ data/pixmaps/ngraph_section-symbolic.svg \ data/pixmaps/ngraph_exchange-symbolic.svg \ data/pixmaps/ngraph_link-symbolic.svg \ data/pixmaps/linewidth_002-symbolic.svg \ data/pixmaps/linewidth_004-symbolic.svg \ data/pixmaps/linewidth_008-symbolic.svg \ data/pixmaps/linewidth_016-symbolic.svg \ data/pixmaps/linewidth_032-symbolic.svg \ data/pixmaps/linewidth_064-symbolic.svg \ data/pixmaps/linewidth_128-symbolic.svg \ data/pixmaps/ngraph_parameter-symbolic.svg EXTRA_DIST = dir_defs.h.in data/css/ngraph.css \ data/gtk/menus-common.ui.in data/gtk/menus-common-win.ui.in \ data/gtk/menus-common.ui.osx data/gtk/menus-appmenu.ui \ data/gtk/help-overlay.ui data/gtk/menus-tool.ui \ create_completion_info.rb completion_info_functions.txt \ completion_info_constants.txt data/ngraphui.resources.xml.in \ data/ngraphui.resources.xml.osx $(NGRAPH_ICONS) AM_CPPFLAGS = -DLOCALEDIR=\""@localedir@"\" noinst_LTLIBRARIES = libngraphui.la nodist_libngraphui_la_SOURCES = dir_defs.h ngraphui.resources.c libngraphui_la_SOURCES = gtk_common.h gtk_combo.c gtk_combo.h \ gtk_entry_completion.c gtk_entry_completion.h gtk_liststore.c \ gtk_liststore.h gtk_subwin.c gtk_subwin.h ogra2x11.c \ ogra2cairo.c ogra2emf.c ogra2cairo.h ogra2cairofile.c \ ogra2gtkprint.c ogra2cairofile.h ogra2x11.h ogra2gdk.c \ ogra2gdk.h ox11dlg.c ox11menu.c ox11menu.h x11axis.c \ x11axis.h x11bitmp.h x11commn.c x11commn.h x11cood.c \ x11cood.h x11dialg.c x11dialg.h x11file.c x11file.h \ x11graph.c x11graph.h x11gui.c x11gui.h x11info.c x11info.h \ x11lgnd.c x11lgnd.h x11lgndx.c x11menu.c x11menu.h x11merge.c \ x11merge.h x11opt.c x11opt.h x11opt_proto.h x11print.c \ x11print.h x11view.c x11view.h gtk_widget.c gtk_widget.h \ gtk_ruler.c gtk_ruler.h init.c init.h gtk_action.c \ gtk_action.h sourcecompletionwords.c sourcecompletionwords.h \ completion_info.c completion_info.h completion_info_data.c \ gtk_presettings.c gtk_presettings.h x11parameter.c \ x11parameter.h libngraph_cflags = if OS_WIN32 UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.in MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common-win.ui.in else if OS_OSX UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.osx MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common.ui.osx libngraph_cflags += $(MAC_INTEGRATION_CFLAGS) else UI_RESOURCES_SOURCE = $(srcdir)/data/ngraphui.resources.xml.in MENU_UI_SOURCE = $(srcdir)/data/gtk/menus-common.ui.in endif endif uidir = data/gtk data/ngraphui.resources.xml: $(UI_RESOURCES_SOURCE) $(MKDIR_P) $(uidir) cp $< $@ $(uidir)/menus-common.ui: $(MENU_UI_SOURCE) $(MKDIR_P) $(uidir) cp $< $@ ngraphui.resources.c: data/ngraphui.resources.xml $(uidir)/menus-common.ui $(srcdir)/data/gtk/menus-tool.ui $(srcdir)/data/css/ngraph.css $(srcdir)/data/gtk/help-overlay.ui $(uidir)/menus-appmenu.ui $(NGRAPH_ICONS) $(GLIB_COMPILE_RESOURCES) --target=$@ --generate-source --sourcedir $(srcdir)/data --sourcedir $(builddir)/data $< BUILT_SOURCES = ${nodist_libngraphui_la_SOURCES} ngraphconfdir = $(sysconfdir)/$(PACKAGE) pixmapdir = $(datadir)/pixmaps/$(PACKAGE) dir_defs.h: dir_defs.h.in $(top_srcdir)/pathconv.sh $(SHELL) $(top_srcdir)/pathconv.sh $(srcdir)/dir_defs.h.in completion_info_data.c: $(srcdir)/completion_info_functions.txt $(srcdir)/completion_info_constants.txt $(srcdir)/create_completion_info.rb ruby $(srcdir)/create_completion_info.rb $(srcdir)/completion_info_functions.txt $(srcdir)/completion_info_constants.txt completion_info_data.c libngraphui_la_CFLAGS = $(GTK_CFLAGS) $(libngraph_cflags) -I$(top_builddir) -I$(builddir) -I$(srcdir)/.. -I$(srcdir)/../math $(GTKSOURCEVIEW_CFLAGS) libngraphui_la_LDFLAGS = $(GTKSOURCEVIEW_LIBS) CLEANFILES = dir_defs.h $(builddir)/data/gtk/menus-common.ui $(builddir)/data/ngraphui.resources.xml $(BUILT_SOURCES) ngraph-gtk-6.09.05/src/gtk/ogra2cairofile.h0000644000175000017500000000063613070106167015301 00000000000000#ifndef _O_GRA2CAIROFILE_HEADER #define _O_GRA2CAIROFILE_HEADER #include #include #include #include enum surface_type_id { TYPE_PS2, TYPE_PS3, TYPE_EPS2, TYPE_EPS3, TYPE_PDF, TYPE_SVG1_1, TYPE_SVG1_2, TYPE_PNG, #ifdef CAIRO_HAS_WIN32_SURFACE TYPE_EMF, TYPE_CLIPBOARD, #endif /* CAIRO_HAS_WIN32_SURFACE */ }; #endif ngraph-gtk-6.09.05/src/gtk/gtk_widget.h0000644000175000017500000000723114054561212014536 00000000000000#ifndef GTK_WIDGET_HEADER #define GTK_WIDGET_HEADER #include "object.h" #define SPIN_ENTRY_MAX 1000000 #define NUM_ENTRY_WIDTH 12 enum SPIN_BUTTON_TYPE { SPIN_BUTTON_TYPE_WIDTH, SPIN_BUTTON_TYPE_LENGTH, SPIN_BUTTON_TYPE_POSITION, SPIN_BUTTON_TYPE_ANGLE, SPIN_BUTTON_TYPE_POINT, SPIN_BUTTON_TYPE_SPACE_POINT, SPIN_BUTTON_TYPE_PERCENT, SPIN_BUTTON_TYPE_INT, SPIN_BUTTON_TYPE_UINT, SPIN_BUTTON_TYPE_NUM, SPIN_BUTTON_TYPE_NATURAL, SPIN_BUTTON_TYPE_CUSTOM, }; enum OBJ_FIELD_COLOR_TYPE { OBJ_FIELD_COLOR_TYPE_0, OBJ_FIELD_COLOR_TYPE_1, OBJ_FIELD_COLOR_TYPE_2, OBJ_FIELD_COLOR_TYPE_FILL, OBJ_FIELD_COLOR_TYPE_STROKE, OBJ_FIELD_COLOR_TYPE_AXIS_BASE, OBJ_FIELD_COLOR_TYPE_AXIS_GAUGE, OBJ_FIELD_COLOR_TYPE_AXIS_NUM, }; enum SELECT_OBJ_COLOR_RESULT { SELECT_OBJ_COLOR_DIFFERENT, SELECT_OBJ_COLOR_SAME, SELECT_OBJ_COLOR_ERROR, SELECT_OBJ_COLOR_CANCEL, }; enum WIDGET_MARGIN { WIDGET_MARGIN_LEFT = 1, WIDGET_MARGIN_RIGHT = 2, WIDGET_MARGIN_TOP = 4, WIDGET_MARGIN_BOTTOM = 8, }; GtkWidget *create_spin_entry_type(enum SPIN_BUTTON_TYPE type, int set_default_size, int set_default_action); GtkWidget *create_spin_entry(int min, int max, int inc, int set_default_size, int set_default_action); void set_button_icon(GtkWidget *w, const char *icon_name); void spin_entry_set_val(GtkWidget *entry, int val); int spin_entry_get_val(GtkWidget *entry); void spin_entry_set_range(GtkWidget *w, int min, int max); void spin_entry_set_inc(GtkWidget *w, int inc, int page); char *entry_get_filename(GtkWidget *w); int entry_set_filename(GtkWidget *w, char *filename); GtkWidget *create_color_button(GtkWidget *win); GtkWidget *create_text_entry(int set_default_size, int set_default_action); GtkWidget *create_number_entry(int set_default_size, int set_default_action); GtkWidget *create_file_entry(struct objlist *obj); GtkWidget *create_file_entry_with_cb(GCallback cb, gpointer data); GtkWidget *create_direction_entry(void); GtkWidget *item_setup(GtkWidget *box, GtkWidget *w, char *title, gboolean expand); GtkWidget *get_parent_window(GtkWidget *w); GtkWidget *add_widget_to_table_sub(GtkWidget *table, GtkWidget *w, char *title, int expand, int col, int width, int col_max, int n); GtkWidget *add_widget_to_table(GtkWidget *table, GtkWidget *w, char *title, int expand, int n); GtkWidget *add_copy_button_to_box(GtkWidget *parent_box, GCallback cb, gpointer d, char *obj_name); GtkWidget *get_mnemonic_label(GtkWidget *w); GtkWidget *create_text_view_with_line_number(GtkWidget **v); void text_view_with_line_number_set_text(GtkWidget *view, const gchar *str); void text_view_with_line_number_set_font(GtkWidget *view, const gchar *font); void set_widget_sensitivity_with_label(GtkWidget *w, gboolean state); void set_widget_visibility_with_label(GtkWidget *w, gboolean state); void combo_box_create_mark(GtkWidget *cbox, GtkTreeIter *parent, int col_id, int type); enum SELECT_OBJ_COLOR_RESULT select_obj_color(struct objlist *obj, int id, enum OBJ_FIELD_COLOR_TYPE type); void set_widget_margin(GtkWidget *w, int margin_pos); void set_scale_mark(GtkWidget *scale, GtkPositionType pos, int start, int inc); void set_widget_font(GtkWidget *w, const char *font); void add_default_color(struct narray *palette); void add_default_gray(struct narray *palette); gchar *get_text_from_buffer(GtkTextBuffer *buffer); GtkWidget *add_button(GtkWidget *grid, int row, int col, const char *icon, const char *tooltip, GCallback proc, gpointer data); GtkWidget *add_toggle_button(GtkWidget *grid, int row, int col, const char *icon_name, const char *tooltip, GCallback proc, gpointer data); void add_event_key(GtkWidget *widget, GCallback press_proc, GCallback release_proc, gpointer user_data); #endif ngraph-gtk-6.09.05/src/gtk/x11axis.c0000644000175000017500000030220514142161773013704 00000000000000/* * $Id: x11axis.c,v 1.81 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include "object.h" #include "nstring.h" #include "mathfn.h" #include "gra.h" #include "axis.h" #include "gtk_liststore.h" #include "gtk_subwin.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "gtk_presettings.h" #include "x11bitmp.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "ox11menu.h" #include "x11graph.h" #include "x11file.h" #include "x11view.h" #include "x11axis.h" #include "x11commn.h" static n_list_store Alist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {N_("name"), G_TYPE_STRING, TRUE, FALSE, "group"}, {N_("min"), G_TYPE_STRING, TRUE, TRUE, "min"}, {N_("max"), G_TYPE_STRING, TRUE, TRUE, "max"}, {N_("inc"), G_TYPE_STRING, TRUE, TRUE, "inc"}, {N_("type"), G_TYPE_PARAM, TRUE, TRUE, "type"}, {"x", G_TYPE_DOUBLE, TRUE, TRUE, "x", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"y", G_TYPE_DOUBLE, TRUE, TRUE, "y", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {N_("dir"), G_TYPE_DOUBLE, TRUE, TRUE, "direction", 0, 36000, 100, 1500}, {N_("len"), G_TYPE_DOUBLE, TRUE, TRUE, "length", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, {"num_math", G_TYPE_INT, FALSE, FALSE, "num_math"}, }; enum { AXIS_WIN_COL_HIDDEN, AXIS_WIN_COL_ID, AXIS_WIN_COL_NAME, AXIS_WIN_COL_MIN, AXIS_WIN_COL_MAX, AXIS_WIN_COL_INC, AXIS_WIN_COL_TYPE, AXIS_WIN_COL_X, AXIS_WIN_COL_Y, AXIS_WIN_COL_DIR, AXIS_WIN_COL_LEN, AXIS_WIN_COL_OID, AXIS_WIN_COL_MATH, AXIS_WIN_COL_NUM, }; static void axiswin_scale_clear(GtkMenuItem *item, gpointer user_data); static void axis_delete_popup_func(GtkMenuItem *w, gpointer client_data); static void AxisWinAxisTop(GtkWidget *w, gpointer client_data); static void AxisWinAxisUp(GtkWidget *w, gpointer client_data); static void AxisWinAxisDown(GtkWidget *w, gpointer client_data); static void AxisWinAxisLast(GtkWidget *w, gpointer client_data); static struct subwin_popup_list add_menu_list[] = { {N_("_Frame graph"), G_CALLBACK(CmAxisAddFrame), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Section graph"), G_CALLBACK(CmAxisAddSection), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Cross graph"), G_CALLBACK(CmAxisAddCross), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("Single _Axis"), G_CALLBACK(CmAxisAddSingle), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_END}, }; static struct subwin_popup_list Popup_list[] = { {N_("_Add"), NULL, add_menu_list, POP_UP_MENU_ITEM_TYPE_MENU}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Duplicate"), G_CALLBACK(list_sub_window_copy), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Delete"), G_CALLBACK(axis_delete_popup_func), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Focus"), G_CALLBACK(list_sub_window_focus), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("focus _All"), G_CALLBACK(list_sub_window_focus_all), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Clear"), G_CALLBACK(axiswin_scale_clear), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Properties"), G_CALLBACK(list_sub_window_update), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Instance name"), G_CALLBACK(list_sub_window_object_name), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Top"), G_CALLBACK(AxisWinAxisTop), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Up"), G_CALLBACK(AxisWinAxisUp), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Down"), G_CALLBACK(AxisWinAxisDown), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Bottom"), G_CALLBACK(AxisWinAxisLast), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_END}, }; #define POPUP_ITEM_NUM (sizeof(Popup_list) / sizeof(*Popup_list) - 1) #define POPUP_ITEM_FOCUS_ALL 6 #define POPUP_ITEM_TOP 11 #define POPUP_ITEM_UP 12 #define POPUP_ITEM_DOWN 13 #define POPUP_ITEM_BOTTOM 14 #define TITLE_BUF_SIZE 128 static void axis_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static int check_axis_history(struct objlist *obj); #define TIME_FORMAT_STR N_( \ "%a The abbreviated weekday name.\n" \ "%A The full weekday name.\n" \ "%b The abbreviated month name.\n" \ "%B The full month name.\n" \ "%c Equivalent to %a %b %e %T %Y.\n" \ "%C The century number (year/100).\n" \ "%d The day of the month (01 to 31).\n" \ "%e The day of the month (1 to 31).\n" \ "%F Equivalent to %Y-%m-%d.\n" \ "%H The hour (00 to 23).\n" \ "%I The hour (01 to 12).\n" \ "%j The day of the year (001 to 366).\n" \ "%k The hour (0 to 23).\n" \ "%l The hour (1 to 12).\n" \ "%m The month (01 to 12).\n" \ "%M The minute (00 to 59).\n" \ "%n A newline character.\n" \ "%p Either \"AM\" or \"PM\".\n" \ "%P Either \"am\" or \"pm\".\n" \ "%r Equivalent to %I:%M:%S %p.\n" \ "%R Equivalent to %H:%M.\n" \ "%S The second (00 to 60).\n" \ "%T Equivalent to %H:%M:%S.\n" \ "%u The day of the week, Monday being 1 (1 to 7).\n" \ "%w The day of the week, Sunday being 0 (0 to 6).\n" \ "%y The year without a century (00 to 99).\n" \ "%Y The year including the century.\n" \ "%+ Equivalent to %a %b %e %T GMT %Y.\n" \ "%% A literal '%' character.") void axis_scale_push(struct objlist *obj, int id) { int n; exeobj(obj, "scale_push", id, 0, NULL); n = check_axis_history(obj); set_axis_undo_button_sensitivity(n > 0); } char * AxisCB(struct objlist *obj, int id) { char *s, *valstr, *name; int dir; getobj(obj, "direction", id, 0, NULL, &dir); getobj(obj, "group", id, 0, NULL, &name); s = NULL; name = CHK_STR(name); sgetobjfield(obj, id, "type", NULL, &valstr, FALSE, FALSE, FALSE); if (valstr) { s = g_strdup_printf("%-10s %.6s %s:%.2f", name, _(valstr), _("dir"), dir / 100.0); g_free(valstr); } return s; } char * AxisHistoryCB(struct objlist *obj, int id) { int num; struct narray *array; getobj(obj, "scale_history", id, 0, NULL, &array); num = arraynum(array) / 3; if (num == 0) return NULL; return AxisCB(obj, id); } static char * GridCB(struct objlist *obj, int id) { char *s, *s1, *s2; getobj(obj, "axis_x", id, 0, NULL, &s1); getobj(obj, "axis_y", id, 0, NULL, &s2); s = g_strdup_printf("%.8s %.8s", (s1)? s1: FILL_STRING, (s2)? s2: FILL_STRING); return s; } static void bg_button_toggled(GtkToggleButton *button, gpointer user_data) { struct GridDialog *d; gboolean state; d = (struct GridDialog *) user_data; state = gtk_toggle_button_get_active(button); set_widget_sensitivity_with_label(d->bcolor, state); } static void GridDialogSetupItem(struct GridDialog *d, int id) { int i; axis_combo_box_setup(d->axisx, d->Obj, id, "axis_x"); axis_combo_box_setup(d->axisy, d->Obj, id, "axis_y"); SetWidgetFromObjField(d->draw_x, d->Obj, id, "grid_x"); SetWidgetFromObjField(d->draw_y, d->Obj, id, "grid_y"); for (i = 0; i < GRID_DIALOG_STYLE_NUM; i++) { char width[] = "width1", style[] = "style1"; style[sizeof(style) - 2] += i; SetStyleFromObjField(d->style[i], d->Obj, id, style); width[sizeof(width) - 2] += i; SetWidgetFromObjField(d->width[i], d->Obj, id, width); } SetWidgetFromObjField(d->background, d->Obj, id, "background"); bg_button_toggled(GTK_TOGGLE_BUTTON(d->background), d); set_color(d->color, d->Obj, id, NULL); set_color(d->bcolor, d->Obj, id, "B"); } static void grid_copy_clicked(GtkButton *btn, gpointer user_data) { int sel; struct GridDialog *d; d = (struct GridDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, GridCB); if (sel != -1) { GridDialogSetupItem(d, sel); } } static void gauge_syle_setup(struct GridDialog *d, GtkWidget *table, int n, int j, int instance) { GtkWidget *w; char buf[TITLE_BUF_SIZE]; if (n < 0 || n >= GRID_DIALOG_STYLE_NUM) return; snprintf(buf, sizeof(buf), _("_Style %d:"), n + 1); w = combo_box_entry_create(); add_widget_to_table_sub(table, w, buf, TRUE, 0, 1, 4, j); d->style[n] = w; if (instance) { snprintf(buf, sizeof(buf), _("_Width %d:"), n + 1); w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); add_widget_to_table_sub(table, w, buf, FALSE, 2, 1, 4, j); } else { w = NULL; } d->width[n] = w; } static void GridDialogSetupCommon(GtkWidget *wi, void *data, int makewidget, int instance) { struct GridDialog *d; char title[TITLE_BUF_SIZE]; d = (struct GridDialog *) data; if (instance) { snprintf(title, sizeof(title), _("Grid %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); } d = (struct GridDialog *) data; if (makewidget) { GtkWidget *frame, *w, *hbox, *table; int i, j; if (instance) { gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); } hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); if (instance) { j = 0; w = axis_combo_box_create(AXIS_COMBO_BOX_USE_OID); add_widget_to_table(table, w, _("Axis (_X):"), FALSE, j++); d->axisx = w; w = gtk_check_button_new_with_mnemonic(_("draw _X grid")); add_widget_to_table(table, w, NULL, FALSE, j++); d->draw_x = w; w = axis_combo_box_create(AXIS_COMBO_BOX_USE_OID); add_widget_to_table(table, w, _("Axis (_Y):"), FALSE, j++); d->axisy = w; w = gtk_check_button_new_with_mnemonic(_("draw _Y grid")); add_widget_to_table(table, w, NULL, FALSE, j++); d->draw_y = w; frame = gtk_frame_new(_("Axis")); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); } else { d->axisx = NULL; d->axisy = NULL; d->draw_x = NULL; d->draw_y = NULL; } table = gtk_grid_new(); j = 0; w = create_color_button(wi); add_widget_to_table(table, w, _("_Color:"), FALSE, j++); d->color = w; w = gtk_check_button_new_with_mnemonic(_("_Background")); add_widget_to_table(table, w, NULL, FALSE, j++); g_signal_connect(w, "toggled", G_CALLBACK(bg_button_toggled), d); d->background = w; w = create_color_button(wi); add_widget_to_table(table, w, _("_Background Color:"), FALSE, j++); d->bcolor = w; frame = gtk_frame_new(_("Color")); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); table = gtk_grid_new(); j = 0; for (i = 0; i < GRID_DIALOG_STYLE_NUM; i++) { gauge_syle_setup(d, table, i, j++, instance); } frame = gtk_frame_new(_("Style")); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(d->vbox), frame, FALSE, FALSE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(grid_copy_clicked), d, "axisgrid"); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } GridDialogSetupItem(d, d->Id); } static void GridDialogSetup(GtkWidget *wi, void *data, int makewidget) { GridDialogSetupCommon(wi, data, makewidget, TRUE); } static void GridDialogClose(GtkWidget *w, void *data) { struct GridDialog *d; int ret; int i; d = (struct GridDialog *) data; switch (d->ret) { case IDOK: break; default: return; } ret = d->ret; d->ret = IDLOOP; if (SetObjAxisFieldFromWidget(d->axisx, d->Obj, d->Id, "axis_x")) return; if (SetObjAxisFieldFromWidget(d->axisy, d->Obj, d->Id, "axis_y")) return; for (i = 0; i < GRID_DIALOG_STYLE_NUM; i++) { char width[] = "width1", style[] = "style1"; style[sizeof(style) - 2] += i; if (SetObjFieldFromStyle(d->style[i], d->Obj, d->Id, style)) return; width[sizeof(width) - 2] += i; if (SetObjFieldFromWidget(d->width[i], d->Obj, d->Id, width)) return; } if (SetObjFieldFromWidget(d->draw_x, d->Obj, d->Id, "grid_x")) return; if (SetObjFieldFromWidget(d->draw_y, d->Obj, d->Id, "grid_y")) return; if (SetObjFieldFromWidget(d->background, d->Obj, d->Id, "background")) return; if (putobj_color(d->color, d->Obj, d->Id, NULL)) return; if (putobj_color(d->bcolor, d->Obj, d->Id, "B")) return; d->ret = ret; } void GridDialog(struct GridDialog *data, struct objlist *obj, int id) { data->SetupWindow = GridDialogSetup; data->CloseWindow = GridDialogClose; data->Obj = obj; data->Id = id; } static void GridDefDialogSetup(GtkWidget *w, void *data, int makewidget) { GridDialogSetupCommon(w, data, makewidget, FALSE); } static void GridDefDialog(struct GridDialog *data, struct objlist *obj, int id) { data->SetupWindow = GridDefDialogSetup; data->CloseWindow = GridDialogClose; data->Obj = obj; data->Id = id; } void CmOptionGridDef(void *w, gpointer client_data) { struct objlist *obj; int id; if (Menulock || Globallock) return; if ((obj = chkobject("axisgrid")) == NULL) return; id = newobj(obj); if (id >= 0) { int modified; modified = get_graph_modified(); GridDefDialog(&DlgGridDef, obj, id); if (DialogExecute(TopLevel, &DlgGridDef) == IDOK) { if (CheckIniFile()) { exeobj(obj, "save_config", id, 0, NULL); } } delobj(obj, id); if (! modified) { reset_graph_modified(); } } } static void set_axis_id(GtkWidget *w, int id) { char buf[256]; if (id != -1) { snprintf(buf, sizeof(buf), "id:%d", id); } else { buf[0] = '\0'; } gtk_label_set_text(GTK_LABEL(w), buf); } static void SectionDialogSetupItem(GtkWidget *w, struct SectionDialog *d) { spin_entry_set_val(d->x, d->X); spin_entry_set_val(d->y, d->Y); set_axis_id(d->xid, d->IDX); set_axis_id(d->yid, d->IDY); set_axis_id(d->uid, d->IDU); set_axis_id(d->rid, d->IDR); set_axis_id(d->gid, *(d->IDG)); spin_entry_set_val(d->width, d->LenX); spin_entry_set_val(d->height, d->LenY); } static void SectionDialogAxisX(GtkWidget *w, gpointer client_data) { struct SectionDialog *d; d = (struct SectionDialog *) client_data; if (d->IDX >= 0) { AxisDialog(NgraphApp.AxisWin.data.data, d->IDX, -1); DialogExecute(d->widget, &DlgAxis); } } static void SectionDialogAxisY(GtkWidget *w, gpointer client_data) { struct SectionDialog *d; d = (struct SectionDialog *) client_data; if (d->IDY >= 0) { AxisDialog(NgraphApp.AxisWin.data.data, d->IDY, -1); DialogExecute(d->widget, &DlgAxis); } } static void SectionDialogAxisU(GtkWidget *w, gpointer client_data) { struct SectionDialog *d; d = (struct SectionDialog *) client_data; if (d->IDU >= 0) { AxisDialog(NgraphApp.AxisWin.data.data, d->IDU, -1); DialogExecute(d->widget, &DlgAxis); } } static void SectionDialogAxisR(GtkWidget *w, gpointer client_data) { struct SectionDialog *d; d = (struct SectionDialog *) client_data; if (d->IDR >= 0) { AxisDialog(NgraphApp.AxisWin.data.data, d->IDR, -1); DialogExecute(d->widget, &DlgAxis); } } static int axis_save_undo(int type) { char *arg[4]; arg[0] = "axis"; arg[1] = "axisgrid"; arg[2] = "data"; arg[3] = NULL; return menu_save_undo(type, arg); } static void SectionDialogGrid(GtkWidget *w, gpointer client_data) { struct SectionDialog *d; int oidx, oidy, create = FALSE, undo = -1; d = (struct SectionDialog *) client_data; if (*(d->IDG) == -1) { undo = axis_save_undo(UNDO_TYPE_DUMMY); if ((*(d->IDG) = newobj(d->Obj2)) >= 0) { char *ref; getobj(d->Obj, "oid", d->IDX, 0, NULL, &oidx); ref = g_strdup_printf("axis:^%d", oidx); if (ref) { putobj(d->Obj2, "axis_x", *(d->IDG), ref); } getobj(d->Obj, "oid", d->IDY, 0, NULL, &oidy); ref = g_strdup_printf("axis:^%d", oidy); if (ref) { putobj(d->Obj2, "axis_y", *(d->IDG), ref); } create = TRUE; presetting_set_obj_field(d->Obj2, *(d->IDG)); } } if (*(d->IDG) >= 0) { int ret; GridDialog(&DlgGrid, d->Obj2, *(d->IDG)); ret = DialogExecute(d->widget, &DlgGrid); switch (ret) { case IDCANCEL: menu_undo_internal(undo); if (create) { *(d->IDG) = -1; } break; case IDDELETE: if (create) { menu_undo_internal(undo); } else { delobj(d->Obj2, *(d->IDG)); set_graph_modified(); } *(d->IDG) = -1; break; default: menu_delete_undo(undo); set_graph_modified(); } } SectionDialogSetupItem(d->widget, d); } static void SectionDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct SectionDialog *d; d = (struct SectionDialog *) data; if (makewidget) { GtkWidget *w, *hbox, *vbox, *table; int i; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y = w; gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("Graph _Width:"), FALSE, i++); d->width = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("Graph _Height:"), FALSE, i++); d->height = w; gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_X axis")); g_signal_connect(w, "clicked", G_CALLBACK(SectionDialogAxisX), d); d->xaxis = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->xid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_Y axis")); g_signal_connect(w, "clicked", G_CALLBACK(SectionDialogAxisY), d); d->yaxis = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->yid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_U axis")); g_signal_connect(w, "clicked", G_CALLBACK(SectionDialogAxisU), d); d->uaxis = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->uid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_R axis")); g_signal_connect(w, "clicked", G_CALLBACK(SectionDialogAxisR), d); d->raxis = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->rid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_Grid")); g_signal_connect(w, "clicked", G_CALLBACK(SectionDialogGrid), d); d->grid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->gid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } SectionDialogSetupItem(wi, d); } static void SectionDialogClose(GtkWidget *w, void *data) { struct SectionDialog *d; int ret; int type; struct narray group; d = (struct SectionDialog *) data; if (d->ret != IDOK) return; ret = d->ret; d->ret = IDLOOP; d->X = spin_entry_get_val(d->x); d->Y = spin_entry_get_val(d->y); d->LenX = spin_entry_get_val(d->width); d->LenY = spin_entry_get_val(d->height); if ((d->X != d->X0) || (d->Y != d->Y0) || (d->LenX0 != d->LenX) || (d->LenY0 != d->LenY)) { char *argv[2]; arrayinit(&group, sizeof(int)); if (d->Section) type = 2; else type = 1; arrayadd(&group, &type); arrayadd(&group, &(d->IDX)); arrayadd(&group, &(d->IDY)); arrayadd(&group, &(d->IDU)); arrayadd(&group, &(d->IDR)); arrayadd(&group, &(d->X)); arrayadd(&group, &(d->Y)); arrayadd(&group, &(d->LenX)); arrayadd(&group, &(d->LenY)); argv[0] = (char *) &group; argv[1] = NULL; exeobj(d->Obj, "group_position", d->IDX, 1, argv); arraydel(&group); set_graph_modified(); } d->ret = ret; } void SectionDialog(struct SectionDialog *data, int x, int y, int lenx, int leny, struct objlist *obj, int idx, int idy, int idu, int idr, struct objlist *obj2, int *idg, int section) { data->SetupWindow = SectionDialogSetup; data->CloseWindow = SectionDialogClose; data->X0 = data->X = x; data->Y0 = data->Y = y; data->LenX0 = data->LenX = lenx; data->LenY0 = data->LenY = leny; data->Obj = obj; data->Obj2 = obj2; data->IDX = idx; data->IDY = idy; data->IDU = idu; data->IDR = idr; data->IDG = idg; data->Section = section; data->MaxX = Menulocal.PaperWidth * (10000.0 / Menulocal.PaperZoom); data->MaxY = Menulocal.PaperHeight * (10000.0 / Menulocal.PaperZoom); } static void CrossDialogSetupItem(GtkWidget *w, struct CrossDialog *d) { spin_entry_set_val(d->x, d->X); spin_entry_set_val(d->y, d->Y); set_axis_id(d->xid, d->IDX); set_axis_id(d->yid, d->IDY); spin_entry_set_val(d->width, d->LenX); spin_entry_set_val(d->height, d->LenY); } static void CrossDialogAxisX(GtkWidget *w, gpointer client_data) { struct CrossDialog *d; d = (struct CrossDialog *) client_data; if (d->IDX >= 0) { AxisDialog(NgraphApp.AxisWin.data.data, d->IDX, -1); DialogExecute(d->widget, &DlgAxis); } } static void CrossDialogAxisY(GtkWidget *w, gpointer client_data) { struct CrossDialog *d; d = (struct CrossDialog *) client_data; if (d->IDY >= 0) { AxisDialog(NgraphApp.AxisWin.data.data, d->IDY, -1); DialogExecute(d->widget, &DlgAxis); } } static void CrossDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct CrossDialog *d; d = (struct CrossDialog *) data; if (makewidget) { GtkWidget *w, *hbox, *vbox, *table; int i; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y = w; gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("Graph _Width:"), FALSE, i++); d->width = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("Graph _Height:"), FALSE, i++); d->height = w; gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_X axis")); g_signal_connect(w, "clicked", G_CALLBACK(CrossDialogAxisX), d); d->xaxis = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->xid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_button_new_with_mnemonic(_("_Y axis")); g_signal_connect(w, "clicked", G_CALLBACK(CrossDialogAxisY), d); d->yaxis = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); w = gtk_label_new(NULL); d->yid = w; gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 4); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } CrossDialogSetupItem(wi, d); } static void CrossDialogClose(GtkWidget *w, void *data) { struct CrossDialog *d; int ret; int type; struct narray group; d = (struct CrossDialog *) data; if (d->ret != IDOK) return; ret = d->ret; d->ret = IDLOOP; d->X = spin_entry_get_val(d->x); d->Y = spin_entry_get_val(d->y); d->LenX = spin_entry_get_val(d->width); d->LenY = spin_entry_get_val(d->height); if ((d->X != d->X0) || (d->Y != d->Y0) || (d->LenX != d->LenX0) || (d->LenY != d->LenY0)) { char *argv[2]; arrayinit(&group, sizeof(int)); type = 3; arrayadd(&group, &type); arrayadd(&group, &(d->IDX)); arrayadd(&group, &(d->IDY)); arrayadd(&group, &(d->X)); arrayadd(&group, &(d->Y)); arrayadd(&group, &(d->LenX)); arrayadd(&group, &(d->LenY)); argv[0] = (char *) &group; argv[1] = NULL; exeobj(d->Obj, "group_position", d->IDX, 1, argv); arraydel(&group); set_graph_modified(); } if ((d->IDX != -1) && (d->IDY != -1)) { exeobj(d->Obj, "adjust", d->IDX, 0, NULL); exeobj(d->Obj, "adjust", d->IDY, 0, NULL); } d->ret = ret; } void CrossDialog(struct CrossDialog *data, int x, int y, int lenx, int leny, struct objlist *obj, int idx, int idy) { data->SetupWindow = CrossDialogSetup; data->CloseWindow = CrossDialogClose; data->X0 = data->X = x; data->Y0 = data->Y = y; data->LenX0 = data->LenX = lenx; data->LenY0 = data->LenY = leny; data->Obj = obj; data->IDX = idx; data->IDY = idy; data->MaxX = Menulocal.PaperWidth * (10000.0 / Menulocal.PaperZoom); data->MaxY = Menulocal.PaperHeight * (10000.0 / Menulocal.PaperZoom); } static void ZoomDialogSetupItem(GtkWidget *w, struct ZoomDialog *d) { spin_entry_set_val(d->zoom_entry, d->zoom); } static void ZoomDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct ZoomDialog *d; d = (struct ZoomDialog *) data; if (makewidget) { GtkWidget *w, *vbox; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); item_setup(vbox, w, _("_Zoom:"), TRUE); d->zoom_entry = w; gtk_box_pack_start(GTK_BOX(d->vbox), vbox, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } ZoomDialogSetupItem(wi, d); } static void ZoomDialogClose(GtkWidget *w, void *data) { struct ZoomDialog *d; d = (struct ZoomDialog *) data; if (d->ret != IDOK) return; d->zoom = spin_entry_get_val(d->zoom_entry); } void ZoomDialog(struct ZoomDialog *data) { data->SetupWindow = ZoomDialogSetup; data->CloseWindow = ZoomDialogClose; } static void scale_tab_setup_item(struct AxisDialog *d, int id) { double min, max, inc; struct narray *array; double *data; char buf[30]; combo_box_clear(d->min); combo_box_clear(d->max); combo_box_clear(d->inc); getobj(d->Obj, "min", id, 0, NULL, &min); getobj(d->Obj, "max", id, 0, NULL, &max); getobj(d->Obj, "inc", id, 0, NULL, &inc); getobj(d->Obj, "scale_history", d->Id, 0, NULL, &array); if (array) { double pmin, pmax, pinc; int num, j; pmin = min; pmax = max; pinc = inc; num = arraynum(array) / 3; data = arraydata(array); for (j = 0; j < num; j++) { if (data[0 + j * 3] != pmin) { snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, data[0 + j * 3]); combo_box_append_text(d->min, buf); } pmin = data[0 + j * 3]; if (data[1 + j * 3] != pmax) { snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, data[1 + j * 3]); combo_box_append_text(d->max, buf); } pmax = data[1 + j * 3]; if (data[2 + j * 3] != pinc) { snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, data[2 + j * 3]); combo_box_append_text(d->inc, buf); } pinc = data[2 + j * 3]; } } if ((min == 0) && (max == 0) && (inc == 0)) { combo_box_entry_set_text(d->min, "0"); combo_box_entry_set_text(d->max, "0"); combo_box_entry_set_text(d->inc, "0"); } else { snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, min); combo_box_entry_set_text(d->min, buf); snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, max); combo_box_entry_set_text(d->max, buf); snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, inc); combo_box_entry_set_text(d->inc, buf); } SetWidgetFromObjField(d->div, d->Obj, id, "div"); SetWidgetFromObjField(d->scale, d->Obj, id, "type"); axis_combo_box_setup(d->ref, d->Obj, id, "reference"); SetWidgetFromObjField(d->margin, d->Obj, id, "auto_scale_margin"); } static void AxisDialogClear(GtkWidget *w, gpointer client_data) { struct AxisDialog *d; d = (struct AxisDialog *) client_data; combo_box_entry_set_text(d->min, "0"); combo_box_entry_set_text(d->max, "0"); combo_box_entry_set_text(d->inc, "0"); } static void AxisDialogFile(GtkWidget *w, gpointer client_data) { struct AxisDialog *d; struct objlist *fobj; struct narray farray; d = (struct AxisDialog *) client_data; fobj = chkobject("data"); if (fobj == NULL) return; if (chkobjlastinst(fobj) == -1) return; SelectDialog(&DlgSelect, fobj, _("autoscale (multi select)"), FileCB, (struct narray *) &farray, NULL); if (DialogExecute(d->widget, &DlgSelect) == IDOK) { int a, anum, num, *array; num = arraynum(&farray); array = arraydata(&farray); anum = chkobjlastinst(d->Obj); if (num > 0 && anum != 0) { GString *str; int type; struct narray *result; str = g_string_sized_new(32); if (str) { char *buf, *argv2[2]; int i; g_string_append(str, "data:"); for (i = 0; i < num; i++) { if (i == num - 1) { g_string_append_printf(str, "%d", array[i]); } else { g_string_append_printf(str, "%d,", array[i]); } } buf = g_string_free(str, FALSE); argv2[0] = (char *) buf; argv2[1] = NULL; if (getobj(d->Obj, "type", d->Id, 0, NULL, &type) == -1) { arraydel(&farray); g_free(buf); return; } a = combo_box_get_active(d->scale); if (a >= 0 && (putobj(d->Obj, "type", d->Id, &a) == -1)) { arraydel(&farray); g_free(buf); return; } getobj(d->Obj, "get_auto_scale", d->Id, 1, argv2, &result); g_free(buf); if (arraynum(result) == 3) { char s[30]; snprintf(s, sizeof(s), DOUBLE_STR_FORMAT, arraynget_double(result, 0)); combo_box_entry_set_text(d->min, s); snprintf(s, sizeof(s), DOUBLE_STR_FORMAT, arraynget_double(result, 1)); combo_box_entry_set_text(d->max, s); snprintf(s, sizeof(s), DOUBLE_STR_FORMAT, arraynget_double(result, 2)); combo_box_entry_set_text(d->inc, s); } putobj(d->Obj, "type", d->Id, &type); } } } arraydel(&farray); } static void file_button_show(GtkWidget *widget, gpointer user_data) { static struct objlist *file = NULL; int n; if (file == NULL) { file = chkobject("data"); } if (file == NULL) return; n = chkobjlastinst(file); gtk_widget_set_sensitive(widget, n >= 0); } static void scale_tab_copy_clicked(GtkButton *btn, gpointer user_data) { struct AxisDialog *d; int sel; d = (struct AxisDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, AxisCB); if (sel != -1) { scale_tab_setup_item(d, sel); } } static GtkWidget * scale_tab_create(struct AxisDialog *d) { GtkWidget *parent_box, *w, *frame, *table, *hbox; int i; table = gtk_grid_new(); i = 0; w = combo_box_entry_create(); add_widget_to_table(table, w, _("_Min:"), TRUE, i++); d->min = w; w = combo_box_entry_create(); add_widget_to_table(table, w, _("_Max:"), TRUE, i++); d->max = w; w = combo_box_entry_create(); add_widget_to_table(table, w, _("_Inc:"), TRUE, i++); d->inc = w; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12); w = gtk_button_new_with_mnemonic(_("_Clear")); g_signal_connect(w, "clicked", G_CALLBACK(AxisDialogClear), d); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 0); w = gtk_button_new_with_mnemonic(_("_Data")); g_signal_connect(w, "clicked", G_CALLBACK(AxisDialogFile), d); g_signal_connect(w, "map", G_CALLBACK(file_button_show), NULL); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); add_widget_to_table(table, hbox, "", FALSE, i++); w = combo_box_create(); add_widget_to_table(table, w, _("_Scale:"), FALSE, i++); d->scale = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Div:"), FALSE, i++); d->div = w; w = axis_combo_box_create(AXIS_COMBO_BOX_USE_OID | AXIS_COMBO_BOX_ADD_NONE); add_widget_to_table(table, w, _("_Ref:"), FALSE, i++); d->ref = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); add_widget_to_table(table, w, _("_Auto scale margin:"), FALSE, i++); d->margin = w; frame = gtk_frame_new(_("Scale")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); parent_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(parent_box), frame, TRUE, TRUE, 4); add_copy_button_to_box(parent_box, G_CALLBACK(scale_tab_copy_clicked), d, "axis"); return parent_box; } static int baseline_tab_set_value(struct AxisDialog *axis) { struct AxisBase *d; d = &axis->base; if (SetObjFieldFromStyle(d->style, axis->Obj, axis->Id, "style")) return 1; if (SetObjFieldFromWidget(d->width, axis->Obj, axis->Id, "width")) return 1; if (SetObjFieldFromWidget(d->baseline, axis->Obj, axis->Id, "baseline")) return 1; if (SetObjFieldFromWidget(d->arrow, axis->Obj, axis->Id, "arrow")) return 1; if (SetObjFieldFromWidget(d->arrowlen, axis->Obj, axis->Id, "arrow_length")) return 1; if (SetObjFieldFromWidget(d->arrowwid, axis->Obj, axis->Id, "arrow_width")) return 1; if (SetObjFieldFromWidget(d->wave, axis->Obj, axis->Id, "wave")) return 1; if (SetObjFieldFromWidget(d->wavelen, axis->Obj, axis->Id, "wave_length")) return 1; if (SetObjFieldFromWidget(d->wavewid, axis->Obj, axis->Id, "wave_width")) return 1; if (putobj_color(d->color, axis->Obj, axis->Id, NULL)) return 1; return 0; } static void baseline_tab_setup_item(struct AxisDialog *axis, int id) { struct AxisBase *d; d = &axis->base; SetStyleFromObjField(d->style, axis->Obj, id, "style"); SetWidgetFromObjField(d->width, axis->Obj, id, "width"); SetWidgetFromObjField(d->baseline, axis->Obj, id, "baseline"); SetWidgetFromObjField(d->arrow, axis->Obj, id, "arrow"); SetWidgetFromObjField(d->arrowlen, axis->Obj, id, "arrow_length"); SetWidgetFromObjField(d->arrowwid, axis->Obj, id, "arrow_width"); SetWidgetFromObjField(d->wave, axis->Obj, id, "wave"); SetWidgetFromObjField(d->wavelen, axis->Obj, id, "wave_length"); SetWidgetFromObjField(d->wavewid, axis->Obj, id, "wave_width"); set_color(d->color, axis->Obj, id, NULL); } static void baseline_tab_copy_clicked(GtkButton *btn, gpointer user_data) { struct AxisDialog *d; int sel; d = (struct AxisDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, AxisCB); if (sel != -1) { baseline_tab_setup_item(d, sel); } } static GtkWidget * baseline_tab_create(GtkWidget *wi, struct AxisDialog *dd) { GtkWidget *w, *hbox, *vbox, *frame, *table; struct AxisBase *d; int i; d = &dd->base; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); table = gtk_grid_new(); i = 0; w = gtk_check_button_new_with_mnemonic(_("Draw _Baseline")); add_widget_to_table(table, w, NULL, FALSE , i++); d->baseline = w; w = combo_box_entry_create(); combo_box_entry_set_width(w, NUM_ENTRY_WIDTH); add_widget_to_table(table, w, _("Line _Style:"), TRUE, i++); d->style = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Line Width:"), FALSE, i++); d->width = w; w = create_color_button(wi); add_widget_to_table(table, w, _("_Color:"), FALSE, i++); d->color = w; frame = gtk_frame_new(_("Baseline")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); table = gtk_grid_new(); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Position:"), FALSE, i++); d->arrow = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); spin_entry_set_inc(w, 1000, 10000); add_widget_to_table(table, w, _("_Arrow length:"), FALSE, i++); d->arrowlen = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); spin_entry_set_inc(w, 1000, 10000); add_widget_to_table(table, w, _("_Arrow width:"), FALSE, i++); d->arrowwid = w; frame = gtk_frame_new(_("Arrow")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Position:"), FALSE, i++); d->wave = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Wave length:"), FALSE, i++); d->wavelen = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Wave width:"), FALSE, i++); d->wavewid = w; frame = gtk_frame_new(_("Wave")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(baseline_tab_copy_clicked), dd, "axis"); return vbox; } static int gauge_tab_set_value(struct AxisDialog *axis) { int i; struct AxisGauge *d; d = &axis->gauge; if (SetObjFieldFromWidget(d->gauge, axis->Obj, axis->Id, "gauge")) return 1; if (SetObjFieldFromWidget(d->min, axis->Obj, axis->Id, "gauge_min")) return 1; if (SetObjFieldFromWidget(d->max, axis->Obj, axis->Id, "gauge_max")) return 1; if (SetObjFieldFromStyle(d->style, axis->Obj, axis->Id, "gauge_style")) return 1; for (i = 0; i < GAUGE_STYLE_NUM; i++) { char width[] = "gauge_width1", length[] = "gauge_length1"; width[sizeof(width) - 2] += i; if (SetObjFieldFromWidget(d->width[i], axis->Obj, axis->Id, width)) return 1; length[sizeof(length) - 2] += i; if (SetObjFieldFromWidget(d->length[i], axis->Obj, axis->Id, length)) return 1; } if (putobj_color(d->color, axis->Obj, axis->Id, "gauge_")) return 1; return 0; } static void gauge_tab_setup_item(struct AxisDialog *axis, int id) { int i; struct AxisGauge *d; d = &axis->gauge; SetWidgetFromObjField(d->gauge, axis->Obj, id, "gauge"); SetWidgetFromObjField(d->min, axis->Obj, id, "gauge_min"); SetWidgetFromObjField(d->max, axis->Obj, id, "gauge_max"); SetStyleFromObjField(d->style, axis->Obj, id, "gauge_style"); for (i = 0; i < GAUGE_STYLE_NUM; i++) { char width[] = "gauge_width1", length[] = "gauge_length1"; width[sizeof(width) - 2] += i; SetWidgetFromObjField(d->width[i], axis->Obj, id, width); length[sizeof(length) - 2] += i; SetWidgetFromObjField(d->length[i], axis->Obj, id, length); } set_color(d->color, axis->Obj, id, "gauge_"); } static void gauge_tab_copy_clicked(GtkButton *btn, gpointer user_data) { struct AxisDialog *d; int sel; d = (struct AxisDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, AxisCB); if (sel != -1) { gauge_tab_setup_item(d, sel); } } static GtkWidget * gauge_tab_create(GtkWidget *wi, struct AxisDialog *dd) { GtkWidget *parent_box, *w, *vbox, *frame, *table; struct AxisGauge *d; int i, j; char buf[TITLE_BUF_SIZE]; d = &dd->gauge; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); table = gtk_grid_new(); j = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Gauge:"), FALSE, j++); d->gauge = w; w = create_text_entry(FALSE, TRUE); gtk_entry_set_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH * 2); add_widget_to_table(table, w, _("_Min:"), TRUE, j++); d->min = w; w = create_text_entry(FALSE, TRUE); gtk_entry_set_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH * 2); add_widget_to_table(table, w, _("_Max:"), TRUE, j++); d->max = w; frame = gtk_frame_new(_("Range")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); j = 0; w = combo_box_entry_create(); add_widget_to_table_sub(table, w, _("_Style:"), TRUE, 0, 3, 4, j++); d->style = w; w = create_color_button(wi); add_widget_to_table_sub(table, w, _("_Color:"), FALSE, 0, 1, 4, j++); d->color = w; for (i = 0; i < GAUGE_STYLE_NUM; i++) { snprintf(buf, sizeof(buf), _("_Width %d:"), i + 1); w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); add_widget_to_table_sub(table, w, buf, TRUE, 0, 1, 4, j); d->width[i] = w; snprintf(buf, sizeof(buf), _("_Length %d:"), i + 1); w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table_sub(table, w, buf, TRUE, 2, 1, 4, j++); d->length[i] = w; } frame = gtk_frame_new(_("Style")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); parent_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(parent_box), vbox, TRUE, TRUE, 4); add_copy_button_to_box(parent_box, G_CALLBACK(gauge_tab_copy_clicked), dd, "axis"); return parent_box; } static int set_num_format(struct AxisDialog *axis, struct AxisNumbering *d) { GString *format; int a; char *new, *old; format = g_string_new("%"); if (format == NULL) { return 1; } if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->add_plus))) { g_string_append_c(format, '+'); } a = combo_box_get_active(d->fraction); if (a == 0) { g_string_append_c(format, 'g'); } else if (a > 0) { g_string_append_printf(format, ".%df", a - 1); } if (getobj(axis->Obj, "num_format", axis->Id, 0, NULL, &old) == -1) { return 1; } new = g_string_free(format, FALSE); if (g_strcmp0(old, new)) { set_graph_modified(); } if (putobj(axis->Obj, "num_format", axis->Id, new) == -1) { return 1; } if (getobj(axis->Obj, "num_format", axis->Id, 0, NULL, &new) == -1){ return 1; } return 0; } static int numbering_tab_set_value(struct AxisDialog *axis) { struct AxisNumbering *d; d = &axis->numbering; if (SetObjFieldFromWidget(d->num, axis->Obj, axis->Id, "num")) return 1; if (SetObjFieldFromWidget(d->begin, axis->Obj, axis->Id, "num_begin")) return 1; if (SetObjFieldFromWidget(d->step, axis->Obj, axis->Id, "num_step")) return 1; if (SetObjFieldFromWidget(d->numnum, axis->Obj, axis->Id, "num_num")) return 1; if (SetObjFieldFromWidget(d->head, axis->Obj, axis->Id, "num_head")) return 1; if (set_num_format(axis, d)) return 1; if (SetObjFieldFromWidget(d->tail, axis->Obj, axis->Id, "num_tail")) return 1; if (SetObjFieldFromWidget(d->date_format, axis->Obj, axis->Id, "num_date_format")) return 1; if (SetObjFieldFromWidget(d->align, axis->Obj, axis->Id, "num_align")) return 1; if (SetObjFieldFromWidget(d->direction, axis->Obj, axis->Id, "num_direction")) return 1; if (SetObjFieldFromWidget(d->shiftp, axis->Obj, axis->Id, "num_shift_p")) return 1; if (SetObjFieldFromWidget(d->shiftn, axis->Obj, axis->Id, "num_shift_n")) return 1; if (SetObjFieldFromWidget(d->log_power, axis->Obj, axis->Id, "num_log_pow")) return 1; if (SetObjFieldFromWidget(d->no_zero, axis->Obj, axis->Id, "num_no_zero")) return 1; if (SetObjFieldFromWidget(d->norm, axis->Obj, axis->Id, "num_auto_norm")) return 1; if (SetObjFieldFromWidget(d->math, axis->Obj, axis->Id, "num_math")) return 1; return 0; } static void numbering_tab_setup_item(struct AxisDialog *axis, int id) { char *format, *endptr; int j, a; struct AxisNumbering *d; d = &axis->numbering; SetWidgetFromObjField(d->num, axis->Obj, id, "num"); SetWidgetFromObjField(d->begin, axis->Obj, id, "num_begin"); SetWidgetFromObjField(d->step, axis->Obj, id, "num_step"); SetWidgetFromObjField(d->numnum, axis->Obj, id, "num_num"); SetWidgetFromObjField(d->head, axis->Obj, id, "num_head"); combo_box_clear(d->fraction); for (j = 0; j < FwNumStyleNum; j++) { combo_box_append_text(d->fraction, _(FwNumStyle[j])); } getobj(axis->Obj, "num_format", id, 0, NULL, &format); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->add_plus), strchr(format, '+') != NULL); if ((strchr(format, 'f') == NULL) || (strchr(format, '.') == NULL)) { a = 0; } else { a = strtol(strchr(format, '.') + 1, &endptr, 10) + 1; } if (a < 0) { a = 0; } else if (a > 10) { a = 10; } combo_box_set_active(d->fraction, a); SetWidgetFromObjField(d->date_format, axis->Obj, id, "num_date_format"); SetWidgetFromObjField(d->tail, axis->Obj, id, "num_tail"); SetWidgetFromObjField(d->align, axis->Obj, id, "num_align"); SetWidgetFromObjField(d->direction, axis->Obj, id, "num_direction"); SetWidgetFromObjField(d->shiftp, axis->Obj, id, "num_shift_p"); SetWidgetFromObjField(d->shiftn, axis->Obj, id, "num_shift_n"); SetWidgetFromObjField(d->log_power, axis->Obj, id, "num_log_pow"); SetWidgetFromObjField(d->no_zero, axis->Obj, id, "num_no_zero"); SetWidgetFromObjField(d->norm, axis->Obj, id, "num_auto_norm"); SetWidgetFromObjField(d->math, axis->Obj, id, "num_math"); } static void numbering_tab_copy_clicked(GtkButton *btn, gpointer user_data) { struct AxisDialog *d; int sel; d = (struct AxisDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, AxisCB); if (sel != -1) { numbering_tab_setup_item(d, sel); } } static void num_direction_changed(GtkWidget *w, gpointer client_data) { int dir, state; struct AxisDialog *d; d = (struct AxisDialog *) client_data; dir = combo_box_get_active(w); state = (dir != AXIS_NUM_POS_OBLIQUE1 && dir != AXIS_NUM_POS_OBLIQUE2); set_widget_sensitivity_with_label(d->numbering.align, state); } static GtkWidget * numbering_tab_create(GtkWidget *wi, struct AxisDialog *dd) { GtkWidget *w, *hbox, *vbox, *frame, *table; struct AxisNumbering *d; int i; d = &dd->numbering; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Numbering:"), FALSE, i++); d->num = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Begin:"), FALSE, i++); d->begin = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Step:"), FALSE, i++); d->step = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_NUM, TRUE, TRUE); add_widget_to_table(table, w, _("_Num:"), FALSE, i++); d->numnum = w; frame = gtk_frame_new(_("Range")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Align:"), FALSE, i++); d->align = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Direction:"), FALSE, i++); g_signal_connect(w, "changed", G_CALLBACK(num_direction_changed), dd); d->direction = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("shift (_P):"), FALSE, i++); d->shiftp = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("shift (_N):"), FALSE, i++); d->shiftn = w; frame = gtk_frame_new(_("Position")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Fraction:"), FALSE, i++); d->fraction = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Head:"), TRUE, i++); d->head = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Tail:"), TRUE, i++); d->tail = w; w = create_text_entry(TRUE, TRUE); gtk_widget_set_tooltip_text(w, _(TIME_FORMAT_STR)); add_widget_to_table(table, w, _("_Date/time format:"), TRUE, i++); d->date_format = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Auto normalization:"), FALSE, i++); d->norm = w; w = gtk_check_button_new_with_mnemonic(_("_Log power")); add_widget_to_table(table, w, NULL, FALSE, i++); d->log_power = w; w = gtk_check_button_new_with_mnemonic(_("_Add plus")); d->add_plus = w; add_widget_to_table(table, w, NULL, FALSE, i++); w = combo_box_create(); add_widget_to_table(table, w, _("_Zero:"), FALSE, i++); d->no_zero = w; w = create_text_entry(FALSE, TRUE); add_widget_to_table(table, w, _("numbering _Math:"), TRUE, i++); d->math = w; frame = gtk_frame_new(_("Format")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(numbering_tab_copy_clicked), dd, "axis"); return vbox; } static int font_tab_set_value(struct AxisDialog *axis) { struct AxisFont *d; int style, bold, italic, old_style; d = &axis->font; if (SetObjFieldFromWidget(d->space, axis->Obj, axis->Id, "num_space")) return 1; if (SetObjFieldFromWidget(d->pt, axis->Obj, axis->Id, "num_pt")) return 1; if (SetObjFieldFromWidget(d->script, axis->Obj, axis->Id, "num_script_size")) return 1; SetObjFieldFromFontList(d->font, axis->Obj, axis->Id, "num_font"); if (putobj_color(d->color, axis->Obj, axis->Id, "num_")) return 1; style = 0; bold = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->font_bold)); if (bold) { style |= GRA_FONT_STYLE_BOLD; } italic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->font_italic)); if (italic) { style |= GRA_FONT_STYLE_ITALIC; } getobj(axis->Obj, "num_font_style", axis->Id, 0, NULL, &old_style); if (old_style != style) { putobj(axis->Obj, "num_font_style", axis->Id, &style); set_graph_modified(); } return 0; } static void font_tab_setup_item(struct AxisDialog *axis, int id) { struct compatible_font_info *compatible; struct AxisFont *d; int style; d = &axis->font; SetWidgetFromObjField(d->space, axis->Obj, id, "num_space"); SetWidgetFromObjField(d->pt, axis->Obj, id, "num_pt"); SetWidgetFromObjField(d->script, axis->Obj, id, "num_script_size"); set_color(d->color, axis->Obj, id, "num_"); compatible = SetFontListFromObj(d->font, axis->Obj, id, "num_font"); if (compatible) { style = compatible->style; } else { getobj(axis->Obj, "num_font_style", axis->Id, 0, NULL, &style); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->font_bold), style & GRA_FONT_STYLE_BOLD); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->font_italic), style & GRA_FONT_STYLE_ITALIC); } static void font_tab_copy_clicked(GtkButton *btn, gpointer user_data) { struct AxisDialog *d; int sel; d = (struct AxisDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, AxisCB); if (sel != -1) { font_tab_setup_item(d, sel); } } static GtkWidget * font_tab_create(GtkWidget *wi, struct AxisDialog *dd) { GtkWidget *w, *vbox, *table, *frame, *btn_box; struct AxisFont *d; int i; d = &dd->font; table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Point:"), FALSE, i++); d->pt = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_SPACE_POINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Space:"), FALSE, i++); d->space = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); add_widget_to_table(table, w, _("_Script size:"), FALSE, i++); d->script = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Font:"), FALSE, i++); d->font = w; btn_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); gtk_box_set_spacing(GTK_BOX(btn_box), 10); w = gtk_check_button_new_with_mnemonic(_("_Bold")); set_button_icon(w, "format-text-bold"); d->font_bold = w; gtk_box_pack_start(GTK_BOX(btn_box), w, FALSE, FALSE, 0); w = gtk_check_button_new_with_mnemonic(_("_Italic")); set_button_icon(w, "format-text-italic"); d->font_italic = w; gtk_box_pack_start(GTK_BOX(btn_box), w, FALSE, FALSE, 0); add_widget_to_table(table, btn_box, "", FALSE, i++); w = create_color_button(wi); add_widget_to_table(table, w, _("_Color:"), FALSE, i++); d->color = w; frame = gtk_frame_new(_("Font")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(font_tab_copy_clicked), dd, "axis"); return vbox; } static int position_tab_set_value(struct AxisDialog *axis) { struct AxisPos *d; d = &axis->position; if (SetObjFieldFromWidget(d->x, axis->Obj, axis->Id, "x")) return 1; if (SetObjFieldFromWidget(d->y, axis->Obj, axis->Id, "y")) return 1; if (SetObjFieldFromWidget(d->len, axis->Obj, axis->Id, "length")) return 1; if (SetObjFieldFromWidget(d->direction, axis->Obj, axis->Id, "direction")) return 1; if (SetObjAxisFieldFromWidget(d->adjust, axis->Obj, axis->Id, "adjust_axis")) return 1; if (SetObjFieldFromWidget(d->adjustpos, axis->Obj, axis->Id, "adjust_position")) return 1; return 0; } static void position_tab_setup_item(struct AxisDialog *axis, int id) { struct AxisPos *d; d = &axis->position; SetWidgetFromObjField(d->x, axis->Obj, id, "x"); SetWidgetFromObjField(d->y, axis->Obj, id, "y"); SetWidgetFromObjField(d->len, axis->Obj, id, "length"); SetWidgetFromObjField(d->direction, axis->Obj, id, "direction"); axis_combo_box_setup(d->adjust, axis->Obj, id, "adjust_axis"); SetWidgetFromObjField(d->adjustpos, axis->Obj, id, "adjust_position"); } static void position_tab_copy_clicked(GtkButton *btn, gpointer user_data) { struct AxisDialog *d; int sel; d = (struct AxisDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, AxisCB); if (sel != -1) { position_tab_setup_item(d, sel); } } static GtkWidget * position_tab_create(GtkWidget *wi, struct AxisDialog *dd) { GtkWidget *w, *vbox, *frame, *table; struct AxisPos *d; int i; d = &dd->position; table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("_Length:"), FALSE, i++); d->len = w; w = create_direction_entry(); add_widget_to_table(table, w, _("_Direction:"), FALSE, i++); d->direction = w; w = axis_combo_box_create(AXIS_COMBO_BOX_USE_OID | AXIS_COMBO_BOX_ADD_NONE); add_widget_to_table(table, w, _("_Adjust:"), FALSE, i++); d->adjust = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("Adjust _Position:"), FALSE, i++); d->adjustpos = w; frame = gtk_frame_new(_("Position")); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(position_tab_copy_clicked), dd, "axis"); return vbox; } static void AxisDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct AxisDialog *d; char *group; char title[25]; d = (struct AxisDialog *) data; getobj(d->Obj, "group", d->Id, 0, NULL, &group); group = CHK_STR(group); snprintf(title, sizeof(title), _("Axis %d %s"), d->Id, group); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *notebook, *w, *label; notebook = gtk_notebook_new(); gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), FALSE); w = scale_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Scale")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = baseline_tab_create(wi, d); label = gtk_label_new_with_mnemonic(_("_Baseline")); d->base.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = gauge_tab_create(wi, d); label = gtk_label_new_with_mnemonic(_("_Gauge")); d->gauge.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = numbering_tab_create(wi, d); label = gtk_label_new_with_mnemonic(_("_Numbering")); d->numbering.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = font_tab_create(wi, d); label = gtk_label_new_with_mnemonic(_("_Font")); d->font.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = position_tab_create(wi, d); label = gtk_label_new_with_mnemonic(_("_Position")); d->position.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); gtk_box_pack_start(GTK_BOX(d->vbox), notebook, TRUE, TRUE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); d->tab = GTK_NOTEBOOK(notebook); } position_tab_setup_item(d, d->Id); font_tab_setup_item(d, d->Id); gauge_tab_setup_item(d, d->Id); numbering_tab_setup_item(d, d->Id); baseline_tab_setup_item(d, d->Id); scale_tab_setup_item(d, d->Id); } static int scale_tab_set_value(struct AxisDialog *d) { axis_scale_push(d->Obj, d->Id); if (SetObjFieldFromWidget(d->min, d->Obj, d->Id, "min")) { return 1; } if (SetObjFieldFromWidget(d->max, d->Obj, d->Id, "max")) { return 1; } if (SetObjFieldFromWidget(d->inc, d->Obj, d->Id, "inc")) { return 1; } if (SetObjFieldFromWidget(d->div, d->Obj, d->Id, "div")) { return 1; } if (SetObjFieldFromWidget(d->scale, d->Obj, d->Id, "type")) { return 1; } if (SetObjAxisFieldFromWidget(d->ref, d->Obj, d->Id, "reference")) { return 1; } if (SetObjFieldFromWidget(d->margin, d->Obj, d->Id, "auto_scale_margin")) { return 1; } return 0; } static void AxisDialogClose(GtkWidget *w, void *data) { struct AxisDialog *d; int ret; d = (struct AxisDialog *) data; switch (d->ret) { case IDOK: break; default: return; } ret = d->ret; d->ret = IDLOOP; if (scale_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, 0); return; } if (font_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, d->font.tab_id); return; } if (numbering_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, d->numbering.tab_id); return; } if (baseline_tab_set_value(d)){ gtk_notebook_set_current_page(d->tab, d->base.tab_id); return; } if (gauge_tab_set_value(d)){ gtk_notebook_set_current_page(d->tab, d->gauge.tab_id); return; } if (position_tab_set_value(d)){ gtk_notebook_set_current_page(d->tab, d->position.tab_id); return; } d->ret = ret; } void AxisDialog(struct obj_list_data *data, int id, int user_data) { struct AxisDialog *d; d = (struct AxisDialog *) data->dialog; d->SetupWindow = AxisDialogSetup; d->CloseWindow = AxisDialogClose; d->Obj = data->obj; d->Id = id; } void CmAxisAddFrame(void *w, gpointer client_data) { enum TOOLBOX_MODE mode; mode = get_toolbox_mode(); CmAxisNewFrame(mode == TOOLBOX_MODE_SETTING_PANEL); } void CmAxisAddSection(void *w, gpointer client_data) { enum TOOLBOX_MODE mode; mode = get_toolbox_mode(); CmAxisNewSection(mode == TOOLBOX_MODE_SETTING_PANEL); } void CmAxisAddCross(void *w, gpointer client_data) { enum TOOLBOX_MODE mode; mode = get_toolbox_mode(); CmAxisNewCross(mode == TOOLBOX_MODE_SETTING_PANEL); } static void get_initial_axis_position(int *px, int *py) { double x, y; int w, h, grid; grid = Menulocal.grid; w = Menulocal.PaperWidth; h = Menulocal.PaperHeight; x = (w - Menulocal.default_axis_width) / 2; y = (h + Menulocal.default_axis_height) / 2; * px = nround(x / grid) * grid - Menulocal.LeftMargin; grid = nround(1000.0 / grid) * grid; * py = nround(y / grid) * grid - Menulocal.TopMargin; } void CmAxisNewFrame(int use_presettings) { struct objlist *obj, *obj2; int idx, idy, idu, idr, idg, ret; int type, x, y, lenx, leny, undo; struct narray group; char *argv[2]; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; if ((obj2 = getobject("axisgrid")) == NULL) return; undo = axis_save_undo(UNDO_TYPE_CREATE); idx = newobj(obj); idy = newobj(obj); idu = newobj(obj); idr = newobj(obj); idg = -1; arrayinit(&group, sizeof(int)); type = 1; get_initial_axis_position(&x, &y); lenx = Menulocal.default_axis_width; leny = Menulocal.default_axis_height; arrayadd(&group, &type); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &idu); arrayadd(&group, &idr); arrayadd(&group, &x); arrayadd(&group, &y); arrayadd(&group, &lenx); arrayadd(&group, &leny); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "default_grouping", idr, 1, argv); arraydel(&group); if (use_presettings) { presetting_set_obj_field(obj, idx); presetting_set_obj_field(obj, idy); presetting_set_obj_field(obj, idu); presetting_set_obj_field(obj, idr); } SectionDialog(&DlgSection, x, y, lenx, leny, obj, idx, idy, idu, idr, obj2, &idg, FALSE); ret = DialogExecute(TopLevel, &DlgSection); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } void CmAxisNewSection(int use_presettings) { struct objlist *obj, *obj2; int idx, idy, idu, idr, idg, ret, oidx, oidy, undo; int type, x, y, lenx, leny; struct narray group; char *argv[2]; if (Menulock || Globallock) return; if ((obj = getobject("axis")) == NULL) return; if ((obj2 = getobject("axisgrid")) == NULL) return; undo = axis_save_undo(UNDO_TYPE_CREATE); idx = newobj(obj); idy = newobj(obj); idu = newobj(obj); idr = newobj(obj); idg = newobj(obj2); arrayinit(&group, sizeof(int)); type = 2; get_initial_axis_position(&x, &y); lenx = Menulocal.default_axis_width; leny = Menulocal.default_axis_height; arrayadd(&group, &type); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &idu); arrayadd(&group, &idr); arrayadd(&group, &x); arrayadd(&group, &y); arrayadd(&group, &lenx); arrayadd(&group, &leny); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "default_grouping", idr, 1, argv); arraydel(&group); if (idg >= 0) { char *ref; getobj(obj, "oid", idx, 0, NULL, &oidx); ref = g_strdup_printf("axis:^%d", oidx); if (ref) { putobj(obj2, "axis_x", idg, ref); } getobj(obj, "oid", idy, 0, NULL, &oidy); ref = g_strdup_printf("axis:^%d", oidy); if (ref) { putobj(obj2, "axis_y", idg, ref); } } if (use_presettings) { presetting_set_obj_field(obj, idx); presetting_set_obj_field(obj, idy); presetting_set_obj_field(obj, idu); presetting_set_obj_field(obj, idr); presetting_set_obj_field(obj2, idg); } SectionDialog(&DlgSection, x, y, lenx, leny, obj, idx, idy, idu, idr, obj2, &idg, TRUE); ret = DialogExecute(TopLevel, &DlgSection); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } void CmAxisNewCross(int use_presettings) { struct objlist *obj; int idx, idy, ret; int type, x, y, lenx, leny, undo; struct narray group; char *argv[2]; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; undo = axis_save_undo(UNDO_TYPE_CREATE); idx = newobj(obj); idy = newobj(obj); arrayinit(&group, sizeof(int)); type = 3; get_initial_axis_position(&x, &y); lenx = Menulocal.default_axis_width; leny = Menulocal.default_axis_height; arrayadd(&group, &type); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &x); arrayadd(&group, &y); arrayadd(&group, &lenx); arrayadd(&group, &leny); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "default_grouping", idy, 1, argv); arraydel(&group); if (use_presettings) { presetting_set_obj_field(obj, idx); presetting_set_obj_field(obj, idy); } CrossDialog(&DlgCross, x, y, lenx, leny, obj, idx, idy); ret = DialogExecute(TopLevel, &DlgCross); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } void CmAxisAddSingle(void *w, gpointer client_data) { struct objlist *obj; int id, undo; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; undo = axis_save_undo(UNDO_TYPE_CREATE); if ((id = newobj(obj)) >= 0) { int ret; presetting_set_obj_field(obj, id); AxisDialog(NgraphApp.AxisWin.data.data, id, -1); ret = DialogExecute(TopLevel, &DlgAxis); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } } void CmAxisDel(void *w, gpointer client_data) { struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; if (chkobjlastinst(obj) == -1) return; CopyDialog(&DlgCopy, obj, -1, _("delete axis (single select)"), AxisCB); if (DialogExecute(TopLevel, &DlgCopy) == IDOK && DlgCopy.sel >= 0) { axis_save_undo(UNDO_TYPE_DELETE); AxisDel(DlgCopy.sel); set_graph_modified(); AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, FALSE); } } void CmAxisUpdate(void *w, gpointer client_data) { struct objlist *obj; int i, ret, undo; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; if (chkobjlastinst(obj) == -1) return; CopyDialog(&DlgCopy, obj, -1, _("axis property (single select)"), AxisCB); if (DialogExecute(TopLevel, &DlgCopy) == IDOK) { i = DlgCopy.sel; if (i < 0) return; } else { return; } undo = axis_save_undo(UNDO_TYPE_EDIT); AxisDialog(NgraphApp.AxisWin.data.data, i, -1); ret = DialogExecute(TopLevel, &DlgAxis); if (ret == IDCANCEL) { menu_delete_undo(undo); } else { AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, FALSE); } } void CmAxisZoom(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; if (chkobjlastinst(obj) == -1) return; ZoomDialog(&DlgZoom); if ((DialogExecute(TopLevel, &DlgZoom) == IDOK) && (DlgZoom.zoom > 0)) { double zoom, min, max, room; zoom = DlgZoom.zoom / 10000.0; SelectDialog(&DlgSelect, obj, _("scale zoom (multi select)"), AxisCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int *array, num, i; num = arraynum(&farray); array = arraydata(&farray); if (num > 0) { axis_save_undo(UNDO_TYPE_EDIT); } for (i = 0; i < num; i++) { double wd; getobj(obj, "min", array[i], 0, NULL, &min); getobj(obj, "max", array[i], 0, NULL, &max); wd = (max - min) / 2; if (wd != 0) { char *argv[4]; double mid; mid = (min + max) / 2; min = mid - wd * zoom; max = mid + wd * zoom; room = 0; argv[0] = (char *) &min; argv[1] = (char *) &max; argv[2] = (char *) &room; argv[3] = NULL; exeobj(obj, "scale", array[i], 3, argv); set_graph_modified(); } } AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } arraydel(&farray); } } static void axiswin_scale_clear(GtkMenuItem *item, gpointer user_data) { struct obj_list_data *d; struct objlist *obj; int sel, num; if (Menulock || Globallock) return; obj = chkobject("axis"); if (obj == NULL) return; d = (struct obj_list_data *) user_data; sel = list_store_get_selected_int(d->text, AXIS_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) { axis_save_undo(UNDO_TYPE_CLEAR_SCALE); d->setup_dialog(d, sel, -1); d->select = sel; axis_scale_push(obj, sel); exeobj(obj, "clear", sel, 0, NULL); set_graph_modified(); d->update(d, FALSE, TRUE); } } void CmAxisClear(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("scale clear (multi select)"), AxisCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int *array, num, i; num = arraynum(&farray); array = arraydata(&farray); if (num > 0) { axis_save_undo(UNDO_TYPE_CLEAR_SCALE); } for (i = 0; i < num; i++) { axis_scale_push(obj, array[i]); exeobj(obj, "clear", array[i], 0, NULL); set_graph_modified(); } AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } arraydel(&farray); } void update_viewer_axisgrid(void) { char const *objects[2]; objects[0] = "axisgrid"; objects[1] = NULL; ViewerWinUpdate(objects); } void CmAxisGridNew(void *w, gpointer client_data) { struct objlist *obj; int id, ret, undo; if (Menulock || Globallock) return; if ((obj = chkobject("axisgrid")) == NULL) return; undo = menu_save_undo_single(UNDO_TYPE_CREATE, "axisgrid"); id = newobj(obj); if (id < 0) { menu_delete_undo(undo); return; } GridDialog(&DlgGrid, obj, id); ret = DialogExecute(TopLevel, &DlgGrid); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); update_viewer_axisgrid(); } } void CmAxisGridDel(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("axisgrid")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("delete grid (multi select)"), GridCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i, num, *array; num = arraynum(&farray); if (num > 0) { menu_save_undo_single(UNDO_TYPE_DELETE, "axisgrid"); } array = arraydata(&farray); for (i = num - 1; i >= 0; i--) { delobj(obj, array[i]); set_graph_modified(); } update_viewer_axisgrid(); } arraydel(&farray); } void CmAxisGridUpdate(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("axisgrid")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("grid property (multi select)"), GridCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int *array, num; int i; num = arraynum(&farray); if (num > 0) { menu_save_undo_single(UNDO_TYPE_EDIT, "axisgrid"); } array = arraydata(&farray); for (i = 0; i < num; i++) { int ret; GridDialog(&DlgGrid, obj, array[i]); ret = DialogExecute(TopLevel, &DlgGrid); if (ret == IDDELETE) { int j; delobj(obj, array[i]); set_graph_modified(); for (j = i + 1; j < num; j++) { array[j]--; } } } update_viewer_axisgrid(); } arraydel(&farray); } void AxisWinUpdate(struct obj_list_data *d, int clear, int draw) { if (Menulock || Globallock) return; if (d == NULL) return; if (list_sub_window_must_rebuild(d)) { list_sub_window_build(d, axis_list_set_val); } else { list_sub_window_set(d, axis_list_set_val); } if (! clear && d->select >= 0) { list_store_select_int(GTK_WIDGET(d->text), AXIS_WIN_COL_ID, d->select); } if (draw) { char const *objects[4]; // NgraphApp.Viewer.allclear = TRUE; objects[0] = d->obj->name; objects[1] = "axisgrid"; objects[2] = (draw == DRAW_AXIS_ONLY) ? NULL : NgraphApp.FileWin.data.data->obj->name; objects[3] = NULL; ViewerWinUpdate(objects); } } static void AxisDelCB(struct obj_list_data *data, int id) { AxisDel(id); } static void axis_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx; unsigned int i; double min, max, inc; char buf[256], *valstr; int style; for (i = 0; i < AXIS_WIN_COL_NUM; i++) { switch (i) { case AXIS_WIN_COL_NAME: getobj(d->obj, "group", row, 0, NULL, &valstr); if (valstr) { list_store_set_string(GTK_WIDGET(d->text), iter, i, valstr); } else { list_store_set_string(GTK_WIDGET(d->text), iter, i, "....."); } break; case AXIS_WIN_COL_MIN: getobj(d->obj, "min", row, 0, NULL, &min); break; case AXIS_WIN_COL_MAX: getobj(d->obj, "max", row, 0, NULL, &max); if ((min == 0) && (max == 0)) { list_store_set_string(GTK_WIDGET(d->text), iter, i - 1, FILL_STRING); list_store_set_string(GTK_WIDGET(d->text), iter, i, FILL_STRING); } else { snprintf(buf, sizeof(buf), "%g", min); list_store_set_string(GTK_WIDGET(d->text), iter, i - 1, buf); snprintf(buf, sizeof(buf), "%g", max); list_store_set_string(GTK_WIDGET(d->text), iter, i, buf); } break; case AXIS_WIN_COL_TYPE: sgetobjfield(d->obj, row, "type", NULL, &valstr, FALSE, FALSE, FALSE); if (valstr) { list_store_set_string(GTK_WIDGET(d->text), iter, i, _(valstr)); g_free(valstr); } break; case AXIS_WIN_COL_INC: getobj(d->obj, "inc", row, 0, NULL, &inc); if (inc == 0) { list_store_set_string(GTK_WIDGET(d->text), iter, i, FILL_STRING); } else { snprintf(buf, sizeof(buf), "%g", inc); list_store_set_string(GTK_WIDGET(d->text), iter, i, buf); } break; case AXIS_WIN_COL_HIDDEN: getobj(d->obj, Alist[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_val(GTK_WIDGET(d->text), iter, i, Alist[i].type, &cx); break; case AXIS_WIN_COL_MATH: getobj(d->obj, Alist[i].name, row, 0, NULL, &valstr); if (valstr) { style = PANGO_STYLE_ITALIC; } else { style = PANGO_STYLE_NORMAL; } list_store_set_int(GTK_WIDGET(d->text), iter, i, style); break; default: if (Alist[i].type == G_TYPE_DOUBLE) { getobj(d->obj, Alist[i].name, row, 0, NULL, &cx); list_store_set_double(GTK_WIDGET(d->text), iter, i, cx / 100.0); } else { getobj(d->obj, Alist[i].name, row, 0, NULL, &cx); list_store_set_val(GTK_WIDGET(d->text), iter, i, Alist[i].type, &cx); } } } } static int check_axis_history(struct objlist *obj) { struct narray *array; int num, n, i; n = chkobjlastinst(obj); if (n < 0) return 0; num = 0; for (i = 0; i <= n; i++) { getobj(obj, "scale_history", i, 0, NULL, &array); num += arraynum(array) / 3; } return num; } int axis_check_history(void) { struct objlist *obj; obj = chkobject("axis"); if (obj == NULL) { return FALSE; } return check_axis_history(obj); } void CmAxisScaleUndo(void *w, gpointer client_data) { struct objlist *obj; struct narray farray; if (Menulock || Globallock) return; if ((obj = chkobject("axis")) == NULL) return; if (check_axis_history(obj) == 0) return; SelectDialog(&DlgSelect, obj, _("scale undo (multi select)"), AxisHistoryCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i, n, num, *array; char *argv[1]; num = arraynum(&farray); if (num > 0) { axis_save_undo(UNDO_TYPE_UNDO_SCALE); } array = arraydata(&farray); for (i = num - 1; i >= 0; i--) { argv[0] = NULL; exeobj(obj, "scale_pop", array[i], 0, argv); set_graph_modified(); } n = check_axis_history(obj); set_axis_undo_button_sensitivity(n > 0); AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, TRUE); } arraydel(&farray); } static void popup_show_cb(GtkWidget *widget, gpointer user_data) { unsigned int i; int sel, num, last_id; struct obj_list_data *d; d = (struct obj_list_data *) user_data; sel = d->select; num = chkobjlastinst(d->obj); for (i = 1; i < POPUP_ITEM_NUM; i++) { switch (i) { case POPUP_ITEM_FOCUS_ALL: last_id = chkobjlastinst(d->obj); gtk_widget_set_sensitive(d->popup_item[i], last_id >= 0); break; case POPUP_ITEM_TOP: case POPUP_ITEM_UP: gtk_widget_set_sensitive(d->popup_item[i], sel > 0 && sel <= num); break; case POPUP_ITEM_DOWN: case POPUP_ITEM_BOTTOM: gtk_widget_set_sensitive(d->popup_item[i], sel >= 0 && sel < num); break; default: gtk_widget_set_sensitive(d->popup_item[i], sel >= 0 && sel <= num); } } } enum CHANGE_DIR { CHANGE_DIR_X, CHANGE_DIR_Y, }; static void pos_edited_common(struct obj_list_data *d, int id, char *str, enum CHANGE_DIR dir) { int x, y, pos1, pos2, man, ecode; double val; char *argv[3]; if (str == NULL || id < 0) { menu_lock(FALSE); return; } switch (dir) { case CHANGE_DIR_X: getobj(d->obj, "x", id, 0, NULL, &pos1); break; case CHANGE_DIR_Y: getobj(d->obj, "y", id, 0, NULL, &pos1); break; } ecode = str_calc(str, &val, NULL, NULL); menu_lock(FALSE); if (ecode || val != val || val == HUGE_VAL || val == - HUGE_VAL) { return; } pos2 = nround(val * 100); if (pos1 == pos2) { return; } switch (dir) { case CHANGE_DIR_X: x = (pos2 - pos1); y = 0; break; case CHANGE_DIR_Y: x = 0; y = (pos2 - pos1); break; } argv[0] = (char *) &x; argv[1] = (char *) &y; argv[2] = NULL; getobj(d->obj, "group_manager", id, 0, NULL, &man); if (man >= 0) { axis_save_undo(UNDO_TYPE_EDIT); exeobj(d->obj, "move", man, 2, argv); set_graph_modified(); AxisWinUpdate(d, TRUE, DRAW_REDRAW); } } static void pos_x_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { struct obj_list_data *d; int sel; d = (struct obj_list_data *) user_data; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); pos_edited_common(d, sel, str, CHANGE_DIR_X); } static void pos_y_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { struct obj_list_data *d; int sel; d = (struct obj_list_data *) user_data; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); pos_edited_common(d, sel, str, CHANGE_DIR_Y); } static void axis_prm_edited_common(struct obj_list_data *d, char *field, gchar *str) { int sel, num; sel = list_store_get_selected_int(GTK_WIDGET(d->text), COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) { menu_lock(FALSE); return; } axis_save_undo(UNDO_TYPE_EDIT); axis_scale_push(d->obj, sel); if (chk_sputobjfield(d->obj, sel, field, str)) { menu_lock(FALSE); return; } menu_lock(FALSE); d->select = sel; d->update(d, FALSE, TRUE); } static void min_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { axis_prm_edited_common((struct obj_list_data *) user_data, "min", str); } static void max_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { axis_prm_edited_common((struct obj_list_data *) user_data, "max", str); } static void inc_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { axis_prm_edited_common((struct obj_list_data *) user_data, "inc", str); } enum AXIS_COMBO_ITEM { AXIS_COMBO_ITEM_SCALE, AXIS_COMBO_ITEM_BASE_DRAW, AXIS_COMBO_ITEM_BASE_COLOR, AXIS_COMBO_ITEM_BASE_STYLE, AXIS_COMBO_ITEM_BASE_ARROW, AXIS_COMBO_ITEM_BASE_WAVE, AXIS_COMBO_ITEM_GAUGE_POS, AXIS_COMBO_ITEM_GAUGE_COLOR, AXIS_COMBO_ITEM_GAUGE_STYLE, AXIS_COMBO_ITEM_NUM_POS, AXIS_COMBO_ITEM_NUM_ALIGN, AXIS_COMBO_ITEM_NUM_DIR, AXIS_COMBO_ITEM_NUM_LOG, AXIS_COMBO_ITEM_NUM_NO_ZERO, AXIS_COMBO_ITEM_NUM_COLOR, AXIS_COMBO_ITEM_NUM_FONT, AXIS_COMBO_ITEM_NUM_BOLD, AXIS_COMBO_ITEM_NUM_ITALIC, }; static void create_base_combo_item(GtkTreeStore *list, GtkTreeIter *parent, struct objlist *obj, int id) { GtkTreeIter iter, child; gtk_tree_store_append(list, &iter, parent); gtk_tree_store_set(list, &iter, OBJECT_COLUMN_TYPE_STRING, _("Baseline"), OBJECT_COLUMN_TYPE_PIXBUF, NULL, OBJECT_COLUMN_TYPE_INT, -1, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, FALSE, OBJECT_COLUMN_TYPE_PIXBUF_VISIBLE, FALSE, -1); add_bool_combo_item_to_cbox(list, NULL, &iter, AXIS_COMBO_ITEM_BASE_DRAW, obj, "baseline", id, _("Draw")); add_line_style_item_to_cbox(list, &iter, AXIS_COMBO_ITEM_BASE_STYLE, obj, "style", id); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Arrow"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_BASE_ARROW, obj, "arrow", id); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Wave"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_BASE_WAVE, obj, "wave", id); add_text_combo_item_to_cbox(list, NULL, &iter, AXIS_COMBO_ITEM_BASE_COLOR, -1, _("Color"), TOGGLE_NONE, FALSE); } static void create_gauge_combo_item(GtkTreeStore *list, GtkTreeIter *parent, struct objlist *obj, int id) { GtkTreeIter iter, child; gtk_tree_store_append(list, &iter, parent); gtk_tree_store_set(list, &iter, OBJECT_COLUMN_TYPE_STRING, _("Gauge"), OBJECT_COLUMN_TYPE_PIXBUF, NULL, OBJECT_COLUMN_TYPE_INT, -1, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, FALSE, OBJECT_COLUMN_TYPE_PIXBUF_VISIBLE, FALSE, -1); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Position"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_GAUGE_POS, obj, "gauge", id); add_line_style_item_to_cbox(list, &iter, AXIS_COMBO_ITEM_GAUGE_STYLE, obj, "gauge_style", id); add_text_combo_item_to_cbox(list, NULL, &iter, AXIS_COMBO_ITEM_GAUGE_COLOR, -1, _("Color"), TOGGLE_NONE, FALSE); } static void create_num_combo_item(GtkTreeStore *list, GtkTreeIter *parent, struct objlist *obj, int id) { GtkTreeIter iter, child; gtk_tree_store_append(list, &iter, parent); gtk_tree_store_set(list, &iter, OBJECT_COLUMN_TYPE_STRING, _("Numbering"), OBJECT_COLUMN_TYPE_PIXBUF, NULL, OBJECT_COLUMN_TYPE_INT, -1, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, FALSE, OBJECT_COLUMN_TYPE_PIXBUF_VISIBLE, FALSE, -1); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Position"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_NUM_POS, obj, "num", id); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Align"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_NUM_ALIGN, obj, "num_align", id); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Direction"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_NUM_DIR, obj, "num_direction", id); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Font"), TOGGLE_NONE, FALSE); add_font_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_NUM_FONT, obj, "num_font", id); add_separator_combo_item_to_cbox(list, NULL, &child); add_font_style_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_NUM_BOLD, AXIS_COMBO_ITEM_NUM_ITALIC, obj, "num_font_style", id); add_text_combo_item_to_cbox(list, NULL, &iter, AXIS_COMBO_ITEM_NUM_COLOR, -1, _("Color"), TOGGLE_NONE, FALSE); add_bool_combo_item_to_cbox(list, NULL, &iter, AXIS_COMBO_ITEM_NUM_LOG, obj, "num_log_pow", id, _("Log power")); add_text_combo_item_to_cbox(list, &child, &iter, -1, -1, _("Zero"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &child, AXIS_COMBO_ITEM_NUM_NO_ZERO, obj, "num_no_zero", id); } static void create_type_combo_box(GtkWidget *cbox, struct objlist *obj, int id) { GtkTreeStore *list; GtkTreeIter iter; list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); gtk_tree_store_clear(list); add_text_combo_item_to_cbox(list, &iter, NULL, -1, -1, _("Scale"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &iter, AXIS_COMBO_ITEM_SCALE, obj, "type", id); create_base_combo_item(list, NULL, obj, id); create_gauge_combo_item(list, NULL, obj, id); create_num_combo_item(list, NULL, obj, id); } static int set_enum_field(const char *field, int sel, int enum_id, struct obj_list_data *d) { int type; getobj(d->obj, field, sel, 0, NULL, &type); if (type == enum_id) { return 1; } axis_save_undo(UNDO_TYPE_EDIT); putobj(d->obj, field, sel, &enum_id); return 0; } static void select_type(GtkComboBox *w, gpointer user_data) { int sel, col_type, type, enum_id, found, active, style, draw; struct obj_list_data *d; GtkTreeStore *list; GtkTreeIter iter; char *font, *ptr; N_VALUE *inst; menu_lock(FALSE); d = (struct obj_list_data *) user_data; sel = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); if (sel < 0) return; list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(w))); found = gtk_combo_box_get_active_iter(w, &iter); if (! found) return; gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_INT, &col_type, OBJECT_COLUMN_TYPE_ENUM, &enum_id, -1); draw = DRAW_AXIS_ONLY; switch (col_type) { case AXIS_COMBO_ITEM_SCALE: if (set_enum_field("type", sel, enum_id, d)) { return; } draw = DRAW_REDRAW; break; case AXIS_COMBO_ITEM_BASE_DRAW: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); axis_save_undo(UNDO_TYPE_EDIT); active = ! active; putobj(d->obj, "baseline", sel, &active); break; case AXIS_COMBO_ITEM_BASE_COLOR: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_AXIS_BASE)) { return; } break; case AXIS_COMBO_ITEM_BASE_STYLE: if (enum_id < 0 || enum_id >= FwNumStyleNum) { return; } axis_save_undo(UNDO_TYPE_EDIT); if (chk_sputobjfield(d->obj, sel, "style", FwLineStyle[enum_id].list) != 0) { return; } if (! get_graph_modified()) { return; } break; case AXIS_COMBO_ITEM_BASE_ARROW: if (set_enum_field("arrow", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_BASE_WAVE: if (set_enum_field("wave", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_GAUGE_POS: if (set_enum_field("gauge", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_GAUGE_COLOR: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_AXIS_GAUGE)) { return; } break; case AXIS_COMBO_ITEM_GAUGE_STYLE: if (enum_id < 0 || enum_id >= FwNumStyleNum) { return; } axis_save_undo(UNDO_TYPE_EDIT); if (chk_sputobjfield(d->obj, sel, "gauge_style", FwLineStyle[enum_id].list) != 0) { return; } if (! get_graph_modified()) { return; } break; case AXIS_COMBO_ITEM_NUM_POS: if (set_enum_field("num", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_NUM_ALIGN: if (set_enum_field("num_align", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_NUM_DIR: if (set_enum_field("num_direction", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_NUM_LOG: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); axis_save_undo(UNDO_TYPE_EDIT); active = ! active; putobj(d->obj, "num_log_pow", sel, &active); break; case AXIS_COMBO_ITEM_NUM_NO_ZERO: if (set_enum_field("num_no_zero", sel, enum_id, d)) { return; } break; case AXIS_COMBO_ITEM_NUM_COLOR: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_AXIS_NUM)) { return; } break; case AXIS_COMBO_ITEM_NUM_FONT: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_STRING, &font, -1); getobj(d->obj, "num_font", sel, 0, NULL, &ptr); if (g_strcmp0(font, ptr) == 0) { g_free(font); return; } axis_save_undo(UNDO_TYPE_EDIT); putobj(d->obj, "num_font", sel, font); break; case AXIS_COMBO_ITEM_NUM_BOLD: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); axis_save_undo(UNDO_TYPE_EDIT); inst = chkobjinst(d->obj, sel); type = get_font_style(d->obj, inst, "num_font_style", "num_font"); style = (type & GRA_FONT_STYLE_ITALIC) | (active ? 0 : GRA_FONT_STYLE_BOLD); putobj(d->obj, "num_font_style", sel, &style); break; case AXIS_COMBO_ITEM_NUM_ITALIC: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); axis_save_undo(UNDO_TYPE_EDIT); inst = chkobjinst(d->obj, sel); type = get_font_style(d->obj, inst, "num_font_style", "num_font"); style = (type & GRA_FONT_STYLE_BOLD) | (active ? 0 : GRA_FONT_STYLE_ITALIC); putobj(d->obj, "num_font_style", sel, &style); break; default: return; } d->select = sel; d->update(d, FALSE, draw); set_graph_modified(); } static void start_editing_type(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path, gpointer user_data) { GtkTreeIter iter; struct obj_list_data *d; GtkWidget *cbox; int sel; struct objlist *obj; menu_lock(TRUE); d = (struct obj_list_data *) user_data; sel = tree_view_get_selected_row_int_from_path(d->text, path, &iter, AXIS_WIN_COL_ID); if (sel < 0) { return; } cbox = GTK_WIDGET(editable); g_object_set_data(G_OBJECT(cbox), "user-data", GINT_TO_POINTER(sel)); init_object_combo_box(cbox); obj = getobject("axis"); if (obj == NULL) { return; } create_type_combo_box(cbox, obj, sel); g_signal_connect(cbox, "editing-done", G_CALLBACK(select_type), d); gtk_widget_show(cbox); return; } static void axiswin_delete_axis(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), AXIS_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) { axis_save_undo(UNDO_TYPE_DELETE); AxisDel(sel); AxisWinUpdate(d, TRUE, DRAW_REDRAW); FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, FALSE); set_graph_modified(); d->select = -1; } } static void axis_delete_popup_func(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data *) client_data; axiswin_delete_axis(d); } static void AxisWinAxisTop(GtkWidget *w, gpointer client_data) { int sel, num; struct obj_list_data *d; d = (struct obj_list_data *) client_data; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), AXIS_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) { axis_save_undo(UNDO_TYPE_ORDER); movetopobj(d->obj, sel); d->select = 0; AxisMove(sel,0); AxisWinUpdate(d, FALSE, FALSE); FileWinUpdate(NgraphApp.FileWin.data.data, FALSE, FALSE); set_graph_modified(); } } static void AxisWinAxisLast(GtkWidget *w, gpointer client_data) { int sel, num; struct obj_list_data *d; d = (struct obj_list_data *) client_data; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), AXIS_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) { axis_save_undo(UNDO_TYPE_ORDER); movelastobj(d->obj, sel); d->select = num; AxisMove(sel, num); AxisWinUpdate(d, FALSE, FALSE); FileWinUpdate(NgraphApp.FileWin.data.data, FALSE, FALSE); set_graph_modified(); } } static void AxisWinAxisUp(GtkWidget *w, gpointer client_data) { int sel, num; struct obj_list_data *d; d = (struct obj_list_data *) client_data; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), AXIS_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 1) && (sel <= num)) { axis_save_undo(UNDO_TYPE_ORDER); moveupobj(d->obj, sel); d->select = sel - 1; AxisMove(sel, sel - 1); AxisWinUpdate(d, FALSE, FALSE); FileWinUpdate(NgraphApp.FileWin.data.data, FALSE, FALSE); set_graph_modified(); } } static void AxisWinAxisDown(GtkWidget *w, gpointer client_data) { int sel, num; struct obj_list_data *d; d = (struct obj_list_data *) client_data; if (Menulock || Globallock) return; UnFocus(); sel = list_store_get_selected_int(GTK_WIDGET(d->text), AXIS_WIN_COL_ID); num = chkobjlastinst(d->obj); if (sel >= 0 && sel <= num-1) { axis_save_undo(UNDO_TYPE_ORDER); movedownobj(d->obj, sel); d->select = sel + 1; AxisMove(sel, sel + 1); AxisWinUpdate(d, FALSE, FALSE); FileWinUpdate(NgraphApp.FileWin.data.data, FALSE, FALSE); set_graph_modified(); } } static gboolean axiswin_ev_key_down(GtkWidget *w, guint keyval, GdkModifierType state, gpointer user_data) { struct obj_list_data *d; g_return_val_if_fail(w != NULL, FALSE); if (Menulock || Globallock) return TRUE; d = (struct obj_list_data *) user_data; switch (keyval) { case GDK_KEY_Delete: axiswin_delete_axis(d); break; case GDK_KEY_Home: if (state & GDK_SHIFT_MASK) { AxisWinAxisTop(w, d); } else { return FALSE; } break; case GDK_KEY_End: if (state & GDK_SHIFT_MASK) { AxisWinAxisLast(w, d); } else { return FALSE; } break; case GDK_KEY_Up: if (state & GDK_SHIFT_MASK) { AxisWinAxisUp(w, d); } else { return FALSE; } break; case GDK_KEY_Down: if (state & GDK_SHIFT_MASK) { AxisWinAxisDown(w, d); } else { return FALSE; } break; default: return FALSE; } return TRUE; } GtkWidget * create_axis_list(struct SubWin *d) { if (d->Win) { return d->Win; } list_sub_window_create(d, AXIS_WIN_COL_NUM, Alist); d->data.data->update = AxisWinUpdate; d->data.data->setup_dialog = AxisDialog; d->data.data->dialog = &DlgAxis; d->data.data->ev_key = axiswin_ev_key_down; d->data.data->delete = AxisDelCB; d->data.data->obj = chkobject("axis"); sub_win_create_popup_menu(d->data.data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_editable_cell_renderer_cb(d->data.data, AXIS_WIN_COL_X, Alist, G_CALLBACK(pos_x_edited)); set_editable_cell_renderer_cb(d->data.data, AXIS_WIN_COL_Y, Alist, G_CALLBACK(pos_y_edited)); set_editable_cell_renderer_cb(d->data.data, AXIS_WIN_COL_MIN, Alist, G_CALLBACK(min_edited)); set_editable_cell_renderer_cb(d->data.data, AXIS_WIN_COL_MAX, Alist, G_CALLBACK(max_edited)); set_editable_cell_renderer_cb(d->data.data, AXIS_WIN_COL_INC, Alist, G_CALLBACK(inc_edited)); set_cell_attribute_source(d, "style", AXIS_WIN_COL_NAME, AXIS_WIN_COL_MATH); set_cell_attribute_source(d, "style", AXIS_WIN_COL_MIN, AXIS_WIN_COL_MATH); set_cell_attribute_source(d, "style", AXIS_WIN_COL_MAX, AXIS_WIN_COL_MATH); set_cell_attribute_source(d, "style", AXIS_WIN_COL_INC, AXIS_WIN_COL_MATH); set_combo_cell_renderer_cb(d->data.data, AXIS_WIN_COL_TYPE, Alist, G_CALLBACK(start_editing_type), NULL); list_store_set_align(GTK_WIDGET(d->data.data->text), AXIS_WIN_COL_MIN, 1.0); list_store_set_align(GTK_WIDGET(d->data.data->text), AXIS_WIN_COL_MAX, 1.0); list_store_set_align(GTK_WIDGET(d->data.data->text), AXIS_WIN_COL_INC, 1.0); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(d->data.data->text), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(d->data.data->text), AXIS_WIN_COL_NAME); tree_view_set_tooltip_column(GTK_TREE_VIEW(d->data.data->text), AXIS_WIN_COL_NAME); return d->Win; } ngraph-gtk-6.09.05/src/gtk/ox11menu.c0000644000175000017500000014145014121337554014065 00000000000000/* * $Id: ox11menu.c,v 1.90 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for GTK". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for GTK" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for GTK" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "object.h" #include "odraw.h" #include "ioutil.h" #include "shell.h" #include "nstring.h" #include "nconfig.h" #include "mathfn.h" #include "gra.h" #include "spline.h" #include "strconv.h" #include "gtk_widget.h" #include "gtk_subwin.h" #include "init.h" #include "ogra2cairo.h" #include "ogra2x11.h" #include "ox11menu.h" #include "x11menu.h" #include "x11gui.h" #include "x11view.h" #include "x11graph.h" #include "x11print.h" #include "x11merge.h" #include "x11lgnd.h" #include "x11axis.h" #include "x11file.h" #include "x11cood.h" #include "x11info.h" #define NAME "menu" #define ALIAS "winmenu:gtkmenu" #define PARENT "gra2cairo" #define NVERSION "1.00.00" #define MGTKCONF "[x11menu]" #define G2WINCONF "[gra2gtk]" static char *menuerrorlist[] = { "running.", "cannot open the display.", "cannot open the file", "the GUI is not active", }; #define ERRNUM (sizeof(menuerrorlist) / sizeof(*menuerrorlist)) enum { ERR_MENU_RUN = 100, ERR_MENU_DISPLAY, ERR_MENU_OPEN_FILE, ERR_MENU_GUI, }; struct menulocal Menulocal; struct savedstdio GtkIOSave; static int mxflush(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv); enum menu_config_type { MENU_CONFIG_TYPE_NUMERIC, MENU_CONFIG_TYPE_BOOL, MENU_CONFIG_TYPE_STRING, MENU_CONFIG_TYPE_WINDOW, MENU_CONFIG_TYPE_COLOR, MENU_CONFIG_TYPE_COLOR_ARY, MENU_CONFIG_TYPE_SCRIPT, MENU_CONFIG_TYPE_CHARMAP, }; static int menu_config_set_custom_palette(char *s2, void *data); static int menu_config_set_four_elements(char *s2, void *data); static int menu_config_set_bgcolor(char *s2, void *data); static int menu_config_set_script(char *s2, void *data); static int menu_config_set_char_map(char *s2, void *data); static int *menu_config_menu_geometry[] = { &Menulocal.menux, &Menulocal.menuy, &Menulocal.menuwidth, &Menulocal.menuheight, }; struct menu_config { char *name; enum menu_config_type type; int (* proc)(char *, void *); void *data; }; static struct menu_config MenuConfig[] = { {"script_console", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.scriptconsole}, {"addin_console", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.addinconsole}, {"show_tip", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.showtip}, {"character_map", MENU_CONFIG_TYPE_CHARMAP, menu_config_set_char_map, &Menulocal.char_map}, {"help_file", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.help_file}, {NULL}, }; static struct menu_config MenuConfigScript[] = { {"script", MENU_CONFIG_TYPE_SCRIPT, menu_config_set_script, NULL}, {NULL}, }; static struct menu_config MenuConfigMisc[] = { {"editor", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.editor}, {"browser", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.browser}, {"help_browser", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.help_browser}, {"coordwin_font", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.coordwin_font}, {"infowin_font", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.infowin_font}, {"file_preview_font", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.file_preview_font}, {"change_directory", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.changedirectory}, {"save_path", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.savepath}, {"save_with_data", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.savewithdata}, {"save_with_merge", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.savewithmerge}, {"expand_dir", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.expanddir}, {"expand", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.expand}, {"load_path", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.loadpath}, {"history_size", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.hist_size}, {"infowin_size", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.info_size}, {"data_head_lines", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.data_head_lines}, {"use_opacity", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.use_opacity}, {"select_data_on_export", MENU_CONFIG_TYPE_BOOL, NULL, &Menulocal.select_data}, {"use_custom_palette", MENU_CONFIG_TYPE_BOOL, NULL, &Menulocal.use_custom_palette}, {"custom_palette", MENU_CONFIG_TYPE_COLOR_ARY, menu_config_set_custom_palette, NULL}, {"sourece_style_id", MENU_CONFIG_TYPE_STRING, NULL, &Menulocal.source_style_id}, {"decimalsign", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.default_decimalsign}, {"use_dark_theme", MENU_CONFIG_TYPE_BOOL, NULL, &Menulocal.use_dark_theme}, {NULL}, }; static struct menu_config MenuConfigViewer[] = { {"viewer_dpi", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.windpi}, {"antialias", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.antialias}, {"viewer_load_file_on_redraw", MENU_CONFIG_TYPE_BOOL, NULL, &Menulocal.redrawf}, {"viewer_load_file_data_number", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.redrawf_num}, {"viewer_grid", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.grid}, {"focus_frame_type", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.focus_frame_type}, {"preserve_width", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.preserve_width}, {"background_color", MENU_CONFIG_TYPE_COLOR, menu_config_set_bgcolor, NULL}, {NULL}, }; static struct menu_config MenuConfigToggleView[] = { {"viewer_show_ruler", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.ruler}, {"sidebar", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.sidebar}, {"status_bar", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.statusbar}, {"scrollbar", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.scrollbar}, {"command_toolbar", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.ctoolbar}, {"pointer_toolbar", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.ptoolbar}, {"cross_gauge", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.show_cross}, {"show_grid", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.show_grid}, {NULL}, }; static struct menu_config MenuConfigOthers[] = { {"png_dpi", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.png_dpi}, #if WINDOWS {"emf_dpi", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.emf_dpi}, #endif {"ps_version", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.ps_version}, {"svg_version", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.svg_version}, {"main_pane", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.main_pane_pos}, {"side_pane1", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.side_pane1_pos}, {"side_pane2", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.side_pane2_pos}, {"side_pane3", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.side_pane3_pos}, {"file_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.file_tab}, {"axis_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.axis_tab}, {"merge_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.merge_tab}, {"path_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.path_tab}, {"rectangle_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.rectangle_tab}, {"arc_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.arc_tab}, {"mark_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.mark_tab}, {"text_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.text_tab}, {"parameter_tab", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.parameter_tab}, {"math_input_mode", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.math_input_mode}, {NULL}, }; static struct menu_config MenuConfigGeometry[] = { {"menu_win", MENU_CONFIG_TYPE_WINDOW, menu_config_set_four_elements, menu_config_menu_geometry}, {NULL}, }; static struct menu_config MenuConfigExtView[] = { {"extwin_dpi", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.exwindpi}, {"extwin_width", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.exwinwidth}, {"extwin_height", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.exwinheight}, {"use_external_viewer", MENU_CONFIG_TYPE_NUMERIC, NULL, &Menulocal.exwin_use_external}, {NULL}, }; static struct menu_config *MenuConfigArrray[] = { MenuConfig, MenuConfigScript, MenuConfigMisc, MenuConfigViewer, MenuConfigToggleView, MenuConfigOthers, MenuConfigGeometry, MenuConfigExtView, NULL, }; static NHASH MenuConfigHash = NULL; static void add_str_with_int_to_array(struct menu_config *cfg, struct narray *conf) { char *buf; buf = g_strdup_printf("%s=%d", cfg->name, * (int *) cfg->data); if (buf) { arrayadd(conf, &buf); } } static void add_geometry_to_array(struct menu_config *cfg, struct narray *conf) { char *buf; gint x, y, w, h; get_window_geometry(TopLevel, &x, &y, &w, &h); Menulocal.menux = x; Menulocal.menuy = y; Menulocal.menuwidth = w; Menulocal.menuheight = h; buf = g_strdup_printf("%s=%d,%d,%d,%d", cfg->name, Menulocal.menux, Menulocal.menuy, Menulocal.menuwidth, Menulocal.menuheight); if (buf) { arrayadd(conf, &buf); } } static void add_color_to_array(struct menu_config *cfg, struct narray *conf) { char *buf; buf = g_strdup_printf("%s=%02x%02x%02x", cfg->name, (int) (Menulocal.bg_r * 255), (int) (Menulocal.bg_g * 255), (int) (Menulocal.bg_b * 255)); if (buf) { arrayadd(conf, &buf); } } static void add_color_ary_to_array(struct menu_config *cfg, struct narray *conf) { GString *str; char *buf; struct narray *palette; int i, n; GdkRGBA *color; palette = &(Menulocal.custom_palette); n = arraynum(palette); if (n < 1) { return; } str = g_string_new(cfg->name); g_string_append_c(str, '='); for (i = 0; i < n; i++) { unsigned int r, g, b, a; color = arraynget(palette, i); r = color->red * 0xff; g = color->green * 0xff; b = color->blue * 0xff; a = color->alpha * 0xff; g_string_append_printf(str, "%02x%02x%02x%02x%s", r, g, b, a, (i == n -1) ? "\n" : ","); } buf = g_string_free(str, FALSE); if (buf) { arrayadd(conf, &buf); } } static void add_prm_str_to_array(struct menu_config *cfg, struct narray *conf) { char *buf, *prm; prm = CHK_STR(* (char **) cfg->data); buf = g_strdup_printf("%s=%s", cfg->name, prm); if (buf) { arrayadd(conf, &buf); } } static void save_char_map_config(struct narray *conf) { char *buf; struct character_map_list *pcur; pcur = Menulocal.char_map; while (pcur) { char *title, *data; title = CHK_STR(pcur->title); data = CHK_STR(pcur->data); buf = g_strdup_printf("character_map=%s,%s", title, data); if (buf) { arrayadd(conf, &buf); } pcur = pcur->next; } } static void save_script_config(struct narray *conf) { char *buf; struct script *scur; scur = Menulocal.scriptroot; while (scur) { char *script, *option, *description; script = CHK_STR(scur->script); option = CHK_STR(scur->option); description = CHK_STR(scur->description); buf = g_strdup_printf("script=%s,%s,%s,%s", scur->name, script, description, option); if (buf) { arrayadd(conf, &buf); } scur = scur->next; } } static void add_str_to_array(struct narray *conf, char *str) { char *buf; buf = g_strdup(str); if (buf) { arrayadd(conf, &buf); } } static void menu_save_config_sub(struct menu_config *cfg, struct narray *conf) { int i; for (i = 0; cfg[i].name; i++) { switch (cfg[i].type) { case MENU_CONFIG_TYPE_NUMERIC: case MENU_CONFIG_TYPE_BOOL: add_str_with_int_to_array(cfg + i, conf); break; case MENU_CONFIG_TYPE_COLOR: add_color_to_array(cfg + i, conf); break; case MENU_CONFIG_TYPE_COLOR_ARY: add_color_ary_to_array(cfg + i, conf); break; case MENU_CONFIG_TYPE_STRING: add_prm_str_to_array(cfg + i, conf); break; case MENU_CONFIG_TYPE_WINDOW: add_geometry_to_array(cfg + i, conf); break; case MENU_CONFIG_TYPE_SCRIPT: save_script_config(conf); break; case MENU_CONFIG_TYPE_CHARMAP: save_char_map_config(conf); break; } } } int menu_save_config(int type) { struct narray conf; arrayinit(&conf, sizeof(char *)); if (type & SAVE_CONFIG_TYPE_GEOMETRY) { menu_save_config_sub(MenuConfigGeometry, &conf); } if (type & SAVE_CONFIG_TYPE_VIEWER) { menu_save_config_sub(MenuConfigViewer, &conf); } if (type & SAVE_CONFIG_TYPE_EXTERNAL_VIEWER) { menu_save_config_sub(MenuConfigExtView, &conf); } if (type & SAVE_CONFIG_TYPE_TOGGLE_VIEW) { menu_save_config_sub(MenuConfigToggleView, &conf); } if (type & SAVE_CONFIG_TYPE_OTHERS) { menu_save_config_sub(MenuConfigOthers, &conf); } if (type & SAVE_CONFIG_TYPE_ADDIN_SCRIPT) { menu_save_config_sub(MenuConfigScript, &conf); } if (type & SAVE_CONFIG_TYPE_MISC) { menu_save_config_sub(MenuConfigMisc, &conf); } replaceconfig(MGTKCONF, &conf); arraydel2(&conf); arrayinit(&conf, sizeof(char *)); if (type & SAVE_CONFIG_TYPE_ADDIN_SCRIPT) { if (Menulocal.scriptroot == NULL) { add_str_to_array(&conf, "script"); } } removeconfig(MGTKCONF, &conf); arraydel2(&conf); return 0; } static int menu_config_set_four_elements(char *s2, void *data) { int len, i, val, **ary; char *endptr, *f[] = {NULL, NULL, NULL, NULL}; if (data == NULL) return 0; ary = (int **) data; for (i = 0; i < 4; i++) { f[i] = getitok2(&s2, &len, " \t,"); if (f[i] == NULL) goto End; } for (i = 0; i < 4; i++) { val = strtol(f[i], &endptr, 10); if (endptr[0] == '\0' && val != 0) { *(ary[i]) = val; } } End: for (i = 0; i < 4; i++) { g_free(f[i]); } return 0; } static int menu_config_set_bgcolor(char *s2, void *data) { char *f1, *endptr; int len, val; f1 = getitok2(&s2, &len, " \t,"); val = strtol(f1, &endptr, 16); if (endptr[0] == '\0') { Menulocal.bg_r = ((val >> 16) & 0xffU) / 255.0; Menulocal.bg_g = ((val >> 8) & 0xffU) / 255.0; Menulocal.bg_b = (val & 0xffU) / 255.0; } g_free(f1); return 0; } static int menu_config_set_custom_palette(char *s2, void *data) { gchar **colors, **ptr; unsigned int r, g, b, a; struct narray *palette; GdkRGBA color; colors = g_strsplit(s2, ",", 0); if (colors == NULL) { return 0; } palette = &(Menulocal.custom_palette); arrayclear(palette); ptr = colors; while (*ptr) { r = g = b = a = 0xff; sscanf(*ptr, "%02x%02x%02x%02x", &r, &g, &b, &a); color.red = r / 255.0; color.green = g / 255.0; color.blue = b / 255.0; color.alpha = a / 255.0; arrayadd(palette, &color); ptr++; } g_strfreev(colors); return 0; } static int menu_config_set_char_map(char *s2, void *data) { char *title; int len; struct character_map_list *pcur, **pptr; pptr = (struct character_map_list **) data; if (! g_utf8_validate(s2, -1, NULL)) { return 0; } title = getitok2(&s2, &len, ","); g_strstrip(title); for (; (s2[0] != '\0') && (strchr(" \t,", s2[0])); s2++); g_strstrip(s2); pcur = g_malloc(sizeof(*pcur)); if (pcur == NULL) { g_free(title); return 1; } pcur->title = title; pcur->data = g_strdup(s2); pcur->next = *pptr; *pptr = pcur; return 0; } static int menu_config_set_script(char *s2, void *data) { char *f[] = {NULL, NULL, NULL, NULL}; int len; unsigned int i; struct script *snew, *scur, **sptr; sptr = (struct script **) data; scur = *sptr; f[0] = getitok2(&s2, &len, ","); f[1] = getitok2(&s2, &len, ","); f[2] = getitok2(&s2, &len, ","); for (; (s2[0] != '\0') && (strchr(" \t,", s2[0])); s2++); f[3] = getitok2(&s2, &len, ","); if (f[0] && f[1]) { snew = (struct script *) g_malloc(sizeof(struct script)); if (snew == NULL) { for (i = 0; i < sizeof(f) / sizeof(*f); i++) { g_free(f[i]); } return 1; } if (scur == NULL) { Menulocal.scriptroot = snew; } else { scur->next = snew; } *sptr = snew; scur = snew; scur->next = NULL; scur->name = f[0]; scur->script = f[1]; scur->description = f[2]; scur->option = f[3]; } else { for (i = 0; i < sizeof(f) / sizeof(*f); i++) { g_free(f[i]); } } return 0; } static int mgtkloadconfig(void) { FILE *fp; char *tok, *str, *s2; char *f1; int val; char *endptr; int len; struct script *scur; struct menu_config *cfg; fp = openconfig(MGTKCONF); if (fp == NULL) return 0; scur = Menulocal.scriptroot; if (nhash_get_ptr(MenuConfigHash, "script", (void *) &cfg) == 0) { if (cfg) { cfg->data = &scur; } } while ((tok = getconfig(fp, &str))) { s2 = str; if (nhash_get_ptr(MenuConfigHash, tok, (void *) &cfg) == 0 && cfg) { switch (cfg->type) { case MENU_CONFIG_TYPE_NUMERIC: f1 = getitok2(&s2, &len, " \t,"); if (f1) { val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') { * (int *) (cfg->data) = val; } } g_free(f1); break; case MENU_CONFIG_TYPE_BOOL: f1 = getitok2(&s2, &len, " \t,"); if (f1) { val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') { * (int *) (cfg->data) = (val ? 1 : 0); } } g_free(f1); break; case MENU_CONFIG_TYPE_STRING: f1 = getitok2(&s2, &len, ""); if (f1) { g_free(* (char **) (cfg->data)); * (char **) (cfg->data) = f1; } break; case MENU_CONFIG_TYPE_CHARMAP: case MENU_CONFIG_TYPE_COLOR: case MENU_CONFIG_TYPE_COLOR_ARY: case MENU_CONFIG_TYPE_SCRIPT: case MENU_CONFIG_TYPE_WINDOW: if (cfg->proc && cfg->proc(s2, cfg->data)) { g_free(tok); g_free(str); closeconfig(fp); return 1; } break; } } else { fprintf(stderr, "(%s): configuration '%s' in section %s is not used.\n", AppName, tok, MGTKCONF); } g_free(tok); g_free(str); } closeconfig(fp); return 0; } void menuadddrawrable(struct objlist *parent, struct narray *drawrable) { struct objlist *ocur; const char *name; ocur = chkobjroot(); while (ocur) { if (chkobjparent(ocur) == parent) { name = chkobjectname(ocur); arrayadd2(drawrable, name); menuadddrawrable(ocur, drawrable); } ocur = ocur->next; } } static void free_script_list(struct script *script) { struct script *scur; scur = script; while (scur) { struct script *sdel; sdel = scur; scur = scur->next; g_free(sdel->name); g_free(sdel->script); g_free(sdel->description); g_free(sdel->option); g_free(sdel); } } static int free_layers(struct nhash *layers, void *ptr) { struct layer *layer; layer = layers->val.p; if (layer == NULL) { return 0; } cairo_surface_destroy(layer->pix); cairo_destroy(layer->cairo); g_free(layer); return 0; } int select_layer(const char *id) { struct layer *layer; void *ptr; int r; r = nhash_get_ptr(Menulocal.layers, id, &ptr); if (r) { return 1; } layer = ptr; Menulocal.local->cairo = layer->cairo; set_cairo_antialias(layer->cairo, Menulocal.antialias); return 0; } static void create_layer(struct layer *layer, int w, int h) { layer->pix = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); layer->cairo = cairo_create(layer->pix); } void init_layer(const char *obj) { struct layer *layer; void *ptr; int r, w, h; if (Menulocal.pix == NULL) { return; } if (obj == NULL) { return; } w = cairo_image_surface_get_width(Menulocal.pix); h = cairo_image_surface_get_height(Menulocal.pix); r = nhash_get_ptr(Menulocal.layers, obj, &ptr); if (r) { layer = g_malloc(sizeof(*layer)); if (layer == NULL) { return; } create_layer(layer, w, h); nhash_set_ptr(Menulocal.layers, obj, layer); } else { int lw, lh; layer = ptr; lw = cairo_image_surface_get_width(layer->pix); lh = cairo_image_surface_get_height(layer->pix); if (lw != w || lh != h) { cairo_destroy(layer->cairo); cairo_surface_destroy(layer->pix); create_layer(layer, w, h); } } set_cairo_antialias(layer->cairo, Menulocal.antialias); } static void menulocal_finalize(void) { struct character_map_list *cmap, *cmap_tmp; int i, j; struct menu_config *cfg; for (i = 0; (cfg = MenuConfigArrray[i]); i++) { for (j = 0; cfg[j].name; j++) { if (cfg[i].type == MENU_CONFIG_TYPE_STRING) { g_free(* (char **) cfg[i].data); * (char **) cfg[i].data = NULL; } } } cmap = Menulocal.char_map; while (cmap) { cmap_tmp = cmap; cmap = cmap_tmp->next; g_free(cmap_tmp->title); g_free(cmap_tmp->data); g_free(cmap_tmp); } Menulocal.char_map = NULL; free_script_list(Menulocal.scriptroot); Menulocal.scriptroot = NULL; free_script_list(Menulocal.addin_list); Menulocal.addin_list = NULL; if (Menulocal.pix) { cairo_surface_destroy(Menulocal.pix); Menulocal.pix = NULL; } if (Menulocal.bg) { cairo_surface_destroy(Menulocal.bg); Menulocal.bg = NULL; } if (Menulocal.layers) { nhash_each(Menulocal.layers, free_layers, NULL); nhash_free(Menulocal.layers); Menulocal.layers = NULL; } arraydel2(&Menulocal.drawrable); arraydel(&Menulocal.custom_palette); g_free(Menulocal.fileopendir); Menulocal.fileopendir = NULL; g_free(Menulocal.graphloaddir); Menulocal.graphloaddir = NULL; Menulocal.obj = NULL; Menulocal.local = NULL; } static void init_custom_palette(void) { struct narray *palette; int i, j, k; unsigned int c[] = {0xff, 0xcc, 0x99}; GdkRGBA color; palette = &(Menulocal.custom_palette); arrayclear(palette); add_default_color(palette); for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { for (k = 0; k < 3; k++) { color.red = c[j] / 255.0; color.green = c[i] / 255.0; color.blue = c[k] / 255.0; color.alpha = 1.0; arrayadd(palette, &color); } } } add_default_gray(palette); } #define DEFAULT_AXIS_LENGTH 14000 void menu_default_axis_size(struct menulocal *local) { int i, n; struct objlist *aobj; local->default_axis_width = DEFAULT_AXIS_LENGTH; local->default_axis_height = DEFAULT_AXIS_LENGTH; aobj = chkobject("axis"); if (aobj == NULL) { return; } n = chkobjlastinst(aobj) + 1; if (n < 1) { return; } for (i = 0; i < n; i++) { char *name; int len; getobj(aobj, "group", i, 0, NULL, &name); if (name == NULL) { continue; } if (getobj(aobj, "length", i, 0, NULL, &len) < 0) { continue; } switch (name[1]) { case 'X': local->default_axis_width = len; break; case 'Y': local->default_axis_height = len; break; } } } static int menuinit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; int layer; if (!OpenApplication()) { error(obj, ERR_MENU_DISPLAY); goto errexit; } if (_exeparent(obj, (char *) argv[1], inst, rval, argc, argv)) { return 1; } gtk_source_init(); layer = TRUE; if (_putobj(obj, "_layer", inst, &layer)) return 1; if (_getobj(obj, "_local", inst, &local)) { local = gra2cairo_free(obj, inst); g_free(local); return 1; } memset(&Menulocal, 0, sizeof(Menulocal)); Menulocal.menux = Menulocal.menuy = Menulocal.menuheight = Menulocal.menuwidth = DEFAULT_GEOMETRY; Menulocal.showtip = TRUE; Menulocal.sidebar = TRUE; Menulocal.statusbar = TRUE; Menulocal.ruler = TRUE; Menulocal.scrollbar = TRUE; Menulocal.ptoolbar = TRUE; Menulocal.ctoolbar = TRUE; Menulocal.show_cross = FALSE; Menulocal.scriptconsole = FALSE; Menulocal.addinconsole = TRUE; Menulocal.changedirectory = 1; set_paper_type(21000, 29700); Menulocal.PaperZoom = 10000; Menulocal.exwindpi = DEFAULT_DPI / 2; Menulocal.exwinwidth = 400; Menulocal.exwinheight = 600; Menulocal.exwin_use_external = TRUE; Menulocal.expand = 1; Menulocal.expanddir = g_strdup("./"); Menulocal.help_file = g_strdup("html/index.html"); Menulocal.source_style_id = NULL; Menulocal.loadpath = SAVE_PATH_FULL; Menulocal.GRAobj = chkobject("gra"); Menulocal.hist_size = 1000; Menulocal.info_size = 1000; Menulocal.bg_r = 1.0; Menulocal.bg_g = 1.0; Menulocal.bg_b = 1.0; Menulocal.focus_frame_type = N_LINE_TYPE_DOT; Menulocal.main_pane_pos = 600; Menulocal.side_pane1_pos = 500; Menulocal.side_pane2_pos = 300; Menulocal.side_pane3_pos = 200; Menulocal.file_tab = 0; Menulocal.axis_tab = 100; Menulocal.merge_tab = 101; Menulocal.parameter_tab = 102; Menulocal.path_tab = 1; Menulocal.rectangle_tab = 2; Menulocal.arc_tab = 3; Menulocal.mark_tab = 4; Menulocal.text_tab = 5; Menulocal.math_input_mode = 1; menu_default_axis_size(&Menulocal); arrayinit(&(Menulocal.drawrable), sizeof(char *)); menuadddrawrable(chkobject("draw"), &(Menulocal.drawrable)); arrayinit(&(Menulocal.custom_palette), sizeof(GdkRGBA)); init_custom_palette(); Menulocal.use_custom_palette = TRUE; Menulocal.use_dark_theme = FALSE; Menulocal.windpi = DEFAULT_DPI; Menulocal.redrawf = TRUE; Menulocal.redrawf_num = 0xffU; Menulocal.grid = 200; Menulocal.show_grid = TRUE; Menulocal.data_head_lines = 100; Menulocal.use_opacity = FALSE; Menulocal.select_data = TRUE; Menulocal.local = local; Menulocal.png_dpi = 72; #if WINDOWS Menulocal.emf_dpi = 576; #endif Menulocal.ps_version = 0; Menulocal.svg_version = 0; if (mgtkloadconfig()) goto errexit; Menulocal.Decimalsign = get_gra_decimalsign_type(Menulocal.default_decimalsign); gra_set_default_decimalsign(Menulocal.Decimalsign); gra2cairo_set_antialias(Menulocal.local, Menulocal.antialias); if (_putobj(obj, "antialias", inst, &(Menulocal.antialias))) goto errexit; if (Menulocal.exwindpi < 1) Menulocal.exwindpi = DEFAULT_DPI / 2; if (Menulocal.exwindpi > DPI_MAX) Menulocal.exwindpi = DPI_MAX; if (Menulocal.windpi < 1) Menulocal.windpi = DEFAULT_DPI; if (Menulocal.windpi > DPI_MAX) Menulocal.windpi = DPI_MAX; if (_putobj(obj, "dpi", inst, &(Menulocal.windpi))) goto errexit; if (_putobj(obj, "data_head_lines", inst, &(Menulocal.data_head_lines))) goto errexit; if (_putobj(obj, "redraw_flag", inst, &(Menulocal.redrawf))) goto errexit; if (_putobj(obj, "redraw_num", inst, &(Menulocal.redrawf_num))) goto errexit; Menulocal.local->use_opacity = Menulocal.use_opacity; if (_putobj(obj, "use_opacity", inst, &Menulocal.use_opacity)) goto errexit; Menulocal.modified = 0; if (_putobj(obj, "modified", inst, &Menulocal.modified)) goto errexit; Menulocal.obj = obj; Menulocal.inst = inst; Menulocal.pix = NULL; Menulocal.bg = NULL; Menulocal.layers = nhash_new(); Menulocal.lock = 0; return 0; errexit: menulocal_finalize(); local = gra2cairo_free(obj, inst); g_free(local); return 1; } static int menudone(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (Menulocal.lock) { error(obj, ERR_MENU_RUN); return 1; } Menulocal.local->cairo = NULL; if (_exeparent(obj, (char *) argv[1], inst, rval, argc, argv)) return 1; menulocal_finalize(); gtk_source_finalize(); return 0; } void mgtkdisplaydialog(const char *str) { DisplayDialog(str); } void mgtkdisplaystatus(const char *str) { DisplayDialog(str); } int mgtkputstderr(const char *s) { return PutStderr(s); } int mgtkputstdout(const char *s) { int r; r = PutStdout(s); PutStdout("\n"); return r; } int mgtkprintfstderr(const char *fmt, ...) { int len; char buf[1024]; va_list ap; va_start(ap, fmt); len = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); PutStderr(buf); return len; } int mgtkprintfstdout(const char *fmt, ...) { int len; char buf[1024]; va_list ap; va_start(ap, fmt); len = vsnprintf(buf, sizeof(buf), fmt, ap); va_end(ap); PutStdout(buf); return len; } int mgtkinterrupt(void) { return ChkInterrupt(); } int mgtkinputyn(const char *mes) { char *ptr; int r; ptr = n_locale_to_utf8(CHK_STR(mes)); if (ptr == NULL) { return 0; } r = InputYN(ptr); g_free(ptr); return r; } void menu_use_dark_theme_set(int state) { GtkSettings *settings; settings = gtk_settings_get_default(); g_object_set(G_OBJECT(settings), "gtk-application-prefer-dark-theme", state, NULL); Menulocal.use_dark_theme = state; } static int menumenu(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *file; int r; if (_exeparent(obj, (char *) argv[1], inst, rval, argc, argv)) return 1; if (Menulocal.lock) { error(obj, ERR_MENU_RUN); return 1; } Menulocal.lock = 1; savestdio(&GtkIOSave); menu_default_axis_size(&Menulocal); file = get_utf8_filename(argv[2]); hide_console(); menu_use_dark_theme_set(Menulocal.use_dark_theme); r = application(file); resotre_console(); if (file) { g_free(file); } loadstdio(&GtkIOSave); Menulocal.lock = 0; return r; } static int mx_evloop(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { reset_event(); return 0; } static int mxredrawflag(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { Menulocal.redrawf = *(int *) argv[2]; return 0; } static int mxredraw_num(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int n; n = *(int *) argv[2]; n = (n < 0) ? 0: n; Menulocal.redrawf_num = n; *(int *) argv[2] = n; return 0; } static int mxuse_opacity(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int n; n = *(int *) argv[2]; Menulocal.local->use_opacity = Menulocal.use_opacity = n; return 0; } static int mx_data_head_lines(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int n; n = *(int *) argv[2]; n = (n < 0) ? 0: n; Menulocal.data_head_lines = n; *(int *) argv[2] = n; return 0; } void main_window_redraw(void) { GdkWindow *win; if (NgraphApp.Viewer.Win == NULL) { return; } win = gtk_widget_get_window(NgraphApp.Viewer.Win); if(win == NULL) { return; } gdk_window_invalidate_rect(win, NULL, FALSE); } void mx_redraw(struct objlist *obj, N_VALUE *inst, char const **objects) { int n; char const *objs[OBJ_MAX]; struct savedstdio save; if (Menulocal.redrawf) { n = Menulocal.redrawf_num; } else { n = 0; } if (objects == NULL) { int i, num; struct narray *array; array = &Menulocal.drawrable; num = arraynum(array); for (i = 0; i < num; i++) { objs[i] = arraynget_str(array, i); } objs[i] = NULL; objects = objs; } mx_clear(NULL, objects); ignorestdio(&save); GRAredraw_layers(obj, inst, TRUE, n, objects); restorestdio(&save); mxflush(obj, inst, NULL, 0, NULL); main_window_redraw(); } static int mxredraw(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } mx_redraw(obj, inst, NULL); return 0; } static int mxdpi(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int dpi; if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } dpi = abs(*(int *) argv[2]); if (dpi < 1) dpi = 1; if (dpi > DPI_MAX) dpi = DPI_MAX; Menulocal.windpi = dpi; Menulocal.local->pixel_dot_x = Menulocal.local->pixel_dot_y = dpi / (DPI_MAX * 1.0); *(int *) argv[2] = dpi; main_window_redraw(); return 0; } static void flush_layers(cairo_t *cr) { int i, n; struct narray *array; struct layer *layer; void *ptr; array = &Menulocal.drawrable; n = arraynum(array); for (i = 0; i < n; i++) { int r; char *obj; obj = arraynget_str(array, i); r = nhash_get_ptr(Menulocal.layers, obj, &ptr); if (r) { continue; } layer = ptr; if (layer->pix) { cairo_surface_flush(layer->pix); } cairo_set_source_surface(cr, layer->pix, 0, 0); cairo_paint(cr); } } static void clear_region(cairo_t *cr, cairo_region_t *region) { cairo_save(cr); cairo_set_source_rgba(cr, 0, 0, 0, 0); cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); if (region) { gdk_cairo_region(cr, region); cairo_fill(cr); } else { cairo_reset_clip(cr); cairo_paint(cr); } cairo_restore(cr); } static int mxflush(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } if (Menulocal.local->cairo) { cairo_surface_t *surface; gra2cairo_draw_path(Menulocal.local); surface = cairo_get_target(Menulocal.local->cairo); if (surface) { cairo_surface_flush(surface); } } if (Menulocal.pix) { cairo_t *cr; cr = cairo_create(Menulocal.pix); clear_region(cr, NULL); flush_layers(cr); cairo_destroy(cr); } return 0; } static int clear_layer(const char *obj, cairo_region_t *region) { struct layer *layer; void *ptr; int r; r = nhash_get_ptr(Menulocal.layers, obj, &ptr); if (r) { return 1; } layer = ptr; clear_region(layer->cairo, region); return 0; } void mx_clear(cairo_region_t *region, char const **objects) { if (objects) { while(*objects) { clear_layer(*objects, region); objects++; } } else { int i, n; struct narray *array; array = &Menulocal.drawrable; n = arraynum(array); for (i = 0; i < n; i++) { char *obj; obj = arraynget_str(array, i); clear_layer(obj, region); } } } static int mxclear(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } if (_exeparent(obj, (char *) argv[1], inst, rval, argc, argv)) return 1; mx_clear(NULL, NULL); main_window_redraw(); return 0; } static int mxfullpathngp(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *name, *ngp2; name = (char *) argv[2]; if (name == NULL) ngp2 = NULL; else ngp2 = getbasename(name); putobj(Menulocal.obj, "ngp", 0, ngp2); return 0; } static int check_object_name(struct objlist *obj, struct narray *array) { int i, n; char **adata; if (array == NULL) return 0; adata = arraydata(array); if (adata == NULL) return 0; n = arraynum(array); if (n == 0) return 0; for (i = 0; i < n; i ++) { if (obj == chkobject(adata[i])) return 0; } return 1; } static int mx_get_focused(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int num, i, id; const char *name; char *ptr; struct narray *oarray, *sarray; struct Viewer *d; struct FocusObj **focus; if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } arrayfree2(rval->array); rval->array = NULL; d = &(NgraphApp.Viewer); num = arraynum(d->focusobj); if (num < 1) return 0; oarray = arraynew(sizeof(char *)); if (oarray == NULL) return 1; sarray = (argc > 2) ? (struct narray *) argv[2] : NULL; focus = arraydata(d->focusobj); for (i = 0; i < num; i++) { if (check_object_name(focus[i]->obj, sarray)) continue; inst = chkobjinstoid(focus[i]->obj, focus[i]->oid); if (inst) { _getobj(focus[i]->obj, "id", inst, &id); name = chkobjectname(focus[i]->obj); ptr = g_strdup_printf("%s:%d", name, id); if (ptr) { arrayadd(oarray, &ptr); } } } rval->array = oarray; return 0; } static int mx_print(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int show_dialog, select_file, create_window = FALSE, lock; select_file = * (int *) argv[2]; show_dialog = * (int *) argv[3]; if (TopLevel == NULL) { GtkWidget *label; create_window = TRUE; TopLevel = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_type_hint(GTK_WINDOW(TopLevel), GDK_WINDOW_TYPE_HINT_DIALOG); g_signal_connect(TopLevel, "delete-event", G_CALLBACK(gtk_true), NULL); label = gtk_label_new(" Ngraph "); gtk_container_add(GTK_CONTAINER(TopLevel), label); gtk_widget_show_all(TopLevel); reset_event(); } lock = Menulock; menu_lock(FALSE); CmOutputPrinter(select_file, show_dialog); menu_lock(lock); if (create_window) { gtk_widget_destroy(TopLevel); TopLevel = NULL; reset_event(); } return 0; } static int mx_echo(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } if (argv[2]) PutStdout((char *) argv[2]); PutStdout("\n"); return 0; } static int mx_cat(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char buf[1024]; int len, use_stdin = TRUE; int fd; if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } if (argv[2]) { fd = nopen(argv[2], O_RDONLY, 0); if (fd == -1) { error(obj, ERR_MENU_OPEN_FILE); return 1; } use_stdin = FALSE; } else { fd = stdinfd(); } while ((len = nread(fd, buf, sizeof(buf) - 1)) > 0) { buf[len] = '\0'; PutStdout(buf); } if (! use_stdin) { nclose(fd); } return 0; } static int mx_clear_info(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } InfoWinClear(); return 0; } static int mx_get_accel_map(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char **actions; int i, j; GString *str; if (rval->str) { g_free(rval->str); } rval->str = NULL; if (GtkApp == NULL) { return 0; } str = g_string_new(""); actions = gtk_application_list_action_descriptions(GtkApp); for (i = 0; actions[i]; i++) { char **accels; accels = gtk_application_get_accels_for_action(GtkApp, actions[i]); for (j = 0; accels[j]; j++) { g_string_append_printf(str, "%s %s\n", actions[i], accels[j]); } g_strfreev(accels); } g_strfreev(actions); rval->str = g_string_free(str, FALSE); return 0; } #ifdef HAVE_READLINE_READLINE_H #include #endif #ifdef HAVE_LIBGSL #include #endif static int mx_show_lib_version(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *s, h[256]; int i, n; GString *str; if (rval->str) { g_free(rval->str); } rval->str = NULL; n = 0; s = argv[2]; if (s) { n = s[0] - '0'; n = (n < (int) sizeof(h) - 1) ? n : (int) sizeof(h) - 1; } for (i = 0; i < n; i++) { h[i] = ' '; } h[i] = '\0'; str = g_string_new(""); g_string_append_printf(str, "%sGTK+\n" "%s compile: %d.%d.%d\n" "%s linked: %d.%d.%d\n" "\n", h, h, GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION, h, gtk_major_version, gtk_minor_version, gtk_micro_version); g_string_append_printf(str, "%sGLib\n" "%s compile: %d.%d.%d\n" "%s linked: %d.%d.%d\n" "\n", h, h, GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION, h, glib_major_version, glib_minor_version, glib_micro_version); g_string_append_printf(str, "%sCairo\n" "%s compile: %s\n" "%s linked: %s\n" "\n", h, h, CAIRO_VERSION_STRING, h, cairo_version_string()); g_string_append_printf(str, "%sPango\n" "%s compile: %s\n" "%s linked: %s\n" "\n", h, h, PANGO_VERSION_STRING, h, pango_version_string()); g_string_append_printf(str, "%sGtkSourceView\n" "%s compile: %d.%d.%d\n" "%s linked: %d.%d.%d\n", h, h, GTK_SOURCE_MAJOR_VERSION, GTK_SOURCE_MINOR_VERSION, GTK_SOURCE_MICRO_VERSION, h, gtk_source_get_major_version(), gtk_source_get_minor_version(), gtk_source_get_micro_version()); #ifdef RL_VERSION_MAJOR g_string_append(str, "\n"); g_string_append_printf(str, "%sreadline\n" "%s compile: %d.%d\n" "%s linked: %s\n", h, h, RL_VERSION_MAJOR, RL_VERSION_MINOR, h, rl_library_version); #endif #ifdef HAVE_LIBGSL g_string_append(str, "\n"); g_string_append_printf(str, "%sGSL\n" #ifdef GSL_VERSION "%s compile: %s\n" #else /* GSL_VERSION */ "%s compile: %d.%d\n" #endif /* GSL_VERSION */ "%s linked: %s\n", h, h, #ifdef GSL_VERSION GSL_VERSION, #else /* GSL_VERSION */ GSL_MAJOR_VERSION, GSL_MINOR_VERSION, #endif /* GSL_VERSION */ h, gsl_version); #endif /* HAVE_LIBGSL */ rval->str = g_string_free(str, FALSE); return 0; } static int mx_show_source_view_search_path(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { const gchar * const *dirs; int i; GtkSourceLanguageManager *lm; GString *str; if (rval->str) { g_free(rval->str); } rval->str = NULL; str = g_string_new(""); lm = gtk_source_language_manager_get_default(); dirs = gtk_source_language_manager_get_search_path(lm); for (i = 0; dirs[i]; i++) { g_string_append_printf(str, "%s\n", dirs[i]); } rval->str = g_string_free(str, FALSE); return 0; } static int mxdraw(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } Draw(FALSE); return 0; } static void SetCaption(int modified) { char buf[1024], *file; getobj(Menulocal.obj, "ngp", 0, 0, NULL, &file); snprintf(buf, sizeof(buf), "%s%s - Ngraph", (modified) ? "*" : "", (file) ? file : _("Unsaved Graph")); gtk_window_set_title(GTK_WINDOW(TopLevel), buf); } static int mxmodified(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int modified; if (TopLevel == NULL) { error(obj, ERR_MENU_GUI); return 1; } modified = * (int *) argv[2]; if (modified) { Menulocal.modified |= modified; } else { Menulocal.modified = modified; } SetCaption(modified); set_modified_state(modified); return 0; } static int mx_focus_obj(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int n, i, *id_array; char *legend; struct objlist *lobj; struct narray iarray; legend = (char *) argv[2]; if (legend == NULL) { return 0; } arrayinit(&iarray, sizeof(int)); if (getobjilist(legend, &lobj, &iarray, FALSE, NULL)) { return 0; } n = arraynum(&iarray); if (n < 1) { arraydel(&iarray); return 0; } id_array = arraydata(&iarray); for (i = 0; i < n; i++) { Focus(lobj, id_array[i], TRUE); } arraydel(&iarray); return 0; } static int mx_unfocus_obj(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { UnFocus(); return 0; } static int mx_get_locale(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { const char *locale; if (rval->str) { g_free(rval->str); } rval->str = NULL; locale = n_getlocale(); if (locale) { rval->str = g_strdup(locale); } return 0; } static int mx_get_active(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (TopLevel) { rval->i = TRUE; } else { rval->i = FALSE; } return 0; } static int mx_addin_list_append(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int n, id, i; char *sarray, *name, *script, *description, *option, *argv2[2]; struct objlist *sa_obj; struct narray iarray; struct script *addin, *list; sarray = (char *) argv[2]; if (sarray == NULL) { return 0; } arrayinit(&iarray, sizeof(int)); if (getobjilist(sarray, &sa_obj, &iarray, FALSE, NULL)) { return 0; } if (g_strcmp0(chkobjectname(sa_obj), "sarray") != 0) { return 1; } n = arraynum(&iarray); if (n < 1) { arraydel(&iarray); return 0; } id = arraynget_int(&iarray, 0); if (getobj(sa_obj, "num", id, 0, NULL, &n) < 0) { return 0; } if (n < 4) { arraydel(&iarray); return 0; } addin = g_malloc0(sizeof(*addin)); if (addin == NULL) { return 1; } argv2[0] = (char *) &i; argv2[1] = NULL; i = 0; getobj(sa_obj, "get", id, 1, argv2, &script); if (! g_utf8_validate(script, -1, NULL)) { goto Err; } addin->script = g_strdup(script); i = 1; getobj(sa_obj, "get", id, 1, argv2, &name); if (! g_utf8_validate(name, -1, NULL)) { goto Err; } addin->name = g_strdup(name); i = 2; getobj(sa_obj, "get", id, 1, argv2, &description); if (! g_utf8_validate(description, -1, NULL)) { goto Err; } addin->description = g_strdup(description); i = 3; getobj(sa_obj, "get", id, 1, argv2, &option); if (! g_utf8_validate(option, -1, NULL)) { goto Err; } addin->option = g_strdup(option); addin->next = NULL; if (Menulocal.addin_list == NULL) { Menulocal.addin_list = addin; } else { for (list = Menulocal.addin_list; list != addin; list = list->next) { if (list->next == NULL) { list->next = addin; } } } arraydel(&iarray); return 0; Err: if (addin->script) { g_free(addin->script); } if (addin->name) { g_free(addin->name); } if (addin->description) { g_free(addin->description); } if (addin->option) { g_free(addin->option); } g_free(addin); return 0; } static int mx_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char code, *cstr, *layer; struct gra2cairo_local *local; local = (struct gra2cairo_local *)argv[2]; code = *(char *) (argv[3]); cstr = argv[5]; switch (code) { case 'I': layer = arraynget_str(&Menulocal.drawrable, 0); if (layer){ select_layer(layer); } break; case 'Z': gra2cairo_draw_path(local); select_layer(cstr); break; } if (_exeparent(obj, argv[1], inst, rval, argc, argv)) { return 1; } return 0; } static int mx_exeparent(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { return _exeparent(obj, argv[1], inst, rval, argc, argv); } static struct objtable gtkmenu[] = { {"init", NVFUNC, NEXEC, menuinit, NULL, 0}, {"done", NVFUNC, NEXEC, menudone, NULL, 0}, {"menu", NVFUNC, NREAD | NEXEC, menumenu, "s", 0}, {"ngp", NSTR, NREAD | NWRITE, NULL, NULL, 0}, {"fullpath_ngp", NSTR, NREAD | NWRITE, mxfullpathngp, NULL, 0}, {"data_head_lines", NINT, NREAD | NWRITE, mx_data_head_lines, NULL, 0}, {"modified", NBOOL, NREAD | NWRITE, mxmodified, NULL, 0}, {"dpi", NINT, NREAD | NWRITE, mxdpi, NULL, 0}, {"redraw_flag", NBOOL, NREAD | NWRITE, mxredrawflag, NULL, 0}, {"redraw_num", NINT, NREAD | NWRITE, mxredraw_num, NULL, 0}, {"use_opacity", NBOOL, NREAD | NWRITE, mxuse_opacity, NULL,0}, {"redraw", NVFUNC, NREAD | NEXEC, mxredraw, "", 0}, {"draw", NVFUNC, NREAD | NEXEC, mxdraw, "", 0}, {"flush", NVFUNC, NREAD | NEXEC, mxflush, "", 0}, {"clear", NVFUNC, NREAD | NEXEC, mxclear, "", 0}, {"focused", NSAFUNC, NREAD | NEXEC, mx_get_focused, "sa", 0}, {"print", NVFUNC, NREAD | NEXEC, mx_print, "bi", 0}, {"echo", NVFUNC, NREAD | NEXEC, mx_echo, "s", 0}, {"cat", NVFUNC, NREAD | NEXEC, mx_cat, "s", 0}, {"clear_info", NVFUNC, NREAD | NEXEC, mx_clear_info, "", 0}, {"get_accel_map", NSFUNC, NREAD | NEXEC, mx_get_accel_map, "", 0}, {"lib_version", NSFUNC, NREAD | NEXEC, mx_show_lib_version, NULL, 0}, {"source_view_search_path", NSFUNC, NREAD | NEXEC, mx_show_source_view_search_path, NULL, 0}, {"focus", NVFUNC, NREAD | NEXEC, mx_focus_obj, "o", 0}, {"unfocus", NVFUNC, NREAD | NEXEC, mx_unfocus_obj, "", 0}, {"locale", NSFUNC, NREAD | NEXEC, mx_get_locale, "", 0}, {"active", NBFUNC, NREAD | NEXEC, mx_get_active, "", 0}, {"addin_list_append", NVFUNC, NREAD | NEXEC, mx_addin_list_append, "o", 0}, {"_evloop", NVFUNC, 0, mx_evloop, NULL, 0}, {"_output", NVFUNC, 0, mx_output, NULL, 0}, {"_strwidth", NIFUNC, 0, mx_exeparent, NULL, 0}, {"_charascent", NIFUNC, 0, mx_exeparent, NULL, 0}, {"_chardescent", NIFUNC, 0, mx_exeparent, NULL, 0}, }; #define TBLNUM (sizeof(gtkmenu) / sizeof(*gtkmenu)) void * addmenu(void) { if (MenuConfigHash == NULL) { unsigned int i, j; struct menu_config *cfg; MenuConfigHash = nhash_new(); if (MenuConfigHash ==NULL) return NULL; for (i = 0; (cfg = MenuConfigArrray[i]); i++) { for (j = 0; cfg[j].name; j++) { if (nhash_set_ptr(MenuConfigHash, cfg[j].name, (void *) (cfg + j))) { nhash_free(MenuConfigHash); return NULL; } } } } return addobject(NAME, ALIAS, PARENT, NVERSION, TBLNUM, gtkmenu, ERRNUM, menuerrorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/x11view.c0000644000175000017500000051130314142161773013713 00000000000000/* -*- coding: utf-8 -*- */ /* * $Id: x11view.c,v 1.186 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include "object.h" #include "gra.h" #include "odata.h" #include "olegend.h" #include "oarc.h" #include "opath.h" #include "mathfn.h" #include "ioutil.h" #include "nstring.h" #include "shell.h" #include "gtk_liststore.h" #include "gtk_widget.h" #include "gtk_ruler.h" #include "gtk_presettings.h" #include "strconv.h" #include "x11gui.h" #include "x11dialg.h" #include "ogra2cairo.h" #include "ogra2gdk.h" #include "ox11menu.h" #include "x11menu.h" #include "x11graph.h" #include "x11file.h" #include "x11axis.h" #include "x11info.h" #include "x11cood.h" #include "x11lgnd.h" #include "x11view.h" #include "x11commn.h" #include "x11merge.h" #define SCROLL_INC 20 #define POINT_ERROR 4 #define ZOOM_SPEED_NORMAL 1.4 #define ZOOM_SPEED_LITTLE 1.1 enum object_move_type { OBJECT_MOVE_TYPE_TOP, OBJECT_MOVE_TYPE_UP, OBJECT_MOVE_TYPE_DOWN, OBJECT_MOVE_TYPE_LAST, }; #define Button1 1 #define Button2 2 #define Button3 3 #define Button4 4 #define Button5 5 enum EvalDialogColType { EVAL_DIALOG_COL_TYPE_ID, EVAL_DIALOG_COL_TYPE_LN, EVAL_DIALOG_COL_TYPE_X, EVAL_DIALOG_COL_TYPE_Y, EVAL_DIALOG_COL_TYPE_N, }; enum ViewerAlignType { VIEW_ALIGN_LEFT, VIEW_ALIGN_RIGHT, VIEW_ALIGN_HCENTER, VIEW_ALIGN_TOP, VIEW_ALIGN_VCENTER, VIEW_ALIGN_BOTTOM, }; #define POINT_LENGTH 5 #define FOCUS_FRAME_OFST 5 #define FOCUS_RECT_SIZE 6 #define VIEWER_DPI_MAX 620 #define VIEWER_DPI_MIN 20 static int PaintLock = FALSE, ZoomLock = FALSE, KeepMouseMode = FALSE; static int ViewerZooming = FALSE; #define EVAL_NUM_MAX 5000 static struct evaltype EvalList[EVAL_NUM_MAX]; static struct narray SelList; #define IDEVMASK 101 #define IDEVMOVE 102 static void ViewerEvSize(GtkWidget *w, GtkAllocation *allocation, gpointer client_data); static void ViewerEvHScroll(GtkRange *range, gpointer user_data); static void ViewerEvVScroll(GtkRange *range, gpointer user_data); static gboolean ViewerEvPaint(GtkWidget *w, cairo_t *cr, gpointer client_data); static gboolean ViewerEvLButtonDown(unsigned int state, TPoint *point, struct Viewer *d); static gboolean ViewerEvLButtonUp(unsigned int state, TPoint *point, struct Viewer *d); static gboolean ViewerEvLButtonDblClk(unsigned int state, TPoint *point, struct Viewer *d); static gboolean ViewerEvMouseMove(unsigned int state, TPoint *point, struct Viewer *d); static void ViewerEvButtonDown(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer client_data); static void ViewerEvButtonUp(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer client_data); static gboolean ViewerEvKeyDown(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data); static void ViewerEvKeyUp(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data); static void gesture_zoom(GtkGestureZoom *controller, gdouble scale, gpointer user_data); #if GTK_CHECK_VERSION(4, 0, 0) static void ViewerEvMouseMotion(GtkEventControllerMotion *controller, gdouble x, gdouble y, gpointer client_data); #else static gboolean ViewerEvMouseMotion(GtkWidget *w, GdkEventMotion *e, gpointer client_data); #endif static gboolean ViewerEvScroll(GtkWidget *w, GdkEventScroll *e, gpointer client_data); static void ViewUpdate(void); static void ViewCopy(void); static void do_popup(GdkEventButton *event, struct Viewer *d); static int check_focused_obj(struct narray *focusobj, struct objlist *fobj, int oid); static int get_mouse_cursor_type(struct Viewer *d, int x, int y); static void reorder_object(enum object_move_type type); static void SetHRuler(const struct Viewer *d); static void SetVRuler(const struct Viewer *d); static void clear_focus_obj(struct Viewer *d); static void ViewDelete(void); static int text_dropped(const char *str, gint x, gint y, struct Viewer *d); static int add_focus_obj(struct narray *focusobj, struct objlist *obj, int oid); static void ShowFocusFrame(cairo_t *cr, struct Viewer *d); static void RotateFocusedObj(int direction); static void set_mouse_cursor_hover(struct Viewer *d, int x, int y); static void CheckGrid(int ofs, unsigned int state, int *x, int *y, double *zoom_x, double *zoom_y); static int check_drawrable(struct objlist *obj); static void GetLargeFrame(int *minx, int *miny, int *maxx, int *maxy, const struct Viewer *d); static int zoom_focused_obj(int x, int y, double zoom_x, double zoom_y, char **objs, struct Viewer *d); static void draw_focused_obj(struct Viewer *d); static int search_axis_group(struct objlist *obj, int id, const char *group, int *findX, int *findY, int *findU, int *findR, int *findG, int *idx, int *idy, int *idu, int *idr, int *idg); static void clear_focus_obj_pix(struct Viewer *d); static void draw_focused_move(cairo_t *cr, double zoom, struct Viewer *d); #define GRAY 0.5 #define DOT_LENGTH 4.0 #define EDITING_OPACITY 0.5 #define SCROLL_ANIMATION 0 int check_paint_lock(void) { return PaintLock; } static int mxd2p(int r) { return nround(r * Menulocal.local->pixel_dot_x); } #if 0 static int mxd2px(int x) { return nround(x * Menulocal.local->pixel_dot_x + Menulocal.local->offsetx); } static int mxd2py(int y) { return nround(y * Menulocal.local->pixel_dot_y + Menulocal.local->offsety); } #endif static int mxp2d(int r) { return ceil(r / Menulocal.local->pixel_dot_x); } static int calc_mouse_x(int x, double zoom, const struct Viewer *d) { return nround((mxp2d(x + d->hscroll - d->cx) - Menulocal.LeftMargin) / zoom); } static int calc_mouse_y(int y, double zoom, const struct Viewer *d) { return nround((mxp2d(y + d->vscroll - d->cy) - Menulocal.TopMargin) / zoom); } #define SCROLL_DIV 6.0 #define SCROLL_DECELERATION_LIMIT 1.0 static gboolean scroll_deceleration_cb(GtkWidget *widget, GdkFrameClock *frame_clock, gpointer user_data) { struct Viewer *d; double x, y; d = (struct Viewer *) user_data; x = gtk_range_get_value(GTK_RANGE(d->HScroll)); y = gtk_range_get_value(GTK_RANGE(d->VScroll)); x += (d->scroll_prm.x - x) / SCROLL_DIV; y += (d->scroll_prm.y - y) / SCROLL_DIV; if (fabs(d->scroll_prm.x - x) < SCROLL_DECELERATION_LIMIT && fabs(d->scroll_prm.y - y) < SCROLL_DECELERATION_LIMIT) { d->deceleration_prm.id = 0; gtk_range_set_value(GTK_RANGE(d->HScroll), d->scroll_prm.x); gtk_range_set_value(GTK_RANGE(d->VScroll), d->scroll_prm.y); return G_SOURCE_REMOVE; } gtk_range_set_value(GTK_RANGE(d->HScroll), x); gtk_range_set_value(GTK_RANGE(d->VScroll), y); return G_SOURCE_CONTINUE; } static void cancel_deceleration(struct Viewer *d) { if (d->deceleration_prm.id == 0) { return; } gtk_widget_remove_tick_callback(d->Win, d->deceleration_prm.id); d->deceleration_prm.id = 0; } static void start_scroll_deceleration(double x, double y, struct Viewer *d) { cancel_deceleration(d); d->scroll_prm.x = x; d->scroll_prm.y = y; d->deceleration_prm.id = gtk_widget_add_tick_callback(GTK_WIDGET(d->Win), scroll_deceleration_cb, d, NULL); } static void range_increment(GtkWidget *w, double inc) { double val; if (inc == 0) { return; } val = gtk_range_get_value(GTK_RANGE(w)); gtk_range_set_value(GTK_RANGE(w), val + inc); } static void range_increment_deceleration(double inc_x, double inc_y, struct Viewer *d) { double x, y; if (inc_x == 0 && inc_y == 0) { return; } x = gtk_range_get_value(GTK_RANGE(d->HScroll)); y = gtk_range_get_value(GTK_RANGE(d->VScroll)); x += inc_x; y += inc_y; start_scroll_deceleration(x, y, d); } static char SCRIPT_IDN[] = "#! ngraph\n# clipboard\n\n"; #define SCRIPT_IDN_LEN (sizeof(SCRIPT_IDN) - 1) struct FOCUSED_INST { int id; struct FocusObj *focus; }; static int compare_focused_inst(const void *a, const void *b) { struct FOCUSED_INST *inst_a, *inst_b; inst_a = (struct FOCUSED_INST *) a; inst_b = (struct FOCUSED_INST *) b; return (inst_a->id - inst_b->id); } static struct FOCUSED_INST * create_focused_inst_array_by_id_order(struct FocusObj **focus, int n) { struct FOCUSED_INST *focused_inst; int i; if (focus == NULL || n < 1) { return NULL; } focused_inst = g_malloc(sizeof(*focused_inst) * n); if (focused_inst == NULL) { return NULL; } for (i = 0; i < n; i++) { int id; id = chkobjoid(focus[i]->obj, focus[i]->oid); focused_inst[i].id = id; focused_inst[i].focus = focus[i]; } qsort(focused_inst, n, sizeof(*focused_inst), compare_focused_inst); return focused_inst; } static int CopyFocusedObjects(void) { struct narray *focus_array; struct FocusObj **focus; struct objlist *axis; char *s; int i, r, n, num; GString *str; struct FOCUSED_INST *focused_inst; focus_array = NgraphApp.Viewer.focusobj; n = arraynum(focus_array); if (n < 1) return 1; focus = arraydata(focus_array); focused_inst = create_focused_inst_array_by_id_order(focus, n); if (focused_inst == NULL) { return 1; } str = g_string_sized_new(256); if (str == NULL) { g_free(focused_inst); return 1; } axis = chkobject("axis"); g_string_append(str, SCRIPT_IDN); num = 0; for (i = 0; i < n; i++) { struct FocusObj *inst; int id; inst = focused_inst[i].focus; if (inst->obj == axis) { g_free(focused_inst); g_string_free(str, TRUE); return 1; } id = chkobjoid(inst->obj, inst->oid); if (id < 0) continue; r = getobj(inst->obj, "save", id, 0, NULL, &s); if (r < 0 || s == NULL) { g_free(focused_inst); g_string_free(str, TRUE); return 1; } g_string_append(str, s); num++; } if (num > 0) { GtkClipboard* clipboard; clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_text(clipboard, str->str, -1); } g_free(focused_inst); g_string_free(str, TRUE); return 0; } static int CutFocusedObjects(void) { if (CopyFocusedObjects()) return 1; ViewDelete(); return 0; } static void check_last_insts(struct objlist *parent, struct narray *array) { struct objlist *ocur; int instnum; ocur = parent->child; while (chkobjparent(ocur) == parent) { instnum = chkobjlastinst(ocur); arrayadd(array, &instnum); if (ocur->child) { check_last_insts(ocur, array); } ocur = ocur->next; } return; } static void focus_new_insts(struct objlist *parent, struct narray *array, char **objects) { struct objlist *ocur; int i, oid; ocur = parent->child; while (chkobjparent(ocur) == parent) { int instnum, prev_instnum; instnum = chkobjlastinst(ocur); prev_instnum = arraynget_int(array, 0); arrayndel(array, 0); if (chkobjfield(ocur, "bbox") == 0) { if (instnum != prev_instnum) { *objects = ocur->name; objects++; *objects = NULL; } for (i = prev_instnum + 1; i <= instnum; i++) { getobj(ocur, "oid", i, 0, NULL, &oid); add_focus_obj(NgraphApp.Viewer.focusobj, ocur, oid); } } if (ocur->child) { focus_new_insts(ocur, array, objects); } ocur = ocur->next; } return; } static void paste_cb(GtkClipboard *clipboard, const gchar *text, gpointer data) { struct narray idarray; struct objlist *draw_obj; GdkWindow *window; char *objects[OBJ_MAX] = {NULL}; if (text == NULL) return; window = gtk_widget_get_window(NgraphApp.Viewer.Win); if (window == NULL) return; if (strncmp(text, SCRIPT_IDN, SCRIPT_IDN_LEN)) { gint w, h; w = gdk_window_get_width(window); h = gdk_window_get_height(window); text_dropped(text, w / 2, h / 2, &NgraphApp.Viewer); return; } draw_obj = chkobject("draw"); if (draw_obj == NULL) return; arrayinit(&idarray, sizeof(int)); check_last_insts(draw_obj, &idarray); UnFocus(); menu_save_undo(UNDO_TYPE_PASTE, NULL); eval_script(text, TRUE); focus_new_insts(draw_obj, &idarray, objects); arraydel(&idarray); if (arraynum(NgraphApp.Viewer.focusobj) > 0) { set_graph_modified(); NgraphApp.Viewer.ShowFrame = TRUE; gtk_widget_grab_focus(NgraphApp.Viewer.Win); UpdateAll(objects); } } static void PasteObjectsFromClipboard(void) { GtkClipboard *clip; struct Viewer *d; d = &NgraphApp.Viewer; if (d->Win == NULL || (d->Mode != PointB && d->Mode != LegendB)) { return; } clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); if (gtk_clipboard_wait_is_text_available(clip)) { GdkDevice *device; gint x, y; gtk_clipboard_request_text(clip, paste_cb, NULL); device = gtk_get_current_event_device(); /* fix-me: is there any other appropriate way to get the device? */ if (device && gdk_device_get_source(device) != GDK_SOURCE_KEYBOARD) { GdkWindow *win; win = gtk_widget_get_window(d->Win); if (win) { gdk_window_get_device_position(win, device, &x, &y, NULL); set_mouse_cursor_hover(d, x, y); } } } } static int graph_dropped(char *fname) { char *ext, *cwd; if (fname == NULL) { return 1; } ext = getextention(fname); if (ext == NULL) return 1; if (strcmp0(ext, "ngp")) { return 1; } if (!CheckSave()) { return 1; } cwd = ngetcwd(); if (chdir_to_ngp(fname)) { if (cwd) { g_free(cwd); } return 1; } if (LoadNgpFile(fname, FALSE, "-f") && cwd) { nchdir(cwd); } if (cwd) { g_free(cwd); } return 0; } static int new_merge_obj(char *name, struct objlist *obj) { int id, ret; id = newobj(obj); if (id < 0) return 1; changefilename(name); putobj(obj, "file", id, name); MergeDialog(NgraphApp.MergeWin.data.data, id, -1); ret = DialogExecute(TopLevel, &DlgMerge); if (ret == IDCANCEL) { delobj(obj, id); } else { set_graph_modified(); } return 0; } static int arc_get_angle(struct objlist *obj, N_VALUE *inst, unsigned int round, int point, int px, int py, int *angle1, int *angle2) { int x, y, rx, ry, a1, a2; double dx, dy, r, angle; if (inst == NULL) return 1; if (point != ARC_POINT_TYPE_ANGLE1 && point != ARC_POINT_TYPE_ANGLE2) return 1; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); _getobj(obj, "rx", inst, &rx); _getobj(obj, "ry", inst, &ry); _getobj(obj, "angle1", inst, &a1); _getobj(obj, "angle2", inst, &a2); if (rx < 1 || ry < 1) return 1; dx = 1.0 * (px - x) / rx; dy = 1.0 * (y - py) / ry; r = sqrt(dx * dx + dy * dy); if (dx == 0 && dy == 0) return 1; if (dx >= 0 && dy >= 0) { if (dx > dy) { angle = acos(dx / r) / MPI * 180; } else { angle = asin(dy / r) / MPI * 180; } } else if (dx < 0 && dy >= 0) { if (-dx > dy) { angle = acos(-dx / r) / MPI * 180; } else { angle = asin(dy / r) / MPI * 180; } angle = 180 - angle; } else if (dx < 0 && dy < 0) { if (-dx > -dy) { angle = acos(-dx / r) / MPI * 180; } else { angle = asin(-dy / r) / MPI * 180; } angle += 180; } else { if (dx > -dy) { angle = acos(dx / r) / MPI * 180; } else { angle = asin(-dy / r) / MPI * 180; } angle = 360 - angle; } if (round & GDK_CONTROL_MASK) { int tmp; angle = nround(angle); tmp = angle / 15; angle = tmp * 15; } else if (! (round & GDK_SHIFT_MASK)) { angle = nround(angle); } angle *= 100; switch (point) { case ARC_POINT_TYPE_ANGLE1: a2 += a1; a1 = angle; a2 -= a1; break; case ARC_POINT_TYPE_ANGLE2: a2 = angle - a1; break; } a1 %= 36000; if (a1 < 0) a1 += 36000; a2 %= 36000; if (a2 < 0) { a2 += 36000; } if (a2 < 500) a2 = 36000; if (angle1) *angle1 = a1; if (angle2) *angle2 = a2; return 0; } static int new_file_obj(char *name, struct objlist *obj, int *id0, int multi) { int id, ret; id = newobj(obj); if (id < 0) { return 1; } putobj(obj, "file", id, name); if (*id0 != -1) { copy_file_obj_field(obj, id, *id0, FALSE); AddDataFileList(name); return 0; } FileDialog(NgraphApp.FileWin.data.data, id, multi); ret = DialogExecute(TopLevel, &DlgFile); if (ret == IDCANCEL) { FitDel(obj, id); delobj(obj, id); } else { if (ret == IDFAPPLY) { *id0 = id; } set_graph_modified(); AddDataFileList(name); } return 0; } int data_dropped(char **filenames, int num, int file_type) { char *ext, *arg[4]; int i, id0, type, ret; struct objlist *obj, *mobj; obj = chkobject("data"); if (obj == NULL) { return 1; } mobj = chkobject("merge"); if (mobj == NULL) { return 1; } id0 = -1; arg[0] = obj->name; arg[1] = mobj->name; arg[2] = "fit"; arg[3] = NULL; menu_save_undo(UNDO_TYPE_PASTE, arg); for (i = 0; i < num; i++) { char *name; name = g_filename_from_uri(filenames[i], NULL, NULL); if (name == NULL) { continue; } type = file_type; if (type == FILE_TYPE_AUTO) { ext = getextention(name); if (ext && strcmp0(ext, "gra") == 0) { type = FILE_TYPE_MERGE; } else { type = FILE_TYPE_DATA; } } if (type == FILE_TYPE_MERGE) { ret = new_merge_obj(name, mobj); } else { ret = new_file_obj(name, obj, &id0, i < num - 1); } if (ret) { g_free(name); continue; } } MergeWinUpdate(NgraphApp.MergeWin.data.data, TRUE, FALSE); FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, FALSE); return 0; } static int text_dropped(const char *str, gint x, gint y, struct Viewer *d) { N_VALUE *inst; char *ptr; double zoom = Menulocal.PaperZoom / 10000.0; struct objlist *obj; int id, x1, y1, r, i, j, l, undo; obj = chkobject("text"); if (obj == NULL) return 1; l = strlen(str); ptr = g_malloc(l * 2 + 1); if (ptr == NULL) return 1; for (i = j = 0; i < l; i++, j++) { switch (str[i]) { case '\n': ptr[j] = '\\'; j++; ptr[j] = 'n'; break; case '%': case '^': case '_': case '\\': ptr[j] = '\\'; j++; ptr[j] = str[i]; break; default: ptr[j] = str[i]; break; } } ptr[j] = '\0'; undo = menu_save_undo_single(UNDO_TYPE_PASTE, obj->name); id = newobj(obj); if (id < 0) { g_free(ptr); return 1; } inst = chkobjinst(obj, id); x1 = calc_mouse_x(x, zoom, d); y1 = calc_mouse_y(y, zoom, d); CheckGrid(FALSE, 0, &x1, &y1, NULL, NULL); _putobj(obj, "x", inst, &x1); _putobj(obj, "y", inst, &y1); _putobj(obj, "text", inst, ptr); PaintLock= TRUE; LegendTextDialog(&DlgLegendText, obj, id); r = DialogExecute(TopLevel, &DlgLegendText); if ((r == IDDELETE) || (r == IDCANCEL)) { menu_delete_undo(undo); delobj(obj, id); } else { int oid; char *objects[] = {"text", NULL}; UnFocus(); getobj(obj, "oid", id, 0, NULL, &oid); add_focus_obj(NgraphApp.Viewer.focusobj, obj, oid); set_graph_modified(); d->ShowFrame = TRUE; gtk_widget_grab_focus(d->Win); UpdateAll(objects); } PaintLock = FALSE; return 0; } static void drag_drop_cb(GtkWidget *w, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { gchar **filenames, *str; int num, r, success; struct Viewer *d; success = FALSE; if (Globallock || Menulock || DnDLock) goto End; d = (struct Viewer *) user_data; switch (info) { case DROP_TYPE_TEXT: str = (gchar *) gtk_selection_data_get_text(data); if (str) { r = text_dropped(str, x, y, d); g_free(str); success = (! r); } break; case DROP_TYPE_FILE: filenames = gtk_selection_data_get_uris(data); if (filenames == NULL) { break; } num = g_strv_length(filenames); r = 1; if (num == 1) { char *fname; fname = g_filename_from_uri(filenames[0], NULL, NULL); if (fname == NULL) { g_strfreev(filenames); break; } r = graph_dropped(fname); g_free(fname); } if (r && data_dropped(filenames, num, FILE_TYPE_AUTO) == 0) { success = TRUE; } else { success = TRUE; } g_strfreev(filenames); break; } End: gtk_drag_finish(context, success, FALSE, time); } static void init_dnd(struct Viewer *d) { GtkWidget *widget; GtkTargetEntry target[] = { {"text/uri-list", 0, DROP_TYPE_FILE}, }; GtkTargetList *list; widget = d->Win; gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL, target, sizeof(target) / sizeof(*target), GDK_ACTION_COPY); list = gtk_drag_dest_get_target_list(widget); gtk_target_list_add_text_targets(list, DROP_TYPE_TEXT); g_signal_connect(widget, "drag-data-received", G_CALLBACK(drag_drop_cb), d); } static void eval_dialog_set_parent_cal(GtkWidget *w, GtkTreeIter *iter, int id, int n) { tree_store_set_int(w, iter, EVAL_DIALOG_COL_TYPE_ID, id); tree_store_set_int(w, iter, EVAL_DIALOG_COL_TYPE_LN, n); tree_store_set_int(w, iter, EVAL_DIALOG_COL_TYPE_N, -1); } static void EvalDialogSetupItem(GtkWidget *w, struct EvalDialog *d) { int i, id, n; GtkTreeIter iter, parent; char buf[64]; tree_store_clear(d->list); id = -1; n = 0; for (i = d->Num - 1; i >= 0; i--) { if (id != EvalList[i].id) { if (id >= 0) { eval_dialog_set_parent_cal(d->list, &parent, id, n); } tree_store_prepend(d->list, &parent, NULL); id = EvalList[i].id; n = 0; } tree_store_prepend(d->list, &iter, &parent); tree_store_set_int(d->list, &iter, EVAL_DIALOG_COL_TYPE_ID, EvalList[i].id); tree_store_set_int(d->list, &iter, EVAL_DIALOG_COL_TYPE_LN, EvalList[i].line); snprintf(buf, sizeof(buf), "%+.15e", EvalList[i].x); tree_store_set_string(d->list, &iter, EVAL_DIALOG_COL_TYPE_X, buf); snprintf(buf, sizeof(buf), "%+.15e", EvalList[i].y); tree_store_set_string(d->list, &iter, EVAL_DIALOG_COL_TYPE_Y, buf); tree_store_set_int(d->list, &iter, EVAL_DIALOG_COL_TYPE_N, i); n++; } eval_dialog_set_parent_cal(d->list, &parent, id, n); gtk_tree_view_expand_all(GTK_TREE_VIEW(d->list)); } static void eval_dialog_copy_selected(GtkWidget *w, gpointer *user_data) { GtkTreeView *tv; GtkTreeSelection *sel; GtkTreeIter iter; GtkTreeModel *model; GList *list, *ptr; GString *str; tv = GTK_TREE_VIEW(user_data); sel = gtk_tree_view_get_selection(tv); list = gtk_tree_selection_get_selected_rows(sel, &model); str = g_string_sized_new(256); if (str == NULL) return; for (ptr = g_list_first(list); ptr; ptr = g_list_next(ptr)) { gboolean found; int id, ln; char *x, *y; found = gtk_tree_model_get_iter(model, &iter, ptr->data); if (! found) continue; if (gtk_tree_path_get_depth(ptr->data) < 2) { gtk_tree_model_get(model, &iter, EVAL_DIALOG_COL_TYPE_ID, &id, EVAL_DIALOG_COL_TYPE_LN, &ln, -1); g_string_append_printf(str, "%d %d\n", id, ln); } else { gtk_tree_model_get(model, &iter, EVAL_DIALOG_COL_TYPE_ID, &id, EVAL_DIALOG_COL_TYPE_LN, &ln, EVAL_DIALOG_COL_TYPE_X, &x, EVAL_DIALOG_COL_TYPE_Y, &y, -1); if (x && y) { g_string_append_printf(str, "%d %d %s %s\n", id, ln, x, y); } g_free(x); g_free(y); } } if (str->len > 0) { GtkClipboard *clip; clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_text(clip, str->str, -1); } g_string_free(str, TRUE); g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } static gboolean eval_data_sel_cb(GtkTreeSelection *sel, gpointer user_data) { int n; GtkWidget *w; w = GTK_WIDGET(user_data); n = gtk_tree_selection_count_selected_rows(sel); gtk_widget_set_sensitive(w, n); return FALSE; } static void EvalDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct EvalDialog *d; n_list_store list[] = { {"#", G_TYPE_INT, TRUE, FALSE, NULL}, {_("Line No."), G_TYPE_INT, TRUE, FALSE, NULL}, {"X", G_TYPE_STRING, TRUE, FALSE, NULL}, {"Y", G_TYPE_STRING, TRUE, FALSE, NULL}, {"N", G_TYPE_INT, FALSE, FALSE, NULL}, }; d = (struct EvalDialog *) data; if (makewidget) { GtkWidget *w, *swin, *hbox; GtkTreeSelection *sel; gtk_dialog_add_buttons(GTK_DIALOG(wi), _("_Mask"), IDEVMASK, _("_Move"), IDEVMOVE, NULL); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); w = tree_store_create(sizeof(list) / sizeof(*list), list); tree_store_set_selection_mode(w, GTK_SELECTION_MULTIPLE); d->list = w; gtk_container_add(GTK_CONTAINER(swin), w); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), swin); gtk_box_pack_start(GTK_BOX(d->vbox), w, TRUE, TRUE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = gtk_button_new_with_mnemonic(_("Select _All")); set_button_icon(w, "edit-select-all"); g_signal_connect(w, "clicked", G_CALLBACK(tree_store_select_all_cb), d->list); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); w = gtk_button_new_with_mnemonic(_("_Copy")); g_signal_connect(w, "clicked", G_CALLBACK(eval_dialog_copy_selected), d->list); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); gtk_widget_set_sensitive(w, FALSE); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); g_signal_connect(sel, "changed", G_CALLBACK(eval_data_sel_cb), w); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); d->show_cancel = FALSE; d->ok_button = _("_Close"); gtk_window_set_default_size(GTK_WINDOW(wi), 540, 400); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } EvalDialogSetupItem(wi, d); } static void select_data_cb(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { struct EvalDialog *d; int a; a = gtk_tree_path_get_depth(path); if (a < 2) return; d = (struct EvalDialog *) data; gtk_tree_model_get(model, iter, EVAL_DIALOG_COL_TYPE_N, &a, -1); if (a >= 0) { arrayadd(d->sel, &a); } } static void EvalDialogClose(GtkWidget *w, void *data) { struct EvalDialog *d; d = (struct EvalDialog *) data; if ((d->ret == IDEVMASK) || (d->ret == IDEVMOVE)) { GtkTreeSelection *selected; selected = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); gtk_tree_selection_selected_foreach(selected, select_data_cb, d); } } void EvalDialog(struct EvalDialog *data, struct objlist *obj, int num, struct narray *iarray) { data->SetupWindow = EvalDialogSetup; data->CloseWindow = EvalDialogClose; data->Obj = obj; data->Num = num; arrayinit(iarray, sizeof(int)); data->sel = iarray; } static gboolean scrollbar_scroll_cb(GtkWidget *w, GdkEventScroll *e, gpointer client_data) { gdouble x, y; switch (e->direction) { case GDK_SCROLL_UP: case GDK_SCROLL_LEFT: range_increment(w, -SCROLL_INC); break; case GDK_SCROLL_DOWN: case GDK_SCROLL_RIGHT: range_increment(w, SCROLL_INC); break; case GDK_SCROLL_SMOOTH: if (gdk_event_get_scroll_deltas((GdkEvent *) e, &x, &y)) { range_increment(w, y * SCROLL_INC); } return TRUE; default: return FALSE; } return TRUE; } #if 0 static void menu_activate(GtkMenuShell *menushell, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; if (d->MoveData) { move_data_cancel(d, FALSE); } } #endif static gboolean ev_popup_menu(GtkWidget *w, gpointer client_data) { struct Viewer *d; if (Menulock || Globallock) return TRUE; d = (struct Viewer *) client_data; do_popup(NULL, d); return TRUE; } static void update_drag(GtkGestureDrag *gesture, gdouble offset_x, gdouble offset_y, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; if (! d->drag_prm.active) { return; } gtk_range_set_value(GTK_RANGE(d->HScroll), d->drag_prm.x - offset_x); gtk_range_set_value(GTK_RANGE(d->VScroll), d->drag_prm.y - offset_y); } static void begin_drag(GtkGestureDrag *gesture, gdouble start_x, gdouble start_y, gpointer user_data) { struct Viewer *d; int cursor; d = (struct Viewer *) user_data; cancel_deceleration(d); switch (d->Mode) { case PointB: case LegendB: case AxisB: case ZoomB: cursor = get_mouse_cursor_type(d, start_x, start_y); d->drag_prm.active = (cursor == GDK_LEFT_PTR); break; default: d->drag_prm.active = FALSE; } d->drag_prm.x = gtk_range_get_value(GTK_RANGE(d->HScroll)); d->drag_prm.y = gtk_range_get_value(GTK_RANGE(d->VScroll)); } static void end_drag(GtkGestureDrag *gesture, gdouble start_x, gdouble start_y, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; d->drag_prm.active = FALSE; } static void long_press_cb(GtkGesture *gesture, gdouble x, gdouble y, gpointer user_data) { GdkEventSequence *sequence; sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)); gtk_gesture_set_sequence_state(gesture, sequence, GTK_EVENT_SEQUENCE_DENIED); } static void long_press_cancelled_cb(GtkGesture *gesture, gpointer user_data) { GdkEventSequence *sequence; const GdkEvent *event; sequence = gtk_gesture_get_last_updated_sequence(gesture); event = gtk_gesture_get_last_event(gesture, sequence); if (event->type == GDK_TOUCH_BEGIN || event->type == GDK_BUTTON_PRESS) { gtk_gesture_set_sequence_state(gesture, sequence, GTK_EVENT_SEQUENCE_DENIED); } } static double get_deceleration_position(double a, double v0, double t) { #if HAVE_EXPM1 return - expm1(- t * a) * v0 / a; #else return (1 - exp(- t * a)) * v0 / a; #endif } #define SWIPE_RESISTANCE 5.0 static gboolean deceleration_cb(GtkWidget *widget, GdkFrameClock *frame_clock, gpointer user_data) { struct Viewer *d; gint64 current_time; gdouble t; double x0, y0, x, y; d = (struct Viewer *) user_data; current_time = gdk_frame_clock_get_frame_time(frame_clock); t = (current_time - d->deceleration_prm.start) / 1000000.0; x0 = gtk_range_get_value(GTK_RANGE(d->HScroll)); y0 = gtk_range_get_value(GTK_RANGE(d->VScroll)); x = d->drag_prm.x - get_deceleration_position(SWIPE_RESISTANCE, d->drag_prm.vx, t); y = d->drag_prm.y - get_deceleration_position(SWIPE_RESISTANCE, d->drag_prm.vy, t); gtk_range_set_value(GTK_RANGE(d->HScroll), x); gtk_range_set_value(GTK_RANGE(d->VScroll), y); x = gtk_range_get_value(GTK_RANGE(d->HScroll)); y = gtk_range_get_value(GTK_RANGE(d->VScroll)); if (fabs(x0 - x) < SCROLL_DECELERATION_LIMIT && fabs(y0 - y) < SCROLL_DECELERATION_LIMIT) { d->deceleration_prm.id = 0; return G_SOURCE_REMOVE; } return G_SOURCE_CONTINUE; } static void swipe_cb(GtkGestureSwipe *gesture, gdouble velocity_x, gdouble velocity_y, gpointer user_data) { struct Viewer *d; GdkFrameClock *frame_clock; d = (struct Viewer *) user_data; if (! d->drag_prm.active) { return; } g_return_if_fail(d->deceleration_prm.id == 0); frame_clock = gtk_widget_get_frame_clock(GTK_WIDGET(d->Win)); d->deceleration_prm.start = gdk_frame_clock_get_frame_time (frame_clock); d->drag_prm.x = gtk_range_get_value(GTK_RANGE(d->HScroll)); d->drag_prm.y = gtk_range_get_value(GTK_RANGE(d->VScroll)); d->drag_prm.vx = velocity_x; d->drag_prm.vy = velocity_y; d->deceleration_prm.id = gtk_widget_add_tick_callback(GTK_WIDGET(d->Win), deceleration_cb, d, NULL); } static void add_event_drag(GtkWidget *widget, struct Viewer *d) { GtkGesture *ev_drag, *ev_swipe, *ev_long_press; ev_drag = gtk_gesture_drag_new(widget); gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(ev_drag), TRUE); g_signal_connect(ev_drag, "drag-update", G_CALLBACK(update_drag), d); g_signal_connect(ev_drag, "drag-begin", G_CALLBACK(begin_drag), d); g_signal_connect(ev_drag, "drag-end", G_CALLBACK(end_drag), d); ev_swipe = gtk_gesture_swipe_new(d->Win); gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(ev_swipe), TRUE); gtk_gesture_group(ev_swipe, ev_drag); g_signal_connect(ev_swipe, "swipe", G_CALLBACK(swipe_cb), d); ev_long_press = gtk_gesture_long_press_new(widget); gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(ev_long_press), TRUE); gtk_gesture_group(ev_long_press, ev_drag); g_signal_connect(ev_long_press, "pressed", G_CALLBACK(long_press_cb), d); g_signal_connect(ev_long_press, "cancelled", G_CALLBACK(long_press_cancelled_cb), d); gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(ev_drag), GTK_PHASE_CAPTURE); gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(ev_swipe), GTK_PHASE_CAPTURE); gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(ev_long_press), GTK_PHASE_CAPTURE); } static void add_event_button(GtkWidget *widget, struct Viewer *d) { GtkGesture *ev; ev = gtk_gesture_multi_press_new(widget); gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(ev), 0); g_signal_connect(ev, "pressed", G_CALLBACK(ViewerEvButtonDown), d); g_signal_connect(ev, "released", G_CALLBACK(ViewerEvButtonUp), d); } static int zoom_begin_obj(double x, double y, struct Viewer *d) { int mx, my; double zoom; zoom = Menulocal.PaperZoom / 10000.0; mx = d->zoom_prm.x = calc_mouse_x(x, zoom, d); my = d->zoom_prm.y = calc_mouse_y(y, zoom, d); d->zoom_prm.focused = arraynum(d->focusobj); if (d->zoom_prm.focused < 1) { return FALSE; } GetLargeFrame(&(d->RefX2), &(d->RefY2), &(d->RefX1), &(d->RefY1), d); if (mx < d->RefX2 || mx > d->RefX1 || my < d->RefY2 || my > d->RefY1) { d->zoom_prm.focused = 0; return FALSE; } d->ShowRect = TRUE; d->ShowFrame = FALSE; return TRUE; } static void zoom_begin(GtkGesture *gesture, GdkEventSequence *sequence, gpointer user_data) { struct Viewer *d; double x, y; int dpi; d = (struct Viewer *) user_data; cancel_deceleration(d); gtk_gesture_get_bounding_box_center(gesture, &x, &y); d->zoom_prm.scale = 1; if (zoom_begin_obj(x, y, d)) { return; } if (getobj(Menulocal.obj, "dpi", 0, 0, NULL, &dpi) == -1) { return; } d->zoom_prm.x = x; d->zoom_prm.y = y; d->zoom_prm.dpi = dpi; ViewerZooming = TRUE; } static double check_dpi_zoom_scale(int dpi, double scale) { double new_dpi; new_dpi = dpi * scale; if (new_dpi < VIEWER_DPI_MIN) { new_dpi = VIEWER_DPI_MIN; } else if (new_dpi > VIEWER_DPI_MAX) { new_dpi = VIEWER_DPI_MAX; } return new_dpi / dpi; } static void zoom_end_viewer(struct Viewer *d) { int dpi; double scale; ViewerZooming = FALSE; if (ZoomLock) { return; } scale = check_dpi_zoom_scale(d->zoom_prm.dpi, d->zoom_prm.scale); dpi = d->zoom_prm.dpi * scale; if (dpi == d->zoom_prm.dpi) { return; } ZoomLock = TRUE; if (putobj(Menulocal.obj, "dpi", 0, &dpi) != -1) { d->hscroll -= (d->cx - d->zoom_prm.x) * (1 - 1.0 / scale); d->vscroll -= (d->cy - d->zoom_prm.y) * (1 - 1.0 / scale); ChangeDPI(); } ZoomLock = FALSE; } static void zoom_end(GtkGesture *gesture, GdkEventSequence *sequence, gpointer user_data) { struct Viewer *d; char *objs[OBJ_MAX]; d = (struct Viewer *) user_data; gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), NULL); if (d->zoom_prm.focused < 1) { zoom_end_viewer(d); return; } d->ShowRect = FALSE; d->ShowFrame = TRUE; clear_focus_obj_pix(d); if (zoom_focused_obj(d->zoom_prm.x, d->zoom_prm.y, d->zoom_prm.scale, d->zoom_prm.scale, objs, d)) { d->zoom_prm.focused = 0; return; } d->zoom_prm.focused = 0; UpdateAll(objs); } static void zoom_cancel(GtkGesture *gesture, GdkEventSequence *sequence, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; ViewerZooming = FALSE; if (d->zoom_prm.focused > 0) { d->ShowRect = FALSE; d->ShowFrame = TRUE; } } static void add_event_zoom(GtkWidget *widget, struct Viewer *d) { GtkGesture *ev; ev = gtk_gesture_zoom_new(widget); g_signal_connect(ev, "begin", G_CALLBACK(zoom_begin), d); g_signal_connect(ev, "end", G_CALLBACK(zoom_end), d); g_signal_connect(ev, "cancel", G_CALLBACK(zoom_cancel), d); g_signal_connect(ev, "scale-changed", G_CALLBACK(gesture_zoom), d); } #if GTK_CHECK_VERSION(4, 0, 0) static void add_event_motion(GtkWidget *widget, struct Viewer *d) { GtkEventController *ev; ev = gtk_event_controller_motion_new(widget); g_signal_connect(ev, "motion", G_CALLBACK(ViewerEvMouseMotion), d); } #endif static gboolean hscroll_change_value_cb(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; start_scroll_deceleration(value, d->vscroll, d); return TRUE; } static gboolean vscroll_change_value_cb(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; start_scroll_deceleration(d->hscroll, value, d); return TRUE; } void ViewerWinSetup(void) { struct Viewer *d; int x, y, width, height; GdkWindow *win; d = &NgraphApp.Viewer; Menulocal.GRAoid = -1; d->Mode = PointB; d->Capture = FALSE; d->MoveData = FALSE; d->MouseMode = MOUSENONE; d->focusobj = arraynew(sizeof(struct FocusObj *)); d->points = arraynew(sizeof(struct Point *)); d->FrameOfsX = 0; d->FrameOfsY = 0; d->LineX = 0; d->LineY = 0; d->Angle = -1; d->CrossX = 0; d->CrossY = 0; d->ShowFrame = FALSE; d->ShowLine = FALSE; d->ShowRect = FALSE; d->ignoreredraw = FALSE; d->KeyMask = 0; d->drag_prm.active = FALSE; d->deceleration_prm.id = 0; OpenGC(); OpenGRA(); SetScroller(); win = gtk_widget_get_window(NgraphApp.Viewer.Win); gdk_window_get_position(win, &x, &y); width = gdk_window_get_width(win); height = gdk_window_get_height(win); d->cx = width / 2; d->cy = height / 2; d->focused_pix = NULL; d->hscroll = gtk_range_get_value(GTK_RANGE(d->HScroll)); d->vscroll = gtk_range_get_value(GTK_RANGE(d->VScroll)); ChangeDPI(); g_signal_connect(d->Win, "draw", G_CALLBACK(ViewerEvPaint), d); g_signal_connect(d->Win, "size-allocate", G_CALLBACK(ViewerEvSize), d); g_signal_connect(d->HScroll, "value-changed", G_CALLBACK(ViewerEvHScroll), d); g_signal_connect(d->VScroll, "value-changed", G_CALLBACK(ViewerEvVScroll), d); g_signal_connect(d->HScroll, "change-value", G_CALLBACK(hscroll_change_value_cb), d); g_signal_connect(d->VScroll, "change-value", G_CALLBACK(vscroll_change_value_cb), d); g_signal_connect(d->HScroll, "scroll-event", G_CALLBACK(scrollbar_scroll_cb), d); g_signal_connect(d->VScroll, "scroll-event", G_CALLBACK(scrollbar_scroll_cb), d); init_dnd(d); gtk_widget_add_events(d->Win, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_KEY_PRESS_MASK | GDK_SCROLL_MASK | GDK_SMOOTH_SCROLL_MASK | GDK_KEY_RELEASE_MASK); gtk_widget_set_can_focus(d->Win, TRUE); if (d->popup) { gtk_menu_attach_to_widget(GTK_MENU(d->popup), GTK_WIDGET(d->Win), NULL); } add_event_drag(d->Win, d); add_event_key(d->Win, G_CALLBACK(ViewerEvKeyDown), G_CALLBACK(ViewerEvKeyUp), d); add_event_button(d->Win, d); add_event_zoom(d->Win, d); #if GTK_CHECK_VERSION(4, 0, 0) add_event_motion(d->Win, d); #else g_signal_connect(d->Win, "motion-notify-event", G_CALLBACK(ViewerEvMouseMotion), d); #endif g_signal_connect(d->Win, "scroll-event", G_CALLBACK(ViewerEvScroll), d); g_signal_connect(d->Win, "popup-menu", G_CALLBACK(ev_popup_menu), d); #if 0 g_signal_connect(d->menu, "selection-done", G_CALLBACK(menu_activate), d); #endif } void ViewerWinClose(void) { struct Viewer *d; d = &NgraphApp.Viewer; arrayfree2(d->focusobj); arrayfree2(d->points); d->focusobj = NULL; d->points = NULL; } static int ViewerWinFileUpdate(int x1, int y1, int x2, int y2, int err) { struct objlist *fileobj; char *argv[7]; int snum, hidden; int did, limit; N_VALUE *dinst; int i; struct narray *eval; int evalnum; int minx, miny, maxx, maxy; struct savedstdio save; char mes[256]; struct narray dfile; int ret; ret = FALSE; ignorestdio(&save); minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; maxx = (x1 > x2) ? x1 : x2; maxy = (y1 > y2) ? y1 : y2; limit = 1; argv[0] = (char *) &minx; argv[1] = (char *) &miny; argv[2] = (char *) &maxx; argv[3] = (char *) &maxy; argv[4] = (char *) &err; argv[5] = (char *) &limit; argv[6] = NULL; fileobj = chkobject("data"); if (! fileobj) goto End; arrayinit(&dfile, sizeof(int)); if (check_drawrable(fileobj)) { goto End; } snum = chkobjlastinst(fileobj) + 1; if (snum == 0) { goto End; } snprintf(mes, sizeof(mes), _("Searching for data.")); SetStatusBar(mes); ProgressDialogCreate(_("Searching for data.")); for (i = 0; i < snum; i++) { dinst = chkobjinst(fileobj, i); if (dinst == NULL) { continue; } _getobj(fileobj, "hidden", dinst, &hidden); if (hidden) { continue; } _getobj(fileobj, "oid", dinst, &did); _exeobj(fileobj, "evaluate", dinst, 6, argv); _getobj(fileobj, "evaluate", dinst, &eval); evalnum = arraynum(eval) / 3; if (evalnum != 0) { arrayadd(&dfile, &i); } } ProgressDialogFinalize(); ResetStatusBar(); ret = update_file_obj_multi(fileobj, &dfile, FALSE); arraydel(&dfile); End: restorestdio(&save); return ret; } static void mask_selected_data(struct objlist *fileobj, int selnum, struct narray *sel_list) { int i, j; struct narray *mask; for (i = 0; i < selnum; i++) { int masknum, sel; sel = arraynget_int(sel_list, i); getobj(fileobj, "mask", EvalList[sel].id, 0, NULL, &mask); if (mask == NULL) { mask = arraynew(sizeof(int)); putobj(fileobj, "mask", EvalList[sel].id, mask); } masknum = arraynum(mask); if (masknum == 0 || (arraynget_int(mask, masknum - 1)) < EvalList[sel].line) { arrayadd(mask, &(EvalList[sel].line)); exeobj(fileobj, "modified", EvalList[sel].id, 0, NULL); set_graph_modified(); } else if ((arraynget_int(mask, 0)) > EvalList[sel].line) { arrayins(mask, &(EvalList[sel].line), 0); exeobj(fileobj, "modified", EvalList[sel].id, 0, NULL); set_graph_modified(); } else { if (bsearch_int(arraydata(mask), masknum, EvalList[sel].line, &j) == 0) { arrayins(mask, &(EvalList[sel].line), j); exeobj(fileobj, "modified", EvalList[sel].id, 0, NULL); set_graph_modified(); } } } } static void Evaluate(int x1, int y1, int x2, int y2, int err, struct Viewer *d) { struct objlist *fileobj; char *argv[7]; int snum, hidden; int limit; int i, j; struct narray *eval; int evalnum, tot; int minx, miny, maxx, maxy; struct savedstdio save; double line, dx, dy; char mes[256]; minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; maxx = (x1 > x2) ? x1 : x2; maxy = (y1 > y2) ? y1 : y2; limit = EVAL_NUM_MAX; argv[0] = (char *) &minx; argv[1] = (char *) &miny; argv[2] = (char *) &maxx; argv[3] = (char *) &maxy; argv[4] = (char *) &err; argv[5] = (char *) &limit; argv[6] = NULL; if ((fileobj = chkobject("data")) == NULL) return; if (check_drawrable(fileobj)) { return; } snum = chkobjlastinst(fileobj) + 1; if (snum == 0) { return; } ignorestdio(&save); snprintf(mes, sizeof(mes), _("Evaluating.")); SetStatusBar(mes); ProgressDialogCreate(_("Evaluating")); tot = 0; for (i = 0; i < snum; i++) { N_VALUE *dinst; dinst = chkobjinst(fileobj, i); if (dinst == NULL) { continue; } _getobj(fileobj, "hidden", dinst, &hidden); if (hidden) { continue; } _exeobj(fileobj, "evaluate", dinst, 6, argv); _getobj(fileobj, "evaluate", dinst, &eval); evalnum = arraynum(eval) / 3; for (j = 0; j < evalnum; j++) { if (tot >= limit) break; tot++; line = arraynget_double(eval, j * 3 + 0); dx = arraynget_double(eval, j * 3 + 1); dy = arraynget_double(eval, j * 3 + 2); EvalList[tot - 1].id = i; EvalList[tot - 1].line = nround(line); EvalList[tot - 1].x = dx; EvalList[tot - 1].y = dy; } if (tot >= limit) break; } ProgressDialogFinalize(); ResetStatusBar(); if (tot > 0) { int ret, selnum; EvalDialog(&DlgEval, fileobj, tot, &SelList); ret = DialogExecute(TopLevel, &DlgEval); selnum = arraynum(&SelList); if (selnum > 0) { switch (ret) { case IDEVMASK: menu_save_undo_single(UNDO_TYPE_EDIT, fileobj->name); mask_selected_data(fileobj, selnum, &SelList); arraydel(&SelList); argv[0] = "data"; argv[1] = NULL; UpdateAll(argv); break; case IDEVMOVE: NSetCursor(GDK_TCROSS); d->Capture = TRUE; d->MoveData = TRUE; break; } } } restorestdio(&save); } static void Trimming(int x1, int y1, int x2, int y2) { struct narray farray; struct objlist *obj; int maxx, maxy, minx, miny; int dir, room; if ((x1 == x2) && (y1 == y2)) return; if ((obj = chkobject("axis")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("trimming (multi select)"), AxisCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i; int *array, num; int vx1, vy1, vx2, vy2; char *argv[4]; vx1 = x1 - x2; vy1 = y1 - y2; vx2 = x2 - x1; vy2 = y1 - y2; num = arraynum(&farray); array = arraydata(&farray); if (num > 0) { menu_save_undo_single(UNDO_TYPE_TRIMMING, obj->name); } for (i = 0; i < num; i++) { double ax, ay, ip1, ip2, min, max; int id; id = array[i]; getobj(obj, "direction", id, 0, NULL, &dir); ax = cos(dir / 18000.0 * MPI); ay = -sin(dir / 18000.0 * MPI); ip1 = ax * vx1 + ay * vy1; ip2 = ax * vx2 + ay * vy2; if (fabs(ip1) > fabs(ip2)) { if (ip1 > 0) { maxx = x1; maxy = y1; minx = x2; miny = y2; } else if (ip1 < 0) { maxx = x2; maxy = y2; minx = x1; miny = y1; } else { maxx = minx = 0; maxy = miny = 0; } } else { if (ip2 > 0) { maxx = x2; maxy = y1; minx = x1; miny = y2; } else if (ip2 < 0) { maxx = x1; maxy = y2; minx = x2; miny = y1; } else { maxx = minx = 0; maxy = miny = 0; } } if ((minx != maxx) && (miny != maxy)) { int rcode1, rcode2; argv[0] = (char *) &minx; argv[1] = (char *) &miny; argv[2] = NULL; rcode1 = getobj(obj, "coordinate", id, 2, argv, &min); argv[0] = (char *) &maxx; argv[1] = (char *) &maxy; argv[2] = NULL; rcode2 = getobj(obj, "coordinate", id, 2, argv, &max); if ((rcode1 != -1) && (rcode2 != -1)) { axis_scale_push(obj, id); room = 0; argv[0] = (char *) &min; argv[1] = (char *) &max; argv[2] = (char *) &room; argv[3] = NULL; exeobj(obj, "scale", id, 3, argv); set_graph_modified(); } } } AdjustAxis(); argv[0] = "data"; argv[1] = "axis"; argv[2] = "axisgrid"; argv[3] = NULL; UpdateAll(argv); } arraydel(&farray); } struct view_region { int x1, y1, x2, y2, err; }; static int select_obj(const char *objname, const struct Viewer *d, struct view_region *region) { struct objlist *fobj, *aobj; char *argv[6]; struct narray *sarray; char **sdata; int snum, dnum; int did, oid; N_VALUE *dinst; int i, match, hidden, r; int minx, miny, maxx, maxy, err; struct savedstdio save; if (region) { minx = (region->x1 < region->x2) ? region->x1 : region->x2; miny = (region->y1 < region->y2) ? region->y1 : region->y2; maxx = (region->x1 > region->x2) ? region->x1 : region->x2; maxy = (region->y1 > region->y2) ? region->y1 : region->y2; err = region->err; argv[0] = (char *) &minx; argv[1] = (char *) &miny; argv[2] = (char *) &maxx; argv[3] = (char *) &maxy; argv[4] = (char *) &err; argv[5] = NULL; } fobj = chkobject(objname); if (! fobj) { return 0; } sarray = &Menulocal.drawrable; snum = arraynum(sarray); if (snum < 1) { return 0; } ignorestdio(&save); aobj = getobject("axis"); sdata = arraydata(sarray); r = 0; for (i = 0; i < snum; i++) { struct objlist *dobj; dobj = getobject(sdata[i]); if (dobj == NULL) { continue; } if (! chkobjchild(fobj, dobj)) { continue; } dnum = chkobjlastinst(dobj) + 1; if (dnum < 1) { continue; } for (did = 0; did < dnum; did++) { dinst = chkobjinst(dobj, did); if (dinst == NULL) { continue; } _getobj(dobj, "hidden", dinst, &hidden); if (hidden) { continue; } if (dobj == aobj) { getobj(fobj, "group_manager", did, 0, NULL, &did); dinst = chkobjinst(dobj, did); } _getobj(dobj, "oid", dinst, &oid); if (region) { _exeobj(dobj, "match", dinst, 5, argv); _getobj(dobj, "match", dinst, &match); if (! match) { continue; } } if (add_focus_obj(d->focusobj, dobj, oid)) { r++; } } } restorestdio(&save); return r; } static int Match(const char *objname, int x1, int y1, int x2, int y2, int err, const struct Viewer *d) { struct view_region view_region; view_region.x1 = x1; view_region.y1 = y1; view_region.x2 = x2; view_region.y2 = y2; view_region.err = err; return select_obj(objname, d, &view_region); } static void ViewSelectAll(void) { struct Viewer *d; int focus; set_pointer_mode(PointerModeFocus); d = &NgraphApp.Viewer; switch (d->Mode) { case PointB: select_obj("axis", d, NULL); select_obj("legend", d, NULL); select_obj("merge", d, NULL); focus = TRUE; break; case AxisB: select_obj("axis", d, NULL); focus = TRUE; break; case LegendB: select_obj("legend", d, NULL); select_obj("merge", d, NULL); focus = TRUE; break; default: focus = FALSE; break; } if (focus) { d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; set_focus_sensitivity(d); gtk_widget_queue_draw(d->Win); } } static void set_pointer_mode_by_obj(struct objlist *obj) { int pointer_mode; const char *name; name = chkobjectname(obj); if (g_strcmp0(name, "axis")) { pointer_mode = PointerModeFocusLegend; } else { pointer_mode = PointerModeFocusAxis; } set_pointer_mode(pointer_mode); } void ViewerSelectAllObj(struct objlist *obj) { struct Viewer *d; const char *name; int n; name = chkobjectname(obj); if (name == NULL) { return; } UnFocus(); set_pointer_mode_by_obj(obj); d = &NgraphApp.Viewer; n = select_obj(name, d, NULL); if (n < 1) { return; } d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; set_focus_sensitivity(d); gtk_widget_queue_draw(d->Win); } static void GetLargeFrame(int *minx, int *miny, int *maxx, int *maxy, const struct Viewer *d) { int i, num; struct FocusObj **focus; struct narray *abbox; int bboxnum, *bbox; N_VALUE *inst; struct savedstdio save; ignorestdio(&save); *minx = *miny = *maxx = *maxy = 0; num = arraynum(d->focusobj); focus = arraydata(d->focusobj); inst = chkobjinstoid(focus[0]->obj, focus[0]->oid); if (inst) { _exeobj(focus[0]->obj, "bbox", inst, 0, NULL); _getobj(focus[0]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); if (bboxnum >= 4) { *minx = bbox[0]; *miny = bbox[1]; *maxx = bbox[2]; *maxy = bbox[3]; } } for (i = 1; i < num; i++) { inst = chkobjinstoid(focus[i]->obj, focus[i]->oid); if (inst == NULL) { continue; } _exeobj(focus[i]->obj, "bbox", inst, 0, NULL); _getobj(focus[i]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); if (bboxnum < 4) { continue; } if (bbox[0] < *minx) { *minx = bbox[0]; } if (bbox[1] < *miny) { *miny = bbox[1]; } if (bbox[2] > *maxx) { *maxx = bbox[2]; } if (bbox[3] > *maxy) { *maxy = bbox[3]; } } restorestdio(&save); } static int coord_conv_x(int x, double zoom, const struct Viewer *d) { return mxd2p(x * zoom + Menulocal.LeftMargin) - d->hscroll + d->cx + CAIRO_COORDINATE_OFFSET; } static int coord_conv_y(int y, double zoom, const struct Viewer *d) { return mxd2p(y * zoom + Menulocal.TopMargin) - d->vscroll + d->cy + CAIRO_COORDINATE_OFFSET; } static void GetFocusFrame(int *minx, int *miny, int *maxx, int *maxy, int ofsx, int ofsy, const struct Viewer *d) { int x1, y1, x2, y2; double zoom; GetLargeFrame(&x1, &y1, &x2, &y2, d); zoom = Menulocal.PaperZoom / 10000.0; *minx = coord_conv_x((x1 + ofsx), zoom, d); *miny = coord_conv_y((y1 + ofsy), zoom, d); *maxx = coord_conv_x((x2 + ofsx), zoom, d); *maxy = coord_conv_y((y2 + ofsy), zoom, d); } static void show_focus_elements(cairo_t *cr, const struct Viewer *d, double zoom, int *data, int num) { int j; for (j = 0; j < num; j += 2) { int x1, y1; x1 = coord_conv_x((data[j] + d->FrameOfsX), zoom, d); y1 = coord_conv_y((data[j + 1] + d->FrameOfsY), zoom, d); cairo_rectangle(cr, x1 - FOCUS_RECT_SIZE / 2 - CAIRO_COORDINATE_OFFSET, y1 - FOCUS_RECT_SIZE / 2 - CAIRO_COORDINATE_OFFSET, FOCUS_RECT_SIZE, FOCUS_RECT_SIZE); } cairo_fill(cr); } static void ShowFocusFrame(cairo_t *cr, struct Viewer *d) { int i, num; struct FocusObj **focus; struct narray *abbox; int bboxnum; int *bbox; int x1, y1, x2, y2; N_VALUE *inst; struct savedstdio save; double zoom; int minx, miny, height, width; ignorestdio(&save); cairo_set_source_rgb(cr, GRAY, GRAY, GRAY); if (Menulocal.focus_frame_type == N_LINE_TYPE_SOLID) { cairo_set_dash(cr, NULL, 0, 0); } else { double dash[] = {DOT_LENGTH}; cairo_set_dash(cr, dash, sizeof(dash) / sizeof(*dash), 0); } num = arraynum(d->focusobj); focus = arraydata(d->focusobj); if (num > 0) { GetFocusFrame(&x1, &y1, &x2, &y2, d->FrameOfsX, d->FrameOfsY, d); x1 -= FOCUS_FRAME_OFST; y1 -= FOCUS_FRAME_OFST; x2 += FOCUS_FRAME_OFST - 1; y2 += FOCUS_FRAME_OFST - 1; minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; width = abs(x2 - x1); height = abs(y2 - y1); cairo_rectangle(cr, minx, miny, width, height); cairo_stroke(cr); cairo_rectangle(cr, x1 - FOCUS_RECT_SIZE, y1 - FOCUS_RECT_SIZE, FOCUS_RECT_SIZE, FOCUS_RECT_SIZE); cairo_rectangle(cr, x1 - FOCUS_RECT_SIZE, y2, FOCUS_RECT_SIZE, FOCUS_RECT_SIZE); cairo_rectangle(cr, x2, y1 - FOCUS_RECT_SIZE, FOCUS_RECT_SIZE, FOCUS_RECT_SIZE); cairo_rectangle(cr, x2, y2, FOCUS_RECT_SIZE, FOCUS_RECT_SIZE); cairo_fill(cr); } zoom = Menulocal.PaperZoom / 10000.0; if (num > 1) { for (i = 0; i < num; i++) { inst = chkobjinstoid(focus[i]->obj, focus[i]->oid); if (inst == NULL) { continue; } _exeobj(focus[i]->obj, "bbox", inst, 0, NULL); _getobj(focus[i]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); if (bboxnum < 4) { continue; } x1 = coord_conv_x((bbox[0] + d->FrameOfsX), zoom, d); y1 = coord_conv_y((bbox[1] + d->FrameOfsY), zoom, d); x2 = coord_conv_x((bbox[2] + d->FrameOfsX), zoom, d); y2 = coord_conv_y((bbox[3] + d->FrameOfsY), zoom, d); minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; width = abs(x2 - x1); height = abs(y2 - y1); cairo_rectangle(cr, minx, miny, width, height); cairo_stroke(cr); } } else if (num == 1) { i = 0; inst = chkobjinstoid(focus[i]->obj, focus[i]->oid); if (inst) { _exeobj(focus[i]->obj, "bbox", inst, 0, NULL); _getobj(focus[i]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); show_focus_elements(cr, d, zoom, bbox + 4, bboxnum - 4); } } if (d->MouseMode == MOUSEDRAG && (d->FrameOfsX || d->FrameOfsY)) { draw_focused_move(cr, zoom, d); } restorestdio(&save); } int get_focused_obj_array(struct narray *focusobj, char **objs) { int i, j, obj_n, n, axis; struct objlist *obj, *obj_array[OBJ_MAX] = {NULL}; struct FocusObj **focus; n = arraynum(focusobj); focus = arraydata(focusobj); axis = FALSE; obj_n = 0; for (i = 0; i < n; i++) { obj = focus[i]->obj; if (! axis && strcmp(obj->name, "axis") == 0) { axis = TRUE; } for (j = 0; j < obj_n; j++) { if (obj_array[j] == obj) { break; } } if (j == obj_n) { obj_array[obj_n] = obj; obj_n++; } } for (i = 0; i < obj_n; i++) { objs[i] = obj_array[i]->name; } if (axis) { objs[i] = "axisgrid"; i++; objs[i] = "data"; i++; } objs[i] = NULL; return i; } static void AlignFocusedObj(int align) { int i, num, bboxnum, *bbox, minx, miny, maxx, maxy, dx, dy; struct FocusObj **focus; struct narray *abbox; char *argv[4], *objs[OBJ_MAX]; struct Viewer *d; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; num = arraynum(d->focusobj); if (num < 1) { return; } focus = arraydata(d->focusobj); if (num == 1) { maxx = Menulocal.PaperWidth; maxy = Menulocal.PaperHeight; minx = 0; miny = 0; } else { GetLargeFrame(&minx, &miny, &maxx, &maxy, d); } if (maxx < minx || maxy < miny) return; PaintLock = TRUE; get_focused_obj_array(d->focusobj, objs); menu_save_undo(UNDO_TYPE_ALIGN, objs); for (i = 0; i < num; i++) { N_VALUE *inst; inst = chkobjinstoid(focus[i]->obj, focus[i]->oid); if (inst == NULL) { continue; } _getobj(focus[i]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); if (bboxnum < 4) { continue; } dx = dy = 0; switch (align) { case VIEW_ALIGN_LEFT: dx = minx - bbox[0]; break; case VIEW_ALIGN_HCENTER: dx = (maxx + minx - bbox[2] - bbox[0]) / 2; break; case VIEW_ALIGN_RIGHT: dx = maxx - bbox[2]; break; case VIEW_ALIGN_TOP: dy = miny - bbox[1]; break; case VIEW_ALIGN_VCENTER: dy = (maxy + miny - bbox[3] - bbox[1]) / 2; break; case VIEW_ALIGN_BOTTOM: dy = maxy - bbox[3]; break; } if (dx == 0 && dy == 0) continue; argv[0] = (char *) &dx; argv[1] = (char *) &dy; argv[2] = NULL; _exeobj(focus[i]->obj, "move", inst, 2, argv); set_graph_modified(); } PaintLock = FALSE; UpdateAll(objs); } static void execute_selected_instances(struct FocusObj **focus, int num, int argc, char **argv, char *field) { int i; for (i = 0; i < num; i++) { N_VALUE *inst; inst = chkobjinstoid(focus[i]->obj, focus[i]->oid); if (inst == NULL) { continue; } if (chkobjfield(focus[i]->obj, field) == 0) { _exeobj(focus[i]->obj, field, inst, argc, argv); set_graph_modified(); } } } static void RotateFocusedObj(int direction) { int num, minx, miny, maxx, maxy, angle, type; int use_pivot, px, py; struct FocusObj **focus; char *argv[5], *objs[OBJ_MAX]; struct Viewer *d; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; num = check_focused_obj_type(d, &type); if (num < 1 || (type & FOCUS_OBJ_TYPE_MERGE)) { return; } angle = (direction == ROTATE_CLOCKWISE) ? 27000 : 9000; focus = arraydata(d->focusobj); PaintLock = TRUE; argv[0] = (char *) ∠ argv[1] = (char *) &use_pivot; argv[2] = (char *) &px; argv[3] = (char *) &py; argv[4] = NULL; if (num == 1) { use_pivot = 0; px = 0; py = 0; } else { GetLargeFrame(&minx, &miny, &maxx, &maxy, d); use_pivot = 1; px = (minx + maxx) / 2; py = (miny + maxy) / 2; } get_focused_obj_array(d->focusobj, objs); menu_save_undo(UNDO_TYPE_ROTATE, objs); execute_selected_instances(focus, num, 4, argv, "rotate"); PaintLock = FALSE; UpdateAll(objs); } static void FlipFocusedObj(enum FLIP_DIRECTION dir) { int num, minx, miny, maxx, maxy, type; int use_pivot, p; struct FocusObj **focus; char *argv[4], *objs[OBJ_MAX]; struct Viewer *d; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; num = check_focused_obj_type(d, &type); if (num < 1 || (type & FOCUS_OBJ_TYPE_MERGE)) { return; } focus = arraydata(d->focusobj); PaintLock = TRUE; argv[0] = (char *) &dir; argv[1] = (char *) &use_pivot; argv[2] = (char *) &p; argv[3] = NULL; if (num == 1) { use_pivot = 0; p = 0; } else { GetLargeFrame(&minx, &miny, &maxx, &maxy, d); use_pivot = 1; p = (dir == FLIP_DIRECTION_HORIZONTAL) ? (minx + maxx) / 2 : (miny + maxy) / 2; } get_focused_obj_array(d->focusobj, objs); menu_save_undo(UNDO_TYPE_FLIP, objs); execute_selected_instances(focus, num, 3, argv, "flip"); PaintLock = FALSE; UpdateAll(objs); } static int check_angle(int a) { if (a < 0) { a %= 36000; a += 36000; } else if (a > 36000) { a %= 36000; } return a; } static void draw_cairo_arc(cairo_t *cr, int x, int y, int rx, int ry, int a1, int a2) { double da1, da2; if (rx < 1 || ry < 1) { return; } cairo_save(cr); cairo_translate(cr, x, y); cairo_scale(cr, rx, ry); da1 = check_angle(a1) * (M_PI / 18000.0); da2 = check_angle(a1 + a2) * (M_PI / 18000.0); cairo_arc_negative(cr, 0.0, 0.0, 1.0, -da1, -da2); cairo_restore(cr); } static void show_focus_line_set_dash(cairo_t *cr, struct narray *style, double zoom) { int *data; double *tmp; int i, n; n = arraynum(style); if (n < 2) { cairo_set_dash(cr, NULL, 0, 0); return; } tmp = g_malloc(sizeof(*tmp) * n); if (tmp == NULL) { return; } data = arraydata(style); for (i = 0; i < n; i++) { tmp[i] = mxd2p(data[i] * zoom); } cairo_set_dash(cr, tmp, n, 0); g_free(tmp); } static void set_support_attribute(cairo_t *cr) { double dash[] = {DOT_LENGTH}; cairo_set_line_width(cr, 1); cairo_set_dash(cr, dash, sizeof(dash) / sizeof(*dash), 0); cairo_set_source_rgb(cr, GRAY, GRAY, GRAY); } static void show_focus_line_common(cairo_t *cr, double zoom, struct objlist *obj, N_VALUE *inst, const struct Point *expo, int close_path) { int stroke, sr, sg, sb, fill, fr, fg, fb, width, join; struct narray *style; _getobj(obj, "fill", inst, &fill); _getobj(obj, "fill_R", inst, &fr); _getobj(obj, "fill_G", inst, &fg); _getobj(obj, "fill_B", inst, &fb); _getobj(obj, "stroke", inst, &stroke); _getobj(obj, "stroke_R", inst, &sr); _getobj(obj, "stroke_G", inst, &sg); _getobj(obj, "stroke_B", inst, &sb); _getobj(obj, "width", inst, &width); _getobj(obj, "style", inst, &style); _getobj(obj, "join", inst, &join); show_focus_line_set_dash(cr, style, zoom); if (stroke) { cairo_set_line_join(cr, join); cairo_set_line_width(cr, mxd2p(width * zoom)); cairo_set_source_rgba(cr, sr / 255.0, sg / 255.0, sb / 255.0, EDITING_OPACITY); cairo_stroke_preserve(cr); } if (fill) { if (expo) { cairo_line_to(cr, expo->x, expo->y); } cairo_set_source_rgba(cr, fr / 255.0, fg / 255.0, fb / 255.0, EDITING_OPACITY); cairo_fill_preserve(cr); } if (close_path) { cairo_close_path(cr); } set_support_attribute(cr); cairo_stroke(cr); } static void show_focus_line_arc(cairo_t *cr, int change, double zoom, struct objlist *obj, N_VALUE *inst, struct Viewer *d) { int x, y, rx, ry, fill, pie_slice, a1, a2, close_path; int stroke; struct Point expo, *poptr; _getobj(obj, "x", inst, &x); _getobj(obj, "y", inst, &y); _getobj(obj, "rx", inst, &rx); _getobj(obj, "ry", inst, &ry); _getobj(obj, "angle1", inst, &a1); _getobj(obj, "angle2", inst, &a2); _getobj(obj, "close_path", inst, &close_path); _getobj(obj, "fill", inst, &fill); _getobj(obj, "stroke", inst, &stroke); _getobj(obj, "pieslice", inst, &pie_slice); if (! stroke) { close_path = TRUE; } switch (change) { case ARC_POINT_TYPE_R: ry -= d->LineY; rx -= d->LineX; break; case ARC_POINT_TYPE_ANGLE1: case ARC_POINT_TYPE_ANGLE2: if (arc_get_angle(obj, inst, d->KeyMask, change, d->MouseX2, d->MouseY2, &a1, &a2)) { return; } d->Angle = (change == ARC_POINT_TYPE_ANGLE1) ? a1 : (a1 + a2) % 36000; break; } poptr = NULL; if (rx > 0 && ry > 0) { rx = mxd2p(rx * zoom); ry = mxd2p(ry * zoom); x = coord_conv_x(x, zoom, d); y = coord_conv_y(y, zoom, d); cairo_save(cr); draw_cairo_arc(cr, x, y, rx, ry, a1, a2); if (close_path) { if (pie_slice) { cairo_line_to(cr, x, y); } cairo_close_path(cr); } else { if (pie_slice) { expo.x = x; expo.y = y; poptr = &expo; } } show_focus_line_common(cr, zoom, obj, inst, poptr, TRUE); cairo_restore(cr); } } static void draw_frame_rect(cairo_t *gc, int change, double zoom, int *bbox, struct objlist *obj, N_VALUE *inst, const struct Viewer *d) { int x1 = 0, y1 = 0, x2 = 0, y2 = 0; int minx, miny, height, width; switch (change) { case 0: x1 = coord_conv_x(bbox[4] + d->LineX, zoom, d); y1 = coord_conv_y(bbox[5] + d->LineY, zoom, d); x2 = coord_conv_x(bbox[8], zoom, d); y2 = coord_conv_y(bbox[9], zoom, d); break; case 1: x1 = coord_conv_x(bbox[4], zoom, d); y1 = coord_conv_y(bbox[5] + d->LineY, zoom, d); x2 = coord_conv_x(bbox[8] + d->LineX, zoom, d); y2 = coord_conv_y(bbox[9], zoom, d); break; case 2: x1 = coord_conv_x(bbox[4], zoom, d); y1 = coord_conv_y(bbox[5], zoom, d); x2 = coord_conv_x(bbox[8] + d->LineX, zoom, d); y2 = coord_conv_y(bbox[9] + d->LineY, zoom, d); break; case 3: x1 = coord_conv_x(bbox[4] + d->LineX, zoom, d); y1 = coord_conv_y(bbox[5], zoom, d); x2 = coord_conv_x(bbox[8], zoom, d); y2 = coord_conv_y(bbox[9] + d->LineY, zoom, d); break; } minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; width = abs(x2 - x1); height = abs(y2 - y1); cairo_rectangle(gc, minx, miny, width, height); show_focus_line_common(gc, zoom, obj, inst, NULL, FALSE); } static void draw_focus_axis(cairo_t *gc, int change, double zoom, int *bbox, struct objlist *obj, N_VALUE *inst, const struct Viewer *d) { int x1 = 0, y1 = 0, x2 = 0, y2 = 0; int minx, miny, height, width, single_axis; char *group; _getobj(obj, "group", inst, &group); single_axis = (group == NULL || group[0] == 'a'); switch (change) { case 0: x1 = coord_conv_x(bbox[4] + d->LineX, zoom, d); y1 = coord_conv_y(bbox[5] + d->LineY, zoom, d); if (single_axis) { x2 = coord_conv_x(bbox[6], zoom, d); y2 = coord_conv_y(bbox[7], zoom, d); } else { x2 = coord_conv_x(bbox[8], zoom, d); y2 = coord_conv_y(bbox[9], zoom, d); } break; case 1: x1 = coord_conv_x(bbox[4], zoom, d); if (single_axis) { y1 = coord_conv_y(bbox[5], zoom, d); x2 = coord_conv_x(bbox[6] + d->LineX, zoom, d); y2 = coord_conv_y(bbox[7] + d->LineY, zoom, d); } else { y1 = coord_conv_y(bbox[5] + d->LineY, zoom, d); x2 = coord_conv_x(bbox[8] + d->LineX, zoom, d); y2 = coord_conv_y(bbox[9], zoom, d); } break; case 2: x1 = coord_conv_x(bbox[4], zoom, d); y1 = coord_conv_y(bbox[5], zoom, d); x2 = coord_conv_x(bbox[8] + d->LineX, zoom, d); y2 = coord_conv_y(bbox[9] + d->LineY, zoom, d); break; case 3: x1 = coord_conv_x(bbox[4] + d->LineX, zoom, d); y1 = coord_conv_y(bbox[5], zoom, d); x2 = coord_conv_x(bbox[8], zoom, d); y2 = coord_conv_y(bbox[9] + d->LineY, zoom, d); break; } minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; width = abs(x2 - x1); height = abs(y2 - y1); set_support_attribute(gc); if (single_axis) { cairo_move_to(gc, x1, y1); cairo_line_to(gc, x2, y2); } else { cairo_rectangle(gc, minx, miny, width, height); } cairo_stroke(gc); } static int draw_curve_common(cairo_t *cr, int *data, int num, int intp) { struct narray expand_points; int *cdata; int r, n, i; arrayinit(&expand_points, sizeof(int)); r = curve_expand_points(data, num, intp, &expand_points); if (r) { return 1; } n = arraynum(&expand_points) / 2; if (n < 1) { arraydel(&expand_points); g_free(data); return 1; } cdata = arraydata(&expand_points); cairo_move_to(cr, cdata[0], cdata[1]); for (i = 1; i < n; i += 1) { cairo_line_to(cr, cdata[i * 2], cdata[i * 2 + 1]); } arraydel(&expand_points); return 0; } static int draw_focus_curve(cairo_t *cr, int *po, int num, int intp, double zoom, const struct Viewer *d) { int *data; int i, r; if (num < 6) { return 1; } if (po[num - 1] == po[num - 3] && po[num -2] == po[num - 4]) { num -= 2; if (num < 6) { return 1; } } data = g_malloc(sizeof(*data) * num); if (data == NULL) { return 1; } for (i = 0; i < num / 2; i++) { data[i * 2] = coord_conv_x(po[i * 2], zoom, d); data[i * 2 + 1] = coord_conv_y(po[i * 2 + 1], zoom, d); } r = draw_curve_common(cr, data, num / 2, intp); g_free(data); return r; } static void draw_focus_line(cairo_t *gc, int change, double zoom, int bboxnum, int *bbox, struct objlist *obj, N_VALUE *inst, const struct Viewer *d) { int j, ofsx, ofsy, intp, type, r, fill_rule; int *data; int fill, close_path; _getobj(obj, "type", inst, &type); _getobj(obj, "interpolation", inst, &intp); data = g_malloc(sizeof(*data) * (bboxnum - 4)); if (data == NULL) { return; } for (j = 0; j < bboxnum - 4; j += 2) { if (change == j / 2) { ofsx = d->LineX; ofsy = d->LineY; } else { ofsx = 0; ofsy = 0; } data[j] = bbox[j + 4] + ofsx; data[j + 1] = bbox[j + 5] + ofsy; } r = TRUE; if (type) { r = draw_focus_curve(gc, data, bboxnum - 4, intp, zoom, d); } if (r) { for (j = 0; j < bboxnum - 4; j += 2) { int x1, y1; x1 = coord_conv_x(data[j], zoom, d); y1 = coord_conv_y(data[j + 1], zoom, d); if (j == 0) { cairo_move_to(gc, x1, y1); } else { cairo_line_to(gc, x1, y1); } } } _getobj(obj, "fill", inst, &fill); _getobj(obj, "close_path", inst, &close_path); _getobj(obj, "fill_rule", inst, &fill_rule); cairo_set_fill_rule(gc, (fill_rule) ? CAIRO_FILL_RULE_WINDING : CAIRO_FILL_RULE_EVEN_ODD); show_focus_line_common(gc, zoom, obj, inst, NULL, fill || close_path); set_support_attribute(gc); show_focus_elements(gc, d, zoom, data, bboxnum - 4); g_free(data); } static void ShowFocusLine(cairo_t *cr, struct Viewer *d) { int num; struct FocusObj **focus; struct narray *abbox; int bboxnum; int *bbox; N_VALUE *inst; struct savedstdio save; double zoom; double dash[] = {DOT_LENGTH}; ignorestdio(&save); cairo_set_source_rgb(cr, GRAY, GRAY, GRAY); cairo_set_dash(cr, dash, sizeof(dash) / sizeof(*dash), 0); num = arraynum(d->focusobj); focus = arraydata(d->focusobj); zoom = Menulocal.PaperZoom / 10000.0; if (num != 1) { goto End; } inst = chkobjinstoid(focus[0]->obj, focus[0]->oid); if (inst == NULL) { goto End; } _exeobj(focus[0]->obj, "bbox", inst, 0, NULL); _getobj(focus[0]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); if (focus[0]->obj == chkobject("rectangle")) { draw_frame_rect(cr, d->ChangePoint, zoom, bbox, focus[0]->obj, inst, d); } else if (focus[0]->obj == chkobject("arc")) { show_focus_line_arc(cr, d->ChangePoint, zoom, focus[0]->obj, inst, d); } else if (focus[0]->obj == chkobject("path")) { draw_focus_line(cr, d->ChangePoint, zoom, bboxnum, bbox, focus[0]->obj, inst, d); } else if (focus[0]->obj == chkobject("axis")) { draw_focus_axis(cr, d->ChangePoint, zoom, bbox, focus[0]->obj, inst, d); } End: restorestdio(&save); } static void set_dash(cairo_t *cr, struct presettings *setting, double zoom) { int style, i; double dash[LINE_STYLE_ELEMENT_MAX]; struct line_style *line_style; style = setting->line_style; if (style == 0) { cairo_set_dash(cr, NULL, 0, 0); return; } line_style = FwLineStyle + style; for (i = 0; i < line_style->num; i++) { dash[i] = mxd2p(line_style->nlist[i] * zoom); } cairo_set_dash(cr, dash, line_style->num, 0); } static void draw_points(cairo_t *cr, const struct Viewer *d, struct Point **po, int num, double zoom) { int i; for (i = 0; i < num; i++) { int x1, y1; x1 = coord_conv_x(po[i]->x, zoom, d); y1 = coord_conv_y(po[i]->y, zoom, d); cairo_move_to(cr, x1 - (POINT_LENGTH - 1), y1); cairo_line_to(cr, x1 + POINT_LENGTH, y1); cairo_move_to(cr, x1, y1 - (POINT_LENGTH - 1)); cairo_line_to(cr, x1, y1 + POINT_LENGTH); } cairo_set_dash(cr, NULL, 0, 0); cairo_set_source_rgba(cr, GRAY, GRAY, GRAY, 1); cairo_set_line_width(cr, 1); cairo_stroke(cr); } static int draw_points_curve(cairo_t *cr, const struct Viewer *d, struct Point **po, int num, int intp, double zoom) { int *data; int i, r; if (num < 3 || intp < 0) { return 1; } if (po[num -1]->x == po[num - 2]->x && po[num -1]->y == po[num - 2]->y) { num--; if (num < 3) { return 1; } } data = g_malloc(sizeof(*data) * num * 2); if (data == NULL) { return 1; } for (i = 0; i < num; i++) { data[i * 2] = coord_conv_x(po[i]->x, zoom, d); data[i * 2 + 1] = coord_conv_y(po[i]->y, zoom, d); } r = draw_curve_common(cr, data, num, intp); g_free(data); return r; } static void ShowPoints(cairo_t *cr, const struct Viewer *d) { int num, x1, y1, stroke, fill; struct Point **po; double zoom, lw; double r, g, b; struct presettings setting; presetting_get(&setting); num = arraynum(d->points); po = arraydata(d->points); zoom = Menulocal.PaperZoom / 10000.0; r = setting.r1 / 255.0; g = setting.g1 / 255.0; b = setting.b1 / 255.0; cairo_save(cr); lw = mxd2p(setting.line_width * zoom); fill = setting.fill; stroke = setting.stroke; if ((setting.fill == 0 && setting.stroke == 0) || d->Mode == GaussB) { double dash[] = {DOT_LENGTH}; cairo_set_dash(cr, dash, sizeof(dash) / sizeof(*dash), 0); stroke = TRUE; fill = FALSE; r = g = b = GRAY; lw = 1; } else { set_dash(cr, &setting, zoom); } if (d->Mode & POINT_TYPE_DRAW1) { if (num >= 2) { int x2, y2; int minx, miny, height, width; x1 = coord_conv_x(po[0]->x, zoom, d); y1 = coord_conv_y(po[0]->y, zoom, d); x2 = coord_conv_x(po[1]->x, zoom, d); y2 = coord_conv_y(po[1]->y, zoom, d); minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; width = abs(x2 - x1); height = abs(y2 - y1); switch (d->Mode) { case ArcB: draw_cairo_arc(cr, minx + width / 2, miny + height / 2, width / 2, height / 2, 0, 36000); break; case CrossB: fill = FALSE; cairo_move_to(cr, minx, miny); cairo_line_to(cr, minx, miny + height); cairo_line_to(cr, minx + width, miny + height); cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); break; case FrameB: case SectionB: fill = FALSE; cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); /* fall-through */ case GaussB: case RectB: default: cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); cairo_rectangle(cr, minx, miny, width, height); } if (fill) { cairo_set_source_rgba(cr, setting.r2 / 255.0, setting.g2 / 255.0, setting.b2 / 255.0, EDITING_OPACITY); if (stroke) { cairo_fill_preserve(cr); } else { cairo_fill(cr); } } if (stroke) { cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER); cairo_set_line_width(cr, lw); cairo_set_source_rgba(cr, r, g, b, EDITING_OPACITY); cairo_stroke(cr); } } } else { if (num >= 1) { int line; line = draw_points_curve(cr, d, po, num, setting.interpolation, zoom); if (line) { int i; x1 = coord_conv_x(po[0]->x, zoom, d); y1 = coord_conv_y(po[0]->y, zoom, d); cairo_move_to(cr, x1, y1); for (i = 1; i < num; i++) { x1 = coord_conv_x(po[i]->x, zoom, d); y1 = coord_conv_y(po[i]->y, zoom, d); cairo_line_to(cr, x1, y1); } } if (d->Mode == SingleB) { fill = FALSE; stroke = TRUE; cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE); } else { if (setting.close_path) { cairo_close_path(cr); } cairo_set_line_cap(cr, CAIRO_LINE_CAP_BUTT); } if (fill) { cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD); cairo_set_source_rgba(cr, setting.r2 / 255.0, setting.g2 / 255.0, setting.b2 / 255.0, EDITING_OPACITY); if (stroke) { cairo_fill_preserve(cr); } else { cairo_fill(cr); } } if (stroke) { cairo_set_line_join(cr, (cairo_line_join_t) setting.join); cairo_set_line_width(cr, lw); cairo_set_source_rgba(cr, r, g, b, EDITING_OPACITY); cairo_stroke(cr); } } } draw_points(cr, d, po, num, zoom); cairo_restore(cr); } static void draw_focused_axis(struct objlist *obj, int id, int argc, char **argv) { int idx, idy, idu, idr, idg; int findX, findY, findU, findR, findG; char *group; getobj(obj, "group", id, 0, NULL, &group); if (group == NULL || group[0] == 'a') { exeobj(obj, "draw", id, argc, argv); return; } search_axis_group(obj, id, group, &findX, &findY, &findU, &findR, &findG, &idx, &idy, &idu, &idr, &idg); if (findX) { exeobj(obj, "draw", idx, argc, argv); } if (findY) { exeobj(obj, "draw", idy, argc, argv); } if (findU) { exeobj(obj, "draw", idu, argc, argv); } if (findR) { exeobj(obj, "draw", idr, argc, argv); } if (findG) { struct objlist *dobj; dobj = chkobject("axisgrid"); exeobj(dobj, "draw", idg, argc, argv); } } static void clear_focus_obj_pix(struct Viewer *d) { if (d->focused_pix) { cairo_surface_destroy(d->focused_pix); } d->focused_pix = NULL; } static void draw_focused_each_obj(struct Viewer *d, int GC) { char *argv[2]; struct objlist *aobj; struct savedstdio save; int i, num; aobj = getobject("axis"); argv[0]=(char *)&GC; argv[1]=NULL; ignorestdio(&save); num = arraynum(d->focusobj); for (i = 0; i < num; i++) { struct FocusObj *focus; struct objlist *obj; N_VALUE *inst; int id; focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) { continue; } inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) { continue; } obj = focus->obj; _getobj(obj, "id", inst, &id); if (obj == aobj) { draw_focused_axis(obj, id, 1, argv); } else { exeobj(obj, "draw", id, 1, argv); } } _GRAclose(GC); restorestdio(&save); } static void draw_focused_obj(struct Viewer *d) { cairo_surface_t *pix; int GC, id, found, output, w, h, num, dpi, dpi_org, a; struct objlist *obj, *robj; N_VALUE *inst; struct gra2cairo_local *local; num = arraynum(d->focusobj); if (num < 1) { return; } found = find_gra2gdk_inst(&obj, &inst, &robj, &output, &local); if (! found) { return; } if (getobj(Menulocal.obj, "dpi", 0, 0, NULL, &dpi) == -1) { return; } w = cairo_image_surface_get_width(Menulocal.bg); h = cairo_image_surface_get_height(Menulocal.bg); pix = gra2gdk_create_pixmap(local, w, h, -1, -1, -1); if (pix == NULL) { return; } _getobj(obj, "id", inst, &id); a = 255 * EDITING_OPACITY; putobj(obj, "force_opacity", id, &a); getobj(obj, "dpi", id, 0, NULL, &dpi_org); putobj(obj, "dpi", id, &dpi); GC = _GRAopen("gra2gdk", "_output", robj, inst, output, -1, -1, -1, NULL, local); if (GC < 0) { cairo_surface_destroy(pix); return; } GRAinit(GC, Menulocal.LeftMargin, Menulocal.TopMargin, Menulocal.PaperWidth, Menulocal.PaperHeight, Menulocal.PaperZoom); GRAview(GC, 0, 0, Menulocal.PaperWidth, Menulocal.PaperHeight, 0); draw_focused_each_obj(d, GC); a = 0; putobj(obj, "force_opacity", id, &a); putobj(obj, "dpi", id, &dpi_org); _GRAclose(GC); if (d->focused_pix) { cairo_surface_destroy(d->focused_pix); } d->focused_pix = pix; } static void draw_focused_zoom(cairo_t *cr, int px, int py, double zoom, struct Viewer *d) { cairo_pattern_t *pattern; cairo_matrix_t matrix; int cx, cy; if (d->focused_pix == NULL) { draw_focused_obj(d); if (d->focused_pix == NULL) { return; } } cx = coord_conv_x(px, zoom, d); cy = coord_conv_y(py, zoom, d); pattern = cairo_pattern_create_for_surface(d->focused_pix); cairo_matrix_init_identity(&matrix); cairo_matrix_translate(&matrix, cx + d->hscroll - d->cx - cx / d->ZoomX, cy + d->vscroll - d->cy - cy / d->ZoomY); cairo_matrix_scale(&matrix, 1.0 / d->ZoomX, 1.0 / d->ZoomY); cairo_set_source(cr, pattern); cairo_pattern_set_matrix(pattern, &matrix); cairo_paint(cr); cairo_pattern_destroy(pattern); } static void draw_focused_move(cairo_t *cr, double zoom, struct Viewer *d) { int x, y; if (d->focused_pix == NULL) { draw_focused_obj(d); if (d->focused_pix == NULL) { return; } } x = mxd2p(d->FrameOfsX) * zoom; y = mxd2p(d->FrameOfsY) * zoom; cairo_set_source_surface(cr, d->focused_pix, nround(- d->hscroll + d->cx + x), nround(- d->vscroll + d->cy + y)); cairo_paint(cr); } static void ShowFrameRect(cairo_t *cr, struct Viewer *d) { int x1, y1, x2, y2; double zoom; int minx, miny, width, height; double dash[] = {DOT_LENGTH}; if (d->MouseX1 == d->MouseX2 && d->MouseY1 == d->MouseY2) { return; } zoom = Menulocal.PaperZoom / 10000.0; if (d->zoom_prm.focused > 0) { d->ZoomX = d->zoom_prm.scale; d->ZoomY = d->zoom_prm.scale; draw_focused_zoom(cr, d->zoom_prm.x, d->zoom_prm.y, zoom, d); } else if (d->MouseMode == MOUSEZOOM1 || d->MouseMode == MOUSEZOOM2 || d->MouseMode == MOUSEZOOM3 || d->MouseMode == MOUSEZOOM4) { draw_focused_zoom(cr, d->MouseX1, d->MouseY1, zoom, d); } cairo_set_source_rgb(cr, GRAY, GRAY, GRAY); cairo_set_dash(cr, dash, sizeof(dash) / sizeof(*dash), 0); x1 = coord_conv_x(d->MouseX1, zoom, d); y1 = coord_conv_y(d->MouseY1, zoom, d); x2 = coord_conv_x(d->MouseX2, zoom, d); y2 = coord_conv_y(d->MouseY2, zoom, d); minx = (x1 < x2) ? x1 : x2; miny = (y1 < y2) ? y1 : y2; width = abs(x2 - x1); height = abs(y2 - y1); cairo_rectangle(cr, minx, miny, width, height); cairo_stroke(cr); } static void ShowCrossGauge(cairo_t *cr, const struct Viewer *d) { int x, y, width, height; GdkWindow *win; win = gtk_widget_get_window(d->Win); if (win == NULL) { return; } width = gdk_window_get_width(win); height = gdk_window_get_height(win); x = d->CrossX; y = d->CrossY; cairo_set_source_rgb(cr, GRAY, GRAY, GRAY); cairo_set_dash(cr, NULL, 0, 0); cairo_move_to(cr, x, 0); cairo_line_to(cr, x, height); cairo_move_to(cr, 0, y); cairo_line_to(cr, width, y); cairo_stroke(cr); } static void CheckGrid(int ofs, unsigned int state, int *x, int *y, double *zoom_x, double *zoom_y) { int offset; int grid; if ((state & GDK_CONTROL_MASK) && ! ofs && x != NULL && y != NULL) { if (abs(*x) > abs(*y)) { *y = 0; } else { *x = 0; } } grid = Menulocal.grid; if (state & GDK_SHIFT_MASK) { return; } if (ofs) { offset = grid / 2; } else { offset = 0; } if (x != NULL) { *x = ((*x + offset) / grid) * grid; } if (y != NULL) { *y = ((*y + offset) / grid) * grid; } if (zoom_x != NULL) { *zoom_x = nround(*zoom_x * grid) / ((double) grid); } if (zoom_y != NULL) { *zoom_y = nround(*zoom_y * grid) / ((double) grid); } } static void mouse_down_point(unsigned int state, struct Viewer *d) { d->Capture = TRUE; if (arraynum(d->focusobj) && ! (state & GDK_SHIFT_MASK)) { d->ShowFrame = FALSE; clear_focus_obj(d); } d->MouseMode = MOUSEPOINT; d->ShowRect = TRUE; } #define ZOOM_RATIO_LIMIT 0.5 static void calc_zoom(struct Viewer *d, int vx1, int vy1, int *x2, int *y2, double *zoom_x, double *zoom_y, int preserve_ratio) { int vx2, vy2; double cc, nn, zoom2, zmx, zmy, zmr; vx1 -= d->RefX1 - d->MouseDX; vy1 -= d->RefY1 - d->MouseDY; vx2 = (d->RefX2 - d->RefX1); vy2 = (d->RefY2 - d->RefY1); cc = 1.0 * vx1 * vx2 + 1.0 * vy1 * vy2; nn = 1.0 * vx2 * vx2 + 1.0 * vy2 * vy2; if (x2) { *x2 = vx2; } if (y2) { *y2 = vy2; } if ((nn == 0) || (cc < 0)) { zoom2 = 0; } else { zoom2 = cc / nn; } if (vx2 * vx1 <= 0) { zmx = 0; } else { zmx = 1.0 * vx1 / vx2; } if (vy2 * vy1 <= 0) { zmy = 0; } else { zmy = 1.0 * vy1 / vy2; } if (zmx > 0) { zmr = zmy / zmx; } else { zmr = 2; } if (zoom_x && zoom_y) { if (preserve_ratio) { if (zmr > 1 + ZOOM_RATIO_LIMIT) { *zoom_x = 1; *zoom_y = zmy; } else if (zmr < ZOOM_RATIO_LIMIT) { *zoom_x = zmx; *zoom_y = 1; } else { *zoom_x = zoom2; *zoom_y = zoom2; } } else { *zoom_x = zmx; *zoom_y = zmy; } } } static void set_zoom_prm(struct Viewer *d, int vx2, int vy2, double zoom_x, double zoom_y) { int vx1, vy1; vx1 = d->RefX1 + vx2 * zoom_x; vy1 = d->RefY1 + vy2 * zoom_y; d->MouseX1 = d->RefX1; d->MouseY1 = d->RefY1; d->MouseX2 = vx1; d->MouseY2 = vy1; } static void init_zoom(unsigned int state, struct Viewer *d) { int vx1, vy1, vx2, vy2, preserve_ratio; double zoom_x, zoom_y; d->ShowFrame = FALSE; d->ZoomX = 1; d->ZoomY = 1; d->MouseDX = d->RefX2 - d->MouseX1; d->MouseDY = d->RefY2 - d->MouseY1; vx1 = d->MouseX1; vy1 = d->MouseY1; preserve_ratio = (state & GDK_CONTROL_MASK); calc_zoom(d, vx1, vy1, &vx2, &vy2, &zoom_x, &zoom_y, preserve_ratio); CheckGrid(FALSE, state, NULL, NULL, &zoom_x, &zoom_y); set_zoom_prm(d, vx2, vy2, zoom_x, zoom_y); d->ShowRect = TRUE; } static void mouse_down_move(unsigned int state, TPoint *point, struct Viewer *d) { int cursor; cursor = get_mouse_cursor_type(d, point->x, point->y); if (cursor == GDK_LEFT_PTR) { NSetCursor(cursor); return; } d->Capture = TRUE; switch (cursor) { case GDK_TOP_LEFT_CORNER: GetLargeFrame(&(d->RefX2), &(d->RefY2), &(d->RefX1), &(d->RefY1), d); d->MouseMode = MOUSEZOOM1; NSetCursor(cursor); init_zoom(state, d); break; case GDK_TOP_RIGHT_CORNER: GetLargeFrame(&(d->RefX1), &(d->RefY2), &(d->RefX2), &(d->RefY1), d); d->MouseMode = MOUSEZOOM2; NSetCursor(cursor); init_zoom(state, d); break; case GDK_BOTTOM_RIGHT_CORNER: GetLargeFrame(&(d->RefX1), &(d->RefY1), &(d->RefX2), &(d->RefY2), d); d->MouseMode = MOUSEZOOM3; NSetCursor(cursor); init_zoom(state, d); break; case GDK_BOTTOM_LEFT_CORNER: GetLargeFrame(&(d->RefX2), &(d->RefY1), &(d->RefX1), &(d->RefY2), d); d->MouseMode = MOUSEZOOM4; NSetCursor(cursor); init_zoom(state, d); break; case GDK_CROSSHAIR: d->MouseMode = MOUSECHANGE; d->Angle = -1; d->ShowFrame = FALSE; d->ShowLine = TRUE; d->LineX = d->LineY = 0; NSetCursor(cursor); break; case GDK_FLEUR: d->MouseMode = MOUSEDRAG; break; } } static void mouse_down_move_data(struct Viewer *d) { struct objlist *fileobj, *aobjx, *aobjy; struct narray iarray, *move, *movex, *movey; int selnum, sel, i, ax, ay, anum, iline, j, movenum; double dx, dy; char *axis, *argv[3]; int *ptr; fileobj = chkobject("data"); if (fileobj == NULL) goto ErrEnd; selnum = arraynum(&SelList); for (i = 0; i < selnum; i++) { sel = arraynget_int(&SelList, i); if (getobj(fileobj, "axis_x", EvalList[sel].id, 0, NULL, &axis) == -1) goto ErrEnd; arrayinit(&iarray, sizeof(int)); if (getobjilist(axis, &aobjx, &iarray, FALSE, NULL)) { ax = -1; } else { anum = arraynum(&iarray); ax = (anum < 1) ? -1 : (arraylast_int(&iarray)); arraydel(&iarray); } if (getobj(fileobj, "axis_y", EvalList[sel].id, 0, NULL, &axis) == -1) goto ErrEnd; arrayinit(&iarray, sizeof(int)); if (getobjilist(axis, &aobjy, &iarray, FALSE, NULL)) { ay = -1; } else { anum = arraynum(&iarray); ay = (anum < 1) ? -1 : (arraylast_int(&iarray)); arraydel(&iarray); } if (ax == -1 || ay == -1) goto ErrEnd; argv[0] = (char *) &(d->MouseX1); argv[1] = (char *) &(d->MouseY1); argv[2] = NULL; if (getobj(aobjx, "coordinate", ax, 2, argv, &dx) == -1 || getobj(aobjy, "coordinate", ay, 2, argv, &dy) == -1) goto ErrEnd; if (exeobj(fileobj, "move_data_adjust", EvalList[sel].id, 0, NULL) == -1) goto ErrEnd; if (getobj(fileobj, "move_data", EvalList[sel].id, 0, NULL, &move) == -1) goto ErrEnd; if (getobj(fileobj, "move_data_x", EvalList[sel].id, 0, NULL, &movex) == -1) goto ErrEnd; if (getobj(fileobj, "move_data_y", EvalList[sel].id, 0, NULL, &movey) == - 1) goto ErrEnd; if (move == NULL) { move = arraynew(sizeof(int)); putobj(fileobj, "move_data", EvalList[sel].id, move); } if (movex == NULL) { movex = arraynew(sizeof(double)); putobj(fileobj, "move_data_x", EvalList[sel].id, movex); } if (movey == NULL) { movey = arraynew(sizeof(double)); putobj(fileobj, "move_data_y", EvalList[sel].id, movey); } movenum = arraynum(move); for (j = 0; j < movenum; j++) { ptr = (int *) arraynget(move, j); if (ptr) { iline = * ptr; if (iline == EvalList[sel].line) break; } } if (j == movenum) { arrayadd(move, &(EvalList[sel].line)); arrayadd(movex, &dx); arrayadd(movey, &dy); set_graph_modified(); } else { arrayput(move, &(EvalList[sel].line), j); arrayput(movex, &dx, j); arrayput(movey, &dy, j); set_graph_modified(); } } if (selnum > 0) { message_box(NULL, _("Data points are moved."), "Confirm", RESPONS_OK); } argv[0] = "data"; argv[1] = NULL; UpdateAll(argv); ErrEnd: move_data_cancel(d, FALSE); } static void mouse_down_zoom2(unsigned int state, TPoint *point, struct Viewer *d, int zoom_out, double factor) { static double saved_dpi_d = -1; static double saved_dpi_i = -1; double dpi, ratio; int vdpi; if (ZoomLock) { return; } ZoomLock = TRUE; if (state & GDK_SHIFT_MASK) { range_increment_deceleration(- d->cx + point->x, - d->cy + point->y, d); goto End; } if (getobj(Menulocal.obj, "dpi", 0, 0, NULL, &vdpi) == -1) { goto End; } if (saved_dpi_i < 0 || saved_dpi_i != vdpi) { saved_dpi_i = vdpi; saved_dpi_d = vdpi; } dpi = (zoom_out) ? saved_dpi_d / factor : saved_dpi_d * factor; if (dpi < VIEWER_DPI_MIN) { saved_dpi_i = VIEWER_DPI_MIN; message_beep(TopLevel); } else if (dpi > VIEWER_DPI_MAX) { saved_dpi_i = VIEWER_DPI_MAX; message_beep(TopLevel); } else { saved_dpi_d = dpi; saved_dpi_i = nround(dpi); } ratio = vdpi / saved_dpi_i; vdpi = saved_dpi_i; if (putobj(Menulocal.obj, "dpi", 0, &vdpi) != -1) { d->hscroll -= (d->cx - point->x) * (1 - ratio); d->vscroll -= (d->cy - point->y) * (1 - ratio); ChangeDPI(); } End: ZoomLock = FALSE; } static void mouse_down_zoom(unsigned int state, TPoint *point, struct Viewer *d, int zoom_out) { mouse_down_zoom2(state, point, d, zoom_out, ZOOM_SPEED_NORMAL); } static void mouse_down_zoom_little(unsigned int state, TPoint *point, struct Viewer *d, int zoom_out) { mouse_down_zoom2(state, point, d, zoom_out, ZOOM_SPEED_LITTLE); } static void gesture_zoom_obj(gdouble scale, double gx, double gy, struct Viewer *d) { int x, y, minx, miny, maxx, maxy; double zoom; zoom = Menulocal.PaperZoom / 10000.0; minx = d->RefX2; maxx = d->RefX1; miny = d->RefY2; maxy = d->RefY1; x = d->zoom_prm.x = calc_mouse_x(gx, zoom, d); y = d->zoom_prm.y = calc_mouse_y(gy, zoom, d); if (x < minx) { x = minx; } else if (x > maxx) { x = maxx; } if (y < miny) { y = miny; } else if (y > maxy) { y = maxy; } d->MouseX1 = x - (x - minx) * scale; d->MouseY1 = y - (y - miny) * scale; d->MouseX2 = x + (maxx - x) * scale; d->MouseY2 = y + (maxy - y) * scale; gtk_widget_queue_draw(d->Win); } static void draw_zoom(cairo_t *cr, struct Viewer *d) { cairo_pattern_t *pattern; cairo_matrix_t matrix; double scale; scale = 1.0 / check_dpi_zoom_scale(d->zoom_prm.dpi, d->zoom_prm.scale); cairo_matrix_init(&matrix, scale, 0, 0, scale, d->zoom_prm.x + d->hscroll - d->cx - d->zoom_prm.x * scale, d->zoom_prm.y + d->vscroll - d->cy - d->zoom_prm.y * scale); pattern = cairo_pattern_create_for_surface(Menulocal.bg); cairo_set_source(cr, pattern); cairo_pattern_set_matrix(pattern, &matrix); cairo_paint(cr); cairo_pattern_destroy(pattern); pattern = cairo_pattern_create_for_surface(Menulocal.pix); cairo_set_source(cr, pattern); cairo_pattern_set_matrix(pattern, &matrix); cairo_paint(cr); cairo_pattern_destroy(pattern); } static void show_gesture_zooming_scale(double scale) { char buf[64]; snprintf(buf, sizeof(buf), "% .2f%%", scale * 100); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), buf); } static void gesture_zoom(GtkGestureZoom *controller, gdouble scale, gpointer user_data) { struct Viewer *d; double x, y; int dpi; d = (struct Viewer *) user_data; gtk_gesture_get_bounding_box_center(GTK_GESTURE(controller), &x, &y); if (d->zoom_prm.focused > 0) { d->zoom_prm.scale = scale; show_gesture_zooming_scale(scale); gesture_zoom_obj(scale, x, y, d); return; } d->zoom_prm.x = x; d->zoom_prm.y = y; dpi = d->zoom_prm.dpi * scale; d->zoom_prm.scale = 1.0 * dpi / d->zoom_prm.dpi; show_gesture_zooming_scale(d->zoom_prm.scale); main_window_redraw(); } static void mouse_down_set_points(unsigned int state, struct Viewer *d, int n) { int x1, y1, i; struct Point *po; if (d->Capture) return; x1 = d->MouseX1; y1 = d->MouseY1; CheckGrid(TRUE, state, &x1, &y1, NULL, NULL); for (i = 0; i < n; i++) { po = (struct Point *) g_malloc(sizeof(struct Point)); if (po) { po->x = x1; po->y = y1; arrayadd(d->points, &po); } } d->Capture = TRUE; } static gboolean ViewerEvLButtonDown(unsigned int state, TPoint *point, struct Viewer *d) { double zoom; int pos; if (Menulock || Globallock) return FALSE; zoom = Menulocal.PaperZoom / 10000.0; d->MouseX1 = d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY1 = d->MouseY2 = calc_mouse_y(point->y, zoom, d); d->MouseMode = MOUSENONE; if (d->MoveData) { menu_save_undo_single(UNDO_TYPE_ORDER, "data"); mouse_down_move_data(d); return TRUE; } switch (d->Mode) { case PointB: case LegendB: case AxisB: pos = NGetCursor(); if (pos == GDK_LEFT_PTR) { if (state & GDK_CONTROL_MASK) { NSetCursor(GDK_FLEUR); d->MouseMode = MOUSESCROLLE; return TRUE; } else { mouse_down_point(state, d); } } else { mouse_down_move(state, point, d); } break; case TrimB: case DataB: case EvalB: if (state & GDK_CONTROL_MASK) { NSetCursor(GDK_FLEUR); d->MouseMode = MOUSESCROLLE; return TRUE; } else { d->Capture = TRUE; d->MouseMode = MOUSEPOINT; d->ShowRect = TRUE; } break; case MarkB: case TextB: mouse_down_set_points(state, d, 1); break; case ZoomB: mouse_down_zoom(state, point, d, state & GDK_CONTROL_MASK); break; default: mouse_down_set_points(state, d, 2); break; } gtk_widget_queue_draw(d->Win); return TRUE; } static void mouse_up_point(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int x1, x2, y1, y2, err; d->Capture = FALSE; d->ShowRect = FALSE; d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY2 = calc_mouse_y(point->y, zoom, d); x1 = d->MouseX1; y1 = d->MouseY1; x2 = d->MouseX2; y2 = d->MouseY2; err = mxp2d(POINT_ERROR) / zoom; switch (d->Mode) { case PointB: case AxisB: Match("axis", x1, y1, x2, y2, err, d); /* fall-through */ case LegendB: if (d->Mode != AxisB) { Match("legend", x1, y1, x2, y2, err, d); Match("merge", x1, y1, x2, y2, err, d); } d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; break; case TrimB: Trimming(x1, y1, x2, y2); break; case DataB: if (ViewerWinFileUpdate(x1, y1, x2, y2, err)) { char *objects[] = {"data", NULL}; UpdateAll(objects); } break; case EvalB: Evaluate(x1, y1, x2, y2, err, d); break; default: /* never reached */ break; } } static int move_objects(int dx, int dy, struct Viewer *d, char **objs) { int num, axis; struct FocusObj *focus; d->ShowFrame = FALSE; num = arraynum(d->focusobj); axis = FALSE; PaintLock = TRUE; if (dx != 0 || dy != 0) { char *argv[5]; int i; menu_save_undo(UNDO_TYPE_MOVE, objs); argv[0] = (char *) &dx; argv[1] = (char *) &dy; argv[2] = NULL; for (i = num - 1; i >= 0; i--) { struct objlist *obj; N_VALUE *inst; focus = *(struct FocusObj **) arraynget(d->focusobj, i); obj = focus->obj; if (obj == chkobject("axis")) axis = TRUE; inst = chkobjinstoid(focus->obj, focus->oid); if (inst) { _exeobj(obj, "move", inst, 2, argv); set_graph_modified(); } } } PaintLock = FALSE; d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; return axis; } static void add_data_grid_to_objs(char **objs) { int i, axis, data, axisgrid; if (objs == NULL) { return; } i = 0; axis = FALSE; data = FALSE; axisgrid = FALSE; while (objs[i]) { if (strcmp(objs[i], "axis") == 0) { axis = TRUE; } else if (strcmp(objs[i], "data") == 0) { data = TRUE; } else if (strcmp(objs[i], "axisgrid") == 0) { axisgrid = TRUE; } i++; } if (axis) { if (! data) { objs[i] = "data"; i++; } if (! axisgrid) { objs[i] = "axisgrid"; i++; } objs[i] = NULL; } } static void mouse_up_drag(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int dx, dy, axis; char *objs[OBJ_MAX]; if (d->MouseX1 == d->MouseX2 && d->MouseY1 == d->MouseY2) { return; } d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY2 = calc_mouse_y(point->y, zoom, d); dx = d->MouseX2 - d->MouseX1; dy = d->MouseY2 - d->MouseY1; CheckGrid(FALSE, state, &dx, &dy, NULL, NULL); if (dx == 0 && dy == 0) { return; } get_focused_obj_array(d->focusobj, objs); axis = move_objects(dx, dy, d, objs); if (axis) { add_data_grid_to_objs(objs); } UpdateAll(objs); } static int check_zoom(double zoom) { int zm; if (zoom * 10000 > G_MAXINT) { return -1; } zm = nround(zoom * 10000); if (zm < 1000) { zm = 1000; } return zm; } static int zoom_focused_obj(int x, int y, double zoom_x, double zoom_y, char **objs, struct Viewer *d) { struct FocusObj *focus; int i, num, zmx, zmy; char *argv[6]; zmx = check_zoom(zoom_x); zmy = check_zoom(zoom_y); objs[0] = NULL; if (zmx < 0 || zmy < 0) { return 1; } if (zmx == 10000 && zmy == 10000) { return 1; } argv[0] = (char *) &zmx; argv[1] = (char *) &zmy; argv[2] = (char *) &x; argv[3] = (char *) &y; argv[4] = (char *) &Menulocal.preserve_width; argv[5] = NULL; num = arraynum(d->focusobj); PaintLock = TRUE; if (num > 0) { get_focused_obj_array(d->focusobj, objs); menu_save_undo(UNDO_TYPE_ZOOM, objs); } for (i = num - 1; i >= 0; i--) { N_VALUE *inst; struct objlist *obj; focus = *(struct FocusObj **) arraynget(d->focusobj, i); obj = focus->obj; inst = chkobjinstoid(focus->obj, focus->oid); if (inst) { _exeobj(obj, "zooming", inst, 5, argv); set_graph_modified(); } } PaintLock = FALSE; return 0; } static void mouse_up_zoom(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int vx1, vy1, preserve_ratio; double zoom_x, zoom_y; char *objs[OBJ_MAX]; d->ShowRect = FALSE; vx1 = calc_mouse_x(point->x, zoom, d); vy1 = calc_mouse_y(point->y, zoom, d); d->MouseX2 = vx1; d->MouseY2 = vy1; preserve_ratio = (state & GDK_CONTROL_MASK); calc_zoom(d, vx1, vy1, NULL, NULL, &zoom_x, &zoom_y, preserve_ratio); if ((d->Mode != DataB) && (d->Mode != EvalB)) { CheckGrid(FALSE, state, NULL, NULL, &zoom_x, &zoom_y); } d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; if (zoom_focused_obj(d->RefX1, d->RefY1, zoom_x, zoom_y, objs, d)) { gtk_widget_queue_draw(d->Win); return; } UpdateAll(objs); } static void mouse_up_change(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int dx, dy, axis; struct FocusObj *focus; struct objlist *obj; axis = FALSE; d->ShowLine = FALSE; obj = NULL; if ((d->MouseX1 != d->MouseX2) || (d->MouseY1 != d->MouseY2)) { char *argv[5]; d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY2 = calc_mouse_y(point->y, zoom, d); dx = d->MouseX2 - d->MouseX1; dy = d->MouseY2 - d->MouseY1; if ((d->Mode != DataB) && (d->Mode != EvalB)) { CheckGrid(FALSE, state, &dx, &dy, NULL, NULL); } if (dx != 0 || dy != 0) { N_VALUE *inst; argv[0] = (char *) &(d->ChangePoint); argv[1] = (char *) &dx; argv[2] = (char *) &dy; argv[3] = NULL; PaintLock = TRUE; focus = *(struct FocusObj **) arraynget(d->focusobj, 0); obj = focus->obj; inst = chkobjinstoid(focus->obj, focus->oid); if (obj == chkobject("arc") && (d->ChangePoint == ARC_POINT_TYPE_ANGLE1 || d->ChangePoint == ARC_POINT_TYPE_ANGLE2)) { if (arc_get_angle(obj, inst, state, d->ChangePoint, d->MouseX2, d->MouseY2, &dx, &dy)) inst = NULL; } else if (obj == chkobject("axis")) { axis = TRUE; } if (inst) { menu_save_undo_single(UNDO_TYPE_EDIT, obj->name); _exeobj(obj, "change", inst, 3, argv); set_graph_modified(); } PaintLock = FALSE; } d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; argv[0] = (obj) ? obj->name : NULL; argv[1] = NULL; if (axis) { argv[1] = "data"; argv[2] = "axisgrid"; argv[3] = NULL; } UpdateAll(argv); } else { d->FrameOfsX = d->FrameOfsY = 0; d->ShowFrame = TRUE; } } static void mouse_up_lgend1(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int x1, y1, num; d->Capture = FALSE; d->MouseX1 = calc_mouse_x(point->x, zoom, d); d->MouseY1 = calc_mouse_y(point->y, zoom, d); x1 = d->MouseX1; y1 = d->MouseY1; CheckGrid(TRUE, state, &x1, &y1, NULL, NULL); num = arraynum(d->points); if (num >= 1) { struct Point *po; po = *(struct Point **) arraynget(d->points, 0); po->x = x1; po->y = y1; } if (arraynum(d->points) == 1) { ViewerEvLButtonDblClk(state, point, d); } } static void mouse_up_lgend2(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int num, x1, y1; struct Point *po; d->MouseX1 = calc_mouse_x(point->x, zoom, d); d->MouseY1 = calc_mouse_y(point->y, zoom, d); x1 = d->MouseX1; y1 = d->MouseY1; CheckGrid(TRUE, state, &x1, &y1, NULL, NULL); num = arraynum(d->points); if (num >= 2) { po = *(struct Point **) arraynget(d->points, num - 2); } if ((num < 2) || (po->x != x1) || (po->y != y1)) { po = (struct Point *) g_malloc(sizeof(struct Point)); if (po) { po->x = x1; po->y = y1; arrayadd(d->points, &po); } } if ((d->Mode & POINT_TYPE_DRAW1) || d->Mode == SingleB) { if (arraynum(d->points) == 3) { d->Capture = FALSE; ViewerEvLButtonDblClk(state, point, d); } } } static void set_drag_info(struct Viewer *d) { char buf[32]; snprintf(buf, sizeof(buf), "(% .2f, % .2f)", d->FrameOfsX / 100.0, d->FrameOfsY / 100.0); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), buf); } #define CLEAR_DRAG_INFO 0 #if CLEAR_DRAG_INFO static void reset_drag_info(struct Viewer *d) { gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), NULL); } #endif static void SetPoint(struct Viewer *d, int x, int y) { // x += Menulocal.LeftMargin; // y += Menulocal.TopMargin; if (NgraphApp.Message && GTK_WIDGET_VISIBLE(NgraphApp.Message)) { char buf[128]; struct Point *po; unsigned int num; snprintf(buf, sizeof(buf), "% 6.2f, % 6.2f", x / 100.0, y / 100.0); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_pos), buf); switch (d->MouseMode) { case MOUSECHANGE: if (d->Angle >= 0) { snprintf(buf, sizeof(buf), "%6.2f°", d->Angle / 100.0); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), buf); } else { snprintf(buf, sizeof(buf), "(% .2f, % .2f)", d->LineX / 100.0, d->LineY / 100.0); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), buf); } break; case MOUSEZOOM1: case MOUSEZOOM2: case MOUSEZOOM3: case MOUSEZOOM4: snprintf(buf, sizeof(buf), "% .2f%%, % .2f%%", d->ZoomX * 100, d->ZoomY * 100); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), buf); break; case MOUSEDRAG: set_drag_info(d); break; default: num = arraynum(d->points); po = (num > 1) ? (* (struct Point **) arraynget(d->points, num - 2)) : NULL; if (d->Capture && po) { snprintf(buf, sizeof(buf), "(% .2f, % .2f)", (x - po->x) / 100.0, (y - po->y) / 100.0); gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), buf); } else { gtk_label_set_text(GTK_LABEL(NgraphApp.Message_extra), NULL); } } } nruler_set_position(NgraphApp.Viewer.HRuler, N2GTK_RULER_METRIC(x)); nruler_set_position(NgraphApp.Viewer.VRuler, N2GTK_RULER_METRIC(y)); CoordWinSetCoord(x, y); } static gboolean ViewerEvLButtonUp(unsigned int state, TPoint *point, struct Viewer *d) { double zoom; if (Menulock || Globallock) return FALSE; zoom = Menulocal.PaperZoom / 10000.0; if (d->MouseMode == MOUSESCROLLE) { NSetCursor(GDK_LEFT_PTR); d->MouseMode = MOUSENONE; return FALSE; } if (! d->Capture) return TRUE; switch (d->Mode) { case PointB: case LegendB: case AxisB: case TrimB: case DataB: case EvalB: d->Capture = FALSE; switch (d->MouseMode) { case MOUSEDRAG: mouse_up_drag(state, point, zoom, d); break; case MOUSEZOOM1: case MOUSEZOOM2: case MOUSEZOOM3: case MOUSEZOOM4: mouse_up_zoom(state, point, zoom, d); break; case MOUSECHANGE: mouse_up_change(state, point, zoom, d); break; case MOUSEPOINT: mouse_up_point(state, point, zoom, d); #if 0 if (d->Mode & POINT_TYPE_POINT) { UpdateAll(NULL); } else { gtk_widget_queue_draw(d->Win); } #else gtk_widget_queue_draw(d->Win); #endif break; case MOUSENONE: case MOUSESCROLLE: break; } NSetCursor(get_mouse_cursor_type(d, point->x, point->y)); d->MouseMode = MOUSENONE; SetPoint(d, d->MouseX2, d->MouseY2); break; case MarkB: case TextB: mouse_up_lgend1(state, point, zoom, d); break; default: mouse_up_lgend2(state, point, zoom, d); } clear_focus_obj_pix(d); set_focus_sensitivity(d); return TRUE; } static void swapint(int *a, int *b) { int tmp; tmp = *a; *a = *b; *b = tmp; } static void create_legend1(struct Viewer *d) { int num; struct objlist *obj = NULL; struct Point *po; char *objects[2]; int id, x1, y1, undo; d->Capture = FALSE; num = arraynum(d->points); if (d->Mode == MarkB) { obj = chkobject("mark"); } else { obj = chkobject("text"); } if (obj == NULL) { return; } undo = menu_save_undo_single(UNDO_TYPE_CREATE, obj->name); id = newobj(obj); if (id >= 0) { int ret; N_VALUE *inst; presetting_set_obj_field(obj, id); if (num >= 1) { po = *(struct Point **) arraynget(d->points, 0); x1 = po->x; y1 = po->y; } inst = chkobjinst(obj, id); _putobj(obj, "x", inst, &x1); _putobj(obj, "y", inst, &y1); PaintLock = TRUE; if (d->Mode == MarkB) { LegendMarkDialog(&DlgLegendMark, obj, id); ret = DialogExecute(TopLevel, &DlgLegendMark); } else { LegendTextDialog(&DlgLegendText, obj, id); ret = DialogExecute(TopLevel, &DlgLegendText); } if ((ret == IDDELETE) || (ret == IDCANCEL)) { delobj(obj, id); menu_delete_undo(undo); } else { set_graph_modified(); } PaintLock = FALSE; } arraydel2(d->points); objects[0] = obj->name; objects[1] = NULL; UpdateAll(objects); } static void create_path(struct Viewer *d) { struct objlist *obj = NULL; struct narray *parray; struct Point *po; N_VALUE *inst; int i, num, id, ret = IDCANCEL, undo; char *objects[2]; d->Capture = FALSE; num = arraynum(d->points); obj = chkobject("path"); if (num < 3 || obj == NULL) { goto ExitCreatePath; } undo = menu_save_undo_single(UNDO_TYPE_CREATE, obj->name); id = newobj(obj); if (id < 0) { menu_delete_undo(undo); goto ExitCreatePath; } presetting_set_obj_field(obj, id); inst = chkobjinst(obj, id); parray = arraynew(sizeof(int)); for (i = 0; i < num - 1; i++) { po = *(struct Point **) arraynget(d->points, i); arrayadd(parray, &po->x); arrayadd(parray, &po->y); } _putobj(obj, "points", inst, parray); PaintLock = TRUE; LegendArrowDialog(&DlgLegendArrow, obj, id); ret = DialogExecute(TopLevel, &DlgLegendArrow); if (ret == IDDELETE || ret == IDCANCEL) { menu_delete_undo(undo); delobj(obj, id); } else { set_graph_modified(); } PaintLock = FALSE; ExitCreatePath: arraydel2(d->points); objects[0] = obj->name; objects[1] = NULL; UpdateAll(objects); } static void create_legend3(struct Viewer *d) { int num, x1, y1, x2, y2; struct objlist *obj = NULL; struct Point **pdata; d->Capture = FALSE; num = arraynum(d->points); pdata = arraydata(d->points); if (num >= 3) { if (d->Mode == RectB) { obj = chkobject("rectangle"); } else if (d->Mode == ArcB) { obj = chkobject("arc"); } if (obj) { int id, undo; undo = menu_save_undo_single(UNDO_TYPE_CREATE, obj->name); id = newobj(obj); if (id >= 0) { N_VALUE *inst; int ret = IDCANCEL; presetting_set_obj_field(obj, id); inst = chkobjinst(obj, id); x1 = pdata[0]->x; y1 = pdata[0]->y; x2 = pdata[1]->x; y2 = pdata[1]->y; if (x1 > x2) swapint(&x1, &x2); if (y1 > y2) swapint(&y1, &y2); PaintLock = TRUE; if (d->Mode == RectB) { _putobj(obj, "x1", inst, &x1); _putobj(obj, "y1", inst, &y1); _putobj(obj, "x2", inst, &x2); _putobj(obj, "y2", inst, &y2); LegendRectDialog(&DlgLegendRect, obj, id); ret = DialogExecute(TopLevel, &DlgLegendRect); } else if (d->Mode == ArcB) { int x, y, rx, ry; x = (x1 + x2) / 2; y = (y1 + y2) / 2; rx = abs(x1 - x); ry = abs(y1 - y); _putobj(obj, "x", inst, &x); _putobj(obj, "y", inst, &y); _putobj(obj, "rx", inst, &rx); _putobj(obj, "ry", inst, &ry); LegendArcDialog(&DlgLegendArc, obj, id); ret = DialogExecute(TopLevel, &DlgLegendArc); } if ((ret == IDDELETE) || (ret == IDCANCEL)) { delobj(obj, id); menu_delete_undo(undo); } else { set_graph_modified(); } PaintLock = FALSE; } } } arraydel2(d->points); if (obj) { char *objects[2]; objects[0] = obj->name; objects[1] = NULL; UpdateAll(objects); } } static void create_legendx(struct Viewer *d) { int num, x1, y1, x2, y2, type, fill; struct objlist *obj = NULL; struct Point **pdata; d->Capture = FALSE; num = arraynum(d->points); pdata = arraydata(d->points); if (num >= 3) { obj = chkobject("path"); if (obj) { int id, undo; undo = menu_save_undo_single(UNDO_TYPE_CREATE, obj->name); id = newobj(obj); if (id >= 0) { presetting_set_obj_field(obj, id); type = PATH_TYPE_CURVE; putobj(obj, "type", id, &type); fill = FALSE; putobj(obj, "fill", id, &fill); x1 = pdata[0]->x; y1 = pdata[0]->y; x2 = pdata[1]->x; y2 = pdata[1]->y; if (x1 > x2) swapint(&x1, &x2); if (y1 > y2) swapint(&y1, &y2); PaintLock = TRUE; if ((x1 != x2) && (y1 != y2)) { int ret; LegendGaussDialog(&DlgLegendGauss, obj, id, x1, y1, x2 - x1, y2 - y1); ret = DialogExecute(TopLevel, &DlgLegendGauss); if (ret != IDOK) { delobj(obj, id); menu_delete_undo(undo); } else { set_graph_modified(); } } PaintLock = FALSE; } } } arraydel2(d->points); if (obj) { char *objects[2]; objects[0] = obj->name; objects[1] = NULL; UpdateAll(objects); } } static void create_single_axis(struct Viewer *d) { int num; struct objlist *obj = NULL; struct Point **pdata; d->Capture = FALSE; num = arraynum(d->points); pdata = arraydata(d->points); if (num >= 3) { obj = chkobject("axis"); if (obj != NULL) { int id, x1, y1, lenx, dir, undo; undo = menu_save_undo_single(UNDO_TYPE_CREATE, obj->name); if ((id = newobj(obj)) >= 0) { int x2, y2, ret; double fx1, fy1; N_VALUE *inst; x1 = pdata[0]->x; y1 = pdata[0]->y; x2 = pdata[1]->x; y2 = pdata[1]->y; fx1 = x2 - x1; fy1 = y2 - y1; lenx = nround(sqrt(fx1 * fx1 + fy1 * fy1)); if (fx1 == 0) { if (fy1 >= 0) { dir = 27000; } else { dir = 9000; } } else { dir = nround(atan(-fy1 / fx1) / MPI * 18000); if (fx1 < 0) dir += 18000; if (dir < 0) dir += 36000; if (dir >= 36000) dir -= 36000; } inst = chkobjinst(obj, id); _putobj(obj, "x", inst, &x1); _putobj(obj, "y", inst, &y1); _putobj(obj, "length", inst, &lenx); _putobj(obj, "direction", inst, &dir); presetting_set_obj_field(obj, id); AxisDialog(NgraphApp.AxisWin.data.data, id, TRUE); ret = DialogExecute(TopLevel, &DlgAxis); if (ret == IDCANCEL) { menu_delete_undo(undo); delobj(obj, id); } else { set_graph_modified(); } } } } arraydel2(d->points); if (obj) { char *objects[2]; objects[0] = obj->name; objects[1] = NULL; UpdateAll(objects); } } static void create_axis(struct Viewer *d) { int idx, idy, idu, idr, idg, oidx, oidy, type, num, x1, y1, lenx, leny; struct objlist *obj = NULL, *obj2; struct Point **pdata; struct narray group; d->Capture = FALSE; num = arraynum(d->points); pdata = arraydata(d->points); if (num >= 3) { obj = chkobject("axis"); obj2 = chkobject("axisgrid"); if (obj && obj2) { int undo, x2, y2, ret = IDCANCEL; char *argv[3]; argv[0] = obj->name; argv[1] = obj2->name; argv[2] = NULL; undo = menu_save_undo(UNDO_TYPE_CREATE, argv); x1 = pdata[0]->x; y1 = pdata[0]->y; x2 = pdata[1]->x; y2 = pdata[1]->y; lenx = abs(x1 - x2); leny = abs(y1 - y2); x1 = (x1 < x2) ? x1 : x2; y1 = (y1 > y2) ? y1 : y2; idx = newobj(obj); idy = newobj(obj); if (d->Mode != CrossB) { idu = newobj(obj); idr = newobj(obj); arrayinit(&group, sizeof(int)); if (d->Mode == FrameB) { type = 1; } else { type = 2; } arrayadd(&group, &type); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &idu); arrayadd(&group, &idr); arrayadd(&group, &x1); arrayadd(&group, &y1); arrayadd(&group, &lenx); arrayadd(&group, &leny); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "default_grouping", idr, 1, argv); arraydel(&group); } else { arrayinit(&group, sizeof(int)); type = 3; arrayadd(&group, &type); arrayadd(&group, &idx); arrayadd(&group, &idy); arrayadd(&group, &x1); arrayadd(&group, &y1); arrayadd(&group, &lenx); arrayadd(&group, &leny); argv[0] = (char *) &group; argv[1] = NULL; exeobj(obj, "default_grouping", idx, 1, argv); arraydel(&group); } if ((d->Mode == SectionB) && (obj2 != NULL)) { idg = newobj(obj2); if (idg >= 0) { char *ref; getobj(obj, "oid", idx, 0, NULL, &oidx); ref = g_strdup_printf("axis:^%d", oidx); if (ref) { putobj(obj2, "axis_x", idg, ref); } getobj(obj, "oid", idy, 0, NULL, &oidy); ref = g_strdup_printf("axis:^%d", oidy); if (ref) { putobj(obj2, "axis_y", idg, ref); } } } else { idg = -1; } if (d->Mode == FrameB) { presetting_set_obj_field(obj, idx); presetting_set_obj_field(obj, idy); presetting_set_obj_field(obj, idu); presetting_set_obj_field(obj, idr); SectionDialog(&DlgSection, x1, y1, lenx, leny, obj, idx, idy, idu, idr, obj2, &idg, FALSE); ret = DialogExecute(TopLevel, &DlgSection); } else if (d->Mode == SectionB) { presetting_set_obj_field(obj, idx); presetting_set_obj_field(obj, idy); presetting_set_obj_field(obj, idu); presetting_set_obj_field(obj, idr); presetting_set_obj_field(obj2, idg); SectionDialog(&DlgSection, x1, y1, lenx, leny, obj, idx, idy, idu, idr, obj2, &idg, TRUE); ret = DialogExecute(TopLevel, &DlgSection); } else if (d->Mode == CrossB) { presetting_set_obj_field(obj, idx); presetting_set_obj_field(obj, idy); CrossDialog(&DlgCross, x1, y1, lenx, leny, obj, idx, idy); ret = DialogExecute(TopLevel, &DlgCross); } if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } argv[0] = obj->name; argv[1] = obj2->name; argv[2] = NULL; UpdateAll(argv); } } arraydel2(d->points); } static gboolean ViewerEvLButtonDblClk(unsigned int state, TPoint *point, struct Viewer *d) { if (Menulock || Globallock) return FALSE; switch (d->Mode) { case PointB: case LegendB: case AxisB: d->Capture = FALSE; ViewUpdate(); break; case TrimB: case DataB: case EvalB: break; case MarkB: case TextB: create_legend1(d); break; case PathB: create_path(d); break; case RectB: case ArcB: create_legend3(d); break; case GaussB: create_legendx(d); break; case SingleB: create_single_axis(d); break; case FrameB: case SectionB: case CrossB: create_axis(d); break; case ZoomB: break; } if ((d->Mode & POINT_TYPE_DRAW_ALL) && ! KeepMouseMode) { set_pointer_mode(PointerModeDefault); } return TRUE; } void move_data_cancel(struct Viewer *d, gboolean show_message) { arraydel(&SelList); d->MoveData = FALSE; d->Capture = FALSE; NSetCursor(GDK_LEFT_PTR); if (show_message) message_box(NULL, _("Moving data points is canceled."), "Confirm", RESPONS_OK); } static gboolean ViewerEvRButtonDown(unsigned int state, TPoint *point, struct Viewer *d, GdkEventButton *e) { int num; struct Point *po; double zoom; if (Menulock || Globallock) return FALSE; if (d->MoveData) { move_data_cancel(d, TRUE); } else if (d->Capture) { zoom = Menulocal.PaperZoom / 10000.0; switch (d->Mode) { case PathB: num = arraynum(d->points); if (num > 0) { arrayndel2(d->points, num - 1); if (num <= 2) { arraydel2(d->points); d->Capture = FALSE; } else { po = *(struct Point **) arraylast(d->points); if (po != NULL) { d->MouseX1 = (mxp2d(d->hscroll + point->x - d->cx) - Menulocal.LeftMargin) / zoom; d->MouseY1 = (mxp2d(d->vscroll + point->y - d->cy) - Menulocal.TopMargin) / zoom; po->x = d->MouseX1; po->y = d->MouseY1; CheckGrid(TRUE, state, &(po->x), &(po->y), NULL, NULL); } } break; case RectB: case ArcB: case GaussB: case SingleB: case FrameB: case SectionB: case CrossB: arraydel2(d->points); d->Capture = FALSE; break; default: break; } } } else if (d->Mode == ZoomB) { mouse_down_zoom(state, point, d, ! (state & GDK_CONTROL_MASK)); } else if (d->MouseMode == MOUSENONE) { do_popup(e, d); } gtk_widget_queue_draw(d->Win); return TRUE; } static gboolean ViewerEvMButtonDown(unsigned int state, TPoint *point, struct Viewer *d) { if (Menulock || Globallock) return FALSE; if (d->Mode == ZoomB) { range_increment_deceleration(point->x - d->cx, point->y - d->cy, d); } else { ViewerEvLButtonDown(state, point, d); ViewerEvLButtonUp(state, point, d); ViewerEvLButtonDblClk(state, point, d); } return FALSE; } static int get_mouse_cursor_type(struct Viewer *d, int x, int y) { int j, x1, y1, x2, y2, num, cursor, bboxnum, *bbox; N_VALUE *inst; struct narray *abbox; struct FocusObj **focus; double zoom; if (d->MoveData) return GDK_TCROSS; num = arraynum(d->focusobj); if (num == 0) return GDK_LEFT_PTR; GetFocusFrame(&x1, &y1, &x2, &y2, d->FrameOfsX, d->FrameOfsY, d); if (x >= x1 && x <= x2 && y >= y1 && y <= y2) { cursor = GDK_FLEUR; } else if (x > x1 - FOCUS_RECT_SIZE - FOCUS_FRAME_OFST && x < x1 - FOCUS_FRAME_OFST && y > y1 - FOCUS_RECT_SIZE - FOCUS_FRAME_OFST && y < y1 - FOCUS_FRAME_OFST) { cursor = GDK_TOP_LEFT_CORNER; } else if (x > x1 - FOCUS_RECT_SIZE - FOCUS_FRAME_OFST && x < x1 - FOCUS_FRAME_OFST && y < y2 + FOCUS_RECT_SIZE + FOCUS_FRAME_OFST - 1 && y > y2 + FOCUS_FRAME_OFST - 1) { cursor = GDK_BOTTOM_LEFT_CORNER; } else if (x < x2 + FOCUS_RECT_SIZE + FOCUS_FRAME_OFST - 1 && x > x2 + FOCUS_FRAME_OFST - 1 && y > y1 - FOCUS_RECT_SIZE - FOCUS_FRAME_OFST && y < y1 - FOCUS_FRAME_OFST) { cursor = GDK_TOP_RIGHT_CORNER; } else if (x < x2 + FOCUS_RECT_SIZE + FOCUS_FRAME_OFST - 1 && x > x2 + FOCUS_FRAME_OFST - 1 && y < y2 + FOCUS_RECT_SIZE + FOCUS_FRAME_OFST - 1 && y > y2 + FOCUS_FRAME_OFST - 1) { cursor = GDK_BOTTOM_RIGHT_CORNER; } else { cursor = GDK_LEFT_PTR; } if (num > 1) return cursor; focus = arraydata(d->focusobj); inst = chkobjinstoid(focus[0]->obj, focus[0]->oid); if (inst == NULL) return cursor; zoom = Menulocal.PaperZoom / 10000.0; _exeobj(focus[0]->obj, "bbox", inst, 0, NULL); _getobj(focus[0]->obj, "bbox", inst, &abbox); bboxnum = arraynum(abbox); bbox = arraydata(abbox); for (j = 4; j < bboxnum; j += 2) { x1 = coord_conv_x((bbox[j] + d->FrameOfsX), zoom, d); y1 = coord_conv_y((bbox[j + 1] + d->FrameOfsY), zoom, d); if (x > x1 - FOCUS_RECT_SIZE / 2 && x < x1 + FOCUS_RECT_SIZE / 2 && y > y1 - FOCUS_RECT_SIZE / 2 && y < y1 + FOCUS_RECT_SIZE / 2) { cursor = GDK_CROSSHAIR; d->ChangePoint = (j - 4) / 2; break; } } return cursor; } static void set_mouse_cursor_hover(struct Viewer *d, int x, int y) { if (d->Mode != PointB && d->Mode != LegendB && d->Mode != AxisB) return; NSetCursor(get_mouse_cursor_type(d, x, y)); } static void update_frame_rect(TPoint *point, struct Viewer *d, double zoom) { d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY2 = calc_mouse_y(point->y, zoom, d); } #define SQRT3 1.73205080756888 static void calc_snap_angle(struct narray *points, int *dx, int *dy) { struct Point *po2; int x, y, w, h, n; double angle, l; x = *dx; y = *dy; n = arraynum(points); if (n < 2) return; po2 = *(struct Point **) arraynget(points, n - 2); w = x - po2->x; h = y - po2->y; if (h == 0 || w == 0) return; l = sqrt(w * w + h * h); if (w / h) { angle = acos(w / l); if (h < 0) angle = -angle; } else { angle = asin(h / l); if (w < 0) angle = -angle; } if (angle < 0) angle += 2 * MPI; angle *= 180 / MPI; if (angle < 15) { y = po2->y; } else if (angle < 37) { /* 30 */ y = po2->y + w / SQRT3; } else if (angle < 52) { /* 45 */ y = po2->y + w; } else if (angle < 75) { /* 60 */ x = po2->x + h / SQRT3; } else if (angle < 105) { /* 90 */ x = po2->x; } else if (angle < 127) { /* 120 */ x = po2->x - h / SQRT3; } else if (angle < 142) { /* 135 */ y = po2->y - w; } else if (angle < 165) { /* 150 */ y = po2->y - w / SQRT3; } else if (angle < 195) { /* 180 */ y = po2->y; } else if (angle < 217) { /* 210 */ y = po2->y + w / SQRT3; } else if (angle < 232) { /* 225 */ y = po2->y + w; } else if (angle < 255) { /* 240 */ x = po2->x + h / SQRT3; } else if (angle < 285) { /* 270 */ x = po2->x; } else if (angle < 307) { /* 300 */ x = po2->x - h / SQRT3; } else if (angle < 322) { /* 315 */ y = po2->y - w; } else if (angle < 345) { /* 330 */ y = po2->y - w / SQRT3; } else { /* 360 */ y = po2->y; } *dx = x; *dy = y; } static void calc_integer_ratio(struct narray *points, int *dx, int *dy) { struct Point *po2; int x, y, w, h; x = *dx; y = *dy; po2 = *(struct Point **) arraynget(points, 0); if (po2 == NULL) { return; } w = abs(x - po2->x); h = abs(y - po2->y); if (w < h) { w *= (w) ? h / w: 0; if (y > po2->y) { y = po2->y + w; } else { y = po2->y - w; } } else { h *= (h) ? w / h: 0; if (x > po2->x) { x = po2->x + h; } else { x = po2->x - h; } } *dx = x; *dy = y; } static void mouse_move_drag(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int x, y; d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY2 = calc_mouse_y(point->y, zoom, d); x = d->MouseX2 - d->MouseX1; y = d->MouseY2 - d->MouseY1; CheckGrid(FALSE, state, &x, &y, NULL, NULL); d->FrameOfsX = x; d->FrameOfsY = y; } static void mouse_move_zoom(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { double zoom_x, zoom_y, preserve_ratio; int vx1, vx2, vy1, vy2; vx1 = calc_mouse_x(point->x, zoom, d); vy1 = calc_mouse_y(point->y, zoom, d); preserve_ratio = (state & GDK_CONTROL_MASK); calc_zoom(d, vx1, vy1, &vx2, &vy2, &zoom_x, &zoom_y, preserve_ratio); if ((d->Mode != DataB) && (d->Mode != EvalB)) CheckGrid(FALSE, state, NULL, NULL, &zoom_x, &zoom_y); d->ZoomX = zoom_x; d->ZoomY = zoom_y; set_zoom_prm(d, vx2, vy2, zoom_x, zoom_y); } static void mouse_move_change(unsigned int state, TPoint *point, double zoom, struct Viewer *d) { int x, y; d->MouseX2 = calc_mouse_x(point->x, zoom, d); d->MouseY2 = calc_mouse_y(point->y, zoom, d); x = d->MouseX2 - d->MouseX1; y = d->MouseY2 - d->MouseY1; if ((d->Mode != DataB) && (d->Mode != EvalB)) { CheckGrid(FALSE, state, &x, &y, NULL, NULL); } d->LineX = x; d->LineY = y; } static void mouse_move_scroll(TPoint *point, struct Viewer *d) { int h, w; GdkWindow *win; double dx, dy; win = gtk_widget_get_window(d->Win); if (win == NULL) { return; } w = gdk_window_get_width(win); h = gdk_window_get_height(win); dx = dy = 0; if (point->y > h) { dy = SCROLL_INC; } else if (point->y < 0) { dy = -SCROLL_INC; } if (point->x > w) { dx = SCROLL_INC; } else if (point->x < 0) { dx = -SCROLL_INC; } #if SCROLL_ANIMATION range_increment_deceleration(dx, dy, d); #else range_increment(d->HScroll, dx); range_increment(d->VScroll, dy); #endif } static void mouse_move_draw(unsigned int state, int *dx, int *dy, const struct Viewer *d) { struct Point *po; if (arraynum(d->points) == 0) { return; } po = *(struct Point **) arraylast(d->points); if (state & GDK_CONTROL_MASK) { if (d->Mode & POINT_TYPE_DRAW1) { calc_integer_ratio(d->points, dx, dy); } else if (d->Mode & POINT_TYPE_DRAW2) { calc_snap_angle(d->points, dx, dy); if (! (state & GDK_SHIFT_MASK)) { CheckGrid(FALSE, 0, dx, dy, NULL, NULL); } } } if (po != NULL) { po->x = *dx; po->y = *dy; } } static void set_cross_gauge_position(int dx, int dy, double zoom, struct Viewer *d) { d->CrossX = coord_conv_x(dx, zoom, d); d->CrossY = coord_conv_y(dy, zoom, d); } static gboolean ViewerEvMouseMove(unsigned int state, TPoint *point, struct Viewer *d) { int dx, dy; double zoom; if (Menulock || Globallock) { return FALSE; } if (d->drag_prm.active) { return FALSE; } if (gtk_widget_get_window(d->Win) == NULL) { return FALSE; } d->KeyMask = state; zoom = Menulocal.PaperZoom / 10000.0; dx = calc_mouse_x(point->x, zoom, d); dy = calc_mouse_y(point->y, zoom, d); if (d->MouseMode == MOUSESCROLLE) { set_cross_gauge_position(dx, dy, zoom, d); #if SCROLL_ANIMATION range_increment_deceleration(mxd2p(d->MouseX1 - dx), mxd2p(d->MouseY1 - dy), d); #else range_increment(d->HScroll, mxd2p(d->MouseX1 - dx)); range_increment(d->VScroll, mxd2p(d->MouseY1 - dy)); #endif return FALSE; } if ((d->Mode != DataB) && (d->Mode != EvalB) && (d->Mode != TrimB) && (d->Mode != ZoomB) && (d->MouseMode != MOUSEPOINT) && (((d->Mode != PointB) && (d->Mode != LegendB) && (d->Mode != AxisB)) || (d->MouseMode != MOUSENONE))) { CheckGrid(TRUE, state, &dx, &dy, NULL, NULL); } set_cross_gauge_position(dx, dy, zoom, d); mouse_move_scroll(point, d); if (! d->Capture) { set_mouse_cursor_hover(d, point->x, point->y); } else { int pos; pos = NGetCursor(); if (pos == GDK_FLEUR || pos == GDK_TOP_LEFT_CORNER || pos == GDK_BOTTOM_LEFT_CORNER || pos == GDK_TOP_RIGHT_CORNER || pos == GDK_BOTTOM_RIGHT_CORNER || pos == GDK_CROSSHAIR || (d->Mode & POINT_TYPE_TRIM)) { switch (d->MouseMode) { case MOUSEDRAG: mouse_move_drag(state, point, zoom, d); break; case MOUSEZOOM1: case MOUSEZOOM2: case MOUSEZOOM3: case MOUSEZOOM4: mouse_move_zoom(state, point, zoom, d); break; case MOUSECHANGE: mouse_move_change(state, point, zoom, d); break; case MOUSEPOINT: update_frame_rect(point, d, zoom); break; case MOUSENONE: case MOUSESCROLLE: break; } } else if (d->Mode & POINT_TYPE_POINT) { if (d->MouseMode == MOUSEPOINT) { update_frame_rect(point, d, zoom); } } else { mouse_move_draw(state, &dx, &dy, d); } } SetPoint(d, dx, dy); if ((Menulocal.show_cross && gtk_widget_is_drawable(d->Win)) || (d->Mode & POINT_TYPE_DRAW_ALL) || d->MouseMode != MOUSENONE) { gtk_widget_queue_draw(d->Win); } return FALSE; } #if GTK_CHECK_VERSION(4, 0, 0) static void ViewerEvMouseMotion(GtkEventControllerMotion *controller, gdouble x, gdouble y, gpointer client_data) { struct Viewer *d; TPoint point; GdkModifierType state; d = (struct Viewer *) client_data; point.x = x; point.y = y; state = gtk_event_controller_get_current_event_state(GTK_EVENT_CONTROLLER(controller)); ViewerEvMouseMove(state, &point, d); // gdk_event_request_motions(e); /* handles is_hint events */ } #else static gboolean ViewerEvMouseMotion(GtkWidget *w, GdkEventMotion *e, gpointer client_data) { TPoint point; #if 0 static guint32 etime = 0; if (e->time - etime < 100) return FALSE; etime = e->time; #endif point.x = e->x; point.y = e->y; ViewerEvMouseMove(e->state, &point, (struct Viewer *) client_data); gdk_event_request_motions(e); /* handles is_hint events */ return FALSE; } #endif int check_focused_obj_type(const struct Viewer *d, int *type) { int num, i, t; static struct objlist *axis, *merge, *legend, *text; num = arraynum(d->focusobj); if (axis == NULL) axis = chkobject("axis"); if (merge == NULL) merge = chkobject("merge"); if (legend == NULL) legend = chkobject("legend"); if (text == NULL) text = chkobject("text"); if (axis == NULL || merge == NULL || legend == NULL || text == NULL) { return 0; } t = 0; for (i = 0; i < num; i++) { struct FocusObj *focus; focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (chkobjchild(legend, focus->obj)) { t |= FOCUS_OBJ_TYPE_LEGEND; if (chkobjchild(text, focus->obj)) { t |= FOCUS_OBJ_TYPE_TEXT; } } else if (chkobjchild(axis, focus->obj)) { t |= FOCUS_OBJ_TYPE_AXIS; } else if (chkobjchild(merge, focus->obj)) { t |= FOCUS_OBJ_TYPE_MERGE; } } if (type) *type = t; return num; } static void do_popup(GdkEventButton *event, struct Viewer *d) { if (! gtk_widget_get_realized(d->popup)) { gtk_widget_realize(d->popup); } gtk_menu_popup_at_pointer(GTK_MENU(d->popup), ((GdkEvent *)event)); } static gboolean ViewerEvScroll(GtkWidget *w, GdkEventScroll *e, gpointer client_data) { struct Viewer *d; TPoint point; gdouble x, y; point.x = e->x; point.y = e->y; d = (struct Viewer *) client_data; switch (e->direction) { case GDK_SCROLL_UP: if (e->state & GDK_CONTROL_MASK) { mouse_down_zoom_little(0, &point, d, FALSE); } else { range_increment(d->VScroll, -SCROLL_INC); } return TRUE; case GDK_SCROLL_DOWN: if (e->state & GDK_CONTROL_MASK) { mouse_down_zoom_little(0, &point, d, TRUE); } else { range_increment(d->VScroll, SCROLL_INC); } return TRUE; case GDK_SCROLL_LEFT: range_increment(d->HScroll, -SCROLL_INC); return TRUE; case GDK_SCROLL_RIGHT: range_increment(d->HScroll, SCROLL_INC); return TRUE; case GDK_SCROLL_SMOOTH: if (gdk_event_get_scroll_deltas((GdkEvent *) e, &x, &y)) { if ((e->state & GDK_CONTROL_MASK) && y != 0) { mouse_down_zoom_little(0, &point, d, y > 0); } else { #if OSX range_increment(d->HScroll, x); range_increment(d->VScroll, y); #else range_increment(d->HScroll, x * SCROLL_INC); range_increment(d->VScroll, y * SCROLL_INC); #endif } } return TRUE; } return FALSE; } static GdkModifierType get_key_modifier(GtkGestureSingle *gesture) { GdkModifierType state; const GdkEvent *event; GdkEventSequence *sequence; sequence = gtk_gesture_single_get_current_sequence(gesture); event = gtk_gesture_get_last_event(GTK_GESTURE(gesture), sequence); if (gdk_event_get_state(event, &state)) { return state; } return 0; } static void ViewerEvButtonDown(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer client_data) { struct Viewer *d; GtkWidget *w; TPoint point; guint button; GdkModifierType state; d = (struct Viewer *) client_data; button = gtk_gesture_single_get_current_button(GTK_GESTURE_SINGLE(gesture)); #if GTK_CHECK_VERSION(4, 0, 0) state = gtk_event_controller_get_current_event_state(GTK_EVENT_CONTROLLER(gesture)); #else state = get_key_modifier(GTK_GESTURE_SINGLE(gesture)); #endif d->KeyMask = state; point.x = x; point.y = y; w = gtk_event_controller_get_widget(GTK_EVENT_CONTROLLER(gesture)); gtk_widget_grab_focus(w); switch (button) { case Button1: if (n_press == 1) { ViewerEvLButtonDown(state, &point, d); } else { ViewerEvLButtonDblClk(state, &point, d); } break; case Button2: ViewerEvMButtonDown(state, &point, d); break; case Button3: ViewerEvRButtonDown(state, &point, d, NULL); break; } } static void ViewerEvButtonUp(GtkGestureMultiPress *gesture, gint n_press, gdouble x, gdouble y, gpointer client_data) { struct Viewer *d; TPoint point; guint button; GdkModifierType state; d = (struct Viewer *) client_data; button = gtk_gesture_single_get_current_button(GTK_GESTURE_SINGLE(gesture)); #if GTK_CHECK_VERSION(4, 0, 0) state = gtk_event_controller_get_current_event_state(GTK_EVENT_CONTROLLER(gesture)); #else state = get_key_modifier(GTK_GESTURE_SINGLE(gesture)); #endif d->KeyMask = state; point.x = x; point.y = y; switch (button) { case Button1: ViewerEvLButtonUp(state, &point, d); } } static void move_focus_frame(guint keyval, GdkModifierType state, struct Viewer *d) { int dx = 0, dy = 0, mv; double zoom; zoom = Menulocal.PaperZoom / 10000.0; mv = (state & GDK_SHIFT_MASK) ? Menulocal.grid / 10 : Menulocal.grid; switch (keyval) { case GDK_KEY_Down: dy = mv; break; case GDK_KEY_Up: dy = -mv; break; case GDK_KEY_Right: dx = mv; break; case GDK_KEY_Left: dx = -mv; break; default: return; } if (dx != 0 || dy != 0) { d->FrameOfsX += dx / zoom; d->FrameOfsY += dy / zoom; d->MouseMode = MOUSEDRAG; set_drag_info(d); gtk_widget_queue_draw(d->Win); } } static int viewer_key_scroll(guint keyval, struct Viewer *d) { switch (keyval) { case GDK_KEY_Up: range_increment_deceleration(0, -SCROLL_INC, d); return TRUE; case GDK_KEY_Down: range_increment_deceleration(0, SCROLL_INC, d); return TRUE; case GDK_KEY_Left: range_increment_deceleration(-SCROLL_INC, 0, d); return TRUE; case GDK_KEY_Right: range_increment_deceleration(SCROLL_INC, 0, d); return TRUE; } return FALSE; } static gboolean ViewerEvKeyDown(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct Viewer *d; d = (struct Viewer *) user_data; if (Menulock || Globallock) goto EXIT_PROPAGATE; switch (keyval) { case GDK_KEY_Escape: if (d->MoveData) { move_data_cancel(d, TRUE); } else { UnFocus(); } set_pointer_mode(PointerModeDefault); goto EXIT_PROPAGATE; case GDK_KEY_space: CmViewerDraw(NULL, GINT_TO_POINTER(FALSE)); return TRUE; case GDK_KEY_Page_Up: range_increment_deceleration(0, -SCROLL_INC * 4, d); return TRUE; case GDK_KEY_Page_Down: range_increment_deceleration(0, SCROLL_INC * 4, d); return TRUE; case GDK_KEY_Down: case GDK_KEY_Up: case GDK_KEY_Left: case GDK_KEY_Right: if (arraynum(d->focusobj) == 0) { return viewer_key_scroll(keyval, d); } if (((d->MouseMode == MOUSENONE) || (d->MouseMode == MOUSEDRAG)) && (d->Mode & POINT_TYPE_POINT)) { move_focus_frame(keyval, state, d); return TRUE; } break; case GDK_KEY_Shift_L: case GDK_KEY_Shift_R: if (d->Mode == ZoomB) { NSetCursor(GDK_PLUS); return TRUE; } break; case GDK_KEY_Control_L: case GDK_KEY_Control_R: if (d->Mode == ZoomB) { NSetCursor(GDK_TARGET); return TRUE; } break; case GDK_KEY_Return: ViewUpdate(); break; default: break; } EXIT_PROPAGATE: set_focus_sensitivity(d); return FALSE; } static void ViewerEvKeyUp(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct Viewer *d; char *objs[OBJ_MAX]; int dx, dy; int axis; if (Menulock || Globallock) return; d = (struct Viewer *) user_data; switch (keyval) { case GDK_KEY_Shift_L: case GDK_KEY_Shift_R: case GDK_KEY_Control_L: case GDK_KEY_Control_R: if (d->Mode == ZoomB) { NSetCursor(GDK_TARGET); return; } break; case GDK_KEY_Down: case GDK_KEY_Up: case GDK_KEY_Left: case GDK_KEY_Right: if (d->MouseMode != MOUSEDRAG) break; dx = d->FrameOfsX; dy = d->FrameOfsY; get_focused_obj_array(d->focusobj, objs); axis = move_objects(dx, dy, d, objs); if (axis) { add_data_grid_to_objs(objs); } clear_focus_obj_pix(&NgraphApp.Viewer); UpdateAll(objs); d->MouseMode = MOUSENONE; #if CLEAR_DRAG_INFO reset_drag_info(d); #endif return; default: break; } } static void ViewerEvSize(GtkWidget *w, GtkAllocation *allocation, gpointer client_data) { struct Viewer *d; d = (struct Viewer *) client_data; d->cx = allocation->width / 2; d->cy = allocation->height / 2; ChangeDPI(); } static gboolean ViewerEvPaint(GtkWidget *w, cairo_t *cr, gpointer client_data) { struct Viewer *d; d = (struct Viewer *) client_data; if (ViewerZooming) { draw_zoom(cr, d); return TRUE; } if (ZoomLock) { return TRUE; } if (Menulocal.pix && Menulocal.bg) { cairo_set_source_surface(cr, Menulocal.bg, nround(- d->hscroll + d->cx), nround(- d->vscroll + d->cy)); cairo_paint(cr); cairo_set_source_surface(cr, Menulocal.pix, nround(- d->hscroll + d->cx), nround(- d->vscroll + d->cy)); cairo_paint(cr); } if (! Globallock) { cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); cairo_set_line_width(cr, 1); /* I think it is not necessary to check chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid). */ if (d->ShowFrame) { ShowFocusFrame(cr, d); } ShowPoints(cr, d); if (d->ShowLine) { ShowFocusLine(cr, d); } if (d->ShowRect) { ShowFrameRect(cr, d); } if (Menulocal.show_cross) { ShowCrossGauge(cr, d); } } return FALSE; } static void ViewerEvVScroll(GtkRange *range, gpointer user_data) { struct Viewer *d; double y; d = (struct Viewer *) user_data; y = gtk_range_get_value(range); if (d->vscroll == y) { return; } d->vscroll = y; SetVRuler(d); gtk_widget_queue_draw(d->Win); } static void ViewerEvHScroll(GtkRange *range, gpointer user_data) { struct Viewer *d; double x; d = (struct Viewer *) user_data; x = gtk_range_get_value(range); if (d->hscroll == x) { return; } d->hscroll = x; SetHRuler(d); gtk_widget_queue_draw(d->Win); } void ViewerWinUpdate(char const **objects) { int i, num, lock_state; struct FocusObj **focus; struct Viewer *d; lock_state = PaintLock; PaintLock = TRUE; d = &NgraphApp.Viewer; if (chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid) == NULL) { CloseGC(); CloseGRA(); OpenGRA(); OpenGC(); SetScroller(); ChangeDPI(); } CheckPage(); num = arraynum(d->focusobj); focus = arraydata(d->focusobj); for (i = num - 1; i >= 0; i--) { if (chkobjoid(focus[i]->obj, focus[i]->oid) == -1) { arrayndel2(d->focusobj, i); } } if (arraynum(d->focusobj) == 0) { clear_focus_obj(d); } mx_redraw(Menulocal.obj, Menulocal.inst, objects); PaintLock = lock_state; gtk_widget_queue_draw(d->Win); } static void SetHRuler(const struct Viewer *d) { gdouble x1, x2, zoom; int width; GdkWindow *win; win = gtk_widget_get_window(d->Win); if (win == NULL) { return; } width = gdk_window_get_width(win); zoom = Menulocal.PaperZoom / 10000.0; x1 = N2GTK_RULER_METRIC(calc_mouse_x(0, zoom, d)); x2 = x1 + N2GTK_RULER_METRIC(mxp2d(width)) / zoom; nruler_set_range(d->HRuler, x1, x2); } static void SetVRuler(const struct Viewer *d) { gdouble y1, y2, zoom; int height; GdkWindow *win; win = gtk_widget_get_window(d->Win); if (win == NULL) { return; } height = gdk_window_get_height(win); zoom = Menulocal.PaperZoom / 10000.0; y1 = N2GTK_RULER_METRIC(calc_mouse_y(0, zoom, d)); y2 = y1 + N2GTK_RULER_METRIC(mxp2d(height)) / zoom; nruler_set_range(d->VRuler, y1, y2); } #define CHECK_FOCUSED_OBJ_ERROR -1 #define CHECK_FOCUSED_OBJ_NOT_FOUND -2 static int check_focused_obj(struct narray *focusobj, struct objlist *fobj, int oid) { int i, num; if (fobj == NULL) return CHECK_FOCUSED_OBJ_ERROR; num = arraynum(focusobj); for (i = 0; i < num; i++) { struct FocusObj *focus; focus = *(struct FocusObj **) arraynget(focusobj, i); if (focus == NULL) continue; if (fobj == focus->obj && oid == focus->oid) { return i; } } return CHECK_FOCUSED_OBJ_NOT_FOUND; } static void set_toolbox_mode_by_focus_obj(const struct Viewer *d) { int type, n; n = check_focused_obj_type(d, &type); if (n == 0 || type == FOCUS_OBJ_TYPE_MERGE) { set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); } else { set_toolbox_mode(TOOLBOX_MODE_SETTING_PANEL); } } static int add_focus_obj(struct narray *focusobj, struct objlist *obj, int oid) { struct FocusObj *focus; int r; if (chkobjfield(obj, "bbox")) return FALSE; r = check_focused_obj(focusobj, obj, oid); if (r != CHECK_FOCUSED_OBJ_NOT_FOUND) return FALSE; focus = (struct FocusObj *) g_malloc(sizeof(struct FocusObj)); if (! focus) return FALSE; focus->obj = obj; focus->oid = oid; arrayadd(focusobj, &focus); set_toolbox_mode_by_focus_obj(&NgraphApp.Viewer); clear_focus_obj_pix(&NgraphApp.Viewer); return TRUE; } static void clear_focus_obj(struct Viewer *d) { arraydel2(d->focusobj); set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); clear_focus_obj_pix(d); } static int check_drawrable(struct objlist *obj) { struct narray *array; int i, n; array = &Menulocal.drawrable; n = arraynum(array); for (i = 0; i < n; i++) { char *name; name = arraynget_str(array, i); if (g_strcmp0(name, obj->name) == 0) { return 0; } } return 1; } void Focus(struct objlist *fobj, int id, enum FOCUS_MODE mode) { int oid, focus; N_VALUE *inst; int man, hidden, legend, axis, merge; struct Viewer *d; struct savedstdio save; if (fobj == NULL) { return; } d = &NgraphApp.Viewer; legend = chkobjchild(chkobject("legend"), fobj); axis = chkobjchild(chkobject("axis"), fobj); merge = chkobjchild(chkobject("merge"), fobj); if (! legend && ! axis && ! merge) { return; } if (check_drawrable(fobj)) { return; } if (mode == FOCUS_MODE_NORMAL) { UnFocus(); } inst = chkobjinst(fobj, id); _getobj(fobj, "oid", inst, &oid); _getobj(fobj, "hidden", inst, &hidden); if (hidden) { return; } set_pointer_mode_by_obj(fobj); ignorestdio(&save); if (axis) { getobj(fobj, "group_manager", id, 0, NULL, &man); if (man >= 0) { getobj(fobj, "oid", man, 0, NULL, &oid); } } focus = check_focused_obj(d->focusobj, fobj, oid); if (focus >= 0) { arrayndel2(d->focusobj, focus); } if (focus < 0 || mode != FOCUS_MODE_TOGGLE) { add_focus_obj(d->focusobj, fobj, oid); } d->MouseMode = MOUSENONE; set_toolbox_mode_by_focus_obj(d); if (arraynum(d->focusobj) == 0) { UnFocus(); } // UpdateAll(); d->ShowFrame = TRUE; /* this is inconvenient when one use single window mode. */ /* gtk_widget_grab_focus(d->Win); */ gtk_widget_queue_draw(d->Win); restorestdio(&save); } void UnFocus(void) { struct Viewer *d; d = &NgraphApp.Viewer; if (arraynum(d->focusobj) != 0) { clear_focus_obj(d); } d->ShowFrame = FALSE; if (arraynum(d->points) != 0) { arraydel2(d->points); } set_toolbox_mode(TOOLBOX_MODE_TOOLBAR); gtk_widget_queue_draw(d->Win); } #define GRID_MIN 16.0 #define GRID_COLOR 0.7 static void draw_grid(cairo_t *cr, int w, int h) { int grid, x, y; double dw, dashes[] = {1.0, 1.0}; grid = Menulocal.grid; dw = mxd2p(grid); if (dw < GRID_MIN) { grid *= ceil(GRID_MIN / dw); } cairo_set_source_rgba(cr, GRID_COLOR, GRID_COLOR, GRID_COLOR, 1); cairo_set_dash(cr, dashes, 2, 0); for (x = grid; x < Menulocal.PaperWidth; x += grid) { double dx; dx = mxd2p(x) + 1; cairo_move_to(cr, dx, 0); cairo_line_to(cr, dx, h); cairo_stroke(cr); } for (y = grid; y < Menulocal.PaperHeight; y += grid) { double dy; dy = mxd2p(y) + 1; cairo_move_to(cr, 0, dy); cairo_line_to(cr, w, dy); cairo_stroke(cr); } } void update_bg(void) { int w, h; cairo_t *cr; if (Menulocal.bg == NULL) { return; } cr = cairo_create(Menulocal.bg); cairo_set_source_rgb(cr, Menulocal.bg_r, Menulocal.bg_g, Menulocal.bg_b); cairo_paint(cr); w = cairo_image_surface_get_width(Menulocal.bg) - CAIRO_COORDINATE_OFFSET; h = cairo_image_surface_get_height(Menulocal.bg) - CAIRO_COORDINATE_OFFSET; cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); cairo_set_source_rgb(cr, 0, 0, 0); cairo_set_line_width(cr, 1); cairo_set_dash(cr, NULL, 0, 0); cairo_rectangle(cr, CAIRO_COORDINATE_OFFSET, CAIRO_COORDINATE_OFFSET, w, h); cairo_stroke(cr); if (Menulocal.show_grid) { draw_grid(cr, w, h); } cairo_destroy(cr); } static void create_layers(void) { int i, n; struct narray *array; array = &Menulocal.drawrable; n = arraynum(array); for (i = 0; i < n; i++) { char *obj; obj = arraynget_str(array, i); init_layer(obj); } } static void create_pix(int w, int h) { GdkWindow *window; window = gtk_widget_get_window(NgraphApp.Viewer.Win); if (window == NULL) { return; } if (w == 0) { w = 1; } if (h == 0) { h = 1; } if (Menulocal.pix) { cairo_surface_destroy(Menulocal.pix); } Menulocal.pix = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w + 1, h + 1); if (Menulocal.bg) { cairo_surface_destroy(Menulocal.bg); } Menulocal.bg = cairo_image_surface_create(CAIRO_FORMAT_RGB24, w + 1, h + 1); create_layers(); /* draw background */ update_bg(); gra2cairo_set_antialias(Menulocal.local, Menulocal.antialias); #if 0 cairo_set_tolerance(Menulocal.local->cairo, 0.1); #endif Menulocal.local->offsetx = 0; Menulocal.local->offsety = 0; } void OpenGC(void) { int width, height; Menulocal.local->pixel_dot_x = Menulocal.local->pixel_dot_y = Menulocal.windpi / 25.4 / 100; Menulocal.local->offsetx = 0; Menulocal.local->offsety = 0; width = mxd2p(Menulocal.PaperWidth); height = mxd2p(Menulocal.PaperHeight); if (width == 0) width = 1; if (height == 0) height = 1; create_pix(width, height); } void SetScroller(void) { int width, height, x, y; struct Viewer *d; d = &NgraphApp.Viewer; cancel_deceleration(d); width = mxd2p(Menulocal.PaperWidth); height = mxd2p(Menulocal.PaperHeight); x = width / 2; y = height / 2; gtk_range_set_range(GTK_RANGE(d->HScroll), 0, width); gtk_range_set_value(GTK_RANGE(d->HScroll), x); gtk_range_set_increments(GTK_RANGE(d->HScroll), 10, 40); gtk_range_set_range(GTK_RANGE(d->VScroll), 0, height); gtk_range_set_value(GTK_RANGE(d->VScroll), y); gtk_range_set_increments(GTK_RANGE(d->VScroll), 10, 40); d->hscroll = x; d->vscroll = y; } static double get_range_max(GtkWidget *w) { GtkAdjustment *adj; double val; adj = gtk_range_get_adjustment(GTK_RANGE(w)); val = (adj) ? gtk_adjustment_get_upper(adj) : 0; return val; } void ChangeDPI(void) { int width, height, XPos, YPos, XRange = 0, YRange = 0; gint w, h; double ratex, ratey; struct objlist *obj; struct narray *array; struct Viewer *d; d = &NgraphApp.Viewer; XRange = get_range_max(d->HScroll); YRange = get_range_max(d->VScroll); XPos = nround(d->hscroll); YPos = nround(d->vscroll); if (XPos < 0) { XPos = 0; } if (XPos > XRange) { XPos = XRange; } if (YPos < 0) { YPos = 0; } if (YPos > YRange) { YPos = YRange; } ratex = (XRange == 0) ? 0 : XPos / (double) XRange; ratey = (YRange == 0) ? 0 : YPos / (double) YRange; width = mxd2p(Menulocal.PaperWidth); height = mxd2p(Menulocal.PaperHeight); if (Menulocal.pix) { w = cairo_image_surface_get_width(Menulocal.pix) - 1; h = cairo_image_surface_get_height(Menulocal.pix) - 1; } else { h = w = 0; } if (w != width || h != height) { create_pix(width, height); mx_redraw(Menulocal.obj, Menulocal.inst, NULL); } XPos = nround(width * ratex); YPos = nround(height * ratey); cancel_deceleration(d); gtk_range_set_range(GTK_RANGE(d->HScroll), 0, width); gtk_range_set_value(GTK_RANGE(d->HScroll), XPos); d->hscroll = XPos; gtk_range_set_range(GTK_RANGE(d->VScroll), 0, height); gtk_range_set_value(GTK_RANGE(d->VScroll), YPos); d->vscroll = YPos; if ((obj = chkobject("text")) != NULL) { int i, num; num = chkobjlastinst(obj); for (i = 0; i <= num; i++) { N_VALUE *inst; inst = chkobjinst(obj, i); _getobj(obj, "bbox", inst, &array); arrayfree(array); _putobj(obj, "bbox", inst, NULL); } } gtk_widget_queue_draw(d->Win); SetHRuler(d); SetVRuler(d); } void CloseGC(void) { UnFocus(); } void ReopenGC(void) { Menulocal.local->pixel_dot_x = Menulocal.local->pixel_dot_y = Menulocal.windpi / 25.4 / 100; } void Draw(int SelectFile) { struct Viewer *d; N_VALUE *gra_inst; draw_notify(FALSE); d = &NgraphApp.Viewer; if (SelectFile && !SetFileHidden()) return; ProgressDialogCreate(_("Scaling")); FileAutoScale(); AdjustAxis(); FitClear(); SetStatusBar(_("Drawing.")); ProgressDialogSetTitle(_("Drawing")); ReopenGC(); gra_inst = chkobjinstoid(Menulocal.GRAobj, Menulocal.GRAoid); if (gra_inst != NULL) { d->ignoreredraw = TRUE; _exeobj(Menulocal.GRAobj, "clear", gra_inst, 0, NULL); // reset_event(); /* XmUpdateDisplay(d->Win); */ _exeobj(Menulocal.GRAobj, "draw", gra_inst, 0, NULL); _exeobj(Menulocal.GRAobj, "flush", gra_inst, 0, NULL); d->ignoreredraw = FALSE; } ResetStatusBar(); ProgressDialogFinalize(); gtk_widget_queue_draw(d->Win); if (SelectFile) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, FALSE); } } void CmViewerDraw(void *w, gpointer client_data) { int select_file; if (Menulock || Globallock) return; select_file = GPOINTER_TO_INT(client_data); Draw(select_file); FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, FALSE); AxisWinUpdate(NgraphApp.AxisWin.data.data, TRUE, DRAW_NONE); } static int search_axis_group(struct objlist *obj, int id, const char *group, int *findX, int *findY, int *findU, int *findR, int *findG, int *idx, int *idy, int *idu, int *idr, int *idg) { int j, id2, type; struct objlist *aobj, *gobj; char *group2; *findX = *findY = *findU = *findR = *findG = FALSE; type = group[0]; for (j = 0; j <= id; j++) { N_VALUE *inst2; inst2 = chkobjinst(obj, j); _getobj(obj, "group", inst2, &group2); _getobj(obj, "id", inst2, &id2); if (group2 == NULL || group2[0] != type) continue; if (strcmp(group + 2, group2 + 2) != 0) continue; if (group2[1] == 'X') { *findX = TRUE; *idx = id2; } else if (group2[1] == 'Y') { *findY = TRUE; *idy = id2; } else if (group2[1] == 'U') { *findU = TRUE; *idu = id2; } else if (group2[1] == 'R') { *findR = TRUE; *idr = id2; } } gobj = chkobject("axisgrid"); if ((type == 's' || type == 'f') && *findX && *findY && ! check_drawrable(gobj)) { int snum; snum = chkobjlastinst(gobj) + 1; for (j = 0; j < snum; j++) { int aid1, aid2; N_VALUE *dinst; dinst = chkobjinst(gobj, j); if (dinst == NULL) { continue; } aid1 = get_axis_id(gobj, dinst, &aobj, AXIS_X); aid2 = get_axis_id(gobj, dinst, &aobj, AXIS_Y); if (aid1 >= 0 && aid2 >= 0 && obj == aobj && aid1 == *idx && aid2 == *idy) { *findG = TRUE; _getobj(gobj, "id", dinst, idg); break; } } } return type; } static void ViewUpdate(void) { int i, id, num, modified, undo; struct FocusObj *focus; struct objlist *obj, *dobj = NULL; N_VALUE *inst; int ret; int x1, y1; int idx = 0, idy = 0, idu = 0, idr = 0, idg, lenx, leny; int findX, findY, findU, findR, findG; char type; char *group, *objs[OBJ_MAX]; struct Viewer *d; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; num = arraynum(d->focusobj); if (num < 1) { return; } d->ShowFrame = FALSE; d->ShowRect = FALSE; get_focused_obj_array(d->focusobj, objs); undo = menu_save_undo(UNDO_TYPE_EDIT, objs); PaintLock = TRUE; modified = FALSE; for (i = num - 1; i >= 0; i--) { focus = *(struct FocusObj **) arraynget(d->focusobj, i); if (focus == NULL) continue; inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) continue; obj = focus->obj; _getobj(obj, "id", inst, &id); ret = IDCANCEL; if (obj == chkobject("axis")) { _getobj(obj, "group", inst, &group); if (group && group[0] != 'a') { type = search_axis_group(obj, id, group, &findX, &findY, &findU, &findR, &findG, &idx, &idy, &idu, &idr, &idg); if (((type == 's') || (type == 'f')) && findX && findY && findU && findR) { dobj = chkobject("axisgrid"); if (! findG) { idg = -1; } getobj(obj, "y", idx, 0, NULL, &y1); getobj(obj, "x", idy, 0, NULL, &x1); getobj(obj, "y", idu, 0, NULL, &leny); getobj(obj, "x", idr, 0, NULL, &lenx); leny = y1 - leny; lenx = lenx - x1; SectionDialog(&DlgSection, x1, y1, lenx, leny, obj, idx, idy, idu, idr, dobj, &idg, type == 's'); ret = DialogExecute(TopLevel, &DlgSection); } else if ((type == 'c') && findX && findY) { getobj(obj, "x", idx, 0, NULL, &x1); getobj(obj, "y", idy, 0, NULL, &y1); getobj(obj, "length", idx, 0, NULL, &lenx); getobj(obj, "length", idy, 0, NULL, &leny); CrossDialog(&DlgCross, x1, y1, lenx, leny, obj, idx, idy); ret = DialogExecute(TopLevel, &DlgCross); } } else { AxisDialog(NgraphApp.AxisWin.data.data, id, TRUE); ret = DialogExecute(TopLevel, &DlgAxis); } } else { if (obj == chkobject("path")) { LegendArrowDialog(&DlgLegendArrow, obj, id); ret = DialogExecute(TopLevel, &DlgLegendArrow); } else if (obj == chkobject("rectangle")) { LegendRectDialog(&DlgLegendRect, obj, id); ret = DialogExecute(TopLevel, &DlgLegendRect); } else if (obj == chkobject("arc")) { LegendArcDialog(&DlgLegendArc, obj, id); ret = DialogExecute(TopLevel, &DlgLegendArc); } else if (obj == chkobject("mark")) { LegendMarkDialog(&DlgLegendMark, obj, id); ret = DialogExecute(TopLevel, &DlgLegendMark); } else if (obj == chkobject("text")) { LegendTextDialog(&DlgLegendText, obj, id); ret = DialogExecute(TopLevel, &DlgLegendText); } else if (obj == chkobject("merge")) { MergeDialog(NgraphApp.MergeWin.data.data, id, 0); ret = DialogExecute(TopLevel, &DlgMerge); } if (ret == IDDELETE) { set_graph_modified(); delobj(obj, id); } } if (ret != IDCANCEL) { modified = TRUE; } } PaintLock = FALSE; if (arraynum(d->focusobj) == 0) clear_focus_obj(d); if (modified) { UpdateAll(objs); } else { menu_undo_internal(undo); } d->ShowFrame = TRUE; } static void ViewDelete(void) { int i, id, num; struct FocusObj *focus; struct Viewer *d; char *objs[OBJ_MAX]; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; if ((d->MouseMode != MOUSENONE) || (d->Mode != PointB && d->Mode != LegendB && d->Mode != AxisB)) { return; } num = arraynum(d->focusobj); if (num < 1) { return; } d->ShowFrame = FALSE; PaintLock = TRUE; get_focused_obj_array(d->focusobj, objs); menu_save_undo(UNDO_TYPE_DELETE, objs); for (i = num - 1; i >= 0; i--) { struct objlist *obj; N_VALUE *inst; focus = *(struct FocusObj **) arraynget(d->focusobj, i); obj = focus->obj; inst = chkobjinstoid(obj, focus->oid); if (inst == NULL) continue; _getobj(obj, "id", inst, &id); if (obj == chkobject("axis")) { AxisDel(id); } else { delobj(obj, id); } set_graph_modified(); } PaintLock = FALSE; UpdateAll(objs); NSetCursor(GDK_LEFT_PTR); } static void reorder_object(enum object_move_type type) { int id, num; struct FocusObj *focus; struct objlist *obj; N_VALUE *inst; struct Viewer *d; char *objects[2]; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; if (d->MouseMode != MOUSENONE || (d->Mode != PointB && d->Mode != LegendB && d->Mode != AxisB)) return; num = arraynum(d->focusobj); if (num != 1) return; focus = *(struct FocusObj **) arraynget(d->focusobj, 0); obj = focus->obj; if (! chkobjchild(chkobject("legend"), obj) && ! chkobjchild(chkobject("merge"), obj)) return; inst = chkobjinstoid(obj, focus->oid); if (inst == NULL) return; menu_save_undo_single(UNDO_TYPE_ORDER, obj->name); _getobj(obj, "id", inst, &id); switch (type) { case OBJECT_MOVE_TYPE_TOP: movetopobj(obj, id); break; case OBJECT_MOVE_TYPE_LAST: movelastobj(obj, id); break; case OBJECT_MOVE_TYPE_UP: moveupobj(obj, id); break; case OBJECT_MOVE_TYPE_DOWN: movedownobj(obj, id); break; } set_graph_modified(); objects[0] = obj->name; objects[1] = NULL; UpdateAll(objects); } static void ncopyobj(struct objlist *obj, int id1, int id2) { char *field[] = {"name", NULL}; copy_obj_field(obj, id1, id2, field); } static void ViewCopyAxis(struct objlist *obj, int id, struct FocusObj *focus, N_VALUE *inst) { int id2; N_VALUE *inst2; int findX, findY, findU, findR, findG; int oidx, oidy; int idx = 0, idy = 0, idu = 0, idr = 0, idg; int idx2, idy2, idu2, idr2; char *group; int tp; struct narray agroup; _getobj(obj, "group", inst, &group); if (group && group[0] != 'a') { char *axisx, *axisy; char type; char *argv[2]; type = search_axis_group(obj, id, group, &findX, &findY, &findU, &findR, &findG, &idx, &idy, &idu, &idr, &idg); if (((type == 's') || (type == 'f')) && findX && findY && findU && findR) { if ((idx2 = newobj(obj)) >= 0) { ncopyobj(obj, idx2, idx); inst2 = chkobjinst(obj, idx2); _getobj(obj, "oid", inst2, &oidx); set_graph_modified(); } if ((idy2 = newobj(obj)) >= 0) { ncopyobj(obj, idy2, idy); inst2 = chkobjinst(obj, idy2); _getobj(obj, "oid", inst2, &oidy); set_graph_modified(); } if ((idu2 = newobj(obj)) >= 0) { ncopyobj(obj, idu2, idu); inst2 = chkobjinst(obj, idu2); if (idx2 >= 0) { axisx = g_strdup_printf("axis:^%d", oidx); if (axisx) { putobj(obj, "reference", idu2, axisx); } } set_graph_modified(); } if ((idr2 = newobj(obj)) >= 0) { ncopyobj(obj, idr2, idr); inst2 = chkobjinst(obj, idr2); if (idy2 >= 0) { axisy = g_strdup_printf("axis:^%d", oidy); if(axisy) { putobj(obj, "reference", idr2, axisy); } } arrayinit(&agroup, sizeof(int)); if (type == 'f') tp = 1; else tp = 2; arrayadd(&agroup, &tp); arrayadd(&agroup, &idx2); arrayadd(&agroup, &idy2); arrayadd(&agroup, &idu2); arrayadd(&agroup, &idr2); argv[0] = (char *) &agroup; argv[1] = NULL; exeobj(obj, "grouping", idr2, 1, argv); arraydel(&agroup); _getobj(obj, "oid", inst2, &(focus->oid)); set_graph_modified(); } if (findG) { struct objlist *dobj; int idg2; dobj = chkobject("axisgrid"); if ((idg2 = newobj(dobj)) >= 0) { ncopyobj(dobj, idg2, idg); inst2 = chkobjinst(dobj, idg2); if (idx2 >= 0 && idu2 >= 0) { axisx = g_strdup_printf("axis:^%d", oidx); if (axisx) { putobj(dobj, "axis_x", idg2, axisx); } } if (idy2 >= 0 && idr2 >= 0) { axisy = g_strdup_printf("axis:^%d", oidy); if (axisy) { putobj(dobj, "axis_y", idg2, axisy); } } set_graph_modified(); } } } else if ((type == 'c') && findX && findY) { if ((idx2 = newobj(obj)) >= 0) { ncopyobj(obj, idx2, idx); inst2 = chkobjinst(obj, idx2); _getobj(obj, "oid", inst2, &oidx); set_graph_modified(); } if ((idy2 = newobj(obj)) >= 0) { ncopyobj(obj, idy2, idy); inst2 = chkobjinst(obj, idy2); _getobj(obj, "oid", inst2, &oidy); arrayinit(&agroup, sizeof(int)); tp = 3; arrayadd(&agroup, &tp); arrayadd(&agroup, &idx2); arrayadd(&agroup, &idy2); argv[0] = (char *) &agroup; argv[1] = NULL; exeobj(obj, "grouping", idy2, 1, argv); arraydel(&agroup); focus->oid = oidy; set_graph_modified(); } if (idx2 >= 0 && idy2 >= 0) { axisy = g_strdup_printf("axis:^%d", oidy); if (axisy) { putobj(obj, "adjust_axis", idx2, axisy); } axisx = g_strdup_printf("axis:^%d", oidx); if (axisx) { putobj(obj, "adjust_axis", idy2, axisx); } } } } else { if ((id2 = newobj(obj)) >= 0) { ncopyobj(obj, id2, id); inst2 = chkobjinst(obj, id2); _getobj(obj, "oid", inst2, &(focus->oid)); set_graph_modified(); } } } static void ViewCopy(void) { int i, id2, num; struct FocusObj *focus; struct objlist *obj; N_VALUE *inst, *inst2; struct Viewer *d; char *objs[OBJ_MAX]; struct FOCUSED_INST *focused_inst; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; if (d->MouseMode != MOUSENONE || ! (d->Mode & POINT_TYPE_POINT)) { return; } num = arraynum(d->focusobj); if (num < 1) { return; } d->ShowFrame = FALSE; PaintLock = TRUE; focused_inst = create_focused_inst_array_by_id_order(arraydata(d->focusobj), num); if (focused_inst == NULL) { return; } get_focused_obj_array(d->focusobj, objs); menu_save_undo(UNDO_TYPE_COPY, objs); for (i = 0; i < num; i++) { int id; focus = focused_inst[i].focus; id = focused_inst[i].id; if (focus == NULL) continue; inst = chkobjinstoid(focus->obj, focus->oid); if (inst == NULL) continue; obj = focus->obj; if (obj == chkobject("axis")) { ViewCopyAxis(obj, id, focus, inst); } else { if ((id2 = newobj(obj)) >= 0) { ncopyobj(obj, id2, id); inst2 = chkobjinst(obj, id2); _getobj(obj, "oid", inst2, &(focus->oid)); set_graph_modified(); } } } PaintLock = FALSE; g_free(focused_inst); UpdateAll(objs); d->ShowFrame = TRUE; } void ViewCross(int state) { struct Viewer *d; if (Menulock || Globallock) return; d = &NgraphApp.Viewer; Menulocal.show_cross = state; if (gtk_widget_is_drawable(d->Win)) { gtk_widget_queue_draw(d->Win); } } void ViewerUpdateCB(void *w, gpointer client_data) { ViewUpdate(); } gboolean CmViewerButtonPressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { KeepMouseMode = (event->state & GDK_SHIFT_MASK); return FALSE; } void CmEditMenuCB(void *w, gpointer client_data) { if (Menulock || Globallock) return; switch (GPOINTER_TO_INT(client_data)) { case MenuIdEditRedo: menu_redo(); break; case MenuIdEditUndo: menu_undo(); break; case MenuIdEditCut: CutFocusedObjects(); break; case MenuIdEditCopy: CopyFocusedObjects(); break; case MenuIdEditPaste: PasteObjectsFromClipboard(); break; case MenuIdEditDelete: ViewDelete(); break; case MenuIdEditDuplicate: ViewCopy(); break; case MenuIdEditSelectAll: ViewSelectAll(); break; case MenuIdAlignLeft: AlignFocusedObj(VIEW_ALIGN_LEFT); break; case MenuIdAlignVCenter: AlignFocusedObj(VIEW_ALIGN_VCENTER); break; case MenuIdAlignRight: AlignFocusedObj(VIEW_ALIGN_RIGHT); break; case MenuIdAlignTop: AlignFocusedObj(VIEW_ALIGN_TOP); break; case MenuIdAlignHCenter: AlignFocusedObj(VIEW_ALIGN_HCENTER); break; case MenuIdAlignBottom: AlignFocusedObj(VIEW_ALIGN_BOTTOM); break; case MenuIdEditRotateCW: RotateFocusedObj(ROTATE_CLOCKWISE); break; case MenuIdEditRotateCCW: RotateFocusedObj(ROTATE_COUNTERCLOCKWISE); break; case MenuIdEditFlipHorizontally: FlipFocusedObj(FLIP_DIRECTION_HORIZONTAL); break; case MenuIdEditFlipVertically: FlipFocusedObj(FLIP_DIRECTION_VERTICAL); break; case MenuIdEditOrderTop: reorder_object(OBJECT_MOVE_TYPE_TOP); break; case MenuIdEditOrderUp: reorder_object(OBJECT_MOVE_TYPE_UP); break; case MenuIdEditOrderDown: reorder_object(OBJECT_MOVE_TYPE_DOWN); break; case MenuIdEditOrderBottom: reorder_object(OBJECT_MOVE_TYPE_LAST); break; } clear_focus_obj_pix(&(NgraphApp.Viewer)); set_focus_sensitivity(&(NgraphApp.Viewer)); } ngraph-gtk-6.09.05/src/gtk/x11lgnd.c0000644000175000017500000031217514142161773013673 00000000000000/* * $Id: x11lgnd.c,v 1.68 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include "dir_defs.h" #include "strconv.h" #include "ioutil.h" #include "object.h" #include "gra.h" #include "ogra2cairo.h" #include "ogra2gdk.h" #include "odraw.h" #include "opath.h" #include "nstring.h" #include "mathfn.h" #include "gtk_liststore.h" #include "gtk_entry_completion.h" #include "gtk_subwin.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "x11bitmp.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "ox11menu.h" #include "x11file.h" #include "x11view.h" #include "x11lgnd.h" #include "x11commn.h" #define DUMMY_MACRO_FOR_GETTEXT_CHARMAP1 N_("_Physics") #define DUMMY_MACRO_FOR_GETTEXT_CHARMAP2 N_("_Mathematics") #define DUMMY_MACRO_FOR_GETTEXT_CHARMAP3 N_("_Greece") #define ARROW_VIEW_SIZE 160 static n_list_store Plist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {"type", G_TYPE_PARAM, TRUE, TRUE, "type"}, {N_("marker begin"), G_TYPE_ENUM, TRUE, TRUE, "marker_begin"}, {N_("marker end"), G_TYPE_ENUM, TRUE, TRUE, "marker_end"}, {N_("color"), G_TYPE_OBJECT, TRUE, TRUE, "color"}, {"x", G_TYPE_DOUBLE, TRUE, TRUE, "x", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"y", G_TYPE_DOUBLE, TRUE, TRUE, "y", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {N_("width"), G_TYPE_DOUBLE, TRUE, TRUE, "width", 0, SPIN_ENTRY_MAX, 20, 100}, {N_("points"), G_TYPE_INT, TRUE, FALSE, "points"}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, }; enum PATH_LIST_COL { PATH_LIST_COL_HIDDEN = 0, PATH_LIST_COL_ID, PATH_LIST_COL_TYPE, PATH_LIST_COL_MARKER_BEGIN, PATH_LIST_COL_MARKER_END, PATH_LIST_COL_COLOR, PATH_LIST_COL_X, PATH_LIST_COL_Y, PATH_LIST_COL_WIDTH, PATH_LIST_COL_POINTS, PATH_LIST_COL_OID, PATH_LIST_COL_NUM, }; static n_list_store Rlist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {N_("color"), G_TYPE_OBJECT, TRUE, TRUE, "color"}, {"x", G_TYPE_DOUBLE, TRUE, TRUE, "x1", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"y", G_TYPE_DOUBLE, TRUE, TRUE, "y1", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"width", G_TYPE_DOUBLE, TRUE, TRUE, "width", 0, SPIN_ENTRY_MAX, 20, 100}, {N_("height"), G_TYPE_DOUBLE, TRUE, TRUE, "height", 0, SPIN_ENTRY_MAX, 20, 100}, {N_("line width"), G_TYPE_DOUBLE, TRUE, TRUE, "width", 0, SPIN_ENTRY_MAX, 20, 100}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, }; enum RECT_LIST_COL { RECT_LIST_COL_HIDDEN = 0, RECT_LIST_COL_ID, RECT_LIST_COL_COLOR, RECT_LIST_COL_X, RECT_LIST_COL_Y, RECT_LIST_COL_WIDTH, RECT_LIST_COL_HEIGHT, RECT_LIST_COL_LWIDTH, RECT_LIST_COL_OID, RECT_LIST_COL_NUM, }; static n_list_store Alist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {"color", G_TYPE_OBJECT, TRUE, TRUE, "color"}, {"x", G_TYPE_DOUBLE, TRUE, TRUE, "x", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"y", G_TYPE_DOUBLE, TRUE, TRUE, "y", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"rx", G_TYPE_DOUBLE, TRUE, TRUE, "rx", 0, SPIN_ENTRY_MAX, 100, 1000}, {"ry", G_TYPE_DOUBLE, TRUE, TRUE, "ry", 0, SPIN_ENTRY_MAX, 100, 1000}, {N_("angle1"), G_TYPE_DOUBLE, TRUE, TRUE, "angle1", 0, 36000, 100, 1500}, {N_("angle2"), G_TYPE_DOUBLE, TRUE, TRUE, "angle2", 0, 36000, 100, 1500}, {N_("pieslice"), G_TYPE_BOOLEAN, TRUE, TRUE, "pieslice"}, {N_("width"), G_TYPE_DOUBLE, TRUE, TRUE, "width", 0, SPIN_ENTRY_MAX, 20, 100}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, }; enum ARC_LIST_COL { ARC_LIST_COL_HIDDEN = 0, ARC_LIST_COL_ID, ARC_LIST_COL_COLOR, ARC_LIST_COL_X, ARC_LIST_COL_Y, ARC_LIST_COL_RX, ARC_LIST_COL_RY, ARC_LIST_COL_ANGLE1, ARC_LIST_COL_ANGLE2, ARC_LIST_COL_PIESLICE, ARC_LIST_COL_WIDTH, ARC_LIST_COL_OID, ARC_LIST_COL_NUM, }; static n_list_store Mlist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {"mark", G_TYPE_OBJECT, TRUE, TRUE, "type"}, {"x", G_TYPE_DOUBLE, TRUE, TRUE, "x", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"y", G_TYPE_DOUBLE, TRUE, TRUE, "y", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {N_("size"), G_TYPE_DOUBLE, TRUE, TRUE, "size", 0, SPIN_ENTRY_MAX, 100, 200}, {"width", G_TYPE_DOUBLE, TRUE, TRUE, "width", 0, SPIN_ENTRY_MAX, 20, 100}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, }; enum MARK_LIST_COL { MARK_LIST_COL_HIDDEN = 0, MARK_LIST_COL_ID, MARK_LIST_COL_MARK, MARK_LIST_COL_X, MARK_LIST_COL_Y, MARK_LIST_COL_SIZE, MARK_LIST_COL_WIDTH, MARK_LIST_COL_OID, MARK_LIST_COL_NUM, }; static n_list_store Tlist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {"text", G_TYPE_STRING, TRUE, TRUE, "text", 0, 0, 0, 0, PANGO_ELLIPSIZE_END}, {N_("font"), G_TYPE_PARAM, TRUE, TRUE, "font"}, {"x", G_TYPE_DOUBLE, TRUE, TRUE, "x", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {"y", G_TYPE_DOUBLE, TRUE, TRUE, "y", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {N_("pt"), G_TYPE_DOUBLE, TRUE, TRUE, "pt", 0, SPIN_ENTRY_MAX, 100, 1000}, {N_("direction"), G_TYPE_DOUBLE, TRUE, TRUE, "direction", 0, 36000, 100, 1500}, {"raw", G_TYPE_BOOLEAN, TRUE, TRUE, "raw"}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, {"style", G_TYPE_INT, FALSE, FALSE, "style"}, {"weight", G_TYPE_INT, FALSE, FALSE, "weight"}, {"color", G_TYPE_STRING, FALSE, FALSE, "color"}, {"bgcolor", G_TYPE_STRING, FALSE, FALSE, "bgcolor"}, #ifdef TEXT_LIST_USE_FONT_FAMILY {"font_family", G_TYPE_STRING, FALSE, FALSE, "font_family"}, #endif }; enum TEXT_LIST_COL { TEXT_LIST_COL_HIDDEN = 0, TEXT_LIST_COL_ID, TEXT_LIST_COL_TEXT, TEXT_LIST_COL_FONT, TEXT_LIST_COL_X, TEXT_LIST_COL_Y, TEXT_LIST_COL_PT, TEXT_LIST_COL_DIR, TEXT_LIST_COL_RAW, TEXT_LIST_COL_OID, TEXT_LIST_COL_STYLE, TEXT_LIST_COL_WEIGHT, TEXT_LIST_COL_COLOR, TEXT_LIST_COL_BGCOLOR, #ifdef TEXT_LIST_USE_FONT_FAMILY TEXT_LIST_COL_FONT_FAMILY, #endif TEXT_LIST_COL_NUM, }; static struct subwin_popup_list Popup_list[] = { {N_("_Duplicate"), G_CALLBACK(list_sub_window_copy), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, // {N_("duplicate _Behind"), G_CALLBACK(list_sub_window_copy), FALSE, NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Delete"), G_CALLBACK(list_sub_window_delete), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Focus"), G_CALLBACK(list_sub_window_focus), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("focus _All"), G_CALLBACK(list_sub_window_focus_all), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Properties"), G_CALLBACK(list_sub_window_update), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Instance name"), G_CALLBACK(list_sub_window_object_name), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Top"), G_CALLBACK(list_sub_window_move_top), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Up"), G_CALLBACK(list_sub_window_move_up), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Down"), G_CALLBACK(list_sub_window_move_down), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Bottom"), G_CALLBACK(list_sub_window_move_last), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_END}, }; #define POPUP_ITEM_NUM (sizeof(Popup_list) / sizeof(*Popup_list) - 1) #define POPUP_ITEM_FOCUS_ALL 4 #define POPUP_ITEM_TOP 8 #define POPUP_ITEM_UP 9 #define POPUP_ITEM_DOWN 10 #define POPUP_ITEM_BOTTOM 11 typedef void (* LEGEND_DIALOG_SETUP)(struct LegendDialog *data, struct objlist *obj, int id); static void LegendMarkDialogMark(GtkWidget *w, gpointer client_data); static void LegendDialogCopy(struct LegendDialog *d); static void path_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static void rect_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static void arc_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static void mark_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static void text_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); enum LegendType { LegendTypePath = 0, LegendTypeRect, LegendTypeArc, LegendTypeMark, LegendTypeText, }; static char *MarkChar[] = { "●", "○", "○", "◎", "⦿", "🞈", "◑", "◐", "◓", "◒", "■", "⬜", "⬜", "⧈", "▣", "🞑", "◨", "◧", "⬒", "⬓", "◆", "◇", "◇", "🞜", "◈", "", "⬗", "⬖", "⬘", "⬙", "▲", "△", "△", "", "", "", "◮", "◭", "⧗", "⧖", "▼", "▽", "▽", "", "", "", "⧩", "⧨", "", "", "◀", "◁", "◁", "", "", "", "", "", "⧓", "⋈", "▶", "▷", "▷", "", "", "", "", "", "⧒", "⧑", "+", "×", "∗", "⚹", "", "", "", "", "―", "|", "◎", "⨁", "⨂", "⧈", "⊞", "⊠", "🞜", "", "", "·", }; #define MarkCharNum ((int) (sizeof(MarkChar) / sizeof(*MarkChar))) struct lwidget { GtkWidget *w; char *f; }; static void legend_menu_update_object(const char *name, char *(*callback) (struct objlist * obj, int id), void *dialog, LEGEND_DIALOG_SETUP setup) { struct narray array; struct objlist *obj; char title[256]; if (Menulock || Globallock) return; if ((obj = chkobject(name)) == NULL) return; if (chkobjlastinst(obj) == -1) return; snprintf(title, sizeof(title), _("%s property (multi select)"), _(obj->name)); SelectDialog(&DlgSelect, obj, title, callback, &array, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int num; num = arraynum(&array); if (num > 0) { char *objs[2]; int i, j, *data; menu_save_undo_single(UNDO_TYPE_EDIT, obj->name); data = arraydata(&array); for (i = 0; i < num; i++) { setup(dialog, obj, data[i]); if (DialogExecute(TopLevel, dialog) == IDDELETE) { delobj(obj, data[i]); set_graph_modified(); for (j = i + 1; j < num; j++) { data[j]--; } } } objs[0] = obj->name; objs[1] = NULL; LegendWinUpdate(objs, TRUE, TRUE); } } arraydel(&array); } static void legend_menu_delete_object(const char *name, char *(*callback) (struct objlist * obj, int id)) { struct narray array; struct objlist *obj; char title[256]; if (Menulock || Globallock) return; if ((obj = chkobject(name)) == NULL) return; if (chkobjlastinst(obj) == -1) return; snprintf(title, sizeof(title), _("delete %s (multi select)"), _(obj->name)); SelectDialog(&DlgSelect, obj, title, callback, &array, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int num; num = arraynum(&array); if (num > 0) { int i, *data; char *objs[2]; menu_save_undo_single(UNDO_TYPE_DELETE, obj->name); data = arraydata(&array); for (i = num - 1; i >= 0; i--) { delobj(obj, data[i]); set_graph_modified(); } objs[0] = obj->name; objs[1] = NULL; LegendWinUpdate(objs, TRUE, TRUE); } } arraydel(&array); } static char * LegendLineCB(struct objlist *obj, int id) { struct narray *array; int num, *data, path_type; char *s, **enum_path_type; getobj(obj, "type", id, 0, NULL, &path_type); enum_path_type = (char **) chkobjarglist(obj, "type"); getobj(obj, "points", id, 0, NULL, &array); num = arraynum(array); data = arraydata(array); if (num < 2) { s = g_strdup(FILL_STRING); } else { s = g_strdup_printf("%s (X:%.2f Y:%.2f)-", _(enum_path_type[path_type]), data[0] / 100.0, data[1] / 100.0); } return s; } static char * LegendRectCB(struct objlist *obj, int id) { int x1, y1; char *s; getobj(obj, "x1", id, 0, NULL, &x1); getobj(obj, "y1", id, 0, NULL, &y1); s = g_strdup_printf("X1:%.2f Y1:%.2f", x1 / 100.0, y1 / 100.0); return s; } static char * LegendArcCB(struct objlist *obj, int id) { int x1, y1; char *s; getobj(obj, "x", id, 0, NULL, &x1); getobj(obj, "y", id, 0, NULL, &y1); s = g_strdup_printf("X:%.2f Y:%.2f", x1 / 100.0, y1 / 100.0); return s; } static char * LegendMarkCB(struct objlist *obj, int id) { int x, y, type; char *s; getobj(obj, "x", id, 0, NULL, &x); getobj(obj, "y", id, 0, NULL, &y); getobj(obj, "type", id, 0, NULL, &type); if (type >= 0 && type < MarkCharNum) { char *mc = MarkChar[type]; s = g_strdup_printf(_("X:%.2f Y:%.2f %s%stype:%-2d"), x / 100.0, y / 100.0, mc, (mc[0]) ? " " : "", type); } else { s = g_strdup_printf("X:%.2f Y:%.2f", x / 100.0, y / 100.0); } return s; } static char * LegendTextCB(struct objlist *obj, int id) { char *text, *s; getobj(obj, "text", id, 0, NULL, &text); if (text) { s = g_strdup(text); } else { s = g_strdup(""); } return s; } static void init_legend_dialog_widget_member(struct LegendDialog *d) { d->path_type = NULL; d->stroke = NULL; d->close_path = NULL; d->style = NULL; d->points = NULL; d->interpolation = NULL; d->width = NULL; d->miter = NULL; d->join = NULL; d->color = NULL; d->color2 = NULL; d->stroke_color = NULL; d->fill_color = NULL; d->x = NULL; d->y = NULL; d->x1 = NULL; d->y1 = NULL; d->x2 = NULL; d->y2 = NULL; d->rx = NULL; d->ry = NULL; d->pieslice = NULL; d->size = NULL; d->type = NULL; d->mark_type_begin = NULL; d->mark_type_end = NULL; d->angle1 = NULL; d->angle2 = NULL; d->fill = NULL; d->fill_rule = NULL; d->marker_begin = NULL; d->marker_end = NULL; d->arrow_length = NULL; d->arrow_width = NULL; d->view = NULL; d->text = NULL; d->pt = NULL; d->space = NULL; d->script_size = NULL; d->direction = NULL; d->raw = NULL; d->font = NULL; d->font_bold = NULL; d->font_italic = NULL; } static void get_font(struct LegendDialog *d) { int style, bold, italic, old_style; SetObjFieldFromFontList(d->font, d->Obj, d->Id, "font"); style = 0; bold = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->font_bold)); if (bold) { style |= GRA_FONT_STYLE_BOLD; } italic = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->font_italic)); if (italic) { style |= GRA_FONT_STYLE_ITALIC; } getobj(d->Obj, "style", d->Id, 0, NULL, &old_style); if (old_style != style) { putobj(d->Obj, "style", d->Id, &style); set_graph_modified(); } } static void set_font(struct LegendDialog *d, int id) { int style; struct compatible_font_info *compatible; compatible = SetFontListFromObj(d->font, d->Obj, d->Id, "font"); if (compatible) { /* for backward compatibility */ style = compatible->style; if (d->text && compatible->symbol) { char buf[] = "%F{Sym}"; const char *str; str = gtk_entry_get_text(GTK_ENTRY(d->text)); if (str && strncmp(str, buf, sizeof(buf) - 1)) { char *tmp; tmp = g_strdup_printf("%s%s", buf, str); gtk_entry_set_text(GTK_ENTRY(d->text), tmp); g_free(tmp); } } } else { getobj(d->Obj, "style", d->Id, 0, NULL, &style); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->font_bold), style & GRA_FONT_STYLE_BOLD); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->font_italic), style & GRA_FONT_STYLE_ITALIC); } static void legend_dialog_set_sensitive(GtkWidget *w, gpointer client_data) { struct LegendDialog *d; int path_type; d = (struct LegendDialog *) client_data; path_type = PATH_TYPE_LINE; if (d->path_type && d->interpolation) { path_type = combo_box_get_active(d->path_type); set_widget_sensitivity_with_label(d->interpolation, path_type == PATH_TYPE_CURVE); } if (d->stroke && d->stroke_color && d->style && d->width) { int stroke; stroke = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->stroke)); set_widget_sensitivity_with_label(d->stroke_color, stroke); set_widget_sensitivity_with_label(d->style, stroke); set_widget_sensitivity_with_label(d->width, stroke); } if (d->stroke && d->miter && d->join && d->close_path) { int stroke; stroke = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->stroke)); set_widget_sensitivity_with_label(d->miter, stroke); set_widget_sensitivity_with_label(d->join, stroke); set_widget_sensitivity_with_label(d->close_path, stroke); } if (d->stroke && d->close_path && d->marker_begin && d->marker_end && d->arrow_length && d->arrow_width) { int stroke, marker_type; stroke = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->stroke)); set_widget_sensitivity_with_label(d->miter, stroke); set_widget_sensitivity_with_label(d->join, stroke); set_widget_sensitivity_with_label(d->marker_begin, stroke); gtk_widget_set_sensitive(d->marker_end, stroke); set_widget_sensitivity_with_label(d->arrow_length, stroke); set_widget_sensitivity_with_label(d->arrow_width, stroke); marker_type = combo_box_get_active(d->marker_begin); gtk_widget_set_sensitive(d->mark_type_begin, marker_type == MARKER_TYPE_MARK && stroke); marker_type = combo_box_get_active(d->marker_end); gtk_widget_set_sensitive(d->mark_type_end, marker_type == MARKER_TYPE_MARK && stroke); if (d->interpolation) { int intp; intp = combo_box_get_active(d->interpolation); if (path_type == PATH_TYPE_CURVE) { set_widget_sensitivity_with_label(d->close_path, stroke && (intp != INTERPOLATION_TYPE_SPLINE_CLOSE && intp != INTERPOLATION_TYPE_BSPLINE_CLOSE)); } } if (path_type != PATH_TYPE_CURVE) { set_widget_sensitivity_with_label(d->close_path, stroke); } } if (d->fill && d->fill_color) { int fill; fill = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->fill)); if (d->marker_begin && d->marker_end) { int marker_begin, marker_end, stroke; stroke = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->stroke)); marker_begin = combo_box_get_active(d->marker_begin); marker_end = combo_box_get_active(d->marker_end); set_widget_sensitivity_with_label(d->fill_color, (stroke && (marker_begin == MARKER_TYPE_MARK || marker_end == MARKER_TYPE_MARK)) || fill); } else { set_widget_sensitivity_with_label(d->fill_color, fill); } if (d->fill_rule) { set_widget_sensitivity_with_label(d->fill_rule, fill); } } } static void setup_mark_type(struct LegendDialog *d, int id, GtkWidget *type, const char *field, struct MarkDialog *mark) { int a; getobj(d->Obj, field, id, 0, NULL, &a); button_set_mark_image(type, a); MarkDialog(mark, d->widget, a); } static void legend_dialog_setup_item(GtkWidget *w, struct LegendDialog *d, int id) { unsigned int i; int x1, y1, x2, y2; struct lwidget lw[] = { {d->stroke, "stroke"}, {d->path_type, "type"}, {d->close_path, "close_path"}, {d->width, "width"}, {d->join, "join"}, {d->miter, "miter_limit"}, {d->interpolation, "interpolation"}, {d->x, "x"}, {d->y, "y"}, {d->x1, "x1"}, {d->y1, "y1"}, {d->rx, "rx"}, {d->ry, "ry"}, {d->angle1, "angle1"}, {d->angle2, "angle2"}, {d->fill, "fill"}, {d->fill_rule, "fill_rule"}, {d->raw, "raw"}, {d->pieslice, "pieslice"}, {d->size, "size"}, {d->pt, "pt"}, {d->direction, "direction"}, {d->space, "space"}, {d->script_size, "script_size"}, }; SetTextFromObjPoints(d->points, d->Obj, id, "points"); SetStyleFromObjField(d->style, d->Obj, id, "style"); for (i = 0; i < sizeof(lw) / sizeof(*lw); i++) { SetWidgetFromObjField(lw[i].w, d->Obj, id, lw[i].f); } if (d->arrow_length) { int len, wid; getobj(d->Obj, "arrow_length", id, 0, NULL, &len); getobj(d->Obj, "arrow_width", id, 0, NULL, &wid); d->wid = (wid / 100) * 100; d->ang = atan(0.5 * d->wid / len) * 2 * 180 / MPI; if (d->ang < 10) { d->ang = 10; } else if (d->ang > 170) { d->ang = 170; } gtk_range_set_value(GTK_RANGE(d->arrow_width), d->wid / 100); gtk_range_set_value(GTK_RANGE(d->arrow_length), d->ang); } if (d->type) { setup_mark_type(d, id, d->type, "type", &(d->mark)); } if (d->marker_begin) { getobj(d->Obj, "marker_begin", id, 0, NULL, &i); combo_box_set_active(d->marker_begin, i); } if (d->marker_end) { getobj(d->Obj, "marker_end", id, 0, NULL, &i); combo_box_set_active(d->marker_end, i); } if (d->mark_type_begin) { setup_mark_type(d, id, d->mark_type_begin, "mark_type_begin", &(d->mark_begin)); } if (d->mark_type_end) { setup_mark_type(d, id, d->mark_type_end, "mark_type_end", &(d->mark_end)); } if (d->x1 && d->y1 && d->x2 && d->y2) { getobj(d->Obj, "x1", id, 0, NULL, &x1); getobj(d->Obj, "y1", id, 0, NULL, &y1); getobj(d->Obj, "x2", id, 0, NULL, &x2); getobj(d->Obj, "y2", id, 0, NULL, &y2); spin_entry_set_val(d->x2, x2 - x1); spin_entry_set_val(d->y2, y2 - y1); } if (d->text) { char *buf; sgetobjfield(d->Obj,id,"text",NULL,&buf,FALSE,FALSE,FALSE); if (buf) { gtk_entry_set_text(GTK_ENTRY(d->text), buf); g_free(buf); } } if (d->font && d->font_bold && d->font_italic) set_font(d, id); if (d->color) set_color(d->color, d->Obj, id, NULL); if (d->color2) set_color2(d->color2, d->Obj, id); if (d->stroke_color) set_stroke_color(d->stroke_color, d->Obj, id); if (d->fill_color) set_fill_color(d->fill_color, d->Obj, id); legend_dialog_set_sensitive(NULL, d); } static int set_mark_type(struct LegendDialog *d, const char *field, struct MarkDialog *mark) { int oval; getobj(d->Obj, field, d->Id, 0, NULL, &oval); if (oval != mark->Type) { if (putobj(d->Obj, field, d->Id, &(mark->Type)) == -1) { return 1; } set_graph_modified(); } return 0; } static void legend_dialog_close(GtkWidget *w, void *data) { struct LegendDialog *d = (struct LegendDialog *) data; unsigned int i; int ret, x2, y2, oval; struct lwidget lw[] = { {d->stroke, "stroke"}, {d->path_type, "type"}, {d->close_path, "close_path"}, {d->width, "width"}, {d->join, "join"}, {d->miter, "miter_limit"}, {d->interpolation, "interpolation"}, {d->x, "x"}, {d->y, "y"}, {d->x1, "x1"}, {d->y1, "y1"}, {d->rx, "rx"}, {d->ry, "ry"}, {d->angle1, "angle1"}, {d->angle2, "angle2"}, {d->fill, "fill"}, {d->fill_rule, "fill_rule"}, {d->raw, "raw"}, {d->marker_begin, "marker_begin"}, {d->marker_end, "marker_end"}, {d->pieslice, "pieslice"}, {d->size, "size"}, {d->pt, "pt"}, {d->direction, "direction"}, {d->space, "space"}, {d->script_size, "script_size"}, }; switch(d->ret) { case IDOK: break; case IDCOPY: LegendDialogCopy(d); d->ret = IDLOOP; return; default: return; } ret = d->ret; d->ret = IDLOOP; for (i = 0; i < sizeof(lw) / sizeof(*lw); i++) { if (SetObjFieldFromWidget(lw[i].w, d->Obj, d->Id, lw[i].f)) return; } if (SetObjPointsFromText(d->points, d->Obj, d->Id, "points")) return; if (SetObjFieldFromStyle(d->style, d->Obj, d->Id, "style")) return; if (d->x1 && d->y1 && d->x2 && d->y2) { int x1, y1; x1 = spin_entry_get_val(d->x1); x2 = spin_entry_get_val(d->x2); y1 = spin_entry_get_val(d->y1); y2 = spin_entry_get_val(d->y2); x2 += x1; y2 += y1; getobj(d->Obj, "x2", d->Id, 0, NULL, &oval); if (oval != x2 && putobj(d->Obj, "x2", d->Id, &x2) == -1) return; getobj(d->Obj, "y2", d->Id, 0, NULL, &oval); if (oval != y2 && putobj(d->Obj, "y2", d->Id, &y2) == -1) return; } if (d->arrow_length) { int wid, ang, len; wid = gtk_range_get_value(GTK_RANGE(d->arrow_width)); ang = gtk_range_get_value(GTK_RANGE(d->arrow_length)); d->wid = wid * 100; d->ang = ang; len = d->wid * 0.5 / tan(d->ang * 0.5 * MPI / 180); getobj(d->Obj, "arrow_length", d->Id, 0, NULL, &oval); if (oval != len) { if (putobj(d->Obj, "arrow_length", d->Id, &len) == -1) { return; } set_graph_modified(); } getobj(d->Obj, "arrow_width", d->Id, 0, NULL, &oval); if (oval != d->wid) { if(putobj(d->Obj, "arrow_width", d->Id, &(d->wid)) == -1) { return; } set_graph_modified(); } } if (d->type) { set_mark_type(d, "type", &(d->mark)); } if (d->mark_type_begin) { set_mark_type(d, "mark_type_begin", &(d->mark_begin)); } if (d->mark_type_end) { set_mark_type(d, "mark_type_end", &(d->mark_end)); } if (d->font && d->font_bold && d->font_italic) { get_font(d); } if (d->text) { const char *str; char *ptr; str = gtk_entry_get_text(GTK_ENTRY(d->text)); if (str == NULL) return; entry_completion_append(NgraphApp.legend_text_list, str); ptr = g_strdup(str); if (ptr) { char *org_str; sgetobjfield(d->Obj, d->Id, "text", NULL, &org_str, FALSE, FALSE, FALSE); if (org_str == NULL || strcmp(ptr, org_str)) { if (sputobjfield(d->Obj, d->Id, "text", ptr) != 0) { g_free(org_str); g_free(ptr); return; } set_graph_modified(); } g_free(org_str); g_free(ptr); } } if (d->stroke_color && putobj_stroke_color(d->stroke_color, d->Obj, d->Id)) return; if (d->fill_color && putobj_fill_color(d->fill_color, d->Obj, d->Id)) return; if (d->color && putobj_color(d->color, d->Obj, d->Id, NULL)) return; if (d->color2 && putobj_color2(d->color2, d->Obj, d->Id)) return; d->ret = ret; } static void legend_copy_clicked(GtkButton *btn, gpointer user_data) { int sel; struct LegendDialog *d; d = (struct LegendDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, d->prop_cb); if (sel != -1) { legend_dialog_setup_item(d->widget, d, sel); } } static void LegendDialogCopy(struct LegendDialog *d) { int sel; if ((sel = CopyClick(d->widget, d->Obj, d->Id, d->prop_cb)) != -1) legend_dialog_setup_item(d->widget, d, sel); } static void width_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); d->width = w; add_widget_to_table(table, w, _("_Line width:"), FALSE, i++); } #define POINTS_DIMENSION 2 static void renderer_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { int n; double v; char buf[1024]; n = GPOINTER_TO_INT(data); gtk_tree_model_get(model, iter, n, &v, -1); snprintf(buf, sizeof(buf), "%.2f", v); g_object_set((GObject *) renderer, "text", buf, NULL); } static void column_edited(GtkCellRenderer *cell_renderer, gchar *path_str, gchar *str, int column, gpointer user_data) { double d; char *eptr; GtkTreeModel *list; GtkTreeIter iter; GtkTreePath *path; int r; path = gtk_tree_path_new_from_string(path_str); if (path == NULL) return; list = GTK_TREE_MODEL(user_data); r = gtk_tree_model_get_iter(list, &iter, path); if (! r) return; d = strtod(str, &eptr); if (d != d || d == HUGE_VAL || d == - HUGE_VAL || eptr == str) return; gtk_list_store_set(GTK_LIST_STORE(list), &iter, column, d, -1); } static void column_0_edited(GtkCellRenderer *cell_renderer, gchar *path_str, gchar *str, gpointer user_data) { column_edited(cell_renderer, path_str, str, 0, user_data); } static void column_1_edited(GtkCellRenderer *cell_renderer, gchar *path_str, gchar *str, gpointer user_data) { column_edited(cell_renderer, path_str, str, 1, user_data); } static void insert_column(GtkWidget *w, gpointer user_data) { GtkTreeView *tree_view; GtkTreeModel *list; GtkTreeIter iter, tmp; GtkTreePath *path; int r; tree_view = GTK_TREE_VIEW(user_data); list = gtk_tree_view_get_model(tree_view); if (list == NULL) { return; } gtk_tree_view_get_cursor(tree_view, &path, NULL); if (path) { r = gtk_tree_model_get_iter(list, &iter, path); if (! r) goto End; gtk_list_store_insert_after(GTK_LIST_STORE(list), &tmp, &iter); } else { gtk_list_store_append(GTK_LIST_STORE(list), &tmp); } if (path) { gtk_tree_path_free(path); } path = gtk_tree_model_get_path(list, &tmp); if (path) { gtk_tree_view_set_cursor(tree_view, path, NULL, FALSE); } End: if (path) gtk_tree_path_free(path); } static void set_delete_button_sensitivity(GtkTreeSelection *sel, gpointer user_data) { GtkWidget *btn; int n; btn = GTK_WIDGET(user_data); n = gtk_tree_selection_count_selected_rows(sel); gtk_widget_set_sensitive(btn, n > 0); } static GtkWidget * points_setup(struct LegendDialog *d) { GtkWidget *label, *swin, *vbox, *hbox, *tree_view, *btn; GtkTreeModel *list; GtkTreeSelection *sel; char *title[] = {"x", "y"}; int i; GCallback edited_func[] = {G_CALLBACK(column_0_edited), G_CALLBACK(column_1_edited)}; list = GTK_TREE_MODEL(gtk_list_store_new(POINTS_DIMENSION, G_TYPE_DOUBLE, G_TYPE_DOUBLE)); tree_view = gtk_tree_view_new_with_model(list); gtk_tree_view_set_rubber_banding(GTK_TREE_VIEW(tree_view), FALSE); gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(tree_view), GTK_TREE_VIEW_GRID_LINES_VERTICAL); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(tree_view), TRUE); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view)); gtk_tree_selection_set_mode(sel, GTK_SELECTION_MULTIPLE); for (i = 0; i < POINTS_DIMENSION; i++) { GtkCellRenderer *renderer; GtkTreeViewColumn *col; renderer = gtk_cell_renderer_spin_new(); g_object_set((GObject *) renderer, "xalign", 1.0, "editable", TRUE, "adjustment", gtk_adjustment_new(0, -SPIN_ENTRY_MAX / 100.0, SPIN_ENTRY_MAX / 100.0, 1, 10, 0), "digits", 2, NULL); g_signal_connect(renderer, "edited", G_CALLBACK(edited_func[i]), list); col = gtk_tree_view_column_new_with_attributes(title[i], renderer, "text", i, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree_view), col); gtk_tree_view_column_set_cell_data_func(col, renderer, renderer_func, GINT_TO_POINTER(i), NULL); gtk_tree_view_column_set_expand(col, TRUE); } vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); label = gtk_label_new_with_mnemonic(_("_Points:")); set_widget_margin(label, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_TOP | WIDGET_MARGIN_BOTTOM); gtk_widget_set_halign(label, GTK_ALIGN_START); gtk_label_set_mnemonic_widget(GTK_LABEL(label), tree_view); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(swin), GTK_SHADOW_ETCHED_IN); gtk_container_set_border_width(GTK_CONTAINER(swin), 2); set_widget_margin(swin, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_container_add(GTK_CONTAINER(swin), tree_view); gtk_box_pack_start(GTK_BOX(vbox), swin, TRUE, TRUE, 0); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); btn = gtk_button_new_with_mnemonic(_("_Add")); set_button_icon(btn, "list-add"); g_signal_connect(btn, "clicked", G_CALLBACK(insert_column), tree_view); gtk_box_pack_start(GTK_BOX(hbox), btn, FALSE, FALSE, 4); btn = gtk_button_new_with_mnemonic(_("_Delete")); g_signal_connect(btn, "clicked", G_CALLBACK(list_store_remove_selected_cb), tree_view); g_signal_connect(sel, "changed", G_CALLBACK(set_delete_button_sensitivity), btn); gtk_widget_set_sensitive(btn, FALSE); gtk_box_pack_start(GTK_BOX(hbox), btn, FALSE, FALSE, 4); set_widget_margin(hbox, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 4); d->points = tree_view; return vbox; } static void style_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = combo_box_entry_create(); combo_box_entry_set_width(w, NUM_ENTRY_WIDTH); d->style = w; add_widget_to_table(table, w, _("Line _Style:"), TRUE, i); } static void miter_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); d->miter = w; add_widget_to_table(table, w, _("_Miter:"), FALSE, i++); } static void join_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = combo_box_create(); d->join = w; add_widget_to_table(table, w, _("_Join:"), FALSE, i++); } static void color_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = create_color_button(d->widget); d->color = w; add_widget_to_table(table, w, _("_Color:"), FALSE, i); } static void color2_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = create_color_button(d->widget); d->color2 = w; add_widget_to_table(table, w, _("_Color2:"), FALSE, i); } static void fill_color_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = create_color_button(d->widget); d->fill_color = w; add_widget_to_table(table, w, _("_Color:"), FALSE, i); } static void stroke_color_setup(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w; w = create_color_button(d->widget); d->stroke_color = w; add_widget_to_table(table, w, _("_Color:"), FALSE, i); } static void draw_arrow_pixmap(GtkWidget *win, struct LegendDialog *d) { int lw, len, x, w; cairo_t *cr; GdkWindow *window; window = gtk_widget_get_window(win); if (window == NULL) { return; } if (d->arrow_pixmap == NULL) { d->arrow_pixmap = cairo_image_surface_create(CAIRO_FORMAT_RGB24, ARROW_VIEW_SIZE, ARROW_VIEW_SIZE); } cr = cairo_create(d->arrow_pixmap); cairo_set_source_rgb(cr, Menulocal.bg_r, Menulocal.bg_g, Menulocal.bg_b); cairo_paint(cr); cairo_set_source_rgb(cr, 0, 0, 0); lw = ARROW_VIEW_SIZE / 20; len = d->wid * 0.5 / tan(d->ang * 0.5 * MPI / 180); x = nround(lw * (len / 10000.0)); w = nround(lw * (d->wid / 20000.0)); cairo_rectangle(cr, x, (ARROW_VIEW_SIZE - lw) / 2, ARROW_VIEW_SIZE - x, lw); cairo_move_to(cr, 0, ARROW_VIEW_SIZE / 2); cairo_line_to(cr, x, ARROW_VIEW_SIZE / 2 - w); cairo_line_to(cr, x, ARROW_VIEW_SIZE / 2 + w); cairo_fill(cr); } static void LegendArrowDialogPaint(GtkWidget *w, cairo_t *cr, gpointer client_data) { struct LegendDialog *d; d = (struct LegendDialog *) client_data; if (d->arrow_pixmap == NULL) { draw_arrow_pixmap(w, d); } if (d->arrow_pixmap == NULL) { return; } cairo_set_source_surface(cr, d->arrow_pixmap, 0, 0); cairo_paint(cr); } static void LegendArrowDialogScale(GtkWidget *w, struct LegendDialog *d) { GdkWindow *win; draw_arrow_pixmap(w, d); win = gtk_widget_get_window(d->view); if (win) { gdk_window_invalidate_rect(win, NULL, FALSE); } } static void LegendArrowDialogScaleW(GtkWidget *w, gpointer client_data) { struct LegendDialog *d; d = (struct LegendDialog *) client_data; d->wid = gtk_range_get_value(GTK_RANGE(w)) * 100; LegendArrowDialogScale(w, d); } static void LegendArrowDialogScaleL(GtkWidget *w, gpointer client_data) { struct LegendDialog *d; d = (struct LegendDialog *) client_data; d->ang = gtk_range_get_value(GTK_RANGE(w)); LegendArrowDialogScale(w, d); } static gchar* format_value_percent(GtkScale *scale, gdouble value, gpointer user_data) { return g_strdup_printf ("%.0f%%", value); } static gchar* format_value_degree(GtkScale *scale, gdouble value, gpointer user_data) { return g_strdup_printf ("%.0f°", value); } static GtkWidget * create_marker_type_combo_box(const char *postfix, const char *tooltip) { GtkWidget *cbox; GtkListStore *list; GtkTreeIter iter; int j; GtkCellRenderer *rend; list = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); cbox = gtk_combo_box_new_with_model(GTK_TREE_MODEL(list)); rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cbox), rend, FALSE); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "icon-name", 0); gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(cbox), rend, "stock-size", 1); for (j = 0; j < MARKER_TYPE_NUM; j++) { char img_file[256]; snprintf(img_file, sizeof(img_file), "%s_%s-symbolic", marker_type_char[j], postfix); gtk_list_store_append(list, &iter); gtk_list_store_set(list, &iter, 0, img_file, 1, GTK_ICON_SIZE_LARGE_TOOLBAR, -1); } gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), 1); gtk_widget_set_name(cbox, "MarkerType"); gtk_widget_set_tooltip_text(cbox, tooltip); return cbox; } static void create_maker_setting_widgets(struct LegendDialog *d, GtkWidget *table, int i) { GtkWidget *w, *hbox3, *label; hbox3 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); w = gtk_button_new(); g_signal_connect(w, "clicked", G_CALLBACK(LegendMarkDialogMark), &(d->mark_begin)); gtk_box_pack_start(GTK_BOX(hbox3), w, FALSE, FALSE, 0); d->mark_type_begin = w; w = create_marker_type_combo_box("begin", _("Marker begin")); gtk_box_pack_start(GTK_BOX(hbox3), w, FALSE, FALSE, 0); d->marker_begin = w; w = create_marker_type_combo_box("end", _("Marker end")); gtk_box_pack_start(GTK_BOX(hbox3), w, FALSE, FALSE, 0); d->marker_end = w; w = gtk_button_new(); gtk_box_pack_start(GTK_BOX(hbox3), w, FALSE, FALSE, 0); g_signal_connect(w, "clicked", G_CALLBACK(LegendMarkDialogMark), &(d->mark_end)); d->mark_type_end = w; g_signal_connect(d->marker_begin, "changed", G_CALLBACK(legend_dialog_set_sensitive), d); g_signal_connect(d->marker_end, "changed", G_CALLBACK(legend_dialog_set_sensitive), d); label = gtk_label_new_with_mnemonic(_("_Marker:")); gtk_widget_set_halign(label, GTK_ALIGN_START); gtk_label_set_mnemonic_widget(GTK_LABEL(label), d->marker_begin); gtk_grid_attach(GTK_GRID(table), label, 0, i, 1, 1); gtk_grid_attach(GTK_GRID(table), hbox3, 1, i, 1, 1); } static void create_arrow_setting_widgets(struct LegendDialog *d, GtkWidget *hbox) { GtkWidget *w, *vbox; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 10, 170, 1); set_scale_mark(w, GTK_POS_BOTTOM, 15, 15); g_signal_connect(w, "value-changed", G_CALLBACK(LegendArrowDialogScaleL), d); g_signal_connect(w, "format-value", G_CALLBACK(format_value_degree), NULL); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->arrow_length = w; w = gtk_drawing_area_new(); gtk_widget_set_size_request(w, ARROW_VIEW_SIZE, ARROW_VIEW_SIZE); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); g_signal_connect(w, "draw", G_CALLBACK(LegendArrowDialogPaint), d); d->view = w; w = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, 100, 2000, 1); set_scale_mark(w, GTK_POS_TOP, 200, 200); g_signal_connect(w, "value-changed", G_CALLBACK(LegendArrowDialogScaleW), d); g_signal_connect(w, "format-value", G_CALLBACK(format_value_percent), NULL); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 4); d->arrow_width = w; set_widget_margin(vbox, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); } static void LegendArrowDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct LegendDialog *d; char title[64]; d = (struct LegendDialog *) data; snprintf(title, sizeof(title), _("Legend line %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *hbox2, *vbox2, *frame, *table; int i; init_legend_dialog_widget_member(d); gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = points_setup(d); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), w); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Type:"), FALSE, i++); g_signal_connect(w, "changed", G_CALLBACK(legend_dialog_set_sensitive), d); d->path_type = w; w = combo_box_create(); d->interpolation = w; add_widget_to_table(table, w, _("_Interpolation:"), FALSE, i++); g_signal_connect(w, "changed", G_CALLBACK(legend_dialog_set_sensitive), d); gtk_box_pack_start(GTK_BOX(vbox2), table, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = gtk_check_button_new_with_mnemonic(_("_Close path")); add_widget_to_table(table, w, NULL, FALSE, i++); d->close_path = w; create_maker_setting_widgets(d, table, i++); style_setup(d, table, i++); width_setup(d, table, i++); miter_setup(d, table, i++); join_setup(d, table, i++); stroke_color_setup(d, table, i++); gtk_box_pack_start(GTK_BOX(hbox2), table, TRUE, TRUE, 0); create_arrow_setting_widgets(d, hbox2); w = gtk_check_button_new_with_mnemonic(_("_Stroke")); g_signal_connect(w, "toggled", G_CALLBACK(legend_dialog_set_sensitive), d); d->stroke = w; frame = gtk_frame_new(NULL); gtk_frame_set_label_widget(GTK_FRAME(frame), w); gtk_container_add(GTK_CONTAINER(frame), hbox2); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox2), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = combo_box_create(); d->fill_rule = w; add_widget_to_table(table, w, _("fill _Rule:"), FALSE, i++); fill_color_setup(d, table, i++); w = gtk_check_button_new_with_mnemonic(_("_Fill")); g_signal_connect(w, "toggled", G_CALLBACK(legend_dialog_set_sensitive), d); d->fill = w; frame = gtk_frame_new(NULL); gtk_frame_set_label_widget(GTK_FRAME(frame), w); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox2), frame, TRUE, TRUE, 0); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), vbox2); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(legend_copy_clicked), d, "path"); d->prop_cb = LegendLineCB; gtk_widget_show_all(GTK_WIDGET(d->vbox)); } legend_dialog_setup_item(wi, d, d->Id); } void LegendArrowDialog(struct LegendDialog *data, struct objlist *obj, int id) { data->SetupWindow = LegendArrowDialogSetup; data->CloseWindow = legend_dialog_close; data->Obj = obj; data->Id = id; } static void LegendRectDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct LegendDialog *d; char title[64]; d = (struct LegendDialog *) data; snprintf(title, sizeof(title), _("Legend rectangle %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *vbox, *frame, *table; int i; init_legend_dialog_widget_member(d); gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x1 = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y1 = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("_Width:"), FALSE, i++); d->x2 = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("_Height:"), FALSE, i++); d->y2 = w; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); table = gtk_grid_new(); i = 0; style_setup(d, table, i++); width_setup(d, table, i++); stroke_color_setup(d, table, i++); w = gtk_check_button_new_with_mnemonic(_("_Stroke")); g_signal_connect(w, "toggled", G_CALLBACK(legend_dialog_set_sensitive), d); d->stroke = w; frame = gtk_frame_new(NULL); gtk_frame_set_label_widget(GTK_FRAME(frame), w); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; fill_color_setup(d, table, i++); w = gtk_check_button_new_with_mnemonic(_("_Fill")); g_signal_connect(w, "toggled", G_CALLBACK(legend_dialog_set_sensitive), d); d->fill = w; frame = gtk_frame_new(NULL); gtk_frame_set_label_widget(GTK_FRAME(frame), w); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(legend_copy_clicked), d, "rectangle"); d->prop_cb = LegendRectCB; gtk_widget_show_all(GTK_WIDGET(d->vbox)); } legend_dialog_setup_item(wi, d, d->Id); } void LegendRectDialog(struct LegendDialog *data, struct objlist *obj, int id) { data->SetupWindow = LegendRectDialogSetup; data->CloseWindow = legend_dialog_close; data->Obj = obj; data->Id = id; } static void LegendArcDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct LegendDialog *d; char title[64]; d = (struct LegendDialog *) data; snprintf(title, sizeof(title), _("Legend arc %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *hbox2, *vbox, *table, *frame; int i; init_legend_dialog_widget_member(d); gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, "_RX:", FALSE, i++); d->rx = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, "_RY:", FALSE, i++); d->ry = w; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = create_direction_entry(); add_widget_to_table(table, w, _("_Angle1:"), FALSE, i++); d->angle1 = w; w = create_direction_entry(); add_widget_to_table(table, w, _("_Angle2:"), FALSE, i++); d->angle2 = w; w = gtk_check_button_new_with_mnemonic(_("_Pieslice")); add_widget_to_table(table, w, NULL, FALSE, i++); d->pieslice = w; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = gtk_check_button_new_with_mnemonic(_("_Close path")); add_widget_to_table(table, w, NULL, FALSE, i++); d->close_path = w; create_maker_setting_widgets(d, table, i++); style_setup(d, table, i++); width_setup(d, table, i++); miter_setup(d, table, i++); join_setup(d, table, i++); stroke_color_setup(d, table, i++); gtk_box_pack_start(GTK_BOX(hbox2), table, TRUE, TRUE, 0); create_arrow_setting_widgets(d, hbox2); w = gtk_check_button_new_with_mnemonic(_("_Stroke")); g_signal_connect(w, "toggled", G_CALLBACK(legend_dialog_set_sensitive), d); d->stroke = w; frame = gtk_frame_new(NULL); gtk_frame_set_label_widget(GTK_FRAME(frame), w); gtk_container_add(GTK_CONTAINER(frame), hbox2); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; fill_color_setup(d, table, i++); w = gtk_check_button_new_with_mnemonic(_("_Fill")); g_signal_connect(w, "toggled", G_CALLBACK(legend_dialog_set_sensitive), d); d->fill = w; frame = gtk_frame_new(NULL); gtk_frame_set_label_widget(GTK_FRAME(frame), w); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT | WIDGET_MARGIN_BOTTOM); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(legend_copy_clicked), d, "arc"); d->prop_cb = LegendArcCB; gtk_widget_show_all(GTK_WIDGET(d->vbox)); } legend_dialog_setup_item(wi, d, d->Id); } void LegendArcDialog(struct LegendDialog *data, struct objlist *obj, int id) { data->SetupWindow = LegendArcDialogSetup; data->CloseWindow = legend_dialog_close; data->Obj = obj; data->Id = id; } static void LegendMarkDialogMark(GtkWidget *w, gpointer client_data) { struct MarkDialog *d; d = (struct MarkDialog *) client_data; DialogExecute(d->parent, d); button_set_mark_image(w, d->Type); } static void LegendMarkDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct LegendDialog *d; char title[64]; d = (struct LegendDialog *) data; snprintf(title, sizeof(title), _("Legend mark %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *frame, *table; int i; init_legend_dialog_widget_member(d); gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y = w; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; style_setup(d, table, i++); width_setup(d, table, i++); w = gtk_button_new(); add_widget_to_table(table, w, _("_Mark:"), FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(LegendMarkDialogMark), &(d->mark)); d->type = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Size:"), FALSE, i++); d->size = w; color_setup(d, table, i++); color2_setup(d, table, i++); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(legend_copy_clicked), d, "mark"); d->prop_cb = LegendArcCB; gtk_widget_show_all(GTK_WIDGET(d->vbox)); } legend_dialog_setup_item(wi, d, d->Id); if (makewidget) d->widget = NULL; } void LegendMarkDialog(struct LegendDialog *data, struct objlist *obj, int id) { data->SetupWindow = LegendMarkDialogSetup; data->CloseWindow = legend_dialog_close; data->Obj = obj; data->Id = id; } static void legend_dialog_setup_sub(struct LegendDialog *d, GtkWidget *table, int i, int instance) { GtkWidget *w, *btn_box; if (instance) { w = create_spin_entry_type(SPIN_BUTTON_TYPE_POINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Pt:"), FALSE, i++); d->pt = w; } else { d->pt = NULL; } w = create_spin_entry_type(SPIN_BUTTON_TYPE_SPACE_POINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Space:"), FALSE, i++); d->space = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); spin_entry_set_range(w, SCRIPT_SIZE_MIN, SCRIPT_SIZE_MAX); add_widget_to_table(table, w, _("_Script:"), FALSE, i++); d->script_size = w; if (instance) { w = combo_box_create(); add_widget_to_table(table, w, _("_Font:"), FALSE, i++); d->font = w; btn_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); gtk_box_set_spacing(GTK_BOX(btn_box), 10); w = gtk_check_button_new_with_mnemonic(_("_Bold")); set_button_icon(w, "format-text-bold"); d->font_bold = w; gtk_box_pack_start(GTK_BOX(btn_box), w, FALSE, FALSE, 0); w = gtk_check_button_new_with_mnemonic(_("_Italic")); set_button_icon(w, "format-text-italic"); d->font_italic = w; gtk_box_pack_start(GTK_BOX(btn_box), w, FALSE, FALSE, 0); add_widget_to_table(table, btn_box, "", FALSE, i++); color_setup(d, table, i++); } else { d->font = NULL; d->font_bold = NULL; d->font_italic = NULL; d->color = NULL; } w = create_direction_entry(); add_widget_to_table(table, w, _("_Direction:"), FALSE, i++); d->direction = w; w = gtk_check_button_new_with_mnemonic(_("_Raw")); add_widget_to_table(table, w, NULL, FALSE, i++); d->raw = w; } static void insert_selcted_char(GtkIconView *icon_view, GtkTreePath *path, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; char *ptr; GtkEditable *entry; int pos; model = gtk_icon_view_get_model(icon_view); if (! gtk_tree_model_get_iter(model, &iter, path)) { return; } gtk_tree_model_get(model, &iter, 0, &ptr, -1); entry = GTK_EDITABLE(user_data); pos = gtk_editable_get_position(entry); gtk_editable_insert_text(entry, ptr, -1, &pos); gtk_editable_set_position(entry, pos + 1); gtk_widget_grab_focus(GTK_WIDGET(user_data)); gtk_editable_select_region(entry, pos, pos); g_free(ptr); } static GtkWidget * create_character_view(GtkWidget *entry, gchar *data) { GtkWidget *icon_view, *swin; GtkListStore *model; GtkTreeIter iter; gchar *ptr; model = gtk_list_store_new(1, G_TYPE_STRING); icon_view = gtk_icon_view_new_with_model(GTK_TREE_MODEL(model)); gtk_icon_view_set_text_column(GTK_ICON_VIEW(icon_view), 0); gtk_icon_view_set_spacing(GTK_ICON_VIEW(icon_view), 0); gtk_icon_view_set_row_spacing(GTK_ICON_VIEW(icon_view), 0); gtk_icon_view_set_column_spacing(GTK_ICON_VIEW(icon_view), 0); gtk_icon_view_set_margin(GTK_ICON_VIEW(icon_view), 0); gtk_icon_view_set_item_padding(GTK_ICON_VIEW(icon_view), 0); g_signal_connect(icon_view, "item-activated", G_CALLBACK(insert_selcted_char), entry); for (ptr = data; *ptr; ptr = g_utf8_next_char(ptr)) { gunichar ch; gchar str[8]; int l; gtk_list_store_append(model, &iter); ch = g_utf8_get_char(ptr); l = g_unichar_to_utf8(ch, str); str[l] = '\0'; gtk_list_store_set(model, &iter, 0, str, -1); } swin = gtk_scrolled_window_new(NULL, NULL); gtk_icon_view_set_activate_on_single_click(GTK_ICON_VIEW(icon_view),TRUE); gtk_widget_set_size_request(GTK_WIDGET(swin), -1, 100); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), icon_view); return swin; } static GtkWidget * create_character_panel(GtkWidget *entry) { GtkWidget *tab, *label, *child; struct character_map_list *list; tab = gtk_notebook_new(); for (list = Menulocal.char_map; list; list = list->next) { char *data, *title; data = list->data; title = list->title; if (data && data[0]) { label = gtk_label_new_with_mnemonic(_(title)); child = create_character_view(entry, data); gtk_notebook_append_page(GTK_NOTEBOOK(tab), child, label); } } return tab; } static void LegendTextDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct LegendDialog *d; char title[64]; d = (struct LegendDialog *) data; snprintf(title, sizeof(title), _("Legend text %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *frame, *table; int i; init_legend_dialog_widget_member(d); gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_X:", FALSE, i++); d->x = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->y = w; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); table = gtk_grid_new(); i = 0; w = create_text_entry(FALSE, TRUE); add_widget_to_table(table, w, _("_Text:"), TRUE, i++); d->text = w; legend_dialog_setup_sub(d, table, i++, TRUE); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); w = create_character_panel(d->text); gtk_box_pack_start(GTK_BOX(d->vbox), w, TRUE, TRUE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(legend_copy_clicked), d, "text"); d->prop_cb = LegendTextCB; gtk_widget_show_all(GTK_WIDGET(d->vbox)); } legend_dialog_setup_item(wi, d, d->Id); entry_completion_set_entry(NgraphApp.legend_text_list, d->text); d->focus = d->text; } void LegendTextDialog(struct LegendDialog *data, struct objlist *obj, int id) { data->SetupWindow = LegendTextDialogSetup; data->CloseWindow = legend_dialog_close; data->Obj = obj; data->Id = id; } static void LegendTextDefDialogSetup(GtkWidget *w, void *data, int makewidget) { struct LegendDialog *d; d = (struct LegendDialog *) data; if (makewidget) { GtkWidget *table, *frame; init_legend_dialog_widget_member(d); table = gtk_grid_new(); legend_dialog_setup_sub(d, table, 0, FALSE); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(d->vbox), frame, TRUE, TRUE, 0); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(legend_copy_clicked), d, "text"); d->prop_cb = LegendTextCB; gtk_widget_show_all(GTK_WIDGET(d->vbox)); } legend_dialog_setup_item(w, d, d->Id); } void LegendTextDefDialog(struct LegendDialog *data, struct objlist *obj, int id) { data->SetupWindow = LegendTextDefDialogSetup; data->CloseWindow = legend_dialog_close; data->Obj = obj; data->Id = id; } void CmLineDel(void *w, gpointer client_data) { legend_menu_delete_object("path", LegendLineCB); } void CmLineUpdate(void *w, gpointer client_data) { legend_menu_update_object("path", LegendLineCB, &DlgLegendArrow, LegendArrowDialog); } void CmRectDel(void *w, gpointer client_data) { legend_menu_delete_object("rectangle", LegendRectCB); } void CmRectUpdate(void *w, gpointer client_data) { legend_menu_update_object("rectangle", LegendRectCB, &DlgLegendRect, LegendRectDialog); } void CmArcDel(void *w, gpointer client_data) { legend_menu_delete_object("arc", LegendArcCB); } void CmArcUpdate(void *w, gpointer client_data) { legend_menu_update_object("arc", LegendArcCB, &DlgLegendArc, LegendArcDialog); } void CmMarkDel(void *w, gpointer client_data) { legend_menu_delete_object("mark", LegendMarkCB); } void CmMarkUpdate(void *w, gpointer client_data) { legend_menu_update_object("mark", LegendMarkCB, &DlgLegendMark, LegendMarkDialog); } void CmTextDel(void *w, gpointer client_data) { legend_menu_delete_object("text", LegendTextCB); } void CmTextUpdate(void *w, gpointer client_data) { legend_menu_update_object("text", LegendTextCB, &DlgLegendText, LegendTextDialog); } void CmOptionTextDef(void *w, gpointer client_data) { struct objlist *obj; int id; if (Menulock || Globallock) return; if ((obj = chkobject("text")) == NULL) return; id = newobj(obj); if (id >= 0) { char *objs[2]; int modified; modified = get_graph_modified(); LegendTextDefDialog(&DlgLegendTextDef, obj, id); if (DialogExecute(TopLevel, &DlgLegendTextDef) == IDOK) { if (CheckIniFile()) { exeobj(obj, "save_config", id, 0, NULL); } } delobj(obj, id); objs[0] = obj->name; objs[1] = NULL; UpdateAll2(objs, TRUE); if (! modified) { reset_graph_modified(); } } } static void LegendWinPathUpdate(struct obj_list_data *data, int id, int user_data) { LegendArrowDialog(&DlgLegendArrow, data->obj, id); } static void LegendWinRectUpdate(struct obj_list_data *data, int id, int user_data) { LegendRectDialog(&DlgLegendRect, data->obj, id); } static void LegendWinArcUpdate(struct obj_list_data *data, int id, int user_data) { LegendArcDialog(&DlgLegendArc, data->obj, id); } static void LegendWinMarkUpdate(struct obj_list_data *data, int id, int user_data) { LegendMarkDialog(&DlgLegendMark, data->obj, id); } static void LegendWinTextUpdate(struct obj_list_data *data, int id, int user_data) { LegendTextDialog(&DlgLegendText, data->obj, id); } static void ObjListUpdate(struct obj_list_data *d, int clear, int draw, list_sub_window_set_val_func func) { if (Menulock || Globallock) return; if (d->text == NULL) { return; } if (list_sub_window_must_rebuild(d)) { list_sub_window_build(d, func); } else { list_sub_window_set(d, func); } if (! clear && d->select >= 0) { list_store_select_int(GTK_WIDGET(d->text), COL_ID, d->select); } if (draw) { // NgraphApp.Viewer.allclear = TRUE; update_viewer(d); } } static void PathListUpdate(struct obj_list_data *d, int clear, int draw) { ObjListUpdate(d, clear, draw, path_list_set_val); } static void ArcListUpdate(struct obj_list_data *d, int clear, int draw) { ObjListUpdate(d, clear, draw, arc_list_set_val); } static void RectListUpdate(struct obj_list_data *d ,int clear, int draw) { ObjListUpdate(d, clear, draw, rect_list_set_val); } static void MarkListUpdate(struct obj_list_data *d, int clear, int draw) { ObjListUpdate(d, clear, draw, mark_list_set_val); } static void TextListUpdate(struct obj_list_data *d, int clear, int draw) { ObjListUpdate(d, clear, draw, text_list_set_val); } void LegendWinUpdate(char **objects, int clear, int draw) { struct objlist *obj; char **ptr; struct SubWin win[] = { NgraphApp.PathWin, NgraphApp.RectWin, NgraphApp.ArcWin, NgraphApp.MarkWin, NgraphApp.TextWin, }; int i, n; if (Menulock || Globallock) return; n = G_N_ELEMENTS(win); for (i = 0; i < n; i++) { struct obj_list_data *d; d = win[i].data.data; if (d == NULL) { return; } if (objects) { for (ptr = objects; *ptr; ptr++) { obj = getobject(*ptr); if (obj == d->obj) { d->update(d, clear, draw); break; } } } else { d->update(d, clear, draw); } } } static void get_points(struct objlist *obj, int id, int *x, int *y, int *n) { int *points, i; struct narray *array; getobj(obj, "points", id, 0, NULL, &array); points = arraydata(array); i = arraynum(array); *n = i / 2; if (i < 2) { *x = 0; *y = 0; } else { *x = points[0]; *y = points[1]; } } static GdkPixbuf * draw_color_pixbuf(struct objlist *obj, int id, enum OBJ_FIELD_COLOR_TYPE type, int width) { int ggc, fr, fg, fb, stroke, fill, close_path, height = 20, lockstate, found, output, n; cairo_surface_t *pix; GdkPixbuf *pixbuf; struct objlist *gobj, *robj; N_VALUE *inst; struct gra2cairo_local *local; struct narray *line_style; lockstate = Globallock; Globallock = TRUE; found = find_gra2gdk_inst(&gobj, &inst, &robj, &output, &local); if (! found) { return NULL; } pix = gra2gdk_create_pixmap(local, width, height, Menulocal.bg_r, Menulocal.bg_g, Menulocal.bg_b); if (pix == NULL) { return NULL; } ggc = _GRAopen("gra2gdk", "_output", robj, inst, output, -1, -1, -1, NULL, local); if (ggc < 0) { _GRAclose(ggc); g_object_unref(G_OBJECT(pix)); return NULL; } GRAview(ggc, 0, 0, width, height, 0); if (chkobjfieldtype(obj, "style") == NINT) { line_style = NULL; } else { getobj(obj, "style", id, 0, NULL, &line_style); } n = arraynum(line_style); if (n > 0) { int i, *style, *ptr; style = g_malloc(sizeof(*style) * n); if (style == NULL) { _GRAclose(ggc); g_object_unref(G_OBJECT(pix)); return NULL; } ptr = arraydata(line_style); for (i = 0; i < n; i++) { style[i] = ptr[i] / 30; } GRAlinestyle(ggc, n, style, 4, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); g_free(style); } else { GRAlinestyle(ggc, 0, NULL, 4, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); } if (type == OBJ_FIELD_COLOR_TYPE_STROKE) { getobj(obj, "fill", id, 0, NULL, &fill); if (fill) { getobj(obj, "fill_R", id, 0, NULL, &fr); getobj(obj, "fill_G", id, 0, NULL, &fg); getobj(obj, "fill_B", id, 0, NULL, &fb); GRAcolor(ggc, fr, fg, fb, 255); GRArectangle(ggc, 2, 2, width - 2, height - 2, 1); } getobj(obj, "stroke", id, 0, NULL, &stroke); if (stroke) { int pos[8]; if (chkobjfield(obj, "close_path") == 0) { getobj(obj, "close_path", id, 0, NULL, &close_path); } else { close_path = TRUE; } getobj(obj, "stroke_R", id, 0, NULL, &fr); getobj(obj, "stroke_G", id, 0, NULL, &fg); getobj(obj, "stroke_B", id, 0, NULL, &fb); GRAcolor(ggc, fr, fg, fb, 255); pos[0] = 2; pos[1] = height - 2; pos[2] = 2; pos[3] = 2; pos[4] = width - 2; pos[5] = 2; pos[6] = width - 2; pos[7] = height - 2; if (close_path) { GRAdrawpoly(ggc, 4, pos, GRA_FILL_MODE_NONE); } else { GRAlines(ggc, 4, pos); } } } else { getobj(obj, "R", id, 0, NULL, &fr); getobj(obj, "G", id, 0, NULL, &fg); getobj(obj, "B", id, 0, NULL, &fb); GRAcolor(ggc, fr, fg, fb, 255); GRArectangle(ggc, 0, 0, width, height, 1); } _GRAclose(ggc); gra2cairo_draw_path(local); pixbuf = gdk_pixbuf_get_from_surface(pix, 0, 0, width, height); cairo_surface_destroy(pix); Globallock = lockstate; return pixbuf; } static void path_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx, n, x0, y0, w, i, interpolation, type; char *valstr; GdkPixbuf *pixbuf; for (i = 0; i < d->list_col_num; i++) { switch (i) { case PATH_LIST_COL_HIDDEN: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_boolean(d->text, iter, i, cx); break; case PATH_LIST_COL_TYPE: getobj(d->obj, "type", row, 0, NULL, &type); getobj(d->obj, "interpolation", row, 0, NULL, &interpolation); if (type == 0) { char **enumlist; enumlist = (char **) chkobjarglist(d->obj, "type"); list_store_set_string(GTK_WIDGET(d->text), iter, i, _(enumlist[0])); } else { char **enumlist; enumlist = (char **) chkobjarglist(d->obj, "interpolation"); list_store_set_string(GTK_WIDGET(d->text), iter, i, _(enumlist[interpolation])); } break; case PATH_LIST_COL_MARKER_BEGIN: case PATH_LIST_COL_MARKER_END: sgetobjfield(d->obj, row, d->list[i].name, NULL, &valstr, FALSE, FALSE, FALSE); if (valstr) { list_store_set_string(GTK_WIDGET(d->text), iter, i, _(valstr)); g_free(valstr); } break; case PATH_LIST_COL_COLOR: pixbuf = draw_color_pixbuf(d->obj, row, OBJ_FIELD_COLOR_TYPE_STROKE, 40); if (pixbuf) { list_store_set_pixbuf(GTK_WIDGET(d->text), iter, i, pixbuf); g_object_unref(pixbuf); } break; case PATH_LIST_COL_X: get_points(d->obj, row, &x0, &y0, &n); list_store_set_double(d->text, iter, PATH_LIST_COL_X, x0 / 100.0); list_store_set_double(d->text, iter, PATH_LIST_COL_Y, y0 / 100.0); list_store_set_int(d->text, iter, PATH_LIST_COL_POINTS, n); break; case PATH_LIST_COL_Y: case PATH_LIST_COL_POINTS: break; case PATH_LIST_COL_WIDTH: getobj(d->obj, d->list[i].name, row, 0, NULL, &w); list_store_set_double(d->text, iter, i, w / 100.0); break; default: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); list_store_set_val(d->text, iter, i, d->list[i].type, &cx); } } } static void rect_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int x1, x2, y1, y2, v, i; GdkPixbuf *pixbuf; for (i = 0; i < d->list_col_num; i++) { switch (i) { case RECT_LIST_COL_HIDDEN: getobj(d->obj, d->list[i].name, row, 0, NULL, &v); v = ! v; list_store_set_boolean(d->text, iter, i, v); break; case RECT_LIST_COL_COLOR: pixbuf = draw_color_pixbuf(d->obj, row, OBJ_FIELD_COLOR_TYPE_STROKE, 40); if (pixbuf) { list_store_set_pixbuf(GTK_WIDGET(d->text), iter, i, pixbuf); g_object_unref(pixbuf); } break; case RECT_LIST_COL_X: getobj(d->obj, "x1", row, 0, NULL, &x1); getobj(d->obj, "x2", row, 0, NULL, &x2); v = (x1 < x2) ? x1 : x2; list_store_set_double(d->text, iter, i, v / 100.0); break; case RECT_LIST_COL_Y: getobj(d->obj, "y1", row, 0, NULL, &y1); getobj(d->obj, "y2", row, 0, NULL, &y2); v = (y1 < y2) ? y1 : y2; list_store_set_double(d->text, iter, i, v / 100.0); break; case RECT_LIST_COL_WIDTH: v = abs(x1 - x2); list_store_set_double(d->text, iter, i, v / 100.0); break; case RECT_LIST_COL_HEIGHT: v = abs(y1 - y2); list_store_set_double(d->text, iter, i, v / 100.0); break; case RECT_LIST_COL_LWIDTH: getobj(d->obj, d->list[i].name, row, 0, NULL, &v); list_store_set_double(d->text, iter, i, v / 100.0); break; default: getobj(d->obj, d->list[i].name, row, 0, NULL, &v); list_store_set_val(d->text, iter, i, d->list[i].type, &v); } } } static void arc_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx, w, i; GdkPixbuf *pixbuf; for (i = 0; i < d->list_col_num; i++) { switch (i) { case ARC_LIST_COL_HIDDEN: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_boolean(d->text, iter, i, cx); break; case ARC_LIST_COL_PIESLICE: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); list_store_set_boolean(d->text, iter, i, cx); break; case ARC_LIST_COL_COLOR: pixbuf = draw_color_pixbuf(d->obj, row, OBJ_FIELD_COLOR_TYPE_STROKE, 40); if (pixbuf) { list_store_set_pixbuf(GTK_WIDGET(d->text), iter, i, pixbuf); g_object_unref(pixbuf); } break; case ARC_LIST_COL_Y: case ARC_LIST_COL_X: case ARC_LIST_COL_RY: case ARC_LIST_COL_RX: case ARC_LIST_COL_ANGLE1: case ARC_LIST_COL_ANGLE2: case ARC_LIST_COL_WIDTH: getobj(d->obj, d->list[i].name, row, 0, NULL, &w); list_store_set_double(d->text, iter, i, w / 100.0); break; default: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); list_store_set_val(d->text, iter, i, d->list[i].type, &cx); } } } static GdkPixbuf * draw_mark_pixbuf(struct objlist *obj, int i) { int ggc, fr, fg, fb, fr2, fg2, fb2, width = 20, height = 20, marktype, lockstate, found, output; cairo_surface_t *pix; GdkPixbuf *pixbuf; struct objlist *gobj, *robj; N_VALUE *inst; struct gra2cairo_local *local; lockstate = Globallock; Globallock = TRUE; found = find_gra2gdk_inst(&gobj, &inst, &robj, &output, &local); if (! found) { return NULL; } pix = gra2gdk_create_pixmap(local, width, height, Menulocal.bg_r, Menulocal.bg_g, Menulocal.bg_b); if (pix == NULL) { return NULL; } getobj(obj, "R", i, 0, NULL, &fr); getobj(obj, "G", i, 0, NULL, &fg); getobj(obj, "B", i, 0, NULL, &fb); getobj(obj, "R2", i, 0, NULL, &fr2); getobj(obj, "G2", i, 0, NULL, &fg2); getobj(obj, "B2", i, 0, NULL, &fb2); ggc = _GRAopen("gra2gdk", "_output", robj, inst, output, -1, -1, -1, NULL, local); if (ggc < 0) { _GRAclose(ggc); g_object_unref(G_OBJECT(pix)); return NULL; } GRAview(ggc, 0, 0, width, height, 0); GRAcolor(ggc, fr, fg, fb, 255); GRAlinestyle(ggc, 0, NULL, 1, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); getobj(obj, "type", i, 0, NULL, &marktype); GRAmark(ggc, marktype, height / 2, height / 2, height - 2, fr, fg, fb, 255, fr2, fg2, fb2, 255); _GRAclose(ggc); gra2cairo_draw_path(local); pixbuf = gdk_pixbuf_get_from_surface(pix, 0, 0, width, height); cairo_surface_destroy(pix); Globallock = lockstate; return pixbuf; } static void mark_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx, w, i; GdkPixbuf *pixbuf = NULL; for (i = 0; i < d->list_col_num; i++) { switch (i) { case MARK_LIST_COL_HIDDEN: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_boolean(d->text, iter, i, cx); break; case MARK_LIST_COL_MARK: pixbuf = draw_mark_pixbuf(d->obj, row); if (pixbuf) { list_store_set_pixbuf(GTK_WIDGET(d->text), iter, i, pixbuf); g_object_unref(pixbuf); } break; case MARK_LIST_COL_X: case MARK_LIST_COL_Y: case MARK_LIST_COL_WIDTH: case MARK_LIST_COL_SIZE: getobj(d->obj, d->list[i].name, row, 0, NULL, &w); list_store_set_double(d->text, iter, i, w / 100.0); break; default: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); list_store_set_val(d->text, iter, i, d->list[i].type, &cx); } } } static void text_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx, w, i, style, r, g ,b; char *str, buf[64]; #ifdef TEXT_LIST_USE_FONT_FAMILY struct fontmap *fmap; #endif for (i = 0; i < d->list_col_num; i++) { switch (i) { case TEXT_LIST_COL_HIDDEN: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_boolean(d->text, iter, i, cx); break; case TEXT_LIST_COL_RAW: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); list_store_set_boolean(d->text, iter, i, cx); break; case TEXT_LIST_COL_TEXT: getobj(d->obj, d->list[i].name, row, 0, NULL, &str); list_store_set_string(d->text, iter, i, str); break; case TEXT_LIST_COL_FONT: getobj(d->obj, d->list[i].name, row, 0, NULL, &str); list_store_set_string(d->text, iter, i, str); #ifdef TEXT_LIST_USE_FONT_FAMILY if (str == NULL) { break; } fmap = gra2cairo_get_fontmap(str); if (fmap == NULL || fmap->fontname == NULL) { break; } list_store_set_string(d->text, iter, TEXT_LIST_COL_FONT_FAMILY, fmap->fontname); #endif break; case TEXT_LIST_COL_STYLE: getobj(d->obj, "style", row, 0, NULL, &style); list_store_set_int(d->text, iter, i, (style & GRA_FONT_STYLE_ITALIC) ? PANGO_STYLE_ITALIC : 0); list_store_set_int(d->text, iter, TEXT_LIST_COL_WEIGHT, (style & GRA_FONT_STYLE_BOLD) ? PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL); break; case TEXT_LIST_COL_COLOR: getobj(d->obj, "R", row, 0, NULL, &r); getobj(d->obj, "G", row, 0, NULL, &g); getobj(d->obj, "B", row, 0, NULL, &b); snprintf(buf, sizeof(buf), "#%02x%02x%02x", r & 0xff, g & 0xff, b & 0xff); list_store_set_string(d->text, iter, i, buf); break; case TEXT_LIST_COL_BGCOLOR: snprintf(buf, sizeof(buf), "#%02x%02x%02x", ((int) (Menulocal.bg_r * 255)) & 0xff, ((int) (Menulocal.bg_g * 255)) & 0xff, ((int) (Menulocal.bg_b * 255)) & 0xff); list_store_set_string(d->text, iter, i, buf); break; case TEXT_LIST_COL_X: case TEXT_LIST_COL_Y: case TEXT_LIST_COL_DIR: case TEXT_LIST_COL_PT: getobj(d->obj, d->list[i].name, row, 0, NULL, &w); list_store_set_double(d->text, iter, i, w / 100.0); break; case TEXT_LIST_COL_WEIGHT: #ifdef TEXT_LIST_USE_FONT_FAMILY case TEXT_LIST_COL_FONT_FAMILY: #endif break; default: getobj(d->obj, d->list[i].name, row, 0, NULL, &cx); list_store_set_val(d->text, iter, i, d->list[i].type, &cx); } } } static void popup_show_cb(GtkWidget *widget, gpointer user_data) { unsigned int i; int m, last_id; struct obj_list_data *d; d = (struct obj_list_data *) user_data; if (d->text == NULL) { return; } m = list_store_get_selected_int(d->text, COL_ID); for (i = 0; i < POPUP_ITEM_NUM; i++) { switch (i) { case POPUP_ITEM_FOCUS_ALL: last_id = chkobjlastinst(d->obj); gtk_widget_set_sensitive(d->popup_item[i], last_id >= 0); break; case POPUP_ITEM_TOP: case POPUP_ITEM_UP: gtk_widget_set_sensitive(d->popup_item[i], m > 0); break; case POPUP_ITEM_DOWN: case POPUP_ITEM_BOTTOM: last_id = -1; if (m >= 0) { last_id = chkobjlastinst(d->obj); } gtk_widget_set_sensitive(d->popup_item[i], m >= 0 && m < last_id); break; default: gtk_widget_set_sensitive(d->popup_item[i], m >= 0); } } } enum CHANGE_DIR { CHANGE_DIR_X, CHANGE_DIR_Y, }; static void pos_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data, enum CHANGE_DIR dir) { struct obj_list_data *d; int col, inc, ecode, m; double prev, val; GtkTreeModel *model; GtkTreeIter iter; int x, y, i; char *argv[3], *tmp, *ptr; menu_lock(FALSE); if (str == NULL || path == NULL) return; ecode = str_calc(str, &val, NULL, NULL); if (ecode || val != val || val == HUGE_VAL || val == - HUGE_VAL) { return; } d = (struct obj_list_data *) user_data; if (d->text == NULL) { return; } col = -1; for (i = 0; i < d->list_col_num; i++) { if (dir == CHANGE_DIR_X && strcmp(d->list[i].title, "x") == 0) { col = i; break; } else if (dir == CHANGE_DIR_Y && strcmp(d->list[i].title, "y") == 0) { col = i; break; } } if (col < 0) { return; } model = gtk_tree_view_get_model(GTK_TREE_VIEW(d->text)); if (! gtk_tree_model_get_iter_from_string(model, &iter, path)) { return; } gtk_tree_model_get(model, &iter, col, &tmp, COL_ID, &m, -1); if (tmp == NULL) { return; } prev = strtod(tmp, &ptr); if (prev != prev || prev == HUGE_VAL || prev == - HUGE_VAL || ptr[0] != '\0') { g_free(tmp); return; } g_free(tmp); inc = nround((val - prev) * 100); switch (dir) { case CHANGE_DIR_X: x = inc; y = 0; break; case CHANGE_DIR_Y: x = 0; y = inc; break; } argv[0] = (char *) &x; argv[1] = (char *) &y; argv[2] = NULL; if (inc != 0 ) { menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); exeobj(d->obj, "move", m, 2, argv); set_graph_modified(); d->update(d, TRUE, TRUE); } return; } static void rect_size_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data, char *pos1, char *pos2) { struct obj_list_data *d; GtkTreeIter iter; int id, ecode; double val; int x1, x2, v, num; menu_lock(FALSE); if (str == NULL || path == NULL) return; ecode = str_calc(str, &val, NULL, NULL); if (ecode || val != val || val == HUGE_VAL || val == - HUGE_VAL) { return; } d = (struct obj_list_data *) user_data; id = tree_view_get_selected_row_int_from_path(d->text, path, &iter, COL_ID); num = chkobjlastinst(d->obj); if (id < 0 || id > num) { return; } getobj(d->obj, pos1, id, 0, NULL, &x1); getobj(d->obj, pos2, id, 0, NULL, &x2); if (x1 > x2) { v = x1; x1 = x2; x2 = v; } v = nround(val * 100); if (v != x2 - x1) { menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); x2 = x1 + v; putobj(d->obj, pos1, id, &x1); putobj(d->obj, pos2, id, &x2); set_graph_modified(); d->update(d, TRUE, TRUE); } return; } static void rect_width_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { rect_size_edited(cell_renderer, path, str, user_data, "x1", "x2"); } static void rect_height_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { rect_size_edited(cell_renderer, path, str, user_data, "y1", "y2"); } static void pos_x_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { pos_edited(cell_renderer, path, str, user_data, CHANGE_DIR_X); } static void pos_y_edited(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data) { pos_edited(cell_renderer, path, str, user_data, CHANGE_DIR_Y); } enum LEGEND_COMBO_ITEM { LEGEND_COMBO_ITEM_COLOR_0, LEGEND_COMBO_ITEM_COLOR_1, LEGEND_COMBO_ITEM_COLOR_2, LEGEND_COMBO_ITEM_COLOR_STROKE, LEGEND_COMBO_ITEM_COLOR_FILL, LEGEND_COMBO_ITEM_MARK, LEGEND_COMBO_ITEM_TOGGLE_STROKE, LEGEND_COMBO_ITEM_TOGGLE_FILL, LEGEND_COMBO_ITEM_CLOSE_PATH, LEGEND_COMBO_ITEM_STYLE, LEGEND_COMBO_ITEM_FONT, LEGEND_COMBO_ITEM_STYLE_BOLD, LEGEND_COMBO_ITEM_STYLE_ITALIC, LEGEND_COMBO_ITEM_FILL_RULE, LEGEND_COMBO_ITEM_JOIN, LEGEND_COMBO_ITEM_NONE, }; static void create_mark_color_combo_box(GtkWidget *cbox, struct objlist *obj, int id) { int count; GtkTreeStore *list; GtkTreeIter iter; count = combo_box_get_num(cbox); if (count > 0) return; list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); add_text_combo_item_to_cbox(list, &iter, NULL, -1, -1, _("Mark"), TOGGLE_NONE, FALSE); add_mark_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_MARK, obj, "type", id); add_line_style_item_to_cbox(list, NULL, LEGEND_COMBO_ITEM_STYLE, obj, "style", id); add_text_combo_item_to_cbox(list, NULL, NULL, LEGEND_COMBO_ITEM_COLOR_1, -1, _("Color 1"), TOGGLE_NONE, FALSE); add_text_combo_item_to_cbox(list, NULL, NULL, LEGEND_COMBO_ITEM_COLOR_2, -1, _("Color 2"), TOGGLE_NONE, FALSE); } static void create_color_combo_box(GtkWidget *cbox, struct objlist *obj, int id) { int count; GtkTreeStore *list; GtkTreeIter iter, parent; count = combo_box_get_num(cbox); if (count > 0) return; list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); add_text_combo_item_to_cbox(list, &iter, NULL, -1, -1, _("Stroke"), TOGGLE_NONE, FALSE); add_bool_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_TOGGLE_STROKE, obj, "stroke", id, _("Stroke")); add_line_style_item_to_cbox(list, &iter, LEGEND_COMBO_ITEM_STYLE, obj, "style", id); if (chkobjfield(obj, "join") == 0) { add_text_combo_item_to_cbox(list, &parent, &iter, -1, -1, _("Join"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &parent, LEGEND_COMBO_ITEM_JOIN, obj, "join", id); } add_text_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_COLOR_STROKE, -1, _("Color"), TOGGLE_NONE, FALSE); if (chkobjfield(obj, "close_path") == 0) { add_bool_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_CLOSE_PATH, obj, "close_path", id, _("Close path")); } add_text_combo_item_to_cbox(list, &iter, NULL, -1, -1, _("Fill"), TOGGLE_NONE, FALSE); add_bool_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_TOGGLE_FILL, obj, "fill", id, _("Fill")); if (chkobjfield(obj, "fill_rule") == 0) { add_text_combo_item_to_cbox(list, &parent, &iter, -1, -1, _("Fill rule"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &parent, LEGEND_COMBO_ITEM_FILL_RULE, obj, "fill_rule", id); } add_text_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_COLOR_FILL, -1, _("Color"), TOGGLE_NONE, FALSE); } static int set_bool_field(struct objlist *obj, char *field, int id, int state) { int active; if (chkobjfield(obj, field)) { return 0; } getobj(obj, field, id, 0, NULL, &active); if (active == state) { return 0; } menu_save_undo_single(UNDO_TYPE_EDIT, obj->name); putobj(obj, field, id, &state); return 1; } static int set_stroke(struct objlist *obj, int id, int stroke) { return set_bool_field(obj, "stroke", id, stroke); } static int set_fill(struct objlist *obj, int id, int fill) { return set_bool_field(obj, "fill", id, fill); } static void select_type(GtkComboBox *w, gpointer user_data) { int sel, col_type, mark_type, enum_id, found, active, modified, fill_rule, join, r; struct obj_list_data *d; GtkTreeStore *list; GtkTreeIter iter; menu_lock(FALSE); d = (struct obj_list_data *) user_data; gtk_widget_grab_focus(d->text); sel = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); if (sel < 0) { return; } list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(w))); found = gtk_combo_box_get_active_iter(w, &iter); if (! found) { return; } gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_INT, &col_type, OBJECT_COLUMN_TYPE_ENUM, &enum_id, -1); switch (col_type) { case LEGEND_COMBO_ITEM_COLOR_1: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_1)) { return; } break; case LEGEND_COMBO_ITEM_COLOR_2: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_2)) { return; } break; case LEGEND_COMBO_ITEM_MARK: getobj(d->obj, "type", sel, 0, NULL, &mark_type); if (enum_id == mark_type) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "type", sel, &enum_id); break; case LEGEND_COMBO_ITEM_STYLE: modified = set_stroke(d->obj, sel, TRUE); if (enum_id < 0 || enum_id >= FwNumStyleNum) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); if (chk_sputobjfield(d->obj, sel, "style", FwLineStyle[enum_id].list) != 0 && ! modified) { return; } if (! modified && ! get_graph_modified()) { return; } break; case LEGEND_COMBO_ITEM_COLOR_STROKE: r = select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_STROKE); switch (r) { case SELECT_OBJ_COLOR_DIFFERENT: set_stroke(d->obj, sel, TRUE); break; case SELECT_OBJ_COLOR_SAME: if (! set_stroke(d->obj, sel, TRUE)) { return; } break; case SELECT_OBJ_COLOR_ERROR: case SELECT_OBJ_COLOR_CANCEL: return; } break; case LEGEND_COMBO_ITEM_COLOR_FILL: r = select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_FILL); switch (r) { case SELECT_OBJ_COLOR_DIFFERENT: set_fill(d->obj, sel, TRUE); break; case SELECT_OBJ_COLOR_SAME: if (! set_fill(d->obj, sel, TRUE)) { return; } break; case SELECT_OBJ_COLOR_ERROR: case SELECT_OBJ_COLOR_CANCEL: return; } break; case LEGEND_COMBO_ITEM_TOGGLE_STROKE: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); set_stroke(d->obj, sel, ! active); break; case LEGEND_COMBO_ITEM_TOGGLE_FILL: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); set_fill(d->obj, sel, ! active); break; case LEGEND_COMBO_ITEM_FILL_RULE: modified = set_fill(d->obj, sel, TRUE); getobj(d->obj, "fill_rule", sel, 0, NULL, &fill_rule); if (fill_rule == enum_id && ! modified) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); fill_rule = enum_id; putobj(d->obj, "fill_rule", sel, &fill_rule); break; case LEGEND_COMBO_ITEM_JOIN: getobj(d->obj, "join", sel, 0, NULL, &join); if (join == enum_id) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "join", sel, &enum_id); break; case LEGEND_COMBO_ITEM_CLOSE_PATH: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); active = ! active; putobj(d->obj, "close_path", sel, &active); set_stroke(d->obj, sel, TRUE); break; default: return; } d->select = sel; d->update(d, FALSE, TRUE); set_graph_modified(); } static int start_editing_common(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path_str, gpointer user_data) { GtkTreeIter iter; struct obj_list_data *d; int sel; menu_lock(TRUE); d = (struct obj_list_data *) user_data; sel = tree_view_get_selected_row_int_from_path(d->text, path_str, &iter, MARK_LIST_COL_ID); if (sel < 0) { menu_lock(FALSE); return -1; } g_object_set_data(G_OBJECT(editable), "user-data", GINT_TO_POINTER(sel)); return sel; } static void start_editing_mark(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path_str, gpointer user_data) { struct obj_list_data *d; int sel; d = (struct obj_list_data *) user_data; sel = start_editing_common(renderer, editable, path_str, user_data); if (sel < 0) { return; } create_mark_color_combo_box(GTK_WIDGET(editable), d->obj, sel); gtk_widget_show(GTK_WIDGET(editable)); g_signal_connect(editable, "editing-done", G_CALLBACK(select_type), user_data); return; } static void start_editing_color(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path_str, gpointer user_data) { struct obj_list_data *d; int sel; d = (struct obj_list_data *) user_data; sel = start_editing_common(renderer, editable, path_str, user_data); if (sel < 0) { return; } create_color_combo_box(GTK_WIDGET(editable), d->obj, sel); gtk_widget_show(GTK_WIDGET(editable)); g_signal_connect(editable, "editing-done", G_CALLBACK(select_type), user_data); return; } enum LEGEND_PATH_LINE_TYPE { LEGEND_PATH_LINE_TYPE_LINE, LEGEND_PATH_LINE_TYPE_CURVE, }; static void select_line_type(GtkComboBox *w, gpointer user_data) { struct obj_list_data *d; int sel, type, interpolation, enum_id, col_type, found; GtkTreeIter iter; GtkTreeStore *list; d = (struct obj_list_data *) user_data; sel = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); if (sel < 0) { return; } list = GTK_TREE_STORE(gtk_combo_box_get_model(w)); found = gtk_combo_box_get_active_iter(w, &iter); if (! found) { return; } gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_INT, &col_type, OBJECT_COLUMN_TYPE_ENUM, &enum_id, -1); getobj(d->obj, "type", sel, 0, NULL, &type); getobj(d->obj, "interpolation", sel, 0, NULL, &interpolation); switch (col_type) { case LEGEND_PATH_LINE_TYPE_LINE: if (type == PATH_TYPE_LINE) { return; } break; case LEGEND_PATH_LINE_TYPE_CURVE: if (type == PATH_TYPE_CURVE && enum_id == interpolation) { return; } break; default: return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "type", sel, &col_type); if (enum_id >= 0) { putobj(d->obj, "interpolation", sel, &enum_id); } d->select = sel; d->update(d, FALSE, TRUE); set_graph_modified(); } static void start_editing_line_type(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path_str, gpointer user_data) { struct obj_list_data *d; int sel, type; char **enumlist; GtkTreeStore *list; GtkTreeIter iter; d = (struct obj_list_data *) user_data; sel = start_editing_common(renderer, editable, path_str, user_data); if (sel < 0) { return; } g_object_set_data(G_OBJECT(editable), "user-data", GINT_TO_POINTER(sel)); init_object_combo_box(GTK_WIDGET(editable)); list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(editable))); gtk_tree_store_clear(list); getobj(d->obj, "type", sel, 0, NULL, &type); enumlist = (char **) chkobjarglist(d->obj, "type"); add_text_combo_item_to_cbox(list, &iter, NULL, LEGEND_PATH_LINE_TYPE_LINE, -1, _(enumlist[0]), TOGGLE_RADIO, type == PATH_TYPE_LINE); if (type == PATH_TYPE_LINE) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(editable), &iter); } add_text_combo_item_to_cbox(list, &iter, NULL, LEGEND_PATH_LINE_TYPE_CURVE, -1, _(enumlist[1]), TOGGLE_RADIO, type == PATH_TYPE_CURVE); if (type == PATH_TYPE_CURVE) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(editable), &iter); } add_enum_combo_item_to_cbox(list, NULL, &iter, LEGEND_PATH_LINE_TYPE_CURVE, d->obj, "interpolation", sel); gtk_widget_show(GTK_WIDGET(editable)); g_signal_connect(editable, "editing-done", G_CALLBACK(select_line_type), user_data); return; } static void select_font(GtkComboBox *w, gpointer user_data) { int sel, col_type, found, active, style; struct obj_list_data *d; GtkTreeStore *list; GtkTreeIter iter; char *font, *ptr; N_VALUE *inst; menu_lock(FALSE); d = (struct obj_list_data *) user_data; sel = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); if (sel < 0) { return; } list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(w))); found = gtk_combo_box_get_active_iter(w, &iter); if (! found) { return; } gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_INT, &col_type, -1); switch (col_type) { case LEGEND_COMBO_ITEM_FONT: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_STRING, &font, -1); getobj(d->obj, "font", sel, 0, NULL, &ptr); if (g_strcmp0(font, ptr) == 0) { g_free(font); return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "font", sel, font); break; case LEGEND_COMBO_ITEM_COLOR_0: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_0)) { return; } break; case LEGEND_COMBO_ITEM_STYLE_BOLD: menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); inst = chkobjinst(d->obj, sel); style = get_font_style(d->obj, inst, "style", "font"); style = (style & GRA_FONT_STYLE_ITALIC) | (active ? 0 : GRA_FONT_STYLE_BOLD); putobj(d->obj, "style", sel, &style); break; case LEGEND_COMBO_ITEM_STYLE_ITALIC: menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); inst = chkobjinst(d->obj, sel); style = get_font_style(d->obj, inst, "style", "font"); style = (style & GRA_FONT_STYLE_BOLD) | (active ? 0 : GRA_FONT_STYLE_ITALIC); putobj(d->obj, "style", sel, &style); break; default: return; } d->select = sel; d->update(d, FALSE, TRUE); set_graph_modified(); } static void start_editing_font(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path, gpointer user_data) { GtkTreeIter iter; GtkTreeStore *list; struct obj_list_data *d; int sel; menu_lock(TRUE); d = (struct obj_list_data *) user_data; sel = start_editing_common(renderer, editable, path, user_data); if (sel < 0) { return; } g_object_set_data(G_OBJECT(editable), "user-data", GINT_TO_POINTER(sel)); init_object_combo_box(GTK_WIDGET(editable)); list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(editable))); gtk_tree_store_clear(list); add_text_combo_item_to_cbox(list, &iter, NULL, -1, -1, _("Font"), TOGGLE_NONE, FALSE); add_font_combo_item_to_cbox(list, NULL, &iter, LEGEND_COMBO_ITEM_FONT, d->obj, "font", sel); add_text_combo_item_to_cbox(list, NULL, NULL, LEGEND_COMBO_ITEM_COLOR_0, -1, _("Color"), TOGGLE_NONE, FALSE); add_font_style_combo_item_to_cbox(list, NULL, NULL, LEGEND_COMBO_ITEM_STYLE_BOLD, LEGEND_COMBO_ITEM_STYLE_ITALIC, d->obj, "style", sel); g_signal_connect(editable, "editing-done", G_CALLBACK(select_font), user_data); } static void select_text(GtkWidget *w, gpointer user_data) { gboolean canceled; g_object_get(w, "editing-canceled", &canceled, NULL); if (! canceled) { entry_completion_append(NgraphApp.legend_text_list, gtk_entry_get_text(GTK_ENTRY(w))); } gtk_entry_set_completion(GTK_ENTRY(w), NULL); } static void start_editing_text(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path_str, gpointer user_data) { if (GTK_IS_ENTRY(editable)) { entry_completion_set_entry(NgraphApp.legend_text_list, GTK_WIDGET(editable)); g_object_set_data(G_OBJECT(editable), "user-data", renderer); g_signal_connect(editable, "editing-done", G_CALLBACK(select_text), user_data); } return; } GtkWidget * create_path_list(struct SubWin *d) { struct obj_list_data *data; list_sub_window_create(d, PATH_LIST_COL_NUM, Plist); data = d->data.data; data->update = PathListUpdate; data->dialog = &DlgLegendArrow; data->setup_dialog = LegendWinPathUpdate; data->ev_key = NULL; data->obj = chkobject("path"); sub_win_create_popup_menu(data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_combo_cell_renderer_cb(data, PATH_LIST_COL_TYPE, Plist, G_CALLBACK(start_editing_line_type), NULL); set_editable_cell_renderer_cb(data, PATH_LIST_COL_X, Plist, G_CALLBACK(pos_x_edited)); set_editable_cell_renderer_cb(data, PATH_LIST_COL_Y, Plist, G_CALLBACK(pos_y_edited)); set_obj_cell_renderer_cb(data, PATH_LIST_COL_COLOR, Plist, G_CALLBACK(start_editing_color)); return d->Win; } GtkWidget * create_rect_list(struct SubWin *d) { struct obj_list_data *data; list_sub_window_create(d, RECT_LIST_COL_NUM, Rlist); data = d->data.data; data->update = RectListUpdate; data->dialog = &DlgLegendRect; data->setup_dialog = LegendWinRectUpdate; data->ev_key = NULL; data->obj = chkobject("rectangle"); sub_win_create_popup_menu(data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_editable_cell_renderer_cb(data, RECT_LIST_COL_X, Rlist, G_CALLBACK(pos_x_edited)); set_editable_cell_renderer_cb(data, RECT_LIST_COL_Y, Rlist, G_CALLBACK(pos_y_edited)); set_editable_cell_renderer_cb(data, RECT_LIST_COL_WIDTH, Rlist, G_CALLBACK(rect_width_edited)); set_editable_cell_renderer_cb(data, RECT_LIST_COL_HEIGHT, Rlist, G_CALLBACK(rect_height_edited)); set_obj_cell_renderer_cb(data, RECT_LIST_COL_COLOR, Rlist, G_CALLBACK(start_editing_color)); return d->Win; } GtkWidget * create_arc_list(struct SubWin *d) { struct obj_list_data *data; list_sub_window_create(d, ARC_LIST_COL_NUM, Alist); data = d->data.data; data->update = ArcListUpdate; data->dialog = &DlgLegendArc; data->setup_dialog = LegendWinArcUpdate; data->ev_key = NULL; data->obj = chkobject("arc"); sub_win_create_popup_menu(data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_obj_cell_renderer_cb(data, ARC_LIST_COL_COLOR, Alist, G_CALLBACK(start_editing_color)); return d->Win; } GtkWidget * create_mark_list(struct SubWin *d) { struct obj_list_data *data; list_sub_window_create(d, MARK_LIST_COL_NUM, Mlist); data = d->data.data; data->update = MarkListUpdate; data->dialog = &DlgLegendMark; data->setup_dialog = LegendWinMarkUpdate; data->ev_key = NULL; data->obj = chkobject("mark"); sub_win_create_popup_menu(data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_obj_cell_renderer_cb(data, MARK_LIST_COL_MARK, Mlist, G_CALLBACK(start_editing_mark)); return d->Win; } GtkWidget * create_text_list(struct SubWin *d) { struct obj_list_data *data; int n; GList *list; GtkTreeViewColumn *col; int noexpand_text_colmns[] = {TEXT_LIST_COL_X, TEXT_LIST_COL_Y, TEXT_LIST_COL_PT, TEXT_LIST_COL_DIR}; list_sub_window_create(d, TEXT_LIST_COL_NUM, Tlist); data = d->data.data; data->update = TextListUpdate; data->dialog = &DlgLegendText; data->setup_dialog = LegendWinTextUpdate; data->ev_key = NULL; data->obj = chkobject("text"); sub_win_create_popup_menu(data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_combo_cell_renderer_cb(data, TEXT_LIST_COL_FONT, Tlist, G_CALLBACK(start_editing_font), NULL); col = gtk_tree_view_get_column(GTK_TREE_VIEW(data->text), TEXT_LIST_COL_TEXT); list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(col)); if (list == NULL) { return NULL; } if (list->data) { GtkCellRenderer *renderer; renderer = list->data; gtk_tree_view_column_add_attribute(col, renderer, "style", TEXT_LIST_COL_STYLE); gtk_tree_view_column_add_attribute(col, renderer, "weight", TEXT_LIST_COL_WEIGHT); #ifdef TEXT_LIST_USE_FONT_FAMILY gtk_tree_view_column_add_attribute(col, renderer, "family", TEXT_LIST_COL_FONT_FAMILY); #endif gtk_tree_view_column_add_attribute(col, renderer, "foreground", TEXT_LIST_COL_COLOR); gtk_tree_view_column_add_attribute(col, renderer, "background", TEXT_LIST_COL_BGCOLOR); g_signal_connect_after(renderer, "editing-started", G_CALLBACK(start_editing_text), data); } g_list_free(list); n = sizeof(noexpand_text_colmns) / sizeof(*noexpand_text_colmns); tree_view_set_no_expand_column(data->text, noexpand_text_colmns, n); tree_view_set_tooltip_column(GTK_TREE_VIEW(data->text), TEXT_LIST_COL_TEXT); return d->Win; } ngraph-gtk-6.09.05/src/gtk/ogra2cairo.c0000644000175000017500000010711214126221134014424 00000000000000/* * $Id: ogra2cairo.c,v 1.58 2010-03-04 08:30:17 hito Exp $ */ #include "gtk_common.h" #include #include #include #include #include #include #include #include "mathfn.h" #include "object.h" #include "gra.h" #include "init.h" #include "nstring.h" #include "object.h" #include "ioutil.h" #include "nconfig.h" #include "strconv.h" #include "x11gui.h" #include "ogra2cairo.h" #define NAME "gra2cairo" #define PARENT "gra2" #define OVERSION "1.00.00" #define CAIROCONF "[gra2cairo]" #define DEFAULT_FONT "Sans-serif" #ifndef M_PI #define M_PI 3.141592 #endif char **Gra2CairoErrMsgs = NULL; int Gra2CairoErrMsgNum = 0; int OldConfigExist = FALSE; /* for backward compatibility */ char *gra2cairo_antialias_type[] = { N_("none"), N_("default"), N_("gray"), // N_("subpixel"), NULL, }; struct gra2cairo_config *Gra2cairoConf = NULL; static int Instance = 0; static NHASH CompatibleFontHash = NULL; static struct compatible_font_info CompatibleFont[] = { {"Times", GRA_FONT_STYLE_NORMAL, FALSE, "Serif"}, {"TimesBold", GRA_FONT_STYLE_BOLD, FALSE, "Serif"}, {"TimesItalic", GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"TimesBoldItalic", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"Helvetica", GRA_FONT_STYLE_NORMAL, FALSE, "Sans-serif"}, {"HelveticaBold", GRA_FONT_STYLE_BOLD, FALSE, "Sans-serif"}, {"HelveticaOblique", GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"HelveticaItalic", GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"HelveticaBoldOblique", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"HelveticaBoldItalic", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"Courier", GRA_FONT_STYLE_NORMAL, FALSE, "Monospace"}, {"CourierBold", GRA_FONT_STYLE_BOLD, FALSE, "Monospace"}, {"CourierOblique", GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"CourierItalic", GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"CourierBoldOblique", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"CourierBoldItalic", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"Symbol", GRA_FONT_STYLE_NORMAL, TRUE, "Serif"}, {"SymbolBold", GRA_FONT_STYLE_BOLD, TRUE, "Serif"}, {"SymbolItalic", GRA_FONT_STYLE_ITALIC, TRUE, "Serif"}, {"SymbolBoldItalic", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, TRUE, "Serif"}, {"Mincho", GRA_FONT_STYLE_NORMAL, FALSE, "Serif"}, {"MinchoBold", GRA_FONT_STYLE_BOLD, FALSE, "Serif"}, {"MinchoItalic", GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"MinchoBoldItalic", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"Gothic", GRA_FONT_STYLE_NORMAL, FALSE, "Sans-serif"}, {"GothicBold", GRA_FONT_STYLE_BOLD, FALSE, "Sans-serif"}, {"GothicItalic", GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"GothicBoldItalic", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"Tim", GRA_FONT_STYLE_NORMAL, FALSE, "Serif"}, {"TimB", GRA_FONT_STYLE_BOLD, FALSE, "Serif"}, {"TimI", GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"TimBI", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"Helv", GRA_FONT_STYLE_NORMAL, FALSE, "Sans-serif"}, {"HelvB", GRA_FONT_STYLE_BOLD, FALSE, "Sans-serif"}, {"HelvO", GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"HelvI", GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"HelvBO", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"HelvBI", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"Cour", GRA_FONT_STYLE_NORMAL, FALSE, "Monospace"}, {"CourB", GRA_FONT_STYLE_BOLD, FALSE, "Monospace"}, {"CourO", GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"CourI", GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"CourBO", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"CourBI", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Monospace"}, {"Sym", GRA_FONT_STYLE_NORMAL, TRUE, "Serif"}, {"SymB", GRA_FONT_STYLE_BOLD, TRUE, "Serif"}, {"SymI", GRA_FONT_STYLE_ITALIC, TRUE, "Serif"}, {"SymBI", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, TRUE, "Serif"}, {"Min", GRA_FONT_STYLE_NORMAL, FALSE, "Serif"}, {"MinB", GRA_FONT_STYLE_BOLD, FALSE, "Serif"}, {"MinI", GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"MinBI", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Serif"}, {"Goth", GRA_FONT_STYLE_NORMAL, FALSE, "Sans-serif"}, {"GothB", GRA_FONT_STYLE_BOLD, FALSE, "Sans-serif"}, {"GothI", GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, {"GothBI", GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC, FALSE, "Sans-serif"}, }; #define FONT_FACE_NUM ((int) (sizeof(FontFaceStr) / sizeof(*FontFaceStr))) static int mxp2dw(struct gra2cairo_local *local, int r) { return ceil(r / local->pixel_dot_x); } static double mxd2pw(struct gra2cairo_local *local, int r) { return r * local->pixel_dot_x; } static int mxp2dh(struct gra2cairo_local *local, int r) { return ceil(r / local->pixel_dot_y); } static double mxd2ph(struct gra2cairo_local *local, int r) { return r * local->pixel_dot_y; } static double mxd2px(struct gra2cairo_local *local, int x) { return x * local->pixel_dot_x + local->offsetx; } static double mxd2py(struct gra2cairo_local *local, int y) { return y * local->pixel_dot_y + local->offsety; } static void free_font_map(struct fontmap *fcur) { struct fontmap *cur, *prev; if (fcur == NULL) return; if (fcur->font) { pango_font_description_free(fcur->font); } g_free(fcur->fontalias); g_free(fcur->fontname); g_free(fcur->alternative); prev = NULL; cur = Gra2cairoConf->fontmap_list_root; while (cur) { if (cur == fcur) { if (prev == NULL) { Gra2cairoConf->fontmap_list_root = cur->next; } else { prev->next = cur->next; } break; } prev = cur; cur = cur->next; } g_free(fcur); } static void add_font_map(struct fontmap *fmap) { struct fontmap *cur; if (Gra2cairoConf->fontmap_list_root == NULL) { Gra2cairoConf->fontmap_list_root = fmap; return; } cur = Gra2cairoConf->fontmap_list_root; while (cur->next) { cur = cur->next; } cur->next = fmap; } static struct fontmap * create_font_map(const char *fontalias, const char *fontname, const char *alternative) { struct fontmap *fnew; if (Gra2cairoConf->fontmap == NULL) return NULL; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fnew) == 0) { free_font_map(fnew); } fnew = g_malloc(sizeof(struct fontmap)); if (fnew == NULL) { return NULL; } if (nhash_set_ptr(Gra2cairoConf->fontmap, fontalias, fnew)) { g_free(fnew); return NULL; } fnew->fontalias = g_strdup(fontalias); fnew->fontname = g_strdup(fontname); fnew->alternative = g_strdup(alternative); fnew->font = NULL; fnew->next = NULL; add_font_map(fnew); Gra2cairoConf->font_num++; return fnew; } void gra2cairo_save_config(void) { char *buf; struct fontmap *fcur; struct narray conf; arrayinit(&conf, sizeof(char *)); if (gra2cairo_get_fontmap_num() == 0) { buf = g_strdup("font"); if (buf) { arrayadd(&conf, &buf); removeconfig(CAIROCONF, &conf); } } else { fcur = Gra2cairoConf->fontmap_list_root; while (fcur) { buf = g_strdup_printf("font=%s,%s%s%s", fcur->fontalias, fcur->fontname, (fcur->alternative) ? "," : "", CHK_STR(fcur->alternative)); if (buf) { arrayadd(&conf, &buf); } fcur = fcur->next; } replaceconfig(CAIROCONF, &conf); } /* for backward compatibility */ if (OldConfigExist) { buf = g_strdup("font_map"); if (buf) { arrayadd(&conf, &buf); removeconfig(CAIROCONF, &conf); } OldConfigExist = FALSE; } arraydel2(&conf); } static int loadconfig(void) { FILE *fp; char *tok, *str, *s2; char *f1, *f2, *f3; int len; struct fontmap *fnew; fp = openconfig(CAIROCONF); if (fp == NULL) return 0; while ((tok = getconfig(fp, &str))) { s2 = str; if (strcmp(tok, "font") == 0) { f1 = getitok2(&s2, &len, ","); f2 = getitok2(&s2, &len, ","); for (; (s2[0] != '\0') && (strchr(" \x09,", s2[0])); s2++); f3 = getitok2(&s2, &len, ""); if (f1 && f2) { fnew = create_font_map(f1, f2, f3); g_free(f1); g_free(f2); if (fnew == NULL) { g_free(tok); closeconfig(fp); return 1; } } else { g_free(f1); g_free(f2); } g_free(f3); } else if (strcmp(tok, "font_map") == 0) { /* for backward compatibility */ char *f4, *endptr; int two_byte; OldConfigExist = TRUE; f1 = getitok2(&s2, &len, " \t,"); f3 = getitok2(&s2, &len, " \t,"); f4 = getitok2(&s2, &len, " \t,"); two_byte = strtol(f4, &endptr, 10); g_free(f3); g_free(f4); for (; (s2[0] != '\0') && (strchr(" \x09,", s2[0])); s2++); f2 = getitok2(&s2, &len, ""); fnew = NULL; if (f1 && f2) { struct compatible_font_info *info; struct fontmap *tmp; info = gra2cairo_get_compatible_font_info(f1); if (info) { if (nhash_get_ptr(Gra2cairoConf->fontmap, info->name, (void *) &tmp)) { g_free(f1); f1 = g_strdup(info->name); if (f1) { fnew = create_font_map(f1, f2, NULL); } if (fnew == NULL) { g_free(tok); g_free(f1); g_free(f2); closeconfig(fp); return 1; } } else { if (two_byte) { gra2cairo_set_alternative_font(info->name, f2); } } } } g_free(f1); g_free(f2); } else { fprintf(stderr, "(%s): configuration '%s' in section %s is not used.\n", AppName,tok, CAIROCONF); } g_free(tok); g_free(str); } closeconfig(fp); return 0; } static int free_fonts_sub(struct nhash *h, void *d) { struct fontmap *fcur; fcur = (struct fontmap *) h->val.p; free_font_map(fcur); return 0; } static void free_fonts(struct gra2cairo_config *conf) { nhash_each(conf->fontmap, free_fonts_sub, NULL); conf->font_num = 0; } static int init_conf(void) { Gra2cairoConf = g_malloc(sizeof(*Gra2cairoConf)); if (Gra2cairoConf == NULL) return 1; Gra2cairoConf->fontmap = nhash_new(); if (Gra2cairoConf->fontmap == NULL) { g_free(Gra2cairoConf); Gra2cairoConf = NULL; return 1; } Gra2cairoConf->fontmap_list_root = NULL; Gra2cairoConf->font_num = 0; if (loadconfig()) { free_fonts(Gra2cairoConf); nhash_free(Gra2cairoConf->fontmap); g_free(Gra2cairoConf); Gra2cairoConf = NULL; return 1; } return 0; } static void free_conf(void) { if (Gra2cairoConf == NULL) return; free_fonts(Gra2cairoConf); nhash_free(Gra2cairoConf->fontmap); g_free(Gra2cairoConf); Gra2cairoConf = NULL; } struct fontmap * gra2cairo_get_fontmap(const char *fontalias) { struct fontmap *fnew; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fnew)) { return NULL; } return fnew; } int gra2cairo_get_fontmap_num(void) { int n = 0; if (Gra2cairoConf->fontmap) { n = nhash_num(Gra2cairoConf->fontmap); } return n; } void gra2cairo_remove_fontmap(const char *fontalias) { struct fontmap *fnew; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fnew) == 0) { free_font_map(fnew); nhash_del(Gra2cairoConf->fontmap, fontalias); } } void gra2cairo_update_fontmap(const char *fontalias, const char *fontname) { struct fontmap *fcur; if (fontname == NULL || fontalias == NULL) return; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fcur)) return; if (strcmp(fontname, fcur->fontname)) { g_free(fcur->fontname); fcur->fontname = g_strdup(fontname); } if (fcur->font) { pango_font_description_free(fcur->font); fcur->font = NULL; } } void gra2cairo_add_fontmap(const char *fontalias, const char *fontname) { struct fontmap *fnew; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fnew) == 0) { free_font_map(fnew); } create_font_map(fontalias, fontname, NULL); } void gra2cairo_set_alternative_font(const char *fontalias, const char *fontname) { struct fontmap *fnew; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fnew)) { return; } g_free(fnew->alternative); if (fontname) { gchar *ptr; ptr = g_strdup(fontname); if (ptr) { g_strstrip(ptr); if (ptr[0]) { fnew->alternative = ptr; } else { fnew->alternative = NULL; g_free(ptr); } } } else { fnew->alternative = NULL; } if (fnew->font) { pango_font_description_free(fnew->font); fnew->font = NULL; } } static int gra2cairo_init(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local = NULL; int antialias = ANTIALIAS_TYPE_DEFAULT; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; if (Gra2cairoConf == NULL && init_conf()) { goto errexit; } local = g_malloc(sizeof(struct gra2cairo_local)); if (local == NULL) goto errexit; if (_putobj(obj, "_local", inst, local)) goto errexit; if (_putobj(obj, "antialias", inst, &antialias)) goto errexit; local->cairo = NULL; local->fontalias = NULL; local->layout = NULL; local->pixel_dot_x = 1; local->pixel_dot_y = 1; local->linetonum = 0; local->text2path = FALSE; local->antialias = antialias; local->region = NULL; local->font_style = GRA_FONT_STYLE_NORMAL; local->symbol = FALSE; local->use_opacity = FALSE; Instance++; return 0; errexit: if (Instance == 0) free_conf(); g_free(local); return 1; } void gra2cairo_draw_path(struct gra2cairo_local *local) { if (local->cairo && local->linetonum) { double x, y; cairo_get_current_point(local->cairo, &x, &y); cairo_stroke(local->cairo); cairo_move_to(local->cairo, x, y); local->linetonum = 0; } } struct gra2cairo_local * gra2cairo_free(struct objlist *obj, N_VALUE *inst) { struct gra2cairo_local *local; _getobj(obj, "_local", inst, &local); if (local == NULL) return NULL; if (local->cairo) { gra2cairo_draw_path(local); cairo_destroy(local->cairo); } if (local->layout) { g_object_unref(local->layout); } if (local->fontalias) { g_free(local->fontalias); } Instance--; if (Instance == 0) { free_conf(); } return local; } static int gra2cairo_done(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; if (OldConfigExist) { /* for backward compatibility */ gra2cairo_save_config(); } gra2cairo_free(obj, inst); return 0; } int gra2cairo_clip_region(struct gra2cairo_local *local, cairo_region_t *region) { if (local == NULL || local->cairo == NULL) return 1; cairo_new_path(local->cairo); if (region) { gdk_cairo_region(local->cairo, region); cairo_clip(local->cairo); local->region = region; } else { cairo_reset_clip(local->cairo); local->region = NULL; } return 0; } static double gra2cairo_get_pixel_dot(char **argv) { int dpi; dpi = *(int *) argv[2]; if (dpi < 1) dpi = 1; if (dpi > DPI_MAX) dpi = DPI_MAX; *(int *)argv[2] = dpi; return dpi / (DPI_MAX * 1.0); } static int gra2cairo_set_dpi(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int dpi; struct gra2cairo_local *local; dpi = *(int *) argv[2]; _getobj(obj, "_local", inst, &local); _putobj(obj, "dpix", inst, &dpi); _putobj(obj, "dpiy", inst, &dpi); local->pixel_dot_x = local->pixel_dot_y = gra2cairo_get_pixel_dot(argv); return 0; } static int gra2cairo_set_dpi_x(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; _getobj(obj, "_local", inst, &local); local->pixel_dot_x = gra2cairo_get_pixel_dot(argv); return 0; } static int gra2cairo_set_dpi_y(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; _getobj(obj, "_local", inst, &local); local->pixel_dot_y = gra2cairo_get_pixel_dot(argv); return 0; } void set_cairo_antialias(cairo_t *cairo, int antialias) { if (cairo == NULL) { return; } switch (antialias) { case ANTIALIAS_TYPE_NONE: antialias = CAIRO_ANTIALIAS_NONE; break; case ANTIALIAS_TYPE_DEFAULT: antialias = CAIRO_ANTIALIAS_DEFAULT; break; case ANTIALIAS_TYPE_GRAY: antialias = CAIRO_ANTIALIAS_GRAY; break; case ANTIALIAS_TYPE_SUBPIXEL: antialias = CAIRO_ANTIALIAS_SUBPIXEL; break; } cairo_set_antialias(cairo, antialias); } void gra2cairo_set_antialias(struct gra2cairo_local *local, int antialias) { if (local->cairo == NULL) return; local->antialias = antialias; set_cairo_antialias(local->cairo, antialias); } static int set_antialias(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int antialias; struct gra2cairo_local *local; antialias = *(int *) argv[2]; _getobj(obj, "_local", inst, &local); gra2cairo_set_antialias(local, antialias); return 0; } struct compatible_font_info * gra2cairo_get_compatible_font_info(const char *name) { int i; if (name == NULL) { return NULL; } if (CompatibleFontHash == NULL) { return NULL; } if (nhash_get_int(CompatibleFontHash, name, &i)) { return NULL; } return &CompatibleFont[i]; } int get_font_style(struct objlist *obj, N_VALUE *inst, const char *field, const char *font_field) { int style; struct compatible_font_info *compatible; char *font; _getobj(obj, font_field, inst, &font); compatible = gra2cairo_get_compatible_font_info(font); if (compatible && compatible->name && ! compatible->symbol) { g_free(font); font = g_strdup(compatible->name); _putobj(obj, font_field, inst, font); style = compatible->style; } else { _getobj(obj, field, inst, &style); } return style; } static struct fontmap * loadfont(char *fontalias, int font_style, int *symbol) { struct fontmap *fcur; PangoFontDescription *pfont; PangoStyle style; PangoWeight weight; *symbol = FALSE; if (nhash_get_ptr(Gra2cairoConf->fontmap, fontalias, (void *) &fcur)) { int i; if (nhash_get_int(CompatibleFontHash, fontalias, &i) == 0) { if (nhash_get_ptr(Gra2cairoConf->fontmap, CompatibleFont[i].name, (void *) &fcur) == 0) { font_style = CompatibleFont[i].style; *symbol = CompatibleFont[i].symbol; } } if (fcur == NULL && nhash_get_ptr(Gra2cairoConf->fontmap, DEFAULT_FONT, (void *) &fcur)) { return NULL; } } if (fcur->font) { pfont = fcur->font; } else { gchar *ptr; pfont = pango_font_description_new(); ptr = g_strdup_printf("%s%s%s", fcur->fontname, (fcur->alternative) ? "," : "", CHK_STR(fcur->alternative)); if (ptr) { pango_font_description_set_family(pfont, ptr); g_free(ptr); } else { return NULL; } } if (font_style > 0 && (font_style & GRA_FONT_STYLE_ITALIC)) { style = PANGO_STYLE_ITALIC; } else { style = PANGO_STYLE_NORMAL; } pango_font_description_set_style(pfont, style); if (font_style > 0 && (font_style & GRA_FONT_STYLE_BOLD)) { weight = PANGO_WEIGHT_BOLD; } else { weight = PANGO_WEIGHT_NORMAL; } pango_font_description_set_weight(pfont, weight); fcur->font = pfont; return fcur; } static void relative_move(cairo_t *cr, double x, double y) { if (cairo_has_current_point(cr)) { cairo_rel_move_to(cr, x, y); } else { cairo_move_to(cr, x, y); } } static void draw_str(struct gra2cairo_local *local, int draw, char *str, struct fontmap *font, int size, int space, int *fw, int *ah, int *dh) { PangoAttribute *attr; PangoAttrList *alist; PangoLayoutIter *piter; int w, h, baseline; if (size == 0 || str == NULL) { if (fw) *fw = 0; if (ah) *ah = 0; if (dh) *dh = 0; return; } if (local->layout == NULL) { local->layout = pango_cairo_create_layout(local->cairo); } alist = pango_attr_list_new(); attr = pango_attr_size_new_absolute(mxd2ph(local, size) * PANGO_SCALE); pango_attr_list_insert(alist, attr); attr = pango_attr_letter_spacing_new(mxd2ph(local, space) * PANGO_SCALE); pango_attr_list_insert(alist, attr); pango_layout_set_font_description(local->layout, font->font); pango_layout_set_attributes(local->layout, alist); pango_attr_list_unref(alist); pango_layout_set_text(local->layout, str, -1); pango_layout_get_pixel_size(local->layout, &w, &h); piter = pango_layout_get_iter(local->layout); baseline = pango_layout_iter_get_baseline(piter) / PANGO_SCALE; if (fw) *fw = w; if (ah) *ah = baseline; if (dh) *dh = h - baseline; if (draw && str) { double x, y; double cx, cy; x = - local->fontsin * baseline; y = - local->fontcos * baseline; cairo_get_current_point(local->cairo, &cx, &cy); relative_move(local->cairo, x, y); cairo_save(local->cairo); cairo_rotate(local->cairo, -local->fontdir * G_PI / 180.); pango_cairo_update_layout(local->cairo, local->layout); if (local->text2path) { pango_cairo_layout_path(local->cairo, local->layout); cairo_fill(local->cairo); cairo_restore(local->cairo); cairo_move_to(local->cairo, cx + w * local->fontcos, cy - w * local->fontsin); } else { pango_cairo_show_layout(local->cairo, local->layout); cairo_restore(local->cairo); relative_move(local->cairo, w * local->fontcos - x, - w * local->fontsin - y); } } pango_layout_iter_free(piter); } static int check_cairo_status(cairo_t *cairo) { int r; r = cairo_status(cairo); if (r != CAIRO_STATUS_SUCCESS) { return r + 100; } r = cairo_surface_status(cairo_get_target(cairo)); if (r != CAIRO_STATUS_SUCCESS) { return r + 100; } return 0; } static int gra2cairo_flush(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; cairo_surface_t *surface; _getobj(obj, "_local", inst, &local); if (local->cairo == NULL) return -1; gra2cairo_draw_path(local); surface = cairo_get_target(local->cairo); if (surface) { cairo_surface_flush(surface); } return check_cairo_status(local->cairo); } char * gra2cairo_get_utf8_str(const char *cstr, int symbol) { char *tmp; size_t l, i, j; l = strlen(cstr); tmp = g_malloc(l * 6 + 1); if (tmp == NULL) { return NULL; } for (j = i = 0; i <= l; i++) { if (cstr[i] == '\\') { if (cstr[i + 1] == 'x' && g_ascii_isxdigit(cstr[i + 2]) && g_ascii_isxdigit(cstr[i + 3])) { char buf[8]; int len, k; gunichar wc; wc = g_ascii_xdigit_value(cstr[i + 2]) * 16 + g_ascii_xdigit_value(cstr[i + 3]); len = g_unichar_to_utf8(wc, buf); for (k = 0; k < len; k++) { tmp[j++] = buf[k]; } i += 3; } else { i += 1; tmp[j++] = cstr[i]; } } else { tmp[j++] = cstr[i]; } tmp[j] = '\0'; } if (symbol) { char *ptr; ptr = ascii2greece(tmp); if (ptr) { g_free(tmp); tmp = ptr; } } return tmp; } static int gra2cairo_output(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char code, *cstr, *tmp; int *cpar, i, r, font_style; double x, y, w, h, fontsize, fontspace, fontdir, fontsin, fontcos, a1, a2; cairo_line_join_t join; cairo_line_cap_t cap; double *dashlist = NULL; struct gra2cairo_local *local; local = (struct gra2cairo_local *)argv[2]; code = *(char *)(argv[3]); cpar = (int *)argv[4]; cstr = argv[5]; if (local->cairo == NULL) return -1; if (code != 'T') { gra2cairo_draw_path(local); } switch (code) { case 'I': gra2cairo_set_antialias(local, local->antialias); local->linetonum = 0; r = check_cairo_status(local->cairo); if (r) { error(obj, r); return 1; } case '%': case 'X': case 'Z': break; case 'E': r = check_cairo_status(local->cairo); if (r) { error(obj, r); return 1; } break; case 'V': local->offsetx = mxd2pw(local, cpar[1]); local->offsety = mxd2ph(local, cpar[2]); cairo_new_path(local->cairo); if (cpar[5]) { x = mxd2pw(local, cpar[1]); y = mxd2ph(local, cpar[2]); w = mxd2pw(local, cpar[3]) - x; h = mxd2ph(local, cpar[4]) - y; cairo_reset_clip(local->cairo); cairo_rectangle(local->cairo, x, y, w, h); cairo_clip(local->cairo); } else { cairo_reset_clip(local->cairo); } if (local->region) { gra2cairo_clip_region(local, local->region); } break; case 'A': if (cpar[1] == 0) { cairo_set_dash(local->cairo, NULL, 0, 0); } else { dashlist = g_malloc(sizeof(* dashlist) * cpar[1]); if (dashlist == NULL) break; for (i = 0; i < cpar[1]; i++) { dashlist[i] = mxd2pw(local, cpar[6 + i]); if (dashlist[i] <= 0) { dashlist[i] = 1; } } cairo_set_dash(local->cairo, dashlist, cpar[1], 0); g_free(dashlist); } cairo_set_line_width(local->cairo, mxd2pw(local, cpar[2])); if (cpar[3] == 2) { cap = CAIRO_LINE_CAP_SQUARE; } else if (cpar[3] == 1) { cap = CAIRO_LINE_CAP_ROUND; } else { cap = CAIRO_LINE_CAP_BUTT; } cairo_set_line_cap(local->cairo, cap); if (cpar[4] == 2) { join = CAIRO_LINE_JOIN_BEVEL; } else if (cpar[4] == 1) { join = CAIRO_LINE_JOIN_ROUND; } else { join = CAIRO_LINE_JOIN_MITER; } cairo_set_line_join(local->cairo, join); break; case 'G': if (local->use_opacity && cpar[0] > 3 && cpar[4] < 255) { cairo_set_source_rgba(local->cairo, cpar[1] / 255.0, cpar[2] / 255.0, cpar[3] / 255.0, cpar[4] / 255.0); } else { cairo_set_source_rgb(local->cairo, cpar[1] / 255.0, cpar[2] / 255.0, cpar[3] / 255.0); } break; case 'M': cairo_move_to(local->cairo, mxd2px(local, cpar[1]), mxd2py(local, cpar[2])); break; case 'N': relative_move(local->cairo, mxd2pw(local, cpar[1]), mxd2ph(local, cpar[2])); break; case 'L': cairo_new_path(local->cairo); cairo_move_to(local->cairo, mxd2px(local, cpar[1]), mxd2py(local, cpar[2])); cairo_line_to(local->cairo, mxd2px(local, cpar[3]), mxd2py(local, cpar[4])); cairo_stroke(local->cairo); break; case 'T': cairo_line_to(local->cairo, mxd2px(local, cpar[1]), mxd2py(local, cpar[2])); local->linetonum++; break; case 'C': x = mxd2px(local, cpar[1] - cpar[3]); y = mxd2py(local, cpar[2] - cpar[4]); w = mxd2pw(local, cpar[3]); h = mxd2ph(local, cpar[4]); a1 = cpar[5] * (M_PI / 18000.0); a2 = cpar[6] * (M_PI / 18000.0) + a1; if (w == 0 || h == 0 || a1 == a2) break; cairo_new_path(local->cairo); cairo_save(local->cairo); cairo_translate(local->cairo, x + w, y + h); cairo_scale(local->cairo, w, h); cairo_arc_negative(local->cairo, 0., 0., 1., -a1, -a2); cairo_restore (local->cairo); switch (cpar[7]) { case 1: cairo_line_to(local->cairo, x + w, y + h); /* fall through */ case 2: cairo_close_path(local->cairo); cairo_fill(local->cairo); break; case 3: cairo_line_to(local->cairo, x + w, y + h); /* fall through */ case 4: cairo_close_path(local->cairo); cairo_stroke(local->cairo); break; default: cairo_stroke(local->cairo); } break; case 'B': cairo_new_path(local->cairo); if (cpar[1] <= cpar[3]) { x = mxd2px(local, cpar[1]); w = mxd2pw(local, cpar[3] - cpar[1]); } else { x = mxd2px(local, cpar[3]); w = mxd2pw(local, cpar[1] - cpar[3]); } if (cpar[2] <= cpar[4]) { y = mxd2py(local, cpar[2]); h = mxd2ph(local, cpar[4] - cpar[2]); } else { y = mxd2py(local, cpar[4]); h = mxd2ph(local, cpar[2] - cpar[4]); } cairo_rectangle(local->cairo, x, y, w, h); if (cpar[5] == 0) { cairo_stroke(local->cairo); } else { cairo_fill(local->cairo); } break; case 'P': cairo_new_path(local->cairo); cairo_arc(local->cairo, mxd2px(local, cpar[1]), mxd2py(local, cpar[2]), mxd2pw(local, 1), 0, 2 * M_PI); cairo_fill(local->cairo); break; case 'R': cairo_new_path(local->cairo); if (cpar[1] == 0) break; for (i = 0; i < cpar[1]; i++) { cairo_line_to(local->cairo, mxd2px(local, cpar[i * 2 + 2]), mxd2py(local, cpar[i * 2 + 3])); } cairo_stroke(local->cairo); break; case 'D': cairo_new_path(local->cairo); if (cpar[1] == 0) break; for (i = 0; i < cpar[1]; i++) { cairo_line_to(local->cairo, mxd2px(local, cpar[i * 2 + 3]), mxd2py(local, cpar[i * 2 + 4])); } cairo_close_path(local->cairo); switch (cpar[2]) { case 0: cairo_stroke(local->cairo); break; case 1: cairo_set_fill_rule(local->cairo, CAIRO_FILL_RULE_EVEN_ODD); cairo_fill(local->cairo); break; case 2: cairo_set_fill_rule(local->cairo, CAIRO_FILL_RULE_WINDING); cairo_fill(local->cairo); break; } break; case 'F': g_free(local->fontalias); local->fontalias = g_strdup(cstr); break; case 'H': fontspace = cpar[2] / 72.0 * 25.4; local->fontspace = fontspace; fontsize = cpar[1] / 72.0 * 25.4; local->fontsize = fontsize; fontdir = cpar[3] * MPI / 18000.0; fontsin = sin(fontdir); fontcos = cos(fontdir); local->fontdir = (cpar[3] % 36000) / 100.0; if (local->fontdir < 0) { local->fontdir += 360; } local->fontsin = fontsin; local->fontcos = fontcos; font_style = (cpar[0] > 3) ? cpar[4] : -1; local->loadfont = loadfont(local->fontalias, font_style, &local->symbol); break; case 'S': if (local->loadfont == NULL) break; tmp = gra2cairo_get_utf8_str(cstr, local->symbol); if (tmp) { draw_str(local, TRUE, tmp, local->loadfont, local->fontsize, local->fontspace, NULL, NULL, NULL); g_free(tmp); } break; case 'K': if (local->loadfont == NULL) break; tmp = sjis_to_utf8(cstr); if (tmp) { draw_str(local, TRUE, tmp, local->loadfont, local->fontsize, local->fontspace, NULL, NULL, NULL); g_free(tmp); } break; default: break; } return 0; } int gra2cairo_strwidth(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; gchar *font, *str; double size, dir, s,c ; int width, style, symbol; struct fontmap *fcur; str = argv[3]; size = ( * (int *) argv[4]) / 72.0 * 25.4; font = argv[5]; style = * (int *) (argv[6]); if (size == 0) { rval->i = 0; return 0; } if (_getobj(obj, "_local", inst, &local)) return 1; if (local->cairo == NULL) return 0; fcur = loadfont(font, style, &symbol); if (fcur == NULL) { rval->i = nround(size * 0.600); return 0; } dir = local->fontdir; s = local->fontsin; c = local->fontcos; local->fontdir = 0; local->fontsin = 0; local->fontcos = 1; if (symbol) { char *ptr; ptr = ascii2greece(str); if (ptr == NULL) { return 1; } str = ptr; } draw_str(local, FALSE, str, fcur, size, 0, &width, NULL, NULL); if (symbol) { g_free(str); } rval->i = mxp2dw(local, width); local->fontsin = s; local->fontcos = c; local->fontdir = dir; return 0; } int gra2cairo_charheight(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; char *font; double size, dir, s, c; char *func; int height, descent, ascent, style, symbol; struct fontmap *fcur; func = (char *)argv[1]; size = (*(int *)(argv[3])) / 72.0 * 25.4; font = (char *)(argv[4]); style = *(int *) (argv[5]); if (size == 0) { rval->i = 0; return 0; } if (_getobj(obj, "_local", inst, &local)) return 1; if (local->cairo == NULL) return 1; if (strcmp0(func, "_charascent") == 0) { height = TRUE; } else { height = FALSE; } fcur = loadfont(font, style, &symbol); if (fcur == NULL) { if (height) { rval->i = nround(size * 0.562); } else { rval->i = nround(size * 0.250); } return 0; } dir = local->fontdir; s = local->fontsin; c = local->fontcos; local->fontdir = 0; local->fontsin = 0; local->fontcos = 1; draw_str(local, FALSE, "A", fcur, size, 0, NULL, &ascent, &descent); if (height) { rval->i = mxp2dh(local, ascent); } else { rval->i = mxp2dh(local, descent); } local->fontsin = s; local->fontcos = c; local->fontdir = dir; return 0; } static int use_opacity(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct gra2cairo_local *local; if (_getobj(obj, "_local", inst, &local)) return 1; local->use_opacity = * (int *) argv[2]; return 0; } static struct objtable gra2cairo[] = { {"init", NVFUNC, 0, gra2cairo_init, NULL, 0}, {"done", NVFUNC, 0, gra2cairo_done, NULL, 0}, {"dpi", NINT, NREAD | NWRITE, gra2cairo_set_dpi, NULL, 0}, {"dpix", NINT, NREAD | NWRITE, gra2cairo_set_dpi_x, NULL, 0}, {"dpiy", NINT, NREAD | NWRITE, gra2cairo_set_dpi_y, NULL, 0}, {"flush",NVFUNC,NREAD|NEXEC,gra2cairo_flush,"",0}, {"antialias", NENUM, NREAD | NWRITE, set_antialias, gra2cairo_antialias_type, 0}, {"use_opacity", NBOOL, NREAD | NWRITE, use_opacity, NULL,0}, {"_output", NVFUNC, 0, gra2cairo_output, NULL, 0}, {"_strwidth", NIFUNC, 0, gra2cairo_strwidth, NULL, 0}, {"_charascent", NIFUNC, 0, gra2cairo_charheight, NULL, 0}, {"_chardescent", NIFUNC, 0, gra2cairo_charheight, NULL, 0}, {"_local", NPOINTER, 0, NULL, NULL, 0}, }; #define TBLNUM (sizeof(gra2cairo) / sizeof(*gra2cairo)) void * addgra2cairo() /* addgra2cairoile() returns NULL on error */ { int i; if (CompatibleFontHash == NULL) { CompatibleFontHash = nhash_new(); if (CompatibleFontHash == NULL) { return NULL; } for (i = 0; i < (int) (sizeof(CompatibleFont) / sizeof(*CompatibleFont)); i++) { nhash_set_int(CompatibleFontHash, CompatibleFont[i].old_name, i); } } if (Gra2CairoErrMsgs == NULL) { Gra2CairoErrMsgs = g_malloc(sizeof(*Gra2CairoErrMsgs) * CAIRO_STATUS_LAST_STATUS); Gra2CairoErrMsgNum = CAIRO_STATUS_LAST_STATUS; for (i = 0; i < CAIRO_STATUS_LAST_STATUS; i++) { Gra2CairoErrMsgs[i] = g_strdup(cairo_status_to_string(i)); } } return addobject(NAME, NULL, PARENT, OVERSION, TBLNUM, gra2cairo, Gra2CairoErrMsgNum, Gra2CairoErrMsgs, NULL, NULL); } ngraph-gtk-6.09.05/src/gtk/gtk_action.h0000644000175000017500000000017613736571345014547 00000000000000#ifndef GTK_ACTION_HEADER #define GTK_ACTION_HEADER void setup_actions(GtkApplication *app); #endif /* GTK_ACTION_HEADER */ ngraph-gtk-6.09.05/src/gtk/gtk_widget.c0000644000175000017500000006561114054561140014537 00000000000000#include "gtk_common.h" #include #include #include "mathfn.h" #include "object.h" #include "gtk_widget.h" #include "ox11menu.h" #include "x11menu.h" #include "x11gui.h" #include "dir_defs.h" void set_button_icon(GtkWidget *w, const char *icon_name) { } void set_widget_margin(GtkWidget *w, int margin_pos) { if (margin_pos & WIDGET_MARGIN_LEFT) { gtk_widget_set_margin_start(w, 4); } if (margin_pos & WIDGET_MARGIN_RIGHT) { gtk_widget_set_margin_end(w, 4); } if (margin_pos & WIDGET_MARGIN_BOTTOM) { gtk_widget_set_margin_bottom(w, 4); } if (margin_pos & WIDGET_MARGIN_TOP) { gtk_widget_set_margin_top(w, 4); } } void set_scale_mark(GtkWidget *scale, GtkPositionType pos, int start, int inc) { int max, val; GtkAdjustment *adj; adj = gtk_range_get_adjustment(GTK_RANGE(scale)); max = gtk_adjustment_get_upper(adj); for (val = start; val <=max; val += inc) { gtk_scale_add_mark(GTK_SCALE(scale), val, pos, NULL); } switch (pos) { case GTK_POS_BOTTOM: gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_TOP); break; case GTK_POS_TOP: gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_BOTTOM); break; case GTK_POS_LEFT: gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_RIGHT); break; case GTK_POS_RIGHT: gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_LEFT); break; } } GtkWidget * get_mnemonic_label(GtkWidget *w) { GList *list; GtkWidget *label; if (w == NULL) { return NULL; } list = gtk_widget_list_mnemonic_labels(w); if (list == NULL) { return NULL; } label = GTK_WIDGET(list->data); g_list_free(list); return label; } void set_widget_sensitivity_with_label(GtkWidget *w, gboolean state) { GtkWidget *label; if(w == NULL) { return; } if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_LABEL)) { label = w; w = gtk_label_get_mnemonic_widget(GTK_LABEL(w)); } else { label = get_mnemonic_label(w); } if (w) { gtk_widget_set_sensitive(w, state); } if (label) { gtk_widget_set_sensitive(label, state); } } void set_widget_visibility_with_label(GtkWidget *w, gboolean state) { GtkWidget *label; if(w == NULL) { return; } if (G_TYPE_CHECK_INSTANCE_TYPE(w, GTK_TYPE_LABEL)) { label = w; w = gtk_label_get_mnemonic_widget(GTK_LABEL(w)); } else { label = get_mnemonic_label(w); } if (w) { gtk_widget_set_visible(w, state); } if (label) { gtk_widget_set_visible(label, state); } } GtkWidget * add_widget_to_table_sub(GtkWidget *table, GtkWidget *w, char *title, int expand, int col, int width, int col_max, int n) { GtkWidget *label; label = NULL; if (title) { label = gtk_label_new_with_mnemonic(title); gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); gtk_widget_set_halign(label, GTK_ALIGN_START); g_object_set(label, "margin", GINT_TO_POINTER(4), NULL); gtk_grid_attach(GTK_GRID(table), label, col, n, 1, 1); col++; } if (w) { if (expand) { gtk_widget_set_hexpand(w, TRUE); gtk_widget_set_halign(w, GTK_ALIGN_FILL); } else { gtk_widget_set_halign(w, GTK_ALIGN_START); } g_object_set(w, "margin", GINT_TO_POINTER(4), NULL); gtk_grid_attach(GTK_GRID(table), w, col, n, width, 1); } return label; } GtkWidget * add_widget_to_table(GtkWidget *table, GtkWidget *w, char *title, int expand, int n) { return add_widget_to_table_sub(table, w, title, expand, 0, (title) ? 1 : 2, 2, n); } GtkWidget * add_copy_button_to_box(GtkWidget *parent_box, GCallback cb, gpointer d, char *obj_name) { GtkWidget *hbox, *w; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = gtk_button_new_with_mnemonic(_("_Copy Settings")); g_signal_connect(w, "map", G_CALLBACK(set_sensitivity_by_check_instance), obj_name); g_signal_connect(w, "clicked", cb, d); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(parent_box), hbox, FALSE, FALSE, 4); return hbox; } GtkWidget * item_setup(GtkWidget *box, GtkWidget *w, char *title, gboolean expand) { GtkWidget *hbox, *label; hbox = gtk_grid_new(); label = gtk_label_new_with_mnemonic(title); gtk_label_set_mnemonic_widget(GTK_LABEL(label), w); g_object_set(label, "margin", GINT_TO_POINTER(2), NULL); g_object_set(w, "margin", GINT_TO_POINTER(2), NULL); if (expand) { gtk_widget_set_hexpand(w, TRUE); gtk_widget_set_halign(w, GTK_ALIGN_FILL); } else { gtk_widget_set_halign(w, GTK_ALIGN_START); } gtk_grid_attach(GTK_GRID(hbox), label, 0, 0, 1, 1); gtk_grid_attach(GTK_GRID(hbox), w, 1, 0, 1, 1); gtk_box_pack_start(GTK_BOX(box), hbox, expand, expand, 4); return label; } int entry_set_filename(GtkWidget *w, char *filename) { gtk_entry_set_text(GTK_ENTRY(w), filename); return 0; } char * entry_get_filename(GtkWidget *w) { const char *utf8filename; utf8filename = gtk_entry_get_text(GTK_ENTRY(w)); if (utf8filename == NULL) { return NULL; } return g_strdup(utf8filename); } GtkWidget * get_parent_window(GtkWidget *w) { GtkWidget *ptr; ptr = w; while (ptr && ! G_TYPE_CHECK_INSTANCE_TYPE(ptr, GTK_TYPE_WINDOW)) { ptr = gtk_widget_get_parent(ptr); } return (ptr) ? ptr : TopLevel; } static void entry_icon_file_select(GtkEntry *w, GtkEntryIconPosition icon_pos, GdkEvent *event, gpointer user_data) { struct objlist *obj; char *file, *ext; obj = (struct objlist *) user_data; if (obj == NULL) return; ext = NULL; if (chkobjfield(obj, "ext") == 0 && chkobjlastinst(obj) >= 0) { getobj(obj, "ext", 0, 0, NULL, &ext); } if (nGetOpenFileName(get_parent_window(GTK_WIDGET(w)), obj->name, ext, NULL, gtk_entry_get_text(w), &file, TRUE, Menulocal.changedirectory) == IDOK && file) { entry_set_filename(GTK_WIDGET(w), file); g_free(file); } } GtkWidget * create_file_entry_with_cb(GCallback cb, gpointer data) { GtkWidget *w; w = create_text_entry(TRUE, TRUE); gtk_entry_set_icon_from_icon_name(GTK_ENTRY(w), GTK_ENTRY_ICON_SECONDARY, "document-open-symbolic"); g_signal_connect(w, "icon-release", cb, data); return w; } GtkWidget * create_file_entry(struct objlist *obj) { return create_file_entry_with_cb(G_CALLBACK(entry_icon_file_select), obj); } static void direction_icon_released(GtkEntry *entry, GtkEntryIconPosition pos, GdkEvent *event, gpointer user_data) { int angle, val; angle = gtk_spin_button_get_value(GTK_SPIN_BUTTON(entry)); val = angle % 360; val += (val < 0) ? 360 : 0; switch (pos) { case GTK_ENTRY_ICON_SECONDARY: if (angle == 360) { val = 0; } else { val -= val % 90; val += 90; } break; case GTK_ENTRY_ICON_PRIMARY: if (angle == 0) { val = 360; } else { int rest; rest = val % 90; if (rest == 0) { val -= 90; } else { val -= rest; } } break; } val += (val < 0) ? 360 : 0; gtk_spin_button_set_value(GTK_SPIN_BUTTON(entry), val); } GtkWidget * create_direction_entry(void) { GtkWidget *w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_ANGLE, FALSE, TRUE); gtk_entry_set_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH); gtk_entry_set_max_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH); gtk_entry_set_icon_from_icon_name(GTK_ENTRY(w), GTK_ENTRY_ICON_SECONDARY, "go-up-symbolic"); gtk_entry_set_icon_from_icon_name(GTK_ENTRY(w), GTK_ENTRY_ICON_PRIMARY, "go-down-symbolic"); g_signal_connect(w, "icon-release", G_CALLBACK(direction_icon_released), NULL); return w; } GtkWidget * create_text_entry(int set_default_size, int set_default_action) { GtkWidget *w; w = gtk_entry_new(); if (set_default_size) { gtk_entry_set_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH); } if (set_default_action) { gtk_entry_set_activates_default(GTK_ENTRY(w), TRUE); } return w; } GtkWidget * create_number_entry(int set_default_size, int set_default_action) { GtkWidget *w; w = create_text_entry(set_default_size, set_default_action); gtk_entry_set_input_purpose(GTK_ENTRY(w), GTK_INPUT_PURPOSE_NUMBER); return w; } static double int2val(enum SPIN_BUTTON_TYPE type, int ival) { gdouble val; switch (type) { case SPIN_BUTTON_TYPE_WIDTH: case SPIN_BUTTON_TYPE_LENGTH: case SPIN_BUTTON_TYPE_POSITION: case SPIN_BUTTON_TYPE_ANGLE: case SPIN_BUTTON_TYPE_SPACE_POINT: case SPIN_BUTTON_TYPE_POINT: case SPIN_BUTTON_TYPE_PERCENT: val = ival * 0.01; break; case SPIN_BUTTON_TYPE_INT: case SPIN_BUTTON_TYPE_UINT: case SPIN_BUTTON_TYPE_NUM: case SPIN_BUTTON_TYPE_CUSTOM: default: val = ival; } return val; } static int val2int(enum SPIN_BUTTON_TYPE type, double val) { int ival; switch (type) { case SPIN_BUTTON_TYPE_WIDTH: case SPIN_BUTTON_TYPE_LENGTH: case SPIN_BUTTON_TYPE_POSITION: case SPIN_BUTTON_TYPE_ANGLE: case SPIN_BUTTON_TYPE_SPACE_POINT: case SPIN_BUTTON_TYPE_POINT: case SPIN_BUTTON_TYPE_PERCENT: ival = nround(val * 100); break; case SPIN_BUTTON_TYPE_INT: case SPIN_BUTTON_TYPE_UINT: case SPIN_BUTTON_TYPE_NUM: case SPIN_BUTTON_TYPE_CUSTOM: default: ival = val; } return ival; } void spin_entry_set_range(GtkWidget *w, int min, int max) { enum SPIN_BUTTON_TYPE type; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); gtk_spin_button_set_range(GTK_SPIN_BUTTON(w), int2val(type, min), int2val(type, max)); } void spin_entry_set_inc(GtkWidget *w, int inc, int page) { enum SPIN_BUTTON_TYPE type; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(w), int2val(type, inc), int2val(type, page)); } void spin_entry_set_val(GtkWidget *entry, int ival) { gdouble min, max, val; enum SPIN_BUTTON_TYPE type; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry), "user-data")); val = int2val(type, ival); gtk_spin_button_get_range(GTK_SPIN_BUTTON(entry), &min, &max); if (val < min) { val = min; } else if (val > max) { val = max; } gtk_spin_button_set_value(GTK_SPIN_BUTTON(entry), val); } int spin_entry_get_val(GtkWidget *entry) { gdouble val; enum SPIN_BUTTON_TYPE type; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry), "user-data")); val = gtk_spin_button_get_value(GTK_SPIN_BUTTON(entry)); return val2int(type, val); } static int spin_change_value_cb(GtkSpinButton *spinbutton, GtkScrollType arg1, gpointer user_data) { const char *str; double oval, val; int ecode; str = gtk_entry_get_text(GTK_ENTRY(spinbutton)); if (str == NULL) return 0; oval = gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)); ecode = str_calc(str, &val, NULL, NULL); if (ecode || val != val || val == HUGE_VAL || val == - HUGE_VAL) { gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), oval); return 0; } gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbutton), val); return 0; } static GtkWidget * _create_spin_entry(enum SPIN_BUTTON_TYPE type, double min, double max, double inc, double page, gboolean numeric, gboolean wrap, int set_default_size, int set_default_action) { GtkWidget *w; w = gtk_spin_button_new_with_range(min, max, inc); gtk_entry_set_alignment(GTK_ENTRY(w), 1.0); gtk_spin_button_set_increments(GTK_SPIN_BUTTON(w), inc, page); gtk_spin_button_set_wrap(GTK_SPIN_BUTTON(w), wrap); gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(w), FALSE); gtk_spin_button_set_digits(GTK_SPIN_BUTTON(w), (numeric) ? 0 : 2); if (set_default_size) { gtk_entry_set_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH); gtk_entry_set_max_width_chars(GTK_ENTRY(w), NUM_ENTRY_WIDTH); } if (set_default_action) { gtk_entry_set_activates_default(GTK_ENTRY(w), TRUE); } g_object_set_data(G_OBJECT(w), "user-data", GINT_TO_POINTER(type)); g_signal_connect(w, "input", G_CALLBACK(spin_change_value_cb), NULL); return w; } GtkWidget * create_spin_entry_type(enum SPIN_BUTTON_TYPE type, int set_default_size, int set_default_action) { double min, max, inc, page = 10; gboolean wrap = FALSE, numeric = FALSE; switch (type) { case SPIN_BUTTON_TYPE_WIDTH: min = 0; max = int2val(type, SPIN_ENTRY_MAX); inc = 0.1; page = 1; break; case SPIN_BUTTON_TYPE_LENGTH: min = 0; max = int2val(type, SPIN_ENTRY_MAX); inc = 1; break; case SPIN_BUTTON_TYPE_POSITION: min = int2val(type, - SPIN_ENTRY_MAX); max = int2val(type, SPIN_ENTRY_MAX); inc = 1; break; case SPIN_BUTTON_TYPE_ANGLE: min = 0; max = 360; inc = 1; page = 15; wrap = TRUE; break; case SPIN_BUTTON_TYPE_SPACE_POINT: min = 0; max = int2val(type, SPIN_ENTRY_MAX); inc = 1; break; case SPIN_BUTTON_TYPE_POINT: min = int2val(type, TEXT_SIZE_MIN); max = int2val(type, SPIN_ENTRY_MAX); inc = 1; break; case SPIN_BUTTON_TYPE_PERCENT: min = 0; max = int2val(type, SPIN_ENTRY_MAX); inc = 1; break; case SPIN_BUTTON_TYPE_INT: min = INT_MIN; max = INT_MAX; inc = 1; numeric = TRUE; break; case SPIN_BUTTON_TYPE_UINT: min = 0; max = INT_MAX; inc = 1; numeric = TRUE; break; case SPIN_BUTTON_TYPE_NUM: min = -1; max = INT_MAX; inc = 1; numeric = TRUE; break; case SPIN_BUTTON_TYPE_NATURAL: min = 1; max = INT_MAX; inc = 1; numeric = TRUE; break; case SPIN_BUTTON_TYPE_CUSTOM: min = INT_MIN; max = INT_MAX; inc = 1; numeric = TRUE; break; default: type = SPIN_BUTTON_TYPE_CUSTOM; min = INT_MIN; max = INT_MAX; inc = 1; numeric = TRUE; } return _create_spin_entry(type, min, max, inc, page, numeric, wrap, set_default_size, set_default_action); } GtkWidget * create_spin_entry(int min, int max, int inc, int set_default_size, int set_default_action) { return _create_spin_entry(SPIN_BUTTON_TYPE_CUSTOM, min, max, inc, inc * 10, TRUE, FALSE, set_default_size, set_default_action); } static void set_custom_palette(GtkWidget *dlg) { int n; struct narray *palette; GdkRGBA *colors; palette = &(Menulocal.custom_palette); n = arraynum(palette); if (n < 1) { return; } colors = arraydata(palette); if (n >= 18) { gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(dlg), GTK_ORIENTATION_HORIZONTAL, 9, n - 9, colors); gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(dlg), GTK_ORIENTATION_HORIZONTAL, 9, 9, colors + (n - 9)); } else { gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(dlg), GTK_ORIENTATION_HORIZONTAL, 9, n - 9, colors); } } static void show_color_sel(GtkWidget *w, gpointer user_data) { GdkRGBA col; char buf[64]; gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(w), &col); snprintf(buf, sizeof(buf), "#%02X%02X%02X", nround(col.red * 255), nround(col.green * 255), nround(col.blue * 255)); gtk_widget_set_tooltip_text(w, buf); } void add_default_color(struct narray *palette) { const gchar *default_colors[9][3] = { { "#ef2929", "#cc0000", "#a40000" }, /* Scarlet Red */ { "#fcaf3e", "#f57900", "#ce5c00" }, /* Orange */ { "#fce94f", "#edd400", "#c4a000" }, /* Butter */ { "#8ae234", "#73d216", "#4e9a06" }, /* Chameleon */ { "#729fcf", "#3465a4", "#204a87" }, /* Sky Blue */ { "#ad7fa8", "#75507b", "#5c3566" }, /* Plum */ { "#e9b96e", "#c17d11", "#8f5902" }, /* Chocolate */ { "#888a85", "#555753", "#2e3436" }, /* Aluminum 1 */ { "#eeeeec", "#d3d7cf", "#babdb6" } /* Aluminum 2 */ }; GdkRGBA color; int i, j; for (j = 0; j < 3; j++) { for (i = 0; i < 9; i++) { gdk_rgba_parse(&color, default_colors[i][j]); arrayadd(palette, &color); } } } void add_default_gray(struct narray *palette) { const gchar *default_grays[9] = { "#000000", /* black */ "#2e3436", /* very dark gray */ "#555753", /* darker gray */ "#888a85", /* dark gray */ "#babdb6", /* medium gray */ "#d3d7cf", /* light gray */ "#eeeeec", /* lighter gray */ "#f3f3f3", /* very light gray */ "#ffffff" /* white */ }; GdkRGBA color; int i; for (i = 0; i < 9; i++) { gdk_rgba_parse(&color, default_grays[i]); arrayadd(palette, &color); } } static void set_default_palette(GtkWidget *cc) { struct narray palette; gint n; arrayinit(&palette, sizeof(GdkRGBA)); add_default_color(&palette); n = arraynum(&palette); gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(cc), GTK_ORIENTATION_HORIZONTAL, 9, n, arraydata(&palette)); arrayclear(&palette); add_default_gray(&palette); n = arraynum(&palette); gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(cc), GTK_ORIENTATION_HORIZONTAL, n, n, arraydata(&palette)); arraydel(&palette); } #define CUSTOM_PALETTE_KEY "custom_palette" static gboolean show_color_dialog(GtkButton *btn, GdkEvent *event, gpointer user_data) { gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(btn), GTK_ORIENTATION_HORIZONTAL, 0, 0, NULL); if (Menulocal.use_custom_palette) { set_custom_palette(GTK_WIDGET(btn)); } else { set_default_palette(GTK_WIDGET(btn)); } return FALSE; } GtkWidget * create_color_button(GtkWidget *win) { GtkWidget *w; w = gtk_color_button_new(); g_object_set_data(G_OBJECT(w), CUSTOM_PALETTE_KEY, GINT_TO_POINTER(0)); g_signal_connect(w, "color-set", G_CALLBACK(show_color_sel), win); g_signal_connect(w, "button-press-event", G_CALLBACK(show_color_dialog), win); return w; } void set_widget_font(GtkWidget *w, const char *font) { GtkCssProvider *css_provider; GError *error; char *css_str; PangoFontDescription *desc; const char *family, *style_str, *unit; PangoStyle style; PangoWeight weight; int weight_val, size; desc = pango_font_description_from_string(font); if (desc == NULL) { return; } family = pango_font_description_get_family(desc); style = pango_font_description_get_style(desc); size = pango_font_description_get_size(desc); weight = pango_font_description_get_weight(desc); switch (style) { case PANGO_STYLE_NORMAL: style_str = "normal"; break; case PANGO_STYLE_OBLIQUE: style_str = "oblique"; break; case PANGO_STYLE_ITALIC: style_str = "italic"; break; default: style_str = "normal"; break; } switch (weight) { case PANGO_WEIGHT_THIN: weight_val = 100; break; case PANGO_WEIGHT_ULTRALIGHT: weight_val = 200; break; case PANGO_WEIGHT_LIGHT: weight_val = 300; break; case PANGO_WEIGHT_SEMILIGHT: weight_val = 350; break; case PANGO_WEIGHT_BOOK: weight_val = 380; break; case PANGO_WEIGHT_NORMAL: weight_val = 400; break; case PANGO_WEIGHT_MEDIUM: weight_val = 500; break; case PANGO_WEIGHT_SEMIBOLD: weight_val = 600; break; case PANGO_WEIGHT_BOLD: weight_val = 700; break; case PANGO_WEIGHT_ULTRABOLD: weight_val = 800; break; case PANGO_WEIGHT_HEAVY: weight_val = 900; break; case PANGO_WEIGHT_ULTRAHEAVY: weight_val = 1000; break; default: weight_val = 400; break; } if (pango_font_description_get_size_is_absolute(desc)) { unit = "px"; } else { unit = "pt"; } css_str = g_strdup_printf("* {\n" " font-style: %s;\n" " font-weight: %d;\n" " font-size: %d%s;\n" " font-family: \"%s\";\n" "}", style_str, weight_val, size / PANGO_SCALE, unit, family ? family : ""); pango_font_description_free(desc); if (css_str == NULL) { return; } css_provider = gtk_css_provider_new(); if (css_provider == NULL) { return; } error = NULL; gtk_css_provider_load_from_data(css_provider, css_str, -1, &error); g_free(css_str); if (error == NULL) { gtk_style_context_add_provider(gtk_widget_get_style_context(w), GTK_STYLE_PROVIDER(css_provider), GTK_STYLE_PROVIDER_PRIORITY_USER); } } GtkWidget * create_text_view_with_line_number(GtkWidget **v) { GtkWidget *source_view, *swin; GtkSourceBuffer *buffer; source_view = gtk_source_view_new(); gtk_widget_set_hexpand(source_view, TRUE); gtk_widget_set_vexpand(source_view, TRUE); buffer = gtk_source_buffer_new(NULL); gtk_text_view_set_buffer(GTK_TEXT_VIEW(source_view), GTK_TEXT_BUFFER(buffer)); gtk_text_view_set_editable(GTK_TEXT_VIEW(source_view), FALSE); gtk_source_buffer_set_highlight_syntax(GTK_SOURCE_BUFFER(buffer), FALSE); gtk_source_view_set_show_line_numbers(GTK_SOURCE_VIEW(source_view), TRUE); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), source_view); *v = source_view; return swin; } void text_view_with_line_number_set_text(GtkWidget *view, const gchar *str) { GtkTextBuffer *buf; buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); gtk_text_buffer_set_text(buf, str, -1); } void text_view_with_line_number_set_font(GtkWidget *view, const gchar *font) { set_widget_font(view, font); } enum SELECT_OBJ_COLOR_RESULT select_obj_color(struct objlist *obj, int id, enum OBJ_FIELD_COLOR_TYPE type) { GtkWidget *dlg; int r, g, b, a, rr ,gg, bb, aa, response, modified, undo; GdkRGBA color; char *title; switch (type) { case OBJ_FIELD_COLOR_TYPE_STROKE: title = _("Stroke Color"); getobj(obj, "stroke_R", id, 0, NULL, &r); getobj(obj, "stroke_G", id, 0, NULL, &g); getobj(obj, "stroke_B", id, 0, NULL, &b); getobj(obj, "stroke_A", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_FILL: title = _("Fill Color"); getobj(obj, "fill_R", id, 0, NULL, &r); getobj(obj, "fill_G", id, 0, NULL, &g); getobj(obj, "fill_B", id, 0, NULL, &b); getobj(obj, "fill_A", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_0: title = _("Color"); getobj(obj, "R", id, 0, NULL, &r); getobj(obj, "G", id, 0, NULL, &g); getobj(obj, "B", id, 0, NULL, &b); getobj(obj, "A", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_1: title = _("Color 1"); getobj(obj, "R", id, 0, NULL, &r); getobj(obj, "G", id, 0, NULL, &g); getobj(obj, "B", id, 0, NULL, &b); getobj(obj, "A", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_2: title = _("Color 2"); getobj(obj, "R2", id, 0, NULL, &r); getobj(obj, "G2", id, 0, NULL, &g); getobj(obj, "B2", id, 0, NULL, &b); getobj(obj, "A2", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_AXIS_BASE: title = _("Axis baseline color"); getobj(obj, "R", id, 0, NULL, &r); getobj(obj, "G", id, 0, NULL, &g); getobj(obj, "B", id, 0, NULL, &b); getobj(obj, "A", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_AXIS_GAUGE: title = _("Axis gauge color"); getobj(obj, "gauge_R", id, 0, NULL, &r); getobj(obj, "gauge_G", id, 0, NULL, &g); getobj(obj, "gauge_B", id, 0, NULL, &b); getobj(obj, "gauge_A", id, 0, NULL, &a); break; case OBJ_FIELD_COLOR_TYPE_AXIS_NUM: title = _("Axis numbering color"); getobj(obj, "num_R", id, 0, NULL, &r); getobj(obj, "num_G", id, 0, NULL, &g); getobj(obj, "num_B", id, 0, NULL, &b); getobj(obj, "num_A", id, 0, NULL, &a); break; default: return SELECT_OBJ_COLOR_ERROR; } if (! Menulocal.use_opacity) { a = 255; } color.red = r / 255.0; color.green = g / 255.0; color.blue = b / 255.0; color.alpha = a / 255.0; dlg = gtk_color_chooser_dialog_new(title, GTK_WINDOW(TopLevel)); if (Menulocal.use_custom_palette) { set_custom_palette(dlg); } gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dlg), &color); gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dlg), Menulocal.use_opacity); response = ndialog_run(dlg); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dlg), &color); gtk_widget_destroy(dlg); if (response != GTK_RESPONSE_OK) { return SELECT_OBJ_COLOR_CANCEL; } rr = nround(color.red * 255); gg = nround(color.green * 255); bb = nround(color.blue * 255); aa = nround(color.alpha * 255); undo = menu_save_undo_single(UNDO_TYPE_EDIT, obj->name); switch (type) { case OBJ_FIELD_COLOR_TYPE_STROKE: putobj(obj, "stroke_R", id, &rr); putobj(obj, "stroke_G", id, &gg); putobj(obj, "stroke_B", id, &bb); putobj(obj, "stroke_A", id, &aa); break; case OBJ_FIELD_COLOR_TYPE_FILL: putobj(obj, "fill_R", id, &rr); putobj(obj, "fill_G", id, &gg); putobj(obj, "fill_B", id, &bb); putobj(obj, "fill_A", id, &aa); break; case OBJ_FIELD_COLOR_TYPE_0: case OBJ_FIELD_COLOR_TYPE_1: case OBJ_FIELD_COLOR_TYPE_AXIS_BASE: putobj(obj, "R", id, &rr); putobj(obj, "G", id, &gg); putobj(obj, "B", id, &bb); putobj(obj, "A", id, &aa); break; case OBJ_FIELD_COLOR_TYPE_2: putobj(obj, "R2", id, &rr); putobj(obj, "G2", id, &gg); putobj(obj, "B2", id, &bb); putobj(obj, "A2", id, &aa); break; case OBJ_FIELD_COLOR_TYPE_AXIS_GAUGE: putobj(obj, "gauge_R", id, &rr); putobj(obj, "gauge_G", id, &gg); putobj(obj, "gauge_B", id, &bb); putobj(obj, "gauge_A", id, &aa); break; case OBJ_FIELD_COLOR_TYPE_AXIS_NUM: putobj(obj, "num_R", id, &rr); putobj(obj, "num_G", id, &gg); putobj(obj, "num_B", id, &bb); putobj(obj, "num_A", id, &aa); break; default: return SELECT_OBJ_COLOR_ERROR; } if (rr == r && gg == g && bb == b && aa == a) { modified = SELECT_OBJ_COLOR_SAME; menu_delete_undo(undo); } else { modified = SELECT_OBJ_COLOR_DIFFERENT; } return modified; } gchar * get_text_from_buffer(GtkTextBuffer *buffer) { GtkTextIter start, end; gtk_text_buffer_get_start_iter(buffer, &start); gtk_text_buffer_get_end_iter(buffer, &end); return gtk_text_buffer_get_text(buffer, &start, &end, FALSE); } static void add_button_common(GtkWidget *w, GtkWidget *grid, int row, int col, const char *tooltip, GCallback proc, gpointer data) { gtk_widget_set_tooltip_text(GTK_WIDGET(w), tooltip); gtk_widget_set_vexpand(GTK_WIDGET(w), FALSE); gtk_widget_set_valign(GTK_WIDGET(w), GTK_ALIGN_CENTER); gtk_widget_set_hexpand(GTK_WIDGET(w), FALSE); gtk_widget_set_halign(GTK_WIDGET(w), GTK_ALIGN_START); gtk_grid_attach(GTK_GRID(grid), w, col, row, 1, 1); if (proc) { g_signal_connect(w, "clicked", proc, data); } } GtkWidget * add_button(GtkWidget *grid, int row, int col, const char *icon, const char *tooltip, GCallback proc, gpointer data) { GtkWidget *w; w = gtk_button_new_from_icon_name(icon, GTK_ICON_SIZE_BUTTON); add_button_common(w, grid, row, col, tooltip, proc, data); return w; } GtkWidget * add_toggle_button(GtkWidget *grid, int row, int col, const char *icon_name, const char *tooltip, GCallback proc, gpointer data) { GtkWidget *w, *icon; w = gtk_toggle_button_new(); icon = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_BUTTON); gtk_button_set_image(GTK_BUTTON(w), icon); add_button_common(w, grid, row, col, tooltip, NULL, NULL); if (proc) { g_signal_connect(w, "toggled", proc, data); } return w; } void add_event_key(GtkWidget *widget, GCallback press_proc, GCallback release_proc, gpointer user_data) { GtkEventController *ev; ev = gtk_event_controller_key_new(widget); if (press_proc) { g_signal_connect(ev, "key-pressed", press_proc, user_data); } if (release_proc) { g_signal_connect(ev, "key-released", release_proc, user_data); } } ngraph-gtk-6.09.05/src/gtk/ogra2gdk.h0000644000175000017500000000036013070106167014103 00000000000000/* * $Id: ogra2gdk.h,v 1.2 2008-09-11 07:07:22 hito Exp $ */ #ifndef _O_GRA2GDK_HEADER #define _O_GRA2GDK_HEADER cairo_surface_t *gra2gdk_create_pixmap(struct gra2cairo_local *local, int w, int h, double r, double g, double b); #endif ngraph-gtk-6.09.05/src/gtk/gtk_ruler.h0000644000175000017500000000043513070106167014404 00000000000000#ifndef GTK_RULER_HEADER #define GTK_RULER_HEADER #include GtkWidget *nruler_new(GtkOrientation orientation); void nruler_set_range(GtkWidget *ruler, double lower, double upper); void nruler_set_position(GtkWidget *ruler, double position); #endif /* GTK_RULER_HEADER */ ngraph-gtk-6.09.05/src/gtk/x11merge.c0000644000175000017500000003445214105343057014041 00000000000000/* * $Id: x11merge.c,v 1.33 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include "object.h" #include "nstring.h" #include "ioutil.h" #include "gtk_liststore.h" #include "gtk_subwin.h" #include "gtk_widget.h" #include "x11bitmp.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "ox11menu.h" #include "x11file.h" #include "x11merge.h" #include "x11commn.h" #include "x11view.h" static n_list_store Mlist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {N_("file"), G_TYPE_STRING, TRUE, TRUE, "file"}, {N_("top"), G_TYPE_DOUBLE, TRUE, TRUE, "top_margin", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {N_("left"), G_TYPE_DOUBLE, TRUE, TRUE, "left_margin", - SPIN_ENTRY_MAX, SPIN_ENTRY_MAX, 100, 1000}, {N_("zoom_x"), G_TYPE_DOUBLE, TRUE, TRUE, "zoom_x", 0, SPIN_ENTRY_MAX, 100, 1000}, {N_("zoom_y"), G_TYPE_DOUBLE, TRUE, TRUE, "zoom_y", 0, SPIN_ENTRY_MAX, 100, 1000}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, }; #define MERG_WIN_COL_NUM (sizeof(Mlist)/sizeof(*Mlist)) #define MERG_WIN_COL_OID (MERG_WIN_COL_NUM - 1) #define MERG_WIN_COL_HIDDEN 0 #define MERG_WIN_COL_ID 1 #define MERG_WIN_COL_FILE 2 static void merge_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static struct subwin_popup_list Popup_list[] = { {N_("_Add"), G_CALLBACK(CmMergeOpen), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Duplicate"), G_CALLBACK(list_sub_window_copy), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Delete"), G_CALLBACK(list_sub_window_delete), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {"_Focus", G_CALLBACK(list_sub_window_focus), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("focus _All"), G_CALLBACK(list_sub_window_focus_all), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Preferences"), G_CALLBACK(list_sub_window_update), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Instance name"), G_CALLBACK(list_sub_window_object_name), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Top"), G_CALLBACK(list_sub_window_move_top), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Up"), G_CALLBACK(list_sub_window_move_up), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Down"), G_CALLBACK(list_sub_window_move_down), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Bottom"), G_CALLBACK(list_sub_window_move_last), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_END}, }; #define POPUP_ITEM_NUM (sizeof(Popup_list) / sizeof(*Popup_list) - 1) #define POPUP_ITEM_FOCUS_ALL 5 #define POPUP_ITEM_TOP 9 #define POPUP_ITEM_UP 10 #define POPUP_ITEM_DOWN 11 #define POPUP_ITEM_BOTTOM 12 static void MergeDialogSetupItem(struct MergeDialog *d, int file, int id) { double zm_x, zm_y; if (file) { SetWidgetFromObjField(d->file, d->Obj, id, "file"); gtk_editable_set_position(GTK_EDITABLE(d->file), -1); } SetWidgetFromObjField(d->topmargin, d->Obj, id, "top_margin"); SetWidgetFromObjField(d->leftmargin, d->Obj, id, "left_margin"); SetWidgetFromObjField(d->zoom_x, d->Obj, id, "zoom_x"); SetWidgetFromObjField(d->zoom_y, d->Obj, id, "zoom_y"); zm_x = gtk_spin_button_get_value(GTK_SPIN_BUTTON(d->zoom_x)); zm_y = gtk_spin_button_get_value(GTK_SPIN_BUTTON(d->zoom_y)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->link), zm_x == zm_y); } static void MergeDialogCopy(GtkWidget *w, gpointer data) { struct MergeDialog *d; int sel; d = (struct MergeDialog *) data; sel = CopyClick(d->widget, d->Obj, d->Id, MergeFileCB); if (sel != -1) { MergeDialogSetupItem(d, FALSE, sel); } } static void zoom_changed(GtkSpinButton *spin_button, gpointer user_data) { struct MergeDialog *d; int linked; double zoom; d = user_data; linked = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->link)); if (! linked) { return; } zoom = gtk_spin_button_get_value(spin_button); gtk_spin_button_set_value(GTK_SPIN_BUTTON(d->zoom_y), zoom); } static void link_toggled(GtkToggleButton *button, gpointer user_data) { struct MergeDialog *d; int linked; d = user_data; linked = gtk_toggle_button_get_active(button); gtk_widget_set_sensitive(d->zoom_y, ! linked); if (linked) { zoom_changed(GTK_SPIN_BUTTON(d->zoom_x), user_data); } } static void MergeDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct MergeDialog *d; char title[64]; d = (struct MergeDialog *) data; snprintf(title, sizeof(title), _("Merge %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *frame, *table; int i; table = gtk_grid_new(); i = 0; w = create_file_entry(d->Obj); add_widget_to_table(table, w, _("_File:"), TRUE, i++); d->file = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("_Top Margin:"), FALSE, i++); d->topmargin = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_POSITION, TRUE, TRUE); add_widget_to_table(table, w, _("_Left Margin:"), FALSE, i++); d->leftmargin = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); add_widget_to_table(table, w, _("zoom _X:"), FALSE, i++); g_signal_connect(w, "value-changed", G_CALLBACK(zoom_changed), d); d->zoom_x = w; d->link = add_toggle_button(table, i++, 1, NGRAPH_LINK_ICON, _("Link"), G_CALLBACK(link_toggled), d); w = create_spin_entry_type(SPIN_BUTTON_TYPE_PERCENT, TRUE, TRUE); add_widget_to_table(table, w, _("zoom _Y:"), FALSE, i++); d->zoom_y = w; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); gtk_box_pack_start(GTK_BOX(d->vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(MergeDialogCopy), d, "merge"); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } MergeDialogSetupItem(d, TRUE, d->Id); } static void MergeDialogClose(GtkWidget *w, void *data) { struct MergeDialog *d; int ret; d = (struct MergeDialog *) data; switch(d->ret) { case IDOK: break; default: return; } ret = d->ret; d->ret = IDLOOP; if (SetObjFieldFromWidget(d->file, d->Obj, d->Id, "file")) return; if (SetObjFieldFromWidget(d->topmargin, d->Obj, d->Id, "top_margin")) return; if (SetObjFieldFromWidget(d->leftmargin, d->Obj, d->Id, "left_margin")) return; if (SetObjFieldFromWidget(d->zoom_x, d->Obj, d->Id, "zoom_x")) return; if (SetObjFieldFromWidget(d->zoom_y, d->Obj, d->Id, "zoom_y")) return; d->ret = ret; } void MergeDialog(struct obj_list_data *data, int id, int user_data) { struct MergeDialog *d; d = (struct MergeDialog *) data->dialog; d->SetupWindow = MergeDialogSetup; d->CloseWindow = MergeDialogClose; d->Obj = data->obj; d->Id = id; } void CmMergeOpen(void *w, gpointer client_data) { struct objlist *obj; char *name = NULL; int id, undo; if (Menulock || Globallock) return; if ((obj = chkobject("merge")) == NULL) return; if (nGetOpenFileName(TopLevel, _("Add Merge file"), "gra", NULL, NULL, &name, TRUE, Menulocal.changedirectory) != IDOK || ! name) return; undo = menu_save_undo_single(UNDO_TYPE_CREATE, obj->name); id = newobj(obj); if (id >= 0) { int ret; changefilename(name); putobj(obj, "file", id, name); MergeDialog(NgraphApp.MergeWin.data.data, id, -1); ret = DialogExecute(TopLevel, &DlgMerge); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); } } else { g_free(name); } MergeWinUpdate(NgraphApp.MergeWin.data.data, TRUE, DRAW_NOTIFY); } void CmMergeClose(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("merge")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("close merge file (multi select)"), MergeFileCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i, num, *array; num = arraynum(&farray); if (num > 0) { menu_save_undo_single(UNDO_TYPE_DELETE, obj->name); } array = arraydata(&farray); for (i = num - 1; i >= 0; i--) { delobj(obj, array[i]); set_graph_modified(); } MergeWinUpdate(NgraphApp.MergeWin.data.data, TRUE, TRUE); } arraydel(&farray); } void CmMergeUpdate(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; int modified; if (Menulock || Globallock) return; if ((obj = chkobject("merge")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("merge file property (multi select)"), MergeFileCB, (struct narray *) &farray, NULL); modified = FALSE; if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i, *array, num; num = arraynum(&farray); if (num > 0) { menu_save_undo_single(UNDO_TYPE_EDIT, obj->name); } array = arraydata(&farray); for (i = 0; i < num; i++) { int ret; MergeDialog(NgraphApp.MergeWin.data.data, array[i], -1); ret = DialogExecute(TopLevel, &DlgMerge); if (ret != IDCANCEL) { modified = TRUE; } } if (modified) { MergeWinUpdate(NgraphApp.MergeWin.data.data, TRUE, TRUE); } } arraydel(&farray); } void MergeWinUpdate(struct obj_list_data *d, int clear, int draw) { int redraw; if (Menulock || Globallock) return; if (d == NULL) return; if (list_sub_window_must_rebuild(d)) { list_sub_window_build(d, merge_list_set_val); } else { list_sub_window_set(d, merge_list_set_val); } if (! clear && d->select >= 0) { list_store_select_int(GTK_WIDGET(d->text), MERG_WIN_COL_ID, d->select); } switch (draw) { case DRAW_REDRAW: getobj(Menulocal.obj, "redraw_flag", 0, 0, NULL, &redraw); if (redraw) { // NgraphApp.Viewer.allclear = TRUE; update_viewer(d); } else { draw_notify(TRUE); } break; case DRAW_NOTIFY: draw_notify(TRUE); break; } } static void merge_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx; unsigned int i = 0; char *file, *bfile; for (i = 0; i < MERG_WIN_COL_NUM; i++) { switch (i) { case MERG_WIN_COL_FILE: getobj(d->obj, "file", row, 0, NULL, &file); bfile = getbasename(file); if (bfile) { list_store_set_string(GTK_WIDGET(d->text), iter, i, CHK_STR(bfile)); g_free(bfile); } else { list_store_set_string(GTK_WIDGET(d->text), iter, i, FILL_STRING); } break; case MERG_WIN_COL_HIDDEN: getobj(d->obj, Mlist[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_val(GTK_WIDGET(d->text), iter, i, Mlist[i].type, &cx); break; default: if (Mlist[i].type == G_TYPE_DOUBLE) { getobj(d->obj, Mlist[i].name, row, 0, NULL, &cx); list_store_set_double(GTK_WIDGET(d->text), iter, i, cx / 100.0); } else { getobj(d->obj, Mlist[i].name, row, 0, NULL, &cx); list_store_set_val(GTK_WIDGET(d->text), iter, i, Mlist[i].type, &cx); } } } } static void popup_show_cb(GtkWidget *widget, gpointer user_data) { unsigned int i; int sel, num, last_id; struct obj_list_data *d; d = (struct obj_list_data *) user_data; sel = d->select; num = chkobjlastinst(d->obj); for (i = 1; i < POPUP_ITEM_NUM; i++) { switch (i) { case POPUP_ITEM_FOCUS_ALL: last_id = chkobjlastinst(d->obj); gtk_widget_set_sensitive(d->popup_item[i], last_id >= 0); break; case POPUP_ITEM_TOP: case POPUP_ITEM_UP: gtk_widget_set_sensitive(d->popup_item[i], sel > 0 && sel <= num); break; case POPUP_ITEM_DOWN: case POPUP_ITEM_BOTTOM: gtk_widget_set_sensitive(d->popup_item[i], sel >= 0 && sel < num); break; default: gtk_widget_set_sensitive(d->popup_item[i], sel >= 0 && sel <= num); } } } static void drag_drop_cb(GtkWidget *w, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { gchar **filenames; switch (info) { case DROP_TYPE_FILE: filenames = gtk_selection_data_get_uris(data); if (filenames) { int num; num = g_strv_length(filenames); data_dropped(filenames, num, FILE_TYPE_MERGE); g_strfreev(filenames); } gtk_drag_finish(context, TRUE, FALSE, time); break; } } static void init_dnd(struct SubWin *d) { GtkWidget *widget; GtkTargetEntry target[] = { {"text/uri-list", 0, DROP_TYPE_FILE}, }; widget = d->data.data->text; gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL, target, sizeof(target) / sizeof(*target), GDK_ACTION_COPY); g_signal_connect(widget, "drag-data-received", G_CALLBACK(drag_drop_cb), NULL); } GtkWidget * create_merge_list(struct SubWin *d) { if (d->Win) { return d->Win; } list_sub_window_create(d, MERG_WIN_COL_NUM, Mlist); d->data.data->update = MergeWinUpdate; d->data.data->setup_dialog = MergeDialog; d->data.data->dialog = &DlgMerge; d->data.data->obj = chkobject("merge"); sub_win_create_popup_menu(d->data.data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); init_dnd(d); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(d->data.data->text), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(d->data.data->text), MERG_WIN_COL_FILE); tree_view_set_tooltip_column(GTK_TREE_VIEW(d->data.data->text), MERG_WIN_COL_FILE); return d->Win; } ngraph-gtk-6.09.05/src/gtk/x11dialg.h0000644000175000017500000004325014142161773014027 00000000000000/* * $Id: x11dialg.h,v 1.57 2010-02-03 01:18:12 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #ifndef GTK_DIALOG_HEADER #define GTK_DIALOG_HEADER #include "common.h" #include #include #include "object.h" #include "ofit.h" #include "ogra2cairo.h" #include "x11menu.h" #define MATH_FNC_NUM 5 #define AXIS_SELECTION_LIMIT 6 #define LINE_STYLE_ELEMENT_MAX 6 struct line_style { char *name, *list; int nlist[LINE_STYLE_ELEMENT_MAX]; int num; }; extern struct line_style FwLineStyle[]; extern char *FwNumStyle[]; extern int FwNumStyleNum; enum AXIS_COMBO_BOX_FLAGS { AXIS_COMBO_BOX_NONE = 0, AXIS_COMBO_BOX_USE_OID = 1, AXIS_COMBO_BOX_ADD_NONE = 2, }; #define N_RESPONSE_ALL 1 void initdialog(void); int CopyClick(GtkWidget *parent, struct objlist *obj, int Id, char *(*callback) (struct objlist *, int)); int SetObjFieldFromWidget(GtkWidget *w, struct objlist *Obj, int Id, char *field); void SetWidgetFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field); int SetObjPointsFromText(GtkWidget *w, struct objlist *Obj, int Id, char *field); void SetTextFromObjPoints(GtkWidget *w, struct objlist *Obj, int Id, char *field); int SetObjFieldFromStyle(GtkWidget *w, struct objlist *Obj, int Id, char *field); void SetStyleFromObjField(GtkWidget *w, struct objlist *Obj, int Id, char *field); GtkWidget *axis_combo_box_create(int flags); void axis_combo_box_setup(GtkWidget *cbox, struct objlist *obj, int id, const char *field); int SetObjAxisFieldFromWidget(GtkWidget *w, struct objlist *obj, int id, char *field); struct compatible_font_info *SetFontListFromObj(GtkWidget *w, struct objlist *obj, int id, const char *name); void SetObjFieldFromFontList(GtkWidget *w, struct objlist *obj, int id, char *name); void set_color(GtkWidget *w, struct objlist *obj, int id, char *prefix); void set_color2(GtkWidget *w, struct objlist *obj, int id); void set_fill_color(GtkWidget *w, struct objlist *obj, int id); void set_stroke_color(GtkWidget *w, struct objlist *obj, int id); int putobj_color(GtkWidget *w, struct objlist *obj, int id, char *prefix); int putobj_color2(GtkWidget *w, struct objlist *obj, int id); int putobj_fill_color(GtkWidget *w, struct objlist *obj, int id); int putobj_stroke_color(GtkWidget *w, struct objlist *obj, int id); int chk_sputobjfield(struct objlist *obj, int id, char *field, char *str); int get_style_index(struct objlist *obj, int id, char *field); const char *get_style_string(struct objlist *obj, int id, char *field); #define DIALOG_PROTOTYPE GtkWidget *parent, *widget, *focus; \ GtkBox *vbox;\ int ret, show_cancel;\ char *resource, *ok_button;\ void (*SetupWindow) (GtkWidget *w, void *data, int makewidget);\ void (*CloseWindow) (GtkWidget *w, void *data);\ struct DialogType { DIALOG_PROTOTYPE; }; struct MarkDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *parnet, *toggle[MARK_TYPE_NUM]; int Type, cb_respond; }; void MarkDialog(struct MarkDialog *data, GtkWidget *parent, int type); struct FileMath { GtkWidget *xsmooth, *x, *ysmooth, *averaging_type, *y, *f, *g, *h, *text_x, *text_y, *text_f, *text_g, *text_h; int tab_id; }; struct FileLoad { GtkWidget *headskip, *readstep, *finalline, *remark, *ifs, *csv; int tab_id; }; struct FileMask { GtkWidget *line, *list; int changed, tab_id; }; struct FileMove { GtkWidget *line, *x, *y, *list; int changed, tab_id; }; struct FileDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *file, *load_settings, *fit, *xcol, *xaxis, *ycol, *yaxis, *type, *mark_btn, *curve, *col1, *col2, *math_input_tab, *clip, *style, *size, *miter, *join, *min, *max, *div, *comment_box, *file_box, *fit_table, *width, *apply_all, *comment_view, *comment_table; GtkNotebook *tab, *math_tab; struct objlist *Obj; int Id, source, math_page; struct MarkDialog mark; int R, G, B, R2, G2, B2, alpha, multi_open, fit_row, initialized; struct FileMath math; struct FileLoad load; struct FileMask mask; struct FileMove move; char *head_lines; }; void FileDialog(struct obj_list_data *data, int id, int multi); struct EvalDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list; struct narray *sel; struct objlist *Obj; int Num; }; void EvalDialog(struct EvalDialog *data, struct objlist *obj, int num, struct narray *iarray); struct MathDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list, *func[MATH_FNC_NUM]; struct objlist *Obj; int Mode, modified; }; void MathDialog(struct MathDialog *data, struct objlist *obj); struct MathTextDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list, *text, *tree, *input_tab; GList *id_list; struct objlist *Obj; char *Text; int Mode, modified, page; }; void MathTextDialog(struct MathTextDialog *data, char *text, int mode, struct objlist *obj, GList *list, GtkWidget *tree); #define FIT_PARM_NUM FIT_DIMENSION_MAX struct FitDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *type, *through_point, *x, *y, *dim, *weight, *min, *max, *div, *interpolation, *formula, *converge, *derivatives, *p[FIT_PARM_NUM], *d[FIT_PARM_NUM], *through_box, *usr_def_frame, *usr_def_prm_tbl, *func_label; struct objlist *Obj; int Id; int Lastid; }; void FitDialog(struct FitDialog *data, struct objlist *obj, int id); struct FitLoadDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list; struct objlist *Obj; int Sid; int sel; }; void FitLoadDialog(struct FitLoadDialog *data, struct objlist *obj, int sid); struct FitSaveDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *profile; struct objlist *Obj; int Sid; char *Profile; }; void FitSaveDialog(struct FitSaveDialog *data, struct objlist *obj, int sid); struct SectionDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *x, *y, *w, *h, *xid, *yid, *rid, *uid, *gid, *width, *height, *xaxis, *yaxis, *uaxis, *raxis, *grid; int Section; int X, Y, LenX, LenY, X0, Y0, LenX0, LenY0; int IDX, IDY, IDU, IDR, *IDG; struct objlist *Obj, *Obj2; int MaxX, MaxY; }; void SectionDialog(struct SectionDialog *data, int x, int y, int lenx, int leny, struct objlist *obj, int idx, int idy, int idu, int idr, struct objlist *obj2, int *idg, int section); struct CrossDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *x, *y, *w, *h, *xid, *yid, *width, *height, *xaxis, *yaxis; int X, Y, LenX, LenY, X0, Y0, LenX0, LenY0; int IDX, IDY; struct objlist *Obj; int MaxX, MaxY; }; void CrossDialog(struct CrossDialog *data, int x, int y, int lenx, int leny, struct objlist *obj, int idx, int idy); struct AxisBase { GtkWidget *style, *width, *color, *arrow, *arrowlen, *arrowwid, *wave, *wavelen, *wavewid, *baseline; int R, G, B, alpha, tab_id; }; struct AxisPos { GtkWidget *x, *y, *len, *direction, *adjust, *adjustpos; int tab_id; }; struct AxisFont { GtkWidget *space, *pt, *script, *font, *color, *font_bold, *font_italic; int R, G, B, alpha, tab_id; }; struct AxisNumbering { GtkWidget *num, *begin, *ster, *numnum, *head, *fraction, *add_plus, *tail, *date_format, *align, *direction, *shiftp, *shiftn, *log_power, *no_zero, *norm, *step, *math; int tab_id; }; #define GAUGE_STYLE_NUM 3 struct AxisGauge { GtkWidget *length[GAUGE_STYLE_NUM], *width[GAUGE_STYLE_NUM], *gauge, *min, *max, *style, *color; int R, G, B, alpha, tab_id; }; struct AxisDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *min, *max, *inc, *div, *scale, *ref, *clear, *margin; GtkNotebook *tab; struct objlist *Obj; int Id; struct AxisBase base; struct AxisFont font; struct AxisPos position; struct AxisGauge gauge; struct AxisNumbering numbering; }; void AxisDialog(struct obj_list_data *data, int id, int sub_id); #define GRID_DIALOG_STYLE_NUM 3 struct GridDialog { DIALOG_PROTOTYPE; /****** local member *******/ struct objlist *Obj; GtkWidget *style[GRID_DIALOG_STYLE_NUM], *width[GRID_DIALOG_STYLE_NUM], *axisx, *axisy, *background, *color, *bcolor, *draw_x, *draw_y; int Id; int R, G, B, R2, G2, B2, A; }; void GridDialog(struct GridDialog *data, struct objlist *obj, int id); struct ZoomDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *zoom_entry; int zoom; }; void ZoomDialog(struct ZoomDialog *data); struct MergeDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *file, *topmargin, *leftmargin, *zoom_x, *zoom_y, *link; struct objlist *Obj; int Id; }; void MergeDialog(struct obj_list_data *data, int id, int Sub_id); struct ParameterDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *type, *start, *stop, *transition, *transition_step, *min, *max, *step, *wait, *checked, *selected, *value, *items, *redraw, *title, *stack, *wrap; struct objlist *Obj; int Id; }; void ParameterDialog(struct obj_list_data *data, int id, int Sub_id); struct LegendDialog { DIALOG_PROTOTYPE; /****** local member *******/ char *(* prop_cb) (struct objlist *obj, int id); GtkWidget *path_type, *style, *points, *interpolation, *width, *miter, *join, *color, *color2, *stroke_color, *fill_color, *x, *y, *x1, *y1, *x2, *y2, *rx, *ry, *angle1, *angle2, *pieslice, *close_path, *stroke, *fill, *fill_rule, *marker_begin, *marker_end, *arrow_length, *arrow_width, *size, *type, *view, *text, *pt, *mark_type_begin, *mark_type_end, *space, *script_size, *direction, *raw, *font, *font_bold, *font_italic; struct objlist *Obj; int Id; int R, G, B, R2, G2, B2, fill_R, fill_G, fill_B, alpha, wid, ang; struct MarkDialog mark, mark_begin, mark_end; cairo_surface_t *arrow_pixmap; }; void LegendArrowDialog(struct LegendDialog *data, struct objlist *obj, int id); void LegendRectDialog(struct LegendDialog *data, struct objlist *obj, int id); void LegendArcDialog(struct LegendDialog *data, struct objlist *obj, int id); void LegendMarkDialog(struct LegendDialog *data, struct objlist *obj, int id); void LegendTextDialog(struct LegendDialog *data, struct objlist *obj, int id); struct LegendGaussDialog { DIALOG_PROTOTYPE; /****** local member *******/ GSList *func_list, *dir_list; GtkWidget *style, *div, *color, *width, *miter, *join, *sch, *scv, *view; int R, G, B, A; struct objlist *Obj; int Id; int Minx, Miny, Wdx, Wdy; int Div, Dir; int Mode; double Position, Param; int alloc; }; void LegendGaussDialog(struct LegendGaussDialog *data, struct objlist *obj, int id, int minx, int miny, int wdx, int wdy); struct PageDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *leftmargin, *topmargin, *paperwidth, *paperheight, *paperzoom, *paper, *decimalsign, *portrait, *landscape; int new_graph; }; void PageDialog(struct PageDialog *data, int new_graph); struct SwitchDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *drawlist, *objlist, *top, *up, *down, *bottom, *del, *ins, *add; int btn_lock; struct narray drawrable; struct narray idrawrable; }; void SwitchDialog(struct SwitchDialog *data); struct DirectoryDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *dir, *dir_label; }; void DirectoryDialog(struct DirectoryDialog *data); struct LoadDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *expand_file, *load_path, *dir; int expand; char *exdir; int loadpath; int Id; }; void LoadDialog(struct LoadDialog *data); struct SaveDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *path, *include_data, *include_merge; int Path; int *SaveData, *SaveMerge; }; void SaveDialog(struct SaveDialog *data, int *sdata, int *smerge); struct OutputDataDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *div_entry; int div; }; void OutputDataDialog(struct OutputDataDialog *data, int div); struct DefaultDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *viewer, *addin_script, *misc, *external_viewer, *fonts; }; void DefaultDialog(struct DefaultDialog *data); struct SetScriptDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *addins, *name, *script, *option, *description; struct script *Script; }; void SetScriptDialog(struct SetScriptDialog *data, struct script *sc); struct PrefScriptDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list, *update_b, *del_b, *up_b, *down_b; }; void PrefScriptDialog(struct PrefScriptDialog *data); struct PrefFontDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list, *update_b, *del_b, *up_b, *down_b; }; void PrefFontDialog(struct PrefFontDialog *data); struct FontSettingDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *list, *alias, *font_b, *add_b, *del_b, *up_b, *down_b; const gchar *alias_str, *font_str, *alternative_str; int is_update; }; void FontSettingDialog(struct FontSettingDialog *d, const char *alias, const char *font, const char *alternative); struct MiscDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *editor, *directory, *path, *datafile, *expand, *expanddir, *loadpath, *mergefile, *coordwin_font, *infowin_font, *file_preview_font, *hist_size, *info_size, *data_head_lines, *help_browser, *browser, *use_opacity, *select_data, *use_custom_palette, *use_dark_theme, *source_style, *decimalsign; struct objlist *Obj; struct narray tmp_palette; int Id; }; void MiscDialog(struct MiscDialog *data, struct objlist *obj, int id); struct ExViewerDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *dpi, *width, *height, *use_external; struct objlist *Obj; int Id; }; void ExViewerDialog(struct ExViewerDialog *data); struct ViewerDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *dpi, *loadfile, *grid, *data_num, *antialias, *fftype, *bgcol, *preserve_width; struct objlist *Obj; int Id; int Clear; int dpis; }; void ViewerDialog(struct ViewerDialog *data, struct objlist *obj, int id); struct SelectDialog { DIALOG_PROTOTYPE; /****** local member *******/ struct narray *sel, *isel; struct objlist *Obj; char *Field; GtkWidget *list; const char *title; char *(*cb) (struct objlist * obj, int id); }; void SelectDialog(struct SelectDialog *data, struct objlist *obj, const char *title, char *(*callback) (struct objlist * obj, int id), struct narray *array, struct narray *iarray); struct CopyDialog { DIALOG_PROTOTYPE; /****** local member *******/ struct objlist *Obj; int Id; int sel; GtkWidget *list; const char *title; char *(*cb) (struct objlist * obj, int id); }; void CopyDialog(struct CopyDialog *data, struct objlist *obj, int id, const char *title, char *(*callback) (struct objlist * obj, int id)); struct OutputImageDialog { DIALOG_PROTOTYPE; /****** local member *******/ GtkWidget *version, *t2p, *dpi, *use_opacity; int Version, text2path, Dpi, DlgType, UseOpacity; }; void OutputImageDialog(struct OutputImageDialog *data, int type); extern struct FileDialog DlgFile; extern struct FileDialog DlgRange; extern struct FileDialog DlgArray; extern struct FileDialog DlgFileDef; extern struct EvalDialog DlgEval; extern struct MathDialog DlgMath; extern struct MathTextDialog DlgMathText; extern struct FitDialog DlgFit; extern struct FitLoadDialog DlgFitLoad; extern struct FitSaveDialog DlgFitSave; extern struct FileMoveDialog DlgFileMove; extern struct FileMaskDialog DlgFileMask; extern struct SectionDialog DlgSection; extern struct CrossDialog DlgCross; extern struct AxisDialog DlgAxis; extern struct GridDialog DlgGrid; extern struct GridDialog DlgGridDef; extern struct ZoomDialog DlgZoom; extern struct AxisBaseDialog DlgAxisBase; extern struct AxisPosDialog DlgAxisPos; extern struct NumDialog DlgNum; extern struct AxisFontDialog DlgAxisFont; extern struct GaugeDialog DlgGauge; extern struct MergeDialog DlgMerge; extern struct ParameterDialog DlgParameter; extern struct LegendDialog DlgLegendArrow; extern struct LegendDialog DlgLegendRect; extern struct LegendDialog DlgLegendArc; extern struct LegendDialog DlgLegendMark; extern struct LegendDialog DlgLegendText; extern struct LegendDialog DlgLegendTextDef; extern struct LegendGaussDialog DlgLegendGauss; extern struct PageDialog DlgPage; extern struct SwitchDialog DlgSwitch; extern struct DirectoryDialog DlgDirectory; extern struct LoadDialog DlgLoad; extern struct SaveDialog DlgSave; extern struct OutputDataDialog DlgOutputData; extern struct DefaultDialog DlgDefault; extern struct SetScriptDialog DlgSetScript; extern struct PrefScriptDialog DlgPrefScript; extern struct PrefFontDialog DlgPrefFont; extern struct FontSettingDialog DlgFontSetting; extern struct MiscDialog DlgMisc; extern struct ExViewerDialog DlgExViewer; extern struct ViewerDialog DlgViewer; extern struct SelectDialog DlgSelect; extern struct CopyDialog DlgCopy; extern struct OutputImageDialog DlgImageOut; #endif ngraph-gtk-6.09.05/src/gtk/x11print.h0000644000175000017500000000231713070106167014075 00000000000000/* * $Id: x11print.h,v 1.7 2008-09-12 09:12:08 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define PRINT_SHOW_DIALOG_NONE 0 #define PRINT_SHOW_DIALOG_PREVIEW 1 #define PRINT_SHOW_DIALOG_DIALOG 2 void CmOutputPrinter(int select_file, int show_dialog); void CmOutputMenu(void *w, gpointer client_data); void CmOutputViewerB(void *w, gpointer client_data); void CmOutputPrinterB(void *wi, gpointer client_data); ngraph-gtk-6.09.05/src/gtk/x11file.c0000644000175000017500000047702214134715017013666 00000000000000// -*- coding: utf-8 -*- /* * $Id: x11file.c,v 1.136 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "gtk_common.h" #include #include #include #include #include #include #include #include "gtk_entry_completion.h" #include "gtk_liststore.h" #include "gtk_subwin.h" #include "gtk_combo.h" #include "gtk_widget.h" #include "shell.h" #include "object.h" #include "ioutil.h" #include "nstring.h" #include "mathfn.h" #include "gra.h" #include "spline.h" #include "nconfig.h" #include "odata.h" #include "ofit.h" #include "math_equation.h" #include "x11bitmp.h" #include "x11gui.h" #include "x11dialg.h" #include "x11menu.h" #include "ogra2cairo.h" #include "ogra2gdk.h" #include "ox11menu.h" #include "x11graph.h" #include "x11view.h" #include "x11file.h" #include "x11commn.h" #include "sourcecompletionwords.h" #include "completion_info.h" static n_list_store Flist[] = { {" ", G_TYPE_BOOLEAN, TRUE, TRUE, "hidden"}, {"#", G_TYPE_INT, TRUE, FALSE, "id"}, {N_("file/range"), G_TYPE_STRING, TRUE, TRUE, "file", 0, 0, 0, 0, PANGO_ELLIPSIZE_END}, {"x ", G_TYPE_INT, TRUE, TRUE, "x", 0, 999, 1, 10}, {"y ", G_TYPE_INT, TRUE, TRUE, "y", 0, 999, 1, 10}, {N_("ax"), G_TYPE_PARAM, TRUE, TRUE, "axis_x"}, {N_("ay"), G_TYPE_PARAM, TRUE, TRUE, "axis_y"}, {N_("type"), G_TYPE_OBJECT, TRUE, TRUE, "type"}, {N_("size"), G_TYPE_DOUBLE, TRUE, TRUE, "mark_size", 0, SPIN_ENTRY_MAX, 100, 1000}, {N_("width"), G_TYPE_DOUBLE, TRUE, TRUE, "line_width", 0, SPIN_ENTRY_MAX, 10, 100}, {N_("skip"), G_TYPE_INT, TRUE, TRUE, "head_skip", 0, INT_MAX, 1, 10}, {N_("step"), G_TYPE_INT, TRUE, TRUE, "read_step", 1, INT_MAX, 1, 10}, {N_("final"), G_TYPE_INT, TRUE, TRUE, "final_line", INT_MIN, INT_MAX, 1, 10}, {N_("num"), G_TYPE_INT, TRUE, FALSE, "data_num"}, {"^#", G_TYPE_INT, TRUE, FALSE, "oid"}, {"masked", G_TYPE_INT, FALSE, FALSE, "masked"}, {"tip", G_TYPE_STRING, FALSE, FALSE, "file"}, {"not_func", G_TYPE_INT, FALSE, FALSE, "source"}, {"is_file", G_TYPE_INT, FALSE, FALSE, "source"}, }; enum { FILE_WIN_COL_HIDDEN, FILE_WIN_COL_ID, FILE_WIN_COL_FILE, FILE_WIN_COL_X, FILE_WIN_COL_Y, FILE_WIN_COL_X_AXIS, FILE_WIN_COL_Y_AXIS, FILE_WIN_COL_TYPE, FILE_WIN_COL_SIZE, FILE_WIN_COL_WIDTH, FILE_WIN_COL_SKIP, FILE_WIN_COL_STEP, FILE_WIN_COL_FINAL, FILE_WIN_COL_DNUM, FILE_WIN_COL_OID, FILE_WIN_COL_MASKED, FILE_WIN_COL_TIP, FILE_WIN_COL_NOT_RANGE, FILE_WIN_COL_IS_FILE, FILE_WIN_COL_NUM, }; static void file_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row); static void file_delete_popup_func(GtkMenuItem *w, gpointer client_data); static void file_copy2_popup_func(GtkMenuItem *w, gpointer client_data); static void file_copy_popup_func(GtkMenuItem *w, gpointer client_data); static void file_edit_popup_func(GtkMenuItem *w, gpointer client_data); static void file_draw_popup_func(GtkMenuItem *w, gpointer client_data); static void FileDialogType(GtkWidget *w, gpointer client_data); static void create_type_combo_item(GtkTreeStore *list, struct objlist *obj, int id); static gboolean func_entry_focused(GtkWidget *w, GdkEventFocus *event, gpointer user_data); static struct subwin_popup_list add_menu_list[] = { {N_("_File"), G_CALLBACK(CmFileOpen), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Range"), G_CALLBACK(CmRangeAdd), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Recent file"), NULL, NULL, POP_UP_MENU_ITEM_TYPE_RECENT_DATA}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_END}, }; static struct subwin_popup_list Popup_list[] = { {N_("_Add"), NULL, add_menu_list, POP_UP_MENU_ITEM_TYPE_MENU}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Duplicate"), G_CALLBACK(file_copy_popup_func), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("duplicate _Behind"), G_CALLBACK(file_copy2_popup_func), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Delete"), G_CALLBACK(file_delete_popup_func), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Draw"), G_CALLBACK(file_draw_popup_func), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Properties"), G_CALLBACK(list_sub_window_update), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Instance name"), G_CALLBACK(list_sub_window_object_name), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Edit"), G_CALLBACK(file_edit_popup_func), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_SEPARATOR}, {N_("_Top"), G_CALLBACK(list_sub_window_move_top), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Up"), G_CALLBACK(list_sub_window_move_up), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Down"), G_CALLBACK(list_sub_window_move_down), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {N_("_Bottom"), G_CALLBACK(list_sub_window_move_last), NULL, POP_UP_MENU_ITEM_TYPE_NORMAL}, {NULL, NULL, NULL, POP_UP_MENU_ITEM_TYPE_END}, }; #define POPUP_ITEM_NUM (sizeof(Popup_list) / sizeof(*Popup_list) - 1) #define POPUP_ITEM_EDIT 9 #define POPUP_ITEM_TOP 11 #define POPUP_ITEM_UP 12 #define POPUP_ITEM_DOWN 13 #define POPUP_ITEM_BOTTOM 14 #define RANGE_ENTRY_WIDTH 26 #define FITSAVE "fit.ngp" enum MATH_FNC_TYPE { TYPE_MATH_X = 0, TYPE_MATH_Y, TYPE_FUNC_F, TYPE_FUNC_G, TYPE_FUNC_H, }; static char *FieldStr[] = {"math_x", "math_y", "func_f", "func_g", "func_h"}; static void add_completion_provider(GtkSourceView *source_view, GtkSourceCompletionProvider *provider) { GtkSourceCompletion *comp; comp = gtk_source_view_get_completion(source_view); gtk_source_completion_add_provider(comp, provider, NULL); g_object_unref(G_OBJECT(provider)); } static void add_completion_provider_math(GtkSourceView *source_view) { SourceCompletionWords *words; words = source_completion_words_new(_("functions"), completion_info_func_populate); add_completion_provider(source_view, GTK_SOURCE_COMPLETION_PROVIDER(words)); words = source_completion_words_new(_("constants"), completion_info_const_populate); add_completion_provider(source_view, GTK_SOURCE_COMPLETION_PROVIDER(words)); } static GtkWidget * create_source_view(void) { GtkSourceView *source_view; GtkSourceLanguageManager *lm; GtkSourceBuffer *buffer; GtkSourceLanguage *lang; GtkSourceCompletionWords *words; GValue value = G_VALUE_INIT; GtkSourceCompletion *comp; source_view = GTK_SOURCE_VIEW(gtk_source_view_new()); buffer = gtk_source_buffer_new(NULL); gtk_text_view_set_buffer(GTK_TEXT_VIEW(source_view), GTK_TEXT_BUFFER(buffer)); gtk_text_view_set_monospace(GTK_TEXT_VIEW(source_view), TRUE); gtk_source_view_set_tab_width(source_view, 2); gtk_source_view_set_insert_spaces_instead_of_tabs(source_view, TRUE); gtk_source_view_set_smart_home_end(source_view, GTK_SOURCE_SMART_HOME_END_BEFORE); gtk_source_view_set_smart_backspace(source_view, TRUE); gtk_source_view_set_indent_width(source_view, -1); gtk_source_view_set_indent_on_tab(source_view, TRUE); gtk_source_view_set_auto_indent(source_view, TRUE); gtk_source_view_set_show_line_numbers(source_view, TRUE); comp = gtk_source_view_get_completion(source_view); g_value_init(&value, G_TYPE_BOOLEAN); g_value_set_boolean(&value, FALSE); /* fix-me: proposals are not * shown 2nd time in linux if * TRUE */ g_object_set_property(G_OBJECT(comp), "remember-info-visibility", &value); lm = gtk_source_language_manager_get_default(); lang = gtk_source_language_manager_get_language(lm, "ngraph-math"); gtk_source_buffer_set_language(GTK_SOURCE_BUFFER(buffer), lang); gtk_source_buffer_set_highlight_syntax(GTK_SOURCE_BUFFER(buffer), TRUE); add_completion_provider_math(source_view); words = gtk_source_completion_words_new(_("current equations"), NULL); gtk_source_completion_words_register(words, GTK_TEXT_BUFFER(buffer)); add_completion_provider(source_view, GTK_SOURCE_COMPLETION_PROVIDER(words)); return GTK_WIDGET(source_view); } static void set_source_style(GtkWidget *view) { GtkSourceBuffer *buffer; GtkSourceStyleScheme *style; GtkSourceStyleSchemeManager *sman; const char *style_id; if (Menulocal.source_style_id == NULL) { return; } buffer = GTK_SOURCE_BUFFER(gtk_text_view_get_buffer(GTK_TEXT_VIEW(view))); style = gtk_source_buffer_get_style_scheme(buffer); style_id = gtk_source_style_scheme_get_id(style); if (g_strcmp0(Menulocal.source_style_id, style_id) == 0) { return; } sman = gtk_source_style_scheme_manager_get_default(); style = gtk_source_style_scheme_manager_get_scheme(sman, Menulocal.source_style_id); if (style == NULL) { return; } gtk_source_buffer_set_style_scheme(buffer, style); } static void set_text_to_source_buffer(GtkWidget *view, const char *text) { GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); gtk_source_buffer_begin_not_undoable_action(GTK_SOURCE_BUFFER(buffer)); gtk_text_buffer_set_text(buffer, text, -1); gtk_source_buffer_end_not_undoable_action(GTK_SOURCE_BUFFER(buffer)); } static void MathTextDialogChangeInputType(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data) { struct MathTextDialog *d; gchar *text; GtkTextBuffer *buffer; d = user_data; d->page = page_num; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(d->text)); switch (page_num) { case 0: text = get_text_from_buffer(buffer); gtk_entry_set_text(GTK_ENTRY(d->list), text); g_free(text); break; case 1: set_text_to_source_buffer(d->text, gtk_entry_get_text(GTK_ENTRY(d->list))); break; } } static void MathTextDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct MathTextDialog *d; static char *label[] = {N_("Math X"), N_("Math Y"), "F(X,Y,Z)", "G(X,Y,Z)", "H(X,Y,Z)"}; d = (struct MathTextDialog *) data; if (makewidget) { GtkWidget *w, *title, *vbox, *tab, *swin; tab = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tab), GTK_POS_BOTTOM); d->input_tab = tab; title = gtk_label_new(_("single line")); w = create_text_entry(TRUE, TRUE); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start(GTK_BOX(vbox), w, FALSE, FALSE, 0); gtk_notebook_append_page(GTK_NOTEBOOK(tab), vbox, title); d->list = w; title = gtk_label_new(_("multi line")); w = create_source_view(); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), w); gtk_notebook_append_page(GTK_NOTEBOOK(tab), swin, title); d->text = w; g_signal_connect(tab, "switch-page", G_CALLBACK(MathTextDialogChangeInputType), d); gtk_box_pack_start(GTK_BOX(d->vbox), tab, TRUE, TRUE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); gtk_window_set_default_size(GTK_WINDOW(wi), 800, 500); } switch (d->Mode) { case TYPE_MATH_X: entry_completion_set_entry(NgraphApp.x_math_list, d->list); break; case TYPE_MATH_Y: entry_completion_set_entry(NgraphApp.y_math_list, d->list); break; case TYPE_FUNC_F: case TYPE_FUNC_G: case TYPE_FUNC_H: entry_completion_set_entry(NgraphApp.func_list, d->list); break; } set_source_style(d->text); gtk_window_set_title(GTK_WINDOW(wi), _(label[d->Mode])); gtk_entry_set_text(GTK_ENTRY(d->list), d->Text); set_text_to_source_buffer(d->text, d->Text); gtk_notebook_set_current_page(GTK_NOTEBOOK(d->input_tab), Menulocal.math_input_mode); if (Menulocal.math_input_mode) { gtk_widget_grab_focus(d->text); } else { gtk_widget_grab_focus(d->list); } } static void move_cursor_to_error_line(GtkWidget *view) { GtkTextIter iter; GtkTextBuffer *buffer; int ln, ofst; math_err_get_recent_error_position(&ln, &ofst); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view)); gtk_text_buffer_get_iter_at_line_offset(buffer, &iter, ln - 1, ofst - 1); gtk_text_buffer_place_cursor(buffer, &iter); gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(view), &iter, 0, FALSE, 0, 0); } static void MathTextDialogClose(GtkWidget *w, void *data) { struct MathTextDialog *d; const char *p; char *obuf, *ptr; int id; GList *id_ptr; d = (struct MathTextDialog *) data; switch (d->ret) { case IDOK: break; case IDCANCEL: return; default: d->ret = IDLOOP; return; } switch (d->page) { case 0: p = gtk_entry_get_text(GTK_ENTRY(d->list)); ptr = g_strdup(p); break; case 1: ptr = get_text_from_buffer(gtk_text_view_get_buffer(GTK_TEXT_VIEW(d->text))); break; default: /* not reached */ return; } if (ptr == NULL) { return; } for (id_ptr = d->id_list; id_ptr; id_ptr = id_ptr->next) { int r; r = list_store_path_get_int(d->tree, id_ptr->data, 0, &id); if (r) { continue; } sgetobjfield(d->Obj, id, FieldStr[d->Mode], NULL, &obuf, FALSE, FALSE, FALSE); if (obuf == NULL || strcmp(obuf, ptr)) { if (sputobjfield(d->Obj, id, FieldStr[d->Mode], ptr)) { g_free(ptr); d->ret = IDLOOP; switch (d->page) { case 0: gtk_widget_grab_focus(d->list); break; case 1: gtk_widget_grab_focus(d->text); move_cursor_to_error_line(d->text); break; } return; } set_graph_modified(); d->modified = TRUE; } g_free(obuf); } switch (d->Mode) { case TYPE_MATH_X: entry_completion_append(NgraphApp.x_math_list, ptr); break; case TYPE_MATH_Y: entry_completion_append(NgraphApp.y_math_list, ptr); break; case TYPE_FUNC_F: case TYPE_FUNC_G: case TYPE_FUNC_H: entry_completion_append(NgraphApp.func_list, ptr); break; } g_free(ptr); Menulocal.math_input_mode = gtk_notebook_get_current_page(GTK_NOTEBOOK(d->input_tab)); } void MathTextDialog(struct MathTextDialog *data, char *text, int mode, struct objlist *obj, GList *list, GtkWidget *tree) { if (mode < 0 || mode >= MATH_FNC_NUM) mode = 0; data->SetupWindow = MathTextDialogSetup; data->CloseWindow = MathTextDialogClose; data->tree = tree; data->Text = text; data->Mode = mode; data->modified = FALSE; data->Obj = obj; data->id_list = list; } static void set_escaped_str(GtkWidget *list, GtkTreeIter *iter, int col, const char *math) { const char *str; char *tmpstr; str = CHK_STR(math); tmpstr = NULL; if (strchr(str, '\n')) { tmpstr = g_strescape(str, "\\"); str = tmpstr; } list_store_set_string(list, iter, col, str); if (tmpstr) { g_free(tmpstr); } } static void MathDialogSetupItem(GtkWidget *w, struct MathDialog *d) { int i; char *math, *field = NULL; GtkTreeIter iter; list_store_clear(d->list); if (d->Mode < 0 || d->Mode >= MATH_FNC_NUM) d->Mode = 0; field = FieldStr[d->Mode]; for (i = 0; i <= chkobjlastinst(d->Obj); i++) { math = NULL; getobj(d->Obj, field, i, 0, NULL, &math); list_store_append(d->list, &iter); list_store_set_int(d->list, &iter, 0, i); set_escaped_str(d->list, &iter, 1, math); } if (d->Mode >= 0 && d->Mode < MATH_FNC_NUM) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->func[d->Mode]), TRUE); } static void MathDialogMode(GtkWidget *w, gpointer client_data) { struct MathDialog *d; int i; if (! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) return; d = (struct MathDialog *) client_data; for (i = 0; i < MATH_FNC_NUM; i++) { if (w == d->func[i]) d->Mode = i; } MathDialogSetupItem(d->widget, d); } static void MathDialogList(GtkButton *w, gpointer client_data) { struct MathDialog *d; int a, *ary, r; char *field = NULL, *buf; GtkTreeSelection *gsel; GtkTreePath *path; GList *list, *data; d = (struct MathDialog *) client_data; gsel = gtk_tree_view_get_selection(GTK_TREE_VIEW(d->list)); list = gtk_tree_selection_get_selected_rows(gsel, NULL); if (list == NULL) return; gtk_tree_view_get_cursor(GTK_TREE_VIEW(d->list), &path, NULL); if (path) { r = list_store_path_get_int(d->list, path, 0, &a); gtk_tree_path_free(path); } else { data = g_list_last(list); r = list_store_path_get_int(d->list, data->data, 0, &a); } if (r) goto END; if (d->Mode < 0 || d->Mode >= MATH_FNC_NUM) d->Mode = 0; field = FieldStr[d->Mode]; sgetobjfield(d->Obj, a, field, NULL, &buf, FALSE, FALSE, FALSE); if (buf == NULL) goto END; MathTextDialog(&DlgMathText, buf, d->Mode, d->Obj, list, d->list); DialogExecute(d->widget, &DlgMathText); d->modified = DlgMathText.modified; g_free(buf); MathDialogSetupItem(d->widget, d); for (data = list; data; data = data->next) { ary = gtk_tree_path_get_indices(data->data); if (ary == NULL) continue; gtk_tree_selection_select_path(gsel, data->data); } END: g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } static void math_dialog_activated_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { struct MathDialog *d; GtkTreeSelection *gsel; int n; d = (struct MathDialog *) user_data; gsel = gtk_tree_view_get_selection(view); n = gtk_tree_selection_count_selected_rows(gsel); if (n < 1) return; MathDialogList(NULL, d); } static gboolean key_pressed_cb(GtkEventControllerKey *controller, guint keyval, guint keycode, GdkModifierType state, gpointer user_data) { struct MathDialog *d; d = (struct MathDialog *) user_data; if (keyval == GDK_KEY_Return) { math_dialog_activated_cb(GTK_TREE_VIEW(d->list), NULL, NULL, user_data); return TRUE; } return FALSE; } static void set_btn_sensitivity_delete_cb(GtkTreeModel *tree_model, GtkTreePath *path, gpointer user_data) { int n; GtkWidget *w; w = GTK_WIDGET(user_data); n = gtk_tree_model_iter_n_children(tree_model, NULL); gtk_widget_set_sensitive(w, n > 0); } static void set_btn_sensitivity_insert_cb(GtkTreeModel *tree_model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data) { set_btn_sensitivity_delete_cb(tree_model, path, user_data); } static void set_sensitivity_by_row_num(GtkWidget *tree, GtkWidget *btn) { GtkTreeModel *model; model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree)); g_signal_connect(model, "row-deleted", G_CALLBACK(set_btn_sensitivity_delete_cb), btn); g_signal_connect(model, "row-inserted", G_CALLBACK(set_btn_sensitivity_insert_cb), btn); gtk_widget_set_sensitive(btn, FALSE); } static gboolean set_btn_sensitivity_selection_cb(GtkTreeSelection *sel, gpointer user_data) { int n; GtkWidget *w; w = GTK_WIDGET(user_data); n = gtk_tree_selection_count_selected_rows(sel); gtk_widget_set_sensitive(w, n > 0); return FALSE; } static void set_sensitivity_by_selection(GtkWidget *tree, GtkWidget *btn) { GtkTreeSelection *sel; sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); g_signal_connect(sel, "changed", G_CALLBACK(set_btn_sensitivity_selection_cb), btn); gtk_widget_set_sensitive(btn, FALSE); } static void MathDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct MathDialog *d; d = (struct MathDialog *) data; if (makewidget) { int i; GtkWidget *w, *swin, *vbox, *hbox; static n_list_store list[] = { {"id", G_TYPE_INT, TRUE, FALSE, NULL}, {N_("math"), G_TYPE_STRING, TRUE, FALSE, NULL, 0, 0, 0, 0, PANGO_ELLIPSIZE_END}, }; char *button_str[] = { N_("_X math"), N_("_Y math"), "_F(X, Y, Z)", "_G(X, Y, Z)", "_H(X, Y, Z)", }; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 4); w = list_store_create(sizeof(list) / sizeof(*list), list); list_store_set_sort_all(w); list_store_set_selection_mode(w, GTK_SELECTION_MULTIPLE); add_event_key(w, G_CALLBACK(key_pressed_cb), NULL, d); g_signal_connect(w, "row-activated", G_CALLBACK(math_dialog_activated_cb), d); d->list = w; swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), w); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), swin); gtk_box_pack_start(GTK_BOX(vbox), w, TRUE, TRUE, 4); w = NULL; for (i = 0; i < MATH_FNC_NUM; i++) { w = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(w), _(button_str[i])); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); d->func[i] = w; g_signal_connect(w, "toggled", G_CALLBACK(MathDialogMode), d); } hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = gtk_button_new_with_mnemonic(_("Select _All")); set_button_icon(w, "edit-select-all"); g_signal_connect(w, "clicked", G_CALLBACK(list_store_select_all_cb), d->list); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); set_sensitivity_by_row_num(d->list, w); w = gtk_button_new_with_mnemonic(_("_Edit")); g_signal_connect(w, "clicked", G_CALLBACK(MathDialogList), d); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 4); set_sensitivity_by_selection(d->list, w); gtk_box_pack_start(GTK_BOX(d->vbox), vbox, TRUE, TRUE, 4); d->show_cancel = FALSE; d->ok_button = _("_Close"); gtk_window_set_default_size(GTK_WINDOW(wi), -1, 300); gtk_widget_show_all(GTK_WIDGET(d->vbox)); d->Mode = 0; } MathDialogSetupItem(wi, d); } static void MathDialogClose(GtkWidget *w, void *data) { } void MathDialog(struct MathDialog *data, struct objlist *obj) { data->SetupWindow = MathDialogSetup; data->CloseWindow = MathDialogClose; data->Obj = obj; data->modified = FALSE; } static void FitLoadDialogSetup(GtkWidget *wi, void *data, int makewidget) { char *s; struct FitLoadDialog *d; int i; GtkWidget *w; d = (struct FitLoadDialog *) data; if (makewidget) { w = combo_box_create(); d->list = w; gtk_box_pack_start(GTK_BOX(d->vbox), w, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } combo_box_clear(d->list); for (i = d->Sid; i <= chkobjlastinst(d->Obj); i++) { getobj(d->Obj, "profile", i, 0, NULL, &s); combo_box_append_text(d->list, CHK_STR(s)); } combo_box_set_active(d->list, 0); /* if (makewidget) { XtManageChild(d->widget); d->widget = NULL; XtVaSetValues(d->list, XmNwidth, 200, NULL); } */ } static void FitLoadDialogClose(GtkWidget *w, void *data) { struct FitLoadDialog *d; d = (struct FitLoadDialog *) data; if (d->ret == IDCANCEL) return; d->sel = combo_box_get_active(d->list); } void FitLoadDialog(struct FitLoadDialog *data, struct objlist *obj, int sid) { data->SetupWindow = FitLoadDialogSetup; data->CloseWindow = FitLoadDialogClose; data->Obj = obj; data->Sid = sid; data->sel = -1; } static void FitSaveDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FitSaveDialog *d; int i; char *s; d = (struct FitSaveDialog *) data; if (makewidget) { GtkWidget *w, *hbox; gtk_dialog_add_buttons(GTK_DIALOG(wi), _("_Delete"), IDDELETE, NULL); w = combo_box_entry_create(); combo_box_entry_set_width(w, 20); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); item_setup(hbox, w, _("_Profile:"), TRUE); d->profile = w; gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } combo_box_clear(d->profile); for (i = d->Sid; i <= chkobjlastinst(d->Obj); i++) { getobj(d->Obj, "profile", i, 0, NULL, &s); combo_box_append_text(d->profile, CHK_STR(s)); } combo_box_entry_set_text(d->profile, ""); } static void FitSaveDialogClose(GtkWidget *w, void *data) { struct FitSaveDialog *d; const char *s; d = (struct FitSaveDialog *) data; if (d->ret != IDOK && d->ret != IDDELETE) return; s = combo_box_entry_get_text(d->profile); if (s) { char *ptr; ptr = g_strdup(s); g_strstrip(ptr); if (ptr[0] != '\0') { d->Profile = ptr; return; } g_free(ptr); } message_box(d->widget, _("Please specify the profile."), NULL, RESPONS_OK); d->ret = IDLOOP; return; } void FitSaveDialog(struct FitSaveDialog *data, struct objlist *obj, int sid) { data->SetupWindow = FitSaveDialogSetup; data->CloseWindow = FitSaveDialogClose; data->Obj = obj; data->Sid = sid; data->Profile = NULL; } static void FitDialogSetupItem(GtkWidget *w, struct FitDialog *d, int id) { int a, i; SetWidgetFromObjField(d->type, d->Obj, id, "type"); getobj(d->Obj, "poly_dimension", id, 0, NULL, &a); combo_box_set_active(d->dim, a - 1); SetWidgetFromObjField(d->weight, d->Obj, id, "weight_func"); SetWidgetFromObjField(d->through_point, d->Obj, id, "through_point"); SetWidgetFromObjField(d->x, d->Obj, id, "point_x"); SetWidgetFromObjField(d->y, d->Obj, id, "point_y"); SetWidgetFromObjField(d->min, d->Obj, id, "min"); SetWidgetFromObjField(d->max, d->Obj, id, "max"); SetWidgetFromObjField(d->div, d->Obj, id, "div"); SetWidgetFromObjField(d->interpolation, d->Obj, id, "interpolation"); SetWidgetFromObjField(d->converge, d->Obj, id, "converge"); SetWidgetFromObjField(d->derivatives, d->Obj, id, "derivative"); SetWidgetFromObjField(d->formula, d->Obj, id, "user_func"); for (i = 0; i < FIT_PARM_NUM; i++) { char p[] = "parameter0", dd[] = "derivative0"; p[sizeof(p) - 2] += i; dd[sizeof(dd) - 2] += i; SetWidgetFromObjField(d->p[i], d->Obj, id, p); SetWidgetFromObjField(d->d[i], d->Obj, id, dd); } } static char * FitCB(struct objlist *obj, int id) { char *valstr, *profile; getobj(obj, "profile", id, 0, NULL, &profile); valstr = NULL; if (profile == NULL) { char *tmp; sgetobjfield(obj, id, "type", NULL, &tmp, FALSE, FALSE, FALSE); if (tmp) { valstr = g_strdup(_(tmp)); g_free(tmp); } } return valstr; } static void FitDialogCopy(GtkButton *btn, gpointer user_data) { struct FitDialog *d; int sel; d = (struct FitDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FitCB); if (sel != -1) FitDialogSetupItem(d->widget, d, sel); } static int FitDialogLoadConfig(struct FitDialog *d, int errmes) { int lastid; lastid = chkobjlastinst(d->Obj); if (lastid == d->Lastid) { struct objlist *shell; struct narray sarray; char *argv[2]; char *file; int newid; if ((file = searchscript(FITSAVE)) == NULL) { if (errmes) message_box(d->widget, _("Setting file not found."), FITSAVE, RESPONS_OK); return FALSE; } if ((shell = chkobject("shell")) == NULL) return FALSE; newid = newobj(shell); if (newid < 0) { g_free(file); return FALSE; } arrayinit(&sarray, sizeof(char *)); changefilename(file); if (arrayadd(&sarray, &file) == NULL) { g_free(file); arraydel2(&sarray); return FALSE; } argv[0] = (char *) &sarray; argv[1] = NULL; exeobj(shell, "shell", newid, 1, argv); arraydel2(&sarray); delobj(shell, newid); } return TRUE; } static void FitDialogLoad(GtkButton *btn, gpointer user_data) { struct FitDialog *d; int lastid; d = (struct FitDialog *) user_data; if (!FitDialogLoadConfig(d, TRUE)) return; lastid = chkobjlastinst(d->Obj); if ((d->Lastid < 0) || (lastid == d->Lastid)) { message_box(d->widget, _("No settings."), FITSAVE, RESPONS_OK); return; } FitLoadDialog(&DlgFitLoad, d->Obj, d->Lastid + 1); if ((DialogExecute(d->widget, &DlgFitLoad) == IDOK) && (DlgFitLoad.sel >= 0)) { int id; id = DlgFitLoad.sel + d->Lastid + 1; FitDialogSetupItem(d->widget, d, id); } } static int copy_settings_to_fitobj(struct FitDialog *d, char *profile) { int i, id, num; char *s; for (i = d->Lastid + 1; i <= chkobjlastinst(d->Obj); i++) { getobj(d->Obj, "profile", i, 0, NULL, &s); if (s && strcmp(s, profile) == 0) { if (message_box(d->widget, _("Overwrite existing profile?"), "Confirm", RESPONS_YESNO) != IDYES) { return 1; } break; } } if (i > chkobjlastinst(d->Obj)) { id = newobj(d->Obj); } else { id = i; } if (putobj(d->Obj, "profile", id, profile) == -1) return 1; if (SetObjFieldFromWidget(d->type, d->Obj, id, "type")) return 1; num = combo_box_get_active(d->dim); num++; if (num > 0 && putobj(d->Obj, "poly_dimension", id, &num) == -1) return 1; if (SetObjFieldFromWidget(d->weight, d->Obj, id, "weight_func")) return 1; if (SetObjFieldFromWidget (d->through_point, d->Obj, id, "through_point")) return 1; if (SetObjFieldFromWidget(d->x, d->Obj, id, "point_x")) return 1; if (SetObjFieldFromWidget(d->y, d->Obj, id, "point_y")) return 1; if (SetObjFieldFromWidget(d->min, d->Obj, id, "min")) return 1; if (SetObjFieldFromWidget(d->max, d->Obj, id, "max")) return 1; if (SetObjFieldFromWidget(d->div, d->Obj, id, "div")) return 1; if (SetObjFieldFromWidget(d->interpolation, d->Obj, id, "interpolation")) return 1; if (SetObjFieldFromWidget(d->formula, d->Obj, id, "user_func")) return 1; if (SetObjFieldFromWidget(d->derivatives, d->Obj, id, "derivative")) return 1; if (SetObjFieldFromWidget(d->converge, d->Obj, id, "converge")) return 1; for (i = 0; i < FIT_PARM_NUM; i++) { char p[] = "parameter0", dd[] = "derivative0"; p[sizeof(p) - 2] += i; dd[sizeof(dd) - 2] += i; if (SetObjFieldFromWidget(d->p[i], d->Obj, id, p)) return 1; if (SetObjFieldFromWidget(d->d[i], d->Obj, id, dd)) return 1; } return 0; } static int delete_fitobj(struct FitDialog *d, char *profile) { int i, r; char *s, *ptr; if (profile == NULL) return 1; for (i = d->Lastid + 1; i <= chkobjlastinst(d->Obj); i++) { getobj(d->Obj, "profile", i, 0, NULL, &s); if (s && strcmp(s, profile) == 0) { ptr = g_strdup_printf(_("Delete the profile '%s'?"), profile); r = message_box(d->widget, ptr, "Confirm", RESPONS_YESNO); g_free(ptr); if (r != IDYES) { return 1; } break; } } if (i > chkobjlastinst(d->Obj)) { ptr = g_strdup_printf(_("The profile '%s' is not exist."), profile); message_box(d->widget, ptr, "Confirm", RESPONS_OK); g_free(ptr); return 1; } delobj(d->Obj, i); return 0; } static void FitDialogSave(GtkWidget *w, gpointer client_data) { int r; char *s, *ngpfile; int error; int hFile; struct FitDialog *d; d = (struct FitDialog *) client_data; if (!FitDialogLoadConfig(d, FALSE)) return; FitSaveDialog(&DlgFitSave, d->Obj, d->Lastid + 1); r = DialogExecute(d->widget, &DlgFitSave); if (r != IDOK && r != IDDELETE) return; if (DlgFitSave.Profile == NULL) return; if (DlgFitSave.Profile[0] == '\0') { g_free(DlgFitSave.Profile); return; } switch (r) { case IDOK: if (copy_settings_to_fitobj(d, DlgFitSave.Profile)) { g_free(DlgFitSave.Profile); return; } break; case IDDELETE: if (delete_fitobj(d, DlgFitSave.Profile)) { g_free(DlgFitSave.Profile); return; } break; } ngpfile = getscriptname(FITSAVE); if (ngpfile == NULL) { return; } error = FALSE; hFile = nopen(ngpfile, O_CREAT | O_TRUNC | O_RDWR, NFMODE_NORMAL_FILE); if (hFile < 0) { error = TRUE; } else { int i; for (i = d->Lastid + 1; i <= chkobjlastinst(d->Obj); i++) { int len; getobj(d->Obj, "save", i, 0, NULL, &s); len = strlen(s); if (len != nwrite(hFile, s, len)) error = TRUE; if (nwrite(hFile, "\n", 1) != 1) error = TRUE; } nclose(hFile); } if (error) { ErrorMessage(); } else { char *ptr; switch (r) { case IDOK: ptr = g_strdup_printf(_("The profile '%s' is saved."), DlgFitSave.Profile); message_box(d->widget, ptr, "Confirm", RESPONS_OK); g_free(ptr); break; case IDDELETE: ptr = g_strdup_printf(_("The profile '%s' is deleted."), DlgFitSave.Profile); message_box(d->widget, ptr, "Confirm", RESPONS_OK); g_free(ptr); g_free(DlgFitSave.Profile); break; } } g_free(ngpfile); } static int check_fit_func(GtkEditable *w, gpointer client_data) { struct FitDialog *d; MathEquation *code; MathEquationParametar *prm; const char *math; int dim, i, deriv; d = (struct FitDialog *) client_data; code = math_equation_basic_new(); if (code == NULL) return FALSE; if (math_equation_add_parameter(code, 0, 1, 2, MATH_EQUATION_PARAMETAR_USE_ID)) { math_equation_free(code); return FALSE; } math = gtk_entry_get_text(GTK_ENTRY(d->formula)); if (math_equation_parse(code, math)) { math_equation_free(code); return FALSE; } prm = math_equation_get_parameter(code, 0, NULL); dim = prm->id_num; deriv = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->derivatives)); for (i = 0; i < FIT_PARM_NUM; i++) { set_widget_sensitivity_with_label(d->p[i], FALSE); set_widget_sensitivity_with_label(d->d[i], FALSE); } for (i = 0; i < dim; i++) { int n; n = prm->id[i]; if (n < FIT_PARM_NUM) { set_widget_sensitivity_with_label(d->p[n], TRUE); if (deriv) { set_widget_sensitivity_with_label(d->d[n], TRUE); } } } math_equation_free(code); return TRUE; } static void FitDialogResult(GtkWidget *w, gpointer client_data) { struct FitDialog *d; double derror, correlation, coe[FIT_PARM_NUM]; char *equation, *math; N_VALUE *inst; int i, j, dim, dimension, type, num; GString *buf; d = (struct FitDialog *) client_data; if ((inst = chkobjinst(d->Obj, d->Id)) == NULL) return; if (_getobj(d->Obj, "type", inst, &type)) return; if (_getobj(d->Obj, "poly_dimension", inst, &dimension)) return; if (_getobj(d->Obj, "number", inst, &num)) return; if (_getobj(d->Obj, "error", inst, &derror)) return; if (_getobj(d->Obj, "correlation", inst, &correlation)) return; for (i = 0; i < FIT_PARM_NUM; i++) { char p[] = "%00"; p[sizeof(p) - 2] += i; if (_getobj(d->Obj, p, inst, coe + i)) { return; } } if (_getobj(d->Obj, "equation", inst, &equation)) return; if (_getobj(d->Obj, "user_func", inst, &math)) return; buf = g_string_new(""); if (buf == NULL) { return; } if (equation == NULL) { g_string_append_printf(buf, "Undefined"); } else if (type != FIT_TYPE_USER) { if (type == FIT_TYPE_POLY) { dim = dimension + 1; } else { dim = 2; } switch (type) { case FIT_TYPE_POLY: g_string_append_printf(buf, "Eq: %%0i*Xi (i=0-%d)\n\n", dim - 1); break; case FIT_TYPE_POW: g_string_append_printf(buf, "Eq: exp(%%00)*X%%01\n\n"); break; case FIT_TYPE_EXP: g_string_append_printf(buf, "Eq: exp(%%01*X+%%00)\n\n"); break; case FIT_TYPE_LOG: g_string_append_printf(buf, "Eq: %%01*Ln(X)+%%00\n\n"); break; } for (j = 0; j < dim; j++) { g_string_append_printf(buf, " %%0%d = %+.7e\n", j, coe[j]); } g_string_append_printf(buf, "\n"); g_string_append_printf(buf, " points = %d\n", num); g_string_append_printf(buf, " <DY2> = %.7e\n", derror); if (correlation >= 0) { g_string_append_printf(buf, "|r| or |R| = %.7e\n", correlation); } else { g_string_append_printf(buf, "|r| or |R| = -------------"); } } else { int tbl[FIT_PARM_NUM]; MathEquation *code; MathEquationParametar *prm; code = math_equation_basic_new(); if (code == NULL) return; if (math_equation_add_parameter(code, 0, 1, 2, MATH_EQUATION_PARAMETAR_USE_ID)) { math_equation_free(code); return; } if (math_equation_parse(code, math)) { math_equation_free(code); return; } prm = math_equation_get_parameter(code, 0, NULL); dim = prm->id_num; for (i = 0; i < dim; i++) { tbl[i] = prm->id[i]; } math_equation_free(code); g_string_append_printf(buf, "Eq: User defined\n\n"); for (j = 0; j < dim; j++) { g_string_append_printf(buf, " %%0%d = %+.7e\n", tbl[j], coe[tbl[j]]); } g_string_append_printf(buf, "\n"); g_string_append_printf(buf, " points = %d\n", num); g_string_append_printf(buf, " <DY2> = %.7e\n", derror); if (correlation >= 0) { g_string_append_printf(buf, "|r| or |R| = %.7e\n", correlation); } else { g_string_append_printf(buf, "|r| or |R| = -------------"); } } g_string_append(buf, ""); markup_message_box(d->widget, buf->str, _("Fitting Results"), RESPONS_OK, TRUE); g_string_free(buf, TRUE); } static int FitDialogApply(GtkWidget *w, struct FitDialog *d) { int i, num, dim; const gchar *s; if (SetObjFieldFromWidget(d->type, d->Obj, d->Id, "type")) return FALSE; if (getobj(d->Obj, "poly_dimension", d->Id, 0, NULL, &dim) == -1) return FALSE; num = combo_box_get_active(d->dim); num++; if (num > 0 && putobj(d->Obj, "poly_dimension", d->Id, &num) == -1) return FALSE; if (num != dim) set_graph_modified(); if (SetObjFieldFromWidget(d->weight, d->Obj, d->Id, "weight_func")) return FALSE; if (SetObjFieldFromWidget(d->through_point, d->Obj, d->Id, "through_point")) return FALSE; if (SetObjFieldFromWidget(d->x, d->Obj, d->Id, "point_x")) return FALSE; if (SetObjFieldFromWidget(d->y, d->Obj, d->Id, "point_y")) return FALSE; if (SetObjFieldFromWidget(d->min, d->Obj, d->Id, "min")) return FALSE; if (SetObjFieldFromWidget(d->max, d->Obj, d->Id, "max")) return FALSE; if (SetObjFieldFromWidget(d->div, d->Obj, d->Id, "div")) return FALSE; if (SetObjFieldFromWidget(d->interpolation, d->Obj, d->Id, "interpolation")) return FALSE; if (SetObjFieldFromWidget(d->derivatives, d->Obj, d->Id, "derivative")) return FALSE; if (SetObjFieldFromWidget(d->converge, d->Obj, d->Id, "converge")) return FALSE; if (SetObjFieldFromWidget(d->formula, d->Obj, d->Id, "user_func")) return FALSE; s = gtk_entry_get_text(GTK_ENTRY(d->formula)); entry_completion_append(NgraphApp.fit_list, s); for (i = 0; i < FIT_PARM_NUM; i++) { char p[] = "parameter0", dd[] = "derivative0"; p[sizeof(p) - 2] += i; dd[sizeof(dd) - 2] += i; if (SetObjFieldFromWidget(d->p[i], d->Obj, d->Id, p)) return FALSE; if (SetObjFieldFromWidget(d->d[i], d->Obj, d->Id, dd)) return FALSE; s = gtk_entry_get_text(GTK_ENTRY(d->d[i])); entry_completion_append(NgraphApp.fit_list, s); } return TRUE; } static void FitDialogDraw(GtkWidget *w, gpointer client_data) { struct FitDialog *d; d = (struct FitDialog *) client_data; if (!FitDialogApply(d->widget, d)) return; FitDialogSetupItem(d->widget, d, d->Id); Draw(FALSE); } static void set_user_fit_sensitivity(struct FitDialog *d, int active) { int i; for (i = 0; i < FIT_PARM_NUM; i++) { set_widget_sensitivity_with_label(d->d[i], active); } } static void set_fitdialog_sensitivity(struct FitDialog *d, int type, int through) { int i; set_user_fit_sensitivity(d, FALSE); for (i = 0; i < FIT_PARM_NUM; i++) { set_widget_sensitivity_with_label(d->p[i], FALSE); } set_widget_sensitivity_with_label(d->dim, type == FIT_TYPE_POLY); gtk_widget_set_sensitive(d->usr_def_frame, FALSE); gtk_widget_set_sensitive(d->usr_def_prm_tbl, FALSE); gtk_widget_set_sensitive(d->through_box, through); gtk_widget_set_sensitive(d->through_point, TRUE); } static void FitDialogSetSensitivity(GtkWidget *widget, gpointer user_data) { struct FitDialog *d; int type, through, deriv, dim; d = (struct FitDialog *) user_data; type = combo_box_get_active(d->type); through = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->through_point)); switch (type) { case FIT_TYPE_POLY: dim = combo_box_get_active(d->dim); if (dim == 0) { gtk_label_set_markup(GTK_LABEL(d->func_label), "Equation: Y=X+b"); } else { char buf[1024]; snprintf(buf, sizeof(buf), "Equation: Y=∑ ai·Xi (i=0-%d)", dim + 1); gtk_label_set_markup(GTK_LABEL(d->func_label), buf); } set_fitdialog_sensitivity(d, type, through); break; case FIT_TYPE_POW: gtk_label_set_markup(GTK_LABEL(d->func_label), "Equation: Y=Xb"); set_fitdialog_sensitivity(d, type, through); break; case FIT_TYPE_EXP: gtk_label_set_markup(GTK_LABEL(d->func_label), "Equation: Y=e(a·X+b)"); set_fitdialog_sensitivity(d, type, through); break; case FIT_TYPE_LOG: gtk_label_set_markup(GTK_LABEL(d->func_label), "Equation: Y=a·Ln(X)+b"); set_fitdialog_sensitivity(d, type, through); break; case FIT_TYPE_USER: gtk_label_set_text(GTK_LABEL(d->func_label), ""); deriv = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->derivatives)); set_widget_sensitivity_with_label(d->dim, FALSE); gtk_widget_set_sensitive(d->through_point, FALSE); gtk_widget_set_sensitive(d->through_box, FALSE); gtk_widget_set_sensitive(d->usr_def_frame, TRUE); gtk_widget_set_sensitive(d->usr_def_prm_tbl, TRUE); set_user_fit_sensitivity(d, deriv); check_fit_func(NULL, d); break; } } static GtkWidget * create_user_fit_frame(struct FitDialog *d) { GtkWidget *table, *w, *vbox; int i, j; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); table = gtk_grid_new(); j = 0; w = create_text_entry(FALSE, TRUE); add_widget_to_table_sub(table, w, _("_Formula:"), TRUE, 0, 2, 3, j++); g_signal_connect(w, "focus-in-event", G_CALLBACK(func_entry_focused), NgraphApp.fit_list); g_signal_connect(w, "changed", G_CALLBACK(check_fit_func), d); d->formula = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table_sub(table, w, _("_Converge (%):"), TRUE, 0, 1, 3, j); d->converge = w; w = gtk_check_button_new_with_mnemonic(_("_Derivatives")); add_widget_to_table_sub(table, w, NULL, FALSE, 2, 1, 3, j++); d->derivatives = w; gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0); table = gtk_grid_new(); for (i = 0; i < FIT_PARM_NUM; i++) { char p[] = "%0_0:", dd[] = "dF/d(%0_0):"; p[sizeof(p) - 3] += i; dd[sizeof(dd) - 4] += i; w = create_text_entry(TRUE, TRUE); add_widget_to_table_sub(table, w, p, TRUE, 0, 1, 4, j); d->p[i] = w; w = create_text_entry(TRUE, TRUE); g_signal_connect(w, "focus-in-event", G_CALLBACK(func_entry_focused), NgraphApp.fit_list); add_widget_to_table_sub(table, w, dd, TRUE, 2, 1, 4, j++); d->d[i] = w; } w = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(w), table); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(w), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(w), GTK_SHADOW_NONE); gtk_widget_set_size_request(GTK_WIDGET(w), -1, 200); gtk_container_set_border_width(GTK_CONTAINER(w), 2); gtk_box_pack_start(GTK_BOX(vbox), w, TRUE, TRUE, 0); d->usr_def_prm_tbl = table; w = gtk_frame_new(_("User definition")); gtk_container_add(GTK_CONTAINER(w), vbox); return w; } static void FitDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FitDialog *d; char title[20]; d = (struct FitDialog *) data; snprintf(title, sizeof(title), _("Fit %d"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { char **enumlist, mes[10]; GtkWidget *w, *hbox, *hbox2, *vbox, *frame, *table; int i; gtk_dialog_add_button(GTK_DIALOG(wi), _("_Delete"), IDDELETE); table = gtk_grid_new(); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); w = combo_box_create(); add_widget_to_table_sub(table, w, _("_Type:"), FALSE, 0, 1, 5, 0); d->type = w; enumlist = (char **) chkobjarglist(d->Obj, "type"); for (i = 0; enumlist[i] && enumlist[i][0]; i++) { combo_box_append_text(d->type, _(enumlist[i])); } w = combo_box_create(); add_widget_to_table_sub(table, w, _("_Dim:"), FALSE, 2, 1, 5, 0); d->dim = w; for (i = 0; i < FIT_PARM_NUM - 1; i++) { snprintf(mes, sizeof(mes), "%d", i + 1); combo_box_append_text(d->dim, mes); } w = gtk_label_new(""); add_widget_to_table_sub(table, w, NULL, TRUE, 4, 1, 5, 0); gtk_widget_set_halign(w, GTK_ALIGN_START); gtk_widget_set_valign(w, GTK_ALIGN_END); d->func_label = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table_sub(table, w, _("_Weight:"), TRUE, 0, 4, 5, 1); d->weight = w; gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = gtk_check_button_new_with_mnemonic(_("_Through")); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); d->through_point = w; hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = create_text_entry(TRUE, TRUE); item_setup(hbox2, w, "_X:", TRUE); d->x = w; w = create_text_entry(TRUE, TRUE); item_setup(hbox2, w, "_Y:", TRUE); d->y = w; d->through_box = hbox2; gtk_box_pack_start(GTK_BOX(hbox), hbox2, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 4); frame = gtk_frame_new(_("Action")); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_box_pack_start(GTK_BOX(d->vbox), frame, FALSE, FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = create_text_entry(TRUE, TRUE); item_setup(hbox, w, _("_Min:"), TRUE); d->min = w; w = create_text_entry(TRUE, TRUE); item_setup(hbox, w, _("_Max:"), TRUE); d->max = w; w = create_spin_entry(1, 65535, 1, TRUE, TRUE); item_setup(hbox, w, _("_Div:"), FALSE); d->div = w; w = gtk_check_button_new_with_mnemonic(_("_Interpolation")); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); d->interpolation = w; vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 4); frame = gtk_frame_new(_("Draw X range")); gtk_container_add(GTK_CONTAINER(frame), vbox); gtk_box_pack_start(GTK_BOX(d->vbox), frame, FALSE, FALSE, 4); frame = create_user_fit_frame(d); d->usr_def_frame = frame; gtk_box_pack_start(GTK_BOX(d->vbox), frame, TRUE, TRUE, 4); hbox = add_copy_button_to_box(GTK_WIDGET(d->vbox), G_CALLBACK(FitDialogCopy), d, "fit"); w = gtk_button_new_with_mnemonic(_("_Load")); g_signal_connect(w, "clicked", G_CALLBACK(FitDialogLoad), d); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); w = gtk_button_new_with_mnemonic(_("_Save")); set_button_icon(w, "document-save"); g_signal_connect(w, "clicked", G_CALLBACK(FitDialogSave), d); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); w = gtk_button_new_with_mnemonic(_("_Draw")); gtk_box_pack_end(GTK_BOX(hbox), w, FALSE, FALSE, 4); g_signal_connect(w, "clicked", G_CALLBACK(FitDialogDraw), d); w = gtk_button_new_with_mnemonic(_("_Result")); gtk_box_pack_end(GTK_BOX(hbox), w, FALSE, FALSE, 4); g_signal_connect(w, "clicked", G_CALLBACK(FitDialogResult), d); g_signal_connect(d->dim, "changed", G_CALLBACK(FitDialogSetSensitivity), d); g_signal_connect(d->type, "changed", G_CALLBACK(FitDialogSetSensitivity), d); g_signal_connect(d->through_point, "toggled", G_CALLBACK(FitDialogSetSensitivity), d); g_signal_connect(d->derivatives, "toggled", G_CALLBACK(FitDialogSetSensitivity), d); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } FitDialogSetupItem(wi, d, d->Id); } static void FitDialogClose(GtkWidget *w, void *data) { struct FitDialog *d; int ret; int i, lastid; d = (struct FitDialog *) data; switch (d->ret) { case IDOK: break; case IDDELETE: break; case IDCANCEL: break; default: d->ret = IDLOOP; return; } ret = d->ret; d->ret = IDLOOP; if (ret == IDOK && ! FitDialogApply(w, d)) { return; } d->ret = ret; lastid = chkobjlastinst(d->Obj); for (i = lastid; i > d->Lastid; i--) { delobj(d->Obj, i); } } void FitDialog(struct FitDialog *data, struct objlist *obj, int id) { data->SetupWindow = FitDialogSetup; data->CloseWindow = FitDialogClose; data->Obj = obj; data->Id = id; data->Lastid = chkobjlastinst(obj); } static void move_tab_setup_item(struct FileDialog *d, int id) { unsigned int j, movenum; struct narray *move, *movex, *movey; GtkTreeIter iter; list_store_clear(d->move.list); exeobj(d->Obj, "move_data_adjust", id, 0, NULL); getobj(d->Obj, "move_data", id, 0, NULL, &move); getobj(d->Obj, "move_data_x", id, 0, NULL, &movex); getobj(d->Obj, "move_data_y", id, 0, NULL, &movey); movenum = arraynum(move); if (arraynum(movex) < movenum) { movenum = arraynum(movex); } if (arraynum(movey) < movenum) { movenum = arraynum(movey); } if (movenum < 1) { return; } for (j = 0; j < movenum; j++) { int line; double x, y; char buf[64]; line = arraynget_int(move, j); x = arraynget_double(movex, j); y = arraynget_double(movey, j); list_store_append(d->move.list, &iter); list_store_set_int(d->move.list, &iter, 0, line); snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, x); list_store_set_string(d->move.list, &iter, 1, buf); snprintf(buf, sizeof(buf), DOUBLE_STR_FORMAT, y); list_store_set_string(d->move.list, &iter, 2, buf); } } static void FileMoveDialogAdd(GtkWidget *w, gpointer client_data) { struct FileDialog *d; int a; double x, y; const char *buf; char *endptr, buf2[64]; GtkTreeIter iter; d = (struct FileDialog *) client_data; a = spin_entry_get_val(d->move.line); buf = gtk_entry_get_text(GTK_ENTRY(d->move.x)); if (buf[0] == '\0') return; x = strtod(buf, &endptr); if (x != x || x == HUGE_VAL || x == - HUGE_VAL || endptr[0] != '\0') return; buf = gtk_entry_get_text(GTK_ENTRY(d->move.y)); if (buf[0] == '\0') return; y = strtod(buf, &endptr); if (y != y || y == HUGE_VAL || y == - HUGE_VAL || endptr[0] != '\0') return; list_store_append(d->move.list, &iter); list_store_set_int(d->move.list, &iter, 0, a); snprintf(buf2, sizeof(buf2), DOUBLE_STR_FORMAT, x); list_store_set_string(d->move.list, &iter, 1, buf2); snprintf(buf2, sizeof(buf2), DOUBLE_STR_FORMAT, y); list_store_set_string(d->move.list, &iter, 2, buf2); gtk_entry_set_text(GTK_ENTRY(d->move.x), ""); gtk_entry_set_text(GTK_ENTRY(d->move.y), ""); d->move.changed = TRUE; } static void FileMoveDialogRemove(GtkWidget *w, gpointer client_data) { struct FileDialog *d; d = (struct FileDialog *) client_data; list_store_remove_selected_cb(w, d->move.list); d->move.changed = TRUE; } static void move_tab_copy(GtkButton *btn, gpointer user_data) { struct FileDialog *d; int sel; d = (struct FileDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FileCB); if (sel != -1) { move_tab_setup_item(d, sel); d->move.changed = TRUE; } } static GtkWidget * move_tab_create(struct FileDialog *d) { GtkWidget *w, *hbox, *swin, *table, *vbox; n_list_store list[] = { {N_("Line No."), G_TYPE_INT, TRUE, FALSE, NULL}, {"X", G_TYPE_STRING, TRUE, FALSE, NULL}, {"Y", G_TYPE_STRING, TRUE, FALSE, NULL}, }; int i; swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(swin), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); w = list_store_create(sizeof(list) / sizeof(*list), list); list_store_set_sort_column(w, 0); list_store_set_selection_mode(w, GTK_SELECTION_MULTIPLE); d->move.list = w; gtk_container_add(GTK_CONTAINER(swin), w); set_widget_margin(swin, WIDGET_MARGIN_TOP | WIDGET_MARGIN_BOTTOM); table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_NATURAL, TRUE, FALSE); g_signal_connect(w, "activate", G_CALLBACK(FileMoveDialogAdd), d); add_widget_to_table(table, w, _("_Line:"), FALSE, i++); d->move.line = w; w = create_text_entry(TRUE, FALSE); g_signal_connect(w, "activate", G_CALLBACK(FileMoveDialogAdd), d); add_widget_to_table(table, w, "_X:", FALSE, i++); d->move.x = w; w = create_text_entry(TRUE, FALSE); g_signal_connect(w, "activate", G_CALLBACK(FileMoveDialogAdd), d); add_widget_to_table(table, w, "_Y:", FALSE, i++); d->move.y = w; w = gtk_button_new_with_mnemonic(_("_Add")); set_button_icon(w, "list-add"); add_widget_to_table(table, w, "", FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(FileMoveDialogAdd), d); w = gtk_button_new_with_mnemonic(_("_Remove")); set_button_icon(w, "list-remove"); add_widget_to_table(table, w, NULL, FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(FileMoveDialogRemove), d); set_sensitivity_by_selection(d->move.list, w); w = gtk_button_new_with_mnemonic(_("Select _All")); set_button_icon(w, "edit-select-all"); add_widget_to_table(table, w, NULL, FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(list_store_select_all_cb), d->move.list); set_sensitivity_by_row_num(d->move.list, w); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), swin, TRUE, TRUE, 4); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), hbox); set_widget_margin(w, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), w, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(move_tab_copy), d, "data"); return vbox; } static int move_tab_set_value(struct FileDialog *d) { int line, a; double x, y; struct narray *move, *movex, *movey; GtkTreeIter iter; gboolean state; if (d->move.changed == FALSE) { return 0; } set_graph_modified(); exeobj(d->Obj, "move_data_adjust", d->Id, 0, NULL); getobj(d->Obj, "move_data", d->Id, 0, NULL, &move); getobj(d->Obj, "move_data_x", d->Id, 0, NULL, &movex); getobj(d->Obj, "move_data_y", d->Id, 0, NULL, &movey); if (move) { putobj(d->Obj, "move_data", d->Id, NULL); move = NULL; } if (movex) { putobj(d->Obj, "move_data_x", d->Id, NULL); movex = NULL; } if (movey) { putobj(d->Obj, "move_data_y", d->Id, NULL); movey = NULL; } state = list_store_get_iter_first(d->move.list, &iter); while (state) { unsigned int j, movenum; char *ptr, *endptr; a = list_store_get_int(d->move.list, &iter, 0); ptr = list_store_get_string(d->move.list, &iter, 1); x = strtod(ptr, &endptr); g_free(ptr); ptr = list_store_get_string(d->move.list, &iter, 2); y = strtod(ptr, &endptr); g_free(ptr); if (move == NULL) move = arraynew(sizeof(int)); if (movex == NULL) movex = arraynew(sizeof(double)); if (movey == NULL) movey = arraynew(sizeof(double)); movenum = arraynum(move); if (arraynum(movex) < movenum) movenum = arraynum(movex); if (arraynum(movey) < movenum) movenum = arraynum(movey); for (j = 0; j < movenum; j++) { line = arraynget_int(move, j); if (line == a) break; } if (j == movenum) { arrayadd(move, &a); arrayadd(movex, &x); arrayadd(movey, &y); } state = list_store_iter_next(d->move.list, &iter); } putobj(d->Obj, "move_data", d->Id, move); putobj(d->Obj, "move_data_x", d->Id, movex); putobj(d->Obj, "move_data_y", d->Id, movey); return 0; } static void mask_tab_setup_item(struct FileDialog *d, int id) { int masknum; struct narray *mask; GtkTreeIter iter; list_store_clear(d->mask.list); getobj(d->Obj, "mask", id, 0, NULL, &mask); if ((masknum = arraynum(mask)) > 0) { int j; for (j = 0; j < masknum; j++) { int line; line = arraynget_int(mask, j); list_store_append(d->mask.list, &iter); list_store_set_int(d->mask.list, &iter, 0, line); } } } static void FileMaskDialogAdd(GtkWidget *w, gpointer client_data) { struct FileDialog *d; int a; GtkTreeIter iter; d = (struct FileDialog *) client_data; a = spin_entry_get_val(d->mask.line); list_store_append(d->mask.list, &iter); list_store_set_int(d->mask.list, &iter, 0, a); d->mask.changed = TRUE; } static void mask_tab_copy(GtkButton *btn, gpointer user_data) { struct FileDialog *d; int sel; d = (struct FileDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FileCB); if (sel != -1) { mask_tab_setup_item(d, sel); d->mask.changed = TRUE; } } static void FileMaskDialogRemove(GtkWidget *w, gpointer client_data) { struct FileDialog *d; d = (struct FileDialog *) client_data; list_store_remove_selected_cb(w, d->mask.list); d->mask.changed = TRUE; } static GtkWidget * mask_tab_create(struct FileDialog *d) { GtkWidget *w, *swin, *hbox, *table, *vbox, *frame; n_list_store list[] = { {_("Line No."), G_TYPE_INT, TRUE, FALSE, NULL}, }; int i; table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_NATURAL, TRUE, FALSE); g_signal_connect(w, "activate", G_CALLBACK(FileMaskDialogAdd), d); add_widget_to_table(table, w, _("_Line:"), FALSE, i++); d->mask.line = w; swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(swin), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); w = list_store_create(sizeof(list) / sizeof(*list), list); list_store_set_sort_column(w, 0); list_store_set_selection_mode(w, GTK_SELECTION_MULTIPLE); d->mask.list = w; gtk_container_add(GTK_CONTAINER(swin), w); set_widget_margin(swin, WIDGET_MARGIN_TOP | WIDGET_MARGIN_BOTTOM); w = gtk_button_new_with_mnemonic(_("_Add")); set_button_icon(w, "list-add"); add_widget_to_table(table, w, "", FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(FileMaskDialogAdd), d); w = gtk_button_new_with_mnemonic(_("_Remove")); set_button_icon(w, "list-remove"); add_widget_to_table(table, w, NULL, FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(FileMaskDialogRemove), d); set_sensitivity_by_selection(d->mask.list, w); w = gtk_button_new_with_mnemonic(_("Select _All")); set_button_icon(w, "edit-select-all"); add_widget_to_table(table, w, NULL, FALSE, i++); g_signal_connect(w, "clicked", G_CALLBACK(list_store_select_all_cb), d->mask.list); set_sensitivity_by_row_num(d->mask.list, w); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), swin, TRUE, TRUE, 4); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), hbox); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(mask_tab_copy), d, "data"); return vbox; } static int mask_tab_set_value(struct FileDialog *d) { int a; struct narray *mask; GtkTreeIter iter; gboolean state; if (d->mask.changed == FALSE) { return 0; } getobj(d->Obj, "mask", d->Id, 0, NULL, &mask); if (mask) { putobj(d->Obj, "mask", d->Id, NULL); mask = NULL; } state = list_store_get_iter_first(d->mask.list, &iter); while (state) { a = list_store_get_int(d->mask.list, &iter, 0); if (mask == NULL) mask = arraynew(sizeof(int)); arrayadd(mask, &a); state = list_store_iter_next(d->mask.list, &iter); } putobj(d->Obj, "mask", d->Id, mask); set_graph_modified(); return 0; } static void load_tab_setup_item(struct FileDialog *d, int id) { char *ifs, *s; unsigned int i, j, l; SetWidgetFromObjField(d->load.headskip, d->Obj, id, "head_skip"); SetWidgetFromObjField(d->load.readstep, d->Obj, id, "read_step"); SetWidgetFromObjField(d->load.finalline, d->Obj, id, "final_line"); if (d->source != DATA_SOURCE_FILE) { return; } SetWidgetFromObjField(d->load.remark, d->Obj, id, "remark"); SetWidgetFromObjField(d->load.csv, d->Obj, id, "csv"); sgetobjfield(d->Obj, id, "ifs", NULL, &ifs, FALSE, FALSE, FALSE); if (ifs == NULL) { return; } l = strlen(ifs); s = g_malloc(l * 2 + 1); if (s == NULL) { g_free(ifs); return; } j = 0; for (i = 0; i < l; i++) { if (ifs[i] == '\t') { s[j++] = '\\'; s[j++] = 't'; } else if (ifs[i] == '\\') { s[j++] = '\\'; s[j++] = '\\'; } else { s[j++] = ifs[i]; } } s[j] = '\0'; gtk_entry_set_text(GTK_ENTRY(d->load.ifs), s); g_free(s); g_free(ifs); } static void load_tab_copy(GtkButton *btn, gpointer user_data) { struct FileDialog *d; int sel; d = (struct FileDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FileCB); if (sel != -1) { load_tab_setup_item(d, sel); } } static GtkWidget * load_tab_create(struct FileDialog *d) { GtkWidget *w, *table, *frame, *vbox; int i; table = gtk_grid_new(); i = 0; w = create_spin_entry_type(SPIN_BUTTON_TYPE_UINT, TRUE, TRUE); add_widget_to_table(table, w, _("_Head skip:"), FALSE, i++); d->load.headskip = w; w = create_spin_entry(1, INT_MAX, 1, TRUE, TRUE); add_widget_to_table(table, w, _("_Read step:"), FALSE, i++); d->load.readstep = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_INT, TRUE, TRUE); add_widget_to_table(table, w, _("_Final line:"), FALSE, i++); d->load.finalline = w; if (d->source == DATA_SOURCE_FILE) { w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Remark:"), TRUE, i++); d->load.remark = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_IFS:"), TRUE, i++); d->load.ifs = w; w = gtk_check_button_new_with_mnemonic(_("_CSV")); add_widget_to_table(table, w, NULL, TRUE, i++); d->load.csv = w; } frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(load_tab_copy), d, "data"); return vbox; } static void decode_ifs_text(GString *s, const char *ifs) { int i, l; l = strlen(ifs); for (i = 0; i < l; i++) { if ((ifs[i] == '\\') && (ifs[i + 1] == 't')) { g_string_append_c(s, 0x09); i++; } else if (ifs[i] == '\\') { g_string_append_c(s, '\\'); i++; } else if (isascii(ifs[i])) { g_string_append_c(s, ifs[i]); } } } static int load_tab_set_value(struct FileDialog *d) { const char *ifs; char *obuf; GString *s; if (SetObjFieldFromWidget(d->load.headskip, d->Obj, d->Id, "head_skip")) return 1; if (SetObjFieldFromWidget(d->load.readstep, d->Obj, d->Id, "read_step")) return 1; if (SetObjFieldFromWidget(d->load.finalline, d->Obj, d->Id, "final_line")) return 1; if (d->source != DATA_SOURCE_FILE) { return 0; } if (SetObjFieldFromWidget(d->load.remark, d->Obj, d->Id, "remark")) return 1; ifs = gtk_entry_get_text(GTK_ENTRY(d->load.ifs)); s = g_string_new(""); decode_ifs_text(s, ifs); sgetobjfield(d->Obj, d->Id, "ifs", NULL, &obuf, FALSE, FALSE, FALSE); if (obuf == NULL || strcmp(s->str, obuf)) { if (sputobjfield(d->Obj, d->Id, "ifs", s->str) != 0) { g_free(obuf); g_string_free(s, TRUE); return 1; } set_graph_modified(); } g_free(obuf); g_string_free(s, TRUE); if (SetObjFieldFromWidget(d->load.csv, d->Obj, d->Id, "csv")) return 1; return 0; } static void copy_text_to_entry(GtkWidget *text, GtkWidget *entry) { GtkTextBuffer *buffer; gchar *str; buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)); str = get_text_from_buffer(buffer); gtk_entry_set_text(GTK_ENTRY(entry), str); g_free(str); } static void copy_entry_to_text(GtkWidget *text, GtkWidget *entry) { const gchar *str; str = gtk_entry_get_text(GTK_ENTRY(entry)); set_text_to_source_buffer(text, str); } static void copy_text_to_entry_all(struct FileDialog *d) { copy_text_to_entry(d->math.text_x, d->math.x); copy_text_to_entry(d->math.text_y, d->math.y); copy_text_to_entry(d->math.text_f, d->math.f); copy_text_to_entry(d->math.text_g, d->math.g); copy_text_to_entry(d->math.text_h, d->math.h); } static void copy_entry_to_text_all(struct FileDialog *d) { copy_entry_to_text(d->math.text_x, d->math.x); copy_entry_to_text(d->math.text_y, d->math.y); copy_entry_to_text(d->math.text_f, d->math.f); copy_entry_to_text(d->math.text_g, d->math.g); copy_entry_to_text(d->math.text_h, d->math.h); } static void math_tab_setup_item(struct FileDialog *d, int id) { SetWidgetFromObjField(d->math.xsmooth, d->Obj, id, "smooth_x"); SetWidgetFromObjField(d->math.ysmooth, d->Obj, id, "smooth_y"); SetWidgetFromObjField(d->math.averaging_type, d->Obj, id, "averaging_type"); SetWidgetFromObjField(d->math.x, d->Obj, id, "math_x"); SetWidgetFromObjField(d->math.y, d->Obj, id, "math_y"); SetWidgetFromObjField(d->math.f, d->Obj, id, "func_f"); SetWidgetFromObjField(d->math.g, d->Obj, id, "func_g"); SetWidgetFromObjField(d->math.h, d->Obj, id, "func_h"); copy_entry_to_text_all(d); entry_completion_set_entry(NgraphApp.x_math_list, d->math.x); entry_completion_set_entry(NgraphApp.y_math_list, d->math.y); set_source_style(d->math.text_x); set_source_style(d->math.text_y); set_source_style(d->math.text_f); set_source_style(d->math.text_g); set_source_style(d->math.text_h); } static void math_tab_copy(GtkButton *btn, gpointer user_data) { struct FileDialog *d; int sel; d = (struct FileDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FileCB); if (sel != -1) { math_tab_setup_item(d, sel); } } static gboolean func_entry_focused(GtkWidget *w, GdkEventFocus *event, gpointer user_data) { GtkEntryCompletion *compl; compl = GTK_ENTRY_COMPLETION(user_data); entry_completion_set_entry(compl, w); return FALSE; } static GtkWidget * create_math_text_tab(GtkWidget *tab, const gchar *label) { GtkWidget *w, *title, *swin; w = create_source_view(); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), w); title = gtk_label_new_with_mnemonic(label); gtk_notebook_append_page(GTK_NOTEBOOK(tab), swin, title); return w; } static void MathDialogChangeInputType(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data) { struct FileDialog *d; d = user_data; d->math_page = page_num; switch (page_num) { case 0: copy_text_to_entry_all(d); break; case 1: copy_entry_to_text_all(d); break; } } static GtkWidget * math_text_widgets_create(struct FileDialog *d) { GtkWidget *tab; tab = gtk_notebook_new(); d->math_tab = GTK_NOTEBOOK(tab); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tab), GTK_POS_LEFT); d->math.text_x = create_math_text_tab(tab, _("_X math:")); d->math.text_y = create_math_text_tab(tab, _("_Y math:")); d->math.text_f = create_math_text_tab(tab, "_F(X,Y,Z):"); d->math.text_g = create_math_text_tab(tab, "_G(X,Y,Z):"); d->math.text_h = create_math_text_tab(tab, "_H(X,Y,Z):"); return tab; } static int math_common_widgets_create(struct FileDialog *d, GtkWidget *grid, int pos) { GtkWidget *w, *tab, *title, *table; int i; tab = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(tab), GTK_POS_BOTTOM); gtk_widget_set_vexpand(tab, TRUE); d->math_input_tab = tab; table = gtk_grid_new(); i = 0; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_X math:"), TRUE, i++); d->math.x = w; w = create_text_entry(TRUE, TRUE); add_widget_to_table(table, w, _("_Y math:"), TRUE, i++); d->math.y = w; w = create_text_entry(TRUE, TRUE); g_signal_connect(w, "focus-in-event", G_CALLBACK(func_entry_focused), NgraphApp.func_list); add_widget_to_table(table, w, "_F(X,Y,Z):", TRUE, i++); d->math.f = w; w = create_text_entry(TRUE, TRUE); g_signal_connect(w, "focus-in-event", G_CALLBACK(func_entry_focused), NgraphApp.func_list); add_widget_to_table(table, w, "_G(X,Y,Z):", TRUE, i++); d->math.g = w; w = create_text_entry(TRUE, TRUE); g_signal_connect(w, "focus-in-event", G_CALLBACK(func_entry_focused), NgraphApp.func_list); add_widget_to_table(table, w, "_H(X,Y,Z):", TRUE, i++); d->math.h = w; title = gtk_label_new(_("single line")); gtk_notebook_append_page(GTK_NOTEBOOK(tab), table, title); title = gtk_label_new(_("multi line")); w = math_text_widgets_create(d); gtk_notebook_append_page(GTK_NOTEBOOK(tab), w, title); g_signal_connect(tab, "switch-page", G_CALLBACK(MathDialogChangeInputType), d); add_widget_to_table_sub(grid, tab, NULL, TRUE, 0, 4, 2, pos++); return pos; } static GtkWidget * math_tab_create(struct FileDialog *d) { GtkWidget *table, *w, *vbox, *frame; int i; table = gtk_grid_new(); i = 0; w = create_spin_entry(0, FILE_OBJ_SMOOTH_MAX, 1, FALSE, TRUE); gtk_widget_set_halign (w, GTK_ALIGN_START); add_widget_to_table(table, w, _("_X smooth:"), FALSE, i); d->math.xsmooth = w; w = combo_box_create(); gtk_widget_set_hexpand(w, TRUE); add_widget_to_table_sub(table, w, _("_Averaging type:"), FALSE, 2, 1, 2, i++); d->math.averaging_type = w; w = create_spin_entry(0, FILE_OBJ_SMOOTH_MAX, 1, FALSE, TRUE); gtk_widget_set_halign (w, GTK_ALIGN_START); add_widget_to_table(table, w, _("_Y smooth:"), FALSE, i++); d->math.ysmooth = w; math_common_widgets_create(d, table, i); frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), table); set_widget_margin(frame, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(math_tab_copy), d, "data"); return vbox; } enum MATH_ERROR_FIELD { MATH_ERROR_FIELD_NONE, MATH_ERROR_FIELD_X, MATH_ERROR_FIELD_Y, MATH_ERROR_FIELD_F, MATH_ERROR_FIELD_G, MATH_ERROR_FIELD_H, MATH_ERROR_FIELD_SX, MATH_ERROR_FIELD_SY, }; static int math_set_value_common(struct FileDialog *d) { const char *s; if (d->math_page == 1) { copy_text_to_entry_all(d); } if (SetObjFieldFromWidget(d->math.x, d->Obj, d->Id, "math_x")) return MATH_ERROR_FIELD_X; if (SetObjFieldFromWidget(d->math.y, d->Obj, d->Id, "math_y")) return MATH_ERROR_FIELD_Y; if (SetObjFieldFromWidget(d->math.f, d->Obj, d->Id, "func_f")) return MATH_ERROR_FIELD_F; if (SetObjFieldFromWidget(d->math.g, d->Obj, d->Id, "func_g")) return MATH_ERROR_FIELD_G; if (SetObjFieldFromWidget(d->math.h, d->Obj, d->Id, "func_h")) return MATH_ERROR_FIELD_H; s = gtk_entry_get_text(GTK_ENTRY(d->math.y)); entry_completion_append(NgraphApp.y_math_list, s); s = gtk_entry_get_text(GTK_ENTRY(d->math.x)); entry_completion_append(NgraphApp.x_math_list, s); s = gtk_entry_get_text(GTK_ENTRY(d->math.f)); entry_completion_append(NgraphApp.func_list, s); s = gtk_entry_get_text(GTK_ENTRY(d->math.g)); entry_completion_append(NgraphApp.func_list, s); s = gtk_entry_get_text(GTK_ENTRY(d->math.h)); entry_completion_append(NgraphApp.func_list, s); return MATH_ERROR_FIELD_NONE; } static int math_tab_set_value(void *data) { struct FileDialog *d; d = (struct FileDialog *) data; if (SetObjFieldFromWidget(d->math.xsmooth, d->Obj, d->Id, "smooth_x")) return MATH_ERROR_FIELD_SX; if (SetObjFieldFromWidget(d->math.ysmooth, d->Obj, d->Id, "smooth_y")) return MATH_ERROR_FIELD_SY; if (SetObjFieldFromWidget(d->math.averaging_type, d->Obj, d->Id, "averaging_type")) return MATH_ERROR_FIELD_SX; return math_set_value_common(d); } static void MarkDialogCB(GtkWidget *w, gpointer client_data) { int i; struct MarkDialog *d; d = (struct MarkDialog *) client_data; if (! d->cb_respond) return; for (i = 0; i < MARK_TYPE_NUM; i++) { if (w == d->toggle[i]) break; } d->Type = i; d->ret = IDOK; gtk_dialog_response(GTK_DIALOG(d->widget), GTK_RESPONSE_OK); } void button_set_mark_image(GtkWidget *w, int type) { if (type < 0 || type >= MARK_TYPE_NUM) { type = 0; } if (NgraphApp.markpix[type]) { GtkWidget *img; char buf[64]; GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_get_from_surface(NgraphApp.markpix[type], 0, 0, MARK_PIX_SIZE, MARK_PIX_SIZE); img = gtk_image_new_from_pixbuf(pixbuf); g_object_unref(pixbuf); if (img) { gtk_button_set_image(GTK_BUTTON(w), img); } snprintf(buf, sizeof(buf), "%02d", type); gtk_widget_set_tooltip_text(w, buf); } } static void MarkDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct MarkDialog *d; int type; #define COL 10 d = (struct MarkDialog *) data; if (makewidget) { GtkWidget *w, *grid; grid = gtk_grid_new(); gtk_grid_set_column_spacing(GTK_GRID(grid), 8); gtk_grid_set_row_spacing(GTK_GRID(grid), 8); gtk_widget_set_margin_end(grid, 4); gtk_widget_set_margin_start(grid, 4); for (type = 0; type < MARK_TYPE_NUM; type++) { w = gtk_toggle_button_new(); button_set_mark_image(w, type); g_signal_connect(w, "clicked", G_CALLBACK(MarkDialogCB), d); d->toggle[type] = w; gtk_grid_attach(GTK_GRID(grid), w, type % COL, type / COL, 1, 1); } gtk_box_pack_start(GTK_BOX(d->vbox), grid, FALSE, FALSE, 4); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } d->cb_respond = FALSE; for (type = 0; type < MARK_TYPE_NUM; type++) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->toggle[type]), FALSE); } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(d->toggle[d->Type]), TRUE); d->focus = d->toggle[d->Type]; d->cb_respond = TRUE; } static void MarkDialogClose(GtkWidget *w, void *data) { } void MarkDialog(struct MarkDialog *data, GtkWidget *parent, int type) { if (type < 0 || type >= MARK_TYPE_NUM) { type = 0; } data->SetupWindow = MarkDialogSetup; data->CloseWindow = MarkDialogClose; data->Type = type; data->parent = parent; } static void file_setup_item(struct FileDialog *d, int id) { if (d->source != DATA_SOURCE_RANGE) { SetWidgetFromObjField(d->xcol, d->Obj, id, "x"); SetWidgetFromObjField(d->ycol, d->Obj, id, "y"); } axis_combo_box_setup(d->xaxis, d->Obj, id, "axis_x"); axis_combo_box_setup(d->yaxis, d->Obj, id, "axis_y"); } static void set_fit_button_label(GtkWidget *btn, const char *str) { char buf[128]; if (str && str[0] != '\0') { snprintf(buf, sizeof(buf), "Fit:%s", str); } else { snprintf(buf, sizeof(buf), _("Create")); } gtk_button_set_label(GTK_BUTTON(btn), buf); } static void plot_tab_setup_item(struct FileDialog *d, int id) { int a; SetWidgetFromObjField(d->type, d->Obj, id, "type"); SetWidgetFromObjField(d->curve, d->Obj, id, "interpolation"); getobj(d->Obj, "mark_type", id, 0, NULL, &a); button_set_mark_image(d->mark_btn, a); MarkDialog(&(d->mark), d->widget, a); SetWidgetFromObjField(d->size, d->Obj, id, "mark_size"); SetWidgetFromObjField(d->width, d->Obj, id, "line_width"); SetStyleFromObjField(d->style, d->Obj, id, "line_style"); SetWidgetFromObjField(d->join, d->Obj, id, "line_join"); SetWidgetFromObjField(d->miter, d->Obj, id, "line_miter_limit"); SetWidgetFromObjField(d->clip, d->Obj, id, "data_clip"); set_color(d->col1, d->Obj, id, NULL); set_color2(d->col2, d->Obj, id); FileDialogType(d->type, d); } static void FileDialogSetupItem(GtkWidget *w, struct FileDialog *d) { char *valstr; plot_tab_setup_item(d, d->Id); math_tab_setup_item(d, d->Id); load_tab_setup_item(d, d->Id); mask_tab_setup_item(d, d->Id); move_tab_setup_item(d, d->Id); file_setup_item(d, d->Id); switch (d->source) { case DATA_SOURCE_FILE: SetWidgetFromObjField(d->file, d->Obj, d->Id, "file"); gtk_editable_set_position(GTK_EDITABLE(d->file), -1); break; case DATA_SOURCE_ARRAY: SetWidgetFromObjField(d->file, d->Obj, d->Id, "array"); break; case DATA_SOURCE_RANGE: SetWidgetFromObjField(d->min, d->Obj, d->Id, "range_min"); SetWidgetFromObjField(d->max, d->Obj, d->Id, "range_max"); SetWidgetFromObjField(d->div, d->Obj, d->Id, "range_div"); break; } sgetobjfield(d->Obj, d->Id, "fit", NULL, &valstr, FALSE, FALSE, FALSE); if (valstr) { int i; for (i = 0; (valstr[i] != '\0') && (valstr[i] != ':'); i++); if (valstr[i] == ':') { i++; } set_fit_button_label(d->fit, valstr + i); g_free(valstr); } gtk_widget_set_sensitive(d->apply_all, d->multi_open); gtk_notebook_set_current_page(GTK_NOTEBOOK(d->math_input_tab), Menulocal.math_input_mode); } static void FileDialogMark(GtkWidget *w, gpointer client_data) { struct FileDialog *d; d = (struct FileDialog *) client_data; DialogExecute(d->widget, &(d->mark)); button_set_mark_image(w, d->mark.Type); } static int execute_fit_dialog(GtkWidget *w, struct objlist *fileobj, int fileid, struct objlist *fitobj, int fitid) { int save_type, type, ret; type = PLOT_TYPE_FIT; getobj(fileobj, "type", fileid, 0, NULL, &save_type); putobj(fileobj, "type", fileid, &type); FitDialog(&DlgFit, fitobj, fitid); ret = DialogExecute(w, &DlgFit); putobj(fileobj, "type", fileid, &save_type); return ret; } static int show_fit_dialog(struct objlist *obj, int id, GtkWidget *parent) { struct objlist *fitobj, *robj; char *fit; int fitid = 0, fitoid, ret, create = FALSE; struct narray iarray; if ((fitobj = chkobject("fit")) == NULL) return -1; if (getobj(obj, "fit", id, 0, NULL, &fit) == -1) return -1; if (fit) { int idnum; arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, &robj, &iarray, FALSE, NULL)) return -1; idnum = arraynum(&iarray); if ((robj != fitobj) || (idnum < 1)) { if (putobj(obj, "fit", id, NULL) == -1) { arraydel(&iarray); return -1; } } else { fitid = arraylast_int(&iarray); } arraydel(&iarray); } if (fit == NULL) { N_VALUE *inst; fitid = newobj(fitobj); inst = getobjinst(fitobj, fitid); _getobj(fitobj, "oid", inst, &fitoid); if ((fit = mkobjlist(fitobj, NULL, fitoid, NULL, TRUE)) == NULL) return -1; if (putobj(obj, "fit", id, fit) == -1) { g_free(fit); return -1; } create = TRUE; } ret = execute_fit_dialog(parent, obj, id, fitobj, fitid); switch (ret) { case IDCANCEL: if (! create) break; /* fall through */ case IDDELETE: delobj(fitobj, fitid); putobj(obj, "fit", id, NULL); if (! create) set_graph_modified(); break; case IDOK: if (create) set_graph_modified(); break; } return ret; } static void FileDialogFit(GtkWidget *w, gpointer client_data) { struct FileDialog *d; char *valstr; d = (struct FileDialog *) client_data; show_fit_dialog(d->Obj, d->Id, d->widget); sgetobjfield(d->Obj, d->Id, "fit", NULL, &valstr, FALSE, FALSE, FALSE); if (valstr) { int i; for (i = 0; (valstr[i] != '\0') && (valstr[i] != ':'); i++); if (valstr[i] == ':') i++; set_fit_button_label(d->fit, valstr + i); g_free(valstr); } } static void plot_tab_copy(GtkButton *btn, gpointer user_data) { struct FileDialog *d; int sel; d = (struct FileDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FileCB); if (sel != -1) { plot_tab_setup_item(d, sel); } } void copy_file_obj_field(struct objlist *obj, int id, int sel, int copy_filename) { char *field[] = {"name", "fit", "file", "array", NULL}; if (copy_filename) { field[2] = NULL; } copy_obj_field(obj, id, sel, field); FitCopy(obj, id, sel); set_graph_modified(); } static void FileDialogOption(GtkWidget *w, gpointer client_data) { struct FileDialog *d; d = (struct FileDialog *) client_data; exeobj(d->Obj, "load_settings", d->Id, 0, NULL); FileDialogSetupItem(d->widget, d); } static void edit_file(const char *file) { char *cmd, *localize_name; if (file == NULL) return; localize_name = get_localized_filename(file); if (localize_name == NULL) return; #if OSX cmd = g_strdup_printf("%s \"%s\"", Menulocal.editor, localize_name); #else cmd = g_strdup_printf("\"%s\" \"%s\"", Menulocal.editor, localize_name); #endif g_free(localize_name); system_bg(cmd); g_free(cmd); } static void FileDialogEdit(GtkWidget *w, gpointer client_data) { struct FileDialog *d; const char *file; d = (struct FileDialog *) client_data; if (Menulocal.editor == NULL) return; file = gtk_entry_get_text(GTK_ENTRY(d->file)); if (file == NULL) return; edit_file(file); } #if 1 static void FileDialogType(GtkWidget *w, gpointer client_data) { struct FileDialog *d; int type; d = (struct FileDialog *) client_data; type = combo_box_get_active(w); set_widget_sensitivity_with_label(d->curve, TRUE); set_widget_sensitivity_with_label(d->fit, TRUE); switch (type) { case PLOT_TYPE_MARK: case PLOT_TYPE_LINE: case PLOT_TYPE_POLYGON: case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_POLYGON_SOLID_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_ERRORBAR_X: case PLOT_TYPE_ERRORBAR_Y: case PLOT_TYPE_STAIRCASE_X: case PLOT_TYPE_STAIRCASE_Y: case PLOT_TYPE_BAR_X: case PLOT_TYPE_BAR_Y: case PLOT_TYPE_BAR_SOLID_FILL_X: case PLOT_TYPE_BAR_SOLID_FILL_Y: case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_FILL_Y: set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_CURVE: set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_FIT: set_widget_sensitivity_with_label(d->curve, FALSE); break; } } #else static void FileDialogType(GtkWidget *w, gpointer client_data) { struct FileDialog *d; int type; d = (struct FileDialog *) client_data; type = combo_box_get_active(w); set_widget_sensitivity_with_label(d->mark_btn, TRUE); set_widget_sensitivity_with_label(d->curve, TRUE); set_widget_sensitivity_with_label(d->col2, TRUE); set_widget_sensitivity_with_label(d->size, TRUE); set_widget_sensitivity_with_label(d->miter, TRUE); set_widget_sensitivity_with_label(d->join, TRUE); set_widget_sensitivity_with_label(d->fit, TRUE); set_widget_sensitivity_with_label(d->style, TRUE); set_widget_sensitivity_with_label(d->width, TRUE); switch (type) { case PLOT_TYPE_MARK: set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_LINE: case PLOT_TYPE_POLYGON: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_CURVE: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_RECTANGLE: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_POLYGON_SOLID_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); set_widget_sensitivity_with_label(d->style, FALSE); set_widget_sensitivity_with_label(d->width, FALSE); break; case PLOT_TYPE_ARROW: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_RECTANGLE_FILL: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_ERRORBAR_X: case PLOT_TYPE_ERRORBAR_Y: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_STAIRCASE_X: case PLOT_TYPE_STAIRCASE_Y: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_BAR_X: case PLOT_TYPE_BAR_Y: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_BAR_SOLID_FILL_X: case PLOT_TYPE_BAR_SOLID_FILL_Y: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); set_widget_sensitivity_with_label(d->style, FALSE); set_widget_sensitivity_with_label(d->width, FALSE); break; case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_FILL_Y: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->miter, FALSE); set_widget_sensitivity_with_label(d->join, FALSE); set_widget_sensitivity_with_label(d->fit, FALSE); break; case PLOT_TYPE_FIT: set_widget_sensitivity_with_label(d->mark_btn, FALSE); set_widget_sensitivity_with_label(d->curve, FALSE); set_widget_sensitivity_with_label(d->col2, FALSE); set_widget_sensitivity_with_label(d->size, FALSE); break; } } #endif static void file_settings_copy(GtkButton *btn, gpointer user_data) { struct FileDialog *d; int sel; d = (struct FileDialog *) user_data; sel = CopyClick(d->widget, d->Obj, d->Id, FileCB); if (sel != -1) { file_setup_item(d, sel); } } static GtkWidget * plot_tab_create(GtkWidget *parent, struct FileDialog *d) { GtkWidget *table, *hbox, *w, *vbox; int i; hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); table = gtk_grid_new(); i = 0; w = combo_box_create(); add_widget_to_table(table, w, _("_Type:"), FALSE, i++); d->type = w; g_signal_connect(w, "changed", G_CALLBACK(FileDialogType), d); w = gtk_button_new(); add_widget_to_table(table, w, _("_Mark:"), FALSE, i++); d->mark_btn = w; g_signal_connect(w, "clicked", G_CALLBACK(FileDialogMark), d); w = combo_box_create(); add_widget_to_table(table, w, _("_Curve:"), FALSE, i++); d->curve = w; d->fit_table = table; d->fit_row = i; i++; w = create_color_button(parent); add_widget_to_table(table, w, _("_Color 1:"), FALSE, i++); d->col1 = w; w = create_color_button(parent); add_widget_to_table(table, w, _("_Color 2:"), FALSE, i++); d->col2 = w; gtk_box_pack_start(GTK_BOX(hbox), table, FALSE, FALSE, 4); table = gtk_grid_new(); i = 0; w = combo_box_entry_create(); combo_box_entry_set_width(w, NUM_ENTRY_WIDTH); add_widget_to_table(table, w, _("Line _Style:"), TRUE, i++); d->style = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_WIDTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Line Width:"), FALSE, i++); d->width = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Size:"), FALSE, i++); d->size = w; w = create_spin_entry_type(SPIN_BUTTON_TYPE_LENGTH, TRUE, TRUE); add_widget_to_table(table, w, _("_Miter:"), FALSE, i++); d->miter = w; w = combo_box_create(); add_widget_to_table(table, w, _("_Join:"), FALSE, i++); d->join = w; w = gtk_check_button_new_with_mnemonic(_("_Clip")); add_widget_to_table(table, w, NULL, FALSE, i++); d->clip = w; gtk_box_pack_start(GTK_BOX(hbox), table, TRUE, TRUE, 4); w = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(w), hbox); set_widget_margin(w, WIDGET_MARGIN_LEFT | WIDGET_MARGIN_RIGHT); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); gtk_box_pack_start(GTK_BOX(vbox), w, TRUE, TRUE, 4); add_copy_button_to_box(vbox, G_CALLBACK(plot_tab_copy), d, "data"); return vbox; } static void FileDialogSetupCommon(GtkWidget *wi, struct FileDialog *d) { GtkWidget *w, *hbox, *vbox2, *frame, *notebook, *label; vbox2 = gtk_box_new(GTK_ORIENTATION_VERTICAL, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); if (d->source != DATA_SOURCE_RANGE) { w = create_spin_entry(0, FILE_OBJ_MAXCOL, 1, FALSE, TRUE); item_setup(hbox, w, _("_X column:"), TRUE); d->xcol = w; } w = axis_combo_box_create(AXIS_COMBO_BOX_NONE); item_setup(hbox, w, _("_X axis:"), TRUE); d->xaxis = w; gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 4); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); if (d->source != DATA_SOURCE_RANGE) { w = create_spin_entry(0, FILE_OBJ_MAXCOL, 1, FALSE, TRUE); item_setup(hbox, w, _("_Y column:"), TRUE); d->ycol = w; } w = axis_combo_box_create(AXIS_COMBO_BOX_NONE); item_setup(hbox, w, _("_Y axis:"), TRUE); d->yaxis = w; gtk_box_pack_start(GTK_BOX(vbox2), hbox, FALSE, FALSE, 4); add_copy_button_to_box(vbox2, G_CALLBACK(file_settings_copy), d, "data"); hbox = gtk_grid_new(); gtk_grid_set_column_spacing(GTK_GRID(hbox), 4); d->comment_box = hbox; frame = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame), vbox2); gtk_widget_set_hexpand(frame, FALSE); gtk_grid_attach(GTK_GRID(hbox), frame, 0, 0, 1, 1); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, TRUE, TRUE, 4); notebook = gtk_notebook_new(); d->tab = GTK_NOTEBOOK(notebook); gtk_notebook_set_scrollable(d->tab, FALSE); gtk_notebook_set_tab_pos(d->tab, GTK_POS_TOP); w = plot_tab_create(wi, d); label = gtk_label_new_with_mnemonic(_("_Plot")); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = math_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Math")); d->math.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); w = load_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Load")); d->load.tab_id = gtk_notebook_append_page(GTK_NOTEBOOK(notebook), w, label); gtk_box_pack_start(GTK_BOX(d->vbox), notebook, TRUE, TRUE, 4); } static void set_headlines(struct FileDialog *d, const char *s) { gboolean valid; const gchar *sptr; if (s == NULL) { return; } if (Menulocal.file_preview_font) { text_view_with_line_number_set_font(d->comment_view, Menulocal.file_preview_font); } valid = g_utf8_validate(s, -1, &sptr); if (valid) { text_view_with_line_number_set_text(d->comment_view, s); } else { char *ptr; ptr = n_locale_to_utf8(s); if (ptr) { text_view_with_line_number_set_text(d->comment_view, ptr); g_free(ptr); } else { text_view_with_line_number_set_text(d->comment_view, _("This file contain invalid UTF-8 strings.")); } } } #define CHECK_VISIBILITY(i, skip, step, remark, c) (! CHECK_CHR(remark, c) && (i >= skip && ! ((i - skip) % step))) #define CHECK_VISIBILITY_ARRAY(i, skip, step) ((i >= skip && ! ((i - skip) % step))) #define MAX_COLS 100 #define HEADLINE_FIRST_CHAR_COLUMN (MAX_COLS + 0) #define HEADLINE_LINE_NUM_COLUMN (MAX_COLS + 1) #define HEADLINE_VISIBILITY_COLUMN (MAX_COLS + 2) #define HEADLINE_ELLIPSIZE_COLUMN (MAX_COLS + 3) #define HEADLINE_FONT_COLUMN (MAX_COLS + 4) #define HEADLINE_COLUMN_NUM (MAX_COLS + 5) static void set_headline_table_header(struct FileDialog *d) { int x, y, type, i; GString *str; type = combo_box_get_active(d->type); x = spin_entry_get_val(d->xcol); y = spin_entry_get_val(d->ycol); str = g_string_new(""); if (str == NULL) { return; } for (i = 0; i < MAX_COLS; i++) { GtkTreeViewColumn *col; g_string_set_size(str, 0); col = gtk_tree_view_get_column(GTK_TREE_VIEW(d->comment_table), i); if (i == x) { switch (type) { case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: g_string_append(str, "X1"); break; default: g_string_append(str, "X"); } } else if (i == x + 1) { switch (type) { case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: g_string_append(str, "Y1"); break; case PLOT_TYPE_ERRORBAR_X: g_string_append(str, "Ex1"); break; } } else if (i == x + 2) { switch (type) { case PLOT_TYPE_ERRORBAR_X: g_string_append(str, "Ex2"); break; } } if (str->len) { g_string_append_c(str, ' '); } if (i == y) { switch (type) { case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: g_string_append(str, "X2"); break; default: g_string_append(str, "Y"); } } else if (i == y + 1) { switch (type) { case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: g_string_append(str, "Y2"); break; case PLOT_TYPE_ERRORBAR_Y: g_string_append(str, "Ey1"); break; } } else if (i == y + 2) { switch (type) { case PLOT_TYPE_ERRORBAR_Y: g_string_append(str, "Ey2"); break; } } if (str->len) { if (str->str[str->len - 1] != ' ') { g_string_append_c(str, ' '); } g_string_append_printf(str, "(%%%d)", i); } else { g_string_append_printf(str, "%%%d", i); } gtk_tree_view_column_set_title(col, str->str); // gtk_tree_view_column_set_visible(col, i < max_col); } g_string_free(str, TRUE); } static void set_headline_table_array(struct FileDialog *d, int max_lines) { struct array_prm ary; int i, j, l, m, n, skip, step; char *array, buf[64]; GtkListStore *model; getobj(d->Obj, "array", d->Id, 0, NULL, &array); open_array(array, &ary); skip = spin_entry_get_val(d->load.headskip); if (skip < 0) { skip = 0; } step = spin_entry_get_val(d->load.readstep); if (step < 1) { step = 1; } model = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(d->comment_table))); gtk_list_store_clear(model); gtk_tree_view_set_model(GTK_TREE_VIEW(d->comment_table), NULL); n = (ary.data_num > max_lines) ? max_lines : ary.data_num; m = (ary.col_num < MAX_COLS) ? ary.col_num : MAX_COLS; l = 1; for (i = 0; i < n; i++) { GtkTreeIter iter; int v; gtk_list_store_append(model, &iter); for (j = 0; j < m; j++) { void *ptr; ptr = arraynget(ary.ary[j], i); if (ptr) { double val; val = * (double *) ptr; snprintf(buf, sizeof(buf), "%G", val); gtk_list_store_set(model, &iter, j + 1, buf, -1); } } v = CHECK_VISIBILITY_ARRAY(i, skip, step); gtk_list_store_set(model, &iter, 0, l, HEADLINE_LINE_NUM_COLUMN, i, HEADLINE_VISIBILITY_COLUMN, v, HEADLINE_ELLIPSIZE_COLUMN, (v) ? PANGO_ELLIPSIZE_NONE : PANGO_ELLIPSIZE_END, HEADLINE_FONT_COLUMN, Menulocal.file_preview_font, -1); if (v) { l++; } } gtk_tree_view_set_model(GTK_TREE_VIEW(d->comment_table), GTK_TREE_MODEL(model)); } static void set_headline_table(struct FileDialog *d, char *s, int max_lines) { struct narray *lines; int i, j, l, n, skip, step, csv; const char *tmp, *remark, *po; GString *ifs; GtkListStore *model; if (! d->initialized || s == NULL || max_lines < 1) { return; } lines = g_malloc0(sizeof(*lines) * max_lines); if (lines == NULL) { return; } skip = spin_entry_get_val(d->load.headskip); if (skip < 0) { skip = 0; } step = spin_entry_get_val(d->load.readstep); if (step < 1) { step = 1; } csv = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->load.csv)); remark = gtk_entry_get_text(GTK_ENTRY(d->load.remark)); if (remark == NULL) { remark = ""; } tmp = gtk_entry_get_text(GTK_ENTRY(d->load.ifs)); if (tmp == NULL) { tmp = ""; } ifs = g_string_new(""); decode_ifs_text(ifs, tmp); po = s; for (n = 0; n < max_lines; n++) { arrayinit(lines + n, sizeof(char *)); po = parse_data_line(lines + n, po, ifs->str, csv); if (po == NULL) { n++; break; } } g_string_free(ifs, TRUE); if (n == 0) { goto exit; } model = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(d->comment_table))); gtk_list_store_clear(model); gtk_tree_view_set_model(GTK_TREE_VIEW(d->comment_table), NULL); l = 1; for (i = 0; i < n; i++) { GtkTreeIter iter; int m, c, v; const char *str; gtk_list_store_append(model, &iter); m = arraynum(lines + i); m = (m < MAX_COLS) ? m : MAX_COLS; for (j = 0; j < m; j++) { gtk_list_store_set(model, &iter, j + 1, arraynget_str(lines + i, j), -1); } str = arraynget_str(lines + i, 0); if (str) { c = (g_ascii_isprint(str[0]) || g_ascii_isspace(str[0])) ? str[0] : 0; } else { c = 0; } v = CHECK_VISIBILITY(i, skip, step, remark, c); gtk_list_store_set(model, &iter, 0, l, HEADLINE_LINE_NUM_COLUMN, i, HEADLINE_FIRST_CHAR_COLUMN, c, HEADLINE_VISIBILITY_COLUMN, v, HEADLINE_ELLIPSIZE_COLUMN, (v) ? PANGO_ELLIPSIZE_NONE : PANGO_ELLIPSIZE_END, HEADLINE_FONT_COLUMN, Menulocal.file_preview_font, -1); if (v) { l++; } } gtk_tree_view_set_model(GTK_TREE_VIEW(d->comment_table), GTK_TREE_MODEL(model)); exit: for (i = 0; i < n; i++) { arraydel2(lines + i); } g_free(lines); } static GtkWidget * create_preview_table(struct FileDialog *d) { GtkWidget *view; GtkListStore *model; GType *types; int i; view = gtk_tree_view_new(); gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(view), GTK_TREE_VIEW_GRID_LINES_BOTH); types = g_malloc(sizeof(*types) * HEADLINE_COLUMN_NUM); if (types == NULL) { return NULL; } for (i = 1; i < MAX_COLS; i++) { types[i] = G_TYPE_STRING; } types[0] = G_TYPE_INT; types[HEADLINE_LINE_NUM_COLUMN] = G_TYPE_INT; types[HEADLINE_FIRST_CHAR_COLUMN] = G_TYPE_INT; types[HEADLINE_VISIBILITY_COLUMN] = G_TYPE_BOOLEAN; types[HEADLINE_ELLIPSIZE_COLUMN] = G_TYPE_INT; types[HEADLINE_FONT_COLUMN] = G_TYPE_STRING; model = gtk_list_store_newv(HEADLINE_COLUMN_NUM, types); g_free(types); gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(model)); for (i = 0; i < MAX_COLS; i++) { char buf[32]; GtkCellRenderer *cell; GtkTreeViewColumn *column; snprintf(buf, sizeof(buf), "%%%d", i); cell = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(buf, cell, "text", i, "sensitive", HEADLINE_VISIBILITY_COLUMN, "ellipsize", HEADLINE_ELLIPSIZE_COLUMN, "font", HEADLINE_FONT_COLUMN, NULL); if (i == 0) { gtk_tree_view_column_add_attribute(column, cell, "visible", HEADLINE_VISIBILITY_COLUMN); } g_object_set((GObject *) cell, "xalign", (gfloat) 1.0, NULL); gtk_tree_view_column_set_alignment(column, 0.5); gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); } return view; } static void update_table(GtkEditable *editable, gpointer user_data) { struct FileDialog *d; d = (struct FileDialog *) user_data; set_headline_table(d, d->head_lines, Menulocal.data_head_lines); } static void update_table_visibility(GtkEditable *editable, gpointer user_data) { struct FileDialog *d; GtkTreeModel *model; GtkTreeIter iter; const char *remark; int skip, step, ln, fc, v, i; d = (struct FileDialog *) user_data; skip = spin_entry_get_val(d->load.headskip); if (skip < 0) { skip = 0; } step = spin_entry_get_val(d->load.readstep); if (step < 1) { step = 1; } remark = NULL; if (d->source == DATA_SOURCE_FILE) { remark = gtk_entry_get_text(GTK_ENTRY(d->load.remark)); } if (remark == NULL) { remark = ""; } model = gtk_tree_view_get_model(GTK_TREE_VIEW(d->comment_table)); if (! gtk_tree_model_get_iter_first(model, &iter)) { return; } i = 1; do { gtk_tree_model_get(model, &iter, HEADLINE_LINE_NUM_COLUMN, &ln, HEADLINE_FIRST_CHAR_COLUMN, &fc, -1); if (d->source == DATA_SOURCE_FILE) { v = CHECK_VISIBILITY(ln, skip, step, remark, fc); } else { v = CHECK_VISIBILITY_ARRAY(ln, skip, step); } gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, i, HEADLINE_VISIBILITY_COLUMN, v, HEADLINE_ELLIPSIZE_COLUMN, (v) ? PANGO_ELLIPSIZE_NONE : PANGO_ELLIPSIZE_END, HEADLINE_FONT_COLUMN, Menulocal.file_preview_font, -1); if (v) { i++; } } while (gtk_tree_model_iter_next(model, &iter)); } static void update_table_header(GtkEditable *editable, gpointer user_data) { struct FileDialog *d; d = (struct FileDialog *) user_data; set_headline_table_header(d); } static void FileDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FileDialog *d; int line; char title[32], *argv[2], *s; d = (struct FileDialog *) data; snprintf(title, sizeof(title), _("Data %d (File)"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *view, *label; d->apply_all = gtk_dialog_add_button(GTK_DIALOG(wi), _("_Apply all"), IDFAPPLY); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = create_file_entry(d->Obj); item_setup(GTK_WIDGET(hbox), w, _("_File:"), TRUE); d->file = w; w = gtk_button_new_with_mnemonic(_("_Load settings")); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); d->load_settings = w; g_signal_connect(w, "clicked", G_CALLBACK(FileDialogOption), d); w = gtk_button_new_with_mnemonic(_("_Edit")); gtk_box_pack_start(GTK_BOX(hbox), w, FALSE, FALSE, 4); g_signal_connect(w, "clicked", G_CALLBACK(FileDialogEdit), d); gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); FileDialogSetupCommon(wi, d); w = mask_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Mask")); d->mask.tab_id = gtk_notebook_append_page(d->tab, w, label); w = move_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Move")); d->move.tab_id = gtk_notebook_append_page(d->tab, w, label); w = gtk_notebook_new(); view = create_preview_table(d); if (view) { GtkWidget *swin; label = gtk_label_new_with_mnemonic(_("_Table")); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), view); gtk_notebook_append_page(GTK_NOTEBOOK(w), swin, label); } d->comment_table = view; view = create_text_view_with_line_number(&d->comment_view); label = gtk_label_new_with_mnemonic(_("_Plain")); gtk_notebook_append_page(GTK_NOTEBOOK(w), view, label); g_signal_connect(d->load.ifs, "changed", G_CALLBACK(update_table), d); g_signal_connect(d->load.csv, "toggled", G_CALLBACK(update_table), d); g_signal_connect(d->load.remark, "changed", G_CALLBACK(update_table_visibility), d); g_signal_connect(d->load.readstep, "changed", G_CALLBACK(update_table_visibility), d); g_signal_connect(d->load.headskip, "changed", G_CALLBACK(update_table_visibility), d); g_signal_connect(d->xcol, "changed", G_CALLBACK(update_table_header), d); g_signal_connect(d->ycol, "changed", G_CALLBACK(update_table_header), d); g_signal_connect(d->type, "changed", G_CALLBACK(update_table_header), d); gtk_grid_attach(GTK_GRID(d->comment_box), w, 1, 0, 1, 1); w = gtk_button_new_with_label(_("Create")); add_widget_to_table(d->fit_table, w, _("_Fit:"), FALSE, d->fit_row); d->fit = w; g_signal_connect(w, "clicked", G_CALLBACK(FileDialogFit), d); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } line = Menulocal.data_head_lines; argv[0] = (char *) &line; argv[1] = NULL; getobj(d->Obj, "head_lines", d->Id, 1, argv, &s); FileDialogSetupItem(wi, d); d->initialized = TRUE; set_headlines(d, s); set_headline_table_header(d); set_headline_table(d, s, line); d->head_lines = g_strdup(s); } static void ArrayDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FileDialog *d; char title[32]; d = (struct FileDialog *) data; snprintf(title, sizeof(title), _("Data %d (Array)"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *hbox, *view, *label, *swin; d->apply_all = gtk_dialog_add_button(GTK_DIALOG(wi), _("_Apply all"), IDFAPPLY); hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 4); w = create_text_entry(TRUE, TRUE); item_setup(GTK_WIDGET(hbox), w, _("_Array:"), TRUE); d->file = w; gtk_box_pack_start(GTK_BOX(d->vbox), hbox, FALSE, FALSE, 4); FileDialogSetupCommon(wi, d); w = mask_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Mask")); d->mask.tab_id = gtk_notebook_append_page(d->tab, w, label); w = move_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Move")); d->move.tab_id = gtk_notebook_append_page(d->tab, w, label); view = create_preview_table(d); swin = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(swin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add(GTK_CONTAINER(swin), view); d->comment_table = view; g_signal_connect(d->load.readstep, "changed", G_CALLBACK(update_table_visibility), d); g_signal_connect(d->load.headskip, "changed", G_CALLBACK(update_table_visibility), d); g_signal_connect(d->xcol, "changed", G_CALLBACK(update_table_header), d); g_signal_connect(d->ycol, "changed", G_CALLBACK(update_table_header), d); g_signal_connect(d->type, "changed", G_CALLBACK(update_table_header), d); gtk_widget_set_hexpand(swin, TRUE); gtk_widget_set_vexpand(swin, TRUE); gtk_grid_attach(GTK_GRID(d->comment_box), swin, 1, 0, 1, 1); w = gtk_button_new_with_label(_("Create")); add_widget_to_table(d->fit_table, w, _("_Fit:"), FALSE, d->fit_row); d->fit = w; g_signal_connect(w, "clicked", G_CALLBACK(FileDialogFit), d); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } FileDialogSetupItem(wi, d); d->initialized = TRUE; set_headline_table_header(d); set_headline_table_array(d, Menulocal.data_head_lines); } static void RangeDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FileDialog *d; char title[32]; d = (struct FileDialog *) data; snprintf(title, sizeof(title), _("Data %d (Range)"), d->Id); gtk_window_set_title(GTK_WINDOW(wi), title); if (makewidget) { GtkWidget *w, *table, *label; int i; d->apply_all = gtk_dialog_add_button(GTK_DIALOG(wi), _("_Apply all"), IDFAPPLY); table = gtk_grid_new(); i = 0; w = create_text_entry(FALSE, TRUE); gtk_entry_set_width_chars(GTK_ENTRY(w), RANGE_ENTRY_WIDTH); add_widget_to_table(table, w, _("_Minimum:"), FALSE, i++); d->min = w; w = create_text_entry(FALSE, TRUE); gtk_entry_set_width_chars(GTK_ENTRY(w), RANGE_ENTRY_WIDTH); add_widget_to_table(table, w, _("_Maximum:"), FALSE, i++); d->max = w; w = create_spin_entry(2, 65536, 1, FALSE, TRUE); add_widget_to_table(table, w, _("di_ViSion:"), FALSE, i++); d->div = w; FileDialogSetupCommon(wi, d); gtk_grid_insert_column(GTK_GRID(d->comment_box), 0); gtk_grid_attach(GTK_GRID(d->comment_box), table, 0, 0, 1, 1); w = mask_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Mask")); d->mask.tab_id = gtk_notebook_append_page(d->tab, w, label); w = move_tab_create(d); label = gtk_label_new_with_mnemonic(_("_Move")); d->move.tab_id = gtk_notebook_append_page(d->tab, w, label); w = gtk_button_new_with_label(_("Create")); add_widget_to_table(d->fit_table, w, _("_Fit:"), FALSE, d->fit_row); d->fit = w; g_signal_connect(w, "clicked", G_CALLBACK(FileDialogFit), d); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } FileDialogSetupItem(wi, d); } static int plot_tab_set_value(struct FileDialog *d) { if (SetObjFieldFromWidget(d->type, d->Obj, d->Id, "type")) return TRUE; if (SetObjFieldFromWidget(d->curve, d->Obj, d->Id, "interpolation")) return TRUE; if (putobj(d->Obj, "mark_type", d->Id, &(d->mark.Type)) == -1) return TRUE; if (SetObjFieldFromWidget(d->size, d->Obj, d->Id, "mark_size")) return TRUE; if (SetObjFieldFromWidget(d->width, d->Obj, d->Id, "line_width")) return TRUE; if (SetObjFieldFromStyle(d->style, d->Obj, d->Id, "line_style")) return TRUE; if (SetObjFieldFromWidget(d->join, d->Obj, d->Id, "line_join")) return TRUE; if (SetObjFieldFromWidget(d->miter, d->Obj, d->Id, "line_miter_limit")) return TRUE; if (SetObjFieldFromWidget(d->clip, d->Obj, d->Id, "data_clip")) return TRUE; if (putobj_color(d->col1, d->Obj, d->Id, NULL)) return TRUE; if (putobj_color2(d->col2, d->Obj, d->Id)) return TRUE; return 0; } static void focus_math_widget(struct FileDialog *d, int math_tab_id, GtkWidget *text, GtkWidget *entry) { if (d->math_page == 0) { gtk_widget_grab_focus(entry); } else { gtk_notebook_set_current_page(d->math_tab, math_tab_id); gtk_widget_grab_focus(text); move_cursor_to_error_line(text); } } static int FileDialogCloseCommon(GtkWidget *w, struct FileDialog *d) { int r; if (SetObjFieldFromWidget(d->xcol, d->Obj, d->Id, "x")) return TRUE; if (SetObjAxisFieldFromWidget(d->xaxis, d->Obj, d->Id, "axis_x")) return TRUE; if (SetObjFieldFromWidget(d->ycol, d->Obj, d->Id, "y")) return TRUE; if (SetObjAxisFieldFromWidget(d->yaxis, d->Obj, d->Id, "axis_y")) return TRUE; if (plot_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, 0); return TRUE; } r = math_tab_set_value(d); if (r != MATH_ERROR_FIELD_NONE) { gtk_notebook_set_current_page(d->tab, d->math.tab_id); switch (r) { case MATH_ERROR_FIELD_X: focus_math_widget(d, r -1, d->math.text_x, d->math.x); break; case MATH_ERROR_FIELD_Y: focus_math_widget(d, r -1, d->math.text_y, d->math.y); break; case MATH_ERROR_FIELD_F: focus_math_widget(d, r -1, d->math.text_f, d->math.f); break; case MATH_ERROR_FIELD_G: focus_math_widget(d, r -1, d->math.text_g, d->math.g); break; case MATH_ERROR_FIELD_H: focus_math_widget(d, r -1, d->math.text_h, d->math.h); break; case MATH_ERROR_FIELD_SX: gtk_widget_grab_focus(d->math.xsmooth); break; case MATH_ERROR_FIELD_SY: gtk_widget_grab_focus(d->math.ysmooth); break; } return TRUE; } if (load_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, d->load.tab_id); return TRUE; } Menulocal.math_input_mode = gtk_notebook_get_current_page(GTK_NOTEBOOK(d->math_input_tab)); return FALSE; } static void FileDialogClose(GtkWidget *w, void *data) { struct FileDialog *d; int ret; d = (struct FileDialog *) data; switch (d->ret) { case IDOK: case IDFAPPLY: break; default: goto End; } ret = d->ret; d->ret = IDLOOP; switch (d->source) { case DATA_SOURCE_FILE: if (SetObjFieldFromWidget(d->file, d->Obj, d->Id, "file")) { return; } break; case DATA_SOURCE_ARRAY: if (SetObjFieldFromWidget(d->file, d->Obj, d->Id, "array")) { return; } break; case DATA_SOURCE_RANGE: if (SetObjFieldFromWidget(d->min, d->Obj, d->Id, "range_min")) { return; } if (SetObjFieldFromWidget(d->max, d->Obj, d->Id, "range_max")) { return; } if (SetObjFieldFromWidget(d->div, d->Obj, d->Id, "range_div")) { return; } break; } if (FileDialogCloseCommon(w, d)) return; if (mask_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, d->mask.tab_id); return; } if (move_tab_set_value(d)) { gtk_notebook_set_current_page(d->tab, d->move.tab_id); return; } d->initialized = FALSE; d->ret = ret; End: g_free(d->head_lines); d->head_lines = NULL; } void FileDialog(struct obj_list_data *data, int id, int multi) { struct FileDialog *d; int source; getobj(data->obj, "source", id, 0, NULL, &source); switch (source) { case DATA_SOURCE_FILE: d = &DlgFile; data->dialog = d; d->SetupWindow = FileDialogSetup; break; case DATA_SOURCE_ARRAY: d = &DlgArray; data->dialog = d; d->SetupWindow = ArrayDialogSetup; break; case DATA_SOURCE_RANGE: d = &DlgRange; data->dialog = d; d->SetupWindow = RangeDialogSetup; break; default: return; /* never reached */ } d->CloseWindow = FileDialogClose; d->Obj = data->obj; d->Id = id; d->source = source; d->multi_open = multi > 0; d->initialized = FALSE; d->head_lines = NULL; } static void FileDialogDefSetupItem(GtkWidget *w, struct FileDialog *d, int id) { plot_tab_setup_item(d, d->Id); math_tab_setup_item(d, d->Id); load_tab_setup_item(d, d->Id); file_setup_item(d, d->Id); } static void FileDefDialogSetup(GtkWidget *wi, void *data, int makewidget) { struct FileDialog *d; d = (struct FileDialog *) data; if (makewidget) { FileDialogSetupCommon(wi, d); gtk_notebook_set_tab_pos(d->tab, GTK_POS_TOP); gtk_widget_show_all(GTK_WIDGET(d->vbox)); } FileDialogDefSetupItem(wi, d, d->Id); } static void FileDefDialogClose(GtkWidget *w, void *data) { struct FileDialog *d; int ret; d = (struct FileDialog *) data; switch (d->ret) { case IDOK: break; default: return; } ret = d->ret; d->ret = IDLOOP; if (FileDialogCloseCommon(w, d)) return; d->ret = ret; } void FileDefDialog(struct FileDialog *data, struct objlist *obj, int id) { data->SetupWindow = FileDefDialogSetup; data->CloseWindow = FileDefDialogClose; data->Obj = obj; data->Id = id; data->source = DATA_SOURCE_FILE; } static void delete_file_obj(struct obj_list_data *data, int id) { FitDel(data->obj, id); delobj(data->obj, id); /* don't delete darray object */ } static int data_save_undo(int type) { char *arg[3]; arg[0] = "data"; arg[1] = "fit"; arg[2] = NULL; return menu_save_undo(type, arg); } void CmFileHistory(GtkRecentChooser *w, gpointer client_data) { int ret; char *name, *fname; int id, undo; struct objlist *obj; char *uri; struct obj_list_data *data; if (Menulock || Globallock) { return; } uri = gtk_recent_chooser_get_current_uri(w); if (uri == NULL) { return; } name = g_filename_from_uri(uri, NULL, NULL); g_free(uri); if (name == NULL) { return; } obj = chkobject("data"); if (obj == NULL) { return; } undo = data_save_undo(UNDO_TYPE_OPEN_FILE); id = newobj(obj); if (id < 0) { menu_delete_undo(undo); return; } fname = g_strdup(name); if (fname == NULL) { menu_delete_undo(undo); return; } putobj(obj, "file", id, name); data = NgraphApp.FileWin.data.data; FileDialog(data, id, FALSE); ret = DialogExecute(TopLevel, data->dialog); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); AddDataFileList(fname); } g_free(fname); FileWinUpdate(data, TRUE, DRAW_NOTIFY); } void CmRangeAdd(void *w, gpointer client_data) { int id, ret, val, undo; struct objlist *obj; struct obj_list_data *data; if (Menulock || Globallock) return; obj = chkobject("data"); if (obj == NULL) { return; } undo = data_save_undo(UNDO_TYPE_ADD_RANGE); id = newobj(obj); if (id < 0) { menu_delete_undo(undo); return; } data = NgraphApp.FileWin.data.data; val = DATA_SOURCE_RANGE; putobj(obj, "source", id, &val); val = PLOT_TYPE_LINE; putobj(obj, "type", id, &val); FileDialog(data, id, FALSE); ret = DialogExecute(TopLevel, data->dialog); if (ret == IDCANCEL) { menu_undo_internal(undo); } else { set_graph_modified(); FileWinUpdate(data, TRUE, DRAW_REDRAW); } } void CmFileOpen(void *w, gpointer client_data) { int id, ret, n, undo = -1; char **file = NULL; struct objlist *obj; struct narray farray; if (Menulock || Globallock) return; obj = chkobject("data"); if (obj == NULL) return; ret = nGetOpenFileNameMulti(TopLevel, _("Add Data file"), NULL, &(Menulocal.fileopendir), NULL, &file, Menulocal.changedirectory); n = chkobjlastinst(obj); arrayinit(&farray, sizeof(int)); if (ret == IDOK && file) { char **ptr; undo = data_save_undo(UNDO_TYPE_OPEN_FILE); for (ptr = file; *ptr; ptr++) { char *name; name = *ptr; id = newobj(obj); if (id >= 0) { arrayadd(&farray, &id); changefilename(name); putobj(obj, "file", id, name); } } g_free(file); } if (update_file_obj_multi(obj, &farray, TRUE)) { menu_delete_undo(undo); } if (n == chkobjlastinst(obj)) { menu_delete_undo(undo); } else { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, DRAW_NOTIFY); set_graph_modified(); } arraydel(&farray); } void CmFileClose(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; if (Menulock || Globallock) return; if ((obj = chkobject("data")) == NULL) return; if (chkobjlastinst(obj) == -1) return; SelectDialog(&DlgSelect, obj, _("close data (multi select)"), FileCB, (struct narray *) &farray, NULL); if (DialogExecute(TopLevel, &DlgSelect) == IDOK) { int i, *array, num; struct obj_list_data *data; data = NgraphApp.FileWin.data.data; num = arraynum(&farray); if (num > 0) { data_save_undo(UNDO_TYPE_DELETE); } array = arraydata(&farray); for (i = num - 1; i >= 0; i--) { delete_file_obj(data, array[i]); set_graph_modified(); } FileWinUpdate(data, TRUE, DRAW_REDRAW); } arraydel(&farray); } int update_file_obj_multi(struct objlist *obj, struct narray *farray, int new_file) { int i, j, num, *array, id0, modified, ret, undo; char *name; struct obj_list_data *data; num = arraynum(farray); if (num < 1) { return 0; } array = arraydata(farray); id0 = -1; ret = IDCANCEL; modified = FALSE; data_save_undo(UNDO_TYPE_EDIT); for (i = 0; i < num; i++) { name = NULL; if (id0 != -1) { copy_file_obj_field(obj, array[i], array[id0], FALSE); if (new_file) { getobj(obj, "file", array[i], 0, NULL, &name); AddDataFileList(name); } } else { undo = data_save_undo(UNDO_TYPE_DUMMY); data = NgraphApp.FileWin.data.data; FileDialog(data, array[i], i < num - 1); ret = DialogExecute(TopLevel, data->dialog); if (ret == IDCANCEL && new_file) { ret = IDDELETE; } switch (ret) { case IDDELETE: delete_file_obj(data, array[i]); modified = TRUE; if (! new_file) { set_graph_modified(); } for (j = i + 1; j < num; j++) { array[j]--; } menu_delete_undo(undo); break; case IDFAPPLY: id0 = i; /* fall-through */ case IDOK: if (new_file) { getobj(obj, "file", array[i], 0, NULL, &name); AddDataFileList(name); } menu_delete_undo(undo); modified = TRUE; break; case IDCANCEL: menu_undo_internal(undo); break; } } } if (! modified) { menu_undo_internal(undo); } return modified; } void CmFileUpdate(void *w, gpointer client_data) { struct objlist *obj; int ret; struct narray farray; int last; if (Menulock || Globallock) return; if ((obj = chkobject("data")) == NULL) return; last = chkobjlastinst(obj); if (last == -1) { return; } else if (last == 0) { arrayinit(&farray, sizeof(int)); arrayadd(&farray, &last); ret = IDOK; } else { SelectDialog(&DlgSelect, obj, _("data property (multi select)"), FileCB, (struct narray *) &farray, NULL); ret = DialogExecute(TopLevel, &DlgSelect); } if (ret == IDOK && update_file_obj_multi(obj, &farray, FALSE)) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, DRAW_REDRAW); } arraydel(&farray); } static int check_plot_obj_file(struct objlist *obj) { int last, i, source; last = chkobjlastinst(obj); for (i = 0; i < last; i++) { getobj(obj, "source", i, 0, NULL, &source); if (source == DATA_SOURCE_FILE) { return i; } } return -1; } void CmFileEdit(void *w, gpointer client_data) { struct objlist *obj; int i; char *name; int last; if (Menulock || Globallock) return; if (Menulocal.editor == NULL) return; if ((obj = chkobject("data")) == NULL) return; last = check_plot_obj_file(obj); if (last == -1) { return; } else { CopyDialog(&DlgCopy, obj, -1, _("edit data file (single select)"), PlotFileCB); if (DialogExecute(TopLevel, &DlgCopy) == IDOK) { i = DlgCopy.sel; } else { return; } } if (i < 0) return; if (getobj(obj, "file", i, 0, NULL, &name) == -1) return; edit_file(name); } void CmOptionFileDef(void *w, gpointer client_data) { struct objlist *obj; int id; if (Menulock || Globallock) return; if ((obj = chkobject("data")) == NULL) return; id = newobj(obj); if (id >= 0) { int modified; char *objs[2]; modified = get_graph_modified(); FileDefDialog(&DlgFileDef, obj, id); if (DialogExecute(TopLevel, &DlgFileDef) == IDOK) { if (CheckIniFile()) { exeobj(obj, "save_config", id, 0, NULL); } } delobj(obj, id); objs[0] = obj->name; objs[1] = NULL; UpdateAll2(objs, TRUE); if (! modified) { reset_graph_modified(); } } } static void FileWinFileEdit(struct obj_list_data *d) { int sel, num; char *name; if (Menulock || Globallock) return; if (Menulocal.editor == NULL) return; sel = d->select; num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) return; if (getobj(d->obj, "file", sel, 0, NULL, &name) == -1) return; edit_file(name); } static void file_edit_popup_func(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data *) client_data; FileWinFileEdit(d); } static void FileWinFileDelete(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), FILE_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) { int update; data_save_undo(UNDO_TYPE_DELETE); delete_file_obj(d, sel); num = chkobjlastinst(d->obj); update = FALSE; if (num < 0) { d->select = -1; update = TRUE; } else if (sel > num) { d->select = num; } else { d->select = sel; } FileWinUpdate(d, update, DRAW_REDRAW); set_graph_modified(); } } static void file_delete_popup_func(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data*) client_data; FileWinFileDelete(d); } static int file_obj_copy(struct obj_list_data *d) { int sel, id, num; if (Menulock || Globallock) return -1; sel = list_store_get_selected_int(GTK_WIDGET(d->text), FILE_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel < 0) || (sel > num)) return -1; id = newobj(d->obj); if (id < 0) return -1; copy_file_obj_field(d->obj, id, sel, TRUE); return id; } static void FileWinFileCopy(struct obj_list_data *d) { data_save_undo(UNDO_TYPE_COPY); d->select = file_obj_copy(d); FileWinUpdate(d, FALSE, DRAW_NOTIFY); } static void file_copy_popup_func(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data *) client_data; FileWinFileCopy(d); } static void FileWinFileCopy2(struct obj_list_data *d) { int id, sel, j, num; if (Menulock || Globallock) return; data_save_undo(UNDO_TYPE_COPY); sel = list_store_get_selected_int(GTK_WIDGET(d->text), FILE_WIN_COL_ID); id = file_obj_copy(d); num = chkobjlastinst(d->obj); if (id < 0) { d->select = sel; FileWinUpdate(d, TRUE, DRAW_NOTIFY); return; } for (j = num; j > sel + 1; j--) { moveupobj(d->obj, j); } d->select = sel + 1; FileWinUpdate(d, FALSE, DRAW_NOTIFY); } static void file_copy2_popup_func(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data *) client_data; FileWinFileCopy2(d); } static void FileWinFileUpdate(struct obj_list_data *d) { int sel, num; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), FILE_WIN_COL_ID); num = chkobjlastinst(d->obj); if ((sel >= 0) && (sel <= num)) { int ret, undo; GtkWidget *parent; undo = data_save_undo(UNDO_TYPE_EDIT); d->setup_dialog(d, sel, FALSE); d->select = sel; parent = TopLevel; ret = DialogExecute(parent, d->dialog); set_graph_modified(); switch (ret) { case IDCANCEL: menu_undo_internal(undo); break; default: d->update(d, FALSE, DRAW_NOTIFY); } } } static void FileWinFileDraw(struct obj_list_data *d) { int i, sel, hidden, h, num, modified, undo; if (Menulock || Globallock) return; sel = list_store_get_selected_index(GTK_WIDGET(d->text)); num = chkobjlastinst(d->obj); modified = FALSE; undo = data_save_undo(UNDO_TYPE_EDIT); if ((sel >= 0) && (sel <= num)) { for (i = 0; i <= num; i++) { hidden = (i != sel); getobj(d->obj, "hidden", i, 0, NULL, &h); putobj(d->obj, "hidden", i, &hidden); if (h != hidden) { modified = TRUE; } } d->select = sel; } else { hidden = FALSE; for (i = 0; i <= num; i++) { getobj(d->obj, "hidden", i, 0, NULL, &h); putobj(d->obj, "hidden", i, &hidden); if (h != hidden) { modified = TRUE; } } d->select = -1; } if (modified) { set_graph_modified(); } else { menu_delete_undo(undo); } CmViewerDraw(NULL, GINT_TO_POINTER(FALSE)); FileWinUpdate(d, FALSE, DRAW_NONE); } static void file_draw_popup_func(GtkMenuItem *w, gpointer client_data) { struct obj_list_data *d; d = (struct obj_list_data *) client_data; FileWinFileDraw(d); } void FileWinUpdate(struct obj_list_data *d, int clear, int draw) { int redraw; if (Menulock || Globallock) return; if (d == NULL) return; if (list_sub_window_must_rebuild(d)) { list_sub_window_build(d, file_list_set_val); } else { list_sub_window_set(d, file_list_set_val); } if (! clear && d->select >= 0) { list_store_select_int(GTK_WIDGET(d->text), FILE_WIN_COL_ID, d->select); } switch (draw) { case DRAW_REDRAW: getobj(Menulocal.obj, "redraw_flag", 0, 0, NULL, &redraw); if (redraw) { // NgraphApp.Viewer.allclear = TRUE; update_viewer(d); } else { draw_notify(TRUE); } break; case DRAW_NOTIFY: draw_notify(TRUE); break; } } static void FileWinFit(struct obj_list_data *d) { struct objlist *fitobj, *obj2; char *fit; int sel, fitid = 0, ret, num, undo; struct narray iarray; GtkWidget *parent; if (Menulock || Globallock) return; sel = list_store_get_selected_int(GTK_WIDGET(d->text), FILE_WIN_COL_ID); num = chkobjlastinst(d->obj); if (sel < 0 || sel > num) return; if ((fitobj = chkobject("fit")) == NULL) return; if (getobj(d->obj, "fit", sel, 0, NULL, &fit) == -1) return; if (fit) { int idnum; arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, &obj2, &iarray, FALSE, NULL)) { arraydel(&iarray); return; } idnum = arraynum(&iarray); if ((obj2 != fitobj) || (idnum < 1)) { if (putobj(d->obj, "fit", sel, NULL) == -1) { arraydel(&iarray); return; } } else { fitid = arraylast_int(&iarray); } arraydel(&iarray); } if (fit == NULL) return; undo = data_save_undo(UNDO_TYPE_EDIT); parent = TopLevel; ret = execute_fit_dialog(parent, d->obj, sel, fitobj, fitid); switch (ret) { case IDCANCEL: menu_delete_undo(undo); break; case IDDELETE: delobj(fitobj, fitid); putobj(d->obj, "fit", sel, NULL); break; } } #define MARK_PIX_LINE_WIDTH 1 static void set_line_style(struct objlist *obj, int id, int ggc) { struct narray *line_style; int n; getobj(obj, "line_style", id, 0, NULL, &line_style); n = arraynum(line_style); if (n > 0) { int i, *style, *ptr; style = g_malloc(sizeof(*style) * n); if (style == NULL) { GRAlinestyle(ggc, 0, NULL, MARK_PIX_LINE_WIDTH, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); return; } ptr = arraydata(line_style); for (i = 0; i < n; i++) { style[i] = ptr[i] / 40; } GRAlinestyle(ggc, n, style, MARK_PIX_LINE_WIDTH, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); g_free(style); } else { GRAlinestyle(ggc, 0, NULL, MARK_PIX_LINE_WIDTH, GRA_LINE_CAP_BUTT, GRA_LINE_JOIN_MITER, 1000); } } #define CURVE_POINTS_MAX 7 static void draw_curve(int ggc, double *spx, double *spy, int spnum, int spcond) { double spz[CURVE_POINTS_MAX], spc[6][CURVE_POINTS_MAX], spc2[6]; int j, k; for (j = 0; j < CURVE_POINTS_MAX; j++) { spz[j] = j; } spline(spz, spx, spc[0], spc[1], spc[2], spnum, spcond, spcond, 0, 0); spline(spz, spy, spc[3], spc[4], spc[5], spnum, spcond, spcond, 0, 0); GRAcurvefirst(ggc, 0, NULL, NULL, NULL, splinedif, splineint, NULL, spx[0], spy[0]); for (j = 0; j < spnum - 1; j++) { for (k = 0; k < 6; k++) { spc2[k] = spc[k][j]; } if (!GRAcurve(ggc, spc2, spx[j], spy[j])) break; } } static GdkPixbuf * draw_type_pixbuf(struct objlist *obj, int i) { int ggc, fr, fg, fb, fr2, fg2, fb2, type, w, width = 40, height = 20, poly[14], marktype, intp, spcond, spnum, lockstate, found, output; double spx[CURVE_POINTS_MAX], spy[CURVE_POINTS_MAX]; cairo_surface_t *pix; GdkPixbuf *pixbuf; struct objlist *gobj, *robj; N_VALUE *inst; struct gra2cairo_local *local; lockstate = Globallock; Globallock = TRUE; found = find_gra2gdk_inst(&gobj, &inst, &robj, &output, &local); if (! found) { return NULL; } pix = gra2gdk_create_pixmap(local, width, height, Menulocal.bg_r, Menulocal.bg_g, Menulocal.bg_b); if (pix == NULL) { return NULL; } getobj(obj, "type", i, 0, NULL, &type); getobj(obj, "R", i, 0, NULL, &fr); getobj(obj, "G", i, 0, NULL, &fg); getobj(obj, "B", i, 0, NULL, &fb); getobj(obj, "R2", i, 0, NULL, &fr2); getobj(obj, "G2", i, 0, NULL, &fg2); getobj(obj, "B2", i, 0, NULL, &fb2); ggc = _GRAopen("gra2gdk", "_output", robj, inst, output, -1, -1, -1, NULL, local); if (ggc < 0) { _GRAclose(ggc); g_object_unref(G_OBJECT(pix)); return NULL; } GRAview(ggc, 0, 0, width, height, 0); GRAcolor(ggc, fr, fg, fb, 255); set_line_style(obj, i, ggc); switch (type) { case PLOT_TYPE_MARK: getobj(obj, "mark_type", i, 0, NULL, &marktype); GRAmark(ggc, marktype, width / 2, height / 2, height - 2, fr, fg, fb, 255, fr2, fg2, fb2, 255); break; case PLOT_TYPE_LINE: GRAline(ggc, 1, height / 2, width - 1, height / 2); break; case PLOT_TYPE_POLYGON: case PLOT_TYPE_POLYGON_SOLID_FILL: poly[0] = 1; poly[1] = height / 2; poly[2] = width / 4; poly[3] = 1; poly[4] = width * 3 / 4; poly[5] = height - 1; poly[6] = width - 1; poly[7] = height / 2; poly[8] = width * 3 / 4; poly[9] = 1; poly[10] = width / 4; poly[11] = height - 1; poly[12] = 1; poly[13] = height / 2; GRAdrawpoly(ggc, 7, poly, (type == PLOT_TYPE_POLYGON) ? GRA_FILL_MODE_NONE : GRA_FILL_MODE_WINDING); break; case PLOT_TYPE_CURVE: getobj(obj, "interpolation", i, 0, NULL, &intp); w = (intp >= 2) ? height : width; spx[0] = 1; spx[1] = w / 3 + 1; spx[2] = w * 2 / 3; spx[3] = w - 1; spx[4] = w * 2 / 3; spx[5] = w / 3 + 1; spx[6] = 1; spy[0] = height / 2; spy[1] = 1; spy[2] = height - 1; spy[3] = height / 2; spy[4] = 1; spy[5] = height - 1; spy[6] = height / 2; if ((intp == 0) || (intp == 2)) { spcond = SPLCND2NDDIF; spnum = 4; } else { spcond = SPLCNDPERIODIC; spnum = 7; } draw_curve(ggc, spx, spy, spnum, spcond); if (intp >= 2) { GRAmoveto(ggc, height, height * 3 / 4); GRAtextstyle(ggc, "Serif", GRA_FONT_STYLE_NORMAL, 52, 0, 0); GRAouttext(ggc, "B"); } break; case PLOT_TYPE_DIAGONAL: GRAline(ggc, 1, height - 1, width - 1, 1); break; case PLOT_TYPE_ARROW: GRAline(ggc, 1, height - 1, width - 1, 1); poly[0] = width - 8; poly[1] = 1; poly[2] = width - 1; poly[3] = 1; poly[4] = width - 5; poly[5] = 6; GRAdrawpoly(ggc, 3, poly, GRA_FILL_MODE_EVEN_ODD); break; case PLOT_TYPE_RECTANGLE: GRArectangle(ggc, 1, height - 1, width - 1, 1, 0); break; case PLOT_TYPE_RECTANGLE_FILL: GRAcolor(ggc, fr2, fg2, fb2, 255); GRArectangle(ggc, 1, height - 1, width - 1, 1, 1); GRAcolor(ggc, fr, fg, fb, 255); GRArectangle(ggc, 1, height - 1, width - 1, 1, 0); break; case PLOT_TYPE_RECTANGLE_SOLID_FILL: GRArectangle(ggc, 1, height - 1, width - 1, 1, 1); break; case PLOT_TYPE_ERRORBAR_X: GRAline(ggc, 1, height / 2, width - 1, height / 2); GRAline(ggc, 1, height / 4, 1, height * 3 / 4); GRAline(ggc, width - 1, height / 4, width - 1, height * 3 / 4); break; case PLOT_TYPE_ERRORBAR_Y: GRAline(ggc, width / 2, 1, width / 2, height - 1); GRAline(ggc, width * 3 / 8, 1, width * 5 / 8, 1); GRAline(ggc, width * 3 / 8, height -1, width * 5 / 8, height - 1); break; case PLOT_TYPE_STAIRCASE_X: GRAmoveto(ggc, 1, height - 1); GRAlineto(ggc, width / 4, height - 1); GRAlineto(ggc, width / 4, height / 2); GRAlineto(ggc, width * 3 / 4, height / 2); GRAlineto(ggc, width * 3 / 4, 1); GRAlineto(ggc, width - 1, 1); break; case PLOT_TYPE_STAIRCASE_Y: GRAmoveto(ggc, 1, height - 1); GRAlineto(ggc, 1, height / 2 + 1); GRAlineto(ggc, width / 2, height / 2 + 1); GRAlineto(ggc, width / 2, height / 4); GRAlineto(ggc, width - 1, height / 4); GRAlineto(ggc, width - 1, 1); break; case PLOT_TYPE_BAR_X: GRArectangle(ggc, 1, height / 4, width - 1, height * 3 / 4, 0); break; case PLOT_TYPE_BAR_Y: GRArectangle(ggc, width * 3 / 8, 1, width * 5 / 8, height - 1, 0); break; case PLOT_TYPE_BAR_FILL_X: GRAcolor(ggc, fr2, fg2, fb2, 255); GRArectangle(ggc, 1, height / 4, width - 1, height * 3 / 4, 1); GRAcolor(ggc, fr, fg, fb, 255); GRArectangle(ggc, 1, height / 4, width - 1, height * 3 / 4, 0); break; case PLOT_TYPE_BAR_FILL_Y: GRAcolor(ggc, fr2, fg2, fb2, 255); GRArectangle(ggc, width * 3 / 8, 1, width * 5 / 8, height - 1, 1); GRAcolor(ggc, fr, fg, fb, 255); GRArectangle(ggc, width * 3 / 8, 1, width * 5 / 8, height - 1, 0); break; case PLOT_TYPE_BAR_SOLID_FILL_X: GRArectangle(ggc, 1, height / 4, width - 1, height * 3 / 4, 1); break; case PLOT_TYPE_BAR_SOLID_FILL_Y: GRArectangle(ggc, width * 3 / 8, 1, width * 5 / 8, height - 1, 1); break; case PLOT_TYPE_FIT: spx[0] = width * 3 / 6 - 1; spx[1] = width * 4 / 6 - 1; spx[2] = width * 5 / 6 - 1; spx[3] = width - 1; spy[0] = height - 1; spy[1] = height / 3; spy[2] = height * 2 / 3; spy[3] = 1; draw_curve(ggc, spx, spy, 4, SPLCND2NDDIF); GRAmoveto(ggc, 1, height * 3 / 4); GRAtextstyle(ggc, "Serif", GRA_FONT_STYLE_NORMAL, 52, 0, 0); GRAouttext(ggc, "fit"); break; } _GRAclose(ggc); gra2cairo_draw_path(local); pixbuf = gdk_pixbuf_get_from_surface(pix, 0, 0, width, height); cairo_surface_destroy(pix); Globallock = lockstate; return pixbuf; } static char * get_axis_obj_str(struct objlist *obj, int id, int axis) { int aid; N_VALUE *inst; struct objlist *aobj; char *name, *tmp; inst = chkobjinst(obj, id); if (inst == NULL) { return NULL; } aid = get_axis_id(obj, inst, &aobj, axis); if (aid < 0){ return NULL; } getobj(aobj, "group", aid, 0, NULL, &name); if (name) { tmp = g_strdup(name); } else { tmp = g_strdup_printf("%d", aid); } return tmp; } const char * get_plot_info_str(struct objlist *obj, int id, int src) { char *str; str = NULL; switch (src) { case DATA_SOURCE_FILE: getobj(obj, "file", id, 0, NULL, &str); break; case DATA_SOURCE_RANGE: getobj(obj, "math_y", id, 0, NULL, &str); if (str == NULL) { getobj(obj, "math_x", id, 0, NULL, &str); if (str == NULL) { str = "X"; } } break; case DATA_SOURCE_ARRAY: getobj(obj, "array", id, 0, NULL, &str); break; } return str; } static void file_list_set_val(struct obj_list_data *d, GtkTreeIter *iter, int row) { int cx, style; unsigned int i; struct narray *mask, *move; char *bfile, *axis; GdkPixbuf *pixbuf = NULL; int src; const char *str; getobj(d->obj, "source", row, 0, NULL, &src); list_store_set_int(GTK_WIDGET(d->text), iter, FILE_WIN_COL_NOT_RANGE, src != DATA_SOURCE_RANGE); list_store_set_int(GTK_WIDGET(d->text), iter, FILE_WIN_COL_IS_FILE, src == DATA_SOURCE_FILE); getobj(d->obj, "mask", row, 0, NULL, &mask); getobj(d->obj, "move_data", row, 0, NULL, &move); if ((arraynum(mask) != 0) || (arraynum(move) != 0)) { style = PANGO_STYLE_ITALIC; } else { style = PANGO_STYLE_NORMAL; } list_store_set_int(GTK_WIDGET(d->text), iter, FILE_WIN_COL_MASKED, style); for (i = 0; i < FILE_WIN_COL_NUM; i++) { switch (i) { case FILE_WIN_COL_TIP: str = NULL; str = get_plot_info_str(d->obj, row, src); list_store_set_string(GTK_WIDGET(d->text), iter, i, (str) ? str : ""); break; case FILE_WIN_COL_FILE: str = get_plot_info_str(d->obj, row, src); if (str == NULL) { list_store_set_string(GTK_WIDGET(d->text), iter, i, FILL_STRING); } else { if (src == DATA_SOURCE_FILE) { bfile = getbasename(str); if (bfile) { list_store_set_string(GTK_WIDGET(d->text), iter, i, bfile); g_free(bfile); } else { list_store_set_string(GTK_WIDGET(d->text), iter, i, FILL_STRING); } } else { set_escaped_str(GTK_WIDGET(d->text), iter, i, str); } } break; case FILE_WIN_COL_TYPE: pixbuf = draw_type_pixbuf(d->obj, row); if (pixbuf) { list_store_set_pixbuf(GTK_WIDGET(d->text), iter, i, pixbuf); g_object_unref(pixbuf); } break; case FILE_WIN_COL_X_AXIS: case FILE_WIN_COL_Y_AXIS: axis = get_axis_obj_str(d->obj, row, (Flist[i].title[1] == 'x') ? AXIS_X : AXIS_Y); if (axis) { list_store_set_string(GTK_WIDGET(d->text), iter, i, axis); g_free(axis); } else { list_store_set_string(GTK_WIDGET(d->text), iter, i, ""); } break; case FILE_WIN_COL_HIDDEN: getobj(d->obj, Flist[i].name, row, 0, NULL, &cx); cx = ! cx; list_store_set_val(GTK_WIDGET(d->text), iter, i, Flist[i].type, &cx); break; case FILE_WIN_COL_MASKED: case FILE_WIN_COL_NOT_RANGE: case FILE_WIN_COL_IS_FILE: break; default: if (Flist[i].type == G_TYPE_DOUBLE) { getobj(d->obj, Flist[i].name, row, 0, NULL, &cx); list_store_set_double(GTK_WIDGET(d->text), iter, i, cx / 100.0); } else { getobj(d->obj, Flist[i].name, row, 0, NULL, &cx); list_store_set_val(GTK_WIDGET(d->text), iter, i, Flist[i].type, &cx); } } } } void CmFileMath(void *w, gpointer client_data) { struct objlist *obj; int undo; if (Menulock || Globallock) return; obj = chkobject("data"); if (chkobjlastinst(obj) < 0) return; undo = menu_save_undo_single(UNDO_TYPE_EDIT, obj->name); MathDialog(&DlgMath, obj); DialogExecute(TopLevel, &DlgMath); if (DlgMath.modified) { FileWinUpdate(NgraphApp.FileWin.data.data, TRUE, DRAW_REDRAW); } else { menu_delete_undo(undo); } } static int GetDrawFiles(struct narray *farray) { struct objlist *fobj; int lastinst; struct narray ifarray; int i, a; if (farray == NULL) return 1; fobj = chkobject("data"); if (fobj == NULL) return 1; lastinst = chkobjlastinst(fobj); if (lastinst < 0) return 1; arrayinit(&ifarray, sizeof(int)); for (i = 0; i <= lastinst; i++) { getobj(fobj, "hidden", i, 0, NULL, &a); if (!a) arrayadd(&ifarray, &i); } SelectDialog(&DlgSelect, fobj, NULL, FileCB, farray, &ifarray); if (DialogExecute(TopLevel, &DlgSelect) != IDOK) { arraydel(&ifarray); arraydel(farray); return 1; } arraydel(&ifarray); return 0; } void CmFileSaveData(void *w, gpointer client_data) { struct narray farray; struct objlist *obj; int i, num, onum, type, div, curve = FALSE, *array, append; char *file, buf[1024]; char *argv[4]; if (Menulock || Globallock) return; if (GetDrawFiles(&farray)) return; obj = chkobject("data"); if (obj == NULL) return; onum = chkobjlastinst(obj); num = arraynum(&farray); if (num == 0) { arraydel(&farray); return; } array = arraydata(&farray); for (i = 0; i < num; i++) { if (array[i] < 0 || array[i] > onum) continue; getobj(obj, "type", array[i], 0, NULL, &type); if (type == 3) { curve = TRUE; } } div = 10; if (curve) { OutputDataDialog(&DlgOutputData, div); if (DialogExecute(TopLevel, &DlgOutputData) != IDOK) { arraydel(&farray); return; } div = DlgOutputData.div; } if (nGetSaveFileName(TopLevel, _("Data file"), NULL, NULL, NULL, &file, FALSE, Menulocal.changedirectory) != IDOK) { arraydel(&farray); return; } ProgressDialogCreate(_("Making data file")); SetStatusBar(_("Making data file.")); argv[0] = (char *) file; argv[1] = (char *) ÷ argv[3] = NULL; for (i = 0; i < num; i++) { if (array[i] < 0 || array[i] > onum) continue; snprintf(buf, sizeof(buf), "%d/%d", i, num); set_progress(1, buf, 1.0 * (i + 1) / num); append = (i == 0) ? FALSE : TRUE; argv[2] = (char *) &append; if (exeobj(obj, "output_file", array[i], 3, argv)) break; } ProgressDialogFinalize(); ResetStatusBar(); main_window_redraw(); arraydel(&farray); g_free(file); } static gboolean filewin_ev_key_down(GtkWidget *w, guint keyval, GdkModifierType state, gpointer user_data) { struct obj_list_data *d; g_return_val_if_fail(w != NULL, FALSE); if (Menulock || Globallock) return TRUE; d = (struct obj_list_data *) user_data; switch (keyval) { case GDK_KEY_Delete: FileWinFileDelete(d); UnFocus(); break; case GDK_KEY_Return: if (state & GDK_SHIFT_MASK) { return FALSE; } FileWinFileUpdate(d); UnFocus(); break; case GDK_KEY_Insert: if (state & GDK_SHIFT_MASK) { FileWinFileCopy2(d); } else { FileWinFileCopy(d); } UnFocus(); break; case GDK_KEY_space: if (state & GDK_CONTROL_MASK) return FALSE; FileWinFileDraw(d); UnFocus(); break; case GDK_KEY_f: if (state & GDK_CONTROL_MASK) { FileWinFit(d); UnFocus(); } break; default: return FALSE; } return TRUE; } static void popup_show_cb(GtkWidget *widget, gpointer user_data) { int sel, num, source; unsigned int i; struct obj_list_data *d; d = (struct obj_list_data *) user_data; sel = d->select; num = chkobjlastinst(d->obj); for (i = 1; i < POPUP_ITEM_NUM; i++) { switch (i) { case POPUP_ITEM_TOP: case POPUP_ITEM_UP: gtk_widget_set_sensitive(d->popup_item[i], sel > 0 && sel <= num); break; case POPUP_ITEM_DOWN: case POPUP_ITEM_BOTTOM: gtk_widget_set_sensitive(d->popup_item[i], sel >= 0 && sel < num); break; case POPUP_ITEM_EDIT: if (sel >= 0 && sel <= num) { getobj(d->obj, "source", sel, 0, NULL, &source); gtk_widget_set_sensitive(d->popup_item[i], source == DATA_SOURCE_FILE); } else { gtk_widget_set_sensitive(d->popup_item[i], FALSE); } break; default: gtk_widget_set_sensitive(d->popup_item[i], sel >= 0 && sel <= num); } } } enum FILE_COMBO_ITEM { FILE_COMBO_ITEM_COLOR_1, FILE_COMBO_ITEM_COLOR_2, FILE_COMBO_ITEM_TYPE, FILE_COMBO_ITEM_MARK, FILE_COMBO_ITEM_INTP, FILE_COMBO_ITEM_LINESTYLE, FILE_COMBO_ITEM_JOIN, FILE_COMBO_ITEM_FIT, FILE_COMBO_ITEM_CLIP, }; static void add_fit_combo_item_to_cbox(GtkTreeStore *list, struct objlist *obj, int id) { char *valstr, buf[1024]; int i; sgetobjfield(obj, id, "fit", NULL, &valstr, FALSE, FALSE, FALSE); if (valstr == NULL) { return; } for (i = 0; (valstr[i] != '\0') && (valstr[i] != ':'); i++); if (valstr[i] == ':') { i++; } if (valstr[i]) { snprintf(buf, sizeof(buf), "Fit:%s", valstr + i); } else { snprintf(buf, sizeof(buf), "Fit:%s", _("Create")); } g_free(valstr); add_text_combo_item_to_cbox(list, NULL, NULL, FILE_COMBO_ITEM_FIT, -1, buf, TOGGLE_NONE, FALSE); } static void create_type_color_combo_box(GtkWidget *cbox, struct objlist *obj, int type, int id) { int count; GtkTreeStore *list; GtkTreeIter parent; count = combo_box_get_num(cbox); if (count > 0) { return; } list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cbox))); create_type_combo_item(list, obj, id); switch (type) { case PLOT_TYPE_MARK: case PLOT_TYPE_LINE: case PLOT_TYPE_POLYGON: case PLOT_TYPE_CURVE: case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_ERRORBAR_X: case PLOT_TYPE_ERRORBAR_Y: case PLOT_TYPE_STAIRCASE_X: case PLOT_TYPE_STAIRCASE_Y: case PLOT_TYPE_BAR_X: case PLOT_TYPE_BAR_Y: case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_FILL_Y: case PLOT_TYPE_FIT: add_line_style_item_to_cbox(list, NULL, FILE_COMBO_ITEM_LINESTYLE, obj, "line_style", id); break; } switch (type) { case PLOT_TYPE_LINE: case PLOT_TYPE_POLYGON: case PLOT_TYPE_CURVE: case PLOT_TYPE_STAIRCASE_X: case PLOT_TYPE_STAIRCASE_Y: case PLOT_TYPE_FIT: add_text_combo_item_to_cbox(list, &parent, NULL, -1, -1, _("Join"), TOGGLE_NONE, FALSE); add_enum_combo_item_to_cbox(list, NULL, &parent, FILE_COMBO_ITEM_JOIN, obj, "line_join", id); break; } add_text_combo_item_to_cbox(list, NULL, NULL, FILE_COMBO_ITEM_COLOR_1, -1, _("Color 1"), TOGGLE_NONE, FALSE); switch (type) { case PLOT_TYPE_MARK: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_FILL_Y: add_text_combo_item_to_cbox(list, NULL, NULL, FILE_COMBO_ITEM_COLOR_2, -1, _("Color 2"), TOGGLE_NONE, FALSE); break; } if (type == PLOT_TYPE_FIT) { add_fit_combo_item_to_cbox(list, obj, id); } add_bool_combo_item_to_cbox(list, NULL, NULL, FILE_COMBO_ITEM_CLIP, obj, "data_clip", id, _("Clip")); } static void create_type_combo_item(GtkTreeStore *list, struct objlist *obj, int id) { char **enumlist; int i, type; GtkTreeIter parent, iter; gtk_tree_store_append(list, &parent, NULL); gtk_tree_store_set(list, &parent, OBJECT_COLUMN_TYPE_STRING, _("Type"), OBJECT_COLUMN_TYPE_PIXBUF, NULL, OBJECT_COLUMN_TYPE_INT, FILE_COMBO_ITEM_TYPE, OBJECT_COLUMN_TYPE_TOGGLE_VISIBLE, FALSE, OBJECT_COLUMN_TYPE_PIXBUF_VISIBLE, FALSE, -1); enumlist = (char **) chkobjarglist(obj, "type"); type = -1; getobj(obj, "type", id, 0, NULL, &type); for (i = 0; enumlist[i] && enumlist[i][0]; i++) { add_text_combo_item_to_cbox(list, &iter, &parent, FILE_COMBO_ITEM_TYPE, i, _(enumlist[i]), TOGGLE_RADIO, type == i); if (strcmp(enumlist[i], "mark") == 0) { add_mark_combo_item_to_cbox(list, NULL, &iter, FILE_COMBO_ITEM_MARK, obj, "mark_type", id); } else if (strcmp(enumlist[i], "curve") == 0) { add_enum_combo_item_to_cbox(list, NULL, &iter, FILE_COMBO_ITEM_INTP, obj, "interpolation", id); } } } static void select_type(GtkComboBox *w, gpointer user_data) { int sel, col_type, type, mark_type, curve_type, enum_id, found, active, join, ret, undo; struct obj_list_data *d; GtkTreeStore *list; GtkTreeIter iter; menu_lock(FALSE); d = (struct obj_list_data *) user_data; gtk_widget_grab_focus(d->text); sel = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); if (sel < 0) return; getobj(d->obj, "type", sel, 0, NULL, &type); list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(w))); found = gtk_combo_box_get_active_iter(w, &iter); if (! found) return; gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_INT, &col_type, OBJECT_COLUMN_TYPE_ENUM, &enum_id, -1); switch (col_type) { case FILE_COMBO_ITEM_COLOR_1: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_1)) { return; } break; case FILE_COMBO_ITEM_COLOR_2: if (select_obj_color(d->obj, sel, OBJ_FIELD_COLOR_TYPE_2)) { return; } break; case FILE_COMBO_ITEM_TYPE: if (enum_id == type) { return; } undo = menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "type", sel, &enum_id); if (enum_id == PLOT_TYPE_FIT) { char *fit; getobj(d->obj, "fit", sel, 0, NULL, &fit); if (fit == NULL) { ret = show_fit_dialog(d->obj, sel, TopLevel); if (ret != IDOK) { menu_delete_undo(undo); putobj(d->obj, "type", sel, &type); return; } } } break; case FILE_COMBO_ITEM_MARK: getobj(d->obj, "mark_type", sel, 0, NULL, &mark_type); if (type == PLOT_TYPE_MARK && enum_id == mark_type) return; menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "mark_type", sel, &enum_id); type = PLOT_TYPE_MARK; putobj(d->obj, "type", sel, &type); break; case FILE_COMBO_ITEM_INTP: getobj(d->obj, "interpolation", sel, 0, NULL, &curve_type); if (type == PLOT_TYPE_CURVE && enum_id == curve_type) return; menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "interpolation", sel, &enum_id); type = PLOT_TYPE_CURVE; putobj(d->obj, "type", sel, &type); break; case FILE_COMBO_ITEM_LINESTYLE: if (enum_id < 0 || enum_id >= FwNumStyleNum) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); if (chk_sputobjfield(d->obj, sel, "line_style", FwLineStyle[enum_id].list) != 0) { return; } if (! get_graph_modified()) { return; } break; case FILE_COMBO_ITEM_FIT: undo = data_save_undo(UNDO_TYPE_EDIT); ret = show_fit_dialog(d->obj, sel, TopLevel); if (ret != IDOK) { menu_delete_undo(undo); return; } break; case FILE_COMBO_ITEM_JOIN: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_ENUM, &enum_id, -1); getobj(d->obj, "line_join", sel, 0, NULL, &join); if (join == enum_id) { return; } menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "line_join", sel, &enum_id); break; case FILE_COMBO_ITEM_CLIP: gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_TOGGLE, &active, -1); active = ! active; menu_save_undo_single(UNDO_TYPE_EDIT, d->obj->name); putobj(d->obj, "data_clip", sel, &active); break; default: return; } d->select = sel; d->update(d, FALSE, DRAW_REDRAW); set_graph_modified(); } static void start_editing_type(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path_str, gpointer user_data) { GtkTreeIter iter; struct obj_list_data *d; GtkComboBox *cbox; int sel, type; struct objlist *obj; menu_lock(TRUE); d = (struct obj_list_data *) user_data; sel = tree_view_get_selected_row_int_from_path(d->text, path_str, &iter, FILE_WIN_COL_ID); if (sel < 0) { return; } cbox = GTK_COMBO_BOX(editable); g_object_set_data(G_OBJECT(cbox), "user-data", GINT_TO_POINTER(sel)); obj = getobject("data"); if (obj == NULL) return; getobj(obj, "type", sel, 0, NULL, &type); create_type_color_combo_box(GTK_WIDGET(cbox), obj, type, sel); g_signal_connect(cbox, "editing-done", G_CALLBACK(select_type), d); gtk_widget_show(GTK_WIDGET(cbox)); return; } static void select_axis(GtkComboBox *w, gpointer user_data, char *axis) { GtkTreeStore *list; GtkTreeIter iter; char buf[64]; int j, sel, found; struct obj_list_data *d; sel = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w), "user-data")); if (sel < 0) return; d = (struct obj_list_data *) user_data; list = GTK_TREE_STORE(gtk_combo_box_get_model(w)); found = gtk_combo_box_get_active_iter(w, &iter); if (! found) return; gtk_tree_model_get(GTK_TREE_MODEL(list), &iter, OBJECT_COLUMN_TYPE_INT, &j, -1); if (j < 0) return; data_save_undo(UNDO_TYPE_EDIT); snprintf(buf, sizeof(buf), "axis:%d", j); if (sputobjfield(d->obj, sel, axis, buf) == 0) { d->select = sel; } } static void select_axis_x(GtkComboBox *w, gpointer user_data) { select_axis(w, user_data, "axis_x"); } static void select_axis_y(GtkComboBox *w, gpointer user_data) { select_axis(w, user_data, "axis_y"); } struct axis_combo_box_iter { char axis; int exist; GtkTreeIter iter; }; static GtkTreeIter * axis_combo_box_get_parent(struct axis_combo_box_iter *axis_iter, GtkTreeStore *list, char axis) { int i; char name[] = "X"; for (i = 0; axis_iter[i].axis; i++) { if (axis_iter[i].axis == axis) { if (! axis_iter[i].exist) { name[0] = axis; add_text_combo_item_to_cbox(list, &axis_iter[i].iter, NULL, -1, -1, name, TOGGLE_NONE, FALSE); axis_iter[i].exist = TRUE; } return &axis_iter[i].iter; } } return NULL; } static void axis_select_done(GtkComboBox *w, gpointer user_data) { menu_lock(FALSE); } static void start_editing(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path, gpointer user_data, int axis) { GtkTreeIter iter; GtkTreeStore *list; struct obj_list_data *d; GtkComboBox *cbox; int lastinst, j, sel; struct objlist *aobj; char *axis_name, *name; struct axis_combo_box_iter axis_iter[] = { {'X', FALSE}, {'Y', FALSE}, {'U', FALSE}, {'R', FALSE}, {'\0', FALSE}, /* sentinel value */ }; menu_lock(TRUE); d = (struct obj_list_data *) user_data; sel = tree_view_get_selected_row_int_from_path(d->text, path, &iter, FILE_WIN_COL_ID); if (sel < 0) { return; } cbox = GTK_COMBO_BOX(editable); g_object_set_data(G_OBJECT(cbox), "user-data", GINT_TO_POINTER(sel)); init_object_combo_box(GTK_WIDGET(editable)); list = GTK_TREE_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(editable))); gtk_tree_store_clear(list); aobj = getobject("axis"); axis_name = get_axis_obj_str(d->obj, sel, axis); lastinst = chkobjlastinst(aobj); for (j = 0; j <= lastinst; j++) { GtkTreeIter *parent; int active; getobj(aobj, "group", j, 0, NULL, &name); name = CHK_STR(name); parent = NULL; if (lastinst > AXIS_SELECTION_LIMIT) { parent = axis_combo_box_get_parent(axis_iter, list, name[1]); } active = (g_strcmp0(axis_name, name) == 0); add_text_combo_item_to_cbox(list, &iter, parent, j, -1, name, TOGGLE_RADIO, active); if (active) { gtk_combo_box_set_active_iter(cbox, &iter); } } d->select = -1; g_signal_connect(cbox, "changed", G_CALLBACK((axis == AXIS_X) ? select_axis_x : select_axis_y), d); g_signal_connect(cbox, "editing-done", G_CALLBACK(axis_select_done), d); if (axis_name) { g_free(axis_name); } } static void start_editing_x(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path, gpointer user_data) { start_editing(renderer, editable, path, user_data, AXIS_X); } static void start_editing_y(GtkCellRenderer *renderer, GtkCellEditable *editable, gchar *path, gpointer user_data) { start_editing(renderer, editable, path, user_data, AXIS_Y); } static void edited_axis(GtkCellRenderer *cell_renderer, gchar *path, gchar *str, gpointer user_data, char *axis) { struct obj_list_data *d; menu_lock(FALSE); d = (struct obj_list_data *) user_data; gtk_widget_grab_focus(d->text); if (str == NULL || d->select < 0) return; d->update(d, FALSE, DRAW_REDRAW); set_graph_modified(); } static void drag_drop_cb(GtkWidget *w, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { gchar **filenames; switch (info) { case DROP_TYPE_FILE: filenames = gtk_selection_data_get_uris(data); if (filenames) { int num; num = g_strv_length(filenames); data_dropped(filenames, num, FILE_TYPE_DATA); g_strfreev(filenames); } gtk_drag_finish(context, TRUE, FALSE, time); break; } } static void init_dnd(struct SubWin *d) { GtkWidget *widget; GtkTargetEntry target[] = { {"text/uri-list", 0, DROP_TYPE_FILE}, }; widget = d->data.data->text; gtk_drag_dest_set(widget, GTK_DEST_DEFAULT_ALL, target, sizeof(target) / sizeof(*target), GDK_ACTION_COPY); g_signal_connect(widget, "drag-data-received", G_CALLBACK(drag_drop_cb), NULL); } GtkWidget * create_data_list(struct SubWin *d) { int n; int noexpand_colmns[] = {FILE_WIN_COL_X, FILE_WIN_COL_Y, FILE_WIN_COL_X_AXIS, FILE_WIN_COL_Y_AXIS, FILE_WIN_COL_TYPE, FILE_WIN_COL_SIZE, FILE_WIN_COL_WIDTH, FILE_WIN_COL_SKIP, FILE_WIN_COL_STEP, FILE_WIN_COL_FINAL, FILE_WIN_COL_DNUM}; if (d->Win) { return d->Win; } list_sub_window_create(d, FILE_WIN_COL_NUM, Flist); d->data.data->update = FileWinUpdate; d->data.data->setup_dialog = FileDialog; d->data.data->dialog = &DlgFile; d->data.data->ev_key = filewin_ev_key_down; d->data.data->delete = delete_file_obj; d->data.data->undo_save = data_save_undo; d->data.data->obj = chkobject("data"); sub_win_create_popup_menu(d->data.data, POPUP_ITEM_NUM, Popup_list, G_CALLBACK(popup_show_cb)); set_combo_cell_renderer_cb(d->data.data, FILE_WIN_COL_X_AXIS, Flist, G_CALLBACK(start_editing_x), G_CALLBACK(edited_axis)); set_combo_cell_renderer_cb(d->data.data, FILE_WIN_COL_Y_AXIS, Flist, G_CALLBACK(start_editing_y), G_CALLBACK(edited_axis)); set_obj_cell_renderer_cb(d->data.data, FILE_WIN_COL_TYPE, Flist, G_CALLBACK(start_editing_type)); init_dnd(d); gtk_tree_view_set_enable_search(GTK_TREE_VIEW(d->data.data->text), TRUE); gtk_tree_view_set_search_column(GTK_TREE_VIEW(d->data.data->text), FILE_WIN_COL_FILE); tree_view_set_tooltip_column(GTK_TREE_VIEW(d->data.data->text), FILE_WIN_COL_TIP); n = sizeof(noexpand_colmns) / sizeof(*noexpand_colmns); tree_view_set_no_expand_column(d->data.data->text, noexpand_colmns, n); set_cell_attribute_source(d, "style", FILE_WIN_COL_FILE, FILE_WIN_COL_MASKED); set_cell_attribute_source(d, "visible", FILE_WIN_COL_X, FILE_WIN_COL_NOT_RANGE); set_cell_attribute_source(d, "visible", FILE_WIN_COL_Y, FILE_WIN_COL_NOT_RANGE); set_cell_attribute_source(d, "editable", FILE_WIN_COL_FILE, FILE_WIN_COL_IS_FILE); return d->Win; } ngraph-gtk-6.09.05/src/gtk/completion_info.h0000644000175000017500000000075313242772500015576 00000000000000#ifndef COMPLETION_INFO_HEADER #define COMPLETION_INFO_HEADER #include "gtk_common.h" struct completion_info { char *lower_text, *text, *text_wo_paren, *info; GtkSourceCompletionItem *proposal; }; extern struct completion_info completion_info_const[]; extern struct completion_info completion_info_func[]; GList *completion_info_func_populate(const char *word, int len, GtkTextIter *iter); GList *completion_info_const_populate(const char *word, int len, GtkTextIter *iter); #endif ngraph-gtk-6.09.05/src/gtk/completion_info_data.c0000644000175000017500000011604014106124312016547 00000000000000/* -*- Mode: C; coding: utf-8 -*- */ #include "gtk_common.h" #include "completion_info.h" struct completion_info completion_info_func[] = { {"abs", "abs()", "abs", N_("abs(x)\ncompute the absolute value of x"), NULL}, {"acos", "acos()", "acos", N_("acos(x)\narc cosine function"), NULL}, {"acosh", "acosh()", "acosh", N_("acosh(x)\ninverse hyperbolic cosine function"), NULL}, {"alpha", "alpha()", "alpha", N_("alpha(x, i)\nSet A (i == 1) or A2 (i == 2) values to x (0 <= x < 256)\nwhen i == 0, set A and A2 values to x"), NULL}, {"am", "am()", "am", N_("am(a)\ncopy the contents of the array a to the memory\n(return the number of copied elements)"), NULL}, {"and", "and()", "and", N_("and(x, y)\nTrue (= 1) when (x != 0) and (y != 0)"), NULL}, {"array", "array()", "array", N_("array(a, v1, v2, ...)\ninitialize an array a with the rest arguments\nreturn the number of elements of the array"), NULL}, {"array_average", "array_average()", "array_average", N_("array_average(a)\nreturn the average of the elements of array a"), NULL}, {"array_clear", "array_clear()", "array_clear", N_("array_clear(a)\nset the number of elements of the array a to 0"), NULL}, {"array_compact", "array_compact()", "array_compact", N_("array_compact(a)\nRemove non-numeric values from the elements of the array of array a\nand return the number of elements after removal"), NULL}, {"array_copy", "array_copy()", "array_copy", N_("array_copy(dest, src)\ncopy the contents of the array src to the array dest.\n(return the number of copied elements)"), NULL}, {"array_max", "array_max()", "array_max", N_("array_max(a)\nreturns the maximum value contained in array a"), NULL}, {"array_min", "array_min()", "array_min", N_("array_min(a)\nreturns the minimum value contained in array a"), NULL}, {"array_moving_average", "array_moving_average()", "array_moving_average", N_("array_moving_average(dest, src, n, type)\ncalculate moving average of (n * 2 + 1) sample of the array src\nand set them to the array dest.\nWeighted moving average is used when type is 1."), NULL}, {"array_stdev", "array_stdev()", "array_stdev", N_("array_stdev(a)\nreturn the corrected sample standard deviation of the elements of array a"), NULL}, {"array_stdevp", "array_stdevp()", "array_stdevp", N_("array_stdevp(a)\nreturn the standard deviation of the elements of array a"), NULL}, {"array_sum", "array_sum()", "array_sum", N_("array_sum(a)\nreturns the sum of the elements of array a"), NULL}, {"array_sumsq", "array_sumsq()", "array_sumsq", N_("array_sumsq(a)\nreturns the square sum of the elements of array a"), NULL}, {"asin", "asin()", "asin", N_("asin(x)\narc sine function"), NULL}, {"asinh", "asinh()", "asinh", N_("asinh(x)\ninverse hyperbolic sine function"), NULL}, {"atan", "atan()", "atan", N_("atan(x)\narc tangent function"), NULL}, {"atanh", "atanh()", "atanh", N_("atanh(x)\ninverse hyperbolic tangent function"), NULL}, {"beta", "beta()", "beta", N_("beta(x, y)\nbeta function"), NULL}, {"choose", "choose()", "choose", N_("choose(n, m)\nthe combinatorial factor n choose m: n!/(m!(n-m)!)"), NULL}, {"cm", "cm()", "cm", N_("cm(x, n)\ninitialize n memories from the beginning with x\ninitialize whole memory when n is 0\nand n memories from the end when x is negative\n(return x)"), NULL}, {"color", "color()", "color", N_("color(i, x)\ni = 0: Set the R value to x (0 <= x < 256)\ni = 1: Set the G value to x (0 <= x < 256)\ni = 2: Set the B value to x (0 <= x < 256)\ni = 3: Set the R, G and B values to x (0 <= x < 256)\ni = 4: Set the R2 value to x (0 <= x < 256)\ni = 5: Set the G2 value to x (0 <= x < 256)\ni = 6: Set the B2 value to x (0 <= x < 256)\ni = 7: Set the R2, G2 and B2 values to x (0 <= x < 256)\ni = 8: Set the R, G and B values to be hexadecimal color of x\ni = 9: Set the R2, G2 and B2 values to be hexadecimal color of x"), NULL}, {"cos", "cos()", "cos", N_("cos(x)\ncosine function"), NULL}, {"cosh", "cosh()", "cosh", N_("cosh(x)\nhyperbolic cosine function"), NULL}, {"delta", "delta()", "delta", N_("delta(x)\nKronecker delta (1 when x = 0, 0 otherwise)"), NULL}, {"dif", "dif()", "dif", N_("dif(x)\nDifference"), NULL}, {"draw_arc", "draw_arc()", "draw_arc", N_("draw_arc(x, y, rx, ry, start, arc, pieslice, stroke, fill, close)\ndraw an arc with the X direction radius rx and the Y direction radius ry centered on (x, y).\nstart and arc specify start angle and arc angle respectively.\nWhen stroke and fill are 0, do not draw contours and fills respectively.\nIf pieslice is not 0, draw a sector.\nIf close is not 0, close the outline."), NULL}, {"draw_errorbar", "draw_errorbar()", "draw_errorbar", N_("draw_errorbar(x, y, erx, ery, size)\ndraw errorbars from (x - erx, y) to (x + erx, y) and\nfrom (x, y - ery) to (x, y + ery).\nThe length of ticks can be specified with size.\nWhen size is 0, specification of the file object is used."), NULL}, {"draw_errorbar2", "draw_errorbar2()", "draw_errorbar2", N_("draw_errorbar2(x1, y1, x2, y2, size)\ndraw an errorbar from (x1, y1) to (x2, y2).\nThe length of ticks can be specified with size.\nWhen size is 0, specification of the file object is used."), NULL}, {"draw_line", "draw_line()", "draw_line", N_("draw_line(x1, y1, x2, y2, arrow, size)\ndraw a line form (x1, y1) to (x2, y2).\nWhen arrow is 1, 2 or 3, draw arrow end, begin and both side of the line respectively.\nThe size of a arrow can be specified with size.\nWhen size is 0, specification of the file object is used."), NULL}, {"draw_mark", "draw_mark()", "draw_mark", N_("draw_mark(x, y, size)\ndraw a mark on (x, y). \nThe size of a mark can be specified with size.\nWhen size is 0, specification of the file object is used."), NULL}, {"draw_polygon", "draw_polygon()", "draw_polygon", N_("draw_polygon(ax, ay, stroke, fill)\ndraw polygon defined by coordinates (ax[0], ay[0]), (ax[1], ay[1]), ....\nwhen stroke is 0, do not draw contours.\nfill can be specified with one of\nFILL_RULE_NONE, FILL_RULE_EVEN_ODD or FILL_RULE_WINDING."), NULL}, {"draw_polyline", "draw_polyline()", "draw_polyline", N_("draw_polyline(ax, ay)\nconnect coordinates (ax[0], ay[0]), (ax[1], ay[1]), ... by polyline."), NULL}, {"draw_rect", "draw_rect()", "draw_rect", N_("draw_rect(x, y, w, h, stroke, fill)\ndraw a rectangle with (x, y) and (x + w, y + h) as diagonal vertices.\nWhen stroke and fill are 0, do not draw contours and fills respectively."), NULL}, {"draw_text", "draw_text()", "draw_text", N_("draw_text($str, x, y, dir)\nDraw the string $str at (x, y).\nDirection is specified by dir."), NULL}, {"draw_text_raw", "draw_text_raw()", "draw_text_raw", N_("draw_text_raw($str, x, y, dir)\nDraw the raw string $str at (x, y).\nDirection is specified by dir."), NULL}, {"each", "each()", "each", N_("each(a, item, ex)\nEvaluate ex for each element of the array a.\nThe element of the array can be referred by the variable item."), NULL}, {"each_with_index", "each_with_index()", "each_with_index", N_("each_with_index(a, item, index, ex)\nEvaluate ex for each element of the array a.\nThe element of the array and the loop count can be referred\nby the variable item and index respectively."), NULL}, {"ei", "ei()", "ei", N_("ei(x)\ncompute the exponential integral Ei(x)"), NULL}, {"eq", "eq()", "eq", N_("eq(x, y, prec)\nTrue (= 1) when x == y.\nThe number of digits of comparison can be specified with prec\n(prec == 0 is exact match)."), NULL}, {"erf", "erf()", "erf", N_("erf(x)\nerror function erf(x)"), NULL}, {"erfc", "erfc()", "erfc", N_("erfc(x)\ncomplementary error function erfc(x)"), NULL}, {"exp", "exp()", "exp", N_("exp(x)\nbase-e exponential function (x <= 690)"), NULL}, {"expm1", "expm1()", "expm1", N_("expm1(x)\nexp(x)-1.\nThe result is computed in a way that is accurate\neven if the value of x is near zero."), NULL}, {"filename", "filename()", "filename", N_("filename($str, basename)\nAssign filename of the the data object to the variable $str.\nAny leading directory components are removed when basename is not zero.\nReturn the length of the string $str in characters."), NULL}, {"filter", "filter()", "filter", N_("filter(dest, src, item, ex)\nFind elements in the array src\nthat satisfies that the evaluated value of ex is true\nand set them to the array dest.\nAn element of the array src can be referred by the variable item."), NULL}, {"find", "find()", "find", N_("find(a, item, ex)\nReturns the value of the first element in the array a\nthat satisfies that the evaluated value of ex is true.\nAn element of the array can be referred by the variable item."), NULL}, {"fit_calc", "fit_calc()", "fit_calc", N_("fit_calc(id, x)\nWhen the plot type of the data object whose ID is id is fit,\nthe corresponding fit result f(x) is calculated."), NULL}, {"fit_prm", "fit_prm()", "fit_prm", N_("fit_prm(id, x)\nWhen the plot type of the data object whose ID is id is fit,\nthe value of the field \"%0x\" of the corresponding fit object."), NULL}, {"fmod", "fmod()", "fmod", N_("fmod(x, y)\ncompute the floating-point remainder of dividing x by y"), NULL}, {"for", "for()", "for", N_("for(m, begin, end, step, ex)\nSet the value in step from begin to end to the m-th memory and repeat ex.\nWhen m is negative, no setting to memory is done.\nReturns the value of ex evaluated last."), NULL}, {"frac", "frac()", "frac", N_("frac(x)\nremainder"), NULL}, {"gamma", "gamma()", "gamma", N_("gamma(x)\ngamma function"), NULL}, {"gauss", "gauss()", "gauss", N_("gauss(x)\nlargest integral value not greater than x"), NULL}, {"ge", "ge()", "ge", N_("ge(x, y, prec)\nTrue (= 1) when x >= y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits)."), NULL}, {"getobj", "getobj()", "getobj", N_("getobj($obj, $field, id)\nReturn the value of the $field of the $obj object which ID is id.\nThe field type must be int, bool, enum or double."), NULL}, {"getobj_array", "getobj_array()", "getobj_array", N_("getobj_array(array, $obj, $field, id)\nSet values of the $field of the $obj object which ID is id to the array array.\nThe field type must be char*[], double[] or int[].\nRetuern the number of elements saved to the array."), NULL}, {"getobj_string", "getobj_string()", "getobj_string", N_("getobj_string($str, $obj, $field, id)\nSet the value of the $field of the $obj object which ID is id to the variable $str.\nThe field type must be char*.\nReturn the length of the string $str in characters."), NULL}, {"gt", "gt()", "gt", N_("gt(x, y, prec)\nTrue (= 1) when x > y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits)."), NULL}, {"hn", "hn()", "hn", N_("hn(n, x)\nHermite polynomials"), NULL}, {"hsb", "hsb()", "hsb", N_("hsb(h, s, b)\nSet the R, G and B values of the color to h, s, b (0 <= h, s, b <=1) from the HSB value"), NULL}, {"hsb2", "hsb2()", "hsb2", N_("hsb2(h, s, b)\nSet the R2, G2 and B2 values of the color to h, s, b (0 <= h, s, b <=1) from the HSB value"), NULL}, {"icbeta", "icbeta()", "icbeta", N_("icbeta(a, b, x)\nincomplete beta function"), NULL}, {"icgam", "icgam()", "icgam", N_("icgam(m, x)\nincomplete gamma function"), NULL}, {"if", "if()", "if", N_("if(x, ex1, ex2)\nevaluate ex1 when x != 0, evaluate ex2 otherwise"), NULL}, {"in", "in()", "in", N_("in(n, x)\ncompute the regular modified cylindrical Bessel function of order |n|, In(|x|)"), NULL}, {"index", "index()", "index", N_("index(a, item, ex)\nReturns the first index at which a given element in the array a\nthat satisfies that the evaluated value of ex is true.\nAn element of the array can be referred by the variable item."), NULL}, {"int", "int()", "int", N_("int(x)\nround to integer, toward zero"), NULL}, {"inu", "inu()", "inu", N_("inu(nu, x)\ncompute the regular modified Bessel function of fractional order |nu|, Inu(|x|)"), NULL}, {"isbreak", "isbreak()", "isbreak", N_("isbreak(x)\nTrue if x is BREAK"), NULL}, {"iscont", "iscont()", "iscont", N_("iscont(x)\nTrue if x is CONT"), NULL}, {"isnan", "isnan()", "isnan", N_("isnan(x)\nTrue if x is NAN"), NULL}, {"isnormal", "isnormal()", "isnormal", N_("isnormal(x)\nTrue if x is a normal number"), NULL}, {"isundef", "isundef()", "isundef", N_("isundef(x)\nTrue if x is UNDEF"), NULL}, {"jl", "jl()", "jl", N_("jl(l, x)\ncompute the regular spherical Bessel function of order |l|, jl(|x|)"), NULL}, {"jn", "jn()", "jn", N_("jn(n, x)\ncompute the regular cylindrical Bessel function of order n, Jn(|x|)"), NULL}, {"jnu", "jnu()", "jnu", N_("jnu(nu, x)\ncompute the regular cylindrical Bessel function of fractional order |nu|, Jnu(|x|)"), NULL}, {"kn", "kn()", "kn", N_("kn(n, x)\ncompute the irregular modified cylindrical Bessel function of order |n|, Kn(|x|)"), NULL}, {"knu", "knu()", "knu", N_("knu(nu, x)\ncompute the irregular modified Bessel function of fractional order |nu|, Knu(|x|)"), NULL}, {"le", "le()", "le", N_("le(x, y, prec)\nTrue (= 1) when x <= y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits)."), NULL}, {"lgn", "lgn()", "lgn", N_("lgn(n, a, x)\nevaluate the generalized Laguerre polynomials Lan(x) for a > -1, n >= 0"), NULL}, {"line_number", "line_number()", "line_number", N_("line_number()\nFile line number being processed (1st line is 1)"), NULL}, {"ln", "ln()", "ln", N_("ln(x)\nnatural logarithmic function"), NULL}, {"ln1p", "ln1p()", "ln1p", N_("ln1p(x)\nln(1+x).\nThe result is computed in a way that is accurate\neven if the value of x is near zero."), NULL}, {"log", "log()", "log", N_("log(x)\nbase-10 logarithmic function"), NULL}, {"log1p", "log1p()", "log1p", N_("log1p(x)\nlog(1+x).\nThe result is computed in a way that is accurate\neven if the value of x is near zero."), NULL}, {"lt", "lt()", "lt", N_("lt(x, y, prec)\nTrue (= 1) when x < y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits)."), NULL}, {"m", "m()", "m", N_("m(i, x)\nassigns x to the i-th memory (i = 0 to 65535)\nthe index from the tail when i is negative\n(return x)"), NULL}, {"map", "map()", "map", N_("map(dest, src, item, ex)\nEvaluate ex for each element of the array src\nand set them to the array dest.\nThe element of the array can be referred by the variable item."), NULL}, {"marksize", "marksize()", "marksize", N_("marksize(x)\nSet mark size to x"), NULL}, {"marktype", "marktype()", "marktype", N_("marktype(x)\nSet mark type to x"), NULL}, {"max", "max()", "max", N_("max(a, b, c, ...)\nThe largest value of arguments"), NULL}, {"min", "min()", "min", N_("min(a, b, c, ...)\nThe smallest value of arguments"), NULL}, {"mjd", "mjd()", "mjd", N_("mjd(year, month, day, hour, min, sec)\nModified Julian Date (date and time are given in UTC)"), NULL}, {"mjd2day", "mjd2day()", "mjd2day", N_("mjd2day(mjd)\nGregorian calendar day corresponding to Modified Julian Day mjd"), NULL}, {"mjd2month", "mjd2month()", "mjd2month", N_("mjd2month(mjd)\nmonth of Gregorian calendar corresponding to Modified Julian Day mjd"), NULL}, {"mjd2unix", "mjd2unix()", "mjd2unix", N_("mjd2unix(mjd)\ntime represents the number of seconds elapsed since the Epoch at mjd"), NULL}, {"mjd2wday", "mjd2wday()", "mjd2wday", N_("mjd2wday(mjd)\nThe day of the week as a decimal range 1 to 7, Monday being 1 corresponding to mjd"), NULL}, {"mjd2yday", "mjd2yday()", "mjd2yday", N_("mjd2yday(mjd)\nThe day of the year as a decimal number (range 001 to 366) corresponding to mjd"), NULL}, {"mjd2year", "mjd2year()", "mjd2year", N_("mjd2year(mjd)\nyear of Gregorian calendar corresponding to Modified Julian Day mjd"), NULL}, {"mtime", "mtime()", "mtime", N_("mtime()\nreturns last modification time of the file."), NULL}, {"neq", "neq()", "neq", N_("neq(x, y, prec)\nTrue (= 1) when x != y.\nThe number of digits of comparison can be specified with prec\n(prec == 0 is exact match)."), NULL}, {"not", "not()", "not", N_("not(x)\nTrue (= 1) when x == 0"), NULL}, {"obj_alpha", "obj_alpha()", "obj_alpha", N_("obj_alpha(id, obj)\nSet the A and A2 value to the same value as the instance of obj whose ID is id.\nobj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ or TEXT_OBJ."), NULL}, {"obj_color", "obj_color()", "obj_color", N_("obj_color(id, obj)\nSet the R, G, B, R2, G2 and B2 values to the same value as the instance of obj whose ID is id.\nobj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ or TEXT_OBJ."), NULL}, {"on_end", "on_end()", "on_end", N_("on_end(proc)\nEvaluate proc at the end of plottong the data object."), NULL}, {"or", "or()", "or", N_("or(x, y)\nTrue (= 1) when (x != 0) or (y != 0)"), NULL}, {"parameter", "parameter()", "parameter", N_("parameter(id)\nReturns the value of the prameter object which ID is id."), NULL}, {"pn", "pn()", "pn", N_("pn(l, x)\nevaluate the Legendre polynomial Pl(x) for a specific value of l, x subject to l >= 0, |x| <= 1"), NULL}, {"pop", "pop()", "pop", N_("pop(a ,n)\nremove the last n elements of array a (n = 0 is as same as n = 1).\nReturns the new size of the array."), NULL}, {"printf", "printf()", "printf", N_("printf($format, v1, v2, ...)\nConverts v1, v2, ... to a string according to $format\nand show in the information window.\nReturn the length of the string $str in characters."), NULL}, {"prog1", "prog1()", "prog1", N_("prog1(arg1, arg2, ...)\nEvaluate the arguments and return the evaluated value of the first argument"), NULL}, {"prog2", "prog2()", "prog2", N_("prog2(arg1, arg2, ...)\nEvaluate the arguments and return the evaluated value of the second argument"), NULL}, {"progn", "progn()", "progn", N_("progn(arg1, arg2, ...)\nEvaluate the arguments and return the evaluated value of the last argument"), NULL}, {"push", "push()", "push", N_("push(a, x)\nadds new element x to the end of an array a.\nReturns the new size of the array."), NULL}, {"puts", "puts()", "puts", N_("puts($str)\nShow $str in the information window.\nReturn the length of the string $str in characters."), NULL}, {"qinv", "qinv()", "qinv", N_("qinv(x)\ninverse complementary error function"), NULL}, {"rand", "rand()", "rand", N_("rand(x)\nreturns a random value equally distributed over the range [0..x)"), NULL}, {"reduce", "reduce()", "reduce", N_("reduce(a, item, result, ex)\nEvaluate ex for each element of the array a\nand return last evaluated value of ex.\nThe element of the array and the result of previous evaluation\ncan be referred by the variable item and result."), NULL}, {"rgb", "rgb()", "rgb", N_("rgb(r, g, b)\nSet the R, G and B values of the color to r, g, b (0 <= r, g, b <= 1)"), NULL}, {"rgb2", "rgb2()", "rgb2", N_("rgb2(r, g, b)\nSet the R2, G2 and B2 values of the color to r, g, b (0 <= r, g, b <= 1)"), NULL}, {"rm", "rm()", "rm", N_("rm(i)\nthe value of the current i-th memory (i = 0 to 65535),\nthe index from the tail when i is negative"), NULL}, {"round", "round()", "round", N_("round(x, digit)\nround the number x, away from zero.\ndigit is the number of digits to which you want to round x."), NULL}, {"rsort", "rsort()", "rsort", N_("rsort(a, ignore_case)\nreverse sort elements of array a\nfold lower case to upper case characters when ignore_case is not zero."), NULL}, {"shift", "shift()", "shift", N_("shift(a, n)\nremove the first n elements of array a (n = 0 is as same as n = 1).\nReturns the new size of the array."), NULL}, {"sign", "sign()", "sign", N_("sign(x)\npositive / negative sign (-1 with x < 0, 1 with x >= 0)"), NULL}, {"sin", "sin()", "sin", N_("sin(x)\nsine function"), NULL}, {"sinh", "sinh()", "sinh", N_("sinh(x)\nhyperbolic sine function"), NULL}, {"size", "size()", "size", N_("size(a)\nnumber of elements of array a"), NULL}, {"sort", "sort()", "sort", N_("sort(a, ignore_case)\nsort elements of array a\nfold lower case to upper case characters when ignore_case is not zero."), NULL}, {"sprintf", "sprintf()", "sprintf", N_("sprintf($str, $format, v1, v2, ...)\nConverts v1, v2, ... to a string according to $format\nand set to $str.\nReturn the length of the string $str in characters."), NULL}, {"sqr", "sqr()", "sqr", N_("sqr(x)\nsquaring"), NULL}, {"sqrt", "sqrt()", "sqrt", N_("sqrt(x)\nsquare root"), NULL}, {"srand", "srand()", "srand", N_("srand(x)\nSets the seed for the random number generator which is used by the rand() function"), NULL}, {"strftime", "strftime()", "strftime", N_("strftime($str, $fmt, t, utc)\nconvers t (the number of seconds elapsed since the Epoch)\naccording to the format specification $fmt\nand places the result in the string $str.\nWhen utc is true, $str is expressed in Coordinated Universal Time (UTC)."), NULL}, {"string", "string()", "string", N_("string($str, value)\nConverts value to a string and set to $str.\nReturn the value."), NULL}, {"string_append", "string_append()", "string_append", N_("string_append($dest, $src)\nAdds the string $src onto the end of the string $dest."), NULL}, {"string_column", "string_column()", "string_column", N_("string_column($dest, index)\nSet indexth column in the reading data-line to the string $dest."), NULL}, {"string_compare", "string_compare()", "string_compare", N_("string_compare($str1, $str2, ignore_case)\nCompare two strings, ignoring the case of ASCII characters when ignore_case is not zero."), NULL}, {"string_down", "string_down()", "string_down", N_("string_down($dest, $src)\nConverts all uppercase ASCII letters to lowercase ASCII letters in the string $src and set to the string $dest."), NULL}, {"string_erase", "string_erase()", "string_erase", N_("string_erase($str, pos, len)\nRemoves len characters from the string $str, starting at position pos."), NULL}, {"string_float", "string_float()", "string_float", N_("string_float($str)\nConverts the string $str to a floating-point value and return the value."), NULL}, {"string_float_array", "string_float_array()", "string_float_array", N_("string_float_array(dest, $ary)\nConverts the string element of the array $ary\nto a floating-point value\nand set them to the array dest."), NULL}, {"string_insert", "string_insert()", "string_insert", N_("string_insert($dest, $src, pos)\nInserts the string $src into the string $dest at the position pos."), NULL}, {"string_join", "string_join()", "string_join", N_("string_join($dest, $sep, $array)\nJoins a number of strings in the array $array\ntogether to form one long string $dest,\nwith the optional separator $sepinserted between each of them."), NULL}, {"string_length", "string_length()", "string_length", N_("string_length($str)\nReturn the length of the string $str in characters."), NULL}, {"string_match", "string_match()", "string_match", N_("string_match($str, $regexp, ignore_case)\nScans for a match in the string $str for the regular expression pattern $regexp.\nReturn non-zero value if the string matched, zero otherwise."), NULL}, {"string_prepend", "string_prepend()", "string_prepend", N_("string_prepend($dest, $src)\nAdds the string $src onto the start of the string $dest."), NULL}, {"string_replace", "string_replace()", "string_replace", N_("string_replace($dest, $src, $regexp, $replacement, ignore_case)\nReplaces all occurrences of the regular expression pattern in $regex with the $replacement text.\nBackreferences of the form '\\number' or '\\g<number>' in the replacement text are interpolated\nby the number-th captured subexpression of the match,\n'\\g<name>' refers to the captured subexpression with the given name.\n'\\0' refers to the complete match,\nbut '\\0' followed by a number is the octal representation of a character.\nLetters in $regex match both upper- and lowercase letters\nwhen ignore_case is not zero."), NULL}, {"string_reverse", "string_reverse()", "string_reverse", N_("string_reverse($dest, $src)\nReverses the UTF-8 string $src and set to the string $dest."), NULL}, {"string_split", "string_split()", "string_split", N_("string_split($dest, $src, $separator, use_regexp)\nSplits the string $src into pieces, using the given $separator.\nEach strings are saved in the array $dest\n$separator is treated as a regular expression\nwhen use_regexp is not 0.\nLetters in $separator match both upper- and lowercase letters\nwhen use_regexp is 2."), NULL}, {"string_split_float", "string_split_float()", "string_split_float", N_("string_split_float(dest, $src, $separator, use_regexp)\nSplits the string $src into pieces, using the given $separator.\nEach strings are converted to float value and saved in the array dest\n$separator is treated as a regular expression\nwhen use_regexp is not 0.\nLetters in $separator match both upper- and lowercase letters\nwhen use_regexp is 2."), NULL}, {"string_strip", "string_strip()", "string_strip", N_("string_strip($str)\nRemoves leading and trailing whitespace from the string $str."), NULL}, {"string_substring", "string_substring()", "string_substring", N_("string_substring($dest, $src, start, end)\nCopies a substring out of a UTF-8 encoded string $src.\nThe substring will contain end - start characters."), NULL}, {"string_truncate", "string_truncate()", "string_truncate", N_("string_truncate($str, len)\nCuts off the end of the string $str, leaving the first len characters."), NULL}, {"string_up", "string_up()", "string_up", N_("string_up($dest, $src)\nConverts all lowercase ASCII letters to uppercase ASCII letters in the string $src and set to the string $dest."), NULL}, {"sum", "sum()", "sum", N_("sum(x)\nIntegration"), NULL}, {"sumsq", "sumsq()", "sumsq", N_("sumsq(a, b, c, ...)\nsquare sum of arguments"), NULL}, {"tan", "tan()", "tan", N_("tan(x)\ntangent function"), NULL}, {"tanh", "tanh()", "tanh", N_("tanh(x)\nhyperbolic tangent function"), NULL}, {"text_align", "text_align()", "text_align", N_("text_align(x, y)\nSet alignment of a text drawing.\nx and y represent alignment of parallel and normal direction respectively.\n(0 <= x, y <= 1)"), NULL}, {"text_font", "text_font()", "text_font", N_("text_font(font)\nSet font setting of drawing texts.\nThe value font 0, 1 and 2 represent \"Sans-serif\", \"Serif\" and \"Monospace\" respectively."), NULL}, {"text_obj_get", "text_obj_get()", "text_obj_get", N_("text_obj_get(id, $text)\nassign text of the the text object which ID is id to the variable $text."), NULL}, {"text_obj_set", "text_obj_set()", "text_obj_set", N_("text_obj_set(id, $text)\nset text of the the text object which ID is id as the variable $text."), NULL}, {"text_size", "text_size()", "text_size", N_("text_size(pt, space, script)\nSet font size and other settings of drawing texts.\nFont size can be specified by pt.\nFont-spacing and script-size are specified by the following arguments."), NULL}, {"text_style", "text_style()", "text_style", N_("text_style(style)\nSet font style settings of drawing texts.\nThe value style 0, 1, 2 and 3 represent \"normal\", \"bold\", \"italic\" and \"bold-italic\" respectively."), NULL}, {"theta", "theta()", "theta", N_("theta(x)\nstaircase function (1 if x >= 0, 0 otherwise)"), NULL}, {"time", "time()", "time", N_("time()\nreturns the time as the number of seconds since the Epoch,\n1970-01-01 00:00:00 +0000 (UTC)"), NULL}, {"times", "times()", "times", N_("times(n, index, ex)\nRepeat ex n times.\nThe loop count can be referred by the variable index."), NULL}, {"tn", "tn()", "tn", N_("tn(n, x)\nChebyshev polynomials"), NULL}, {"unix2mjd", "unix2mjd()", "unix2mjd", N_("unix2mjd(time)\nModified Julian Date\ntime represents the number of seconds elapsed since the Epoch,\n1970-01-01 00:00:00 +0000 (UTC))"), NULL}, {"unless", "unless()", "unless", N_("unless(x, ex1, ex2)\nevaluate ex2 when x != 0, evaluate ex1 otherwise"), NULL}, {"unshift", "unshift()", "unshift", N_("unshift(a, x)\nadds new element x to the beginning of an array a.\nReturns the new size of the array."), NULL}, {"xor", "xor()", "xor", N_("xor(x, y)\nTrue (= 1) when (x != 0) xor (y != 0)"), NULL}, {"yl", "yl()", "yl", N_("yl(l, x)\ncompute the irregular spherical Bessel function of order |l|, yl(|x|)"), NULL}, {"yn", "yn()", "yn", N_("yn(n, x)\ncompute the irregular cylindrical Bessel function of order n, Yn(|x|)"), NULL}, {"ynu", "ynu()", "ynu", N_("ynu(nu, x)\ncompute the irregular cylindrical Bessel function of fractional order |nu|, Ynu(|x|)"), NULL}, {"zeta", "zeta()", "zeta", N_("zeta(s)\ncompute the Riemann zeta function zeta(s) for arbitrary s, s != 1"), NULL}, {"zeta_int", "zeta_int()", "zeta_int", N_("zeta_int(n)\ncompute the Riemann zeta function zeta(n) for integer n, n != 1"), NULL}, {"zetam1", "zetam1()", "zetam1", N_("zetam1(s)\ncompute zeta(s) - 1 for arbitrary s, s != 1"), NULL}, {"zetam1_int", "zetam1_int()", "zetam1_int", N_("zetam1_int(n)\ncompute zeta(n) - 1 for integer n, n != 1"), NULL}, {"zip", "zip()", "zip", N_("zip(a1, a2, item1, item2, ex)\nEvaluate ex for each element of two arrays a1 and a2.\nThe elements of the arrays can be referred by the variable item1 and item2."), NULL}, {"zip_map", "zip_map()", "zip_map", N_("zip_map(dest, src1, src2, item1, item2, ex)\nEvaluate ex for each element of two arrays src1 and sec2\nand set them to the array dest..\nThe elements of the arrays can be referred by the variable item1 and item2."), NULL}, {NULL, NULL, NULL, NULL, NULL} }; struct completion_info completion_info_const[] = { {"%d", "%D", NULL, N_("%D\nThe ID of the instance of the data object"), NULL}, {"%n", "%N", NULL, N_("%N\nThe number of instances of data object"), NULL}, {"arc_obj", "ARC_OBJ", NULL, N_("ARC_OBJ\nThe identification number of the arc object"), NULL}, {"avx", "AVX", NULL, N_("AVX\nThe average of X"), NULL}, {"avy", "AVY", NULL, N_("AVY\nThe average of X"), NULL}, {"axisx", "AXISX", NULL, N_("AXISX\nThe ID of the axis instance specified as X axis"), NULL}, {"axisx_len", "AXISX_LEN", NULL, N_("AXISX_LEN\nLength of the X axis"), NULL}, {"axisx_max", "AXISX_MAX", NULL, N_("AXISX_MAX\nThe maximum value of the X axis"), NULL}, {"axisx_min", "AXISX_MIN", NULL, N_("AXISX_MIN\nThe minimum value of the X axis"), NULL}, {"axisy", "AXISY", NULL, N_("AXISY\nThe ID of the axis instance specified as Y axis"), NULL}, {"axisy_len", "AXISY_LEN", NULL, N_("AXISY_LEN\nLength of the Y axis"), NULL}, {"axisy_max", "AXISY_MAX", NULL, N_("AXISY_MAX\nThe maximum value of the Y axis"), NULL}, {"axisy_min", "AXISY_MIN", NULL, N_("AXISY_MIN\nThe minimum value of the Y axis"), NULL}, {"break", "BREAK", NULL, N_("BREAK\nMissing data (data lines are not combined)"), NULL}, {"colx", "COLX", NULL, N_("COLX\nThe column number specified for X"), NULL}, {"coly", "COLY", NULL, N_("COLY\nThe column number specified for Y"), NULL}, {"cont", "CONT", NULL, N_("CONT\nMissing data (data lines are combined)"), NULL}, {"data_obj", "DATA_OBJ", NULL, N_("DATA_OBJ\nThe identification number of the data object"), NULL}, {"e", "E", NULL, N_("E\nThe base of natural logarithm (Napier's constant)"), NULL}, {"euler", "EULER", NULL, N_("EULER\nEuler's constant"), NULL}, {"false", "FALSE", NULL, N_("FALSE\nthe FALSE value (0)"), NULL}, {"file_obj", "FILE_OBJ", NULL, N_("FILE_OBJ\nThe identification number of the file object"), NULL}, {"fill_rule_even_odd", "FILL_RULE_EVEN_ODD", NULL, N_("FILL_RULE_EVEN_ODD\nDefined for the function draw_polygon().\nfill the polygon with evin-odd rule."), NULL}, {"fill_rule_none", "FILL_RULE_NONE", NULL, N_("FILL_RULE_NONE\nDefined for the function draw_polygon().\ndon't fill the polygon."), NULL}, {"fill_rule_winding", "FILL_RULE_WINDING", NULL, N_("FILL_RULE_WINDING\nDefined for the function draw_polygon().\nfill the polygon with winding rule."), NULL}, {"first", "FIRST", NULL, N_("FIRST\nWhen conversion is performed twice with one line of data such as diagonal or errorbar plot,\ntrue (1) in the first call, false (0) in the second call."), NULL}, {"fline", "FLINE", NULL, N_("FLINE\nNumber of lines specified as \"Final line\""), NULL}, {"hskip", "HSKIP", NULL, N_("HSKIP\nNumber of lines specified as \"Head skip\""), NULL}, {"mark_obj", "MARK_OBJ", NULL, N_("MARK_OBJ\nThe identification number of the mark object"), NULL}, {"mask", "MASK", NULL, N_("MASK\nNumber of lines set for mask"), NULL}, {"maxx", "MAXX", NULL, N_("MAXX\nThe maximum value of X"), NULL}, {"maxy", "MAXY", NULL, N_("MAXY\nThe maximum value of Y"), NULL}, {"minx", "MINX", NULL, N_("MINX\nThe minimum value of X"), NULL}, {"miny", "MINY", NULL, N_("MINY\nThe minimum value of Y"), NULL}, {"move", "MOVE", NULL, N_("MOVE\nNumber of lines set for move"), NULL}, {"nan", "NAN", NULL, N_("NAN\nMissing data with error indication"), NULL}, {"num", "NUM", NULL, N_("NUM\nThe number of the data"), NULL}, {"path_obj", "PATH_OBJ", NULL, N_("PATH_OBJ\nThe identification number of the path object"), NULL}, {"pi", "PI", NULL, N_("PI\nPi"), NULL}, {"rect_obj", "RECT_OBJ", NULL, N_("RECT_OBJ\nThe identification number of the rectangle object"), NULL}, {"rstep", "RSTEP", NULL, N_("RSTEP\nNumber of lines specified as \"Read step\""), NULL}, {"stdevpx", "STDEVPX", NULL, N_("STDEVPX\nThe standard deviation of X"), NULL}, {"stdevpy", "STDEVPY", NULL, N_("STDEVPY\nThe standard deviation of Y"), NULL}, {"stdevx", "STDEVX", NULL, N_("STDEVX\nThe corrected sample standard deviation of X"), NULL}, {"stdevy", "STDEVY", NULL, N_("STDEVY\nThe corrected sample standard deviation of Y"), NULL}, {"sumx", "SUMX", NULL, N_("SUMX\nSum of X"), NULL}, {"sumxx", "SUMXX", NULL, N_("SUMXX\nSquare sum of X"), NULL}, {"sumxy", "SUMXY", NULL, N_("SUMXY\nProduct sum of X and Y"), NULL}, {"sumy", "SUMY", NULL, N_("SUMY\nSum of Y"), NULL}, {"sumyy", "SUMYY", NULL, N_("SUMYY\nSquare sum of Y"), NULL}, {"text_obj", "TEXT_OBJ", NULL, N_("TEXT_OBJ\nThe identification number of the text object"), NULL}, {"true", "TRUE", NULL, N_("TRUE\nthe TRUE value (1)"), NULL}, {"undef", "UNDEF", NULL, N_("UNDEF\nMissing data without error indication"), NULL}, {NULL, NULL, NULL, NULL, NULL} }; ngraph-gtk-6.09.05/src/gtk/completion_info_functions.txt0000644000175000017500000005457114106124273020263 00000000000000abs(x) compute the absolute value of x sign(x) positive / negative sign (-1 with x < 0, 1 with x >= 0) int(x) round to integer, toward zero gauss(x) largest integral value not greater than x frac(x) remainder round(x, digit) round the number x, away from zero.\ndigit is the number of digits to which you want to round x. min(a, b, c, ...) The smallest value of arguments max(a, b, c, ...) The largest value of arguments sumsq(a, b, c, ...) square sum of arguments sqr(x) squaring sqrt(x) square root exp(x) base-e exponential function (x <= 690) expm1(x) exp(x)-1.\nThe result is computed in a way that is accurate\neven if the value of x is near zero. ln(x) natural logarithmic function ln1p(x) ln(1+x).\nThe result is computed in a way that is accurate\neven if the value of x is near zero. log(x) base-10 logarithmic function log1p(x) log(1+x).\nThe result is computed in a way that is accurate\neven if the value of x is near zero. sin(x) sine function cos(x) cosine function tan(x) tangent function asin(x) arc sine function acos(x) arc cosine function atan(x) arc tangent function sinh(x) hyperbolic sine function cosh(x) hyperbolic cosine function tanh(x) hyperbolic tangent function asinh(x) inverse hyperbolic sine function acosh(x) inverse hyperbolic cosine function atanh(x) inverse hyperbolic tangent function fmod(x, y) compute the floating-point remainder of dividing x by y rand(x) returns a random value equally distributed over the range [0..x) srand(x) Sets the seed for the random number generator which is used by the rand() function theta(x) staircase function (1 if x >= 0, 0 otherwise) delta(x) Kronecker delta (1 when x = 0, 0 otherwise) gamma(x) gamma function icgam(m, x) incomplete gamma function erf(x) error function erf(x) erfc(x) complementary error function erfc(x) qinv(x) inverse complementary error function ei(x) compute the exponential integral Ei(x) beta(x, y) beta function icbeta(a, b, x) incomplete beta function jn(n, x) compute the regular cylindrical Bessel function of order n, Jn(|x|) yn(n, x) compute the irregular cylindrical Bessel function of order n, Yn(|x|) in(n, x) compute the regular modified cylindrical Bessel function of order |n|, In(|x|) kn(n, x) compute the irregular modified cylindrical Bessel function of order |n|, Kn(|x|) jl(l, x) compute the regular spherical Bessel function of order |l|, jl(|x|) yl(l, x) compute the irregular spherical Bessel function of order |l|, yl(|x|) jnu(nu, x) compute the regular cylindrical Bessel function of fractional order |nu|, Jnu(|x|) ynu(nu, x) compute the irregular cylindrical Bessel function of fractional order |nu|, Ynu(|x|) inu(nu, x) compute the regular modified Bessel function of fractional order |nu|, Inu(|x|) knu(nu, x) compute the irregular modified Bessel function of fractional order |nu|, Knu(|x|) pn(l, x) evaluate the Legendre polynomial Pl(x) for a specific value of l, x subject to l >= 0, |x| <= 1 lgn(n, a, x) evaluate the generalized Laguerre polynomials Lan(x) for a > -1, n >= 0 hn(n, x) Hermite polynomials tn(n, x) Chebyshev polynomials zeta(s) compute the Riemann zeta function zeta(s) for arbitrary s, s != 1 zeta_int(n) compute the Riemann zeta function zeta(n) for integer n, n != 1 zetam1(s) compute zeta(s) - 1 for arbitrary s, s != 1 zetam1_int(n) compute zeta(n) - 1 for integer n, n != 1 choose(n, m) the combinatorial factor n choose m: n!/(m!(n-m)!) mjd(year, month, day, hour, min, sec) Modified Julian Date (date and time are given in UTC) unix2mjd(time) Modified Julian Date\ntime represents the number of seconds elapsed since the Epoch,\n1970-01-01 00:00:00 +0000 (UTC)) mjd2unix(mjd) time represents the number of seconds elapsed since the Epoch at mjd mjd2year(mjd) year of Gregorian calendar corresponding to Modified Julian Day mjd mjd2month(mjd) month of Gregorian calendar corresponding to Modified Julian Day mjd mjd2day(mjd) Gregorian calendar day corresponding to Modified Julian Day mjd mjd2wday(mjd) The day of the week as a decimal range 1 to 7, Monday being 1 corresponding to mjd mjd2yday(mjd) The day of the year as a decimal number (range 001 to 366) corresponding to mjd time() returns the time as the number of seconds since the Epoch,\n1970-01-01 00:00:00 +0000 (UTC) eq(x, y, prec) True (= 1) when x == y.\nThe number of digits of comparison can be specified with prec\n(prec == 0 is exact match). neq(x, y, prec) True (= 1) when x != y.\nThe number of digits of comparison can be specified with prec\n(prec == 0 is exact match). ge(x, y, prec) True (= 1) when x >= y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits). gt(x, y, prec) True (= 1) when x > y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits). le(x, y, prec) True (= 1) when x <= y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits). lt(x, y, prec) True (= 1) when x < y.\nThe precision allows you to specify the number of digits for comparison\n(prec == 0 does not specify the number of digits). not(x) True (= 1) when x == 0 or(x, y) True (= 1) when (x != 0) or (y != 0) and(x, y) True (= 1) when (x != 0) and (y != 0) xor(x, y) True (= 1) when (x != 0) xor (y != 0) size(a) number of elements of array a sort(a, ignore_case) sort elements of array a\nfold lower case to upper case characters when ignore_case is not zero. rsort(a, ignore_case) reverse sort elements of array a\nfold lower case to upper case characters when ignore_case is not zero. pop(a ,n) remove the last n elements of array a (n = 0 is as same as n = 1).\nReturns the new size of the array. push(a, x) adds new element x to the end of an array a.\nReturns the new size of the array. shift(a, n) remove the first n elements of array a (n = 0 is as same as n = 1).\nReturns the new size of the array. unshift(a, x) adds new element x to the beginning of an array a.\nReturns the new size of the array. array(a, v1, v2, ...) initialize an array a with the rest arguments\nreturn the number of elements of the array array_sum(a) returns the sum of the elements of array a array_sumsq(a) returns the square sum of the elements of array a array_average(a) return the average of the elements of array a array_stdevp(a) return the standard deviation of the elements of array a array_stdev(a) return the corrected sample standard deviation of the elements of array a array_max(a) returns the maximum value contained in array a array_min(a) returns the minimum value contained in array a array_clear(a) set the number of elements of the array a to 0 array_compact(a) Remove non-numeric values from the elements of the array of array a\nand return the number of elements after removal array_copy(dest, src) copy the contents of the array src to the array dest.\n(return the number of copied elements) m(i, x) assigns x to the i-th memory (i = 0 to 65535)\nthe index from the tail when i is negative\n(return x) rm(i) the value of the current i-th memory (i = 0 to 65535),\nthe index from the tail when i is negative cm(x, n) initialize n memories from the beginning with x\ninitialize whole memory when n is 0\nand n memories from the end when x is negative\n(return x) am(a) copy the contents of the array a to the memory\n(return the number of copied elements) draw_rect(x, y, w, h, stroke, fill) draw a rectangle with (x, y) and (x + w, y + h) as diagonal vertices.\nWhen stroke and fill are 0, do not draw contours and fills respectively. draw_arc(x, y, rx, ry, start, arc, pieslice, stroke, fill, close) draw an arc with the X direction radius rx and the Y direction radius ry centered on (x, y).\nstart and arc specify start angle and arc angle respectively.\nWhen stroke and fill are 0, do not draw contours and fills respectively.\nIf pieslice is not 0, draw a sector.\nIf close is not 0, close the outline. draw_mark(x, y, size) draw a mark on (x, y). \nThe size of a mark can be specified with size.\nWhen size is 0, specification of the file object is used. draw_line(x1, y1, x2, y2, arrow, size) draw a line form (x1, y1) to (x2, y2).\nWhen arrow is 1, 2 or 3, draw arrow end, begin and both side of the line respectively.\nThe size of a arrow can be specified with size.\nWhen size is 0, specification of the file object is used. draw_polyline(ax, ay) connect coordinates (ax[0], ay[0]), (ax[1], ay[1]), ... by polyline. draw_polygon(ax, ay, stroke, fill) draw polygon defined by coordinates (ax[0], ay[0]), (ax[1], ay[1]), ....\nwhen stroke is 0, do not draw contours.\nfill can be specified with one of\nFILL_RULE_NONE, FILL_RULE_EVEN_ODD or FILL_RULE_WINDING. draw_errorbar(x, y, erx, ery, size) draw errorbars from (x - erx, y) to (x + erx, y) and\nfrom (x, y - ery) to (x, y + ery).\nThe length of ticks can be specified with size.\nWhen size is 0, specification of the file object is used. draw_errorbar2(x1, y1, x2, y2, size) draw an errorbar from (x1, y1) to (x2, y2).\nThe length of ticks can be specified with size.\nWhen size is 0, specification of the file object is used. fit_prm(id, x) When the plot type of the data object whose ID is id is fit,\nthe value of the field "%0x" of the corresponding fit object. fit_calc(id, x) When the plot type of the data object whose ID is id is fit,\nthe corresponding fit result f(x) is calculated. line_number() File line number being processed (1st line is 1) isnormal(x) True if x is a normal number isbreak(x) True if x is BREAK iscont(x) True if x is CONT isnan(x) True if x is NAN isundef(x) True if x is UNDEF sum(x) Integration dif(x) Difference color(i, x) i = 0: Set the R value to x (0 <= x < 256)\ni = 1: Set the G value to x (0 <= x < 256)\ni = 2: Set the B value to x (0 <= x < 256)\ni = 3: Set the R, G and B values to x (0 <= x < 256)\ni = 4: Set the R2 value to x (0 <= x < 256)\ni = 5: Set the G2 value to x (0 <= x < 256)\ni = 6: Set the B2 value to x (0 <= x < 256)\ni = 7: Set the R2, G2 and B2 values to x (0 <= x < 256)\ni = 8: Set the R, G and B values to be hexadecimal color of x\ni = 9: Set the R2, G2 and B2 values to be hexadecimal color of x obj_color(id, obj) Set the R, G, B, R2, G2 and B2 values to the same value as the instance of obj whose ID is id.\nobj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ or TEXT_OBJ. alpha(x, i) Set A (i == 1) or A2 (i == 2) values to x (0 <= x < 256)\nwhen i == 0, set A and A2 values to x obj_alpha(id, obj) Set the A and A2 value to the same value as the instance of obj whose ID is id.\nobj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ or TEXT_OBJ. rgb(r, g, b) Set the R, G and B values of the color to r, g, b (0 <= r, g, b <= 1) rgb2(r, g, b) Set the R2, G2 and B2 values of the color to r, g, b (0 <= r, g, b <= 1) hsb(h, s, b) Set the R, G and B values of the color to h, s, b (0 <= h, s, b <=1) from the HSB value hsb2(h, s, b) Set the R2, G2 and B2 values of the color to h, s, b (0 <= h, s, b <=1) from the HSB value marksize(x) Set mark size to x marktype(x) Set mark type to x if(x, ex1, ex2) evaluate ex1 when x != 0, evaluate ex2 otherwise unless(x, ex1, ex2) evaluate ex2 when x != 0, evaluate ex1 otherwise for(m, begin, end, step, ex) Set the value in step from begin to end to the m-th memory and repeat ex.\nWhen m is negative, no setting to memory is done.\nReturns the value of ex evaluated last. prog1(arg1, arg2, ...) Evaluate the arguments and return the evaluated value of the first argument prog2(arg1, arg2, ...) Evaluate the arguments and return the evaluated value of the second argument progn(arg1, arg2, ...) Evaluate the arguments and return the evaluated value of the last argument string($str, value) Converts value to a string and set to $str.\nReturn the value. puts($str) Show $str in the information window.\nReturn the length of the string $str in characters. printf($format, v1, v2, ...) Converts v1, v2, ... to a string according to $format\nand show in the information window.\nReturn the length of the string $str in characters. sprintf($str, $format, v1, v2, ...) Converts v1, v2, ... to a string according to $format\nand set to $str.\nReturn the length of the string $str in characters. string_float($str) Converts the string $str to a floating-point value and return the value. string_float_array(dest, $ary) Converts the string element of the array $ary\nto a floating-point value\nand set them to the array dest. string_length($str) Return the length of the string $str in characters. string_up($dest, $src) Converts all lowercase ASCII letters to uppercase ASCII letters in the string $src and set to the string $dest. string_down($dest, $src) Converts all uppercase ASCII letters to lowercase ASCII letters in the string $src and set to the string $dest. string_strip($str) Removes leading and trailing whitespace from the string $str. string_append($dest, $src) Adds the string $src onto the end of the string $dest. string_prepend($dest, $src) Adds the string $src onto the start of the string $dest. string_insert($dest, $src, pos) Inserts the string $src into the string $dest at the position pos. string_join($dest, $sep, $array) Joins a number of strings in the array $array\ntogether to form one long string $dest,\nwith the optional separator $sepinserted between each of them. string_reverse($dest, $src) Reverses the UTF-8 string $src and set to the string $dest. string_compare($str1, $str2, ignore_case) Compare two strings, ignoring the case of ASCII characters when ignore_case is not zero. string_match($str, $regexp, ignore_case) Scans for a match in the string $str for the regular expression pattern $regexp.\nReturn non-zero value if the string matched, zero otherwise. string_truncate($str, len) Cuts off the end of the string $str, leaving the first len characters. string_erase($str, pos, len) Removes len characters from the string $str, starting at position pos. string_substring($dest, $src, start, end) Copies a substring out of a UTF-8 encoded string $src.\nThe substring will contain end - start characters. string_split($dest, $src, $separator, use_regexp) Splits the string $src into pieces, using the given $separator.\nEach strings are saved in the array $dest\n$separator is treated as a regular expression\nwhen use_regexp is not 0.\nLetters in $separator match both upper- and lowercase letters\nwhen use_regexp is 2. string_split_float(dest, $src, $separator, use_regexp) Splits the string $src into pieces, using the given $separator.\nEach strings are converted to float value and saved in the array dest\n$separator is treated as a regular expression\nwhen use_regexp is not 0.\nLetters in $separator match both upper- and lowercase letters\nwhen use_regexp is 2. string_replace($dest, $src, $regexp, $replacement, ignore_case) Replaces all occurrences of the regular expression pattern in $regex with the $replacement text.\nBackreferences of the form '\\number' or '\\g<number>' in the replacement text are interpolated\nby the number-th captured subexpression of the match,\n'\\g<name>' refers to the captured subexpression with the given name.\n'\\0' refers to the complete match,\nbut '\\0' followed by a number is the octal representation of a character.\nLetters in $regex match both upper- and lowercase letters\nwhen ignore_case is not zero. string_column($dest, index) Set indexth column in the reading data-line to the string $dest. draw_text($str, x, y, dir) Draw the string $str at (x, y).\nDirection is specified by dir. draw_text_raw($str, x, y, dir) Draw the raw string $str at (x, y).\nDirection is specified by dir. getobj($obj, $field, id) Return the value of the $field of the $obj object which ID is id.\nThe field type must be int, bool, enum or double. getobj_string($str, $obj, $field, id) Set the value of the $field of the $obj object which ID is id to the variable $str.\nThe field type must be char*.\nReturn the length of the string $str in characters. getobj_array(array, $obj, $field, id) Set values of the $field of the $obj object which ID is id to the array array.\nThe field type must be char*[], double[] or int[].\nRetuern the number of elements saved to the array. map(dest, src, item, ex) Evaluate ex for each element of the array src\nand set them to the array dest.\nThe element of the array can be referred by the variable item. reduce(a, item, result, ex) Evaluate ex for each element of the array a\nand return last evaluated value of ex.\nThe element of the array and the result of previous evaluation\ncan be referred by the variable item and result. each(a, item, ex) Evaluate ex for each element of the array a.\nThe element of the array can be referred by the variable item. each_with_index(a, item, index, ex) Evaluate ex for each element of the array a.\nThe element of the array and the loop count can be referred\nby the variable item and index respectively. zip(a1, a2, item1, item2, ex) Evaluate ex for each element of two arrays a1 and a2.\nThe elements of the arrays can be referred by the variable item1 and item2. zip_map(dest, src1, src2, item1, item2, ex) Evaluate ex for each element of two arrays src1 and sec2\nand set them to the array dest..\nThe elements of the arrays can be referred by the variable item1 and item2. filter(dest, src, item, ex) Find elements in the array src\nthat satisfies that the evaluated value of ex is true\nand set them to the array dest.\nAn element of the array src can be referred by the variable item. find(a, item, ex) Returns the value of the first element in the array a\nthat satisfies that the evaluated value of ex is true.\nAn element of the array can be referred by the variable item. index(a, item, ex) Returns the first index at which a given element in the array a\nthat satisfies that the evaluated value of ex is true.\nAn element of the array can be referred by the variable item. times(n, index, ex) Repeat ex n times.\nThe loop count can be referred by the variable index. text_align(x, y) Set alignment of a text drawing.\nx and y represent alignment of parallel and normal direction respectively.\n(0 <= x, y <= 1) text_font(font) Set font setting of drawing texts.\nThe value font 0, 1 and 2 represent "Sans-serif", "Serif" and "Monospace" respectively. text_style(style) Set font style settings of drawing texts.\nThe value style 0, 1, 2 and 3 represent "normal", "bold", "italic" and "bold-italic" respectively. text_size(pt, space, script) Set font size and other settings of drawing texts.\nFont size can be specified by pt.\nFont-spacing and script-size are specified by the following arguments. text_obj_get(id, $text) assign text of the the text object which ID is id to the variable $text. text_obj_set(id, $text) set text of the the text object which ID is id as the variable $text. array_moving_average(dest, src, n, type) calculate moving average of (n * 2 + 1) sample of the array src\nand set them to the array dest.\nWeighted moving average is used when type is 1. on_end(proc) Evaluate proc at the end of plottong the data object. parameter(id) Returns the value of the prameter object which ID is id. mtime() returns last modification time of the file. strftime($str, $fmt, t, utc) convers t (the number of seconds elapsed since the Epoch)\naccording to the format specification $fmt\nand places the result in the string $str.\nWhen utc is true, $str is expressed in Coordinated Universal Time (UTC). filename($str, basename) Assign filename of the the data object to the variable $str.\nAny leading directory components are removed when basename is not zero.\nReturn the length of the string $str in characters. ngraph-gtk-6.09.05/src/ogra.c0000644000175000017500000003155414113106102012536 00000000000000/* * $Id: ogra.c,v 1.11 2009-11-16 09:13:04 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "object.h" #include "ioutil.h" #include "ogra.h" #include "ogra_error.h" #include "gra.h" #include "nstring.h" #define NAME "gra" #define PARENT "object" #define OVERSION "1.00.00" static char *GRAerrorlist[]={ "unable to open device", "device is busy", "device is already opened", "no instance for output device", "illegal graphics context", "gra is now opened.", "gra is closed.", }; #define ERRNUM (sizeof(GRAerrorlist) / sizeof(*GRAerrorlist)) char *gra_decimalsign_char[]={ N_("period"), N_("comma"), NULL }; static enum GRA_DECIMALSIGN_TYPE DefaultDecimalsign = GRA_DECIMALSIGN_TYPE_PERIOD; static void set_progress_val(int i, int n, const char *name); static int oGRAclose(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv); void gra_set_default_decimalsign(enum GRA_DECIMALSIGN_TYPE decimalsign) { DefaultDecimalsign = decimalsign; } static int oGRAinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC,width,height,zoom, decimalsign; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; GC=-1; width=21000; height=29700; zoom=10000; decimalsign = DefaultDecimalsign; if (_putobj(obj,"open",inst,&GC)) return 1; if (_putobj(obj,"GC",inst,&GC)) return 1; if (_putobj(obj,"zoom",inst,&zoom)) return 1; if (_putobj(obj,"paper_width",inst,&width)) return 1; if (_putobj(obj,"paper_height",inst,&height)) return 1; if (_putobj(obj, "decimalsign", inst, &decimalsign)) return 1; return 0; } static int oGRAdisconnect(struct objlist *obj,void *inst,int clear) { struct objlist *dobj; struct narray *sarray; N_VALUE *dinst; char *device,*dfield,*gfield; int oid,did,gid; _getobj(obj,"oid",inst,&oid); _getobj(obj,"_device",inst,&device); _putobj(obj,"_device",inst,NULL); if (device == NULL) { return 0; } if (((dobj=getobjlist(device,&did,&dfield,NULL))!=NULL) && ((dinst=chkobjinstoid(dobj,did))!=NULL)) { if ((!chkobjfield(dobj,"_list")) && (!_getobj(dobj,"_list",dinst,&sarray)) && (sarray!=NULL)) { struct objlist *gobj; char *list; list=arraynget_str(sarray,0); if (((gobj=getobjlist(list,&gid,&gfield,NULL))!=NULL) && (gobj==obj) && (gid==oid) && (strcmp(gfield,"open")==0)) { arrayfree2(sarray); _putobj(dobj,"_list",dinst,NULL); _exeobj(dobj,"disconnect",dinst,0,NULL); if (clear) _exeobj(dobj,"disconnect",dinst,0,NULL); } } } g_free(device); return 0; } static int oGRAdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; _getobj(obj,"GC",inst,&GC); GRAclose(GC); if (oGRAdisconnect(obj,inst,FALSE)) return 1; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int oGRAputdevice(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { int GC; _getobj(obj,"GC",inst,&GC); if (GC!=-1) { error(obj,ERRGRABUSY); return 1; } if (oGRAdisconnect(obj,inst,FALSE)) return 1; return 0; } static int close_gc(struct objlist *obj, N_VALUE *inst, int GC) { GRAclose(GC); GC = -1; if (_putobj(obj, "GC", inst, &GC)) { return 1; } return 0; } static int oGRAopen(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray iarray; int GC, r; char *device,*dev,*gfield; struct objlist *dobj,*robj; N_VALUE *dinst; void *local; int oid,gid; int topm,leftm,width,height,zoom; _getobj(obj,"device",inst,&device); _getobj(obj,"GC",inst,&GC); if (GC!=-1) { error2(obj,ERRALOPEN,device); return 1; } _getobj(obj,"left_margin",inst,&leftm); _getobj(obj,"top_margin",inst,&topm); _getobj(obj,"zoom",inst,&zoom); _getobj(obj,"paper_width",inst,&width); _getobj(obj,"paper_height",inst,&height); if (device==NULL) { GC=GRAopen(NULL,NULL,NULL,NULL,-1,-1,-1,-1,NULL,NULL); if (GC<0) { error2(obj,ERROPEN,device); return 1; } } else { int anum,id; struct narray **list; int output, charheight, chardescent, strwidth; arrayinit(&iarray,sizeof(int)); if (getobjilist(device,&dobj,&iarray,FALSE,NULL)) return 1; anum=arraynum(&iarray); if (anum<1) { arraydel(&iarray); error2(obj,ERRNODEVICE,device); return 1; } id=arraylast_int(&iarray); arraydel(&iarray); /* check target device */ dinst = getobjinst(dobj, id); if (dinst == NULL) { return 1; } robj = NULL; if (!chkobjfield(dobj,"_output")) { if ((output=getobjtblpos(dobj,"_output",&robj))==-1) return 1; } else output=-1; if (!chkobjfield(dobj,"_strwidth")) { if ((strwidth=getobjtblpos(dobj,"_strwidth",&robj))==-1) return 1; } else strwidth=-1; if (!chkobjfield(dobj,"_charascent")) { if ((charheight=getobjtblpos(dobj,"_charascent",&robj))==-1) return 1; } else charheight=-1; if (!chkobjfield(dobj,"_chardescent")) { if ((chardescent=getobjtblpos(dobj,"_chardescent",&robj))==-1) return 1; } else chardescent=-1; if (robj == NULL) { error2(obj, ERROPEN, device); return -1; } if (!chkobjfield(dobj,"_list")) { int offset; offset = getobjoffset(dobj, "_list"); if (offset == -1) { return 1; } list = &dinst[offset].array; } else { list = NULL; } if (!chkobjfield(dobj,"_local")) { if (_getobj(dobj,"_local",dinst,&local)) return 1; } else local=NULL; GC=GRAopen(chkobjectname(dobj),"_output", robj,dinst,output,strwidth,charheight,chardescent,list,local); if (GC==-2) { error2(obj,ERRBUSY,device); return 1; } else if (GC<0) { error2(obj,ERROPEN,device); return 1; } /* clear gra connected to target device */ if ((list!=NULL) && (*list!=NULL) && (arraynum(*list)!=0)) { struct objlist *gobj; N_VALUE *ginst; if (((gobj=getobjlist(arraynget_str(*list,0),&gid,&gfield,NULL))!=NULL) && ((ginst=chkobjinstoid(gobj,gid))!=NULL) && (!_getobj(gobj,"_device",ginst,&dev))) { if (oGRAdisconnect(gobj,ginst,TRUE)) return 1; } } if (oGRAdisconnect(obj,inst,FALSE)) return 1; if (!_getobj(dobj,"oid",dinst,&oid)) { if ((dev=mkobjlist(dobj,NULL,oid,"_output",TRUE))!=NULL) if (_putobj(obj,"_device",inst,dev)) { g_free(dev); return 1; } } } rval->i=GC; if (_putobj(obj,"GC",inst,&GC)) return 1; r = GRAinit(GC,leftm,topm,width,height,zoom); if (r) { error2(obj,ERROPEN,device); close_gc(obj, inst, GC); return r; } GRAaddlist(GC,obj,inst,(char *)argv[0],(char *)argv[1]); return 0; } static int oGRAclose(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; _getobj(obj,"GC",inst,&GC); GRAend(GC); return close_gc(obj, inst, GC); } static void set_gra_decimalsign(struct objlist *obj, N_VALUE *inst) { enum GRA_DECIMALSIGN_TYPE decimalsign; _getobj(obj, "decimalsign", inst, &decimalsign); switch (decimalsign) { case GRA_DECIMALSIGN_TYPE_PERIOD: set_decimalsign(DECIMALSIGN_TYPE_PERIOD); break; case GRA_DECIMALSIGN_TYPE_COMMA: set_decimalsign(DECIMALSIGN_TYPE_COMMA); break; } } static int oGRAredraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct objlist *dobj; N_VALUE *dinst; char *device,*dfield,*field; int oid,did; field=(char *)(argv[1]); _getobj(obj,"oid",inst,&oid); _getobj(obj,"_device",inst,&device); if (device == NULL) { return 0; } set_gra_decimalsign(obj, inst); if (((dobj=getobjlist(device,&did,&dfield,NULL))!=NULL) && ((dinst=chkobjinstoid(dobj,did))!=NULL)) { if (chkobjfield(dobj,field)==0) _exeobj(dobj,field,dinst,0,NULL); } return 0; } static int oGRAclear(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; struct objlist *dobj; N_VALUE *dinst; char *device,*dfield,*field; int oid,did; field=(char *)(argv[1]); _getobj(obj,"GC",inst,&GC); if (GC!=-1) GRAreopen(GC); _getobj(obj,"oid",inst,&oid); _getobj(obj,"_device",inst,&device); if (device == NULL) { return 0; } if (((dobj=getobjlist(device,&did,&dfield,NULL))!=NULL) && ((dinst=chkobjinstoid(dobj,did))!=NULL)) { if (chkobjfield(dobj,field)==0) _exeobj(dobj,field,dinst,0,NULL); } return 0; } static int oGRAputtopm(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; char *arg; _getobj(obj,"GC",inst,&GC); if (GC!=-1) { error(obj,ERRGRABUSY); return 1; } arg=argv[1]; if (arg[0]=='p') { if ((*(int *)(argv[2]))<=0) *(int *)(argv[2])=1; } else if (arg[0]=='z') { if ((*(int *)(argv[2]))<=0) *(int *)(argv[2])=1; } if (oGRAdisconnect(obj,inst,FALSE)) return 1; return 0; } static int oGRAdrawparent(struct objlist *parent, char **oGRAargv, int layer) { struct objlist *ocur; int i,instnum; const char *objname; ocur=chkobjroot(); while (ocur!=NULL) { if (chkobjparent(ocur)==parent) { instnum = chkobjlastinst(ocur); if (instnum != -1) { objname = chkobjectname(ocur); if (layer) { GRAlayer(*((int *) oGRAargv[0]), objname); } for (i=0;i<=instnum;i++) { set_progress_val(i, instnum, objname); if (ninterrupt()) return FALSE; exeobj(ocur,"draw",i,1,oGRAargv); } } if (!oGRAdrawparent(ocur, oGRAargv, layer)) return FALSE; } ocur=ocur->next; } return TRUE; } static int oGRAdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC, layer; struct objlist *draw; struct narray *array; char *oGRAargv[2]; _getobj(obj,"GC",inst,&GC); if (GC==-1) { error(obj,ERRGRACLOSE); return 1; } set_gra_decimalsign(obj, inst); layer = GRAlayer_support(GC); _getobj(obj,"draw_obj",inst,&array); oGRAargv[0]=(char *)&GC; oGRAargv[1]=NULL; if (array==NULL) { if ((draw=getobject("draw"))==NULL) return 1; oGRAdrawparent(draw, oGRAargv, layer); } else { char **drawrable; const char *objname; int j,i,anum,instnum; anum=arraynum(array); drawrable=arraydata(array); for (j=0;j #include #include #include "mathfn.h" #include "object.h" #include "oiarray.h" #include "math/math_equation.h" #define NAME "iarray" #define PARENT "object" #define OVERSION "1.00.00" #define ERRILNAME 100 #define ERROUTBOUND 101 static char *iarrayerrorlist[]={ "", "array index is out of array bounds.", }; #define ERRNUM (sizeof(iarrayerrorlist) / sizeof(*iarrayerrorlist)) static int iarrayinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int iarraydone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } int oarray_get_index(struct narray *array, int i) { if (i < 0) { i += arraynum(array); } return i; } static int iarrayget(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num,*po; num=*(int *)argv[2]; _getobj(obj,"@",inst,&array); num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } po=(int *)arraynget(array,num); if (po==NULL) { error(obj, ERROUTBOUND); return 1; } rval->i=*po; return 0; } static int iarrayput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; int val; num=*(int *)argv[2]; val=*(int *)argv[3]; _getobj(obj,"@",inst,&array); num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayput(array,&val,num)==NULL) return 1; return 0; } struct narray * oarray_get_array(struct objlist *obj, N_VALUE *inst, unsigned int size) { struct narray *array; _getobj(obj, "@", inst, &array); if (array == NULL) { array = arraynew(size); if (array == NULL) { return NULL; } if (_putobj(obj, "@", inst, array)) { arrayfree(array); return NULL; } } return array; } static int iarrayadd(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int val; val=*(int *)argv[2]; array = oarray_get_array(obj, inst, sizeof(int)); if (array==NULL) { return 1; } if (arrayadd(array,&val)==NULL) return 1; return 0; } static int iarraypop(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int val, n; rval->i = 0; _getobj(obj,"@",inst,&array); if (array == NULL) { return 1; } n = arraynum(array) - 1; if (n < 0) { return 1; } val = arraynget_int(array, n); if (arrayndel(array, n) == NULL) { return 1; } if (arraynum(array) == 0) { arrayfree(array); if (_putobj(obj, "@", inst, NULL)) { return 1; } } rval->i = val; return 0; } static int iarrayins(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; int val; num=*(int *)argv[2]; val=*(int *)argv[3]; array = oarray_get_array(obj, inst, sizeof(int)); if (array == NULL) { return 1; } num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayins(array, &val, num)==NULL) { return 1; } return 0; } static int iarrayunshift(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int val; val = * (int *) argv[2]; array = oarray_get_array(obj, inst, sizeof(int)); if (array == NULL) { return 1; } if (arrayins(array, &val, 0)==NULL) { return 1; } return 0; } static int iarrayshift(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int val; rval->i = 0; _getobj(obj,"@",inst,&array); if (array == NULL) { return 1; } val = arraynget_int(array, 0); if (arrayndel(array, 0) == NULL) { return 1; } if (arraynum(array) == 0) { arrayfree(array); if (_putobj(obj, "@", inst, NULL)) { return 1; } } rval->i = val; return 0; } static int iarraydel(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; int num; num=*(int *)argv[2]; _getobj(obj,"@",inst,&array); if (array==NULL) return 1; num = oarray_get_index(array, num); if (num < 0) { error(obj, ERROUTBOUND); return 1; } if (arrayndel(array,num)==NULL) { error(obj, ERROUTBOUND); return 1; } if (arraynum(array)==0) { arrayfree(array); if (_putobj(obj,"@",inst,NULL)) return 1; } return 0; } int oarray_num(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); rval->i = arraynum(array); return 0; } int oarray_seq(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; GString *str; int i, n; g_free(rval->str); rval->str = NULL; if (_getobj(obj, "@", inst, &array)) { return 1; } n = arraynum(array); if (n == 0) { return 0; } str = g_string_sized_new(64); if (str == NULL) { return 0; } for (i = 0; i < n; i++) { g_string_append_printf(str, "%d%s", i, (i == n - 1) ? "" : " "); } rval->str = g_string_free(str, FALSE); return 0; } int oarray_reverse_seq(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; GString *str; int i, n; g_free(rval->str); rval->str = NULL; if (_getobj(obj, "@", inst, &array)) { return 1; } n = arraynum(array); if (n == 0) { return 0; } str = g_string_sized_new(64); if (str == NULL) { return 0; } for (i = 0; i < n; i++) { g_string_append_printf(str, "%d%s", n - i - 1, (i == n - 1) ? "" : " "); } rval->str = g_string_free(str, FALSE); return 0; } static int iarraysort(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arraysort_int(array); return 0; } static int iarrayrsort(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arrayrsort_int(array); return 0; } static int iarrayuniq(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc, char **argv) { struct narray *array; _getobj(obj, "@", inst, &array); arrayuniq_int(array); return 0; } static int iarrayjoin(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; GString *str; int i, n; char *sep, *ptr; g_free(rval->str); rval->str = NULL; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } ptr = (char *) argv[2]; if (ptr) { sep = g_strcompress(ptr); } else { sep = g_strdup(","); } if (sep == NULL) { return 1; } str = g_string_sized_new(64); if (str == NULL) { g_free(sep); return 1; } for (i = 0; i < n; i++) { int val; val = arraynget_int(array, i); g_string_append_printf(str, "%d%s", val, (i == n - 1) ? "" : sep); } rval->str = g_string_free(str, FALSE); g_free(sep); return 0; } int oarray_reverse(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; if (_getobj(obj, "@", inst, &array)) { return 1; } array_reverse(array); return 0; } int oarray_slice(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int start, len; start = * (int *) argv[2]; len = * (int *) argv[3]; if (_getobj(obj, "@", inst, &array)) { return 1; } if (array_slice(array, start, len) == NULL) { return 1; } return 0; } static double calc_sum(const int *d, int n) { double sum; int i; sum = 0; for (i = 0; i < n; i++) { sum += d[i]; } return sum; } static double calc_square_sum(const int *d, int n) { double sum; int i; sum = 0; for (i = 0; i < n; i++) { sum += d[i] * d[i]; } return sum; } static int iarray_sum(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int n, *data; double val; rval->i = 0; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } data = arraydata(array); val = calc_sum(data, n); if (val <= G_MININT || val >= G_MAXINT) { return 1; } rval->i = nround(val); return 0; } static int iarray_average(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int n, *data; double val; rval->d = 0; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } data = arraydata(array); val = calc_sum(data, n); rval->d = val / n; return 0; } static int iarray_rms(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int n, *data; double val; rval->d = 0; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } data = arraydata(array); val = calc_square_sum(data, n); rval->d = sqrt(val / n); return 0; } static int iarray_sdev(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int n, *data; double sum, ssum, val; rval->d = 0; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 0; } data = arraydata(array); sum = calc_sum(data, n); ssum = calc_square_sum(data, n); sum /= n; val = ssum / n - sum * sum; rval->d = (val < 0) ? 0 : sqrt(val); return 0; } static int iarray_min(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int i, n, *data, val; rval->i = 0; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 1; } data = arraydata(array); val = data[0]; for (i = 1; i < n; i++) { if (data[i] < val) { val = data[i]; } } rval->i = val; return 0; } static int iarray_max(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int i, n, *data, val; rval->i = 0; _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 1; } data = arraydata(array); val = data[0]; for (i = 1; i < n; i++) { if (data[i] > val) { val = data[i]; } } rval->i = val; return 0; } MathEquation * oarray_create_math(struct objlist *obj, const char *fild, const char *eqn) { MathEquation *code; int rcode; code = math_equation_basic_new(); if (code == NULL) { return NULL; } if (math_equation_add_var(code, "X") != 0) { math_equation_free(code); return NULL; } if (math_equation_add_var(code, "I") != 1) { math_equation_free(code); return NULL; } rcode = math_equation_parse(code, eqn); if (rcode) { char *err_msg; err_msg = math_err_get_error_message(code, eqn, rcode); error22(obj, ERRUNKNOWN, fild, err_msg); g_free(err_msg); math_equation_free(code); return NULL; } math_equation_optimize(code); return code; } static int iarray_map(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int i, n, *data; MathEquation *code; MathValue val; if (argv[2] == NULL) { return 0; } _getobj(obj, "@", inst, &array); n = arraynum(array); if (n == 0) { return 1; } code = oarray_create_math(obj, argv[1], argv[2]); if (code == NULL) { return 1; } data = arraydata(array); for (i = 0; i < n; i++) { val.val = data[i]; val.type = MATH_VALUE_NORMAL; math_equation_set_var(code, 0, &val); val.val = i; val.type = MATH_VALUE_NORMAL; math_equation_set_var(code, 1, &val); math_equation_calculate(code, &val); data[i] = val.val; } math_equation_free(code); return 0; } static struct objtable oiarray[] = { {"init",NVFUNC,NEXEC,iarrayinit,NULL,0}, {"done",NVFUNC,NEXEC,iarraydone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"@",NIARRAY,NREAD|NWRITE,NULL,NULL,0}, {"get",NIFUNC,NREAD|NEXEC,iarrayget,"i",0}, {"put",NVFUNC,NREAD|NEXEC,iarrayput,"ii",0}, {"add",NVFUNC,NREAD|NEXEC,iarrayadd,"i",0}, {"push",NVFUNC,NREAD|NEXEC,iarrayadd,"i",0}, {"pop",NIFUNC,NREAD|NEXEC,iarraypop,"",0}, {"ins",NVFUNC,NREAD|NEXEC,iarrayins,"ii",0}, {"unshift",NVFUNC,NREAD|NEXEC,iarrayunshift,"i",0}, {"shift",NIFUNC,NREAD|NEXEC,iarrayshift,"",0}, {"del",NVFUNC,NREAD|NEXEC,iarraydel,"i",0}, {"join",NSFUNC,NREAD|NEXEC,iarrayjoin,"s",0}, {"sort",NVFUNC,NREAD|NEXEC,iarraysort,"",0}, {"rsort",NVFUNC,NREAD|NEXEC,iarrayrsort,"",0}, {"uniq",NVFUNC,NREAD|NEXEC,iarrayuniq,"",0}, {"sum", NIFUNC, NREAD|NEXEC, iarray_sum, "", 0}, {"average", NDFUNC, NREAD|NEXEC, iarray_average, "", 0}, {"sdev", NDFUNC, NREAD|NEXEC, iarray_sdev, "", 0}, {"RMS", NDFUNC, NREAD|NEXEC, iarray_rms, "", 0}, {"min", NIFUNC, NREAD|NEXEC, iarray_min, "", 0}, {"max", NIFUNC, NREAD|NEXEC, iarray_max, "", 0}, {"num", NIFUNC, NREAD|NEXEC, oarray_num, "", 0}, {"seq", NSFUNC, NREAD|NEXEC, oarray_seq, "", 0}, {"rseq", NSFUNC, NREAD|NEXEC, oarray_reverse_seq, "", 0}, {"reverse", NVFUNC, NREAD|NEXEC, oarray_reverse, "", 0}, {"slice", NVFUNC, NREAD|NEXEC, oarray_slice, "ii", 0}, {"map", NVFUNC, NREAD|NEXEC, iarray_map, "s", 0}, }; #define TBLNUM (sizeof(oiarray) / sizeof(*oiarray)) void * addiarray(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,oiarray,ERRNUM,iarrayerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/nconfig.c0000644000175000017500000003355613624701076013256 00000000000000/* * $Id: nconfig.c,v 1.17 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "object.h" #include "nstring.h" #include "ioutil.h" #include "shell.h" #include "nconfig.h" #include #define CONF "Ngraph.ini" #define CONFBAK "Ngraph.ini~" #define LOCK "Ngraph.lock" #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif char * getscriptname(char *file) { struct objlist *sys; char *homedir,*s; if ((sys=getobject("system"))==NULL) return NULL; if (getobj(sys,"home_dir",0,0,NULL,&homedir)==-1) return NULL; s=getfilename(homedir,CONFTOP,file); return s; } char * searchscript(char *file) { struct objlist *sys; char *libdir,*homedir,*s; if ((sys=getobject("system"))==NULL) return NULL; if (getobj(sys,"home_dir",0,0,NULL,&homedir)==-1) return NULL; if (getobj(sys,"conf_dir",0,0,NULL,&libdir)==-1) return NULL; if (!findfilename(homedir,CONFTOP,file)) { if (!findfilename(libdir,CONFTOP,file)) return NULL; if ((s=getfilename(libdir,CONFTOP,file))==NULL) return NULL; } else { if ((s=getfilename(homedir,CONFTOP,file))==NULL) return NULL; } return s; } static int configlocked(char *dir) { if (findfilename(dir,CONFSEP,LOCK)) return TRUE; else return FALSE; } static void lockconfig(char *dir) { char *file; FILE *fp; while (configlocked(dir)) { msleep(100); } if ((file=getfilename(dir,CONFSEP,LOCK))==NULL) return; if ((fp=nfopen(file,"wt"))==NULL) { g_free(file); return; } fputs("Ngraph.ini is locked",fp); fclose(fp); g_free(file); } static void unlockconfig(char *dir) { char *file; if (!findfilename(dir,CONFSEP,LOCK)) return; if ((file=getfilename(dir,CONFSEP,LOCK))==NULL) return; g_unlink(file); g_free(file); } FILE * openconfig(char *section) { struct objlist *sys; char *libdir,*s,*homedir,*homeconf,*libconf,*buf; FILE *fp; GStatBuf homestat,libstat; if ((sys=getobject("system"))==NULL) return NULL; if (getobj(sys,"home_dir",0,0,NULL,&homedir)==-1) return NULL; if (getobj(sys,"conf_dir",0,0,NULL,&libdir)==-1) return NULL; homeconf=libconf=NULL; if (findfilename(homedir,CONFSEP,CONF)) { if ((homeconf=getfilename(homedir,CONFSEP,CONF))!=NULL) { if (nstat(homeconf,&homestat)!=0) { g_free(homeconf); homeconf=NULL; } } } if (findfilename(libdir,CONFSEP,CONF)) { if ((libconf=getfilename(libdir,CONFSEP,CONF))!=NULL) { if (nstat(libconf,&libstat)!=0) { g_free(libconf); libconf=NULL; } } } if (homeconf) { #if 0 if (libconf==NULL) { s=homeconf; } else if (homestat.st_mtime>=libstat.st_mtime) { s=homeconf; g_free(libconf); } else { s=libconf; g_free(homeconf); } #else s=homeconf; g_free(libconf); #endif } else if (libconf) { s=libconf; } else { return NULL; } if ((fp=nfopen(s,"rt"))==NULL) { g_free(s); return NULL; } g_free(s); while (fgetline(fp,&buf)==0) { if (strcmp0(buf,section)==0) { g_free(buf); return fp; } g_free(buf); } fclose(fp); return NULL; } char * getconfig(FILE *fp,char **val) { char *s,*tok,*buf; int len; while (fgetline(fp, &buf) == 0) { switch (buf[0]) { case '[': g_free(buf); return NULL; case ';': case '#': g_free(buf); continue; } s = buf; tok = getitok2(&s, &len, "="); if (tok) { s += (s[0] == '=') ? 1 : 0; *val = g_strdup(s); if (*val == NULL) { g_free(tok); tok = NULL; } g_free(buf); return tok; } g_free(buf); } return NULL; } void closeconfig(FILE *fp) { fclose(fp); } static int make_backup(char *homedir, char *libdir, char *fil, FILE *fptmp) { FILE *fp; char *buf, *bak; if (! findfilename(homedir, CONFSEP, CONF)) { bak = getfilename(libdir, CONFSEP, CONFBAK); if (bak && findfilename(libdir, CONFSEP, CONFBAK)) { g_unlink(bak); } } else { bak = getfilename(homedir, CONFSEP, CONFBAK); if (bak && findfilename(homedir, CONFSEP, CONFBAK)) { g_unlink(bak); } } if (bak) { rename(fil, bak); g_free(bak); } fp = nfopen(fil, "wt"); if (fp == NULL) { return FALSE; } rewind(fptmp); while (fgetline(fptmp, &buf) == 0) { fputs(buf, fp); fputs("\n", fp); g_free(buf); } fclose(fp); return TRUE; } static char * replaceconfig_match(FILE *fp, FILE *fptmp, struct narray *iconf, struct narray *conf) { char *s, *s2, *buf, *tok2, **data; int len, len2, i, j, num, num2; num = arraynum(conf); data = arraydata(conf); while (fgetline(fp, &buf) == 0) { char *tok; int out; if (buf[0]=='[') { return buf; } s = buf; out = FALSE; tok = getitok(&s, &len, " \t=,"); if (tok) { for (i = 0; i < num; i++) { s2 = data[i]; tok2 = getitok(&s2, &len2, " \t=,"); if (tok2 && (len == len2 && strncmp(tok, tok2, len) == 0)) { out = TRUE; num2 = arraynum(iconf); for (j = 0; j < num2; j++) { if (i == arraynget_int(iconf, j)) break; } if (j == num2) { fputs(data[i], fptmp); fputs("\n", fptmp); arrayadd(iconf, &i); } } } } if (! out && buf && buf[0] != '\0') { fputs(buf, fptmp); fputs("\n", fptmp); } g_free(buf); } return NULL; } int replaceconfig(char *section,struct narray *conf) { int i,j,num,num2, r; char **data; struct objlist *sys; char *libdir,*homedir,*dir,*fil,*buf,*pfx, *tmp_name; FILE *fp,*fptmp; struct narray iconf; if (arraynum(conf) == 0) return TRUE; if ((sys=getobject("system"))==NULL) return FALSE; if (getobj(sys,"temp_prefix",0,0,NULL,&pfx)) return FALSE; if ((sys=getobject("system"))==NULL) return FALSE; if (getobj(sys,"home_dir",0,0,NULL,&homedir)==-1) return FALSE; if (getobj(sys,"conf_dir",0,0,NULL,&libdir)==-1) return FALSE; if (!findfilename(homedir,CONFSEP,CONF)) { if (!findfilename(libdir,CONFSEP,CONF)) return FALSE; if ((fil=getfilename(libdir,CONFSEP,CONF))==NULL) return FALSE; dir=libdir; } else { if ((fil=getfilename(homedir,CONFSEP,CONF))==NULL) return FALSE; dir=homedir; } lockconfig(dir); fptmp = n_tmpfile(&tmp_name); if (fptmp == NULL) { g_free(fil); unlockconfig(dir); return FALSE; } fp = nfopen(fil,"rt"); if (fp == NULL) { n_tmpfile_close(fptmp, tmp_name); g_free(fil); unlockconfig(dir); return FALSE; } arrayinit(&iconf,sizeof(int)); while (fgetline(fp,&buf)==0) { if (strcmp0(buf,section)==0) { fputs(buf,fptmp); fputs("\n",fptmp); g_free(buf); buf = replaceconfig_match(fp, fptmp, &iconf, conf); goto flush; } else { fputs(buf,fptmp); fputs("\n",fptmp); } g_free(buf); } /* section not found */ fputs("\n",fptmp); fputs(section,fptmp); fputs("\n",fptmp); flush: data = arraydata(conf); num = arraynum(conf); for (i=0;i=libstat.st_mtime) { dir=1; s=homeconf; g_free(libconf); } else { dir=3; s=homeconf; g_free(libconf); } } else if (libconf!=NULL) { dir=2; s=libconf; } else return 0; ret=naccess(s,W_OK); g_free(s); if (ret==0) return dir; return -dir; } int copyconfig(void) /* copy configuration file from libdir to home dir */ { struct objlist *sys; char *libdir,*homedir,*buf; char *libname,*homename; FILE *libfp,*homefp; int r; GStatBuf sbuf; if ((sys=getobject("system"))==NULL) return FALSE; if (getobj(sys,"home_dir",0,0,NULL,&homedir)==-1) return FALSE; if (getobj(sys,"conf_dir",0,0,NULL,&libdir)==-1) return FALSE; r = nstat(homedir, &sbuf); if (r && errno == ENOENT) { r = g_mkdir(homedir, 0755); if (r) return FALSE; } else if (! S_ISDIR(sbuf.st_mode)) { return FALSE; } if (findfilename(homedir,CONFSEP,CONF)) { char *bak; if ((bak=getfilename(homedir,CONFSEP,CONFBAK))!=NULL) { if (findfilename(homedir,CONFSEP,CONFBAK)) g_unlink(bak); if ((homename=getfilename(homedir,CONFSEP,CONF))!=NULL) { rename(homename,bak); g_free(homename); } g_free(bak); } } if (!findfilename(libdir,CONFSEP,CONF)) return FALSE; homename = getfilename(homedir,CONFSEP,CONF); libname = getfilename(libdir,CONFSEP,CONF); if (homename == NULL || libname == NULL) { g_free(homename); g_free(libname); return FALSE; } if (strcmp0(homename,libname)==0) { g_free(homename); g_free(libname); return FALSE; } if ((homefp=nfopen(homename,"wt"))==NULL) { return FALSE; } if ((libfp=nfopen(libname,"rt"))==NULL) { g_free(homename); fclose(homefp); g_free(libname); return FALSE; } g_free(homename); g_free(libname); while (fgetline(libfp,&buf)==0) { fputs(buf,homefp); fputs("\n",homefp); g_free(buf); } fclose(libfp); fclose(homefp); return TRUE; } ngraph-gtk-6.09.05/src/ogra2nul.c0000644000175000017500000004467613764127322013372 00000000000000/* * $Id: ogra2nul.c,v 1.7 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include "object.h" #include "ioutil.h" #include "gra.h" #include "nstring.h" #include "mathfn.h" #include "nconfig.h" #define NAME "gra2null" #define PARENT "gra2" #define OVERSION "1.00.00" #define ERRCONF 100 static char *g2nulerrorlist[]={ "", }; #define ERRNUM (sizeof(g2nulerrorlist) / sizeof(*g2nulerrorlist)) static int g2nulinit(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } static int g2nuldone(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int HelveticaSet[256]={ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 355, 556, 556, 889, 667, 222, 333, 333, 389, 584, 278, 584, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 222, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 333, 333, 333, 333, 333, 333, 333, 333, 278, 333, 333, 278, 333, 333, 333, 278, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 333, 737, 333, 400, 584, 333, 333, 333, 556, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, 556, 556, 556, 500, 556, 500}; static int HelveticaBoldSet[256]={ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 333, 474, 556, 556, 889, 722, 278, 333, 333, 389, 584, 278, 584, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 278, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 333, 333, 333, 333, 333, 333, 333, 333, 278, 333, 333, 278, 333, 333, 333, 278, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 333, 737, 333, 400, 584, 333, 333, 333, 611, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, 611, 611, 611, 556, 611, 556}; static int TimesRomanSet[256]={ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 333, 408, 500, 500, 833, 778, 333, 333, 333, 500, 564, 250, 564, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564, 564, 444, 921, 722, 667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889, 722, 722, 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, 611, 333, 278, 333, 469, 500, 333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778, 500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480, 541, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 278, 333, 333, 333, 333, 333, 333, 333, 333, 250, 333, 333, 250, 333, 333, 333, 250, 333, 500, 500, 500, 500, 200, 500, 333, 760, 276, 500, 564, 333, 760, 333, 400, 564, 300, 300, 333, 500, 453, 250, 333, 300, 310, 500, 750, 750, 750, 444, 722, 722, 722, 722, 722, 722, 889, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, 722, 722, 556, 500, 444, 444, 444, 444, 444, 444, 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500, 500, 500, 500, 500, 500, 564, 500, 500, 500, 500, 500, 500, 500, 500}; static int TimesBoldSet[256]={ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 333, 555, 500, 500, 1000, 833, 333, 333, 333, 500, 570, 250, 570, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570, 570, 500, 930, 722, 667, 722, 722, 667, 611, 778, 778, 389, 500, 778, 667, 944, 722, 778, 611, 778, 722, 556, 667, 722, 722, 1000, 722, 722, 667, 333, 278, 333, 581, 500, 333, 500, 556, 444, 556, 444, 333, 500, 556, 278, 333, 556, 278, 833, 556, 500, 556, 556, 444, 389, 333, 556, 500, 722, 500, 500, 444, 394, 220, 394, 520, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 278, 333, 333, 333, 333, 333, 333, 333, 333, 250, 333, 333, 250, 333, 333, 333, 250, 333, 500, 500, 500, 500, 220, 500, 333, 747, 300, 500, 570, 333, 747, 333, 400, 570, 300, 300, 333, 556, 540, 250, 333, 300, 330, 500, 750, 750, 750, 500, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, 778, 778, 778, 778, 778, 570, 778, 722, 722, 722, 722, 722, 611, 556, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 500, 556, 500}; static int TimesItalicSet[256]={ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 333, 420, 500, 500, 833, 778, 333, 333, 333, 500, 675, 250, 675, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 675, 675, 675, 500, 920, 611, 611, 667, 722, 611, 611, 722, 722, 333, 444, 667, 556, 833, 667, 722, 611, 722, 611, 500, 556, 722, 611, 833, 611, 556, 556, 389, 278, 389, 422, 500, 333, 500, 500, 444, 500, 444, 278, 500, 500, 278, 278, 444, 278, 722, 500, 500, 500, 500, 389, 389, 278, 500, 444, 667, 444, 444, 389, 400, 275, 400, 541, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 278, 333, 333, 333, 333, 333, 333, 333, 333, 250, 333, 333, 250, 333, 333, 333, 250, 389, 500, 500, 500, 500, 275, 500, 333, 760, 276, 500, 675, 333, 760, 333, 400, 675, 300, 300, 333, 500, 523, 250, 333, 300, 310, 500, 750, 750, 750, 500, 611, 611, 611, 611, 611, 611, 889, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 667, 722, 722, 722, 722, 722, 675, 722, 722, 722, 722, 722, 556, 611, 500, 500, 500, 500, 500, 500, 500, 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500, 500, 500, 500, 500, 500, 675, 500, 500, 500, 500, 500, 444, 500, 444}; static int TimesBoldItalicSet[256]={ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 389, 555, 500, 500, 833, 778, 333, 333, 333, 500, 570, 250, 606, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570, 570, 500, 832, 667, 667, 667, 722, 667, 667, 722, 778, 389, 500, 667, 611, 889, 722, 722, 611, 722, 667, 556, 611, 722, 667, 889, 667, 611, 611, 333, 278, 333, 570, 500, 333, 500, 500, 444, 500, 444, 333, 500, 556, 278, 278, 500, 278, 778, 556, 500, 500, 500, 389, 389, 278, 556, 444, 667, 500, 444, 389, 348, 220, 348, 570, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 278, 333, 333, 333, 333, 333, 333, 333, 333, 250, 333, 333, 250, 333, 333, 333, 250, 389, 500, 500, 500, 500, 220, 500, 333, 747, 266, 500, 606, 333, 747, 333, 400, 570, 300, 300, 333, 576, 500, 250, 333, 300, 300, 500, 750, 750, 750, 500, 667, 667, 667, 667, 667, 667, 944, 667, 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, 722, 722, 722, 722, 722, 570, 722, 722, 722, 722, 722, 611, 611, 500, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 444, 500, 444}; static int SymbolSet[256]={ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 333, 713, 500, 549, 833, 778, 439, 333, 333, 500, 549, 250, 549, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 549, 549, 549, 444, 549, 722, 667, 722, 612, 611, 763, 603, 722, 333, 631, 722, 686, 889, 722, 722, 768, 741, 556, 592, 611, 690, 439, 768, 645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494, 439, 521, 411, 603, 329, 603, 549, 549, 576, 521, 549, 549, 521, 549, 603, 439, 576, 713, 686, 493, 686, 494, 480, 200, 480, 549, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 620, 247, 549, 167, 713, 500, 753, 753, 753, 753, 1042, 987, 603, 987, 603, 400, 549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1000, 603, 1000, 658, 823, 686, 795, 987, 768, 768, 823, 768, 768, 713, 713, 713, 713, 713, 713, 713, 768, 713, 790, 790, 890, 823, 549, 250, 713, 603, 603, 1042, 987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384, 384, 384, 384, 494, 494, 494, 494, 250, 329, 274, 686, 686, 686, 384, 384, 384, 384, 384, 384, 494, 494, 494, 250}; struct font_data { char *name; int *width[4], height[4], style; }; static struct font_data FontData[] = { { "Serif", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {662, 676, 653, 669}, -1 }, { "Sans-serif", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, -1 }, { "Times", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 0 }, { "Tim", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 0 }, { "TimesBold", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 1 }, { "TimB", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 1 }, { "TimesItalic", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 2 }, { "TimI", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 2 }, { "TimesBoldItalic", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 3 }, { "TimBI", {TimesRomanSet, TimesBoldSet, TimesItalicSet, TimesBoldItalicSet}, {662, 676, 653, 669}, 3 }, { "Helvetica", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 0 }, { "Helv", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 0 }, { "HelveticaOblique", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 2 }, { "HelvO", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 2 }, { "HelveticaItalic", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 2 }, { "HelvI", {HelveticaSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 2 }, { "HelveticaBold", {HelveticaBoldSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 1 }, { "HelvB", {HelveticaBoldSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 1 }, { "HelveticaBoldOblique", {HelveticaBoldSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 3 }, { "HelvBO", {HelveticaBoldSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 2 }, { "HelveticaBoldItalic", {HelveticaBoldSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 3 }, { "HelvBI", {HelveticaBoldSet, HelveticaBoldSet, HelveticaSet, HelveticaBoldSet}, {718, 718, 718, 718}, 3 }, { "Symbol", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 0 }, { "Sym", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 0 }, { "SymbolBold", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 2 }, { "SymB", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 1 }, { "SymbolItalic", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 2 }, { "SymI", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 2 }, { "SymbolBoldItalic", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 3 }, { "SymBI", {SymbolSet, SymbolSet, SymbolSet, SymbolSet}, {673, 673, 673, 673}, 3 }, { "Gothic", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 0 }, { "Goth", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 0 }, { "GothicBold", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 1 }, { "GothB", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 1 }, { "GothicItalic", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 2 }, { "GothI", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 2 }, { "GothicBoldItalic", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 3 }, { "GothBI", {NULL, NULL, NULL, NULL}, {791, 791, 791, 791}, 3 }, { "Mincho", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 0 }, { "Min", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 0 }, { "MinchoBold", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 1 }, { "MinB", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 1 }, { "MinchoItalic", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 2 }, { "MinI", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 2 }, { "MinchoBoldItalic", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 3 }, { "MinBI", {NULL, NULL, NULL, NULL}, {807, 807, 807, 807}, 3 }, }; static NHASH FontDataHash = NULL; static int g2nul_strwidth(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *font, *s, *ptr; int size, i, style, w; gunichar ch; s = argv[3]; size = * (int *) argv[4]; font = (char *) argv[5]; style = * (int *) argv[6]; if (s == NULL) { return 0; } w = 0; for (ptr = s; ptr[0]; ptr = g_utf8_next_char(ptr)) { int width; ch = g_utf8_get_char(ptr); width = -1; if (ch < 256 && nhash_get_int(FontDataHash, font, &i) == 0) { if (FontData[i].style >= 0) { style = FontData[i].style; } if (style >= 0 && style < 4 && FontData[i].width[style]) { width = FontData[i].width[style][ch]; } } if (width < 0) { width = 600; } if (g_unichar_iswide(ch)) { width *= 2; } w += width; } rval->i = nround(w * size * 25.4 / 72000.0); return 0; } static int g2nul_charheight(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *font; int size, height, style, i; size=*(int *)(argv[3]); font=(char *)(argv[4]); style = * (int *) argv[5]; height = -1; if (nhash_get_int(FontDataHash, font, &i) == 0) { if (FontData[i].style >= 0) { style = FontData[i].style; } if (style >= 0 && style < 4) { height = FontData[i].height[style]; } } if (height < 0) { height = 562; } rval->i = nround(25.4 / 72000.0 * size * height); return 0; } static int g2nul_chardescent(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { int size; size=*(int *)(argv[3]); rval->i=nround(25.4/72000.0*size*250); return 0; } static struct objtable gra2null[] = { {"init",NVFUNC,NEXEC,g2nulinit,NULL,0}, {"done",NVFUNC,NEXEC,g2nuldone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"_strwidth",NIFUNC,0,g2nul_strwidth,NULL,0}, {"_charascent",NIFUNC,0,g2nul_charheight,NULL,0}, {"_chardescent",NIFUNC,0,g2nul_chardescent,NULL,0}, }; #define TBLNUM (sizeof(gra2null) / sizeof(*gra2null)) void * addgra2null(void) /* addgra2null() returns NULL on error */ { if (FontDataHash == NULL) { unsigned int i; FontDataHash = nhash_new(); if (FontDataHash == NULL) { return NULL; } for (i = 0; i < sizeof(FontData) / sizeof(*FontData); i++) { nhash_set_int(FontDataHash, FontData[i].name, i); } } return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,gra2null,ERRNUM,g2nulerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/object.c0000644000175000017500000032765514142161773013107 00000000000000/* * $Id: object.c,v 1.54 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include "nstring.h" #include "object.h" #include "mathfn.h" #include "nhash.h" #include "shell.h" #include #include "math/math_equation.h" #define USE_HASH 1 #define INST_MAX 32767 static struct objlist *objroot=NULL; static struct loopproc *looproot=NULL, *loopnext=NULL; static struct objlist *errobj=NULL; #define ERR_MSG_BUF_SIZE 2048 static char errormsg1[ERR_MSG_BUF_SIZE]={'\0'}; static char errormsg2[ERR_MSG_BUF_SIZE]={'\0'}; static int errcode=0; int Globallock=FALSE; int (*getstdin)(void); int (*putstdout)(const char *s); int (*putstderr)(const char *s); int (*printfstdout)(const char *fmt,...); int (*printfstderr)(const char *fmt,...); int (*ninterrupt)(void); int (*inputyn)(const char *mes); void (*ndisplaydialog)(const char *str); void (*ndisplaystatus)(const char *str); #if USE_HASH static NHASH ObjHash = NULL; #endif static char *errorlist[]={ "", "no heap space.", "parent object not found", "duplicate field identifier", "object id is too large", "instance id is too large", "object not found", "field not found", "only one instance is allowed.", "unable to make an instance.", "instance not found, id", "instance not found, oid", "named instance not found", "not allowed to destruct.", "permission denied", "not defined current instance.", "instance does not exist.", "illegal object identifier", "illegal instance identifier", "illegal field identifier", "extra object arguments", "not enough object argument", "illegal type of object argument", "instance exist. cannot overwrite object", }; #define ERRNUM (sizeof(errorlist) / sizeof(*errorlist)) static int chkobjtblpos(struct objlist *obj, const char *name, struct objlist **robj); void error(struct objlist *obj,int code) { char *objname; char **errtable; int errnum; Globallock=TRUE; errobj=obj; errcode=code; if (code < 0) { code = ERRUNKNOWN; } if (obj==NULL) { objname="kernel"; } else { objname=obj->name; } if (code==ERRUNKNOWN) { printfstderr("%.64s: %.256s%.256s\n", objname,errormsg1,errormsg2); } else if (code<100) { errtable=errorlist; errnum=ERRNUM; if ((errtable==NULL) || (code>=errnum)) { printfstderr("%.64s: %.256s(%d)%.256s\n",objname,errormsg1,code,errormsg2); } else { printfstderr("%.64s: %.256s%.256s%.256s\n", objname,errormsg1,errtable[code],errormsg2); } } else { if (obj) { errtable=obj->errtable; errnum=obj->errnum; } else { errtable = NULL; errnum = 0; } code=code-100; if ((errtable==NULL) || (code>=errnum)) { printfstderr("%.64s: %.256s(%d)%.256s\n",objname,errormsg1,code,errormsg2); } else { printfstderr("%.64s: %.256s%.256s%.256s\n", objname,errormsg1,errtable[code],errormsg2); } } errormsg1[0]='\0'; errormsg2[0]='\0'; Globallock=FALSE; } static char * get_localized_str(const char *str) { char *local_str; if (g_utf8_validate(str, -1, NULL)) { local_str = g_locale_from_utf8(str, -1, NULL, NULL, NULL); } else { local_str = g_strdup(str); } return local_str; } void error2(struct objlist *obj,int code, const char *mes) { if (mes!=NULL) { char *local_msg; local_msg = get_localized_str(mes); snprintf(errormsg2, sizeof(errormsg2), " `%.256s'.", CHK_STR(local_msg)); g_free(local_msg); } else { sprintf(errormsg2,"."); } error(obj,code); } void error22(struct objlist *obj,int code, const char *mes1, const char *mes2) { char *local_msg; if (mes1!=NULL) { local_msg = get_localized_str(mes1); snprintf(errormsg1, sizeof(errormsg1), "%.256s: ", CHK_STR(local_msg)); g_free(local_msg); } else { errormsg1[0]='\0'; } if (mes2!=NULL) { local_msg = get_localized_str(mes2); snprintf(errormsg2, sizeof(errormsg2), " `%.256s'.", CHK_STR(local_msg)); g_free(local_msg); } else { sprintf(errormsg2,"."); } error(obj,code); } void error3(struct objlist *obj,int code,int num) { snprintf(errormsg2, sizeof(errormsg2), " `%d'.",num); error(obj,code); } static int vgetchar(void) { return EOF; } static int vputs(const char *s) { return 0; } static int vnprintf(const char *fmt,...) { return 0; } int seputs(const char *s) { return fputs(s,stderr); } int seprintf(const char *fmt,...) { int code; va_list ap; va_start(ap,fmt); code=vfprintf(stderr,fmt,ap); va_end(ap); return code; } int vinterrupt(void) { return FALSE; } int vinputyn(const char *mes) { return FALSE; } static void vdisplaydialog(const char *str) { } static void vdisplaystatus(const char *str) { } struct savedstdio stdiosave; void ignorestdio(struct savedstdio *save) { if (save==NULL) savestdio(&stdiosave); else savestdio(save); getstdin=vgetchar; putstdout=vputs; putstderr=vputs; printfstdout=vnprintf; printfstderr=vnprintf; ndisplaydialog=vdisplaydialog; ndisplaystatus=vdisplaystatus; } void restorestdio(struct savedstdio *save) { if (save==NULL) loadstdio(&stdiosave); else loadstdio(save); } void savestdio(struct savedstdio *save) { save->getstdin=getstdin; save->putstdout=putstdout; save->putstderr=putstderr; save->printfstdout=printfstdout; save->printfstderr=printfstderr; save->ninterrupt=ninterrupt; save->inputyn=inputyn; save->ndisplaydialog=ndisplaydialog; save->ndisplaystatus=ndisplaystatus; } void loadstdio(struct savedstdio *save) { getstdin=save->getstdin; putstdout=save->putstdout; putstderr=save->putstderr; printfstdout=save->printfstdout; printfstderr=save->printfstderr; ninterrupt=save->ninterrupt; inputyn=save->inputyn; ndisplaydialog=save->ndisplaydialog; ndisplaystatus=save->ndisplaystatus; } #define ALLOCSIZE 32 void arrayinit(struct narray *array,unsigned int base) { if (array==NULL) return; array->base=base; array->num=0; array->size=0; array->data=NULL; } struct narray * arraynew(unsigned int base) { struct narray *array; if ((array=g_malloc(sizeof(struct narray)))==NULL) return NULL; arrayinit(array,base); return array; } void * arraydata(struct narray *array) { if (array==NULL) return NULL; return array->data; } unsigned int arraynum(struct narray *array) { if (array==NULL) return 0; return array->num; } static unsigned int arraybase(struct narray *array) { if (array==NULL) return 0; return array->base; } void arraydel(struct narray *array) { if (array==NULL) return; g_free(array->data); array->data=NULL; array->size=0; array->num=0; } void arraydel2(struct narray *array) { unsigned int i; char **data; if (array==NULL) return; data=array->data; for (i=0;inum;i++) g_free(data[i]); g_free(array->data); array->data=NULL; array->size=0; array->num=0; } void arrayclear(struct narray *array) { if (array == NULL) return; array->num=0; } void arrayclear2(struct narray *array) { unsigned int i; char **data; if (array == NULL) return; data = array->data; for (i = 0; i < array->num; i++) { g_free(data[i]); } array->num=0; } int arraycmp(struct narray *a, struct narray *b) { if (a == NULL || b == NULL) { return 1; } if (a->base != b->base) { return 1; } if (a->num != b->num) { return 1; } if (a->data == NULL && b->data == NULL) { return 0; } if (a->data == NULL || b->data == NULL) { return 1; } return memcmp(a->data, b->data, (size_t) a->base * a->num); } int arraycpy(struct narray *dest, struct narray *src) { void *data; if (dest == NULL || src == NULL) { return 1; } if (dest->base != src->base) { return 1; } if (src->num > dest->size) { data = g_realloc(dest->data, (gsize) src->base * src->size); if (data == NULL) { return 1; } dest->data = data; dest->size = src->size; } memcpy(dest->data, src->data, (size_t) src->num * src->base); dest->num = src->num; return 0; } struct narray * arraydup(struct narray *array) { struct narray *new_ary; if (array == NULL) { return NULL; } new_ary = g_malloc(sizeof(*new_ary)); if (new_ary == NULL ) { return NULL; } *new_ary = *array; if (array->data) { #if GLIB_CHECK_VERSION(2, 68, 0) new_ary->data = g_memdup2(array->data, array->base * array->size); #else new_ary->data = g_memdup(array->data, array->base * array->size); #endif if (new_ary->data == NULL) { g_free(new_ary); return NULL; } } return new_ary; } struct narray * arraydup2(struct narray *array) { struct narray *new_ary; char **data, **new_data; unsigned int i; new_ary = arraydup(array); if (new_ary == NULL ) { return NULL; } data = array->data; new_data = new_ary->data; for (i = 0; i < array->num; i++) { new_data[i] = g_strdup(data[i]); } return new_ary; } void arrayfree(struct narray *array) { if (array==NULL) return; g_free(array->data); g_free(array); } void arrayfree2(struct narray *array) { unsigned int i; char **data; if (array==NULL) return; data=array->data; for (i=0;inum;i++) g_free(data[i]); g_free(array->data); g_free(array); } struct narray * arrayadd(struct narray *array,const void *val) { int base; char *data; if (array==NULL || val == NULL) return NULL; if (array->num==array->size) { int size; size=array->size+ALLOCSIZE; if ((data=g_realloc(array->data,(gsize) array->base*size))==NULL) { return NULL; } array->size=size; array->data=data; } else data=array->data; base=array->base; memcpy(data+array->num*base,val,base); (array->num)++; return array; } struct narray * arrayadd2(struct narray *array,const char *val) { char **data; char *s; if (array == NULL) return NULL; if (val == NULL) { return NULL; } else { s = g_strdup(val); if (s == NULL) { arraydel2(array); return NULL; } } if (array->num == array->size) { int size; size = array->size+ALLOCSIZE; data=g_realloc(array->data,(gsize) array->base*size); if (data == NULL) { return NULL; } array->size = size; array->data = data; } else { data = array->data; } data[array->num] = s; (array->num)++; return array; } struct narray * arrayins(struct narray *array,const void *val,unsigned int idx) { unsigned int i; int base; char *data; if (array==NULL) return NULL; if (idx>array->num) return NULL; if (array->num==array->size) { int size; size=array->size+ALLOCSIZE; if ((data=g_realloc(array->data,(gsize) array->base*size))==NULL) { return NULL; } array->size=size; array->data=data; } else data=array->data; base=array->base; for (i=array->num;i>idx;i--) memcpy(data+i*base,data+(i-1)*base,base); memcpy(data+idx*base,val,base); (array->num)++; return array; } struct narray * arrayins2(struct narray *array, const char *val, unsigned int idx) { unsigned int i; char **data; char *s; if (array == NULL) { return NULL; } if (idx > array->num) { return NULL; } if (val == NULL) { return NULL; } s = g_strdup(val); if (s == NULL) { arraydel2(array); return NULL; } if (array->num == array->size) { int size; size = array->size+ALLOCSIZE; data = g_realloc(array->data,(gsize) array->base*size); if (data == NULL) { return NULL; } array->size=size; array->data=data; } else { data = array->data; } for (i = array->num; i > idx; i--) { data[i] = data[i-1]; } data[idx] = s; (array->num)++; return array; } struct narray * array_reverse(struct narray *array) { unsigned int i, base, num, n; char *data, *buf; if (array == NULL) { return NULL; } data = array->data; base = array->base; num = array->num; n = num / 2; num--; buf = g_malloc(base); if (buf == NULL) { return NULL; } for (i = 0; i < n; i++) { memcpy(buf, data + i * base, base); memcpy(data + i * base, data + (num - i) * base, base); memcpy(data + (num - i) * base, buf, base); } g_free(buf); return array; } struct narray * arrayndel(struct narray *array,unsigned int idx) { int base; char *data; if (array==NULL) return NULL; if (idx>=array->num) return NULL; data=array->data; base=array->base; #if 0 for (i=idx+1;inum;i++) memcpy(data+(i-1)*base,data+i*base,base); #else data += (idx * base); memmove(data, data + base, (size_t) base * (array->num - idx - 1)); #endif (array->num)--; return array; } struct narray * array_slice(struct narray *array, int start, int length) { int base, num; char *data; if (array == NULL) { return NULL; } data = array->data; base = array->base; num = array->num; if (length < 0) { return NULL; } if (start < 0) { start = num + start; } if (start < 0) { return NULL; } if (start >= num) { return NULL; } if (start + length > num) { length = num - start; } if (length > 0) { memmove(data, data + start * base, (size_t) length * base); } array->num = length; return array; } struct narray * array_slice2(struct narray *array, int start, int length) { int i, base, num; char *data, **sarray; if (array == NULL) { return NULL; } data = array->data; sarray = array->data; base = array->base; num = array->num; if (length < 0) { return NULL; } if (start < 0) { start = num + start; } if (start < 0) { return NULL; } if (start >= num) { return NULL; } if (start + length > num) { length = num - start; } for (i = 0; i < start; i++) { g_free(sarray[i]); } for (i = start + length; i < num; i++) { g_free(sarray[i]); } if (length > 0) { memmove(data, data + start * base, (size_t) length * base); } array->num = length; return array; } struct narray * arrayndel2(struct narray *array,unsigned int idx) { char **data; if (array==NULL) return NULL; if (idx>=array->num) return NULL; data=(char **)array->data; g_free(data[idx]); #if 0 for (i=idx+1;inum;i++) data[i-1]=data[i]; #else data += idx; memmove(data, data + 1, sizeof(*data) * (array->num - idx - 1)); #endif (array->num)--; return array; } struct narray * arrayput(struct narray *array,const void *val,unsigned int idx) { int base; char *data; if (array==NULL) return NULL; if (idx>=array->num) return NULL; data=array->data; base=array->base; memcpy(data+idx*base,val,base); return array; } struct narray * arrayput2(struct narray *array, const char *val, unsigned int idx) { char *s; char **data; if (array == NULL) { return NULL; } if (idx >= array->num) { return NULL; } if (val == NULL){ return NULL; } s = g_strdup(val); if (s == NULL) { arraydel2(array); return NULL; } data = (char **)array->data; g_free(data[idx]); data[idx] = s; return array; } void * arraynget(struct narray *array,unsigned int idx) { int base; char *data; if (array==NULL) return NULL; if (idx>=array->num) return NULL; data=array->data; base=array->base; return data+idx*base; } int arraynget_int(struct narray *array, unsigned int idx) { void *ptr; ptr = arraynget(array, idx); return (ptr) ? * (int *) ptr : 0; } double arraynget_double(struct narray *array, unsigned int idx) { void *ptr; ptr = arraynget(array, idx); return (ptr) ? * (double *) ptr : 0; } char * arraynget_str(struct narray *array, unsigned int idx) { void *ptr; ptr = arraynget(array, idx); return (ptr) ? * (char **) ptr : NULL; } void * arraylast(struct narray *array) { int base; char *data; if (array==NULL) return NULL; if (array->num==0) return NULL; data=array->data; base=array->base; return data+(array->num-1)*base; } int arraylast_int(struct narray *array) { void *ptr; ptr = arraylast(array); return (ptr) ? * (int *) ptr : 0; } int array_find_int(struct narray *array, int number) { int *data, n, i; if (array == NULL) { return -1; } data = arraydata(array); n = arraynum(array); for (i = 0; i < n; i++) { if (data[i] == number) { return i; } } return -1; } static int cmp_func_int(const void *p1, const void *p2) { return (* (int *) p1) - (* (int *) p2); } static int cmp_func_int_r(const void *p1, const void *p2) { return (* (int *) p2) - (* (int *) p1); } void arraysort_int(struct narray *array) { int num, *adata; if (array == NULL) { return; } num = arraynum(array); adata = arraydata(array); if (num > 1) { qsort(adata, num, sizeof(int), cmp_func_int); } } void arrayrsort_int(struct narray *array) { int num, *adata; if (array == NULL) { return; } num = arraynum(array); adata = arraydata(array); if (num > 1) { qsort(adata, num, sizeof(int), cmp_func_int_r); } } void arrayuniq_int(struct narray *array) { int i, val, num, *adata; if (array == NULL) { return; } num = arraynum(array); if (num < 2) { return; } adata = arraydata(array); val = adata[0]; for (i = 1; i < num;) { if (adata[i] == val) { arrayndel(array, i); num--; } else { val = adata[i]; i++; } } } static int cmp_func_double(const void *p1, const void *p2) { double d1, d2; d1 = * (double *) p1; d2 = * (double *) p2; if (d1 > d2) { return 1; } else if (d1 < d2) { return -1; } return 0; } static int cmp_func_double_r(const void *p1, const void *p2) { double d1, d2; d1 = * (double *) p1; d2 = * (double *) p2; if (d1 > d2) { return -1; } else if (d1 < d2) { return 1; } return 0; } void arraysort_double(struct narray *array) { int num; double *adata; if (array == NULL) { return; } num = arraynum(array); adata = arraydata(array); if (num > 1) { qsort(adata, num, sizeof(double), cmp_func_double); } } void arrayrsort_double(struct narray *array) { int num; double *adata; if (array == NULL) { return; } num = arraynum(array); adata = arraydata(array); if (num > 1) { qsort(adata, num, sizeof(double), cmp_func_double_r); } } void arrayuniq_double(struct narray *array) { int i, num; double *adata, val; if (array == NULL) { return; } num = arraynum(array); if (num < 2) { return; } adata = arraydata(array); val = adata[0]; for (i = 1; i < num;) { if (adata[i] == val) { arrayndel(array, i); num--; } else { val = adata[i]; i++; } } } static int cmp_func_str(const void *p1, const void *p2) { return g_strcmp0(* (char **) p1, * (char **) p2); } static int cmp_func_str_r(const void *p1, const void *p2) { return - g_strcmp0(* (char **) p1, * (char **) p2); } void arraysort_str(struct narray *array) { int num; char **adata; if (array == NULL) { return; } num = arraynum(array); adata = arraydata(array); if (num > 1) { qsort(adata, num, sizeof(char *), cmp_func_str); } } void arrayrsort_str(struct narray *array) { int num; char **adata; if (array == NULL) { return; } num = arraynum(array); adata = arraydata(array); if (num > 1) { qsort(adata, num, sizeof(char *), cmp_func_str_r); } } void arrayuniq_str(struct narray *array) { int i, num; char **adata, *val; if (array == NULL) { return; } num = arraynum(array); if (num < 2) { return; } adata = arraydata(array); val = adata[0]; for (i = 1; i < num;) { if (g_strcmp0(adata[i], val) == 0) { arrayndel2(array, i); num--; } else { val = adata[i]; i++; } } } void arrayuniq_all_str(struct narray *array) { int i, j, num; char **adata; if (array == NULL) { return; } num = arraynum(array); if (num < 2) { return; } adata = arraydata(array); for (j = 0; j < num - 1; j++) { char *val; val = adata[j]; for (i = j + 1; i < num;) { if (g_strcmp0(adata[i], val) == 0) { arrayndel2(array, i); num--; } else { i++; } } } } #define ARGBUFNUM 32 int getargc(char **arg) { int i; if (arg==NULL) return 0; for (i=0;arg[i]!=NULL;i++) ; return i; } char ** arg_add(char ***arg,void *ptr) { int i,num; char **arg2; if (*arg==NULL) { if ((*arg=g_malloc(ARGBUFNUM*sizeof(void *)))==NULL) return NULL; (*arg)[0]=NULL; } i=getargc(*arg); num=i/ARGBUFNUM; if (i%ARGBUFNUM==ARGBUFNUM-1) { if ((arg2=g_realloc(*arg,ARGBUFNUM*sizeof(void *)*(num+2)))==NULL) return NULL; *arg=arg2; } (*arg)[i]=ptr; (*arg)[i+1]=NULL; return *arg; } static char ** arg_add2(char ***arg,int argc,...) { va_list ap; int i; if (*arg==NULL) { if ((*arg=g_malloc(ARGBUFNUM*sizeof(void *)))==NULL) return NULL; (*arg)[0]=NULL; } va_start(ap,argc); for (i=0;inext!=NULL) lpcur=lpcur->next; lpcur->next=lpnew; } lpnew->next=NULL; lpnew->objname=objname; lpnew->evname=evname; lpnew->obj=obj; lpnew->idn=idn; lpnew->inst=inst; lpnew->local=local; } void unregisterevloop(struct objlist *obj,int idn,N_VALUE *inst) { struct loopproc *lpcur,*lpdel,*lpprev; lpcur=looproot; lpprev=NULL; while (lpcur!=NULL) { if ((lpcur->obj==obj) && (lpcur->idn==idn) && (lpcur->inst==inst)) { lpdel=lpcur; if (loopnext==lpdel) loopnext=lpdel->next; if (lpprev==NULL) looproot=lpcur->next; else lpprev->next=lpdel->next; lpcur=lpcur->next; g_free(lpdel); } else { lpprev=lpcur; lpcur=lpcur->next; } } } #ifdef COMPILE_UNUSED_FUNCTIONS static void unregisterallevloop(void) { struct loopproc *lpcur; lpcur=looproot; while (lpcur!=NULL) { struct loopproc *lpdel; lpdel=lpcur; lpcur=lpcur->next; g_free(lpdel); } looproot=NULL; loopnext=NULL; } #endif /* COMPILE_UNUSED_FUNCTIONS */ int has_eventloop(void) { return looproot != NULL; } void eventloop(void) { static int ineventloop = FALSE; struct loopproc *lpcur; char *argv[4]; if (looproot==NULL) return; if (ineventloop) return; ineventloop=TRUE; ignorestdio(NULL); lpcur=looproot; while (lpcur!=NULL) { argv[0]= (char *) lpcur->objname; argv[1]= (char *) lpcur->evname; argv[2]=lpcur->local; argv[3]=NULL; loopnext=lpcur->next; __exeobj(lpcur->obj,lpcur->idn,lpcur->inst,3,argv); lpcur=loopnext; } restorestdio(NULL); ineventloop=FALSE; } struct objlist * chkobjroot() { return objroot; } #if USE_HASH static int add_obj_to_hash(char *name, char *alias, void *obj) { if (ObjHash == NULL) { ObjHash = nhash_new(); if (ObjHash == NULL) return 1; } if (nhash_set_ptr(ObjHash, name, obj)) return 1; if (alias) { char *s, *aliasname; int len; s = alias; while ((aliasname = getitok2(&s, &len, ":"))) { if (nhash_set_ptr(ObjHash, aliasname, obj)) { g_free(aliasname); return 1; } g_free(aliasname); } } return 0; } #endif static int check_arglist(int type, const char *arglist) { int i; if (type == NENUM) { return (arglist) ? 0 : 1; } if (arglist == NULL || arglist[0] == '\0') { return 0; } if (arglist[1] == 'a') { if (arglist[0] != 's' && arglist[0] != 'i' && arglist[0] != 'd' && arglist[2] != '\0') { return 1; } return 0; } for (i = 0; arglist[i]; i++) { if (strchr("soidb", arglist[i]) == NULL) { return 1; } } return 0; } void * addobject(char *name,char *alias,char *parentname,char *ver, int tblnum,struct objtable *table, int errnum,char **errtable,void *local,DoneProc doneproc) /* addobject() returns NULL on error */ { struct objlist *objcur,*objprev,*objnew,*parent, *ptr; int i,offset; NHASH tbl_hash = NULL; static int id = 1; if (id >= OBJ_MAX) { error3(NULL, ERROBJNUM, id); return NULL; } objcur = chkobject(name); if (objcur) { error2(NULL,ERROVERWRITE,name); return NULL; } if (parentname==NULL) parent=NULL; else if ((parent=chkobject(parentname))==NULL) { error2(NULL,ERRPARENT,parentname); return NULL; } if ((objnew=g_malloc(sizeof(struct objlist)))==NULL) return NULL; #if USE_HASH if (add_obj_to_hash(name, alias, objnew)) { g_free(objnew); error2(NULL,ERRHEAP,name); return NULL; } tbl_hash = nhash_new(); if (tbl_hash == NULL) { g_free(objnew); error2(NULL,ERRHEAP,name); return NULL; } #endif objprev = NULL; if (parent) { if (parent->child) { ptr = parent->child; while (ptr && chkobjparent(ptr) == parent) { objprev = ptr; ptr = ptr->next; } while (objprev->child) { ptr = objprev->child; while (ptr) { objprev = ptr; ptr = objprev->next; } } } else { objprev = parent; parent->child = objnew; } } if (objprev == NULL) { objroot=objnew; objnew->next = NULL; } else if (objprev->next) { objnew->next = objprev->next; objprev->next = objnew; } else { objprev->next = objnew; objnew->next = NULL; } objnew->id=id; objnew->curinst=-1; objnew->lastinst=-1; objnew->lastinst2=-1; objnew->lastoid=INT_MAX; objnew->name=name; objnew->alias=alias; objnew->ver=ver; objnew->tblnum=tblnum; objnew->fieldnum=-1; objnew->table=table; #if USE_HASH objnew->table_hash=tbl_hash; #endif objnew->errnum=errnum; objnew->errtable=errtable; objnew->parent=parent; objnew->child=NULL; objnew->root=NULL; objnew->root2=NULL; objnew->undo = NULL; objnew->redo = NULL; objnew->local=local; objnew->doneproc=doneproc; objnew->dup_func = NULL; objnew->free_func = NULL; if (parent==NULL) offset=0; else offset=parent->size; for (i=0;isize=offset; objnew->idp=chkobjoffset(objnew,"id"); objnew->oidp=chkobjoffset(objnew,"oid"); objnew->nextp=chkobjoffset(objnew,"next"); id++; return objnew; errexit: g_free(objnew); nhash_free(tbl_hash); error2(NULL,ERRHEAP,name); return NULL; } void obj_set_undo_func(struct objlist *obj, UNDO_DUP_FUNC dup_func, UNDO_FREE_FUNC free_func) { if (obj == NULL) { return; } obj->dup_func = dup_func; obj->free_func = free_func; } void hideinstance(struct objlist *obj) { N_VALUE *instcur; int nextp,idp; if ((idp=obj->idp)==-1) return; if ((nextp=obj->nextp)==-1) return; if (obj->lastinst==-1) return; if (obj->lastinst2==-1) { obj->root2=obj->root; obj->lastinst2=obj->lastinst; } else { N_VALUE *instprev; instcur=obj->root; while (instcur!=NULL) { instcur[idp].i+=obj->lastinst2+1; instcur=instcur[nextp].inst; } instcur=obj->root2; instprev=NULL; while (instcur!=NULL) { instprev=instcur; instcur=instcur[nextp].inst; } instprev[nextp].inst=obj->root; obj->lastinst2+=obj->lastinst+1; } obj->root=NULL; obj->lastinst=-1; } void recoverinstance(struct objlist *obj) { N_VALUE *instcur; int nextp,idp; if ((idp=obj->idp)==-1) return; if ((nextp=obj->nextp)==-1) return; if (obj->lastinst2==-1) return; if (obj->lastinst==-1) { obj->root=obj->root2; obj->lastinst=obj->lastinst2; } else { N_VALUE *instprev; instcur=obj->root; while (instcur!=NULL) { instcur[idp].i+=obj->lastinst2+1; instcur=instcur[nextp].inst; } instcur=obj->root2; instprev=NULL; while (instcur!=NULL) { instprev=instcur; instcur=instcur[nextp].inst; } instprev[nextp].inst=obj->root; obj->root=obj->root2; obj->lastinst+=obj->lastinst2+1; } obj->root2=NULL; obj->lastinst2=-1; } int obj_get_field_pos(struct objlist *obj, const char *field) { int idn; struct objlist *robj; idn = getobjtblpos(obj, field, &robj); if (idn == -1) { return -1; } return chkobjoffset2(robj, idn); } static N_VALUE * dup_inst(struct objlist *obj, N_VALUE *inst) { N_VALUE *inst_new; int i, n; struct objlist *robj; enum ngraph_object_field_type type; #if GLIB_CHECK_VERSION(2, 68, 0) inst_new = g_memdup2(inst, obj->size * sizeof(N_VALUE)); #else inst_new = g_memdup(inst, obj->size * sizeof(N_VALUE)); #endif if (inst_new == NULL) { return NULL; } if (obj->dup_func) { obj->dup_func(obj, inst, inst_new); } n = chkobjfieldnum(obj); for (i = 0; i < n; i++) { int j, idn; const char *field; field = chkobjfieldname(obj, i); idn = getobjtblpos(obj, field, &robj); if (idn == -1) { return NULL; } j = chkobjoffset2(robj, idn); type = robj->table[idn].type; switch (type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NPOINTER: /* _local data is copied by obj->dup_func(). */ break; case NIARRAY: case NDARRAY: case NIAFUNC: case NDAFUNC: inst_new[j].array = arraydup(inst[j].array); break; case NSARRAY: case NSAFUNC: inst_new[j].array = arraydup2(inst[j].array); break; case NSTR: case NOBJ: case NSFUNC: inst_new[j].str = g_strdup(inst[j].str); /* If str is NULL g_strdup(str) returns NULL */ break; default: break; } } return inst_new; } static N_VALUE * dup_inst_list(struct objlist *obj) { N_VALUE *inst_new, *inst_prev, *inst, *root; int nextp; if (obj->lastinst == -1) { return NULL; } nextp = obj->nextp; inst_prev = NULL; root = NULL; for (inst = obj->root; inst; inst = inst[nextp].inst) { inst_new = dup_inst(obj, inst); if (inst_new == NULL) { return NULL; /* don't care about the memory leak. */ } if (root == NULL) { root = inst_new; } if (inst_prev) { inst_prev[nextp].inst = inst_new; } inst_prev = inst_new; } return root; } static void free_inst(struct objlist *obj, N_VALUE *inst) { int i, n; struct objlist *robj; enum ngraph_object_field_type type; if (inst == NULL) { return; } if (obj->free_func) { obj->free_func(obj, inst); } n = chkobjfieldnum(obj); for (i = 0; i < n; i++) { int j, idn; const char *field; field = chkobjfieldname(obj, i); idn = getobjtblpos(obj, field, &robj); if (idn == -1) { return; } j = chkobjoffset2(robj, idn); type = robj->table[idn].type; switch (type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NPOINTER: /* _local data is freed by obj->free_func(). */ break; case NIARRAY: case NDARRAY: case NIAFUNC: case NDAFUNC: arrayfree(inst[j].array); break; case NSARRAY: case NSAFUNC: arrayfree2(inst[j].array); break; case NSTR: case NOBJ: case NSFUNC: g_free(inst[j].str); break; default: break; } } return; } static void free_inst_list(struct objlist *obj, N_VALUE *inst) { N_VALUE *next; int nextp; nextp = obj->nextp; while (inst) { next = inst[nextp].inst; free_inst(obj, inst); g_free(inst); inst = next; } } static void free_undo_inst(struct objlist *obj, struct undo_inst *cur) { struct undo_inst *next; while (cur) { free_inst_list(obj, cur->inst); next = cur->next; g_free(cur); cur = next; } } static void undo_clear_redo(struct objlist *obj) { free_undo_inst(obj, obj->redo); obj->redo = NULL; } int undo_clear(struct objlist *obj) { undo_clear_redo(obj); free_undo_inst(obj, obj->undo); obj->undo = NULL; return 0; } int undo_save(struct objlist *obj) { struct undo_inst *inst; if (obj == NULL) { return 1; } undo_clear_redo(obj); if (obj->idp == -1) { return 1; } if (obj->nextp == -1) { return 1; } if (obj->lastinst2 != -1) { return 1; } inst = g_malloc(sizeof(*inst)); inst->lastinst = obj->lastinst; inst->lastinst2 = obj->lastinst2; inst->curinst = obj->curinst; inst->lastoid = obj->lastoid; inst->inst = dup_inst_list(obj); undo_clear_redo(obj); inst->next = obj->undo; obj->undo = inst; return 0; } int undo_undo(struct objlist *obj) { int lastoid, lastinst2, curinst, lastinst; N_VALUE *inst; struct undo_inst *undo; undo = obj->undo; if (undo == NULL) { return 1; } lastinst = obj->lastinst; lastinst2 = obj->lastinst2; curinst = obj->curinst; lastoid = obj->lastoid; inst = obj->root; obj->lastinst = undo->lastinst; obj->lastinst2 = undo->lastinst2; obj->curinst = undo->curinst; obj->lastoid = undo->lastoid; obj->root = undo->inst; obj->undo = undo->next; undo->lastinst = lastinst; undo->lastinst2 = lastinst2; undo->curinst = curinst; undo->lastoid = lastoid; undo->inst = inst; undo->next = obj->redo; obj->redo = undo; return 0; } int undo_delete(struct objlist *obj) { struct undo_inst *undo; undo = obj->undo; if (undo == NULL) { return 1; } obj->undo = undo->next; undo->next = NULL; free_undo_inst(obj, undo); return 0; } int undo_check_undo(struct objlist *obj) { return (obj->undo) ? 1 : 0; } int undo_check_redo(struct objlist *obj) { return (obj->redo) ? 1 : 0; } int undo_redo(struct objlist *obj) { int lastoid, lastinst2, curinst, lastinst; N_VALUE *inst; struct undo_inst *redo; redo = obj->redo; if (redo == NULL) { return 1; } lastinst = obj->lastinst; lastinst2 = obj->lastinst2; curinst = obj->curinst; lastoid = obj->lastoid; inst = obj->root; obj->lastinst = redo->lastinst; obj->lastinst2 = redo->lastinst2; obj->curinst = redo->curinst; obj->lastoid = redo->lastoid; obj->root = redo->inst; obj->redo = redo->next; redo->lastinst = lastinst; redo->lastinst2 = lastinst2; redo->curinst = curinst; redo->lastoid = lastoid; redo->inst = inst; redo->next = obj->undo; obj->undo = redo; return 0; } struct objlist * chkobject(const char *name) /* chkobject() returns NULL when the named object is not found */ { #if USE_HASH struct objlist *obj; int r; if (ObjHash == NULL) return NULL; r = nhash_get_ptr(ObjHash, name, (void **) &obj); if (r) return NULL; return obj; #else struct objlist *obj,*objcur; char *s,*aliasname; int len; objcur=objroot; obj=NULL; while (objcur!=NULL) { if (strcmp0(objcur->name,name)==0) obj=objcur; if (objcur->alias!=NULL) { s=objcur->alias; while ((aliasname=getitok(&s,&len,":"))!=NULL) { if (strncmp(aliasname,name,len)==0) obj=objcur; } } objcur=objcur->next; } return obj; #endif } const char * chkobjectname(struct objlist *obj) { if (obj==NULL) return NULL; return obj->name; } const char * chkobjectalias(struct objlist *obj) { if (obj==NULL) return NULL; return obj->alias; } #ifdef COMPILE_UNUSED_FUNCTIONS static void * chkobjectlocal(struct objlist *obj) { if (obj==NULL) return NULL; return obj->local; } #endif /* COMPILE_UNUSED_FUNCTIONS */ int chkobjectid(struct objlist *obj) { if (obj==NULL) return -1; return obj->id; } char * chkobjver(struct objlist *obj) { if (obj==NULL) return NULL; return obj->ver; } struct objlist * chkobjparent(struct objlist *obj) { if (obj==NULL) return NULL; return obj->parent; } int chkobjchild(struct objlist *parent,struct objlist *child) { struct objlist *p; p=child; do { if (p==parent) return TRUE; p=chkobjparent(p); } while (p!=NULL); return FALSE; } int chkobjsize(struct objlist *obj) { if (obj==NULL) return 0; return obj->size * sizeof(N_VALUE); } int chkobjlastinst(struct objlist *obj) { if (obj==NULL) return -1; return obj->lastinst; } int chkobjcurinst(struct objlist *obj) { if (obj==NULL) return -1; return obj->curinst; } int chkobjoffset(struct objlist *obj, const char *name) /* chkobjoffset() returns -1 on error */ { #if USE_HASH struct objlist *objcur; int i; i = chkobjtblpos(obj, name, &objcur); if (i < 0) return -1; return objcur->table[i].offset; #else struct objlist *objcur; int i; if (obj==NULL) return -1; objcur=obj; while (objcur!=NULL) { for (i=0;itblnum;i++) if (strcmp0(objcur->table[i].name,name)==0) return objcur->table[i].offset; objcur=objcur->parent; } return -1; #endif } int chkobjoffset2(struct objlist *obj,int tblpos) { return obj->table[tblpos].offset; } N_VALUE * chkobjinstoid(struct objlist *obj,int oid) /* chkobjinstoid() returns NULL when instance is not found */ { int oidp,nextp; N_VALUE *inst; if ((oidp=obj->oidp)==-1) return NULL; inst=obj->root; if ((nextp=obj->nextp)==-1) { if (inst==NULL) return NULL; if (inst[oidp].i==oid) return inst; else return NULL; } else { while (inst!=NULL) { if (inst[oidp].i==oid) return inst; inst=inst[nextp].inst; } } return NULL; } static int chkobjtblpos(struct objlist *obj, const char *name, struct objlist **robj) /* chkobjtblpos() returns -1 on error */ { #if USE_HASH struct objlist *objcur; int i; objcur = obj; while (objcur) { if (nhash_get_int(objcur->table_hash, name, &i) == 0) { *robj = objcur; return i; } objcur = objcur->parent; } *robj = NULL; return -1; #else struct objlist *objcur; int i; objcur=obj; while (objcur!=NULL) { for (i=0;itblnum;i++) if (strcmp0(objcur->table[i].name,name)==0) { *robj=objcur; return i; } objcur=objcur->parent; } *robj=NULL; return -1; #endif } N_VALUE * chkobjinst(struct objlist *obj,int id) /* chkobjinst() returns NULL if instance is not found */ { int i,nextp; N_VALUE *instcur; instcur=obj->root; i=0; if ((nextp=obj->nextp)==-1) { if ((instcur==NULL) || (id!=0)) { return NULL; } } else { while ((instcur!=NULL) && (id!=i)) { instcur=instcur[nextp].inst; i++; } if (instcur==NULL) { return NULL; } } return instcur; } N_VALUE * chkobjlast(struct objlist *obj) /* chkobjlast() returns NULL if instance is not found */ { N_VALUE *instcur,*instprev; int nextp; instcur=obj->root; nextp=obj->nextp; if (nextp!=-1) { instprev=NULL; while (instcur!=NULL) { instprev=instcur; instcur=instcur[nextp].inst; } instcur=instprev; } return instcur; } static N_VALUE * chkobjprev(struct objlist *obj,int id,N_VALUE **inst,N_VALUE **prev) /* chkobjprev() returns NULL if instance is not found */ { N_VALUE *instcur,*instprev; int i,nextp; if (inst!=NULL) *inst=NULL; if (prev!=NULL) *prev=NULL; instcur=obj->root; instprev=NULL; i=0; if ((nextp=obj->nextp)==-1) { if ((instcur==NULL) || (id!=0)) { return NULL; } } else { while ((instcur!=NULL) && (id!=i)) { instprev=instcur; instcur=instcur[nextp].inst; i++; } if (instcur==NULL) { return NULL; } } if (inst!=NULL) *inst=instcur; if (prev!=NULL) *prev=instprev; return instcur; } static int chkobjid(struct objlist *obj,int id) /* chkobjid() returns -1 on error */ { if ((id>obj->lastinst) || (id<0)) return -1; else return id; } int chkobjoid(struct objlist *obj,int oid) /* chkobjoid() returns -1 on error */ { int oidp,idp,nextp; N_VALUE *inst; if ((oidp=obj->oidp)==-1) return -1; if ((idp=obj->idp)==-1) return -1; inst=obj->root; if ((nextp=obj->nextp)==-1) { if (inst==NULL) return -1; if (inst[oidp].i==oid) return inst[idp].i; else return -1; } else { while (inst!=NULL) { if (inst[oidp].i==oid) return inst[idp].i; inst=inst[nextp].inst; } } return -1; } static int chkobjname(struct objlist *obj,int *id,char *name) /* chkobjname() returns -1 when named object is not found*/ { int i,id2; char *iname; if (id == NULL) { id2 = 0; } else { id2 = *id; } if (chkobjoffset(obj, "name") == -1) { return -1; } for (i = id2; i <= obj->lastinst; i++) { N_VALUE *inst; inst = chkobjinst(obj, i); if (inst == NULL) { return -1; } if (_getobj(obj, "name", inst, &iname) == -1) { return -1; } if (iname && strcmp0(iname, name) == 0) { if (id) { *id = i + 1; } return i; } } if (id) { *id = obj->lastinst + 1; } return -1; } int chkobjfieldnum(struct objlist *obj) { struct objlist *objcur,*objcur2; char *name; int i,j,num; if (obj->fieldnum >= 0) return obj->fieldnum; num=0; objcur=obj; while (objcur!=NULL) { for (i=0;itblnum;i++) { name=objcur->table[i].name; objcur2=obj; while (objcur2!=objcur) { for (j=0;jtblnum;j++) if (strcmp0(name,objcur2->table[j].name)==0) goto match; objcur2=objcur2->parent; } match: if (objcur2==objcur) num++; } objcur=objcur->parent; } obj->fieldnum = num; return num; } char * chkobjfieldname(struct objlist *obj,int num) { struct objlist *objcur,*objcur2,*objcur3; char *name; int i,j,tnum; tnum=0; objcur=NULL; while (objcur!=obj) { objcur2=obj; while (objcur!=(objcur2->parent)) objcur2=objcur2->parent; for (i=0;itblnum;i++) { name=objcur2->table[i].name; objcur3=obj; while (objcur3!=objcur2) { for (j=0;jtblnum;j++) if (strcmp0(name,objcur3->table[j].name)==0) goto match; objcur3=objcur3->parent; } match: if (objcur3==objcur2) { if (tnum==num) return name; tnum++; } } objcur=objcur2; } return NULL; } int chkobjfield(struct objlist *obj,const char *name) { #if USE_HASH struct objlist *objcur; int i; i = chkobjtblpos(obj, name, &objcur); if (i < 0) return -1; return 0; #else struct objlist *objcur; int i; objcur=obj; while (objcur!=NULL) { for (i=0;itblnum;i++) if (strcmp0(objcur->table[i].name,name)==0) return 0; objcur=objcur->parent; } return -1; #endif } int chkobjperm(struct objlist *obj, const char *name) /* chkobjperm() returns 0 on error */ { struct objlist *robj; int idn; if ((idn=chkobjtblpos(obj,name,&robj))==-1) return 0; return robj->table[idn].attrib; } enum ngraph_object_field_type chkobjfieldtype(struct objlist *obj, const char *name) /* chkobjperm() returns VOID on error */ { struct objlist *robj; int idn; if ((idn=chkobjtblpos(obj,name,&robj))==-1) return NVOID; return robj->table[idn].type; } #ifdef COMPILE_UNUSED_FUNCTIONS static void * chkobjproc(struct objlist *obj,char *name) { int namen; struct objlist *robj; if ((namen=chkobjtblpos(obj,name,&robj))==-1) return NULL; return robj->table[namen].proc; } #endif /* COMPILE_UNUSED_FUNCTIONS */ const char * chkobjarglist(struct objlist *obj, const char *name) { int namen; enum ngraph_object_field_type type; struct objlist *robj; char *arglist; if ((namen=chkobjtblpos(obj,name,&robj))==-1) return NULL; type=chkobjfieldtype(obj,name); arglist=robj->table[namen].arglist; if ((arglist==NULL) && (typever; } static int getobjcurinst(struct objlist *obj) { if (obj->curinst==-1) { error(obj,ERROBJCINST); return -1; } return obj->curinst; } static int getobjlastinst(struct objlist *obj) { if (obj->lastinst==-1) { error(obj,ERRNOINST); return -1; } return obj->lastinst; } int getobjoffset(struct objlist *obj, const char *name) /* getoffset() returns -1 on error */ { int offset; if (obj==NULL) { error(NULL,ERROBJFOUND); return -1; } if ((offset=chkobjoffset(obj,name))==-1) { if (strcmp0(name,"id")==0) error(obj,ERRNOID); else error2(obj,ERRVALFOUND,name); } return offset; } int getobjtblpos(struct objlist *obj, const char *name, struct objlist **robj) /* getoffset() returns -1 on error */ { int tblnum; if (obj==NULL) { error(NULL,ERROBJFOUND); return -1; } if ((tblnum=chkobjtblpos(obj,name,robj))==-1) { if (strcmp0(name,"id")==0) error(obj,ERRNOID); else error2(obj,ERRVALFOUND,name); } return tblnum; } N_VALUE * getobjinst(struct objlist *obj,int id) /* getobjinst() returns NULL if instance is not found */ { N_VALUE *instcur; if (obj==NULL) { error(NULL,ERROBJFOUND); return NULL; } if ((instcur=chkobjinst(obj,id))==NULL) { error3(obj,ERRIDFOUND,id); return NULL; } return instcur; } N_VALUE * getobjprev(struct objlist *obj,int id,N_VALUE **inst,N_VALUE **prev) /* getobjprev() returns NULL if instance is not found */ { if (obj==NULL) { error(NULL,ERROBJFOUND); return NULL; } if (chkobjprev(obj,id,inst,prev)==NULL) { error3(obj,ERRIDFOUND,id); return NULL; } return *inst; } N_VALUE * getobjinstoid(struct objlist *obj,int oid) { N_VALUE *inst; if (obj==NULL) { error(NULL,ERROBJFOUND); return NULL; } if ((inst=chkobjinstoid(obj,oid))==NULL) { error3(obj,ERROIDFOUND,oid); return NULL; } return inst; } static int getobjname(struct objlist *obj,int *id,char *name) /* getobjname() returns -1 when named instance is not found */ { int i,id2; char *iname; if (id==NULL) id2=0; else id2=*id; if (getobjoffset(obj,"name")==-1) return -1; for (i=id2;i<=obj->lastinst;i++) { N_VALUE *inst; if ((inst=getobjinst(obj,i))==NULL) return -1; if (_getobj(obj,"name",inst,&iname)==-1) return -1; if ((iname!=NULL) && (strcmp0(iname,name)==0)) { if (id!=NULL) *id=i+1; return i; } } if (id!=NULL) *id=obj->lastinst+1; error2(obj,ERRNMFOUND,name); return -1; } static int getobjid(struct objlist *obj,int id) /* getobjid() returns -1 on error */ { if ((id>obj->lastinst) || (id<0)) { error3(obj,ERRIDFOUND,id); return -1; } else return id; } static int getobjoid(struct objlist *obj,int oid) /* getobjoid() returns -1 on error */ { int id; if ((id=chkobjoid(obj,oid))==-1) { error3(obj,ERROIDFOUND,oid); return -1; } else return id; } int getobjfield(struct objlist *obj, const char *name) { if (chkobjfield(obj,name)==-1) { error2(obj,ERRVALFOUND,name); return -1; } else { return 0; } } #ifdef COMPILE_UNUSED_FUNCTIONS static int getobjproc(struct objlist *obj,char *vname,void *val) { struct objlist *robj; int idn; Proc proc; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; proc=robj->table[idn].proc; *(Proc *)val=proc; return 0; } #endif /* COMPILE_UNUSED_FUNCTIONS */ static void (* NewObjCB)(struct objlist *obj) = NULL; static void (* DelObjCB)(struct objlist *obj) = NULL; int newobj_alias(struct objlist *obj, const char *name) { struct objlist *robj; N_VALUE *instcur,*instnew,*inst; int nextp,id,idp,oidp,initn,initp; char **argv; if (obj == NULL || name == NULL) { return -1; } idp = obj->idp; if (idp == -1) { error(obj, ERRNOID); return -1; } initn = getobjtblpos(obj, "init", &robj); if (initn == -1) return -1; initp = chkobjoffset2(robj, initn); if ((robj->table[initn].attrib & NEXEC) == 0) { error2(obj, ERRPERMISSION, "init"); return -1; } id = obj->lastinst + 1; if ((id + obj->lastinst2 + 1) == INST_MAX) { error3(obj, ERRINSTNUM, INST_MAX); return -1; } nextp = obj->nextp; instcur = chkobjinst(obj, obj->lastinst); if (instcur != NULL && nextp == -1) { error(obj, ERRNONEXT); return -1; } instnew = g_malloc0(obj->size * sizeof(N_VALUE)); if (instnew == NULL) { return -1; } instnew[idp].i = id; oidp = obj->oidp; if (oidp != -1) { if (obj->lastoid == INT_MAX) { obj->lastoid=0; } else { obj->lastoid++; } if (nextp != -1) { do { inst=obj->root; while (inst) { if (inst[oidp].i == obj->lastoid) { if (obj->lastoid == INT_MAX) { obj->lastoid=0; } else { obj->lastoid++; } break; } inst = inst[nextp].inst; } if (inst == NULL) { inst = obj->root2; while (inst) { if (inst[oidp].i == obj->lastoid) { if (obj->lastoid == INT_MAX) { obj->lastoid = 0; } else { obj->lastoid++; } break; } inst = inst[nextp].inst; } } } while (inst); } instnew[oidp].i = obj->lastoid; } if (robj->table[initn].proc) { int argc, rcode; argv = NULL; if (arg_add2(&argv, 2, name, "init") == NULL) { g_free(argv); return -1; } argc = getargc(argv); rcode = robj->table[initn].proc(robj, instnew, instnew + initp, argc, argv); g_free(argv); if (rcode != 0) { g_free(instnew); return -1; } } if (instcur == NULL) { obj->root=instnew; } else { instcur[nextp].inst = instnew; /* nextp != -1 when instcur in not NULL */ } if (nextp != -1) { instnew[nextp].inst = NULL; } obj->lastinst = id; obj->curinst = id; if (NewObjCB) { NewObjCB(obj); } return id; } void set_newobj_cb(void (* newobj_cb)(struct objlist *obj)) { NewObjCB = newobj_cb; } void set_delobj_cb(void (* delobj_cb)(struct objlist *obj)) { DelObjCB = delobj_cb; } int newobj(struct objlist *obj) /* newobj() returns id or -1 on error */ { return newobj_alias(obj, obj->name); } int delobj(struct objlist *obj,int delid) /* delobj() returns id or -1 on error */ { struct objlist *robj,*objcur; N_VALUE *instcur,*instprev,*inst; int i,nextp,idp,donen,donep,offset; char **argv; struct narray *array; if ((idp=obj->idp)==-1) { error(obj,ERRNOID); return -1; } if ((donen=chkobjtblpos(obj,"done",&robj))==-1) { error(obj,ERRDESTRUCT); return -1; } donep=chkobjoffset2(robj,donen); if ((robj->table[donen].attrib & NEXEC)==0) { error2(obj,ERRPERMISSION,"done"); return -1; } if (getobjprev(obj,delid,&instcur,&instprev)==NULL) return -1; if (robj->table[donen].proc!=NULL) { int argc, rcode;; argv=NULL; if (arg_add2(&argv,2,obj->name,"done")==NULL) { g_free(argv); return -1; } argc=getargc(argv); rcode=robj->table[donen].proc(robj,instcur,instcur+donep,argc,argv); g_free(argv); if (rcode!=0) return -1; } if ((nextp=obj->nextp)==-1) obj->root=NULL; else { if (instprev==NULL) obj->root=instcur[nextp].inst; else instprev[nextp].inst=instcur[nextp].inst; inst=instcur[nextp].inst; while (inst!=NULL) { inst[idp].i--; inst=inst[nextp].inst; } instcur[nextp].inst=NULL; } objcur=obj; while (objcur!=NULL) { for (i=0;itblnum;i++) { offset=objcur->table[i].offset; switch (objcur->table[i].type) { case NSTR: case NOBJ: case NSFUNC: g_free(instcur[offset].str); break; case NPOINTER: g_free(instcur[offset].ptr); break; case NIARRAY: case NIAFUNC: case NDARRAY: case NDAFUNC: array=instcur[offset].array; arrayfree(array); break; case NSARRAY: case NSAFUNC: array=instcur[offset].array; arrayfree2(array); break; default: break; } } objcur=objcur->parent; } g_free(instcur); obj->lastinst--; obj->curinst=-1; if (DelObjCB) { DelObjCB(obj); } return 0; } void delchildobj(struct objlist *parent) { struct objlist *ocur; int i,instnum; ocur=chkobjroot(); while (ocur!=NULL) { if (chkobjparent(ocur)==parent) { if ((instnum=chkobjlastinst(ocur))!=-1) for (i=instnum;i>=0;i--) delobj(ocur,i); delchildobj(ocur); } ocur=ocur->next; } } int _putobj(struct objlist *obj, const char *vname,N_VALUE *inst,void *val) { struct objlist *robj; int idp,idn; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; idp=chkobjoffset2(robj,idn); switch (robj->table[idn].type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NBOOL: case NBFUNC: case NINT: case NIFUNC: #if USE_NCHAR case NCHAR: case NCFUNC: #endif case NENUM: inst[idp].i=*(int *)val; break; case NDOUBLE: case NDFUNC: inst[idp].d=*(double *)val; break; default: inst[idp].ptr=val; break; } return 0; } int putobj(struct objlist *obj, const char *vname,int id,void *val) /* putobj() returns id or -1 on error */ { struct objlist *robj; struct narray *array; N_VALUE *instcur; int idp,idn; char **argv; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; idp=chkobjoffset2(robj,idn); if ((instcur=getobjinst(obj,id))==NULL) return -1; if ((robj->table[idn].attrib & NWRITE)==0) { error2(obj,ERRPERMISSION,vname); return -1; } if ((robj->table[idn].typetable[idn].proc!=NULL)) { int rcode,argc; argv=NULL; if (arg_add2(&argv,3,obj->name,vname,val)==NULL) { g_free(argv); return -1; } argc=getargc(argv); rcode=robj->table[idn].proc(robj,instcur,instcur+idp,argc,argv); val=argv[2]; g_free(argv); if (rcode!=0) return -1; } switch (robj->table[idn].type) { case NSTR: case NOBJ: case NSFUNC: g_free(instcur[idp].str); break; case NPOINTER: g_free(instcur[idp].ptr); break; case NIARRAY: case NIAFUNC: case NDARRAY: case NDAFUNC: array=instcur[idp].array; arrayfree(array); break; case NSARRAY: case NSAFUNC: array=instcur[idp].array; arrayfree2(array); break; default: break; } switch (robj->table[idn].type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NBOOL: case NINT: #if USE_NCHAR case NCHAR: #endif case NENUM: instcur[idp].i=*(int *)val; break; case NDOUBLE: instcur[idp].d=*(double *)val; break; default: instcur[idp].ptr=val; break; } obj->curinst=id; return id; } int _getobj(struct objlist *obj, const char *vname,N_VALUE *inst,void *val) { struct objlist *robj; int idp,idn; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; idp=chkobjoffset2(robj,idn); switch (robj->table[idn].type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NBOOL: case NBFUNC: case NINT: case NIFUNC: #if USE_NCHAR case NCHAR: case NCFUNC: #endif case NENUM: *(int *)val=inst[idp].i; break; case NDOUBLE: case NDFUNC: *(double *)val=inst[idp].d; break; case NSTR: case NSFUNC: case NOBJ: *(char **)val = inst[idp].str; break; case NIARRAY: case NIAFUNC: case NSARRAY: case NSAFUNC: case NDAFUNC: case NDARRAY: *(struct narray **)val = inst[idp].array; break; default: *(char **)val=inst[idp].ptr; break; } return 0; } int getobj(struct objlist *obj, const char *vname,int id, int argc,char **argv,void *val) /* getobj() returns id or -1 on error */ { struct objlist *robj; N_VALUE *instcur; int idp,idn; char **argv2; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; idp=chkobjoffset2(robj,idn); if ((instcur=getobjinst(obj,id))==NULL) return -1; if (((robj->table[idn].attrib & NREAD)==0) || ((robj->table[idn].type>=NVFUNC) && ((robj->table[idn].attrib & NEXEC)==0))) { error2(obj,ERRPERMISSION,vname); return -1; } if ((robj->table[idn].type>=NVFUNC) && (robj->table[idn].proc!=NULL)) { int i, argc2, rcode; argv2=NULL; if (arg_add2(&argv2,2,obj->name,vname)==NULL) { g_free(argv2); return -1; } for (i=0;itable[idn].proc(robj,instcur,instcur+idp,argc2,argv2); g_free(argv2); if (rcode!=0) return -1; } switch (robj->table[idn].type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NVFUNC: break; case NBOOL: case NBFUNC: case NINT: case NIFUNC: #if USE_NCHAR case NCHAR: case NCFUNC: #endif case NENUM: *(int *)val=instcur[idp].i; break; case NDOUBLE: case NDFUNC: *(double *)val=instcur[idp].d; break; case NSTR: case NSFUNC: case NOBJ: *(char **)val = instcur[idp].str; break; case NIARRAY: case NIAFUNC: case NSARRAY: case NSAFUNC: case NDAFUNC: case NDARRAY: *(struct narray **)val = instcur[idp].array; break; default: *(char **)val=instcur[idp].ptr; break; } obj->curinst=id; return id; } int _exeparent(struct objlist *obj,const char *vname,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) /* _exeparent() returns errorlevel or -1 on error */ { struct objlist *parent,*robj; int idn,idp,rcode; N_VALUE *rval2; if ((parent=obj->parent)==NULL) return 0; if ((idn=chkobjtblpos(parent,vname,&robj))==-1) return 0; idp=chkobjoffset2(robj,idn); if (chkobjfieldtype(parent,vname)table[idn].proc!=NULL) { rcode=robj->table[idn].proc(robj,inst,rval2,argc,argv); } else rcode=0; return rcode; } int __exeobj(struct objlist *obj,int idn,N_VALUE *inst,int argc,char **argv) /* __exeobj() returns errorlevel or -1 on error */ { int rcode; if (obj->table[idn].typetable[idn].proc!=NULL) { int idp; idp=chkobjoffset2(obj,idn); rcode=obj->table[idn].proc(obj,inst,inst+idp,argc,argv); } else rcode=0; return rcode; } int _exeobj(struct objlist *obj,const char *vname,N_VALUE *inst,int argc,char **argv) /* _exeobj() returns errorlevel or -1 on error */ { struct objlist *robj; int idn,idp,rcode; char **argv2; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; idp=chkobjoffset2(robj,idn); if (robj->table[idn].typetable[idn].proc!=NULL) { int i, argc2; argv2=NULL; if (arg_add2(&argv2,2,obj->name,vname)==NULL) { g_free(argv2); return -1; } for (i=0;itable[idn].proc(robj,inst,inst+idp,argc2,argv2); g_free(argv2); } else rcode=0; return rcode; } int exeobj(struct objlist *obj, const char *vname,int id,int argc,char **argv) /* exeobj() returns errorlevel or -1 on error */ { struct objlist *robj; N_VALUE *instcur; int idn,idp,rcode; char **argv2; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; idp=chkobjoffset2(robj,idn); if ((instcur=getobjinst(obj,id))==NULL) return -1; if ((robj->table[idn].typetable[idn].attrib & NREAD)==0) || ((robj->table[idn].type>=NVFUNC) && ((robj->table[idn].attrib & NEXEC)==0))) { error2(obj,ERRPERMISSION,vname); return -1; } if (robj->table[idn].proc!=NULL) { int i, argc2; argv2=NULL; if (arg_add2(&argv2,2,obj->name,vname)==NULL) { g_free(argv2); return -1; } for (i=0;itable[idn].proc(robj,instcur,instcur+idp,argc2,argv2); g_free(argv2); } else rcode=0; obj->curinst=id; return rcode; } int copyobj(struct objlist *obj, const char *vname,int did,int sid) { struct objlist *robj; unsigned int i; int idn; char value[8]; char *po; struct narray *array; if ((idn=getobjtblpos(obj,vname,&robj))==-1) return -1; if (((robj->table[idn].attrib & NREAD)==0) || ((robj->table[idn].attrib & NWRITE)==0) || (robj->table[idn].type>=NVFUNC)) { error2(obj,ERRPERMISSION,vname); return -1; } po=value; if (getobj(obj,vname,sid,0,NULL,po)==-1) return -1; switch (robj->table[idn].type) { case NVOID: #if USE_LABEL case NLABEL: #endif case NBOOL: case NINT: #if USE_NCHAR case NCHAR: #endif case NENUM: case NDOUBLE: if (putobj(obj,vname,did,po)==-1) return -1; break; case NSTR: case NOBJ: if (*(char **)po==NULL) { if (putobj(obj,vname,did,NULL)==-1) return -1; } else { char *s; s = g_strdup(*(char **)po); if (s == NULL) return -1; if (putobj(obj,vname,did,s)==-1) return -1; } break; case NIARRAY: case NDARRAY: if (*(struct narray **)po==NULL) { if (putobj(obj,vname,did,NULL)==-1) return -1; } else { if ((array=arraynew(arraybase(*(struct narray **)po)))==NULL) return -1; for (i=0;iidp; if (idp == -1) { error(obj, ERRNOID); return -1; } if (getobjid(obj, sid) == -1) { return -1; } if (did == sid) { return did; } dinstcur = chkobjinst(obj, did); if (dinstcur == NULL) { return -1; } exchobj(obj,did,sid); if (delobj(obj, sid) == -1) { exchobj(obj, did, sid); return -1; } obj->curinst = dinstcur[idp].i; return dinstcur[idp].i; } int moveupobj(struct objlist *obj,int id) /* moveupobj() returns id or -1 on error */ { N_VALUE *instcur,*instprev,*instcur2,*instprev2; N_VALUE *inst; int idp,nextp; if ((idp=obj->idp)==-1) { error(obj,ERRNOID); return -1; } if (getobjprev(obj,id,&instcur,&instprev)==NULL) return -1; if (id==0) return id; if ((nextp=obj->nextp)==-1) { error2(obj,ERRVALFOUND,"next"); return -1; } if (getobjprev(obj,id-1,&instcur2,&instprev2)==NULL) return -1; inst=instcur[nextp].inst; if (instprev2==NULL) obj->root=instcur; else instprev2[nextp].inst=instcur; instcur[nextp].inst=instprev; if (instprev==NULL) obj->root=inst; else instprev[nextp].inst=inst; instcur[idp].i--; instprev[idp].i++; obj->curinst=id-1; return id-1; } int movetopobj(struct objlist *obj,int id) /* movetopobj() returns id or -1 on error */ { N_VALUE *instcur,*instprev; N_VALUE *rinst,*pinst,*inst; int idp,nextp; if ((idp=obj->idp)==-1) { error(obj,ERRNOID); return -1; } if (getobjprev(obj,id,&instcur,&instprev)==NULL) return -1; if (id==0) return id; if ((nextp=obj->nextp)==-1) { error2(obj,ERRVALFOUND,"next"); return -1; } rinst=obj->root; inst=instcur[nextp].inst; pinst=instprev[nextp].inst; obj->root=pinst; instcur[nextp].inst=rinst; instprev[nextp].inst=inst; instcur[idp].i=0; instcur=rinst; while (instcur!=inst) { instcur[idp].i++; instcur=instcur[nextp].inst; } obj->curinst=0; return 0; } int movedownobj(struct objlist *obj,int id) /* movedownobj() returns id or -1 on error */ { N_VALUE *instcur,*instprev; N_VALUE *ninst,*inst; int idp,nextp,lid; if ((idp=obj->idp)==-1) { error(obj,ERRNOID); return -1; } if (getobjprev(obj,id,&instcur,&instprev)==NULL) return -1; lid=chkobjlastinst(obj); if (id==lid) return id; if ((nextp=obj->nextp)==-1) { error2(obj,ERRVALFOUND,"next"); return -1; } inst=instcur[nextp].inst; ninst=inst[nextp].inst; if (instprev==NULL) obj->root=inst; else instprev[nextp].inst=inst; inst[nextp].inst=instcur; instcur[nextp].inst=ninst; instcur[idp].i++; inst[idp].i--; obj->curinst=id+1; return id+1; } int movelastobj(struct objlist *obj,int id) /* movelastobj() returns id or -1 on error */ { N_VALUE *instcur,*instprev,*lastinst; N_VALUE *pinst,*inst; int idp,nextp,lid; if ((idp=obj->idp)==-1) { error(obj,ERRNOID); return -1; } if (getobjprev(obj,id,&instcur,&instprev)==NULL) return -1; lid=chkobjlastinst(obj); if ((lastinst=getobjinst(obj,lid))==NULL) return -1; if (id==lid) return id; if ((nextp=obj->nextp)==-1) { error2(obj,ERRVALFOUND,"next"); return -1; } inst=instcur[nextp].inst; if (instprev==NULL) pinst=obj->root; else pinst=instprev[nextp].inst; lastinst[nextp].inst=pinst; instcur[nextp].inst=NULL; if (instprev==NULL) obj->root=inst; else instprev[nextp].inst=inst; instcur[idp].i=lid; while (inst!=instcur) { inst[idp].i--; inst=inst[nextp].inst; } obj->curinst=lid; return lid; } int exchobj(struct objlist *obj,int id1,int id2) /* exchobj() returns id or -1 on error */ { N_VALUE *instcur1,*instprev1; N_VALUE *instcur2,*instprev2; N_VALUE *inst,*inst1,*inst2; int idp,id,nextp; idp = obj->idp; if (idp == -1) { error(obj, ERRNOID); return -1; } if (getobjprev(obj, id1, &instcur1, &instprev1)==NULL || getobjprev(obj, id2, &instcur2, &instprev2)==NULL) { return -1; } if (id1 == id2) { return id1; } nextp = obj->nextp; if (nextp == -1) { error2(obj, ERRVALFOUND, "next"); return -1; } id = instcur1[idp].i; instcur1[idp].i = instcur2[idp].i; instcur2[idp].i = id; if (instprev1 == NULL) { inst1 = obj->root; } else { inst1 = instprev1[nextp].inst; } if (instprev2 == NULL) { inst2 = obj->root; } else { inst2 = instprev2[nextp].inst; } if (instprev1 == NULL) { obj->root = inst2; } else { instprev1[nextp].inst = inst2; } if (instprev2 == NULL) { obj->root = inst1; } else { instprev2[nextp].inst = inst1; } inst = instcur1[nextp].inst; instcur1[nextp].inst = instcur2[nextp].inst; instcur2[nextp].inst = inst; obj->curinst = id2; return id2; } /* char *saveobj(struct objlist *obj, int id) { N_VALUE *instcur,*instnew; if ((instcur=getobjinst(obj,id))==NULL) return NULL; if ((instnew=g_malloc(obj->size))==NULL) return NULL; memcpy(instnew,instcur,obj->size * sizeof(N_VALUE)); return instnew; } char *restoreobj(struct objlist *obj,int id,char *image) { N_VALUE *instcur; if (obj==NULL) return NULL; if ((instcur=getobjinst(obj,id))==NULL) return NULL; memcpy(instcur,image,obj->size * sizeof(N_VALUE)); g_free(image); return instcur; } */ static int chkilist(struct objlist *obj,char *ilist,struct narray *iarray,int def,int *spc) /* spc OBJ_LIST_SPECIFIED_NOT_FOUND: not found OBJ_LIST_SPECIFIED_BY_ID: specified by id OBJ_LIST_SPECIFIED_BY_OID: specified by oid OBJ_LIST_SPECIFIED_BY_NAME: specified by name OBJ_LIST_SPECIFIED_BY_OTHER: specified by other */ { int i,len,snum,dnum,num,sid,l; int oid; char *tok,*s,*iname,*endptr; *spc=OBJ_LIST_SPECIFIED_NOT_FOUND; num=0; tok=NULL; if ((ilist==NULL) || (ilist[0]=='\0')) { if (def) { if ((snum=chkobjcurinst(obj))==-1) return -1; if (arrayadd(iarray,&snum)==NULL) goto errexit; num++; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } } else { while ((s=getitok2(&ilist,&len," \t,"))!=NULL) { g_free(tok); tok=s; iname=NULL; if (s[0]=='@') { if ((snum=chkobjcurinst(obj))==-1) goto errexit; s++; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else if (s[0]=='!') { if ((snum=chkobjlastinst(obj))==-1) goto errexit; s++; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else { if (s[0]=='^') { oid=TRUE; s++; } else oid=FALSE; l=strtol(s,&endptr,10); if (s!=endptr) { if (oid) { snum=chkobjoid(obj,l); *spc=OBJ_LIST_SPECIFIED_BY_OID; } else { snum=chkobjid(obj,l); *spc=OBJ_LIST_SPECIFIED_BY_ID; } if (snum==-1) goto errexit; } s=endptr; } if (s==tok) { snum=0; if ((dnum=chkobjlastinst(obj))==-1) goto errexit; iname=tok; } else if (s[0]=='-') { s++; if (s[0]=='@') { if ((dnum=chkobjcurinst(obj))==-1) goto errexit; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else if (s[0]=='!') { if ((dnum=chkobjlastinst(obj))==-1) goto errexit; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else { l=strtol(s,&endptr,10); if (endptr[0]!='\0') { goto errexit; } else { dnum=getobjid(obj,l); if (dnum==-1) goto errexit; *spc=OBJ_LIST_SPECIFIED_BY_ID; } } } else if (s[0]=='+') { *spc=OBJ_LIST_SPECIFIED_BY_OTHER; s++; if (s[0]=='@') { if ((dnum=chkobjcurinst(obj))==-1) goto errexit; } else if (s[0]=='!') { if ((dnum=chkobjlastinst(obj))==-1) goto errexit; } else { l=strtol(s,&endptr,10); if (endptr[0]!='\0') { goto errexit; } else { dnum=l; } } snum+=dnum; dnum=snum; } else if (s[0]=='\0') { dnum=snum; } else { goto errexit; } if (iname==NULL) { for (i=snum;i<=dnum;i++) { if (chkobjid(obj,i)==-1) goto errexit; if (arrayadd(iarray,&i)==NULL) goto errexit; num++; } } else { *spc=OBJ_LIST_SPECIFIED_BY_NAME; sid=0; if (chkobjname(obj,&sid,iname)==-1) goto errexit; sid=0; while ((snum=chkobjname(obj,&sid,iname))>=0) { if (arrayadd(iarray,&snum)==NULL) goto errexit; num++; } } } } g_free(tok); return num; errexit: g_free(tok); arraydel(iarray); return -1; } static int getilist(struct objlist *obj,char *ilist,struct narray *iarray,int def,int *spc) /* spc OBJ_LIST_SPECIFIED_NOT_FOUND: not found OBJ_LIST_SPECIFIED_BY_ID: specified by id OBJ_LIST_SPECIFIED_BY_OID: specified by oid OBJ_LIST_SPECIFIED_BY_NAME: specified by name OBJ_LIST_SPECIFIED_BY_OTHER: specified by other */ { int i,len,snum,dnum,num,sid,l; int oid; char *tok,*s,*iname,*endptr; *spc=OBJ_LIST_SPECIFIED_NOT_FOUND; num=0; tok=NULL; if ((ilist==NULL) || (ilist[0]=='\0')) { if (def) { if ((snum=getobjcurinst(obj))==-1) return -1; if (arrayadd(iarray,&snum)==NULL) goto errexit; num++; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } } else { while ((s=getitok2(&ilist,&len," \t,"))!=NULL) { g_free(tok); tok=s; iname=NULL; if (s[0]=='@') { if ((snum=getobjcurinst(obj))==-1) goto errexit; s++; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else if (s[0]=='!') { if ((snum=getobjlastinst(obj))==-1) goto errexit; s++; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else { if (s[0]=='^') { oid=TRUE; s++; } else oid=FALSE; l=strtol(s,&endptr,10); if (s!=endptr) { if (oid) { snum=getobjoid(obj,l); *spc=OBJ_LIST_SPECIFIED_BY_OID; } else { snum=getobjid(obj,l); *spc=OBJ_LIST_SPECIFIED_BY_ID; } if (snum==-1) goto errexit; } s=endptr; } if (s==tok) { snum=0; if ((dnum=getobjlastinst(obj))==-1) goto errexit; iname=tok; } else if (s[0]=='-') { s++; if (s[0]=='@') { if ((dnum=getobjcurinst(obj))==-1) goto errexit; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else if (s[0]=='!') { if ((dnum=getobjlastinst(obj))==-1) goto errexit; *spc=OBJ_LIST_SPECIFIED_BY_OTHER; } else { l=strtol(s,&endptr,10); if (endptr[0]!='\0') { error2(obj,ERRILINST,tok); goto errexit; } else { dnum=getobjid(obj,l); if (dnum==-1) goto errexit; *spc=OBJ_LIST_SPECIFIED_BY_ID; } } } else if (s[0]=='+') { *spc=OBJ_LIST_SPECIFIED_BY_OTHER; s++; if (s[0]=='@') { if ((dnum=getobjcurinst(obj))==-1) goto errexit; } else if (s[0]=='!') { if ((dnum=getobjlastinst(obj))==-1) goto errexit; } else { l=strtol(s,&endptr,10); if (endptr[0]!='\0') { error2(obj,ERRILINST,tok); goto errexit; } else { dnum=l; } } snum+=dnum; dnum=snum; } else if (s[0]=='\0') { dnum=snum; } else { error2(obj,ERRILINST,tok); goto errexit; } if (iname==NULL) { for (i=snum;i<=dnum;i++) { if (getobjid(obj,i)==-1) goto errexit; if (arrayadd(iarray,&i)==NULL) goto errexit; num++; } } else { *spc=OBJ_LIST_SPECIFIED_BY_NAME; sid=0; if (getobjname(obj,&sid,iname)==-1) goto errexit; sid=0; while ((snum=chkobjname(obj,&sid,iname))>=0) { if (arrayadd(iarray,&snum)==NULL) goto errexit; num++; } } } } g_free(tok); return num; errexit: g_free(tok); arraydel(iarray); return -1; } int chkobjilist(char *s,struct objlist **obj,struct narray *iarray,int def,int *spc) { char *oname,*ilist; int r; int spc2; r = getobjiname(s, &oname, &s); if (r) { return r; } if ((*obj=chkobject(oname))==NULL) { g_free(oname); return -1; } g_free(oname); if (s[0]==':') s++; ilist=s; if (def && (chkobjlastinst(*obj)==-1)) return -1; if (chkilist(*obj,ilist,iarray,def,&spc2)==-1) return -1; if (spc!=NULL) *spc=spc2; return 0; } int getobjiname(char *s, char **name, char **ptr) { char *oname; int len; *name = NULL; if (s == NULL) { return -1; } len = 0; if (s[0] == ':' || (oname = getitok2(&s, &len, ":")) == NULL) { if (len == -1) { return -1; } error2(NULL, ERRILOBJ, s); return ERRILOBJ; } if (ptr) { *ptr = s; } *name = oname; return 0; } int getobjilist(char *s,struct objlist **obj,struct narray *iarray,int def,int *spc) { char *oname,*ilist; int r; int spc2; r = getobjiname(s, &oname, &s); if (r) { return r; } if ((*obj=getobject(oname))==NULL) { g_free(oname); return -1; } g_free(oname); if (s[0]==':') s++; ilist=s; if (def && (getobjlastinst(*obj)==-1)) return -1; if (getilist(*obj,ilist,iarray,def,&spc2)==-1) return -1; if (spc!=NULL) *spc=spc2; return 0; } int chkobjilist2(char **s,struct objlist **obj,struct narray *iarray,int def) { char *oname,*ilist; int len,num,spc; if ((oname=getitok2(s,&len,":"))==NULL) { if (len==-1) return -1; return ERRILOBJ; } if ((*obj=chkobject(oname))==NULL) { g_free(oname); return -1; } g_free(oname); if (def && (chkobjlastinst(*obj)==-1)) return -1; if ((*s)[0]=='\0') { return ERRILOBJ; } else if ((*s)[0]==':') (*s)++; if ((*s)[0]==':') ilist=NULL; else { if ((ilist=getitok2(s,&len,":"))==NULL) { if (len==-1) return -1; return ERRILOBJ; } } num=chkilist(*obj,ilist,iarray,def,&spc); g_free(ilist); if (num==-1) return -1; if ((*s)[0]==':') (*s)++; return 0; } int getobjilist2(char **s,struct objlist **obj,struct narray *iarray,int def) { char *oname,*ilist; int len,num,spc; if ((oname=getitok2(s,&len,":"))==NULL) { if (len==-1) return -1; error2(NULL,ERRILOBJ,*s); return ERRILOBJ; } if ((*obj=getobject(oname))==NULL) { g_free(oname); return -1; } g_free(oname); if (def && (getobjlastinst(*obj)==-1)) return -1; if ((*s)[0]=='\0') { error2(NULL,ERRILOBJ,*s); return ERRILOBJ; } else if ((*s)[0]==':') (*s)++; if ((*s)[0]==':') ilist=NULL; else { if ((ilist=getitok2(s,&len,":"))==NULL) { if (len==-1) return -1; error2(NULL,ERRILOBJ,*s); return ERRILOBJ; } } num=getilist(*obj,ilist,iarray,def,&spc); g_free(ilist); if (num==-1) return -1; if ((*s)[0]==':') (*s)++; return 0; } char * mkobjlist(struct objlist *obj, const char *objname,int id, const char *field,int oid) { char ids[11]; char *s; int len,flen; if (objname==NULL) objname=chkobjectname(obj); if (oid) sprintf(ids,"^%d",id); else sprintf(ids,"%d",id); if (field!=NULL) flen=strlen(field); else flen=0; if ((s=g_malloc(strlen(objname)+strlen(ids)+flen+3))==NULL) return NULL; strcpy(s,objname); len=strlen(s); s[len]=':'; strcpy(s+len+1,ids); if (field!=NULL) { len=strlen(s); s[len]=':'; strcpy(s+len+1,field); } return s; } struct objlist * getobjlist(char *list,int *id,char **field,int *oid) { char *objname; char *ids,*ids2; int len; struct objlist *obj; char *endptr; objname=getitok2(&list,&len,":"); ids=getitok2(&list,&len,":"); *field=getitok(&list,&len,":"); if ((objname==NULL) || (ids==NULL) || (*field==NULL)) { g_free(objname); g_free(ids); *field=NULL; return NULL; } obj=chkobject(objname); g_free(objname); if (ids[0]=='^') { if (oid!=NULL) *oid=TRUE; ids2=ids+1; } else { if (oid!=NULL) *oid=FALSE; ids2=ids; } *id=strtol(ids2,&endptr,0); if ((ids2[0]=='\0') || (endptr[0]!='\0') || (chkobjoffset(obj,*field)==-1)) { g_free(ids); *field=NULL; return NULL; } g_free(ids); return obj; } char * chgobjlist(char *olist) { char *list,*objname,*newlist; char *ids,*ids2; int id,len; struct objlist *obj; char *endptr; N_VALUE *inst; list=olist; objname=getitok2(&list,&len,":"); ids=getitok2(&list,&len,":"); if ((objname==NULL) || (ids==NULL)) { g_free(objname); g_free(ids); return NULL; } if (ids[0]!='^') { g_free(objname); g_free(ids); if ((newlist=g_malloc(strlen(olist)+1))==NULL) return NULL; strcpy(newlist,olist); return newlist; } ids2=ids+1; id=strtol(ids2,&endptr,0); if ((ids2[0]=='\0') || (endptr[0]!='\0')) { g_free(objname); g_free(ids); return NULL; } g_free(ids); obj=chkobject(objname); if ((inst=chkobjinstoid(obj,id))==NULL) { g_free(objname); return NULL; } _getobj(obj,"id",inst,&id); newlist=mkobjlist(obj,objname,id,NULL,FALSE); g_free(objname); return newlist; } char * getvaluestr(struct objlist *obj,const char *field,void *val,int cr,int quote) { struct narray *array; void *po; char *bval; const char *arglist; unsigned int k, n; int i; enum ngraph_object_field_type type; GString *str; str = g_string_sized_new(64); if (str == NULL) { return NULL; } arglist=chkobjarglist(obj,field); type=chkobjfieldtype(obj,field); po=val; switch (type) { case NBOOL: case NBFUNC: if (*(int *)po) bval="true"; else bval="false"; g_string_append_printf(str,"%s",bval); break; #if USE_NCHAR case NCHAR: case NCFUNC: g_string_append_printf(str,"%c",*(char *)po); break; #endif case NINT: case NIFUNC: g_string_append_printf(str,"%d",*(int *)po); break; case NDOUBLE: case NDFUNC: g_string_append_printf(str,"%.15g",*(double *)po); break; case NSTR: case NSFUNC: case NOBJ: if (*(char **)po==NULL) break; else { bval=*(char **)po; if (quote) g_string_append_printf(str,"'"); for (i=0;bval[i]!='\0';i++) { if ((bval[i]=='\'') && quote) g_string_append_printf(str,"'\\''"); else g_string_append_printf(str,"%c",bval[i]); } if (quote) g_string_append_printf(str,"'"); } break; case NIARRAY: case NIAFUNC: array=*(struct narray **)po; if (array==NULL) break; else { if (quote) g_string_append_printf(str,"'"); n = arraynum(array); for (k=0;k 0 && j >= sargc && arglist[j + 1]) { err = 1; goto errexit; } if (sargc == 0 || (j >= sargc && arglist[j + 1] == '\0')) { s = NULL; } else { s = sargv[j]; } if (add_arg_object(s, &argv)) { err = 3; goto errexit; } break; case 'i': case 'd': case 'b': if (j >= sargc) { err = 2; goto errexit; } r = add_arg_num(arglist[j], sargv[j], &argv); if (r) { err = r; goto errexit; } break; } } } if (sargv) { g_strfreev(sargv); } *argc = getargc(argv); *rargv = argv; return 0; errexit: if (sargv) { g_strfreev(sargv); } arg_del(argv); *argc = -1; *rargv = NULL; return err; } #else static int getargument(int type,char *arglist, char *val,int *argc, char ***rargv) { struct narray *array; int len,alp; char *list,*s, *s2; int vi; double vd; char **argv,*p; int rcode; int i,err; char **enumlist; char *oname,*os; int olen; struct objlist *obj2; array = NULL; argv = NULL; if (arg_add(&argv,NULL) == NULL) { err = 1; goto errexit; } s2 = NULL; alp = 0; if (val == NULL) { *argc = getargc(argv); *rargv = argv; return 0; } list = val; err = -1; if (type == NENUM) { enumlist = (char **)arglist; arglist = "s"; } else { /* initialize to avoid warning nessage */ enumlist = NULL; } while (TRUE) { if ((arglist != NULL) && ((strcmp0(arglist + alp, "s") == 0) || (strcmp0(arglist + alp, "o") == 0))) { if (list[0] == '\0') { s = NULL; len = 0; alp++; } else { s = list; len = strlen(list); list += len; } } else { s=getitok(&list,&len," \t\n\r"); for (;(list[0]!='\0') && (strchr(" \t\n\r",list[0])!=NULL);list++); } if (s==NULL) break; g_free(s2); if ((s2=g_malloc(len+1))==NULL) goto errexit; strncpy(s2,s,len); s2[len]='\0'; if ((arglist!=NULL) && (arglist[alp]=='\0')) { err=1; goto errexit; } if (arglist==NULL) { if ((p=g_malloc(strlen(s2)+1))==NULL) goto errexit; strcpy(p,s2); if (arg_add(&argv,p)==NULL) goto errexit; } else if (arglist[alp]=='o') { if (arglist[1]=='a') { err=3; goto errexit; } os=s2; if ((oname=getitok2(&os,&olen,":"))==NULL) { err=3; goto errexit; } obj2=chkobject(oname); g_free(oname); if ((obj2==NULL) || (os[0]!=':')) { err=3; goto errexit; } for (i=1; (os[i]!='\0')&&(isalnum(os[i])||(strchr("_^@!+-,",os[i])!=NULL));i++); if (os[i]!='\0') { err=3; goto errexit; } if ((p=g_malloc(strlen(s2)+1))==NULL) goto errexit; strcpy(p,s2); if (arg_add(&argv,p)==NULL) goto errexit; } else if (arglist[alp]=='s') { if (arglist[1]=='a') { if (array==NULL) { if ((array=arraynew(sizeof(char *)))==NULL) goto errexit; } if (arrayadd2(array,s2)==NULL) goto errexit; } else { if ((p=g_malloc(strlen(s2)+1))==NULL) goto errexit; strcpy(p,s2); if (arg_add(&argv,p)==NULL) goto errexit; } } else if ((arglist[alp]=='i') || (arglist[alp]=='d')) { str_calc(s2, &vd, &rcode, NULL); if (rcode!=MATH_VALUE_NORMAL) { err=3; goto errexit; } if (arglist[alp]=='i') { if (arglist[1]=='a') { vi=nround(vd); if (array==NULL) { if ((array=arraynew(sizeof(int)))==NULL) goto errexit; } if (arrayadd(array,&vi)==NULL) goto errexit; } else { if ((p=g_malloc(sizeof(int)))==NULL) goto errexit; *(int *)(p)=nround(vd); if (arg_add(&argv,p)==NULL) goto errexit; } } else { if (arglist[1]=='a') { if (array==NULL) { if ((array=arraynew(sizeof(double)))==NULL) goto errexit; } if (arrayadd(array,&vd)==NULL) goto errexit; } else { if ((p=g_malloc(sizeof(double)))==NULL) goto errexit; *(double *)(p)=vd; if (arg_add(&argv,p)==NULL) goto errexit; } } } else if (arglist[alp]=='b') { if ((strcmp0("T",s2)==0) || (strcmp0("True",s2)==0) || (strcmp0("TRUE",s2)==0) || (strcmp0("t",s2)==0) || (strcmp0("true",s2)==0)) vi=TRUE; else if ((strcmp0("F",s2)==0) || (strcmp0("False",s2)==0) || (strcmp0("FALSE",s2)==0) || (strcmp0("f",s2)==0) || (strcmp0("false",s2)==0)) vi=FALSE; else { err=3; goto errexit; } if (arglist[1]=='a') { err=3; goto errexit; } else { if ((p=g_malloc(sizeof(int)))==NULL) goto errexit; *(int *)(p)=vi; if (arg_add(&argv,p)==NULL) goto errexit; } } else if (arglist[alp]=='c') { if (strlen(s2)>1) { err=3; goto errexit; } vi=s2[0]; if (arglist[1]=='a') { err=3; goto errexit; } else { if ((p=g_malloc(sizeof(int)))==NULL) goto errexit; *(int *)(p)=vi; if (arg_add(&argv,p)==NULL) goto errexit; } } else { err=3; goto errexit; } if ((arglist!=NULL) && (arglist[1]!='a')) alp++; } if ((arglist != NULL) && (arglist[1] == 'a')) { if (arg_add(&argv,array) == NULL) { goto errexit; } } else { if ((arglist != NULL) && (arglist[alp] != '\0')) { err = 2; goto errexit; } } if (type == NENUM) { if (argv[0] == NULL) { err = 3; goto errexit; } for (i=0;enumlist[i]!=NULL;i++) { int ofst; ofst = (enumlist[i][0] == '\0') ? 1 : 0; if (strcmp0(enumlist[i] + ofst, argv[0]) == 0) { break; } } if (enumlist[i]==NULL) { err=3; goto errexit; } g_free(argv[0]); if ((p=g_malloc(sizeof(int)))==NULL) goto errexit; *(int *)(p)=i; argv[0] = p; } *argc=getargc(argv); g_free(s2); *rargv=argv; return 0; errexit: arrayfree(array); g_free(s2); arg_del(argv); *argc=-1; *rargv=NULL; return err; } #endif static void freeargument(int type,const char *arglist,int argc,char **argv,int full) { int i; if (argv == NULL) { return; } if (arglist==NULL) { for (i=0;i0) && (arglist[0]!='\0') && (arglist[1]=='a')) { if ((arglist[0]=='i') || (arglist[0]=='d')) arrayfree((struct narray *)(argv[0])); else if (arglist[0]=='s') arrayfree2((struct narray *)(argv[0])); } else for (i=0;iNVFUNC) && (type!=NSFUNC) && (type!=NSAFUNC)) { return -1; } } if (type>=NVFUNC) { arglist=chkobjarglist(obj,field); } else { arglist=""; type=NVOID; } po=value; err=getargument(type,arglist,val,&argc2,&argv2); if (err==1) return ERROEXTARG; else if (err==2) return ERROSMLARG; else if (err==3) return ERROVALUE; else if (err!=0) return -1; if (getobj(obj,field,id,argc2,argv2,po)==-1) err=4; freeargument(type,arglist,argc2,argv2,TRUE); if (err==0) { *valstr=getvaluestr(obj,field,po,cr,quote); if (*valstr==NULL) return -1; return 0; } else return -2; } int sgetobjfield(struct objlist *obj,int id, const char *field,char *arg, char **valstr,int limittype,int cr,int quote) { int err; char *val; int argc2; enum ngraph_object_field_type type; const char *arglist; char **argv2; char value[8]; char *po; *valstr=NULL; val=arg; if (getobjfield(obj,field)==-1) return -1; argv2=NULL; type=chkobjfieldtype(obj,field); if (limittype) { if ((type>NVFUNC) && (type!=NSFUNC) && (type!=NSAFUNC)) { return -1; } } if (type>=NVFUNC) { arglist=chkobjarglist(obj,field); } else { arglist=""; type=NVOID; } po=value; err=getargument(type,arglist,val,&argc2,&argv2); if (err==1) { error22(obj,ERROEXTARG,field,arg); return ERROEXTARG; } else if (err==2) { error22(obj,ERROSMLARG,field,arg); return ERROSMLARG; } else if (err==3) { error22(obj,ERROVALUE,field,arg); return ERROVALUE; } else if (err!=0) return -1; if (getobj(obj,field,id,argc2,argv2,po)==-1) err=4; freeargument(type,arglist,argc2,argv2,TRUE); if (err==0) { *valstr=getvaluestr(obj,field,po,cr,quote); if (*valstr==NULL) return -1; return 0; } else return -2; } static int schkfield(struct objlist *obj,int id,char *arg,char **valstr, int limittype,int cr,int quote) { int err; char *field; int len; char *s; s=arg; *valstr=NULL; len = 0; if ((s==NULL) || (strchr(":= \t",s[0])!=NULL) || ((field=getitok2(&s,&len,":= \t"))==NULL)) { if (len==-1) return -1; return ERRFIELD; } if (s[0]!='\0') s++; while ((s[0]==' ') || (s[0]=='\t')) s++; err=schkobjfield(obj,id,field,s,valstr,limittype,cr,quote); g_free(field); return err; } int sgetfield(struct objlist *obj,int id,char *arg,char **valstr, int limittype,int cr,int quote) { int err; char *field; int len; char *s; s=arg; *valstr=NULL; len = 0; if ((s==NULL) || (strchr(":= \t",s[0])!=NULL) || ((field=getitok2(&s,&len,":= \t"))==NULL)) { if (len==-1) return -1; error2(obj,ERRFIELD,arg); return ERRFIELD; } if (s[0]!='\0') s++; while ((s[0]==' ') || (s[0]=='\t')) s++; err=sgetobjfield(obj,id,field,s,valstr,limittype,cr,quote); g_free(field); return err; } struct narray * sgetobj(char *arg,int limittype,int cr,int quote) { struct objlist *obj; int i,anum,*id; struct narray iarray,*sarray; char *valstr; arrayinit(&iarray,sizeof(int)); if ((sarray=arraynew(sizeof(char *)))==NULL) return NULL; if (chkobjilist2(&arg,&obj,&iarray,TRUE)) { arrayfree2(sarray); return NULL; } anum=arraynum(&iarray); id=arraydata(&iarray); for (i=0;i 0) { int id, oid; id = arraylast_int(&iarray); if (getobj(dobj, "oid", id, 0, NULL, &oid) != -1) { char *dest2; dest2 = (char *) g_malloc(strlen(chkobjectname(dobj)) + 10); if (dest2) { sprintf(dest2, "%s:^%d", chkobjectname(dobj), oid); _putobj(obj, field, inst, dest2); g_free(dest); } } } } arraydel(&iarray); } void obj_do_tighten_all(struct objlist *obj, N_VALUE *inst, const char *field) { char *dest; struct narray iarray; struct objlist *dobj; GString *dest2; if (_getobj(obj, field, inst, &dest)) return; if (dest == NULL) return; dest2 = g_string_sized_new(1024); if (dest2 == NULL) { return; } arrayinit(&iarray, sizeof(int)); if (! getobjilist(dest, &dobj, &iarray, FALSE, NULL)) { char *ptr; int anum, oid, i; anum = arraynum(&iarray); g_string_printf(dest2, "%s:", chkobjectname(dobj)); for (i = 0; i < anum; i++) { int id; id = arraynget_int(&iarray, i); if (getobj(dobj, "oid", id, 0, NULL, &oid) != -1) { g_string_append_printf(dest2, "%s^%d", (i == 0) ? "" : ",", oid); } } ptr = g_string_free(dest2, FALSE); _putobj(obj, field, inst, ptr); } arraydel(&iarray); } int copy_obj_field(struct objlist *obj, int dist, int src, char **ignore_field) { int perm, ignore, j; enum ngraph_object_field_type type; char **ptr; for (j = 0; j < chkobjfieldnum(obj); j++) { char *field; field = chkobjfieldname(obj, j); if (field == NULL) { continue; } perm = chkobjperm(obj, field); type = chkobjfieldtype(obj, field); ignore = FALSE; for (ptr = ignore_field; ptr && *ptr; ptr++) { if (strcmp2(field, *ptr) == 0) { ignore = TRUE; break; } } if (ignore) continue; if ((perm & NREAD) && (perm & NWRITE) && (type < NVFUNC)) { if (copyobj(obj, field, dist, src) == -1) { return 1; } } } return 0; } double arg_to_double(char **argv, int index) { void *ptr; double val; ptr = argv[index]; val = * (double *) ptr; return val; } #ifdef COMPILE_UNUSED_FUNCTIONS static char * getuniqname(struct objlist *obj,char *prefix,char sep) { int i,j,len; char *iname; N_VALUE *inst; char *name; int c[10]; if (chkobjoffset(obj,"name")==-1) return NULL; if (prefix==NULL) len=0; else len=strlen(prefix); if (sep!='\0') len++; if ((name=g_malloc(len+11))==NULL) return NULL; for (i=0;i<10;i++) c[i]=0; while (TRUE) { match: i=0; while (TRUE) { c[i]++; if (c[i]==26) { c[i]=1; i++; if (i==10) return NULL; } else break; } for (i=9;i>=0;i--) if (c[i]!=0) break; if (prefix!=NULL) strcpy(name,prefix); if (sep!='\0') name[len-1]=sep; for (j=len;j<=len+i;j++) name[j]=c[i-j+len]-1+'a'; name[j]='\0'; for (i=0;i<=obj->lastinst;i++) { if ((inst=chkobjinst(obj,i))==NULL) return NULL; if (_getobj(obj,"name",inst,&iname)==-1) return NULL; if ((iname!=NULL) && (strcmp0(iname,name)==0)) goto match; } break; } return name; } #endif /* COMPILE_UNUSED_FUNCTIONS */ ngraph-gtk-6.09.05/src/ostring.c0000644000175000017500000002150113070106167013276 00000000000000/* * $Id: ostring.c,v 1.5 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include "object.h" #include "nstring.h" #define NAME "string" #define PARENT "object" #define OVERSION "1.00.00" #define ERR_INVALID_UTF8 100 #define ERR_REGEXP 101 static char *stringerrorlist[]={ "invalid UTF-8 string.", "invalid regular expression.", }; #define ERRNUM (sizeof(stringerrorlist) / sizeof(*stringerrorlist)) static int stringinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int stringdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static void set_length(struct objlist *obj, N_VALUE *inst, char *str) { int byte, len; if (str) { byte = strlen(str); len = g_utf8_strlen(str, -1); } else { byte = 0; len = 0; } _putobj(obj, "byte", inst, &byte); _putobj(obj, "length", inst, &len); } static int string_strip(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str, *tmp; if (rval->str) { g_free(rval->str); } rval->str = NULL; if (_getobj(obj, "@", inst, &str)) { return 1; } if (str == NULL || str[0] == '\0') { return 0; } tmp = g_strdup(str); if (tmp) { g_strstrip(tmp); } rval->str = tmp; return 0; } static int string_set(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; str = argv[2]; if (str == NULL) { set_length(obj, inst, str); return 0; } if (! g_utf8_validate(str, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } set_length(obj, inst, str); return 0; } static int string_upcase(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; if (rval->str) { g_free(rval->str); } rval->str = NULL; if (_getobj(obj, "@", inst, &str)) { return 1; } if (str == NULL) { return 0; } rval->str = g_utf8_strup(str, -1); return 0; } static int string_downcase(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; if (rval->str) { g_free(rval->str); } rval->str = NULL; if (_getobj(obj, "@", inst, &str)) { return 1; } if (str == NULL) { return 0; } rval->str = g_utf8_strdown(str, -1); return 0; } static int string_reverse(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; if (rval->str) { g_free(rval->str); } rval->str = NULL; if (_getobj(obj, "@", inst, &str)) { return 1; } if (str == NULL) { return 0; } rval->str = g_utf8_strreverse(str, -1); return 0; } static char * utf8_string_slice(const char *str, int size, int byte_size, int start, int len) { char *data, *ptr; if (str == NULL || size < 1 || len <= 0) { return NULL; } if (start < 0) { start = size + start; } if (start < 0) { return NULL; } if (start >= size) { return NULL; } if (start + len > size) { len = size - start; } data = g_malloc(byte_size + 1); if (data == NULL) { return NULL; } ptr = g_utf8_offset_to_pointer(str, start); g_utf8_strncpy(data, ptr, len); return data; } static int string_slice(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; int start, size, byte_size, len; start = * (int *) argv[2]; len = * (int *) argv[3]; if (rval->str) { g_free(rval->str); } rval->str = NULL; if (_getobj(obj, "@", inst, &str)) { return 1; } if (_getobj(obj, "byte", inst, &byte_size)) { return 1; } if (_getobj(obj, "length", inst, &size)) { return 1; } if (str == NULL || len < 1) { return 0; } rval->str = utf8_string_slice(str, size, byte_size, start, len); return 0; } static int string_replace(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { GRegex *regexp; char *str, *pattern, *replace; g_free(rval->str); rval->str = NULL; pattern = (char *) argv[2]; replace = (char *) argv[3]; if (pattern == NULL || pattern[0] == '\0') { return 0; } if (replace == NULL) { replace = ""; } if (! g_utf8_validate(pattern, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } if (! g_utf8_validate(replace, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } if (_getobj(obj, "@", inst, &str)) { return 1; } if(str == NULL || str[0] == '\0') { return 0; } regexp = g_regex_new(pattern, 0, 0, NULL); if (regexp == NULL) { error(obj, ERR_REGEXP); return 1; } rval->str = g_regex_replace(regexp, str, -1, 0, replace, 0, NULL); g_regex_unref(regexp); return 0; } static int string_index(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int pos, size; char *str, *pattern, *ptr, *find; rval->i = -1; pattern = (char *) argv[2]; pos = * (int *) argv[3]; if (pattern == NULL || pattern[0] == '\0') { return 1; } if (_getobj(obj, "length", inst, &size)) { return 2; } if (! g_utf8_validate(pattern, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 2; } if (pos < 0) { pos += size; } if (pos < 0 || pos >= size) { return 1; } if (_getobj(obj, "@", inst, &str)) { return 1; } if(str == NULL || str[0] == '\0') { return 1; } ptr = g_utf8_offset_to_pointer(str, pos); find = g_strstr_len(ptr, -1, pattern); if (find == NULL) { return 1; } rval->i = g_utf8_pointer_to_offset(str, find); return 0; } static int string_rindex(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int pos, size, len; char *str, *pattern, *ptr, *find; rval->i = -1; pattern = (char *) argv[2]; pos = * (int *) argv[3]; if (pattern == NULL || pattern[0] == '\0') { return 1; } if (_getobj(obj, "length", inst, &size)) { return 2; } if (! g_utf8_validate(pattern, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 2; } if (pos < 0) { pos += size; } if (pos < 0 || pos >= size) { return 1; } if (_getobj(obj, "@", inst, &str)) { return 1; } if(str == NULL || str[0] == '\0') { return 1; } ptr = g_utf8_offset_to_pointer(str, pos); len = ptr - str + 1; if (len < 1) { return 1; } find = g_strrstr_len(str, len, pattern); if (find == NULL) { return 1; } rval->i = g_utf8_pointer_to_offset(str, find); return 0; } static int string_match(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { GRegex *regexp; char *str, *pattern; pattern = (char *) argv[2]; rval->i = 0; if (! g_utf8_validate(pattern, -1, NULL)) { error(obj, ERR_INVALID_UTF8); return 1; } _getobj(obj, "@", inst, &str); if (str == NULL || str[0] == '\0') { return 0; } regexp = g_regex_new(pattern, 0, 0, NULL); if (regexp == NULL) { error(obj, ERR_REGEXP); return 1; } rval->i = g_regex_match(regexp, str, 0, NULL); g_regex_unref(regexp); return 0; } static struct objtable ostring[] = { {"init",NVFUNC,NEXEC,stringinit,NULL,0}, {"done",NVFUNC,NEXEC,stringdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"@",NSTR,NREAD|NWRITE,string_set,NULL,0}, {"length",NINT,NREAD,NULL,NULL,0}, {"byte",NINT,NREAD,NULL,NULL,0}, {"strip",NSFUNC,NREAD|NEXEC,string_strip,"",0}, {"upcase",NSFUNC,NREAD|NEXEC,string_upcase,"",0}, {"downcase",NSFUNC,NREAD|NEXEC,string_downcase,"",0}, {"reverse",NSFUNC,NREAD|NEXEC,string_reverse,"",0}, {"slice",NSFUNC,NREAD|NEXEC,string_slice,"ii",0}, {"match",NBFUNC,NREAD|NEXEC,string_match,"s",0}, {"replace",NSFUNC,NREAD|NEXEC,string_replace,"ss",0}, {"index",NIFUNC,NREAD|NEXEC,string_index,"si",0}, {"rindex",NIFUNC,NREAD|NEXEC,string_rindex,"si",0}, }; #define TBLNUM (sizeof(ostring) / sizeof(*ostring)) void *addstring() { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,ostring,ERRNUM,stringerrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/odata.c0000644000175000017500000103546414142161773012724 00000000000000/* * $Id: ofile.c,v 1.113 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #include "nhash.h" #include "ngraph.h" #include "shell.h" #include "osystem.h" #include "object.h" #include "ioutil.h" #include "nstring.h" #include "mathcode.h" #include "mathfn.h" #include "spline.h" #include "gra.h" #include "ntime.h" #include "oroot.h" #include "odraw.h" #include "odata.h" #include "axis.h" #include "nconfig.h" #include "math/math_equation.h" #define UPDATE_PROGRESS_LINE_NUM 0xfff enum { MATH_CONST_NUM, MATH_CONST_MINX, MATH_CONST_MAXX, MATH_CONST_MINY, MATH_CONST_MAXY, MATH_CONST_SUMX, MATH_CONST_SUMY, MATH_CONST_SUMXX, MATH_CONST_SUMYY, MATH_CONST_SUMXY, MATH_CONST_AVX, MATH_CONST_AVY, MATH_CONST_SGX, MATH_CONST_SGY, MATH_CONST_STDEVPX, MATH_CONST_STDEVPY, MATH_CONST_STDEVX, MATH_CONST_STDEVY, TWOPASS_CONST_SIZE, }; enum { MATH_CONST_MASK = TWOPASS_CONST_SIZE, MATH_CONST_MOVE, MATH_CONST_FIRST, MATH_CONST_COLX, MATH_CONST_COLY, MATH_CONST_AXISX, MATH_CONST_AXISX_MIN, MATH_CONST_AXISX_MAX, MATH_CONST_AXISX_LEN, MATH_CONST_AXISY, MATH_CONST_AXISY_MIN, MATH_CONST_AXISY_MAX, MATH_CONST_AXISY_LEN, MATH_CONST_HSKIP, MATH_CONST_RSTEP, MATH_CONST_FLINE, MATH_CONST_DATA_OBJ, MATH_CONST_FILE_OBJ, MATH_CONST_PATH_OBJ, MATH_CONST_RECT_OBJ, MATH_CONST_ARC_OBJ, MATH_CONST_MARK_OBJ, MATH_CONST_TEXT_OBJ, MATH_CONST_D, MATH_CONST_N, MATH_CONST_SIZE, }; static char *FileConstant[MATH_CONST_SIZE] = { "NUM", "MINX", "MAXX", "MINY", "MAXY", "SUMX", "SUMY", "SUMXX", "SUMYY", "SUMXY", "AVX", "AVY", "SGX", "SGY", "STDEVPX", "STDEVPY", "STDEVX", "STDEVY", /* TWOPASS_CONST */ "MASK", "MOVE", "FIRST", "COLX", "COLY", "AXISX", "AXISX_MIN", "AXISX_MAX", "AXISX_LEN", "AXISY", "AXISY_MIN", "AXISY_MAX", "AXISY_LEN", "HSKIP", "RSTEP", "FLINE", "DATA_OBJ", "FILE_OBJ", "PATH_OBJ", "RECT_OBJ", "ARC_OBJ", "MARK_OBJ", "TEXT_OBJ", "%D", "%N", }; #define NAME N_("data") #define ALIAS "file" #define PARENT "draw" #define OVERSION "1.00.00" #define F2DCONF "[data]" #define COLUMN_ARRAY_NAME "COL" #define ERRFILE 100 #define ERROPEN 101 #define ERRSYNTAX 102 #define ERRILLEGAL 103 #define ERRNEST 104 #define ERRNOAXIS 105 #define ERRNOAXISINST 106 #define ERRNOSETAXIS 107 #define ERRMINMAX 108 #define ERRAXISDIR 109 #define ERRMSYNTAX 110 #define ERRMERR 111 #define ERRMNONUM 112 #define ERRSPL 113 #define ERRNOFIT 114 #define ERRNOFITINST 115 #define ERRIFS 116 #define ERRILOPTION 117 #define ERRIGNORE 118 #define ERRNEGATIVE 119 #define ERRREAD 120 #define ERRWRITE 121 #define ERR_SMALL_ARGS 122 #define ERR_INVALID_TYPE 123 #define ERR_INVALID_PARAM 124 #define ERRCONVERGE 125 #define ERR_INVALID_SOURCE 126 #define ERR_INVALID_OBJ 127 #define ERR_INVALID_RANGE 128 static char *f2derrorlist[]={ "file is not specified.", "I/O error: open file", "syntax error in math.", "not allowed function in math.", "sum() or dif(): deep nest in math.", "`axis' is not specified.", "no instance for axis", "axis parameter is not set.", "illegal axis min/max.", "illegal axis direction.", "syntax error in math:", "illegal value in math:", "unnumeric data:", "error: spline interpolation.", "`fit' is not specified.", "no instance for fit", "illegal ifs.", "illegal file option", "illegal value for axis ---> ignored", "negative value in LOG-axis ---> ABS()", "I/O error: read file", "I/O error: write file", "too small number of arguments.", "invalid type.", "invalid parameter.", "convergence error.", "invalid source.", "invalid object.", "invalid range.", }; #define ERRNUM (sizeof(f2derrorlist) / sizeof(*f2derrorlist)) static char *data_type[]={ N_("file"), N_("array"), N_("range"), NULL }; static char *averaging_type_char[]={ N_("simple"), N_("weighted"), N_("exponential"), NULL }; static char *f2dtypechar[]={ N_("mark"), N_("line"), N_("polygon"), N_("polygon_solid_fill"), N_("curve"), N_("diagonal"), N_("arrow"), N_("rectangle"), N_("rectangle_fill"), N_("rectangle_solid_fill"), N_("errorbar_x"), N_("errorbar_y"), N_("staircase_x"), N_("staircase_y"), N_("bar_x"), N_("bar_y"), N_("bar_fill_x"), N_("bar_fill_y"), N_("bar_solid_fill_x"), N_("bar_solid_fill_y"), N_("fit"), NULL }; static int set_math_config(struct objlist *obj, N_VALUE *inst, char *field, char *str); static struct obj_config FileConfig[] = { {"R", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"G", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"B", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"A", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"R2", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"G2", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"B2", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"A2", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"x", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"y", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"type", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"smooth_x", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"smooth_y", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"averaging_type", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"mark_type", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"mark_size", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"line_width", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"line_join", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"line_miter_limit", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"head_skip", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"read_step", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"final_line", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"csv", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"data_clip", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"interpolation", OBJ_CONFIG_TYPE_NUMERIC, NULL, NULL}, {"remark", OBJ_CONFIG_TYPE_STRING, NULL, NULL}, {"ifs", OBJ_CONFIG_TYPE_STRING, NULL, NULL}, {"axis_x", OBJ_CONFIG_TYPE_STRING, NULL, NULL}, {"axis_y", OBJ_CONFIG_TYPE_STRING, NULL, NULL}, {"line_style", OBJ_CONFIG_TYPE_STYLE, NULL, NULL}, {"math_x", OBJ_CONFIG_TYPE_OTHER, set_math_config, obj_save_config_string}, {"math_y", OBJ_CONFIG_TYPE_OTHER, set_math_config, obj_save_config_string}, {"func_f", OBJ_CONFIG_TYPE_OTHER, set_math_config, obj_save_config_string}, {"func_g", OBJ_CONFIG_TYPE_OTHER, set_math_config, obj_save_config_string}, {"func_h", OBJ_CONFIG_TYPE_OTHER, set_math_config, obj_save_config_string}, }; #define MASK_SERACH_METHOD_LINER 0 #define MASK_SERACH_METHOD_BINARY 1 #define MASK_SERACH_METHOD_CONST 2 #define MASK_SERACH_METHOD MASK_SERACH_METHOD_CONST static NHASH FileConfigHash = NULL; #define DXBUFSIZE 101 #define USE_BUF_PTR 1 #define USE_RING_BUF 2 #define BUF_TYPE USE_BUF_PTR #define FIT_FIELD_PREFIX "fit_" #define USE_MEMMOVE 1 #if BUF_TYPE == USE_RING_BUF #define RING_BUF_INC(i) (((i) < DXBUFSIZE) ? ((i) + 1) : 0) #endif #if HAVE_ISFINITE #define check_infinite(v) (! isfinite(v)) #elsif HAVE_FINITE #define check_infinite(v) (! finite(v)) #else #define check_infinite(v) ((v) != (v) || (v) == HUGE_VAL || (v) == - HUGE_VAL) #endif struct rgba { int r, g, b, a; }; struct f2ddata_buf { double dx, dy, d2, d3; struct rgba col, col2; int marksize, marktype, line; int dxstat, dystat, d2stat, d3stat; }; #define EQUATION_NUM 3 struct f2dlocal; struct line_array { char *line; struct narray line_array; }; struct f2ddata { struct objlist *obj; int id,src, GC; char *file; FILE *fd; int x,y; enum {TYPE_NORMAL, TYPE_DIAGONAL, TYPE_ERR_X, TYPE_ERR_Y} type; /* fp->type: 0 normal (dx ... dy) 1 diagonal (dx dy ... d2 d3) 2 error bar x (dx d2 d3 ... dy) 3 error bar y (dx ... dy d2 d3) */ int hskip; int rstep; int final; int csv; char *remark,*ifs, ifs_buf[256]; int line,dline; struct line_array line_array; double count; int eof; int dataclip; double axmin,axmax,aymin,aymax; double axmin2,axmax2,aymin2,aymax2; double axvx,axvy,ayvx,ayvy; int axisx, axisy; int axtype,aytype,axposx,axposy,ayposx,ayposy,axlen,aylen; double ratex,ratey; MathEquation *codex[EQUATION_NUM], *codey[EQUATION_NUM]; MathValue minx, maxx, miny, maxy; int *const_id; struct rgba col, col2, color, color2, fg, bg; int fnumx, fnumy; int *needx, *needy; int dxstat,dystat,d2stat,d3stat; double dx,dy,d2,d3; int maxdim, use_column_array, use_column_string_array; int column_array_id_x, column_array_id_y, column_string_array_id_x, column_string_array_id_y; int need2pass; double sumx,sumy,sumxx,sumyy,sumxy; int num,datanum,prev_datanum; int marksize0,marksize; int marktype0,marktype; int ignore,negative; int msize,mtype; struct f2ddata_buf buf[DXBUFSIZE]; #if BUF_TYPE == USE_BUF_PTR struct f2ddata_buf *buf_ptr[DXBUFSIZE]; #elif BUF_TYPE == USE_RING_BUF int ringbuf_top; #endif int bufnum,bufpo; int smooth,smoothx,smoothy; int averaging_type; int masknum; int *mask; #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_CONST int mask_index; #endif int movenum; double *movex,*movey; int *move; time_t mtime; int interrupt; struct narray fileopen; struct array_prm array_data; double range_min, range_max; int range_div; struct f2dlocal *local; double text_align_h, text_align_v; int text_font, text_style, text_pt, text_space, text_script; MathExpression *end_expression; }; struct f2dlocal { MathEquation *codex[EQUATION_NUM], *codey[EQUATION_NUM]; MathValue minx, maxx, miny, maxy; int const_id[MATH_CONST_SIZE]; int maxdimx,maxdimy, column_array_id_x, column_array_id_y, column_string_array_id_x, column_string_array_id_y; int need2passx,need2passy,total_line; struct f2ddata *data; int coord,idx,idy,id2,id3,icx,icy,ic2,ic3,isx,isy,is2,is3,iline; FILE *storefd; int endstore; double sumx, sumy, sumxx, sumyy, sumxy; double dminx, dmaxx, dminy, dmaxy, davx, davy, dstdevpx, dstdevpy, dstdevx, dstdevy; int num, rcode, use_drawing_func; time_t mtime, mtime_stat; }; struct point_pos { double x, y, d; }; struct line_position { int x0, y0, x1, y1; }; struct error_info { int emerr, emnonum, emig, emng; }; static void draw_arrow(struct f2ddata *fp ,int GC, double x0, double y0, double x1, double y1, int msize, struct line_position *lp); static int set_data_progress(struct f2ddata *fp); static int getminmaxdata(struct f2ddata *fp, struct f2dlocal *local); static int calc_fit_equation(struct objlist *obj, N_VALUE *inst, double x, double *y); static void f2dtransf(double x,double y,int *gx,int *gy,void *local); static int _f2dtransf(double x,double y,int *gx,int *gy,void *local); static int f2drectclipf(double *x0,double *y0,double *x1,double *y1,void *local); static int f2dlineclipf(double *x0,double *y0,double *x1,double *y1,void *local); static int getposition(struct f2ddata *fp,double x,double y,int *gx,int *gy); static int getposition2(struct f2ddata *fp,int axtype,int aytype,double *x,double *y); static void set_column_array(MathEquation **code, int id, MathValue *gdata, int maxdim); static void draw_errorbar(struct f2ddata *fp, int GC, int size, double dx0, double dy0, double dx1, double dy1); static void poly_add_point(struct narray *pos, double x, double y, struct f2ddata *fp); static void poly_add_clip_point(struct narray *pos, double minx, double miny, double maxx, double maxy, double x, double y, struct f2ddata *fp); static int poly_pos_sort_cb(const void *a, const void *b); static void poly_set_pos(struct point_pos *p, int i, double x, double y, double x0, double y0); static int poly_add_elements(struct narray *pos, double minx, double miny, double maxx, double maxy, double x0, double y0, double x1, double y1, struct f2ddata *fp); static void add_polygon_point(struct narray *pos, double x0, double y0, double x1, double y1, struct f2ddata *fp); static void uniq_points(struct narray *pos); static void draw_polygon(struct narray *pos, int GC, int fill); #if BUF_TYPE == USE_RING_BUF int ring_buf_index(struct f2ddata *fp, int i) { int n; n = fp->ringbuf_top + i; return (n < DXBUFSIZE) ? n : n % DXBUFSIZE; } #endif static void check_ifs_init(struct f2ddata *fp) { char *ifs, *remark; int i; ifs = fp->ifs; remark = fp->remark; memset(fp->ifs_buf, 0, sizeof(fp->ifs_buf)); if (ifs) { for (; *ifs; ifs++) { i = *ifs; if (i > 0) { fp->ifs_buf[i] |= 1; } } } if (remark) { for (; *remark; remark++) { i = *remark; if (i > 0) { fp->ifs_buf[i] |= 2; } } } } #define CHECK_IFS(buf, ch) (buf[(unsigned char) ch] & 1) #define CHECK_REMARK(remark, buf, ch) (remark && (buf[(unsigned char) ch] & 2)) #define FILE_OBJ_COLOR_COLOR 0 #define FILE_OBJ_COLOR_ALPHA 1 struct object_color_type { char *name; enum { COLOR_TYPE_MARK, COLOR_TYPE_PATH, COLOR_TYPE_TEXT, } color_type; }; static int line_number(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } rval->val = fp->line; return 0; } static int file_obj_color_alpha(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, int type) { struct f2ddata *fp; struct objlist *obj; int id, object_id, color_type; struct object_color_type obj_names[] = { {"data", COLOR_TYPE_MARK}, {"path", COLOR_TYPE_PATH}, {"rectangle", COLOR_TYPE_PATH}, {"arc", COLOR_TYPE_PATH}, {"mark", COLOR_TYPE_MARK}, {"text", COLOR_TYPE_TEXT}, }; unsigned int i; *rval = exp->buf[0].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } id = exp->buf[0].val.val; object_id = exp->buf[1].val.val; if (object_id == 0) { object_id = chkobjectid(fp->obj); } obj = NULL; color_type = COLOR_TYPE_TEXT; for (i = 0; i < sizeof(obj_names) / sizeof(*obj_names); i++) { obj = getobject(obj_names[i].name); if (obj && object_id == chkobjectid(obj)) { color_type = obj_names[i].color_type; break; } obj = NULL; } if (obj == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (chkobjinst(obj, id) == NULL) { return 0; } switch (color_type) { case COLOR_TYPE_MARK: if (type == FILE_OBJ_COLOR_COLOR) { getobj(obj, "R2", id, 0, NULL, &fp->color2.r); getobj(obj, "G2", id, 0, NULL, &fp->color2.g); getobj(obj, "B2", id, 0, NULL, &fp->color2.b); } else { getobj(obj, "A2", id, 0, NULL, &fp->color2.a); } /* fall through */ case COLOR_TYPE_TEXT: if (type == FILE_OBJ_COLOR_COLOR) { getobj(obj, "R", id, 0, NULL, &fp->color.r); getobj(obj, "G", id, 0, NULL, &fp->color.g); getobj(obj, "B", id, 0, NULL, &fp->color.b); } else { getobj(obj, "A", id, 0, NULL, &fp->color.a); } break; case COLOR_TYPE_PATH: if (type == FILE_OBJ_COLOR_COLOR) { getobj(obj, "stroke_R", id, 0, NULL, &fp->color.r); getobj(obj, "stroke_G", id, 0, NULL, &fp->color.g); getobj(obj, "stroke_B", id, 0, NULL, &fp->color.b); getobj(obj, "fill_R", id, 0, NULL, &fp->color2.r); getobj(obj, "fill_G", id, 0, NULL, &fp->color2.g); getobj(obj, "fill_B", id, 0, NULL, &fp->color2.b); } else { getobj(obj, "stroke_A", id, 0, NULL, &fp->color.a); getobj(obj, "fill_A", id, 0, NULL, &fp->color2.a); } break; } fp->local->use_drawing_func = TRUE; return 0; } static int file_objcolor(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_obj_color_alpha(exp, eq, rval, FILE_OBJ_COLOR_COLOR); } static int file_objalpha(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_obj_color_alpha(exp, eq, rval, FILE_OBJ_COLOR_ALPHA); } static int file_color(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int color, val; *rval = exp->buf[1].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } color = exp->buf[0].val.val; val = exp->buf[1].val.val; #if 0 if (val < 0 || val > 255) { rval->type = MATH_VALUE_ERROR; return 1; } #else if (color < 8) { if (val < 0) { val = 0; } else if (val > 255) { val = 255; } } #endif switch (color) { case 0: fp->color.r = val; break; case 1: fp->color.g = val; break; case 2: fp->color.b = val; break; case 3: fp->color.r = fp->color.g = fp->color.b = val; break; case 4: fp->color2.r = val; break; case 5: fp->color2.g = val; break; case 6: fp->color2.b = val; break; case 7: fp->color2.r = fp->color2.g = fp->color2.b = val; break; case 8: fp->color.r = ((val >> 16) & 0xff); fp->color.g = ((val >> 8) & 0xff); fp->color.b = (val & 0xff); break; case 9: fp->color2.r = ((val >> 16) & 0xff); fp->color2.g = ((val >> 8) & 0xff); fp->color2.b = (val & 0xff); break; default: rval->type = MATH_VALUE_ERROR; return 1; } fp->local->use_drawing_func = TRUE; return 0; } static int file_alpha(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int alpha, color; *rval = exp->buf[0].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } alpha = exp->buf[0].val.val; #if 0 if (alpha < 0 || alpha > 255) { rval->type = MATH_VALUE_ERROR; return 1; } #else if (alpha < 0) { alpha = 0; } else if (alpha > 255) { alpha = 255; } #endif color = exp->buf[1].val.val; switch (color) { case 1: fp->color.a = alpha; break; case 2: fp->color2.a = alpha; break; default: fp->color.a = alpha; fp->color2.a = alpha; } fp->local->use_drawing_func = TRUE; return 0; } static int file_rgb_sub(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, int color2) { struct f2ddata *fp; int r, g, b; *rval = exp->buf[2].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } r = exp->buf[0].val.val * 255; g = exp->buf[1].val.val * 255; b = exp->buf[2].val.val * 255; #if 0 if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) { rval->type = MATH_VALUE_ERROR; return 1; } #else if (r < 0) { r = 0; } else if (r > 255) { r = 255; } if (g < 0) { g = 0; } else if (g > 255) { g = 255; } if (b < 0) { b = 0; } else if (b > 255) { b = 255; } #endif if (color2) { fp->color2.r = r; fp->color2.g = g; fp->color2.b = b; } else { fp->color.r = r; fp->color.g = g; fp->color.b = b; } fp->local->use_drawing_func = TRUE; return 0; } static int file_rgb(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_rgb_sub(exp, eq, rval, FALSE); } static int file_rgb2(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_rgb_sub(exp, eq, rval, TRUE); } static int file_hsb_sub(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, int color2) { struct f2ddata *fp; double h, s, b; int r, g, bb; *rval = exp->buf[2].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } h = exp->buf[0].val.val; s = exp->buf[1].val.val; b = exp->buf[2].val.val; #if 0 if (h < 0 || h > 1 || s < 0 || s > 1 || b < 0 || b > 1) { rval->type = MATH_VALUE_ERROR; return 1; } #else if (h < 0) { h = 0; } else if (h > 1) { h = 1; } if (s < 0) { s = 0; } else if (s > 1) { s = 1; } if (b < 0) { b = 0; } else if (b > 1) { b = 1; } #endif HSB2RGB(h, s, b, &r, &g, &bb); if (color2) { fp->color2.r = r; fp->color2.g = g; fp->color2.b = bb; } else { fp->color.r = r; fp->color.g = g; fp->color.b = bb; } fp->local->use_drawing_func = TRUE; return 0; } static int file_hsb(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_hsb_sub(exp, eq, rval, FALSE); } static int file_hsb2(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_hsb_sub(exp, eq, rval, TRUE); } static int file_marksize(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int size; *rval = exp->buf[0].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } size = exp->buf[0].val.val; if (size < 0 || size > 65536) { rval->type = MATH_VALUE_ERROR; return 1; } fp->marksize = size; return 0; } static int file_marktype(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int type; *rval = exp->buf[0].val; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } type = exp->buf[0].val.val; if (type < 0 || type >= MARK_TYPE_NUM) { rval->type = MATH_VALUE_ERROR; return 1; } fp->marktype = type; return 0; } static int file_fit_calc(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int file_id, r; double x, y; static struct objlist *file_obj = NULL; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } if (file_obj == NULL) { file_obj = getobject("data"); } if (file_obj == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } file_id = exp->buf[0].val.val; x = exp->buf[1].val.val; r = ofile_calc_fit_equation(file_obj, file_id, x, &y); if (r) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = y; rval->type = MATH_VALUE_NORMAL; return 0; } static int file_fit_prm(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int file_id, prm, r; char *argv[2], *ptr; struct savedstdio save; static struct objlist *file_obj = NULL; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } if (file_obj == NULL) { file_obj = getobject("data"); } if (file_obj == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } file_id = exp->buf[0].val.val; prm = exp->buf[1].val.val; argv[0] = (char *) &prm; argv[1] = NULL; ignorestdio(&save); r = getobj(file_obj, "fit_prm", file_id, 1, argv, &ptr); restorestdio(&save); if (r < 0 || ptr == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } rval->val = atof(ptr); rval->type = MATH_VALUE_NORMAL; return 0; } #define ARC_INTERPOLATION 20 #define DRAW_ARC_ARG_NUM 10 static int file_draw_arc(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int i, num, stroke, fill, pie, close, cx, cy, ap[ARC_INTERPOLATION * 2], *pdata, px, py; double x, y, rx, ry, angle1, angle2; struct narray expand_points; rval->val = 0; for (i = 0; i < DRAW_ARC_ARG_NUM; i++) { if (exp->buf[i].val.type != MATH_VALUE_NORMAL) { return 0; } } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } x = exp->buf[0].val.val; y = exp->buf[1].val.val; rx = exp->buf[2].val.val; ry = exp->buf[3].val.val; angle1 = exp->buf[4].val.val; angle2 = exp->buf[5].val.val; pie = exp->buf[6].val.val; stroke = exp->buf[7].val.val; fill = exp->buf[8].val.val; close = exp->buf[9].val.val; if (getposition(fp, x, y, &cx, &cy)) { return 0; } angle2 = fmod(angle2, 360); if (angle2 == 0.0) { angle2 = 360; close = TRUE; } for (i = 0; i < ARC_INTERPOLATION; i++) { int r; double ax, ay, angle; angle = angle1 + angle2 / (ARC_INTERPOLATION - 1) * i; angle = MPI * angle / 180.0; ax = x + rx * cos(angle); ay = y + ry * sin(angle); r = getposition2(fp, fp->axtype, fp->aytype, &ax, &ay); if (r) { rval->type = MATH_VALUE_ERROR; return -1; } f2dtransf(ax, ay, ap + i * 2, ap + i * 2 + 1, fp); } arrayinit(&expand_points, sizeof(int)); if (curve_expand_points(ap, ARC_INTERPOLATION, INTERPOLATION_TYPE_SPLINE, &expand_points)) { arraydel(&expand_points); return 1; } if (pie) { arrayadd(&expand_points, &cx); arrayadd(&expand_points, &cy); } num = arraynum(&expand_points) / 2; pdata = arraydata(&expand_points); GRAcurrent_point(fp->GC, &px, &py); if (fill) { GRAcolor(fp->GC, fp->color2.r, fp->color2.g, fp->color2.b, fp->color2.a); GRAdrawpoly(fp->GC, num, pdata, GRA_FILL_MODE_EVEN_ODD); } if (stroke) { GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); if (close) { GRAdrawpoly(fp->GC, num, pdata, GRA_FILL_MODE_NONE); } else { int n; n = (pie) ? num - 1 : num; GRAmoveto(fp->GC, pdata[0], pdata[1]); for (i = 1; i < n; i++) { GRAlineto(fp->GC, pdata[i * 2], pdata[i * 2 + 1]); } } } GRAmoveto(fp->GC, px, py); arraydel(&expand_points); fp->local->use_drawing_func = TRUE; return 0; } static int file_draw_rect(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int i, stroke, fill, ap[8], px, py; double pos[4]; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL || exp->buf[3].val.type != MATH_VALUE_NORMAL || exp->buf[4].val.type != MATH_VALUE_NORMAL || exp->buf[5].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } for (i = 0; i < 4; i++) { pos[i] = exp->buf[i].val.val; } pos[2] += pos[0]; pos[3] += pos[1]; stroke = exp->buf[4].val.val; fill = exp->buf[5].val.val; for (i = 0; i < 2; i++) { int r; r = getposition2(fp, fp->axtype, fp->aytype, pos + i * 2, pos + i * 2 + 1); if (r) { rval->type = MATH_VALUE_ERROR; return -1; } } if (f2drectclipf(pos, pos + 1, pos + 2, pos + 3, fp)) { return 0; } f2dtransf(pos[0], pos[1], ap + 0, ap + 1, fp); f2dtransf(pos[0], pos[3], ap + 2, ap + 3, fp); f2dtransf(pos[2], pos[3], ap + 4, ap + 5, fp); f2dtransf(pos[2], pos[1], ap + 6, ap + 7, fp); GRAcurrent_point(fp->GC, &px, &py); if (fill) { GRAcolor(fp->GC, fp->color2.r, fp->color2.g, fp->color2.b, fp->color2.a); GRAdrawpoly(fp->GC, 4, ap, GRA_FILL_MODE_EVEN_ODD); } if (stroke) { GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); GRAdrawpoly(fp->GC, 4, ap, GRA_FILL_MODE_NONE); } GRAmoveto(fp->GC, px, py); fp->local->use_drawing_func = TRUE; return 0; } static int file_draw_line(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int i, px, py, msize, arrow; double pos[4]; struct line_position lp1, lp2; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL || exp->buf[3].val.type != MATH_VALUE_NORMAL || exp->buf[4].val.type != MATH_VALUE_NORMAL || exp->buf[5].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } for (i = 0; i < 4; i++) { pos[i] = exp->buf[i].val.val; } arrow = exp->buf[4].val.val; msize = exp->buf[5].val.val * 100; if (msize <= 0) { msize = fp->marksize; } GRAcurrent_point(fp->GC, &px, &py); GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); switch (arrow) { case ARROW_POSITION_END: draw_arrow(fp, fp->GC, pos[0], pos[1], pos[2], pos[3], msize, &lp1); GRAline(fp->GC, lp1.x0, lp1.y0, lp1.x1, lp1.y1); break; case ARROW_POSITION_BEGIN: draw_arrow(fp, fp->GC, pos[2], pos[3], pos[0], pos[1], msize, &lp1); GRAline(fp->GC, lp1.x1, lp1.y1, lp1.x0, lp1.y0); break; case ARROW_POSITION_BOTH: draw_arrow(fp, fp->GC, pos[0], pos[1], pos[2], pos[3], msize, &lp1); draw_arrow(fp, fp->GC, pos[2], pos[3], pos[0], pos[1], msize, &lp2); GRAline(fp->GC, lp2.x1, lp2.y1, lp1.x1, lp1.y1); break; default: draw_arrow(fp, fp->GC, pos[0], pos[1], pos[2], pos[3], 0, &lp1); GRAline(fp->GC, lp1.x0, lp1.y0, lp1.x1, lp1.y1); break; } GRAmoveto(fp->GC, px, py); fp->local->use_drawing_func = TRUE; return 0; } static int file_draw_errorbar(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int px, py; double x, y, erx, ery, size; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL || exp->buf[3].val.type != MATH_VALUE_NORMAL || exp->buf[4].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } x = exp->buf[0].val.val; y = exp->buf[1].val.val; erx = exp->buf[2].val.val; ery = exp->buf[3].val.val; size = exp->buf[4].val.val * 100; if (size < 1) { size = fp->marksize; } GRAcurrent_point(fp->GC, &px, &py); GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); if (erx != 0) { draw_errorbar(fp, fp->GC, size / 2, x - erx, y, x + erx, y); } if (ery != 0) { draw_errorbar(fp, fp->GC, fp->marksize / 2, x, y - ery, x, y + ery); } GRAmoveto(fp->GC, px, py); fp->local->use_drawing_func = TRUE; return 0; } static int file_draw_errorbar2(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int px, py, size; double x0, y0, x1, y1; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL || exp->buf[3].val.type != MATH_VALUE_NORMAL || exp->buf[4].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } x0 = exp->buf[0].val.val; y0 = exp->buf[1].val.val; x1 = exp->buf[2].val.val; y1 = exp->buf[3].val.val; size = exp->buf[4].val.val * 100; if (size < 1) { size = fp->marksize; } GRAcurrent_point(fp->GC, &px, &py); GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); draw_errorbar(fp, fp->GC, size / 2, x0, y0, x1, y1); GRAmoveto(fp->GC, px, py); fp->local->use_drawing_func = TRUE; return 0; } static int file_draw_mark(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; int cx, cy, size; double x, y; rval->val = 0; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } x = exp->buf[0].val.val; y = exp->buf[1].val.val; size = exp->buf[2].val.val * 100; if (size <= 0) { size = fp->marksize; } if (getposition(fp, x, y, &cx, &cy)) { return 0; } if (size > 0) { int px, py; GRAcurrent_point(fp->GC, &px, &py); GRAmark(fp->GC, fp->marktype, cx, cy, size, fp->color.r, fp->color.g, fp->color.b, fp->color.a, fp->color2.r, fp->color2.g, fp->color2.b, fp->color2.a); GRAmoveto(fp->GC, px, py); fp->local->use_drawing_func = TRUE; } return 0; } static void draw_lines(struct narray *pos, int GC) { int n, *ap; uniq_points(pos); ap = (int *) arraydata(pos); n = arraynum(pos); if (n > 3) { GRAlines(GC, n / 2, ap); } } struct LineStyleInfo { int num, *type, width, miter; enum GRA_LINE_CAP cap; enum GRA_LINE_JOIN join; }; static void save_line_style(int GC, struct LineStyleInfo *info) { GRA_get_linestyle(GC, &info->num, &info->type, &info->width, &info->cap, &info->join, &info->miter); } static void restore_line_style(int GC, struct LineStyleInfo *info) { GRAlinestyle(GC, info->num, info->type, info->width, info->cap, info->join, info->miter); if (info->type) { g_free(info->type); info->type = NULL; } } static void set_line_style(struct f2ddata *fp) { int width, join, miter, n, *type; struct narray *style; getobj(fp->obj, "line_width", fp->id, 0, NULL, &width); getobj(fp->obj, "line_style", fp->id, 0, NULL, &style); getobj(fp->obj, "line_join", fp->id, 0, NULL, &join); getobj(fp->obj, "line_miter_limit", fp->id, 0, NULL, &miter); n = arraynum(style); type = arraydata(style); GRAlinestyle(fp->GC, n, type, width, GRA_LINE_CAP_BUTT, join, miter); } static int file_draw_path(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, int stroke, int fill, int close) { struct f2ddata *fp; int i, id, n, first, px, py; double x0, y0, x1, y1, x2, y2; MathEquationArray *ax, *ay; struct narray pos; struct LineStyleInfo info; rval->val = 0; id = exp->buf[0].array.idx; ax = math_equation_get_array(eq, id); if (ax == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } n = ax->num; id = exp->buf[1].array.idx; ay = math_equation_get_array(eq, id); if (ay == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (ay->num < n) { n = ay->num; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->GC < 0) { return 0; } save_line_style(fp->GC, &info); set_line_style(fp); arrayinit(&pos, sizeof(int)); first = TRUE; for (i = 0; i < n; i++) { if (ax->data.val[i].type == MATH_VALUE_NORMAL && ay->data.val[i].type == MATH_VALUE_NORMAL) { if (first) { first = FALSE; x0 = ax->data.val[i].val; y0 = ay->data.val[i].val; x2 = ax->data.val[i].val; y2 = ay->data.val[i].val; } else { x1 = x2; y1 = y2; x2 = ax->data.val[i].val; y2 = ay->data.val[i].val; add_polygon_point(&pos, x1, y1, x2, y2, fp); } } } if (first) { goto End; } if (close) { add_polygon_point(&pos, x2, y2, x0, y0, fp); } if (fill < 0) { fill = GRA_FILL_MODE_NONE; } else if (fill > GRA_FILL_MODE_WINDING) { fill = GRA_FILL_MODE_WINDING; } GRAcurrent_point(fp->GC, &px, &py); GRAcolor(fp->GC, fp->color2.r, fp->color2.g, fp->color2.b, fp->color2.a); if (fill) { draw_polygon(&pos, fp->GC, fill); } GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); if (stroke) { if (close) { draw_polygon(&pos, fp->GC, GRA_FILL_MODE_NONE); } else { draw_lines(&pos, fp->GC); } } GRAmoveto(fp->GC, px, py); arraydel(&pos); fp->local->use_drawing_func = TRUE; End: restore_line_style(fp->GC, &info); return 0; } static int file_draw_polyline(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_draw_path(exp, eq, rval, TRUE, FALSE, FALSE); } static int file_draw_polygon(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int stroke, fill; if (exp->buf[2].val.type != MATH_VALUE_NORMAL || exp->buf[3].val.type != MATH_VALUE_NORMAL) { return 0; } stroke = exp->buf[2].val.val; fill = exp->buf[3].val.val; return file_draw_path(exp, eq, rval, stroke, fill, TRUE); } static int file_text_align(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } fp->text_align_h = exp->buf[0].val.val; if (fp->text_align_h < 0) { fp->text_align_h = 0; } else if (fp->text_align_h > 1) { fp->text_align_h = 1; } fp->text_align_v = exp->buf[1].val.val; if (fp->text_align_v < 0) { fp->text_align_v = 0; } else if (fp->text_align_v > 1) { fp->text_align_v = 1; } return 0; } static int file_text_font(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } fp->text_font = exp->buf[0].val.val; if (fp->text_font <= 0) { fp->text_font = 0; } return 0; } static int file_text_style(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } fp->text_style = exp->buf[0].val.val; if (fp->text_style < 0) { fp->text_style = 0; } else if (fp->text_style > GRA_FONT_STYLE_MAX) { fp->text_style = GRA_FONT_STYLE_MAX; } return 0; } static int file_text_size(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; if (exp->buf[0].val.type != MATH_VALUE_NORMAL || exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL) { return 0; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } fp->text_pt = exp->buf[0].val.val * 100; fp->text_space = exp->buf[1].val.val * 100; fp->text_script = exp->buf[2].val.val * 100; if (fp->text_pt <= 0) { fp->text_pt = DEFAULT_FONT_PT; } if (fp->text_script <= 0) { fp->text_script = DEFAULT_SCRIPT_SIZE; } else if (fp->text_script < SCRIPT_SIZE_MIN) { fp->text_script = SCRIPT_SIZE_MIN; } else if (fp->text_script > SCRIPT_SIZE_MAX) { fp->text_script = SCRIPT_SIZE_MAX; } return 0; } static int file_draw_text_sub(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval, int raw) { double x, y, si, co, rdir, h_shift, v_shift; int font_id, pt, space, dir, script, style; int px, py, cx, cy; int w, h, bbox[4]; struct f2ddata *fp; char *str, *font; if (exp->buf[1].val.type != MATH_VALUE_NORMAL || exp->buf[2].val.type != MATH_VALUE_NORMAL || exp->buf[3].val.type != MATH_VALUE_NORMAL || exp->buf[4].val.type != MATH_VALUE_NORMAL || exp->buf[5].val.type != MATH_VALUE_NORMAL || exp->buf[6].val.type != MATH_VALUE_NORMAL || exp->buf[7].val.type != MATH_VALUE_NORMAL) { return 0; } if (! raw && exp->buf[8].val.type != MATH_VALUE_NORMAL) { return 0; } x = exp->buf[1].val.val; y = exp->buf[2].val.val; dir = exp->buf[3].val.val * 100; pt = exp->buf[4].val.val * 100; font_id = exp->buf[5].val.val; style = exp->buf[6].val.val; space = exp->buf[7].val.val * 100; script = 0; fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (! raw) { script = exp->buf[8].val.val * 100; } if (font_id <= 0) { font_id = fp->text_font; } if (pt <= 0) { pt = fp->text_pt; } if (script <= 0) { script = fp->text_script; } else if (script < SCRIPT_SIZE_MIN) { script = SCRIPT_SIZE_MIN; } else if (script > SCRIPT_SIZE_MAX) { script = SCRIPT_SIZE_MAX; } if (style <= 0) { style = fp->text_style; } else if (style > GRA_FONT_STYLE_MAX) { style = GRA_FONT_STYLE_MAX; } rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = (char *) math_expression_get_string_from_argument(exp, 0); if (str == NULL) { return 0; } if (fp->GC < 0) { return 0; } if (getposition(fp, x, y, &cx, &cy)) { return 0; } switch (font_id) { case 1: font = "Serif"; break; case 2: font = "Monospace"; break; default: font = "Sans-serif"; break; } text_get_bbox(0, 0, str, font, style, pt, 0, space, script, raw, bbox); w = bbox[2] - bbox[0]; h = bbox[3] - bbox[1]; rdir = dir / 18000.0 * MPI; si = sin(rdir); co = cos(rdir); h_shift = bbox[0] + w * fp->text_align_h; v_shift = bbox[1] + h * (1 - fp->text_align_v); cx = cx - h_shift * co - v_shift * si; cy = cy + h_shift * si - v_shift * co; GRAcurrent_point(fp->GC, &px, &py); GRAcolor(fp->GC, fp->color.r, fp->color.g, fp->color.b, fp->color.a); GRAmoveto(fp->GC, cx, cy); if (raw) { GRAdrawtextraw(fp->GC, str, font, style, pt, space, dir); } else { GRAdrawtext(fp->GC, str, font, style, pt, space, dir, script); } GRAmoveto(fp->GC, px, py); fp->local->use_drawing_func = TRUE; return 0; } static int file_draw_text(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_draw_text_sub(exp, eq, rval, FALSE); } static int file_draw_text_raw(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { return file_draw_text_sub(exp, eq, rval, TRUE); } static int file_on_end(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { MathExpression *end_exp; struct f2ddata *fp; end_exp = exp->buf[0].exp; fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } fp->end_expression = end_exp; return 0; } static int file_text_obj_set(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id; const char *str; char *tmp; struct objlist *text_obj; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } id = exp->buf[0].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_from_argument(exp, 1); if (str == NULL) { return 0; } text_obj = getobject("text"); if (text_obj == NULL) { return 0; } tmp = g_strdup(str); if (tmp == NULL) { return 0; } putobj(text_obj, "text", id, tmp); return 0; } static int file_text_obj_get(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int id; char *str; struct objlist *text_obj; GString *gstr; if (exp->buf[0].val.type != MATH_VALUE_NORMAL) { return 0; } id = exp->buf[0].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; gstr = math_expression_get_string_variable_from_argument(exp, 1); if (gstr == NULL) { return 0; } text_obj = getobject("text"); if (text_obj == NULL) { return 0; } getobj(text_obj, "text", id, 0, NULL, &str); if (str == NULL) { return 0; } g_string_assign(gstr, str); return 0; } static int file_string_column(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int n, col; struct f2ddata *fp; GString *str; struct narray *array; if (exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } col = exp->buf[1].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_variable_from_argument(exp, 0); if (str == NULL) { return 1; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (fp->line_array.line == NULL) { return 1; } if (col == 0) { g_string_assign(str, fp->line_array.line); return 0; } array = &(fp->line_array.line_array); n = arraynum(array); if (n < 1) { parse_data_line(array, fp->line_array.line, fp->ifs, fp->csv); n = arraynum(array); } if (col < 0) { col += n + 1; } if (n < 1 || col > n || col < 0) { return 0; } g_string_assign(str, arraynget_str(array, col - 1)); return 0; } static int file_filename(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { int basename; struct f2ddata *fp; GString *str; if (exp->buf[1].val.type != MATH_VALUE_NORMAL) { return 0; } basename = exp->buf[1].val.val; rval->val = 0; rval->type = MATH_VALUE_NORMAL; str = math_expression_get_string_variable_from_argument(exp, 0); if (str == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 1; } if (fp->file == NULL) { g_string_assign(str, ""); return 0; } if (basename) { char *tmp; tmp = getbasename(fp->file); if (tmp) { g_string_assign(str, tmp); g_free(tmp); } else { g_string_assign(str, ""); } } else { g_string_assign(str, fp->file); } if (g_utf8_validate(str->str, -1, NULL)) { rval->val = g_utf8_strlen(str->str, -1); } return 0; } static int file_mtime(MathFunctionCallExpression *exp, MathEquation *eq, MathValue *rval) { struct f2ddata *fp; rval->val = 0; rval->type = MATH_VALUE_NORMAL; fp = math_equation_get_user_data(eq); if (fp == NULL) { rval->type = MATH_VALUE_ERROR; return 0; } if (fp->fd == NULL) { rval->val = time(NULL); return 0; } rval->val = fp->mtime; return 0; } struct funcs { char *name; struct math_function_parameter prm; }; static struct funcs BasicFunc[] = { {"LINE_NUMBER", {0, 0, 0, line_number, NULL, NULL, NULL, NULL}}, }; static struct funcs FitFunc[] = { {"FIT_CALC", {2, 0, 0, file_fit_calc, NULL, NULL, NULL, NULL}}, {"FIT_PRM", {2, 0, 0, file_fit_prm, NULL, NULL, NULL, NULL}}, }; static enum MATH_FUNCTION_ARG_TYPE draw_polyline_arg_type[] = { MATH_FUNCTION_ARG_TYPE_ARRAY, /* 0: array of x */ MATH_FUNCTION_ARG_TYPE_ARRAY, /* 1: array of y */ }; static enum MATH_FUNCTION_ARG_TYPE draw_polygon_arg_type[] = { MATH_FUNCTION_ARG_TYPE_ARRAY, /* 0: array of x */ MATH_FUNCTION_ARG_TYPE_ARRAY, /* 1: array of y */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 2: stroke */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 3: fill */ }; static enum MATH_FUNCTION_ARG_TYPE draw_text_arg_type[] = { MATH_FUNCTION_ARG_TYPE_STRING, /* 0: text */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 1: x */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 2: y */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 3: direction */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 4: size (obsolete) */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 5: font (obsolete) */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 6: style (obsolete) */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 7: space (obsolete) */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 8: script size (obsolete) */ }; static enum MATH_FUNCTION_ARG_TYPE text_obj_set_arg_type[] = { MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 0: id of the text object */ MATH_FUNCTION_ARG_TYPE_STRING, /* 1: text */ }; static enum MATH_FUNCTION_ARG_TYPE text_obj_get_arg_type[] = { MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 0: id of the text object */ MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE, /* 1: string variable */ }; static enum MATH_FUNCTION_ARG_TYPE string_column_arg_type[] = { MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE, /* 0: string variable */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 1: column number */ }; static enum MATH_FUNCTION_ARG_TYPE filename_arg_type[] = { MATH_FUNCTION_ARG_TYPE_STRING_VARIABLE, /* 0: string variable */ MATH_FUNCTION_ARG_TYPE_DOUBLE, /* 1: basename or not */ }; static enum MATH_FUNCTION_ARG_TYPE on_end_arg_type[] = { MATH_FUNCTION_ARG_TYPE_PROC, /* 0: procedure */ }; static struct funcs FileFunc[] = { {"MTIME", {0, 1, MATH_FUNCTION_TYPE_NORMAL, file_mtime, NULL, NULL, NULL, NULL}}, {"OBJ_ALPHA", {2, 1, MATH_FUNCTION_TYPE_NORMAL, file_objalpha, NULL, NULL, NULL, NULL}}, {"OBJ_COLOR", {2, 1, MATH_FUNCTION_TYPE_NORMAL, file_objcolor, NULL, NULL, NULL, NULL}}, {"COLOR", {2, 1, MATH_FUNCTION_TYPE_NORMAL, file_color, NULL, NULL, NULL, NULL}}, {"ALPHA", {2, 1, MATH_FUNCTION_TYPE_NORMAL, file_alpha, NULL, NULL, NULL, NULL}}, {"RGB", {3, 1, MATH_FUNCTION_TYPE_NORMAL, file_rgb, NULL, NULL, NULL, NULL}}, {"RGB2", {3, 1, MATH_FUNCTION_TYPE_NORMAL, file_rgb2, NULL, NULL, NULL, NULL}}, {"HSB", {3, 1, MATH_FUNCTION_TYPE_NORMAL, file_hsb, NULL, NULL, NULL, NULL}}, {"HSB2", {3, 1, MATH_FUNCTION_TYPE_NORMAL, file_hsb2, NULL, NULL, NULL, NULL}}, {"MARKSIZE", {1, 1, MATH_FUNCTION_TYPE_NORMAL, file_marksize, NULL, NULL, NULL, NULL}}, {"MARKTYPE", {1, 1, MATH_FUNCTION_TYPE_NORMAL, file_marktype, NULL, NULL, NULL, NULL}}, {"DRAW_RECT", {6, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_rect, NULL, NULL, NULL, NULL}}, {"DRAW_LINE", {6, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_line, NULL, NULL, NULL, NULL}}, {"DRAW_ARC", {DRAW_ARC_ARG_NUM, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_arc, NULL, NULL, NULL, NULL}}, {"DRAW_MARK", {3, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_mark, NULL, NULL, NULL, NULL}}, {"DRAW_ERRORBAR", {5, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_errorbar, NULL, NULL, NULL, NULL}}, {"DRAW_ERRORBAR2", {5, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_errorbar2, NULL, NULL, NULL, NULL}}, {"DRAW_POLYLINE", {G_N_ELEMENTS(draw_polyline_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_polyline, draw_polyline_arg_type, NULL, NULL, NULL}}, {"DRAW_POLYGON", {G_N_ELEMENTS(draw_polygon_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_polygon, draw_polygon_arg_type, NULL, NULL, NULL}}, {"DRAW_TEXT", {G_N_ELEMENTS(draw_text_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_text, draw_text_arg_type, NULL, NULL, NULL}}, {"DRAW_TEXT_RAW", {G_N_ELEMENTS(draw_text_arg_type) - 1, 1, MATH_FUNCTION_TYPE_NORMAL, file_draw_text_raw, draw_text_arg_type, NULL, NULL, NULL}}, {"TEXT_ALIGN", {2, 1, MATH_FUNCTION_TYPE_NORMAL, file_text_align, NULL, NULL, NULL, NULL}}, {"TEXT_FONT", {1, 1, MATH_FUNCTION_TYPE_NORMAL, file_text_font, NULL, NULL, NULL, NULL}}, {"TEXT_STYLE", {1, 1, MATH_FUNCTION_TYPE_NORMAL, file_text_style, NULL, NULL, NULL, NULL}}, {"TEXT_SIZE", {3, 1, MATH_FUNCTION_TYPE_NORMAL, file_text_size, NULL, NULL, NULL, NULL}}, {"TEXT_OBJ_SET", {G_N_ELEMENTS(text_obj_set_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_text_obj_set, text_obj_set_arg_type, NULL, NULL, NULL}}, {"TEXT_OBJ_GET", {G_N_ELEMENTS(text_obj_get_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_text_obj_get, text_obj_get_arg_type, NULL, NULL, NULL}}, {"STRING_COLUMN", {G_N_ELEMENTS(string_column_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_string_column, string_column_arg_type, NULL, NULL, NULL}}, {"FILENAME", {G_N_ELEMENTS(filename_arg_type), 1, MATH_FUNCTION_TYPE_NORMAL, file_filename, filename_arg_type, NULL, NULL, NULL}}, {"ON_END", {G_N_ELEMENTS(on_end_arg_type), 1, MATH_FUNCTION_TYPE_CALLBACK, file_on_end, on_end_arg_type, NULL, NULL, NULL}}, }; static int add_func_sub(MathEquation *eq, struct funcs *funcs, unsigned int n) { unsigned int i; for (i = 0; i < n; i++) { if (math_equation_add_func(eq, funcs[i].name, &funcs[i].prm) == NULL) { return 1; } } return 0; } static int add_file_func(MathEquation *eq) { return add_func_sub(eq, FileFunc, sizeof(FileFunc) / sizeof(*FileFunc)); } static int add_fit_func(MathEquation *eq) { return add_func_sub(eq, FitFunc, sizeof(FitFunc) / sizeof(*FitFunc)); } static int add_basic_func(MathEquation *eq) { return add_func_sub(eq, BasicFunc, sizeof(BasicFunc) / sizeof(*BasicFunc)); } int get_axis_id(struct objlist *obj, N_VALUE *inst, struct objlist **aobj, int axis) { char *field, *axis_str; struct narray iarray; int anum, id; switch (axis) { case AXIS_X: field = "axis_x"; break; case AXIS_Y: field = "axis_y"; break; case AXIS_REFERENCE: field = "reference"; break; default: return - ERRNOAXIS; } _getobj(obj, field, inst, &axis_str); if (axis_str == NULL) { return - ERRNOAXIS; } arrayinit(&iarray, sizeof(int)); if (getobjilist(axis_str, aobj, &iarray, FALSE, NULL)) { return - ERRNOAXIS; } anum = arraynum(&iarray); if (anum < 1) { arraydel(&iarray); return - ERRNOAXISINST; } id = arraylast_int(&iarray); arraydel(&iarray); return id; } struct axis_prm { int posx, posy; int len; double min, max, min2, max2; double vx, vy, rate; int type; }; static int get_axis_prm(struct objlist *obj, N_VALUE *inst, int axis, struct axis_prm *prm) { int aid, dir; N_VALUE *inst1; struct objlist *aobj; double min, max, ddir; aid = get_axis_id(obj, inst, &aobj, axis); if (aid < 0) { return aid; } inst1 = getobjinst(aobj, aid); if (inst1 == NULL) { return -1; } if (_getobj(aobj, "x", inst1, &prm->posx)) { return -1; } if (_getobj(aobj, "y", inst1, &prm->posy)) { return -1; } if (_getobj(aobj, "length", inst1, &prm->len)) { return -1; } if (_getobj(aobj, "direction", inst1, &dir)) { return -1; } if (_getobj(aobj, "min", inst1, &min)) { return -1; } if (_getobj(aobj, "max", inst1, &max)) { return -1; } if (_getobj(aobj, "type", inst1, &prm->type)) { return -1; } if (min == 0 && max == 0) { int id; id = get_axis_id(aobj, inst1, &aobj, AXIS_REFERENCE); if (id >= 0) { inst1 = getobjinst(aobj, id); if (inst1) { _getobj(aobj, "min", inst1, &min); _getobj(aobj, "max", inst1, &max); _getobj(aobj, "type", inst1, &prm->type); } } } prm->min2 = min; prm->max2 = max; ddir = dir / 18000.0 * MPI; prm->vx = cos(ddir); prm->vy = -sin(ddir); if (min == max) { return - ERRNOSETAXIS; } switch (prm->type) { case AXIS_TYPE_LOG: if (min <= 0 || max <= 0) { return - ERRMINMAX; } min = log10(min); max = log10(max); break; case AXIS_TYPE_INVERSE: if (min * max <= 0) { return - ERRMINMAX; } min = 1 / min; max = 1 / max; break; } prm->rate = prm->len / (max - min); prm->min = min; prm->max = max; return aid; } int open_array(char *objstr, struct array_prm *ary) { int i, n, dnum, id_max; struct narray iarray, *darray; struct objlist *dobj, *obj; dobj = getobject("darray"); ary->obj = NULL; ary->col_num = 0; ary->data_num = 0; memset(ary->id, 0, sizeof(ary->id)); memset(ary->ary, 0, sizeof(ary->ary)); if (objstr == NULL) { return 1; } arrayinit(&iarray, sizeof(int)); if (getobjilist(objstr, &obj, &iarray, FALSE, NULL)) { return 1; } if (obj != dobj) { arraydel(&iarray); return 1; } n = arraynum(&iarray); if (n < 1) { arraydel(&iarray); return 1; } if (n > FILE_OBJ_MAXCOL) { n = FILE_OBJ_MAXCOL; } id_max = chkobjlastinst(obj); for (i = 0; i < n; i++) { int id; id = arraynget_int(&iarray, i); if (id > id_max) { continue; } darray = NULL; getobj(dobj, "@", id, 0, NULL, &darray); ary->id[i] = id; ary->ary[i] = darray; dnum = arraynum(darray); if (dnum > ary->data_num) { ary->data_num = dnum; } } arraydel(&iarray); ary->obj = obj; ary->col_num = n; return 0; } static void add_file_prm(struct f2ddata *fp, MathEquationParametar *prm) { int i, j, id, num2, *data2; N_VALUE *inst1; if (prm == NULL) { return; } for (i = 0; i < prm->id_num; i++) { id = prm->id[i] / 1000; if (id == fp->id) { if (fp->maxdim < (prm->id[i] % 1000)) { fp->maxdim = prm->id[i] % 1000; } } else if (id <= chkobjlastinst(fp->obj)) { num2 = arraynum(&(fp->fileopen)); data2 = arraydata(&(fp->fileopen)); for (j = 0; j < num2; j++) { if (id == data2[j]) { break; } } if (j == num2) { inst1 = chkobjinst(fp->obj, id); if (inst1 && _exeobj(fp->obj, "opendata_raw", inst1, 0, NULL) == 0) { arrayadd(&fp->fileopen, &id); } } } } } static struct f2ddata * opendata(struct objlist *obj,N_VALUE *inst, struct f2dlocal *f2dlocal,int axis,int raw) { int fid; char *file; struct rgba fg, bg; int x,y,type,hskip,rstep,final,csv,src; char *remark,*ifs, *array; int smoothx,smoothy,averaging_type; struct narray *mask; struct narray *move,*movex,*movey; struct f2ddata *fp; int i; int axid,ayid; int marksize,marktype; int prev_datanum; int dataclip; struct stat stat_buf; struct axis_prm ax_prm, ay_prm; int div; double min, max; _getobj(obj, "source", inst, &src); /* for file source only */ _getobj(obj,"file",inst,&file); _getobj(obj,"remark",inst,&remark); _getobj(obj,"ifs",inst,&ifs); _getobj(obj,"csv",inst,&csv); _getobj(obj,"x",inst,&x); _getobj(obj,"y",inst,&y); /* for array source only */ _getobj(obj,"array",inst,&array); /* for range source only */ _getobj(obj,"range_min",inst,&min); _getobj(obj,"range_max",inst,&max); _getobj(obj,"range_div",inst,&div); /* common */ _getobj(obj,"id",inst,&fid); _getobj(obj,"type",inst,&type); _getobj(obj,"head_skip",inst,&hskip); _getobj(obj,"read_step",inst,&rstep); _getobj(obj,"final_line",inst,&final); _getobj(obj,"smooth_x",inst,&smoothx); _getobj(obj,"smooth_y",inst,&smoothy); _getobj(obj,"averaging_type",inst,&averaging_type); _getobj(obj,"mask",inst,&mask); _exeobj(obj,"move_data_adjust",inst,0,NULL); _getobj(obj,"move_data",inst,&move); _getobj(obj,"move_data_x",inst,&movex); _getobj(obj,"move_data_y",inst,&movey); _getobj(obj,"R",inst,&fg.r); _getobj(obj,"G",inst,&fg.g); _getobj(obj,"B",inst,&fg.b); _getobj(obj,"A",inst,&fg.a); _getobj(obj,"R2",inst,&bg.r); _getobj(obj,"G2",inst,&bg.g); _getobj(obj,"B2",inst,&bg.b); _getobj(obj,"A2",inst,&bg.a); _getobj(obj,"mark_size",inst,&marksize); _getobj(obj,"mark_type",inst,&marktype); _getobj(obj,"data_clip",inst,&dataclip); _getobj(obj,"data_num",inst,&prev_datanum); switch (src) { case DATA_SOURCE_FILE: if (file==NULL) { error(obj,ERRFILE); return NULL; } break; case DATA_SOURCE_ARRAY: break; case DATA_SOURCE_RANGE: if (min == max || div < 2) { error(obj,ERR_INVALID_RANGE); return NULL; } if (min > max) { double tmp; tmp = min; min = max; max = tmp; } break; } if (axis) { double ip1,ip2; axid = get_axis_prm(obj, inst, AXIS_X, &ax_prm); if (axid < 0) { error(obj, - axid); return NULL; } ayid = get_axis_prm(obj, inst, AXIS_Y, &ay_prm); if (ayid < 0) { error(obj, - ayid); return NULL; } ip1=-ax_prm.vy*ay_prm.vx+ax_prm.vx*ay_prm.vy; ip2=-ay_prm.vy*ax_prm.vx+ay_prm.vx*ax_prm.vy; if ((fabs(ip1)<=1e-15) || (fabs(ip2)<=1e-15)) { error(obj,ERRAXISDIR); return NULL; } } else { /* these initialization exist to avoid compile warnings. */ axid =0; ayid =0; memset(&ax_prm, 0, sizeof(ax_prm)); memset(&ay_prm, 0, sizeof(ay_prm)); ax_prm.type = AXIS_TYPE_LINEAR; ay_prm.type = AXIS_TYPE_LINEAR; } if ((fp=g_malloc(sizeof(struct f2ddata)))==NULL) return NULL; fp->local = f2dlocal; fp->GC = -1; fp->src = src; switch (src) { case DATA_SOURCE_FILE: fp->file=file; if ((fp->fd=nfopen(file,"rt"))==NULL) { error2(obj,ERROPEN,file); g_free(fp); return NULL; } if (fstat(fileno(fp->fd), &stat_buf)) { error2(obj,ERROPEN,file); fclose(fp->fd); g_free(fp); return NULL; } fp->mtime = stat_buf.st_mtime; if (file==NULL) { error(obj,ERRFILE); return NULL; } break; case DATA_SOURCE_ARRAY: open_array(array, &fp->array_data); if (fp->array_data.data_num < 1) { error2(obj,ERROPEN,file); /* to be fixed */ g_free(fp); return NULL; } fp->file = NULL; fp->fd = NULL; fp->mtime = 1; break; case DATA_SOURCE_RANGE: fp->file = NULL; fp->fd = NULL; fp->range_min = min; fp->range_max = max; fp->range_div = div; fp->mtime = 1; break; } fp->obj=obj; fp->id=fid; fp->axisx = axid; fp->axisy = ayid; fp->prev_datanum = prev_datanum; #if BUF_TYPE == USE_BUF_PTR for (i = 0; i < DXBUFSIZE; i++) { fp->buf_ptr[i] = &fp->buf[i]; } #elif BUF_TYPE == USE_RING_BUF fp->ringbuf_top = 0; #endif fp->bufnum=0; fp->bufpo=0; fp->masknum=arraynum(mask); fp->mask=arraydata(mask); #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_CONST fp->mask_index = 0; #endif fp->movenum=arraynum(move); fp->move=arraydata(move); fp->movex=arraydata(movex); fp->movey=arraydata(movey); if (smoothx>smoothy) fp->smooth=smoothx; else fp->smooth=smoothy; fp->smoothx=smoothx; fp->smoothy=smoothy; fp->dataclip=dataclip; fp->averaging_type = averaging_type; fp->x=x; fp->y=y; switch (type) { case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: fp->type=TYPE_DIAGONAL; break; case PLOT_TYPE_ERRORBAR_X: fp->type=TYPE_ERR_X; break; case PLOT_TYPE_ERRORBAR_Y: fp->type=TYPE_ERR_Y; break; default: fp->type=TYPE_NORMAL; break; } fp->hskip=hskip; fp->rstep=rstep; fp->final=final; fp->remark=remark; fp->ifs=ifs; check_ifs_init(fp); fp->csv=csv; fp->line=0; fp->datanum=0; fp->num=0; fp->dline=0; fp->count=0; fp->eof=FALSE; fp->line_array.line = NULL; arrayinit(&(fp->line_array.line_array), sizeof(char *)); fp->axmin=ax_prm.min; fp->axmax=ax_prm.max; fp->axmin2=ax_prm.min2; fp->axmax2=ax_prm.max2; fp->axvx=ax_prm.vx; fp->axvy=ax_prm.vy; fp->axtype=ax_prm.type; fp->axposx=ax_prm.posx; fp->axposy=ax_prm.posy; fp->axlen=ax_prm.len; fp->aymin=ay_prm.min; fp->aymax=ay_prm.max; fp->aymin2=ay_prm.min2; fp->aymax2=ay_prm.max2; fp->ayvx=ay_prm.vx; fp->ayvy=ay_prm.vy; fp->aytype=ay_prm.type; fp->ayposx=ay_prm.posx; fp->ayposy=ay_prm.posy; fp->aylen=ay_prm.len; fp->ratex=ax_prm.rate; fp->ratey=ay_prm.rate; fp->interrupt = FALSE; for (i = 0; i < (int) (sizeof(fp->codex) / sizeof(*fp->codex)); i++) { fp->codex[i] = f2dlocal->codex[i]; } for (i = 0; i < (int) (sizeof(fp->codey) / sizeof(*fp->codey)); i++) { fp->codey[i] = f2dlocal->codey[i]; } fp->const_id = f2dlocal->const_id; fp->column_array_id_x = -1; fp->column_array_id_y = -1; fp->column_string_array_id_x = -1; fp->column_string_array_id_y = -1; fp->use_column_array = FALSE; fp->use_column_string_array = FALSE; switch (fp->type) { case TYPE_NORMAL: break; case TYPE_DIAGONAL: x++; y++; break; case TYPE_ERR_X: x+=2; break; case TYPE_ERR_Y: y+=2; break; } fp->maxdim=f2dlocal->maxdimx; if (fp->maxdimmaxdim=x; if (fp->maxdimmaxdimy) fp->maxdim=f2dlocal->maxdimy; if (fp->maxdimmaxdim=y; if (f2dlocal->need2passx || f2dlocal->need2passy) fp->need2pass=TRUE; else fp->need2pass=FALSE; fp->bg=bg; fp->color2=bg; fp->fnumx = 0; fp->needx = NULL; fp->fnumy = 0; fp->needy = NULL; fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_UNDEF; fp->fg=fg; fp->color=fp->fg; fp->marksize0=marksize; fp->marksize=marksize; fp->marktype0=marktype; fp->marktype=marktype; fp->text_align_h = 0.0; fp->text_align_v = 0.0; fp->text_pt = DEFAULT_FONT_PT; fp->text_script = DEFAULT_SCRIPT_SIZE; fp->text_style = 0; fp->text_font = 0; fp->text_space = 0; fp->ignore=fp->negative=FALSE; fp->end_expression = NULL; arrayinit(&(fp->fileopen),sizeof(int)); if (!raw) { MathEquationParametar *prm; if (fp->codex[0] && fp->codex[0]->exp) { prm = math_equation_get_parameter(fp->codex[0], 'F', NULL); if (prm) { fp->fnumx = prm->id_num; fp->needx = prm->id; } add_file_prm(fp, prm); } if (fp->codey[0] && fp->codey[0]->exp) { prm = math_equation_get_parameter(fp->codey[0], 'F', NULL); if (prm) { fp->fnumy = prm->id_num; fp->needy = prm->id; } add_file_prm(fp, prm); } fp->column_array_id_x = f2dlocal->column_array_id_x; fp->column_array_id_y = f2dlocal->column_array_id_y; fp->use_column_array = (f2dlocal->column_array_id_x >=0 || f2dlocal->column_array_id_y >= 0); fp->column_string_array_id_x = f2dlocal->column_string_array_id_x; fp->column_string_array_id_y = f2dlocal->column_string_array_id_y; fp->use_column_string_array = (f2dlocal->column_string_array_id_x >=0 || f2dlocal->column_string_array_id_y >= 0); } return fp; } static void clear_line_array(struct f2ddata *fp) { if (fp->line_array.line) { g_free(fp->line_array.line); fp->line_array.line = NULL; } arraydel2(&(fp->line_array.line_array)); } static void reopendata(struct f2ddata *fp) { if (fp->fd) { fseek(fp->fd,0,SEEK_SET); } fp->bufnum=0; fp->bufpo=0; fp->line=0; fp->prev_datanum = fp->datanum; fp->datanum=0; #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_CONST fp->mask_index = 0; #endif fp->dline=0; fp->count=0; fp->eof=FALSE; fp->interrupt = FALSE; fp->ignore=fp->negative=FALSE; fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_UNDEF; fp->color2=fp->bg; fp->color=fp->fg; fp->marksize=fp->marksize0; fp->marktype=fp->marktype0; clear_line_array(fp); } static void closedata(struct f2ddata *fp, struct f2dlocal *f2dlocal) { int j,num2,*data2; N_VALUE *inst; if (fp==NULL) return; if (fp->end_expression) { MathValue val; MathExpression *exp; exp = fp->end_expression; math_equation_set_user_data(exp->equation, fp); math_expression_calculate(exp, &val); math_equation_set_user_data(exp->equation, NULL); fp->end_expression = NULL; } set_data_progress(fp); num2=arraynum(&(fp->fileopen)); data2=arraydata(&(fp->fileopen)); for (j=0;jobj,data2[j]))!=NULL) { _exeobj(fp->obj,"closedata_raw",inst1,0,NULL); } } arraydel(&(fp->fileopen)); if (fp->fd) { fclose(fp->fd); fp->fd = NULL; } if ((inst=chkobjinst(fp->obj,fp->id))!=NULL) _putobj(fp->obj,"data_num",inst,&(fp->datanum)); f2dlocal->num = fp->datanum; clear_line_array(fp); g_free(fp); } static char * create_func_def_str(const char *name, const char *code) { return g_strdup_printf("def %s(x,y,z) {%s;\n}", name, code); } static int set_user_fnc(MathEquation **eq, const char *str, const char *fname, char **err_msg) { int i; char default_func[] = "def f(x,y,z){}"; // 01234 if (err_msg) *err_msg = NULL; for (i = 0; i < EQUATION_NUM; i++) { if (eq[i] == NULL) { return MATH_ERROR_MEMORY; } } default_func[4] = fname[0]; if (str) { char *buf; buf = create_func_def_str(fname, str); if (buf == NULL) return MATH_ERROR_MEMORY; for (i = 0; i < EQUATION_NUM; i++) { int r; r = math_equation_parse(eq[i], buf); if (r) { if (err_msg) { *err_msg = math_err_get_error_message(eq[i], buf, r); } g_free(buf); return r; } } g_free(buf); } else { for (i = 0; i < EQUATION_NUM; i++) { math_equation_parse(eq[i], default_func); } } return 0; } static int set_equation(struct f2dlocal *f2dlocal, MathEquation **eq, enum EOEQ_ASSIGN_TYPE type, const char *f, const char *g, const char *h, const char *str, char **err_msg) { int i, rcode, use_eoeq_assign; if (err_msg) { *err_msg = NULL; } for (i = 0; i < EQUATION_NUM; i++) { if (eq[i]) { math_equation_free(eq[i]); } eq[i] = NULL; } for (i = 0; i < EQUATION_NUM; i++) { eq[i] = ofile_create_math_equation(f2dlocal->const_id, type, 3, TRUE, TRUE, TRUE, TRUE, TRUE); } for (i = 0; i < EQUATION_NUM; i++) { if (eq[i] == NULL) { return MATH_ERROR_MEMORY; } } if (f) { rcode = set_user_fnc(eq, f, "f", err_msg); if (rcode) return rcode; } if (g) { rcode = set_user_fnc(eq, g, "g", err_msg); if (rcode) return rcode; } if (h) { rcode = set_user_fnc(eq, h, "h", err_msg); if (rcode) return rcode; } use_eoeq_assign = eq[0]->use_eoeq_assign; if (str == NULL) return 0; for (i = 0; i < EQUATION_NUM; i++) { rcode = math_equation_parse(eq[i], str); if (rcode) { if (err_msg) { *err_msg = math_err_get_error_message(eq[i], str, rcode); } return rcode; } if (use_eoeq_assign) { eq[i]->use_eoeq_assign = TRUE; } } return rcode; } static int put_func(struct objlist *obj, N_VALUE *inst, struct f2dlocal *f2dlocal, enum EOEQ_ASSIGN_TYPE assign_type, char *field, char *eq, int *use_eoeq_assign) { int rcode, type; char *x, *y, *f, *g, *h, *err_msg; MathEquation *eqn; if (use_eoeq_assign ) { *use_eoeq_assign = FALSE; } type = field[5]; _getobj(obj, "math_x", inst, &x); _getobj(obj, "math_y", inst, &y); _getobj(obj, "func_f", inst, &f); _getobj(obj, "func_g", inst, &g); _getobj(obj, "func_h", inst, &h); switch (type) { case 'x': f2dlocal->need2passx = FALSE; rcode = set_equation(f2dlocal, f2dlocal->codex, assign_type, f, g, h, eq, &err_msg); if (err_msg) { error22(obj, ERRUNKNOWN, field, err_msg); g_free(err_msg); set_equation(f2dlocal, f2dlocal->codex, assign_type, f, g, h, x, NULL); } f2dlocal->need2passx = math_equation_check_const(f2dlocal->codex[0], f2dlocal->const_id, TWOPASS_CONST_SIZE); eqn = f2dlocal->codex[0]; break; case 'y': f2dlocal->need2passy = FALSE; rcode = set_equation(f2dlocal, f2dlocal->codey, assign_type, f, g, h, eq, &err_msg); if (err_msg) { error22(obj, ERRUNKNOWN, field, err_msg); g_free(err_msg); set_equation(f2dlocal, f2dlocal->codey, assign_type, f, g, h, y, NULL); } f2dlocal->need2passy = math_equation_check_const(f2dlocal->codey[0], f2dlocal->const_id, TWOPASS_CONST_SIZE); eqn = f2dlocal->codey[0]; break; case 'f': case 'g': case 'h': switch (type) { case 'f': set_equation(f2dlocal, f2dlocal->codex, assign_type, eq, g, h, x, NULL); rcode = set_equation(f2dlocal, f2dlocal->codey, assign_type, eq, g, h, y, &err_msg); break; case 'g': set_equation(f2dlocal, f2dlocal->codex, assign_type, f, eq, h, x, NULL); rcode = set_equation(f2dlocal, f2dlocal->codey, assign_type, f, eq, h, y, &err_msg); break; case 'h': set_equation(f2dlocal, f2dlocal->codex, assign_type, f, g, eq, x, NULL); rcode = set_equation(f2dlocal, f2dlocal->codey, assign_type, f, g, eq, y, &err_msg); break; default: /* never reached */ return 1; } if (err_msg) { error22(obj, ERRUNKNOWN, field, err_msg); g_free(err_msg); } if (rcode) { set_equation(f2dlocal, f2dlocal->codex, assign_type, f, g, h, x, NULL); set_equation(f2dlocal, f2dlocal->codey, assign_type, f, g, h, y, NULL); } f2dlocal->need2passx = math_equation_check_const(f2dlocal->codex[0], f2dlocal->const_id, TWOPASS_CONST_SIZE); f2dlocal->need2passy = math_equation_check_const(f2dlocal->codey[0], f2dlocal->const_id, TWOPASS_CONST_SIZE); eqn = f2dlocal->codex[0]; break; default: /* never reached */ return 1; } if (eqn && use_eoeq_assign ) { *use_eoeq_assign = eqn->use_eoeq_assign; } return rcode; } static int f2dputmath(struct objlist *obj, N_VALUE *inst, enum EOEQ_ASSIGN_TYPE type, char *field, char *math, int *use_eoeq_assign) { int rcode; struct f2dlocal *f2dlocal; _getobj(obj,"_local",inst,&f2dlocal); if (math) { g_strstrip(math); if (math[0] == '\0') { math = NULL; } } rcode = put_func(obj, inst, f2dlocal, type, field, math, use_eoeq_assign); if (rcode) { return 1; } if (strcmp(field,"math_x")==0) { f2dlocal->column_array_id_x = -1; f2dlocal->column_string_array_id_x = -1; f2dlocal->maxdimx = 0; if (f2dlocal->codex[0]) { MathEquationParametar *prm; int array_id; prm = math_equation_get_parameter(f2dlocal->codex[0], 0, NULL); if (prm == NULL) { return 1; } f2dlocal->maxdimx = prm->id_max; array_id = math_equation_check_array(f2dlocal->codex[0], COLUMN_ARRAY_NAME); f2dlocal->column_array_id_x = array_id; array_id = math_equation_check_string_array(f2dlocal->codex[0], "$" COLUMN_ARRAY_NAME); f2dlocal->column_string_array_id_x = array_id; } } else if (strcmp(field,"math_y")==0) { f2dlocal->column_array_id_y = -1; f2dlocal->maxdimy = 0; if (f2dlocal->codey[0]) { MathEquationParametar *prm; int array_id; prm = math_equation_get_parameter(f2dlocal->codey[0], 0, NULL); if (prm == NULL) { return 1; } f2dlocal->maxdimy = prm->id_max; array_id = math_equation_check_array(f2dlocal->codey[0], COLUMN_ARRAY_NAME); f2dlocal->column_array_id_y = array_id; array_id = math_equation_check_string_array(f2dlocal->codey[0], "$" COLUMN_ARRAY_NAME); f2dlocal->column_string_array_id_y = array_id; } } return 0; } static int check_putmath(struct objlist *obj, N_VALUE *inst, char *field, char *math) { int security, use_eoeq_assign; int rcode; security = get_security(); if (security) { rcode = f2dputmath(obj, inst, EOEQ_ASSIGN_TYPE_BOTH, field, math, &use_eoeq_assign); if (rcode == 0 && use_eoeq_assign) { replace_eoeq_token(math); } } else { rcode = f2dputmath(obj, inst, EOEQ_ASSIGN_TYPE_ASSIGN, field, math, NULL); } return rcode; } static int set_math_config(struct objlist *obj, N_VALUE *inst, char *field, char *str) { char *f1; int len, use_eoeq_assign; f1 = getitok2(&str, &len, ""); if (f2dputmath(obj, inst, EOEQ_ASSIGN_TYPE_BOTH, field, f1, &use_eoeq_assign) == 0) { if (use_eoeq_assign) { replace_eoeq_token(f1); } _putobj(obj, field, inst, f1); } else { g_free(f1); } return 0; } static int f2dloadconfig(struct objlist *obj,N_VALUE *inst) { return obj_load_config(obj, inst, F2DCONF, FileConfigHash); } static int f2dsaveconfig(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { return obj_save_config(obj, inst, F2DCONF, FileConfig, sizeof(FileConfig) / sizeof(*FileConfig)); } MathEquation * ofile_create_math_equation(int *id, enum EOEQ_ASSIGN_TYPE type, int prm_digit, int use_fprm, int use_const, int usr_func, int use_fobj_func, int use_fit_func) { MathEquation *code; struct math_const_parameter static_const[] = { {"FILL_RULE_NONE", MATH_SCANNER_VAL_TYPE_NORMAL, {GRA_FILL_MODE_NONE, MATH_VALUE_NORMAL}}, {"FILL_RULE_EVEN_ODD", MATH_SCANNER_VAL_TYPE_NORMAL, {GRA_FILL_MODE_EVEN_ODD, MATH_VALUE_NORMAL}}, {"FILL_RULE_WINDING", MATH_SCANNER_VAL_TYPE_NORMAL, {GRA_FILL_MODE_WINDING, MATH_VALUE_NORMAL}}, }; code = math_equation_basic_new(); if (code == NULL) return NULL; math_equation_set_eoeq_assign_type(code, type); if (prm_digit > 0) { if (math_equation_add_parameter(code, 0, 1, prm_digit, MATH_EQUATION_PARAMETAR_USE_ID)) { math_equation_free(code); return NULL; } } if (use_fprm) { if (math_equation_add_parameter(code, 'F', 3, 5, MATH_EQUATION_PARAMETAR_USE_INDEX)) { math_equation_free(code); return NULL; } } if (math_equation_add_var(code, "X") != 0) { math_equation_free(code); return NULL; } if (math_equation_add_var(code, "Y") != 1) { math_equation_free(code); return NULL; } if (use_const) { unsigned int i; for (i = 0; i < MATH_CONST_SIZE; i++) { int f_id; f_id = math_equation_add_const(code, FileConstant[i], NULL); if (f_id < 0) { math_equation_free(code); return NULL; } if (id) { id[i] = f_id; } } for (i = 0; i < sizeof(static_const) / sizeof(*static_const); i++) { if (math_equation_add_const(code, static_const[i].str, &static_const[i].val) < 0) { math_equation_free(code); return NULL; } } } if (usr_func) { math_equation_parse(code, "def f(x,y,z){}"); math_equation_parse(code, "def g(x,y,z){}"); math_equation_parse(code, "def h(x,y,z){}"); } if (use_fobj_func) { add_file_func(code); } if (use_fit_func) { add_fit_func(code); } add_basic_func(code); return code; } static int f2dinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x,y,rstep,final,msize,r2,g2,b2,a2,lwidth,miter,src,div; char *s1,*s2,*s3,*s4; struct f2dlocal *f2dlocal; int stat,minmaxstat,dataclip,num,ljoin; double min,max; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; src=DATA_SOURCE_FILE; x=1; y=2; rstep=1; final=-1; msize=DEFAULT_MARK_SIZE; lwidth=DEFAULT_LINE_WIDTH; r2=255; g2=255; b2=255; a2=255; miter=1000; num=0; stat=MATH_VALUE_MEOF; minmaxstat=MATH_VALUE_UNDEF; dataclip=TRUE; ljoin = JOIN_TYPE_BEVEL; div = 512; min = 1; max = 10; if (_putobj(obj,"source",inst,&src)) return 1; if (_putobj(obj,"x",inst,&x)) return 1; if (_putobj(obj,"y",inst,&y)) return 1; if (_putobj(obj,"read_step",inst,&rstep)) return 1; if (_putobj(obj,"final_line",inst,&final)) return 1; if (_putobj(obj,"mark_size",inst,&msize)) return 1; if (_putobj(obj,"R2",inst,&r2)) return 1; if (_putobj(obj,"G2",inst,&g2)) return 1; if (_putobj(obj,"B2",inst,&b2)) return 1; if (_putobj(obj,"A2",inst,&a2)) return 1; if (_putobj(obj,"line_width",inst,&lwidth)) return 1; if (_putobj(obj,"line_miter_limit",inst,&miter)) return 1; if (_putobj(obj,"line_join",inst,&ljoin)) return 1; if (_putobj(obj,"data_num",inst,&num)) return 1; if (_putobj(obj,"stat_x",inst,&stat)) return 1; if (_putobj(obj,"stat_y",inst,&stat)) return 1; if (_putobj(obj,"stat_2",inst,&stat)) return 1; if (_putobj(obj,"stat_3",inst,&stat)) return 1; if (_putobj(obj,"stat_minx",inst,&minmaxstat)) return 1; if (_putobj(obj,"stat_maxx",inst,&minmaxstat)) return 1; if (_putobj(obj,"stat_miny",inst,&minmaxstat)) return 1; if (_putobj(obj,"stat_maxy",inst,&minmaxstat)) return 1; if (_putobj(obj,"data_clip",inst,&dataclip)) return 1; if (_putobj(obj,"range_min",inst,&min)) return 1; if (_putobj(obj,"range_max",inst,&max)) return 1; if (_putobj(obj,"range_div",inst,&div)) return 1; s2 = s3 = s4 = NULL; f2dlocal=NULL; s1 = g_strdup("#%'"); if (s1 == NULL) goto errexit; if (_putobj(obj, "remark", inst, s1)) goto errexit; s2 = g_strdup(" ,\t()"); if (s2 == NULL) goto errexit; if (_putobj(obj, "ifs", inst, s2)) goto errexit; s3 = g_strdup("axis:0"); if (s3 == NULL) goto errexit; if (_putobj(obj, "axis_x", inst, s3)) goto errexit; s4 = g_strdup("axis:1"); if (s4 == NULL) goto errexit; if (_putobj(obj, "axis_y", inst, s4)) goto errexit; f2dlocal=g_malloc(sizeof(struct f2dlocal)); if (f2dlocal == NULL) goto errexit; memset(f2dlocal, 0, sizeof(struct f2dlocal)); if (_putobj(obj,"_local",inst,f2dlocal)) goto errexit; f2dlocal->codex[0] = NULL; f2dlocal->codex[1] = NULL; f2dlocal->codex[2] = NULL; f2dlocal->codey[0] = NULL; f2dlocal->codey[1] = NULL; f2dlocal->codey[2] = NULL; f2dlocal->column_array_id_x = -1; f2dlocal->column_array_id_y = -1; f2dlocal->column_string_array_id_x = -1; f2dlocal->column_string_array_id_y = -1; f2dlocal->maxdimx=0; f2dlocal->maxdimy=0; f2dlocal->need2passx=FALSE; f2dlocal->need2passy=FALSE; f2dlocal->data=NULL; f2dlocal->idx=chkobjoffset(obj,"data_x"); f2dlocal->idy=chkobjoffset(obj,"data_y"); f2dlocal->id2=chkobjoffset(obj,"data_2"); f2dlocal->id3=chkobjoffset(obj,"data_3"); f2dlocal->icx=chkobjoffset(obj,"coord_x"); f2dlocal->icy=chkobjoffset(obj,"coord_y"); f2dlocal->ic2=chkobjoffset(obj,"coord_2"); f2dlocal->ic3=chkobjoffset(obj,"coord_3"); f2dlocal->isx=chkobjoffset(obj,"stat_x"); f2dlocal->isy=chkobjoffset(obj,"stat_y"); f2dlocal->is2=chkobjoffset(obj,"stat_2"); f2dlocal->is3=chkobjoffset(obj,"stat_3"); f2dlocal->iline=chkobjoffset(obj,"line"); f2dlocal->storefd=NULL; f2dlocal->endstore=FALSE; f2dlocal->use_drawing_func = FALSE; f2dlocal->sumx = 0; f2dlocal->sumy = 0; f2dlocal->sumxx = 0; f2dlocal->sumyy = 0; f2dlocal->sumxy = 0; f2dlocal->dminx = HUGE_VAL; f2dlocal->dmaxx = HUGE_VAL; f2dlocal->dminy = HUGE_VAL; f2dlocal->dmaxy = HUGE_VAL; f2dlocal->davx = HUGE_VAL; f2dlocal->davy = HUGE_VAL; f2dlocal->dstdevpx = HUGE_VAL; f2dlocal->dstdevpy = HUGE_VAL; f2dlocal->dstdevx = HUGE_VAL; f2dlocal->dstdevy = HUGE_VAL; f2dlocal->num = 0; f2dlocal->rcode = 0; f2dlocal->minx.val = 0; f2dlocal->maxx.val = 0; f2dlocal->miny.val = 0; f2dlocal->maxy.val = 0; f2dlocal->minx.type = MATH_VALUE_UNDEF; f2dlocal->maxx.type = MATH_VALUE_UNDEF; f2dlocal->miny.type = MATH_VALUE_UNDEF; f2dlocal->maxy.type = MATH_VALUE_UNDEF; f2dlocal->mtime = 0; f2dlocal->mtime_stat = 0; f2dlocal->total_line = 0; f2dloadconfig(obj,inst); return 0; errexit: g_free(s1); g_free(s2); g_free(s3); g_free(s4); g_free(f2dlocal); return 1; } static int f2ddone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&f2dlocal); closedata(f2dlocal->data, f2dlocal); math_equation_free(f2dlocal->codex[0]); math_equation_free(f2dlocal->codex[1]); math_equation_free(f2dlocal->codex[2]); math_equation_free(f2dlocal->codey[0]); math_equation_free(f2dlocal->codey[1]); math_equation_free(f2dlocal->codey[2]); return 0; } static int f2dfile(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct objlist *sys; int ignorepath; char *file, *file2; int num2; struct f2dlocal *f2dlocal; _getobj(obj, "_local", inst, &f2dlocal); f2dlocal->mtime = 0; f2dlocal->mtime_stat = 0; sys=getobject("system"); getobj(sys, "ignore_path", 0, 0, NULL, &ignorepath); num2 = 0; _putobj(obj, "data_num", inst, &num2); if (argv[2] == NULL) { return 0; } file = get_utf8_filename(argv[2]); if (file == NULL) { return 1; } g_free(argv[2]); if (ignorepath) { file2 = getbasename(file); g_free(file); argv[2] = file2; } else { argv[2] = file; } return 0; } static int f2dbasename(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *file,*file2; g_free(rval->str); rval->str=NULL; _getobj(obj,"file",inst,&file); if (file==NULL) return 0; file2=getbasename(file); rval->str=file2; return 0; } static int f2dput(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { char *field; char *math; struct f2dlocal *f2dlocal; _getobj(obj,"_local",inst,&f2dlocal); f2dlocal->mtime = 0; f2dlocal->mtime_stat = 0; field=argv[1]; if (strcmp(field,"final_line")==0) { #if 0 if (*(int *)(argv[2])<-1) *(int *)(argv[2])=-1; #endif } else if ((strcmp(field,"x")==0) || (strcmp(field,"y")==0)) { if (*(int *)(argv[2])<0) *(int *)(argv[2])=0; else if (*(int *)(argv[2])>FILE_OBJ_MAXCOL) *(int *)(argv[2])=FILE_OBJ_MAXCOL; } else if ((strcmp(field,"math_x")==0) || (strcmp(field,"math_y")==0) || (strcmp(field,"func_f")==0) || (strcmp(field,"func_g")==0) || (strcmp(field,"func_h")==0)) { math=(char *)(argv[2]); return check_putmath(obj, inst, field, math); } else if (strcmp(field,"ifs")==0) { if (strlen((char *)argv[2])==0) { error(obj,ERRIFS); return 1; } } else if ((strcmp(field,"smooth_x")==0) || (strcmp(field,"smooth_y")==0)) { if (*(int *)(argv[2])<0) *(int *)(argv[2])=0; else if (*(int *)(argv[2])>FILE_OBJ_SMOOTH_MAX) *(int *)(argv[2])=FILE_OBJ_SMOOTH_MAX; } return 0; } static double my_strtod(char *po, char **endptr) { char *decimalsign_ptr; double val; int decimalsign; decimalsign = get_decimalsign(); decimalsign_ptr = NULL; switch (decimalsign) { case ',': decimalsign_ptr = strchr(po, ','); if (decimalsign_ptr) { *decimalsign_ptr = '.'; } break; } val = strtod(po, endptr); switch (decimalsign) { case ',': if (decimalsign_ptr) { *decimalsign_ptr = ','; } break; } return val; } static double get_value_from_str(char *po, char *po2, int *type) { char *endptr; int st, ch; double val; if (po == po2) { *type = MATH_VALUE_NONUM; return 0; } ch = *po2; *po2 = '\0'; val = my_strtod(po, &endptr); *po2 = ch; if (endptr >= po2) { if (check_infinite(val)) { st = MATH_VALUE_NAN; } else { st = MATH_VALUE_NORMAL; } } else if (endptr != po) { if (g_ascii_isspace(*endptr)) { if (check_infinite(val)) { st = MATH_VALUE_NAN; } else { st = MATH_VALUE_NORMAL; } } else { st = MATH_VALUE_NONUM; } } else { char *top, *bottom; top = po; bottom = po2; for (; top < bottom; top++) { if (! g_ascii_isspace(*top)) { break; } } for (; top < bottom; bottom--) { if (! g_ascii_isspace(*(bottom - 1))) { break; } } switch (bottom - top) { case 1: switch (*top) { case '|': st = MATH_VALUE_CONT; break; case '=': st = MATH_VALUE_BREAK; break; default: st = MATH_VALUE_NONUM; } break; case 3: if (strncmp(top, "NAN", 3) == 0) { st = MATH_VALUE_NAN; } else { st = MATH_VALUE_NONUM; } break; case 4: if (strncmp(top, "CONT", 4) == 0) { st = MATH_VALUE_CONT; } else { st = MATH_VALUE_NONUM; } break; case 5: if (strncmp(top, "UNDEF", 5) == 0) { st = MATH_VALUE_UNDEF; } else if (strncmp(top, "BREAK", 5) == 0) { st = MATH_VALUE_BREAK; } else { st = MATH_VALUE_NONUM; } break; default: st = MATH_VALUE_NONUM; } } *type = st; return val; } int n_strtod(const char *str, MathValue *val) { char *po, *po2; size_t l; int type; if (val == NULL || str == NULL) { return 1; } po = g_ascii_strup(str, -1); if (po == NULL) { return 1; } l = strlen(po); po2 = po + l; val->type = MATH_VALUE_NORMAL; val->val = get_value_from_str(po, po2, &type); g_free(po); val->type = type; return 0; } static void column_array_clear(MathEquation **code, int id) { int j; if (id < 0) { return; } for (j = 0; j < EQUATION_NUM; j++) { math_equation_clear_array(code[j], id); } } static void column_array_push(MathEquation **code, int id, MathValue *val) { int j; if (id < 0) { return; } for (j = 0; j < EQUATION_NUM; j++) { math_equation_push_array_val(code[j], id, val); } } static int getdataarray(struct f2ddata *fp, char *buf, int maxdim, MathValue *data) { /* return: 0 no error -1 fatal error 1 too small column */ char *po, *po2; int st; double val; int i, r; int dim; char *ifs, csv; MathValue v; ifs = fp->ifs_buf; csv = fp->csv; fp->count++; r = 1; dim=0; data[dim].val = fp->count; data[dim].type = MATH_VALUE_NORMAL; po=buf; if (fp->use_column_array) { column_array_clear(fp->codex, fp->column_array_id_x); column_array_clear(fp->codey, fp->column_array_id_y); column_array_push(fp->codex, fp->column_array_id_x, data); column_array_push(fp->codey, fp->column_array_id_y, data); } while (*po!='\0') { int hex; hex = FALSE; if (! fp->use_column_array && dim >= maxdim) { r = 0; break; } if (csv) { for (;*po==' ';po++); if (*po=='\0') break; if (CHECK_IFS(ifs, *po)) { po2=po; po2++; val=0; st=MATH_VALUE_NONUM; } else { #if 0 for (po2=po;(*po2!='\0') && ! CHECK_IFS(ifs, *po2) && (*po2!=' ');po2++) *po2=toupper(*po2); for (i=0;iuse_column_array) { column_array_push(fp->codex, fp->column_array_id_x, &v); column_array_push(fp->codey, fp->column_array_id_y, &v); } } for (i=dim+1;i<=maxdim;i++) { data[i].val = 0; data[i].type = MATH_VALUE_NONUM; } return r; } static int hskipdata(struct f2ddata *fp) { int skip; char *buf; switch (fp->src) { case DATA_SOURCE_FILE: skip=0; while (skiphskip) { int rcode; if ((fp->line & UPDATE_PROGRESS_LINE_NUM) == 0 && set_data_progress(fp)) { return 0; } rcode=fgetline(fp->fd,&buf); if (rcode==-1) return -1; if (rcode==1) { fp->eof=TRUE; return 0; } g_free(buf); fp->line++; skip++; } break; case DATA_SOURCE_ARRAY: if (fp->hskip > fp->array_data.data_num) { fp->eof=TRUE; return 0; } fp->line = fp->hskip; break; case DATA_SOURCE_RANGE: if (fp->hskip > fp->range_div) { fp->eof = TRUE; return 0; } fp->line = fp->hskip; break; } return 0; } static int set_data_progress(struct f2ddata *fp) { char msgbuf[32]; double frac; if (fp->final > 0) { frac = 1.0 * fp->line / fp->final; } else if (fp->prev_datanum > 0) { if (fp->datanum <= fp->prev_datanum) { if (fp->line < fp->hskip) { frac = 1.0 * fp->line / (fp->prev_datanum + fp->hskip); } else { frac = 1.0 * (fp->datanum + fp->bufnum + fp->hskip) / (fp->prev_datanum + fp->hskip); } } else { frac = -1; } } else { frac = -1; } if (frac > 1) { frac = 1.0; } snprintf(msgbuf, sizeof(msgbuf), "id:%d (%d)", fp->id, fp->line); set_progress(0, msgbuf, frac); if (ninterrupt() || fp->interrupt) { fp->eof=TRUE; fp->interrupt = TRUE; return TRUE; } return FALSE; } static void getdata_get_other_files(struct f2ddata *fp, int fnumx, int fnumy, int *needx, int *needy, MathValue *datax, MathValue *datay, int filenum, int *openfile) { char *argv[2]; int i,j,k; double *ddata; int colnum; struct narray iarray; int col; struct narray *coldata; for (i = 0; i < filenum; i++) { int *idata, inum, argc, id; N_VALUE *inst1; id = openfile[i]; arrayinit(&iarray,sizeof(int)); for (j = 0; j < fnumx; j++) { if (needx[j] / 1000 == id) { col = needx[j] % 1000; arrayadd(&iarray, &col); } } for (j = 0; j < fnumy; j++) { if (needy[j] / 1000 == id) { col = needy[j] % 1000; arrayadd(&iarray, &col); } } inum = arraynum(&iarray); idata = arraydata(&iarray); argv[0] = (char *)&iarray; argv[1] = NULL; argc=1; if ((inst1 = chkobjinst(fp->obj, id)) && _exeobj(fp->obj, "getdata_raw", inst1, argc, argv) == 0) { _getobj(fp->obj,"getdata_raw", inst1, &coldata); colnum = arraynum(coldata); ddata = arraydata(coldata); if (colnum == inum * 2) { int n; for (j = 0; j < fnumx; j++) { if (needx[j] / 1000 == id) { n = needx[j] % 1000; for (k = 0; k < inum; k++) { if (idata[k] == n) { datax[j].val = ddata[k]; datax[j].type = nround(ddata[k + inum]); } } } } for (j = 0; j < fnumy; j++) { if (needy[j] / 1000 == id) { n = needy[j] % 1000; for (k = 0; k < inum; k++){ if (idata[k] == n) { datay[j].val = ddata[k]; datay[j].type = nround(ddata[k + inum]); } } } } } } arraydel(&iarray); } } static int getdata_skip_step(struct f2ddata *fp, int progress) { char *buf; int i, step; switch (fp->src) { case DATA_SOURCE_FILE: step = 1; while (step < fp->rstep) { int rcode; if (progress && (fp->line & UPDATE_PROGRESS_LINE_NUM) == 0 && set_data_progress(fp)) { return 1; } rcode = fgetline(fp->fd, &buf); if (rcode == 1) { fp->eof = TRUE; g_free(buf); break; } else if (rcode == -1) { g_free(buf); return -1; } fp->line++; for (i = 0; buf[i] != '\0' && CHECK_IFS(fp->ifs_buf, buf[i]); i++); if (buf[i] != '\0' && (! CHECK_REMARK(fp->remark, fp->ifs_buf, buf[i]))) { step++; } g_free(buf); } break; case DATA_SOURCE_ARRAY: if (fp->line + fp->rstep - 1 > fp->array_data.data_num) { fp->eof = TRUE; } else { fp->line += fp->rstep - 1; } break; case DATA_SOURCE_RANGE: if (fp->line + fp->rstep - 1 > fp->range_div) { fp->eof = TRUE; } else { fp->line += fp->rstep - 1; } break; } return 0; } #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_CONST static int search_mask(int *mask, int n, int *index, int line) { int i; i = *index; if (mask == NULL || i >= n) return FALSE; if (mask[i] < line) { for (; i < n; i++) { if (mask[i] >= line) break; } } if (i == n) { *index = n; return FALSE; } if (mask[i] > line) { *index = i; return FALSE; } else if (mask[i] < line) { *index = n; return FALSE; } *index = i + 1; return TRUE; } #endif static void set_var(MathEquation *eq, const MathValue *x, const MathValue *y) { math_equation_set_var(eq, 0, x); math_equation_set_var(eq, 1, y); } struct obj_name_const { char *obj_name; int const_id; }; static int set_const(MathEquation *eq, int *const_id, int need2pass, struct f2ddata *fp, int first) { struct obj_name_const obj_names[] = { {"data", MATH_CONST_DATA_OBJ}, {"file", MATH_CONST_FILE_OBJ}, {"path", MATH_CONST_PATH_OBJ}, {"rectangle", MATH_CONST_RECT_OBJ}, {"arc", MATH_CONST_ARC_OBJ}, {"mark", MATH_CONST_MARK_OBJ}, {"text", MATH_CONST_TEXT_OBJ}, }; MathValue val; int i, r; if (eq == NULL || eq->exp == NULL) return 0; math_equation_set_user_data(eq, fp); math_equation_clear(eq); if (need2pass) { math_equation_set_const(eq, const_id[MATH_CONST_MINX], &fp->minx); math_equation_set_const(eq, const_id[MATH_CONST_MINY], &fp->miny); math_equation_set_const(eq, const_id[MATH_CONST_MAXX], &fp->maxx); math_equation_set_const(eq, const_id[MATH_CONST_MAXY], &fp->maxy); val.val = fp->num; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_NUM], &val); val.val = fp->sumx; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SUMX], &val); val.val = fp->sumy; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SUMY], &val); val.val = fp->sumxx; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SUMXX], &val); val.val = fp->sumyy; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SUMYY], &val); val.val = fp->sumxy; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SUMXY], &val); if (fp->num > 0) { double tmp; val.val = fp->sumx / fp->num; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AVX], &val); val.val = fp->sumy / fp->num; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AVY], &val); tmp = fp->sumxx / fp->num - (fp->sumx / fp->num) * (fp->sumx / fp->num); val.val = (tmp < 0) ? 0 : sqrt(tmp); val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SGX], &val); math_equation_set_const(eq, const_id[MATH_CONST_STDEVPX], &val); tmp = fp->sumyy / fp->num - (fp->sumy / fp->num) * (fp->sumy / fp->num); val.val = (tmp < 0) ? 0 : sqrt(tmp); val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_SGY], &val); math_equation_set_const(eq, const_id[MATH_CONST_STDEVPY], &val); } if (fp->num > 1) { double n, tmp; n = fp->num; tmp = fp->sumxx / (n - 1) - (fp->sumx / (n - 1)) * (fp->sumx / n); val.val = (tmp < 0) ? 0 : sqrt(tmp); val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_STDEVX], &val); tmp = fp->sumyy / (n - 1) - (fp->sumy / (n - 1)) * (fp->sumy / n); val.val = (tmp < 0) ? 0 : sqrt(tmp); val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_STDEVY], &val); } } val.val = chkobjlastinst(fp->obj) + 1; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_N], &val); val.val = fp->id; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_D], &val); val.val = first; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_FIRST], &val); val.val = fp->x; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_COLX], &val); val.val = fp->y; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_COLY], &val); val.val = fp->axisx; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISX], &val); val.val = fp->axmin2; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISX_MIN], &val); val.val = fp->axmax2; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISX_MAX], &val); val.val = fp->axlen; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISX_LEN], &val); val.val = fp->axisy; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISY], &val); val.val = fp->aymin2; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISY_MIN], &val); val.val = fp->aymax2; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISY_MAX], &val); val.val = fp->aylen; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_AXISY_LEN], &val); val.val = fp->masknum; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_MASK], &val); val.val = fp->movenum; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_MOVE], &val); val.val = fp->hskip; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_HSKIP], &val); val.val = fp->rstep; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_RSTEP], &val); getobj(fp->obj, "final_line", fp->id, 0, NULL, &i); val.val = i; val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[MATH_CONST_FLINE], &val); for (i = 0; i < (int) (sizeof(obj_names) / sizeof(*obj_names)); i++) { struct objlist *obj; obj = chkobject(obj_names[i].obj_name); if (obj == NULL) { continue; } val.val = chkobjectid(obj); val.type = MATH_VALUE_NORMAL; math_equation_set_const(eq, const_id[obj_names[i].const_id], &val); } r = math_equation_optimize(eq); math_equation_set_user_data(eq, NULL); return r; } static int set_const_all(struct f2ddata *fp) { int first_x1, first_y1; if (set_const(fp->codex[0], fp->const_id, fp->need2pass, fp, TRUE)) return 1; if (set_const(fp->codey[0], fp->const_id, fp->need2pass, fp, TRUE)) return 1; switch (fp->type) { case TYPE_NORMAL: first_x1 = FALSE; first_y1 = FALSE; break; case TYPE_DIAGONAL: first_x1 = FALSE; first_y1 = FALSE; break; case TYPE_ERR_X: first_x1 = TRUE; first_y1 = FALSE; break; case TYPE_ERR_Y: first_x1 = FALSE; first_y1 = TRUE; break; default: first_x1 = FALSE; first_y1 = FALSE; } if (set_const(fp->codex[1], fp->const_id, fp->need2pass, fp, first_x1)) return 1; if (set_const(fp->codex[2], fp->const_id, fp->need2pass, fp, FALSE)) return 1; if (set_const(fp->codey[1], fp->const_id, fp->need2pass, fp, first_y1)) return 1; if (set_const(fp->codey[2], fp->const_id, fp->need2pass, fp, FALSE)) return 1; return 0; } static int file_calculate(struct f2ddata *fp, MathEquation *eq, const MathValue *x, const MathValue *y, MathValue *prm, MathValue *fprm, MathValue *val) { int r; if (eq == NULL || eq->exp == NULL) return 0; math_equation_set_parameter_data(eq, 0, prm); math_equation_set_parameter_data(eq, 'F', fprm); set_var(eq, x, y); math_equation_set_user_data(eq, fp); r = math_equation_calculate(eq, val); if (val->type == MATH_VALUE_INTERRUPT) { fp->interrupt = TRUE; } math_equation_set_user_data(eq, NULL); return r; } static int getdata_sub2(struct f2ddata *fp, int fnumx, int fnumy, int *needx, int *needy, MathValue *datax, MathValue *datay, MathValue *gdata, int filenum, int *openfile) { int masked,moved,moven; struct f2ddata_buf *buf; MathValue dx, dy, dx2, dy2, dx3, dy3, d2, d3; #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_LINER masked = FALSE; for (j = 0; j < fp->masknum; j++) { if (fp->mask[j] == fp->line) { masked = TRUE; break; } } #elif MASK_SERACH_METHOD == MASK_SERACH_METHOD_BINARY masked = bsearch_int(fp->mask, fp->masknum, fp->line, NULL); #else masked = search_mask(fp->mask, fp->masknum, &(fp->mask_index), fp->line); #endif moved = FALSE; if (! masked) { int i, j; for (j = 0; j < fp->movenum; j++) { if (fp->move[j] == fp->line) { moved = TRUE; moven = j; break; } } for (i = 0; i < fnumx; i++) { if (needx[i] / 1000 == fp->id) { j = needx[i] % 1000; datax[i] = gdata[j]; } else { datax[i].val = 0; datax[i].type = MATH_VALUE_NONUM; } } for (i = 0; i < fnumy; i++) { if (needy[i] / 1000 == fp->id) { j = needy[i] % 1000; datay[i] = gdata[j]; } else { datay[i].val = 0; datay[i].type = MATH_VALUE_NONUM; } } if (filenum) { getdata_get_other_files(fp, fnumx, fnumy, needx, needy, datax, datay, filenum, openfile); } } d2.val = d3.val = 0; d2.type = d3.type = MATH_VALUE_UNDEF; dx = gdata[fp->x]; switch (fp->type) { case TYPE_DIAGONAL: dy = gdata[fp->x + 1]; break; default: dy = gdata[fp->y]; } dx2 = dx; dy2 = dy; if (fp->codex[0]) { file_calculate(fp, fp->codex[0], &dx2, &dy2, gdata, datax, &dx); } if (fp->codey[0]) { file_calculate(fp, fp->codey[0], &dx2, &dy2, gdata, datay, &dy); } switch (fp->type) { case TYPE_NORMAL: break; case TYPE_DIAGONAL: d2 = gdata[fp->y]; d3 = gdata[fp->y + 1]; dx2 = d2; dy2 = d3; dx3 = d2; dy3 = d3; if (fp->codex[1]) { file_calculate(fp, fp->codex[1], &dx2, &dy2, gdata, datax, &d2); } if (fp->codey[2]) { file_calculate(fp, fp->codey[2], &dx3, &dy3, gdata, datay, &d3); } break; case TYPE_ERR_X: d2.val = gdata[fp->x].val + gdata[fp->x + 1].val; if (gdata[fp->x].type < gdata[fp->x + 1].type) { d2.type = gdata[fp->x].type; } else { d2.type = gdata[fp->x + 1].type; } d3.val = gdata[fp->x].val + gdata[fp->x + 2].val; if (gdata[fp->x].type < gdata[fp->x + 2].type) { d3.type = gdata[fp->x].type; } else { d3.type = gdata[fp->x + 2].type; } dx2 = d2; dy2 = gdata[fp->y]; dx3 = d3; dy3 = gdata[fp->y]; if (fp->codex[1]) { file_calculate(fp, fp->codex[1], &dx2, &dy2, gdata, datax, &d2); } if (fp->codex[2]) { file_calculate(fp, fp->codex[2], &dx3, &dy3, gdata, datax, &d3); } break; case TYPE_ERR_Y: d2.val = gdata[fp->y].val + gdata[fp->y + 1].val; if (gdata[fp->y].type < gdata[fp->y + 1].type) { d2.type = gdata[fp->y].type; } else { d2.type = gdata[fp->y + 1].type; } d3.val = gdata[fp->y].val + gdata[fp->y + 2].val; if (gdata[fp->y].type < gdata[fp->y + 2].type) { d3.type = gdata[fp->y].type; } else { d3.type = gdata[fp->y + 2].type; } dx2 = gdata[fp->x]; dy2 = d2; dx3 = gdata[fp->x]; dy3 = d3; if (fp->codey[1]) { file_calculate(fp, fp->codey[1], &dx2, &dy2, gdata, datax, &d2); } if (fp->codey[2]) { file_calculate(fp, fp->codey[2], &dx3, &dy3, gdata, datax, &d3); } break; } if (masked) { dx.type = dy.type = d2.type = d3.type = MATH_VALUE_CONT; } if (moved) { dx.type = dy.type = d2.type = d3.type = MATH_VALUE_NORMAL; dx.val = fp->movex[moven]; dy.val = fp->movey[moven]; switch (fp->type) { case TYPE_ERR_X: d2 = dx; d3 = dx; break; case TYPE_ERR_Y: d2 = dy; d3 = dy; break; default: d2 = dx; d3 = dy; break; } } #if BUF_TYPE == USE_BUF_PTR buf = fp->buf_ptr[fp->bufnum]; #elif BUF_TYPE == USE_RING_BUF buf = &fp->buf[ring_buf_index(fp, fp->bufnum)]; #else buf = &fp->buf[fp->bufnum]; #endif buf->col = fp->color; buf->marksize = fp->marksize; buf->marktype = fp->marktype; buf->line = fp->line; buf->col2 = fp->color2; buf->dx = dx.val; buf->dy = dy.val; buf->d2 = d2.val; buf->d3 = d3.val; buf->dxstat = dx.type; buf->dystat = dy.type; buf->d2stat = d2.type; buf->d3stat = d3.type; fp->bufnum++; if (fp->rstep > 1) { return getdata_skip_step(fp, TRUE); } return 0; } static void array_data(MathValue *gdata, struct narray *array, int i) { if (array == NULL) { gdata->val = 0; gdata->type = MATH_VALUE_NONUM; return; } gdata->val = arraynget_double(array, i); gdata->type = MATH_VALUE_NORMAL; } static void set_column_array(MathEquation **code, int id, MathValue *gdata, int maxdim) { int i, j; if (id < 0) { return; } for (j = 0; j < EQUATION_NUM; j++) { math_equation_clear_array(code[j], id); for (i = 0; i <= maxdim; i++) { math_equation_set_array_val(code[j], id, i, gdata + i); } } } #define CHECK_TERMINATE(ch) ((ch) == '\0' || (ch) == '\n') #define CHECK_CHR(ifs, ch) (ch && strchr(ifs, ch)) static void check_add_str(struct narray *array, const char *str, int len) { int valid; char *ptr; valid = g_utf8_validate(str, len, NULL); if (valid) { ptr = g_strndup(str, len); arrayadd(array, &ptr); } else { ptr = g_locale_to_utf8(str, len, NULL, NULL, NULL); if (ptr == NULL) { GString *s; int i; s = g_string_new(""); if (s == NULL) { return; } for (i = 0; i < len; i++) { if (g_ascii_isprint(str[i]) || g_ascii_isspace(str[i])) { g_string_append_c(s, str[i]); } else { g_string_append(s, "〓"); } } ptr = g_string_free(s, FALSE); } if (ptr) { arrayadd(array, &ptr); } } } const char * parse_data_line(struct narray *array, const char *str, const char *ifs, int csv) { const char *po; int len; if (str == NULL) { return NULL; } po = str; while (! CHECK_TERMINATE(*po)) { if (csv) { for (; *po == ' '; po++); if (CHECK_TERMINATE(*po)) break; if (CHECK_CHR(ifs, *po)) { po++; check_add_str(array, "", 0); } else { len = 0; for (; (! CHECK_TERMINATE(po[len])) && ! CHECK_CHR(ifs, po[len]) && (po[len] != ' '); len++) ; check_add_str(array, po, len); po += len; for (; (*po == ' '); po++); if (CHECK_CHR(ifs, *po)) po++; } } else { for (; (! CHECK_TERMINATE(*po)) && CHECK_CHR(ifs, *po); po++); len = 0; for (; (! CHECK_TERMINATE(po[len])) && ! CHECK_CHR(ifs, po[len]); len++) ; check_add_str(array, po, len); po += len; if (CHECK_TERMINATE(*po)) break; } } if (*po == '\n') { po++; } return (*po) ? po : NULL; } static void set_column_string_array_equation(int id, MathEquation **code, const char *firts_line, const char **data, int n) { int i, eqn; if (id < 0) { return; } for (eqn = 0; eqn < EQUATION_NUM; eqn++) { math_equation_clear_string_array(code[eqn], id); math_equation_set_array_str(code[eqn], id, 0, firts_line); for (i = 0; i < n; i++) { math_equation_set_array_str(code[eqn], id, i + 1, data[i]); } } } static void set_column_string_array(struct f2ddata *fp) { int n; struct narray *array; const char **data; const char *line; array = &(fp->line_array.line_array); line = fp->line_array.line; parse_data_line(array, line, fp->ifs, fp->csv); n = arraynum(array); data = arraydata(array); set_column_string_array_equation(fp->column_string_array_id_x, fp->codex, line, data, n); set_column_string_array_equation(fp->column_string_array_id_y, fp->codey, line, data, n); } static int get_data_from_source(struct f2ddata *fp, int maxdim, MathValue *gdata) { char *buf; int i, rcode, n; double x; MathValue nonum; nonum.val = 0; nonum.type = MATH_VALUE_NONUM; rcode = 0; switch (fp->src) { case DATA_SOURCE_FILE: rcode = fgetline(fp->fd, &buf); if (rcode == 1 || rcode == -1) { fp->eof = TRUE; return rcode; } fp->line++; clear_line_array(fp); fp->line_array.line = g_strdup(buf); if (fp->use_column_string_array) { set_column_string_array(fp); } for (i = 0; buf[i] && CHECK_IFS(fp->ifs_buf, buf[i]); i++); rcode = 2; if (buf[i] != '\0' && (! CHECK_REMARK(fp->remark, fp->ifs_buf, buf[i]))) { rcode = getdataarray(fp, buf, maxdim, gdata); if (rcode != -1) { rcode = 0; } } g_free(buf); break; case DATA_SOURCE_ARRAY: if (fp->line >= fp->array_data.data_num) { fp->eof = TRUE; return 1; } n = (fp->array_data.col_num > fp->maxdim) ? fp->maxdim : fp->array_data.col_num; fp->count++; gdata[0].val = fp->count; gdata[0].type = MATH_VALUE_NORMAL; for (i = 0; i < n; i++) { array_data(gdata + i + 1, fp->array_data.ary[i], fp->line); } for (i = n + 1; i <= fp->maxdim; i++) { gdata[i] = nonum; } set_column_array(fp->codex, fp->column_array_id_x, gdata, n); set_column_array(fp->codey, fp->column_array_id_y, gdata, n); fp->line++; break; case DATA_SOURCE_RANGE: if (fp->line > fp->range_div) { fp->eof = TRUE; return 1; } fp->count++; gdata[0].val = fp->count; gdata[0].type = MATH_VALUE_NORMAL; x = fp->range_min + (fp->range_max - fp->range_min) / fp->range_div * fp->line; gdata[1].val = x; gdata[1].type = MATH_VALUE_NORMAL; gdata[2].val = x; gdata[2].type = MATH_VALUE_NORMAL; for (i = 3; i <= fp->maxdim; i++) { gdata[i] = nonum; } fp->line++; set_column_array(fp->codex, fp->column_array_id_x, gdata, 2); set_column_array(fp->codey, fp->column_array_id_y, gdata, 2); break; } return rcode; } static int getdata_sub1(struct f2ddata *fp, int fnumx, int fnumy, int *needx, int *needy, MathValue *datax, MathValue *datay, MathValue *gdata, int filenum, int *openfile) { while (! fp->eof && fp->bufnum < DXBUFSIZE) { int rcode; if (fp->final >= 0 && fp->line >= fp->final) { fp->eof=TRUE; break; } if ((fp->line & UPDATE_PROGRESS_LINE_NUM) == 0 && set_data_progress(fp)) { break; } rcode = get_data_from_source(fp, fp->maxdim, gdata); if (rcode == 0) { if (getdata_sub2(fp, fnumx, fnumy, needx, needy, datax, datay, gdata, filenum, openfile)) { break; } } else if (rcode == 1) { fp->eof=TRUE; break; } else if (rcode==-1) { return -1; } if (fp->interrupt) { return -1; } if ((fp->final>=0) && (fp->line>=fp->final)) fp->eof=TRUE; } return 0; } static void calculate_average_simple(struct f2ddata *fp, int smx, int smy, int sm2, int sm3, int num) { int i; struct f2ddata_buf *buf; int numx, numy, num2, num3; double sumx, sumy, sum2, sum3; sumx=sumy=sum2=sum3=0; numx=numy=num2=num3=0; #if BUF_TYPE == USE_BUF_PTR for (i = 0; i <= num; i++) { buf = fp->buf_ptr[i]; if (buf->dxstat == MATH_VALUE_NORMAL && i >= fp->bufpo - smx && i <= fp->bufpo + smx) { sumx += buf->dx; numx++; } if (buf->dystat == MATH_VALUE_NORMAL && i >= fp->bufpo - smy && i <= fp->bufpo + smy) { sumy += buf->dy; numy++; } if (buf->d2stat == MATH_VALUE_NORMAL && i >= fp->bufpo - sm2 && i <= fp->bufpo + sm2) { sum2 += buf->d2; num2++; } if (buf->d3stat == MATH_VALUE_NORMAL && i >= fp->bufpo - sm3 && i <= fp->bufpo + sm3) { sum3 += buf->d3; num3++; } } buf = fp->buf_ptr[fp->bufpo]; if (numx != 0) fp->dx = sumx / numx; fp->dxstat = buf->dxstat; if (numy != 0) fp->dy=sumy/numy; fp->dystat = buf->dystat; if (num2 != 0) fp->d2 = sum2/num2; fp->d2stat = buf->d2stat; if (num3 != 0) fp->d3 = sum3 / num3; fp->d3stat = buf->d3stat; fp->dline = buf->line; fp->col = buf->col; fp->col2 = buf->col2; fp->msize = buf->marksize; fp->mtype = buf->marktype; #elif BUF_TYPE == USE_RING_BUF for (i=0;i<=num;i++) { n = ring_buf_index(fp, i); if ((fp->buf[n].dxstat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-smx) && (i<=fp->bufpo+smx)) { sumx+=fp->buf[n].dx; numx++; } if ((fp->buf[n].dystat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-smy) && (i<=fp->bufpo+smy)) { sumy+=fp->buf[n].dy; numy++; } if ((fp->buf[n].d2stat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-sm2) && (i<=fp->bufpo+sm2)) { sum2+=fp->buf[n].d2; num2++; } if ((fp->buf[n].d3stat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-sm3) && (i<=fp->bufpo+sm3)) { sum3+=fp->buf[n].d3; num3++; } } n = ring_buf_index(fp, fp->bufpo); if (numx!=0) fp->dx=sumx/numx; fp->dxstat=fp->buf[n].dxstat; if (numy!=0) fp->dy=sumy/numy; fp->dystat=fp->buf[n].dystat; if (num2!=0) fp->d2=sum2/num2; fp->d2stat=fp->buf[n].d2stat; if (num3!=0) fp->d3=sum3/num3; fp->d3stat=fp->buf[n].d3stat; fp->dline=fp->buf[n].line; fp->col=fp->buf[n].col; fp->col2=fp->buf[n].col2; fp->msize=fp->buf[n].marksize; fp->mtype=fp->buf[n].marktype; #else /* BUF_TYPE */ for (i=0;i<=num;i++) { if ((fp->buf[i].dxstat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-smx) && (i<=fp->bufpo+smx)) { sumx+=fp->buf[i].dx; numx++; } if ((fp->buf[i].dystat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-smy) && (i<=fp->bufpo+smy)) { sumy+=fp->buf[i].dy; numy++; } if ((fp->buf[i].d2stat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-sm2) && (i<=fp->bufpo+sm2)) { sum2+=fp->buf[i].d2; num2++; } if ((fp->buf[i].d3stat==MATH_VALUE_NORMAL) && (i>=fp->bufpo-sm3) && (i<=fp->bufpo+sm3)) { sum3+=fp->buf[i].d3; num3++; } } if (numx!=0) fp->dx=sumx/numx; fp->dxstat=fp->buf[fp->bufpo].dxstat; if (numy!=0) fp->dy=sumy/numy; fp->dystat=fp->buf[fp->bufpo].dystat; if (num2!=0) fp->d2=sum2/num2; fp->d2stat=fp->buf[fp->bufpo].d2stat; if (num3!=0) fp->d3=sum3/num3; fp->d3stat=fp->buf[fp->bufpo].d3stat; fp->dline=fp->buf[fp->bufpo].line; fp->col=fp->buf[fp->bufpo].col; fp->col2=fp->buf[fp->bufpo].col2; fp->msize=fp->buf[fp->bufpo].marksize; fp->mtype=fp->buf[fp->bufpo].marktype; #endif /* BUF_TYPE */ } static void calculate_average_weughted(struct f2ddata *fp, int smx, int smy, int sm2, int sm3, int num) { int i, weight; struct f2ddata_buf *buf; int numx, numy, num2, num3; double sumx, sumy, sum2, sum3, wx, wy, w2, w3; sumx = sumy = sum2 = sum3 = 0; numx = numy = num2 = num3 = 0; wx = wy = w2 = w3 = 0; /* o i: 0 1 2 3 4 5 6 7 8 9 10 b-i: 3 2 1 0 1 2 3 smx: 5 bufpo: 3 bufpo - smx: -2 bufpo + smx: 8 if (smx > bufpo) smx = bufpo o i: 0 1 2 3 4 5 6 7 8 9 10 11 b-i: 6 5 4 3 2 1 0 1 2 3 4 5 smx: 5 bufpo: 6 bufpo - smx: 1 bufpo + smx: 11 if (smx > bufpo) smx = bufpo */ #if 0 if (smx > fp->bufpo) smx = fp->bufpo; if (smy > fp->bufpo) smy = fp->bufpo; if (sm2 > fp->bufpo) sm2 = fp->bufpo; if (sm3 > fp->bufpo) sm3 = fp->bufpo; if (smx > num - fp->bufpo) smx = num - fp->bufpo; if (smy > num - fp->bufpo) smy = num - fp->bufpo; if (sm2 > num - fp->bufpo) sm2 = num - fp->bufpo; if (sm3 > num - fp->bufpo) sm3 = num - fp->bufpo; #endif for (i = 0; i <= num; i++) { buf = fp->buf_ptr[i]; if (buf->dxstat == MATH_VALUE_NORMAL && i >= fp->bufpo - smx && i <= fp->bufpo + smx) { weight = smx + 1 - abs(fp->bufpo - i); wx += weight; sumx += buf->dx * weight; numx++; } if (buf->dystat == MATH_VALUE_NORMAL && i >= fp->bufpo - smy && i <= fp->bufpo + smy) { weight = smy + 1 - abs(fp->bufpo - i); wy += weight; sumy += buf->dy * weight; numy++; } if (buf->d2stat == MATH_VALUE_NORMAL && i >= fp->bufpo - sm2 && i <= fp->bufpo + sm2) { weight = sm2 + 1 - abs(fp->bufpo - i); w2 += weight; sum2 += buf->d2 * weight; num2++; } if (buf->d3stat == MATH_VALUE_NORMAL && i >= fp->bufpo - sm3 && i <= fp->bufpo + sm3) { weight = sm3 + 1 - abs(fp->bufpo - i); w3 += weight; sum3 += buf->d3 * weight; num3++; } } buf = fp->buf_ptr[fp->bufpo]; if (numx != 0) { fp->dx = sumx / wx; } fp->dxstat = buf->dxstat; if (numy != 0) { fp->dy = sumy / wy; } fp->dystat = buf->dystat; if (num2 != 0) { fp->d2 = sum2 / w2; } fp->d2stat = buf->d2stat; if (num3 != 0) { fp->d3 = sum3 / w3; } fp->d3stat = buf->d3stat; fp->dline = buf->line; fp->col = buf->col; fp->col2 = buf->col2; fp->msize = buf->marksize; fp->mtype = buf->marktype; } #define HALFLIFE 2.8854 static void calculate_average_exponential(struct f2ddata *fp, int smx, int smy, int sm2, int sm3, int num) { int i; struct f2ddata_buf *buf; int numx, numy, num2, num3; double sumx, sumy, sum2, sum3, ax, ay, a2, a3, wx, wy, w2, w3, weight; sumx = sumy = sum2 = sum3 = 0; numx = numy = num2 = num3 = 0; wx = wy = w2 = w3 = 0; #if 0 if (smx > fp->bufpo) smx = fp->bufpo; if (smy > fp->bufpo) smy = fp->bufpo; if (sm2 > fp->bufpo) sm2 = fp->bufpo; if (smx > num - fp->bufpo) smx = num - fp->bufpo; if (smy > num - fp->bufpo) smy = num - fp->bufpo; if (sm2 > num - fp->bufpo) sm2 = num - fp->bufpo; if (sm3 > num - fp->bufpo) sm3 = num - fp->bufpo; #endif ax = (1 - 2.0 / (smx / HALFLIFE + 2)); ay = (1 - 2.0 / (smy / HALFLIFE + 2)); a2 = (1 - 2.0 / (sm2 / HALFLIFE + 2)); a3 = (1 - 2.0 / (sm3 / HALFLIFE + 2)); for (i = 0; i <= num; i++) { buf = fp->buf_ptr[i]; if (buf->dxstat == MATH_VALUE_NORMAL && i >= fp->bufpo - smx && i <= fp->bufpo + smx) { weight = pow(ax, abs(fp->bufpo - i)); wx += weight; sumx += buf->dx * weight; numx++; } if (buf->dystat == MATH_VALUE_NORMAL && i >= fp->bufpo - smy && i <= fp->bufpo + smy) { weight = pow(ay, abs(fp->bufpo - i)); wy += weight; sumy += buf->dy * weight; numy++; } if (buf->d2stat == MATH_VALUE_NORMAL && i >= fp->bufpo - sm2 && i <= fp->bufpo + sm2) { weight = pow(a2, abs(fp->bufpo - i)); w2 += weight; sum2 += buf->d2 * weight; num2++; } if (buf->d3stat == MATH_VALUE_NORMAL && i >= fp->bufpo - sm3 && i <= fp->bufpo + sm3) { weight = pow(a3, abs(fp->bufpo - i)); w3 += weight; sum3 += buf->d3 * weight; num3++; } } buf = fp->buf_ptr[fp->bufpo]; if (numx != 0) { fp->dx = sumx / wx; } fp->dxstat = buf->dxstat; if (numy != 0) { fp->dy = sumy / wy; } fp->dystat = buf->dystat; if (num2 != 0) { fp->d2 = sum2 / w2; } fp->d2stat = buf->d2stat; if (num3 != 0) { fp->d3 = sum3 / w3; } fp->d3stat = buf->d3stat; fp->dline = buf->line; fp->col = buf->col; fp->col2 = buf->col2; fp->msize = buf->marksize; fp->mtype = buf->marktype; } static void calculate_average(struct f2ddata *fp, int smx, int smy, int sm2, int sm3) { int num; if (fp->bufpo + fp->smooth >= fp->bufnum) { num = fp->bufnum - 1; } else { num = fp->bufpo + fp->smooth; } switch (fp->averaging_type) { case MOVING_AVERAGE_SIMPLE: calculate_average_simple(fp, smx, smy, sm2, sm3, num); break; case MOVING_AVERAGE_WEIGHTED: calculate_average_weughted(fp, smx, smy, sm2, sm3, num); break; case MOVING_AVERAGE_EXPONENTIAL: calculate_average_exponential(fp, smx, smy, sm2, sm3, num); break; } } static int getdata(struct f2ddata *fp) /* return -1: fatal error 0: no error 1: EOF */ { int rcode; int smx,smy,sm2,sm3; int filenum,*openfile,*needx,*needy; struct narray filedatax,filedatay; unsigned int fnumx,fnumy,j; #if BUF_TYPE == USE_RING_BUF int n; #endif MathValue *datax,*datay; static MathValue gdata[FILE_OBJ_MAXCOL + 3]; static MathValue math_value_zero = {0, 0}; fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_UNDEF; filenum=arraynum(&(fp->fileopen)); openfile=arraydata(&(fp->fileopen)); fnumx = fp->fnumx; needx = fp->needx; arrayinit(&filedatax, sizeof(MathValue)); for (j = 0; j < fnumx; j++) { arrayadd(&filedatax, &math_value_zero); } if (arraynum(&filedatax) < fnumx) { fnumx = arraynum(&filedatax); } datax = arraydata(&filedatax); fnumy = fp->fnumy; needy = fp->needy; arrayinit(&filedatay, sizeof(MathValue)); for (j = 0; j < fnumy; j++) { arrayadd(&filedatay, &math_value_zero); } if (arraynum(&filedatay) < fnumy) { fnumy = arraynum(&filedatay); } datay = arraydata(&filedatay); rcode = getdata_sub1(fp, fnumx, fnumy, needx, needy, datax, datay, gdata, filenum, openfile); if (rcode) { return rcode; } arraydel(&filedatax); arraydel(&filedatay); if ((fp->bufnum==0) || (fp->bufpo>=fp->bufnum)) { fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_MEOF; return 1; } switch (fp->type) { case TYPE_NORMAL: smx=fp->smoothx; smy=fp->smoothy; sm2=0; sm3=0; break; case TYPE_DIAGONAL: smx=fp->smoothx; smy=fp->smoothy; sm2=fp->smoothx; sm3=fp->smoothy; break; case TYPE_ERR_X: smx=fp->smoothx; smy=fp->smoothy; sm2=fp->smoothx; sm3=fp->smoothx; break; case TYPE_ERR_Y: smx=fp->smoothx; smy=fp->smoothy; sm2=fp->smoothy; sm3=fp->smoothy; break; default: /* never reached */ smx = 0; smy = 0; sm2 = 0; sm3 = 0; break; } calculate_average(fp, smx, smy, sm2, sm3); switch (fp->type) { case TYPE_NORMAL: if (fp->dxstat==MATH_VALUE_NORMAL && fp->dystat==MATH_VALUE_NORMAL) fp->datanum++; break; case TYPE_DIAGONAL: if (fp->dxstat==MATH_VALUE_NORMAL && fp->dystat==MATH_VALUE_NORMAL && fp->d2stat==MATH_VALUE_NORMAL && fp->d3stat==MATH_VALUE_NORMAL) fp->datanum++; break; case TYPE_ERR_X: if (fp->dystat==MATH_VALUE_NORMAL && fp->d2stat==MATH_VALUE_NORMAL && fp->d3stat==MATH_VALUE_NORMAL) fp->datanum++; break; case TYPE_ERR_Y: if (fp->dxstat==MATH_VALUE_NORMAL && fp->d2stat==MATH_VALUE_NORMAL && fp->d3stat==MATH_VALUE_NORMAL) fp->datanum++; break; } if (fp->bufposmooth) { fp->bufpo++; } else { #if BUF_TYPE == USE_BUF_PTR if (fp->bufnum > 0) { struct f2ddata_buf *tmp; fp->bufnum--; tmp = fp->buf_ptr[0]; #if USE_MEMMOVE memmove(fp->buf_ptr, fp->buf_ptr + 1, sizeof(*fp->buf_ptr) * fp->bufnum); #else for (i = 0; i < fp->bufnum; i++) { fp->buf_ptr[i] = fp->buf_ptr[i + 1]; } #endif fp->buf_ptr[fp->bufnum] = tmp; } #elif BUF_TYPE == USE_RING_BUF if (fp->bufnum > 0) { fp->bufnum--; fp->ringbuf_top = RING_BUF_INC(fp->ringbuf_top); } #else /* BUF_TYPE */ if (fp->bufnum > 0) { fp->bufnum--; #if USE_MEMMOVE memmove(fp->buf, fp->buf + 1, sizeof(*fp->buf) * fp->bufnum); #else for (i = 0; i < fp->bufnum; i++) { fp->buf[i] = fp->buf[i + 1]; } #endif } #endif /* BUF_TYPE */ } return 0; } static int getdata2(struct f2ddata *fp, MathEquation *code, int maxdim, double *dd, int *ddstat) /* return -1: fatal error 0: no error 1: EOF */ { MathValue val, gdata[FILE_OBJ_MAXCOL + 3], dx2, dy2; int masked; int find; *dd=0; *ddstat=MATH_VALUE_UNDEF; find=FALSE; while (!fp->eof && (!find)) { int rcode; if ((fp->final>=0) && (fp->line>=fp->final)) { fp->eof=TRUE; break; } rcode = get_data_from_source(fp, maxdim, gdata); if (rcode == 1) { fp->eof=TRUE; break; } else if (rcode==-1) { return -1; } else if (rcode != 0) { continue; } #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_LINER for (j=0;jmasknum;j++) if ((fp->mask)[j]==fp->line) break; if (j!=fp->masknum) masked=TRUE; else masked=FALSE; #elif MASK_SERACH_METHOD == MASK_SERACH_METHOD_BINARY masked = bsearch_int(fp->mask, fp->masknum, fp->line, NULL); #else masked = search_mask(fp->mask, fp->masknum, &(fp->mask_index), fp->line); #endif *dd=0; *ddstat=MATH_VALUE_UNDEF; dx2 = gdata[fp->x]; dy2 = gdata[fp->y]; if (code && code->exp) { file_calculate(fp, code, &dx2, &dy2, gdata, NULL, &val); *dd = val.val; *ddstat = val.type; } if (masked) *ddstat=MATH_VALUE_CONT; find=TRUE; fp->dline=fp->line; rcode = getdata_skip_step(fp, FALSE); if (rcode == -1) { return -1; } if ((fp->final>=0) && (fp->line>=fp->final)) fp->eof=TRUE; } if (!find) { *dd=0; *ddstat=MATH_VALUE_MEOF; return 1; } return 0; } static int getdataraw(struct f2ddata *fp, int maxdim, MathValue *data) /* return -1: fatal error 0: no error 1: EOF */ { int i; int masked; double dx,dy,d2,d3; char dxstat,dystat,d2stat,d3stat; int datanum; fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_UNDEF; datanum=0; while (!fp->eof && (datanum==0)) { int rcode; if ((fp->final>=0) && (fp->line>=fp->final)) { fp->eof=TRUE; break; } if ((fp->line & UPDATE_PROGRESS_LINE_NUM) == 0 && set_data_progress(fp)) { break; } rcode = get_data_from_source(fp, maxdim, data); if (rcode == 1) { fp->eof=TRUE; break; } else if (rcode==-1) { return -1; } else if (rcode != 0) { continue; } #if MASK_SERACH_METHOD == MASK_SERACH_METHOD_LINER for (j=0;jmasknum;j++) if ((fp->mask)[j]==fp->line) break; if (j!=fp->masknum) masked=TRUE; else masked=FALSE; #elif MASK_SERACH_METHOD == MASK_SERACH_METHOD_BINARY masked = bsearch_int(fp->mask, fp->masknum, fp->line, NULL); #else masked = search_mask(fp->mask, fp->masknum, &(fp->mask_index), fp->line); #endif dx=dy=d2=d3=0; dystat=d2stat=d3stat=MATH_VALUE_UNDEF; dx = data[fp->x].val; dxstat = data[fp->x].type; switch (fp->type) { case TYPE_DIAGONAL: dy = data[fp->x + 1].val; dystat = data[fp->x + 1].type; break; default: dy = data[fp->y].val; dystat = data[fp->y].type; } switch (fp->type) { case TYPE_NORMAL: break; case TYPE_DIAGONAL: d2 = data[fp->y].val; d2stat = data[fp->y].type; d3 = data[fp->y + 1].val; d3stat = data[fp->y + 1].type; break; case TYPE_ERR_X: d2 = data[fp->x].val + data[fp->x + 1].val; if (data[fp->x].type < data[fp->x + 1].type) d2stat = data[fp->x].type; else d2stat = data[fp->x + 1].type; d3 = data[fp->x].val + data[fp->x + 2].val; if (data[fp->x].type < data[fp->x + 2].type) d3stat = data[fp->x].type; else d3stat = data[fp->x + 2].type; break; case TYPE_ERR_Y: d2 = data[fp->y].val + data[fp->y + 1].val; if (data[fp->y].type < data[fp->y + 1].type) d2stat = data[fp->y].type; else d2stat = data[fp->y + 1].type; d3 = data[fp->y].val + data[fp->y + 2].val; if (data[fp->y].type < data[fp->y + 2].type) d3stat = data[fp->y].type; else d3stat = data[fp->y + 2].type; break; } if (masked) { dxstat=dystat=d2stat=d3stat=MATH_VALUE_CONT; for (i=0;i<=maxdim;i++) data[i].type = MATH_VALUE_CONT; } fp->dx=dx; fp->dy=dy; fp->d2=d2; fp->d3=d3; fp->dxstat=dxstat; fp->dystat=dystat; fp->d2stat=d2stat; fp->d3stat=d3stat; fp->col=fp->color; fp->col2=fp->color2; datanum++; if (fp->rstep > 1 && getdata_skip_step(fp, TRUE)) return -1; fp->datanum++; if ((fp->final>=0) && (fp->line>=fp->final)) fp->eof=TRUE; } if (datanum==0) { fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_MEOF; return 1; } return 0; } static void set_final_line(struct f2ddata *fp, struct f2dlocal *local) { if (fp->final < -1) { fp->final += local->total_line + 1; if (fp->final < 0) { fp->final = 0; } } } static int check_mtime(struct f2ddata *fp, struct f2dlocal *local) { if (local->mtime != fp->mtime) { return 1; } fp->datanum = local->num; fp->dx = fp->dy = fp->d2 = fp->d3=0; fp->dxstat = fp->dystat = fp->d2stat = fp->d3stat = MATH_VALUE_UNDEF; fp->dline = 0; fp->minx = local->minx; fp->maxx = local->maxx; fp->miny = local->miny; fp->maxy = local->maxy; fp->sumx = local->sumx; fp->sumy = local->sumy; fp->sumxx = local->sumxx; fp->sumyy = local->sumyy; fp->sumxy = local->sumxy; fp->num = local->num; if (local->rcode == -1) return -1; set_final_line(fp, local); return 0; } static int getminmaxdata(struct f2ddata *fp, struct f2dlocal *local) /* return -1: fatal error 0: no error */ { int rcode; MathValue gdata[FILE_OBJ_MAXCOL + 3]; if (check_mtime(fp, local) == 0) { return 0; } if (hskipdata(fp)!=0) { closedata(fp, local); return 1; } fp->minx.type = MATH_VALUE_UNDEF; fp->maxx.type = MATH_VALUE_UNDEF; fp->miny.type = MATH_VALUE_UNDEF; fp->maxy.type = MATH_VALUE_UNDEF; fp->sumx=0; fp->sumy=0; fp->sumxx=0; fp->sumyy=0; fp->sumxy=0; fp->num=0; while ((rcode = getdataraw(fp, fp->maxdim, gdata)) == 0) { switch (fp->type) { case TYPE_NORMAL: case TYPE_DIAGONAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { if ((fp->minx.type == MATH_VALUE_UNDEF) || (fp->minx.val > fp->dx)) { fp->minx.val = fp->dx; } if ((fp->maxx.type == MATH_VALUE_UNDEF) || (fp->maxx.val < fp->dx)) { fp->maxx.val = fp->dx; } fp->minx.type = MATH_VALUE_NORMAL; fp->maxx.type = MATH_VALUE_NORMAL; if ((fp->miny.type == MATH_VALUE_UNDEF) || (fp->miny.val > fp->dy)) { fp->miny.val = fp->dy; } if ((fp->maxy.type == MATH_VALUE_UNDEF) || (fp->maxy.val < fp->dy)) { fp->maxy.val = fp->dy; } fp->miny.type = MATH_VALUE_NORMAL; fp->maxy.type = MATH_VALUE_NORMAL; fp->sumx += fp->dx; fp->sumxx += (fp->dx) * (fp->dx); fp->sumy += fp->dy; fp->sumyy += (fp->dy) * (fp->dy); fp->sumxy += (fp->dx) * (fp->dy); fp->num++; } if (fp->type == TYPE_NORMAL) break; if ((fp->d2stat == MATH_VALUE_NORMAL) && (fp->d3stat == MATH_VALUE_NORMAL)) { if ((fp->minx.type == MATH_VALUE_UNDEF) || (fp->minx.val > fp->d2)) { fp->minx.val = fp->d2; } if ((fp->maxx.type == MATH_VALUE_UNDEF) || (fp->maxx.val < fp->d2)) { fp->maxx.val = fp->d2; } fp->minx.type = MATH_VALUE_NORMAL; fp->maxx.type = MATH_VALUE_NORMAL; if ((fp->miny.type == MATH_VALUE_UNDEF) || (fp->miny.val > fp->d3)) { fp->miny.val = fp->d3; } if ((fp->maxy.type == MATH_VALUE_UNDEF) || (fp->maxy.val < fp->d3)) { fp->maxy.val = fp->d3; } fp->miny.type = MATH_VALUE_NORMAL; fp->maxy.type = MATH_VALUE_NORMAL; fp->sumx += fp->d2; fp->sumxx += (fp->d2) * (fp->d2); fp->sumy += fp->d3; fp->sumyy += (fp->d3) * (fp->d3); fp->sumxy += (fp->d2) * (fp->d3); fp->num++; } break; case TYPE_ERR_X: if ((fp->d2stat == MATH_VALUE_NORMAL) && (fp->d3stat == MATH_VALUE_NORMAL) && (fp->dystat == MATH_VALUE_NORMAL)) { if ((fp->minx.type == MATH_VALUE_UNDEF) || (fp->minx.val > fp->d2)) { fp->minx.val = fp->d2; } if ((fp->maxx.type == MATH_VALUE_UNDEF) || (fp->maxx.val < fp->d2)) { fp->maxx.val = fp->d2; } fp->minx.type = MATH_VALUE_NORMAL; fp->maxx.type = MATH_VALUE_NORMAL; if ((fp->minx.type == MATH_VALUE_UNDEF) || (fp->minx.val > fp->d3)) { fp->minx.val = fp->d3; } if ((fp->maxx.type == MATH_VALUE_UNDEF) || (fp->maxx.val < fp->d3)) { fp->maxx.val = fp->d3; } fp->minx.type=MATH_VALUE_NORMAL; fp->maxx.type=MATH_VALUE_NORMAL; if ((fp->miny.type == MATH_VALUE_UNDEF) || (fp->miny.val > fp->dy)) { fp->miny.val = fp->dy; } if ((fp->maxy.type == MATH_VALUE_UNDEF) || (fp->maxy.val < fp->dy)) { fp->maxy.val = fp->dy; } fp->miny.type = MATH_VALUE_NORMAL; fp->maxy.type = MATH_VALUE_NORMAL; fp->sumx += fp->d2; fp->sumxx += (fp->d2) * (fp->d2); fp->sumy += fp->dy; fp->sumyy += (fp->dy) * (fp->dy); fp->sumxy += (fp->d2) * (fp->dy); fp->num++; fp->sumx += fp->d3; fp->sumxx += (fp->d3) * (fp->d3); fp->sumy += fp->dy; fp->sumyy += (fp->dy) * (fp->dy); fp->sumxy += (fp->d3) * (fp->dy); fp->num++; } break; case TYPE_ERR_Y: if ((fp->d2stat == MATH_VALUE_NORMAL) && (fp->d3stat == MATH_VALUE_NORMAL) && (fp->dxstat == MATH_VALUE_NORMAL)) { if ((fp->miny.type == MATH_VALUE_UNDEF) || (fp->miny.val > fp->d2)) { fp->miny.val = fp->d2; } if ((fp->maxy.type == MATH_VALUE_UNDEF) || (fp->maxy.val < fp->d2)) { fp->maxy.val = fp->d2; } fp->miny.type = MATH_VALUE_NORMAL; fp->maxy.type = MATH_VALUE_NORMAL; if ((fp->miny.type == MATH_VALUE_UNDEF) || (fp->miny.val > fp->d3)) { fp->miny.val = fp->d3; } if ((fp->maxy.type == MATH_VALUE_UNDEF) || (fp->maxy.val < fp->d3)) { fp->maxy.val = fp->d3; } fp->miny.type = MATH_VALUE_NORMAL; fp->maxy.type = MATH_VALUE_NORMAL; if ((fp->minx.type == MATH_VALUE_UNDEF) || (fp->minx.val > fp->dx)) { fp->minx.val = fp->dx; } if ((fp->maxx.type == MATH_VALUE_UNDEF) || (fp->maxx.val < fp->dx)) { fp->maxx.val = fp->dx; } fp->minx.type = MATH_VALUE_NORMAL; fp->maxx.type = MATH_VALUE_NORMAL; fp->sumx += fp->dx; fp->sumxx += (fp->dx) * (fp->dx); fp->sumy += fp->d2; fp->sumyy += (fp->d2) * (fp->d2); fp->sumxy += (fp->dx) * (fp->d2); fp->num++; fp->sumx += fp->dx; fp->sumxx += (fp->dx) * (fp->dx); fp->sumy += fp->d3; fp->sumyy += (fp->d3) * (fp->d3); fp->sumxy += (fp->dx) * (fp->d3); fp->num++; } break; } } fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_UNDEF; fp->dline=0; local->minx = fp->minx; local->maxx = fp->maxx; local->miny = fp->miny; local->maxy = fp->maxy; local->sumx = fp->sumx; local->sumy = fp->sumy; local->sumxx = fp->sumxx; local->sumyy = fp->sumyy; local->sumxy = fp->sumxy; local->num = fp->num; local->rcode = rcode; local->total_line = fp->line; if (rcode==-1) return -1; if (fp->interrupt == FALSE) local->mtime = fp->mtime; set_final_line(fp, local); return 0; } static int getposition(struct f2ddata *fp, double x, double y, int *gx, int *gy) /* return -1: unable to transform 0: normal 1: outside region */ { *gx = *gy = 0; if (getposition2(fp, fp->axtype, fp->aytype, &x, &y)) { return -1; } if (fp->dataclip && (((fp->axmin > x || x > fp->axmax) && (fp->axmax > x || x > fp->axmin)) || ((fp->aymin > y || y > fp->aymax) && (fp->aymax > y || y > fp->aymin)))) { /* fix-me: this condition will be simplified as (fp->dataclip && (fp->axmin>x || x>fp->axmax || fp->aymin>y || y>fp->aymax)) */ return 1; } if (_f2dtransf(x, y, gx, gy, fp)) { fp->ignore = TRUE; return -1; } return 0; } static int get_pos_sub(struct f2ddata *fp, double *val, int atype) { switch (atype) { case AXIS_TYPE_LOG: if (*val == 0) { fp->ignore = TRUE; return -1; } else if (*val < 0) { fp->negative = TRUE; *val = fabs(*val); } *val = log10(*val); break; case AXIS_TYPE_INVERSE: if (*val == 0) { fp->ignore = TRUE; return -1; } *val = 1 / *val; break; } return 0; } static int getposition2(struct f2ddata *fp,int axtype,int aytype,double *x,double *y) /* return -1: unable to transform 0: normal */ { int r; r = get_pos_sub(fp, x, axtype); if (r) { return -1; } r = get_pos_sub(fp, y, aytype); if (r) { return -1; } return 0; } static int _f2dtransf(double x,double y,int *gx,int *gy,void *local) { struct f2ddata *fp; double minx,miny; double v1x,v1y,v2x,v2y,vx,vy; double a,b,c,d; fp=local; minx=fp->axmin; miny=fp->aymin; v1x=fp->ratex*(x-minx)*fp->axvx; v1y=fp->ratex*(x-minx)*fp->axvy; v2x=fp->ratey*(y-miny)*fp->ayvx; v2y=fp->ratey*(y-miny)*fp->ayvy; vx=fp->ayposx-fp->axposx+v2x-v1x; vy=fp->ayposy-fp->axposy+v2y-v1y; a=fp->ayvy*fp->axvx-fp->ayvx*fp->axvy; c=-fp->ayvy*vx+fp->ayvx*vy; b=fp->axvy*fp->ayvx-fp->axvx*fp->ayvy; d=fp->axvy*vx-fp->axvx*vy; if ((fabs(a)<=1e-16) && (fabs(b)<=1e-16)) { return 1; } else if (fabs(b)<=1e-16) { a=c/a; *gx=fp->ayposx+nround(v2x+a*fp->axvx); *gy=fp->ayposy+nround(v2y+a*fp->axvy); } else { b=d/b; *gx=fp->axposx+nround(v1x+b*fp->ayvx); *gy=fp->axposy+nround(v1y+b*fp->ayvy); } return 0; } static void f2dtransf(double x,double y,int *gx,int *gy,void *local) { _f2dtransf(x, y, gx, gy, local); } static int f2dlineclipf(double *x0,double *y0,double *x1,double *y1,void *local) { double xl,yl,xg,yg; double minx,miny,maxx,maxy; struct f2ddata *fp; fp=local; if (!fp->dataclip) return 0; if (fp->axmin>fp->axmax) { minx=fp->axmax; maxx=fp->axmin; } else { minx=fp->axmin; maxx=fp->axmax; } if (fp->aymax>fp->aymin) { miny=fp->aymin; maxy=fp->aymax; } else { miny=fp->aymax; maxy=fp->aymin; } if (*x0<*x1) { xl=*x0; yl=*y0; xg=*x1; yg=*y1; } else { xl=*x1; yl=*y1; xg=*x0; yg=*y0; } if ((xgmaxx)) return 1; if (xg>maxx) { xg=maxx; yg=(*y1-*y0)*(maxx-*x0)/(*x1-*x0)+*y0; } if (xlyg) { double a; a=yl; yl=yg; yg=a; a=xl; xl=xg; xg=a; } if ((ygmaxy)) return 1; if (yg>maxy) { yg=maxy; xg=(*x1-*x0)*(maxy-*y0)/(*y1-*y0)+*x0; } if (yldataclip) return 0; if (fp->axmin>fp->axmax) { minx=fp->axmax; maxx=fp->axmin; } else { minx=fp->axmin; maxx=fp->axmax; } if (fp->aymax>fp->aymin) { miny=fp->aymin; maxy=fp->aymax; } else { miny=fp->aymax; maxy=fp->aymin; } if (*x0<*x1) { xl=*x0; xg=*x1; } else { xl=*x1; xg=*x0; } if (*y0<*y1) { yl=*y0; yg=*y1; } else { yl=*y1; yg=*y0; } if ((xgmaxx)) return 1; if ((ygmaxy)) return 1; if ((xg>maxx) && (xlmaxy) && (ylmaxx) xg=maxx; if (xlmaxy) yg=maxy; if (ylratex; (*dy)*=fp->ratey; (*ddx)*=fp->ratex; (*ddy)*=fp->ratey; } static void f2dbsplinedif(double d,double c[], double *dx,double *dy,double *ddx,double *ddy,void *local) { struct f2ddata *fp; fp=local; bsplinedif(d,c,dx,dy,ddx,ddy,NULL); (*dx)*=fp->ratex; (*dy)*=fp->ratey; (*ddx)*=fp->ratex; (*ddy)*=fp->ratey; } static void f2derror(struct objlist *obj,struct f2ddata *fp,int code,char *s) { char buf[256]; switch (fp->src) { case DATA_SOURCE_FILE: snprintf(buf, sizeof(buf), "#%d: %s (%d:%s)",fp->id,fp->file,fp->dline,s); break; case DATA_SOURCE_ARRAY: snprintf(buf, sizeof(buf), "#%d: Array (%s)",fp->id, s); break; case DATA_SOURCE_RANGE: snprintf(buf, sizeof(buf), "#%d: Range (%s)",fp->id, s); break; } error2(obj,code,buf); } static void error_info_init(struct error_info *einfo) { einfo->emerr = FALSE; einfo->emnonum = FALSE; einfo->emig = FALSE; einfo->emng = FALSE; } static void errordisp(struct objlist *obj, struct f2ddata *fp, struct error_info *einfo) { int x,y; char *s; if (!einfo->emerr) { x=FALSE; y=FALSE; if ((fp->dxstat==MATH_VALUE_ERROR) || (fp->dxstat==MATH_VALUE_NAN)) x=TRUE; if ((fp->dystat==MATH_VALUE_ERROR) || (fp->dystat==MATH_VALUE_NAN)) y=TRUE; switch (fp->type) { case TYPE_NORMAL: break; case TYPE_DIAGONAL: if ((fp->d2stat==MATH_VALUE_ERROR) || (fp->d2stat==MATH_VALUE_NAN)) x=TRUE; if ((fp->d3stat==MATH_VALUE_ERROR) || (fp->d3stat==MATH_VALUE_NAN)) y=TRUE; break; case TYPE_ERR_X: if ((fp->d2stat==MATH_VALUE_ERROR) || (fp->d2stat==MATH_VALUE_NAN)) x=TRUE; if ((fp->d3stat==MATH_VALUE_ERROR) || (fp->d3stat==MATH_VALUE_NAN)) x=TRUE; break; case TYPE_ERR_Y: if ((fp->d2stat==MATH_VALUE_ERROR) || (fp->d2stat==MATH_VALUE_NAN)) y=TRUE; if ((fp->d3stat==MATH_VALUE_ERROR) || (fp->d3stat==MATH_VALUE_NAN)) y=TRUE; break; } if (x || y) { if (x && (!y)) s="x"; else if ((!x) && y) s="y"; else s="xy"; f2derror(obj,fp,ERRMERR,s); einfo->emerr=TRUE; } } if (!einfo->emnonum) { x=FALSE; y=FALSE; if (fp->dxstat==MATH_VALUE_NONUM) x=TRUE; if (fp->dystat==MATH_VALUE_NONUM) y=TRUE; switch (fp->type) { case TYPE_NORMAL: break; case TYPE_DIAGONAL: if (fp->d2stat==MATH_VALUE_NONUM) x=TRUE; if (fp->d3stat==MATH_VALUE_NONUM) y=TRUE; break; case TYPE_ERR_X: if (fp->d2stat==MATH_VALUE_NONUM) x=TRUE; if (fp->d3stat==MATH_VALUE_NONUM) x=TRUE; break; case TYPE_ERR_Y: if (fp->d2stat==MATH_VALUE_NONUM) y=TRUE; if (fp->d3stat==MATH_VALUE_NONUM) y=TRUE; break; } if (x || y) { if (x && (!y)) s="x"; else if ((!x) && y) s="y"; else s="xy"; f2derror(obj,fp,ERRMNONUM,s); einfo->emnonum=TRUE; } } if (!einfo->emig && fp->ignore) { error(obj,ERRIGNORE); einfo->emig=TRUE; } if (!einfo->emng && fp->negative) { error(obj,ERRNEGATIVE); einfo->emng=TRUE; } } static void errordisp2(struct objlist *obj, struct f2ddata *fp, struct error_info *einfo, char ddstat,char *s) { if (!einfo->emerr && (ddstat==MATH_VALUE_ERROR)) { f2derror(obj,fp,ERRMERR,s); einfo->emerr=TRUE; } if (!einfo->emerr && (ddstat==MATH_VALUE_NAN)) { f2derror(obj,fp,ERRMERR,s); einfo->emerr=TRUE; } if (!einfo->emnonum && (ddstat==MATH_VALUE_NONUM)) { f2derror(obj,fp,ERRMNONUM,s); einfo->emnonum=TRUE; } if (!einfo->emig && fp->ignore) { error(obj,ERRIGNORE); einfo->emig=TRUE; } if (!einfo->emng && fp->negative) { error(obj,ERRNEGATIVE); einfo->emng=TRUE; } } #define SPBUFFERSZ 1024 static double * dataadd(double dx,double dy,double dz, int fr,int fg,int fb,int fa, int *size, double **x,double **y,double **z, int **r,int **g,int **b, int **a, double **c1,double **c2,double **c3, double **c4,double **c5,double **c6) { double *xb,*yb,*zb,*c1b,*c2b,*c3b,*c4b,*c5b,*c6b; int *rb,*gb,*bb,*ab; int bz; if (*size==0) { if (((*x=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*y=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*z=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*r=g_malloc(sizeof(int)*SPBUFFERSZ))==NULL) || ((*g=g_malloc(sizeof(int)*SPBUFFERSZ))==NULL) || ((*b=g_malloc(sizeof(int)*SPBUFFERSZ))==NULL) || ((*a=g_malloc(sizeof(int)*SPBUFFERSZ))==NULL) || ((*c1=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*c2=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*c3=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*c4=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*c5=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL) || ((*c6=g_malloc(sizeof(double)*SPBUFFERSZ))==NULL)) { g_free(*x); g_free(*y); g_free(*z); g_free(*r); g_free(*g); g_free(*b); g_free(*a); g_free(*c1); g_free(*c2); g_free(*c3); g_free(*c4); g_free(*c5); g_free(*c6); return NULL; } } else if ((*size%SPBUFFERSZ)==0) { bz=*size/SPBUFFERSZ+1; if (((xb=g_realloc(*x,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((yb=g_realloc(*y,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((zb=g_realloc(*z,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((rb=g_realloc(*r,sizeof(int)*SPBUFFERSZ*bz))==NULL) || ((gb=g_realloc(*g,sizeof(int)*SPBUFFERSZ*bz))==NULL) || ((bb=g_realloc(*b,sizeof(int)*SPBUFFERSZ*bz))==NULL) || ((ab=g_realloc(*b,sizeof(int)*SPBUFFERSZ*bz))==NULL) || ((c1b=g_realloc(*c1,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((c2b=g_realloc(*c2,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((c3b=g_realloc(*c3,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((c4b=g_realloc(*c4,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((c5b=g_realloc(*c5,sizeof(double)*SPBUFFERSZ*bz))==NULL) || ((c6b=g_realloc(*c6,sizeof(double)*SPBUFFERSZ*bz))==NULL)) { g_free(*x); g_free(*y); g_free(*z); g_free(*r); g_free(*g); g_free(*b); g_free(*a); g_free(*c1); g_free(*c2); g_free(*c3); g_free(*c4); g_free(*c5); g_free(*c6); return NULL; } else { *x=xb; *y=yb; *z=zb; *r=rb; *g=gb; *b=bb; *a=ab; *c1=c1b; *c2=c2b; *c3=c3b; *c4=c4b; *c5=c5b; *c6=c6b; } } (*x)[*size]=dx; (*y)[*size]=dy; (*z)[*size]=dz; (*r)[*size]=fr; (*g)[*size]=fg; (*b)[*size]=fb; (*a)[*size]=fa; (*size)++; return *x; } static int markout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style) { struct error_info einfo; int gx,gy; error_info_init(&einfo); GRAlinestyle(GC,snum,style,width,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); while (getdata(fp)==0) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition(fp,fp->dx,fp->dy,&gx,&gy)==0)) { if (fp->msize>0) GRAmark(GC,fp->mtype, gx, gy, fp->msize, fp->col.r, fp->col.g, fp->col.b, fp->col.a, fp->col2.r, fp->col2.g, fp->col2.b, fp->col2.a); } else errordisp(obj,fp,&einfo); } errordisp(obj,fp,&einfo); return 0; } static int lineout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style, int join,int miter,int close) { struct error_info einfo; int first; double x0,y0; error_info_init(&einfo); #if EXPAND_DOTTED_LINE GRAlinestyle(GC,0,NULL,width,GRA_LINE_CAP_BUTT,join,miter); #else GRAlinestyle(GC, snum, style, width, GRA_LINE_CAP_BUTT, join, miter); #endif first=TRUE; while (getdata(fp)==0) { GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (first) { GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf,NULL,NULL,fp, fp->dx,fp->dy); first=FALSE; x0=fp->dx; y0=fp->dy; } else { GRAdashlinetod(GC,fp->dx,fp->dy); } } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (! first && close) { GRAdashlinetod(GC,x0,y0); } first=TRUE; } errordisp(obj,fp,&einfo); } } if (!first && close) GRAdashlinetod(GC,x0,y0); errordisp(obj,fp,&einfo); return 0; } static void poly_add_point(struct narray *pos, double x, double y, struct f2ddata *fp) { int gx, gy; f2dtransf(x, y, &gx, &gy, fp); arrayadd(pos, &gx); arrayadd(pos, &gy); } static void poly_add_clip_point(struct narray *pos, double minx, double miny, double maxx, double maxy, double x, double y, struct f2ddata *fp) { if (x < minx) { x = minx; } else if (x > maxx) { x = maxx; } if (y < miny) { y = miny; } else if (y > maxy) { y = maxy; } poly_add_point(pos, x, y, fp); } static int poly_pos_sort_cb(const void *a, const void *b) { const struct point_pos *p1, *p2; double d; int r; p1 = a; p2 = b; d = p1->d - p2->d; if (d < 0) { r = -1; } else if (d > 0) { r = 1; } else { r = 0; } return r; } static void poly_set_pos(struct point_pos *p, int i, double x, double y, double x0, double y0) { p[i].x = x; p[i].y = y; x -= x0; y -= y0; p[i].d = x * x + y * y; } static int poly_add_elements(struct narray *pos, double minx, double miny, double maxx, double maxy, double x0, double y0, double x1, double y1, struct f2ddata *fp) { double x, y, v0, v1, a, b, ba; struct point_pos cpos[4]; int i; if (x0 == x1 && y0 == y1) { return 1; } if (x0 >= minx && x0 <= maxx && y0 >= miny && y0 <= maxy) { poly_add_clip_point(pos, minx, miny, maxx, maxy, x0, y0, fp); } if (x0 == x1) { if ((y0 < miny && y1 < miny) || (y0 > maxy && y1 > maxy)) { return 1; } if (y0 > y1) { if (y0 > maxy) { poly_add_clip_point(pos, minx, miny, maxx, maxy, x0, maxy, fp); } if (y1 < miny) { poly_add_clip_point(pos, minx, miny, maxx, maxy, x0, miny, fp); } } else { if (y0 < miny) { poly_add_clip_point(pos, minx, miny, maxx, maxy, x0, miny, fp); } if (y1 > maxy) { poly_add_clip_point(pos, minx, miny, maxx, maxy, x0, maxy, fp); } } goto End; } else if (y0 == y1) { if ((x0 < minx && x1 < minx) || (x0 > maxx && x1 > maxx)){ return 1; } if (x0 > x1) { if (x0 > maxx) { poly_add_clip_point(pos, minx, miny, maxx, maxy, maxx, y0, fp); } if (x1 < minx) { poly_add_clip_point(pos, minx, miny, maxx, maxy, minx, y0, fp); } } else { if (x0 < minx) { poly_add_clip_point(pos, minx, miny, maxx, maxy, minx, y0, fp); } if (x1 > maxx) { poly_add_clip_point(pos, minx, miny, maxx, maxy, maxx, y0, fp); } } goto End; } a = (y1 - y0) / (x1 - x0); b = (x1 * y0 - x0 * y1) / (x1 - x0); ba = (x1 * y0 - x0 * y1) / (y1 - y0); cpos[0].d = -1; cpos[1].d = -1; cpos[2].d = -1; cpos[3].d = -1; v0 = a * x0 + b; v1 = a * x1 + b; x = maxx; y = a * maxx + b; if (((x >= x0 && x <= x1) || (x >= x1 && x <= x0)) && ((y >= v0 && y <= v1) || (y >= v1 && y <= v0))) { poly_set_pos(cpos, 0, x, y, x0, y0); } x = minx; y = a * minx + b; if (((x >= x0 && x <= x1) || (x >= x1 && x <= x0)) && ((y >= v0 && y <= v1) || (y >= v1 && y <= v0))) { poly_set_pos(cpos, 1, x, y, x0, y0); } v0 = y0 / a - ba; v1 = y1 / a - ba; x = maxy / a - ba; y = maxy; if (((x >= v0 && x <= v1) || (x >= v1 && x <= v0)) && ((y >= y0 && y <= y1) || (y >= y1 && y <= y0))) { poly_set_pos(cpos, 2, x, y, x0, y0); } x = miny / a - ba; y = miny; if (((x >= v0 && x <= v1) || (x >= v1 && x <= v0)) && ((y >= y0 && y <= y1) || (y >= y1 && y <= y0))) { poly_set_pos(cpos, 3, x, y, x0, y0); } qsort(cpos, 4, sizeof(*cpos), poly_pos_sort_cb); for (i = 0; i < 4; i++) { if (cpos[i].d >= 0) { poly_add_clip_point(pos, minx, miny, maxx, maxy, cpos[i].x, cpos[i].y, fp); } } End: if (x1 >= minx && x1 <= maxx && y1 >= miny && y1 <= maxy) { poly_add_clip_point(pos, minx, miny, maxx, maxy, x1, y1, fp); } return 0; } static void add_polygon_point(struct narray *pos, double x0, double y0, double x1, double y1, struct f2ddata *fp) { double minx, miny, maxx, maxy; if (! fp->dataclip) { poly_add_point(pos, x0, y0, fp); poly_add_point(pos, x1, y1, fp); return; } if (fp->axmin > fp->axmax) { minx = fp->axmax; maxx = fp->axmin; } else { minx = fp->axmin; maxx = fp->axmax; } if (fp->aymax > fp->aymin) { miny = fp->aymin; maxy = fp->aymax; } else { miny = fp->aymax; maxy = fp->aymin; } poly_add_elements(pos, minx, miny, maxx, maxy, x0, y0, x1, y1, fp); } static void uniq_points(struct narray *pos) { int n, i, x0, y0, x1, y1; n = arraynum(pos) / 2 - 1; if (n < 2) { return; } for (i = n; i > 0; i--) { x0 = arraynget_int(pos, i * 2 - 2); y0 = arraynget_int(pos, i * 2 - 1); x1 = arraynget_int(pos, i * 2); y1 = arraynget_int(pos, i * 2 + 1); if (x0 == x1 && y0 == y1) { arrayndel(pos, i * 2 + 1); arrayndel(pos, i * 2); } } n = arraynum(pos) / 2 - 1; if (n < 2) { return; } x0 = arraynget_int(pos, 0); y0 = arraynget_int(pos, 1); x1 = arraynget_int(pos, n * 2); y1 = arraynget_int(pos, n * 2 + 1); if (x0 == x1 && y0 == y1) { arrayndel(pos, n * 2 + 1); arrayndel(pos, n * 2); } } static void draw_polygon(struct narray *pos, int GC, int fill) { int n, *ap; uniq_points(pos); ap = (int *) arraydata(pos); n = arraynum(pos); if (n > 3) { GRAdrawpoly(GC, n / 2, ap, fill); } #if 0 /* for debug */ int i; for (i = 0; i < n / 2; i++) { char buf[256]; GRAmark(GC, 0, ap[i * 2], ap[i * 2 + 1], 200, 0, 0, 0, 255, 0, 0, 0, 255); GRAcolor(GC, 0, 0, 0, 255); sprintf(buf, "%d/%d", i + 1, n / 2); GRAmoveto(GC, ap[i * 2], ap[i * 2 + 1] - i * 500); GRAdrawtext(GC, buf, "Serif", 0, 2000, 0, 0, 7000); } #endif } static int polyout(struct objlist *obj, struct f2ddata *fp, int GC) { struct error_info einfo; int first; struct narray pos; double x0, y0, x1, y1, x2, y2; arrayinit(&pos, sizeof(int)); error_info_init(&einfo); first = TRUE; while (getdata(fp) == 0) { GRAcolor(GC, fp->col.r, fp->col.g, fp->col.b, fp->col.a); if (fp->dxstat == MATH_VALUE_NORMAL && fp->dystat == MATH_VALUE_NORMAL) { if (first) { first = FALSE; x0 = fp->dx; y0 = fp->dy; x2 = fp->dx; y2 = fp->dy; } else { x1 = x2; y1 = y2; x2 = fp->dx; y2 = fp->dy; add_polygon_point(&pos, x1, y1, x2, y2, fp); } } else { if (fp->dxstat != MATH_VALUE_CONT && fp->dystat != MATH_VALUE_CONT) { if (! first) { add_polygon_point(&pos, x2, y2, x0, y0, fp); } draw_polygon(&pos, GC, GRA_FILL_MODE_WINDING); arraydel(&pos); first = TRUE; } errordisp(obj, fp, &einfo); } } if (! first) { add_polygon_point(&pos, x2, y2, x0, y0, fp); } draw_polygon(&pos, GC, GRA_FILL_MODE_WINDING); arraydel(&pos); errordisp(obj, fp, &einfo); return 0; } #define FREE_INTP_BUF() \ g_free(x); g_free(y); g_free(z); \ g_free(r); g_free(g); g_free(b); g_free(a); \ g_free(c1); g_free(c2); g_free(c3); \ g_free(c4); g_free(c5); g_free(c6); static int curveout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style, int join,int miter,int intp) { struct error_info einfo; int j,num; int first; double *x,*y,*z,*c1,*c2,*c3,*c4,*c5,*c6,count; int *r,*g,*b,*a; double c[8]; double bs1[7],bs2[7],bs3[4],bs4[4]; int bsr[7],bsg[7],bsb[7],bsa[7],bsr2[4],bsg2[4],bsb2[4],bsa2[4]; int spcond; error_info_init(&einfo); #if EXPAND_DOTTED_LINE GRAlinestyle(GC,0,NULL,width,GRA_LINE_CAP_BUTT,join,miter); #else GRAlinestyle(GC, snum, style, width, GRA_LINE_CAP_BUTT, join, miter); #endif switch (intp) { case INTERPOLATION_TYPE_SPLINE: case INTERPOLATION_TYPE_SPLINE_CLOSE: num=0; count=0; x=y=z=c1=c2=c3=c4=c5=c6=NULL; r=g=b=a=NULL; while (getdata(fp)==0) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (dataadd(fp->dx,fp->dy,count,fp->col.r,fp->col.g,fp->col.b,fp->col.a,&num, &x,&y,&z,&r,&g,&b,&a,&c1,&c2,&c3,&c4,&c5,&c6)==NULL) return -1; count++; } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (num>=2) { if (intp==INTERPOLATION_TYPE_SPLINE) { spcond=SPLCND2NDDIF; } else { spcond=SPLCNDPERIODIC; if ((x[num-1]!=x[0]) || (y[num-1]!=y[0])) { if (dataadd(x[0],y[0],count,r[0],g[0],b[0],a[0],&num, &x,&y,&z,&r,&g,&b,&a,&c1,&c2,&c3,&c4,&c5,&c6)==NULL) return -1; } } if (spline(z,x,c1,c2,c3,num,spcond,spcond,0,0) || spline(z,y,c4,c5,c6,num,spcond,spcond,0,0)) { FREE_INTP_BUF(); error(obj,ERRSPL); return -1; } GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf, f2dsplinedif,splineint,fp,x[0],y[0]); for (j=0;jdxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (first) { bs1[num]=fp->dx; bs2[num]=fp->dy; bsr[num]=fp->col.r; bsg[num]=fp->col.g; bsb[num]=fp->col.b; bsa[num]=fp->col.a; num++; if (num>=7) { for (j=0;j<2;j++) { bspline(j+1,bs1+j,c); bspline(j+1,bs2+j,c+4); if (j==0) { GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf, f2dbsplinedif,bsplineint,fp,c[0],c[4]); } GRAcolor(GC,bsr[j],bsg[j],bsb[j],bsa[j]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } first=FALSE; } } else { for (j=1;j<7;j++) { bs1[j-1]=bs1[j]; bs2[j-1]=bs2[j]; bsr[j-1]=bsr[j]; bsg[j-1]=bsg[j]; bsb[j-1]=bsb[j]; bsa[j-1]=bsa[j]; } bs1[6]=fp->dx; bs2[6]=fp->dy; bsr[6]=fp->col.r; bsg[6]=fp->col.g; bsb[6]=fp->col.b; bsa[6]=fp->col.a; num++; bspline(0,bs1+1,c); bspline(0,bs2+1,c+4); GRAcolor(GC,bsr[1],bsg[1],bsb[1],bsa[1]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (!first) { for (j=0;j<2;j++) { bspline(j+3,bs1+j+2,c); bspline(j+3,bs2+j+2,c+4); GRAcolor(GC,bsr[j+2],bsg[j+2],bsb[j+2],bsa[j+2]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } } first=TRUE; num=0; } errordisp(obj,fp,&einfo); } } if (!first) { for (j=0;j<2;j++) { bspline(j+3,bs1+j+2,c); bspline(j+3,bs2+j+2,c+4); GRAcolor(GC,bsr[j+2],bsg[j+2],bsb[j+2],bsa[j+2]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } } break; case INTERPOLATION_TYPE_BSPLINE_CLOSE: first=TRUE; num=0; while (getdata(fp)==0) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (first) { bs1[num]=fp->dx; bs3[num]=fp->dx; bs2[num]=fp->dy; bs4[num]=fp->dy; bsr[num]=fp->col.r; bsg[num]=fp->col.g; bsb[num]=fp->col.b; bsa[num]=fp->col.a; bsr2[num]=fp->col.r; bsg2[num]=fp->col.g; bsb2[num]=fp->col.b; bsa2[num]=fp->col.a; num++; if (num>=4) { bspline(0,bs1,c); bspline(0,bs2,c+4); GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf, f2dbsplinedif,bsplineint,fp,c[0],c[4]); GRAcolor(GC,bsr[0],bsg[0],bsb[0],bsa[0]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; first=FALSE; } } else { for (j=1;j<4;j++) { bs1[j-1]=bs1[j]; bs2[j-1]=bs2[j]; bsr[j-1]=bsr[j]; bsg[j-1]=bsg[j]; bsb[j-1]=bsb[j]; bsa[j-1]=bsa[j]; } bs1[3]=fp->dx; bs2[3]=fp->dy; bsr[3]=fp->col.r; bsg[3]=fp->col.g; bsb[3]=fp->col.b; bsa[3]=fp->col.a; num++; bspline(0,bs1,c); bspline(0,bs2,c+4); GRAcolor(GC,bsr[0],bsg[0],bsb[0],bsa[0]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (!first) { for (j=0;j<3;j++) { bs1[4+j]=bs3[j]; bs2[4+j]=bs4[j]; bsr[4+j]=bsr2[j]; bsg[4+j]=bsg2[j]; bsb[4+j]=bsb2[j]; bsa[4+j]=bsa2[j]; bspline(0,bs1+j+1,c); bspline(0,bs2+j+1,c+4); GRAcolor(GC,bsr[j+1],bsg[j+1],bsb[j+1],bsa[j+1]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } } first=TRUE; num=0; } errordisp(obj,fp,&einfo); } } if (!first) { for (j=0;j<3;j++) { bs1[4+j]=bs3[j]; bs2[4+j]=bs4[j]; bsr[4+j]=bsr2[j]; bsg[4+j]=bsg2[j]; bsb[4+j]=bsb2[j]; bsa[4+j]=bsa2[j]; bspline(0,bs1+j+1,c); bspline(0,bs2+j+1,c+4); GRAcolor(GC,bsr[j+1],bsg[j+1],bsb[j+1],bsa[j+1]); if (!GRAcurve(GC,c,c[0],c[4])) return -1; } } break; } errordisp(obj,fp,&einfo); return 0; } static void draw_arrow(struct f2ddata *fp ,int GC, double x0, double y0, double x1, double y1, int msize, struct line_position *lp) { int gx0, gy0, gx1, gy1; double d2, d3, headlen, headwidth; headlen = 72426; headwidth = 60000; d2 = x1; d3 = y1; if (f2dlineclipf(&x0, &y0, &x1, &y1, fp)) { return; } f2dtransf(x0, y0, &gx0, &gy0, fp); f2dtransf(x1, y1, &gx1, &gy1, fp); if ((x1 == d2) && (y1 == d3) && (msize > 0)) { double dx, dy, len, alen, awidth; alen = msize; awidth = alen * headwidth / headlen / 2.0; dx = gx1-gx0; dy = gy1-gy0; len = sqrt(dx*dx+dy*dy); if (len > 0) { int ax0, ay0, ap[8]; ax0 = nround(gx1 - dx * alen / len); ay0 = nround(gy1 - dy * alen / len); ap[0] = nround(ax0 - dy / len * awidth); ap[1] = nround(ay0 + dx / len * awidth); ap[2] = gx1; ap[3] = gy1; ap[4] = nround(ax0 + dy / len * awidth); ap[5] = nround(ay0 - dx / len * awidth); GRAdrawpoly(GC, 3, ap, GRA_FILL_MODE_EVEN_ODD); lp->x0 = gx0; lp->y0 = gy0; lp->x1 = ax0; lp->y1 = ay0; } } else { lp->x0 = gx0; lp->y0 = gy0; lp->x1 = gx1; lp->y1 = gy1; } } static int rectout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style,int type) { struct error_info einfo; double x0,y0,x1,y1; int gx0,gy0,gx1,gy1; int ap[8]; error_info_init(&einfo); if (type == PLOT_TYPE_DIAGONAL) GRAlinestyle(GC,snum,style,width,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); else GRAlinestyle(GC,snum,style,width,GRA_LINE_CAP_PROJECTING,GRA_LINE_JOIN_MITER,1000); while (getdata(fp)==0) { GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->d2),&(fp->d3))==0)) { if (type == PLOT_TYPE_DIAGONAL) { x0=fp->dx; y0=fp->dy; x1=fp->d2; y1=fp->d3; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)==0) { f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); GRAline(GC,gx0,gy0,gx1,gy1); } } if (type == PLOT_TYPE_ARROW) { struct line_position lp; draw_arrow(fp, GC, fp->dx, fp->dy, fp->d2, fp->d3, fp->msize, &lp); GRAline(GC, lp.x0, lp.y0, lp.x1, lp.y1); } if (type == PLOT_TYPE_RECTANGLE_FILL || type == PLOT_TYPE_RECTANGLE_SOLID_FILL) { if (type == PLOT_TYPE_RECTANGLE_FILL) { GRAcolor(GC, fp->col2.r, fp->col2.g, fp->col2.b, fp->col2.a); } x0=fp->dx; y0=fp->dy; x1=fp->d2; y1=fp->d3; if (f2drectclipf(&x0,&y0,&x1,&y1,fp)==0) { f2dtransf(x0, y0, ap + 0, ap + 1, fp); f2dtransf(x0, y1, ap + 2, ap + 3, fp); f2dtransf(x1, y1, ap + 4, ap + 5, fp); f2dtransf(x1, y0, ap + 6, ap + 7, fp); GRAdrawpoly(GC, 4, ap, GRA_FILL_MODE_EVEN_ODD); } if (type == PLOT_TYPE_RECTANGLE_FILL) { GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); } } if (type == PLOT_TYPE_RECTANGLE || type == PLOT_TYPE_RECTANGLE_FILL) { x0=fp->dx; y0=fp->dy; x1=fp->dx; y1=fp->d3; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)==0) { f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); GRAline(GC,gx0,gy0,gx1,gy1); } x0=fp->dx; y0=fp->d3; x1=fp->d2; y1=fp->d3; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)==0) { f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); GRAline(GC,gx0,gy0,gx1,gy1); } x0=fp->d2; y0=fp->d3; x1=fp->d2; y1=fp->dy; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)==0) { f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); GRAline(GC,gx0,gy0,gx1,gy1); } x0=fp->d2; y0=fp->dy; x1=fp->dx; y1=fp->dy; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)==0) { f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); GRAline(GC,gx0,gy0,gx1,gy1); } } } else errordisp(obj,fp,&einfo); } errordisp(obj,fp,&einfo); return 0; } static void draw_errorbar(struct f2ddata *fp, int GC, int size, double dx0, double dy0, double dx1, double dy1) { double x0, y0, x1, y1, x, y, r, dirx, diry; int gx0, gy0, gx1, gy1; x0 = dx0; y0 = dy0; x1 = dx1; y1 = dy1; if (f2dlineclipf(&x0, &y0, &x1, &y1, fp)) { return; } f2dtransf(x0, y0, &gx0, &gy0, fp); f2dtransf(x1, y1, &gx1, &gy1, fp); x = gx1 - gx0; y = gy1 - gy0; r = sqrt(x * x + y * y); if (r == 0) { return; } dirx = x / r; diry = y / r; GRAline(GC, gx0, gy0, gx1, gy1); if (dx0 == x0 && dy0 == y0) { GRAline(GC, gx0 + nround(size * diry), gy0 - nround(size * dirx), gx0 - nround(size * diry), gy0 + nround(size * dirx)); } if (dx1 == x1 && dy1 == y1) { GRAline(GC, gx1 + nround(size * diry), gy1 - nround(size * dirx), gx1 - nround(size * diry), gy1 + nround(size * dirx)); } } static int errorbarout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style,int type) { struct error_info einfo; error_info_init(&einfo); GRAlinestyle(GC,snum,style,width,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); while (getdata(fp)==0) { int size; size=fp->marksize0/2; GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); if (type == PLOT_TYPE_ERRORBAR_X) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0) && (getposition2(fp,fp->axtype,fp->axtype,&(fp->d2),&(fp->d3))==0)) { draw_errorbar(fp, GC, size, fp->d2, fp->dy, fp->d3, fp->dy); } else errordisp(obj,fp,&einfo); } else if (type == PLOT_TYPE_ERRORBAR_Y) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0) && (getposition2(fp,fp->aytype,fp->aytype,&(fp->d2),&(fp->d3))==0)) { draw_errorbar(fp, GC, size, fp->dx, fp->d2, fp->dx, fp->d3); } else errordisp(obj,fp,&einfo); } } errordisp(obj,fp,&einfo); return 0; } static int stairout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style, int join,int miter,int type) { struct error_info einfo; int num; double x0,y0,x1,y1,x,y,dx,dy; error_info_init(&einfo); #if EXPAND_DOTTED_LINE GRAlinestyle(GC,0,NULL,width,GRA_LINE_CAP_BUTT,join,miter); #else GRAlinestyle(GC, snum, style, width, GRA_LINE_CAP_BUTT, join, miter); #endif num=0; while (getdata(fp)==0) { GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (num==0) { x0=fp->dx; y0=fp->dy; num++; } else if (num==1) { x1=fp->dx; y1=fp->dy; if (type == PLOT_TYPE_STAIRCASE_X) { dx=(x1-x0)*0.5; y=y0; x=x0-dx; GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf,NULL,NULL,fp,x,y); x=x0+dx; GRAdashlinetod(GC,x,y); y=y1; GRAdashlinetod(GC,x,y); } else { dy=(y1-y0)*0.5; x=x0; y=y0-dy; GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf,NULL,NULL,fp,x,y); y=y0+dy; GRAdashlinetod(GC,x,y); x=x1; GRAdashlinetod(GC,x,y); } x0=x1; y0=y1; num++; } else { x1=fp->dx; y1=fp->dy; if (type == PLOT_TYPE_STAIRCASE_X) { dx=(x1-x0)*0.5; y=y0; x=x0+dx; GRAdashlinetod(GC,x,y); y=y1; GRAdashlinetod(GC,x,y); } else { dy=(y1-y0)*0.5; x=x0; y=y0+dy; GRAdashlinetod(GC,x,y); x=x1; GRAdashlinetod(GC,x,y); } x0=x1; y0=y1; } } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (num!=0) { if (type == PLOT_TYPE_STAIRCASE_X) { dx=x0-x; x=x0+dx; GRAdashlinetod(GC,x,y); } else { dy=y0-y; y=y0+dy; GRAdashlinetod(GC,x,y); } } num=0; } errordisp(obj,fp,&einfo); } } if (num!=0) { if (type == PLOT_TYPE_STAIRCASE_X) { dx=x0-x; x=x0+dx; GRAdashlinetod(GC,x,y); } else { dy=y0-y; y=y0+dy; GRAdashlinetod(GC,x,y); } } errordisp(obj,fp,&einfo); return 0; } static void draw_rect(int GC, int *ap, double v0, double v1, double v2, double v3) { GRAline(GC, ap[0], ap[1], ap[2] ,ap[3]); if (v0 == v1) { GRAline(GC, ap[2], ap[3], ap[4] ,ap[5]); } GRAline(GC, ap[4], ap[5], ap[6] ,ap[7]); if (v2 == v3) { GRAline(GC, ap[6], ap[7], ap[0] ,ap[1]); } } static int barout(struct objlist *obj,struct f2ddata *fp,int GC, int width,int snum,int *style,int type) { struct error_info einfo; double x0,y0,x1,y1; int gx0,gy0,gx1,gy1; int ap[8]; error_info_init(&einfo); if (type <= PLOT_TYPE_BAR_FILL_Y) GRAlinestyle(GC,snum,style,width,GRA_LINE_CAP_PROJECTING,GRA_LINE_JOIN_MITER,1000); while (getdata(fp)==0) { int size; size=fp->marksize0/2; if (fp->dxstat != MATH_VALUE_NORMAL || fp->dystat != MATH_VALUE_NORMAL || getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))) { errordisp(obj,fp,&einfo); continue; } switch (type) { case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_SOLID_FILL_X: case PLOT_TYPE_BAR_X: x0=0; y0=fp->dy; x1=fp->dx; y1=fp->dy; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)) { break; } f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); ap[0]=gx0+nround(size*fp->ayvx); ap[1]=gy0+nround(size*fp->ayvy); ap[2]=gx1+nround(size*fp->ayvx); ap[3]=gy1+nround(size*fp->ayvy); ap[4]=gx1-nround(size*fp->ayvx); ap[5]=gy1-nround(size*fp->ayvy); ap[6]=gx0-nround(size*fp->ayvx); ap[7]=gy0-nround(size*fp->ayvy); switch (type) { case PLOT_TYPE_BAR_X: GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); draw_rect(GC, ap, x1, fp->dx, x0, 0); break; case PLOT_TYPE_BAR_SOLID_FILL_X: GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); GRAdrawpoly(GC,4,ap,GRA_FILL_MODE_EVEN_ODD); break; case PLOT_TYPE_BAR_FILL_X: GRAcolor(GC, fp->col2.r, fp->col2.g, fp->col2.b, fp->col2.a); GRAdrawpoly(GC,4,ap,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); draw_rect(GC, ap, x1, fp->dx, x0, 0); break; } break; case PLOT_TYPE_BAR_FILL_Y: case PLOT_TYPE_BAR_SOLID_FILL_Y: case PLOT_TYPE_BAR_Y: x0=fp->dx; y0=0; x1=fp->dx; y1=fp->dy; if (f2dlineclipf(&x0,&y0,&x1,&y1,fp)) { break; } f2dtransf(x0,y0,&gx0,&gy0,fp); f2dtransf(x1,y1,&gx1,&gy1,fp); ap[0]=gx0+nround(size*fp->axvx); ap[1]=gy0+nround(size*fp->axvy); ap[2]=gx1+nround(size*fp->axvx); ap[3]=gy1+nround(size*fp->axvy); ap[4]=gx1-nround(size*fp->axvx); ap[5]=gy1-nround(size*fp->axvy); ap[6]=gx0-nround(size*fp->axvx); ap[7]=gy0-nround(size*fp->axvy); switch (type) { case PLOT_TYPE_BAR_Y: GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); draw_rect(GC, ap, y1, fp->dy, y0, 0); break; case PLOT_TYPE_BAR_SOLID_FILL_Y: GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); GRAdrawpoly(GC,4,ap,GRA_FILL_MODE_EVEN_ODD); break; case PLOT_TYPE_BAR_FILL_Y: GRAcolor(GC, fp->col2.r, fp->col2.g, fp->col2.b, fp->col2.a); GRAdrawpoly(GC,4,ap,GRA_FILL_MODE_EVEN_ODD); GRAcolor(GC,fp->col.r,fp->col.g,fp->col.b, fp->col.a); draw_rect(GC, ap, y1, fp->dy, y0, 0); break; } break; } } errordisp(obj,fp,&einfo); return 0; } static int calc_weight(struct objlist *obj, struct f2dlocal *f2dlocal, struct f2ddata *fp, const char *weight, struct narray *data, struct narray *index) { MathEquation *code; MathEquationParametar *prm; double dd; int two_pass, maxdim, ddstat, rcode, datanum2, i, j; struct error_info einfo; int const_id[MATH_CONST_SIZE]; code = ofile_create_math_equation(const_id, EOEQ_ASSIGN_TYPE_ASSIGN, 3, FALSE, TRUE, FALSE, FALSE, TRUE); if (code == NULL) { return 1; } rcode = math_equation_parse(code, weight); if (rcode) { math_equation_free(code); return 1; } prm = math_equation_get_parameter(code, 0, NULL); maxdim = (prm) ? prm->id_max : 0; two_pass = math_equation_check_const(code, const_id, TWOPASS_CONST_SIZE); if (two_pass) { reopendata(fp); if (getminmaxdata(fp, f2dlocal) == -1) { math_equation_free(code); return 1; } } if (maxdim < fp->x) maxdim = fp->x; if (maxdim < fp->y) maxdim = fp->y; datanum2 = fp->datanum; reopendata(fp); if (hskipdata(fp) != 0) { math_equation_free(code); return 1; } fp->datanum = datanum2; if (set_const(code, const_id, two_pass, fp, TRUE)) { math_equation_free(code); return 1; } error_info_init(&einfo); for (i = j = 0; getdata2(fp, code, maxdim, &dd, &ddstat) == 0; i++) { int *line; line = (int *) arraynget(index, j); if (line == NULL) { break; } else if (*line != i) { continue; } j++; if (ddstat == MATH_VALUE_NORMAL) { if (arrayadd(data, &dd) == NULL) { return -1; } } else { errordisp2(obj, fp, &einfo, ddstat, "weight"); } } math_equation_free(code); if (arraynum(data) == 0) { return -1; } return 0; } static int calc_fit(struct objlist *obj, struct f2dlocal *f2dlocal, struct f2ddata *fp, struct objlist *fitobj, int fit_id) { struct error_info einfo; int i; struct narray data, index; char *weight, *argv[2]; double dnum; arrayinit(&data,sizeof(double)); arrayinit(&index,sizeof(int)); error_info_init(&einfo); for (i = 0; getdata(fp)==0; i++) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { if (arrayadd(&data, &fp->dx) == NULL || arrayadd(&data, &fp->dy) == NULL || arrayadd(&index, &i) == NULL) { arraydel(&index); arraydel(&data); return -1; } } else { errordisp(obj, fp, &einfo); } } errordisp(obj, fp, &einfo); if ((dnum=(double )arraynum(&data))==0) { arraydel(&index); arraydel(&data); return -1; } dnum /= 2; if (arrayins(&data, &dnum, 0) == NULL) { arraydel(&index); arraydel(&data); return -1; } if (getobj(fitobj, "weight_func", fit_id, 0, NULL, &weight) == -1) { arraydel(&index); arraydel(&data); return -1; } if (weight) { int rcode; rcode = calc_weight(obj, f2dlocal, fp, weight, &data, &index); if (rcode) { arraydel(&index); arraydel(&data); return rcode; } } arraydel(&index); argv[0] = (void *) (&data); argv[1] = NULL; if (exeobj(fitobj, "fit", fit_id, 1, argv)) { arraydel(&data); return -1; } arraydel(&data); return 0; } #define MATH_EQUATION_FREE(eq) math_equation_free(eq) static int draw_interpolation(struct f2ddata *fp, int GC, int num, int snum, int *style, double *c, double *x, double *y, double *z, double *c1, double *c2, double *c3, double *c4, double *c5, double *c6) { int j, spcond; spcond = SPLCND2NDDIF; if (spline(z, x, c1, c2, c3, num, spcond, spcond, 0, 0) || spline(z, y, c4, c5, c6, num, spcond, spcond, 0, 0)) { return -1; } GRAcurvefirst(GC, snum, style, f2dlineclipf, f2dtransf, f2dsplinedif, splineint, fp, x[0], y[0]); for (j = 0; j < num - 1; j++) { c[0] = c1[j]; c[1] = c2[j]; c[2] = c3[j]; c[3] = c4[j]; c[4] = c5[j]; c[5] = c6[j]; if (GRAcurve(GC, c, x[j], y[j]) == 0) { break; } } return 0; } static int draw_fit(struct objlist *obj, struct f2ddata *fp, int GC, struct objlist *fitobj, N_VALUE *fit_inst, int width, int snum, int *style, int join, int miter) { char *equation; double min, max, dx, dy; int i, div, interpolation, first, rcode, num, emerr; int *r, *g, *b, *a; double c[8], *x, *y, *z, *c1, *c2, *c3, *c4, *c5, *c6, count; MathEquation *code; MathValue val; if (_getobj(fitobj, "equation", fit_inst, &equation)) return -1; if (_getobj(fitobj, "min", fit_inst, &min)) return -1; if (_getobj(fitobj, "max", fit_inst, &max)) return -1; if (_getobj(fitobj, "div", fit_inst, &div)) return -1; if (_getobj(fitobj, "interpolation", fit_inst, &interpolation)) return -1; if (equation==NULL) return -1; if ((min==0) && (max==0)) { min=fp->axmin2; max=fp->axmax2; } else if (min==max) return 0; code = ofile_create_math_equation(NULL, EOEQ_ASSIGN_TYPE_ASSIGN, 0, FALSE, FALSE, FALSE, FALSE, TRUE); if (code == NULL) { return 1; } rcode = math_equation_parse(code, equation); if (rcode) { math_equation_free(code); return 1; } rcode = math_equation_optimize(code); if (rcode) { math_equation_free(code); return 1; } if (code->exp == NULL) { math_equation_free(code); return 1; } GRAcolor(GC,fp->color.r,fp->color.g,fp->color.b, fp->color.a); #if EXPAND_DOTTED_LINE GRAlinestyle(GC,0,NULL,width,GRA_LINE_CAP_BUTT,join,miter); #else GRAlinestyle(GC, snum, style, width, GRA_LINE_CAP_BUTT, join, miter); #endif num=0; count=0; emerr=FALSE; x=y=z=c1=c2=c3=c4=c5=c6=NULL; r=g=b=a=NULL; first=TRUE; for (i=0;i<=div;i++) { dx=min+(max-min)/div*i; val.val = dx; val.type = MATH_VALUE_NORMAL; math_equation_set_var(code, 0, &val); math_equation_calculate(code, &val); dy = val.val; if (interpolation) { if ((val.type==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&dx,&dy)==0)) { if (dataadd(dx,dy,count,0,0,0,255,&num, &x,&y,&z,&r,&g,&b,&a,&c1,&c2,&c3,&c4,&c5,&c6)==NULL) { MATH_EQUATION_FREE(code); return -1; } count++; } else { if (num >= 2 && draw_interpolation(fp, GC, num, snum, style, c, x, y, z, c1, c2, c3, c4, c5, c6)) { FREE_INTP_BUF(); MATH_EQUATION_FREE(code); error(obj,ERRSPL); return -1; } FREE_INTP_BUF(); num=0; count=0; x=y=z=c1=c2=c3=c4=c5=c6=NULL; r=g=b=a=NULL; } } else { if ((val.type==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&dx,&dy)==0)) { if (first) { GRAcurvefirst(GC,snum,style,f2dlineclipf,f2dtransf,NULL,NULL,fp,dx,dy); first=FALSE; } else { GRAdashlinetod(GC,dx,dy); } } else { first=TRUE; } } if ((!emerr) && (val.type!=MATH_VALUE_NORMAL) && (val.type!=MATH_VALUE_UNDEF)) { error(obj,ERRMERR); emerr=TRUE; } } MATH_EQUATION_FREE(code); if (interpolation) { if (num > 0 && draw_interpolation(fp, GC, num, snum, style, c, x, y, z, c1, c2, c3, c4, c5, c6)) { FREE_INTP_BUF(); error(obj,ERRSPL); return -1; } FREE_INTP_BUF(); } return 0; } static int get_fit_obj_id(char *fit, struct objlist **fitobj, N_VALUE **inst) { struct narray iarray; int anum, id; if (fit == NULL) { return -1; } arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, fitobj, &iarray, FALSE, NULL)) { return -1 ; } anum = arraynum(&iarray); if (anum < 1) { arraydel(&iarray); return -1 ; } id = arraylast_int(&iarray); arraydel(&iarray); *inst = getobjinst(*fitobj, id); if (*inst == NULL) { return -1 ; } return id; } static void dummyout(struct f2ddata *fp, int GC, int width, int snum, int *style, int join, int miter) { GRAlinestyle(GC, snum, style, width, GRA_LINE_CAP_BUTT, join, miter); while (! getdata(fp)); } static int fitout(struct objlist *obj,struct f2dlocal *f2dlocal, struct f2ddata *fp,int GC, int width,int snum,int *style, int join,int miter,char *fit,int redraw) { struct objlist *fitobj; int id; N_VALUE *inst; char *equation; if (fit == NULL) { error(obj, ERRNOFIT); return -1; } id = get_fit_obj_id(fit, &fitobj, &inst); if (id < 0) { error2(obj, ERRNOFITINST, fit); return -1; } if (_getobj(fitobj, "equation", inst, &equation)) { return -1; } if (equation == NULL && redraw == 0) { int rcode; f2dlocal->use_drawing_func = FALSE; rcode = calc_fit(obj, f2dlocal, fp, fitobj, id); if (rcode) { return rcode; } } else if (f2dlocal->use_drawing_func) { dummyout(fp, GC, width, snum, style, join, miter); } return draw_fit(obj, fp, GC, fitobj, inst, width, snum, style, join, miter); } static int f2ddraw(struct objlist *obj, N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; int GC; int type, src; int mtype; int lwidth, ljoin, lmiter, intp; struct narray *lstyle; int snum, *style; struct f2ddata *fp; int rcode; int w, h, clip, zoom; char *fit, *field, *array; char *file; struct array_prm ary; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; _getobj(obj, "_local", inst, &f2dlocal); _getobj(obj, "source", inst, &src); _getobj(obj, "GC", inst, &GC); if (GC<0) return 0; switch (src) { case DATA_SOURCE_FILE: _getobj(obj, "file", inst, &file); if (file == NULL){ return 0; } break; case DATA_SOURCE_ARRAY: _getobj(obj,"array", inst, &array); open_array(array, &ary); if (ary.data_num < 1) { return 0; } break; } _getobj(obj, "type", inst, &type); _getobj(obj, "mark_type", inst, &mtype); _getobj(obj, "line_width", inst, &lwidth); _getobj(obj, "line_style", inst, &lstyle); _getobj(obj, "line_join", inst, &ljoin); _getobj(obj, "line_miter_limit", inst, &lmiter); _getobj(obj, "interpolation", inst, &intp); _getobj(obj, "fit", inst, &fit); _getobj(obj, "clip", inst, &clip); snum = arraynum(lstyle); style = arraydata(lstyle); fp = opendata(obj, inst, f2dlocal, TRUE, FALSE); if (fp == NULL) { return 1; } fp->GC = GC; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal) == -1) { closedata(fp, f2dlocal); return 1; } reopendata(fp); } if (hskipdata(fp)) { closedata(fp, f2dlocal); return 1; } if (set_const_all(fp)) return 1; GRAregion(GC, &w, &h, &zoom); GRAview(GC, 0, 0, w*10000.0/zoom, h*10000.0/zoom, clip); switch (type) { case PLOT_TYPE_MARK: rcode = markout(obj, fp, GC, lwidth, snum, style); break; case PLOT_TYPE_LINE: rcode = lineout(obj, fp, GC, lwidth, snum, style, ljoin, lmiter, FALSE); break; case PLOT_TYPE_POLYGON: rcode = lineout(obj, fp, GC, lwidth, snum, style, ljoin, lmiter, TRUE); break; case PLOT_TYPE_POLYGON_SOLID_FILL: rcode = polyout(obj, fp, GC); break; case PLOT_TYPE_CURVE: rcode = curveout(obj, fp, GC, lwidth, snum, style, ljoin, lmiter, intp); break; case PLOT_TYPE_DIAGONAL: case PLOT_TYPE_ARROW: case PLOT_TYPE_RECTANGLE: case PLOT_TYPE_RECTANGLE_FILL: case PLOT_TYPE_RECTANGLE_SOLID_FILL: rcode = rectout(obj, fp, GC, lwidth, snum, style, type); break; case PLOT_TYPE_ERRORBAR_X: rcode = errorbarout(obj, fp, GC, lwidth, snum, style, type); break; case PLOT_TYPE_ERRORBAR_Y: rcode = errorbarout(obj, fp, GC, lwidth, snum, style, type); break; case PLOT_TYPE_STAIRCASE_X: case PLOT_TYPE_STAIRCASE_Y: rcode = stairout(obj, fp, GC, lwidth, snum, style, ljoin, lmiter, type); break; case PLOT_TYPE_BAR_X: case PLOT_TYPE_BAR_Y: case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_FILL_Y: case PLOT_TYPE_BAR_SOLID_FILL_X: case PLOT_TYPE_BAR_SOLID_FILL_Y: rcode = barout(obj, fp, GC, lwidth, snum, style, type); break; case PLOT_TYPE_FIT: field = (char *)argv[1]; rcode = fitout(obj, f2dlocal, fp, GC, lwidth, snum, style, ljoin, lmiter, fit, field[0] == 'r'); if (fp->datanum == 0) fp->datanum = f2dlocal->num; break; default: /* not reachable */ rcode = -1; } closedata(fp, f2dlocal); if (rcode == -1) return 1; return 0; } static int f2dgetcoord(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { double x,y; int gx,gy; int id; double ip1,ip2; int dataclip; double minx,maxx,miny,maxy; double v1x,v1y,v2x,v2y,vx,vy; double a,b,c,d; struct narray *array; struct axis_prm ax_prm, ay_prm; x = arg_to_double(argv, 2); y = arg_to_double(argv, 3); _getobj(obj,"data_clip",inst,&dataclip); id = get_axis_prm(obj, inst, AXIS_X, &ax_prm); if (id < 0) { return 1; } id = get_axis_prm(obj, inst, AXIS_Y, &ay_prm); if (id < 0) { return 1; } ip1=-ax_prm.vy*ay_prm.vx+ax_prm.vx*ay_prm.vy; ip2=-ay_prm.vy*ax_prm.vx+ay_prm.vx*ax_prm.vy; if ((fabs(ip1)<=1e-15) || (fabs(ip2)<=1e-15)) return 1; gx=gy=0; minx=ax_prm.min; maxx=ax_prm.max; miny=ay_prm.min; maxy=ay_prm.max; if (ax_prm.type == AXIS_TYPE_LOG) { if (x == 0) { return -1; } else if (x < 0) { x = fabs(x); } x = log10(x); } else if (ax_prm.type == AXIS_TYPE_INVERSE) { if (x == 0) { return -1; } x = 1 / x; } if (ay_prm.type == AXIS_TYPE_LOG) { if (y == 0) { return -1; } else if (y < 0) { y = fabs(y); } y = log10(y); } else if (ay_prm.type == AXIS_TYPE_INVERSE) { if (y == 0) { return -1; } y = 1 / y; } if (dataclip && ((((minx>x) || (x>maxx)) && ((maxx>x) || (x>minx))) || (((miny>y) || (y>maxy)) && ((maxy>y) || (y>miny))))) return 1; v1x=ax_prm.rate*(x-minx)*ax_prm.vx; v1y=ax_prm.rate*(x-minx)*ax_prm.vy; v2x=ay_prm.rate*(y-miny)*ay_prm.vx; v2y=ay_prm.rate*(y-miny)*ay_prm.vy; vx=ay_prm.posx-ax_prm.posx+v2x-v1x; vy=ay_prm.posy-ax_prm.posy+v2y-v1y; a=ay_prm.vy*ax_prm.vx-ay_prm.vx*ax_prm.vy; c=-ay_prm.vy*vx+ay_prm.vx*vy; b=ax_prm.vy*ay_prm.vx-ax_prm.vx*ay_prm.vy; d=ax_prm.vy*vx-ax_prm.vx*vy; if ((fabs(a)<=1e-16) && (fabs(b)<=1e-16)) { return -1; } else if (fabs(b)<=1e-16) { a=c/a; gx=ay_prm.posx+nround(v2x+a*ax_prm.vx); gy=ay_prm.posy+nround(v2y+a*ax_prm.vy); } else { b=d/b; gx=ax_prm.posx+nround(v1x+b*ay_prm.vx); gy=ax_prm.posy+nround(v1y+b*ay_prm.vy); } array=rval->array; if (arraynum(array) > 0) { arraydel(array); } if ((array==NULL) && ((array=arraynew(sizeof(double)))==NULL)) return 1; arrayins(array,&gy,0); arrayins(array,&gx,0); if (arraynum(array)==0) { arrayfree(array); rval->array = NULL; return 1; } rval->array=array; return 0; } static int f2devaluate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; char *str; struct narray *array; int gx0,gy0,gx1,gy1,num,limit; int minx,miny,maxx,maxy,err; double line,dx,dy,d2,d3; int src; array=rval->array; arrayfree(array); array=NULL; rval->array=array; _getobj(obj,"source", inst, &src); switch (src) { case DATA_SOURCE_FILE: _getobj(obj, "file", inst, &str); if (str == NULL) { return 0; } break; case DATA_SOURCE_ARRAY: _getobj(obj, "array", inst, &str); if (str == NULL) { return 0; } break; case DATA_SOURCE_RANGE: break; } _getobj(obj,"_local",inst,&f2dlocal); if ((fp=opendata(obj,inst,f2dlocal,TRUE,FALSE))==NULL) return 1; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal)==-1) { closedata(fp, f2dlocal); return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); return 1; } array=arraynew(sizeof(double)); minx=*(int *)argv[2]; miny=*(int *)argv[3]; maxx=*(int *)argv[4]; maxy=*(int *)argv[5]; err=*(int *)argv[6]; limit=*(int *)argv[7]; if ((minx==maxx) && (miny==maxy)) { minx-=err; maxx+=err; miny-=err; maxy+=err; } if (set_const_all(fp)) return 1; while (getdata(fp)==0) { switch (fp->type) { case TYPE_NORMAL: dx=fp->dx; dy=fp->dy; if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&dx,&dy)==0)) { f2dtransf(dx,dy,&gx0,&gy0,fp); line=fp->dline; if ((minx<=gx0) && (gx0dx)); arrayadd(array,&(fp->dy)); } } break; case TYPE_DIAGONAL: dx=fp->dx; dy=fp->dy; d2=fp->d2; d3=fp->d3; if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&dx,&dy)==0) && (getposition2(fp,fp->axtype,fp->aytype,&d2,&d3)==0)) { f2dtransf(dx,dy,&gx0,&gy0,fp); f2dtransf(d2,d3,&gx1,&gy1,fp); line=fp->dline; if ((minx<=gx0) && (gx0dx)); arrayadd(array,&(fp->dy)); } if ((minx<=gx1) && (gx1d2)); arrayadd(array,&(fp->d3)); } } break; case TYPE_ERR_X: dx=fp->dx; dy=fp->dy; d2=fp->d2; d3=fp->d3; if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&dx,&dy)==0) && (getposition2(fp,fp->axtype,fp->axtype,&d2,&d3)==0)) { f2dtransf(d2,dy,&gx0,&gy0,fp); f2dtransf(d3,dy,&gx1,&gy1,fp); line=fp->dline; if ((minx<=gx0) && (gx0d2)); arrayadd(array,&(fp->dy)); } if ((minx<=gx1) && (gx1d3)); arrayadd(array,&(fp->dy)); } } break; case TYPE_ERR_Y: dx=fp->dx; dy=fp->dy; d2=fp->d2; d3=fp->d3; if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&dx,&dy)==0) && (getposition2(fp,fp->aytype,fp->aytype,&d2,&d3)==0)) { f2dtransf(dx,d2,&gx0,&gy0,fp); f2dtransf(dx,d3,&gx1,&gy1,fp); line=fp->dline; if ((minx<=gx0) && (gx0dx)); arrayadd(array,&(fp->d2)); } if ((minx<=gx1) && (gx1dx)); arrayadd(array,&(fp->d3)); } } break; } if ((int) arraynum(array) >= (limit * 3)) break; } closedata(fp, f2dlocal); num=arraynum(array); if (num/3>0) rval->array=array; else arrayfree(array); return 0; } static int f2dredraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int redrawf, num, dmax, type, source, hidden, r; int GC; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"hidden",inst,&hidden); _getobj(obj,"source",inst,&source); _getobj(obj,"redraw_flag",inst,&redrawf); _getobj(obj,"data_num",inst,&num); _getobj(obj,"redraw_num",inst,&dmax); _getobj(obj, "type", inst, &type); r = 0; if (num > 0 && (dmax == 0 || num <= dmax) && redrawf) { r = f2ddraw(obj,inst,rval,argc,argv); } else if (source == DATA_SOURCE_RANGE && redrawf) { r = f2ddraw(obj,inst,rval,argc,argv); } else { if (! hidden) { system_draw_notify(); } _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; } if (r) { system_draw_notify(); } return 0; } static int f2dcolumn_file(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file,*ifs; int csv; int cline,ccol; int line,col; FILE *fd; char *buf,*buf2; char *po,*po2; g_free(rval->str); rval->str=NULL; _getobj(obj,"file",inst,&file); _getobj(obj,"ifs",inst,&ifs); _getobj(obj,"csv",inst,&csv); line=*(int *)argv[2]; col=*(int *)argv[3]; if (line<=0) return 0; if (col<=0) col=0; if (file==NULL) return 0; if ((fd=nfopen(file,"rt"))==NULL) return 0; cline=0; while (TRUE) { int rcode; if ((rcode=fgetline(fd,&buf))!=0) { fclose(fd); return 1; } cline++; if (cline==line) { if (col==0) rval->str=buf; else { ccol=0; po=buf; while (TRUE) { ccol++; if (*po=='\0') break; if (csv) { for (;*po==' ';po++); if (*po=='\0') break; if (strchr(ifs,*po)!=NULL) { if (ccol==col) break; else po++; } else { for (po2=po;(*po2!='\0') && (strchr(ifs,*po2)==NULL) && (*po2!=' ');po2++); if (ccol==col) { if ((buf2=g_malloc(po2-po+1))==NULL) { fclose(fd); g_free(buf); return 1; } strncpy(buf2,po,po2-po); buf2[po2-po]='\0'; rval->str=buf2; break; } else { for (;*po2==' ';po2++); if (strchr(ifs,*po2)!=NULL) po2++; po=po2; } } } else { for (;(*po!='\0') && (strchr(ifs,*po)!=NULL);po++); if (*po=='\0') break; for (po2=po;(*po2!='\0') && (strchr(ifs,*po2)==NULL);po2++); if (ccol==col) { if ((buf2=g_malloc(po2-po+1))==NULL) { fclose(fd); g_free(buf); return 1; } strncpy(buf2,po,po2-po); buf2[po2-po]='\0'; rval->str=buf2; break; } else po=po2; } } g_free(buf); } break; } else g_free(buf); } fclose(fd); return 0; } static int f2dcolumn_array(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct array_prm ary; int line, col, n; char *array; double val; g_free(rval->str); rval->str = NULL; line=*(int *)argv[2]; col=*(int *)argv[3]; _getobj(obj,"array", inst, &array); open_array(array, &ary); if (col >= ary.col_num) { return 0; } n = arraynum(ary.ary[col - 1]); if (line < 1 || line >= n) { return 0; } val = arraynget_double(ary.ary[col - 1], line - 1); rval->str = g_strdup_printf(DOUBLE_STR_FORMAT, val); return 0; } static int f2dcolumn_range(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int line, col, div; double val, min, max; g_free(rval->str); rval->str = NULL; line=*(int *)argv[2]; col=*(int *)argv[3]; _getobj(obj, "range_min", inst, &min); _getobj(obj, "range_max", inst, &max); _getobj(obj, "range_div", inst, &div); if (col >= 2) { return 0; } if (line < 1 || line >= div) { return 0; } val = min + (max - min) / div * line; rval->str = g_strdup_printf(DOUBLE_STR_FORMAT, val); return 0; } static int f2dcolumn(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int r, src; _getobj(obj,"source", inst, &src); r = 1; switch (src) { case DATA_SOURCE_FILE: r = f2dcolumn_file(obj, inst, rval, argc, argv); break; case DATA_SOURCE_ARRAY: r = f2dcolumn_array(obj, inst, rval, argc, argv); break; case DATA_SOURCE_RANGE: r = f2dcolumn_range(obj, inst, rval, argc, argv); break; } return r; } static int f2dhead_file(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int cline, line; char *file, *ptr; GString *s; FILE *fd; g_free(rval->str); rval->str = NULL; _getobj(obj, "file", inst, &file); line = *(int *) argv[2]; if (line <= 0) return 0; if (file == NULL) return 0; fd = nfopen(file, "rt"); if (fd == NULL) return 0; s = g_string_sized_new(256); if (s == NULL) { fclose(fd); return 0; } for (cline = 0; cline < line; cline++) { if (fgetline(fd, &ptr)) { break; } if (cline) { s = g_string_append_c(s, '\n'); } g_string_append_printf(s, "%s", ptr); g_free(ptr); } fclose(fd); rval->str = g_string_free(s, FALSE); return 0; } static int f2dhead(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int r, src; _getobj(obj,"source", inst, &src); r = 1; switch (src) { case DATA_SOURCE_FILE: r = f2dhead_file(obj, inst, rval, argc, argv); break; case DATA_SOURCE_ARRAY: case DATA_SOURCE_RANGE: break; } return r; } static int f2dsettings_file(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file; FILE *fd; int err; char *buf, *rem; char *po,*endptr; int d1,d2,d3; double f1,f2,f3; int i,j,id; char *s; struct narray *iarray; struct objlist *aobj; int aid,x; _getobj(obj,"file",inst,&file); if (file==NULL) return 0; if ((fd=nfopen(file,"rt"))==NULL) return 0; if (fgetline(fd,&buf)!=0) { fclose(fd); return 1; } _getobj(obj,"id",inst,&id); fclose(fd); po=buf; err=FALSE; sgetobjfield(obj, id, "remark", NULL, &rem, FALSE, FALSE, FALSE); if (rem && strchr(rem, po[0])) po++; g_free(rem); while (po[0]!='\0') { for (;(po[0]!='\0') && (strchr(" \t",po[0])!=NULL);po++); if (po[0]=='-') { switch (po[1]) { case 'x': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"x",id,&d1); } break; case 'y': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"y",id,&d1); } break; case 'd': for (i = PLOT_TYPE_FIT; i >= 0; i--) { if (strncmp(f2dtypechar[i], po + 2, strlen(f2dtypechar[i])) == 0) { break; } } if ((i==-1) || ((i == PLOT_TYPE_MARK) && (po[2+4]!=',')) || ((i == PLOT_TYPE_CURVE) && (po[2+5]!=','))) { err=TRUE; } else { if (i == PLOT_TYPE_MARK) { d1=strtol(po+2+5,&endptr,10); if (endptr==(po+2+5)) err=TRUE; else { putobj(obj,"type",id,&i); putobj(obj,"mark_type",id,&d1); po=endptr; } } else if (i == PLOT_TYPE_CURVE) { for (j = INTERPOLATION_TYPE_BSPLINE_CLOSE; j >= 0; j--) { if (strncmp(intpchar[j], po + 2 + 6, strlen(intpchar[j])) == 0) break; } if (j == -1) { err = TRUE; } else { putobj(obj,"type",id,&i); putobj(obj,"interpolation",id,&j); po=po+2+6+strlen(intpchar[j]); } } else { putobj(obj,"type",id,&i); po=po+2+strlen(f2dtypechar[i]); } } break; case 'o': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"mark_size",id,&d1); } break; case 'l': iarray=arraynew(sizeof(int)); po+=1; do { po++; d1=strtol(po,&endptr,10); if (endptr==po) err=TRUE; else { po=endptr; arrayadd(iarray,&d1); } } while ((!err) && (po[0]==',')); if (err) arrayfree(iarray); else putobj(obj,"line_style",id,iarray); break; case 'w': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"line_width",id,&d1); } break; case 'c': po+=2; d1=strtol(po,&endptr,10); if ((endptr==po) || (endptr[0]!=',')) err=TRUE; else { po=endptr+1; d2=strtol(po,&endptr,10); if ((endptr==po) || (endptr[0]!=',')) err=TRUE; else { po=endptr+1; d3=strtol(po,&endptr,10); if (endptr==po) err=TRUE; else po=endptr; } } if (!err) { putobj(obj,"R",id,&d1); putobj(obj,"G",id,&d2); putobj(obj,"B",id,&d3); } break; case 'C': po+=2; d1=strtol(po,&endptr,10); if ((endptr==po) || (endptr[0]!=',')) err=TRUE; else { po=endptr+1; d2=strtol(po,&endptr,10); if ((endptr==po) || (endptr[0]!=',')) err=TRUE; else { po=endptr+1; d3=strtol(po,&endptr,10); if (endptr==po) err=TRUE; else po=endptr; } } if (!err) { putobj(obj,"R2",id,&d1); putobj(obj,"G2",id,&d2); putobj(obj,"B2",id,&d3); } break; case 'v': if (po[2]=='x') { d1=strtol(po+3,&endptr,10); if (endptr==(po+3)) err=TRUE; else { po=endptr; putobj(obj,"smooth_x",id,&d1); } break; } else if (po[2]=='y') { d1=strtol(po+3,&endptr,10); if (endptr==(po+3)) err=TRUE; else { po=endptr; putobj(obj,"smooth_y",id,&d1); } break; } else err=TRUE; break; case 's': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"head_skip",id,&d1); } break; case 'r': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"read_step",id,&d1); } break; case 'f': d1=strtol(po+2,&endptr,10); if (endptr==(po+2)) err=TRUE; else { po=endptr; putobj(obj,"final_line",id,&d1); } break; case 'z': if ((po[2]=='x') || (po[2]=='y')) { x = (po[2] == 'x'); po+=3; f1=strtod(po,&endptr); if (check_infinite(f1) || endptr == po || endptr[0] != ',') { err=TRUE; } else { po=endptr+1; f2=strtod(po,&endptr); if (check_infinite(f2) || endptr == po || endptr[0] != ',') { err=TRUE; } else { po=endptr+1; f3=strtod(po,&endptr); if (check_infinite(f3) || endptr == po) { err=TRUE; } else { po=endptr; } } } if (!err) { aid = get_axis_id(obj, inst, &aobj, (x) ? AXIS_X : AXIS_Y); if (aid >= 0) { putobj(aobj,"min",aid,&f1); putobj(aobj,"max",aid,&f2); putobj(aobj,"inc",aid,&f3); } } } else err=TRUE; break; case 'e': if ((po[2]=='x') || (po[2]=='y')) { for (i=0;i<3;i++) if (strncmp(axistypechar[i],po+3,strlen(axistypechar[i]))==0) break; if (i!=3) { aid = get_axis_id(obj, inst, &aobj, (po[2]=='x') ? AXIS_X : AXIS_Y); if (aid >= 0) { putobj(aobj,"type",aid,&i); } po=po+3+strlen(axistypechar[i]); } else err=TRUE; } else err=TRUE; break; case 'm': if (po[2] != 'x' && po[2] != 'y') { err = TRUE; break; } for (i=3;(po[i]!='\0') && (strchr(" \t",po[i])==NULL);i++); if (i>3) { if ((s=g_malloc(i-2))!=NULL) { strncpy(s,po+3,i-3); s[i-3]='\0'; } else { err=TRUE; break; } } else s=NULL; putobj(obj, (po[2] == 'x') ? "math_x" : "math_y", id, s); po+=i; break; default: err=TRUE; break; } } else { err=TRUE; } if (err) { error2(obj,ERRILOPTION,buf); g_free(buf); return 1; } } g_free(buf); return 0; } static int f2dsettings(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int r, src; _getobj(obj,"source", inst, &src); r = 1; switch (src) { case DATA_SOURCE_FILE: r = f2dsettings_file(obj, inst, rval, argc, argv); break; case DATA_SOURCE_ARRAY: case DATA_SOURCE_RANGE: break; } return r; } static int f2dtime(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file; GStatBuf buf; int style, src; g_free(rval->str); rval->str=NULL; _getobj(obj,"source", inst, &src); if (src != DATA_SOURCE_FILE) { error(obj, ERR_INVALID_SOURCE); return -1; } _getobj(obj,"file",inst,&file); if (file==NULL) return 0; if (nstat(file,&buf)!=0) return 1; style=*(int *)(argv[2]); rval->str=ntime((time_t *)&(buf.st_mtime),style); return 0; } static int f2ddate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *file; GStatBuf buf; int style, src; g_free(rval->str); rval->str=NULL; _getobj(obj,"source", inst, &src); if (src != DATA_SOURCE_FILE) { error(obj, ERR_INVALID_SOURCE); return -1; } _getobj(obj,"file",inst,&file); if (file==NULL) return 0; if (nstat(file,&buf)!=0) return 1; style=*(int *)(argv[2]); rval->str=ndate((time_t *)&(buf.st_mtime),style); return 0; } static void f2dsettbl(N_VALUE *inst,struct f2dlocal *f2dlocal,struct f2ddata *fp) { int gx,gy,g2,g3; switch (fp->type) { case TYPE_NORMAL: inst[f2dlocal->idx].d=fp->dx; inst[f2dlocal->idy].d=fp->dy; if (f2dlocal->coord) { getposition(fp,fp->dx,fp->dy,&gx,&gy); inst[f2dlocal->icx].i=gx; inst[f2dlocal->icy].i=gy; } break; case TYPE_DIAGONAL: inst[f2dlocal->idx].d=fp->dx; inst[f2dlocal->idy].d=fp->dy; inst[f2dlocal->id2].d=fp->d2; inst[f2dlocal->id3].d=fp->d3; if (f2dlocal->coord) { getposition(fp,fp->dx,fp->dy,&gx,&gy); getposition(fp,fp->d2,fp->d3,&g2,&g3); inst[f2dlocal->icx].i=gx; inst[f2dlocal->icy].i=gy; inst[f2dlocal->ic2].i=g2; inst[f2dlocal->ic3].i=g3; } break; case TYPE_ERR_X: inst[f2dlocal->idx].d=fp->dx; inst[f2dlocal->idy].d=fp->dy; inst[f2dlocal->id2].d=fp->d2; inst[f2dlocal->id3].d=fp->d3; if (f2dlocal->coord) { getposition(fp,fp->dx,fp->dy,&gx,&gy); getposition(fp,fp->d2,fp->dy,&g2,&gy); getposition(fp,fp->d3,fp->dy,&g3,&gy); inst[f2dlocal->icx].i=gx; inst[f2dlocal->icy].i=gy; inst[f2dlocal->ic2].i=g2; inst[f2dlocal->ic3].i=g3; } break; case TYPE_ERR_Y: inst[f2dlocal->idx].d=fp->dx; inst[f2dlocal->idy].d=fp->dy; inst[f2dlocal->id2].d=fp->d2; inst[f2dlocal->id3].d=fp->d3; if (f2dlocal->coord) { getposition(fp,fp->dx,fp->dy,&gx,&gy); getposition(fp,fp->dx,fp->d2,&gx,&g2); getposition(fp,fp->dx,fp->d3,&gx,&g3); inst[f2dlocal->icx].i=gx; inst[f2dlocal->icy].i=gy; inst[f2dlocal->ic2].i=g2; inst[f2dlocal->ic3].i=g3; } break; } inst[f2dlocal->isx].i=fp->dxstat; inst[f2dlocal->isy].i=fp->dystat; inst[f2dlocal->is2].i=fp->d2stat; inst[f2dlocal->is3].i=fp->d3stat; inst[f2dlocal->iline].i=fp->dline; } static int f2dopendata(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; int num2; _getobj(obj,"_local",inst,&f2dlocal); if (strcmp0((char *)argv[1],"opendatac")==0) f2dlocal->coord=TRUE; else f2dlocal->coord=FALSE; fp=f2dlocal->data; if (fp!=NULL) closedata(fp, f2dlocal); f2dlocal->data=NULL; if ((fp=opendata(obj,inst,f2dlocal,f2dlocal->coord,FALSE))==NULL) return 1; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal)==-1) { closedata(fp, f2dlocal); f2dlocal->data=NULL; return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); f2dlocal->data=NULL; return 1; } f2dsettbl(inst,f2dlocal,fp); num2=0; _putobj(obj,"data_num",inst,&num2); f2dlocal->data=fp; return 0; } static int f2dgetdata(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; int rcode; _getobj(obj,"_local",inst,&f2dlocal); fp=f2dlocal->data; if (fp==NULL) return 1; rcode=getdata(fp); f2dsettbl(inst,f2dlocal,fp); if (rcode!=0) { closedata(fp, f2dlocal); f2dlocal->data=NULL; return 1; } return 0; } static int f2dclosedata(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; _getobj(obj,"_local",inst,&f2dlocal); fp=f2dlocal->data; if (fp==NULL) return 0; fp->dx=fp->dy=fp->d2=fp->d3=0; fp->dxstat=fp->dystat=fp->d2stat=fp->d3stat=MATH_VALUE_MEOF; f2dsettbl(inst,f2dlocal,fp); closedata(fp, f2dlocal); f2dlocal->data=NULL; return 0; } static int f2dopendataraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; _getobj(obj,"_local",inst,&f2dlocal); fp=f2dlocal->data; if (fp!=NULL) closedata(fp, f2dlocal); f2dlocal->data=NULL; if ((fp=opendata(obj,inst,f2dlocal,FALSE,TRUE))==NULL) return 1; if (fp->final < -1) { if (getminmaxdata(fp, f2dlocal) == -1) { closedata(fp, f2dlocal); return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); f2dlocal->data=NULL; return 1; } f2dlocal->data=fp; return 0; } static int f2dgetdataraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; int rcode; struct narray *iarray; struct narray *darray; int i,num,*data,maxdim; double d; MathValue gdata[FILE_OBJ_MAXCOL + 3]; _getobj(obj,"_local",inst,&f2dlocal); fp=f2dlocal->data; if (fp==NULL) { return 0; } darray=rval->array; arrayfree(darray); rval->array=NULL; iarray=(struct narray *)argv[2]; num=arraynum(iarray); data=arraydata(iarray); maxdim=-1; for (i=0;imaxdim) { maxdim=data[i]; } } if (maxdim==-1) { return 0; } if (maxdim>FILE_OBJ_MAXCOL) maxdim=FILE_OBJ_MAXCOL; rcode = getdataraw(fp, maxdim, gdata); if (rcode!=0) { closedata(fp, f2dlocal); f2dlocal->data=NULL; return 1; } darray=arraynew(sizeof(double)); for (i=0;iFILE_OBJ_MAXCOL) { d=0; } else { d = gdata[data[i]].val; } arrayadd(darray,&d); } for (i=0;iFILE_OBJ_MAXCOL) { d=MATH_VALUE_NONUM; } else { d = gdata[data[i]].type; } arrayadd(darray,&d); } rval->array=darray; return 0; } static int f2dclosedataraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; _getobj(obj,"_local",inst,&f2dlocal); fp=f2dlocal->data; if (fp==NULL) return 0; closedata(fp, f2dlocal); f2dlocal->data=NULL; return 0; } static time_t get_mtime(struct objlist *obj, N_VALUE *inst, time_t *mtime) { GStatBuf buf; int r, src; char *file; _getobj(obj, "source", inst, &src); switch (src) { case DATA_SOURCE_FILE: break; case DATA_SOURCE_ARRAY: case DATA_SOURCE_RANGE: *mtime = 1; return 0; } _getobj(obj, "file", inst, &file); if (file == NULL) return 1; r = nstat(file, &buf); if (r) return 1; *mtime = buf.st_mtime; return 0; } struct data_stat { double min, max, ave, stdevp, stdev; }; static int f2dstat_sub(struct objlist *obj,N_VALUE *inst, const char *field, struct f2dlocal *f2dlocal, struct data_stat *stat_x, struct data_stat *stat_y, int *num) { int rcode, interrupt; int dnum,minxstat,maxxstat,minystat,maxystat; double minx,maxx,miny,maxy; double sumx,sumxx,sumy,sumyy, tmp; time_t mtime; struct f2ddata *fp; if (get_mtime(obj, inst, &mtime)) return 1; /* evaluation of mtime must be done before call opendata(). */ if (f2dlocal->mtime_stat == mtime) { stat_x->min = f2dlocal->dminx; stat_x->max = f2dlocal->dmaxx; stat_y->min = f2dlocal->dminy; stat_y->max = f2dlocal->dmaxy; stat_x->ave = f2dlocal->davx; stat_y->ave = f2dlocal->davy; stat_x->stdevp = f2dlocal->dstdevpx; stat_y->stdevp = f2dlocal->dstdevpy; stat_x->stdev = f2dlocal->dstdevx; stat_y->stdev = f2dlocal->dstdevy; *num = f2dlocal->num; if (f2dlocal->dminx != HUGE_VAL || strcmp(field, "dnum") == 0) { return 0; } } fp = opendata(obj, inst, f2dlocal, FALSE, FALSE); if (fp == NULL) return 1; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal)==-1) { closedata(fp, f2dlocal); return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); return 1; } minxstat=MATH_VALUE_UNDEF; maxxstat=MATH_VALUE_UNDEF; minystat=MATH_VALUE_UNDEF; maxystat=MATH_VALUE_UNDEF; dnum=0; minx=maxx=miny=maxy=0; sumx=sumxx=sumy=sumyy=0; if (set_const_all(fp)) return 1; while ((rcode=getdata(fp))==0) { switch (fp->type) { case TYPE_NORMAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->dx)) minx=fp->dx; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxdx)) maxx=fp->dx; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->dy)) miny=fp->dy; if ((maxystat==MATH_VALUE_UNDEF) || (maxydy)) maxy=fp->dy; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; sumx=sumx+fp->dx; sumxx=sumxx+(fp->dx)*(fp->dx); sumy=sumy+fp->dy; sumyy=sumyy+(fp->dy)*(fp->dy); dnum++; } break; case TYPE_DIAGONAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->dx)) minx=fp->dx; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxdx)) maxx=fp->dx; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->dy)) miny=fp->dy; if ((maxystat==MATH_VALUE_UNDEF) || (maxydy)) maxy=fp->dy; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->d2)) minx=fp->d2; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxd2)) maxx=fp->d2; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->d3)) miny=fp->d3; if ((maxystat==MATH_VALUE_UNDEF) || (maxyd3)) maxy=fp->d3; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; sumx=sumx+fp->dx; sumxx=sumxx+(fp->dx)*(fp->dx); sumy=sumy+fp->dy; sumyy=sumyy+(fp->dy)*(fp->dy); dnum++; sumx=sumx+fp->d2; sumxx=sumxx+(fp->d2)*(fp->d2); sumy=sumy+fp->d3; sumyy=sumyy+(fp->d3)*(fp->d3); dnum++; } break; case TYPE_ERR_X: if ((fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->dy)) miny=fp->dy; if ((maxystat==MATH_VALUE_UNDEF) || (maxydy)) maxy=fp->dy; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->d2)) minx=fp->d2; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxd2)) maxx=fp->d2; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->d3)) minx=fp->d3; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxd3)) maxx=fp->d3; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; sumx=sumx+fp->d2; sumxx=sumxx+(fp->d2)*(fp->d2); sumy=sumy+fp->dy; sumyy=sumyy+(fp->dy)*(fp->dy); dnum++; sumx=sumx+fp->d3; sumxx=sumxx+(fp->d3)*(fp->d3); sumy=sumy+fp->dy; sumyy=sumyy+(fp->dy)*(fp->dy); dnum++; } break; case TYPE_ERR_Y: if ((fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (fp->dxstat==MATH_VALUE_NORMAL)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->dx)) minx=fp->dx; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxdx)) maxx=fp->dx; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->d2)) miny=fp->d2; if ((maxystat==MATH_VALUE_UNDEF) || (maxyd2)) maxy=fp->d2; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->d3)) miny=fp->d3; if ((maxystat==MATH_VALUE_UNDEF) || (maxyd3)) maxy=fp->d3; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; sumx=sumx+fp->dx; sumxx=sumxx+(fp->dx)*(fp->dx); sumy=sumy+fp->d2; sumyy=sumyy+(fp->d2)*(fp->d2); dnum++; sumx=sumx+fp->dx; sumxx=sumxx+(fp->dx)*(fp->dx); sumy=sumy+fp->d3; sumyy=sumyy+(fp->d3)*(fp->d3); dnum++; } break; } } interrupt = fp->interrupt; mtime = fp->mtime; closedata(fp, f2dlocal); if (rcode==-1) return -1; if (dnum!=0) { sumx=sumx/(double )dnum; sumy=sumy/(double )dnum; tmp = sumxx / dnum - sumx * sumx; sumxx = (tmp < 0) ? 0 : sqrt(tmp); tmp = sumyy / dnum - sumy * sumy; sumyy = (tmp < 0) ? 0 : sqrt(tmp); } else { sumx=sumy=sumxx=sumyy=0; } if (minxstat!=MATH_VALUE_NORMAL) minx=0; if (minystat!=MATH_VALUE_NORMAL) miny=0; if (maxxstat!=MATH_VALUE_NORMAL) maxx=0; if (maxystat!=MATH_VALUE_NORMAL) maxy=0; if (interrupt == FALSE) f2dlocal->mtime_stat = mtime; stat_x->min = minx; stat_x->max = maxx; stat_y->min = miny; stat_y->max = maxy; stat_x->ave = sumx; stat_y->ave = sumy; stat_x->stdevp = sumxx; stat_y->stdevp = sumyy; if (dnum > 1) { tmp = sqrt(dnum / (dnum - 1.0)); stat_x->stdev = sumxx * tmp; stat_y->stdev = sumyy * tmp; } else { stat_x->stdev = HUGE_VAL; stat_y->stdev = HUGE_VAL; } *num = dnum; return 0; } static int f2dstat(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct f2dlocal *f2dlocal; int dnum; char *field; char *ptr; int src, r; struct data_stat stat_x, stat_y; g_free(rval->str); rval->str=NULL; field=argv[1]; _getobj(obj,"_local",inst,&f2dlocal); _getobj(obj,"source", inst, &src); memset(&stat_x, 0, sizeof(stat_x)); memset(&stat_y, 0, sizeof(stat_y)); r = f2dstat_sub(obj, inst, field, f2dlocal, &stat_x, &stat_y, &dnum); if (r) { return r; } f2dlocal->dminx = stat_x.min; f2dlocal->dmaxx = stat_x.max; f2dlocal->dminy = stat_y.min; f2dlocal->dmaxy = stat_y.max; f2dlocal->davx = stat_x.ave; f2dlocal->davy = stat_y.ave; f2dlocal->dstdevpx = stat_x.stdevp; f2dlocal->dstdevpy = stat_y.stdevp; f2dlocal->dstdevx = stat_x.stdev; f2dlocal->dstdevy = stat_y.stdev; ptr = NULL; if (strcmp(field, "dnum") == 0) { ptr = g_strdup_printf("%d", dnum); } else if (strcmp(field,"dminx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_x.min); } else if (strcmp(field,"dmaxx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_x.max); } else if (strcmp(field,"dminy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_y.min); } else if (strcmp(field,"dmaxy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_y.max); } else if (strcmp(field,"davx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_x.ave); } else if (strcmp(field,"davy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_y.ave); } else if (strcmp(field,"dsigx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_x.stdevp); } else if (strcmp(field,"dsigy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_y.stdevp); } else if (strcmp(field,"dstdevpx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_x.stdevp); } else if (strcmp(field,"dstdevpy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_y.stdevp); } else if (strcmp(field,"dstdevx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_x.stdev); } else if (strcmp(field,"dstdevy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, stat_y.stdev); } if (ptr == NULL) return -1; rval->str = ptr; return 0; } static int f2dstat2(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; int rcode; int line; double dx,dy,d2,d3; int find; char *field; char *ptr; g_free(rval->str); rval->str=NULL; field=argv[1]; line=*(int *)(argv[2]); _getobj(obj,"_local",inst,&f2dlocal); if ((fp=opendata(obj,inst,f2dlocal,FALSE,FALSE))==NULL) return 1; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal)==-1) { closedata(fp, f2dlocal); return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); return 1; } dx=dy=d2=d3=0; find=FALSE; if (set_const_all(fp)) return 1; while ((rcode=getdata(fp))==0) { if (fp->dline==line) { switch (fp->type) { case TYPE_NORMAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { dx=fp->dx; dy=fp->dy; find=TRUE; } break; default: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL)) { dx=fp->dx; dy=fp->dy; d2=fp->d2; d3=fp->d3; find=TRUE; } break; } } } closedata(fp, f2dlocal); if (!find) return -1; ptr = NULL; if (strcmp(field,"dx")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, dx); } else if (strcmp(field,"dy")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, dy); } else if (strcmp(field,"d2")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, d2); } else if (strcmp(field,"d3")==0) { ptr = g_strdup_printf(DOUBLE_STR_FORMAT, d3); } if (ptr == NULL) { return -1; } rval->str = ptr; return 0; } static int set_bounding_info(struct objlist *obj, N_VALUE *inst, double minx, double maxx, double miny, double maxy, int minxstat, int maxxstat, int minystat, int maxystat) { if (_putobj(obj,"minx",inst,&minx)) return 1; if (_putobj(obj,"maxx",inst,&maxx)) return 1; if (_putobj(obj,"miny",inst,&miny)) return 1; if (_putobj(obj,"maxy",inst,&maxy)) return 1; if (_putobj(obj,"stat_minx",inst,&minxstat)) return 1; if (_putobj(obj,"stat_maxx",inst,&maxxstat)) return 1; if (_putobj(obj,"stat_miny",inst,&minystat)) return 1; if (_putobj(obj,"stat_maxy",inst,&maxystat)) return 1; return 0; } static int f2dboundings_file(struct f2dlocal *f2dlocal, struct f2ddata *fp, struct objlist *obj, N_VALUE *inst, int abs) { int rcode; int minxstat,maxxstat,minystat,maxystat,type; double minx,maxx,miny,maxy; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal)==-1) { closedata(fp, f2dlocal); return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); return 1; } minxstat=MATH_VALUE_UNDEF; maxxstat=MATH_VALUE_UNDEF; minystat=MATH_VALUE_UNDEF; maxystat=MATH_VALUE_UNDEF; minx=maxx=miny=maxy=0; if (set_const_all(fp)) return 1; while ((rcode=getdata(fp))==0) { switch (fp->type) { case TYPE_NORMAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { if ((!abs) || (fp->dx>0)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->dx)) minx=fp->dx; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxdx)) maxx=fp->dx; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->dy>0)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->dy)) miny=fp->dy; if ((maxystat==MATH_VALUE_UNDEF) || (maxydy)) maxy=fp->dy; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; } if (_getobj(obj, "type", inst, &type)) return 1; switch (type) { case PLOT_TYPE_BAR_X: case PLOT_TYPE_BAR_FILL_X: case PLOT_TYPE_BAR_SOLID_FILL_X: if (minxstat != MATH_VALUE_NORMAL) { break; } if (minx > 0 && maxx > 0) { minx = 0; } else if (minx < 0 && maxx < 0) { maxx = 0; } break; case PLOT_TYPE_BAR_Y: case PLOT_TYPE_BAR_FILL_Y: case PLOT_TYPE_BAR_SOLID_FILL_Y: if (minystat != MATH_VALUE_NORMAL) { break; } if (miny > 0 && maxy > 0) { miny = 0; } else if (miny < 0 && maxy < 0) { maxy = 0; } break; } } break; case TYPE_DIAGONAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL)) { if ((!abs) || (fp->dx>0)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->dx)) minx=fp->dx; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxdx)) maxx=fp->dx; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->dy>0)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->dy)) miny=fp->dy; if ((maxystat==MATH_VALUE_UNDEF) || (maxydy)) maxy=fp->dy; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->d2>0)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->d2)) minx=fp->d2; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxd2)) maxx=fp->d2; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->d3>0)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->d3)) miny=fp->d3; if ((maxystat==MATH_VALUE_UNDEF) || (maxyd3)) maxy=fp->d3; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; } } break; case TYPE_ERR_X: if ((fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) { if ((!abs) || (fp->dy>0)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->dy)) miny=fp->dy; if ((maxystat==MATH_VALUE_UNDEF) || (maxydy)) maxy=fp->dy; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->d2>0)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->d2)) minx=fp->d2; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxd2)) maxx=fp->d2; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->d3>0)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->d3)) minx=fp->d3; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxd3)) maxx=fp->d3; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; } } break; case TYPE_ERR_Y: if ((fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL) && (fp->dxstat==MATH_VALUE_NORMAL)) { if ((!abs) || (fp->dx>0)) { if ((minxstat==MATH_VALUE_UNDEF) || (minx>fp->dx)) minx=fp->dx; if ((maxxstat==MATH_VALUE_UNDEF) || (maxxdx)) maxx=fp->dx; minxstat=MATH_VALUE_NORMAL; maxxstat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->d2>0)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->d2)) miny=fp->d2; if ((maxystat==MATH_VALUE_UNDEF) || (maxyd2)) maxy=fp->d2; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; } if ((!abs) || (fp->d3>0)) { if ((minystat==MATH_VALUE_UNDEF) || (miny>fp->d3)) miny=fp->d3; if ((maxystat==MATH_VALUE_UNDEF) || (maxyd3)) maxy=fp->d3; minystat=MATH_VALUE_NORMAL; maxystat=MATH_VALUE_NORMAL; } } break; } } if (rcode != -1) { set_bounding_info(obj, inst, minx, maxx, miny, maxy, minxstat, maxxstat, minystat, maxystat); } return rcode; } static int f2dboundings(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; int rcode; int abs; abs=*(int *)argv[2]; rcode = set_bounding_info(obj, inst, 0, 0, 0, 0, MATH_VALUE_UNDEF, MATH_VALUE_UNDEF, MATH_VALUE_UNDEF, MATH_VALUE_UNDEF); if (rcode) { return 1; } _getobj(obj,"_local",inst,&f2dlocal); fp = opendata(obj,inst,f2dlocal,FALSE,FALSE); if (fp == NULL) return 1; rcode = f2dboundings_file(f2dlocal, fp, obj, inst, abs); closedata(fp, f2dlocal); if (rcode==-1) { return -1; } return 0; } static int f2dbounding(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct narray *minmax; char *axiss; struct narray iarray; struct objlist *aobj; int i,anum,id,r = 1; int *adata; double min,max; int minstat,maxstat; int hidden; int type,abs; char *argv2[2]; minmax=rval->array; if (minmax!=NULL) arrayfree(minmax); rval->array=NULL; axiss=(char *)argv[2]; if (axiss==NULL) return 0; _getobj(obj,"hidden",inst,&hidden); if (hidden) return 0; arrayinit(&iarray,sizeof(int)); if (getobjilist(axiss,&aobj,&iarray,FALSE,NULL)) return 0; anum=arraynum(&iarray); if (anum<1) { arraydel(&iarray); return 0; } adata=arraydata(&iarray); id = get_axis_id(obj, inst, &aobj, AXIS_X); if (id >= 0) { for (i=0;iarray=minmax; } r = 0; goto exit; } } id = get_axis_id(obj, inst, &aobj, AXIS_Y); if (id >= 0) { for (i=0;iarray=minmax; } } } r = 0; exit: arraydel(&iarray); return r; } static int save_fit(GString *s, char *fit, struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray iarray; struct objlist *fitobj; char *fitsave; int id, idnum; arrayinit(&iarray, sizeof(int)); if (getobjilist(fit, &fitobj, &iarray, FALSE, NULL)) { return 1; } idnum = arraynum(&iarray); if (idnum < 1) { arraydel(&iarray); return 1; } id = arraylast_int(&iarray); arraydel(&iarray); if (getobj(fitobj, "save", id, 0, NULL, &fitsave) == -1) { return 1; } g_string_append(s, fitsave); return 0; } static int f2dsave(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array, *array2; int anum; char **adata; int i, j, r; char *argv2[4]; char *s2, *fit; GString *s; array = (struct narray *) argv[2]; anum = arraynum(array); adata = arraydata(array); for (j = 0; j < anum; j++) { if (strcmp("fit", adata[j]) == 0) { return pathsave(obj, inst, rval, argc, argv); } } _getobj(obj, "fit", inst, &fit); if (fit == NULL) { return pathsave(obj, inst, rval, argc, argv); } array2 = arraynew(sizeof(char *)); for (i = 0; i < anum; i++) { arrayadd(array2, &(adata[i])); } s2 = "fit"; arrayadd(array2, &s2); argv2[0] = argv[0]; argv2[1] = argv[1]; argv2[2] = (char *) array2; argv2[3] = NULL; if (pathsave(obj, inst, rval, 3, argv2)) { arrayfree(array2); return 1; } s = g_string_sized_new(1024); if (s == NULL) { return 1; } r = save_fit(s, fit, obj, inst, rval, argc, argv); if (r) { g_string_free(s, TRUE); return pathsave(obj, inst, rval, argc, argv); } arrayfree(array2); g_string_append(s, rval->str); g_string_append(s, "\tdata::fit='fit:^'${fit::oid}\n"); g_free(rval->str); rval->str = g_string_free(s, FALSE); return 0; } static int f2dstore_file(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct f2dlocal *f2dlocal; g_free(rval->str); rval->str=NULL; _getobj(obj,"_local",inst,&f2dlocal); if (f2dlocal->endstore) { f2dlocal->endstore=FALSE; return 1; } return store(obj, inst, rval, argc, argv, &f2dlocal->endstore, &f2dlocal->storefd); } int store(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv, int *endstore, FILE **storefd) { char *file,*date,*time; int style; char *buf; const char *name; if (*storefd == NULL) { char *base, *argv2[2]; _getobj(obj,"file",inst,&file); if (file==NULL) return 1; style=3; argv2[0]=(char *)&style; argv2[1]=NULL; if (_exeobj(obj,"date",inst,1,argv2)) return 1; style=0; argv2[0]=(char *)&style; argv2[1]=NULL; if (_exeobj(obj,"time",inst,1,argv2)) return 1; _getobj(obj,"date",inst,&date); if(date == NULL) { date = "1-1-1970"; } _getobj(obj,"time",inst,&time); if(time == NULL) { time = "00:00:00"; } if ((base=getbasename(file))==NULL) return 1; if ((*storefd=nfopen(file,"rt"))==NULL) { g_free(base); return 1; } name = chkobjectname(obj); buf = g_strdup_printf("%s::load_data '%s' '%s %s' <<'[EOF]'", name, base, date, time); g_free(base); if (buf == NULL) { fclose(*storefd); *storefd=NULL; return 1; } rval->str=buf; } else { int r; r = fgetline(*storefd, &buf); if (r) { fclose(*storefd); *storefd=NULL; buf = g_strdup("[EOF]\n"); if (buf == NULL) return 1; *endstore=TRUE; rval->str=buf; } else { rval->str=buf; } } return 0; } static int f2dstore(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int r, src; _getobj(obj,"source", inst, &src); r = 1; switch (src) { case DATA_SOURCE_FILE: r = f2dstore_file(obj, inst, rval, argc, argv); break; case DATA_SOURCE_ARRAY: case DATA_SOURCE_RANGE: break; } return r; } static int nstrrchr(const char *str, int chr, int index) { int i; for (i = index; i >= 0; i--) { if (str[i] == chr) { break; } } return i; } static int get_filename_last_index(const char *s) { int i; i = strlen(s); i = nstrrchr(s, ' ', i); if (i < 0) { return i; } while (s[i] == ' ') { i--; } i = nstrrchr(s, ' ', i); if (i < 0) { return i; } return i; } static int f2dload_sub(struct objlist *obj, N_VALUE *inst, char **s, int *expand, char **fullname) { struct objlist *sys; char *exdir, *file2, *file, *oldfile, *fname; int len; if (s == NULL) return 1; sys = getobject("system"); if (expand) { getobj(sys, "expand_file", 0, 0, NULL, expand); } len = get_filename_last_index(*s); if (len < 0) { return 1; } file = g_strndup(*s, len); if (file == NULL) { return 1; } *s = *s + len; getobj(sys, "expand_dir", 0, 0, NULL, &exdir); file2 = getfilename(CHK_STR(exdir), "/", file); g_free(file); fname = getfullpath(file2); if (fname == NULL) { g_free(file2); return 1; } if (fullname) *fullname = fname; g_free(file2); _getobj(obj, "file", inst, &oldfile); if (oldfile) { g_free(oldfile); } _putobj(obj, "file", inst, fname); return 0; } int load_file(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int expand; char *s, *fullname; int mkdata; time_t ftime; s = argv[2]; if (f2dload_sub(obj, inst, &s, &expand, &fullname)) return 1; if (! expand) return 0; if (gettimeval(s, &ftime)) return 1; if (naccess(fullname, R_OK) != 0) { mkdata = TRUE; } else { char *mes; mes = g_strdup_printf("`%s' Overwrite existing file?", fullname); if (mes == NULL) return 1; mkdata = inputyn(mes); g_free(mes); } if (mkdata) { int len; struct utimbuf tm; FILE *fp; int fd; char buf[257]; fp = nfopen(fullname, "wt"); if (fp == NULL) { error2(obj, ERROPEN, fullname); return 1; } fd = stdinfd(); while ((len = nread(fd, buf, sizeof(buf) - 1)) > 0) { buf[len] = '\0'; fputs(buf, fp); } fclose(fp); tm.actime = ftime; tm.modtime = ftime; utime(fullname, &tm); } return 0; } static int f2dload(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int r, src; _getobj(obj,"source", inst, &src); r = 1; switch (src) { case DATA_SOURCE_FILE: r = load_file(obj, inst, rval, argc, argv); break; case DATA_SOURCE_ARRAY: case DATA_SOURCE_RANGE: break; } return r; } char * store_dummy(struct objlist *obj, N_VALUE *inst, int argc, char **argv) { char *file,*base,*date,*time; int style; char *buf; const char *name; char *argv2[2]; _getobj(obj,"file",inst,&file); if (file==NULL) return NULL; style=3; argv2[0]=(char *)&style; argv2[1]=NULL; if (_exeobj(obj,"date",inst,1,argv2)) return NULL; style=0; argv2[0]=(char *)&style; argv2[1]=NULL; if (_exeobj(obj,"time",inst,1,argv2)) return NULL; _getobj(obj,"date",inst,&date); if(date == NULL) { date = "1-1-1970"; } _getobj(obj,"time",inst,&time); if(time == NULL) { time = "00:00:00"; } if ((base=getbasename(file))==NULL) return NULL; name = chkobjectname(obj); buf = g_strdup_printf("%s::load_dummy '%s' '%s %s'\n", name, base, date, time); g_free(base); return buf; } static int f2dstoredum(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct f2dlocal *f2dlocal; char *buf; g_free(rval->str); rval->str = NULL; _getobj(obj, "_local", inst, &f2dlocal); if (f2dlocal->endstore) { f2dlocal->endstore = FALSE; return 1; } buf = store_dummy(obj, inst, argc, argv); if (buf == NULL) { return 1; } rval->str=buf; f2dlocal->endstore=TRUE; return 0; } int load_dummy(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *s = argv[2]; return f2dload_sub(obj, inst, &s, NULL, NULL); } static int f2dtight(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { obj_do_tighten(obj, inst, "axis_x"); obj_do_tighten(obj, inst, "axis_y"); obj_do_tighten(obj, inst, "fit"); obj_do_tighten_all(obj, inst, "array"); return 0; } static int curveoutfile(struct objlist *obj,struct f2ddata *fp,FILE *fp2, int intp,int div) { struct error_info einfo; int j,k,num; int first; double *x,*y,*z,*c1,*c2,*c3,*c4,*c5,*c6,count,dd,dx,dy; int *r,*g,*b,*a; double c[8]; double bs1[7],bs2[7],bs3[4],bs4[4]; int spcond; error_info_init(&einfo); switch (intp) { case INTERPOLATION_TYPE_SPLINE: case INTERPOLATION_TYPE_SPLINE_CLOSE: num=0; count=0; x=y=z=c1=c2=c3=c4=c5=c6=NULL; r=g=b=a=NULL; while (getdata(fp)==0) { if (fp->dxstat==MATH_VALUE_NORMAL && fp->dystat==MATH_VALUE_NORMAL) { if (dataadd(fp->dx,fp->dy,count,fp->col.r,fp->col.g,fp->col.b,fp->col.a,&num, &x,&y,&z,&r,&g,&b,&a,&c1,&c2,&c3,&c4,&c5,&c6)==NULL) return -1; count++; } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (num>=2) { if (intp==INTERPOLATION_TYPE_SPLINE) { spcond=SPLCND2NDDIF; } else { spcond=SPLCNDPERIODIC; if ((x[num-1]!=x[0]) || (y[num-1]!=y[0])) { if (dataadd(x[0],y[0],count,r[0],g[0],b[0],a[0],&num, &x,&y,&z,&r,&g,&b,&a,&c1,&c2,&c3,&c4,&c5,&c6)==NULL) return -1; } } if (spline(z,x,c1,c2,c3,num,spcond,spcond,0,0) || spline(z,y,c4,c5,c6,num,spcond,spcond,0,0)) { FREE_INTP_BUF(); error(obj,ERRSPL); return -1; } fprintf(fp2,"%.15e %.15e\n",x[0],y[0]); for (j=0;jdxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (first) { bs1[num]=fp->dx; bs2[num]=fp->dy; num++; if (num>=7) { for (j=0;j<2;j++) { bspline(j+1,bs1+j,c); bspline(j+1,bs2+j,c+4); if (j==0) { fprintf(fp2,"%.15e %.15e\n",c[0],c[4]); } for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } first=FALSE; } } else { for (j=1;j<7;j++) { bs1[j-1]=bs1[j]; bs2[j-1]=bs2[j]; } bs1[6]=fp->dx; bs2[6]=fp->dy; num++; bspline(0,bs1+1,c); bspline(0,bs2+1,c+4); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (!first) { for (j=0;j<2;j++) { bspline(j+3,bs1+j+2,c); bspline(j+3,bs2+j+2,c+4); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } } first=TRUE; num=0; } errordisp(obj,fp,&einfo); } } if (!first) { for (j=0;j<2;j++) { bspline(j+3,bs1+j+2,c); bspline(j+3,bs2+j+2,c+4); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } } break; case INTERPOLATION_TYPE_BSPLINE_CLOSE: first=TRUE; num=0; while (getdata(fp)==0) { if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (getposition2(fp,fp->axtype,fp->aytype,&(fp->dx),&(fp->dy))==0)) { if (first) { bs1[num]=fp->dx; bs3[num]=fp->dx; bs2[num]=fp->dy; bs4[num]=fp->dy; num++; if (num>=4) { bspline(0,bs1,c); bspline(0,bs2,c+4); fprintf(fp2,"%.15e %.15e\n",c[0],c[4]); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } first=FALSE; } } else { for (j=1;j<4;j++) { bs1[j-1]=bs1[j]; bs2[j-1]=bs2[j]; } bs1[3]=fp->dx; bs2[3]=fp->dy; num++; bspline(0,bs1,c); bspline(0,bs2,c+4); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } } else { if ((fp->dxstat!=MATH_VALUE_CONT) && (fp->dystat!=MATH_VALUE_CONT)) { if (!first) { for (j=0;j<3;j++) { bs1[4+j]=bs3[j]; bs2[4+j]=bs4[j]; bspline(0,bs1+j+1,c); bspline(0,bs2+j+1,c+4); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } } first=TRUE; num=0; } errordisp(obj,fp,&einfo); } } if (!first) { for (j=0;j<3;j++) { bs1[4+j]=bs3[j]; bs2[4+j]=bs4[j]; bspline(0,bs1+j+1,c); bspline(0,bs2+j+1,c+4); for (k=1;k<=div;k++) { dd=1.0/div*k; bsplineint(dd,c,c[0],c[4],&dx,&dy,NULL); fprintf(fp2,"%.15e %.15e\n",dx,dy); } } } break; } return 0; } static int save_data_file(struct objlist *obj, N_VALUE *inst, struct f2dlocal *f2dlocal, struct f2ddata *fp, const char *data_file, const char *file, int div, int append) { int type, intp, r; FILE *fp2; if (fp->need2pass || fp->final < -1) { if (getminmaxdata(fp, f2dlocal)==-1) { closedata(fp, f2dlocal); error2(obj, ERRREAD, data_file); return 1; } reopendata(fp); } if (hskipdata(fp)!=0) { closedata(fp, f2dlocal); error2(obj, ERRREAD, data_file); return 1; } fp2 = nfopen(file, (append) ? "at" : "wt"); if (fp2 == NULL) { // error2(obj, ERROPEN, file); error22(obj, ERRUNKNOWN, g_strerror(errno), file); closedata(fp, f2dlocal); return 1; } if (set_const_all(fp)) return 1; _getobj(obj,"type",inst,&type); if (type==3) { _getobj(obj,"interpolation",inst,&intp); if (curveoutfile(obj,fp,fp2,intp,div)!=0) { closedata(fp, f2dlocal); fclose(fp2); error2(obj, ERRWRITE, file); return 1; } } else { int rcode; while ((rcode=getdata(fp))==0) { switch (fp->type) { case TYPE_NORMAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL)) fprintf(fp2,"%.15e %.15e\n",fp->dx,fp->dy); break; case TYPE_DIAGONAL: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL)) fprintf(fp2,"%.15e %.15e %.15e %.15e\n",fp->dx,fp->dy,fp->d2,fp->d3); break; case TYPE_ERR_X: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL)) fprintf(fp2,"%.15e %.15e %.15e %.15e\n", fp->dx,fp->d2-fp->dx,fp->d3-fp->dx,fp->dy); break; case TYPE_ERR_Y: if ((fp->dxstat==MATH_VALUE_NORMAL) && (fp->dystat==MATH_VALUE_NORMAL) && (fp->d2stat==MATH_VALUE_NORMAL) && (fp->d3stat==MATH_VALUE_NORMAL)) fprintf(fp2,"%.15e %.15e %.15e %.15e\n", fp->dx,fp->dy,fp->d2-fp->dy,fp->d3-fp->dy); break; } } } r = 0; if (ferror(fp2)) { error2(obj, ERRWRITE, file); r = 1; } fclose(fp2); return r; } static int f2doutputfile(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { struct f2dlocal *f2dlocal; struct f2ddata *fp; char *file, *data_file; int div,append,r; _getobj(obj,"_local",inst,&f2dlocal); _getobj(obj,"file", inst, &data_file); file=(char *)argv[2]; div=*(int *)argv[3]; append = *(int *) argv[4]; if (div<1) div=1; fp = opendata(obj,inst,f2dlocal,FALSE,FALSE); if (fp == NULL) { return 1; } r = save_data_file(obj, inst, f2dlocal, fp, data_file, file, div, append); closedata(fp, f2dlocal); return r; } static int update_field(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct f2dlocal *f2dlocal; _getobj(obj, "_local", inst, &f2dlocal); f2dlocal->mtime = 0; f2dlocal->mtime_stat = 0; return 0; } static int accept_ascii_only(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; int i, j, n; update_field(obj, inst, rval, argc, argv); if (argv[2] == NULL) { return 0; } str = argv[2]; n = strlen(str); for (i = j = 0; i < n; i++) { if (str[i] > 0 && (g_ascii_isprint(str[i]) || g_ascii_isspace(str[i]))) { str[j] = str[i]; j++; } } str[j] = '\0'; return 0; } static int update_mask(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct narray *array; update_field(obj, inst, rval, argc, argv); array = (struct narray *) argv[2]; arraysort_int(array); arrayuniq_int(array); return 0; } static int foputabs(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { update_field(obj, inst, rval, argc, argv); return oputabs(obj, inst, rval, argc, argv); } static int foputge1(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { update_field(obj, inst, rval, argc, argv); return oputge1(obj, inst, rval, argc, argv); } static int adjust_move_num(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *move, *move_x, *move_y; int i, n, nx, ny; _getobj(obj, "move_data", inst, &move); _getobj(obj, "move_data_x", inst, &move_x); _getobj(obj, "move_data_y", inst, &move_y); if (move == NULL || move_x == NULL || move_y == NULL) { arrayfree(move); arrayfree(move_x); arrayfree(move_y); move = NULL; _putobj(obj, "move_data", inst, move); _putobj(obj, "move_data_x", inst, move); _putobj(obj, "move_data_y", inst, move); return 0; } n = arraynum(move); nx = arraynum(move_x); ny = arraynum(move_y); if (n == nx && n == ny) return 0; if (nx < n) { for (i = n - 1; i >= nx; i--) { arrayndel(move, i); } n = nx; } else if (nx > n) { for (i = nx - 1; i >= n; i--) { arrayndel(move_x, i); } } if (ny < n) { for (i = n - 1; i >= ny; i--) { arrayndel(move, i); arrayndel(move_x, i); } n = ny; } else if (ny > n) { for (i = ny - 1; i >= n; i--) { arrayndel(move_y, i); } } return 0; } #define MAX_ITERATION 10000 static int bisection(MathEquation *eq, double a, double b, double y, double tolerance, double *x) { int r, i; double c, fa, fb; MathValue val, rval; if (tolerance < 0) { tolerance = 0; } if (b < a) { c = a; a = b; b = c; } val.type = MATH_VALUE_NORMAL; val.val = a; math_equation_set_var(eq, 0, &val); r = math_equation_calculate(eq, &rval); if (r || rval.type != MATH_VALUE_NORMAL) { return 1; } fa = rval.val - y; val.val = b; math_equation_set_var(eq, 0, &val); r = math_equation_calculate(eq, &rval); if (r || rval.type != MATH_VALUE_NORMAL) { return 1; } fb = rval.val - y; if (compare_double(fa, 0)) { *x = a; return 0; } if (compare_double(fb, 0)) { *x = b; return 0; } if (fa * fb > 0) { return 1; } i = 0; while (1) { double fc; c = (a + b) / 2; if (c - a <= tolerance || b - c <= tolerance) { break; } val.val = c; math_equation_set_var(eq, 0, &val); r = math_equation_calculate(eq, &rval); if (r || rval.type != MATH_VALUE_NORMAL) { return 1; } fc = rval.val - y; if (compare_double(fc, 0)) { break; } if (fc * fa > 0) { a = c; fa = fc; } else { b = c; fb = fc; } if (tolerance == 0 && i > MAX_ITERATION) { break; } i++; } *x = c; return i >= MAX_ITERATION; } static int newton(MathEquation *eq, double *xx, double y) { int r, n; double x, fx; MathValue val, rval; val.type = MATH_VALUE_NORMAL; x = *xx; val.val = x; math_equation_set_var(eq, 0, &val); r = math_equation_calculate(eq, &rval); if (r || rval.type != MATH_VALUE_NORMAL) { return 1; } fx = rval.val - y; n = 0; while (! compare_double(fx, 0)) { double dx, df, h, x_prev, fx_prev; int i; dx = (x == 0) ? 1E-6 : x * 1E-6; val.val = x + dx; math_equation_set_var(eq, 0, &val); r = math_equation_calculate(eq, &rval); if (r || rval.type != MATH_VALUE_NORMAL) { return 1; } df = (rval.val - y - fx) / dx; h = fx / df; x_prev = x; fx_prev = fx; i = 0; do { x = x_prev - h; val.val = x; math_equation_set_var(eq, 0, &val); r = math_equation_calculate(eq, &rval); if (r || rval.type != MATH_VALUE_NORMAL) { return 1; } fx = rval.val - y; h /= 2; i++; if (i > MAX_ITERATION) { return 1; } } while (fabs(fx) > fabs(fx_prev)); n++; if (n > MAX_ITERATION || (x == x_prev)) { break; } } *xx = x; return n >= MAX_ITERATION; } static int solve_equation(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { MathEquation *eq = NULL; int r, n, type, fit_id; char *equation, *fit, prefix[] = FIT_FIELD_PREFIX; N_VALUE *fit_inst; double x, y, *data; struct narray *darray; struct objlist *fit_obj; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; g_free(rval->str); rval->str = NULL; _getobj(obj, "type", inst, &type); _getobj(obj, "fit", inst, &fit); if (type != PLOT_TYPE_FIT) { error(obj, ERR_INVALID_TYPE); return 1; } fit_id = get_fit_obj_id(fit, &fit_obj, &fit_inst); if (fit_id < 0) { error2(obj, ERRNOFITINST, fit); return -1; } if (_getobj(fit_obj, "equation", fit_inst, &equation)) { return -1; } darray = (struct narray *) (argv[2]); n = arraynum(darray); data = arraydata(darray); eq = ofile_create_math_equation(NULL, EOEQ_ASSIGN_TYPE_ASSIGN, 0, FALSE, FALSE, FALSE, FALSE, TRUE); if (eq == NULL) { return 1; } r = math_equation_parse(eq, equation); if (r) { math_equation_free(eq); return 1; } r = math_equation_optimize(eq); if (r) { math_equation_free(eq); return 1; } if (eq->exp == NULL) { math_equation_free(eq); return 1; } if (argv[1][sizeof(prefix) - 1] == 'b') { double a, b, tolerance; if (n < 2) { error(obj, ERR_SMALL_ARGS); math_equation_free(eq); return 1; } a = data[0]; b = data[1]; y = (n > 2) ? data[2] : 0; x = 0; tolerance = (n > 3) ? data[3] : 0; r = bisection(eq, a, b, y, tolerance, &x); } else { x = (n > 0) ? data[0] : 0; y = (n > 1) ? data[1] : 0; r = newton(eq, &x, y); } math_equation_free(eq); if (r) { error(obj, ERRCONVERGE); return 1; } rval->str = g_strdup_printf(DOUBLE_STR_FORMAT, x); return 0; } int ofile_calc_fit_equation(struct objlist *obj, int id, double x, double *y) { N_VALUE *inst; inst = chkobjinst(obj, id); if (inst == NULL) { return ERRNOFITINST; } return calc_fit_equation(obj, inst, x, y); } static int calc_fit_equation(struct objlist *obj, N_VALUE *inst, double x, double *y) { int type, fit_id; char *fit; N_VALUE *fit_inst; struct objlist *fit_obj; char *fit_argv[2]; *y = 0; _getobj(obj, "type", inst, &type); _getobj(obj, "fit", inst, &fit); if (type != PLOT_TYPE_FIT) { return ERR_INVALID_TYPE; } fit_id = get_fit_obj_id(fit, &fit_obj, &fit_inst); if (fit_id < 0) { return ERRNOFITINST; } fit_argv[0] = (char *) &x; fit_argv[1] = NULL; getobj(fit_obj, "calc", fit_id, 1, fit_argv, y); return 0; } static int calc_equation(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int r; double x, y; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; g_free(rval->str); rval->str = NULL; x = arg_to_double(argv, 2); r = calc_fit_equation(obj, inst, x, &y); switch (r) { case 0: break; case ERR_INVALID_TYPE: case ERRNOFITINST: error(obj, ERR_INVALID_TYPE); return 1; case ERR_INVALID_SOURCE: error(obj, ERR_INVALID_SOURCE); return 1; default: break; } rval->str = g_strdup_printf(DOUBLE_STR_FORMAT, y); return 0; } static int get_fit_parameter(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int type, fit_id, i; char *fit; N_VALUE *fit_inst; struct objlist *fit_obj; char prm_str[] = "%00"; double val; if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; g_free(rval->str); rval->str = NULL; _getobj(obj, "type", inst, &type); _getobj(obj, "fit", inst, &fit); if (type != PLOT_TYPE_FIT) { error(obj, ERR_INVALID_TYPE); return 1; } fit_id = get_fit_obj_id(fit, &fit_obj, &fit_inst); if (fit_id < 0) { error2(obj, ERRNOFITINST, fit); return -1; } i = * (int *) argv[2]; if (i < 0 || i > 9) { error(obj, ERR_INVALID_PARAM); return 1; } prm_str[2] += i; if (_getobj(fit_obj, prm_str, fit_inst, &val)) { return -1; } rval->str = g_strdup_printf(DOUBLE_STR_FORMAT, val); return 0; } static int add_keyword(struct nhash *hash, void *data) { GString *str; str = data; g_string_append(str, hash->key); g_string_append_c(str, '\n'); return 0; } static gchar * create_keyword_list(NHASH hash) { GString *str; gchar *text; str = g_string_new(""); nhash_each(hash, add_keyword, str); text = g_string_free(str, FALSE); return g_strstrip(text); } char * odata_get_functions(void) { MathEquation *eq; gchar *text; eq = ofile_create_math_equation(NULL, EOEQ_ASSIGN_TYPE_ASSIGN, 3, TRUE, TRUE, TRUE, TRUE, TRUE); if (eq == NULL) { return NULL; } text = create_keyword_list(eq->function); math_equation_free(eq); return text; } char * odata_get_constants(void) { MathEquation *eq; gchar *text; eq = ofile_create_math_equation(NULL, EOEQ_ASSIGN_TYPE_ASSIGN, 3, TRUE, TRUE, TRUE, TRUE, TRUE); if (eq == NULL) { return NULL; } text = create_keyword_list(eq->constant); math_equation_free(eq); return text; } static int get_functions(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; g_free(rval->str); rval->str = NULL; rval->str = odata_get_functions(); return 0; } static int get_constants(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj, argv[1], inst, rval, argc, argv)) return 1; g_free(rval->str); rval->str = NULL; rval->str = odata_get_constants(); return 0; } static int set_array(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct array_prm ary; if (argv[2] && open_array(argv[2], &ary)) { error2(obj, ERR_INVALID_OBJ, argv[2]); return 1; } return 0; } static int data_inst_dup(struct objlist *obj, N_VALUE *src, N_VALUE *dest) { int i, pos; struct f2dlocal *local_new, *local_src; char *math; pos = obj_get_field_pos(obj, "_local"); if (pos < 0) { return 1; } local_src = src[pos].ptr; #if GLIB_CHECK_VERSION(2, 68, 0) local_new = g_memdup2(local_src, sizeof(struct f2dlocal)); #else local_new = g_memdup(local_src, sizeof(struct f2dlocal)); #endif if (local_new == NULL) { return 1; } dest[pos].ptr = local_new; if (local_src->data) { closedata(local_src->data, local_src); local_src->data = NULL; local_new->data = NULL; } if (local_src->codex[0]) { _getobj(obj, "math_x", src, &math); for (i = 0; i < EQUATION_NUM; i++) { local_new->codex[i] = NULL; } put_func(obj, dest, local_new, EOEQ_ASSIGN_TYPE_ASSIGN, "math_x", math, NULL); } if (local_src->codey[0]) { _getobj(obj, "math_y", src, &math); for (i = 0; i < EQUATION_NUM; i++) { local_new->codey[i] = NULL; } put_func(obj, dest, local_new, EOEQ_ASSIGN_TYPE_ASSIGN, "math_y", math, NULL); } return 0; } static int data_inst_free(struct objlist *obj, N_VALUE *inst) { int i, pos; struct f2dlocal *local; pos = obj_get_field_pos(obj, "_local"); if (pos < 0) { return 1; } local = inst[pos].ptr; if (local->data) { closedata(local->data, local); } for (i = 0; i < EQUATION_NUM; i++) { if (local->codex[i]) { math_equation_free(local->codex[i]); } if (local->codey[i]) { math_equation_free(local->codey[i]); } } g_free(local); return 0; } static struct objtable file2d[] = { {"init",NVFUNC,NEXEC,f2dinit,NULL,0}, {"done",NVFUNC,NEXEC,f2ddone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"source",NENUM,NREAD|NWRITE,NULL,data_type,0}, /* for file */ {"file",NSTR,NREAD|NWRITE,f2dfile,NULL,0}, {"save_path",NENUM,NREAD|NWRITE,NULL,pathchar,0}, {"x",NINT,NREAD|NWRITE,f2dput,NULL,0}, {"y",NINT,NREAD|NWRITE,f2dput,NULL,0}, {"type",NENUM,NREAD|NWRITE,NULL,f2dtypechar,0}, {"interpolation",NENUM,NREAD|NWRITE,NULL,intpchar,0}, {"fit",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"math_x",NSTR,NREAD|NWRITE,f2dput,NULL,0}, {"math_y",NSTR,NREAD|NWRITE,f2dput,NULL,0}, {"func_f",NSTR,NREAD|NWRITE,f2dput,NULL,0}, {"func_g",NSTR,NREAD|NWRITE,f2dput,NULL,0}, {"func_h",NSTR,NREAD|NWRITE,f2dput,NULL,0}, {"smooth_x",NINT,NREAD|NWRITE,f2dput,NULL,0}, {"smooth_y",NINT,NREAD|NWRITE,f2dput,NULL,0}, {"averaging_type",NENUM,NREAD|NWRITE,NULL,averaging_type_char,0}, {"mark_type",NINT,NREAD|NWRITE,oputmarktype,NULL,0}, {"mark_size",NINT,NREAD|NWRITE,oputabs,NULL,0}, {"line_width",NINT,NREAD|NWRITE,oputge1,NULL,0}, {"line_style",NIARRAY,NREAD|NWRITE,oputstyle,NULL,0}, {"line_join",NENUM,NREAD|NWRITE,NULL,joinchar,0}, {"line_miter_limit",NINT,NREAD|NWRITE,oputge1,NULL,0}, {"R2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"G2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"B2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"A2",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"remark",NSTR,NREAD|NWRITE,accept_ascii_only,NULL,0}, {"ifs",NSTR,NREAD|NWRITE,accept_ascii_only,NULL,0}, {"csv",NBOOL,NREAD|NWRITE,update_field,NULL,0}, {"head_skip",NINT,NREAD|NWRITE,foputabs,NULL,0}, {"read_step",NINT,NREAD|NWRITE,foputge1,NULL,0}, {"final_line",NINT,NREAD|NWRITE,f2dput,NULL,0}, {"mask",NIARRAY,NREAD|NWRITE,update_mask,NULL,0}, {"move_data",NIARRAY,NREAD|NWRITE,update_field,NULL,0}, {"move_data_x",NDARRAY,NREAD|NWRITE,update_field,NULL,0}, {"move_data_y",NDARRAY,NREAD|NWRITE,update_field,NULL,0}, {"move_data_adjust",NVFUNC,NREAD|NEXEC,adjust_move_num,"",0}, {"axis_x",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"axis_y",NOBJ,NREAD|NWRITE,NULL,NULL,0}, {"data_clip",NBOOL,NREAD|NWRITE,NULL,NULL,0}, {"dnum",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dminx",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dmaxx",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"davx",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dsigx",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dstdevpx",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dstdevx",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dminy",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dmaxy",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"davy",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dsigy",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dstdevpy",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dstdevy",NSFUNC,NREAD|NEXEC,f2dstat,"",0}, {"dx",NSFUNC,NREAD|NEXEC,f2dstat2,"i",0}, {"dy",NSFUNC,NREAD|NEXEC,f2dstat2,"i",0}, {"d2",NSFUNC,NREAD|NEXEC,f2dstat2,"i",0}, {"d3",NSFUNC,NREAD|NEXEC,f2dstat2,"i",0}, {"data_num",NINT,NREAD,NULL,NULL,0}, {"data_x",NDOUBLE,NREAD,NULL,NULL,0}, {"data_y",NDOUBLE,NREAD,NULL,NULL,0}, {"data_2",NDOUBLE,NREAD,NULL,NULL,0}, {"data_3",NDOUBLE,NREAD,NULL,NULL,0}, {"coord_x",NINT,NREAD,NULL,NULL,0}, {"coord_y",NINT,NREAD,NULL,NULL,0}, {"coord_2",NINT,NREAD,NULL,NULL,0}, {"coord_3",NINT,NREAD,NULL,NULL,0}, {"stat_x",NENUM,NREAD,NULL,matherrorchar,0}, {"stat_y",NENUM,NREAD,NULL,matherrorchar,0}, {"stat_2",NENUM,NREAD,NULL,matherrorchar,0}, {"stat_3",NENUM,NREAD,NULL,matherrorchar,0}, {"minx",NDOUBLE,NREAD,NULL,NULL,0}, {"maxx",NDOUBLE,NREAD,NULL,NULL,0}, {"miny",NDOUBLE,NREAD,NULL,NULL,0}, {"maxy",NDOUBLE,NREAD,NULL,NULL,0}, {"stat_minx",NENUM,NREAD,NULL,matherrorchar,0}, {"stat_maxx",NENUM,NREAD,NULL,matherrorchar,0}, {"stat_miny",NENUM,NREAD,NULL,matherrorchar,0}, {"stat_maxy",NENUM,NREAD,NULL,matherrorchar,0}, {"line",NINT,NREAD,NULL,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,f2ddraw,"i",0}, {"getcoord",NIAFUNC,NREAD|NEXEC,f2dgetcoord,"dd",0}, {"redraw",NVFUNC,NREAD|NEXEC,f2dredraw,"i",0}, {"opendata",NVFUNC,NREAD|NEXEC,f2dopendata,"",0}, {"opendatac",NVFUNC,NREAD|NEXEC,f2dopendata,"",0}, {"getdata",NVFUNC,NREAD|NEXEC,f2dgetdata,"",0}, {"closedata",NVFUNC,NREAD|NEXEC,f2dclosedata,"",0}, {"opendata_raw",NVFUNC,NEXEC,f2dopendataraw,"",0}, {"getdata_raw",NDAFUNC,NEXEC,f2dgetdataraw,"ia",0}, {"closedata_raw",NVFUNC,NEXEC,f2dclosedataraw,"",0}, {"column",NSFUNC,NREAD|NEXEC,f2dcolumn,"ii",0}, {"basename",NSFUNC,NREAD|NEXEC,f2dbasename,"",0}, {"head_lines",NSFUNC,NREAD|NEXEC,f2dhead,"i",0}, {"boundings",NVFUNC,NREAD|NEXEC,f2dboundings,"b",0}, {"bounding",NDAFUNC,NREAD|NEXEC,f2dbounding,"o",0}, {"load_settings",NVFUNC,NREAD|NEXEC,f2dsettings,"",0}, {"time",NSFUNC,NREAD|NEXEC,f2dtime,"i",0}, {"date",NSFUNC,NREAD|NEXEC,f2ddate,"i",0}, {"save",NSFUNC,NREAD|NEXEC,f2dsave,"sa",0}, {"evaluate",NDAFUNC,NREAD|NEXEC,f2devaluate,"iiiiii",0}, {"store_data",NSFUNC,NREAD|NEXEC,f2dstore,"",0}, {"load_data",NVFUNC,NREAD|NEXEC,f2dload,"s",0}, {"store_dummy",NSFUNC,NREAD|NEXEC,f2dstoredum,"",0}, {"load_dummy",NVFUNC,NREAD|NEXEC,load_dummy,"s",0}, {"tight",NVFUNC,NREAD|NEXEC,f2dtight,"",0}, {"save_config",NVFUNC,NREAD|NEXEC,f2dsaveconfig,"",0}, {"output_file",NVFUNC,NREAD|NEXEC,f2doutputfile,"sib",0}, {"modified",NVFUNC,NEXEC,update_field,"",0}, {"hsb",NVFUNC,NREAD|NEXEC,put_hsb,"ddd",0}, {"hsb2",NVFUNC,NREAD|NEXEC,put_hsb2,"ddd",0}, {FIT_FIELD_PREFIX "newton",NSFUNC,NREAD|NEXEC,solve_equation,"da",0}, {FIT_FIELD_PREFIX "bisection",NSFUNC,NREAD|NEXEC,solve_equation,"da",0}, {FIT_FIELD_PREFIX "calc",NSFUNC,NREAD|NEXEC,calc_equation,"d",0}, {FIT_FIELD_PREFIX "prm",NSFUNC,NREAD|NEXEC,get_fit_parameter,"i",0}, {"math_functions",NSFUNC,NREAD|NEXEC,get_functions,"",0}, {"math_constants",NSFUNC,NREAD|NEXEC,get_constants,"",0}, {"_local",NPOINTER,0,NULL,NULL,0}, /* for range */ {"range_min", NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"range_max", NDOUBLE,NREAD|NWRITE,NULL,NULL,0}, {"range_div", NINT,NREAD|NWRITE,oputge1,NULL,0}, /* for array */ {"array",NOBJ,NREAD|NWRITE,set_array,NULL,0}, }; #define TBLNUM (sizeof(file2d) / sizeof(*file2d)) void * addfile(void) /* addfile() returns NULL on error */ { struct objlist *data_obj; if (FileConfigHash == NULL) { unsigned int i; FileConfigHash = nhash_new(); if (FileConfigHash == NULL) return NULL; for (i = 0; i < sizeof(FileConfig) / sizeof(*FileConfig); i++) { if (nhash_set_ptr(FileConfigHash, FileConfig[i].name, (void *) &FileConfig[i])) { nhash_free(FileConfigHash); return NULL; } } } data_obj = addobject(NAME,ALIAS,PARENT,OVERSION,TBLNUM,file2d,ERRNUM,f2derrorlist,NULL,NULL); obj_set_undo_func(data_obj, data_inst_dup, data_inst_free); return data_obj; } ngraph-gtk-6.09.05/src/Makefile.am0000644000175000017500000000460214001231674013501 00000000000000SUBDIRS = math gtk EXTRA_DIST = ngraph_export.map ngraph_resource.rc.in libngraph_resource.rc.in ngraph.ico libngraph_ldflags = -version-info $(LIBNGRAPH_VERSION) $(READLINE_LIBS) $(GTK_LIBS) $(GLIB_LIBS) $(GSL_LIBS) libngraph_cflags = ngraph_ldflags = -lngraph ngraph_lib = libngraph.la if OS_WIN32 libngraph_ldflags += -no-undefined -export-symbols ngraph.def -Wl,libngraph_resource.o ngraph_ldflags += -Wl,ngraph_resource.o MINGW_DIR = $(top_srcdir)/mingw BUILT_SOURCES = ngraph.def libngraph_resource.o ngraph_resource.o CLEANFILES = $(BUILT_SOURCES) libngraph_resource.rc ngraph_resource.rc ngraph_resource.rc: ngraph_resource.rc.in $(AWK) -f $(MINGW_DIR)/winrc_version.awk -v VERSION=$(VERSION) $^ > $@ libngraph_resource.rc: libngraph_resource.rc.in $(AWK) -f $(MINGW_DIR)/winrc_version.awk -v VERSION=$(VERSION) $^ > $@ .rc.o: $(WINDRES) -I $(top_srcdir)/src -o $@ $< ngraph.def: ngraph_api.c echo "EXPORTS" > $@ cat $^ | grep '^ngraph_' | sed 's/[^a-z0-9_].*//' >> $@ else libngraph_ldflags += @vsymldflags@ pkglibexec_PROGRAMS = terminal terminal_SOURCES = terminal.c terminal_CFLAGS = $(GTK_CFLAGS) endif if OS_OSX libngraph_ldflags += $(MAC_INTEGRATION_LIBS) libngraph_cflags += $(MAC_INTEGRATION_CFLAGS) endif lib_LTLIBRARIES = $(ngraph_lib) libngraph_la_SOURCES = axis.c axis.h nconfig.c nconfig.h gra.c gra.h \ ioutil.c ioutil.h mathcode.c mathcode.h mathfn.c mathfn.h \ nstring.c nstring.h ntime.c ntime.h oagrid.c oarc.c oarc.h \ oaxis.h oaxis.c object.c object.h odarray.c odouble.c odraw.c \ odraw.h odata.c odata.h ofit.c ofit.h ogra.c ogra.h \ ogra_error.h ogra2.c ogra2fil.c ogra2nul.c ogra2prn.c \ oiarray.c oiarray.h oint.c olegend.c olegend.h omark.c \ omath.c omerge.c omerge.h oprm.c orect.c oroot.c oroot.h \ osarray.c oshell.c oregexp.c ostring.c osystem.c osystem.h \ otext.c opath.c opath.h shell.c shell.h shell_error.h \ shellcm.c shellcm.h shellux.c shellux.h spline.c spline.h \ common.h nhash.h nhash.c strconv.c strconv.h oio.c gettext.h \ ngraph_api.c oparameter.c oparameter.h libngraph_la_CFLAGS = $(GTK_CFLAGS) $(GSL_CFLAGS) $(libngraph_cflags) -I$(top_builddir) -DCCNAME='"'$(CC)'"' $(GTKSOURCEVIEW_CFLAGS) libngraph_la_LIBADD = gtk/libngraphui.la math/libmath.la libngraph_la_LDFLAGS = $(libngraph_ldflags) bin_PROGRAMS = ngraph ngraph_SOURCES = main.c ngraph_DEPENDENCIES = $(ngraph_lib) ngraph_LDFLAGS = $(ngraph_ldflags) include_HEADERS = ngraph.h ngraph-gtk-6.09.05/src/axis.h0000644000175000017500000000361713070106167012572 00000000000000/* * $Id: axis.h,v 1.2 2009-03-24 09:14:52 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #define AXISNORMAL 0 #define AXISLOGSMALL 1 #define AXISLOGNORM 2 #define AXISLOGBIG 3 #define AXISINVERSE 4 enum AXIS_SCALE_TYPE { AXIS_TYPE_LINEAR, AXIS_TYPE_LOG, AXIS_TYPE_INVERSE, AXIS_TYPE_MJD, }; enum AXIS_NUM_DIR { AXIS_NUM_POS_HORIZONTAL, AXIS_NUM_POS_PARALLEL1, AXIS_NUM_POS_PARALLEL2, AXIS_NUM_POS_NORMAL1, AXIS_NUM_POS_NORMAL2, AXIS_NUM_POS_OBLIQUE1, AXIS_NUM_POS_OBLIQUE2, AXIS_NUM_POS_NORMAL, /* for backward compatibility */ AXIS_NUM_POS_PARALLEL, /* for backward compatibility */ }; struct axislocal { int atype; double min,max,inc; int div; int tighten; double posst,posed; double posl,posm,dposl,dposm,dposs; int counts,countm,countsend,countmend,count; int num; }; int getaxispositionini(struct axislocal *alocal, int type,double min,double max,double inc,int div,int tighten); int getaxisposition(struct axislocal *alocal,double *po); double scale(double x); double roundmin(double min,double sc); extern char *axistypechar[]; ngraph-gtk-6.09.05/src/gra.h0000644000175000017500000001547113672020722012400 00000000000000/* * $Id: gra.h,v 1.5 2010-01-04 05:11:28 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "object.h" #ifndef GRA_HEADER #define GRA_HEADER #define EXPAND_DOTTED_LINE 0 #define CURVE_OBJ_USE_EXPAND_BUFFER 1 struct greektbltype { unsigned int jis,symbol; }; extern struct greektbltype greektable[]; struct GRAbbox { int set; int offsetx; int offsety; int minx; int miny; int maxx; int maxy; int posx; int posy; int pt; int spc; int dir; int linew; int clip; int clipsizex; int clipsizey; char *fontalias; int font_style; int loadfont; }; struct GRAdata { char code; int *cpar; char *cstr; struct GRAdata *next; }; typedef int (*clipfunc)(double *x0,double *y0,double *x1,double *y1, void *local); typedef void (*transfunc)(double x0,double y0,int *x1,int *y1,void *local); typedef void (*diffunc)(double d,double c[], double *dx,double *dy,double *ddx,double *ddy, void *local); typedef void (*intpfunc)(double d,double c[], double x0,double y0,double *x,double *y,void *local); typedef int (*directfunc)(char code,int *cpar,char *cstr,void *local); struct cmatchtype { double x0,y0; int minx,miny,maxx,maxy; int pointx,pointy; int err; clipfunc gclipf; transfunc gtransf; diffunc gdiff; intpfunc gintpf; void *gflocal; int bbox,bboxset; int match; }; enum GRA_FONT_STYLE { GRA_FONT_STYLE_NORMAL = 0, GRA_FONT_STYLE_BOLD = 1, GRA_FONT_STYLE_ITALIC = 2, }; #define GRA_FONT_STYLE_MAX (GRA_FONT_STYLE_BOLD | GRA_FONT_STYLE_ITALIC) enum GRA_LINE_CAP { GRA_LINE_CAP_BUTT = 0, GRA_LINE_CAP_ROUND = 1, GRA_LINE_CAP_PROJECTING = 2, }; enum GRA_LINE_JOIN { GRA_LINE_JOIN_MITER = 0, GRA_LINE_JOIN_ROUND = 1, GRA_LINE_JOIN_BEVEL = 2, }; enum GRA_FILL_MODE { GRA_FILL_MODE_NONE = 0, GRA_FILL_MODE_EVEN_ODD = 1, GRA_FILL_MODE_WINDING = 2, }; extern struct greektbltype greektable[48]; int _GRAopencallback(directfunc direct,struct narray **list,void *local); int _GRAopen(const char *objname,const char *outputname, struct objlist *obj,N_VALUE *inst, int output, int strwidth,int charascent,int chardescent, struct narray **list,void *local); int GRAopen(const char *objname,const char *outputname, struct objlist *obj,N_VALUE *inst, int output, int strwidth,int charascent,int chardescent, struct narray **list,void *local); int GRAreopen(int GC); int GRAopened(int GC); void _GRAclose(int GC); void GRAclose(int GC); void GRAredraw(struct objlist *obj,N_VALUE *inst,int setredrawf,int redrawf); void GRAredraw_layers(struct objlist *obj, N_VALUE *inst, int setredrawf, int redraw_num, char const **objects); void GRAaddlist(int GC,struct objlist *obj,N_VALUE *inst, const char *objname, const char *field); int GRAdraw(int GC,char code,int *cpar,char *cstr); int GRAinit(int GC,int leftm,int topm,int width,int height,int zoom); void GRAregion(int GC,int *width,int *height,int *zoom); int GRAend(int GC); void GRAview(int GC,int x1,int y1,int x2,int y2,int clip); void GRAwindow(int GC,double minx,double miny,double maxx,double maxy); void GRAlinestyle(int GC,int num,int *type, int width,enum GRA_LINE_CAP cap,enum GRA_LINE_JOIN join,int miter); void GRAcolor(int GC, int fr, int fg, int fb, int fa); void GRAmoveto(int GC,int x,int y); void GRAline(int GC,int x0,int y0,int x1,int y1); void GRAlineto(int GC,int x,int y); void GRAcircle(int GC,int x,int y,int rx,int ry,int cs,int ce,int fil); void GRArectangle(int GC,int x0,int y0,int x1,int y1,int fil); void GRAdrawpoly(int GC,int num,int *point,enum GRA_FILL_MODE fil); void GRAlines(int GC,int num,int *point); void GRArotate(int x0, int y0, int *pos, int *rpos, int n, double dx, double dy); void GRAmark_rotate(int GC,int type,int x0,int y0, double dx, double dy, int size, int fr,int fg,int fb, int fa, int br,int bg,int bb, int ba); void GRAmark(int GC,int type,int x0,int y0,int size, int fr,int fg,int fb, int fa, int br,int bg,int bb, int ba); void GRAdrawtext(int GC,char *s,char *font, int style, int size, int space, int dir, int scriptsize); void GRAdrawtextraw(int GC,char *s,char *font, int style, int size,int space,int dir); void GRAtextextent(char *s,char *font, int style, int size,int space,int scriptsize, int *gx0,int *gy0,int *gx1,int *gy1,int raw); void GRAtextextentraw(char *s,char *font, int style, int size,int space,int *gx0,int *gy0,int *gx1,int *gy1); int GRAinput(int GC,char *s,int leftm,int topm,int rate_x,int rate_y); int GRAinputold(int GC,char *s,int leftm,int topm,int rate_x,int rate_y); void GRAcurvefirst(int GC,int num,int *dashlist, clipfunc clipf,transfunc transf,diffunc diff,intpfunc intpf,void *local, double x0,double y0); int GRAcurve(int GC,double c[],double x0,double y0); void GRAdashmovetod(int GC,double x1,double y1); void GRAdashlinetod(int GC,double x1,double y1); void GRAcmatchfirst(int pointx,int pointy,int err, clipfunc clipf,transfunc transf,diffunc diff,intpfunc intpf,void *local, struct cmatchtype *data,int bbox,double x0,double y0); int GRAcmatch(double c[],double x0,double y0,struct cmatchtype *data); void GRAinitbbox(struct GRAbbox *bbox); void GRAendbbox(struct GRAbbox *bbox); int GRAboundingbox(char code,int *cpar,char *cstr,void *local); void GRAtextstyle(int GC,char *font,int style, int size,int space,int dir); void GRAouttext(int GC,char *s); void GRAlayer(int GC,const char *s); int GRAlayer_support(int GC); void GRAcurrent_point(int GC, int *x, int *y); void GRAdata_free(struct GRAdata *data); int GRAparse(struct GRAdata *data, char *s); int GRAinputdraw(int GC,int leftm,int topm,int rate_x,int rate_y,char code,int *cpar,char *cstr); int calc_zoom_direction(int direction, double zx, double zy, double *zp, double *zn); void GRA_get_linestyle(int GC, int *num, int **type, int *width, enum GRA_LINE_CAP *cap, enum GRA_LINE_JOIN *join, int *miter); #endif ngraph-gtk-6.09.05/src/ogra_error.h0000644000175000017500000000023114001231674013751 00000000000000#define ERROPEN 100 #define ERRBUSY 101 #define ERRALOPEN 102 #define ERRNODEVICE 103 #define ERRILGC 104 #define ERRGRABUSY 105 #define ERRGRACLOSE 106 ngraph-gtk-6.09.05/src/oint.c0000644000175000017500000000523013070106167012563 00000000000000/* * $Id: oint.c,v 1.6 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include "object.h" #define NAME "int" #define PARENT "object" #define OVERSION "1.00.00" #define ERRILNAME 100 static char *interrorlist[]={ "", }; #define ERRNUM (sizeof(interrorlist) / sizeof(*interrorlist)) static int intinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int intdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int int_times(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int count; _getobj(obj, "@", inst, &count); rval->i = count; if (count <= 0) { return 1; } count--; _putobj(obj,"@",inst,&count); return 0; } static int int_inc(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int count; _getobj(obj, "@", inst, &count); count++; rval->i = count; _putobj(obj,"@",inst,&count); return 0; } static int int_dec(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int count; _getobj(obj, "@", inst, &count); count--; rval->i = count; _putobj(obj,"@",inst,&count); return 0; } static struct objtable oint[] = { {"init",NVFUNC,NEXEC,intinit,NULL,0}, {"done",NVFUNC,NEXEC,intdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"@",NINT,NREAD|NWRITE,NULL,NULL,0}, {"times",NIFUNC,NREAD|NEXEC,int_times,"",0}, {"inc",NIFUNC,NREAD|NEXEC,int_inc,"",0}, {"dec",NIFUNC,NREAD|NEXEC,int_dec,"",0}, }; #define TBLNUM (sizeof(oint) / sizeof(*oint)) void * addint(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,oint,ERRNUM,interrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/mathfn.c0000644000175000017500000001103113624701076013070 00000000000000/* * $Id: mathfn.c,v 1.9 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include "mathfn.h" double distance(double x1, double y1) { return sqrt(x1 * x1 + y1 * y1); } int compare_double(double x, double y) { if (x) { return fabs(x - y) <= fabs(DBL_EPSILON * x); } else { return fabs(x - y) <= fabs(DBL_EPSILON * y); } } double cutdown(double x) { if (x>=0) return (int )x; else if ((x-(int )x)==0.0) return (int )x; else return (int )(x-1); } double nraise(double x) { if (x<0) return (int ) (x - N_EPSILON); else if ((x-(int )x)==0.0) return (int )x; else return (int )(x+1); } int nround(double x) { int ix; double dx; if (x>G_MAXINT) return G_MAXINT; else if (x=0.5) return ix+1; else if (dx<=-0.5) return ix-1; else return ix; } } static int matinv(int dim,matrix m,matrix mi) { int i,j,k; int pivot; vector vec; for (i=0;imax) { pivot=j; max=fabs(m[j][i]); } } if (max<=1E-300) return -1; for (k=0;k=0;j--) mi[i][j]=mi[i][j]/m[i][i]; for (j=dim-1;j>=i;j--) m[i][j]=m[i][j]/m[i][i]; for (j=0;j=0;k--) mi[j][k]=mi[j][k]-m[j][i]*mi[i][k]; for (j=0;j=0;k--) m[j][k]=m[j][k]-m[j][i]*m[i][k]; } return 0; } int matsolv(int dim,matrix a,vector b,vector x) { matrix ai; int i,j; if (matinv(dim,a,ai)) return -1; for (i=0;i= h) { th = tan(2 * MPI * h); *R = b * 255; *B = b * s * 255; *G = b * (2 * th - s * (th - s3)) / (th + s3) * 255; } else if (2.0 / 6.0 >= h) { th = tan(2 * MPI * (h - 1.0 / 3.0)); *G = b * 255; *B = b * s * 255; *R = b * (2 * th - s * (th + s3)) / (th - s3) * 255; } else if (3.0 / 6.0 >= h) { th = tan(2 * MPI * (h - 1.0 / 3.0)); *G = b * 255; *R = b * s * 255; *B = b * (2 * th - s * (th - s3)) / (th + s3) * 255; } else if (4.0 / 6.0 >= h) { th = tan(2 * MPI * (h - 2.0 / 3.0)); *B = b * 255; *R = b * s * 255; *G = b * (2 * th - s * (th + s3)) / (th - s3) * 255; } else if (5.0 / 6.0 >= h) { th = tan(2 * MPI * (h - 2.0 / 3.0)); *B = b * 255; *G = b * s * 255; *R = b * (2 * th - s * (th - s3)) / (th + s3) * 255; } else { th = tan(2 * MPI * h); *R = b * 255; *G = b * s * 255; *B = b * (2 * th - s * (th + s3)) / (th - s3) * 255; } } int bsearch_int(int *ary, int n, int val, int *idx) { int min, max; if (n == 0 || ary == NULL) { if (idx) { *idx = 0; } return FALSE; } min = 0; max = n - 1; while (1) { int i; i = (min + max) / 2; if (ary[i] == val) { if (idx) { *idx = i; } return TRUE; } if (min >= max) { if (idx) { if (ary[i] < val) { i++; } *idx = i; } return FALSE; } if (ary[i] < val) { min = i + 1; } else { max = i - 1; } } return FALSE; } ngraph-gtk-6.09.05/src/oshell.c0000644000175000017500000001307013666607100013105 00000000000000/* * $Id: oshell.c,v 1.9 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include "object.h" #include "ioutil.h" #include "shell.h" #define NAME "shell" #define PARENT "object" #define OVERSION "1.00.00" #define MAXCLINE 256 #define ERRRUN 100 #define ERRNOCL 101 #define ERRFILEFIND 102 static char *sherrorlist[]={ "already running.", "no command string is specified.", "no such file", }; #define ERRNUM (sizeof(sherrorlist) / sizeof(*sherrorlist)) struct shlocal { int lock; struct nshell *nshell; }; static int cmdinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct shlocal *shlocal; struct nshell *nshell; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if ((shlocal=g_malloc(sizeof(struct shlocal)))==NULL) return 1; if (_putobj(obj,"_local",inst,shlocal)) { g_free(shlocal); return 1; } if ((nshell=newshell())==NULL) return 1; ngraphenvironment(nshell); shlocal->lock=0; shlocal->nshell=nshell; return 0; } static int cmddone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct shlocal *shlocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&shlocal); if (shlocal->lock) { shlocal->nshell->deleted = 1; } else { delshell(shlocal->nshell); } return 0; } #if ! WINDOWS static void int_handler(int sig) { set_interrupt(); } #endif static int cmdshell(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct shlocal *shlocal; struct nshell *nshell; struct narray *sarray; struct objlist *sys; char **sdata; int i,snum; int err; char *filename,*filename2; int fd; int rcode; char *s; #if ! WINDOWS struct sigaction oldact; int (*save_interrupt)(void); #endif _getobj(obj,"_local",inst,&shlocal); if (shlocal->lock) { error(obj,ERRRUN); return 1; } shlocal->lock=1; nshell=shlocal->nshell; shellsavestdio(nshell); #if ! WINDOWS save_interrupt = ninterrupt; set_signal(SIGINT, 0, int_handler, &oldact); ninterrupt = check_interrupt; #endif err=1; filename=NULL; sarray=(struct narray *)argv[2]; snum=arraynum(sarray); sdata=arraydata(sarray); for (i=0;ideleted) break; } while (nisatty(getshhandle(nshell)) && (rcode!=0)); if (fd!=NOHANDLE) { nclose(fd); setshhandle(nshell,stdinfd()); if (!getshelloption(nshell,'s')) { do { rcode=cmdexecute(nshell,NULL); } while (nisatty(getshhandle(nshell)) && (rcode!=0)); } } err=0; errexit: sys = getobject("system"); if (sys) { N_VALUE *sys_inst; sys_inst = chkobjinst(sys, 0); if (sys_inst) { _putobj(sys, "shell_status", sys_inst, &(nshell->status)); } } #if ! WINDOWS ninterrupt = save_interrupt; sigaction(SIGINT, &oldact, NULL); #endif shellrestorestdio(nshell); if (nshell->deleted) { delshell(nshell); } else { shlocal->lock = 0; } return err; } static int cmdsecurity(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { set_security(*(int *)argv[2]); return 0; } static int cmd_set_security(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { set_security(TRUE); return 0; } static struct objtable shell[] = { {"init",NVFUNC,NEXEC,cmdinit,NULL,0}, {"done",NVFUNC,NEXEC,cmddone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"shell",NVFUNC,NREAD|NEXEC,cmdshell,"sa",0}, {"security",NVFUNC,0,cmdsecurity,"b",0}, {"set_security",NVFUNC,NREAD|NEXEC,cmd_set_security,"",0}, {"_local",NPOINTER,0,NULL,NULL,0}}; #define TBLNUM (sizeof(shell) / sizeof(*shell)) void * addshell(void) { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,shell,ERRNUM,sherrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/oparameter.c0000644000175000017500000002133013764127347013765 00000000000000/* * $Id: oparameter.c,v 1.29 2010-03-04 08:30:17 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include "object.h" #include "oparameter.h" #define NAME "parameter" #define PARENT "object" #define NVERSION "1.00.00" char *parameter_type[]={ N_("SpinButton"), N_("Scale"), N_("CheckButton"), N_("Switch"), N_("ComboBox"), N_("Transition"), NULL, }; char *transition_init[]={ N_("start"), N_("stop"), NULL, }; static char *parameter_errorlist[] = { }; #define ERRNUM (sizeof(parameter_errorlist) / sizeof(*parameter_errorlist)) static void set_parameter(struct objlist *obj, N_VALUE *inst, int type); static int parameter_init(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { double min, max, step, value; int checked, type, wait, redraw, transition; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) { return 1; } min = 0; max = 100; step = 1; value = min; wait = 10; checked = FALSE; redraw = TRUE; type = PARAMETER_TYPE_SPIN; transition = TRANSITION_INIT_STOP; _putobj(obj, "min", inst, &min); _putobj(obj, "max", inst, &max); _putobj(obj, "step", inst, &step); _putobj(obj, "start", inst, &min); _putobj(obj, "stop", inst, &max); _putobj(obj, "value", inst, &value); _putobj(obj, "wait", inst, &wait); _putobj(obj, "active", inst, &checked); _putobj(obj, "redraw", inst, &redraw); _putobj(obj, "type", inst, &type); _putobj(obj, "transition", inst, &transition); set_parameter(obj, inst, type); return 0; } static void set_parameter(struct objlist *obj, N_VALUE *inst, int type) { int checked, selected, transition; double value, prm; const char *field; switch (type) { case PARAMETER_TYPE_SPIN: case PARAMETER_TYPE_SCALE: _getobj(obj, "value", inst, &value); prm = value; break; case PARAMETER_TYPE_CHECK: _getobj(obj, "active", inst, &checked); prm = checked; break; case PARAMETER_TYPE_COMBO: case PARAMETER_TYPE_SWITCH: _getobj(obj, "selected", inst, &selected); prm = selected; break; case PARAMETER_TYPE_TRANSITION: _getobj(obj, "transition", inst, &transition); field = (transition == TRANSITION_INIT_STOP) ? "stop" : "start"; _getobj(obj, field, inst, &value); prm = value; break; default: return; } _putobj(obj, "parameter", inst, &prm); return; } static int parameter_type_put(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int type; type = *(int *)(argv[2]); set_parameter(obj, inst, type); return 0; } static int parameter_transition_put(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int transition, type; const char *field; double value; _getobj(obj, "type", inst, &type); if (type != PARAMETER_TYPE_TRANSITION) { return 0; } transition = *(int *)(argv[2]); field = (transition == TRANSITION_INIT_STOP) ? "stop" : "start"; _getobj(obj, field, inst, &value); _putobj(obj, "parameter", inst, &value); return 0; } static int parameter_put_wait(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int wait; wait = *(int *) (argv[2]); if (wait < OPARAMETER_WAIT_MIN) { *(int *)(argv[2]) = OPARAMETER_WAIT_MIN; } else if (wait > OPARAMETER_WAIT_MAX) { *(int *)(argv[2]) = OPARAMETER_WAIT_MAX; } return 0; } static int parameter_put_items(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { char *str; str = argv[2]; if (str == NULL) { return 0; } g_strstrip(str); return 0; } static int parameter_put_step(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { double step; step = arg_to_double(argv, 2); if (step <= 0) { step = 1; *(double *)(argv[2]) = step; } return 0; } static int parameter_put(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int type, checked, selected, transition; double value, prm; char *field, *transition_field; field = argv[1]; _getobj(obj, "type", inst, &type); switch (type) { case PARAMETER_TYPE_SPIN: case PARAMETER_TYPE_SCALE: if (strcmp(field, "value")) { return 0; } value = arg_to_double(argv, 2); prm = value; break; case PARAMETER_TYPE_SWITCH: case PARAMETER_TYPE_CHECK: if (strcmp(field, "active")) { return 0; } checked = *(int *)(argv[2]); prm = checked; break; case PARAMETER_TYPE_COMBO: if (strcmp(field, "selected")) { return 0; } selected = *(int *)(argv[2]); prm = selected; break; case PARAMETER_TYPE_TRANSITION: _getobj(obj, "transition", inst, &transition); transition_field = (transition == TRANSITION_INIT_STOP) ? "stop" : "start"; if (strcmp(field, transition_field)) { return 0; } value = arg_to_double(argv, 2); prm = value; break; default: return 0; } _putobj(obj, "parameter", inst, &prm); return 0; } static int count_items(const char *str) { char **items; int num; if (str == NULL) { return 0; } items = g_strsplit(str, "\n", -1); if (items == NULL) { return 0; } num = g_strv_length(items); g_strfreev(items); return num; } static int parameter_set(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int type, num; double val, min, max; char *items; val = arg_to_double(argv, 2); _getobj(obj, "type", inst, &type); switch (type) { case PARAMETER_TYPE_SPIN: case PARAMETER_TYPE_SCALE: _getobj(obj, "min", inst, &min); _getobj(obj, "max", inst, &max); if (val < min || val > max) { return 1; } break; case PARAMETER_TYPE_SWITCH: case PARAMETER_TYPE_CHECK: val = (val) ? 1 : 0; break; case PARAMETER_TYPE_COMBO: _getobj(obj, "items", inst, &items); num = count_items(items); val = ceil(val); if (val < 0 || val >= num) { return 1; } break; case PARAMETER_TYPE_TRANSITION: _getobj(obj, "start", inst, &min); _getobj(obj, "stop", inst, &max); if (min > max) { double tmp; tmp = min; min = max; max = tmp; } if (val < min || val > max) { return 1; } break; default: return 1; } _putobj(obj, "parameter", inst, &val); return 0; } static int parameter_done(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; return 0; } static struct objtable parameter[] = { {"init", NVFUNC, NEXEC, parameter_init, NULL, 0}, {"done", NVFUNC, NEXEC, parameter_done, NULL, 0}, {"next", NPOINTER, 0, NULL, NULL, 0}, {"title", NSTR, NREAD | NWRITE, NULL, NULL, 0}, {"type", NENUM, NREAD | NWRITE, parameter_type_put, parameter_type, 0}, {"min", NDOUBLE, NREAD | NWRITE, NULL, NULL, 0}, {"max", NDOUBLE, NREAD | NWRITE, NULL, NULL, 0}, {"step", NDOUBLE, NREAD | NWRITE, parameter_put_step, NULL, 0}, {"start", NDOUBLE, NREAD | NWRITE, NULL, NULL, 0}, {"stop", NDOUBLE, NREAD | NWRITE, parameter_put, NULL, 0}, {"wait", NINT, NREAD | NWRITE, parameter_put_wait, NULL, 0}, {"wrap", NBOOL, NREAD | NWRITE, NULL, NULL, 0}, {"items", NSTR, NREAD | NWRITE, parameter_put_items, NULL, 0}, {"redraw", NBOOL, NREAD | NWRITE, NULL, NULL, 0}, {"active", NBOOL, NREAD | NWRITE, parameter_put, NULL, 0}, {"selected", NINT, NREAD | NWRITE, parameter_put, NULL, 0}, {"value", NDOUBLE, NREAD | NWRITE, parameter_put, NULL, 0}, {"transition",NENUM, NREAD | NWRITE, parameter_transition_put, transition_init, 0}, {"set", NVFUNC, NREAD | NEXEC, parameter_set, "d", 0}, {"parameter", NDOUBLE, NREAD, NULL, NULL, 0}, }; #define TBLNUM (sizeof(parameter) / sizeof(*parameter)) void * addparameter(void) { return addobject(NAME, NULL, PARENT, NVERSION, TBLNUM, parameter, ERRNUM, parameter_errorlist, NULL, NULL); } ngraph-gtk-6.09.05/src/libngraph_resource.rc.in0000644000175000017500000000113313070106167016254 000000000000001 VERSIONINFO FILEVERSION %VERSION% PRODUCTVERSION %VERSION% BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "" VALUE "FileDescription", "Ngraph-gtk" VALUE "FileVersion", "%VERSION%" VALUE "InternalName", "libngraph" VALUE "LegalCopyright", "Copyright (C) 2003 Satoshi ISHIZAKA" VALUE "OriginalFilename", "libngraph-0.dll" VALUE "ProductName", "Ngraph-gtk" VALUE "ProductVersion", "%VERSION%" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END ngraph-gtk-6.09.05/src/ioutil.c0000644000175000017500000004316213717453502013133 00000000000000/* * $Id: ioutil.c,v 1.25 2010-04-01 06:08:22 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "object.h" #include "nstring.h" #include "ioutil.h" #include "strconv.h" #ifndef O_BINARY #define O_BINARY 0 #endif static void (* ShowProgressFunc)(int, const char *, double) = NULL; #if EOF == -1 static char C_type_buf[257]; void char_type_buf_init(void) { memset(C_type_buf, 0, sizeof(C_type_buf)); C_type_buf[0] = 1; C_type_buf['\r' + 1] = 1; C_type_buf['\n' + 1] = 1; C_type_buf['\0' + 1] = 1; } #define is_line_sep(ch) (C_type_buf[ch + 1]) #endif void changefilename(char *name) { #if WINDOWS int i; if (name == NULL) { return; } for (i = 0; name[i] != '\0'; i++) { if (name[i] == '\\') { name[i] = DIRSEP; } } #endif /* WINDOWS */ } void path_to_win(char *name) { #if WINDOWS int i; if (name == NULL) { return; } for (i = 0; name[i] != '\0'; i++) { if (name[i] == DIRSEP) { name[i] = '\\'; } } #endif /* WINDOWS */ } static void pathresolv(char *name) { int j,k; if (name == NULL) { return; } changefilename(name); j=k=0; while (name[k]!='\0') { if ((name[k]==DIRSEP) && (name[k+1]=='.')) { if (name[k+2]==DIRSEP) k+=2; else if ((name[k+2]=='.') && (name[k+3]==DIRSEP)) { if (j!=0) j--; for (;(name[j]!=DIRSEP) && (j!=0);j--); k+=3; } else { name[j]=name[k]; j++; k++; } } else { name[j]=name[k]; j++; k++; } } name[j]='\0'; } char * getfullpath(const char *name) { char *s, *utf8_name; if (name == NULL) { return NULL; } utf8_name = get_utf8_filename(name); if (utf8_name == NULL) { return NULL; } changefilename(utf8_name); if (utf8_name[0] == DIRSEP && utf8_name[1] == DIRSEP) { s = utf8_name; } else { int top; if (isalpha(utf8_name[0]) && utf8_name[1] == ':') { top = 2; } else { top = 0; } if (utf8_name[top] == DIRSEP) { s = utf8_name; } else { char *cwd; cwd = ngetcwd(); if (cwd == NULL) { g_free(utf8_name); return NULL; } s = g_strdup_printf("%s%c%s", cwd, DIRSEP, utf8_name + top); g_free(cwd); g_free(utf8_name); } } pathresolv(s); return s; } #if WINDOWS static int getdisk(void) { char *cwd; int drive; cwd = g_get_current_dir(); if (cwd == NULL) { return -1; } drive = toupper(cwd[0]) - 'A'; g_free(cwd); return drive; } #endif /* WINDOWS */ char * getrelativepath(const char *name) { char *utf8_name, *str; if (name == NULL) { return NULL; } utf8_name = get_utf8_filename(name); if (utf8_name == NULL) { return NULL; } if ((utf8_name[0]==DIRSEP) && (utf8_name[1]==DIRSEP)) { str = utf8_name; pathresolv(str); } else { int top; top = 0; #if WINDOWS if (isalpha(utf8_name[0]) && name[1] == ':') { top = 2; } #endif /* WINDOWS */ if ( #if WINDOWS name[top] == DIRSEP && (top != 2 || toupper(name[0]) - 'A' == getdisk()) #else /* WINDOWS */ name[0] == DIRSEP #endif /* WINDOWS */ ) { GString *s; char *cwd, *cwd2; int i, j, depth; cwd = ngetcwd(); if (cwd == NULL) { g_free(utf8_name); return NULL; } #if WINDOWS for (j = 2; cwd[j] != '\0'; j++) { cwd[j - 2] = cwd[j]; } cwd[j - 2] = '\0'; #endif /* WINDOWS */ cwd2 = g_malloc(strlen(cwd) + 2); if (cwd2 == NULL) { g_free(cwd); g_free(utf8_name); return NULL; } strcpy(cwd2, cwd); g_free(cwd); i=strlen(cwd2); if ((i==0) || (cwd2[i-1]!=DIRSEP)) { cwd2[i]=DIRSEP; cwd2[i+1]='\0'; } for (i=0;(cwd2[i]!='\0') && (utf8_name[i+top]!='\0');i++) { if (cwd2[i]!=utf8_name[i+top]) { break; } } if (i > 0) { i--; } for (;cwd2[i] != DIRSEP;i--); depth=0; for (j=strlen(cwd2); j != i; j--) { if (cwd2[j] == DIRSEP) { depth++; } } g_free(cwd2); s = g_string_sized_new(64); if (s == NULL) { g_free(utf8_name); return NULL; } if (depth==0) { g_string_append(s, "./"); } else { for (j = 0; j < depth; j++) { g_string_append(s, "../"); } } g_string_append(s, utf8_name + i + top + 1); g_free(utf8_name); str = g_string_free(s, FALSE); } else { str = utf8_name; pathresolv(str); } } return str; } char * get_utf8_filename(const char *name) { char *utf8_name; if (name == NULL) { return NULL; } if (g_utf8_validate(name, -1, NULL)) { utf8_name = g_strdup(name); } else { #if WINDOWS utf8_name = g_locale_to_utf8(name, -1, NULL, NULL, NULL); #else /* WINDOWS */ utf8_name = g_filename_to_utf8(name, -1, NULL, NULL, NULL); #endif /* WINDOWS */ } if (utf8_name == NULL) { /* for compatibility with Ngraph for Windows */ utf8_name = sjis_to_utf8(name); } if (utf8_name == NULL) { utf8_name = g_strdup(name); } changefilename(utf8_name); return utf8_name; } char * get_localized_filename(const char *name) { char *localized_name; if (name == NULL) { return NULL; } #if WINDOWS if (g_utf8_validate(name, -1, NULL)) { localized_name = g_strdup(name); } else { localized_name = g_locale_to_utf8(name, -1, NULL, NULL, NULL); } #else /* WINDOWS */ if (g_utf8_validate(name, -1, NULL)) { localized_name = g_filename_from_utf8(name, -1, NULL, NULL, NULL); } else { localized_name = g_strdup(name); } #endif /* WINDOWS */ return localized_name; } char * getbasename(const char *name) { char *basename, *tmp; if (name == NULL) return NULL; tmp = get_utf8_filename(name); if (tmp == NULL) { return NULL; } basename = g_path_get_basename(tmp); g_free(tmp); return basename; } char * getdirname(const char *name) { char *dirname, *tmp; if (name == NULL) return NULL; tmp = get_utf8_filename(name); if (tmp == NULL) { return NULL; } dirname = g_path_get_dirname(tmp); g_free(tmp); return dirname; } char * getextention(char *name) { int i; if (name==NULL) return NULL; changefilename(name); for (i=strlen(name);(name[i]!='.') && (name[i]!=':') && (i!=0);i--); if (name[i]=='.') return name+i+1; return NULL; } char * getfilename(const char *dir, const char *sep, const char *file) { char *s; unsigned int dir_len; dir_len = strlen(dir); s = g_malloc(dir_len + strlen(sep) + strlen(file) + 1); if (s == NULL) return NULL; strcpy(s, dir); if (dir_len > 0 && (s[dir_len - 1] == '/' || s[dir_len - 1] == '\\')) s[dir_len - 1]='\0'; strcat(s, sep); strcat(s, file); changefilename(s); return s; } int findfilename(const char *dir, const char *sep, const char *file) { char *s; int find; GStatBuf buf; if ((s=getfilename(dir,sep,file))==NULL) return FALSE; if ((naccess(s,R_OK)==0) && (nstat(s,&buf)==0)) { if ((buf.st_mode & S_IFMT)==S_IFREG) find=TRUE; else find=FALSE; } else find=FALSE; g_free(s); return find; } char * ngetcwd(void) { char *s; s = g_get_current_dir(); changefilename(s); return s; } char * nsearchpath(char *path,char *name,int shellscript) { char *cmdname; int len; if (name==NULL) return NULL; if (name[0]=='\0') return NULL; cmdname = g_find_program_in_path(name); if (cmdname) { return cmdname; } if (strchr(name,DIRSEP)==NULL) { char *tok; while ((tok=getitok(&path,&len,PATHSEP))!=NULL) { g_free(cmdname); if ((cmdname=g_malloc(strlen(name)+len+2))==NULL) return NULL; strncpy(cmdname,tok,len); if (cmdname[len-1]!=DIRSEP) { cmdname[len]=DIRSEP; len++; } strcpy(cmdname+len,name); if ((!shellscript && (naccess(cmdname,X_OK)==0)) || (shellscript && (naccess(cmdname,R_OK)==0))) return cmdname; } if (tok==NULL) { g_free(cmdname); return NULL; } } else { if (!((!shellscript && (naccess(name,X_OK)==0)) || (shellscript && (naccess(name,R_OK)==0)))) return NULL; if ((cmdname=g_malloc(strlen(name)+1))==NULL) return NULL; strcpy(cmdname,name); return cmdname; } return NULL; } static int nscandir(char *dir,char ***namelist, int (*compar)()) { unsigned int i; GDir *dp; const char *ent; char **po,**po2; unsigned int allocn = 256, alloc = 0; dp = g_dir_open(dir, 0, NULL); if (dp == NULL) { return -1; } po = g_malloc(allocn * sizeof(char *)); if (po == NULL) { g_dir_close(dp); return -1; } while ((ent = g_dir_read_name(dp))) { if (allocn == alloc) { allocn += 256; po2 = g_realloc(po, allocn * sizeof(char *)); if (po2 == NULL) { for (i = 0; i < alloc; i++) { g_free(po[i]); } g_free(po); g_dir_close(dp); return -1; } po = po2; } po[alloc] = g_strdup(ent); if (po[alloc] == NULL) { for (i = 0; i < alloc; i++) { g_free(po[i]); } g_free(po); g_dir_close(dp); return -1; } alloc++; } g_dir_close(dp); if (compar != NULL) { qsort(po, alloc, sizeof(struct dirent *), compar); } *namelist = po; return alloc; } static int nalphasort(char **a,char **b) { return strcmp(*a,*b); } static int nglob2(char *path,int po,int *num,char ***list) { int i,j,p1,escape; char **namelist, *s; if (path==NULL) return 0; p1=po; escape=FALSE; for (i=po;path[i]!='\0';i++) { if (escape) escape=FALSE; else if (path[i]=='\\') escape=TRUE; else if (path[i]==DIRSEP) p1=i+1; else if ((path[i]=='?') || (path[i]=='*')) break; else if (path[i]=='[') { for (j=i+1;(path[j]!='\0') && (path[j]!=']');j++) ; if (path[j]==']') { i=j; break; } } } if (path[i]=='\0') { if (naccess(path,R_OK)==0) { if ((s=g_malloc(strlen(path)+1))==NULL) return -1; strcpy(s,path); if (arg_add(list,s)==NULL) return -1; (*num)++; } } else { int scannum,len,err; char *s1,*s2,*s3,*path2; for (;(path[i]!='\0') && (path[i]!=DIRSEP);i++) ; s1 = g_malloc(p1 + 1); s2 = g_malloc(i - p1 + 1); s3 = g_malloc(strlen(path) - i + 1); if (s1 == NULL || s2 == NULL || s3 == NULL) { g_free(s1); g_free(s2); g_free(s3); return -1; } strncpy(s1,path,p1); s1[p1]='\0'; strncpy(s2,path+p1,i-p1); s2[i-p1]='\0'; strcpy(s3,path+i); if (strlen(s1)==0) scannum=nscandir("./",&namelist,nalphasort); else scannum=nscandir(s1,&namelist,nalphasort); for (i=0;i0) g_free(namelist); g_free(s1); g_free(s2); g_free(s3); return -1; } g_free(path2); } } g_free(namelist[i]); } if (scannum>0) g_free(namelist); g_free(s1); g_free(s2); g_free(s3); } return 0; } int nglob(char *path,char ***namelist) { int num; *namelist=NULL; num=0; if (nglob2(path,0,&num,namelist)==-1) { arg_del(*namelist); return -1; } if (num==0) { char *s; s = g_strdup(path); if (s == NULL) return -1; if (arg_add(namelist,s)==NULL) return -1; num = 1; } return num; } int fgetline(FILE *fp, char **buf) { /* rcode: 0 noerror -1 fatal error 1 EOF */ char *s; int ch, i; /* modified */ *buf = NULL; ch = fgetc(fp); if (ch == EOF) { *buf = NULL; return 1; } s = nstrnew(); if (s == NULL) { *buf = NULL; return -1; } i = 0; while (TRUE) { #if EOF == -1 if (is_line_sep(ch)) { switch (ch) { case '\r': ch = fgetc(fp); if (ch != '\n') { ungetc(ch, fp); } /* FALLTHRU */ case '\0': case '\n': case EOF: s[i] = '\0'; /* nstraddchar() is not terminate string */ *buf = s; return 0; } } else { s = nstraddchar(s, i, ch); i++; if (s == NULL) { *buf = NULL; return -1; } } #else switch (ch) { case '\r': ch = fgetc(fp); if (ch != '\n') { ungetc(ch, fp); } /* FALLTHRU */ case '\0': case '\n': case EOF: s[i] = '\0'; /* nstraddchar() is not terminate string */ *buf = s; return 0; default: s = nstraddchar(s, i, ch); i++; if (s == NULL) { *buf = NULL; return -1; } } #endif ch = fgetc(fp); } } int fgetnline(FILE *fp, char *buf, int len) { /* rcode: 0 noerror -1 fatal error 1 EOF */ int rcode; char *ptr; buf[0] = '\0'; rcode = fgetline(fp, &ptr); if (rcode) return rcode; strncpy(buf, ptr, len); buf[len - 1] = '\0'; g_free(ptr); return 0; } int nfgetc(FILE *fp) { int ch; do { ch=fgetc(fp); } while (ch=='\r'); return ch; } FILE * nfopen(const char *filename, const char *mode) { FILE *fp; char *tmp; if (filename == NULL) return NULL; tmp = get_localized_filename(filename); if (tmp == NULL) { return NULL; } fp = g_fopen(tmp, mode); g_free(tmp); return fp; } int nisatty(int fd) { return isatty(fd); } int nstat(const gchar *filename, GStatBuf *buf) { int r; char *tmp; if (filename == NULL || buf == NULL) return -1; tmp = get_localized_filename(filename); if (tmp == NULL) { return -1; } r = g_stat(tmp, buf); g_free(tmp); return r; } int naccess(const gchar *filename, int mode) { int r; char *tmp; if (filename == NULL) return -1; tmp = get_localized_filename(filename); if (tmp == NULL) { return -1; } r = g_access(tmp, mode); g_free(tmp); return r; } int nchdir(const gchar *path) { int r; char *tmp; if (path == NULL) return -1; tmp = get_localized_filename(path); if (tmp == NULL) { return -1; } r = g_chdir(tmp); g_free(tmp); return r; } int nopen(const char *path,int access,int mode) { int r; char *tmp; if (path == NULL) return -1; tmp = get_localized_filename(path); if (tmp == NULL) { return -1; } r = g_open(tmp, access, mode | O_BINARY); g_free(tmp); return r; } void nclose(int fd) { close(fd); } void nlseek(int fd,long offset,int fromwhere) { lseek(fd,offset,fromwhere); } int nread(int fd,char *buf,unsigned len) { return read(fd,buf,len); } int nwrite(int fd,char *buf,unsigned len) { return write(fd,buf,len); } int nredirect(int fd,int newfd) { int savefd; savefd=dup(fd); dup2(newfd,fd); close(newfd); return savefd; } void nredirect2(int fd,int savefd) { dup2(savefd,fd); close(savefd); } int stdinfd(void) { return 0; } int stdoutfd(void) { return 1; } int stderrfd(void) { return 2; } void set_progress_func(void (* func)(int, const char *, double)) { ShowProgressFunc = func; } void set_progress(int pos, char *msg, double fraction) { if (ShowProgressFunc) ShowProgressFunc(pos, msg, fraction); } int n_mkstemp(const char *dir, char *templ, char **name) { char postfix[] = "XXXXXX", *buf, *path; int len, fd, path_last; #ifdef S_IRWXG mode_t mask_prev; #endif dir = (dir) ? dir : g_get_tmp_dir(); path = g_strdup(dir); if (path == NULL) { return -1; } len = strlen(path); if (len > 1) { path_last = path[len - 1]; } else { path_last = '\0'; } changefilename(path); buf = g_strdup_printf("%s%s%s%s", path, (path_last == '/') ? "" : "/", CHK_STR(templ), postfix); g_free(path); #ifdef S_IRWXG mask_prev = umask(S_IRWXG | S_IRWXO); #endif fd = g_mkstemp(buf); #ifdef S_IRWXG umask(mask_prev); #endif if (fd < 0) { g_free(buf); buf = NULL; } *name = buf; return fd; } FILE * n_tmpfile(char **name) { int fd; FILE *fp; fd = n_mkstemp(NULL, "ntmp", name); if (fd < 0) { return NULL; } #if ! WINDOWS if (*name) { g_unlink(*name); } #endif fp = fdopen(fd, "w+b"); if (fp == NULL) { close(fd); if (*name) { #if WINDOWS g_unlink(*name); #endif g_free(*name); *name = NULL; } } return fp; } void n_tmpfile_close(FILE *fp, char *name) { if (fp){ fclose(fp); } if (name) { #if WINDOWS g_unlink(name); #endif g_free(name); } } ngraph-gtk-6.09.05/src/nhash.c0000644000175000017500000001663313624701076012731 00000000000000/* * $Id: nhash.c,v 1.16 2009-11-16 12:59:18 hito Exp $ */ #include #include #include #include #include "object.h" #include "nhash.h" #define HASH_SIZE 251 NHASH nhash_new(void) { struct nhash **hash; hash = g_malloc0(HASH_SIZE * sizeof(struct nhash *)); return hash; } static void free_hash_list(struct nhash *hash, int free_ptr) { struct nhash *l, *r; if (hash == NULL) return; l = hash->l; r = hash->r; g_free(hash->key); if (free_ptr) { g_free(hash->val.p); } g_free(hash); free_hash_list(l, free_ptr); free_hash_list(r, free_ptr); } void nhash_free(NHASH hash) { int i; for (i = 0; i < HASH_SIZE; i++) { free_hash_list(hash[i], FALSE); } g_free(hash); } void nhash_free_with_memfree_ptr(NHASH hash) { int i; for (i = 0; i < HASH_SIZE; i++) { free_hash_list(hash[i], TRUE); } g_free(hash); } void nhash_clear(NHASH hash) { int i; for (i = 0; i < HASH_SIZE; i++) { free_hash_list(hash[i], FALSE); } memset(hash, 0, HASH_SIZE * sizeof(struct nhash *)); } int nhash_hkey(const char *ptr) { unsigned int i, v; for (v = i = 0; ptr[i]; i++) { v += ptr[i]; } return v % HASH_SIZE; } static struct nhash * create_hash_with_hkey(NHASH hash, const char *key, int hkey) { int lr = 0; char *k; struct nhash *h, *ptr, *prev = NULL; if (key == NULL) return NULL; ptr = hash[hkey]; if (ptr == NULL) { h = g_malloc(sizeof(struct nhash)); if (h == NULL) return NULL; hash[hkey] = h; } else { while (ptr) { lr = strcmp(key, ptr->key); if (lr == 0) { return ptr; } else if (lr < 0) { prev = ptr; ptr = ptr->l; } else { prev = ptr; ptr = ptr->r; } } h = g_malloc(sizeof(struct nhash)); if (h == NULL) { return NULL; } } k = g_strdup(key); if (k == NULL) { g_free(h); return NULL; } if (prev) { if (lr < 0) { prev->l = h; } else { prev->r = h; } } h->key = k; h->l = NULL; h->r = NULL; h->p = prev; return h; } struct nhash * create_hash(NHASH hash, const char *key) { int hkey; if (key == NULL) return NULL; hkey = nhash_hkey(key); return create_hash_with_hkey(hash, key, hkey); } int nhash_set_int(NHASH hash, const char *key, int val) { struct nhash *h; h = create_hash(hash, key); if (h == NULL) return 1; h->val.i = val; return 0; } int nhash_set_ptr(NHASH hash, const char *key, void *val) { struct nhash *h; h = create_hash(hash, key); if (h == NULL) return 1; h->val.p = val; return 0; } int nhash_set_int_with_hkey(NHASH hash, const char *key, int hkey, int val) { struct nhash *h; h = create_hash_with_hkey(hash, key, hkey); if (h == NULL) return 1; h->val.i = val; return 0; } int nhash_set_ptr_with_hkey(NHASH hash, const char *key, int hkey, void *val) { struct nhash *h; h = create_hash_with_hkey(hash, key, hkey); if (h == NULL) return 1; h->val.p = val; return 0; } static struct nhash * nhash_get(NHASH hash, const char *key) { struct nhash *ptr; int hk; if (key == NULL) return NULL; hk = nhash_hkey(key); ptr = hash[hk]; while (ptr) { int r; r = strcmp(key, ptr->key); if (r < 0) { ptr = ptr->l; } else if (r > 0) { ptr = ptr->r; } else { return ptr; } } return NULL; } static struct nhash * nhash_get_with_hkey(NHASH hash, const char *key, int hk) { struct nhash *ptr; if (key == NULL) return NULL; ptr = hash[hk]; while (ptr) { int r; r = strcmp(key, ptr->key); if (r < 0) { ptr = ptr->l; } else if (r > 0) { ptr = ptr->r; } else { return ptr; } } return NULL; } int nhash_get_int(NHASH hash, const char *key, int *val) { struct nhash *h; h = nhash_get(hash, key); if (h == NULL) return 1; *val = h->val.i; return 0; } int nhash_get_int_with_hkey(NHASH hash, const char *key, int hkey, int *val) { struct nhash *h; h = nhash_get_with_hkey(hash, key, hkey); if (h == NULL) return 1; *val = h->val.i; return 0; } static void btree_cat(struct nhash *dest, struct nhash *src) { struct nhash *h; h = dest; while (1) { int r; r = strcmp(h->key, src->key); if (r < 0) { if (h->l == NULL) { h->l = src; break; } h = h->l; } else if (r > 0) { if (h->r == NULL) { h->r = src; break; } h = h->r; } else { /* never reached */ break; } } src->p = h; } static void nhash_del_sub(NHASH hash, struct nhash *h, int hkey) { struct nhash *p; p = h->p; if (p == NULL) { if (h->l && h->r) { btree_cat(h->r, h->l); hash[hkey] = h->r; h->r->p = NULL; } else if (h->l) { hash[hkey] = h->l; h->l->p = NULL; } else if (h->r) { hash[hkey] = h->r; h->r->p = NULL; } else { hash[hkey] = NULL; } } else { if (h->l && h->r) { btree_cat(h->r, h->l); if (p->l == h) { p->l = h->r; } else { p->r = h->r; } h->r->p = p; } else if (h->l) { if (p->l == h) { p->l = h->l; } else { p->r = h->l; } h->l->p = p; } else if (h->r) { if (p->l == h) { p->l = h->r; } else { p->r = h->r; } h->r->p = p; } else { if (p->l == h) { p->l = NULL; } else { p->r = NULL; } } } g_free(h->key); g_free(h); } void nhash_del_with_hkey(NHASH hash, const char *key, int hkey) { struct nhash *h; h = nhash_get_with_hkey(hash, key, hkey); if (h) nhash_del_sub(hash, h, hkey); } void nhash_del(NHASH hash, const char *key) { struct nhash *h; int hkey; hkey = nhash_hkey(key); h = nhash_get_with_hkey(hash, key, hkey); if (h) nhash_del_sub(hash, h, hkey); } static int hash_each_sub(struct nhash *h, int(* func)(struct nhash *, void *), void *data) { int r; if (h == NULL) return 0; if (h->l) { r = hash_each_sub(h->l, func, data); if (r) { return r; } } if (h->r) { r = hash_each_sub(h->r, func, data); if (r) { return r; } } return func(h, data); } int nhash_each(NHASH hash, int(* func)(struct nhash *, void *), void *data) { int i, r; if (func == NULL || hash == NULL) return 0; for (i = 0; i < HASH_SIZE; i++) { if (hash[i]) { r = hash_each_sub(hash[i], func, data); if (r) return r; } } return 0; } int nhash_get_ptr(NHASH hash, const char *key, void **ptr) { struct nhash *h; h = nhash_get(hash, key); if (h == NULL) { *ptr = NULL; return 1; } *ptr = h->val.p; return 0; } int nhash_get_ptr_with_hkey(NHASH hash, const char *key, int hkey, void **ptr) { struct nhash *h; h = nhash_get_with_hkey(hash, key, hkey); if (h == NULL) { *ptr = NULL; return 1; } *ptr = h->val.p; return 0; } static void print_hash(struct nhash *h) { if (h == NULL) return; printf("%s ", h->key); print_hash(h->l); print_hash(h->r); } void nhash_show(NHASH hash) { int i; for (i = 0; i < HASH_SIZE; i++) { printf("%2d: ", i); print_hash(hash[i]); printf("\n"); } } static void count_hash(struct nhash *h, int *n) { if (h == NULL) return; if (h->l) count_hash(h->l, n); if (h->r) count_hash(h->r, n); (*n)++; } int nhash_num(NHASH hash) { int i, n = 0; for (i = 0; i < HASH_SIZE; i++) { if (hash[i]) { count_hash(hash[i], &n); } } return n; } ngraph-gtk-6.09.05/src/ogra.h0000644000175000017500000000037514001231674012551 00000000000000#ifndef OGRA_HEADER #define OGRA_HEADER extern char *gra_decimalsign_char[]; enum GRA_DECIMALSIGN_TYPE { GRA_DECIMALSIGN_TYPE_PERIOD, GRA_DECIMALSIGN_TYPE_COMMA, }; void gra_set_default_decimalsign(enum GRA_DECIMALSIGN_TYPE decimalsign); #endif ngraph-gtk-6.09.05/src/orect.c0000644000175000017500000003376313635336366012757 00000000000000/* * $Id: orect.c,v 1.18 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include "object.h" #include "gra.h" #include "oroot.h" #include "odraw.h" #include "olegend.h" #define NAME "rectangle" #define PARENT "legend" #define OVERSION "1.00.00" static char *recterrorlist[]={ "", }; #define ERRNUM (sizeof(recterrorlist) / sizeof(*recterrorlist)) static int rectinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int width, stroke, alpha; if (_exeparent(obj, (char *)argv[1], inst, rval, argc, argv)) return 1; width = DEFAULT_LINE_WIDTH; stroke = TRUE; alpha = 255; if (_putobj(obj, "width", inst, &width)) return 1; if (_putobj(obj, "stroke", inst, &stroke)) return 1; if (_putobj(obj, "stroke_A", inst, &alpha)) return 1; if (_putobj(obj, "fill_A", inst, &alpha)) return 1; return 0; } static int rectdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int set_position(struct objlist *obj, N_VALUE *inst, int x1, int y1, int x2, int y2) { if (_putobj(obj, "x1", inst, &x1)) return 1; if (_putobj(obj, "y1", inst, &y1)) return 1; if (_putobj(obj, "x2", inst, &x2)) return 1; if (_putobj(obj, "y2", inst, &y2)) return 1; return 0; } static void get_position(struct objlist *obj, N_VALUE *inst, int *x1, int *y1, int *x2, int *y2) { _getobj(obj, "x1", inst, x1); _getobj(obj, "y1", inst, y1); _getobj(obj, "x2", inst, x2); _getobj(obj, "y2", inst, y2); } static int rectdraw(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int GC; int x1,y1,x2,y2,width,ifill,stroke,fr,fg,fb,fa,br,bg,bb,ba,w,h; struct narray *style; int snum,*sdata; int clip,zoom; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"GC",inst,&GC); if (GC<0) return 0; _getobj(obj,"stroke_R",inst,&fr); _getobj(obj,"stroke_G",inst,&fg); _getobj(obj,"stroke_B",inst,&fb); _getobj(obj,"stroke_A",inst,&fa); _getobj(obj,"fill_R",inst,&br); _getobj(obj,"fill_G",inst,&bg); _getobj(obj,"fill_B",inst,&bb); _getobj(obj,"fill_A", inst, &ba); _getobj(obj,"width",inst,&width); _getobj(obj,"style",inst,&style); _getobj(obj,"fill",inst,&ifill); _getobj(obj,"stroke",inst,&stroke); _getobj(obj,"clip",inst,&clip); get_position(obj, inst, &x1, &y1, &x2, &y2); snum=arraynum(style); sdata=arraydata(style); GRAregion(GC,&w,&h,&zoom); GRAview(GC,0,0,w*10000.0/zoom,h*10000.0/zoom,clip); if (ifill) { GRAcolor(GC,br,bg,bb, ba); GRArectangle(GC,x1,y1,x2,y2,1); } if (stroke) { GRAcolor(GC,fr,fg,fb, fa); GRAlinestyle(GC,snum,sdata,width,GRA_LINE_CAP_BUTT,GRA_LINE_JOIN_MITER,1000); GRArectangle(GC,x1,y1,x2,y2,0); } return 0; } static int rectbbox(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int minx,miny,maxx,maxy; int x1,y1,x2,y2,width,fill,stroke; struct narray *array; array=rval->array; if (arraynum(array)!=0) return 0; get_position(obj, inst, &x1, &y1, &x2, &y2); _getobj(obj,"width",inst,&width); _getobj(obj,"fill",inst,&fill); _getobj(obj,"stroke",inst,&stroke); if (! fill && ! stroke) { return 0; } if ((array==NULL) && ((array=arraynew(sizeof(int)))==NULL)) return 1; minx=(x1x2) ? x1 : x2; maxy=(y1>y2) ? y1 : y2; if (stroke) { minx-=width/2; miny-=width/2; maxx+=width/2; maxy+=width/2; } arrayins(array,&(maxy),0); arrayins(array,&(maxx),0); arrayins(array,&(miny),0); arrayins(array,&(minx),0); minx=(x1x2) ? x1 : x2; maxy=(y1>y2) ? y1 : y2; arrayadd(array,&(minx)); arrayadd(array,&(miny)); arrayadd(array,&(maxx)); arrayadd(array,&(miny)); arrayadd(array,&(maxx)); arrayadd(array,&(maxy)); arrayadd(array,&(minx)); arrayadd(array,&(maxy)); if (arraynum(array)==0) { arrayfree(array); rval->array = NULL; return 1; } rval->array=array; return 0; } static int rectrotate(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int angle, x1, y1, x2, y2, px, py, use_pivot; get_position(obj, inst, &x1, &y1, &x2, &y2); angle = *(int *) argv[2]; angle %= 36000; if (angle < 0) angle += 36000; use_pivot = * (int *) argv[3]; if (use_pivot) { px = *(int *) argv[4]; py = *(int *) argv[5]; } else { px = (x1 + x2) / 2; py = (y1 + y2) / 2; } switch (angle) { case 9000: case 18000: case 27000: rotate(px, py, angle, &x1, &y1); rotate(px, py, angle, &x2, &y2); if (set_position(obj, inst, x1, y1, x2, y2)) return 1; break; default: return 1; } if (clear_bbox(obj, inst)) return 1; return 0; } static int rectflip(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x1, y1, x2, y2, p, use_pivot; enum FLIP_DIRECTION dir; dir = (* (int *) argv[2] == FLIP_DIRECTION_HORIZONTAL) ? FLIP_DIRECTION_HORIZONTAL : FLIP_DIRECTION_VERTICAL; use_pivot = * (int *) argv[3]; if (! use_pivot) return 0; _getobj(obj, "x1", inst, &x1); _getobj(obj, "y1", inst, &y1); _getobj(obj, "x2", inst, &x2); _getobj(obj, "y2", inst, &y2); p = *(int *) argv[4]; flip(p, dir, &x1, &y1); flip(p, dir, &x2, &y2); _putobj(obj, "x1", inst, &x1); _putobj(obj, "y1", inst, &y1); _putobj(obj, "x2", inst, &x2); _putobj(obj, "y2", inst, &y2); if (clear_bbox(obj, inst)) return 1; return 0; } static int rectmove(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x1,y1,x2,y2; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; get_position(obj, inst, &x1, &y1, &x2, &y2); x1+=*(int *)argv[2]; x2+=*(int *)argv[2]; y1+=*(int *)argv[3]; y2+=*(int *)argv[3]; if (set_position(obj, inst, x1, y1, x2, y2)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int rectchange(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int x1,y1,x2,y2; int point,x,y; int *minx,*miny,*maxx,*maxy; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; get_position(obj, inst, &x1, &y1, &x2, &y2); point=*(int *)argv[2]; x=*(int *)argv[3]; y=*(int *)argv[4]; minx=(x1x2) ? &x1 : &x2; maxy=(y1>y2) ? &y1 : &y2; switch (point) { case 0: (*minx)+=x; (*miny)+=y; break; case 1: (*maxx)+=x; (*miny)+=y; break; case 2: (*maxx)+=x; (*maxy)+=y; break; case 3: (*minx)+=x; (*maxy)+=y; break; default: return 1; } if (set_position(obj, inst, x1, y1, x2, y2)) return 1; if (clear_bbox(obj, inst)) return 1; return 0; } static int rectzoom(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int snum,*sdata,refx,refy,x1,y1,x2,y2,width,preserve_width; double zoom_x, zoom_y; struct narray *style; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; zoom_x = (*(int *) argv[2]) / 10000.0; zoom_y = (*(int *) argv[3]) / 10000.0; refx = (*(int *)argv[4]); refy = (*(int *)argv[5]); preserve_width = (*(int *)argv[6]); get_position(obj, inst, &x1, &y1, &x2, &y2); _getobj(obj,"width",inst,&width); _getobj(obj,"style",inst,&style); snum=arraynum(style); sdata=arraydata(style); x1=(x1-refx)*zoom_x+refx; y1=(y1-refy)*zoom_y+refy; x2=(x2-refx)*zoom_x+refx; y2=(y2-refy)*zoom_y+refy; if (! preserve_width) { int i; double zoom; zoom = MIN(zoom_x, zoom_y); width = width * zoom; for (i=0;ii=FALSE; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if (_exeobj(obj,"bbox",inst,0,NULL)) return 1; _getobj(obj,"bbox",inst,&array); _getobj(obj,"fill",inst,&ifill); _getobj(obj,"stroke",inst,&stroke); if (! ifill && ! stroke) { return 0; } if (array==NULL) return 0; minx=*(int *)argv[2]; miny=*(int *)argv[3]; maxx=*(int *)argv[4]; maxy=*(int *)argv[5]; err=*(int *)argv[6]; if (arraynum(array)<4) return 1; bminx=arraynget_int(array,0); bminy=arraynget_int(array,1); bmaxx=arraynget_int(array,2); bmaxy=arraynget_int(array,3); if ((minx==maxx) && (miny==maxy)) { if (ifill) { bminx-=err; bminy-=err; bmaxx+=err; bmaxy+=err; if ((bminx<=minx) && (minx<=bmaxx) && (bminy<=miny) && (miny<=bmaxy)) rval->i=TRUE; } else { if ((((bminx-err<=minx) && (minx<=bminx+err)) || ((bmaxx-err<=minx) && (minx<=bmaxx+err))) && (bminy-err<=miny) && (miny<=bmaxy+err)) rval->i=TRUE; if ((((bminy-err<=miny) && (miny<=bminy+err)) || ((bmaxy-err<=miny) && (miny<=bmaxy+err))) && (bminx-err<=minx) && (minx<=bmaxx+err)) rval->i=TRUE; } } else { if ((minx<=bminx) && (bminx<=maxx) && (minx<=bmaxx) && (bmaxx<=maxx) && (miny<=bminy) && (bminy<=maxy) && (miny<=bmaxy) && (bmaxy<=maxy)) rval->i=TRUE; } return 0; } static int rectgeometry(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (*(int *)(argv[2])<1) *(int *)(argv[2])=1; if (clear_bbox(obj, inst)) return 1; return 0; } static int rect_frame(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { int frame, fill, stroke; frame = * (int *) argv[2]; _getobj(obj, "fill", inst, &fill); stroke = (frame || ! fill); _putobj(obj, "stroke", inst, &stroke); fill = (frame || fill); _putobj(obj, "fill", inst, &fill); return 0; } static int put_color2(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { int fill, frame, col, val, val2, f; _getobj(obj, "fill", inst, &fill); _getobj(obj, "frame", inst, &frame); if (fill == 0 && frame == 0) { return 0; } col = argv[1][0]; val = * (int *) argv[2]; if (val < 0) { val = 0; } else if (val > 255) { val = 255; } if (frame) { f = TRUE; _putobj(obj, "stroke", inst, &f); _putobj(obj, "fill", inst, &f); } else { f = FALSE; _putobj(obj, "stroke", inst, &f); } switch (col) { case 'R': _getobj(obj, "stroke_R", inst, &val2); _putobj(obj, "stroke_R", inst, &val); _putobj(obj, "fill_R", inst, &val2); break; case 'G': _getobj(obj, "stroke_G", inst, &val2); _putobj(obj, "stroke_G", inst, &val); _putobj(obj, "fill_G", inst, &val2); break; case 'B': _getobj(obj, "stroke_B", inst, &val2); _putobj(obj, "stroke_B", inst, &val); _putobj(obj, "fill_B", inst, &val2); break; } return 0; } static struct objtable rect[] = { {"init",NVFUNC,NEXEC,rectinit,NULL,0}, {"done",NVFUNC,NEXEC,rectdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"x1",NINT,NREAD|NWRITE,legendgeometry,NULL,0}, {"y1",NINT,NREAD|NWRITE,legendgeometry,NULL,0}, {"x2",NINT,NREAD|NWRITE,legendgeometry,NULL,0}, {"y2",NINT,NREAD|NWRITE,legendgeometry,NULL,0}, {"stroke_R",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_G",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_B",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"stroke_A",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_R",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_G",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_B",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill_A",NINT,NREAD|NWRITE,oputcolor,NULL,0}, {"fill",NBOOL,NREAD|NWRITE,legendgeometry,NULL,0}, {"stroke",NBOOL,NREAD|NWRITE,legendgeometry,NULL,0}, {"width",NINT,NREAD|NWRITE,rectgeometry,NULL,0}, {"style",NIARRAY,NREAD|NWRITE,oputstyle,NULL,0}, {"draw",NVFUNC,NREAD|NEXEC,rectdraw,"i",0}, {"bbox",NIAFUNC,NREAD|NEXEC,rectbbox,"",0}, {"move",NVFUNC,NREAD|NEXEC,rectmove,"ii",0}, {"rotate",NVFUNC,NREAD|NEXEC,rectrotate,"iiii",0}, {"flip",NVFUNC,NREAD|NEXEC,rectflip,"iii",0}, {"change",NVFUNC,NREAD|NEXEC,rectchange,"iii",0}, {"zooming",NVFUNC,NREAD|NEXEC,rectzoom,"iiiii",0}, {"match",NBFUNC,NREAD|NEXEC,rectmatch,"iiiii",0}, {"fill_hsb", NVFUNC, NREAD|NEXEC, put_fill_hsb,"ddd",0}, {"stroke_hsb", NVFUNC, NREAD|NEXEC, put_stroke_hsb,"ddd",0}, /* following fields exist for backward compatibility */ {"frame",NBOOL,NWRITE,rect_frame,NULL,0}, {"R",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"G",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"B",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"A",NINT,NWRITE,put_color_for_backward_compatibility,NULL,0}, {"R2",NINT,NWRITE,put_color2,NULL,0}, {"G2",NINT,NWRITE,put_color2,NULL,0}, {"B2",NINT,NWRITE,put_color2,NULL,0}, }; #define TBLNUM (sizeof(rect) / sizeof(*rect)) void * addrectangle(void) /* addrectangle() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,rect,ERRNUM,recterrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/oroot.c0000644000175000017500000002375714142161773012777 00000000000000/* * $Id: oroot.c,v 1.11 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include "object.h" #include "nstring.h" #include "oroot.h" #include "nconfig.h" #define NAME "object" #define PARENT NULL #define OVERSION "1.00.00" #define ERRILNAME 100 static char *rooterrorlist[]={ "illegal instance name", }; #define ERRNUM (sizeof(rooterrorlist) / sizeof(*rooterrorlist)) int obj_load_config(struct objlist *obj, N_VALUE *inst, char *title, NHASH hash) { FILE *fp; char *tok,*str,*s2; char *f1,*f2; int val; char *endptr; int len; struct obj_config *cfg; struct narray *iarray; fp = openconfig(title); if (fp == NULL) return 0; while ((tok = getconfig(fp, &str))) { s2 = str; if (nhash_get_ptr(hash, tok, (void *) &cfg) == 0) { switch (cfg->type) { case OBJ_CONFIG_TYPE_NUMERIC: f1 = getitok2(&s2, &len, " \t,"); if (f1) { val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') { _putobj(obj, cfg->name, inst, &val); } g_free(f1); } break; case OBJ_CONFIG_TYPE_STRING: f1 = getitok2(&s2, &len, ""); _getobj(obj, cfg->name, inst, &f2); g_free(f2); _putobj(obj, cfg->name, inst, f1); break; case OBJ_CONFIG_TYPE_STYLE: iarray = arraynew(sizeof(int)); if (iarray) { while ((f1 = getitok2(&s2, &len, " \t,")) != NULL) { val = strtol(f1, &endptr, 10); if (endptr[0] == '\0') arrayadd(iarray, &val); g_free(f1); } _putobj(obj, tok, inst, iarray); } break; case OBJ_CONFIG_TYPE_OTHER: if (cfg->load_proc) { cfg->load_proc(obj, inst, cfg->name, s2); } break; } } else { fprintf(stderr, "configuration '%s' in section %s is not used.\n", tok, title); } g_free(tok); g_free(str); } closeconfig(fp); return 0; } static void obj_save_config_numeric(struct objlist *obj, N_VALUE *inst, char *field, struct narray *conf) { char *str; int val; _getobj(obj, field, inst, &val); str = g_strdup_printf("%s=%d", field, val); if (str) { arrayadd(conf, &str); } } void obj_save_config_string(struct objlist *obj, N_VALUE *inst, char *field, struct narray *conf) { char *buf, *val; _getobj(obj, field, inst, &val); buf = g_strdup_printf("%s=%s", field, CHK_STR(val)); if (buf) { arrayadd(conf, &buf); } } static void obj_save_config_line_style(struct objlist *obj, N_VALUE *inst, char *field, struct narray *conf) { char *buf; int i, j, num; struct narray *iarray; _getobj(obj, field, inst, &iarray); num = arraynum(iarray); buf = g_malloc(strlen(field) + 2 + 20 * num); if (buf == NULL) return; j = 0; j += sprintf(buf, "%s=", field); for (i = 0; i < num; i++) { j += sprintf(buf + j, "%d%s", arraynget_int(iarray, i), (i == num - 1) ? "" : " "); } arrayadd(conf, &buf); } int obj_save_config(struct objlist *obj, N_VALUE *inst, char *title, struct obj_config *config, unsigned int n) { struct narray conf; unsigned int i; arrayinit(&conf, sizeof(char *)); for (i = 0; i < n; i++) { switch (config[i].type) { case OBJ_CONFIG_TYPE_NUMERIC: obj_save_config_numeric(obj, inst, config[i].name, &conf); break; case OBJ_CONFIG_TYPE_STRING: obj_save_config_string(obj, inst, config[i].name, &conf); break; case OBJ_CONFIG_TYPE_STYLE: obj_save_config_line_style(obj, inst, config[i].name, &conf); break; case OBJ_CONFIG_TYPE_OTHER: if (config[i].save_proc) { config[i].save_proc(obj, inst, config[i].name, &conf); } break; } } replaceconfig(title, &conf); arraydel2(&conf); return 0; } static int oinit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int odone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; return 0; } static int oputname(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *arg; int i; if (argc<3) return 0; arg=argv[2]; if (arg==NULL) return 0; if (!isalpha(arg[0]) && (arg[0]!='_')) { error2(obj,ERRILNAME,arg); return 1; } for (i=1;arg[i]!='\0';i++) if (!isalnum(arg[i]) && (strchr("_",arg[i])==NULL)) { error2(obj,ERRILNAME,arg); return 1; } return 0; } int oputabs(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (*(int *)(argv[2])<0) *(int *)argv[2]=0; return 0; } int oputge1(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (*(int *)(argv[2])<1) *(int *)(argv[2])=1; return 0; } int oputangle(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (*(int *)(argv[2])<0) *(int *)(argv[2])=0; else if (*(int *)(argv[2])>36000) *(int *)(argv[2])=36000; return 0; } int oputcolor(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { if (*(int *) (argv[2]) < 0) *(int *)(argv[2]) = 0; else if (*(int *)(argv[2]) > 255) *(int *)(argv[2]) = 255; return 0; } int oputmarktype(struct objlist *obj,N_VALUE *inst,N_VALUE *rval, int argc,char **argv) { int type; type = * (int *) (argv[2]); if (type < 0 || type >= MARK_TYPE_NUM) { * (int *) (argv[2]) = 0; } return 0; } int oputstyle(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct narray *array; int i, num, *adata; array = (struct narray *) argv[2]; num = arraynum(array); adata = arraydata(array); if (num == 1) { array = arrayadd(array, adata); if (array == NULL) { return 1; } num++; } for (i = 0; i < num; i++) { adata[i] = abs(adata[i]); } return 0; } #ifdef COMPILE_UNUSED_FUNCTIONS static void ochgobjlist(char **olist) { char *list,*objname,*field; char *ids,*ids2; int id,len; struct objlist *obj; char *endptr; N_VALUE *inst; list=*olist; objname=getitok2(&list,&len,":"); ids=getitok2(&list,&len,":"); field=list; if ((objname==NULL) || (ids==NULL)) { g_free(objname); g_free(ids); g_free(*olist); *olist=NULL; return; } obj=chkobject(objname); g_free(objname); if (ids[0]!='^') { g_free(ids); return; } ids2=ids+1; id=strtol(ids2,&endptr,0); if ((ids2[0]=='\0') || (endptr[0]!='\0')) { g_free(ids); g_free(*olist); *olist=NULL; return; } g_free(ids); if ((inst=getobjinstoid(obj,id))==NULL) { g_free(*olist); *olist=NULL; return; } _getobj(obj,"id",inst,&id); g_free(*olist); *olist=mkobjlist(obj,NULL,id,field,FALSE); return; } #endif /* COMPILE_UNUSED_FUNCTIONS */ static int osave(struct objlist *obj, N_VALUE *inst, N_VALUE *rval, int argc, char **argv) { struct objlist *obj2; char *field, *name, *valstr; char buf[8], *list; int i, j, perm; struct narray *array; int anum; char **adata; GString *s; g_free(rval->str); rval->str = NULL; array = (struct narray *) argv[2]; anum = arraynum(array); adata = arraydata(array); obj2 = getobject(argv[0]); if (obj2 == NULL) { return 1; } if (_getobj(obj2, "name", inst, &name)) { return 1; } s = g_string_sized_new(256); if (s == NULL) { return 1; } g_string_append(s, "new "); g_string_append(s, argv[0]); if (name) { g_string_append(s, " name:"); g_string_append(s, name); } g_string_append_c(s, '\n'); for (i = 0; i < chkobjfieldnum(obj2); i++) { field = chkobjfieldname(obj2, i); for (j = 0; j < anum; j++) { if (strcmp0(field, adata[j]) == 0) { break; } } if (j == anum) { perm = chkobjperm(obj2, field); if ((perm & NREAD) && (perm & NWRITE) && strcmp0(field, "name") != 0) { valstr = NULL; g_string_append_c(s, '\t'); g_string_append(s, argv[0]); g_string_append(s, "::"); g_string_append(s, field); g_string_append_c(s, '='); if (chkobjfieldtype(obj2, field) == NOBJ) { if (_getobj(obj2, field, inst, &list)) { goto errexit; } list = chgobjlist(list); valstr = getvaluestr(obj2, field, &list, FALSE, TRUE); if (valstr == NULL) { goto errexit; } g_free(list); } else { if (_getobj(obj2, field, inst, (void *)buf)) { goto errexit; } valstr = getvaluestr(obj2, field, buf, FALSE, TRUE); if (valstr == NULL) { goto errexit; } } g_string_append(s, valstr); g_string_append_c(s, '\n'); g_free(valstr); } } } rval->str = g_string_free(s, FALSE); return 0; errexit: g_string_free(s, TRUE); g_free(valstr); return 1; } static struct objtable objectroot[] = { {"init",NVFUNC,NEXEC,oinit,NULL,0}, {"done",NVFUNC,NEXEC,odone,NULL,0}, {"id",NINT,NREAD,NULL,NULL,0}, {"oid",NINT,NREAD,NULL,NULL,0}, {"name",NSTR,NREAD|NWRITE,oputname,NULL,0}, {"save",NSFUNC,NREAD|NEXEC,osave,"sa",0}, }; #define TBLNUM (sizeof(objectroot) / sizeof(*objectroot)) void * addobjectroot(void) /* addobjectroot() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,objectroot,ERRNUM,rooterrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/omath.c0000644000175000017500000002142413636116342012731 00000000000000/* * $Id: omath.c,v 1.22 2010-03-04 08:30:16 hito Exp $ * * This file is part of "Ngraph for X11". * * Copyright (C) 2002, Satoshi ISHIZAKA. isizaka@msa.biglobe.ne.jp * * "Ngraph for X11" is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * "Ngraph for X11" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ #include "common.h" #include #include #include #include #include #include "object.h" #include "mathcode.h" #include "mathfn.h" #include "math/math_equation.h" #define NAME "math" #define PARENT "object" #define OVERSION "1.00.00" #define ERRSYNTAX 100 #define ERRILLEGAL 101 #define ERRNEST 102 #define ERRARG 103 #define ERRSMLARG 104 static char *matherrorlist[]={ "syntax error.", "not allowed function.", "sum() or dif(): deep nest.", "illegal argument", "not enough argument." }; #define ERRNUM (sizeof(matherrorlist) / sizeof(*matherrorlist)) struct mlocal { double x; double y; double z; double val; int maxdim; MathEquation *code; int rcode; int idpx; int idpy; int idpz; int idpr; }; static void msettbl(N_VALUE *inst,struct mlocal *mlocal) { inst[mlocal->idpx].d=mlocal->x; inst[mlocal->idpy].d=mlocal->y; inst[mlocal->idpz].d=mlocal->z; inst[mlocal->idpr].i=mlocal->rcode; } static void mlocalclear(struct mlocal *mlocal) { math_equation_clear(mlocal->code); } static int minit(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct mlocal *mlocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; if ((mlocal=g_malloc(sizeof(struct mlocal)))==NULL) goto errexit; if (_putobj(obj,"_local",inst,mlocal)) goto errexit; mlocal->x=0; mlocal->y=0; mlocal->z=0; mlocal->val=0; mlocal->code = math_equation_basic_new(); if (mlocal->code == NULL) goto errexit; if (math_equation_add_parameter(mlocal->code, 0, 1, 2, MATH_EQUATION_PARAMETAR_USE_ID)) { math_equation_free(mlocal->code); goto errexit; } if (math_equation_add_var(mlocal->code, "X") != 0) { math_equation_free(mlocal->code); goto errexit; } if (math_equation_add_var(mlocal->code, "Y") != 1) { math_equation_free(mlocal->code); goto errexit; } if (math_equation_add_var(mlocal->code, "Z") != 2) { math_equation_free(mlocal->code); goto errexit; } math_equation_parse(mlocal->code, "def f(x,y,z){0}"); math_equation_parse(mlocal->code, "def g(x,y,z){0}"); math_equation_parse(mlocal->code, "def h(x,y,z){0}"); mlocal->rcode=MATH_VALUE_NORMAL; mlocalclear(mlocal); if (_putobj(obj,"formula",inst,NULL)) goto errexit; if (_putobj(obj,"f",inst,NULL)) goto errexit; if (_putobj(obj,"g",inst,NULL)) goto errexit; if (_putobj(obj,"h",inst,NULL)) goto errexit; mlocal->idpx=chkobjoffset(obj,"x"); mlocal->idpy=chkobjoffset(obj,"y"); mlocal->idpz=chkobjoffset(obj,"z"); mlocal->idpr=chkobjoffset(obj,"status"); msettbl(inst,mlocal); return 0; errexit: g_free(mlocal); return 1; } static int mdone(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct mlocal *mlocal; if (_exeparent(obj,(char *)argv[1],inst,rval,argc,argv)) return 1; _getobj(obj,"_local",inst,&mlocal); math_equation_free(mlocal->code); return 0; } static char * create_func_def_str(char *name, char *code) { return g_strdup_printf("def %s(x,y,z) {%s;}", name, code); } static void parse_original_formula(struct objlist *obj,N_VALUE *inst, struct mlocal *mlocal) { char *ptr; MathEquationParametar *prm; _getobj(obj, "formula", inst, &ptr); math_equation_parse(mlocal->code, ptr); math_equation_optimize(mlocal->code); prm = math_equation_get_parameter(mlocal->code, 0, NULL); if (prm == NULL) { mlocal->maxdim = 0; } else { mlocal->maxdim = prm->id_max; } } /* # following procedure causes error. new math math::formula="const A:1;A" get math: calc # calc:1.000000000000000e+00 math::formula="const A=1;A" get math: formula # formula:const A:1;A get math: calc # calc:0.000000000000000e+00 */ static int mformula(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *math; struct mlocal *mlocal; int rcode; char *err_msg; MathEquationParametar *prm; math=argv[2]; _getobj(obj,"_local",inst,&mlocal); if (strcmp("formula",argv[1])==0) { if (math) { rcode = math_equation_parse(mlocal->code, math); if (rcode) { err_msg = math_err_get_error_message(mlocal->code, math, rcode); error22(obj, ERRUNKNOWN, argv[1], err_msg); g_free(err_msg); parse_original_formula(obj, inst, mlocal); return 1; } if (math_equation_optimize(mlocal->code)) { parse_original_formula(obj, inst, mlocal); return 1; } prm = math_equation_get_parameter(mlocal->code, 0, NULL); if (prm == NULL) { mlocal->maxdim = 0; } else { mlocal->maxdim = prm->id_max; } } } else { char *ptr; if (math) { ptr = create_func_def_str(argv[1], math); } else { ptr = create_func_def_str(argv[1], "0"); } if (ptr == NULL) { return 1; } rcode = math_equation_parse(mlocal->code, ptr); if (rcode) { err_msg = math_err_get_error_message(mlocal->code, math, rcode); error22(obj, ERRUNKNOWN, argv[1], err_msg); g_free(err_msg); parse_original_formula(obj, inst, mlocal); return 1; } if (math_equation_optimize(mlocal->code)) { parse_original_formula(obj, inst, mlocal); return 1; } g_free(ptr); parse_original_formula(obj, inst, mlocal); } msettbl(inst,mlocal); return 0; } static int mparam(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { char *arg; struct mlocal *mlocal; _getobj(obj, "_local", inst, &mlocal); arg = argv[1]; switch (arg[0]) { case 'x': mlocal->x = arg_to_double(argv, 2); break; case 'y': mlocal->y = arg_to_double(argv, 2); break; case 'z': mlocal->z = arg_to_double(argv, 2); break; } msettbl(inst, mlocal); return 0; } static int mcalc(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct mlocal *mlocal; int i,num; double *adata; struct narray *darray; int maxdim; MathValue val, *data; _getobj(obj,"_local",inst,&mlocal); maxdim=mlocal->maxdim; darray=(struct narray *)argv[2]; num=arraynum(darray); adata=arraydata(darray); if (numx; math_equation_set_var(mlocal->code, 0, &val); val.val = mlocal->y; math_equation_set_var(mlocal->code, 1, &val); val.val = mlocal->z; math_equation_set_var(mlocal->code, 2, &val); math_equation_set_parameter_data(mlocal->code, 0, data); math_equation_calculate(mlocal->code, &val); mlocal->val = val.val; mlocal->rcode = val.type; g_free(data); msettbl(inst,mlocal); rval->d=mlocal->val; return 0; } static int mclear(struct objlist *obj,N_VALUE *inst,N_VALUE *rval,int argc,char **argv) { struct mlocal *mlocal; _getobj(obj,"_local",inst,&mlocal); mlocalclear(mlocal); msettbl(inst,mlocal); return 0; } static struct objtable math_obj[] = { {"init",NVFUNC,NEXEC,minit,NULL,0}, {"done",NVFUNC,NEXEC,mdone,NULL,0}, {"next",NPOINTER,0,NULL,NULL,0}, {"formula",NSTR,NREAD|NWRITE,mformula,NULL,0}, {"f",NSTR,NREAD|NWRITE,mformula,NULL,0}, {"g",NSTR,NREAD|NWRITE,mformula,NULL,0}, {"h",NSTR,NREAD|NWRITE,mformula,NULL,0}, {"x",NDOUBLE,NREAD|NWRITE,mparam,NULL,0}, {"y",NDOUBLE,NREAD|NWRITE,mparam,NULL,0}, {"z",NDOUBLE,NREAD|NWRITE,mparam,NULL,0}, {"status",NENUM,NREAD,NULL,matherrorchar,0}, {"calc",NDFUNC,NREAD|NEXEC,mcalc,"da",0}, {"clear",NVFUNC,NREAD|NEXEC,mclear,"",0}, {"_local",NPOINTER,0,NULL,NULL,0}, }; #define TBLNUM (sizeof(math_obj) / sizeof(*math_obj)) void * addmath(void) /* addmath() returns NULL on error */ { return addobject(NAME,NULL,PARENT,OVERSION,TBLNUM,math_obj,ERRNUM,matherrorlist,NULL,NULL); } ngraph-gtk-6.09.05/src/mathcode.h0000644000175000017500000000037013070106167013403 00000000000000extern char *matherrorchar[]; /* #define MNOERR 0 */ /* #define MERR 1 */ /* #define MNAN 2 */ /* #define MUNDEF 3 */ /* #define MSERR 4 */ /* #define MSCONT 5 */ /* #define MSBREAK 6 */ /* #define MNONUM 7 */ /* #define MEOF 8 */ ngraph-gtk-6.09.05/src/common.h0000644000175000017500000000211013721126765013112 00000000000000#ifndef COMMON_HEADER #define COMMON_HEADER #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_GETTEXT #define DEFAULT_TEXT_DOMAIN PACKAGE #include "gettext.h" #define _(String) gettext(String) #define N_(String) gettext_noop(String) #else /* HAVE_GETTEXT */ #define _(String) (String) #define N_(String) (String) #endif /* HAVE_GETTEXT */ #include #include #ifdef G_OS_WIN32 #define WINDOWS 1 #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #endif #include #else #define WINDOWS 0 #endif #ifdef __APPLE__ #define OSX 1 #else #define OSX 0 #endif #ifdef __WIN64__ #define WINDOWS 1 #include #endif #ifndef CCNAME #define CCNAME "unknown"; #endif #ifndef __VERSION__ #define __VERSION__ "" #endif #define COMPILER_NAME (CCNAME " " __VERSION__) #define MARK_TYPE_NUM 90 int printfconsole(const char *fmt,...); int putconsole(const char *s); int printfconsole(const char *fmt,...); void displaydialog(const char *str); void displaystatus(const char *str); #define DOUBLE_STR_FORMAT "%.16g" #endif /* COMMON_HEADER */ ngraph-gtk-6.09.05/plugins/0000755000175000017500000000000014143613316012421 500000000000000ngraph-gtk-6.09.05/plugins/libruby.def0000644000175000017500000000007113070106167014466 00000000000000EXPORTS ngraph_plugin_open_ruby ngraph_plugin_close_ruby ngraph-gtk-6.09.05/plugins/Makefile.in0000644000175000017500000007257114143146775014434 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@am__append_1 = -no-undefined -L`ruby -e 'puts(RbConfig::CONFIG["libdir"])'` -export-symbols $(srcdir)/libruby.def -Wl,$(builddir)/libruby_resource.o @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@am__append_2 = libruby_resource.o @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@am__append_3 = libruby_resource.rc @HAVE_RUBY_DEV_FALSE@libruby_la_DEPENDENCIES = subdir = plugins ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(ngraphplugindir)" LTLIBRARIES = $(ngraphplugin_LTLIBRARIES) am__libruby_la_SOURCES_DIST = ruby.c @HAVE_RUBY_DEV_TRUE@am_libruby_la_OBJECTS = libruby_la-ruby.lo libruby_la_OBJECTS = $(am_libruby_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libruby_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libruby_la_CFLAGS) \ $(CFLAGS) $(libruby_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_RUBY_DEV_TRUE@am_libruby_la_rpath = -rpath $(ngraphplugindir) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libruby_la-ruby.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libruby_la_SOURCES) DIST_SOURCES = $(am__libruby_la_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ SUBDIRS = ruby extra_dist_common = libruby.def libruby_resource.rc.in @HAVE_RUBY_DEV_TRUE@ngraphplugindir = $(pkglibdir)/plugins @HAVE_RUBY_DEV_TRUE@RUBY_INCRUDEDIR = `ruby -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"` @HAVE_RUBY_DEV_TRUE@RUBY_ARCH = `ruby -r rbconfig -e "print RbConfig::CONFIG['rubyarchhdrdir']"` @HAVE_RUBY_DEV_TRUE@built_sources = $(am__append_2) @HAVE_RUBY_DEV_TRUE@clean_files = $(am__append_3) @HAVE_RUBY_DEV_TRUE@ngraphplugin_LTLIBRARIES = libruby.la @HAVE_RUBY_DEV_TRUE@libruby_la_SOURCES = ruby.c @HAVE_RUBY_DEV_TRUE@libruby_la_CFLAGS = -I$(top_srcdir) -I $(RUBY_INCRUDEDIR) -I $(RUBY_ARCH) @HAVE_RUBY_DEV_TRUE@libruby_ldflags = -L$(top_builddir)/src \ @HAVE_RUBY_DEV_TRUE@ -avoid-version -module `ruby -e \ @HAVE_RUBY_DEV_TRUE@ 'puts(RbConfig::CONFIG["LIBRUBYARG_SHARED"])'` \ @HAVE_RUBY_DEV_TRUE@ $(am__append_1) @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@libruby_la_LIBADD = -lngraph @HAVE_RUBY_DEV_TRUE@libruby_la_LDFLAGS = $(libruby_ldflags) @HAVE_RUBY_DEV_FALSE@extra_dist = $(extra_dist_common) ruby.c @HAVE_RUBY_DEV_TRUE@extra_dist = $(extra_dist_common) @HAVE_RUBY_DEV_TRUE@libruby_la_DEPENDENCIES = $(top_builddir)/src/libngraph.la EXTRA_DIST = $(extra_dist) BUILT_SOURCES = $(built_sources) CLEANFILES = $(BUILT_SOURCES) $(clean_files) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj .rc $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-ngraphpluginLTLIBRARIES: $(ngraphplugin_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(ngraphplugin_LTLIBRARIES)'; test -n "$(ngraphplugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(ngraphplugindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ngraphplugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ngraphplugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ngraphplugindir)"; \ } uninstall-ngraphpluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(ngraphplugin_LTLIBRARIES)'; test -n "$(ngraphplugindir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ngraphplugindir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ngraphplugindir)/$$f"; \ done clean-ngraphpluginLTLIBRARIES: -test -z "$(ngraphplugin_LTLIBRARIES)" || rm -f $(ngraphplugin_LTLIBRARIES) @list='$(ngraphplugin_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libruby.la: $(libruby_la_OBJECTS) $(libruby_la_DEPENDENCIES) $(EXTRA_libruby_la_DEPENDENCIES) $(AM_V_CCLD)$(libruby_la_LINK) $(am_libruby_la_rpath) $(libruby_la_OBJECTS) $(libruby_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libruby_la-ruby.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libruby_la-ruby.lo: ruby.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libruby_la_CFLAGS) $(CFLAGS) -MT libruby_la-ruby.lo -MD -MP -MF $(DEPDIR)/libruby_la-ruby.Tpo -c -o libruby_la-ruby.lo `test -f 'ruby.c' || echo '$(srcdir)/'`ruby.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libruby_la-ruby.Tpo $(DEPDIR)/libruby_la-ruby.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ruby.c' object='libruby_la-ruby.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libruby_la_CFLAGS) $(CFLAGS) -c -o libruby_la-ruby.lo `test -f 'ruby.c' || echo '$(srcdir)/'`ruby.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(ngraphplugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-ngraphpluginLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/libruby_la-ruby.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-ngraphpluginLTLIBRARIES install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/libruby_la-ruby.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-ngraphpluginLTLIBRARIES .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic clean-libtool \ clean-ngraphpluginLTLIBRARIES cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-ngraphpluginLTLIBRARIES \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-ngraphpluginLTLIBRARIES .PRECIOUS: Makefile @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@libruby_resource.rc: libruby_resource.rc.in @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@ $(AWK) -f $(top_srcdir)/mingw/winrc_version.awk -v VERSION=$(VERSION) $^ > $@ @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@.rc.o: @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@ $(WINDRES) -o $@ $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/plugins/ruby/0000755000175000017500000000000014143613332013400 500000000000000ngraph-gtk-6.09.05/plugins/ruby/create_objs.rb0000644000175000017500000005554413070106167016143 00000000000000#! /usr/bin/ruby ADD_QUESTION_MARK_TO_BOOL_FIELD = false class Field attr_reader :name, :func, :argc def initialize(name, func, argc) @name = name @func = func @argc = argc end end class EnumItem attr_reader :const, :name, :num def initialize(enum, i) @const = enum.upcase.gsub(".", "_") @num = i @name = enum end end class Enum attr_reader :module, :enum, :max def initialize(name, enum) @module = name.capitalize i = 0; @enum = [] enum.each_with_index {|e, i| @enum.push(EnumItem.new(e, i)) } @max = enum.size - 1 end end class NgraphObj attr_reader :name, :fields attr_accessor :abstruct, :singleton SINGLETON_METHOD = [ ["new", "new", 0], ["[]", "get", 1], ["del", "del", 1], ["each", "each", 0], ["size", "size", 0], ["current", "current", 0], ] SINGLETON_METHOD2 = [ ["move_up", "move_up", 1], ["move_down", "move_down", 1], ["move_top", "move_top", 1], ["move_last", "move_last", 1], ["exchange", "exchange", 2], ["copy", "copy", 2], ] SINGLETON_METHOD3 = [ ["exist?", "exist", 0], ["get_field_args", "field_args", 1], ["get_field_type", "field_type", 1], ["get_field_permission", "field_permission", 1], ["derive", "derive", 1], ] FUNC_FIELD_COMMON = <<-EOF struct ngraph_instance *inst; inst = check_id(self); if (inst == NULL) { return Qnil; } EOF FUNC_FIELD_VAL = " ngraph_returned_value rval;\n" FUNC_FIELD_ARY = <<-EOF ngraph_returned_value rval; VALUE ary; int i; EOF def initialize(name, aliases, cfile, version, parent) @name = name @fields = [] @methods = [] @enum = {} @cfile = cfile @version = version @parent = (parent == "(null)") ? nil : parent @abstruct = false @singleton = false @func = "" @alias = if (aliases) aliases.split(":").map {|s| s.capitalize} else [] end end def put_indented_str(s) @cfile.puts(s.gsub(/^ /, "")) end def add_singleton_method_func(method, func, argc) @cfile.puts("static VALUE") @cfile.print("#{@name}_#{func}(VALUE klass") if (argc > 0) @cfile.print(", ") argc.times { |i| @cfile.print("VALUE arg#{i}") if (i == argc - 1) @cfile.puts(")\n{") else @cfile.print(", ") end } else @cfile.puts(")\n{") end @cfile.print(" return obj_#{func}(klass, ") argc.times { |i| @cfile.print("arg#{i}, ") } @cfile.puts(%Q!"#{@name}");\n}!); end def create_obj unless (@abstruct) put_indented_str(@func) SINGLETON_METHOD.each { |method, func, argc| add_singleton_method_func(method, func, argc) } unless (@singleton) SINGLETON_METHOD2.each { |method, func, argc| add_singleton_method_func(method, func, argc) } end end SINGLETON_METHOD3.each { |method, func, argc| add_singleton_method_func(method, func, argc) } @enum.each { |key, val| put_indented_str <<-EOF static VALUE #{@name}_get_#{val.module}(VALUE klass, VALUE arg) { int i; i = VAL2INT(arg); switch (i) { EOF val.enum.each { |enum| @cfile.puts(" case #{enum.num}:") @cfile.puts(%Q! return rb_str_new2("#{enum.name}");!) } put_indented_str <<-EOF } return Qnil; } EOF } put_indented_str <<-EOF static void create_#{@name}_object(VALUE ngraph_module, VALUE ngraph_class) { VALUE obj; VALUE fields; #{(@enum.size > 0) ? " VALUE module;" : ""} obj = rb_define_class_under(ngraph_module, "#{@name.capitalize}", ngraph_class); EOF @alias.each {|name| @cfile.puts(%Q! rb_define_const(ngraph_module, "#{name}", obj);!) } unless (@abstruct) SINGLETON_METHOD.each { |method, func, argc| @cfile.puts(%Q! rb_define_singleton_method(obj, "#{method}", #{@name}_#{func}, #{argc});!) } unless (@singleton) SINGLETON_METHOD2.each { |method, func, argc| @cfile.puts(%Q! rb_define_singleton_method(obj, "#{method}", #{@name}_#{func}, #{argc});!) } end end SINGLETON_METHOD3.each { |method, func, argc| @cfile.puts(%Q! rb_define_singleton_method(obj, "#{method}", #{@name}_#{func}, #{argc});!) } @cfile.puts(" setup_obj_common(obj);") unless (@abstruct) put_indented_str <<-EOF add_obj_const(obj, "#{@name}"); fields = rb_ary_new2(#{@fields.size}); rb_define_const(obj, "FIELDS", fields); EOF @fields.each_with_index { |field, i| @cfile.puts(%Q! store_field_names(fields, "#{field}");!) } @cfile.puts(" OBJ_FREEZE(fields);") unless (@abstruct) @methods.each { |field| @cfile.puts(%Q! rb_define_method(obj, "#{field.name}", #{field.func}, #{field.argc});!) } end @enum.each { |key, val| @cfile.puts(%Q! module = rb_define_module_under(obj, "#{val.module}");!) @cfile.puts(%Q! rb_extend_object(module, rb_mEnumerable);!) @cfile.puts(%Q! rb_define_singleton_method(module, "[]", #{@name}_get_#{val.module}, 1);!) val.enum.each { |enum| @cfile.puts(%Q! rb_define_const(module, "#{enum.const}", INT2FIX(#{enum.num}));!) } } @cfile.puts("}") end def create_rw_field_func(func, rw, type, field) if (rw == "put") parm = ", VALUE arg" arg = ", arg" else arg = "" parm = "" end @func += <<-EOF static VALUE #{func}(VALUE self#{parm}) { return inst_#{rw}_#{type}(self#{arg}, "#{field}"); } EOF end def create_put_obj_func(func, field) create_rw_field_func(func, "put", "obj", field) end def create_get_obj_func(func, field) create_rw_field_func(func, "get", "obj", field) end def create_put_str_func(func, field) create_rw_field_func(func, "put", "str", field) end def create_get_str_func(func, field) create_rw_field_func(func, "get", "str", field) end def create_put_int_func(func, field) create_rw_field_func(func, "put", "int", field) end def create_get_int_func(func, field) create_rw_field_func(func, "get", "int", field) end def create_put_double_func(func, field) create_rw_field_func(func, "put", "double", field) end def create_get_double_func(func, field) create_rw_field_func(func, "get", "double", field) end def create_put_bool_func(func, field) create_rw_field_func(func, "put", "bool", field) end def create_get_bool_func(func, field) create_rw_field_func(func, "get", "bool", field) end def create_put_enum_func(func, field, enum) @func += <<-EOF static VALUE #{func}(VALUE self, VALUE arg) { return inst_put_enum(self, arg, "#{field}", #{enum.max}); } EOF end def add_enum(field, ary) return @enum[field] if (@enum[field]) enum = Enum.new(field, ary) @enum[field] = enum enum end def create_get_enum_func(func, field) create_rw_field_func(func, "get", "int", field) end def create_put_int_array_func(func, field) create_rw_field_func(func, "put", "iarray", field) end def create_get_int_array_func(func, field) create_rw_field_func(func, "get", "iarray", field) end def create_put_double_array_func(func, field) create_rw_field_func(func, "put", "darray", field) end def create_get_double_array_func(func, field) create_rw_field_func(func, "get", "darray", field) end def create_put_str_array_func(func, field) create_rw_field_func(func, "put", "sarray", field) end def create_get_str_array_func(func, field) create_rw_field_func(func, "get", "sarray", field) end def field2method(field) method = field.gsub("-", "_").gsub("%", "prm") method = "value" if (method == "@") method.downcase end def add_put_method(ary) field = ary[1] type = ary[2] method = field2method(field) func = "#{@name}_field_put_#{method}" case type when "bool" create_put_bool_func(func, field) when "int" create_put_int_func(func, field) when "double" create_put_double_func(func, field) when "obj" create_put_obj_func(func, field) when "char*" create_put_str_func(func, field) when "enum(" n = ary.size - 4 enum = add_enum(field, ary[3, n]) create_put_enum_func(func, field, enum) when "int[]" create_put_int_array_func(func, field) when "double[]" create_put_double_array_func(func, field) when "char*[]" create_put_str_array_func(func, field) end field = Field.new("#{method}=", func, 1) @methods.push(field) end def add_get_method(ary) field = ary[1] type = ary[2] method = field2method(field) func = "#{@name}_field_get_#{method}" case type when "bool" create_get_bool_func(func, field) method += "?" if (ADD_QUESTION_MARK_TO_BOOL_FIELD) when "int" create_get_int_func(func, field) when "double" create_get_double_func(func, field) when "obj" create_get_obj_func(func, field) when "char*" create_get_str_func(func, field) when "enum(" n = ary.size - 4 add_enum(field, ary[3, n]) create_get_enum_func(func, field) when "int[]" create_get_int_array_func(func, field) when "double[]" create_get_double_array_func(func, field) when "char*[]" create_get_str_array_func(func, field) end field = Field.new("#{method}", func, 0) @methods.push(field) end def create_void_exe_func(func, field) @func += <<-EOF static VALUE #{func}(VALUE self) { return inst_exe_void_func(self, "#{field}"); } EOF end def check_args(ary) n = ary.size - 4 case (n) when 0 [-2, []] when 1 if (ary[3][-1] == "]") [-2, ary[3, n]] elsif (ary[3] == "void") [0, []] else [-1, ary[3, n]] end else [-1, ary[3, n]] end end def create_func_type(func, args) @func += "static VALUE\n#{func}(int argc, VALUE *argv, VALUE self)\n{\n" @func += " VALUE arg[#{args.size}];\n" @func += " VALUE tmpstr;\n" if (args.find {|s| s[-1] == "]"}) @func += " ngraph_arg *carg;\n" end def create_arguments(field, args) array = false @func += (%Q! rb_scan_args(argc, argv, "0#{args.size}", !) args.size.times { |i| @func += ("arg + #{i}") if (i == args.size - 1) @func += (");\n") else @func += (", ") end } @func += (" carg = alloca(sizeof(*carg) + sizeof(ngraph_value) * #{args.size});\n") @func += (%Q! if (carg == NULL) {\n rb_raise(rb_eSysStackError, "%s: cannot allocate enough memory.", rb_obj_classname(self));\n }\n!) @func += (" carg->num = #{args.size};\n") args.each_with_index { |arg, i| case arg when "int" @func += (" carg->ary[#{i}].i = VAL2INT(arg[#{i}]);\n") when "double" @func += (" carg->ary[#{i}].d = VAL2DBL(arg[#{i}]);\n") when "char*" @func += (" carg->ary[#{i}].str = VAL2STR(arg[#{i}]);\n") when "bool" @func += (" carg->ary[#{i}].i = RTEST(arg[#{i}]) ? 1 : 0;\n") when "int[]" @func += (%Q! carg->ary[#{i}].ary = allocate_iarray(self, &tmpstr, arg[#{i}], "#{field}");\n!) array = true when "double[]" @func += (%Q! carg->ary[#{i}].ary = allocate_darray(self, &tmpstr, arg[#{i}], "#{field}");\n!) array = true when "char*[]" @func += (%Q! carg->ary[#{i}].ary = allocate_sarray(self, &tmpstr, arg[#{i}], "#{field}");\n!) array = true end } array end def create_finalize_arguments(args) args.each_with_index { |arg, i| case arg when "int[]", "double[]", "char*[]" @func += (" if (carg->ary[#{i}].ary) {\n rb_free_tmp_buffer(&tmpstr);\n }\n") end } end def add_arg_array(arg, field) unless (arg) @func += %Q! carg = allocate_sarray(self, &tmpstr, argv, "#{field}");\n! return end case (arg) when "int[]" @func += %Q! carg.ary[0].ary = allocate_iarray(self, &tmpstr, argv, "#{field}");\n! when "double[]" @func += %Q! carg.ary[0].ary = allocate_darray(self, &tmpstr, argv, "#{field}");\n! when "char*[]" @func += %Q! carg.ary[0].ary = allocate_sarray(self, &tmpstr, argv, "#{field}");\n! else @func += %Q! carg.ary[0].ary = allocate_sarray(self, &tmpstr, argv, "#{field}");\n! end @func += " carg.num = 1;\n" end def create_val_func_with_argv(func, field, args, comv) varg = (args.size == 0) @func += ("static VALUE\n#{func}(VALUE self, VALUE argv)\n{\n") @func += (" VALUE tmpstr;\n") @func += (FUNC_FIELD_VAL) @func += " ngraph_arg #{(varg) ? '*' : ''}carg;\n" @func += (FUNC_FIELD_COMMON) add_arg_array(args[0], field) @func += <<-EOF inst->rcode = ngraph_object_get(inst->obj, "#{field}", inst->id, #{varg ? '' : '&'}carg, &rval); rb_free_tmp_buffer(&tmpstr); if (inst->rcode < 0) { return Qnil; } return #{comv}; } EOF end def create_void_func_with_argv(func, field, args) varg = (args.size == 0) @func += <<-EOF static VALUE #{func}(VALUE self, VALUE argv) { struct ngraph_instance *inst; ngraph_arg #{(varg) ? '*' : ''}carg; VALUE tmpstr; inst = check_id(self); if (inst == NULL) { return Qnil; } EOF add_arg_array(args[0], field) @func += <<-EOF inst->rcode = ngraph_object_exe(inst->obj, "#{field}", inst->id, #{varg ? '' : '&'}carg); rb_free_tmp_buffer(&tmpstr); if (inst->rcode < 0) { return Qnil; } return self; } EOF end def create_array_func_with_argv(func, field, args, comv) varg = (args.size == 0) @func += ("static VALUE\n#{func}(VALUE self, VALUE argv)\n{") @func += (" VALUE tmpstr;\n") @func += (FUNC_FIELD_ARY) @func += " ngraph_arg #{(varg) ? '*' : ''}carg;\n" @func += (FUNC_FIELD_COMMON) add_arg_array(args[0], field) @func += <<-EOF inst->rcode = ngraph_object_get(inst->obj, "#{field}", inst->id, #{varg ? '' : '&'}carg, &rval); rb_free_tmp_buffer(&tmpstr); if (inst->rcode < 0) { return Qnil; } ary = rb_ary_new2(rval.ary.num); for (i = 0; i < rval.ary.num; i++) { rb_ary_store(ary, i, #{comv}); } return ary; } EOF end def create_val_func_with_args(func, field, args, conv) create_func_type(func, args) @func += (FUNC_FIELD_VAL) @func += (FUNC_FIELD_COMMON) array = create_arguments(field, args) @func += (%Q! inst->rcode = ngraph_object_get(inst->obj, "#{field}", inst->id, carg, &rval);\n!) @func += (%Q! rb_free_tmp_buffer(&tmpstr);\n!) if (array) @func += <<-EOF if (inst->rcode < 0) { return Qnil; } return #{conv}; } EOF end def create_void_func_with_args(func, field, args) create_func_type(func, args) @func += (FUNC_FIELD_COMMON) array = create_arguments(field, args) @func += (%Q! inst->rcode = ngraph_object_exe(inst->obj, "#{field}", inst->id, carg);\n!) @func += (%Q! rb_free_tmp_buffer(&tmpstr);\n!) if (array) @func += <<-EOF if (inst->rcode < 0) { return Qnil; } return self; } EOF end def create_array_func_with_args(func, field, args, comv) create_func_type(func, args) @func += (FUNC_FIELD_ARY) @func += (FUNC_FIELD_COMMON) array = create_arguments(field, args) @func += (%Q! inst->rcode = ngraph_object_get(inst->obj, "#{field}", inst->id, carg, &rval);\n!) @func += (%Q! rb_free_tmp_buffer(&tmpstr);\n!) if (array) @func += <<-EOF if (inst->rcode < 0) { return Qnil; } ary = rb_ary_new2(rval.ary.num); for (i = 0; i < rval.ary.num; i++) { rb_ary_store(ary, i, #{comv}); } return ary; } EOF end def create_bool_func_with_args(func, field, args) create_val_func_with_args(func, field, args, 'rval.i ? Qtrue : Qfalse') end def create_int_func_with_args(func, field, args) create_val_func_with_args(func, field, args, 'INT2NUM(rval.i)') end def create_double_func_with_args(func, field, args) create_val_func_with_args(func, field, args, 'rb_float_new(rval.d)') end def create_str_func_with_args(func, field, args) create_val_func_with_args(func, field, args, 'tainted_utf8_str_new(rval.str ? rval.str : "")') end def create_bool_func_with_argv(func, field, args) create_val_func_with_argv(func, field, args, 'rval.i ? Qtrue : Qfalse') end def create_int_func_with_argv(func, field, args) create_val_func_with_argv(func, field, args, 'INT2NUM(rval.i)') end def create_double_func_with_argv(func, field, args) create_val_func_with_argv(func, field, args, 'rb_float_new(rval.d)') end def create_str_func_with_argv(func, field, args) create_val_func_with_argv(func, field, args, 'tainted_utf8_str_new(rval.str ? rval.str : "")') end def add_bool_func(func, field, argc, args) case (argc) when 0 create_get_bool_func(func, field) when -2 create_bool_func_with_argv(func, field, args) else create_bool_func_with_args(func, field, args) end end def add_int_func(func, field, argc, args) case (argc) when 0 create_get_int_func(func, field) when -2 create_int_func_with_argv(func, field, args) else create_int_func_with_args(func, field, args) end end def add_double_func(func, field, argc, args) case (argc) when 0 create_get_double_func(func, field) when -2 create_double_func_with_argv(func, field, args) else create_double_func_with_args(func, field, args) end end def add_str_func(func, field, argc, args) case (argc) when 0 create_get_str_func(func, field) when -2 create_str_func_with_argv(func, field, args) else create_str_func_with_args(func, field, args) end end def add_int_array_func(func, field, argc, args) case (argc) when 0 create_get_int_array_func(func, field) when -2 create_array_func_with_argv(func, field, args, 'INT2NUM(rval.ary.data.ia[i])') else create_array_func_with_args(func, field, args, 'INT2NUM(rval.ary.data.ia[i])') end end def add_double_array_func(func, field, argc, args) case (argc) when 0 create_get_double_array_func(func, field) when -2 create_array_func_with_argv(func, field, args, 'rb_float_new(rval.ary.data.da[i])') else create_array_func_with_args(func, field, args, 'rb_float_new(rval.ary.data.da[i])') end end def add_str_array_func(func, field, argc, args) case (argc) when 0 create_get_str_array_func(func, field) when -2 create_array_func_with_argv(func, field, args, 'tainted_utf8_str_new(rval.ary.data.sa[i] ? rval.ary.data.sa[i] : "")') else create_array_func_with_args(func, field, args, 'tainted_utf8_str_new(rval.ary.data.sa[i] ? rval.ary.data.sa[i] : "")') end end def add_void_func(func, field, argc, args) case (argc) when 0 create_void_exe_func(func, field) when -2 create_void_func_with_argv(func, field, args) else create_void_func_with_args(func, field, args) end end def add_func_obj(type, func, field, args) rtype = case type when "bool(" "NBFUNC" when "int(" "NIFUNC" when "char*(" "NSFUNC" when "int[](" "NIAFUNC" when "double[](" "NDAFUNC" when "char*[](" "NSAFUNC" when "void(" "NVFUNC" else "NVFUNC" end @func += <<-EOF static VALUE #{func}(VALUE self, VALUE argv) { return obj_func_obj(self, argv, "#{field}", #{rtype}); } EOF end def add_func_method(ary) field = ary[1] type = ary[2] method = field2method(field) func = "#{@name}_field_#{method}" argc, args = check_args(ary) if (ary[3] == "obj") argc = -2; add_func_obj(type, func, field, args) else case type when "bool(" add_bool_func(func, field, argc, args) when "int(" add_int_func(func, field, argc, args) when "double(" add_double_func(func, field, argc, args) when "char*(" add_str_func(func, field, argc, args) when "int[](" add_int_array_func(func, field, argc, args) when "double[](" add_double_array_func(func, field, argc, args) when "char*[](" add_str_array_func(func, field, argc, args) when "void(" add_void_func(func, field, argc, args) end end if (ADD_QUESTION_MARK_TO_BOOL_FIELD) method += "?" if (type == "bool(") end field = Field.new("#{method}", func, argc) @methods.push(field) end def add_method(ary) case ary[0] when "-w-" add_put_method(ary) when "r--" add_get_method(ary) when "r-x" add_func_method(ary) when "rw-" add_put_method(ary) add_get_method(ary) end end end def create_obj_funcs(file, cfile, name, aliases, version, parent) obj = NgraphObj.new(name, aliases, cfile, version, parent) singleton = true while (true) ary = file.gets.chomp.split singleton = false if (ary[1] == "next") case ary[0] when "#" break when "---" obj.abstruct = true if (ary[1] == "init") when "--x" # can't execute when "r--" obj.add_method(ary) when "-w-" # obj.add_method(ary) # only used for backword compatibility. when "r-x" obj.add_method(ary) when "rw-" obj.add_method(ary) else next end obj.fields.push(ary[1]) end obj.singleton = singleton obj.create_obj obj end objs = [] File.open(ARGV[1], "w") { |cfile| File.open(ARGV[0], "r") { |file| while (l = file.gets) str_ary = l.chomp.split case (str_ary[0]) when "object:" name = str_ary[1] next when "alias:" aliases = str_ary[1] next when "version:" version = str_ary[1] next when "parent:" parent = str_ary[1] else next end obj = create_obj_funcs(file, cfile, name, aliases, version, parent) objs.push(obj) end } str = <<-EOF static void create_ngraph_classes(VALUE ngraph_module, VALUE ngraph_class) { VALUE objs; objs = rb_ary_new2(#{objs.size}); rb_define_const(ngraph_module, "OBJECTS", objs); EOF cfile.puts(str.gsub(/^ /, "")) objs.each_with_index {|obj, i| cfile.puts(" create_#{obj.name}_object(ngraph_module, ngraph_class);\n") cfile.puts(%Q! rb_ary_store(objs, #{i}, ID2SYM(rb_intern("#{obj.name.capitalize}")));\n!) } cfile.puts(" OBJ_FREEZE(objs);\n") cfile.puts("}") } ngraph-gtk-6.09.05/plugins/ruby/Makefile.in0000644000175000017500000004153014143146775015404 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/ruby ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ EXTRA_DIST = create_objs.rb extconf.rb getobj.nsc ngraph.c lib/ngraph.rb lib/ngraph.rb.win lib/ngraph.rb.osx lib/ngraph/ngp2.rb @HAVE_RUBY_DEV_TRUE@ruby_ext = $(builddir)/ngraph.$(RUBY_DLEXT) @HAVE_RUBY_DEV_TRUE@BUILT_SOURCES = $(ruby_ext) @HAVE_RUBY_DEV_TRUE@CLEANFILES = mkmf.log $(builddir)/obj.txt $(builddir)/ruby_ngraph.h $(ruby_ext) Makefile.ruby ngraph.o .*.time all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/ruby/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/ruby/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @HAVE_RUBY_DEV_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all check install install-am install-exec install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am .PRECIOUS: Makefile @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@$(ruby_ext): ngraph.c $(builddir)/ruby_ngraph.h @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@ mv Makefile Makefile.org @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@ ARCHFLAGS="-arch x86_64" ruby $(srcdir)/extconf.rb $(prefix) --with-ngraph-include=$(top_srcdir)/src --with-ngraph-lib=$(top_builddir)/src/.libs @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@ mv Makefile Makefile.ruby @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@ mv Makefile.org Makefile @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@ $(MAKE) -f Makefile.ruby $(AM_MAKEFLAGS) @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@$(ruby_ext): ngraph.c $(builddir)/ruby_ngraph.h @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@ mv Makefile Makefile.org @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@ ruby $(srcdir)/extconf.rb $(prefix) --with-ngraph-include=$(top_srcdir)/src --with-ngraph-lib=$(top_builddir)/src/.libs @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@ mv Makefile Makefile.ruby @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@ mv Makefile.org Makefile @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@ $(MAKE) -f Makefile.ruby $(AM_MAKEFLAGS) @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@install-data-local: $(ruby_ext) @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@ $(MKDIR_P) $(DESTDIR)$(pkglibdir)/ruby/ngraph @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@ $(INSTALL) $(builddir)/$(ruby_ext) $(DESTDIR)$(pkglibdir)/ruby/$(ruby_ext) @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@ $(INSTALL_DATA) $(srcdir)/lib/ngraph.rb.win $(DESTDIR)$(pkglibdir)/ruby/ngraph.rb @HAVE_RUBY_DEV_TRUE@@OS_WIN32_TRUE@ $(INSTALL_DATA) $(srcdir)/lib/ngraph/ngp2.rb $(DESTDIR)$(pkglibdir)/ruby/ngraph/ngp2.rb @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@@OS_WIN32_FALSE@install-data-local: $(ruby_ext) @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@@OS_WIN32_FALSE@ $(MKDIR_P) $(DESTDIR)$(pkglibdir)/ruby/ngraph @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@@OS_WIN32_FALSE@ $(INSTALL) $(builddir)/$(ruby_ext) $(DESTDIR)$(pkglibdir)/ruby/$(ruby_ext) @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@@OS_WIN32_FALSE@ $(INSTALL_DATA) $(srcdir)/lib/ngraph.rb.osx $(DESTDIR)$(pkglibdir)/ruby/ngraph.rb @HAVE_RUBY_DEV_TRUE@@OS_OSX_TRUE@@OS_WIN32_FALSE@ $(INSTALL_DATA) $(srcdir)/lib/ngraph/ngp2.rb $(DESTDIR)$(pkglibdir)/ruby/ngraph/ngp2.rb @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@@OS_WIN32_FALSE@install-data-local: $(ruby_ext) @HAVE_RUBY_DEV_TRUE@@OS_OSX_FALSE@@OS_WIN32_FALSE@ $(MAKE) -f Makefile.ruby install @HAVE_RUBY_DEV_TRUE@$(builddir)/obj.txt: getobj.nsc $(top_builddir)/src/libngraph.la @HAVE_RUBY_DEV_TRUE@ $(top_builddir)/src/ngraph -i $(srcdir)/getobj.nsc > $(builddir)/obj.txt @HAVE_RUBY_DEV_TRUE@$(builddir)/ruby_ngraph.h: $(builddir)/obj.txt @HAVE_RUBY_DEV_TRUE@ ruby $(srcdir)/create_objs.rb $(builddir)/obj.txt $(builddir)/ruby_ngraph.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/plugins/ruby/lib/0000755000175000017500000000000014143613332014146 500000000000000ngraph-gtk-6.09.05/plugins/ruby/lib/ngraph.rb.win0000644000175000017500000000056713070106167016477 00000000000000# -*- coding: utf-8 -*- rb_path = File.dirname(File.expand_path(__FILE__)) bin_path = File.dirname(File.dirname(rb_path)) + '/bin' win_bin_path = bin_path.gsub("/",'\\\\') ENV['PATH'] += ";#{win_bin_path}" unless (ENV['PATH'].index(win_bin_path)) if (require "#{rb_path}/ngraph.so") Ngraph::ngraph_initialize(bin_path + "/ngraph.exe") end require "#{rb_path}/ngraph/ngp2" ngraph-gtk-6.09.05/plugins/ruby/lib/ngraph.rb.osx0000644000175000017500000000066614001231674016510 00000000000000# -*- coding: utf-8 -*- rb_path = File.dirname(File.expand_path(__FILE__)) if (ENV['NGRAPH_APP_CONTENTS']) bin_path = ENV['NGRAPH_APP_CONTENTS'] + "/MacOS" else bin_path = File.dirname(File.dirname(File.dirname(rb_path))) + "/bin" end ENV['PATH'] += ":#{bin_path}" unless (ENV['PATH'].index(bin_path)) if (require "#{rb_path}/ngraph.bundle") Ngraph::ngraph_initialize(bin_path + "/Ngaph-GTK") end require "#{rb_path}/ngraph/ngp2" ngraph-gtk-6.09.05/plugins/ruby/lib/ngraph.rb0000644000175000017500000000012513070106167015671 00000000000000if (require 'ngraph.so') Ngraph::ngraph_initialize(nil) end require 'ngraph/ngp2' ngraph-gtk-6.09.05/plugins/ruby/lib/ngraph/0000755000175000017500000000000014143613332015425 500000000000000ngraph-gtk-6.09.05/plugins/ruby/lib/ngraph/ngp2.rb0000644000175000017500000000740414117677552016564 00000000000000module Ngraph class Ngp2 NULL_DEVICE = "/dev/null" AUTO_SCALE = 1 AUTO_SCALE_FORCE = 2 attr_accessor :ignore_path, :auto_scale, :chdir, :dpi def initialize @ignore_path = false @auto_scale = nil @chdir = false @dpi = 86 @ngp_name = "" @path_name = "." @menu = Ngraph::Menu[0] || Ngraph::Menu.new @system = Ngraph::System[0] end def clear_viewer [Ngraph::Draw, Ngraph::Fit, Ngraph::Parameter].each {|nobj| nobj.derive(true).each {|obj| obj.del("0-!") } } Ngraph::Gra.del("viewer") end def copy_viewer(gra) viewer = Ngraph::Gra["viewer"][-1] gra.copy(viewer) if (viewer) gra.name = nil end def suppress_fitting_messages Ngraph::Fit.each {|fit| fit.display = false } end def save_image(format, file) gra2cairofile = Ngraph::Gra2cairofile.new gra = Ngraph::Gra.new copy_viewer(gra) gra2cairofile.format = format gra2cairofile.file = file gra2cairofile.dpi = @dpi suppress_fitting_messages gra.device = gra2cairofile gra.open gra.draw gra.close gra.del gra2cairofile.del end def save_gra(file) gra2cairofile = Ngraph::Gra2cairofile.new gra2cairofile.file = NULL_DEVICE dummy = Ngraph::Gra.new dummy.device = gra2cairofile dummy.open gra2file = Ngraph::Gra2file.new gra2file.file = file gra = Ngraph::Gra.new copy_viewer(gra) suppress_fitting_messages gra.device = gra2file gra.open gra.draw gra.close gra.del gra2file.del dummy.close dummy.del gra2cairofile.del end def auto_scale return unless (@auto_scale) files = Ngraph::File.to_a Ngraph::Axis.each {|axis| case @auto_scale when AUTO_SCALE_FORCE axis.clear axis.auto_scale(files) when AUTO_SCALE axis.auto_scale(files) end } Ngraph::Axis.each {|axis| axis.adjust } end def load_ngp(ngp_file) return unless (FileTest.readable?(ngp_file)) clear_viewer @ngp_name = ::File.basename(ngp_file, ".ngp") @path_name = ::File.dirname(ngp_file) @menu.fullpath_ngp = ngp_file if (@menu) Ngraph::Shell.new {|shell| shell.shell(ngp_file) } Ngraph::File.each {|file| file.file = ::File.basename(file) } if (@ignore_path) end def convert(format = Ngraph::Gra2cairofile::Format::EPS3, img_file = nil) pwd = Dir.pwd Dir.chdir(@path_name) if (@chdir) auto_scale rval = nil case format when Ngraph::Gra2cairofile::Format::PS3 save_image(format, img_file || "#{@ngp_name}.ps") when Ngraph::Gra2cairofile::Format::PS2 save_image(format, img_file || "#{@ngp_name}.ps") when Ngraph::Gra2cairofile::Format::EPS3 save_image(format, img_file || "#{@ngp_name}.eps") when Ngraph::Gra2cairofile::Format::EPS2 save_image(format, img_file || "#{@ngp_name}.eps") when Ngraph::Gra2cairofile::Format::PDF save_image(format, img_file || "#{@ngp_name}.pdf") when Ngraph::Gra2cairofile::Format::SVG1_1 save_image(format, img_file || "#{@ngp_name}.svg") when Ngraph::Gra2cairofile::Format::SVG1_2 save_image(format, img_file || "#{@ngp_name}.svg") when Ngraph::Gra2cairofile::Format::PNG save_image(format, img_file || "#{@ngp_name}.png") when "-" tmpfile = @system.temp_file save_gra(tmpfile) rval = IO.readlines(tmpfile) @system.unlink_temp_file(tmpfile) else save_gra(img_file || "#{@ngp_name}.gra") end Dir.chdir(pwd) if (@chdir) rval end end end ngraph-gtk-6.09.05/plugins/ruby/ngraph.c0000644000175000017500000011261113624701076014753 00000000000000#include #include #include #include #ifdef TRUE #undef TRUE #endif #define TRUE 1 #ifdef FALSE #undef FALSE #endif #define FALSE 0 static char *DummyArgv[] = {"ngraph_ruby", NULL}; static char **DummyArgvPtr = DummyArgv; static int DummyArgc = 1, Initialized = FALSE; static VALUE NgraphClass, NgraphModule; static ID Uniq, ExpandPath; #define VAL2INT(val) (NIL_P(val) ? 0 : NUM2INT(val)) #define VAL2DBL(val) (NIL_P(val) ? 0.0 : NUM2DBL(val)) #define VAL2STR(val) (NIL_P(val) ? NULL : StringValueCStr(val)) struct ngraph_instance { int id, oid, rcode; struct objlist *obj; }; struct obj_ids { int *ids, num; struct objlist *obj; }; static VALUE get_ngraph_obj(const char *name); static VALUE str2inst_get_ary(VALUE data1); static VALUE str2inst_ensure(VALUE data2); static VALUE obj_get(VALUE klass, VALUE id_value, const char *name); static VALUE tainted_utf8_str_new(const char *str); static VALUE tainted_utf8_str_new(const char *str) { size_t l; VALUE s; if (str == NULL) { return Qnil; } l = strlen(str); s = rb_enc_str_new(str, l, rb_utf8_encoding()); rb_obj_taint(s); return s; } static VALUE ngraph_inst_method_equal(VALUE klass1, VALUE klass2) { struct ngraph_instance *inst1, *inst2; if (! rb_obj_is_kind_of(klass2, NgraphClass)) { return Qfalse; } Data_Get_Struct(klass1, struct ngraph_instance, inst1); Data_Get_Struct(klass2, struct ngraph_instance, inst2); if (inst1->obj == inst2->obj && inst1->oid == inst2->oid) { return Qtrue; } return Qfalse; } static VALUE ngraph_inst_method_compare(VALUE klass1, VALUE klass2) { struct ngraph_instance *inst1, *inst2; int r; if (! rb_obj_is_kind_of(klass2, NgraphClass)) { return Qnil; } Data_Get_Struct(klass1, struct ngraph_instance, inst1); Data_Get_Struct(klass2, struct ngraph_instance, inst2); if (inst1->obj != inst2->obj) { return Qnil; } if (inst1->oid == inst2->oid) { r = 0; } else if (inst1->oid > inst2->oid) { r = 1; } else { r = -1; } return INT2FIX(r); } static struct ngraph_instance * check_id(VALUE klass) { struct ngraph_instance *inst; int id, last; ngraph_arg arg; ngraph_returned_value oid; Data_Get_Struct(klass, struct ngraph_instance, inst); if (inst->id < 0) { rb_raise(rb_eArgError, "%s: the instance is already deleted.", rb_obj_classname(klass)); } last = ngraph_get_object_last_id(inst->obj); if (inst->id <= last) { int r; arg.num = 0; r = ngraph_object_get(inst->obj, "oid", inst->id, &arg, &oid); if (r >= 0 && inst->oid == oid.i) { return inst; } if (r < 0) { inst->id = -1; rb_raise(rb_eArgError, "%s: the instance is already deleted.", rb_obj_classname(klass)); } } id = ngraph_object_get_id_by_oid(inst->obj, inst->oid); inst->id = id; return inst; } static VALUE ngraph_inst_method_move_up(VALUE klass) { struct ngraph_instance *inst; inst = check_id(klass); if (inst == NULL) { return Qnil; } inst->id = ngraph_object_move_up(inst->obj, inst->id); return klass; } static VALUE ngraph_inst_method_move_down(VALUE klass) { struct ngraph_instance *inst; inst = check_id(klass); if (inst == NULL) { return Qnil; } inst->id = ngraph_object_move_down(inst->obj, inst->id); return klass; } static VALUE ngraph_inst_method_move_top(VALUE klass) { struct ngraph_instance *inst; inst = check_id(klass); if (inst == NULL) { return Qnil; } inst->id = ngraph_object_move_top(inst->obj, inst->id); return klass; } static VALUE ngraph_inst_method_move_last(VALUE klass) { struct ngraph_instance *inst; inst = check_id(klass); if (inst == NULL) { return Qnil; } inst->id = ngraph_object_move_last(inst->obj, inst->id); return klass; } static int check_inst_args(VALUE self, VALUE arg, const char *field, struct ngraph_instance **inst1, struct ngraph_instance **inst2) { *inst1 = check_id(self); if (*inst1 == NULL) { return 1; } if (! rb_obj_is_kind_of(arg, NgraphClass)) { rb_raise(rb_eArgError, "%s#%s: illegal type of the argument (%s).", rb_obj_classname(self), field, rb_obj_classname(arg)); } *inst2 = check_id(arg); if (*inst2 == NULL) { return 1; } if ((*inst1)->obj != (*inst2)->obj) { rb_raise(rb_eArgError, "%s#%s: illegal type of the argument (%s).", rb_obj_classname(self), field, rb_obj_classname(arg)); } return 0; } static VALUE ngraph_inst_method_exchange(VALUE self, VALUE arg) { struct ngraph_instance *inst1, *inst2; int id, r; r = check_inst_args(self, arg, "exchange", &inst1, &inst2); if (r) { return Qnil; } r = ngraph_object_exchange(inst1->obj, inst1->id, inst2->id); if (r < 0) { return Qnil; } id = inst1->id; inst1->id = inst2->id; inst2->id = id; return self; } static VALUE ngraph_inst_method_copy(VALUE self, VALUE arg) { struct ngraph_instance *inst1, *inst2; int r; r = check_inst_args(self, arg, "copy", &inst1, &inst2); if (r) { return Qnil; } r = ngraph_object_copy(inst1->obj, inst1->id, inst2->id); if (r < 0) { return Qnil; } return self; } static VALUE ngraph_inst_method_to_str(VALUE klass) { struct ngraph_instance *inst; const char *name; VALUE rstr; inst = check_id(klass); if (inst == NULL) { return Qnil; } name = ngraph_get_object_name(inst->obj); rstr = rb_sprintf("%s:%d", name, inst->id); return rstr; } static VALUE ngraph_inst_method_rcode(VALUE klass) { struct ngraph_instance *inst; inst = check_id(klass); if (inst == NULL) { return Qnil; } return INT2FIX(inst->rcode); } static VALUE str2inst_get_ary(VALUE data1) { const char *name; int i, n; VALUE ary, obj, klass; struct obj_ids *obj_ids; obj_ids = (struct obj_ids *) data1; name = ngraph_get_object_name(obj_ids->obj); klass = get_ngraph_obj(name); ary = rb_ary_new2(obj_ids->num); n = obj_ids->num; for (i = 0; i < n; i++) { obj = obj_get(klass, INT2FIX(obj_ids->ids[i]), name); rb_ary_push(ary, obj); } return ary; } static VALUE str2inst_ensure(VALUE data2) { int *ids; ids = (int *) data2; ngraph_free(ids); return Qnil; } static VALUE obj_get_from_str(VALUE klass, VALUE arg, const char *name) { const char *str; struct obj_ids obj_ids; VALUE ary, inst; str = StringValueCStr(arg); inst = rb_sprintf("%s:%s", name, str); obj_ids.obj = ngraph_get_object_instances_by_str(StringValueCStr(inst), &obj_ids.num, &obj_ids.ids); if (obj_ids.obj == NULL) { return rb_ary_new(); } ary = rb_ensure(str2inst_get_ary, (VALUE) &obj_ids, str2inst_ensure, (VALUE) obj_ids.ids); return ary; } static VALUE obj_get(VALUE klass, VALUE id_value, const char *name) { struct ngraph_instance *inst; struct objlist *nobj; ngraph_returned_value oid; ngraph_arg arg; VALUE new_inst; int id, n; if (RB_TYPE_P(id_value, T_STRING)) { return obj_get_from_str(klass, id_value, name); } id = NUM2INT(id_value); nobj = ngraph_get_object(name); n = ngraph_get_object_last_id(nobj); if (id < 0) { id = n + id + 1; } if (id < 0 || id > n) { return Qnil; } new_inst = Data_Make_Struct(klass, struct ngraph_instance, 0, -1, inst); inst->obj = nobj; inst->id = id; inst->rcode = id; arg.num = 0; ngraph_object_get(inst->obj, "oid", inst->id, &arg, &oid); inst->oid = oid.i; return new_inst; } static VALUE obj_field_args(VALUE klass, VALUE field, const char *name) { struct objlist *nobj; const char* args; enum ngraph_object_field_type type; nobj = ngraph_get_object(name); type = ngraph_get_object_field_type(nobj, StringValueCStr(field)); if (type < NVFUNC) { return Qnil; } args = ngraph_get_object_field_args(nobj, StringValueCStr(field)); if (args == NULL) { args = ""; } else if (args[0] == '\0') { args = "void"; } return rb_str_new2(args); } static VALUE obj_field_type(VALUE klass, VALUE field, const char *name) { struct objlist *nobj; enum ngraph_object_field_type type; nobj = ngraph_get_object(name); type = ngraph_get_object_field_type(nobj, StringValueCStr(field)); return INT2FIX(type); } static VALUE obj_field_permission(VALUE klass, VALUE field, const char *name) { struct objlist *nobj; int perm; nobj = ngraph_get_object(name); perm = ngraph_get_object_field_permission(nobj, StringValueCStr(field)); return INT2FIX(perm); } static void set_ngraph_obj_class_name(const char *name, char *buf, int len) { int i; buf[0] = toupper(name[0]); for (i = 1; i < len - 1; i++) { buf[i] = name[i]; if (name[i] == '\0') { break; } } buf[len - 1] = '\0'; } static VALUE get_ngraph_obj(const char *name) { char buf[64]; set_ngraph_obj_class_name(name, buf, sizeof(buf)); return rb_const_get(NgraphModule, rb_intern(buf)); } static void add_child(VALUE ary, struct objlist *parent, int noinst) { struct objlist *ocur; VALUE obj; int id; const char *name; ocur = ngraph_get_root_object(); while (ocur) { if (ngraph_get_parent_object(ocur) == parent) { id = ngraph_get_object_last_id(ocur); if (id != -1 || ! noinst) { name = ngraph_get_object_name(ocur); obj = get_ngraph_obj(name); if (! NIL_P(obj)) { rb_ary_push(ary, obj); } } add_child(ary, ocur, noinst); } ocur = ngraph_get_next_object(ocur); } } static VALUE obj_derive(VALUE klass, VALUE arg, const char *name) { struct objlist *obj; int noinst, id; VALUE robj, ary; noinst = RTEST(arg); obj = ngraph_get_object(name); if (obj == NULL) { return Qnil; } ary = rb_ary_new(); id = ngraph_get_object_last_id(obj); if (id != -1 || ! noinst) { robj = get_ngraph_obj(name); if (! NIL_P(robj)) { rb_ary_push(ary, robj); } } add_child(ary, obj, noinst); return ary; } static VALUE obj_each(VALUE klass, const char *name) { struct objlist *nobj; int i, n; VALUE inst, id, ary; nobj = ngraph_get_object(name); n = ngraph_get_object_last_id(nobj) + 1; if (n < 1) { return klass; } name = ngraph_get_object_name(nobj); ary = rb_ary_new2(n); for (i = 0; i < n; i++) { id = INT2FIX(i); inst = obj_get(klass, id, name); rb_ary_store(ary, i, inst); } rb_ary_each(ary); return klass; } static VALUE obj_move_up(VALUE klass, VALUE arg, const char *name) { struct objlist *nobj; int id, r; nobj = ngraph_get_object(name); id = NUM2INT(arg); r = ngraph_object_move_up(nobj, id); if (r < 0) { return Qnil; } return klass; } static VALUE obj_move_down(VALUE klass, VALUE arg, const char *name) { struct objlist *nobj; int id, r; nobj = ngraph_get_object(name); id = NUM2INT(arg); r = ngraph_object_move_down(nobj, id); if (r < 0) { return Qnil; } return klass; } static VALUE obj_move_top(VALUE klass, VALUE arg, const char *name) { struct objlist *nobj; int id, r; nobj = ngraph_get_object(name); id = NUM2INT(arg); r = ngraph_object_move_top(nobj, id); if (r < 0) { return Qnil; } return klass; } static VALUE obj_move_last(VALUE klass, VALUE arg, const char *name) { struct objlist *nobj; int id, r; nobj = ngraph_get_object(name); id = NUM2INT(arg); r = ngraph_object_move_last(nobj, id); if (r < 0) { return Qnil; } return klass; } static VALUE obj_exchange(VALUE klass, VALUE arg1, VALUE arg2, const char *name) { struct objlist *nobj; int id1, id2, r; nobj = ngraph_get_object(name); id1 = NUM2INT(arg1); id2 = NUM2INT(arg2); r = ngraph_object_exchange(nobj, id1, id2); if (r < 0) { return Qnil; } return klass; } static VALUE obj_copy(VALUE klass, VALUE arg1, VALUE arg2, const char *name) { struct objlist *nobj; int id1, id2, r; nobj = ngraph_get_object(name); id1 = NUM2INT(arg1); id2 = NUM2INT(arg2); r = ngraph_object_copy(nobj, id1, id2); if (r < 0) { return Qnil; } return klass; } static VALUE obj_size(VALUE klass, const char *name) { struct objlist *nobj; int n; nobj = ngraph_get_object(name); n = ngraph_get_object_last_id(nobj); n = (n >= 0) ? n + 1 : 0; return INT2FIX(n); } static VALUE obj_exist(VALUE klass, const char *name) { struct objlist *nobj; int n; nobj = ngraph_get_object(name); n = ngraph_get_object_last_id(nobj); return (n >= 0) ? Qtrue : Qfalse; } static VALUE obj_del_from_str(VALUE klass, VALUE arg, const char *name) { const char *str; int i, *ids, n; struct objlist *obj; VALUE inst; str = StringValueCStr(arg); inst = rb_sprintf("%s:%s", name, str); obj = ngraph_get_object_instances_by_str(StringValueCStr(inst), &n, &ids); if (obj == NULL) { return klass; } for (i = n - 1; i >= 0; i--) { ngraph_object_del(obj, ids[i]); } ngraph_free(ids); return klass; } static VALUE obj_del(VALUE klass, VALUE id_value, const char *name) { int id, n; struct objlist *nobj; if (RB_TYPE_P(id_value, T_STRING)) { return obj_del_from_str(klass, id_value, name); } id = NUM2INT(id_value); nobj = ngraph_get_object(name); n = ngraph_get_object_last_id(nobj); if (id < 0) { id = n + id + 1; } if (id < 0 || id > n) { return Qnil; } ngraph_object_del(nobj, id); return klass; } static VALUE ngraph_inst_method_del(VALUE self) { int id; struct ngraph_instance *inst; inst = check_id(self); if (inst == NULL) { return Qnil; } id = inst->id; inst->id = -1; ngraph_object_del(inst->obj, id); return INT2FIX(id); } static VALUE obj_new_with_block_body(VALUE arg) { return rb_yield(arg); } static VALUE obj_new_with_block_ensure(VALUE arg) { return ngraph_inst_method_del(arg); } static VALUE obj_new(VALUE klass, const char *name) { VALUE new_inst; struct objlist *nobj; int r; nobj = ngraph_get_object(name); r = ngraph_object_new(nobj); if (r < 0) { return Qnil; } new_inst = obj_get(klass, INT2FIX(r), name); if (RTEST(rb_block_given_p())) { new_inst = rb_ensure(obj_new_with_block_body, new_inst, obj_new_with_block_ensure, new_inst); } return new_inst; } static VALUE obj_current(VALUE klass, const char *name) { VALUE new_inst; struct objlist *nobj; int id; nobj = ngraph_get_object(name); id = ngraph_get_object_current_id(nobj); if (id < 0) { return Qnil; } new_inst = obj_get(klass, INT2FIX(id), name); return new_inst; } static VALUE inst_get_int(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value num; ngraph_arg carg; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &num); if (inst->rcode < 0) { return Qnil; } return INT2NUM(num.i); } static VALUE inst_get_double(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value num; ngraph_arg carg; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &num); if (inst->rcode < 0) { return Qnil; } return rb_float_new(num.d); } static VALUE inst_get_bool(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value num; ngraph_arg carg; VALUE val; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &num); if (inst->rcode < 0) { return Qnil; } val = num.i ? Qtrue : Qfalse; return val; } static VALUE inst_get_str(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value str; ngraph_arg carg; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &str); if (inst->rcode < 0) { return Qnil; } return tainted_utf8_str_new(str.str); } static VALUE inst_get_obj(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value str; ngraph_arg carg; const char *name; int id, n, *ids; struct objlist *obj; VALUE klass; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &str); if (inst->rcode < 0) { return Qnil; } if (str.str == NULL) { return Qnil; } obj = ngraph_get_object_instances_by_str(str.str, &n, &ids); if (obj == NULL) { return Qnil; } id = ids[n - 1]; ngraph_free(ids); name = ngraph_get_object_name(obj); if (name == NULL) { return Qnil; } klass = get_ngraph_obj(name); return obj_get(klass, INT2FIX(id), name); } static VALUE inst_put_int(VALUE self, VALUE arg, const char *field) { struct ngraph_instance *inst; ngraph_value num; inst = check_id(self); if (inst == NULL) { return Qnil; } num.i = NUM2INT(arg); inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &num); if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_put_double(VALUE self, VALUE arg, const char *field) { struct ngraph_instance *inst; ngraph_value num; inst = check_id(self); if (inst == NULL) { return Qnil; } num.d = NUM2DBL(arg); inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &num); if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_put_bool(VALUE self, VALUE arg, const char *field) { struct ngraph_instance *inst; ngraph_value num; inst = check_id(self); if (inst == NULL) { return Qnil; } num.i = RTEST(arg) ? 1 : 0; inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &num); if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_put_enum(VALUE self, VALUE arg, const char *field, int max) { struct ngraph_instance *inst; ngraph_value num; inst = check_id(self); if (inst == NULL) { return Qnil; } num.i = NUM2INT(arg); if (num.i < 0 || num.i > max) { return Qnil; } inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &num); if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_put_str(VALUE self, VALUE arg, const char *field) { struct ngraph_instance *inst; ngraph_value str; inst = check_id(self); if (inst == NULL) { return Qnil; } if (NIL_P(arg)) { str.str = NULL; } else { str.str = StringValueCStr(arg); } inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &str); if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_put_obj(VALUE self, VALUE arg, const char *field) { struct ngraph_instance *inst1, *inst2; ngraph_value str; char buf[128]; const char *name, *ptr; int *ids; struct objlist *obj; switch (TYPE(arg)) { case T_NIL: ptr = NULL; break; case T_STRING: ptr = StringValueCStr(arg); obj = ngraph_get_object_instances_by_str(ptr, NULL, &ids); if (obj == NULL) { rb_raise(rb_eArgError, "%s#%s: illegal instance representation (%s).", rb_obj_classname(self), field, ptr); } ngraph_free(ids); break; default: if (! rb_obj_is_kind_of(arg, NgraphClass)) { rb_raise(rb_eArgError, "%s#%s: illegal type of the argument (%s).", rb_obj_classname(self), field, rb_obj_classname(arg)); } inst2 = check_id(arg); if (inst2 == NULL) { return Qnil; } name = ngraph_get_object_name(inst2->obj); #if 0 snprintf(buf, sizeof(buf), "%s:%d", name, inst2->id); #else snprintf(buf, sizeof(buf), "%s:^%d", name, inst2->oid); /* shoud instance be tighten? */ #endif ptr = buf; } inst1 = check_id(self); if (inst1 == NULL) { return Qnil; } str.str = ptr; inst1->rcode = ngraph_object_put(inst1->obj, field, inst1->id, &str); if (inst1->rcode < 0) { return Qnil; } return arg; } static VALUE inst_put_iarray(VALUE self, VALUE arg, const char *field) { VALUE tmpstr; struct ngraph_instance *inst; ngraph_value ary; int num; inst = check_id(self); if (inst == NULL) { return Qnil; } if (NIL_P(arg)) { num = 0; } else { if (!RB_TYPE_P(arg, T_ARRAY)) { rb_raise(rb_eArgError, "%s#%s: the argument must be an Array", rb_obj_classname(self), field); } num = RARRAY_LEN(arg); } ary.ary = NULL; if (num > 0) { ary.ary = rb_alloc_tmp_buffer(&tmpstr, sizeof(*ary.ary) + sizeof(ngraph_value) * num); ary.ary->num = num; if (ary.ary) { int i; for (i = 0; i < num; i++) { ary.ary->ary[i].i = NUM2INT(rb_ary_entry(arg, i)); } } } inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &ary); if (ary.ary) { rb_free_tmp_buffer(&tmpstr); } if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_get_iarray(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value cary; ngraph_arg carg; VALUE ary; int i; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &cary); if (inst->rcode < 0) { return Qnil; } ary = rb_ary_new2(cary.ary.num); for (i = 0; i < cary.ary.num; i++) { rb_ary_store(ary, i, INT2NUM(cary.ary.data.ia[i])); } return ary; } static VALUE inst_put_darray(VALUE self, VALUE arg, const char *field) { VALUE tmpstr; struct ngraph_instance *inst; ngraph_value ary; int num; inst = check_id(self); if (inst == NULL) { return Qnil; } if (NIL_P(arg)) { num = 0; } else { if (!RB_TYPE_P(arg, T_ARRAY)) { rb_raise(rb_eArgError, "%s#%s: the argument must be an Array", rb_obj_classname(self), field); } num = RARRAY_LEN(arg); } ary.ary = NULL; if (num > 0) { ary.ary = rb_alloc_tmp_buffer(&tmpstr, sizeof(*ary.ary) + sizeof(ngraph_value) * num); ary.ary->num = num; if (ary.ary) { int i; for (i = 0; i < num; i++) { ary.ary->ary[i].d = NUM2DBL(rb_ary_entry(arg, i)); } } } inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &ary); if (ary.ary) { rb_free_tmp_buffer(&tmpstr); } if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_get_darray(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value cary; ngraph_arg carg; VALUE ary; int i; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &cary); if (inst->rcode < 0) { return Qnil; } ary = rb_ary_new2(cary.ary.num); for (i = 0; i < cary.ary.num; i++) { rb_ary_store(ary, i, rb_float_new(cary.ary.data.da[i])); } return ary; } static VALUE inst_put_sarray(VALUE self, VALUE arg, const char *field) { struct ngraph_instance *inst; ngraph_value ary; int num; VALUE str, tmpstr; inst = check_id(self); if (inst == NULL) { return Qnil; } if (NIL_P(arg)) { num = 0; } else { if (!RB_TYPE_P(arg, T_ARRAY)) { rb_raise(rb_eArgError, "%s#%s: the argument must be an Array", rb_obj_classname(self), field); } num = RARRAY_LEN(arg); } ary.ary = NULL; if (num > 0) { ary.ary = rb_alloc_tmp_buffer(&tmpstr, sizeof(*ary.ary) + sizeof(ngraph_value) * num); ary.ary->num = num; if (ary.ary) { int i; for (i = 0; i < num; i++) { str = rb_ary_entry(arg, i); ary.ary->ary[i].str = StringValueCStr(str); } } } inst->rcode = ngraph_object_put(inst->obj, field, inst->id, &ary); if (ary.ary) { rb_free_tmp_buffer(&tmpstr); } if (inst->rcode < 0) { return Qnil; } return arg; } static VALUE inst_get_sarray(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_returned_value cary; ngraph_arg carg; VALUE ary; int i; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &cary); if (inst->rcode < 0) { return Qnil; } ary = rb_ary_new2(cary.ary.num); for (i = 0; i < cary.ary.num; i++) { rb_ary_store(ary, i, tainted_utf8_str_new(cary.ary.data.sa[i])); } return ary; } static VALUE inst_exe_void_func(VALUE self, const char *field) { struct ngraph_instance *inst; ngraph_arg carg; inst = check_id(self); if (inst == NULL) { return Qnil; } carg.num = 0; inst->rcode = ngraph_object_exe(inst->obj, field, inst->id, &carg); if (inst->rcode < 0) { return Qnil; } return self; } static VALUE get_array_arg(VALUE self, const char *field, VALUE arg, int *num) { int n; VALUE ary, val; if (NIL_P(arg)) { *num = 0; return Qnil; } if (!RB_TYPE_P(arg, T_ARRAY)) { rb_raise(rb_eArgError, "%s#%s: the argument must be an Array", rb_obj_classname(self), field); } n = RARRAY_LEN(arg); ary = arg; if (n == 1) { val = rb_ary_entry(arg, 0); if (RB_TYPE_P(val, T_ARRAY)) { ary = val; n = RARRAY_LEN(val); } } *num = n; return ary; } static struct ngraph_array * allocate_iarray(VALUE self, volatile VALUE *tmpstr, VALUE arg, const char *field) { struct ngraph_array *narray; int i, num; VALUE ary; ary = get_array_arg(self, field, arg, &num); narray = rb_alloc_tmp_buffer(tmpstr, sizeof(*narray) + sizeof(ngraph_value) * num); if (narray == NULL) { return NULL; } narray->num = num; for (i = 0; i < num; i++) { narray->ary[i].i = NUM2INT(rb_ary_entry(ary, i)); } return narray; } static struct ngraph_array * allocate_darray(VALUE self, volatile VALUE *tmpstr, VALUE arg, const char *field) { struct ngraph_array *narray; int i, num; VALUE ary; ary = get_array_arg(self, field, arg, &num); narray = rb_alloc_tmp_buffer(tmpstr, sizeof(*narray) + sizeof(ngraph_value) * num); if (narray == NULL) { return NULL; } narray->num = num; for (i = 0; i < num; i++) { narray->ary[i].d = NUM2DBL(rb_ary_entry(ary, i)); } return narray; } static struct ngraph_array * allocate_sarray(VALUE self, volatile VALUE *tmpstr, VALUE arg, const char *field) { struct ngraph_array *narray; int i, num; VALUE str; VALUE ary; ary = get_array_arg(self, field, arg, &num); narray = rb_alloc_tmp_buffer(tmpstr, sizeof(*narray) + sizeof(ngraph_value) * num); if (narray == NULL) { return NULL; } narray->num = num; for (i = 0; i < num; i++) { str = rb_ary_entry(ary, i); narray->ary[i].str = StringValueCStr(str); } return narray; } static VALUE create_obj_arg(VALUE args) { int i, n; VALUE arg, str, uniq_args; struct ngraph_instance *inst; struct objlist *obj = NULL; const char *name; uniq_args = rb_funcall(args, Uniq, 0); n = RARRAY_LEN(uniq_args); str = rb_str_new2(""); for (i = 0; i < n; i++) { arg = rb_ary_entry(uniq_args, i); if (! rb_obj_is_kind_of(arg, NgraphClass)) { return Qnil; } inst = check_id(arg); if (inst == NULL) { return Qnil; } if (obj == NULL) { obj = inst->obj; name = ngraph_get_object_name(inst->obj); rb_str_cat2(str, name); } else if (obj != inst->obj) { return Qnil; } rb_str_catf(str, "%c%d", (i) ? ',' : ':', inst->id); } return str; } static VALUE obj_func_obj(VALUE self, VALUE argv, const char *field, int type) { VALUE arg, rstr, val; int i; struct ngraph_instance *inst; ngraph_arg carg; int argc; ngraph_returned_value rval; const char *str; inst = check_id(self); if (inst == NULL) { return Qnil; } argc = RARRAY_LEN(argv); if (argc < 1) { str = NULL; } else { arg = rb_ary_entry(argv, 0); if (RB_TYPE_P(arg, T_ARRAY)) { int n; if (argc > 1) { return Qnil; } n = RARRAY_LEN(arg); if (n < 1) { str = NULL; } else { rstr = create_obj_arg(arg); if (NIL_P(rstr)) { return Qnil; } str = StringValueCStr(rstr); } } else { rstr = create_obj_arg(argv); if (NIL_P(rstr)) { return Qnil; } str = StringValueCStr(rstr); } } carg.num = 1; carg.ary[0].str = str; if (type == NVFUNC) { inst->rcode = ngraph_object_exe(inst->obj, field, inst->id, &carg); } else { inst->rcode = ngraph_object_get(inst->obj, field, inst->id, &carg, &rval); } if (inst->rcode < 0) { return Qnil; } switch (type) { case NVFUNC: val = self; break; case NBFUNC: val = (rval.i) ? Qtrue : Qfalse; break; #if USE_NCHAR case NCFUNC: #endif case NIFUNC: val = INT2NUM(rval.i); break; case NDFUNC: val = rb_float_new(rval.d); break; case NSFUNC: val = tainted_utf8_str_new(rval.str); break; case NIAFUNC: val = rb_ary_new2(rval.ary.num); for (i = 0; i < rval.ary.num; i++) { rb_ary_store(val, i, INT2NUM(rval.ary.data.ia[i])); } break; case NDAFUNC: val = rb_ary_new2(rval.ary.num); for (i = 0; i < rval.ary.num; i++) { rb_ary_store(val, i, rb_float_new(rval.ary.data.da[i])); } break; case NSAFUNC: val = rb_ary_new2(rval.ary.num); for (i = 0; i < rval.ary.num; i++) { rb_ary_store(val, i, tainted_utf8_str_new(rval.ary.data.sa[i])); } break; default: val = Qnil; } return val; } #if 0 static VALUE get_str_func_argv(VALUE self, VALUE argv, const char *field) { ngraph_returned_value rval; struct ngraph_instance *inst; ngraph_arg *carg; VALUE tmpstr; inst = check_id(self); if (inst == NULL) { return Qnil; } carg = allocate_sarray(self, &tmpstr, argv, field); inst->rcode = ngraph_object_get(inst->obj, field, inst->id, carg, &rval); rb_free_tmp_buffer(&tmpstr); if (inst->rcode < 0) { return Qnil; } return tainted_utf8_str_new(rval.str ? rval.str : ""); } #endif static void add_obj_name_const(VALUE klass, struct objlist *nobj, const char *name) { VALUE val; if (nobj == NULL) { val = Qnil; } else { const char *obj_name; char str[64]; obj_name = ngraph_get_object_name(nobj); set_ngraph_obj_class_name(obj_name, str, sizeof(str)); val = ID2SYM(rb_intern(str)); } rb_define_const(klass, name, val); } static void add_obj_str_const(VALUE klass, const char *name, const char *str) { VALUE val; val = rb_str_new2(str); OBJ_FREEZE(val); rb_define_const(klass, name, val); } static void add_obj_const(VALUE klass, const char *name) { struct objlist *nobj, *next, *child, *parent; const char *str; nobj = ngraph_get_object(name); next = ngraph_get_next_object(nobj); child = ngraph_get_child_object(nobj); parent = ngraph_get_parent_object(nobj); str = ngraph_get_object_version(nobj); add_obj_str_const(klass, "VERSION", str); add_obj_str_const(klass, "NAME", name); add_obj_name_const(klass, parent, "PARENT"); add_obj_name_const(klass, next, "NEXT"); add_obj_name_const(klass, child, "CHILD"); } static void setup_obj_common(VALUE obj) { rb_extend_object(obj, rb_mEnumerable); rb_include_module(obj, rb_mComparable); rb_define_method(obj, "del", ngraph_inst_method_del, 0); rb_define_method(obj, "===", ngraph_inst_method_equal, 1); rb_define_method(obj, "<=>", ngraph_inst_method_compare, 1); rb_define_method(obj, "move_up", ngraph_inst_method_move_up, 0); rb_define_method(obj, "move_down", ngraph_inst_method_move_down, 0); rb_define_method(obj, "move_top", ngraph_inst_method_move_top, 0); rb_define_method(obj, "move_last", ngraph_inst_method_move_last, 0); rb_define_method(obj, "exchange", ngraph_inst_method_exchange, 1); rb_define_method(obj, "to_s", ngraph_inst_method_to_str, 0); rb_define_method(obj, "rcode", ngraph_inst_method_rcode, 0); rb_define_method(obj, "copy", ngraph_inst_method_copy, 1); } static void store_field_names(VALUE fields, const char *name) { VALUE field; field = rb_str_new2(name); OBJ_FREEZE(field); rb_ary_push(fields, field); } #include "ruby_ngraph.h" static void add_common_const(VALUE ngraph_module) { VALUE type, attr; type = rb_define_module_under(ngraph_module, "FIELD_TYPE"); #if USE_NCHAR rb_define_const(type, "CHAR", INT2FIX(NCHAR)); #endif rb_define_const(type, "VOID", INT2FIX(NVOID)); rb_define_const(type, "BOOL", INT2FIX(NBOOL)); rb_define_const(type, "INT", INT2FIX(NINT)); rb_define_const(type, "DOUBLE", INT2FIX(NDOUBLE)); rb_define_const(type, "STR", INT2FIX(NSTR)); rb_define_const(type, "POINTER", INT2FIX(NPOINTER)); rb_define_const(type, "IARRAY", INT2FIX(NIARRAY)); rb_define_const(type, "DARRAY", INT2FIX(NDARRAY)); rb_define_const(type, "SARRAY", INT2FIX(NSARRAY)); rb_define_const(type, "ENUM", INT2FIX(NENUM)); rb_define_const(type, "OBJ", INT2FIX(NOBJ)); #if USE_LABEL rb_define_const(type, "LABEL", INT2FIX(NLABEL)); #endif rb_define_const(type, "VFUNC", INT2FIX(NVFUNC)); rb_define_const(type, "BFUNC", INT2FIX(NBFUNC)); #if USE_NCHAR rb_define_const(type, "CFUNC", INT2FIX(NCFUNC)); #endif rb_define_const(type, "IFUNC", INT2FIX(NIFUNC)); rb_define_const(type, "DFUNC", INT2FIX(NDFUNC)); rb_define_const(type, "SFUNC", INT2FIX(NSFUNC)); rb_define_const(type, "IAFUNC", INT2FIX(NIAFUNC)); rb_define_const(type, "DAFUNC", INT2FIX(NDAFUNC)); rb_define_const(type, "SAFUNC", INT2FIX(NSAFUNC)); attr = rb_define_module_under(ngraph_module, "FIELD_PERMISSION"); rb_define_const(attr, "READ", INT2FIX(NREAD)); rb_define_const(attr, "WRITE", INT2FIX(NWRITE)); rb_define_const(attr, "EXEC", INT2FIX(NEXEC)); } static VALUE ngraph_class_new(VALUE self) { rb_raise(rb_eNotImpError, "%s: creation of an instance is forbidden.", rb_obj_classname(self)); return Qnil; } static VALUE nputs(VALUE module, VALUE str) { ngraph_puts(StringValueCStr(str)); return Qnil; } static VALUE nputerr(VALUE module, VALUE str) { ngraph_err_puts(StringValueCStr(str)); return Qnil; } static VALUE nsleep(VALUE module, VALUE arg) { double t; t = NUM2DBL(arg); ngraph_sleep(t); return Qnil; } static VALUE ngraph_str2inst(VALUE module, VALUE arg) { const char *str; VALUE ary; struct obj_ids obj_ids; str = StringValueCStr(arg); obj_ids.obj = ngraph_get_object_instances_by_str(str, &obj_ids.num, &obj_ids.ids); if (obj_ids.obj == NULL) { return Qnil; } ary = rb_ensure(str2inst_get_ary, (VALUE) &obj_ids, str2inst_ensure, (VALUE) obj_ids.ids); return ary; } static VALUE ngraph_save_hist(VALUE module) { ngraph_save_shell_history(); return Qnil; } static VALUE ruby_ngraph_init_file(VALUE module, VALUE arg) { char *file; const char *init_file; size_t len; init_file = StringValueCStr(arg); file = ngraph_get_init_file(init_file); if (file == NULL) { return Qnil; } len = strlen(file); return rb_enc_str_new(file, len, rb_utf8_encoding()); } static VALUE ruby_ngraph_exec_loginshell(VALUE module, VALUE cmd, VALUE nobj) { int r; char *loginshell; static struct ngraph_instance *inst; if (! rb_obj_is_kind_of(nobj, NgraphClass)) { rb_raise(rb_eArgError, "%s: illegal type of the argument (%s).", rb_obj_classname(module), rb_obj_classname(nobj)); } if (NIL_P(cmd)) { loginshell = NULL; } else { size_t len; const char *str; str = StringValueCStr(cmd); len = strlen(str) + 1; loginshell = ALLOCA_N(char, len); if (loginshell == NULL) { rb_raise(rb_eSysStackError, "%s: cannot allocate enough memory.", rb_obj_classname(module)); } strcpy(loginshell, str); } inst = check_id(nobj); r = ngraph_exec_loginshell(loginshell, inst->obj, inst->id); return INT2FIX(r); } static VALUE wrap_load_script(VALUE file) { rb_load(file, 1); return Qnil; } static int load_script(int argc, char **argv) { VALUE r_argv, fname; int state, i; if (argc < 1) { return 0; } r_argv = rb_const_get(rb_mKernel, rb_intern("ARGV")); rb_ary_clear(r_argv); for (i = 1; i < argc; i++) { rb_ary_push(r_argv, rb_tainted_str_new2(argv[i])); } fname = rb_funcall(rb_cFile, ExpandPath, 1, rb_str_new2(argv[0])); rb_protect(wrap_load_script, fname, &state); if (state) { VALUE errinfo, errstr, errat; const char *cstr; errinfo = rb_errinfo(); errstr = rb_obj_as_string(errinfo); cstr = StringValueCStr(errstr); if (strcmp(cstr, "exit")) { ngraph_err_puts(cstr); errat = rb_funcall(errinfo, rb_intern("backtrace"), 0); if (! NIL_P(errat)) { int n; n = RARRAY_LEN(errat); for (i = 0; i < n; i ++) { errstr = rb_str_new2("\tfrom "); rb_str_append(errstr, rb_ary_entry(errat, i)); ngraph_err_puts(StringValueCStr(errstr)); } } } } rb_gc_start(); return 0; } static VALUE ruby_ngraph_init(VALUE module, VALUE arg) { char *str; if (Initialized) { return Qnil; } if (! NIL_P(arg)) { str = strdup(StringValueCStr(arg)); if (str) { DummyArgv[0] = str; } } ngraph_initialize(&DummyArgc, &DummyArgvPtr); create_ngraph_classes(module, NgraphClass); Initialized = TRUE; ngraph_set_exec_func("ruby", load_script); return Qnil; } void Init_ngraph(void) { if (Initialized) { return; } Uniq = rb_intern("uniq"); ExpandPath = rb_intern("expand_path"); NgraphModule = rb_define_module("Ngraph"); rb_define_singleton_method(NgraphModule, "puts", nputs, 1); rb_define_singleton_method(NgraphModule, "err_puts", nputerr, 1); rb_define_singleton_method(NgraphModule, "sleep", nsleep, 1); rb_define_singleton_method(NgraphModule, "str2inst", ngraph_str2inst, 1); rb_define_singleton_method(NgraphModule, "save_shell_history", ngraph_save_hist, 0); rb_define_singleton_method(NgraphModule, "ngraph_initialize", ruby_ngraph_init, 1); rb_define_singleton_method(NgraphModule, "get_initialize_file", ruby_ngraph_init_file, 1); rb_define_singleton_method(NgraphModule, "execute_loginshell", ruby_ngraph_exec_loginshell, 2); NgraphClass = rb_define_class_under(NgraphModule, "NgraphObject", rb_cObject); rb_define_method(NgraphClass, "initialize", ngraph_class_new, 0); add_common_const(NgraphModule); } ngraph-gtk-6.09.05/plugins/ruby/getobj.nsc0000644000175000017500000000015413070106167015300 00000000000000#! /usr/bin/ngraph echo "#" > $1 for i in `object` do object $i >> $1 echo "#" >> $1 done del system ngraph-gtk-6.09.05/plugins/ruby/extconf.rb0000644000175000017500000000041214142161772015315 00000000000000if (ARGV.size > 2) prefix = ARGV.shift else prefix = "" end require 'mkmf' $configure_args["--vendor"] = true unless (prefix =~ /.*local.*/) dir_config("ngraph") have_header("ngraph.h") have_library("ngraph", "ngraph_get_root_object") create_makefile("ngraph") ngraph-gtk-6.09.05/plugins/ruby/Makefile.am0000644000175000017500000000372114067543447015375 00000000000000EXTRA_DIST = create_objs.rb extconf.rb getobj.nsc ngraph.c lib/ngraph.rb lib/ngraph.rb.win lib/ngraph.rb.osx lib/ngraph/ngp2.rb if HAVE_RUBY_DEV ruby_ext = $(builddir)/ngraph.$(RUBY_DLEXT) if OS_OSX $(ruby_ext): ngraph.c $(builddir)/ruby_ngraph.h mv Makefile Makefile.org ARCHFLAGS="-arch x86_64" ruby $(srcdir)/extconf.rb $(prefix) --with-ngraph-include=$(top_srcdir)/src --with-ngraph-lib=$(top_builddir)/src/.libs mv Makefile Makefile.ruby mv Makefile.org Makefile $(MAKE) -f Makefile.ruby $(AM_MAKEFLAGS) else $(ruby_ext): ngraph.c $(builddir)/ruby_ngraph.h mv Makefile Makefile.org ruby $(srcdir)/extconf.rb $(prefix) --with-ngraph-include=$(top_srcdir)/src --with-ngraph-lib=$(top_builddir)/src/.libs mv Makefile Makefile.ruby mv Makefile.org Makefile $(MAKE) -f Makefile.ruby $(AM_MAKEFLAGS) endif if OS_WIN32 install-data-local: $(ruby_ext) $(MKDIR_P) $(DESTDIR)$(pkglibdir)/ruby/ngraph $(INSTALL) $(builddir)/$(ruby_ext) $(DESTDIR)$(pkglibdir)/ruby/$(ruby_ext) $(INSTALL_DATA) $(srcdir)/lib/ngraph.rb.win $(DESTDIR)$(pkglibdir)/ruby/ngraph.rb $(INSTALL_DATA) $(srcdir)/lib/ngraph/ngp2.rb $(DESTDIR)$(pkglibdir)/ruby/ngraph/ngp2.rb else if OS_OSX install-data-local: $(ruby_ext) $(MKDIR_P) $(DESTDIR)$(pkglibdir)/ruby/ngraph $(INSTALL) $(builddir)/$(ruby_ext) $(DESTDIR)$(pkglibdir)/ruby/$(ruby_ext) $(INSTALL_DATA) $(srcdir)/lib/ngraph.rb.osx $(DESTDIR)$(pkglibdir)/ruby/ngraph.rb $(INSTALL_DATA) $(srcdir)/lib/ngraph/ngp2.rb $(DESTDIR)$(pkglibdir)/ruby/ngraph/ngp2.rb else install-data-local: $(ruby_ext) $(MAKE) -f Makefile.ruby install endif endif $(builddir)/obj.txt: getobj.nsc $(top_builddir)/src/libngraph.la $(top_builddir)/src/ngraph -i $(srcdir)/getobj.nsc > $(builddir)/obj.txt $(builddir)/ruby_ngraph.h: $(builddir)/obj.txt ruby $(srcdir)/create_objs.rb $(builddir)/obj.txt $(builddir)/ruby_ngraph.h BUILT_SOURCES = $(ruby_ext) CLEANFILES = mkmf.log $(builddir)/obj.txt $(builddir)/ruby_ngraph.h $(ruby_ext) Makefile.ruby ngraph.o .*.time endif ngraph-gtk-6.09.05/plugins/ruby.c0000644000175000017500000000507713070106167013476 00000000000000#include #include #include "config.h" #include "../src/ngraph.h" #ifdef TRUE #undef TRUE #endif #define TRUE 1 #ifdef FALSE #undef FALSE #endif #define FALSE 0 static int Initialized = FALSE; static char *DummyArgv[] = {"ngraph_ruby", NULL}; static char **DummyArgvPtr = DummyArgv; static int DummyArgc = 1; #ifdef __MINGW32__ #define WINDOWS 1 #else #define WINDOWS 0 #endif #ifdef __APPLE__ #define MAC_OS 1 #else #define MAC_OS 0 #endif #if WINDOWS || MAC_OS static char * get_ext_name(void) { int n, i; struct objlist *sys; char *ext_name, *plugin_path, ext_basename[] = "ruby/ngraph.rb"; ngraph_returned_value val; ngraph_arg arg; sys = ngraph_get_object("system"); if (sys == NULL) { return NULL; } arg.num = 0; ngraph_object_get(sys, "plugin_dir", 0, &arg, &val); if (val.str == NULL) { return NULL; } plugin_path = strdup(val.str); if (plugin_path == NULL) { return NULL; } n = strlen(plugin_path); for (i = n - 1; i >= 0; i--) { if (plugin_path[i] == '/') { plugin_path[i] = '\0'; break; } } ext_name = malloc(n + sizeof(ext_basename) + 1); if (ext_name == NULL) { free(plugin_path); return NULL; } sprintf(ext_name, "%s/%s", plugin_path, ext_basename); free(plugin_path); return ext_name; } #endif static VALUE require_files(VALUE data) { VALUE result; rb_require("enc/encdb"); rb_require("enc/trans/transdb"); rb_require("rubygems"); result = rb_require((char *) data); return result; } int ngraph_plugin_open_ruby(void) { rb_encoding *enc; #if WINDOWS || MAC_OS char *ext_name; #endif VALUE result, arg; int status; if (Initialized) { return 0; } #if WINDOWS || MAC_OS ext_name = get_ext_name(); if (ext_name == NULL) { return 1; } #endif ruby_sysinit(&DummyArgc, &DummyArgvPtr); { RUBY_INIT_STACK; ruby_init(); ruby_script("Embedded Ruby on Ngraph"); ruby_init_loadpath(); rb_enc_find_index("encdb"); /* http://www.artonx.org/diary/20090206.html */ enc = rb_locale_encoding(); if (enc) { rb_enc_set_default_external(rb_enc_from_encoding(enc)); } rb_enc_set_default_internal(rb_enc_from_encoding(rb_utf8_encoding())); #if WINDOWS || MAC_OS arg = (VALUE) ext_name; #else arg = (VALUE) "ngraph.rb"; #endif result = rb_protect(require_files, arg, &status); } #if WINDOWS || MAC_OS free(ext_name); #endif if (status) { return 1; } Initialized = TRUE; return ! RTEST(result); } void ngraph_plugin_close_ruby(void) { if (Initialized) { ruby_finalize(); } } ngraph-gtk-6.09.05/plugins/Makefile.am0000644000175000017500000000245213506667606014415 00000000000000SUBDIRS = ruby extra_dist_common = libruby.def libruby_resource.rc.in if HAVE_RUBY_DEV ngraphplugindir = $(pkglibdir)/plugins RUBY_INCRUDEDIR = `ruby -r rbconfig -e "print RbConfig::CONFIG['rubyhdrdir']"` RUBY_ARCH = `ruby -r rbconfig -e "print RbConfig::CONFIG['rubyarchhdrdir']"` built_sources = clean_files = ngraphplugin_LTLIBRARIES = libruby.la libruby_la_SOURCES = ruby.c libruby_la_CFLAGS = -I$(top_srcdir) -I $(RUBY_INCRUDEDIR) -I $(RUBY_ARCH) libruby_ldflags = -L$(top_builddir)/src -avoid-version -module `ruby -e 'puts(RbConfig::CONFIG["LIBRUBYARG_SHARED"])'` if OS_WIN32 libruby_ldflags += -no-undefined -L`ruby -e 'puts(RbConfig::CONFIG["libdir"])'` -export-symbols $(srcdir)/libruby.def -Wl,$(builddir)/libruby_resource.o built_sources += libruby_resource.o libruby_la_LIBADD = -lngraph clean_files += libruby_resource.rc libruby_resource.rc: libruby_resource.rc.in $(AWK) -f $(top_srcdir)/mingw/winrc_version.awk -v VERSION=$(VERSION) $^ > $@ .rc.o: $(WINDRES) -o $@ $< endif libruby_la_LDFLAGS = $(libruby_ldflags) extra_dist = $(extra_dist_common) libruby_la_DEPENDENCIES = $(top_builddir)/src/libngraph.la else extra_dist = $(extra_dist_common) ruby.c endif EXTRA_DIST = $(extra_dist) BUILT_SOURCES = $(built_sources) CLEANFILES = $(BUILT_SOURCES) $(clean_files) ngraph-gtk-6.09.05/plugins/libruby_resource.rc.in0000644000175000017500000000107613070106167016656 000000000000001 VERSIONINFO FILEVERSION %VERSION% PRODUCTVERSION %VERSION% BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "" VALUE "FileDescription", "Ngraph-gtk" VALUE "FileVersion", "%VERSION%" VALUE "InternalName", "libruby" VALUE "LegalCopyright", "Copyright (C) 2003 Satoshi ISHIZAKA" VALUE "OriginalFilename", "libruby.dll" VALUE "ProductName", "Ngraph-gtk" VALUE "ProductVersion", "%VERSION%" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END ngraph-gtk-6.09.05/Makefile.in0000644000175000017500000007455314143146775012755 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = pathconv.sh CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/pathconv.sh.in ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS README TODO compile config.guess config.rpath \ config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ ngraphconfdir = $(sysconfdir)/$(PACKAGE) EXTRA_DIST = config.rpath pathconv.sh doc_DATA = README AUTHORS ChangeLog NEWS COPYING SUBDIRS = m4 src initfile driver addin demo doc zsh test mingw icons misc plugins osx gtksourceview po ACLOCAL_AMFLAGS = -I m4 @OS_WIN32_TRUE@AM_CFLAGS = -mms-bitfields @OS_OSX_TRUE@ngraph_app = ~/Desktop/$(PACKAGE).app @OS_OSX_TRUE@ngraph_app_bin = $(ngraph_app)/Contents/MacOS @OS_OSX_TRUE@ngraph_package = $(PACKAGE)-$(PACKAGE_VERSION)-$(build_cpu).dmg @OS_OSX_TRUE@CLEANFILES = $(ngraph_package) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 pathconv.sh: $(top_builddir)/config.status $(srcdir)/pathconv.sh.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docDATA .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-docDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am uninstall-docDATA .PRECIOUS: Makefile @OS_OSX_TRUE@bundler: $(ngraph_app) @OS_OSX_TRUE@$(ngraph_app): osx/ngraph-gtk.bundle $(bindir)/ngraph @OS_OSX_TRUE@ rm -rf $(ngraph_app) @OS_OSX_TRUE@ gtk-mac-bundler $< @OS_OSX_TRUE@ mv $(ngraph_app_bin)/ngraph-gtk-bin $(ngraph_app_bin)/ngraph-gtk @OS_OSX_TRUE@dmg: $(ngraph_package) @OS_OSX_TRUE@$(ngraph_package): $(ngraph_app) @OS_OSX_TRUE@ $(RM) $(ngraph_package) @OS_OSX_TRUE@ hdiutil create -srcfolder $(ngraph_app) -volname "$(PACKAGE) $(PACKAGE_VERSION)" -format UDBZ -o $(ngraph_package) libtool: $(LIBTOOL_DEPS) $(SHELL) $(top_srcdir)/config.status --recheck test_all: (cd test; $(MAKE) test) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/TODO0000644000175000017500000000325414142457056011362 00000000000000* fit_error, fit_correlation 関数 * draw オブジェクトに scale_x, scale_y パラメータを導入 (GRAフォーマットの変更も必要) * Z-index field を導入して、任意順の描画を可能にする 双方向リストにすると楽そう、ただし保存・読み込み手法について要検討 * 数式変換の実行時エラー情報表示強化 * 数式変換の関数 fprintf, fputs * 数式変換の関数 functions, constants * ユーザ定義関数での引数参照渡し、ラムダ式サポート 引数参照渡し:ポインタを渡すようにしないとだめ(配列対応のため) ラムダ式:変数の参照=ラムダ式の評価 * 数式変換におけるハッシュの実装。 * データファイル読込の効率化($col[] 対応など) * 数式変換入力の置換操作対応 * 数式変換のファイル保存・読込機能 * データ描画→数式変換に while(-1,1,1) などと設定→レジェンドを動かして再描画→無限ループ * レーダーグラフ (?) 用グリッド * fit 設定の保存時にグラフ更新フラグがセットされてしまう不具合の修正。 * コードの整理 * axis を cut & paste できないか? * EMF 出力の制限 1. 不透明度設定非対応 2. libreoffice が多角形塗りつぶしの WindingRule に非対応 3. libreoffice が点線に非対応 4. libreoffice で楕円の扇形または弓型輪郭の直線部分が表示されない 5. paint にペーストした時一部の文字が正常に表示されない 6. 文字が描画範囲からはみ出すことがあるので透明な矩形を描画している ngraph-gtk-6.09.05/config.guess0000755000175000017500000012637314142162475013220 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval "$set_cc_for_build" cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" # If ldd exists, use it to detect musl libc. if command -v ldd >/dev/null && \ ldd --version 2>&1 | grep -q ^musl then LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ [ "$TARGET_BINARY_INTERFACE"x = x ] then echo m88k-dg-dgux"$UNAME_RELEASE" else echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if [ "$HP_ARCH" = "" ]; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ "$HP_ARCH" = hppa2.0w ] then eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case "$UNAME_MACHINE" in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) if objdump -f /bin/sh | grep -q elf32-x86-64; then echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 else echo "$UNAME_MACHINE"-pc-linux-"$LIBC" fi exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ngraph-gtk-6.09.05/test/0000755000175000017500000000000014143613316011717 500000000000000ngraph-gtk-6.09.05/test/sarray_test.nsc0000644000175000017500000000377213612541307014715 00000000000000#! ../src/ngraph -i STATUS=0 show_result() { if [ "$2" = "$3" ] then echo "OK. ($1)" else echo "error. ($1) $2 $3" STATUS=1 fi } new sarray sarray::delimiter=",+" sarray::split "1,,2,,3,,4,,5,,6,,7,,8,,9,,0,,9,,8,,7,,6,,5,,4,,3,,2,,1" s="${sarray::join}" show_result "join" "$s" "1,2,3,4,5,6,7,8,9,0,9,8,7,6,5,4,3,2,1" sarray::rsort s="${sarray::join}" show_result "rsort" "$s" "9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1,0" sarray::sort s="${sarray::join}" show_result "sort" "$s" "0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9" sarray::uniq s="${sarray::join}" show_result "uniq" "$s" "0,1,2,3,4,5,6,7,8,9" s="${sarray::seq}" show_result "seq" "$s" "0 1 2 3 4 5 6 7 8 9" s="${sarray::rseq}" show_result "rseq" "$s" "9 8 7 6 5 4 3 2 1 0" s="${sarray::pop}" show_result "pop" "$s" "9" s="${sarray::join}" show_result "pop" "$s" "0,1,2,3,4,5,6,7,8" sarray::push "9" s="${sarray::join}" show_result "push" "$s" "0,1,2,3,4,5,6,7,8,9" s="${sarray::shift}" show_result "shift" "$s" "0" s="${sarray::join}" show_result "shift" "$s" "1,2,3,4,5,6,7,8,9" sarray::unshift "0" s="${sarray::join}" show_result "unshift" "$s" "0,1,2,3,4,5,6,7,8,9" s="${sarray::get:-2}" show_result "get" "$s" "8" sarray::reverse s="${sarray::join}" show_result "reverse" "$s" "9,8,7,6,5,4,3,2,1,0" sarray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" sarray::slice 1 3 s="${sarray::join}" show_result "slice" "$s" "2,3,4" sarray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" sarray::slice -4 3 sarray::reverse s="${sarray::join}" show_result "slice" "$s" "2,3,4" sarray::@="0 9 8 7 6 5 4 3 2 1" sarray::put -4 -4 s="${sarray::join}" show_result "put" "$s" "0,9,8,7,6,5,-4,3,2,1" sarray::@="0 9 8 7 6 5 4 3 2 1" sarray::put 4 -4 s="${sarray::join}" show_result "put" "$s" "0,9,8,7,-4,5,4,3,2,1" sarray::@="0 9 8 7 6 5 4 3 2 1" sarray::ins -4 100 s="${sarray::join}" show_result "ins" "$s" "0,9,8,7,6,5,100,4,3,2,1" sarray::@="0 9 8 7 6 5 4 3 2 1" sarray::ins 4 100 s="${sarray::join}" show_result "ins" "$s" "0,9,8,7,100,6,5,4,3,2,1" exit $STATUS ngraph-gtk-6.09.05/test/math_test_utf8.sh0000755000175000017500000000014513763661472015151 00000000000000#! /bin/sh . ./test.sh skip_on_windows LC_ALL=C.UTF-8 $NGRAPH -i math_test.nsc math_test_utf8.dat ngraph-gtk-6.09.05/test/io_test.nsc0000644000175000017500000000236313612541307014016 00000000000000#! ../src/ngraph -i set +e TEST_STR="test str..." TEST_STR2="123" TEST_FILE=${system::temp_file} STATUS=0 new io # gets and puts test io::mode="w+" io::open "$TEST_FILE" io::puts $TEST_STR io::rewind str=${io::gets} if [ "$str" != "$TEST_STR" ] then echo "error. (gets and puts)" STATUS=1 else echo "OK. (gets and puts)" fi # getc and putc test TEST_CHAR=48 io::putc $TEST_CHAR io::whence=cur io::seek -1 ch=${io::getc} if [ "$ch" -ne $TEST_CHAR ] then echo "error. (getc and putc)" STATUS=1 else echo "OK. (getc and putc)" fi # read and write test TEST_STR="123" io::write $TEST_STR io::whence=cur io::seek -3 str=${io::read:3} if [ "$str" -ne $TEST_STR ] then echo "error. (read and write)" echo "$str" echo "$TEST_STR" STATUS=1 else echo "OK. (read and write)" fi # flush test io::flush # tell test if [ ${io::tell} -ne 16 ] then echo "error. (tell)" STATUS=1 else echo "OK. (tell)" fi io::getc # eof test if io::eof then echo "OK. (eof)" else echo "error. (eof)" STATUS=1 fi io::close # popen test io::mode="r" io::popen "ls io_test.nsc" str=${io::gets} if [ $str != "io_test.nsc" ] then echo "error. (popen)" STATUS=1 else echo "OK. (popen)" fi io::close exit $STATUS ngraph-gtk-6.09.05/test/iarray_test.sh0000755000175000017500000000005013612541307014517 00000000000000#! /bin/sh . ./test.sh exec_script $0 ngraph-gtk-6.09.05/test/regexp_test.sh0000755000175000017500000000005013612541307014522 00000000000000#! /bin/sh . ./test.sh exec_script $0 ngraph-gtk-6.09.05/test/sarray_test.sh0000755000175000017500000000005013612541307014531 00000000000000#! /bin/sh . ./test.sh exec_script $0 ngraph-gtk-6.09.05/test/string_test.nsc0000644000175000017500000000203113612541307014705 00000000000000#! ../src/ngraph -i STATUS=0 show_result() { if [ "$2" = "$3" ] then echo "OK. ($1)" else echo "error. ($1) '$2' '$3'" STATUS=1 fi } new string string::@=" a b b b c d e f BCD" show_result "strip" "${string::strip}" "a b b b c d e f BCD" show_result "upcase" "${string::upcase}" " A B B B C D E F BCD" show_result "downcase" "${string::downcase}" " a b b b c d e f bcd" show_result "reverse" "${string::reverse}" "DCB f e d c b b b a " show_result "slice" "${string::slice:'6 9'}" "b b c" show_result "slice" "${string::slice:'21 4'}" "f BC" show_result "index" "${string::index:'D 25'}" "25" show_result "index" "${string::index:'a 1'}" "1" show_result "rindex" "${string::rindex:'a 1'}" "1" show_result "rindex" "${string::rindex:'b 20'}" "10" show_result "match" "${string::match:'f.B'}" "true" show_result "match" "${string::match:'a[^b]+c'}" "false" exit $STATUS ngraph-gtk-6.09.05/test/Makefile.in0000644000175000017500000007715314143146776013734 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ TESTS = math_test.sh math_test_utf8.sh string_test.sh iarray_test.sh \ darray_test.sh sarray_test.sh io_test.sh regexp_test.sh EXTRA_DIST = math_test.nsc math_test_utf8.dat math_test_new.dat \ string_test.nsc iarray_test.nsc darray_test.nsc \ sarray_test.nsc io_test.nsc regexp_test.nsc math_test_old.dat \ test.sh $(TESTS) all: all-am .SUFFIXES: .SUFFIXES: .log .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? math_test.sh.log: math_test.sh @p='math_test.sh'; \ b='math_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) math_test_utf8.sh.log: math_test_utf8.sh @p='math_test_utf8.sh'; \ b='math_test_utf8.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) string_test.sh.log: string_test.sh @p='string_test.sh'; \ b='string_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) iarray_test.sh.log: iarray_test.sh @p='iarray_test.sh'; \ b='iarray_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) darray_test.sh.log: darray_test.sh @p='darray_test.sh'; \ b='darray_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) sarray_test.sh.log: sarray_test.sh @p='sarray_test.sh'; \ b='sarray_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) io_test.sh.log: io_test.sh @p='io_test.sh'; \ b='io_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) regexp_test.sh.log: regexp_test.sh @p='regexp_test.sh'; \ b='regexp_test.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool cscopelist-am ctags-am distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am recheck tags-am \ uninstall uninstall-am .PRECIOUS: Makefile # original Ngraph causes following errors # # error E # expected: 2.718281828459045e+00 # result: 2.718281828459050e+00 # difference: 4.884981308350689e-15 # error UNDEF # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # error ASIN(1/2) # expected: 5.235987755982989e-01 # result: 5.235987755982988e-01 # difference: -1.110223024625157e-16 # error EI(1/2) # expected: 4.542199048631735e-01 # result: 4.542199048631737e-01 # difference: 2.220446049250313e-16 # error EQ(0.1,BREAK) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error EQ(0.1,CONT) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error NEQ(0.1,BREAK) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error NEQ(0.1,CONT) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error OR(1,break) # expected: 0.000000000000000e+00 # result: 1.000000000000000e+00 # difference: 1.000000000000000e+00 # error OR(1,cont) # expected: 0.000000000000000e+00 # result: 1.000000000000000e+00 # difference: 1.000000000000000e+00 # error AND(undef,1) # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # error AND(1,undef) # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # error AND(0,undef) # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # shell: dexpr: illegal type of argument # error dif(2) # expected: undefined # result: # shell: dexpr: illegal type of argument # difference: # shell: dexpr: illegal type of argument # error sum(2) # expected: 2.000000000000000e+00 # result: # difference: -2.000000000000000e+00 # shell: dexpr: illegal type of argument # error FOR(0,1,10,1,sum(1)) # expected: 1.000000000000000e+01 # result: # difference: -1.000000000000000e+01 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/test/darray_test.sh0000755000175000017500000000005013612541307014512 00000000000000#! /bin/sh . ./test.sh exec_script $0 ngraph-gtk-6.09.05/test/regexp_test.nsc0000644000175000017500000000171213612541307014676 00000000000000#! ../src/ngraph -i STATUS=0 show_result() { if [ "$2" = "$3" ] then echo "OK. ($1)" else echo "error. ($1) $2 $3" STATUS=1 fi } check_match() { n=${regexp::num} m=`object sarray -instance` show_result "num" "$n" "$m" for i in ${regexp::seq} do for j in `get sarray:$i -field seq` do s1=`get regexp -field get:"$i $j"` s2=`get sarray:$i -field get:$j` show_result "get" "$s1" "$s2" done done } new regexp new sarray new sarray regexp::@="(foo)(bar)(BAZ)?" regexp::match 'foobarbaz foobarBAZ' sarray:0:@="foobar foo bar" sarray:1:@="foobarBAZ foo bar BAZ" check_match regexp::@="(?i)(foo)(bar)(BAZ)?" regexp::match 'FOObarbaz foobarBAZ' sarray:0:@="FOObarbaz FOO bar baz" sarray:1:@="foobarBAZ foo bar BAZ" check_match regexp::@="(foo)(bar)(BAZ)?" show_result "replace" "${regexp::replace:'foobarbaz'}" "baz" show_result "replace" "${regexp::replace:'foobarbaz \\2\\1'}" "barfoobaz" exit $STATUS ngraph-gtk-6.09.05/test/math_test_utf8.dat0000644000175000017500000000201313664640301015264 00000000000000$str:="a b c"#0 string_split($sary, $str, " ")#3 string_join($str, "_", $sary)#0 string_up($ustr, $str)#0 string_append($ustr, "_def")#0 string_compare($ustr, "A_B_C_def")#0 string_prepend($ustr, "123_")#0 string_compare($ustr, "123_A_B_C_def")#0 string_length($ustr)==13#1 string_replace($str, $ustr, "[a-z]+", ".")#0 string_compare($str, "123_A_B_C_.")#0 string_replace($str, $ustr, "[a-z]+", ".", TRUE)#0 string_compare($str, "123_._._._.")#0 string_reverse($rstr, $ustr)#0 string_compare($rstr, "fed_C_B_A_321")#0 string_erase($rstr, 8, 3)#0 string_compare($rstr, "fed_C_B_21")#0 string_insert($rstr, "あ", 9)#0 string_compare($rstr, "fed_C_B_2あ1")#0 string_substring($str, $ustr, 4, 9)#0 string_compare($str, "A_B_C")#0 string_truncate($ustr, 5)#0 string_compare($ustr, "123_A")#0 sprintf($str, 'abc %^.3g def %d', 12345, 67890)==24#1 string_compare($str, 'abc 1.23×10^4@ def 67890')#0 sprintf($str, 'abc %^.3g def %d', 12345)==21#1 string_compare($str, 'abc 1.23×10^4@ def %d')#0 ngraph-gtk-6.09.05/test/io_test.sh0000755000175000017500000000007013612541307013641 00000000000000#! /bin/sh . ./test.sh skip_on_windows exec_script $0 ngraph-gtk-6.09.05/test/math_test_new.dat0000644000175000017500000001743213767565756015232 000000000000000xffff#65535 0b1011#11 0o377#255 123_456.789_E8#1.234567890000000e+13 ! 0#1 ! 0!#0 ! 1#0 ! -1#0 2!*3#6 2*!3#0 2!3#6 expm1(3)#1.908553692318767e+01 ln1p(10)#2.397895272798371e+00 log1p(2)#4.771212547196624e-01 const a:123*4;a#492 const bbb=123*4;bbb#492 def f(x,y){x*y};f(2,3)#6 ICBETA(2,3,0.4)#0.5248 ISNORMAL(0)#1 ISNORMAL(NAN)#0 ISBREAK(0)#0 ISBREAK(BREAK)#1 ISCONT(0)#0 ISCONT(CONT)#1 ISNAN(0)#0 ISNAN(NAN)#1 ISUNDEF(0)#0 ISUNDEF(dif(2))#1 ISUNDEF(UNDEF)#1 ISCONT(OR(1,cont))#1 ISBREAK(AND(0,break))#1 a[0]=2;a[1]=1;SORT(a);a[0]#1 a[10]#0 a[0]:1=a[1]=2;RSORT(a);a[0]#2 a[10]=10;SIZE(a)#11 b[0]=2;b[1]=1;SORT(b);b[0]#1 b[10]#0 b[0]=1;b[1]=2;RSORT(b);b[0]#2 b[10]=10;SIZE(b)#11 UNLESS(1,2,3)#3 UNLESS(0,2,3)#2 break::break#0 break==break#0 0.2::0.20#1 0.2==0.20#1 0.2::0.21#0 0.2==0.21#0 0::0.0#1 0==0.0#1 0::-0.0#1 0==-0.0#1 -0::0.0#1 -0==0.0#1 -0!:0.0#0 -0!=0.0#0 0.21::0.2#0 0.21==0.2#0 0.2>:0.20#1 0.2>:0.21#0 0.21>:0.2#1 0.2>0.20#0 0.21>0.2#1 0.2>0.21#0 0.2<:0.20#1 0.2<:0.21#1 0.21<:0.2#0 0.2>=0.20#1 0.2>=0.21#0 0.21>=0.2#1 0.2>0.20#0 0.21>0.2#1 0.2>0.21#0 0.2<=0.20#1 0.2<=0.21#1 0.21<=0.2#0 0.2<0.20#0 0.2<0.21#1 0.21<0.2#0 0.0&&0.2#0 0.1&&0.2#0.2 0.2&&0.0#0 nan&&0.1#nan 0.0&&nan#0 0.1&&nan#nan undef&&0.1#undefined 0.0&&undef#0 0.1&&undef#undefined 0.1&&break#0 0.1&&cont#0 break&&0.1#0 cont&&0.1#0 0.0||0.2#0.2 0.21||0.2#0.21 0.21||0.0#0.21 nan||0.1#0.1 0.0||nan#nan 0.1||nan#0.1 undef||0.1#0.1 0.0||undef#undefined 0.1||undef#0.1 0.1||break#0.1 0.1||cont#0.1 break||0.1#0.1 cont||0.1#0.1 (zeta_int(2)*6)^0.5#3.141592653589793e+00 (zeta(2)*6)^0.5#3.141592653589794e+00 ((zetam1_int(2)+1)*6)^0.5#3.141592653589793e+00 ((zetam1(2)+1)*6)^0.5#3.141592653589794e+00 jnu(1.5,2.3)#5.2110918572117E-01 ynu(1.5,2.3)#-2.3991644631326E-01 jl(5,2.3)#5.0374877417878E-03 yl(5,2.3)#-8.6948247901974E+00 in(5,2.3)#2.0824734274240E-02 kn(5,2.3)#4.3528686306516E+00 inu(1.5,2.3)#1.5208328933032E+00 knu(1.5,2.3)#1.1887891043736E-01 prog1(1,2,3)#1 prog2(1,b:2,3)#2 prog2(1,b=2,3)#2 b#2 progn(1,2,3)#3 progn(1,2,UNDEF)#undefined mjd2year(51603)#2000 mjd2month(51603)#2 mjd2day(51603)#29 mjd2wday(51603)#2 mjd2yday(51603)#60 unix2mjd(0)#40587 round(mjd2unix(unix2mjd(time())))==time()#1 cm(BREAK);isbreak(rm(0))#1 cm(100);rm(0)#100 push(a,3)#12 push(a,4)#13 a[11]#3 a[12]#4 unshift(a,2)#14 unshift(a,1)#15 a[0]#1 a[1]#2 a[13]#3 a[14]#4 pop(a)#14 shift(a)#13 pop(a)#12 shift(a)#11 a[0]#2 a[10]#10 pop(a, 6)#5 shift(a, 4)#1 a[0]#0 min(1,2,3,4,5,6,7,8,9,10)#1 max(1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10)#10 sumsq(1,2,3,4,5,6,7,8,9)#285 eq(1.009, 1.000, 2)#1 eq(1.005, 1.000, 3)#0 eq(1.0051, 1.000, 3)#0 eq(-10000, -9999, 4)#1 eq(-10000, -9999, 5)#0 eq(0.00501, 0.00500, 2)#1 eq(0.00501, 0.00500, 3)#0 neq(1.009, 1.000, 2)#0 neq(1.005, 1.000, 3)#1 neq(1.0051, 1.000, 3)#1 neq(-10000, -9999, 4)#0 neq(-10000, -9999, 5)#1 neq(0.00501, 0.00500, 2)#0 neq(0.00501, 0.00500, 3)#1 lt(1.00, 1.005, 2)#0 lt(1.00, 1.005, 3)#1 lt(1.00, 1.0051, 3)#1 lt(-10000, -9999, 4)#0 lt(-10000, -9999, 5)#1 lt(0.0050, 0.00501, 2)#0 lt(0.0050, 0.00501, 3)#1 le(1.00, 1.005, 2)#1 le(1.00, 1.005, 3)#1 le(1.00, 1.0051, 3)#1 le(-10000, -9999, 4)#1 le(-10000, -9999, 5)#1 le(0.0050, 0.00501, 2)#1 le(0.0050, 0.00501, 3)#1 gt(1.005, 1.00, 2)#0 gt(1.005, 1.00, 3)#1 gt(1.0051, 1.00, 3)#1 gt(-9999, -10000, 4)#0 gt(-9999, -10000, 5)#1 gt(0.00501, 0.0050, 2)#0 gt(0.00501, 0.0050, 3)#1 ge(1.005, 1.00, 2)#1 ge(1.005, 1.00, 3)#1 ge(1.0051, 1.00, 3)#1 ge(-9999, -10000, 4)#1 ge(-9999, -10000, 5)#1 ge(0.00501, 0.0050, 2)#1 ge(0.00501, 0.0050, 3)#1 9.000 000 000 000 002::9.000 000 000 000 000#0 9.000 000 000 000 002==9.000 000 000 000 000#0 b=3;b*=2#6 b=3;b+=2#5 b=3;b-=2#1 b=3;b/=2#1.5 b=3;b\=2#1 b=3;b^=2#9 array_clear(a)#0 i=0#0 a[i+=1]+=1#1 a[0]#0 a[1]#1 i=0#0 a[i+=1]=a[i+=1]+1#2 a[1]#1 a[2]#2 fmod(5,3)#2 array_clear(a)#0 size(a)#0 array(a, CONT, 2, 3, NAN, 5)#5 iscont(a[0])#1 array_compact(a)#3 a[2]#5 array_sum(a)#10 array_sumsq(a)#38 array_min(a)#2 array_max(a)#5 array_clear(a)#0 array(a, 1, 2, 3, 4, 5)#5 array_average(a)#3 array_stdevp(a)#1.414213562373095e+00 array_stdev(a)#1.581138830084190e+00 $str="a b c"#0 string_split($sary, $str, " ")#3 string_compare($sary[0], "a")#0 string_compare($sary[1], "a")#1 string_compare($sary[1], "b")#0 string_compare($sary[1], "c")#-1 string_compare($sary[2], "c")#0 ($sary[0] == "a") != 0#1 ($sary[1] != "a") != 0#1 ($sary[1] != "b") == 0#1 ($sary[1] == "c") == 0#1 ($sary[2] == "c") != 0#1 string_join($str, "_", $sary)#0 string_compare($str, "a_b_c")#0 string_up($ustr, $str)#0 string_compare($ustr, $str, TRUE)#0 string_compare($ustr, "A_B_C")#0 string_down($dstr, $ustr)#0 string_compare($dstr, $ustr, TRUE)#0 string_compare($dstr, $str)#0 string_append($ustr, "_def")#0 string_compare($ustr, "A_B_C_def")#0 rsort($sary)#3 string_join($str, "", $sary)#0 string_compare($str, "cba")#0 sort($sary)#3 string_join($str, "", $sary)#0 string_compare($str, "abc")#0 string_split($sa, "1.2 3 4.5 6 7.89", " ")==5#1 size($sa)==5#1 string_float_array(ary, $sa)==5#1 ary[0]==1.2#1 ary[1]==3#1 ary[2]==4.5#1 ary[3]==6#1 ary[4]==7.89#1 string_float($sa[0])==1.2#1 array_clear($sa)#0 size($sa)==0#1 $str=" abcde f "#0 string_strip($str)#0 string_compare($str, 'abcde f')#0 sprintf($str, 'abc %^.3g def %d')==16#1 string_compare($str, 'abc %^.3g def %d')#0 getobj("system", "id", 0)==0#1 getobj_string($str, "system", "e-mail", 0)==18#1 string_compare($str, "ZXB01226@nifty.com")#0 getobj_string($str, "io", "mode", 0)==1#1 string_compare($str, "r")#0 getobj_array($sa, "system", "temp_list", 0)==0#1 array(b, 1, 2, 3, 4, 5)#5 map(dest, b, b, b^2)#5 dest[0]==1#1 dest[4]==25#1 r=1#1 reduce(b, item, r, item*r)==120#1 filter(dest, b, item, item\2)#3 dest[0]==1#1 dest[1]==3#1 dest[2]==5#1 filter(dest, b, item, item\2==0)#2 dest[0]==2#1 dest[1]==4#1 find(b, item, item\2)==1#1 find(b, item, item\2==0)==2#1 string_split($sa, "1 12 123 1234 12345", " ")==5#1 map(a, $sa, $str, string_length($str))#5 a[0]==1#1 a[1]==2#1 a[2]==3#1 a[3]==4#1 a[4]==5#1 index(a, item, item==3)==2#1 r=0#0 reduce($sa, $str, r, r + string_length($str))==15#1 filter($sa2, $sa, $str, string_length($str)\2==0)==2#1 string_compare($sa2[0], "12")#0 string_compare($sa2[1], "1234")#0 each_with_index($sa, $s, i, dest[i] = string_float($s))==5#1 dest[0]==1#1 dest[2]==123#1 dest[4]==12345#1 string_compare("a#{$sa[2]}b", "a123b")#0 string_compare("a#{$sa[2]/2}b", "a61.5b")#0 string_compare("a#{dest[4]}b", "a12345b")#0 string_compare("a#{dest[4]*2}b", "a24690b")#0 string_compare("a#{'xyz'}b", "axyzb")#0 "a#{$sa[2]}b"=="a123b"#1 "a#{$sa[2]/2}b"!="a61.5b"#0 "a#{dest[4]}b"=="a12345b"#1 "a#{dest[4]*2}b"!="a24690b"#0 "a#{'xyz'}b"=="axyzb"#1 $str=$sa[2]#0 "a#{$str}b"=="a123b"#1 times(10,i,sum(i+1))==55#1 {1;2;3}==3#1 {1;2;3;{4;5;6}}==6#1 {}==0#1 1{}==0#1 123.4=="123.4"#1 isbreak("BREAK")#1 iscont("CONT")#1 isnan("nan")#1 $a=0.0112233#0 string_compare($a, "0.0112233")#0 round(1.25, 1)#1.3 round(125, -1)#130 array(a, 3, 7, 1, 4, 5, 8, 2, 9, 6)#9 array_moving_average(b, a, 2)#9 b[0]#3.6666666666666666666 b[1]#3.75 b[2]#4 b[3]#5 b[4]#4 b[5]#5.6 b[6]#6 b[7]#6.25 b[8]#5.66666666666666666666 array_moving_average(a, a, 2, TRUE)#9 a[0]#4 a[1]#4.125 a[2]#3.66666666666666666666 a[3]#4.33333333333333333333 a[4]#4.66666666666666666666 a[5]#5.66666666666666666666 a[6]#5.66666666666666666666 a[7]#6.375 a[8]#6.33333333333333333333 string_split($a, "a b c d e f g h i j k", " ")#11 push($a, "x")#12 push($a, "y")#13 $a[11]=="x"#1 $a[12]=="y"#1 unshift($a, "@")#14 unshift($a, "*")#15 $a[0]=="*"#1 $a[1]=="@"#1 $a[13]=="x"#1 $a[14]=="y"#1 pop($a)#14 shift($a)#13 pop($a)#12 shift($a)#11 $a[0]=="a"#1 $a[10]=="k"#1 index($a, $item, $item=="d")==3#1 pop($a, 6)#5 shift($a, 4)#1 $a[0]=="e"#1 push($a, "x#{3*2}y")#2 $a[1]=="x6y"#1 unshift($a, "@#{3+4}#")#3 $a[0]=="@7#"#1 string_split(a, "1.1 3.1 5.1 7.1 9.1 break 2.1 4.1 6.1 8.1", " ")#10 a[0]#1.1 isbreak(a[5])#1 a[-1]#8.1 string_split_float(a, "1.2 3.2 5.2 7.2 9.2 0.2 2.2 4.2 6.2 8", " ")#10 a[1]#3.2 a[6]#2.2 a[-2]#6.2 ngraph-gtk-6.09.05/test/math_test_old.dat0000644000175000017500000001116713070106167015164 00000000000000PI#3.141592653589793e+00 E#2.718281828459050e+00 EULER#5.772156649015329e-01 NAN#nan UNDEF#undefined CONT#0.000000000000000e+00 BREAK#0.000000000000000e+00 -123#-1.230000000000000e+02 +123#1.230000000000000e+02 1+2#3.000000000000000e+00 3-1#2.000000000000000e+00 3*5#1.500000000000000e+01 6/3#2.000000000000000e+00 6/0#nan 5\3#2.000000000000000e+00 2^4#1.600000000000000e+01 4!#2.400000000000000e+01 ABS(-10)#1.000000000000000e+01 SIGN(-10)#-1.000000000000000e+00 SIGN(10)#1.000000000000000e+00 INT(-1.1)#-1.000000000000000e+00 INT(1.1)#1.000000000000000e+00 GAUSS(-1.1)#-2.000000000000000e+00 GAUSS(1.1)#1.000000000000000e+00 FRAC(1.1)#1.000000000000001e-01 FRAC(-1.1)#-1.000000000000001e-01 ROUND(1.1)#1.000000000000000e+00 ROUND(-1.1)#-1.000000000000000e+00 MIN(1,1.1)#1.000000000000000e+00 MAX(1,1.1)#1.100000000000000e+00 SQR(PI)#9.869604401089358e+00 SQRT(16)#4.000000000000000e+00 EXP(3)#2.008553692318767e+01 LN(10)#2.302585092994046e+00 LOG(2)#3.010299956639812e-01 SIN(PI/2)#1.000000000000000e+00 COS(PI/4)#7.071067811865476e-01 TAN(PI/4)#9.999999999999999e-01 ASIN(1/2)#5.235987755982988e-01 ACOS(1/2)#1.047197551196598e+00 ATAN(1/2)#4.636476090008061e-01 SINH(2)#3.626860407847019e+00 COSH(2)#3.762195691083631e+00 TANH(2)#9.640275800758169e-01 ASINH(1/2)#4.812118250596035e-01 ACOSH(1.5)#9.624236501192069e-01 ATANH(1/2)#5.493061443340549e-01 THETA(-1)#0.000000000000000e+00 THETA(0)#1.000000000000000e+00 THETA(1)#1.000000000000000e+00 DELTA(-1)#0.000000000000000e+00 DELTA(0)#1.000000000000000e+00 DELTA(1)#0.000000000000000e+00 GAMMA(1/2)#1.772453850905516e+00 ICGAM(1,1/2)#6.065306597126334e-01 ERFC(1/2)#4.795001221869535e-01 QINV(1/2)#0.000000000000000e+00 EI(1/2)#4.542199048631737e-01 BETA(1,1/2)#2.000000000000000e+00 JN(0,1/2)#9.384698072408129e-01 JN(1,1/2)#2.422684576748739e-01 JN(2,1/2)#3.060402345868264e-02 YN(0,1/2)#-4.445187335067065e-01 YN(1,1/2)#-1.471472392670243e+00 YN(2,1/2)#-5.441370837174266e+00 PN(0,1/2)#1.000000000000000e+00 PN(1,1/2)#5.000000000000000e-01 PN(2,1/2)#-1.250000000000000e-01 PN(3,1/2)#-4.375000000000000e-01 PN(10,1)#1.000000000000000e+00 LGN(1,1,1/2)#1.500000000000000e+00 LGN(2,1,1/2)#1.625000000000000e+00 LGN(3,1,1/2)#1.479166666666667e+00 LGN(4,1,1/2)#1.148437500000000e+00 HN(1,0.4)#8.000000000000000e-01 TN(1,0.9)#9.000000000000000e-01 TN(2,0.8)#2.800000000000000e-01 TN(10,0.9)#-2.007474688000005e-01 MJD(2000,1,1)#5.154400000000000e+04 EQ(0.2,0.2)#1.000000000000000e+00 EQ(0.21,0.2)#0.000000000000000e+00 EQ(0.2,0.21)#0.000000000000000e+00 EQ(BREAK,BREAK)#0.000000000000000e+00 EQ(CONT,BREAK)#0.000000000000000e+00 EQ(CONT,CONT)#0.000000000000000e+00 EQ(BREAK,0.1)#0.000000000000000e+00 EQ(CONT,0.1)#0.000000000000000e+00 EQ(0.1,BREAK)#0.000000000000000e+00 EQ(0.1,CONT)#0.000000000000000e+00 NEQ(0.2,0.2)#0.000000000000000e+00 NEQ(0.21,0.2)#1.000000000000000e+00 NEQ(0.2,0.21)#1.000000000000000e+00 NEQ(BREAK,BREAK)#0.000000000000000e+00 NEQ(CONT,BREAK)#0.000000000000000e+00 NEQ(CONT,CONT)#0.000000000000000e+00 NEQ(BREAK,0.1)#0.000000000000000e+00 NEQ(CONT,0.1)#0.000000000000000e+00 NEQ(0.1,BREAK)#0.000000000000000e+00 NEQ(0.1,CONT)#0.000000000000000e+00 GE(0.2,0.2)#1.000000000000000e+00 GE(0.21,0.2)#1.000000000000000e+00 GE(0.2,0.21)#0.000000000000000e+00 GT(0.2,0.2)#0.000000000000000e+00 GT(0.21,0.2)#1.000000000000000e+00 GT(0.2,0.21)#0.000000000000000e+00 LE(0.2,0.2)#1.000000000000000e+00 LE(0.2,0.21)#1.000000000000000e+00 LE(0.21,0.2)#0.000000000000000e+00 LT(0.2,0.2)#0.000000000000000e+00 LT(0.2,0.21)#1.000000000000000e+00 LT(0.21,0.2)#0.000000000000000e+00 NOT(0)#1.000000000000000e+00 NOT(1)#0.000000000000000e+00 NOT(-1)#0.000000000000000e+00 OR(0,0)#0.000000000000000e+00 OR(1,0)#1.000000000000000e+00 OR(0,1)#1.000000000000000e+00 OR(1,1)#1.000000000000000e+00 OR(nan,1)#nan OR(break,1)#0.000000000000000e+00 OR(1,break)#0.000000000000000e+00 OR(0,break)#0.000000000000000e+00 OR(cont,1)#0.000000000000000e+00 OR(1,cont)#0.000000000000000e+00 OR(0,cont)#0.000000000000000e+00 AND(break,1)#0.000000000000000e+00 AND(undef,1)#undefined AND(1,undef)#undefined AND(0,undef)#undefined AND(cont,1)#0.000000000000000e+00 AND(break,1)#0.000000000000000e+00 AND(NAN,1)#nan AND(1, NAN)#nan AND(0, NAN)#nan AND(1,1)#1.000000000000000e+00 AND(1,0)#0.000000000000000e+00 AND(0,1)#0.000000000000000e+00 AND(0,0)#0.000000000000000e+00 XOR(1,1)#0.000000000000000e+00 XOR(1,0)#1.000000000000000e+00 XOR(0,1)#1.000000000000000e+00 XOR(0,0)#0.000000000000000e+00 IF(1,1,2)#1.000000000000000e+00 IF(0,1,2)#2.000000000000000e+00 IF(BREAK,1,2)#2.000000000000000e+00 IF(CONT,1,2)#2.000000000000000e+00 IF(NAN,1,2)#2.000000000000000e+00 IF(UNDEF,1,2)#2.000000000000000e+00 dif(2)#undefined sum(2)#2.000000000000000e+00 FOR(0,1,10,1,sum(1))#1.000000000000000e+01 ngraph-gtk-6.09.05/test/test.sh0000644000175000017500000000046713763661453013175 00000000000000#! /bin/sh NGRAPH=../src/ngraph skip_on_windows() { if [ -n "$MSYSTEM" ] then exit 77 # SKIP the test on Windows. fi } skip_on_ubuntu() { if uname -a | grep -q Ubuntu then exit 77 # SKIP the test on Ubuntu. fi } exec_script() { script=`basename $1 .sh`.nsc LC_ALL=C.UTF-8 $NGRAPH -i $script } ngraph-gtk-6.09.05/test/darray_test.nsc0000644000175000017500000000656713702004142014672 00000000000000#! ../src/ngraph -i STATUS=0 show_result() { if [ "$2" = "$3" ] then echo "OK. ($1)" else echo "error. ($1) $2 $3" STATUS=1 fi } show_result_val() { if [ `iexpr "EQ($2, $3, 14)"` = "1" ] then echo "OK. ($1)" else echo "error. ($1) $2 $3" STATUS=1 fi } new darray darray::@="1 2 3 4 3 2 1" s="${darray::join}" show_result "join" "$s" "1.000000000000000e+00,2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00,3.000000000000000e+00,2.000000000000000e+00,1.000000000000000e+00" darray::rsort s="${darray::join}" show_result "rsort" "$s" "4.000000000000000e+00,3.000000000000000e+00,3.000000000000000e+00,2.000000000000000e+00,2.000000000000000e+00,1.000000000000000e+00,1.000000000000000e+00" darray::sort s="${darray::join}" show_result "sort" "$s" "1.000000000000000e+00,1.000000000000000e+00,2.000000000000000e+00,2.000000000000000e+00,3.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" darray::uniq s="${darray::join}" show_result "uniq" "$s" "1.000000000000000e+00,2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" s="${darray::seq}" show_result "seq" "$s" "0 1 2 3" s="${darray::rseq}" show_result "rseq" "$s" "3 2 1 0" s="${darray::pop}" show_result "pop" "$s" "4" s="${darray::join}" show_result "pop" "$s" "1.000000000000000e+00,2.000000000000000e+00,3.000000000000000e+00" darray::push "4" s="${darray::join}" show_result "push" "$s" "1.000000000000000e+00,2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" s="${darray::shift}" show_result "shift" "$s" "1" s="${darray::join}" show_result "shift" "$s" "2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" darray::unshift "0" s="${darray::join}" show_result "unshift" "$s" "0.000000000000000e+00,2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" s="${darray::get:-2}" show_result "get" "$s" "3" darray::reverse s="${darray::join}" show_result "reverse" "$s" "4.000000000000000e+00,3.000000000000000e+00,2.000000000000000e+00,0.000000000000000e+00" darray::pop darray::reverse s="${darray::join}" show_result "reverse" "$s" "2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" darray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" TEMP_FILE=${system::temp_file} echo "${darray::join:'\n'}" > $TEMP_FILE new file file::file=$TEMP_FILE file::y=1 avg="${file::davy}" sig="${file::dsigy}" min="${file::dminy}" max="${file::dmaxy}" rms=`dexpr "sqrt($sig^2+$avg^2)"` del file s="${darray::sum}" show_result "sum" "$s" "90" s="${darray::average}" show_result_val "average" "$s" "$avg" s="${darray::RMS}" show_result_val "RMS" "$s" "$rms" s="${darray::sdev}" show_result_val "sdev" "$s" "$sig" s="${darray::min}" show_result_val "min" "$s" "$min" s="${darray::max}" show_result_val "max" "$s" "$max" darray::slice 1 3 s="${darray::join}" show_result "slice" "$s" "2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" darray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" darray::slice -4 3 darray::reverse s="${darray::join}" show_result "slice" "$s" "2.000000000000000e+00,3.000000000000000e+00,4.000000000000000e+00" darray::@="1 2 3" darray::map "x ^ 2" s="${darray::join}" show_result "map" "$s" "1.000000000000000e+00,4.000000000000000e+00,9.000000000000000e+00" darray::map "i" s="${darray::join}" show_result "map" "$s" "0.000000000000000e+00,1.000000000000000e+00,2.000000000000000e+00" exit $STATUS ngraph-gtk-6.09.05/test/math_test.sh0000755000175000017500000000014313763661464014202 00000000000000#! /bin/sh . ./test.sh LC_ALL=C.UTF-8 $NGRAPH -i math_test.nsc math_test_old.dat math_test_new.dat ngraph-gtk-6.09.05/test/string_test.sh0000755000175000017500000000005013612541307014536 00000000000000#! /bin/sh . ./test.sh exec_script $0 ngraph-gtk-6.09.05/test/math_test.nsc0000644000175000017500000000120313654735256014346 00000000000000#! ../src/ngraph -i STATUS=0 check_val() { if [ "$1" = "nan" -o "$1" = "undefined" ] then echo $1 else get text -field printf:"%.13E $1" fi } set +e new text new io while [ -n "$1" ] do io::open "$1" while l=`get io -field gets` do eqn=${l%#*} val=`check_val ${l##*#}` RESULT=`dexpr "$eqn"` RESULT=`check_val $RESULT` if [ "$RESULT" != "$val" ] then echo echo error "$eqn" echo ' expected:' "$val" echo ' result:' "$RESULT" echo ' difference:' `dexpr $RESULT-$val` STATUS=1 else echo "OK. ($eqn)" fi done io::close shift done exit $STATUS ngraph-gtk-6.09.05/test/Makefile.am0000644000175000017500000000501213612541307013671 00000000000000TESTS = math_test.sh math_test_utf8.sh string_test.sh iarray_test.sh \ darray_test.sh sarray_test.sh io_test.sh regexp_test.sh EXTRA_DIST = math_test.nsc math_test_utf8.dat math_test_new.dat \ string_test.nsc iarray_test.nsc darray_test.nsc \ sarray_test.nsc io_test.nsc regexp_test.nsc math_test_old.dat \ test.sh $(TESTS) # original Ngraph causes following errors # # error E # expected: 2.718281828459045e+00 # result: 2.718281828459050e+00 # difference: 4.884981308350689e-15 # error UNDEF # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # error ASIN(1/2) # expected: 5.235987755982989e-01 # result: 5.235987755982988e-01 # difference: -1.110223024625157e-16 # error EI(1/2) # expected: 4.542199048631735e-01 # result: 4.542199048631737e-01 # difference: 2.220446049250313e-16 # error EQ(0.1,BREAK) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error EQ(0.1,CONT) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error NEQ(0.1,BREAK) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error NEQ(0.1,CONT) # expected: 0.000000000000000e+00 # result: 1.000000000000000e-01 # difference: 1.000000000000000e-01 # error OR(1,break) # expected: 0.000000000000000e+00 # result: 1.000000000000000e+00 # difference: 1.000000000000000e+00 # error OR(1,cont) # expected: 0.000000000000000e+00 # result: 1.000000000000000e+00 # difference: 1.000000000000000e+00 # error AND(undef,1) # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # error AND(1,undef) # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # error AND(0,undef) # expected: undefined # result: undifined # shell: dexpr: illegal type of argument # difference: # shell: dexpr: illegal type of argument # error dif(2) # expected: undefined # result: # shell: dexpr: illegal type of argument # difference: # shell: dexpr: illegal type of argument # error sum(2) # expected: 2.000000000000000e+00 # result: # difference: -2.000000000000000e+00 # shell: dexpr: illegal type of argument # error FOR(0,1,10,1,sum(1)) # expected: 1.000000000000000e+01 # result: # difference: -1.000000000000000e+01 ngraph-gtk-6.09.05/test/iarray_test.nsc0000644000175000017500000000472113702004142014665 00000000000000#! ../src/ngraph -i STATUS=0 show_result() { if [ "$2" = "$3" ] then echo "OK. ($1)" else echo "error. ($1) $2 $3" STATUS=1 fi } show_result_val() { if [ `iexpr "EQ($2, $3, 14)"` = "1" ] then echo "OK. ($1)" else echo "error. ($1) $2 $3" STATUS=1 fi } new iarray iarray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" s="${iarray::join}" show_result "join" "$s" "1,2,3,4,5,6,7,8,9,0,9,8,7,6,5,4,3,2,1" iarray::rsort s="${iarray::join}" show_result "rsort" "$s" "9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1,0" iarray::sort s="${iarray::join}" show_result "sort" "$s" "0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9" iarray::uniq s="${iarray::join}" show_result "uniq" "$s" "0,1,2,3,4,5,6,7,8,9" s="${iarray::seq}" show_result "seq" "$s" "0 1 2 3 4 5 6 7 8 9" s="${iarray::rseq}" show_result "rseq" "$s" "9 8 7 6 5 4 3 2 1 0" s="${iarray::pop}" show_result "pop" "$s" "9" s="${iarray::join}" show_result "pop" "$s" "0,1,2,3,4,5,6,7,8" iarray::push "9" s="${iarray::join}" show_result "push" "$s" "0,1,2,3,4,5,6,7,8,9" s="${iarray::shift}" show_result "shift" "$s" "0" s="${iarray::join}" show_result "shift" "$s" "1,2,3,4,5,6,7,8,9" iarray::unshift "0" s="${iarray::join}" show_result "unshift" "$s" "0,1,2,3,4,5,6,7,8,9" s="${iarray::get:-2}" show_result "get" "$s" "8" iarray::reverse s="${iarray::join}" show_result "reverse" "$s" "9,8,7,6,5,4,3,2,1,0" iarray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" TEMP_FILE=${system::temp_file} echo "${iarray::join:'\n'}" > $TEMP_FILE new file file::file=$TEMP_FILE file::y=1 avg="${file::davy}" sig="${file::dsigy}" min="${file::dminy}" max="${file::dmaxy}" rms=`dexpr "sqrt($sig^2+$avg^2)"` del file s="${iarray::sum}" show_result "sum" "$s" "90" s="${iarray::average}" show_result_val "average" "$s" "$avg" s="${iarray::RMS}" show_result_val "RMS" "$s" "$rms" s="${iarray::sdev}" show_result_val "sdev" "$s" "$sig" s="${iarray::min}" show_result_val "min" "$s" "$min" s="${iarray::max}" show_result_val "max" "$s" "$max" iarray::slice 1 3 s="${iarray::join}" show_result "slice" "$s" "2,3,4" iarray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" iarray::slice -4 3 iarray::reverse s="${iarray::join}" show_result "slice" "$s" "2,3,4" iarray::@="1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1" iarray::map "x ^ 2" s="${iarray::join}" show_result "map" "$s" "1,4,9,16,25,36,49,64,81,0,81,64,49,36,25,16,9,4,1" iarray::map "i" s="${iarray::join}" show_result "map" "$s" "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18" exit $STATUS ngraph-gtk-6.09.05/config.sub0000755000175000017500000010645014142162475012655 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo "$1" | sed 's/-[^-]*$//'` if [ "$basic_machine" != "$1" ] then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2*) basic_machine=m68k-bull os=-sysv3 ;; e500v[12]) basic_machine=powerpc-unknown os=$os"spe" ;; e500v[12]-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; nsv-tandem) basic_machine=nsv-tandem ;; nsx-tandem) basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh5el) basic_machine=sh5le-unknown ;; simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; x64) basic_machine=x86_64-pc ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) -es1800*) os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -xray | -os68k* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4*) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $basic_machine in arm*) os=-eabi ;; *) os=-elf ;; esac ;; -nacl*) ;; -ios) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; pru-*) os=-elf ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac echo "$basic_machine$os" exit # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ngraph-gtk-6.09.05/depcomp0000755000175000017500000005602014142162476012245 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ngraph-gtk-6.09.05/pathconv.sh0000644000175000017500000000115714143147216013043 00000000000000#! /bin/sh prefix="/usr" datarootdir="${prefix}/share" exec_prefix="${prefix}" PACKAGE_TARNAME="ngraph-gtk" BINDIR="${exec_prefix}/bin" DOCDIR="${datarootdir}/doc/${PACKAGE_TARNAME}" LIBEXECDIR="${exec_prefix}/libexec/ngraph-gtk" LIBDIR="${exec_prefix}/lib/ngraph-gtk" DATADIR="${datarootdir}/ngraph-gtk" CONFDIR="/etc/ngraph-gtk" TARGET=`basename $1 .in` SED="/usr/bin/sed" LC_ALL=C export LC_ALL cat $1 | "$SED" -e "s!BINDIRDEF!$BINDIR!g" \ -e "s!DOCDIRDEF!$DOCDIR!g" \ -e "s!LIBEXECDIRDEF!$LIBEXECDIR!g" \ -e "s!LIBDIRDEF!$LIBDIR!g" \ -e "s!DATADIRDEF!$DATADIR!g" \ -e "s!CONFDIRDEF!$CONFDIR!g" > $TARGET ngraph-gtk-6.09.05/COPYING0000644000175000017500000004312213070106167011714 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ngraph-gtk-6.09.05/po/0000755000175000017500000000000014143613333011355 500000000000000ngraph-gtk-6.09.05/po/remove-potcdate.sin0000644000175000017500000000132014142161772015106 00000000000000# Sed script that removes the POT-Creation-Date line in the header entry # from a POT file. # # Copyright (C) 2002 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ngraph-gtk-6.09.05/po/ngraph-gtk.pot0000644000175000017500000035313314142161772014077 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Ito Hiroyuki # This file is distributed under the same license as the ngraph-gtk package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: ngraph-gtk 6.09.05\n" "Report-Msgid-Bugs-To: ZXB01226@nifty.com\n" "POT-Creation-Date: 2021-10-26 14:49+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:9 msgid "Ngraph-GTK" msgstr "" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:10 msgid "Create scientific 2-dimensional graphs" msgstr "" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:12 src/gtk/x11graph.c:1346 msgid "" "Ngraph is the program to create scientific 2-dimensional graphs for " "researchers and engineers." msgstr "" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:13 msgid "Graphs can be exported to PostScript, SVG, PNG or PDF format." msgstr "" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:22 msgid "Main application window" msgstr "" #: src/gtk/ox11menu.c:1923 msgid "Unsaved Graph" msgstr "" #: src/gtk/ox11dlg.c:114 src/gtk/x11commn.c:1672 msgid "Confirm" msgstr "" #: src/gtk/ox11dlg.c:137 msgid "Message" msgstr "" #: src/gtk/ox11dlg.c:199 src/gtk/ox11dlg.c:412 src/gtk/ox11dlg.c:477 msgid "Input" msgstr "" #: src/gtk/ox11dlg.c:298 src/gtk/ox11dlg.c:353 src/gtk/ox11dlg.c:410 #: src/gtk/ox11dlg.c:564 msgid "Select" msgstr "" #: src/gtk/ox11dlg.c:633 msgid "Open file" msgstr "" #: src/gtk/ox11dlg.c:680 msgid "Open files" msgstr "" #: src/gtk/ox11dlg.c:730 msgid "Save file" msgstr "" #: src/gtk/ogra2cairo.c:45 src/gtk/x11dialg.c:1405 #: src/gtk/data/gtk/menus-tool.ui:42 src/gtk/data/gtk/menus-tool.ui:71 #: src/odraw.c:80 src/odraw.c:88 src/oaxis.c:77 src/oaxis.c:92 msgid "none" msgstr "" #: src/gtk/ogra2cairo.c:46 msgid "default" msgstr "" #: src/gtk/ogra2cairo.c:47 msgid "gray" msgstr "" #: src/gtk/x11axis.c:58 src/gtk/x11opt.c:448 src/gtk/x11opt.c:935 msgid "name" msgstr "" #: src/gtk/x11axis.c:59 msgid "min" msgstr "" #: src/gtk/x11axis.c:60 msgid "max" msgstr "" #: src/gtk/x11axis.c:61 msgid "inc" msgstr "" #: src/gtk/x11axis.c:62 src/gtk/x11file.c:76 msgid "type" msgstr "" #: src/gtk/x11axis.c:65 src/gtk/x11axis.c:190 msgid "dir" msgstr "" #: src/gtk/x11axis.c:66 msgid "len" msgstr "" #: src/gtk/x11axis.c:96 src/gtk/data/gtk/menus-common.ui.in:11 #: src/gtk/data/gtk/menus-common.ui.in:339 #: src/gtk/data/gtk/menus-common-win.ui.in:11 #: src/gtk/data/gtk/menus-common-win.ui.in:347 #: src/gtk/data/gtk/menus-common.ui:11 src/gtk/data/gtk/menus-common.ui:339 msgid "_Frame graph" msgstr "" #: src/gtk/x11axis.c:97 src/gtk/data/gtk/menus-common.ui.in:15 #: src/gtk/data/gtk/menus-common.ui.in:343 #: src/gtk/data/gtk/menus-common-win.ui.in:15 #: src/gtk/data/gtk/menus-common-win.ui.in:351 #: src/gtk/data/gtk/menus-common.ui:15 src/gtk/data/gtk/menus-common.ui:343 msgid "_Section graph" msgstr "" #: src/gtk/x11axis.c:98 src/gtk/data/gtk/menus-common.ui.in:19 #: src/gtk/data/gtk/menus-common.ui.in:347 #: src/gtk/data/gtk/menus-common-win.ui.in:19 #: src/gtk/data/gtk/menus-common-win.ui.in:355 #: src/gtk/data/gtk/menus-common.ui:19 src/gtk/data/gtk/menus-common.ui:347 msgid "_Cross graph" msgstr "" #: src/gtk/x11axis.c:99 src/gtk/data/gtk/menus-common.ui.in:351 #: src/gtk/data/gtk/menus-common-win.ui.in:359 #: src/gtk/data/gtk/menus-common.ui:351 msgid "Single _Axis" msgstr "" #: src/gtk/x11axis.c:104 src/gtk/x11file.c:132 src/gtk/x11file.c:1976 #: src/gtk/x11file.c:2181 src/gtk/x11graph.c:740 src/gtk/x11lgnd.c:1156 #: src/gtk/x11menu.c:406 src/gtk/x11merge.c:69 src/gtk/x11opt.c:702 #: src/gtk/data/gtk/menus-common.ui.in:295 #: src/gtk/data/gtk/menus-common.ui.in:336 #: src/gtk/data/gtk/menus-common.ui.in:381 #: src/gtk/data/gtk/menus-common.ui.in:465 #: src/gtk/data/gtk/menus-common.ui.in:482 #: src/gtk/data/gtk/menus-common-win.ui.in:303 #: src/gtk/data/gtk/menus-common-win.ui.in:344 #: src/gtk/data/gtk/menus-common-win.ui.in:389 #: src/gtk/data/gtk/menus-common-win.ui.in:473 #: src/gtk/data/gtk/menus-common-win.ui.in:490 #: src/gtk/data/gtk/menus-common.ui:295 src/gtk/data/gtk/menus-common.ui:336 #: src/gtk/data/gtk/menus-common.ui:381 src/gtk/data/gtk/menus-common.ui:465 #: src/gtk/data/gtk/menus-common.ui:482 src/gtk/x11opt_proto.h:272 msgid "_Add" msgstr "" #: src/gtk/x11axis.c:106 src/gtk/x11file.c:134 src/gtk/x11lgnd.c:217 #: src/gtk/x11merge.c:70 src/gtk/data/gtk/menus-common.ui.in:154 #: src/gtk/data/gtk/menus-common.ui.in:588 #: src/gtk/data/gtk/menus-common-win.ui.in:162 #: src/gtk/data/gtk/menus-common-win.ui.in:596 #: src/gtk/data/gtk/menus-common.ui:154 src/gtk/data/gtk/menus-common.ui:588 msgid "_Duplicate" msgstr "" #: src/gtk/x11axis.c:107 src/gtk/x11axis.c:319 src/gtk/x11file.c:136 #: src/gtk/x11file.c:823 src/gtk/x11file.c:1658 src/gtk/x11lgnd.c:219 #: src/gtk/x11lgnd.c:1161 src/gtk/x11lgnd.c:1454 src/gtk/x11lgnd.c:1570 #: src/gtk/x11lgnd.c:1669 src/gtk/x11lgnd.c:1807 src/gtk/x11lgnd.c:2034 #: src/gtk/x11merge.c:71 src/gtk/data/gtk/menus-common.ui.in:149 #: src/gtk/data/gtk/menus-common.ui.in:361 #: src/gtk/data/gtk/menus-common.ui.in:389 #: src/gtk/data/gtk/menus-common.ui.in:404 #: src/gtk/data/gtk/menus-common.ui.in:417 #: src/gtk/data/gtk/menus-common.ui.in:430 #: src/gtk/data/gtk/menus-common.ui.in:443 #: src/gtk/data/gtk/menus-common.ui.in:456 #: src/gtk/data/gtk/menus-common.ui.in:490 #: src/gtk/data/gtk/menus-common.ui.in:584 #: src/gtk/data/gtk/menus-common-win.ui.in:157 #: src/gtk/data/gtk/menus-common-win.ui.in:369 #: src/gtk/data/gtk/menus-common-win.ui.in:397 #: src/gtk/data/gtk/menus-common-win.ui.in:412 #: src/gtk/data/gtk/menus-common-win.ui.in:425 #: src/gtk/data/gtk/menus-common-win.ui.in:438 #: src/gtk/data/gtk/menus-common-win.ui.in:451 #: src/gtk/data/gtk/menus-common-win.ui.in:464 #: src/gtk/data/gtk/menus-common-win.ui.in:498 #: src/gtk/data/gtk/menus-common-win.ui.in:592 #: src/gtk/data/gtk/menus-common.ui:149 src/gtk/data/gtk/menus-common.ui:361 #: src/gtk/data/gtk/menus-common.ui:389 src/gtk/data/gtk/menus-common.ui:404 #: src/gtk/data/gtk/menus-common.ui:417 src/gtk/data/gtk/menus-common.ui:430 #: src/gtk/data/gtk/menus-common.ui:443 src/gtk/data/gtk/menus-common.ui:456 #: src/gtk/data/gtk/menus-common.ui:490 src/gtk/data/gtk/menus-common.ui:584 msgid "_Delete" msgstr "" #: src/gtk/x11axis.c:109 src/gtk/x11lgnd.c:221 msgid "_Focus" msgstr "" #: src/gtk/x11axis.c:110 src/gtk/x11lgnd.c:222 src/gtk/x11merge.c:74 msgid "focus _All" msgstr "" #: src/gtk/x11axis.c:111 src/gtk/x11axis.c:1274 msgid "_Clear" msgstr "" #: src/gtk/x11axis.c:112 src/gtk/x11file.c:139 src/gtk/x11lgnd.c:223 #: src/gtk/data/gtk/menus-common.ui.in:309 #: src/gtk/data/gtk/menus-common.ui.in:357 #: src/gtk/data/gtk/menus-common.ui.in:385 #: src/gtk/data/gtk/menus-common.ui.in:400 #: src/gtk/data/gtk/menus-common.ui.in:413 #: src/gtk/data/gtk/menus-common.ui.in:426 #: src/gtk/data/gtk/menus-common.ui.in:439 #: src/gtk/data/gtk/menus-common.ui.in:452 #: src/gtk/data/gtk/menus-common.ui.in:469 #: src/gtk/data/gtk/menus-common.ui.in:486 #: src/gtk/data/gtk/menus-common.ui.in:594 #: src/gtk/data/gtk/menus-common-win.ui.in:317 #: src/gtk/data/gtk/menus-common-win.ui.in:365 #: src/gtk/data/gtk/menus-common-win.ui.in:393 #: src/gtk/data/gtk/menus-common-win.ui.in:408 #: src/gtk/data/gtk/menus-common-win.ui.in:421 #: src/gtk/data/gtk/menus-common-win.ui.in:434 #: src/gtk/data/gtk/menus-common-win.ui.in:447 #: src/gtk/data/gtk/menus-common-win.ui.in:460 #: src/gtk/data/gtk/menus-common-win.ui.in:477 #: src/gtk/data/gtk/menus-common-win.ui.in:494 #: src/gtk/data/gtk/menus-common-win.ui.in:602 #: src/gtk/data/gtk/menus-common.ui:309 src/gtk/data/gtk/menus-common.ui:357 #: src/gtk/data/gtk/menus-common.ui:385 src/gtk/data/gtk/menus-common.ui:400 #: src/gtk/data/gtk/menus-common.ui:413 src/gtk/data/gtk/menus-common.ui:426 #: src/gtk/data/gtk/menus-common.ui:439 src/gtk/data/gtk/menus-common.ui:452 #: src/gtk/data/gtk/menus-common.ui:469 src/gtk/data/gtk/menus-common.ui:486 #: src/gtk/data/gtk/menus-common.ui:594 msgid "_Properties" msgstr "" #: src/gtk/x11axis.c:113 src/gtk/x11file.c:140 src/gtk/x11lgnd.c:224 #: src/gtk/x11merge.c:76 msgid "_Instance name" msgstr "" #: src/gtk/x11axis.c:115 src/gtk/x11file.c:143 src/gtk/x11graph.c:754 #: src/gtk/x11lgnd.c:226 src/gtk/x11merge.c:78 #: src/gtk/data/gtk/menus-common.ui.in:169 #: src/gtk/data/gtk/menus-common.ui.in:659 #: src/gtk/data/gtk/menus-common-win.ui.in:177 #: src/gtk/data/gtk/menus-common-win.ui.in:667 #: src/gtk/data/gtk/menus-common.ui:169 src/gtk/data/gtk/menus-common.ui:659 msgid "_Top" msgstr "" #: src/gtk/x11axis.c:116 src/gtk/x11file.c:144 src/gtk/x11graph.c:760 #: src/gtk/x11lgnd.c:227 src/gtk/x11merge.c:79 src/gtk/x11opt.c:721 #: src/gtk/data/gtk/menus-common.ui.in:174 #: src/gtk/data/gtk/menus-common.ui.in:663 #: src/gtk/data/gtk/menus-common-win.ui.in:182 #: src/gtk/data/gtk/menus-common-win.ui.in:671 #: src/gtk/data/gtk/menus-common.ui:174 src/gtk/data/gtk/menus-common.ui:663 #: src/gtk/x11opt_proto.h:298 msgid "_Up" msgstr "" #: src/gtk/x11axis.c:117 src/gtk/x11file.c:145 src/gtk/x11graph.c:766 #: src/gtk/x11lgnd.c:228 src/gtk/x11merge.c:80 src/gtk/x11opt.c:714 #: src/gtk/data/gtk/menus-common.ui.in:178 #: src/gtk/data/gtk/menus-common.ui.in:667 #: src/gtk/data/gtk/menus-common-win.ui.in:186 #: src/gtk/data/gtk/menus-common-win.ui.in:675 #: src/gtk/data/gtk/menus-common.ui:178 src/gtk/data/gtk/menus-common.ui:667 #: src/gtk/x11opt_proto.h:291 msgid "_Down" msgstr "" #: src/gtk/x11axis.c:118 src/gtk/x11file.c:146 src/gtk/x11graph.c:772 #: src/gtk/x11lgnd.c:229 src/gtk/x11merge.c:81 #: src/gtk/data/gtk/menus-common.ui.in:182 #: src/gtk/data/gtk/menus-common.ui.in:671 #: src/gtk/data/gtk/menus-common-win.ui.in:190 #: src/gtk/data/gtk/menus-common-win.ui.in:679 #: src/gtk/data/gtk/menus-common.ui:182 src/gtk/data/gtk/menus-common.ui:671 msgid "_Bottom" msgstr "" #: src/gtk/x11axis.c:136 msgid "" "%a\tThe abbreviated weekday name.\n" "%A\tThe full weekday name.\n" "%b\tThe abbreviated month name.\n" "%B\tThe full month name.\n" "%c\tEquivalent to %a %b %e %T %Y.\n" "%C\tThe century number (year/100).\n" "%d\tThe day of the month (01 to 31).\n" "%e\tThe day of the month (1 to 31).\n" "%F\tEquivalent to %Y-%m-%d.\n" "%H\tThe hour (00 to 23).\n" "%I\tThe hour (01 to 12).\n" "%j\tThe day of the year (001 to 366).\n" "%k\tThe hour (0 to 23).\n" "%l\tThe hour (1 to 12).\n" "%m\tThe month (01 to 12).\n" "%M\tThe minute (00 to 59).\n" "%n\tA newline character.\n" "%p\tEither \"AM\" or \"PM\".\n" "%P\tEither \"am\" or \"pm\".\n" "%r\tEquivalent to %I:%M:%S %p.\n" "%R\tEquivalent to %H:%M.\n" "%S\tThe second (00 to 60).\n" "%T\tEquivalent to %H:%M:%S.\n" "%u\tThe day of the week, Monday being 1 (1 to 7).\n" "%w\tThe day of the week, Sunday being 0 (0 to 6).\n" "%y\tThe year without a century (00 to 99).\n" "%Y\tThe year including the century.\n" "%+\tEquivalent to %a %b %e %T GMT %Y.\n" "%%\tA literal '%' character." msgstr "" #: src/gtk/x11axis.c:286 #, c-format msgid "_Style %d:" msgstr "" #: src/gtk/x11axis.c:292 src/gtk/x11axis.c:1611 #, c-format msgid "_Width %d:" msgstr "" #: src/gtk/x11axis.c:309 #, c-format msgid "Grid %d" msgstr "" #: src/gtk/x11axis.c:328 msgid "Axis (_X):" msgstr "" #: src/gtk/x11axis.c:331 msgid "draw _X grid" msgstr "" #: src/gtk/x11axis.c:336 msgid "Axis (_Y):" msgstr "" #: src/gtk/x11axis.c:339 msgid "draw _Y grid" msgstr "" #: src/gtk/x11axis.c:343 src/gtk/x11menu.c:257 msgid "Axis" msgstr "" #: src/gtk/x11axis.c:357 src/gtk/x11axis.c:1423 src/gtk/x11axis.c:1607 #: src/gtk/x11axis.c:2069 src/gtk/x11lgnd.c:1214 src/gtk/x11lgnd.c:1234 #: src/gtk/x11lgnd.c:1244 src/gtk/x11lgndx.c:419 msgid "_Color:" msgstr "" #: src/gtk/x11axis.c:360 msgid "_Background" msgstr "" #: src/gtk/x11axis.c:366 src/gtk/x11opt.c:1613 msgid "_Background Color:" msgstr "" #: src/gtk/x11axis.c:369 src/gtk/x11axis.c:3245 src/gtk/x11axis.c:3266 #: src/gtk/x11axis.c:3299 src/gtk/x11lgnd.c:3063 src/gtk/x11lgnd.c:3074 #: src/gtk/x11lgnd.c:3503 src/gtk/gtk_widget.c:934 msgid "Color" msgstr "" #: src/gtk/x11axis.c:382 src/gtk/x11axis.c:1622 msgid "Style" msgstr "" #: src/gtk/x11axis.c:678 src/gtk/x11axis.c:903 msgid "Graph _Width:" msgstr "" #: src/gtk/x11axis.c:682 src/gtk/x11axis.c:907 msgid "Graph _Height:" msgstr "" #: src/gtk/x11axis.c:693 src/gtk/x11axis.c:918 msgid "_X axis" msgstr "" #: src/gtk/x11axis.c:707 src/gtk/x11axis.c:932 msgid "_Y axis" msgstr "" #: src/gtk/x11axis.c:721 msgid "_U axis" msgstr "" #: src/gtk/x11axis.c:735 msgid "_R axis" msgstr "" #: src/gtk/x11axis.c:749 src/gtk/data/gtk/menus-common.ui.in:283 #: src/gtk/data/gtk/menus-common.ui.in:378 #: src/gtk/data/gtk/menus-common-win.ui.in:291 #: src/gtk/data/gtk/menus-common-win.ui.in:386 #: src/gtk/data/gtk/menus-common.ui:283 src/gtk/data/gtk/menus-common.ui:378 msgid "_Grid" msgstr "" #: src/gtk/x11axis.c:1030 msgid "_Zoom:" msgstr "" #: src/gtk/x11axis.c:1152 msgid "autoscale (multi select)" msgstr "" #: src/gtk/x11axis.c:1260 src/gtk/x11axis.c:1586 src/gtk/x11file.c:1721 #: src/gtk/x11parameter.c:133 msgid "_Min:" msgstr "" #: src/gtk/x11axis.c:1264 src/gtk/x11axis.c:1591 src/gtk/x11file.c:1725 #: src/gtk/x11parameter.c:137 msgid "_Max:" msgstr "" #: src/gtk/x11axis.c:1268 msgid "_Inc:" msgstr "" #: src/gtk/x11axis.c:1278 src/gtk/data/gtk/menus-common.ui.in:292 #: src/gtk/data/gtk/menus-common-win.ui.in:300 #: src/gtk/data/gtk/menus-common.ui:292 msgid "_Data" msgstr "" #: src/gtk/x11axis.c:1286 msgid "_Scale:" msgstr "" #: src/gtk/x11axis.c:1290 src/gtk/x11file.c:1729 src/gtk/x11print.c:89 msgid "_Div:" msgstr "" #: src/gtk/x11axis.c:1294 msgid "_Ref:" msgstr "" #: src/gtk/x11axis.c:1298 msgid "_Auto scale margin:" msgstr "" #: src/gtk/x11axis.c:1301 src/gtk/x11axis.c:3316 src/oparameter.c:37 msgid "Scale" msgstr "" #: src/gtk/x11axis.c:1409 msgid "Draw _Baseline" msgstr "" #: src/gtk/x11axis.c:1415 src/gtk/x11file.c:3347 src/gtk/x11lgnd.c:1184 #: src/gtk/x11lgndx.c:403 msgid "Line _Style:" msgstr "" #: src/gtk/x11axis.c:1419 src/gtk/x11file.c:3351 src/gtk/x11lgndx.c:407 msgid "_Line Width:" msgstr "" #: src/gtk/x11axis.c:1426 src/gtk/x11axis.c:3229 msgid "Baseline" msgstr "" #: src/gtk/x11axis.c:1436 src/gtk/x11axis.c:1458 msgid "_Position:" msgstr "" #: src/gtk/x11axis.c:1441 msgid "_Arrow length:" msgstr "" #: src/gtk/x11axis.c:1446 msgid "_Arrow width:" msgstr "" #: src/gtk/x11axis.c:1449 src/gtk/x11axis.c:3239 msgid "Arrow" msgstr "" #: src/gtk/x11axis.c:1462 msgid "_Wave length:" msgstr "" #: src/gtk/x11axis.c:1466 msgid "_Wave width:" msgstr "" #: src/gtk/x11axis.c:1469 src/gtk/x11axis.c:3242 msgid "Wave" msgstr "" #: src/gtk/x11axis.c:1581 msgid "_Gauge:" msgstr "" #: src/gtk/x11axis.c:1594 src/gtk/x11axis.c:1856 msgid "Range" msgstr "" #: src/gtk/x11axis.c:1603 msgid "_Style:" msgstr "" #: src/gtk/x11axis.c:1616 #, c-format msgid "_Length %d:" msgstr "" #: src/gtk/x11axis.c:1841 msgid "_Numbering:" msgstr "" #: src/gtk/x11axis.c:1845 msgid "_Begin:" msgstr "" #: src/gtk/x11axis.c:1849 src/gtk/x11parameter.c:141 src/gtk/x11parameter.c:202 msgid "_Step:" msgstr "" #: src/gtk/x11axis.c:1853 msgid "_Num:" msgstr "" #: src/gtk/x11axis.c:1865 msgid "_Align:" msgstr "" #: src/gtk/x11axis.c:1869 src/gtk/x11axis.c:2171 src/gtk/x11lgnd.c:1921 msgid "_Direction:" msgstr "" #: src/gtk/x11axis.c:1874 msgid "shift (_P):" msgstr "" #: src/gtk/x11axis.c:1878 msgid "shift (_N):" msgstr "" #: src/gtk/x11axis.c:1881 src/gtk/x11axis.c:2183 src/gtk/x11axis.c:3262 #: src/gtk/x11axis.c:3283 msgid "Position" msgstr "" #: src/gtk/x11axis.c:1892 msgid "_Fraction:" msgstr "" #: src/gtk/x11axis.c:1896 msgid "_Head:" msgstr "" #: src/gtk/x11axis.c:1900 msgid "_Tail:" msgstr "" #: src/gtk/x11axis.c:1905 msgid "_Date/time format:" msgstr "" #: src/gtk/x11axis.c:1909 msgid "_Auto normalization:" msgstr "" #: src/gtk/x11axis.c:1912 msgid "_Log power" msgstr "" #: src/gtk/x11axis.c:1916 msgid "_Add plus" msgstr "" #: src/gtk/x11axis.c:1921 msgid "_Zero:" msgstr "" #: src/gtk/x11axis.c:1925 msgid "numbering _Math:" msgstr "" #: src/gtk/x11axis.c:1928 msgid "Format" msgstr "" #: src/gtk/x11axis.c:2039 msgid "_Point:" msgstr "" #: src/gtk/x11axis.c:2043 src/gtk/x11lgnd.c:1885 msgid "_Space:" msgstr "" #: src/gtk/x11axis.c:2047 msgid "_Script size:" msgstr "" #: src/gtk/x11axis.c:2051 src/gtk/x11lgnd.c:1895 src/gtk/x11opt.c:680 msgid "_Font:" msgstr "" #: src/gtk/x11axis.c:2056 src/gtk/x11lgnd.c:1900 msgid "_Bold" msgstr "" #: src/gtk/x11axis.c:2061 src/gtk/x11lgnd.c:1905 msgid "_Italic" msgstr "" #: src/gtk/x11axis.c:2072 src/gtk/x11axis.c:3292 src/gtk/x11dialg.c:245 #: src/gtk/x11lgnd.c:3501 src/gtk/x11opt.c:1238 msgid "Font" msgstr "" #: src/gtk/x11axis.c:2167 msgid "_Length:" msgstr "" #: src/gtk/x11axis.c:2175 msgid "_Adjust:" msgstr "" #: src/gtk/x11axis.c:2179 msgid "Adjust _Position:" msgstr "" #: src/gtk/x11axis.c:2205 #, c-format msgid "Axis %d %s" msgstr "" #: src/gtk/x11axis.c:2214 msgid "_Scale" msgstr "" #: src/gtk/x11axis.c:2218 msgid "_Baseline" msgstr "" #: src/gtk/x11axis.c:2222 msgid "_Gauge" msgstr "" #: src/gtk/x11axis.c:2226 msgid "_Numbering" msgstr "" #: src/gtk/x11axis.c:2230 msgid "_Font" msgstr "" #: src/gtk/x11axis.c:2234 msgid "_Position" msgstr "" #: src/gtk/x11axis.c:2601 msgid "delete axis (single select)" msgstr "" #: src/gtk/x11axis.c:2624 msgid "axis property (single select)" msgstr "" #: src/gtk/x11axis.c:2659 msgid "scale zoom (multi select)" msgstr "" #: src/gtk/x11axis.c:2735 msgid "scale clear (multi select)" msgstr "" #: src/gtk/x11axis.c:2800 msgid "delete grid (multi select)" msgstr "" #: src/gtk/x11axis.c:2829 msgid "grid property (multi select)" msgstr "" #: src/gtk/x11axis.c:3013 msgid "scale undo (multi select)" msgstr "" #: src/gtk/x11axis.c:3236 src/gtk/x11menu.c:459 msgid "Draw" msgstr "" #: src/gtk/x11axis.c:3255 msgid "Gauge" msgstr "" #: src/gtk/x11axis.c:3276 msgid "Numbering" msgstr "" #: src/gtk/x11axis.c:3286 msgid "Align" msgstr "" #: src/gtk/x11axis.c:3289 msgid "Direction" msgstr "" #: src/gtk/x11axis.c:3301 msgid "Log power" msgstr "" #: src/gtk/x11axis.c:3303 msgid "Zero" msgstr "" #: src/gtk/x11commn.c:1260 src/gtk/x11menu.c:434 msgid "Save NGP file" msgstr "" #: src/gtk/x11commn.c:1285 src/gtk/x11opt.c:1778 #, c-format msgid "Saving `%.128s'." msgstr "" #: src/gtk/x11commn.c:1478 #, c-format msgid "Loading `%.128s'." msgstr "" #: src/gtk/x11commn.c:1671 msgid "" "This graph is modified.\n" "Save this graph?" msgstr "" #: src/gtk/x11commn.c:1900 msgid "Ngraph.ini is not found." msgstr "" #: src/gtk/x11commn.c:1903 msgid "Ngraph.ini is write protected." msgstr "" #: src/gtk/x11commn.c:1918 #, c-format msgid "Install `Ngraph.ini' to %s ?" msgstr "" #: src/gtk/x11commn.c:1922 msgid "Ngraph.ini could not be copied." msgstr "" #: src/gtk/x11commn.c:2014 msgid "_Stop" msgstr "" #: src/gtk/x11commn.c:2057 msgid "error" msgstr "" #: src/gtk/x11dialg.c:52 src/gtk/x11opt.c:1617 msgid "solid" msgstr "" #: src/gtk/x11dialg.c:53 src/gtk/x11opt.c:1618 msgid "dot" msgstr "" #: src/gtk/x11dialg.c:54 msgid "short dash" msgstr "" #: src/gtk/x11dialg.c:55 msgid "dash" msgstr "" #: src/gtk/x11dialg.c:56 msgid "dot dash" msgstr "" #: src/gtk/x11dialg.c:57 msgid "2-dot dash" msgstr "" #: src/gtk/x11dialg.c:58 msgid "dot 2-dash" msgstr "" #: src/gtk/x11dialg.c:64 msgid "auto" msgstr "" #: src/gtk/x11dialg.c:124 src/gtk/x11merge.c:52 src/gtk/x11opt.c:449 #: src/odata.c:233 msgid "file" msgstr "" #: src/gtk/x11dialg.c:127 src/gtk/x11dialg.c:145 src/gtk/x11dialg.c:205 msgid "mark selection" msgstr "" #: src/gtk/x11dialg.c:130 msgid "function" msgstr "" #: src/gtk/x11dialg.c:136 src/odata.c:234 msgid "array" msgstr "" #: src/gtk/x11dialg.c:142 msgid "data default" msgstr "" #: src/gtk/x11dialg.c:148 msgid "evaluation" msgstr "" #: src/gtk/x11dialg.c:151 src/gtk/x11file.c:682 msgid "math" msgstr "" #: src/gtk/x11dialg.c:154 msgid "math text" msgstr "" #: src/gtk/x11dialg.c:157 src/odata.c:267 msgid "fit" msgstr "" #: src/gtk/x11dialg.c:160 msgid "fit load" msgstr "" #: src/gtk/x11dialg.c:164 msgid "fit save" msgstr "" #: src/gtk/x11dialg.c:167 msgid "Frame/Section Graph" msgstr "" #: src/gtk/x11dialg.c:170 src/gtk/x11menu.c:356 msgid "Cross Graph" msgstr "" #: src/gtk/x11dialg.c:173 msgid "axis" msgstr "" #: src/gtk/x11dialg.c:176 msgid "grid" msgstr "" #: src/gtk/x11dialg.c:179 msgid "grid default" msgstr "" #: src/gtk/x11dialg.c:182 msgid "Scale Zoom" msgstr "" #: src/gtk/x11dialg.c:186 msgid "merge" msgstr "" #: src/gtk/x11dialg.c:189 msgid "parameter" msgstr "" #: src/gtk/x11dialg.c:193 msgid "legend line" msgstr "" #: src/gtk/x11dialg.c:196 msgid "legend rectangle" msgstr "" #: src/gtk/x11dialg.c:199 msgid "legend arc" msgstr "" #: src/gtk/x11dialg.c:202 msgid "legend mark" msgstr "" #: src/gtk/x11dialg.c:208 msgid "legend text" msgstr "" #: src/gtk/x11dialg.c:211 msgid "text default" msgstr "" #: src/gtk/x11dialg.c:214 msgid "legend gauss" msgstr "" #: src/gtk/x11dialg.c:217 msgid "page" msgstr "" #: src/gtk/x11dialg.c:220 msgid "drawobj" msgstr "" #: src/gtk/x11dialg.c:223 src/gtk/x11graph.c:898 msgid "directory" msgstr "" #: src/gtk/x11dialg.c:227 msgid "load" msgstr "" #: src/gtk/x11dialg.c:230 msgid "save" msgstr "" #: src/gtk/x11dialg.c:233 msgid "output data" msgstr "" #: src/gtk/x11dialg.c:236 msgid "save default" msgstr "" #: src/gtk/x11dialg.c:239 msgid "Add-in script" msgstr "" #: src/gtk/x11dialg.c:242 msgid "Add-in script setup" msgstr "" #: src/gtk/x11dialg.c:248 src/gtk/x11opt.c:1257 msgid "Miscellaneous" msgstr "" #: src/gtk/x11dialg.c:251 msgid "External viewer" msgstr "" #: src/gtk/x11dialg.c:254 msgid "Viewer" msgstr "" #: src/gtk/x11dialg.c:257 msgid "multi select" msgstr "" #: src/gtk/x11dialg.c:260 msgid "single select" msgstr "" #: src/gtk/x11dialg.c:263 msgid "output image" msgstr "" #: src/gtk/x11dialg.c:343 msgid "_All" msgstr "" #: src/gtk/x11dialg.c:350 src/gtk/x11file.c:721 src/gtk/x11file.c:1987 #: src/gtk/x11file.c:2192 src/gtk/x11view.c:1106 #: src/gtk/data/gtk/menus-common.ui.in:159 #: src/gtk/data/gtk/menus-common-win.ui.in:167 #: src/gtk/data/gtk/menus-common.ui:159 msgid "Select _All" msgstr "" #: src/gtk/x11dialg.c:563 msgid "copy property (single select)" msgstr "" #: src/gtk/x11file.c:71 msgid "file/range" msgstr "" #: src/gtk/x11file.c:74 msgid "ax" msgstr "" #: src/gtk/x11file.c:75 msgid "ay" msgstr "" #: src/gtk/x11file.c:77 src/gtk/x11lgnd.c:158 msgid "size" msgstr "" #: src/gtk/x11file.c:78 src/gtk/x11lgnd.c:76 src/gtk/x11lgnd.c:132 msgid "width" msgstr "" #: src/gtk/x11file.c:79 msgid "skip" msgstr "" #: src/gtk/x11file.c:80 msgid "step" msgstr "" #: src/gtk/x11file.c:81 msgid "final" msgstr "" #: src/gtk/x11file.c:82 msgid "num" msgstr "" #: src/gtk/x11file.c:124 src/gtk/data/gtk/menus-common.ui.in:298 #: src/gtk/data/gtk/menus-common-win.ui.in:306 #: src/gtk/data/gtk/menus-common.ui:298 msgid "_File" msgstr "" #: src/gtk/x11file.c:125 src/gtk/data/gtk/menus-common.ui.in:303 #: src/gtk/data/gtk/menus-common-win.ui.in:311 #: src/gtk/data/gtk/menus-common.ui:303 msgid "_Range" msgstr "" #: src/gtk/x11file.c:127 msgid "_Recent file" msgstr "" #: src/gtk/x11file.c:135 msgid "duplicate _Behind" msgstr "" #: src/gtk/x11file.c:138 src/gtk/x11file.c:1761 src/gtk/x11menu.c:458 #: src/gtk/data/gtk/menus-common.ui.in:241 #: src/gtk/data/gtk/menus-common-win.ui.in:249 #: src/gtk/data/gtk/menus-common.ui:241 msgid "_Draw" msgstr "" #: src/gtk/x11file.c:141 src/gtk/x11file.c:727 src/gtk/x11file.c:3923 #: src/gtk/data/gtk/menus-common.ui.in:119 #: src/gtk/data/gtk/menus-common.ui.in:317 #: src/gtk/data/gtk/menus-common-win.ui.in:127 #: src/gtk/data/gtk/menus-common-win.ui.in:325 #: src/gtk/data/gtk/menus-common.ui:119 src/gtk/data/gtk/menus-common.ui:317 msgid "_Edit" msgstr "" #: src/gtk/x11file.c:186 msgid "functions" msgstr "" #: src/gtk/x11file.c:189 msgid "constants" msgstr "" #: src/gtk/x11file.c:230 msgid "current equations" msgstr "" #: src/gtk/x11file.c:299 msgid "Math X" msgstr "" #: src/gtk/x11file.c:299 msgid "Math Y" msgstr "" #: src/gtk/x11file.c:308 src/gtk/x11file.c:2592 msgid "single line" msgstr "" #: src/gtk/x11file.c:315 src/gtk/x11file.c:2595 msgid "multi line" msgstr "" #: src/gtk/x11file.c:685 msgid "_X math" msgstr "" #: src/gtk/x11file.c:686 msgid "_Y math" msgstr "" #: src/gtk/x11file.c:736 src/gtk/x11view.c:1122 #: src/gtk/data/gtk/menus-common.ui.in:313 #: src/gtk/data/gtk/menus-common.ui.in:473 #: src/gtk/data/gtk/menus-common-win.ui.in:321 #: src/gtk/data/gtk/menus-common-win.ui.in:481 #: src/gtk/data/gtk/menus-common.ui:313 src/gtk/data/gtk/menus-common.ui:473 #: src/gtk/x11opt_proto.h:310 msgid "_Close" msgstr "" #: src/gtk/x11file.c:830 msgid "_Profile:" msgstr "" #: src/gtk/x11file.c:867 msgid "Please specify the profile." msgstr "" #: src/gtk/x11file.c:973 msgid "Setting file not found." msgstr "" #: src/gtk/x11file.c:1012 msgid "No settings." msgstr "" #: src/gtk/x11file.c:1034 msgid "Overwrite existing profile?" msgstr "" #: src/gtk/x11file.c:1121 #, c-format msgid "Delete the profile '%s'?" msgstr "" #: src/gtk/x11file.c:1132 #, c-format msgid "The profile '%s' is not exist." msgstr "" #: src/gtk/x11file.c:1218 #, c-format msgid "The profile '%s' is saved." msgstr "" #: src/gtk/x11file.c:1223 #, c-format msgid "The profile '%s' is deleted." msgstr "" #: src/gtk/x11file.c:1413 msgid "Fitting Results" msgstr "" #: src/gtk/x11file.c:1594 msgid "_Formula:" msgstr "" #: src/gtk/x11file.c:1600 msgid "_Converge (%):" msgstr "" #: src/gtk/x11file.c:1603 msgid "_Derivatives" msgstr "" #: src/gtk/x11file.c:1637 msgid "User definition" msgstr "" #: src/gtk/x11file.c:1650 #, c-format msgid "Fit %d" msgstr "" #: src/gtk/x11file.c:1665 src/gtk/x11file.c:3315 src/gtk/x11lgnd.c:1472 #: src/gtk/x11parameter.c:310 msgid "_Type:" msgstr "" #: src/gtk/x11file.c:1673 msgid "_Dim:" msgstr "" #: src/gtk/x11file.c:1687 msgid "_Weight:" msgstr "" #: src/gtk/x11file.c:1695 msgid "_Through" msgstr "" #: src/gtk/x11file.c:1714 msgid "Action" msgstr "" #: src/gtk/x11file.c:1732 msgid "_Interpolation" msgstr "" #: src/gtk/x11file.c:1739 msgid "Draw X range" msgstr "" #: src/gtk/x11file.c:1751 src/gtk/x11file.c:3449 msgid "_Load" msgstr "" #: src/gtk/x11file.c:1755 src/gtk/x11gui.c:1209 src/gtk/x11menu.c:432 #: src/gtk/x11opt.c:455 src/gtk/x11opt.c:942 src/gtk/x11opt.c:1144 #: src/gtk/x11opt.c:1490 src/gtk/x11opt.c:1598 #: src/gtk/data/gtk/menus-common.ui.in:38 #: src/gtk/data/gtk/menus-common.ui.in:685 #: src/gtk/data/gtk/menus-common-win.ui.in:38 #: src/gtk/data/gtk/menus-common-win.ui.in:693 #: src/gtk/data/gtk/menus-common.ui:38 src/gtk/data/gtk/menus-common.ui:685 msgid "_Save" msgstr "" #: src/gtk/x11file.c:1765 msgid "_Result" msgstr "" #: src/gtk/x11file.c:1942 src/gtk/x11file.c:2159 src/gtk/x11view.c:1078 msgid "Line No." msgstr "" #: src/gtk/x11file.c:1963 src/gtk/x11file.c:2168 msgid "_Line:" msgstr "" #: src/gtk/x11file.c:1981 src/gtk/x11file.c:2186 src/gtk/x11graph.c:778 #: src/gtk/x11opt.c:707 src/gtk/x11opt_proto.h:284 msgid "_Remove" msgstr "" #: src/gtk/x11file.c:2315 msgid "_Head skip:" msgstr "" #: src/gtk/x11file.c:2319 msgid "_Read step:" msgstr "" #: src/gtk/x11file.c:2323 msgid "_Final line:" msgstr "" #: src/gtk/x11file.c:2328 msgid "_Remark:" msgstr "" #: src/gtk/x11file.c:2332 msgid "_IFS:" msgstr "" #: src/gtk/x11file.c:2335 msgid "_CSV" msgstr "" #: src/gtk/x11file.c:2546 src/gtk/x11file.c:2570 msgid "_X math:" msgstr "" #: src/gtk/x11file.c:2547 src/gtk/x11file.c:2574 msgid "_Y math:" msgstr "" #: src/gtk/x11file.c:2615 msgid "_X smooth:" msgstr "" #: src/gtk/x11file.c:2620 msgid "_Averaging type:" msgstr "" #: src/gtk/x11file.c:2625 msgid "_Y smooth:" msgstr "" #: src/gtk/x11file.c:2831 src/gtk/x11file.c:3970 src/gtk/x11file.c:4039 #: src/gtk/x11file.c:4099 src/gtk/x11file.c:5763 #, c-format msgid "Create" msgstr "" #: src/gtk/x11file.c:3320 src/gtk/x11lgnd.c:1833 msgid "_Mark:" msgstr "" #: src/gtk/x11file.c:3325 msgid "_Curve:" msgstr "" #: src/gtk/x11file.c:3333 msgid "_Color 1:" msgstr "" #: src/gtk/x11file.c:3337 msgid "_Color 2:" msgstr "" #: src/gtk/x11file.c:3355 src/gtk/x11lgnd.c:1838 msgid "_Size:" msgstr "" #: src/gtk/x11file.c:3359 src/gtk/x11lgnd.c:1194 src/gtk/x11lgndx.c:411 msgid "_Miter:" msgstr "" #: src/gtk/x11file.c:3363 src/gtk/x11lgnd.c:1204 src/gtk/x11lgndx.c:415 msgid "_Join:" msgstr "" #: src/gtk/x11file.c:3366 msgid "_Clip" msgstr "" #: src/gtk/x11file.c:3396 msgid "_X column:" msgstr "" #: src/gtk/x11file.c:3401 msgid "_X axis:" msgstr "" #: src/gtk/x11file.c:3411 msgid "_Y column:" msgstr "" #: src/gtk/x11file.c:3416 msgid "_Y axis:" msgstr "" #: src/gtk/x11file.c:3441 msgid "_Plot" msgstr "" #: src/gtk/x11file.c:3445 msgid "_Math" msgstr "" #: src/gtk/x11file.c:3480 msgid "This file contain invalid UTF-8 strings." msgstr "" #: src/gtk/x11file.c:3905 #, c-format msgid "Data %d (File)" msgstr "" #: src/gtk/x11file.c:3910 src/gtk/x11file.c:4003 src/gtk/x11file.c:4067 msgid "_Apply all" msgstr "" #: src/gtk/x11file.c:3915 src/gtk/x11merge.c:170 msgid "_File:" msgstr "" #: src/gtk/x11file.c:3918 msgid "_Load settings" msgstr "" #: src/gtk/x11file.c:3934 src/gtk/x11file.c:4016 src/gtk/x11file.c:4092 #: src/gtk/x11view.c:1090 msgid "_Mask" msgstr "" #: src/gtk/x11file.c:3938 src/gtk/x11file.c:4020 src/gtk/x11file.c:4096 #: src/gtk/x11view.c:1091 msgid "_Move" msgstr "" #: src/gtk/x11file.c:3946 msgid "_Table" msgstr "" #: src/gtk/x11file.c:3955 msgid "_Plain" msgstr "" #: src/gtk/x11file.c:3971 src/gtk/x11file.c:4040 src/gtk/x11file.c:4100 msgid "_Fit:" msgstr "" #: src/gtk/x11file.c:3998 #, c-format msgid "Data %d (Array)" msgstr "" #: src/gtk/x11file.c:4008 msgid "_Array:" msgstr "" #: src/gtk/x11file.c:4061 #, c-format msgid "Data %d (Range)" msgstr "" #: src/gtk/x11file.c:4074 msgid "_Minimum:" msgstr "" #: src/gtk/x11file.c:4079 msgid "_Maximum:" msgstr "" #: src/gtk/x11file.c:4083 msgid "di_ViSion:" msgstr "" #: src/gtk/x11file.c:4507 src/gtk/x11menu.c:408 msgid "Add Data file" msgstr "" #: src/gtk/x11file.c:4556 msgid "close data (multi select)" msgstr "" #: src/gtk/x11file.c:4666 msgid "data property (multi select)" msgstr "" #: src/gtk/x11file.c:4712 msgid "edit data file (single select)" msgstr "" #: src/gtk/x11file.c:5613 msgid "Data file" msgstr "" #: src/gtk/x11file.c:5619 msgid "Making data file" msgstr "" #: src/gtk/x11file.c:5620 msgid "Making data file." msgstr "" #: src/gtk/x11file.c:5815 src/gtk/x11lgnd.c:3060 src/gtk/gtk_presettings.c:1914 msgid "Join" msgstr "" #: src/gtk/x11file.c:5820 src/gtk/x11lgnd.c:3039 src/gtk/gtk_widget.c:941 msgid "Color 1" msgstr "" #: src/gtk/x11file.c:5827 src/gtk/x11lgnd.c:3040 src/gtk/gtk_widget.c:948 msgid "Color 2" msgstr "" #: src/gtk/x11file.c:5835 msgid "Clip" msgstr "" #: src/gtk/x11file.c:5847 msgid "Type" msgstr "" #: src/gtk/x11graph.c:59 src/odraw.c:58 msgid "unchange" msgstr "" #: src/gtk/x11graph.c:60 src/odraw.c:59 msgid "full" msgstr "" #: src/gtk/x11graph.c:61 src/odraw.c:61 msgid "base" msgstr "" #: src/gtk/x11graph.c:73 msgid "Custom" msgstr "" #: src/gtk/x11graph.c:74 msgid "normal display (4:3)" msgstr "" #: src/gtk/x11graph.c:75 msgid "wide display (16:9)" msgstr "" #: src/gtk/x11graph.c:76 msgid "wide display (16:10)" msgstr "" #: src/gtk/x11graph.c:82 msgid "Letter (215.90x279.40)" msgstr "" #: src/gtk/x11graph.c:83 msgid "Legal (215.90x355.60)" msgstr "" #: src/gtk/x11graph.c:84 msgid "Executive (184.2x266.7)" msgstr "" #: src/gtk/x11graph.c:206 msgid "paper _Width:" msgstr "" #: src/gtk/x11graph.c:211 msgid "paper _Height:" msgstr "" #: src/gtk/x11graph.c:215 msgid "_Paper:" msgstr "" #: src/gtk/x11graph.c:223 msgid "_Portrait" msgstr "" #: src/gtk/x11graph.c:224 msgid "_Orientation:" msgstr "" #: src/gtk/x11graph.c:228 msgid "L_andscape" msgstr "" #: src/gtk/x11graph.c:234 msgid "_Left margin:" msgstr "" #: src/gtk/x11graph.c:239 msgid "_Top margin:" msgstr "" #: src/gtk/x11graph.c:243 msgid "paper _Zoom:" msgstr "" #: src/gtk/x11graph.c:248 msgid "_Decimalsign:" msgstr "" #: src/gtk/x11graph.c:706 msgid "Object" msgstr "" #: src/gtk/x11graph.c:719 src/gtk/data/gtk/menus-common.ui.in:79 #: src/gtk/data/gtk/menus-common-win.ui.in:87 #: src/gtk/data/gtk/menus-common.ui:79 msgid "_Draw order" msgstr "" #: src/gtk/x11graph.c:746 msgid "_Insert" msgstr "" #: src/gtk/x11graph.c:791 msgid "_Objects" msgstr "" #: src/gtk/x11graph.c:901 msgid "_Select Dir:" msgstr "" #: src/gtk/x11graph.c:903 msgid "Current Dir:" msgstr "" #: src/gtk/x11graph.c:979 msgid "_Expand included file" msgstr "" #: src/gtk/x11graph.c:983 msgid "Expand directory" msgstr "" #: src/gtk/x11graph.c:986 msgid "expand _Directory:" msgstr "" #: src/gtk/x11graph.c:990 src/gtk/x11graph.c:1046 src/gtk/x11opt.c:1172 #: src/gtk/x11opt.c:1196 msgid "_Path:" msgstr "" #: src/gtk/x11graph.c:1052 msgid "_Include data file" msgstr "" #: src/gtk/x11graph.c:1056 msgid "_Include merge file" msgstr "" #: src/gtk/x11graph.c:1149 src/gtk/x11menu.c:423 msgid "Load NGP file" msgstr "" #: src/gtk/x11gui.c:137 src/gtk/x11gui.c:368 src/gtk/x11gui.c:436 #: src/gtk/x11gui.c:576 src/gtk/x11gui.c:651 src/gtk/x11gui.c:722 #: src/gtk/x11gui.c:801 src/gtk/x11gui.c:1032 src/gtk/x11opt.c:1115 msgid "_Cancel" msgstr "" #: src/gtk/x11gui.c:149 src/gtk/x11gui.c:369 src/gtk/x11gui.c:437 #: src/gtk/x11gui.c:577 src/gtk/x11gui.c:652 src/gtk/x11gui.c:723 #: src/gtk/x11gui.c:802 src/gtk/x11opt.c:1113 msgid "_OK" msgstr "" #: src/gtk/x11gui.c:273 msgid "Error" msgstr "" #: src/gtk/x11gui.c:308 msgid "_No" msgstr "" #: src/gtk/x11gui.c:309 msgid "_Yes" msgstr "" #: src/gtk/x11gui.c:884 src/gtk/x11gui.c:1059 src/gtk/x11gui.c:1064 msgid "All" msgstr "" #: src/gtk/x11gui.c:985 src/gtk/x11opt.c:1771 #, c-format msgid "" "`%s'\n" "\n" "Overwrite existing file?" msgstr "" #: src/gtk/x11gui.c:1036 msgid "_Change current directory" msgstr "" #: src/gtk/x11gui.c:1047 #, c-format msgid "%s file (*.%s)" msgstr "" #: src/gtk/x11gui.c:1142 src/gtk/x11gui.c:1175 msgid "_Open" msgstr "" #: src/gtk/x11lgnd.c:61 msgid "_Physics" msgstr "" #: src/gtk/x11lgnd.c:62 msgid "_Mathematics" msgstr "" #: src/gtk/x11lgnd.c:63 msgid "_Greece" msgstr "" #: src/gtk/x11lgnd.c:71 msgid "marker begin" msgstr "" #: src/gtk/x11lgnd.c:72 msgid "marker end" msgstr "" #: src/gtk/x11lgnd.c:73 src/gtk/x11lgnd.c:99 msgid "color" msgstr "" #: src/gtk/x11lgnd.c:77 msgid "points" msgstr "" #: src/gtk/x11lgnd.c:103 msgid "height" msgstr "" #: src/gtk/x11lgnd.c:104 msgid "line width" msgstr "" #: src/gtk/x11lgnd.c:129 msgid "angle1" msgstr "" #: src/gtk/x11lgnd.c:130 msgid "angle2" msgstr "" #: src/gtk/x11lgnd.c:131 msgid "pieslice" msgstr "" #: src/gtk/x11lgnd.c:179 msgid "font" msgstr "" #: src/gtk/x11lgnd.c:182 msgid "pt" msgstr "" #: src/gtk/x11lgnd.c:183 msgid "direction" msgstr "" #: src/gtk/x11lgnd.c:292 #, c-format msgid "%s property (multi select)" msgstr "" #: src/gtk/x11lgnd.c:334 #, c-format msgid "delete %s (multi select)" msgstr "" #: src/gtk/x11lgnd.c:416 #, c-format msgid "X:%.2f Y:%.2f %s%stype:%-2d" msgstr "" #: src/gtk/x11lgnd.c:979 msgid "_Line width:" msgstr "" #: src/gtk/x11lgnd.c:1140 msgid "_Points:" msgstr "" #: src/gtk/x11lgnd.c:1224 msgid "_Color2:" msgstr "" #: src/gtk/x11lgnd.c:1385 src/gtk/gtk_presettings.c:1925 msgid "Marker begin" msgstr "" #: src/gtk/x11lgnd.c:1389 src/gtk/gtk_presettings.c:1931 msgid "Marker end" msgstr "" #: src/gtk/x11lgnd.c:1401 msgid "_Marker:" msgstr "" #: src/gtk/x11lgnd.c:1446 #, c-format msgid "Legend line %d" msgstr "" #: src/gtk/x11lgnd.c:1478 msgid "_Interpolation:" msgstr "" #: src/gtk/x11lgnd.c:1486 src/gtk/x11lgnd.c:1718 #: src/gtk/data/gtk/menus-tool.ui:14 msgid "_Close path" msgstr "" #: src/gtk/x11lgnd.c:1503 src/gtk/x11lgnd.c:1606 src/gtk/x11lgnd.c:1734 #: src/gtk/data/gtk/menus-tool.ui:6 msgid "_Stroke" msgstr "" #: src/gtk/x11lgnd.c:1518 msgid "fill _Rule:" msgstr "" #: src/gtk/x11lgnd.c:1522 src/gtk/x11lgnd.c:1621 src/gtk/x11lgnd.c:1749 #: src/gtk/data/gtk/menus-tool.ui:10 msgid "_Fill" msgstr "" #: src/gtk/x11lgnd.c:1562 #, c-format msgid "Legend rectangle %d" msgstr "" #: src/gtk/x11lgnd.c:1586 msgid "_Width:" msgstr "" #: src/gtk/x11lgnd.c:1590 msgid "_Height:" msgstr "" #: src/gtk/x11lgnd.c:1661 #, c-format msgid "Legend arc %d" msgstr "" #: src/gtk/x11lgnd.c:1700 msgid "_Angle1:" msgstr "" #: src/gtk/x11lgnd.c:1704 msgid "_Angle2:" msgstr "" #: src/gtk/x11lgnd.c:1707 msgid "_Pieslice" msgstr "" #: src/gtk/x11lgnd.c:1799 #, c-format msgid "Legend mark %d" msgstr "" #: src/gtk/x11lgnd.c:1878 msgid "_Pt:" msgstr "" #: src/gtk/x11lgnd.c:1890 msgid "_Script:" msgstr "" #: src/gtk/x11lgnd.c:1924 msgid "_Raw" msgstr "" #: src/gtk/x11lgnd.c:2026 #, c-format msgid "Legend text %d" msgstr "" #: src/gtk/x11lgnd.c:2057 msgid "_Text:" msgstr "" #: src/gtk/x11lgnd.c:3035 src/gtk/x11menu.c:307 src/gtk/x11menu.c:308 msgid "Mark" msgstr "" #: src/gtk/x11lgnd.c:3056 src/gtk/x11lgnd.c:3057 msgid "Stroke" msgstr "" #: src/gtk/x11lgnd.c:3065 msgid "Close path" msgstr "" #: src/gtk/x11lgnd.c:3068 src/gtk/x11lgnd.c:3069 msgid "Fill" msgstr "" #: src/gtk/x11lgnd.c:3071 msgid "Fill rule" msgstr "" #: src/gtk/x11lgndx.c:365 #, c-format msgid "Legend Gaussian/Lorentzian/Parabola/Sin %d" msgstr "" #: src/gtk/x11lgndx.c:375 msgid "_Sin" msgstr "" #: src/gtk/x11lgndx.c:379 msgid "_Parabola" msgstr "" #: src/gtk/x11lgndx.c:383 msgid "_Lorentz" msgstr "" #: src/gtk/x11lgndx.c:387 msgid "_Gauss" msgstr "" #: src/gtk/x11lgndx.c:424 msgid "_Division:" msgstr "" #: src/gtk/x11lgndx.c:451 msgid "Direction:" msgstr "" #: src/gtk/x11menu.c:237 msgid "Point" msgstr "" #: src/gtk/x11menu.c:238 msgid "Pointer" msgstr "" #: src/gtk/x11menu.c:239 msgid "" "Legend and Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/" "Vertical +SHIFT: Fine)" msgstr "" #: src/gtk/x11menu.c:247 msgid "Legend" msgstr "" #: src/gtk/x11menu.c:248 msgid "Legend Pointer" msgstr "" #: src/gtk/x11menu.c:249 msgid "" "Legend Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: " "Fine)" msgstr "" #: src/gtk/x11menu.c:258 msgid "Axis Pointer" msgstr "" #: src/gtk/x11menu.c:259 msgid "" "Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: " "Fine)" msgstr "" #: src/gtk/x11menu.c:267 msgid "Data" msgstr "" #: src/gtk/x11menu.c:268 src/gtk/x11menu.c:269 msgid "Data Pointer" msgstr "" #: src/gtk/x11menu.c:280 src/gtk/x11menu.c:281 msgid "Path" msgstr "" #: src/gtk/x11menu.c:282 msgid "New Legend Path (+SHIFT: Fine +CONTROL: snap angle)" msgstr "" #: src/gtk/x11menu.c:289 src/gtk/x11menu.c:290 msgid "Rectangle" msgstr "" #: src/gtk/x11menu.c:291 msgid "" "New Legend Rectangle (+SHIFT: Fine +CONTROL: square integer ratio rectangle)" msgstr "" #: src/gtk/x11menu.c:298 src/gtk/x11menu.c:299 msgid "Arc" msgstr "" #: src/gtk/x11menu.c:300 msgid "New Legend Arc (+SHIFT: Fine +CONTROL: circle or integer ratio ellipse)" msgstr "" #: src/gtk/x11menu.c:309 msgid "New Legend Mark (+SHIFT: Fine)" msgstr "" #: src/gtk/x11menu.c:316 src/gtk/x11menu.c:317 msgid "Text" msgstr "" #: src/gtk/x11menu.c:318 msgid "New Legend Text (+SHIFT: Fine)" msgstr "" #: src/gtk/x11menu.c:325 msgid "Gauss" msgstr "" #: src/gtk/x11menu.c:326 msgid "Gaussian" msgstr "" #: src/gtk/x11menu.c:327 msgid "New Legend Gaussian (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "" #: src/gtk/x11menu.c:337 msgid "Frame axis" msgstr "" #: src/gtk/x11menu.c:338 msgid "Frame Graph" msgstr "" #: src/gtk/x11menu.c:339 msgid "New Frame Graph (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "" #: src/gtk/x11menu.c:346 msgid "Section axis" msgstr "" #: src/gtk/x11menu.c:347 msgid "Section Graph" msgstr "" #: src/gtk/x11menu.c:348 msgid "New Section Graph (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "" #: src/gtk/x11menu.c:355 msgid "Cross axis" msgstr "" #: src/gtk/x11menu.c:357 msgid "New Cross Graph (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "" #: src/gtk/x11menu.c:364 msgid "Single axis" msgstr "" #: src/gtk/x11menu.c:365 msgid "Single Axis" msgstr "" #: src/gtk/x11menu.c:366 msgid "New Single Axis (+SHIFT: Fine +CONTROL: snap angle)" msgstr "" #: src/gtk/x11menu.c:376 msgid "Trimming" msgstr "" #: src/gtk/x11menu.c:377 msgid "Axis Trimming" msgstr "" #: src/gtk/x11menu.c:378 msgid "Axis Trimming (+SHIFT: Fine)" msgstr "" #: src/gtk/x11menu.c:385 msgid "Evaluate" msgstr "" #: src/gtk/x11menu.c:386 msgid "Evaluate Data" msgstr "" #: src/gtk/x11menu.c:387 msgid "Evaluate Data Point" msgstr "" #: src/gtk/x11menu.c:394 msgid "Zoom" msgstr "" #: src/gtk/x11menu.c:395 msgid "Viewer Zoom" msgstr "" #: src/gtk/x11menu.c:396 msgid "Viewer Zoom-In (+CONTROL: Zoom-Out +SHIFT: Centering)" msgstr "" #: src/gtk/x11menu.c:407 msgid "Add Data" msgstr "" #: src/gtk/x11menu.c:421 src/gtk/data/gtk/menus-common.ui.in:31 #: src/gtk/data/gtk/menus-common-win.ui.in:31 #: src/gtk/data/gtk/menus-common.ui:31 msgid "_Load graph" msgstr "" #: src/gtk/x11menu.c:422 msgid "Load NGP" msgstr "" #: src/gtk/x11menu.c:433 msgid "Save NGP" msgstr "" #: src/gtk/x11menu.c:447 src/gtk/data/gtk/menus-common.ui.in:369 #: src/gtk/data/gtk/menus-common-win.ui.in:377 #: src/gtk/data/gtk/menus-common.ui:369 msgid "Scale _Clear" msgstr "" #: src/gtk/x11menu.c:448 src/gtk/x11menu.c:449 #: src/gtk/data/gtk/help-overlay.ui:53 msgid "Clear Scale" msgstr "" #: src/gtk/x11menu.c:460 src/gtk/data/gtk/help-overlay.ui:60 msgid "Draw on Viewer Window" msgstr "" #: src/gtk/x11menu.c:469 src/gtk/data/gtk/menus-common.ui.in:93 #: src/gtk/data/gtk/menus-common-win.ui.in:101 #: src/gtk/data/gtk/menus-common.ui:93 msgid "_Print" msgstr "" #: src/gtk/x11menu.c:470 src/gtk/x11menu.c:471 src/gtk/x11print.c:522 msgid "Print" msgstr "" #: src/gtk/x11menu.c:484 src/gtk/data/gtk/menus-common.ui.in:327 #: src/gtk/data/gtk/menus-common-win.ui.in:335 #: src/gtk/data/gtk/menus-common.ui:327 msgid "_Math Transformation" msgstr "" #: src/gtk/x11menu.c:485 msgid "Math Transformation" msgstr "" #: src/gtk/x11menu.c:486 msgid "Set Math Transformation" msgstr "" #: src/gtk/x11menu.c:495 src/gtk/data/gtk/menus-common.ui.in:374 #: src/gtk/data/gtk/menus-common-win.ui.in:382 #: src/gtk/data/gtk/menus-common.ui:374 msgid "Scale _Undo" msgstr "" #: src/gtk/x11menu.c:496 msgid "Scale Undo" msgstr "" #: src/gtk/x11menu.c:497 msgid "Undo Scale Settings" msgstr "" #: src/gtk/x11menu.c:1111 msgid "_Add-in" msgstr "" #: src/gtk/x11menu.c:2169 msgid "Save menu" msgstr "" #: src/gtk/x11menu.c:2175 msgid "Recent Graphs" msgstr "" #: src/gtk/x11menu.c:2181 msgid "Recent Data Files" msgstr "" #: src/gtk/x11menu.c:2730 msgid "Error:" msgstr "" #: src/gtk/x11menu.c:2779 msgid "Question" msgstr "" #: src/gtk/x11menu.c:2836 #, c-format msgid "Executing `%.128s'." msgstr "" #: src/gtk/x11menu.c:3094 src/gtk/x11menu.c:3113 msgid "edit" msgstr "" #: src/gtk/x11menu.c:3095 msgid "move" msgstr "" #: src/gtk/x11menu.c:3096 msgid "rotate" msgstr "" #: src/gtk/x11menu.c:3097 msgid "flip" msgstr "" #: src/gtk/x11menu.c:3098 msgid "delete object" msgstr "" #: src/gtk/x11menu.c:3099 msgid "create object" msgstr "" #: src/gtk/x11menu.c:3100 msgid "align" msgstr "" #: src/gtk/x11menu.c:3101 msgid "order" msgstr "" #: src/gtk/x11menu.c:3102 msgid "duplicate" msgstr "" #: src/gtk/x11menu.c:3103 msgid "execute shell" msgstr "" #: src/gtk/x11menu.c:3104 msgid "execute add-in" msgstr "" #: src/gtk/x11menu.c:3105 msgid "scale clear" msgstr "" #: src/gtk/x11menu.c:3106 msgid "scale undo" msgstr "" #: src/gtk/x11menu.c:3107 msgid "open file" msgstr "" #: src/gtk/x11menu.c:3108 msgid "add range" msgstr "" #: src/gtk/x11menu.c:3109 msgid "paste" msgstr "" #: src/gtk/x11menu.c:3110 msgid "scale" msgstr "" #: src/gtk/x11menu.c:3111 msgid "auto scale" msgstr "" #: src/gtk/x11menu.c:3112 msgid "scale trimming" msgstr "" #: src/gtk/x11menu.c:3152 #, c-format msgid "_Redo: %s" msgstr "" #: src/gtk/x11menu.c:3155 src/gtk/data/gtk/menus-common.ui.in:122 #: src/gtk/data/gtk/menus-common-win.ui.in:130 #: src/gtk/data/gtk/menus-common.ui:122 msgid "_Redo" msgstr "" #: src/gtk/x11menu.c:3162 #, c-format msgid "_Undo: %s" msgstr "" #: src/gtk/x11menu.c:3165 src/gtk/data/gtk/menus-common.ui.in:127 #: src/gtk/data/gtk/menus-common-win.ui.in:135 #: src/gtk/data/gtk/menus-common.ui:127 msgid "_Undo" msgstr "" #: src/gtk/x11merge.c:53 msgid "top" msgstr "" #: src/gtk/x11merge.c:54 src/oaxis.c:79 src/oaxis.c:93 src/oaxis.c:106 msgid "left" msgstr "" #: src/gtk/x11merge.c:55 msgid "zoom_x" msgstr "" #: src/gtk/x11merge.c:56 msgid "zoom_y" msgstr "" #: src/gtk/x11merge.c:75 src/gtk/x11opt_proto.h:277 msgid "_Preferences" msgstr "" #: src/gtk/x11merge.c:160 #, c-format msgid "Merge %d" msgstr "" #: src/gtk/x11merge.c:174 msgid "_Top Margin:" msgstr "" #: src/gtk/x11merge.c:178 msgid "_Left Margin:" msgstr "" #: src/gtk/x11merge.c:182 msgid "zoom _X:" msgstr "" #: src/gtk/x11merge.c:186 msgid "Link" msgstr "" #: src/gtk/x11merge.c:189 msgid "zoom _Y:" msgstr "" #: src/gtk/x11merge.c:261 msgid "Add Merge file" msgstr "" #: src/gtk/x11merge.c:296 msgid "close merge file (multi select)" msgstr "" #: src/gtk/x11merge.c:326 msgid "merge file property (multi select)" msgstr "" #: src/gtk/x11opt.c:72 src/gtk/data/gtk/menus-common.ui.in:501 #: src/gtk/data/gtk/menus-common-win.ui.in:509 #: src/gtk/data/gtk/menus-common.ui:501 msgid "_Viewer" msgstr "" #: src/gtk/x11opt.c:76 msgid "_External Viewer" msgstr "" #: src/gtk/x11opt.c:80 src/gtk/data/gtk/menus-common.ui.in:509 #: src/gtk/data/gtk/menus-common-win.ui.in:517 #: src/gtk/data/gtk/menus-common.ui:509 msgid "_Font aliases" msgstr "" #: src/gtk/x11opt.c:84 msgid "_Add-in Script" msgstr "" #: src/gtk/x11opt.c:88 src/gtk/data/gtk/menus-common.ui.in:517 #: src/gtk/data/gtk/menus-common-win.ui.in:525 #: src/gtk/data/gtk/menus-common.ui:517 msgid "_Miscellaneous" msgstr "" #: src/gtk/x11opt.c:265 msgid "Add-in Script" msgstr "" #: src/gtk/x11opt.c:286 msgid "_Add-in:" msgstr "" #: src/gtk/x11opt.c:291 msgid "_Name:" msgstr "" #: src/gtk/x11opt.c:295 msgid "_Script file:" msgstr "" #: src/gtk/x11opt.c:299 msgid "_Option:" msgstr "" #: src/gtk/x11opt.c:303 msgid "_Description:" msgstr "" #: src/gtk/x11opt.c:370 msgid "Please specify script name." msgstr "" #: src/gtk/x11opt.c:374 msgid "Please specify script file name." msgstr "" #: src/gtk/x11opt.c:382 msgid "Please specify script description." msgstr "" #: src/gtk/x11opt.c:450 msgid "description" msgstr "" #: src/gtk/x11opt.c:566 msgid "Alternative font" msgstr "" #: src/gtk/x11opt.c:665 src/gtk/gtk_presettings.c:1842 msgid "Font name" msgstr "" #: src/gtk/x11opt.c:674 msgid "_Alias:" msgstr "" #: src/gtk/x11opt.c:730 msgid "Alternative fonts" msgstr "" #: src/gtk/x11opt.c:786 msgid "Please specify a new alias name." msgstr "" #: src/gtk/x11opt.c:794 msgid "Alias name already exists." msgstr "" #: src/gtk/x11opt.c:934 msgid "alias" msgstr "" #: src/gtk/x11opt.c:936 msgid "alternative fonts" msgstr "" #: src/gtk/x11opt.c:1039 msgid "Select program" msgstr "" #: src/gtk/x11opt.c:1110 msgid "custom palette" msgstr "" #: src/gtk/x11opt.c:1149 msgid "External programs" msgstr "" #: src/gtk/x11opt.c:1155 msgid "_Editor:" msgstr "" #: src/gtk/x11opt.c:1159 msgid "_Help browser:" msgstr "" #: src/gtk/x11opt.c:1167 msgid "Save graph" msgstr "" #: src/gtk/x11opt.c:1178 msgid "include _Data file" msgstr "" #: src/gtk/x11opt.c:1182 msgid "include _Merge file" msgstr "" #: src/gtk/x11opt.c:1191 msgid "Load graph" msgstr "" #: src/gtk/x11opt.c:1202 msgid "_Expand include file" msgstr "" #: src/gtk/x11opt.c:1207 msgid "_Expand directory:" msgstr "" #: src/gtk/x11opt.c:1216 msgid "Size" msgstr "" #: src/gtk/x11opt.c:1221 msgid "_Size of completion history:" msgstr "" #: src/gtk/x11opt.c:1225 msgid "_Length of information view:" msgstr "" #: src/gtk/x11opt.c:1229 msgid "_Length of data preview:" msgstr "" #: src/gtk/x11opt.c:1243 msgid "_Coordinate view:" msgstr "" #: src/gtk/x11opt.c:1247 msgid "_Information view:" msgstr "" #: src/gtk/x11opt.c:1251 msgid "data _Preview:" msgstr "" #: src/gtk/x11opt.c:1261 msgid "_Check \"change current directory\"" msgstr "" #: src/gtk/x11opt.c:1265 src/gtk/x11print.c:208 msgid "_Use opacity" msgstr "" #: src/gtk/x11opt.c:1269 msgid "_Show select data dialog on exporting" msgstr "" #: src/gtk/x11opt.c:1273 msgid "use custom _Palette" msgstr "" #: src/gtk/x11opt.c:1277 msgid "_Edit custom palette" msgstr "" #: src/gtk/x11opt.c:1282 msgid "_Source style:" msgstr "" #: src/gtk/x11opt.c:1286 msgid "_Default decimalsign:" msgstr "" #: src/gtk/x11opt.c:1292 msgid "use _Dark theme" msgstr "" #: src/gtk/x11opt.c:1495 msgid "use _External previewer" msgstr "" #: src/gtk/x11opt.c:1505 msgid "Window _Width:" msgstr "" #: src/gtk/x11opt.c:1509 msgid "Window _Height:" msgstr "" #: src/gtk/x11opt.c:1609 msgid "_Grid:" msgstr "" #: src/gtk/x11opt.c:1619 msgid "_Line attribute of focus frame:" msgstr "" #: src/gtk/x11opt.c:1627 msgid "_Antialias:" msgstr "" #: src/gtk/x11opt.c:1629 msgid "_Preserve line width and style" msgstr "" #: src/gtk/x11opt.c:1633 msgid "_Load files on redraw" msgstr "" #: src/gtk/x11opt.c:1639 msgid "_Maximum number of data on redraw:" msgstr "" #: src/gtk/x11opt.c:1772 msgid "Save as Ngraph.ngp" msgstr "" #: src/gtk/x11print.c:141 msgid "_PostScript Version:" msgstr "" #: src/gtk/x11print.c:172 msgid "_SVG Version:" msgstr "" #: src/gtk/x11print.c:204 msgid "_Convert texts to paths" msgstr "" #: src/gtk/x11print.c:226 msgid "Cairo PS Output" msgstr "" #: src/gtk/x11print.c:229 msgid "Cairo EPS Output" msgstr "" #: src/gtk/x11print.c:232 msgid "Cairo PNG Output" msgstr "" #: src/gtk/x11print.c:235 msgid "Cairo PDF Output" msgstr "" #: src/gtk/x11print.c:238 msgid "Cairo SVG Output" msgstr "" #: src/gtk/x11print.c:242 msgid "Cairo EMF Output" msgstr "" #: src/gtk/x11print.c:375 msgid "Printing." msgstr "" #: src/gtk/x11print.c:521 #, c-format msgid "Printing error: %s" msgstr "" #: src/gtk/x11print.c:594 msgid "Spawning external viewer." msgstr "" #: src/gtk/x11print.c:636 msgid "GRA file" msgstr "" #: src/gtk/x11print.c:676 msgid "Making GRA file." msgstr "" #: src/gtk/x11print.c:801 src/gtk/x11print.c:874 src/gtk/x11view.c:6744 msgid "Drawing." msgstr "" #: src/gtk/x11view.c:1111 src/gtk/data/gtk/menus-common.ui.in:139 #: src/gtk/data/gtk/menus-common.ui.in:576 #: src/gtk/data/gtk/menus-common-win.ui.in:147 #: src/gtk/data/gtk/menus-common-win.ui.in:584 #: src/gtk/data/gtk/menus-common.ui:139 src/gtk/data/gtk/menus-common.ui:576 msgid "_Copy" msgstr "" #: src/gtk/x11view.c:1725 src/gtk/x11view.c:1727 #, c-format msgid "Searching for data." msgstr "" #: src/gtk/x11view.c:1837 #, c-format msgid "Evaluating." msgstr "" #: src/gtk/x11view.c:1840 msgid "Evaluating" msgstr "" #: src/gtk/x11view.c:1918 msgid "trimming (multi select)" msgstr "" #: src/gtk/x11view.c:3847 msgid "Data points are moved." msgstr "" #: src/gtk/x11view.c:5186 msgid "Moving data points is canceled." msgstr "" #: src/gtk/x11view.c:6738 msgid "Scaling" msgstr "" #: src/gtk/x11view.c:6745 msgid "Drawing" msgstr "" #: src/gtk/x11parameter.c:145 src/gtk/x11parameter.c:212 msgid "_Initial value:" msgstr "" #: src/gtk/x11parameter.c:148 msgid "_Wrap" msgstr "" #: src/gtk/x11parameter.c:192 msgid "_Start:" msgstr "" #: src/gtk/x11parameter.c:195 msgid "Exchange" msgstr "" #: src/gtk/x11parameter.c:198 msgid "_Stop:" msgstr "" #: src/gtk/x11parameter.c:208 msgid "_Wait:" msgstr "" #: src/gtk/x11parameter.c:222 msgid "_Active (initial state)" msgstr "" #: src/gtk/x11parameter.c:245 msgid "_Items:" msgstr "" #: src/gtk/x11parameter.c:249 msgid "_Selected:" msgstr "" #: src/gtk/x11parameter.c:296 #, c-format msgid "Parameter %d" msgstr "" #: src/gtk/x11parameter.c:306 msgid "_Title:" msgstr "" #: src/gtk/x11parameter.c:323 msgid "_Redraw" msgstr "" #: src/gtk/x11parameter.c:474 msgid "delete parameter (multi select)" msgstr "" #: src/gtk/x11parameter.c:514 msgid "parameter property (multi select)" msgstr "" #: src/gtk/x11parameter.c:612 msgid "Pause" msgstr "" #: src/gtk/x11parameter.c:621 src/gtk/x11parameter.c:963 msgid "Play" msgstr "" #: src/gtk/x11parameter.c:960 msgid "To start" msgstr "" #: src/gtk/x11parameter.c:966 msgid "To stop" msgstr "" #: src/gtk/x11parameter.c:969 msgid "Repeat" msgstr "" #: src/gtk/x11parameter.c:1093 msgid "Up" msgstr "" #: src/gtk/x11parameter.c:1098 msgid "Down" msgstr "" #: src/gtk/x11parameter.c:1102 msgid "Delete" msgstr "" #: src/gtk/x11parameter.c:1169 msgid "_Save as default" msgstr "" #: src/gtk/x11parameter.c:1207 msgid "Add" msgstr "" #: src/gtk/gtk_widget.c:183 msgid "_Copy Settings" msgstr "" #: src/gtk/gtk_widget.c:920 msgid "Stroke Color" msgstr "" #: src/gtk/gtk_widget.c:927 msgid "Fill Color" msgstr "" #: src/gtk/gtk_widget.c:955 msgid "Axis baseline color" msgstr "" #: src/gtk/gtk_widget.c:962 msgid "Axis gauge color" msgstr "" #: src/gtk/gtk_widget.c:969 msgid "Axis numbering color" msgstr "" #: src/gtk/gtk_subwin.c:82 msgid "Open" msgstr "" #: src/gtk/gtk_subwin.c:1408 msgid "Instance name" msgstr "" #: src/gtk/gtk_liststore.c:163 src/gtk/gtk_presettings.c:1856 msgid "Bold" msgstr "" #: src/gtk/gtk_liststore.c:164 src/gtk/gtk_presettings.c:1859 msgid "Italic" msgstr "" #: src/gtk/gtk_liststore.c:270 msgid "Line style" msgstr "" #: src/gtk/gtk_presettings.c:1748 src/odata.c:248 src/opath.c:81 msgid "line" msgstr "" #: src/gtk/gtk_presettings.c:1850 msgid "Font size" msgstr "" #: src/gtk/gtk_presettings.c:1876 msgid "Mark size" msgstr "" #: src/gtk/gtk_presettings.c:1881 msgid "stroke/fill" msgstr "" #: src/gtk/gtk_presettings.c:1888 msgid "Line Width" msgstr "" #: src/gtk/gtk_presettings.c:1893 msgid "Line Style" msgstr "" #: src/gtk/completion_info_data.c:5 msgid "" "abs(x)\n" "compute the absolute value of x" msgstr "" #: src/gtk/completion_info_data.c:6 msgid "" "acos(x)\n" "arc cosine function" msgstr "" #: src/gtk/completion_info_data.c:7 msgid "" "acosh(x)\n" "inverse hyperbolic cosine function" msgstr "" #: src/gtk/completion_info_data.c:8 msgid "" "alpha(x, i)\n" "Set A (i == 1) or A2 (i == 2) values to x (0 <= " "x < 256)\n" "when i == 0, set A and A2 values to x" msgstr "" #: src/gtk/completion_info_data.c:9 msgid "" "am(a)\n" "copy the contents of the array a to the memory\n" "(return the number of copied elements)" msgstr "" #: src/gtk/completion_info_data.c:10 msgid "" "and(x, y)\n" "True (= 1) when (x != 0) and (y != 0)" msgstr "" #: src/gtk/completion_info_data.c:11 msgid "" "array(a, v1, v2, ...)\n" "initialize an array a with the rest arguments\n" "return the number of elements of the array" msgstr "" #: src/gtk/completion_info_data.c:12 msgid "" "array_average(a)\n" "return the average of the elements of array a" msgstr "" #: src/gtk/completion_info_data.c:13 msgid "" "array_clear(a)\n" "set the number of elements of the array a to 0" msgstr "" #: src/gtk/completion_info_data.c:14 msgid "" "array_compact(a)\n" "Remove non-numeric values from the elements of the array of array a\n" "and return the number of elements after removal" msgstr "" #: src/gtk/completion_info_data.c:15 msgid "" "array_copy(dest, src)\n" "copy the contents of the array src to the array dest.\n" "(return the number of copied elements)" msgstr "" #: src/gtk/completion_info_data.c:16 msgid "" "array_max(a)\n" "returns the maximum value contained in array a" msgstr "" #: src/gtk/completion_info_data.c:17 msgid "" "array_min(a)\n" "returns the minimum value contained in array a" msgstr "" #: src/gtk/completion_info_data.c:18 msgid "" "array_moving_average(dest, src, n, type)\n" "calculate moving average of (n * 2 + 1) sample of the array src\n" "and set them to the array dest.\n" "Weighted moving average is used when type is 1." msgstr "" #: src/gtk/completion_info_data.c:19 msgid "" "array_stdev(a)\n" "return the corrected sample standard deviation of the elements of array " "a" msgstr "" #: src/gtk/completion_info_data.c:20 msgid "" "array_stdevp(a)\n" "return the standard deviation of the elements of array a" msgstr "" #: src/gtk/completion_info_data.c:21 msgid "" "array_sum(a)\n" "returns the sum of the elements of array a" msgstr "" #: src/gtk/completion_info_data.c:22 msgid "" "array_sumsq(a)\n" "returns the square sum of the elements of array a" msgstr "" #: src/gtk/completion_info_data.c:23 msgid "" "asin(x)\n" "arc sine function" msgstr "" #: src/gtk/completion_info_data.c:24 msgid "" "asinh(x)\n" "inverse hyperbolic sine function" msgstr "" #: src/gtk/completion_info_data.c:25 msgid "" "atan(x)\n" "arc tangent function" msgstr "" #: src/gtk/completion_info_data.c:26 msgid "" "atanh(x)\n" "inverse hyperbolic tangent function" msgstr "" #: src/gtk/completion_info_data.c:27 msgid "" "beta(x, y)\n" "beta function" msgstr "" #: src/gtk/completion_info_data.c:28 msgid "" "choose(n, m)\n" "the combinatorial factor n choose m: n!/(m!(n-m)!)" msgstr "" #: src/gtk/completion_info_data.c:29 msgid "" "cm(x, n)\n" "initialize n memories from the beginning with x\n" "initialize whole memory when n is 0\n" "and n memories from the end when x is negative\n" "(return x)" msgstr "" #: src/gtk/completion_info_data.c:30 msgid "" "color(i, x)\n" "i = 0: Set the R value to x (0 <= x < 256)\n" "i = 1: Set the G value to x (0 <= x < 256)\n" "i = 2: Set the B value to x (0 <= x < 256)\n" "i = 3: Set the R, G and B values to x (0 <= x < " "256)\n" "i = 4: Set the R2 value to x (0 <= x < 256)\n" "i = 5: Set the G2 value to x (0 <= x < 256)\n" "i = 6: Set the B2 value to x (0 <= x < 256)\n" "i = 7: Set the R2, G2 and B2 values to x (0 <= x " "< 256)\n" "i = 8: Set the R, G and B values to be hexadecimal color of x\n" "i = 9: Set the R2, G2 and B2 values to be hexadecimal color of x" msgstr "" #: src/gtk/completion_info_data.c:31 msgid "" "cos(x)\n" "cosine function" msgstr "" #: src/gtk/completion_info_data.c:32 msgid "" "cosh(x)\n" "hyperbolic cosine function" msgstr "" #: src/gtk/completion_info_data.c:33 msgid "" "delta(x)\n" "Kronecker delta (1 when x = 0, 0 otherwise)" msgstr "" #: src/gtk/completion_info_data.c:34 msgid "" "dif(x)\n" "Difference" msgstr "" #: src/gtk/completion_info_data.c:35 msgid "" "draw_arc(x, y, rx, ry, start, arc, pieslice, stroke, fill, close)\n" "draw an arc with the X direction radius rx and the Y direction radius " "ry centered on (x, y).\n" "start and arc specify start angle and arc angle respectively.\n" "When stroke and fill are 0, do not draw contours and fills " "respectively.\n" "If pieslice is not 0, draw a sector.\n" "If close is not 0, close the outline." msgstr "" #: src/gtk/completion_info_data.c:36 msgid "" "draw_errorbar(x, y, erx, ery, size)\n" "draw errorbars from (x - erx, y) to (x + erx, y) and\n" "from (x, y - ery) to (x, y + ery).\n" "The length of ticks can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" #: src/gtk/completion_info_data.c:37 msgid "" "draw_errorbar2(x1, y1, x2, y2, size)\n" "draw an errorbar from (x1, y1) to (x2, y2).\n" "The length of ticks can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" #: src/gtk/completion_info_data.c:38 msgid "" "draw_line(x1, y1, x2, y2, arrow, size)\n" "draw a line form (x1, y1) to (x2, y2).\n" "When arrow is 1, 2 or 3, draw arrow end, begin and both side of the " "line respectively.\n" "The size of a arrow can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" #: src/gtk/completion_info_data.c:39 msgid "" "draw_mark(x, y, size)\n" "draw a mark on (x, y). \n" "The size of a mark can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" #: src/gtk/completion_info_data.c:40 msgid "" "draw_polygon(ax, ay, stroke, fill)\n" "draw polygon defined by coordinates (ax[0], ay[0]), (ax[1], ay[1]), ....\n" "when stroke is 0, do not draw contours.\n" "fill can be specified with one of\n" "FILL_RULE_NONE, FILL_RULE_EVEN_ODD or FILL_RULE_WINDING." msgstr "" #: src/gtk/completion_info_data.c:41 msgid "" "draw_polyline(ax, ay)\n" "connect coordinates (ax[0], ay[0]), (ax[1], ay[1]), ... by polyline." msgstr "" #: src/gtk/completion_info_data.c:42 msgid "" "draw_rect(x, y, w, h, stroke, fill)\n" "draw a rectangle with (x, y) and (x + w, y + h) as diagonal " "vertices.\n" "When stroke and fill are 0, do not draw contours and fills " "respectively." msgstr "" #: src/gtk/completion_info_data.c:43 msgid "" "draw_text($str, x, y, dir)\n" "Draw the string $str at (x, y).\n" "Direction is specified by dir." msgstr "" #: src/gtk/completion_info_data.c:44 msgid "" "draw_text_raw($str, x, y, dir)\n" "Draw the raw string $str at (x, y).\n" "Direction is specified by dir." msgstr "" #: src/gtk/completion_info_data.c:45 msgid "" "each(a, item, ex)\n" "Evaluate ex for each element of the array a.\n" "The element of the array can be referred by the variable item." msgstr "" #: src/gtk/completion_info_data.c:46 msgid "" "each_with_index(a, item, index, ex)\n" "Evaluate ex for each element of the array a.\n" "The element of the array and the loop count can be referred\n" "by the variable item and index respectively." msgstr "" #: src/gtk/completion_info_data.c:47 msgid "" "ei(x)\n" "compute the exponential integral Ei(x)" msgstr "" #: src/gtk/completion_info_data.c:48 msgid "" "eq(x, y, prec)\n" "True (= 1) when x == y.\n" "The number of digits of comparison can be specified with prec\n" "(prec == 0 is exact match)." msgstr "" #: src/gtk/completion_info_data.c:49 msgid "" "erf(x)\n" "error function erf(x)" msgstr "" #: src/gtk/completion_info_data.c:50 msgid "" "erfc(x)\n" "complementary error function erfc(x)" msgstr "" #: src/gtk/completion_info_data.c:51 msgid "" "exp(x)\n" "base-e exponential function (x <= 690)" msgstr "" #: src/gtk/completion_info_data.c:52 msgid "" "expm1(x)\n" "exp(x)-1.\n" "The result is computed in a way that is accurate\n" "even if the value of x is near zero." msgstr "" #: src/gtk/completion_info_data.c:53 msgid "" "filename($str, basename)\n" "Assign filename of the the data object to the variable $str.\n" "Any leading directory components are removed when basename is not " "zero.\n" "Return the length of the string $str in characters." msgstr "" #: src/gtk/completion_info_data.c:54 msgid "" "filter(dest, src, item, ex)\n" "Find elements in the array src\n" "that satisfies that the evaluated value of ex is true\n" "and set them to the array dest.\n" "An element of the array src can be referred by the variable item." msgstr "" #: src/gtk/completion_info_data.c:55 msgid "" "find(a, item, ex)\n" "Returns the value of the first element in the array a\n" "that satisfies that the evaluated value of ex is true.\n" "An element of the array can be referred by the variable item." msgstr "" #: src/gtk/completion_info_data.c:56 msgid "" "fit_calc(id, x)\n" "When the plot type of the data object whose ID is id is fit,\n" "the corresponding fit result f(x) is calculated." msgstr "" #: src/gtk/completion_info_data.c:57 msgid "" "fit_prm(id, x)\n" "When the plot type of the data object whose ID is id is fit,\n" "the value of the field \"%0x\" of the corresponding fit object." msgstr "" #: src/gtk/completion_info_data.c:58 msgid "" "fmod(x, y)\n" "compute the floating-point remainder of dividing x by y" msgstr "" #: src/gtk/completion_info_data.c:59 msgid "" "for(m, begin, end, step, ex)\n" "Set the value in step from begin to end to the m-" "th memory and repeat ex.\n" "When m is negative, no setting to memory is done.\n" "Returns the value of ex evaluated last." msgstr "" #: src/gtk/completion_info_data.c:60 msgid "" "frac(x)\n" "remainder" msgstr "" #: src/gtk/completion_info_data.c:61 msgid "" "gamma(x)\n" "gamma function" msgstr "" #: src/gtk/completion_info_data.c:62 msgid "" "gauss(x)\n" "largest integral value not greater than x" msgstr "" #: src/gtk/completion_info_data.c:63 msgid "" "ge(x, y, prec)\n" "True (= 1) when x >= y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" #: src/gtk/completion_info_data.c:64 msgid "" "getobj($obj, $field, id)\n" "Return the value of the $field of the $obj object which ID is " "id.\n" "The field type must be int, bool, enum or double." msgstr "" #: src/gtk/completion_info_data.c:65 msgid "" "getobj_array(array, $obj, $field, id)\n" "Set values of the $field of the $obj object which ID is id to the array array.\n" "The field type must be char*[], double[] or int[].\n" "Retuern the number of elements saved to the array." msgstr "" #: src/gtk/completion_info_data.c:66 msgid "" "getobj_string($str, $obj, $field, id)\n" "Set the value of the $field of the $obj object which ID is " "id to the variable $str.\n" "The field type must be char*.\n" "Return the length of the string $str in characters." msgstr "" #: src/gtk/completion_info_data.c:67 msgid "" "gt(x, y, prec)\n" "True (= 1) when x > y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" #: src/gtk/completion_info_data.c:68 msgid "" "hn(n, x)\n" "Hermite polynomials" msgstr "" #: src/gtk/completion_info_data.c:69 msgid "" "hsb(h, s, b)\n" "Set the R, G and B values of the color to h, s, b (0 <= h, s, " "b <=1) from the HSB value" msgstr "" #: src/gtk/completion_info_data.c:70 msgid "" "hsb2(h, s, b)\n" "Set the R2, G2 and B2 values of the color to h, s, b (0 <= h, " "s, b <=1) from the HSB value" msgstr "" #: src/gtk/completion_info_data.c:71 msgid "" "icbeta(a, b, x)\n" "incomplete beta function" msgstr "" #: src/gtk/completion_info_data.c:72 msgid "" "icgam(m, x)\n" "incomplete gamma function" msgstr "" #: src/gtk/completion_info_data.c:73 msgid "" "if(x, ex1, ex2)\n" "evaluate ex1 when x != 0, evaluate ex2 otherwise" msgstr "" #: src/gtk/completion_info_data.c:74 msgid "" "in(n, x)\n" "compute the regular modified cylindrical Bessel function of order |n|, In(|x|)" msgstr "" #: src/gtk/completion_info_data.c:75 msgid "" "index(a, item, ex)\n" "Returns the first index at which a given element in the array a\n" "that satisfies that the evaluated value of ex is true.\n" "An element of the array can be referred by the variable item." msgstr "" #: src/gtk/completion_info_data.c:76 msgid "" "int(x)\n" "round to integer, toward zero" msgstr "" #: src/gtk/completion_info_data.c:77 msgid "" "inu(nu, x)\n" "compute the regular modified Bessel function of fractional order |nu|, Inu(|x|)" msgstr "" #: src/gtk/completion_info_data.c:78 msgid "" "isbreak(x)\n" "True if x is BREAK" msgstr "" #: src/gtk/completion_info_data.c:79 msgid "" "iscont(x)\n" "True if x is CONT" msgstr "" #: src/gtk/completion_info_data.c:80 msgid "" "isnan(x)\n" "True if x is NAN" msgstr "" #: src/gtk/completion_info_data.c:81 msgid "" "isnormal(x)\n" "True if x is a normal number" msgstr "" #: src/gtk/completion_info_data.c:82 msgid "" "isundef(x)\n" "True if x is UNDEF" msgstr "" #: src/gtk/completion_info_data.c:83 msgid "" "jl(l, x)\n" "compute the regular spherical Bessel function of order |l|, " "jl(|x|)" msgstr "" #: src/gtk/completion_info_data.c:84 msgid "" "jn(n, x)\n" "compute the regular cylindrical Bessel function of order n, " "Jn(|x|)" msgstr "" #: src/gtk/completion_info_data.c:85 msgid "" "jnu(nu, x)\n" "compute the regular cylindrical Bessel function of fractional order |nu|, Jnu(|x|)" msgstr "" #: src/gtk/completion_info_data.c:86 msgid "" "kn(n, x)\n" "compute the irregular modified cylindrical Bessel function of order |n|, Kn(|x|)" msgstr "" #: src/gtk/completion_info_data.c:87 msgid "" "knu(nu, x)\n" "compute the irregular modified Bessel function of fractional order |nu|, Knu(|x|)" msgstr "" #: src/gtk/completion_info_data.c:88 msgid "" "le(x, y, prec)\n" "True (= 1) when x <= y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" #: src/gtk/completion_info_data.c:89 msgid "" "lgn(n, a, x)\n" "evaluate the generalized Laguerre polynomials Lan(x) for a > -1, n >= 0" msgstr "" #: src/gtk/completion_info_data.c:90 msgid "" "line_number()\n" "File line number being processed (1st line is 1)" msgstr "" #: src/gtk/completion_info_data.c:91 msgid "" "ln(x)\n" "natural logarithmic function" msgstr "" #: src/gtk/completion_info_data.c:92 msgid "" "ln1p(x)\n" "ln(1+x).\n" "The result is computed in a way that is accurate\n" "even if the value of x is near zero." msgstr "" #: src/gtk/completion_info_data.c:93 msgid "" "log(x)\n" "base-10 logarithmic function" msgstr "" #: src/gtk/completion_info_data.c:94 msgid "" "log1p(x)\n" "log(1+x).\n" "The result is computed in a way that is accurate\n" "even if the value of x is near zero." msgstr "" #: src/gtk/completion_info_data.c:95 msgid "" "lt(x, y, prec)\n" "True (= 1) when x < y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" #: src/gtk/completion_info_data.c:96 msgid "" "m(i, x)\n" "assigns x to the i-th memory (i = 0 to 65535)\n" "the index from the tail when i is negative\n" "(return x)" msgstr "" #: src/gtk/completion_info_data.c:97 msgid "" "map(dest, src, item, ex)\n" "Evaluate ex for each element of the array src\n" "and set them to the array dest.\n" "The element of the array can be referred by the variable item." msgstr "" #: src/gtk/completion_info_data.c:98 msgid "" "marksize(x)\n" "Set mark size to x" msgstr "" #: src/gtk/completion_info_data.c:99 msgid "" "marktype(x)\n" "Set mark type to x" msgstr "" #: src/gtk/completion_info_data.c:100 msgid "" "max(a, b, c, ...)\n" "The largest value of arguments" msgstr "" #: src/gtk/completion_info_data.c:101 msgid "" "min(a, b, c, ...)\n" "The smallest value of arguments" msgstr "" #: src/gtk/completion_info_data.c:102 msgid "" "mjd(year, month, day, hour, min, sec)\n" "Modified Julian Date (date and time are given in UTC)" msgstr "" #: src/gtk/completion_info_data.c:103 msgid "" "mjd2day(mjd)\n" "Gregorian calendar day corresponding to Modified Julian Day mjd" msgstr "" #: src/gtk/completion_info_data.c:104 msgid "" "mjd2month(mjd)\n" "month of Gregorian calendar corresponding to Modified Julian Day mjd" msgstr "" #: src/gtk/completion_info_data.c:105 msgid "" "mjd2unix(mjd)\n" "time represents the number of seconds elapsed since the Epoch at mjd" msgstr "" #: src/gtk/completion_info_data.c:106 msgid "" "mjd2wday(mjd)\n" "The day of the week as a decimal range 1 to 7, Monday being 1 corresponding " "to mjd" msgstr "" #: src/gtk/completion_info_data.c:107 msgid "" "mjd2yday(mjd)\n" "The day of the year as a decimal number (range 001 to 366) corresponding to " "mjd" msgstr "" #: src/gtk/completion_info_data.c:108 msgid "" "mjd2year(mjd)\n" "year of Gregorian calendar corresponding to Modified Julian Day mjd" msgstr "" #: src/gtk/completion_info_data.c:109 msgid "" "mtime()\n" "returns last modification time of the file." msgstr "" #: src/gtk/completion_info_data.c:110 msgid "" "neq(x, y, prec)\n" "True (= 1) when x != y.\n" "The number of digits of comparison can be specified with prec\n" "(prec == 0 is exact match)." msgstr "" #: src/gtk/completion_info_data.c:111 msgid "" "not(x)\n" "True (= 1) when x == 0" msgstr "" #: src/gtk/completion_info_data.c:112 msgid "" "obj_alpha(id, obj)\n" "Set the A and A2 value to the same value as the instance of obj whose " "ID is id.\n" "obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, " "MARK_OBJ or TEXT_OBJ." msgstr "" #: src/gtk/completion_info_data.c:113 msgid "" "obj_color(id, obj)\n" "Set the R, G, B, R2, G2 and B2 values to the same value as the instance of " "obj whose ID is id.\n" "obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, " "MARK_OBJ or TEXT_OBJ." msgstr "" #: src/gtk/completion_info_data.c:114 msgid "" "on_end(proc)\n" "Evaluate proc at the end of plottong the data object." msgstr "" #: src/gtk/completion_info_data.c:115 msgid "" "or(x, y)\n" "True (= 1) when (x != 0) or (y != 0)" msgstr "" #: src/gtk/completion_info_data.c:116 msgid "" "parameter(id)\n" "Returns the value of the prameter object which ID is id." msgstr "" #: src/gtk/completion_info_data.c:117 msgid "" "pn(l, x)\n" "evaluate the Legendre polynomial Pl(x) for a specific " "value of l, x subject to l >= 0, |x| <= 1" msgstr "" #: src/gtk/completion_info_data.c:118 msgid "" "pop(a ,n)\n" "remove the last n elements of array a (n = 0 is as same " "as n = 1).\n" "Returns the new size of the array." msgstr "" #: src/gtk/completion_info_data.c:119 msgid "" "printf($format, v1, v2, ...)\n" "Converts v1, v2, ... to a string according to $format\n" "and show in the information window.\n" "Return the length of the string $str in characters." msgstr "" #: src/gtk/completion_info_data.c:120 msgid "" "prog1(arg1, arg2, ...)\n" "Evaluate the arguments and return the evaluated value of the first argument" msgstr "" #: src/gtk/completion_info_data.c:121 msgid "" "prog2(arg1, arg2, ...)\n" "Evaluate the arguments and return the evaluated value of the second argument" msgstr "" #: src/gtk/completion_info_data.c:122 msgid "" "progn(arg1, arg2, ...)\n" "Evaluate the arguments and return the evaluated value of the last argument" msgstr "" #: src/gtk/completion_info_data.c:123 msgid "" "push(a, x)\n" "adds new element x to the end of an array a.\n" "Returns the new size of the array." msgstr "" #: src/gtk/completion_info_data.c:124 msgid "" "puts($str)\n" "Show $str in the information window.\n" "Return the length of the string $str in characters." msgstr "" #: src/gtk/completion_info_data.c:125 msgid "" "qinv(x)\n" "inverse complementary error function" msgstr "" #: src/gtk/completion_info_data.c:126 msgid "" "rand(x)\n" "returns a random value equally distributed over the range [0..x)" msgstr "" #: src/gtk/completion_info_data.c:127 msgid "" "reduce(a, item, result, ex)\n" "Evaluate ex for each element of the array a\n" "and return last evaluated value of ex.\n" "The element of the array and the result of previous evaluation\n" "can be referred by the variable item and result." msgstr "" #: src/gtk/completion_info_data.c:128 msgid "" "rgb(r, g, b)\n" "Set the R, G and B values of the color to r, g, b (0 <= r, g, " "b <= 1)" msgstr "" #: src/gtk/completion_info_data.c:129 msgid "" "rgb2(r, g, b)\n" "Set the R2, G2 and B2 values of the color to r, g, b (0 <= r, " "g, b <= 1)" msgstr "" #: src/gtk/completion_info_data.c:130 msgid "" "rm(i)\n" "the value of the current i-th memory (i = 0 to 65535),\n" "the index from the tail when i is negative" msgstr "" #: src/gtk/completion_info_data.c:131 msgid "" "round(x, digit)\n" "round the number x, away from zero.\n" "digit is the number of digits to which you want to round x." msgstr "" #: src/gtk/completion_info_data.c:132 msgid "" "rsort(a, ignore_case)\n" "reverse sort elements of array a\n" "fold lower case to upper case characters when ignore_case is not zero." msgstr "" #: src/gtk/completion_info_data.c:133 msgid "" "shift(a, n)\n" "remove the first n elements of array a (n = 0 is as " "same as n = 1).\n" "Returns the new size of the array." msgstr "" #: src/gtk/completion_info_data.c:134 msgid "" "sign(x)\n" "positive / negative sign (-1 with x < 0, 1 with x >= 0)" msgstr "" #: src/gtk/completion_info_data.c:135 msgid "" "sin(x)\n" "sine function" msgstr "" #: src/gtk/completion_info_data.c:136 msgid "" "sinh(x)\n" "hyperbolic sine function" msgstr "" #: src/gtk/completion_info_data.c:137 msgid "" "size(a)\n" "number of elements of array a" msgstr "" #: src/gtk/completion_info_data.c:138 msgid "" "sort(a, ignore_case)\n" "sort elements of array a\n" "fold lower case to upper case characters when ignore_case is not zero." msgstr "" #: src/gtk/completion_info_data.c:139 msgid "" "sprintf($str, $format, v1, v2, ...)\n" "Converts v1, v2, ... to a string according to $format\n" "and set to $str.\n" "Return the length of the string $str in characters." msgstr "" #: src/gtk/completion_info_data.c:140 msgid "" "sqr(x)\n" "squaring" msgstr "" #: src/gtk/completion_info_data.c:141 msgid "" "sqrt(x)\n" "square root" msgstr "" #: src/gtk/completion_info_data.c:142 msgid "" "srand(x)\n" "Sets the seed for the random number generator which is used by the rand() function" msgstr "" #: src/gtk/completion_info_data.c:143 msgid "" "strftime($str, $fmt, t, utc)\n" "convers t (the number of seconds elapsed since the Epoch)\n" "according to the format specification $fmt\n" "and places the result in the string $str.\n" "When utc is true, $str is expressed in Coordinated Universal " "Time (UTC)." msgstr "" #: src/gtk/completion_info_data.c:144 msgid "" "string($str, value)\n" "Converts value to a string and set to $str.\n" "Return the value." msgstr "" #: src/gtk/completion_info_data.c:145 msgid "" "string_append($dest, $src)\n" "Adds the string $src onto the end of the string $dest." msgstr "" #: src/gtk/completion_info_data.c:146 msgid "" "string_column($dest, index)\n" "Set indexth column in the reading data-line to the string $dest." msgstr "" #: src/gtk/completion_info_data.c:147 msgid "" "string_compare($str1, $str2, ignore_case)\n" "Compare two strings, ignoring the case of ASCII characters when " "ignore_case is not zero." msgstr "" #: src/gtk/completion_info_data.c:148 msgid "" "string_down($dest, $src)\n" "Converts all uppercase ASCII letters to lowercase ASCII letters in the " "string $src and set to the string $dest." msgstr "" #: src/gtk/completion_info_data.c:149 msgid "" "string_erase($str, pos, len)\n" "Removes len characters from the string $str, starting at " "position pos." msgstr "" #: src/gtk/completion_info_data.c:150 msgid "" "string_float($str)\n" "Converts the string $str to a floating-point value and return the " "value." msgstr "" #: src/gtk/completion_info_data.c:151 msgid "" "string_float_array(dest, $ary)\n" "Converts the string element of the array $ary\n" "to a floating-point value\n" "and set them to the array dest." msgstr "" #: src/gtk/completion_info_data.c:152 msgid "" "string_insert($dest, $src, pos)\n" "Inserts the string $src into the string $dest at the position " "pos." msgstr "" #: src/gtk/completion_info_data.c:153 msgid "" "string_join($dest, $sep, $array)\n" "Joins a number of strings in the array $array\n" "together to form one long string $dest,\n" "with the optional separator $sepinserted between each of them." msgstr "" #: src/gtk/completion_info_data.c:154 msgid "" "string_length($str)\n" "Return the length of the string $str in characters." msgstr "" #: src/gtk/completion_info_data.c:155 msgid "" "string_match($str, $regexp, ignore_case)\n" "Scans for a match in the string $str for the regular expression " "pattern $regexp.\n" "Return non-zero value if the string matched, zero otherwise." msgstr "" #: src/gtk/completion_info_data.c:156 msgid "" "string_prepend($dest, $src)\n" "Adds the string $src onto the start of the string $dest." msgstr "" #: src/gtk/completion_info_data.c:157 msgid "" "string_replace($dest, $src, $regexp, $replacement, ignore_case)\n" "Replaces all occurrences of the regular expression pattern in $regex " "with the $replacement text.\n" "Backreferences of the form '\\number' or '\\g<number>' in the " "replacement text are interpolated\n" "by the number-th captured subexpression of the match,\n" "'\\g<name>' refers to the captured subexpression with the given name.\n" "'\\0' refers to the complete match,\n" "but '\\0' followed by a number is the octal representation of a character.\n" "Letters in $regex match both upper- and lowercase letters\n" "when ignore_case is not zero." msgstr "" #: src/gtk/completion_info_data.c:158 msgid "" "string_reverse($dest, $src)\n" "Reverses the UTF-8 string $src and set to the string $dest." msgstr "" #: src/gtk/completion_info_data.c:159 msgid "" "string_split($dest, $src, $separator, use_regexp)\n" "Splits the string $src into pieces, using the given $separator.\n" "Each strings are saved in the array $dest\n" "$separator is treated as a regular expression\n" "when use_regexp is not 0.\n" "Letters in $separator match both upper- and lowercase letters\n" "when use_regexp is 2." msgstr "" #: src/gtk/completion_info_data.c:160 msgid "" "string_split_float(dest, $src, $separator, use_regexp)\n" "Splits the string $src into pieces, using the given $separator.\n" "Each strings are converted to float value and saved in the array dest\n" "$separator is treated as a regular expression\n" "when use_regexp is not 0.\n" "Letters in $separator match both upper- and lowercase letters\n" "when use_regexp is 2." msgstr "" #: src/gtk/completion_info_data.c:161 msgid "" "string_strip($str)\n" "Removes leading and trailing whitespace from the string $str." msgstr "" #: src/gtk/completion_info_data.c:162 msgid "" "string_substring($dest, $src, start, end)\n" "Copies a substring out of a UTF-8 encoded string $src.\n" "The substring will contain end - start characters." msgstr "" #: src/gtk/completion_info_data.c:163 msgid "" "string_truncate($str, len)\n" "Cuts off the end of the string $str, leaving the first len " "characters." msgstr "" #: src/gtk/completion_info_data.c:164 msgid "" "string_up($dest, $src)\n" "Converts all lowercase ASCII letters to uppercase ASCII letters in the " "string $src and set to the string $dest." msgstr "" #: src/gtk/completion_info_data.c:165 msgid "" "sum(x)\n" "Integration" msgstr "" #: src/gtk/completion_info_data.c:166 msgid "" "sumsq(a, b, c, ...)\n" "square sum of arguments" msgstr "" #: src/gtk/completion_info_data.c:167 msgid "" "tan(x)\n" "tangent function" msgstr "" #: src/gtk/completion_info_data.c:168 msgid "" "tanh(x)\n" "hyperbolic tangent function" msgstr "" #: src/gtk/completion_info_data.c:169 msgid "" "text_align(x, y)\n" "Set alignment of a text drawing.\n" "x and y represent alignment of parallel and normal direction " "respectively.\n" "(0 <= x, y <= 1)" msgstr "" #: src/gtk/completion_info_data.c:170 msgid "" "text_font(font)\n" "Set font setting of drawing texts.\n" "The value font 0, 1 and 2 represent \"Sans-serif\", \"Serif\" and " "\"Monospace\" respectively." msgstr "" #: src/gtk/completion_info_data.c:171 msgid "" "text_obj_get(id, $text)\n" "assign text of the the text object which ID is id to the variable " "$text." msgstr "" #: src/gtk/completion_info_data.c:172 msgid "" "text_obj_set(id, $text)\n" "set text of the the text object which ID is id as the variable " "$text." msgstr "" #: src/gtk/completion_info_data.c:173 msgid "" "text_size(pt, space, script)\n" "Set font size and other settings of drawing texts.\n" "Font size can be specified by pt.\n" "Font-spacing and script-size are specified by the following arguments." msgstr "" #: src/gtk/completion_info_data.c:174 msgid "" "text_style(style)\n" "Set font style settings of drawing texts.\n" "The value style 0, 1, 2 and 3 represent \"normal\", \"bold\", \"italic" "\" and \"bold-italic\" respectively." msgstr "" #: src/gtk/completion_info_data.c:175 msgid "" "theta(x)\n" "staircase function (1 if x >= 0, 0 otherwise)" msgstr "" #: src/gtk/completion_info_data.c:176 msgid "" "time()\n" "returns the time as the number of seconds since the Epoch,\n" "1970-01-01 00:00:00 +0000 (UTC)" msgstr "" #: src/gtk/completion_info_data.c:177 msgid "" "times(n, index, ex)\n" "Repeat ex n times.\n" "The loop count can be referred by the variable index." msgstr "" #: src/gtk/completion_info_data.c:178 msgid "" "tn(n, x)\n" "Chebyshev polynomials" msgstr "" #: src/gtk/completion_info_data.c:179 msgid "" "unix2mjd(time)\n" "Modified Julian Date\n" "time represents the number of seconds elapsed since the Epoch,\n" "1970-01-01 00:00:00 +0000 (UTC))" msgstr "" #: src/gtk/completion_info_data.c:180 msgid "" "unless(x, ex1, ex2)\n" "evaluate ex2 when x != 0, evaluate ex1 otherwise" msgstr "" #: src/gtk/completion_info_data.c:181 msgid "" "unshift(a, x)\n" "adds new element x to the beginning of an array a.\n" "Returns the new size of the array." msgstr "" #: src/gtk/completion_info_data.c:182 msgid "" "xor(x, y)\n" "True (= 1) when (x != 0) xor (y != 0)" msgstr "" #: src/gtk/completion_info_data.c:183 msgid "" "yl(l, x)\n" "compute the irregular spherical Bessel function of order |l|, " "yl(|x|)" msgstr "" #: src/gtk/completion_info_data.c:184 msgid "" "yn(n, x)\n" "compute the irregular cylindrical Bessel function of order n, " "Yn(|x|)" msgstr "" #: src/gtk/completion_info_data.c:185 msgid "" "ynu(nu, x)\n" "compute the irregular cylindrical Bessel function of fractional order |" "nu|, Ynu(|x|)" msgstr "" #: src/gtk/completion_info_data.c:186 msgid "" "zeta(s)\n" "compute the Riemann zeta function zeta(s) for arbitrary s, s !" "= 1" msgstr "" #: src/gtk/completion_info_data.c:187 msgid "" "zeta_int(n)\n" "compute the Riemann zeta function zeta(n) for integer n, n != 1" msgstr "" #: src/gtk/completion_info_data.c:188 msgid "" "zetam1(s)\n" "compute zeta(s) - 1 for arbitrary s, s != 1" msgstr "" #: src/gtk/completion_info_data.c:189 msgid "" "zetam1_int(n)\n" "compute zeta(n) - 1 for integer n, n != 1" msgstr "" #: src/gtk/completion_info_data.c:190 msgid "" "zip(a1, a2, item1, item2, ex)\n" "Evaluate ex for each element of two arrays a1 and a2.\n" "The elements of the arrays can be referred by the variable item1 and " "item2." msgstr "" #: src/gtk/completion_info_data.c:191 msgid "" "zip_map(dest, src1, src2, item1, item2, ex)\n" "Evaluate ex for each element of two arrays src1 and sec2\n" "and set them to the array dest..\n" "The elements of the arrays can be referred by the variable item1 and " "item2." msgstr "" #: src/gtk/completion_info_data.c:195 msgid "" "%D\n" "The ID of the instance of the data object" msgstr "" #: src/gtk/completion_info_data.c:196 msgid "" "%N\n" "The number of instances of data object" msgstr "" #: src/gtk/completion_info_data.c:197 msgid "" "ARC_OBJ\n" "The identification number of the arc object" msgstr "" #: src/gtk/completion_info_data.c:198 msgid "" "AVX\n" "The average of X" msgstr "" #: src/gtk/completion_info_data.c:199 msgid "" "AVY\n" "The average of X" msgstr "" #: src/gtk/completion_info_data.c:200 msgid "" "AXISX\n" "The ID of the axis instance specified as X axis" msgstr "" #: src/gtk/completion_info_data.c:201 msgid "" "AXISX_LEN\n" "Length of the X axis" msgstr "" #: src/gtk/completion_info_data.c:202 msgid "" "AXISX_MAX\n" "The maximum value of the X axis" msgstr "" #: src/gtk/completion_info_data.c:203 msgid "" "AXISX_MIN\n" "The minimum value of the X axis" msgstr "" #: src/gtk/completion_info_data.c:204 msgid "" "AXISY\n" "The ID of the axis instance specified as Y axis" msgstr "" #: src/gtk/completion_info_data.c:205 msgid "" "AXISY_LEN\n" "Length of the Y axis" msgstr "" #: src/gtk/completion_info_data.c:206 msgid "" "AXISY_MAX\n" "The maximum value of the Y axis" msgstr "" #: src/gtk/completion_info_data.c:207 msgid "" "AXISY_MIN\n" "The minimum value of the Y axis" msgstr "" #: src/gtk/completion_info_data.c:208 msgid "" "BREAK\n" "Missing data (data lines are not combined)" msgstr "" #: src/gtk/completion_info_data.c:209 msgid "" "COLX\n" "The column number specified for X" msgstr "" #: src/gtk/completion_info_data.c:210 msgid "" "COLY\n" "The column number specified for Y" msgstr "" #: src/gtk/completion_info_data.c:211 msgid "" "CONT\n" "Missing data (data lines are combined)" msgstr "" #: src/gtk/completion_info_data.c:212 msgid "" "DATA_OBJ\n" "The identification number of the data object" msgstr "" #: src/gtk/completion_info_data.c:213 msgid "" "E\n" "The base of natural logarithm (Napier's constant)" msgstr "" #: src/gtk/completion_info_data.c:214 msgid "" "EULER\n" "Euler's constant" msgstr "" #: src/gtk/completion_info_data.c:215 msgid "" "FALSE\n" "the FALSE value (0)" msgstr "" #: src/gtk/completion_info_data.c:216 msgid "" "FILE_OBJ\n" "The identification number of the file object" msgstr "" #: src/gtk/completion_info_data.c:217 msgid "" "FILL_RULE_EVEN_ODD\n" "Defined for the function draw_polygon().\n" "fill the polygon with evin-odd rule." msgstr "" #: src/gtk/completion_info_data.c:218 msgid "" "FILL_RULE_NONE\n" "Defined for the function draw_polygon().\n" "don't fill the polygon." msgstr "" #: src/gtk/completion_info_data.c:219 msgid "" "FILL_RULE_WINDING\n" "Defined for the function draw_polygon().\n" "fill the polygon with winding rule." msgstr "" #: src/gtk/completion_info_data.c:220 msgid "" "FIRST\n" "When conversion is performed twice with one line of data such as diagonal or " "errorbar plot,\n" "true (1) in the first call, false (0) in the second call." msgstr "" #: src/gtk/completion_info_data.c:221 msgid "" "FLINE\n" "Number of lines specified as \"Final line\"" msgstr "" #: src/gtk/completion_info_data.c:222 msgid "" "HSKIP\n" "Number of lines specified as \"Head skip\"" msgstr "" #: src/gtk/completion_info_data.c:223 msgid "" "MARK_OBJ\n" "The identification number of the mark object" msgstr "" #: src/gtk/completion_info_data.c:224 msgid "" "MASK\n" "Number of lines set for mask" msgstr "" #: src/gtk/completion_info_data.c:225 msgid "" "MAXX\n" "The maximum value of X" msgstr "" #: src/gtk/completion_info_data.c:226 msgid "" "MAXY\n" "The maximum value of Y" msgstr "" #: src/gtk/completion_info_data.c:227 msgid "" "MINX\n" "The minimum value of X" msgstr "" #: src/gtk/completion_info_data.c:228 msgid "" "MINY\n" "The minimum value of Y" msgstr "" #: src/gtk/completion_info_data.c:229 msgid "" "MOVE\n" "Number of lines set for move" msgstr "" #: src/gtk/completion_info_data.c:230 msgid "" "NAN\n" "Missing data with error indication" msgstr "" #: src/gtk/completion_info_data.c:231 msgid "" "NUM\n" "The number of the data" msgstr "" #: src/gtk/completion_info_data.c:232 msgid "" "PATH_OBJ\n" "The identification number of the path object" msgstr "" #: src/gtk/completion_info_data.c:233 msgid "" "PI\n" "Pi" msgstr "" #: src/gtk/completion_info_data.c:234 msgid "" "RECT_OBJ\n" "The identification number of the rectangle object" msgstr "" #: src/gtk/completion_info_data.c:235 msgid "" "RSTEP\n" "Number of lines specified as \"Read step\"" msgstr "" #: src/gtk/completion_info_data.c:236 msgid "" "STDEVPX\n" "The standard deviation of X" msgstr "" #: src/gtk/completion_info_data.c:237 msgid "" "STDEVPY\n" "The standard deviation of Y" msgstr "" #: src/gtk/completion_info_data.c:238 msgid "" "STDEVX\n" "The corrected sample standard deviation of X" msgstr "" #: src/gtk/completion_info_data.c:239 msgid "" "STDEVY\n" "The corrected sample standard deviation of Y" msgstr "" #: src/gtk/completion_info_data.c:240 msgid "" "SUMX\n" "Sum of X" msgstr "" #: src/gtk/completion_info_data.c:241 msgid "" "SUMXX\n" "Square sum of X" msgstr "" #: src/gtk/completion_info_data.c:242 msgid "" "SUMXY\n" "Product sum of X and Y" msgstr "" #: src/gtk/completion_info_data.c:243 msgid "" "SUMY\n" "Sum of Y" msgstr "" #: src/gtk/completion_info_data.c:244 msgid "" "SUMYY\n" "Square sum of Y" msgstr "" #: src/gtk/completion_info_data.c:245 msgid "" "TEXT_OBJ\n" "The identification number of the text object" msgstr "" #: src/gtk/completion_info_data.c:246 msgid "" "TRUE\n" "the TRUE value (1)" msgstr "" #: src/gtk/completion_info_data.c:247 msgid "" "UNDEF\n" "Missing data without error indication" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:5 #: src/gtk/data/gtk/menus-common-win.ui.in:5 src/gtk/data/gtk/menus-common.ui:5 msgid "_Graph" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:8 #: src/gtk/data/gtk/menus-common-win.ui.in:8 src/gtk/data/gtk/menus-common.ui:8 msgid "_New graph" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:25 #: src/gtk/data/gtk/menus-common-win.ui.in:25 #: src/gtk/data/gtk/menus-common.ui:25 msgid "_All clear" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:43 #: src/gtk/data/gtk/menus-common.ui.in:689 #: src/gtk/data/gtk/menus-common-win.ui.in:43 #: src/gtk/data/gtk/menus-common-win.ui.in:697 #: src/gtk/data/gtk/menus-common.ui:43 src/gtk/data/gtk/menus-common.ui:689 msgid "Save _As" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:50 #: src/gtk/data/gtk/menus-common.ui.in:695 #: src/gtk/data/gtk/menus-common-win.ui.in:50 #: src/gtk/data/gtk/menus-common-win.ui.in:703 #: src/gtk/data/gtk/menus-common.ui:50 src/gtk/data/gtk/menus-common.ui:695 msgid "_Export image" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:52 #: src/gtk/data/gtk/menus-common.ui.in:697 #: src/gtk/data/gtk/menus-common-win.ui.in:52 #: src/gtk/data/gtk/menus-common-win.ui.in:705 #: src/gtk/data/gtk/menus-common.ui:52 src/gtk/data/gtk/menus-common.ui:697 msgid "_GRA file" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:56 #: src/gtk/data/gtk/menus-common.ui.in:701 #: src/gtk/data/gtk/menus-common-win.ui.in:56 #: src/gtk/data/gtk/menus-common-win.ui.in:709 #: src/gtk/data/gtk/menus-common.ui:56 src/gtk/data/gtk/menus-common.ui:701 msgid "_PS file" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:60 #: src/gtk/data/gtk/menus-common.ui.in:705 #: src/gtk/data/gtk/menus-common-win.ui.in:60 #: src/gtk/data/gtk/menus-common-win.ui.in:713 #: src/gtk/data/gtk/menus-common.ui:60 src/gtk/data/gtk/menus-common.ui:705 msgid "_EPS file" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:64 #: src/gtk/data/gtk/menus-common.ui.in:709 #: src/gtk/data/gtk/menus-common-win.ui.in:64 #: src/gtk/data/gtk/menus-common-win.ui.in:717 #: src/gtk/data/gtk/menus-common.ui:64 src/gtk/data/gtk/menus-common.ui:709 msgid "P_DF file" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:68 #: src/gtk/data/gtk/menus-common.ui.in:713 #: src/gtk/data/gtk/menus-common-win.ui.in:68 #: src/gtk/data/gtk/menus-common-win.ui.in:721 #: src/gtk/data/gtk/menus-common.ui:68 src/gtk/data/gtk/menus-common.ui:713 msgid "_SVG file" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:72 #: src/gtk/data/gtk/menus-common.ui.in:717 #: src/gtk/data/gtk/menus-common-win.ui.in:72 #: src/gtk/data/gtk/menus-common-win.ui.in:725 #: src/gtk/data/gtk/menus-common.ui:72 src/gtk/data/gtk/menus-common.ui:717 msgid "P_NG file" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:85 #: src/gtk/data/gtk/menus-common-win.ui.in:93 #: src/gtk/data/gtk/menus-common.ui:85 msgid "Page Set_up" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:89 #: src/gtk/data/gtk/menus-common-win.ui.in:97 #: src/gtk/data/gtk/menus-common.ui:89 msgid "Pre_view" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:100 #: src/gtk/data/gtk/menus-common-win.ui.in:108 #: src/gtk/data/gtk/menus-common.ui:100 msgid "_Current directory" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:106 #: src/gtk/data/gtk/menus-common-win.ui.in:114 #: src/gtk/data/gtk/menus-common.ui:106 msgid "_Ngraph shell" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:112 #: src/gtk/data/gtk/menus-common-win.ui.in:120 #: src/gtk/data/gtk/menus-common.ui:112 msgid "_Quit" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:134 #: src/gtk/data/gtk/menus-common.ui.in:572 #: src/gtk/data/gtk/menus-common-win.ui.in:142 #: src/gtk/data/gtk/menus-common-win.ui.in:580 #: src/gtk/data/gtk/menus-common.ui:134 src/gtk/data/gtk/menus-common.ui:572 msgid "Cu_t" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:144 #: src/gtk/data/gtk/menus-common.ui.in:580 #: src/gtk/data/gtk/menus-common-win.ui.in:152 #: src/gtk/data/gtk/menus-common-win.ui.in:588 #: src/gtk/data/gtk/menus-common.ui:144 src/gtk/data/gtk/menus-common.ui:580 msgid "_Paste" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:166 #: src/gtk/data/gtk/menus-common-win.ui.in:174 #: src/gtk/data/gtk/menus-common.ui:166 msgid "draw _Order" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:189 #: src/gtk/data/gtk/menus-common.ui.in:600 #: src/gtk/data/gtk/menus-common-win.ui.in:197 #: src/gtk/data/gtk/menus-common-win.ui.in:608 #: src/gtk/data/gtk/menus-common.ui:189 src/gtk/data/gtk/menus-common.ui:600 msgid "_Align" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:192 #: src/gtk/data/gtk/menus-common.ui.in:603 #: src/gtk/data/gtk/menus-common-win.ui.in:200 #: src/gtk/data/gtk/menus-common-win.ui.in:611 #: src/gtk/data/gtk/menus-common.ui:192 src/gtk/data/gtk/menus-common.ui:603 msgid "Align _Left" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:196 #: src/gtk/data/gtk/menus-common.ui.in:607 #: src/gtk/data/gtk/menus-common-win.ui.in:204 #: src/gtk/data/gtk/menus-common-win.ui.in:615 #: src/gtk/data/gtk/menus-common.ui:196 src/gtk/data/gtk/menus-common.ui:607 msgid "Align _Horizontal Center" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:200 #: src/gtk/data/gtk/menus-common.ui.in:611 #: src/gtk/data/gtk/menus-common-win.ui.in:208 #: src/gtk/data/gtk/menus-common-win.ui.in:619 #: src/gtk/data/gtk/menus-common.ui:200 src/gtk/data/gtk/menus-common.ui:611 msgid "Align _Right" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:206 #: src/gtk/data/gtk/menus-common.ui.in:617 #: src/gtk/data/gtk/menus-common-win.ui.in:214 #: src/gtk/data/gtk/menus-common-win.ui.in:625 #: src/gtk/data/gtk/menus-common.ui:206 src/gtk/data/gtk/menus-common.ui:617 msgid "Align _Top" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:210 #: src/gtk/data/gtk/menus-common.ui.in:621 #: src/gtk/data/gtk/menus-common-win.ui.in:218 #: src/gtk/data/gtk/menus-common-win.ui.in:629 #: src/gtk/data/gtk/menus-common.ui:210 src/gtk/data/gtk/menus-common.ui:621 msgid "Align _Vertical Center" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:214 #: src/gtk/data/gtk/menus-common.ui.in:625 #: src/gtk/data/gtk/menus-common-win.ui.in:222 #: src/gtk/data/gtk/menus-common-win.ui.in:633 #: src/gtk/data/gtk/menus-common.ui:214 src/gtk/data/gtk/menus-common.ui:625 msgid "Align _Bottom" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:220 #: src/gtk/data/gtk/menus-common.ui.in:634 #: src/gtk/data/gtk/menus-common-win.ui.in:228 #: src/gtk/data/gtk/menus-common-win.ui.in:642 #: src/gtk/data/gtk/menus-common.ui:220 src/gtk/data/gtk/menus-common.ui:634 msgid "rotate _90 degree clockwise" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:224 #: src/gtk/data/gtk/menus-common.ui.in:638 #: src/gtk/data/gtk/menus-common-win.ui.in:232 #: src/gtk/data/gtk/menus-common-win.ui.in:646 #: src/gtk/data/gtk/menus-common.ui:224 src/gtk/data/gtk/menus-common.ui:638 msgid "rotate 9_0 degree counter-clockwise" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:228 #: src/gtk/data/gtk/menus-common.ui.in:647 #: src/gtk/data/gtk/menus-common-win.ui.in:236 #: src/gtk/data/gtk/menus-common-win.ui.in:655 #: src/gtk/data/gtk/menus-common.ui:228 src/gtk/data/gtk/menus-common.ui:647 msgid "flip _Horizontally" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:232 #: src/gtk/data/gtk/menus-common.ui.in:651 #: src/gtk/data/gtk/menus-common-win.ui.in:240 #: src/gtk/data/gtk/menus-common-win.ui.in:659 #: src/gtk/data/gtk/menus-common.ui:232 src/gtk/data/gtk/menus-common.ui:651 msgid "flip _Vertically" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:238 #: src/gtk/data/gtk/menus-common-win.ui.in:246 #: src/gtk/data/gtk/menus-common.ui:238 msgid "_View" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:248 #: src/gtk/data/gtk/menus-common-win.ui.in:256 #: src/gtk/data/gtk/menus-common.ui:248 msgid "_Clear information view" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:254 #: src/gtk/data/gtk/menus-common-win.ui.in:262 #: src/gtk/data/gtk/menus-common.ui:254 msgid "_Sidebar" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:258 #: src/gtk/data/gtk/menus-common-win.ui.in:266 #: src/gtk/data/gtk/menus-common.ui:258 msgid "_Statusbar" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:262 #: src/gtk/data/gtk/menus-common-win.ui.in:270 #: src/gtk/data/gtk/menus-common.ui:262 msgid "_Ruler" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:266 #: src/gtk/data/gtk/menus-common-win.ui.in:274 #: src/gtk/data/gtk/menus-common.ui:266 msgid "_Scrollbar" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:270 #: src/gtk/data/gtk/menus-common-win.ui.in:278 #: src/gtk/data/gtk/menus-common.ui:270 msgid "_Command toolbar" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:274 #: src/gtk/data/gtk/menus-common-win.ui.in:282 #: src/gtk/data/gtk/menus-common.ui:274 msgid "_Toolbox" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:278 #: src/gtk/data/gtk/menus-common.ui.in:677 #: src/gtk/data/gtk/menus-common-win.ui.in:286 #: src/gtk/data/gtk/menus-common-win.ui.in:685 #: src/gtk/data/gtk/menus-common.ui:278 src/gtk/data/gtk/menus-common.ui:677 msgid "cross _Gauge" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:289 #: src/gtk/data/gtk/menus-common-win.ui.in:297 #: src/gtk/data/gtk/menus-common.ui:289 msgid "_Object" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:323 #: src/gtk/data/gtk/menus-common.ui.in:724 #: src/gtk/data/gtk/menus-common-win.ui.in:331 #: src/gtk/data/gtk/menus-common-win.ui.in:740 #: src/gtk/data/gtk/menus-common.ui:323 src/gtk/data/gtk/menus-common.ui:724 msgid "_Save data" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:333 #: src/gtk/data/gtk/menus-common-win.ui.in:341 #: src/gtk/data/gtk/menus-common.ui:333 msgid "_Axis" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:365 #: src/gtk/data/gtk/menus-common-win.ui.in:373 #: src/gtk/data/gtk/menus-common.ui:365 msgid "Scale _Zoom" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:397 #: src/gtk/data/gtk/menus-common-win.ui.in:405 #: src/gtk/data/gtk/menus-common.ui:397 msgid "_Path" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:410 #: src/gtk/data/gtk/menus-common-win.ui.in:418 #: src/gtk/data/gtk/menus-common.ui:410 msgid "_Rectangle" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:423 #: src/gtk/data/gtk/menus-common-win.ui.in:431 #: src/gtk/data/gtk/menus-common.ui:423 msgid "_Arc" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:436 #: src/gtk/data/gtk/menus-common-win.ui.in:444 #: src/gtk/data/gtk/menus-common.ui:436 msgid "_Mark" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:449 #: src/gtk/data/gtk/menus-common-win.ui.in:457 #: src/gtk/data/gtk/menus-common.ui:449 msgid "_Text" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:462 #: src/gtk/data/gtk/menus-common-win.ui.in:470 #: src/gtk/data/gtk/menus-common.ui:462 msgid "_Merge" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:479 #: src/gtk/data/gtk/menus-common-win.ui.in:487 #: src/gtk/data/gtk/menus-common.ui:479 msgid "_Parameter" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:498 #: src/gtk/data/gtk/menus-common-win.ui.in:506 #: src/gtk/data/gtk/menus-common.ui:498 msgid "_Preference" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:505 #: src/gtk/data/gtk/menus-common-win.ui.in:513 #: src/gtk/data/gtk/menus-common.ui:505 msgid "_External viewer" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:513 #: src/gtk/data/gtk/menus-common-win.ui.in:521 #: src/gtk/data/gtk/menus-common.ui:513 msgid "_Add-in script" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:523 #: src/gtk/data/gtk/menus-common-win.ui.in:531 #: src/gtk/data/gtk/menus-common.ui:523 msgid "save as default (_Settings)" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:527 #: src/gtk/data/gtk/menus-common-win.ui.in:535 #: src/gtk/data/gtk/menus-common.ui:527 msgid "save as default (_Graph)" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:533 #: src/gtk/data/gtk/menus-common-win.ui.in:541 #: src/gtk/data/gtk/menus-common.ui:533 msgid "_Data file default" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:537 #: src/gtk/data/gtk/menus-common-win.ui.in:545 #: src/gtk/data/gtk/menus-common.ui:537 msgid "_Legend text default" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:541 #: src/gtk/data/gtk/menus-common-win.ui.in:549 #: src/gtk/data/gtk/menus-common.ui:541 msgid "_Axis grid default" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:547 #: src/gtk/data/gtk/menus-common.ui.in:550 #: src/gtk/data/gtk/menus-common-win.ui.in:555 #: src/gtk/data/gtk/menus-common-win.ui.in:558 #: src/gtk/data/gtk/menus-common.ui:547 src/gtk/data/gtk/menus-common.ui:550 msgid "_Help" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:555 #: src/gtk/data/gtk/menus-common-win.ui.in:563 #: src/gtk/data/gtk/menus-common.ui:555 msgid "_Keyboard shortcus" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:559 #: src/gtk/data/gtk/menus-common-win.ui.in:567 #: src/gtk/data/gtk/menus-common.ui:559 msgid "_Demonstration" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:563 #: src/gtk/data/gtk/menus-common-win.ui.in:571 #: src/gtk/data/gtk/menus-common.ui:563 msgid "_About" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:631 #: src/gtk/data/gtk/menus-common-win.ui.in:639 #: src/gtk/data/gtk/menus-common.ui:631 msgid "_Rotate" msgstr "" #: src/gtk/data/gtk/menus-common.ui.in:644 #: src/gtk/data/gtk/menus-common-win.ui.in:652 #: src/gtk/data/gtk/menus-common.ui:644 msgid "_Flip" msgstr "" #: src/gtk/data/gtk/menus-common-win.ui.in:76 #: src/gtk/data/gtk/menus-common-win.ui.in:729 msgid "E_MF file" msgstr "" #: src/gtk/data/gtk/menus-common-win.ui.in:80 #: src/gtk/data/gtk/menus-common-win.ui.in:733 msgid "_Clipboard (EMF)" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:23 src/odraw.c:66 msgid "miter" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:28 src/odraw.c:67 msgid "round" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:33 src/odraw.c:68 msgid "bevel" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:47 src/gtk/data/gtk/menus-tool.ui:76 #: src/odraw.c:89 src/odata.c:253 msgid "arrow" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:52 src/gtk/data/gtk/menus-tool.ui:81 #: src/odraw.c:90 msgid "wave" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:57 src/gtk/data/gtk/menus-tool.ui:86 #: src/odraw.c:91 src/odata.c:247 msgid "mark" msgstr "" #: src/gtk/data/gtk/menus-tool.ui:62 src/gtk/data/gtk/menus-tool.ui:91 #: src/odraw.c:92 msgid "bar" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:18 msgid "Load a graph (NGP file)" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:25 msgid "Save the graph" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:32 msgid "Save the graph with a new filename" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:39 msgid "Print the graph" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:46 msgid "Add data file" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:67 msgid "Show cross gauge" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:74 msgid "Quit the application" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:87 msgid "Undo previous command" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:94 msgid "Redo previous command" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:101 msgid "Cut selected object to clipboard" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:108 msgid "Copy selected object to clipboard" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:115 msgid "Paste object from clipboard" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:122 msgid "Delete the selected object" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:129 msgid "Duplicate the selected object" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:136 msgid "Rise selection to top" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:143 msgid "Lower selection to bottom" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:156 msgid "Show the help document" msgstr "" #: src/gtk/data/gtk/help-overlay.ui:163 msgid "Show shortcut keys" msgstr "" #. used for the application menu on MacOS. %s is replaced with the application name. #: src/gtk/data/gtk/menus-appmenu.ui:7 #, c-format msgid "About %s" msgstr "" #. used for the application menu on MacOS #: src/gtk/data/gtk/menus-appmenu.ui:23 msgid "Services" msgstr "" #. used for the application menu on MacOS. %s is replaced with the application name. #: src/gtk/data/gtk/menus-appmenu.ui:30 #, c-format msgid "Hide %s" msgstr "" #. used for the application menu on MacOS #: src/gtk/data/gtk/menus-appmenu.ui:36 msgid "Hide Others" msgstr "" #. used for the application menu on MacOS #: src/gtk/data/gtk/menus-appmenu.ui:42 msgid "Show All" msgstr "" #. used for the application menu on MacOS. %s is replaced with the application name. #: src/gtk/data/gtk/menus-appmenu.ui:50 #, c-format msgid "Quit %s" msgstr "" #: src/math/math_error.c:13 msgid "syntax error, unexpected end of equation." msgstr "" #: src/math/math_error.c:14 msgid "syntax error, function definition cannot be nested." msgstr "" #: src/math/math_error.c:15 msgid "syntax error, unexpected operator." msgstr "" #: src/math/math_error.c:16 msgid "syntax error, unexpected token." msgstr "" #: src/math/math_error.c:17 msgid "syntax error, wrong number of arguments." msgstr "" #: src/math/math_error.c:18 msgid "syntax error, unexpected end of equation, expecting ')'." msgstr "" #: src/math/math_error.c:19 msgid "syntax error, unexpected end of equation, expecting '}'." msgstr "" #: src/math/math_error.c:20 msgid "syntax error, unexpected end of equation, expecting ']'." msgstr "" #: src/math/math_error.c:21 msgid "syntax error, invalid function definition." msgstr "" #: src/math/math_error.c:22 msgid "syntax error, invalid argument." msgstr "" #: src/math/math_error.c:23 msgid "syntax error, constant cannot be defined in a function definition." msgstr "" #: src/math/math_error.c:24 msgid "error, invalid parameter." msgstr "" #: src/math/math_error.c:25 msgid "" "error, a parameter cannot be used in a user function or a constant " "definition." msgstr "" #: src/math/math_error.c:26 msgid "error, unknown function." msgstr "" #: src/math/math_error.c:27 msgid "error, cannot allocate enough memory." msgstr "" #: src/math/math_error.c:28 msgid "error, unknown error." msgstr "" #: src/math/math_error.c:29 msgid "" "error, the function cannot be used in a user function or a constant " "definition." msgstr "" #: src/math/math_error.c:30 msgid "error, the constant is already defined." msgstr "" #: src/math/math_error.c:31 msgid "error, calculation error." msgstr "" #: src/math/math_error.c:32 msgid "syntax error, unterminated string." msgstr "" #: src/math/math_error.c:93 src/math/math_error.c:104 src/math/math_error.c:129 #: src/math/math_error.c:140 src/math/math_error.c:151 #: src/math/math_error.c:162 src/math/math_error.c:173 #: src/math/math_error.c:184 src/math/math_error.c:195 #: src/math/math_error.c:206 src/math/math_error.c:217 #: src/math/math_error.c:228 #, c-format msgid "" "%s (%d:%d)\n" " the error is found at: %s" msgstr "" #: src/nstring.c:40 msgid "locale" msgstr "" #: src/nstring.c:41 src/ogra.c:57 msgid "period" msgstr "" #: src/nstring.c:42 src/ogra.c:58 msgid "comma" msgstr "" #: src/odraw.c:60 msgid "relative" msgstr "" #: src/odraw.c:81 msgid "end" msgstr "" #: src/odraw.c:82 msgid "begin" msgstr "" #: src/odraw.c:83 src/oaxis.c:78 msgid "both" msgstr "" #: src/odraw.c:97 msgid "spline" msgstr "" #: src/odraw.c:98 msgid "spline_close" msgstr "" #: src/odraw.c:99 msgid "bspline" msgstr "" #: src/odraw.c:100 msgid "bspline_close" msgstr "" #: src/oagrid.c:36 msgid "axisgrid" msgstr "" #: src/oarc.c:38 msgid "arc" msgstr "" #: src/oaxis.c:69 msgid "linear" msgstr "" #: src/oaxis.c:70 src/ofit.c:89 msgid "log" msgstr "" #: src/oaxis.c:71 msgid "inverse" msgstr "" #: src/oaxis.c:72 msgid "MJD" msgstr "" #: src/oaxis.c:80 src/oaxis.c:94 src/oaxis.c:107 msgid "right" msgstr "" #: src/oaxis.c:105 msgid "center" msgstr "" #: src/oaxis.c:108 msgid "point" msgstr "" #: src/oaxis.c:121 msgid "regular" msgstr "" #: src/oaxis.c:122 msgid "no_zero" msgstr "" #: src/oaxis.c:123 msgid "no_floating_point" msgstr "" #: src/oaxis.c:137 msgid "horizontal" msgstr "" #: src/oaxis.c:138 msgid "parallel1" msgstr "" #: src/oaxis.c:139 msgid "parallel2" msgstr "" #: src/oaxis.c:140 msgid "normal1" msgstr "" #: src/oaxis.c:141 msgid "normal2" msgstr "" #: src/oaxis.c:142 msgid "oblique1" msgstr "" #: src/oaxis.c:143 msgid "oblique2" msgstr "" #: src/ofit.c:86 msgid "poly" msgstr "" #: src/ofit.c:87 msgid "pow" msgstr "" #: src/ofit.c:88 msgid "exp" msgstr "" #: src/ofit.c:90 msgid "user" msgstr "" #: src/odata.c:161 msgid "data" msgstr "" #: src/odata.c:235 msgid "range" msgstr "" #: src/odata.c:240 msgid "simple" msgstr "" #: src/odata.c:241 msgid "weighted" msgstr "" #: src/odata.c:242 msgid "exponential" msgstr "" #: src/odata.c:249 msgid "polygon" msgstr "" #: src/odata.c:250 msgid "polygon_solid_fill" msgstr "" #: src/odata.c:251 src/opath.c:82 msgid "curve" msgstr "" #: src/odata.c:252 msgid "diagonal" msgstr "" #: src/odata.c:254 msgid "rectangle" msgstr "" #: src/odata.c:255 msgid "rectangle_fill" msgstr "" #: src/odata.c:256 msgid "rectangle_solid_fill" msgstr "" #: src/odata.c:257 msgid "errorbar_x" msgstr "" #: src/odata.c:258 msgid "errorbar_y" msgstr "" #: src/odata.c:259 msgid "staircase_x" msgstr "" #: src/odata.c:260 msgid "staircase_y" msgstr "" #: src/odata.c:261 msgid "bar_x" msgstr "" #: src/odata.c:262 msgid "bar_y" msgstr "" #: src/odata.c:263 msgid "bar_fill_x" msgstr "" #: src/odata.c:264 msgid "bar_fill_y" msgstr "" #: src/odata.c:265 msgid "bar_solid_fill_x" msgstr "" #: src/odata.c:266 msgid "bar_solid_fill_y" msgstr "" #: src/ogra.c:487 #, c-format msgid "drawing %s (%.1f%%)" msgstr "" #: src/olegend.c:37 msgid "legend" msgstr "" #: src/oparameter.c:36 msgid "SpinButton" msgstr "" #: src/oparameter.c:38 msgid "CheckButton" msgstr "" #: src/oparameter.c:39 msgid "Switch" msgstr "" #: src/oparameter.c:40 msgid "ComboBox" msgstr "" #: src/oparameter.c:41 msgid "Transition" msgstr "" #: src/oparameter.c:46 msgid "start" msgstr "" #: src/oparameter.c:47 msgid "stop" msgstr "" #: src/opath.c:40 msgid "path" msgstr "" #: src/opath.c:70 msgid "even_odd_rule" msgstr "" #: src/opath.c:71 msgid "winding_rule" msgstr "" #: src/otext.c:43 msgid "text" msgstr "" ngraph-gtk-6.09.05/po/Makefile.in.in0000644000175000017500000004616314142161772013765 00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-2000 Ulrich Drepper # Copyright (C) 2000-2020 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # # Origin: gettext-0.21 GETTEXT_MACRO_VERSION = 0.20 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SED = @SED@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ # When building gettext-tools, we prefer to use the built programs # rather than installed programs. However, we can't do that when we # are cross compiling. CROSS_COMPILING = @CROSS_COMPILING@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot POFILESDEPS_yes = $(POFILESDEPS_) POFILESDEPS_no = POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) DISTFILESDEPS_ = update-po DISTFILESDEPS_yes = $(DISTFILESDEPS_) DISTFILESDEPS_no = DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) # Makevars gets inserted here. (Don't remove this line!) all: all-@USE_NLS@ .SUFFIXES: .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update # The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. # The GNU Coding Standards say in # : # "GNU distributions usually contain some files which are not source files # ... . Since these files normally appear in the source directory, they # should always appear in the source directory, not in the build directory. # So Makefile rules to update them should put the updated files in the # source directory." # Therefore we put these files in the source directory, not the build directory. # During .po -> .gmo conversion, take into account the most recent changes to # the .pot file. This eliminates the need to update the .po files when the # .pot file has changed, which would be troublesome if the .po files are put # under version control. $(GMOFILES): $(srcdir)/$(DOMAIN).pot .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ cd $(srcdir) && \ rm -f $${lang}.gmo && \ $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ mv t-$${lang}.gmo $${lang}.gmo && \ rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all-yes: $(srcdir)/stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. CHECK_MACRO_VERSION = \ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). # $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS # have been loosely updated. Its purpose is that when a developer or translator # checks out the package from a version control system, and the $(DOMAIN).pot # file is not under version control, "make" will update the $(DOMAIN).pot and # the $(CATALOGS), but subsequent invocations of "make" will do nothing. This # timestamp would not be necessary if updating the $(CATALOGS) would always # touch them; however, the rule for $(POFILES) has been designed to not touch # files that don't need to be changed. $(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch $(srcdir)/stamp-po" && \ echo timestamp > $(srcdir)/stamp-poT && \ mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. # The determination of whether the package xyz is a GNU one is based on the # heuristic whether some file in the top level directory mentions "GNU xyz". # If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ else \ LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ else \ package_gnu=no; \ fi; \ }; \ if test "$$package_gnu" = "yes"; then \ package_prefix='GNU '; \ else \ package_prefix=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot-header; then \ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ rm -f $(DOMAIN).1po \ || exit 1; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(POFILESDEPS) @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: install-dvi install-ps install-pdf install-html: mostlyclean: rm -f remove-potcdate.sed rm -f $(srcdir)/stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: $(srcdir)/stamp-po $(DISTFILES) @dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ else \ case $(XGETTEXT) in \ :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ esac; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 0.1[6-7] | 0.1[6-7].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: # Recreate Makefile by invoking config.status. Explicitly invoke the shell, # because execution permission bits may not work on the current file system. # Use @SHELL@, which is the shell determined by autoconf for the use by its # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && @SHELL@ ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/po/Makevars0000644000175000017500000000341613070106167012775 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Ito Hiroyuki # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS =ZXB01226@nifty.com # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = ngraph-gtk-6.09.05/po/ja.po0000644000175000017500000055676314142161772012261 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: 6.08.07\n" "Report-Msgid-Bugs-To: ZXB01226@nifty.com\n" "POT-Creation-Date: 2021-10-26 14:49+0900\n" "PO-Revision-Date: 2021-09-24 17:06+0900\n" "Last-Translator: Ito Hiroyuki \n" "Language-Team: Ito Hiroyuki \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:9 msgid "Ngraph-GTK" msgstr "Ngraph-GTK" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:10 msgid "Create scientific 2-dimensional graphs" msgstr "科学技術用 2D グラフ作成" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:12 src/gtk/x11graph.c:1346 msgid "" "Ngraph is the program to create scientific 2-dimensional graphs for " "researchers and engineers." msgstr "" "Ngraph は理工系学生、研究者、技術者のために作られた2次元グラフ作成プログラム" "です。" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:13 msgid "Graphs can be exported to PostScript, SVG, PNG or PDF format." msgstr "" "作成したグラフは、PostScript、SVG、PNGまたはPDF形式にエクスポートすることがで" "きます。" #: misc/com.github.htrb.ngraph-gtk.metainfo.xml:22 msgid "Main application window" msgstr "アプリケーションウィンドウ" #: src/gtk/ox11menu.c:1923 msgid "Unsaved Graph" msgstr "新規グラフ" #: src/gtk/ox11dlg.c:114 src/gtk/x11commn.c:1672 msgid "Confirm" msgstr "確認" #: src/gtk/ox11dlg.c:137 msgid "Message" msgstr "メッセージ" #: src/gtk/ox11dlg.c:199 src/gtk/ox11dlg.c:412 src/gtk/ox11dlg.c:477 msgid "Input" msgstr "入力" #: src/gtk/ox11dlg.c:298 src/gtk/ox11dlg.c:353 src/gtk/ox11dlg.c:410 #: src/gtk/ox11dlg.c:564 msgid "Select" msgstr "選択" #: src/gtk/ox11dlg.c:633 msgid "Open file" msgstr "ファイルを開く" #: src/gtk/ox11dlg.c:680 msgid "Open files" msgstr "複数のファイルを開く" #: src/gtk/ox11dlg.c:730 msgid "Save file" msgstr "別名で保存" #: src/gtk/ogra2cairo.c:45 src/gtk/x11dialg.c:1405 #: src/gtk/data/gtk/menus-tool.ui:42 src/gtk/data/gtk/menus-tool.ui:71 #: src/odraw.c:80 src/odraw.c:88 src/oaxis.c:77 src/oaxis.c:92 msgid "none" msgstr "なし" #: src/gtk/ogra2cairo.c:46 msgid "default" msgstr "デフォルト" #: src/gtk/ogra2cairo.c:47 msgid "gray" msgstr "グレイスケール" #: src/gtk/x11axis.c:58 src/gtk/x11opt.c:448 src/gtk/x11opt.c:935 msgid "name" msgstr "名前" #: src/gtk/x11axis.c:59 msgid "min" msgstr "最小" #: src/gtk/x11axis.c:60 msgid "max" msgstr "最大" #: src/gtk/x11axis.c:61 msgid "inc" msgstr "増分" #: src/gtk/x11axis.c:62 src/gtk/x11file.c:76 msgid "type" msgstr "タイプ" #: src/gtk/x11axis.c:65 src/gtk/x11axis.c:190 msgid "dir" msgstr "方向" #: src/gtk/x11axis.c:66 msgid "len" msgstr "長さ" #: src/gtk/x11axis.c:96 src/gtk/data/gtk/menus-common.ui.in:11 #: src/gtk/data/gtk/menus-common.ui.in:339 #: src/gtk/data/gtk/menus-common-win.ui.in:11 #: src/gtk/data/gtk/menus-common-win.ui.in:347 #: src/gtk/data/gtk/menus-common.ui:11 src/gtk/data/gtk/menus-common.ui:339 msgid "_Frame graph" msgstr "フレームグラフ(_F)" #: src/gtk/x11axis.c:97 src/gtk/data/gtk/menus-common.ui.in:15 #: src/gtk/data/gtk/menus-common.ui.in:343 #: src/gtk/data/gtk/menus-common-win.ui.in:15 #: src/gtk/data/gtk/menus-common-win.ui.in:351 #: src/gtk/data/gtk/menus-common.ui:15 src/gtk/data/gtk/menus-common.ui:343 msgid "_Section graph" msgstr "方眼グラフ(_S)" #: src/gtk/x11axis.c:98 src/gtk/data/gtk/menus-common.ui.in:19 #: src/gtk/data/gtk/menus-common.ui.in:347 #: src/gtk/data/gtk/menus-common-win.ui.in:19 #: src/gtk/data/gtk/menus-common-win.ui.in:355 #: src/gtk/data/gtk/menus-common.ui:19 src/gtk/data/gtk/menus-common.ui:347 msgid "_Cross graph" msgstr "交差グラフ(_C)" #: src/gtk/x11axis.c:99 src/gtk/data/gtk/menus-common.ui.in:351 #: src/gtk/data/gtk/menus-common-win.ui.in:359 #: src/gtk/data/gtk/menus-common.ui:351 msgid "Single _Axis" msgstr "単一軸(_A)" #: src/gtk/x11axis.c:104 src/gtk/x11file.c:132 src/gtk/x11file.c:1976 #: src/gtk/x11file.c:2181 src/gtk/x11graph.c:740 src/gtk/x11lgnd.c:1156 #: src/gtk/x11menu.c:406 src/gtk/x11merge.c:69 src/gtk/x11opt.c:702 #: src/gtk/data/gtk/menus-common.ui.in:295 #: src/gtk/data/gtk/menus-common.ui.in:336 #: src/gtk/data/gtk/menus-common.ui.in:381 #: src/gtk/data/gtk/menus-common.ui.in:465 #: src/gtk/data/gtk/menus-common.ui.in:482 #: src/gtk/data/gtk/menus-common-win.ui.in:303 #: src/gtk/data/gtk/menus-common-win.ui.in:344 #: src/gtk/data/gtk/menus-common-win.ui.in:389 #: src/gtk/data/gtk/menus-common-win.ui.in:473 #: src/gtk/data/gtk/menus-common-win.ui.in:490 #: src/gtk/data/gtk/menus-common.ui:295 src/gtk/data/gtk/menus-common.ui:336 #: src/gtk/data/gtk/menus-common.ui:381 src/gtk/data/gtk/menus-common.ui:465 #: src/gtk/data/gtk/menus-common.ui:482 src/gtk/x11opt_proto.h:272 msgid "_Add" msgstr "追加(_A)" #: src/gtk/x11axis.c:106 src/gtk/x11file.c:134 src/gtk/x11lgnd.c:217 #: src/gtk/x11merge.c:70 src/gtk/data/gtk/menus-common.ui.in:154 #: src/gtk/data/gtk/menus-common.ui.in:588 #: src/gtk/data/gtk/menus-common-win.ui.in:162 #: src/gtk/data/gtk/menus-common-win.ui.in:596 #: src/gtk/data/gtk/menus-common.ui:154 src/gtk/data/gtk/menus-common.ui:588 msgid "_Duplicate" msgstr "複製(_D)" #: src/gtk/x11axis.c:107 src/gtk/x11axis.c:319 src/gtk/x11file.c:136 #: src/gtk/x11file.c:823 src/gtk/x11file.c:1658 src/gtk/x11lgnd.c:219 #: src/gtk/x11lgnd.c:1161 src/gtk/x11lgnd.c:1454 src/gtk/x11lgnd.c:1570 #: src/gtk/x11lgnd.c:1669 src/gtk/x11lgnd.c:1807 src/gtk/x11lgnd.c:2034 #: src/gtk/x11merge.c:71 src/gtk/data/gtk/menus-common.ui.in:149 #: src/gtk/data/gtk/menus-common.ui.in:361 #: src/gtk/data/gtk/menus-common.ui.in:389 #: src/gtk/data/gtk/menus-common.ui.in:404 #: src/gtk/data/gtk/menus-common.ui.in:417 #: src/gtk/data/gtk/menus-common.ui.in:430 #: src/gtk/data/gtk/menus-common.ui.in:443 #: src/gtk/data/gtk/menus-common.ui.in:456 #: src/gtk/data/gtk/menus-common.ui.in:490 #: src/gtk/data/gtk/menus-common.ui.in:584 #: src/gtk/data/gtk/menus-common-win.ui.in:157 #: src/gtk/data/gtk/menus-common-win.ui.in:369 #: src/gtk/data/gtk/menus-common-win.ui.in:397 #: src/gtk/data/gtk/menus-common-win.ui.in:412 #: src/gtk/data/gtk/menus-common-win.ui.in:425 #: src/gtk/data/gtk/menus-common-win.ui.in:438 #: src/gtk/data/gtk/menus-common-win.ui.in:451 #: src/gtk/data/gtk/menus-common-win.ui.in:464 #: src/gtk/data/gtk/menus-common-win.ui.in:498 #: src/gtk/data/gtk/menus-common-win.ui.in:592 #: src/gtk/data/gtk/menus-common.ui:149 src/gtk/data/gtk/menus-common.ui:361 #: src/gtk/data/gtk/menus-common.ui:389 src/gtk/data/gtk/menus-common.ui:404 #: src/gtk/data/gtk/menus-common.ui:417 src/gtk/data/gtk/menus-common.ui:430 #: src/gtk/data/gtk/menus-common.ui:443 src/gtk/data/gtk/menus-common.ui:456 #: src/gtk/data/gtk/menus-common.ui:490 src/gtk/data/gtk/menus-common.ui:584 msgid "_Delete" msgstr "削除(_D)" #: src/gtk/x11axis.c:109 src/gtk/x11lgnd.c:221 msgid "_Focus" msgstr "フォーカス(_F)" #: src/gtk/x11axis.c:110 src/gtk/x11lgnd.c:222 src/gtk/x11merge.c:74 msgid "focus _All" msgstr "全てフォーカス(_A)" #: src/gtk/x11axis.c:111 src/gtk/x11axis.c:1274 msgid "_Clear" msgstr "クリア(_C)" #: src/gtk/x11axis.c:112 src/gtk/x11file.c:139 src/gtk/x11lgnd.c:223 #: src/gtk/data/gtk/menus-common.ui.in:309 #: src/gtk/data/gtk/menus-common.ui.in:357 #: src/gtk/data/gtk/menus-common.ui.in:385 #: src/gtk/data/gtk/menus-common.ui.in:400 #: src/gtk/data/gtk/menus-common.ui.in:413 #: src/gtk/data/gtk/menus-common.ui.in:426 #: src/gtk/data/gtk/menus-common.ui.in:439 #: src/gtk/data/gtk/menus-common.ui.in:452 #: src/gtk/data/gtk/menus-common.ui.in:469 #: src/gtk/data/gtk/menus-common.ui.in:486 #: src/gtk/data/gtk/menus-common.ui.in:594 #: src/gtk/data/gtk/menus-common-win.ui.in:317 #: src/gtk/data/gtk/menus-common-win.ui.in:365 #: src/gtk/data/gtk/menus-common-win.ui.in:393 #: src/gtk/data/gtk/menus-common-win.ui.in:408 #: src/gtk/data/gtk/menus-common-win.ui.in:421 #: src/gtk/data/gtk/menus-common-win.ui.in:434 #: src/gtk/data/gtk/menus-common-win.ui.in:447 #: src/gtk/data/gtk/menus-common-win.ui.in:460 #: src/gtk/data/gtk/menus-common-win.ui.in:477 #: src/gtk/data/gtk/menus-common-win.ui.in:494 #: src/gtk/data/gtk/menus-common-win.ui.in:602 #: src/gtk/data/gtk/menus-common.ui:309 src/gtk/data/gtk/menus-common.ui:357 #: src/gtk/data/gtk/menus-common.ui:385 src/gtk/data/gtk/menus-common.ui:400 #: src/gtk/data/gtk/menus-common.ui:413 src/gtk/data/gtk/menus-common.ui:426 #: src/gtk/data/gtk/menus-common.ui:439 src/gtk/data/gtk/menus-common.ui:452 #: src/gtk/data/gtk/menus-common.ui:469 src/gtk/data/gtk/menus-common.ui:486 #: src/gtk/data/gtk/menus-common.ui:594 msgid "_Properties" msgstr "プロパティ(_P)" #: src/gtk/x11axis.c:113 src/gtk/x11file.c:140 src/gtk/x11lgnd.c:224 #: src/gtk/x11merge.c:76 msgid "_Instance name" msgstr "インスタンス名(_I)" #: src/gtk/x11axis.c:115 src/gtk/x11file.c:143 src/gtk/x11graph.c:754 #: src/gtk/x11lgnd.c:226 src/gtk/x11merge.c:78 #: src/gtk/data/gtk/menus-common.ui.in:169 #: src/gtk/data/gtk/menus-common.ui.in:659 #: src/gtk/data/gtk/menus-common-win.ui.in:177 #: src/gtk/data/gtk/menus-common-win.ui.in:667 #: src/gtk/data/gtk/menus-common.ui:169 src/gtk/data/gtk/menus-common.ui:659 msgid "_Top" msgstr "先頭へ(_T)" #: src/gtk/x11axis.c:116 src/gtk/x11file.c:144 src/gtk/x11graph.c:760 #: src/gtk/x11lgnd.c:227 src/gtk/x11merge.c:79 src/gtk/x11opt.c:721 #: src/gtk/data/gtk/menus-common.ui.in:174 #: src/gtk/data/gtk/menus-common.ui.in:663 #: src/gtk/data/gtk/menus-common-win.ui.in:182 #: src/gtk/data/gtk/menus-common-win.ui.in:671 #: src/gtk/data/gtk/menus-common.ui:174 src/gtk/data/gtk/menus-common.ui:663 #: src/gtk/x11opt_proto.h:298 msgid "_Up" msgstr "上へ(_U)" #: src/gtk/x11axis.c:117 src/gtk/x11file.c:145 src/gtk/x11graph.c:766 #: src/gtk/x11lgnd.c:228 src/gtk/x11merge.c:80 src/gtk/x11opt.c:714 #: src/gtk/data/gtk/menus-common.ui.in:178 #: src/gtk/data/gtk/menus-common.ui.in:667 #: src/gtk/data/gtk/menus-common-win.ui.in:186 #: src/gtk/data/gtk/menus-common-win.ui.in:675 #: src/gtk/data/gtk/menus-common.ui:178 src/gtk/data/gtk/menus-common.ui:667 #: src/gtk/x11opt_proto.h:291 msgid "_Down" msgstr "下へ(_D)" #: src/gtk/x11axis.c:118 src/gtk/x11file.c:146 src/gtk/x11graph.c:772 #: src/gtk/x11lgnd.c:229 src/gtk/x11merge.c:81 #: src/gtk/data/gtk/menus-common.ui.in:182 #: src/gtk/data/gtk/menus-common.ui.in:671 #: src/gtk/data/gtk/menus-common-win.ui.in:190 #: src/gtk/data/gtk/menus-common-win.ui.in:679 #: src/gtk/data/gtk/menus-common.ui:182 src/gtk/data/gtk/menus-common.ui:671 msgid "_Bottom" msgstr "最後へ(_B)" #: src/gtk/x11axis.c:136 msgid "" "%a\tThe abbreviated weekday name.\n" "%A\tThe full weekday name.\n" "%b\tThe abbreviated month name.\n" "%B\tThe full month name.\n" "%c\tEquivalent to %a %b %e %T %Y.\n" "%C\tThe century number (year/100).\n" "%d\tThe day of the month (01 to 31).\n" "%e\tThe day of the month (1 to 31).\n" "%F\tEquivalent to %Y-%m-%d.\n" "%H\tThe hour (00 to 23).\n" "%I\tThe hour (01 to 12).\n" "%j\tThe day of the year (001 to 366).\n" "%k\tThe hour (0 to 23).\n" "%l\tThe hour (1 to 12).\n" "%m\tThe month (01 to 12).\n" "%M\tThe minute (00 to 59).\n" "%n\tA newline character.\n" "%p\tEither \"AM\" or \"PM\".\n" "%P\tEither \"am\" or \"pm\".\n" "%r\tEquivalent to %I:%M:%S %p.\n" "%R\tEquivalent to %H:%M.\n" "%S\tThe second (00 to 60).\n" "%T\tEquivalent to %H:%M:%S.\n" "%u\tThe day of the week, Monday being 1 (1 to 7).\n" "%w\tThe day of the week, Sunday being 0 (0 to 6).\n" "%y\tThe year without a century (00 to 99).\n" "%Y\tThe year including the century.\n" "%+\tEquivalent to %a %b %e %T GMT %Y.\n" "%%\tA literal '%' character." msgstr "" "%a\t曜日の省略名.\n" "%A\t曜日.\n" "%b\t月の省略名.\n" "%B\t月の完全な名前.\n" "%c\t%a %b %e %T %Y と同等.\n" "%C\t世紀 (西暦年の上 2 桁).\n" "%d\t月内通算日 (01 から 31).\n" "%e\t月内通算日 (1 から 31).\n" "%F\t%Y-%m-%d と同等.\n" "%H\t24 時間表記での時 (00 から 23).\n" "%I\t14 時間表記での時 (01 から 12).\n" "%j\t年の初めから通算の日数 (001 から 366).\n" "%k\t24 時間表記での時 (0 から 23).\n" "%l\t12 時間表記での時 (1 から 12).\n" "%m\t月 (01 から 12).\n" "%M\t分 (00 から 59).\n" "%n\t改行.\n" "%p\t\"AM\" または \"PM\".\n" "%P\t\"am\" または \"pm\".\n" "%r\t%I:%M:%S %p と同等.\n" "%R\t%H:%M と同等.\n" "%S\t秒 (00 から 60).\n" "%T\t%H:%M:%S と同等.\n" "%u\t週の何番目の日か。月曜日を 1 とする (1 から 7).\n" "%w\t週の何番目の日か。日曜日を 0 とする (0 から 6).\n" "%y\t西暦の下2桁 (世紀部分を含まない年) (00 から 99).\n" "%Y\t西暦年.\n" "%+\t%a %b %e %T GMT %Y と同等.\n" "%%\t'%' 文字." #: src/gtk/x11axis.c:286 #, c-format msgid "_Style %d:" msgstr "線種 %d(_S):" #: src/gtk/x11axis.c:292 src/gtk/x11axis.c:1611 #, c-format msgid "_Width %d:" msgstr "線幅 %d(_W):" #: src/gtk/x11axis.c:309 #, c-format msgid "Grid %d" msgstr "グリッド %d" #: src/gtk/x11axis.c:328 msgid "Axis (_X):" msgstr "_X 軸:" #: src/gtk/x11axis.c:331 msgid "draw _X grid" msgstr "_X グリッド描画" #: src/gtk/x11axis.c:336 msgid "Axis (_Y):" msgstr "_Y 軸:" #: src/gtk/x11axis.c:339 msgid "draw _Y grid" msgstr "_Y グリッド描画" #: src/gtk/x11axis.c:343 src/gtk/x11menu.c:257 msgid "Axis" msgstr "軸" #: src/gtk/x11axis.c:357 src/gtk/x11axis.c:1423 src/gtk/x11axis.c:1607 #: src/gtk/x11axis.c:2069 src/gtk/x11lgnd.c:1214 src/gtk/x11lgnd.c:1234 #: src/gtk/x11lgnd.c:1244 src/gtk/x11lgndx.c:419 msgid "_Color:" msgstr "色(_C):" #: src/gtk/x11axis.c:360 msgid "_Background" msgstr "背景色(_B)" #: src/gtk/x11axis.c:366 src/gtk/x11opt.c:1613 msgid "_Background Color:" msgstr "背景色(_B):" #: src/gtk/x11axis.c:369 src/gtk/x11axis.c:3245 src/gtk/x11axis.c:3266 #: src/gtk/x11axis.c:3299 src/gtk/x11lgnd.c:3063 src/gtk/x11lgnd.c:3074 #: src/gtk/x11lgnd.c:3503 src/gtk/gtk_widget.c:934 msgid "Color" msgstr "色" #: src/gtk/x11axis.c:382 src/gtk/x11axis.c:1622 msgid "Style" msgstr "スタイル" #: src/gtk/x11axis.c:678 src/gtk/x11axis.c:903 msgid "Graph _Width:" msgstr "幅(_W):" #: src/gtk/x11axis.c:682 src/gtk/x11axis.c:907 msgid "Graph _Height:" msgstr "高さ(_H):" #: src/gtk/x11axis.c:693 src/gtk/x11axis.c:918 msgid "_X axis" msgstr "_X 軸" #: src/gtk/x11axis.c:707 src/gtk/x11axis.c:932 msgid "_Y axis" msgstr "_Y 軸" #: src/gtk/x11axis.c:721 msgid "_U axis" msgstr "_U 軸" #: src/gtk/x11axis.c:735 msgid "_R axis" msgstr "_R 軸" #: src/gtk/x11axis.c:749 src/gtk/data/gtk/menus-common.ui.in:283 #: src/gtk/data/gtk/menus-common.ui.in:378 #: src/gtk/data/gtk/menus-common-win.ui.in:291 #: src/gtk/data/gtk/menus-common-win.ui.in:386 #: src/gtk/data/gtk/menus-common.ui:283 src/gtk/data/gtk/menus-common.ui:378 msgid "_Grid" msgstr "グリッド(_G)" #: src/gtk/x11axis.c:1030 msgid "_Zoom:" msgstr "ズーム(_Z):" #: src/gtk/x11axis.c:1152 msgid "autoscale (multi select)" msgstr "自動スケール (複数選択)" #: src/gtk/x11axis.c:1260 src/gtk/x11axis.c:1586 src/gtk/x11file.c:1721 #: src/gtk/x11parameter.c:133 msgid "_Min:" msgstr "最小値(_M):" #: src/gtk/x11axis.c:1264 src/gtk/x11axis.c:1591 src/gtk/x11file.c:1725 #: src/gtk/x11parameter.c:137 msgid "_Max:" msgstr "最大値(_M):" #: src/gtk/x11axis.c:1268 msgid "_Inc:" msgstr "増分(_I):" #: src/gtk/x11axis.c:1278 src/gtk/data/gtk/menus-common.ui.in:292 #: src/gtk/data/gtk/menus-common-win.ui.in:300 #: src/gtk/data/gtk/menus-common.ui:292 msgid "_Data" msgstr "データ(_D)" #: src/gtk/x11axis.c:1286 msgid "_Scale:" msgstr "スケール法(_S):" #: src/gtk/x11axis.c:1290 src/gtk/x11file.c:1729 src/gtk/x11print.c:89 msgid "_Div:" msgstr "分割数(_D):" #: src/gtk/x11axis.c:1294 msgid "_Ref:" msgstr "参照軸(_R):" #: src/gtk/x11axis.c:1298 msgid "_Auto scale margin:" msgstr "自動スケール余白(_A):" #: src/gtk/x11axis.c:1301 src/gtk/x11axis.c:3316 src/oparameter.c:37 msgid "Scale" msgstr "スケール" #: src/gtk/x11axis.c:1409 msgid "Draw _Baseline" msgstr "軸基線描画(_B)" #: src/gtk/x11axis.c:1415 src/gtk/x11file.c:3347 src/gtk/x11lgnd.c:1184 #: src/gtk/x11lgndx.c:403 msgid "Line _Style:" msgstr "線種(_S):" #: src/gtk/x11axis.c:1419 src/gtk/x11file.c:3351 src/gtk/x11lgndx.c:407 msgid "_Line Width:" msgstr "線幅(_W):" #: src/gtk/x11axis.c:1426 src/gtk/x11axis.c:3229 msgid "Baseline" msgstr "軸基線" #: src/gtk/x11axis.c:1436 src/gtk/x11axis.c:1458 msgid "_Position:" msgstr "位置(_P):" #: src/gtk/x11axis.c:1441 msgid "_Arrow length:" msgstr "長さ(_A):" #: src/gtk/x11axis.c:1446 msgid "_Arrow width:" msgstr "幅(_A):" #: src/gtk/x11axis.c:1449 src/gtk/x11axis.c:3239 msgid "Arrow" msgstr "矢印" #: src/gtk/x11axis.c:1462 msgid "_Wave length:" msgstr "長さ(_W):" #: src/gtk/x11axis.c:1466 msgid "_Wave width:" msgstr "線幅(_W):" #: src/gtk/x11axis.c:1469 src/gtk/x11axis.c:3242 msgid "Wave" msgstr "波型" #: src/gtk/x11axis.c:1581 msgid "_Gauge:" msgstr "位置(_G):" #: src/gtk/x11axis.c:1594 src/gtk/x11axis.c:1856 msgid "Range" msgstr "範囲" #: src/gtk/x11axis.c:1603 msgid "_Style:" msgstr "線種(_S):" #: src/gtk/x11axis.c:1616 #, c-format msgid "_Length %d:" msgstr "長さ %d(_L):" #: src/gtk/x11axis.c:1841 msgid "_Numbering:" msgstr "位置(_N):" #: src/gtk/x11axis.c:1845 msgid "_Begin:" msgstr "開始点(_B):" #: src/gtk/x11axis.c:1849 src/gtk/x11parameter.c:141 src/gtk/x11parameter.c:202 msgid "_Step:" msgstr "間隔(_S):" #: src/gtk/x11axis.c:1853 msgid "_Num:" msgstr "個数(_N):" #: src/gtk/x11axis.c:1865 msgid "_Align:" msgstr "位置合わせ(_A):" #: src/gtk/x11axis.c:1869 src/gtk/x11axis.c:2171 src/gtk/x11lgnd.c:1921 msgid "_Direction:" msgstr "方向(_D):" #: src/gtk/x11axis.c:1874 msgid "shift (_P):" msgstr "並行シフト量(_P):" #: src/gtk/x11axis.c:1878 msgid "shift (_N):" msgstr "垂直シフト量(_N):" #: src/gtk/x11axis.c:1881 src/gtk/x11axis.c:2183 src/gtk/x11axis.c:3262 #: src/gtk/x11axis.c:3283 msgid "Position" msgstr "位置" #: src/gtk/x11axis.c:1892 msgid "_Fraction:" msgstr "小数部桁数(_F):" #: src/gtk/x11axis.c:1896 msgid "_Head:" msgstr "先頭(_H):" #: src/gtk/x11axis.c:1900 msgid "_Tail:" msgstr "後続(_T):" #: src/gtk/x11axis.c:1905 msgid "_Date/time format:" msgstr "日時書式(_D):" #: src/gtk/x11axis.c:1909 msgid "_Auto normalization:" msgstr "自動スケール(_A):" #: src/gtk/x11axis.c:1912 msgid "_Log power" msgstr "ベキ形式(ログ)(_L)" #: src/gtk/x11axis.c:1916 msgid "_Add plus" msgstr "+追加(_A)" #: src/gtk/x11axis.c:1921 msgid "_Zero:" msgstr "ゼロ表示(_Z):" #: src/gtk/x11axis.c:1925 msgid "numbering _Math:" msgstr "変換数式(_M):" #: src/gtk/x11axis.c:1928 msgid "Format" msgstr "フォーマット" #: src/gtk/x11axis.c:2039 msgid "_Point:" msgstr "ポイント(_P):" #: src/gtk/x11axis.c:2043 src/gtk/x11lgnd.c:1885 msgid "_Space:" msgstr "文字間(_S):" #: src/gtk/x11axis.c:2047 msgid "_Script size:" msgstr "スクリプトサイズ(_S):" #: src/gtk/x11axis.c:2051 src/gtk/x11lgnd.c:1895 src/gtk/x11opt.c:680 msgid "_Font:" msgstr "フォント(_F):" #: src/gtk/x11axis.c:2056 src/gtk/x11lgnd.c:1900 msgid "_Bold" msgstr "太字(_B)" #: src/gtk/x11axis.c:2061 src/gtk/x11lgnd.c:1905 msgid "_Italic" msgstr "斜体(_I)" #: src/gtk/x11axis.c:2072 src/gtk/x11axis.c:3292 src/gtk/x11dialg.c:245 #: src/gtk/x11lgnd.c:3501 src/gtk/x11opt.c:1238 msgid "Font" msgstr "フォント" #: src/gtk/x11axis.c:2167 msgid "_Length:" msgstr "長さ(_L):" #: src/gtk/x11axis.c:2175 msgid "_Adjust:" msgstr "交差軸(_A):" #: src/gtk/x11axis.c:2179 msgid "Adjust _Position:" msgstr "交差位置(_P):" #: src/gtk/x11axis.c:2205 #, c-format msgid "Axis %d %s" msgstr "軸 %d %s" #: src/gtk/x11axis.c:2214 msgid "_Scale" msgstr "スケール(_S)" #: src/gtk/x11axis.c:2218 msgid "_Baseline" msgstr "軸基線(_B)" #: src/gtk/x11axis.c:2222 msgid "_Gauge" msgstr "目盛線(_G)" #: src/gtk/x11axis.c:2226 msgid "_Numbering" msgstr "目盛数字(_N)" #: src/gtk/x11axis.c:2230 msgid "_Font" msgstr "フォント(_F)" #: src/gtk/x11axis.c:2234 msgid "_Position" msgstr "位置(_P)" #: src/gtk/x11axis.c:2601 msgid "delete axis (single select)" msgstr "軸削除 (単一選択)" #: src/gtk/x11axis.c:2624 msgid "axis property (single select)" msgstr "軸プロパティ (単一選択)" #: src/gtk/x11axis.c:2659 msgid "scale zoom (multi select)" msgstr "スケールズーム (複数選択)" #: src/gtk/x11axis.c:2735 msgid "scale clear (multi select)" msgstr "スケールクリア (複数選択)" #: src/gtk/x11axis.c:2800 msgid "delete grid (multi select)" msgstr "グリッド削除 (複数選択)" #: src/gtk/x11axis.c:2829 msgid "grid property (multi select)" msgstr "グリッドプロパティ (複数選択)" #: src/gtk/x11axis.c:3013 msgid "scale undo (multi select)" msgstr "スケールアンドゥ (複数選択)" #: src/gtk/x11axis.c:3236 src/gtk/x11menu.c:459 msgid "Draw" msgstr "描画" #: src/gtk/x11axis.c:3255 msgid "Gauge" msgstr "目盛線" #: src/gtk/x11axis.c:3276 msgid "Numbering" msgstr "目盛数字" #: src/gtk/x11axis.c:3286 msgid "Align" msgstr "位置合わせ" #: src/gtk/x11axis.c:3289 msgid "Direction" msgstr "方向" #: src/gtk/x11axis.c:3301 msgid "Log power" msgstr "ベキ形式(ログ)" #: src/gtk/x11axis.c:3303 msgid "Zero" msgstr "ゼロ表示" #: src/gtk/x11commn.c:1260 src/gtk/x11menu.c:434 msgid "Save NGP file" msgstr "NGPファイルの保存" #: src/gtk/x11commn.c:1285 src/gtk/x11opt.c:1778 #, c-format msgid "Saving `%.128s'." msgstr "保存中 `%.128s'." #: src/gtk/x11commn.c:1478 #, c-format msgid "Loading `%.128s'." msgstr "読込中 `%.128s'." #: src/gtk/x11commn.c:1671 msgid "" "This graph is modified.\n" "Save this graph?" msgstr "" "このグラフは変更されています.\n" "保存しますか?" #: src/gtk/x11commn.c:1900 msgid "Ngraph.ini is not found." msgstr "Ngraph.ini が見つかりません." #: src/gtk/x11commn.c:1903 msgid "Ngraph.ini is write protected." msgstr "Ngraph.ini に書き込めませんでした." #: src/gtk/x11commn.c:1918 #, c-format msgid "Install `Ngraph.ini' to %s ?" msgstr "%s に 'Ngraph.ini' をインストールしますか?" #: src/gtk/x11commn.c:1922 msgid "Ngraph.ini could not be copied." msgstr "Ngraph.ini をコピーできませんでした." #: src/gtk/x11commn.c:2014 msgid "_Stop" msgstr "停止(_S)" #: src/gtk/x11commn.c:2057 msgid "error" msgstr "エラー" #: src/gtk/x11dialg.c:52 src/gtk/x11opt.c:1617 msgid "solid" msgstr "実線" #: src/gtk/x11dialg.c:53 src/gtk/x11opt.c:1618 msgid "dot" msgstr "点線" #: src/gtk/x11dialg.c:54 msgid "short dash" msgstr "短鎖線" #: src/gtk/x11dialg.c:55 msgid "dash" msgstr "鎖線" #: src/gtk/x11dialg.c:56 msgid "dot dash" msgstr "一点鎖線" #: src/gtk/x11dialg.c:57 msgid "2-dot dash" msgstr "二点鎖線" #: src/gtk/x11dialg.c:58 msgid "dot 2-dash" msgstr "一点二鎖線" #: src/gtk/x11dialg.c:64 msgid "auto" msgstr "自動" #: src/gtk/x11dialg.c:124 src/gtk/x11merge.c:52 src/gtk/x11opt.c:449 #: src/odata.c:233 msgid "file" msgstr "ファイル" #: src/gtk/x11dialg.c:127 src/gtk/x11dialg.c:145 src/gtk/x11dialg.c:205 msgid "mark selection" msgstr "マーク選択" #: src/gtk/x11dialg.c:130 msgid "function" msgstr "関数" #: src/gtk/x11dialg.c:136 src/odata.c:234 msgid "array" msgstr "配列" #: src/gtk/x11dialg.c:142 msgid "data default" msgstr "データファイル初期状態" #: src/gtk/x11dialg.c:148 msgid "evaluation" msgstr "データ評価" #: src/gtk/x11dialg.c:151 src/gtk/x11file.c:682 msgid "math" msgstr "変換数式" #: src/gtk/x11dialg.c:154 msgid "math text" msgstr "数式入力" #: src/gtk/x11dialg.c:157 src/odata.c:267 msgid "fit" msgstr "フィット" #: src/gtk/x11dialg.c:160 msgid "fit load" msgstr "フィット設定読込" #: src/gtk/x11dialg.c:164 msgid "fit save" msgstr "フィット設定保存" #: src/gtk/x11dialg.c:167 msgid "Frame/Section Graph" msgstr "フレーム/方眼グラフ" #: src/gtk/x11dialg.c:170 src/gtk/x11menu.c:356 msgid "Cross Graph" msgstr "交差グラフ" #: src/gtk/x11dialg.c:173 msgid "axis" msgstr "軸" #: src/gtk/x11dialg.c:176 msgid "grid" msgstr "グリッド" #: src/gtk/x11dialg.c:179 msgid "grid default" msgstr "グリッド初期状態" #: src/gtk/x11dialg.c:182 msgid "Scale Zoom" msgstr "スケールズーム" #: src/gtk/x11dialg.c:186 msgid "merge" msgstr "合成" #: src/gtk/x11dialg.c:189 msgid "parameter" msgstr "パラメータ" #: src/gtk/x11dialg.c:193 msgid "legend line" msgstr "直線" #: src/gtk/x11dialg.c:196 msgid "legend rectangle" msgstr "矩形" #: src/gtk/x11dialg.c:199 msgid "legend arc" msgstr "円" #: src/gtk/x11dialg.c:202 msgid "legend mark" msgstr "マーク" #: src/gtk/x11dialg.c:208 msgid "legend text" msgstr "テキスト" #: src/gtk/x11dialg.c:211 msgid "text default" msgstr "レジェンドテキスト初期状態" #: src/gtk/x11dialg.c:214 msgid "legend gauss" msgstr "ガウス関数等" #: src/gtk/x11dialg.c:217 msgid "page" msgstr "ページ" #: src/gtk/x11dialg.c:220 msgid "drawobj" msgstr "描画オブジェクト" #: src/gtk/x11dialg.c:223 src/gtk/x11graph.c:898 msgid "directory" msgstr "現在のディレクトリ" #: src/gtk/x11dialg.c:227 msgid "load" msgstr "読込" #: src/gtk/x11dialg.c:230 msgid "save" msgstr "保存" #: src/gtk/x11dialg.c:233 msgid "output data" msgstr "データ出力" #: src/gtk/x11dialg.c:236 msgid "save default" msgstr "初期状態としてセーブ" #: src/gtk/x11dialg.c:239 msgid "Add-in script" msgstr "スクリプト設定" #: src/gtk/x11dialg.c:242 msgid "Add-in script setup" msgstr "スクリプト" #: src/gtk/x11dialg.c:248 src/gtk/x11opt.c:1257 msgid "Miscellaneous" msgstr "その他" #: src/gtk/x11dialg.c:251 msgid "External viewer" msgstr "外部ビューア" #: src/gtk/x11dialg.c:254 msgid "Viewer" msgstr "ビューア" #: src/gtk/x11dialg.c:257 msgid "multi select" msgstr "複数選択" #: src/gtk/x11dialg.c:260 msgid "single select" msgstr "単一選択" #: src/gtk/x11dialg.c:263 msgid "output image" msgstr "画像ファイル出力" #: src/gtk/x11dialg.c:343 msgid "_All" msgstr "全て(_A)" #: src/gtk/x11dialg.c:350 src/gtk/x11file.c:721 src/gtk/x11file.c:1987 #: src/gtk/x11file.c:2192 src/gtk/x11view.c:1106 #: src/gtk/data/gtk/menus-common.ui.in:159 #: src/gtk/data/gtk/menus-common-win.ui.in:167 #: src/gtk/data/gtk/menus-common.ui:159 msgid "Select _All" msgstr "すべて選択(_A)" #: src/gtk/x11dialg.c:563 msgid "copy property (single select)" msgstr "設定のコピー(単一選択)" #: src/gtk/x11file.c:71 msgid "file/range" msgstr "ファイル/式" #: src/gtk/x11file.c:74 msgid "ax" msgstr "x軸" #: src/gtk/x11file.c:75 msgid "ay" msgstr "y軸" #: src/gtk/x11file.c:77 src/gtk/x11lgnd.c:158 msgid "size" msgstr "サイズ" #: src/gtk/x11file.c:78 src/gtk/x11lgnd.c:76 src/gtk/x11lgnd.c:132 msgid "width" msgstr "幅" #: src/gtk/x11file.c:79 msgid "skip" msgstr "スキップ" #: src/gtk/x11file.c:80 msgid "step" msgstr "ステップ" #: src/gtk/x11file.c:81 msgid "final" msgstr "最終行" #: src/gtk/x11file.c:82 msgid "num" msgstr "データ数" #: src/gtk/x11file.c:124 src/gtk/data/gtk/menus-common.ui.in:298 #: src/gtk/data/gtk/menus-common-win.ui.in:306 #: src/gtk/data/gtk/menus-common.ui:298 msgid "_File" msgstr "ファイル(_F)" #: src/gtk/x11file.c:125 src/gtk/data/gtk/menus-common.ui.in:303 #: src/gtk/data/gtk/menus-common-win.ui.in:311 #: src/gtk/data/gtk/menus-common.ui:303 msgid "_Range" msgstr "範囲(_R)" #: src/gtk/x11file.c:127 msgid "_Recent file" msgstr "最近使用したファイル(_R)" #: src/gtk/x11file.c:135 msgid "duplicate _Behind" msgstr "直後に複製(_B)" #: src/gtk/x11file.c:138 src/gtk/x11file.c:1761 src/gtk/x11menu.c:458 #: src/gtk/data/gtk/menus-common.ui.in:241 #: src/gtk/data/gtk/menus-common-win.ui.in:249 #: src/gtk/data/gtk/menus-common.ui:241 msgid "_Draw" msgstr "描画(_D)" #: src/gtk/x11file.c:141 src/gtk/x11file.c:727 src/gtk/x11file.c:3923 #: src/gtk/data/gtk/menus-common.ui.in:119 #: src/gtk/data/gtk/menus-common.ui.in:317 #: src/gtk/data/gtk/menus-common-win.ui.in:127 #: src/gtk/data/gtk/menus-common-win.ui.in:325 #: src/gtk/data/gtk/menus-common.ui:119 src/gtk/data/gtk/menus-common.ui:317 msgid "_Edit" msgstr "編集(_E)" #: src/gtk/x11file.c:186 msgid "functions" msgstr "関数" #: src/gtk/x11file.c:189 msgid "constants" msgstr "定数" #: src/gtk/x11file.c:230 msgid "current equations" msgstr "現在の数式" #: src/gtk/x11file.c:299 msgid "Math X" msgstr "X 変換式" #: src/gtk/x11file.c:299 msgid "Math Y" msgstr "Y 変換式" #: src/gtk/x11file.c:308 src/gtk/x11file.c:2592 msgid "single line" msgstr "1行入力" #: src/gtk/x11file.c:315 src/gtk/x11file.c:2595 msgid "multi line" msgstr "複数行入力" #: src/gtk/x11file.c:685 msgid "_X math" msgstr "_X 変換式" #: src/gtk/x11file.c:686 msgid "_Y math" msgstr "_Y 変換式" #: src/gtk/x11file.c:736 src/gtk/x11view.c:1122 #: src/gtk/data/gtk/menus-common.ui.in:313 #: src/gtk/data/gtk/menus-common.ui.in:473 #: src/gtk/data/gtk/menus-common-win.ui.in:321 #: src/gtk/data/gtk/menus-common-win.ui.in:481 #: src/gtk/data/gtk/menus-common.ui:313 src/gtk/data/gtk/menus-common.ui:473 #: src/gtk/x11opt_proto.h:310 msgid "_Close" msgstr "閉じる(_C)" #: src/gtk/x11file.c:830 msgid "_Profile:" msgstr "プロフィール(_P):" #: src/gtk/x11file.c:867 msgid "Please specify the profile." msgstr "プロファイルを設定してください." #: src/gtk/x11file.c:973 msgid "Setting file not found." msgstr "設定ファイルが見つかりません." #: src/gtk/x11file.c:1012 msgid "No settings." msgstr "設定がありません." #: src/gtk/x11file.c:1034 msgid "Overwrite existing profile?" msgstr "既存のプロファイルに上書きしますか?" #: src/gtk/x11file.c:1121 #, c-format msgid "Delete the profile '%s'?" msgstr "プロファイル '%s' を削除しますか?" #: src/gtk/x11file.c:1132 #, c-format msgid "The profile '%s' is not exist." msgstr "プロファイル '%s' は存在しません." #: src/gtk/x11file.c:1218 #, c-format msgid "The profile '%s' is saved." msgstr "プロファイル '%s' は保存されました." #: src/gtk/x11file.c:1223 #, c-format msgid "The profile '%s' is deleted." msgstr "プロファイル '%s' は削除されました." #: src/gtk/x11file.c:1413 msgid "Fitting Results" msgstr "フィット結果" #: src/gtk/x11file.c:1594 msgid "_Formula:" msgstr "フィット式(_F):" #: src/gtk/x11file.c:1600 msgid "_Converge (%):" msgstr "収束(%) (_C):" #: src/gtk/x11file.c:1603 msgid "_Derivatives" msgstr "微分式指定(_D)" #: src/gtk/x11file.c:1637 msgid "User definition" msgstr "ユーザ定義" #: src/gtk/x11file.c:1650 #, c-format msgid "Fit %d" msgstr "フィット %d" #: src/gtk/x11file.c:1665 src/gtk/x11file.c:3315 src/gtk/x11lgnd.c:1472 #: src/gtk/x11parameter.c:310 msgid "_Type:" msgstr "タイプ(_T):" #: src/gtk/x11file.c:1673 msgid "_Dim:" msgstr "多項式次元(_D):" #: src/gtk/x11file.c:1687 msgid "_Weight:" msgstr "重み付け(_W):" #: src/gtk/x11file.c:1695 msgid "_Through" msgstr "通過点(_T)" #: src/gtk/x11file.c:1714 msgid "Action" msgstr "動作" #: src/gtk/x11file.c:1732 msgid "_Interpolation" msgstr "補完(_I)" #: src/gtk/x11file.c:1739 msgid "Draw X range" msgstr "X 描画範囲" #: src/gtk/x11file.c:1751 src/gtk/x11file.c:3449 msgid "_Load" msgstr "読込(_L)" #: src/gtk/x11file.c:1755 src/gtk/x11gui.c:1209 src/gtk/x11menu.c:432 #: src/gtk/x11opt.c:455 src/gtk/x11opt.c:942 src/gtk/x11opt.c:1144 #: src/gtk/x11opt.c:1490 src/gtk/x11opt.c:1598 #: src/gtk/data/gtk/menus-common.ui.in:38 #: src/gtk/data/gtk/menus-common.ui.in:685 #: src/gtk/data/gtk/menus-common-win.ui.in:38 #: src/gtk/data/gtk/menus-common-win.ui.in:693 #: src/gtk/data/gtk/menus-common.ui:38 src/gtk/data/gtk/menus-common.ui:685 msgid "_Save" msgstr "保存(_S)" #: src/gtk/x11file.c:1765 msgid "_Result" msgstr "フィット結果(_R)" #: src/gtk/x11file.c:1942 src/gtk/x11file.c:2159 src/gtk/x11view.c:1078 msgid "Line No." msgstr "行" #: src/gtk/x11file.c:1963 src/gtk/x11file.c:2168 msgid "_Line:" msgstr "新規行(_L):" #: src/gtk/x11file.c:1981 src/gtk/x11file.c:2186 src/gtk/x11graph.c:778 #: src/gtk/x11opt.c:707 src/gtk/x11opt_proto.h:284 msgid "_Remove" msgstr "削除(_R)" #: src/gtk/x11file.c:2315 msgid "_Head skip:" msgstr "先頭スキップ行(_H):" #: src/gtk/x11file.c:2319 msgid "_Read step:" msgstr "読込ステップ行(_S):" #: src/gtk/x11file.c:2323 msgid "_Final line:" msgstr "最終行(_F):" #: src/gtk/x11file.c:2328 msgid "_Remark:" msgstr "コメント行(_R):" #: src/gtk/x11file.c:2332 msgid "_IFS:" msgstr "区切文字(_I):" #: src/gtk/x11file.c:2335 msgid "_CSV" msgstr "CSV形式" #: src/gtk/x11file.c:2546 src/gtk/x11file.c:2570 msgid "_X math:" msgstr "_X 変換数式:" #: src/gtk/x11file.c:2547 src/gtk/x11file.c:2574 msgid "_Y math:" msgstr "_Y 変換数式:" #: src/gtk/x11file.c:2615 msgid "_X smooth:" msgstr "_X 隣接平均:" #: src/gtk/x11file.c:2620 msgid "_Averaging type:" msgstr "平均化手法(_A):" #: src/gtk/x11file.c:2625 msgid "_Y smooth:" msgstr "_Y 隣接平均:" #: src/gtk/x11file.c:2831 src/gtk/x11file.c:3970 src/gtk/x11file.c:4039 #: src/gtk/x11file.c:4099 src/gtk/x11file.c:5763 #, c-format msgid "Create" msgstr "作成" #: src/gtk/x11file.c:3320 src/gtk/x11lgnd.c:1833 msgid "_Mark:" msgstr "マーク(_M):" #: src/gtk/x11file.c:3325 msgid "_Curve:" msgstr "曲線(_C):" #: src/gtk/x11file.c:3333 msgid "_Color 1:" msgstr "色 1(_C):" #: src/gtk/x11file.c:3337 msgid "_Color 2:" msgstr "色 2(_C):" #: src/gtk/x11file.c:3355 src/gtk/x11lgnd.c:1838 msgid "_Size:" msgstr "サイズ(_S):" #: src/gtk/x11file.c:3359 src/gtk/x11lgnd.c:1194 src/gtk/x11lgndx.c:411 msgid "_Miter:" msgstr "マイター(_M):" #: src/gtk/x11file.c:3363 src/gtk/x11lgnd.c:1204 src/gtk/x11lgndx.c:415 msgid "_Join:" msgstr "ジョイン(_J):" #: src/gtk/x11file.c:3366 msgid "_Clip" msgstr "クリップ(_C)" #: src/gtk/x11file.c:3396 msgid "_X column:" msgstr "_X カラム:" #: src/gtk/x11file.c:3401 msgid "_X axis:" msgstr "_X 軸:" #: src/gtk/x11file.c:3411 msgid "_Y column:" msgstr "_Y カラム:" #: src/gtk/x11file.c:3416 msgid "_Y axis:" msgstr "_Y 軸:" #: src/gtk/x11file.c:3441 msgid "_Plot" msgstr "プロット(_P)" #: src/gtk/x11file.c:3445 msgid "_Math" msgstr "変換数式(_M)" #: src/gtk/x11file.c:3480 msgid "This file contain invalid UTF-8 strings." msgstr "ファイルに不正な UTF-8 文字列が含まれています." #: src/gtk/x11file.c:3905 #, c-format msgid "Data %d (File)" msgstr "データ %d (ファイル)" #: src/gtk/x11file.c:3910 src/gtk/x11file.c:4003 src/gtk/x11file.c:4067 msgid "_Apply all" msgstr "全てに適用(_A)" #: src/gtk/x11file.c:3915 src/gtk/x11merge.c:170 msgid "_File:" msgstr "ファイル名(_F):" #: src/gtk/x11file.c:3918 msgid "_Load settings" msgstr "ファイルから設定読込(_L)" #: src/gtk/x11file.c:3934 src/gtk/x11file.c:4016 src/gtk/x11file.c:4092 #: src/gtk/x11view.c:1090 msgid "_Mask" msgstr "マスク(_M)" #: src/gtk/x11file.c:3938 src/gtk/x11file.c:4020 src/gtk/x11file.c:4096 #: src/gtk/x11view.c:1091 msgid "_Move" msgstr "移動(_M)" #: src/gtk/x11file.c:3946 msgid "_Table" msgstr "表(_T) " #: src/gtk/x11file.c:3955 msgid "_Plain" msgstr "_Plain" #: src/gtk/x11file.c:3971 src/gtk/x11file.c:4040 src/gtk/x11file.c:4100 msgid "_Fit:" msgstr "フィット(_F):" #: src/gtk/x11file.c:3998 #, c-format msgid "Data %d (Array)" msgstr "データ %d (配列)" #: src/gtk/x11file.c:4008 msgid "_Array:" msgstr "配列(_A):" #: src/gtk/x11file.c:4061 #, c-format msgid "Data %d (Range)" msgstr "データ%d (範囲)" #: src/gtk/x11file.c:4074 msgid "_Minimum:" msgstr "最小値(_M):" #: src/gtk/x11file.c:4079 msgid "_Maximum:" msgstr "最大値(_M):" #: src/gtk/x11file.c:4083 msgid "di_ViSion:" msgstr "分割数(_V):" #: src/gtk/x11file.c:4507 src/gtk/x11menu.c:408 msgid "Add Data file" msgstr "データの追加" #: src/gtk/x11file.c:4556 msgid "close data (multi select)" msgstr "データを閉じる (複数選択)" #: src/gtk/x11file.c:4666 msgid "data property (multi select)" msgstr "データプロパティ (複数選択)" #: src/gtk/x11file.c:4712 msgid "edit data file (single select)" msgstr "データファイルの編集 (単一選択)" #: src/gtk/x11file.c:5613 msgid "Data file" msgstr "データの保存" #: src/gtk/x11file.c:5619 msgid "Making data file" msgstr "データファイル作成中" #: src/gtk/x11file.c:5620 msgid "Making data file." msgstr "データファイル作成中" #: src/gtk/x11file.c:5815 src/gtk/x11lgnd.c:3060 src/gtk/gtk_presettings.c:1914 msgid "Join" msgstr "ジョイン" #: src/gtk/x11file.c:5820 src/gtk/x11lgnd.c:3039 src/gtk/gtk_widget.c:941 msgid "Color 1" msgstr "色 1" #: src/gtk/x11file.c:5827 src/gtk/x11lgnd.c:3040 src/gtk/gtk_widget.c:948 msgid "Color 2" msgstr "色 2" #: src/gtk/x11file.c:5835 msgid "Clip" msgstr "クリップ" #: src/gtk/x11file.c:5847 msgid "Type" msgstr "タイプ" #: src/gtk/x11graph.c:59 src/odraw.c:58 msgid "unchange" msgstr "変更しない" #: src/gtk/x11graph.c:60 src/odraw.c:59 msgid "full" msgstr "フルパス" #: src/gtk/x11graph.c:61 src/odraw.c:61 msgid "base" msgstr "ファイル名のみ" #: src/gtk/x11graph.c:73 msgid "Custom" msgstr "任意" #: src/gtk/x11graph.c:74 msgid "normal display (4:3)" msgstr "標準画面 (4:3)" #: src/gtk/x11graph.c:75 msgid "wide display (16:9)" msgstr "ワイド画面 (16:9)" #: src/gtk/x11graph.c:76 msgid "wide display (16:10)" msgstr "ワイド画面 (16:10)" #: src/gtk/x11graph.c:82 msgid "Letter (215.90x279.40)" msgstr "レター (215.90x279.40)" #: src/gtk/x11graph.c:83 msgid "Legal (215.90x355.60)" msgstr "リーガル (215.90x355.60)" #: src/gtk/x11graph.c:84 msgid "Executive (184.2x266.7)" msgstr "エグゼクティブ (184.2x266.7)" #: src/gtk/x11graph.c:206 msgid "paper _Width:" msgstr "用紙幅(_W):" #: src/gtk/x11graph.c:211 msgid "paper _Height:" msgstr "用紙高さ(_H):" #: src/gtk/x11graph.c:215 msgid "_Paper:" msgstr "用紙(_P):" #: src/gtk/x11graph.c:223 msgid "_Portrait" msgstr "縦(_P)" #: src/gtk/x11graph.c:224 msgid "_Orientation:" msgstr "向き(_O):" #: src/gtk/x11graph.c:228 msgid "L_andscape" msgstr "横(_A)" #: src/gtk/x11graph.c:234 msgid "_Left margin:" msgstr "左マージン(_L):" #: src/gtk/x11graph.c:239 msgid "_Top margin:" msgstr "上マージン(_T):" #: src/gtk/x11graph.c:243 msgid "paper _Zoom:" msgstr "拡大率(_Z):" #: src/gtk/x11graph.c:248 msgid "_Decimalsign:" msgstr "小数点記号(_D):" #: src/gtk/x11graph.c:706 msgid "Object" msgstr "オブジェクト" #: src/gtk/x11graph.c:719 src/gtk/data/gtk/menus-common.ui.in:79 #: src/gtk/data/gtk/menus-common-win.ui.in:87 #: src/gtk/data/gtk/menus-common.ui:79 msgid "_Draw order" msgstr "描画順(_D)" #: src/gtk/x11graph.c:746 msgid "_Insert" msgstr "挿入(_I)" #: src/gtk/x11graph.c:791 msgid "_Objects" msgstr "オブジェクト(_O)" #: src/gtk/x11graph.c:901 msgid "_Select Dir:" msgstr "ディレクトリ選択(_S):" #: src/gtk/x11graph.c:903 msgid "Current Dir:" msgstr "現在のディレクトリ:" #: src/gtk/x11graph.c:979 msgid "_Expand included file" msgstr "データファイルの展開(データ込 NGP ファイル) (_E)" #: src/gtk/x11graph.c:983 msgid "Expand directory" msgstr "展開ディレクトリ" #: src/gtk/x11graph.c:986 msgid "expand _Directory:" msgstr "展開ディレクトリ(_D):" #: src/gtk/x11graph.c:990 src/gtk/x11graph.c:1046 src/gtk/x11opt.c:1172 #: src/gtk/x11opt.c:1196 msgid "_Path:" msgstr "パス情報(_P):" #: src/gtk/x11graph.c:1052 msgid "_Include data file" msgstr "データファイルを含める(_I)" #: src/gtk/x11graph.c:1056 msgid "_Include merge file" msgstr "合成ファイルを含める(_I)" #: src/gtk/x11graph.c:1149 src/gtk/x11menu.c:423 msgid "Load NGP file" msgstr "NGPファイルを開く" #: src/gtk/x11gui.c:137 src/gtk/x11gui.c:368 src/gtk/x11gui.c:436 #: src/gtk/x11gui.c:576 src/gtk/x11gui.c:651 src/gtk/x11gui.c:722 #: src/gtk/x11gui.c:801 src/gtk/x11gui.c:1032 src/gtk/x11opt.c:1115 msgid "_Cancel" msgstr "キャンセル(_C)" #: src/gtk/x11gui.c:149 src/gtk/x11gui.c:369 src/gtk/x11gui.c:437 #: src/gtk/x11gui.c:577 src/gtk/x11gui.c:652 src/gtk/x11gui.c:723 #: src/gtk/x11gui.c:802 src/gtk/x11opt.c:1113 msgid "_OK" msgstr "_OK" #: src/gtk/x11gui.c:273 msgid "Error" msgstr "エラー" #: src/gtk/x11gui.c:308 msgid "_No" msgstr "いいえ(_N)" #: src/gtk/x11gui.c:309 msgid "_Yes" msgstr "はい(_Y)" #: src/gtk/x11gui.c:884 src/gtk/x11gui.c:1059 src/gtk/x11gui.c:1064 msgid "All" msgstr "全てのファイル" #: src/gtk/x11gui.c:985 src/gtk/x11opt.c:1771 #, c-format msgid "" "`%s'\n" "\n" "Overwrite existing file?" msgstr "" "'%s' というファイルは既に存在します.\n" "上書きしてもよろしいですか?" #: src/gtk/x11gui.c:1036 msgid "_Change current directory" msgstr "カレントディレクトリを移動(_C)" #: src/gtk/x11gui.c:1047 #, c-format msgid "%s file (*.%s)" msgstr "%s ファイル (*.%s)" #: src/gtk/x11gui.c:1142 src/gtk/x11gui.c:1175 msgid "_Open" msgstr "開く(_O)" #: src/gtk/x11lgnd.c:61 msgid "_Physics" msgstr "物理(_P)" #: src/gtk/x11lgnd.c:62 msgid "_Mathematics" msgstr "数学(_M)" #: src/gtk/x11lgnd.c:63 msgid "_Greece" msgstr "ギリシャ文字(_G)" #: src/gtk/x11lgnd.c:71 msgid "marker begin" msgstr "始点" #: src/gtk/x11lgnd.c:72 msgid "marker end" msgstr "終点" #: src/gtk/x11lgnd.c:73 src/gtk/x11lgnd.c:99 msgid "color" msgstr "色" #: src/gtk/x11lgnd.c:77 msgid "points" msgstr "点数" #: src/gtk/x11lgnd.c:103 msgid "height" msgstr "高さ" #: src/gtk/x11lgnd.c:104 msgid "line width" msgstr "線幅" #: src/gtk/x11lgnd.c:129 msgid "angle1" msgstr "開始角" #: src/gtk/x11lgnd.c:130 msgid "angle2" msgstr "円弧角" #: src/gtk/x11lgnd.c:131 msgid "pieslice" msgstr "扇型" #: src/gtk/x11lgnd.c:179 msgid "font" msgstr "フォント" #: src/gtk/x11lgnd.c:182 msgid "pt" msgstr "ポイント" #: src/gtk/x11lgnd.c:183 msgid "direction" msgstr "方向" #: src/gtk/x11lgnd.c:292 #, c-format msgid "%s property (multi select)" msgstr "%sプロパティ (複数選択)" #: src/gtk/x11lgnd.c:334 #, c-format msgid "delete %s (multi select)" msgstr "%s削除 (複数選択)" #: src/gtk/x11lgnd.c:416 #, c-format msgid "X:%.2f Y:%.2f %s%stype:%-2d" msgstr "X:%.2f Y:%.2f %s%sタイプ:%-2d" #: src/gtk/x11lgnd.c:979 msgid "_Line width:" msgstr "線幅(_W):" #: src/gtk/x11lgnd.c:1140 msgid "_Points:" msgstr "座標(_P):" #: src/gtk/x11lgnd.c:1224 msgid "_Color2:" msgstr "色2(_C):" #: src/gtk/x11lgnd.c:1385 src/gtk/gtk_presettings.c:1925 msgid "Marker begin" msgstr "始点マーカ" #: src/gtk/x11lgnd.c:1389 src/gtk/gtk_presettings.c:1931 msgid "Marker end" msgstr "終点マーカ" #: src/gtk/x11lgnd.c:1401 msgid "_Marker:" msgstr "マーカ(_M):" #: src/gtk/x11lgnd.c:1446 #, c-format msgid "Legend line %d" msgstr "直線 %d" #: src/gtk/x11lgnd.c:1478 msgid "_Interpolation:" msgstr "補完法(_I):" #: src/gtk/x11lgnd.c:1486 src/gtk/x11lgnd.c:1718 #: src/gtk/data/gtk/menus-tool.ui:14 msgid "_Close path" msgstr "パスを閉じる(_C)" #: src/gtk/x11lgnd.c:1503 src/gtk/x11lgnd.c:1606 src/gtk/x11lgnd.c:1734 #: src/gtk/data/gtk/menus-tool.ui:6 msgid "_Stroke" msgstr "ストローク(_S)" #: src/gtk/x11lgnd.c:1518 msgid "fill _Rule:" msgstr "ルール(_R):" #: src/gtk/x11lgnd.c:1522 src/gtk/x11lgnd.c:1621 src/gtk/x11lgnd.c:1749 #: src/gtk/data/gtk/menus-tool.ui:10 msgid "_Fill" msgstr "塗りつぶし(_F)" #: src/gtk/x11lgnd.c:1562 #, c-format msgid "Legend rectangle %d" msgstr "矩形 %d" #: src/gtk/x11lgnd.c:1586 msgid "_Width:" msgstr "幅(_W):" #: src/gtk/x11lgnd.c:1590 msgid "_Height:" msgstr "高さ(_H):" #: src/gtk/x11lgnd.c:1661 #, c-format msgid "Legend arc %d" msgstr "円 %d" #: src/gtk/x11lgnd.c:1700 msgid "_Angle1:" msgstr "開始角(_A):" #: src/gtk/x11lgnd.c:1704 msgid "_Angle2:" msgstr "円弧角(_A):" #: src/gtk/x11lgnd.c:1707 msgid "_Pieslice" msgstr "扇型(_P)" #: src/gtk/x11lgnd.c:1799 #, c-format msgid "Legend mark %d" msgstr "マーク %d" #: src/gtk/x11lgnd.c:1878 msgid "_Pt:" msgstr "ポイント(_P):" #: src/gtk/x11lgnd.c:1890 msgid "_Script:" msgstr "スクリプトサイズ(_S):" #: src/gtk/x11lgnd.c:1924 msgid "_Raw" msgstr "_Raw" #: src/gtk/x11lgnd.c:2026 #, c-format msgid "Legend text %d" msgstr "テキスト %d" #: src/gtk/x11lgnd.c:2057 msgid "_Text:" msgstr "テキスト(_T):" #: src/gtk/x11lgnd.c:3035 src/gtk/x11menu.c:307 src/gtk/x11menu.c:308 msgid "Mark" msgstr "マーク" #: src/gtk/x11lgnd.c:3056 src/gtk/x11lgnd.c:3057 msgid "Stroke" msgstr "ストローク" #: src/gtk/x11lgnd.c:3065 msgid "Close path" msgstr "パスを閉じる" #: src/gtk/x11lgnd.c:3068 src/gtk/x11lgnd.c:3069 msgid "Fill" msgstr "塗りつぶし" #: src/gtk/x11lgnd.c:3071 msgid "Fill rule" msgstr "ルール" #: src/gtk/x11lgndx.c:365 #, c-format msgid "Legend Gaussian/Lorentzian/Parabola/Sin %d" msgstr "ガウス関数/ローレンツ関数/双曲線/三角関数 %d" #: src/gtk/x11lgndx.c:375 msgid "_Sin" msgstr "三角関数(_S)" #: src/gtk/x11lgndx.c:379 msgid "_Parabola" msgstr "双曲線(_P)" #: src/gtk/x11lgndx.c:383 msgid "_Lorentz" msgstr "ローレンツ関数(_L)" #: src/gtk/x11lgndx.c:387 msgid "_Gauss" msgstr "ガウス関数(_G)" #: src/gtk/x11lgndx.c:424 msgid "_Division:" msgstr "分割数(_D):" #: src/gtk/x11lgndx.c:451 msgid "Direction:" msgstr "方向:" #: src/gtk/x11menu.c:237 msgid "Point" msgstr "選択" #: src/gtk/x11menu.c:238 msgid "Pointer" msgstr "選択" #: src/gtk/x11menu.c:239 msgid "" "Legend and Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/" "Vertical +SHIFT: Fine)" msgstr "" "Legend, 軸の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)" #: src/gtk/x11menu.c:247 msgid "Legend" msgstr "レジェンド" #: src/gtk/x11menu.c:248 msgid "Legend Pointer" msgstr "Legend選択" #: src/gtk/x11menu.c:249 msgid "" "Legend Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: " "Fine)" msgstr "Legend の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)" #: src/gtk/x11menu.c:258 msgid "Axis Pointer" msgstr "軸選択" #: src/gtk/x11menu.c:259 msgid "" "Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: " "Fine)" msgstr "軸の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)" #: src/gtk/x11menu.c:267 msgid "Data" msgstr "データ選択" #: src/gtk/x11menu.c:268 src/gtk/x11menu.c:269 msgid "Data Pointer" msgstr "データの選択" #: src/gtk/x11menu.c:280 src/gtk/x11menu.c:281 msgid "Path" msgstr "パス" #: src/gtk/x11menu.c:282 msgid "New Legend Path (+SHIFT: Fine +CONTROL: snap angle)" msgstr "パスの新規作成 (+SHIFT:微動 +CONTROL:角度をスナップ)" #: src/gtk/x11menu.c:289 src/gtk/x11menu.c:290 msgid "Rectangle" msgstr "矩形" #: src/gtk/x11menu.c:291 msgid "" "New Legend Rectangle (+SHIFT: Fine +CONTROL: square integer ratio rectangle)" msgstr "矩形の新規作成 (+SHIFT:微動 +CONTROL:正方形または縦横が整数比の矩形)" #: src/gtk/x11menu.c:298 src/gtk/x11menu.c:299 msgid "Arc" msgstr "円" #: src/gtk/x11menu.c:300 msgid "New Legend Arc (+SHIFT: Fine +CONTROL: circle or integer ratio ellipse)" msgstr "円の新規作成 (+SHIFT:微動 +CONTROL:真円または縦横が整数比の楕円)" #: src/gtk/x11menu.c:309 msgid "New Legend Mark (+SHIFT: Fine)" msgstr "マークの新規作成 (+SHIFT:微動)" #: src/gtk/x11menu.c:316 src/gtk/x11menu.c:317 msgid "Text" msgstr "テキスト" #: src/gtk/x11menu.c:318 msgid "New Legend Text (+SHIFT: Fine)" msgstr "テキストの新規作成 (+SHIFT:微動)" #: src/gtk/x11menu.c:325 msgid "Gauss" msgstr "ガウス関数" #: src/gtk/x11menu.c:326 msgid "Gaussian" msgstr "ガウス関数" #: src/gtk/x11menu.c:327 msgid "New Legend Gaussian (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "ガウス関数等の新規作成 (+SHIFT:微動 +CONTROL:縦横を整数比にする)" #: src/gtk/x11menu.c:337 msgid "Frame axis" msgstr "フレームグラフ" #: src/gtk/x11menu.c:338 msgid "Frame Graph" msgstr "フレームグラフ" #: src/gtk/x11menu.c:339 msgid "New Frame Graph (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "フレームグラフの新規作成 (+SHIFT:微動 +CONTROL:縦横を整数比にする)" #: src/gtk/x11menu.c:346 msgid "Section axis" msgstr "方眼グラフ" #: src/gtk/x11menu.c:347 msgid "Section Graph" msgstr "方眼グラフ" #: src/gtk/x11menu.c:348 msgid "New Section Graph (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "方眼グラフの新規作成 (+SHIFT:微動 +CONTROL:縦横を整数比にする)" #: src/gtk/x11menu.c:355 msgid "Cross axis" msgstr "交差グラフ" #: src/gtk/x11menu.c:357 msgid "New Cross Graph (+SHIFT: Fine +CONTROL: integer ratio)" msgstr "交差グラフの新規作成 (+SHIFT:微動 +CONTROL: 縦横を整数比にする)" #: src/gtk/x11menu.c:364 msgid "Single axis" msgstr "単体軸" #: src/gtk/x11menu.c:365 msgid "Single Axis" msgstr "単体軸" #: src/gtk/x11menu.c:366 msgid "New Single Axis (+SHIFT: Fine +CONTROL: snap angle)" msgstr "単体軸の新規作成 (+SHIFT:微動 +CONTROL:角度をスナップ)" #: src/gtk/x11menu.c:376 msgid "Trimming" msgstr "軸トリミング" #: src/gtk/x11menu.c:377 msgid "Axis Trimming" msgstr "軸トリミング" #: src/gtk/x11menu.c:378 msgid "Axis Trimming (+SHIFT: Fine)" msgstr "軸スケールのトリミング (+SHIFT:微動)" #: src/gtk/x11menu.c:385 msgid "Evaluate" msgstr "データ評価" #: src/gtk/x11menu.c:386 msgid "Evaluate Data" msgstr "データ評価" #: src/gtk/x11menu.c:387 msgid "Evaluate Data Point" msgstr "データ点の評価" #: src/gtk/x11menu.c:394 msgid "Zoom" msgstr "ビューアズーム" #: src/gtk/x11menu.c:395 msgid "Viewer Zoom" msgstr "ビューアズーム" #: src/gtk/x11menu.c:396 msgid "Viewer Zoom-In (+CONTROL: Zoom-Out +SHIFT: Centering)" msgstr "ビューアのズームイン (+CONTROL:ズームアウト +SHIFT:センタリング)" #: src/gtk/x11menu.c:407 msgid "Add Data" msgstr "データ追加" #: src/gtk/x11menu.c:421 src/gtk/data/gtk/menus-common.ui.in:31 #: src/gtk/data/gtk/menus-common-win.ui.in:31 #: src/gtk/data/gtk/menus-common.ui:31 msgid "_Load graph" msgstr "開く(_L)" #: src/gtk/x11menu.c:422 msgid "Load NGP" msgstr "NGPファイルの読み込み" #: src/gtk/x11menu.c:433 msgid "Save NGP" msgstr "NGPファイル保存" #: src/gtk/x11menu.c:447 src/gtk/data/gtk/menus-common.ui.in:369 #: src/gtk/data/gtk/menus-common-win.ui.in:377 #: src/gtk/data/gtk/menus-common.ui:369 msgid "Scale _Clear" msgstr "スケールクリア(_C)" #: src/gtk/x11menu.c:448 src/gtk/x11menu.c:449 #: src/gtk/data/gtk/help-overlay.ui:53 msgid "Clear Scale" msgstr "スケールのクリア" #: src/gtk/x11menu.c:460 src/gtk/data/gtk/help-overlay.ui:60 msgid "Draw on Viewer Window" msgstr "ビューアに描画" #: src/gtk/x11menu.c:469 src/gtk/data/gtk/menus-common.ui.in:93 #: src/gtk/data/gtk/menus-common-win.ui.in:101 #: src/gtk/data/gtk/menus-common.ui:93 msgid "_Print" msgstr "印刷(_P)" #: src/gtk/x11menu.c:470 src/gtk/x11menu.c:471 src/gtk/x11print.c:522 msgid "Print" msgstr "印刷" #: src/gtk/x11menu.c:484 src/gtk/data/gtk/menus-common.ui.in:327 #: src/gtk/data/gtk/menus-common-win.ui.in:335 #: src/gtk/data/gtk/menus-common.ui:327 msgid "_Math Transformation" msgstr "変換式の一括入力(_M)" #: src/gtk/x11menu.c:485 msgid "Math Transformation" msgstr "変換式の一括入力" #: src/gtk/x11menu.c:486 msgid "Set Math Transformation" msgstr "変換式の一括入力" #: src/gtk/x11menu.c:495 src/gtk/data/gtk/menus-common.ui.in:374 #: src/gtk/data/gtk/menus-common-win.ui.in:382 #: src/gtk/data/gtk/menus-common.ui:374 msgid "Scale _Undo" msgstr "スケールアンドゥ(_U)" #: src/gtk/x11menu.c:496 msgid "Scale Undo" msgstr "スケールアンドゥ" #: src/gtk/x11menu.c:497 msgid "Undo Scale Settings" msgstr "スケール設定を戻す" #: src/gtk/x11menu.c:1111 msgid "_Add-in" msgstr "アドイン(_A)" #: src/gtk/x11menu.c:2169 msgid "Save menu" msgstr "保存メニュー" #: src/gtk/x11menu.c:2175 msgid "Recent Graphs" msgstr "最近使用したグラフ" #: src/gtk/x11menu.c:2181 msgid "Recent Data Files" msgstr "最近使用したデータファイル" #: src/gtk/x11menu.c:2730 msgid "Error:" msgstr "エラー:" #: src/gtk/x11menu.c:2779 msgid "Question" msgstr "質問" #: src/gtk/x11menu.c:2836 #, c-format msgid "Executing `%.128s'." msgstr "実行中 `%.128s'." #: src/gtk/x11menu.c:3094 src/gtk/x11menu.c:3113 msgid "edit" msgstr "編集" #: src/gtk/x11menu.c:3095 msgid "move" msgstr "移動" #: src/gtk/x11menu.c:3096 msgid "rotate" msgstr "回転" #: src/gtk/x11menu.c:3097 msgid "flip" msgstr "反転" #: src/gtk/x11menu.c:3098 msgid "delete object" msgstr "オブジェクトの削除" #: src/gtk/x11menu.c:3099 msgid "create object" msgstr "オブジェクトの作成" #: src/gtk/x11menu.c:3100 msgid "align" msgstr "位置合わせ" #: src/gtk/x11menu.c:3101 msgid "order" msgstr "描画順の変更" #: src/gtk/x11menu.c:3102 msgid "duplicate" msgstr "複製" #: src/gtk/x11menu.c:3103 msgid "execute shell" msgstr "シェルの実行" #: src/gtk/x11menu.c:3104 msgid "execute add-in" msgstr "アドインの実行" #: src/gtk/x11menu.c:3105 msgid "scale clear" msgstr "スケールクリア" #: src/gtk/x11menu.c:3106 msgid "scale undo" msgstr "スケールアンドゥ" #: src/gtk/x11menu.c:3107 msgid "open file" msgstr "ファイルを開く" #: src/gtk/x11menu.c:3108 msgid "add range" msgstr "「範囲」の追加" #: src/gtk/x11menu.c:3109 msgid "paste" msgstr "貼り付け" #: src/gtk/x11menu.c:3110 msgid "scale" msgstr "拡大・縮小" #: src/gtk/x11menu.c:3111 msgid "auto scale" msgstr "自動スケール" #: src/gtk/x11menu.c:3112 msgid "scale trimming" msgstr "軸トリミング" #: src/gtk/x11menu.c:3152 #, c-format msgid "_Redo: %s" msgstr "やり直し: %s (_R)" #: src/gtk/x11menu.c:3155 src/gtk/data/gtk/menus-common.ui.in:122 #: src/gtk/data/gtk/menus-common-win.ui.in:130 #: src/gtk/data/gtk/menus-common.ui:122 msgid "_Redo" msgstr "やり直し(_R)" #: src/gtk/x11menu.c:3162 #, c-format msgid "_Undo: %s" msgstr "元に戻す: %s (_U)" #: src/gtk/x11menu.c:3165 src/gtk/data/gtk/menus-common.ui.in:127 #: src/gtk/data/gtk/menus-common-win.ui.in:135 #: src/gtk/data/gtk/menus-common.ui:127 msgid "_Undo" msgstr "元に戻す(_U)" #: src/gtk/x11merge.c:53 msgid "top" msgstr "上" #: src/gtk/x11merge.c:54 src/oaxis.c:79 src/oaxis.c:93 src/oaxis.c:106 msgid "left" msgstr "左" #: src/gtk/x11merge.c:55 msgid "zoom_x" msgstr "X ズーム" #: src/gtk/x11merge.c:56 msgid "zoom_y" msgstr "Y ズーム" #: src/gtk/x11merge.c:75 src/gtk/x11opt_proto.h:277 msgid "_Preferences" msgstr "設定(_P)" #: src/gtk/x11merge.c:160 #, c-format msgid "Merge %d" msgstr "合成 %d" #: src/gtk/x11merge.c:174 msgid "_Top Margin:" msgstr "上マージン(_T):" #: src/gtk/x11merge.c:178 msgid "_Left Margin:" msgstr "左マージン(_L):" #: src/gtk/x11merge.c:182 msgid "zoom _X:" msgstr "_X ズーム:" #: src/gtk/x11merge.c:186 msgid "Link" msgstr "リンク" #: src/gtk/x11merge.c:189 msgid "zoom _Y:" msgstr "_Y ズーム:" #: src/gtk/x11merge.c:261 msgid "Add Merge file" msgstr "合成ファイルの追加" #: src/gtk/x11merge.c:296 msgid "close merge file (multi select)" msgstr "合成ファイルを閉じる (複数選択)" #: src/gtk/x11merge.c:326 msgid "merge file property (multi select)" msgstr "合成プロパティ (複数選択)" #: src/gtk/x11opt.c:72 src/gtk/data/gtk/menus-common.ui.in:501 #: src/gtk/data/gtk/menus-common-win.ui.in:509 #: src/gtk/data/gtk/menus-common.ui:501 msgid "_Viewer" msgstr "ビューア(_V)" #: src/gtk/x11opt.c:76 msgid "_External Viewer" msgstr "外部ビューアー設定(_E)" #: src/gtk/x11opt.c:80 src/gtk/data/gtk/menus-common.ui.in:509 #: src/gtk/data/gtk/menus-common-win.ui.in:517 #: src/gtk/data/gtk/menus-common.ui:509 msgid "_Font aliases" msgstr "フォント別名(_F)" #: src/gtk/x11opt.c:84 msgid "_Add-in Script" msgstr "アドイン設定(_A)" #: src/gtk/x11opt.c:88 src/gtk/data/gtk/menus-common.ui.in:517 #: src/gtk/data/gtk/menus-common-win.ui.in:525 #: src/gtk/data/gtk/menus-common.ui:517 msgid "_Miscellaneous" msgstr "その他(_M)" #: src/gtk/x11opt.c:265 msgid "Add-in Script" msgstr "アドインスクリプト" #: src/gtk/x11opt.c:286 msgid "_Add-in:" msgstr "アドイン(_A):" #: src/gtk/x11opt.c:291 msgid "_Name:" msgstr "名称(_N):" #: src/gtk/x11opt.c:295 msgid "_Script file:" msgstr "スクリプトファイル(_S):" #: src/gtk/x11opt.c:299 msgid "_Option:" msgstr "オプション(_O):" #: src/gtk/x11opt.c:303 msgid "_Description:" msgstr "説明(_D):" #: src/gtk/x11opt.c:370 msgid "Please specify script name." msgstr "スクリプト名を設定してください." #: src/gtk/x11opt.c:374 msgid "Please specify script file name." msgstr "スクリプトファイル名を設定してください." #: src/gtk/x11opt.c:382 msgid "Please specify script description." msgstr "スクリプトの説明を設定してください." #: src/gtk/x11opt.c:450 msgid "description" msgstr "説明" #: src/gtk/x11opt.c:566 msgid "Alternative font" msgstr "代替フォント" #: src/gtk/x11opt.c:665 src/gtk/gtk_presettings.c:1842 msgid "Font name" msgstr "フォント" #: src/gtk/x11opt.c:674 msgid "_Alias:" msgstr "フォント別名(_A):" #: src/gtk/x11opt.c:730 msgid "Alternative fonts" msgstr "代替フォント" #: src/gtk/x11opt.c:786 msgid "Please specify a new alias name." msgstr "フォント別名を指定してください." #: src/gtk/x11opt.c:794 msgid "Alias name already exists." msgstr "フォント別名が既に存在します." #: src/gtk/x11opt.c:934 msgid "alias" msgstr "別名" #: src/gtk/x11opt.c:936 msgid "alternative fonts" msgstr "代替フォント" #: src/gtk/x11opt.c:1039 msgid "Select program" msgstr "プログラム選択" #: src/gtk/x11opt.c:1110 msgid "custom palette" msgstr "カスタムパレット" #: src/gtk/x11opt.c:1149 msgid "External programs" msgstr "外部プログラム" #: src/gtk/x11opt.c:1155 msgid "_Editor:" msgstr "エディター(_E):" #: src/gtk/x11opt.c:1159 msgid "_Help browser:" msgstr "ヘルプ・ブラウザ(_H):" #: src/gtk/x11opt.c:1167 msgid "Save graph" msgstr "グラフの保存" #: src/gtk/x11opt.c:1178 msgid "include _Data file" msgstr "データファイルを含める(_D)" #: src/gtk/x11opt.c:1182 msgid "include _Merge file" msgstr "合成ファイルを含める(_M)" #: src/gtk/x11opt.c:1191 msgid "Load graph" msgstr "グラフの読込" #: src/gtk/x11opt.c:1202 msgid "_Expand include file" msgstr "データファイルの展開(_E)" #: src/gtk/x11opt.c:1207 msgid "_Expand directory:" msgstr "展開ディレクトリ(_E):" #: src/gtk/x11opt.c:1216 msgid "Size" msgstr "サイズ" #: src/gtk/x11opt.c:1221 msgid "_Size of completion history:" msgstr "補完履歴のサイズ(_S):" #: src/gtk/x11opt.c:1225 msgid "_Length of information view:" msgstr "information 表示の行数(_L):" #: src/gtk/x11opt.c:1229 msgid "_Length of data preview:" msgstr "データプレビューの行数(_L):" #: src/gtk/x11opt.c:1243 msgid "_Coordinate view:" msgstr "_Coordinate 表示(_C):" #: src/gtk/x11opt.c:1247 msgid "_Information view:" msgstr "_Information 表示:" #: src/gtk/x11opt.c:1251 msgid "data _Preview:" msgstr "データプレビュー(_P):" #: src/gtk/x11opt.c:1261 msgid "_Check \"change current directory\"" msgstr "\"カレントディレクトリを移動\"をチェック(_C)" #: src/gtk/x11opt.c:1265 src/gtk/x11print.c:208 msgid "_Use opacity" msgstr "不透明度を使う(_U)" #: src/gtk/x11opt.c:1269 msgid "_Show select data dialog on exporting" msgstr "エクスポート時にデータ選択ダイアログを表示(_S)" #: src/gtk/x11opt.c:1273 msgid "use custom _Palette" msgstr "カスタムパレットを使う(_P)" #: src/gtk/x11opt.c:1277 msgid "_Edit custom palette" msgstr "カスタムパレットの編集(_E)" #: src/gtk/x11opt.c:1282 msgid "_Source style:" msgstr "数式変換入力の表示スタイル(_S):" #: src/gtk/x11opt.c:1286 msgid "_Default decimalsign:" msgstr "小数点記号の既定値(_D):" #: src/gtk/x11opt.c:1292 msgid "use _Dark theme" msgstr "ダークテーマを使う (_D)" #: src/gtk/x11opt.c:1495 msgid "use _External previewer" msgstr "外部プログラムを使用する(_E)" #: src/gtk/x11opt.c:1505 msgid "Window _Width:" msgstr "幅(_W):" #: src/gtk/x11opt.c:1509 msgid "Window _Height:" msgstr "高さ(_H):" #: src/gtk/x11opt.c:1609 msgid "_Grid:" msgstr "グリッド(_G):" #: src/gtk/x11opt.c:1619 msgid "_Line attribute of focus frame:" msgstr "フォーカスフレームの線種(_L):" #: src/gtk/x11opt.c:1627 msgid "_Antialias:" msgstr "アンチエイリアス(_A):" #: src/gtk/x11opt.c:1629 msgid "_Preserve line width and style" msgstr "線幅と線種を保持する(_S)" #: src/gtk/x11opt.c:1633 msgid "_Load files on redraw" msgstr "再描画時にデータファイル読み込み(_L)" #: src/gtk/x11opt.c:1639 msgid "_Maximum number of data on redraw:" msgstr "再描画時の最大データ数(_M):" #: src/gtk/x11opt.c:1772 msgid "Save as Ngraph.ngp" msgstr "Ngraph.ngp として保存" #: src/gtk/x11print.c:141 msgid "_PostScript Version:" msgstr "ポストスクリプトレベル(_P):" #: src/gtk/x11print.c:172 msgid "_SVG Version:" msgstr "_SVG バージョン:" #: src/gtk/x11print.c:204 msgid "_Convert texts to paths" msgstr "テキストをパスに変換(_C)" #: src/gtk/x11print.c:226 msgid "Cairo PS Output" msgstr "Cairo PS 出力" #: src/gtk/x11print.c:229 msgid "Cairo EPS Output" msgstr "Cairo EPS 出力" #: src/gtk/x11print.c:232 msgid "Cairo PNG Output" msgstr "Cairo PNG 出力" #: src/gtk/x11print.c:235 msgid "Cairo PDF Output" msgstr "Cairo PDF 出力" #: src/gtk/x11print.c:238 msgid "Cairo SVG Output" msgstr "Cairo SVG 出力" #: src/gtk/x11print.c:242 msgid "Cairo EMF Output" msgstr "Cairo EMF 出力" #: src/gtk/x11print.c:375 msgid "Printing." msgstr "印刷中" #: src/gtk/x11print.c:521 #, c-format msgid "Printing error: %s" msgstr "印刷エラー: %s" #: src/gtk/x11print.c:594 msgid "Spawning external viewer." msgstr "外部ビューアに出力中" #: src/gtk/x11print.c:636 msgid "GRA file" msgstr "合成ファイルの保存" #: src/gtk/x11print.c:676 msgid "Making GRA file." msgstr "合成ファイル作成中" #: src/gtk/x11print.c:801 src/gtk/x11print.c:874 src/gtk/x11view.c:6744 msgid "Drawing." msgstr "描画中" #: src/gtk/x11view.c:1111 src/gtk/data/gtk/menus-common.ui.in:139 #: src/gtk/data/gtk/menus-common.ui.in:576 #: src/gtk/data/gtk/menus-common-win.ui.in:147 #: src/gtk/data/gtk/menus-common-win.ui.in:584 #: src/gtk/data/gtk/menus-common.ui:139 src/gtk/data/gtk/menus-common.ui:576 msgid "_Copy" msgstr "コピー(_C)" #: src/gtk/x11view.c:1725 src/gtk/x11view.c:1727 #, c-format msgid "Searching for data." msgstr "データ検索中" #: src/gtk/x11view.c:1837 #, c-format msgid "Evaluating." msgstr "データ評価中" #: src/gtk/x11view.c:1840 msgid "Evaluating" msgstr "データ評価中" #: src/gtk/x11view.c:1918 msgid "trimming (multi select)" msgstr "トリミング (複数選択)" #: src/gtk/x11view.c:3847 msgid "Data points are moved." msgstr "データは移動されました." #: src/gtk/x11view.c:5186 msgid "Moving data points is canceled." msgstr "データの移動はキャンセルされました." #: src/gtk/x11view.c:6738 msgid "Scaling" msgstr "軸スケール設定中" #: src/gtk/x11view.c:6745 msgid "Drawing" msgstr "描画中" #: src/gtk/x11parameter.c:145 src/gtk/x11parameter.c:212 msgid "_Initial value:" msgstr "初期値(_I):" #: src/gtk/x11parameter.c:148 msgid "_Wrap" msgstr "_Wrap" #: src/gtk/x11parameter.c:192 msgid "_Start:" msgstr "開始(_S):" #: src/gtk/x11parameter.c:195 msgid "Exchange" msgstr "交換" #: src/gtk/x11parameter.c:198 msgid "_Stop:" msgstr "終了(_S):" #: src/gtk/x11parameter.c:208 msgid "_Wait:" msgstr "ウェイト(_W):" #: src/gtk/x11parameter.c:222 msgid "_Active (initial state)" msgstr "アクティブ (初期状態) (_A)" #: src/gtk/x11parameter.c:245 msgid "_Items:" msgstr "項目(_I):" #: src/gtk/x11parameter.c:249 msgid "_Selected:" msgstr "選択項目(_S):" #: src/gtk/x11parameter.c:296 #, c-format msgid "Parameter %d" msgstr "パラメータ %d" #: src/gtk/x11parameter.c:306 msgid "_Title:" msgstr "タイトル(_T):" #: src/gtk/x11parameter.c:323 msgid "_Redraw" msgstr "再描画(_R)" #: src/gtk/x11parameter.c:474 msgid "delete parameter (multi select)" msgstr "パラメータ削除 (複数選択)" #: src/gtk/x11parameter.c:514 msgid "parameter property (multi select)" msgstr "パラメータプロパティ (複数選択)" #: src/gtk/x11parameter.c:612 msgid "Pause" msgstr "停止" #: src/gtk/x11parameter.c:621 src/gtk/x11parameter.c:963 msgid "Play" msgstr "開始" #: src/gtk/x11parameter.c:960 msgid "To start" msgstr "最初の値へ" #: src/gtk/x11parameter.c:966 msgid "To stop" msgstr "最後の値へ" #: src/gtk/x11parameter.c:969 msgid "Repeat" msgstr "リピート" #: src/gtk/x11parameter.c:1093 msgid "Up" msgstr "上へ" #: src/gtk/x11parameter.c:1098 msgid "Down" msgstr "下へ" #: src/gtk/x11parameter.c:1102 msgid "Delete" msgstr "削除" #: src/gtk/x11parameter.c:1169 msgid "_Save as default" msgstr "初期値に設定(_S)" #: src/gtk/x11parameter.c:1207 msgid "Add" msgstr "追加" #: src/gtk/gtk_widget.c:183 msgid "_Copy Settings" msgstr "設定のコピー(_C)" #: src/gtk/gtk_widget.c:920 msgid "Stroke Color" msgstr "ストローク色" #: src/gtk/gtk_widget.c:927 msgid "Fill Color" msgstr "塗りつぶし色" #: src/gtk/gtk_widget.c:955 msgid "Axis baseline color" msgstr "軸基線の色" #: src/gtk/gtk_widget.c:962 msgid "Axis gauge color" msgstr "目盛線の色" #: src/gtk/gtk_widget.c:969 msgid "Axis numbering color" msgstr "目盛数字の色" #: src/gtk/gtk_subwin.c:82 msgid "Open" msgstr "開く" #: src/gtk/gtk_subwin.c:1408 msgid "Instance name" msgstr "インスタンス名" #: src/gtk/gtk_liststore.c:163 src/gtk/gtk_presettings.c:1856 msgid "Bold" msgstr "太字" #: src/gtk/gtk_liststore.c:164 src/gtk/gtk_presettings.c:1859 msgid "Italic" msgstr "斜体" #: src/gtk/gtk_liststore.c:270 msgid "Line style" msgstr "線種" #: src/gtk/gtk_presettings.c:1748 src/odata.c:248 src/opath.c:81 msgid "line" msgstr "直線" #: src/gtk/gtk_presettings.c:1850 msgid "Font size" msgstr "フォントサイズ" #: src/gtk/gtk_presettings.c:1876 msgid "Mark size" msgstr "マークサイズ" #: src/gtk/gtk_presettings.c:1881 msgid "stroke/fill" msgstr "ストローク・塗りつぶし" #: src/gtk/gtk_presettings.c:1888 msgid "Line Width" msgstr "線幅" #: src/gtk/gtk_presettings.c:1893 msgid "Line Style" msgstr "線種" #: src/gtk/completion_info_data.c:5 msgid "" "abs(x)\n" "compute the absolute value of x" msgstr "" "abs(x)\n" "xの絶対値" #: src/gtk/completion_info_data.c:6 msgid "" "acos(x)\n" "arc cosine function" msgstr "" "acos(x)\n" "逆コサイン" #: src/gtk/completion_info_data.c:7 msgid "" "acosh(x)\n" "inverse hyperbolic cosine function" msgstr "" "acosh(x)\n" "逆ハイパボリックコサイン" #: src/gtk/completion_info_data.c:8 msgid "" "alpha(x, i)\n" "Set A (i == 1) or A2 (i == 2) values to x (0 <= " "x < 256)\n" "when i == 0, set A and A2 values to x" msgstr "" "alpha(x, i)\n" "A (i == 1) または A2 (i == 1) 値を x (0≦x<256)に" "設定\n" "i == 0 のときは A, A2 値を x (0≦x<256)に設定" #: src/gtk/completion_info_data.c:9 msgid "" "am(a)\n" "copy the contents of the array a to the memory\n" "(return the number of copied elements)" msgstr "" "am(a)\n" "配列 a の内容をメモリーにコピーする (戻り値はコピーした要素数)" #: src/gtk/completion_info_data.c:10 msgid "" "and(x, y)\n" "True (= 1) when (x != 0) and (y != 0)" msgstr "" "and(x, y)\n" "(x≠0) and (y≠0) のとき真(=1)" #: src/gtk/completion_info_data.c:11 msgid "" "array(a, v1, v2, ...)\n" "initialize an array a with the rest arguments\n" "return the number of elements of the array" msgstr "" "array(a, v1, v2, ...)\n" "配列 a を残りの引数で初期化する。\n" "配列の要素数を返す。" #: src/gtk/completion_info_data.c:12 msgid "" "array_average(a)\n" "return the average of the elements of array a" msgstr "" "array_average(a)\n" "配列 a の要素の平均を返す" #: src/gtk/completion_info_data.c:13 msgid "" "array_clear(a)\n" "set the number of elements of the array a to 0" msgstr "" "array_clear(a)\n" "配列 a の配列の要素数を 0 にする" #: src/gtk/completion_info_data.c:14 msgid "" "array_compact(a)\n" "Remove non-numeric values from the elements of the array of array a\n" "and return the number of elements after removal" msgstr "" "array_compact(a)\n" "配列 a の配列の要素から通常の数値以外を取り除き、取り除いた後の要素数" "を返す" #: src/gtk/completion_info_data.c:15 msgid "" "array_copy(dest, src)\n" "copy the contents of the array src to the array dest.\n" "(return the number of copied elements)" msgstr "" "array_copy(dest, src)\n" "配列 src の内容を配列 dest にコピーする (戻り値はコピーした要素" "数)" #: src/gtk/completion_info_data.c:16 msgid "" "array_max(a)\n" "returns the maximum value contained in array a" msgstr "" "array_max(a)\n" "配列 a に含まれる最大の値を返す" #: src/gtk/completion_info_data.c:17 msgid "" "array_min(a)\n" "returns the minimum value contained in array a" msgstr "" "array_min(a)\n" "配列 a に含まれる最小の値を返す" #: src/gtk/completion_info_data.c:18 msgid "" "array_moving_average(dest, src, n, type)\n" "calculate moving average of (n * 2 + 1) sample of the array src\n" "and set them to the array dest.\n" "Weighted moving average is used when type is 1." msgstr "" "array_moving_average(dest, src, n, type)\n" "配列 src の隣接平均を計算し、配列 dest に格納する。\n" "隣接平均の計算に使われるデータ数を n で指定する\n" "(1 の時、前後1つのデータと合わせて3つのデータの平均がとられる)。\n" "type が 0 の時は単純移動平均、1 の時は加重移動平均を計算する。" #: src/gtk/completion_info_data.c:19 msgid "" "array_stdev(a)\n" "return the corrected sample standard deviation of the elements of array " "a" msgstr "" "array_stdev(a)\n" "配列 a の要素の不偏標準偏差を返す" #: src/gtk/completion_info_data.c:20 msgid "" "array_stdevp(a)\n" "return the standard deviation of the elements of array a" msgstr "" "array_stdevp(a)\n" "配列 a の要素の標準偏差を返す" #: src/gtk/completion_info_data.c:21 msgid "" "array_sum(a)\n" "returns the sum of the elements of array a" msgstr "" "array_sum(a)\n" "配列 a の要素の和を返す" #: src/gtk/completion_info_data.c:22 msgid "" "array_sumsq(a)\n" "returns the square sum of the elements of array a" msgstr "" "array_sumsq(a)\n" "配列 a の要素の自乗和を返す" #: src/gtk/completion_info_data.c:23 msgid "" "asin(x)\n" "arc sine function" msgstr "" "asin(x)\n" "逆サイン" #: src/gtk/completion_info_data.c:24 msgid "" "asinh(x)\n" "inverse hyperbolic sine function" msgstr "" "asinh(x)\n" "逆ハイパボリックサイン" #: src/gtk/completion_info_data.c:25 msgid "" "atan(x)\n" "arc tangent function" msgstr "" "atan(x)\n" "逆タンジェント" #: src/gtk/completion_info_data.c:26 msgid "" "atanh(x)\n" "inverse hyperbolic tangent function" msgstr "" "atanh(x)\n" "逆ハイパボリックタンジェント" #: src/gtk/completion_info_data.c:27 msgid "" "beta(x, y)\n" "beta function" msgstr "" "beta(x, y)\n" "ベータ関数" #: src/gtk/completion_info_data.c:28 msgid "" "choose(n, m)\n" "the combinatorial factor n choose m: n!/(m!(n-m)!)" msgstr "" "choose(n, m)\n" "組み合わせ nCm = n!/(m!(n-m)!)" #: src/gtk/completion_info_data.c:29 msgid "" "cm(x, n)\n" "initialize n memories from the beginning with x\n" "initialize whole memory when n is 0\n" "and n memories from the end when x is negative\n" "(return x)" msgstr "" "cm(x, n)\n" "先頭からn個のメモリーを x で初期化する\n" "n が 0 のときはメモリー全体を x で初期化する\n" "n が負のときは末尾から n 個のメモリーを x で初期化する\n" "(戻り値は x)" #: src/gtk/completion_info_data.c:30 msgid "" "color(i, x)\n" "i = 0: Set the R value to x (0 <= x < 256)\n" "i = 1: Set the G value to x (0 <= x < 256)\n" "i = 2: Set the B value to x (0 <= x < 256)\n" "i = 3: Set the R, G and B values to x (0 <= x < " "256)\n" "i = 4: Set the R2 value to x (0 <= x < 256)\n" "i = 5: Set the G2 value to x (0 <= x < 256)\n" "i = 6: Set the B2 value to x (0 <= x < 256)\n" "i = 7: Set the R2, G2 and B2 values to x (0 <= x " "< 256)\n" "i = 8: Set the R, G and B values to be hexadecimal color of x\n" "i = 9: Set the R2, G2 and B2 values to be hexadecimal color of x" msgstr "" "color(i, x)\n" "i = 0: R 値を x (0 <= x < 256) に設定\n" "i = 1: G 値を x (0 <= x < 256) に設定\n" "i = 2: B 値を x (0 <= x < 256) に設定\n" "i = 3: R, G, B 値を x (0 <= x < 256) に設定\n" "i = 4: R2 値を x (0 <= x < 256) に設定\n" "i = 5: G2 値を x (0 <= x < 256) に設定\n" "i = 6: B2 値を x (0 <= x < 256) に設定\n" "i = 7: R2, G2 and B2 値を x (0 <= x < 256) に設" "定\n" "i = 8: x を16進数のカラーコードとして R, G, B 値に設定\n" "i = 9: x を16進数のカラーコードとして R2, G2, B2 値に設定" #: src/gtk/completion_info_data.c:31 msgid "" "cos(x)\n" "cosine function" msgstr "" "cos(x)\n" "コサイン" #: src/gtk/completion_info_data.c:32 msgid "" "cosh(x)\n" "hyperbolic cosine function" msgstr "" "cosh(x)\n" "ハイパボリックコサイン" #: src/gtk/completion_info_data.c:33 msgid "" "delta(x)\n" "Kronecker delta (1 when x = 0, 0 otherwise)" msgstr "" "delta(x)\n" "クロネッカーのδ(x = 0 のとき 1, それ以外は 0)" #: src/gtk/completion_info_data.c:34 msgid "" "dif(x)\n" "Difference" msgstr "" "dif(x)\n" "差分" #: src/gtk/completion_info_data.c:35 msgid "" "draw_arc(x, y, rx, ry, start, arc, pieslice, stroke, fill, close)\n" "draw an arc with the X direction radius rx and the Y direction radius " "ry centered on (x, y).\n" "start and arc specify start angle and arc angle respectively.\n" "When stroke and fill are 0, do not draw contours and fills " "respectively.\n" "If pieslice is not 0, draw a sector.\n" "If close is not 0, close the outline." msgstr "" "draw_arc(x, y, rx, ry, start, angle, pieslice, stroke, fill, " "close)\n" "(x, y) を中心とし X 方向半径 rx, Y 方向半径 ry の円弧を" "描画する。\n" "start, angle で開始角、円弧角を指定する。\n" "stroke, fill が 0 の場合はそれぞれ輪郭、塗りつぶしを描画しな" "い。\n" "pieslice が 0 以外の場合は扇形を描画する。\n" "close が 0 以外の場合は輪郭を閉じる。" #: src/gtk/completion_info_data.c:36 msgid "" "draw_errorbar(x, y, erx, ery, size)\n" "draw errorbars from (x - erx, y) to (x + erx, y) and\n" "from (x, y - ery) to (x, y + ery).\n" "The length of ticks can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" "draw_errorbar(x, y, erx, ery, size)\n" "(x - erx, y) から (x + erx, y) および\n" "(x, y - ery) から (x, y + ery) に誤差棒を描画する。\n" "size で tick の長さを指定できる。\n" "size が 0 のときはファイルオブジェクトのサイズ指定が使われる。" #: src/gtk/completion_info_data.c:37 msgid "" "draw_errorbar2(x1, y1, x2, y2, size)\n" "draw an errorbar from (x1, y1) to (x2, y2).\n" "The length of ticks can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" "draw_errorbar2(x1, y1, x2, y2, size)\n" "(x1, y1) から (x2, y2) に誤差棒を描画する。\n" "size で tick の長さを指定できる。\n" "size が 0 のときはファイルオブジェクトのサイズ指定が使われる。" #: src/gtk/completion_info_data.c:38 msgid "" "draw_line(x1, y1, x2, y2, arrow, size)\n" "draw a line form (x1, y1) to (x2, y2).\n" "When arrow is 1, 2 or 3, draw arrow end, begin and both side of the " "line respectively.\n" "The size of a arrow can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" "draw_line(x1, y1, x2, y2, arrow, size)\n" "(x1, y1) から (x2, y2) に直線を描画する。\n" "arrow が 1, 2, 3 の時は、それぞれ終点、始点、両端に矢印を描画する。\n" "size で矢印の大きさを指定できる。\n" "size が 0 のときはファイルオブジェクトのサイズ指定が使われる。" #: src/gtk/completion_info_data.c:39 msgid "" "draw_mark(x, y, size)\n" "draw a mark on (x, y). \n" "The size of a mark can be specified with size.\n" "When size is 0, specification of the file object is used." msgstr "" "draw_mark(x, y, size)\n" "(x, y) にマークを描画する。\n" "size でマークのサイズを指定できる。\n" "size が 0 のときはファイルオブジェクトのサイズ指定が使われる。" #: src/gtk/completion_info_data.c:40 msgid "" "draw_polygon(ax, ay, stroke, fill)\n" "draw polygon defined by coordinates (ax[0], ay[0]), (ax[1], ay[1]), ....\n" "when stroke is 0, do not draw contours.\n" "fill can be specified with one of\n" "FILL_RULE_NONE, FILL_RULE_EVEN_ODD or FILL_RULE_WINDING." msgstr "" "draw_polygon(ax, ay, stroke, fill)\n" "座標 (ax[0], ay[0]), (ax[1], ay[1]), ... で囲まれ" "た領域を描画する。\n" "stroke が 0 の場合は輪郭を描画しない。\n" "fill には次の定数を指定できる。\n" "FILL_RULE_NONE, FILL_RULE_EVEN_ODD, FILL_RULE_WINDING" #: src/gtk/completion_info_data.c:41 msgid "" "draw_polyline(ax, ay)\n" "connect coordinates (ax[0], ay[0]), (ax[1], ay[1]), ... by polyline." msgstr "" "draw_polyline(ax, ay)\n" "座標 (ax[0], ay[0]), (ax[1], ay[1]), ...\n" "を直線で結ぶ。" #: src/gtk/completion_info_data.c:42 msgid "" "draw_rect(x, y, w, h, stroke, fill)\n" "draw a rectangle with (x, y) and (x + w, y + h) as diagonal " "vertices.\n" "When stroke and fill are 0, do not draw contours and fills " "respectively." msgstr "" "draw_rect(x, y, w, h, stroke, fill)\n" "(x, y) と (x + w, y + h) を対角の頂点とする矩形を描画する。\n" "stroke, fill が 0 の場合はそれぞれ輪郭、塗りつぶしを描画しな" "い。" #: src/gtk/completion_info_data.c:43 msgid "" "draw_text($str, x, y, dir)\n" "Draw the string $str at (x, y).\n" "Direction is specified by dir." msgstr "" "draw_text($str, x, y, dir)\n" "(x, y) に文字列 $str を描画する。\n" "dir で方向を指定できる。" #: src/gtk/completion_info_data.c:44 msgid "" "draw_text_raw($str, x, y, dir)\n" "Draw the raw string $str at (x, y).\n" "Direction is specified by dir." msgstr "" "draw_text_raw($str, x, y, dir)\n" "(x, y) に文字列 $str をそのまま描画する。\n" "dir で方向を指定できる。" #: src/gtk/completion_info_data.c:45 msgid "" "each(a, item, ex)\n" "Evaluate ex for each element of the array a.\n" "The element of the array can be referred by the variable item." msgstr "" "each(a, item, ex)\n" "配列 a の各要素に対して、式 ex を評価する。\n" "配列の各要素は、第二引数に指定した変数 (item) で参照できる。" #: src/gtk/completion_info_data.c:46 msgid "" "each_with_index(a, item, index, ex)\n" "Evaluate ex for each element of the array a.\n" "The element of the array and the loop count can be referred\n" "by the variable item and index respectively." msgstr "" "each_with_index(a, item, index, ex)\n" "配列 a の各要素に対して、式 ex を評価する。\n" "配列の各要素は、第二引数に指定した変数 (item) で参照できる。\n" "繰り返しのカウンタは、第三引数に指定した変数 (index) で参照できる。" #: src/gtk/completion_info_data.c:47 msgid "" "ei(x)\n" "compute the exponential integral Ei(x)" msgstr "" "ei(x)\n" "積分指数関数 Ei(x)" #: src/gtk/completion_info_data.c:48 msgid "" "eq(x, y, prec)\n" "True (= 1) when x == y.\n" "The number of digits of comparison can be specified with prec\n" "(prec == 0 is exact match)." msgstr "" "eq(x, y, prec)\n" "x == y のとき真(=1)。\n" "prec で比較の桁数を指定できる\n" "(prec == 0 は完全一致)。" #: src/gtk/completion_info_data.c:49 msgid "" "erf(x)\n" "error function erf(x)" msgstr "" "erf(x)\n" "誤差関数 erf(x)" #: src/gtk/completion_info_data.c:50 msgid "" "erfc(x)\n" "complementary error function erfc(x)" msgstr "" "erfc(x)\n" "相補誤差関数 erfc(x)" #: src/gtk/completion_info_data.c:51 msgid "" "exp(x)\n" "base-e exponential function (x <= 690)" msgstr "" "exp(x)\n" "指数関数 (x≦690)" #: src/gtk/completion_info_data.c:52 msgid "" "expm1(x)\n" "exp(x)-1.\n" "The result is computed in a way that is accurate\n" "even if the value of x is near zero." msgstr "" "expm1(x)\n" "exp(x)-1\n" "x の値が 0 に近い場合でも正確に計算できる方法が用いられる。" #: src/gtk/completion_info_data.c:53 msgid "" "filename($str, basename)\n" "Assign filename of the the data object to the variable $str.\n" "Any leading directory components are removed when basename is not " "zero.\n" "Return the length of the string $str in characters." msgstr "" "filename($str, basename)\n" "変数 $str にデータオブジェクトのファイル名を代入する。\n" "変数 basename が 0 以外の場合は\n" "ファイル名からディレクトリ部分を取り除く。\n" "正しい UTF-8 文字列の場合、文字列の文字数を返す。" #: src/gtk/completion_info_data.c:54 msgid "" "filter(dest, src, item, ex)\n" "Find elements in the array src\n" "that satisfies that the evaluated value of ex is true\n" "and set them to the array dest.\n" "An element of the array src can be referred by the variable item." msgstr "" "filter(dest, src, item, ex)\n" "配列 src の各要素に対して、式 ex を評価して\n" "その結果が真である要素を配列 dest に設定する。\n" "配列の各要素は、第三引数に指定した変数 (item) で参照できる。" #: src/gtk/completion_info_data.c:55 msgid "" "find(a, item, ex)\n" "Returns the value of the first element in the array a\n" "that satisfies that the evaluated value of ex is true.\n" "An element of the array can be referred by the variable item." msgstr "" "find(a, item, ex)\n" "配列 a の各要素に対して、式 ex を評価して\n" "その結果が真である最初の要素を返す。\n" "配列の各要素は、第二引数に指定した変数 (item) で参照できる。" #: src/gtk/completion_info_data.c:56 msgid "" "fit_calc(id, x)\n" "When the plot type of the data object whose ID is id is fit,\n" "the corresponding fit result f(x) is calculated." msgstr "" "fit_calc(id, x)\n" "ID が id の data オブジェクトのプロットタイプが fit のとき、\n" "対応する fit 結果 f(x) を計算する。" #: src/gtk/completion_info_data.c:57 msgid "" "fit_prm(id, x)\n" "When the plot type of the data object whose ID is id is fit,\n" "the value of the field \"%0x\" of the corresponding fit object." msgstr "" "fit_prm(id, x)\n" "ID が id の data オブジェクトのプロットタイプが fit のとき、\n" "対応する fit object のフィールド \"%0x\" の値。" #: src/gtk/completion_info_data.c:58 msgid "" "fmod(x, y)\n" "compute the floating-point remainder of dividing x by y" msgstr "" "fmod(x, y)\n" "xy で割った浮動小数点剰余" #: src/gtk/completion_info_data.c:59 msgid "" "for(m, begin, end, step, ex)\n" "Set the value in step from begin to end to the m-" "th memory and repeat ex.\n" "When m is negative, no setting to memory is done.\n" "Returns the value of ex evaluated last." msgstr "" "for(m, begin, end, step, ex)\n" "第mメモリーの値に begin から end まで step で値を" "設定し、\n" "ex を繰り返す。\n" "m が負の時はメモリーへの設定は行われない。\n" "最後に評価された ex の値を返す。" #: src/gtk/completion_info_data.c:60 msgid "" "frac(x)\n" "remainder" msgstr "" "frac(x)\n" "x の小数部" #: src/gtk/completion_info_data.c:61 msgid "" "gamma(x)\n" "gamma function" msgstr "" "gamma(x)\n" "ガンマ関数 Γ(x)" #: src/gtk/completion_info_data.c:62 msgid "" "gauss(x)\n" "largest integral value not greater than x" msgstr "" "gauss(x)\n" "ガウスの記号[ ] ([x]はxを越えない最大の整数)" #: src/gtk/completion_info_data.c:63 msgid "" "ge(x, y, prec)\n" "True (= 1) when x >= y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" "ge(x, y, prec)\n" "xy のとき真(=1)。\n" "prec で比較の桁数を指定できる\n" "(prec == 0 は桁数指定なし)。" #: src/gtk/completion_info_data.c:64 msgid "" "getobj($obj, $field, id)\n" "Return the value of the $field of the $obj object which ID is " "id.\n" "The field type must be int, bool, enum or double." msgstr "" "getobj($obj, $field, id)\n" "ID が id のオブジェクト $obj のフィールド $field の値を" "返す。\n" "field type が int, bool, enum, double の場合に利用できる。" #: src/gtk/completion_info_data.c:65 msgid "" "getobj_array(array, $obj, $field, id)\n" "Set values of the $field of the $obj object which ID is id to the array array.\n" "The field type must be char*[], double[] or int[].\n" "Retuern the number of elements saved to the array." msgstr "" "getobj_array(array, $obj, $field, id)\n" "ID が id のオブジェクト $obj のフィールド $field の値を " "array に代入する。\n" "field type が char*[], double[], int[] の場合に利用できる。\n" "設定した配列の要素数を返す。" #: src/gtk/completion_info_data.c:66 msgid "" "getobj_string($str, $obj, $field, id)\n" "Set the value of the $field of the $obj object which ID is " "id to the variable $str.\n" "The field type must be char*.\n" "Return the length of the string $str in characters." msgstr "" "getobj_string($str, $obj, $field, id)\n" "ID が id のオブジェクト $obj のフィールド $field の値を " "$str に代入する。\n" "field type が char* の場合に利用できる。\n" "正しい UTF-8 文字列の場合、文字列の文字数を返す。" #: src/gtk/completion_info_data.c:67 msgid "" "gt(x, y, prec)\n" "True (= 1) when x > y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" "gt(x, y, prec)\n" "xy のとき真(=1)。\n" "prec で比較の桁数を指定できる\n" "(prec == 0 は桁数指定なし)。" #: src/gtk/completion_info_data.c:68 msgid "" "hn(n, x)\n" "Hermite polynomials" msgstr "" "hn(n, x)\n" "エルミート多項式" #: src/gtk/completion_info_data.c:69 msgid "" "hsb(h, s, b)\n" "Set the R, G and B values of the color to h, s, b (0 <= h, s, " "b <=1) from the HSB value" msgstr "" "hsb(h, s, b)\n" "R, G, B の値をHSB値 h, s, b (0≦h, s, b≦1)から設定" #: src/gtk/completion_info_data.c:70 msgid "" "hsb2(h, s, b)\n" "Set the R2, G2 and B2 values of the color to h, s, b (0 <= h, " "s, b <=1) from the HSB value" msgstr "" "hsb2(h, s, b)\n" "R2, G2, B2 の値をHSB値 h, s, b (0≦h, s, b≦1)から設定" #: src/gtk/completion_info_data.c:71 msgid "" "icbeta(a, b, x)\n" "incomplete beta function" msgstr "" "icbeta(a, b, x)\n" "不完全ベータ関数 I(a, b, x) (0 ≦ x ≦ 1) " #: src/gtk/completion_info_data.c:72 msgid "" "icgam(m, x)\n" "incomplete gamma function" msgstr "" "icgam(m, x)\n" "不完全ガンマ関数 Γ(m, x)" #: src/gtk/completion_info_data.c:73 msgid "" "if(x, ex1, ex2)\n" "evaluate ex1 when x != 0, evaluate ex2 otherwise" msgstr "" "if(x, ex1, ex2)\n" "x ≠ 0 のとき ex1, x == 0 のとき ex2" #: src/gtk/completion_info_data.c:74 msgid "" "in(n, x)\n" "compute the regular modified cylindrical Bessel function of order |n|, In(|x|)" msgstr "" "in(n, x)\n" "第1種n次変形ベッセル関数 In(|x|)" #: src/gtk/completion_info_data.c:75 msgid "" "index(a, item, ex)\n" "Returns the first index at which a given element in the array a\n" "that satisfies that the evaluated value of ex is true.\n" "An element of the array can be referred by the variable item." msgstr "" "index(a, item, ex)\n" "配列 a の各要素に対して、式 ex を評価して\n" "その結果が真である最初の位置を返す。\n" "配列の各要素は、第二引数に指定した変数 (item) で参照できる。" #: src/gtk/completion_info_data.c:76 msgid "" "int(x)\n" "round to integer, toward zero" msgstr "" "int(x)\n" "0に向かって切捨てた整数部" #: src/gtk/completion_info_data.c:77 msgid "" "inu(nu, x)\n" "compute the regular modified Bessel function of fractional order |nu|, Inu(|x|)" msgstr "" "inu(nu, x)\n" "第1種nu次変形ベッセル関数 (nu は正の実数) Inu(|x|)" #: src/gtk/completion_info_data.c:78 msgid "" "isbreak(x)\n" "True if x is BREAK" msgstr "" "isbreak(x)\n" "xBREAK の場合真" #: src/gtk/completion_info_data.c:79 msgid "" "iscont(x)\n" "True if x is CONT" msgstr "" "iscont(x)\n" "xCONT の場合真" #: src/gtk/completion_info_data.c:80 msgid "" "isnan(x)\n" "True if x is NAN" msgstr "" "isnan(x)\n" "xNAN の場合真" #: src/gtk/completion_info_data.c:81 msgid "" "isnormal(x)\n" "True if x is a normal number" msgstr "" "isnormal(x)\n" "x が通常の数値の場合真" #: src/gtk/completion_info_data.c:82 msgid "" "isundef(x)\n" "True if x is UNDEF" msgstr "" "isundef(x)\n" "xUNDEF の場合真" #: src/gtk/completion_info_data.c:83 msgid "" "jl(l, x)\n" "compute the regular spherical Bessel function of order |l|, " "jl(|x|)" msgstr "" "jl(l, x)\n" "第1種l次球ベッセル関数 jl(|x|)" #: src/gtk/completion_info_data.c:84 msgid "" "jn(n, x)\n" "compute the regular cylindrical Bessel function of order n, " "Jn(|x|)" msgstr "" "jn(n, x)\n" "第1種n次ベッセル関数 Jn(|x|)" #: src/gtk/completion_info_data.c:85 msgid "" "jnu(nu, x)\n" "compute the regular cylindrical Bessel function of fractional order |nu|, Jnu(|x|)" msgstr "" "jnu(nu, x)\n" "第1種nu次ベッセル関数 (nu は正の実数) Jnu(|" "x|)" #: src/gtk/completion_info_data.c:86 msgid "" "kn(n, x)\n" "compute the irregular modified cylindrical Bessel function of order |n|, Kn(|x|)" msgstr "" "kn(n, x)\n" "第2種n次変形ベッセル関数 Kn(|x|)" #: src/gtk/completion_info_data.c:87 msgid "" "knu(nu, x)\n" "compute the irregular modified Bessel function of fractional order |nu|, Knu(|x|)" msgstr "" "knu(nu, x)\n" "第2種nu次変形ベッセル関数 (nu は正の実数) Knu(|x|)" #: src/gtk/completion_info_data.c:88 msgid "" "le(x, y, prec)\n" "True (= 1) when x <= y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" "le(x, y, prec)\n" "xy のとき真(=1)。\n" "prec で比較の桁数を指定できる\n" "(prec == 0 は桁数指定なし)。" #: src/gtk/completion_info_data.c:89 msgid "" "lgn(n, a, x)\n" "evaluate the generalized Laguerre polynomials Lan(x) for a > -1, n >= 0" msgstr "" "lgn(n, a, x)\n" "ラゲール倍多項式" #: src/gtk/completion_info_data.c:90 msgid "" "line_number()\n" "File line number being processed (1st line is 1)" msgstr "" "line_number()\n" "処理中のファイル行番号 (1行目が1)" #: src/gtk/completion_info_data.c:91 msgid "" "ln(x)\n" "natural logarithmic function" msgstr "" "ln(x)\n" "自然対数" #: src/gtk/completion_info_data.c:92 msgid "" "ln1p(x)\n" "ln(1+x).\n" "The result is computed in a way that is accurate\n" "even if the value of x is near zero." msgstr "" "ln1p(x)\n" "ln(1+x)\n" "x の値が 0 に近い場合でも正確に計算できる方法が用いられる。" #: src/gtk/completion_info_data.c:93 msgid "" "log(x)\n" "base-10 logarithmic function" msgstr "" "log(x)\n" "常用対数" #: src/gtk/completion_info_data.c:94 msgid "" "log1p(x)\n" "log(1+x).\n" "The result is computed in a way that is accurate\n" "even if the value of x is near zero." msgstr "" "log1p(x)\n" "log(1+x)\n" "x の値が 0 に近い場合でも正確に計算できる方法が用いられる。" #: src/gtk/completion_info_data.c:95 msgid "" "lt(x, y, prec)\n" "True (= 1) when x < y.\n" "The precision allows you to specify the number of digits for comparison\n" "(prec == 0 does not specify the number of digits)." msgstr "" "lt(x, y, prec)\n" "xy のとき真(=1)。\n" "prec で比較の桁数を指定できる\n" "(prec == 0 は桁数指定なし)。" #: src/gtk/completion_info_data.c:96 msgid "" "m(i, x)\n" "assigns x to the i-th memory (i = 0 to 65535)\n" "the index from the tail when i is negative\n" "(return x)" msgstr "" "m(i, x)\n" "引数を第iメモリーに代入する(i=0〜65535)\n" "i が負のときは末尾からのインデックス\n" "(戻り値は x)" #: src/gtk/completion_info_data.c:97 msgid "" "map(dest, src, item, ex)\n" "Evaluate ex for each element of the array src\n" "and set them to the array dest.\n" "The element of the array can be referred by the variable item." msgstr "" "map(dest, src, item, ex)\n" "配列 src の各要素に対して、式 ex を評価し、\n" "その結果を配列 dest に設定する。\n" "配列の各要素は、第三引数に指定した変数 (item) で参照できる。" #: src/gtk/completion_info_data.c:98 msgid "" "marksize(x)\n" "Set mark size to x" msgstr "" "marksize(x)\n" "マークのサイズをxに設定" #: src/gtk/completion_info_data.c:99 msgid "" "marktype(x)\n" "Set mark type to x" msgstr "" "marktype(x)\n" "マークの種類をxに設定" #: src/gtk/completion_info_data.c:100 msgid "" "max(a, b, c, ...)\n" "The largest value of arguments" msgstr "" "max(a, b, c, ...)\n" "引数のうちもっとも大きな値" #: src/gtk/completion_info_data.c:101 msgid "" "min(a, b, c, ...)\n" "The smallest value of arguments" msgstr "" "min(a, b, c, ...)\n" "引数のうちもっとも小さな値" #: src/gtk/completion_info_data.c:102 msgid "" "mjd(year, month, day, hour, min, sec)\n" "Modified Julian Date (date and time are given in UTC)" msgstr "" "mjd(year, month, day, hour, min, sec)\n" "修正ユリウス日(year, month, day はグレゴリオ暦、" "hour, min, sec は UTC 時刻)" #: src/gtk/completion_info_data.c:103 msgid "" "mjd2day(mjd)\n" "Gregorian calendar day corresponding to Modified Julian Day mjd" msgstr "" "mjd2day(mjd)\n" "修正ユリウス日に対応するグレゴリオ暦の日" #: src/gtk/completion_info_data.c:104 msgid "" "mjd2month(mjd)\n" "month of Gregorian calendar corresponding to Modified Julian Day mjd" msgstr "" "mjd2month(mjd)\n" "修正ユリウス日に対応するグレゴリオ暦の月" #: src/gtk/completion_info_data.c:105 msgid "" "mjd2unix(mjd)\n" "time represents the number of seconds elapsed since the Epoch at mjd" msgstr "" "mjd2unix(mjd)\n" "修正ユリウス日 mjd の1970年1月1日00:00:00 UTC からの経過秒数\n" "(うるう秒は考慮されない)" #: src/gtk/completion_info_data.c:106 msgid "" "mjd2wday(mjd)\n" "The day of the week as a decimal range 1 to 7, Monday being 1 corresponding " "to mjd" msgstr "" "mjd2wday(mjd)\n" "修正ユリウス日に対応するグレゴリオ暦の曜日 (1:月曜日から 7:日曜日)" #: src/gtk/completion_info_data.c:107 msgid "" "mjd2yday(mjd)\n" "The day of the year as a decimal number (range 001 to 366) corresponding to " "mjd" msgstr "" "mjd2yday(mjd)\n" "修正ユリウス日に対応するグレゴリオ暦の 1 月 1 日からの通算日数 (1 から 366)" #: src/gtk/completion_info_data.c:108 msgid "" "mjd2year(mjd)\n" "year of Gregorian calendar corresponding to Modified Julian Day mjd" msgstr "" "mjd2year(mjd)\n" "修正ユリウス日に対応するグレゴリオ暦の年" #: src/gtk/completion_info_data.c:109 msgid "" "mtime()\n" "returns last modification time of the file." msgstr "" "mtime()\n" "ファイルの最終修正時刻を返す。" #: src/gtk/completion_info_data.c:110 msgid "" "neq(x, y, prec)\n" "True (= 1) when x != y.\n" "The number of digits of comparison can be specified with prec\n" "(prec == 0 is exact match)." msgstr "" "neq(x, y, prec)\n" "xy のとき真(=1)。\n" "prec で比較の桁数を指定できる\n" "(prec == 0 は完全一致)。" #: src/gtk/completion_info_data.c:111 msgid "" "not(x)\n" "True (= 1) when x == 0" msgstr "" "not(x)\n" "x == 0 のとき真(=1)" #: src/gtk/completion_info_data.c:112 msgid "" "obj_alpha(id, obj)\n" "Set the A and A2 value to the same value as the instance of obj whose " "ID is id.\n" "obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, " "MARK_OBJ or TEXT_OBJ." msgstr "" "obj_alpha(id, obj)\n" "A, A2 値を ID が idobj で指定したオブジェクトと同じ値にす" "る。\n" "objDATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ, TEXT_OBJ のいずれか。" #: src/gtk/completion_info_data.c:113 msgid "" "obj_color(id, obj)\n" "Set the R, G, B, R2, G2 and B2 values to the same value as the instance of " "obj whose ID is id.\n" "obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, " "MARK_OBJ or TEXT_OBJ." msgstr "" "obj_color(id, obj)\n" "R, G, B, R2, G2, B2 値を ID が idobj で指定したオブジェクト" "と同じ値にする。\n" "objDATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ, TEXT_OBJ のいずれか。" #: src/gtk/completion_info_data.c:114 msgid "" "on_end(proc)\n" "Evaluate proc at the end of plottong the data object." msgstr "" "end_proc(proc)\n" "data オブジェクトの描画終了時にprocを評価する。" #: src/gtk/completion_info_data.c:115 msgid "" "or(x, y)\n" "True (= 1) when (x != 0) or (y != 0)" msgstr "" "or(x, y)\n" "(x≠0) or (y≠0) のとき真(=1)" #: src/gtk/completion_info_data.c:116 msgid "" "parameter(id)\n" "Returns the value of the prameter object which ID is id." msgstr "" "parameter(id)\n" "ID が id の parameter オブジェクトの設定値を返す" #: src/gtk/completion_info_data.c:117 msgid "" "pn(l, x)\n" "evaluate the Legendre polynomial Pl(x) for a specific " "value of l, x subject to l >= 0, |x| <= 1" msgstr "" "pn(l, x)\n" "ルジャンドル多項式" #: src/gtk/completion_info_data.c:118 msgid "" "pop(a ,n)\n" "remove the last n elements of array a (n = 0 is as same " "as n = 1).\n" "Returns the new size of the array." msgstr "" "pop(a, n)\n" "配列 a から末尾のn要素を取り除く (n = 0 は n = 1 " "と同義)。\n" "操作後の配列の要素数を返す。" #: src/gtk/completion_info_data.c:119 msgid "" "printf($format, v1, v2, ...)\n" "Converts v1, v2, ... to a string according to $format\n" "and show in the information window.\n" "Return the length of the string $str in characters." msgstr "" "printf($format, v1, v2, ...)\n" "数値 v1, v2, ...$format に従い\n" "文字列に変換して information window に表示する。\n" "変換された文字列の文字数を返す。" #: src/gtk/completion_info_data.c:120 msgid "" "prog1(arg1, arg2, ...)\n" "Evaluate the arguments and return the evaluated value of the first argument" msgstr "" "prog1(arg1, arg2, ...)\n" "引数を評価し、最初の引数の値を返す" #: src/gtk/completion_info_data.c:121 msgid "" "prog2(arg1, arg2, ...)\n" "Evaluate the arguments and return the evaluated value of the second argument" msgstr "" "prog2(arg1, arg2, ...)\n" "引数を評価し、2 番目の引数の値を返す" #: src/gtk/completion_info_data.c:122 msgid "" "progn(arg1, arg2, ...)\n" "Evaluate the arguments and return the evaluated value of the last argument" msgstr "" "progn(arg1, arg2, ...)\n" "引数を評価し、最後の引数の値を返す" #: src/gtk/completion_info_data.c:123 msgid "" "push(a, x)\n" "adds new element x to the end of an array a.\n" "Returns the new size of the array." msgstr "" "push(a, x)\n" "配列 a の末尾に x を追加する。\n" "操作後の配列の要素数を返す。" #: src/gtk/completion_info_data.c:124 msgid "" "puts($str)\n" "Show $str in the information window.\n" "Return the length of the string $str in characters." msgstr "" "puts($str)\n" "$str を information window に表示する。\n" "$str に含まれる文字数を返す。" #: src/gtk/completion_info_data.c:125 msgid "" "qinv(x)\n" "inverse complementary error function" msgstr "" "qinv(x)\n" "誤差関数 erfc(x) の逆関数" #: src/gtk/completion_info_data.c:126 msgid "" "rand(x)\n" "returns a random value equally distributed over the range [0..x)" msgstr "" "rand(x)\n" "0≦rand(x)<x (x>0のとき)の乱数" #: src/gtk/completion_info_data.c:127 msgid "" "reduce(a, item, result, ex)\n" "Evaluate ex for each element of the array a\n" "and return last evaluated value of ex.\n" "The element of the array and the result of previous evaluation\n" "can be referred by the variable item and result." msgstr "" "reduce(a, item, result, ex)\n" "配列 src の各要素に対して、式 ex を評価し、最後の評価結果返" "す。\n" "配列の各要素は、第二引数に指定した変数 (item) で参照できる。\n" "前回の繰り返しにおける計算結果は、第三引数に指定した変数 (result) で参" "照できる。" #: src/gtk/completion_info_data.c:128 msgid "" "rgb(r, g, b)\n" "Set the R, G and B values of the color to r, g, b (0 <= r, g, " "b <= 1)" msgstr "" "rgb(r, g, b)\n" "R, G, B 値をそれぞれ r, g, b (0≦r, g, b≦1)に設定" #: src/gtk/completion_info_data.c:129 msgid "" "rgb2(r, g, b)\n" "Set the R2, G2 and B2 values of the color to r, g, b (0 <= r, " "g, b <= 1)" msgstr "" "rgb2(r, g, b)\n" "R2, G2, B2 値をそれぞれ r, g, b (0≦r, g, b≦1)に設定" #: src/gtk/completion_info_data.c:130 msgid "" "rm(i)\n" "the value of the current i-th memory (i = 0 to 65535),\n" "the index from the tail when i is negative" msgstr "" "rm(i)\n" "現在の第iメモリーの値(i = 0〜65535)\n" "i が負のときは末尾からのインデックス" #: src/gtk/completion_info_data.c:131 msgid "" "round(x, digit)\n" "round the number x, away from zero.\n" "digit is the number of digits to which you want to round x." msgstr "" "round(x, digit)\n" "xを四捨五入した値を返す。\n" "digit で四捨五入した結果の桁数を指定できる。" #: src/gtk/completion_info_data.c:132 msgid "" "rsort(a, ignore_case)\n" "reverse sort elements of array a\n" "fold lower case to upper case characters when ignore_case is not zero." msgstr "" "rsort(a, ignore_case)\n" "配列 a を逆順に整列する\n" "aが文字列の配列で ignore_case が 0 以外の場合は\n" "文字列に含まれる ascii 文字の\n" "大文字小文字を区別せずに比較する。" #: src/gtk/completion_info_data.c:133 msgid "" "shift(a, n)\n" "remove the first n elements of array a (n = 0 is as " "same as n = 1).\n" "Returns the new size of the array." msgstr "" "shift(a)\n" "配列 a の先頭のn要素を取り除く (n = 0 は n = 1 と" "同義)。\n" "残りの要素は前に詰められる。\n" "操作後の配列の要素数を返す。" #: src/gtk/completion_info_data.c:134 msgid "" "sign(x)\n" "positive / negative sign (-1 with x < 0, 1 with x >= 0)" msgstr "" "sign(x)\n" "正負の符号 (x < 0 で -1、x ≧ 0 で 1)" #: src/gtk/completion_info_data.c:135 msgid "" "sin(x)\n" "sine function" msgstr "" "sin(x)\n" "サイン" #: src/gtk/completion_info_data.c:136 msgid "" "sinh(x)\n" "hyperbolic sine function" msgstr "" "sinh(x)\n" "ハイパボリックサイン" #: src/gtk/completion_info_data.c:137 msgid "" "size(a)\n" "number of elements of array a" msgstr "" "size(a)\n" "配列 a の要素数" #: src/gtk/completion_info_data.c:138 msgid "" "sort(a, ignore_case)\n" "sort elements of array a\n" "fold lower case to upper case characters when ignore_case is not zero." msgstr "" "sort(a, ignore_case)\n" "配列 a を整列する\n" "aが文字列の配列で ignore_case が 0 以外の場合は\n" "文字列に含まれる ascii 文字の\n" "大文字小文字を区別せずに比較する。" #: src/gtk/completion_info_data.c:139 msgid "" "sprintf($str, $format, v1, v2, ...)\n" "Converts v1, v2, ... to a string according to $format\n" "and set to $str.\n" "Return the length of the string $str in characters." msgstr "" "sprintf($str, $format, v1, v2, ...)\n" "数値 v1, v2, ...$format に従い\n" "文字列に変換して $str に代入する。\n" "変換された文字列の文字数を返す。" #: src/gtk/completion_info_data.c:140 msgid "" "sqr(x)\n" "squaring" msgstr "" "sqr(x)\n" "二乗" #: src/gtk/completion_info_data.c:141 msgid "" "sqrt(x)\n" "square root" msgstr "" "sqrt(x)\n" "平方根" #: src/gtk/completion_info_data.c:142 msgid "" "srand(x)\n" "Sets the seed for the random number generator which is used by the rand() function" msgstr "" "srand(x)\n" "rand() 関数で作られる疑似乱数系列の新しい種を設定する。" #: src/gtk/completion_info_data.c:143 msgid "" "strftime($str, $fmt, t, utc)\n" "convers t (the number of seconds elapsed since the Epoch)\n" "according to the format specification $fmt\n" "and places the result in the string $str.\n" "When utc is true, $str is expressed in Coordinated Universal " "Time (UTC)." msgstr "" "strftime($str, $fmt, t, utc)\n" "時刻 t (紀元からの経過秒数)を $fmt で\n" "指定された書式指定にしたがって変換し、\n" "文字列 $str に書き込む。\n" "utc が偽 (0) の時はローカル時刻、\n" "それ以外の場合は協定世界時 (UTC) に変換する。" #: src/gtk/completion_info_data.c:144 msgid "" "string($str, value)\n" "Converts value to a string and set to $str.\n" "Return the value." msgstr "" "string($str, value)\n" "数値 value を文字列に変換して $str に代入する。\n" "value を返す。" #: src/gtk/completion_info_data.c:145 msgid "" "string_append($dest, $src)\n" "Adds the string $src onto the end of the string $dest." msgstr "" "string_append($dest, $src)\n" "文字列 $dest の最後に文字列 $src を連結する。" #: src/gtk/completion_info_data.c:146 msgid "" "string_column($dest, index)\n" "Set indexth column in the reading data-line to the string $dest." msgstr "" "string_column($dest, index)\n" "データファイルを読み込んだ時に index カラムの\n" "文字列を $dest に代入する。\n" "index が 0 のときは行全体の文字列が代入される。" #: src/gtk/completion_info_data.c:147 msgid "" "string_compare($str1, $str2, ignore_case)\n" "Compare two strings, ignoring the case of ASCII characters when " "ignore_case is not zero." msgstr "" "string_compare($str1, $str2, ignore_case)\n" "2つの文字列 $str1$str2 を比較して\n" "$str1$str2 に較べて 1)小さい、2)等しい、3)大きい場合に、\n" "ゼロよりも 1)小さい、2)等しい、3)大きい整数を返す。\n" "ignore_case が 0 以外の場合は文字列に含まれる ascii 文字の\n" "大文字小文字を区別せずに比較する。" #: src/gtk/completion_info_data.c:148 msgid "" "string_down($dest, $src)\n" "Converts all uppercase ASCII letters to lowercase ASCII letters in the " "string $src and set to the string $dest." msgstr "" "string_down($dest, $src)\n" "文字列 $src に含まれる ascii 文字を小文字にした\n" "文字列を $dest に代入する。" #: src/gtk/completion_info_data.c:149 msgid "" "string_erase($str, pos, len)\n" "Removes len characters from the string $str, starting at " "position pos." msgstr "" "string_erase($str, pos, len)\n" "文字列 $str から、pos 文字目から始まる len 文字を削除す" "る。\n" "UTF-8 以外の文字列では使えない。" #: src/gtk/completion_info_data.c:150 msgid "" "string_float($str)\n" "Converts the string $str to a floating-point value and return the " "value." msgstr "" "string_float($str)\n" "$str を浮動小数点に変換し、その値を返す。" #: src/gtk/completion_info_data.c:151 msgid "" "string_float_array(dest, $ary)\n" "Converts the string element of the array $ary\n" "to a floating-point value\n" "and set them to the array dest." msgstr "" "string_float_array(dest, $ary)\n" "配列 $ary の各要素を浮動小数点に変換し、\n" "その値を配列 dest に代入する。" #: src/gtk/completion_info_data.c:152 msgid "" "string_insert($dest, $src, pos)\n" "Inserts the string $src into the string $dest at the position " "pos." msgstr "" "string_insert($dest, $src, pos)\n" "文字列 $destpos 番目の文字の前に文字列 $src を挿入す" "る。" #: src/gtk/completion_info_data.c:153 msgid "" "string_join($dest, $sep, $array)\n" "Joins a number of strings in the array $array\n" "together to form one long string $dest,\n" "with the optional separator $sepinserted between each of them." msgstr "" "string_join($dest, $sep, $array)\n" "文字列の配列 $array の各要素を連結して $dest に代入する。\n" "各要素のあいだには、文字列 $sep が挿入される。" #: src/gtk/completion_info_data.c:154 msgid "" "string_length($str)\n" "Return the length of the string $str in characters." msgstr "" "string_length($str)\n" "$str に含まれる文字数を返す。\n" "UTF-8 以外の文字列では使えない。" #: src/gtk/completion_info_data.c:155 msgid "" "string_match($str, $regexp, ignore_case)\n" "Scans for a match in the string $str for the regular expression " "pattern $regexp.\n" "Return non-zero value if the string matched, zero otherwise." msgstr "" "string_match($str, $regexp, ignore_case)\n" "文字列 $str に対して、文字列 $regexp が表す正規表現によるマッチ" "ングを行う。\n" "マッチした場合は 0 以外の数値、マッチしなかった場合は 0 を返す。\n" "ignore_case が 0 以外の場合は文字列に含まれる ascii 文字の大文字小文字" "を区別せずに比較する。" #: src/gtk/completion_info_data.c:156 msgid "" "string_prepend($dest, $src)\n" "Adds the string $src onto the start of the string $dest." msgstr "" "string_prepend($dest, $src)\n" "文字列 $dest の最初に文字列 $src を連結する。" #: src/gtk/completion_info_data.c:157 msgid "" "string_replace($dest, $src, $regexp, $replacement, ignore_case)\n" "Replaces all occurrences of the regular expression pattern in $regex " "with the $replacement text.\n" "Backreferences of the form '\\number' or '\\g<number>' in the " "replacement text are interpolated\n" "by the number-th captured subexpression of the match,\n" "'\\g<name>' refers to the captured subexpression with the given name.\n" "'\\0' refers to the complete match,\n" "but '\\0' followed by a number is the octal representation of a character.\n" "Letters in $regex match both upper- and lowercase letters\n" "when ignore_case is not zero." msgstr "" "string_replace($dest, $src, $regexp, $replacement, ignore_case)\n" "文字列 $src 中の、文字列 $regexp が表す正規表現にマッチする\n" "文字列を $replacement で置換した文字列を $dest に代入する。\n" "ignore_case が 0 以外の場合は文字列に含まれる ascii 文字の大文字小文字" "を区別せずに比較する。" #: src/gtk/completion_info_data.c:158 msgid "" "string_reverse($dest, $src)\n" "Reverses the UTF-8 string $src and set to the string $dest." msgstr "" "string_reverse($dest, $src)\n" "文字列 $src の並びを逆にした文字列を $dest に代入する。\n" "UTF-8 以外の文字列では使えない。" #: src/gtk/completion_info_data.c:159 msgid "" "string_split($dest, $src, $separator, use_regexp)\n" "Splits the string $src into pieces, using the given $separator.\n" "Each strings are saved in the array $dest\n" "$separator is treated as a regular expression\n" "when use_regexp is not 0.\n" "Letters in $separator match both upper- and lowercase letters\n" "when use_regexp is 2." msgstr "" "string_split($dest, $src, $separator, use_regexp)\n" "文字列 $src を文字列 $separator で分割し、\n" "分割された文字列を配列 $dest に代入する。\n" "use_regexp が 0 以外の場合 $separator は\n" "正規表現として扱われる\n" "use_regexp が 2 の場合、文字列に含まれる\n" "ascii 文字の大文字小文字を区別せずに分割する。" #: src/gtk/completion_info_data.c:160 msgid "" "string_split_float(dest, $src, $separator, use_regexp)\n" "Splits the string $src into pieces, using the given $separator.\n" "Each strings are converted to float value and saved in the array dest\n" "$separator is treated as a regular expression\n" "when use_regexp is not 0.\n" "Letters in $separator match both upper- and lowercase letters\n" "when use_regexp is 2." msgstr "" "string_split_float(dest, $src, $separator, use_regexp)\n" "文字列 $src を文字列 $separator で分割し、\n" "分割された文字列を浮動小数点に変換して配列 dest に代入する。\n" "use_regexp が 0 以外の場合 $separator は\n" "正規表現として扱われる\n" "use_regexp が 2 の場合、文字列に含まれる\n" "ascii 文字の大文字小文字を区別せずに分割する。" #: src/gtk/completion_info_data.c:161 msgid "" "string_strip($str)\n" "Removes leading and trailing whitespace from the string $str." msgstr "" "string_strip($str)\n" "文字列 $str の先頭、最後にある空白文字を削除する。" #: src/gtk/completion_info_data.c:162 msgid "" "string_substring($dest, $src, start, end)\n" "Copies a substring out of a UTF-8 encoded string $src.\n" "The substring will contain end - start characters." msgstr "" "string_substring($dest, $src, start, end)\n" "文字列 $srcpos 文字目から始まり end 文字までからな" "る\n" "文字列を $dest に代入する。\n" "UTF-8 以外の文字列では使えない。" #: src/gtk/completion_info_data.c:163 msgid "" "string_truncate($str, len)\n" "Cuts off the end of the string $str, leaving the first len " "characters." msgstr "" "string_truncate($str, len)\n" "文字列 $str の先頭 len 文字以降を削除する。\n" "UTF-8 以外の文字列では使えない。" #: src/gtk/completion_info_data.c:164 msgid "" "string_up($dest, $src)\n" "Converts all lowercase ASCII letters to uppercase ASCII letters in the " "string $src and set to the string $dest." msgstr "" "string_up($dest, $src)\n" "文字列 $src に含まれる ascii 文字を大文字にした\n" "文字列を $dest に代入する。" #: src/gtk/completion_info_data.c:165 msgid "" "sum(x)\n" "Integration" msgstr "" "sum(x)\n" "積算" #: src/gtk/completion_info_data.c:166 msgid "" "sumsq(a, b, c, ...)\n" "square sum of arguments" msgstr "" "sumsq(a, b, c, ...)\n" "引数の自乗和" #: src/gtk/completion_info_data.c:167 msgid "" "tan(x)\n" "tangent function" msgstr "" "tan(x)\n" "タンジェント" #: src/gtk/completion_info_data.c:168 msgid "" "tanh(x)\n" "hyperbolic tangent function" msgstr "" "tanh(x)\n" "ハイパボリックタンジェント" #: src/gtk/completion_info_data.c:169 msgid "" "text_align(x, y)\n" "Set alignment of a text drawing.\n" "x and y represent alignment of parallel and normal direction " "respectively.\n" "(0 <= x, y <= 1)" msgstr "" "text_align(x, y)\n" "文字列を描画するときの位置合わせを指定する。\n" "xy は文字列の描画方向およびそれと直行する方向の位置を表" "す。\n" "(0 ≦ x, y ≦ 1)" #: src/gtk/completion_info_data.c:170 msgid "" "text_font(font)\n" "Set font setting of drawing texts.\n" "The value font 0, 1 and 2 represent \"Sans-serif\", \"Serif\" and " "\"Monospace\" respectively." msgstr "" "text_font(font)\n" "描画する文字列のフォントを設定する。\n" "font は 0, 1, 2 がそれぞれ \"Sans-serif\", \"Serif\", \"Monospace\" に" "対応する。" #: src/gtk/completion_info_data.c:171 msgid "" "text_obj_get(id, $text)\n" "assign text of the the text object which ID is id to the variable " "$text." msgstr "" "text_obj_get(id, $text)\n" "$text に ID が id の text オブジェクトの文字列を設定する。" #: src/gtk/completion_info_data.c:172 msgid "" "text_obj_set(id, $text)\n" "set text of the the text object which ID is id as the variable " "$text." msgstr "" "text_obj_set(id, $text)\n" "ID が id の text オブジェクトの文字列を $text に設定する。" #: src/gtk/completion_info_data.c:173 msgid "" "text_size(pt, space, script)\n" "Set font size and other settings of drawing texts.\n" "Font size can be specified by pt.\n" "Font-spacing and script-size are specified by the following arguments." msgstr "" "text_size(pt, space, script)\n" "描画する文字列のサイズなどを設定する。\n" "pt でフォントサイズを指定できる。\n" "続く引数で文字間隔、スクリプトサイズを指定できる。" #: src/gtk/completion_info_data.c:174 msgid "" "text_style(style)\n" "Set font style settings of drawing texts.\n" "The value style 0, 1, 2 and 3 represent \"normal\", \"bold\", \"italic" "\" and \"bold-italic\" respectively." msgstr "" "text_style(style)\n" "描画する文字列のスタイルを設定する。\n" "style は 0, 1, 2, 3 がそれぞれ \"normal\", \"bold\", \"italic\", " "\"bold-italic\" に対応する。" #: src/gtk/completion_info_data.c:175 msgid "" "theta(x)\n" "staircase function (1 if x >= 0, 0 otherwise)" msgstr "" "theta(x)\n" "階段関数(x≧0 のとき 1, それ以外は 0)" #: src/gtk/completion_info_data.c:176 msgid "" "time()\n" "returns the time as the number of seconds since the Epoch,\n" "1970-01-01 00:00:00 +0000 (UTC)" msgstr "" "time()\n" "紀元 (1970年1月1日00:00:00 UTC) からの経過時間を秒単位で返す。" #: src/gtk/completion_info_data.c:177 msgid "" "times(n, index, ex)\n" "Repeat ex n times.\n" "The loop count can be referred by the variable index." msgstr "" "times(n, index, ex)\n" "式 exn 回評価する。\n" "繰り返しのカウンタは、第二引数に指定した変数 (index) で参照できる。" #: src/gtk/completion_info_data.c:178 msgid "" "tn(n, x)\n" "Chebyshev polynomials" msgstr "" "tn(n, x)\n" "チェビシフ多項式" #: src/gtk/completion_info_data.c:179 msgid "" "unix2mjd(time)\n" "Modified Julian Date\n" "time represents the number of seconds elapsed since the Epoch,\n" "1970-01-01 00:00:00 +0000 (UTC))" msgstr "" "unix2mjd(time)\n" "修正ユリウス日\n" "(time は 1970年1月1日00:00:00 UTC からの経過秒数、うるう秒は考慮されな" "い)" #: src/gtk/completion_info_data.c:180 msgid "" "unless(x, ex1, ex2)\n" "evaluate ex2 when x != 0, evaluate ex1 otherwise" msgstr "" "unless(x, ex1, ex2)\n" "x ≠ 0 のとき ex2, x = 0 のとき ex1" #: src/gtk/completion_info_data.c:181 msgid "" "unshift(a, x)\n" "adds new element x to the beginning of an array a.\n" "Returns the new size of the array." msgstr "" "unshift(a, x)\n" "配列 a の先頭に x を挿入する。\n" "操作後の配列の要素数を返す。" #: src/gtk/completion_info_data.c:182 msgid "" "xor(x, y)\n" "True (= 1) when (x != 0) xor (y != 0)" msgstr "" "xor(x, y)\n" "(x≠0) xor (y≠0) のとき真(=1)" #: src/gtk/completion_info_data.c:183 msgid "" "yl(l, x)\n" "compute the irregular spherical Bessel function of order |l|, " "yl(|x|)" msgstr "" "yl(l, x)\n" "第2種l次球ベッセル関数" #: src/gtk/completion_info_data.c:184 msgid "" "yn(n, x)\n" "compute the irregular cylindrical Bessel function of order n, " "Yn(|x|)" msgstr "" "yn(n, x)\n" "第2種n次ベッセル関数" #: src/gtk/completion_info_data.c:185 msgid "" "ynu(nu, x)\n" "compute the irregular cylindrical Bessel function of fractional order |" "nu|, Ynu(|x|)" msgstr "" "ynu(nu, x)\n" "第2種nu次ベッセル関数 (nu は正の実数)" #: src/gtk/completion_info_data.c:186 msgid "" "zeta(s)\n" "compute the Riemann zeta function zeta(s) for arbitrary s, s !" "= 1" msgstr "" "zeta(s)\n" "リーマンゼータ関数ζ(s)" #: src/gtk/completion_info_data.c:187 msgid "" "zeta_int(n)\n" "compute the Riemann zeta function zeta(n) for integer n, n != 1" msgstr "" "zeta_int(n)\n" "リーマンゼータ関数ζ(n) (n は整数)" #: src/gtk/completion_info_data.c:188 msgid "" "zetam1(s)\n" "compute zeta(s) - 1 for arbitrary s, s != 1" msgstr "" "zetam1(s)\n" "リーマンゼータ関数ζ(s) - 1" #: src/gtk/completion_info_data.c:189 msgid "" "zetam1_int(n)\n" "compute zeta(n) - 1 for integer n, n != 1" msgstr "" "zetam1_int(n)\n" "リーマンゼータ関数ζ(n) - 1 (n は整数)" #: src/gtk/completion_info_data.c:190 msgid "" "zip(a1, a2, item1, item2, ex)\n" "Evaluate ex for each element of two arrays a1 and a2.\n" "The elements of the arrays can be referred by the variable item1 and " "item2." msgstr "" "zip(a1, a2, item1, item2, ex)\n" "配列 a1, a2 の各要素に対して、式 ex を評価する。\n" "配列の各要素は、第3, 第4引数に指定した変数 (item1, item2) で参照でき" "る。" #: src/gtk/completion_info_data.c:191 msgid "" "zip_map(dest, src1, src2, item1, item2, ex)\n" "Evaluate ex for each element of two arrays src1 and sec2\n" "and set them to the array dest..\n" "The elements of the arrays can be referred by the variable item1 and " "item2." msgstr "" "zip_map(dest, src1, src2, item1, item2, ex)\n" "配列 asrc1, src2 の各要素に対して、式 ex を評価し、\n" "その結果を配列 dest に設定する。\n" "配列の各要素は、第4, 第5引数に指定した変数 (item1, item2) で参照でき" "る。" #: src/gtk/completion_info_data.c:195 msgid "" "%D\n" "The ID of the instance of the data object" msgstr "" "%D\n" "データの番号" #: src/gtk/completion_info_data.c:196 msgid "" "%N\n" "The number of instances of data object" msgstr "" "%N\n" "データオブジェクトのインスタンス数" #: src/gtk/completion_info_data.c:197 msgid "" "ARC_OBJ\n" "The identification number of the arc object" msgstr "" "ARC_OBJ\n" "arc オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:198 msgid "" "AVX\n" "The average of X" msgstr "" "AVX\n" "(X) column の生データの平均" #: src/gtk/completion_info_data.c:199 msgid "" "AVY\n" "The average of X" msgstr "" "AVY\n" "(Y) column の生データの平均" #: src/gtk/completion_info_data.c:200 msgid "" "AXISX\n" "The ID of the axis instance specified as X axis" msgstr "" "AXISX\n" "「X 軸」に指定された axis オブジェクトの ID" #: src/gtk/completion_info_data.c:201 msgid "" "AXISX_LEN\n" "Length of the X axis" msgstr "" "AXISX_LEN\n" "「X 軸」の長さ" #: src/gtk/completion_info_data.c:202 msgid "" "AXISX_MAX\n" "The maximum value of the X axis" msgstr "" "AXISX_MAX\n" "「X 軸」の最大値" #: src/gtk/completion_info_data.c:203 msgid "" "AXISX_MIN\n" "The minimum value of the X axis" msgstr "" "AXISX_MIN\n" "「X 軸」の最小値" #: src/gtk/completion_info_data.c:204 msgid "" "AXISY\n" "The ID of the axis instance specified as Y axis" msgstr "" "AXISY\n" "「Y 軸」に指定された axis オブジェクトの ID" #: src/gtk/completion_info_data.c:205 msgid "" "AXISY_LEN\n" "Length of the Y axis" msgstr "" "AXISY_LEN\n" "「Y 軸」の長さ" #: src/gtk/completion_info_data.c:206 msgid "" "AXISY_MAX\n" "The maximum value of the Y axis" msgstr "" "AXISY_MAX\n" "「Y 軸」の最大値" #: src/gtk/completion_info_data.c:207 msgid "" "AXISY_MIN\n" "The minimum value of the Y axis" msgstr "" "AXISY_MIN\n" "「Y 軸」の最小値" #: src/gtk/completion_info_data.c:208 msgid "" "BREAK\n" "Missing data (data lines are not combined)" msgstr "" "BREAK\n" "欠損データ (データ線は分断)" #: src/gtk/completion_info_data.c:209 msgid "" "COLX\n" "The column number specified for X" msgstr "" "COLX\n" "「X カラム」に指定された数" #: src/gtk/completion_info_data.c:210 msgid "" "COLY\n" "The column number specified for Y" msgstr "" "COLY\n" "「Y カラム」に指定された数" #: src/gtk/completion_info_data.c:211 msgid "" "CONT\n" "Missing data (data lines are combined)" msgstr "" "CONT\n" "欠損データ (データ線は結合)" #: src/gtk/completion_info_data.c:212 msgid "" "DATA_OBJ\n" "The identification number of the data object" msgstr "" "DATA_OBJ\n" "data オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:213 msgid "" "E\n" "The base of natural logarithm (Napier's constant)" msgstr "" "E\n" "自然対数の底" #: src/gtk/completion_info_data.c:214 msgid "" "EULER\n" "Euler's constant" msgstr "" "EULER\n" "オイラーの定数" #: src/gtk/completion_info_data.c:215 msgid "" "FALSE\n" "the FALSE value (0)" msgstr "" "FALSE\n" "偽の値 (0)" #: src/gtk/completion_info_data.c:216 msgid "" "FILE_OBJ\n" "The identification number of the file object" msgstr "" "FILE_OBJ\n" "file オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:217 msgid "" "FILL_RULE_EVEN_ODD\n" "Defined for the function draw_polygon().\n" "fill the polygon with evin-odd rule." msgstr "" "FILL_RULE_EVEN_ODD\n" "ポリゴンを偶奇則で塗りつぶす。\n" "draw_polygon() 関数で利用する。" #: src/gtk/completion_info_data.c:218 msgid "" "FILL_RULE_NONE\n" "Defined for the function draw_polygon().\n" "don't fill the polygon." msgstr "" "FILL_RULE_NONE\n" "ポリゴンを塗りつぶさない。\n" "draw_polygon() 関数で利用する。" #: src/gtk/completion_info_data.c:219 msgid "" "FILL_RULE_WINDING\n" "Defined for the function draw_polygon().\n" "fill the polygon with winding rule." msgstr "" "FILL_RULE_WINDING\n" "ポリゴンをワインディング則で塗りつぶす。\n" "draw_polygon() 関数で利用する。" #: src/gtk/completion_info_data.c:220 msgid "" "FIRST\n" "When conversion is performed twice with one line of data such as diagonal or " "errorbar plot,\n" "true (1) in the first call, false (0) in the second call." msgstr "" "FIRST\n" "diagonal, errorbar など一行のデータで\n" "2回の変換が行われる場合、\n" "1回目の呼出しで真(=1)、\n" "2回目の呼出しで偽(=0)。" #: src/gtk/completion_info_data.c:221 msgid "" "FLINE\n" "Number of lines specified as \"Final line\"" msgstr "" "FLINE\n" "「最終行」に指定された行数" #: src/gtk/completion_info_data.c:222 msgid "" "HSKIP\n" "Number of lines specified as \"Head skip\"" msgstr "" "HSKIP\n" "「先頭スキップ行」に指定された行数" #: src/gtk/completion_info_data.c:223 msgid "" "MARK_OBJ\n" "The identification number of the mark object" msgstr "" "MARK_OBJ\n" "mark オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:224 msgid "" "MASK\n" "Number of lines set for mask" msgstr "" "MASK\n" "「マスク」に設定された行数" #: src/gtk/completion_info_data.c:225 msgid "" "MAXX\n" "The maximum value of X" msgstr "" "MAXX\n" "(X) column の生データの最大値" #: src/gtk/completion_info_data.c:226 msgid "" "MAXY\n" "The maximum value of Y" msgstr "" "MAXY\n" "(Y) column の生データの最大値" #: src/gtk/completion_info_data.c:227 msgid "" "MINX\n" "The minimum value of X" msgstr "" "MINX\n" "(X) column の生データの最小値" #: src/gtk/completion_info_data.c:228 msgid "" "MINY\n" "The minimum value of Y" msgstr "" "MINY\n" "(Y) column の生データの最小値" #: src/gtk/completion_info_data.c:229 msgid "" "MOVE\n" "Number of lines set for move" msgstr "" "MOVE\n" "「移動」に設定された行数" #: src/gtk/completion_info_data.c:230 msgid "" "NAN\n" "Missing data with error indication" msgstr "" "NAN\n" "欠損データエラー表示" #: src/gtk/completion_info_data.c:231 msgid "" "NUM\n" "The number of the data" msgstr "" "NUM\n" "データの個数" #: src/gtk/completion_info_data.c:232 msgid "" "PATH_OBJ\n" "The identification number of the path object" msgstr "" "PATH_OBJ\n" "path オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:233 msgid "" "PI\n" "Pi" msgstr "" "PI\n" "円周率" #: src/gtk/completion_info_data.c:234 msgid "" "RECT_OBJ\n" "The identification number of the rectangle object" msgstr "" "RECT_OBJ\n" "rectangle オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:235 msgid "" "RSTEP\n" "Number of lines specified as \"Read step\"" msgstr "" "RSTEP\n" "「読込ステップ行」に指定された行数" #: src/gtk/completion_info_data.c:236 msgid "" "STDEVPX\n" "The standard deviation of X" msgstr "" "STDEVPX\n" "(X) column の生データの標準偏差" #: src/gtk/completion_info_data.c:237 msgid "" "STDEVPY\n" "The standard deviation of Y" msgstr "" "STDEVPY\n" "(Y) column の生データの標準偏差" #: src/gtk/completion_info_data.c:238 msgid "" "STDEVX\n" "The corrected sample standard deviation of X" msgstr "" "STDEVX\n" "(X) column の生データの不偏標準偏差" #: src/gtk/completion_info_data.c:239 msgid "" "STDEVY\n" "The corrected sample standard deviation of Y" msgstr "" "STDEVY\n" "(Y) column の生データの不偏標準偏差" #: src/gtk/completion_info_data.c:240 msgid "" "SUMX\n" "Sum of X" msgstr "" "SUMX\n" "(X) column の生データの和" #: src/gtk/completion_info_data.c:241 msgid "" "SUMXX\n" "Square sum of X" msgstr "" "SUMXX\n" "(X) column の生データの二乗和" #: src/gtk/completion_info_data.c:242 msgid "" "SUMXY\n" "Product sum of X and Y" msgstr "" "SUMXY\n" "(X) column, (Y) column の生データの積和" #: src/gtk/completion_info_data.c:243 msgid "" "SUMY\n" "Sum of Y" msgstr "" "SUMY\n" "(Y) column の生データの和" #: src/gtk/completion_info_data.c:244 msgid "" "SUMYY\n" "Square sum of Y" msgstr "" "SUMYY\n" "(Y) column の生データの二乗和" #: src/gtk/completion_info_data.c:245 msgid "" "TEXT_OBJ\n" "The identification number of the text object" msgstr "" "TEXT_OBJ\n" "text オブジェクトのオブジェクト識別番号" #: src/gtk/completion_info_data.c:246 msgid "" "TRUE\n" "the TRUE value (1)" msgstr "" "TRUE\n" "代表的な真の値 (1)" #: src/gtk/completion_info_data.c:247 msgid "" "UNDEF\n" "Missing data without error indication" msgstr "" "UNDEF\n" "欠損データエラー非表示" #: src/gtk/data/gtk/menus-common.ui.in:5 #: src/gtk/data/gtk/menus-common-win.ui.in:5 src/gtk/data/gtk/menus-common.ui:5 msgid "_Graph" msgstr "グラフ(_G)" #: src/gtk/data/gtk/menus-common.ui.in:8 #: src/gtk/data/gtk/menus-common-win.ui.in:8 src/gtk/data/gtk/menus-common.ui:8 msgid "_New graph" msgstr "新規作成(_N)" #: src/gtk/data/gtk/menus-common.ui.in:25 #: src/gtk/data/gtk/menus-common-win.ui.in:25 #: src/gtk/data/gtk/menus-common.ui:25 msgid "_All clear" msgstr "全てクリア(_A)" #: src/gtk/data/gtk/menus-common.ui.in:43 #: src/gtk/data/gtk/menus-common.ui.in:689 #: src/gtk/data/gtk/menus-common-win.ui.in:43 #: src/gtk/data/gtk/menus-common-win.ui.in:697 #: src/gtk/data/gtk/menus-common.ui:43 src/gtk/data/gtk/menus-common.ui:689 msgid "Save _As" msgstr "名前をつけて保存(_A)" #: src/gtk/data/gtk/menus-common.ui.in:50 #: src/gtk/data/gtk/menus-common.ui.in:695 #: src/gtk/data/gtk/menus-common-win.ui.in:50 #: src/gtk/data/gtk/menus-common-win.ui.in:703 #: src/gtk/data/gtk/menus-common.ui:50 src/gtk/data/gtk/menus-common.ui:695 msgid "_Export image" msgstr "画像にエクスポート(_E)" #: src/gtk/data/gtk/menus-common.ui.in:52 #: src/gtk/data/gtk/menus-common.ui.in:697 #: src/gtk/data/gtk/menus-common-win.ui.in:52 #: src/gtk/data/gtk/menus-common-win.ui.in:705 #: src/gtk/data/gtk/menus-common.ui:52 src/gtk/data/gtk/menus-common.ui:697 msgid "_GRA file" msgstr "_GRA ファイル" #: src/gtk/data/gtk/menus-common.ui.in:56 #: src/gtk/data/gtk/menus-common.ui.in:701 #: src/gtk/data/gtk/menus-common-win.ui.in:56 #: src/gtk/data/gtk/menus-common-win.ui.in:709 #: src/gtk/data/gtk/menus-common.ui:56 src/gtk/data/gtk/menus-common.ui:701 msgid "_PS file" msgstr "_PS ファイル" #: src/gtk/data/gtk/menus-common.ui.in:60 #: src/gtk/data/gtk/menus-common.ui.in:705 #: src/gtk/data/gtk/menus-common-win.ui.in:60 #: src/gtk/data/gtk/menus-common-win.ui.in:713 #: src/gtk/data/gtk/menus-common.ui:60 src/gtk/data/gtk/menus-common.ui:705 msgid "_EPS file" msgstr "_EPS ファイル" #: src/gtk/data/gtk/menus-common.ui.in:64 #: src/gtk/data/gtk/menus-common.ui.in:709 #: src/gtk/data/gtk/menus-common-win.ui.in:64 #: src/gtk/data/gtk/menus-common-win.ui.in:717 #: src/gtk/data/gtk/menus-common.ui:64 src/gtk/data/gtk/menus-common.ui:709 msgid "P_DF file" msgstr "P_DF ファイル" #: src/gtk/data/gtk/menus-common.ui.in:68 #: src/gtk/data/gtk/menus-common.ui.in:713 #: src/gtk/data/gtk/menus-common-win.ui.in:68 #: src/gtk/data/gtk/menus-common-win.ui.in:721 #: src/gtk/data/gtk/menus-common.ui:68 src/gtk/data/gtk/menus-common.ui:713 msgid "_SVG file" msgstr "_SVG ファイル" #: src/gtk/data/gtk/menus-common.ui.in:72 #: src/gtk/data/gtk/menus-common.ui.in:717 #: src/gtk/data/gtk/menus-common-win.ui.in:72 #: src/gtk/data/gtk/menus-common-win.ui.in:725 #: src/gtk/data/gtk/menus-common.ui:72 src/gtk/data/gtk/menus-common.ui:717 msgid "P_NG file" msgstr "P_NG ファイル" #: src/gtk/data/gtk/menus-common.ui.in:85 #: src/gtk/data/gtk/menus-common-win.ui.in:93 #: src/gtk/data/gtk/menus-common.ui:85 msgid "Page Set_up" msgstr "ページの設定(_U)" #: src/gtk/data/gtk/menus-common.ui.in:89 #: src/gtk/data/gtk/menus-common-win.ui.in:97 #: src/gtk/data/gtk/menus-common.ui:89 msgid "Pre_view" msgstr "印刷プレビュー(_V)" #: src/gtk/data/gtk/menus-common.ui.in:100 #: src/gtk/data/gtk/menus-common-win.ui.in:108 #: src/gtk/data/gtk/menus-common.ui:100 msgid "_Current directory" msgstr "現在のディレクトリ(_C)" #: src/gtk/data/gtk/menus-common.ui.in:106 #: src/gtk/data/gtk/menus-common-win.ui.in:114 #: src/gtk/data/gtk/menus-common.ui:106 msgid "_Ngraph shell" msgstr "Ngraphシェル(_N)" #: src/gtk/data/gtk/menus-common.ui.in:112 #: src/gtk/data/gtk/menus-common-win.ui.in:120 #: src/gtk/data/gtk/menus-common.ui:112 msgid "_Quit" msgstr "終了(_Q)" #: src/gtk/data/gtk/menus-common.ui.in:134 #: src/gtk/data/gtk/menus-common.ui.in:572 #: src/gtk/data/gtk/menus-common-win.ui.in:142 #: src/gtk/data/gtk/menus-common-win.ui.in:580 #: src/gtk/data/gtk/menus-common.ui:134 src/gtk/data/gtk/menus-common.ui:572 msgid "Cu_t" msgstr "切り取り(_T)" #: src/gtk/data/gtk/menus-common.ui.in:144 #: src/gtk/data/gtk/menus-common.ui.in:580 #: src/gtk/data/gtk/menus-common-win.ui.in:152 #: src/gtk/data/gtk/menus-common-win.ui.in:588 #: src/gtk/data/gtk/menus-common.ui:144 src/gtk/data/gtk/menus-common.ui:580 msgid "_Paste" msgstr "貼り付け(_P)" #: src/gtk/data/gtk/menus-common.ui.in:166 #: src/gtk/data/gtk/menus-common-win.ui.in:174 #: src/gtk/data/gtk/menus-common.ui:166 msgid "draw _Order" msgstr "描画順(_O)" #: src/gtk/data/gtk/menus-common.ui.in:189 #: src/gtk/data/gtk/menus-common.ui.in:600 #: src/gtk/data/gtk/menus-common-win.ui.in:197 #: src/gtk/data/gtk/menus-common-win.ui.in:608 #: src/gtk/data/gtk/menus-common.ui:189 src/gtk/data/gtk/menus-common.ui:600 msgid "_Align" msgstr "位置合わせ(_A)" #: src/gtk/data/gtk/menus-common.ui.in:192 #: src/gtk/data/gtk/menus-common.ui.in:603 #: src/gtk/data/gtk/menus-common-win.ui.in:200 #: src/gtk/data/gtk/menus-common-win.ui.in:611 #: src/gtk/data/gtk/menus-common.ui:192 src/gtk/data/gtk/menus-common.ui:603 msgid "Align _Left" msgstr "左揃え(_L)" #: src/gtk/data/gtk/menus-common.ui.in:196 #: src/gtk/data/gtk/menus-common.ui.in:607 #: src/gtk/data/gtk/menus-common-win.ui.in:204 #: src/gtk/data/gtk/menus-common-win.ui.in:615 #: src/gtk/data/gtk/menus-common.ui:196 src/gtk/data/gtk/menus-common.ui:607 msgid "Align _Horizontal Center" msgstr "横中央揃え(_H)" #: src/gtk/data/gtk/menus-common.ui.in:200 #: src/gtk/data/gtk/menus-common.ui.in:611 #: src/gtk/data/gtk/menus-common-win.ui.in:208 #: src/gtk/data/gtk/menus-common-win.ui.in:619 #: src/gtk/data/gtk/menus-common.ui:200 src/gtk/data/gtk/menus-common.ui:611 msgid "Align _Right" msgstr "右揃え(_R)" #: src/gtk/data/gtk/menus-common.ui.in:206 #: src/gtk/data/gtk/menus-common.ui.in:617 #: src/gtk/data/gtk/menus-common-win.ui.in:214 #: src/gtk/data/gtk/menus-common-win.ui.in:625 #: src/gtk/data/gtk/menus-common.ui:206 src/gtk/data/gtk/menus-common.ui:617 msgid "Align _Top" msgstr "上端揃え(_T)" #: src/gtk/data/gtk/menus-common.ui.in:210 #: src/gtk/data/gtk/menus-common.ui.in:621 #: src/gtk/data/gtk/menus-common-win.ui.in:218 #: src/gtk/data/gtk/menus-common-win.ui.in:629 #: src/gtk/data/gtk/menus-common.ui:210 src/gtk/data/gtk/menus-common.ui:621 msgid "Align _Vertical Center" msgstr "縦中央揃え(_V)" #: src/gtk/data/gtk/menus-common.ui.in:214 #: src/gtk/data/gtk/menus-common.ui.in:625 #: src/gtk/data/gtk/menus-common-win.ui.in:222 #: src/gtk/data/gtk/menus-common-win.ui.in:633 #: src/gtk/data/gtk/menus-common.ui:214 src/gtk/data/gtk/menus-common.ui:625 msgid "Align _Bottom" msgstr "下端揃え(_B)" #: src/gtk/data/gtk/menus-common.ui.in:220 #: src/gtk/data/gtk/menus-common.ui.in:634 #: src/gtk/data/gtk/menus-common-win.ui.in:228 #: src/gtk/data/gtk/menus-common-win.ui.in:642 #: src/gtk/data/gtk/menus-common.ui:220 src/gtk/data/gtk/menus-common.ui:634 msgid "rotate _90 degree clockwise" msgstr "_90° 時計回り回転" #: src/gtk/data/gtk/menus-common.ui.in:224 #: src/gtk/data/gtk/menus-common.ui.in:638 #: src/gtk/data/gtk/menus-common-win.ui.in:232 #: src/gtk/data/gtk/menus-common-win.ui.in:646 #: src/gtk/data/gtk/menus-common.ui:224 src/gtk/data/gtk/menus-common.ui:638 msgid "rotate 9_0 degree counter-clockwise" msgstr "9_0° 反時計回り回転" #: src/gtk/data/gtk/menus-common.ui.in:228 #: src/gtk/data/gtk/menus-common.ui.in:647 #: src/gtk/data/gtk/menus-common-win.ui.in:236 #: src/gtk/data/gtk/menus-common-win.ui.in:655 #: src/gtk/data/gtk/menus-common.ui:228 src/gtk/data/gtk/menus-common.ui:647 msgid "flip _Horizontally" msgstr "水平反転(_H)" #: src/gtk/data/gtk/menus-common.ui.in:232 #: src/gtk/data/gtk/menus-common.ui.in:651 #: src/gtk/data/gtk/menus-common-win.ui.in:240 #: src/gtk/data/gtk/menus-common-win.ui.in:659 #: src/gtk/data/gtk/menus-common.ui:232 src/gtk/data/gtk/menus-common.ui:651 msgid "flip _Vertically" msgstr "垂直反転(_V)" #: src/gtk/data/gtk/menus-common.ui.in:238 #: src/gtk/data/gtk/menus-common-win.ui.in:246 #: src/gtk/data/gtk/menus-common.ui:238 msgid "_View" msgstr "表示(_V)" #: src/gtk/data/gtk/menus-common.ui.in:248 #: src/gtk/data/gtk/menus-common-win.ui.in:256 #: src/gtk/data/gtk/menus-common.ui:248 msgid "_Clear information view" msgstr "Information 表示をクリア(_C)" #: src/gtk/data/gtk/menus-common.ui.in:254 #: src/gtk/data/gtk/menus-common-win.ui.in:262 #: src/gtk/data/gtk/menus-common.ui:254 msgid "_Sidebar" msgstr "サイドバー(_S)" #: src/gtk/data/gtk/menus-common.ui.in:258 #: src/gtk/data/gtk/menus-common-win.ui.in:266 #: src/gtk/data/gtk/menus-common.ui:258 msgid "_Statusbar" msgstr "ステータスバー(_S)" #: src/gtk/data/gtk/menus-common.ui.in:262 #: src/gtk/data/gtk/menus-common-win.ui.in:270 #: src/gtk/data/gtk/menus-common.ui:262 msgid "_Ruler" msgstr "ルーラー(_R)" #: src/gtk/data/gtk/menus-common.ui.in:266 #: src/gtk/data/gtk/menus-common-win.ui.in:274 #: src/gtk/data/gtk/menus-common.ui:266 msgid "_Scrollbar" msgstr "スクロールバー(_S)" #: src/gtk/data/gtk/menus-common.ui.in:270 #: src/gtk/data/gtk/menus-common-win.ui.in:278 #: src/gtk/data/gtk/menus-common.ui:270 msgid "_Command toolbar" msgstr "コマンドツールバー(_C)" #: src/gtk/data/gtk/menus-common.ui.in:274 #: src/gtk/data/gtk/menus-common-win.ui.in:282 #: src/gtk/data/gtk/menus-common.ui:274 msgid "_Toolbox" msgstr "ツールボックス(_T)" #: src/gtk/data/gtk/menus-common.ui.in:278 #: src/gtk/data/gtk/menus-common.ui.in:677 #: src/gtk/data/gtk/menus-common-win.ui.in:286 #: src/gtk/data/gtk/menus-common-win.ui.in:685 #: src/gtk/data/gtk/menus-common.ui:278 src/gtk/data/gtk/menus-common.ui:677 msgid "cross _Gauge" msgstr "クロスゲージ(_G)" #: src/gtk/data/gtk/menus-common.ui.in:289 #: src/gtk/data/gtk/menus-common-win.ui.in:297 #: src/gtk/data/gtk/menus-common.ui:289 msgid "_Object" msgstr "オブジェクト(_O)" #: src/gtk/data/gtk/menus-common.ui.in:323 #: src/gtk/data/gtk/menus-common.ui.in:724 #: src/gtk/data/gtk/menus-common-win.ui.in:331 #: src/gtk/data/gtk/menus-common-win.ui.in:740 #: src/gtk/data/gtk/menus-common.ui:323 src/gtk/data/gtk/menus-common.ui:724 msgid "_Save data" msgstr "データの保存(_S)" #: src/gtk/data/gtk/menus-common.ui.in:333 #: src/gtk/data/gtk/menus-common-win.ui.in:341 #: src/gtk/data/gtk/menus-common.ui:333 msgid "_Axis" msgstr "軸(_A)" #: src/gtk/data/gtk/menus-common.ui.in:365 #: src/gtk/data/gtk/menus-common-win.ui.in:373 #: src/gtk/data/gtk/menus-common.ui:365 msgid "Scale _Zoom" msgstr "スケールズーム(_Z)" #: src/gtk/data/gtk/menus-common.ui.in:397 #: src/gtk/data/gtk/menus-common-win.ui.in:405 #: src/gtk/data/gtk/menus-common.ui:397 msgid "_Path" msgstr "パス(_P)" #: src/gtk/data/gtk/menus-common.ui.in:410 #: src/gtk/data/gtk/menus-common-win.ui.in:418 #: src/gtk/data/gtk/menus-common.ui:410 msgid "_Rectangle" msgstr "矩形(_R)" #: src/gtk/data/gtk/menus-common.ui.in:423 #: src/gtk/data/gtk/menus-common-win.ui.in:431 #: src/gtk/data/gtk/menus-common.ui:423 msgid "_Arc" msgstr "円(_A)" #: src/gtk/data/gtk/menus-common.ui.in:436 #: src/gtk/data/gtk/menus-common-win.ui.in:444 #: src/gtk/data/gtk/menus-common.ui:436 msgid "_Mark" msgstr "マーク(_M)" #: src/gtk/data/gtk/menus-common.ui.in:449 #: src/gtk/data/gtk/menus-common-win.ui.in:457 #: src/gtk/data/gtk/menus-common.ui:449 msgid "_Text" msgstr "テキスト(_T)" #: src/gtk/data/gtk/menus-common.ui.in:462 #: src/gtk/data/gtk/menus-common-win.ui.in:470 #: src/gtk/data/gtk/menus-common.ui:462 msgid "_Merge" msgstr "合成(_M)" #: src/gtk/data/gtk/menus-common.ui.in:479 #: src/gtk/data/gtk/menus-common-win.ui.in:487 #: src/gtk/data/gtk/menus-common.ui:479 msgid "_Parameter" msgstr "パラメータ(_P)" #: src/gtk/data/gtk/menus-common.ui.in:498 #: src/gtk/data/gtk/menus-common-win.ui.in:506 #: src/gtk/data/gtk/menus-common.ui:498 msgid "_Preference" msgstr "設定(_P)" #: src/gtk/data/gtk/menus-common.ui.in:505 #: src/gtk/data/gtk/menus-common-win.ui.in:513 #: src/gtk/data/gtk/menus-common.ui:505 msgid "_External viewer" msgstr "外部ビューア(_E)" #: src/gtk/data/gtk/menus-common.ui.in:513 #: src/gtk/data/gtk/menus-common-win.ui.in:521 #: src/gtk/data/gtk/menus-common.ui:513 msgid "_Add-in script" msgstr "アドイン設定(_A)" #: src/gtk/data/gtk/menus-common.ui.in:523 #: src/gtk/data/gtk/menus-common-win.ui.in:531 #: src/gtk/data/gtk/menus-common.ui:523 msgid "save as default (_Settings)" msgstr "初期状態としてセーブ(各種設定)(_S)" #: src/gtk/data/gtk/menus-common.ui.in:527 #: src/gtk/data/gtk/menus-common-win.ui.in:535 #: src/gtk/data/gtk/menus-common.ui:527 msgid "save as default (_Graph)" msgstr "初期状態としてセーブ(グラフ)(_G)" #: src/gtk/data/gtk/menus-common.ui.in:533 #: src/gtk/data/gtk/menus-common-win.ui.in:541 #: src/gtk/data/gtk/menus-common.ui:533 msgid "_Data file default" msgstr "データファイル初期状態(_D)" #: src/gtk/data/gtk/menus-common.ui.in:537 #: src/gtk/data/gtk/menus-common-win.ui.in:545 #: src/gtk/data/gtk/menus-common.ui:537 msgid "_Legend text default" msgstr "レジェンドテキスト初期状態(_T)" #: src/gtk/data/gtk/menus-common.ui.in:541 #: src/gtk/data/gtk/menus-common-win.ui.in:549 #: src/gtk/data/gtk/menus-common.ui:541 msgid "_Axis grid default" msgstr "軸グリッド初期状態(_A)" #: src/gtk/data/gtk/menus-common.ui.in:547 #: src/gtk/data/gtk/menus-common.ui.in:550 #: src/gtk/data/gtk/menus-common-win.ui.in:555 #: src/gtk/data/gtk/menus-common-win.ui.in:558 #: src/gtk/data/gtk/menus-common.ui:547 src/gtk/data/gtk/menus-common.ui:550 msgid "_Help" msgstr "ヘルプ(_H)" #: src/gtk/data/gtk/menus-common.ui.in:555 #: src/gtk/data/gtk/menus-common-win.ui.in:563 #: src/gtk/data/gtk/menus-common.ui:555 msgid "_Keyboard shortcus" msgstr "キーボードショートカット(_K)" #: src/gtk/data/gtk/menus-common.ui.in:559 #: src/gtk/data/gtk/menus-common-win.ui.in:567 #: src/gtk/data/gtk/menus-common.ui:559 msgid "_Demonstration" msgstr "デモ(_D)" #: src/gtk/data/gtk/menus-common.ui.in:563 #: src/gtk/data/gtk/menus-common-win.ui.in:571 #: src/gtk/data/gtk/menus-common.ui:563 msgid "_About" msgstr "このアプリケーションについて(_A)" #: src/gtk/data/gtk/menus-common.ui.in:631 #: src/gtk/data/gtk/menus-common-win.ui.in:639 #: src/gtk/data/gtk/menus-common.ui:631 msgid "_Rotate" msgstr "回転(_R)" #: src/gtk/data/gtk/menus-common.ui.in:644 #: src/gtk/data/gtk/menus-common-win.ui.in:652 #: src/gtk/data/gtk/menus-common.ui:644 msgid "_Flip" msgstr "反転(_F)" #: src/gtk/data/gtk/menus-common-win.ui.in:76 #: src/gtk/data/gtk/menus-common-win.ui.in:729 msgid "E_MF file" msgstr "E_MF ファイル" #: src/gtk/data/gtk/menus-common-win.ui.in:80 #: src/gtk/data/gtk/menus-common-win.ui.in:733 msgid "_Clipboard (EMF)" msgstr "クリップボード (EMF) (_C) " #: src/gtk/data/gtk/menus-tool.ui:23 src/odraw.c:66 msgid "miter" msgstr "角結合" #: src/gtk/data/gtk/menus-tool.ui:28 src/odraw.c:67 msgid "round" msgstr "丸結合" #: src/gtk/data/gtk/menus-tool.ui:33 src/odraw.c:68 msgid "bevel" msgstr "斜結合" #: src/gtk/data/gtk/menus-tool.ui:47 src/gtk/data/gtk/menus-tool.ui:76 #: src/odraw.c:89 src/odata.c:253 msgid "arrow" msgstr "矢印" #: src/gtk/data/gtk/menus-tool.ui:52 src/gtk/data/gtk/menus-tool.ui:81 #: src/odraw.c:90 msgid "wave" msgstr "波型" #: src/gtk/data/gtk/menus-tool.ui:57 src/gtk/data/gtk/menus-tool.ui:86 #: src/odraw.c:91 src/odata.c:247 msgid "mark" msgstr "マーク" #: src/gtk/data/gtk/menus-tool.ui:62 src/gtk/data/gtk/menus-tool.ui:91 #: src/odraw.c:92 msgid "bar" msgstr "棒" #: src/gtk/data/gtk/help-overlay.ui:18 msgid "Load a graph (NGP file)" msgstr "グラフ(NGPファイル)を開く" #: src/gtk/data/gtk/help-overlay.ui:25 msgid "Save the graph" msgstr "グラフの保存" #: src/gtk/data/gtk/help-overlay.ui:32 msgid "Save the graph with a new filename" msgstr "グラフに名前をつけて保存" #: src/gtk/data/gtk/help-overlay.ui:39 msgid "Print the graph" msgstr "グラフを印刷" #: src/gtk/data/gtk/help-overlay.ui:46 msgid "Add data file" msgstr "データファイルの追加" #: src/gtk/data/gtk/help-overlay.ui:67 msgid "Show cross gauge" msgstr "クロスゲージを表示" #: src/gtk/data/gtk/help-overlay.ui:74 msgid "Quit the application" msgstr "アプリケーションの終了" #: src/gtk/data/gtk/help-overlay.ui:87 msgid "Undo previous command" msgstr "直前の操作を取り消す" #: src/gtk/data/gtk/help-overlay.ui:94 msgid "Redo previous command" msgstr "直前に取り消した操作をやり直す" #: src/gtk/data/gtk/help-overlay.ui:101 msgid "Cut selected object to clipboard" msgstr "選択したオブジェクトをクリップボードにカット" #: src/gtk/data/gtk/help-overlay.ui:108 msgid "Copy selected object to clipboard" msgstr "選択したオブジェクトをクリップボードにコピー" #: src/gtk/data/gtk/help-overlay.ui:115 msgid "Paste object from clipboard" msgstr "クリップボードのオブジェクトを貼り付け" #: src/gtk/data/gtk/help-overlay.ui:122 msgid "Delete the selected object" msgstr "選択したオブジェクトの削除" #: src/gtk/data/gtk/help-overlay.ui:129 msgid "Duplicate the selected object" msgstr "選択したオブジェクトを複製" #: src/gtk/data/gtk/help-overlay.ui:136 msgid "Rise selection to top" msgstr "最前面に移動" #: src/gtk/data/gtk/help-overlay.ui:143 msgid "Lower selection to bottom" msgstr "最背面に移動" #: src/gtk/data/gtk/help-overlay.ui:156 msgid "Show the help document" msgstr "ヘルプの表示" #: src/gtk/data/gtk/help-overlay.ui:163 msgid "Show shortcut keys" msgstr "キーボードショートカットの表示" #. used for the application menu on MacOS. %s is replaced with the application name. #: src/gtk/data/gtk/menus-appmenu.ui:7 #, c-format msgid "About %s" msgstr "%sについて" #. used for the application menu on MacOS #: src/gtk/data/gtk/menus-appmenu.ui:23 msgid "Services" msgstr "サービス" #. used for the application menu on MacOS. %s is replaced with the application name. #: src/gtk/data/gtk/menus-appmenu.ui:30 #, c-format msgid "Hide %s" msgstr "%s を非表示" #. used for the application menu on MacOS #: src/gtk/data/gtk/menus-appmenu.ui:36 msgid "Hide Others" msgstr "他のウィンドウを隠す" #. used for the application menu on MacOS #: src/gtk/data/gtk/menus-appmenu.ui:42 msgid "Show All" msgstr "全て表示" #. used for the application menu on MacOS. %s is replaced with the application name. #: src/gtk/data/gtk/menus-appmenu.ui:50 #, c-format msgid "Quit %s" msgstr "%s を終了" #: src/math/math_error.c:13 msgid "syntax error, unexpected end of equation." msgstr "構文エラー, 予期しない数式の終了." #: src/math/math_error.c:14 msgid "syntax error, function definition cannot be nested." msgstr "構文エラー, 関数定義はネストできません." #: src/math/math_error.c:15 msgid "syntax error, unexpected operator." msgstr "構文エラー, 予期しない演算子です." #: src/math/math_error.c:16 msgid "syntax error, unexpected token." msgstr "構文エラー, 予期しないトークンです." #: src/math/math_error.c:17 msgid "syntax error, wrong number of arguments." msgstr "構文エラー, 引数の数が間違っています." #: src/math/math_error.c:18 msgid "syntax error, unexpected end of equation, expecting ')'." msgstr "構文エラー, 予期しない数式の終わりです. ')' がありません." #: src/math/math_error.c:19 msgid "syntax error, unexpected end of equation, expecting '}'." msgstr "構文エラー, 予期しない数式の終わりです. '}' がありません." #: src/math/math_error.c:20 msgid "syntax error, unexpected end of equation, expecting ']'." msgstr "構文エラー, 予期しない数式の終わりです. ']' がありません." #: src/math/math_error.c:21 msgid "syntax error, invalid function definition." msgstr "構文エラー, 不正な関数定義です." #: src/math/math_error.c:22 msgid "syntax error, invalid argument." msgstr "構文エラー, 不正な引数です." #: src/math/math_error.c:23 msgid "syntax error, constant cannot be defined in a function definition." msgstr "構文エラー, 関数定義内で定数の宣言は出来ません." #: src/math/math_error.c:24 msgid "error, invalid parameter." msgstr "数式エラー, 不正なパラメータです." #: src/math/math_error.c:25 msgid "" "error, a parameter cannot be used in a user function or a constant " "definition." msgstr "数式エラー, パラメータはユーザー関数中や定数宣言では使用できません." #: src/math/math_error.c:26 msgid "error, unknown function." msgstr "数式エラー, 未定義の関数です." #: src/math/math_error.c:27 msgid "error, cannot allocate enough memory." msgstr "エラー, 十分なメモリーを確保できませんでした." #: src/math/math_error.c:28 msgid "error, unknown error." msgstr "数式エラー, 未知のエラーです." #: src/math/math_error.c:29 msgid "" "error, the function cannot be used in a user function or a constant " "definition." msgstr "数式エラー, この関数はユーザー関数中や定数宣言では使用できません." #: src/math/math_error.c:30 msgid "error, the constant is already defined." msgstr "数式エラー, この定数は既に存在します." #: src/math/math_error.c:31 msgid "error, calculation error." msgstr "エラー, 計算エラー." #: src/math/math_error.c:32 msgid "syntax error, unterminated string." msgstr "構文エラー, 終端のない文字列です." #: src/math/math_error.c:93 src/math/math_error.c:104 src/math/math_error.c:129 #: src/math/math_error.c:140 src/math/math_error.c:151 #: src/math/math_error.c:162 src/math/math_error.c:173 #: src/math/math_error.c:184 src/math/math_error.c:195 #: src/math/math_error.c:206 src/math/math_error.c:217 #: src/math/math_error.c:228 #, c-format msgid "" "%s (%d:%d)\n" " the error is found at: %s" msgstr "" "%s (%d:%d)\n" " エラーの起きた場所: %s" #: src/nstring.c:40 msgid "locale" msgstr "ロケール" #: src/nstring.c:41 src/ogra.c:57 msgid "period" msgstr "ピリオド" #: src/nstring.c:42 src/ogra.c:58 msgid "comma" msgstr "コンマ" #: src/odraw.c:60 msgid "relative" msgstr "相対パス" #: src/odraw.c:81 msgid "end" msgstr "終点" #: src/odraw.c:82 msgid "begin" msgstr "始点" #: src/odraw.c:83 src/oaxis.c:78 msgid "both" msgstr "両方" #: src/odraw.c:97 msgid "spline" msgstr "スプライン" #: src/odraw.c:98 msgid "spline_close" msgstr "閉スプライン" #: src/odraw.c:99 msgid "bspline" msgstr "Bスプライン" #: src/odraw.c:100 msgid "bspline_close" msgstr "閉Bスプライン" #: src/oagrid.c:36 msgid "axisgrid" msgstr "グリッド" #: src/oarc.c:38 msgid "arc" msgstr "円" #: src/oaxis.c:69 msgid "linear" msgstr "線形" #: src/oaxis.c:70 src/ofit.c:89 msgid "log" msgstr "対数" #: src/oaxis.c:71 msgid "inverse" msgstr "逆数" #: src/oaxis.c:72 msgid "MJD" msgstr "MJD" #: src/oaxis.c:80 src/oaxis.c:94 src/oaxis.c:107 msgid "right" msgstr "右" #: src/oaxis.c:105 msgid "center" msgstr "中央" #: src/oaxis.c:108 msgid "point" msgstr "小数点" #: src/oaxis.c:121 msgid "regular" msgstr "通常表示" #: src/oaxis.c:122 msgid "no_zero" msgstr "ゼロ非表示" #: src/oaxis.c:123 msgid "no_floating_point" msgstr "整数表示" #: src/oaxis.c:137 msgid "horizontal" msgstr "水平" #: src/oaxis.c:138 msgid "parallel1" msgstr "軸と平行1" #: src/oaxis.c:139 msgid "parallel2" msgstr "軸と平行2" #: src/oaxis.c:140 msgid "normal1" msgstr "軸と直交1" #: src/oaxis.c:141 msgid "normal2" msgstr "軸と直交2" #: src/oaxis.c:142 msgid "oblique1" msgstr "軸と斜交1" #: src/oaxis.c:143 msgid "oblique2" msgstr "軸と斜交2" #: src/ofit.c:86 msgid "poly" msgstr "多項式" #: src/ofit.c:87 msgid "pow" msgstr "べき関数" #: src/ofit.c:88 msgid "exp" msgstr "指数関数" #: src/ofit.c:90 msgid "user" msgstr "ユーザ定義" #: src/odata.c:161 msgid "data" msgstr "データ" #: src/odata.c:235 msgid "range" msgstr "範囲" #: src/odata.c:240 msgid "simple" msgstr "単純移動平均" #: src/odata.c:241 msgid "weighted" msgstr "加重移動平均" #: src/odata.c:242 msgid "exponential" msgstr "指数移動平均" #: src/odata.c:249 msgid "polygon" msgstr "多角形" #: src/odata.c:250 msgid "polygon_solid_fill" msgstr "実多角形" #: src/odata.c:251 src/opath.c:82 msgid "curve" msgstr "曲線" #: src/odata.c:252 msgid "diagonal" msgstr "対角線" #: src/odata.c:254 msgid "rectangle" msgstr "矩形" #: src/odata.c:255 msgid "rectangle_fill" msgstr "塗りつぶし矩形" #: src/odata.c:256 msgid "rectangle_solid_fill" msgstr "実矩形" #: src/odata.c:257 msgid "errorbar_x" msgstr "横誤差棒" #: src/odata.c:258 msgid "errorbar_y" msgstr "縦誤差棒" #: src/odata.c:259 msgid "staircase_x" msgstr "縦階段" #: src/odata.c:260 msgid "staircase_y" msgstr "横階段" #: src/odata.c:261 msgid "bar_x" msgstr "空横棒" #: src/odata.c:262 msgid "bar_y" msgstr "空縦棒" #: src/odata.c:263 msgid "bar_fill_x" msgstr "塗りつぶし横棒" #: src/odata.c:264 msgid "bar_fill_y" msgstr "塗りつぶし縦棒" #: src/odata.c:265 msgid "bar_solid_fill_x" msgstr "実横棒" #: src/odata.c:266 msgid "bar_solid_fill_y" msgstr "実縦棒" #: src/ogra.c:487 #, c-format msgid "drawing %s (%.1f%%)" msgstr "%s 描画中 (%.1f%%)" #: src/olegend.c:37 msgid "legend" msgstr "レジェンド" #: src/oparameter.c:36 msgid "SpinButton" msgstr "スピンボタン" #: src/oparameter.c:38 msgid "CheckButton" msgstr "チェックボタン" #: src/oparameter.c:39 msgid "Switch" msgstr "スイッチ" #: src/oparameter.c:40 msgid "ComboBox" msgstr "コンボボックス" #: src/oparameter.c:41 msgid "Transition" msgstr "遷移" #: src/oparameter.c:46 msgid "start" msgstr "開始" #: src/oparameter.c:47 msgid "stop" msgstr "終了" #: src/opath.c:40 msgid "path" msgstr "パス" #: src/opath.c:70 msgid "even_odd_rule" msgstr "偶奇" #: src/opath.c:71 msgid "winding_rule" msgstr "ワインディング" #: src/otext.c:43 msgid "text" msgstr "テキスト" #~ msgid "Letter L (279.40x215.90)" #~ msgstr "レター L (279.40x215.90)" #~ msgid "Legal L (355.60x215.90)" #~ msgstr "リーガル L (355.60x215.90)" #~ msgid "Executive L (266.7x184.2)" #~ msgstr "エグゼクティブ L (266.7x184.2)" #~ msgid "_Dir:" #~ msgstr "ディレクトリ(_D):" #~ msgid "Add range plot" #~ msgstr "範囲プロットの追加" #~ msgid "_Recent files" #~ msgstr "最近使用したファイル(_R)" #~ msgid "Show grid" #~ msgstr "グリッドの表示" #~ msgid "Rise selection one step" #~ msgstr "前面に1段移動" #~ msgid "Lower selection one step" #~ msgstr "背面に1段移動" #~ msgid "Select all objects" #~ msgstr "すべてのオブジェクトを選択" #~ msgid "Create frame graph" #~ msgstr "フレームグラフを作成" #~ msgid "Create cross graph" #~ msgstr "交差グラフを作成" #~ msgid "Clear graph" #~ msgstr "グラフのクリア" #~ msgid "Export as GRA file" #~ msgstr "合成ファイルの保存" #~ msgid "Export as PostScript file" #~ msgstr "PostScript ファイルにエクスポート" #~ msgid "Export as Encapsulate PostScript file" #~ msgstr "EPS ファイルにエクスポート" #~ msgid "Export as Portable Document Format" #~ msgstr "PDF ファイルにエクスポート" #~ msgid "Export as Scalable Vector Graphics file" #~ msgstr "SVG ファイルにエクスポート" #~ msgid "Export as Portable Network Graphics file" #~ msgstr "PNG ファイルにエクスポート" #~ msgid "Export as Windows Enhanced Metafile" #~ msgstr "EMF にエクスポート" #~ msgid "Copy to the clipboard as Windows Enhanced Metafile " #~ msgstr "EMF としてクリップボードにコピー" #~ msgid "_Recent graphs" #~ msgstr "最近使用したグラフ(_R)" #~ msgid "Print preview" #~ msgstr "印刷プレビュー" #~ msgid "_Value:" #~ msgstr "初期値(_V):" #~ msgid "_Active" #~ msgstr "有効(_A)" #~ msgid "_Loop" #~ msgstr "繰り返し(_L)" #~ msgid "Stop" #~ msgstr "停止" #~ msgid "" #~ "draw_text_raw($str, x, y, font, pt, style, dir, space)\n" #~ "Draw the raw string $str at (x, y).\n" #~ "The value font 0, 1 and 2 represent \"Sans-serif\", \"Serif\" and " #~ "\"Monospace\" respectively.\n" #~ "Font size can be specified by pt.\n" #~ "The value style 0, 1, 2 and 3 represent \"normal\", \"bold\", " #~ "\"italic\" and \"bold-italic\" respectively.\n" #~ "Direction and font-spacing are specified by the following arguments." #~ msgstr "" #~ "draw_text_raw($str, x, y, font, pt, style, dir, space)\n" #~ "(x, y) に文字列 $str をそのまま描画する。\n" #~ "font は 0, 1, 2 がそれぞれ \"Sans-serif\", \"Serif\", \"Monospace" #~ "\" に対応する。\n" #~ "pt でフォントサイズを指定できる。\n" #~ "style は 0, 1, 2, 3 がそれぞれ \"normal\", \"bold\", \"italic\", " #~ "\"bold-italic\" に対応する。\n" #~ "続く引数で方向、文字間隔を指定できる。" #~ msgid "driver" #~ msgstr "ドライバ" #~ msgid "print" #~ msgstr "印刷" #~ msgid "External driver" #~ msgstr "外部ドライバ設定" #~ msgid "External driver setup" #~ msgstr "外部ドライバ" #~ msgid "_External Driver" #~ msgstr "外部ドライバ設定(_E)" #~ msgid "External Driver" #~ msgstr "外部ドライバ" #~ msgid "_Driver:" #~ msgstr "ドライバ(_D):" #~ msgid "_Extension:" #~ msgstr "拡張子(_E):" #~ msgid "Please specify driver name." #~ msgstr "ドライバを指定してください." #~ msgid "Driver" #~ msgstr "ドライバ" #~ msgid "External Driver Output" #~ msgstr "外部ドライバ出力" #~ msgid "Spawning external driver." #~ msgstr "外部ドライバに出力中" #~ msgid "" #~ "draw_line(x1, y1, x2, y2)\n" #~ "draw a line form (x1, y1) to (x2, y2)." #~ msgstr "" #~ "draw_line(x1, y1, x2, y2)\n" #~ "(x1, y1) から (x2, y2) に直線を描画する。" #~ msgid "" #~ "string_format($str, value)\n" #~ "Converts the floating-point value value to a string and cset the " #~ "string to $str." #~ msgstr "" #~ "string($str, value)\tConverts the floating-point value value to a " #~ "string and cset the string to $str.\n" #~ msgid "" #~ "rsort(a)\n" #~ "reverse sort elements of array a" #~ msgstr "" #~ "rsort(a)\n" #~ "配列 a を逆順に整列する" #~ msgid "" #~ "sort(a)\n" #~ "sort elements of array a" #~ msgstr "" #~ "sort(a)\n" #~ "配列 a を整列する" #, fuzzy #~ msgid "" #~ "string_append($dest, $src)\n" #~ "preparing" #~ msgstr "-win" #, fuzzy #~ msgid "" #~ "string_column($dest, index)\n" #~ "preparing" #~ msgstr "subete" #, fuzzy #~ msgid "" #~ "string_down($dest, $src)\n" #~ "preparing" #~ msgstr "" #~ "sqr(x)\n" #~ "二乗" #, fuzzy #~ msgid "" #~ "string_float($str)\n" #~ "preparing" #~ msgstr "" #~ "sqr(x)\n" #~ "二乗" #, fuzzy #~ msgid "" #~ "string_format($str, value)\n" #~ "preparing" #~ msgstr "" #~ "frac(x)\n" #~ "x の小数部" #, fuzzy #~ msgid "" #~ "string_length($str)\n" #~ "preparing" #~ msgstr "" #~ "sqr(x)\n" #~ "二乗" #, fuzzy #~ msgid "" #~ "string_reverse($dest, $src)\n" #~ "preparing" #~ msgstr "" #~ "sqr(x)\n" #~ "二乗" #, fuzzy #~ msgid "" #~ "string_strip($dest, $src)\n" #~ "preparing" #~ msgstr "" #~ "sqr(x)\n" #~ "二乗" #, fuzzy #~ msgid "" #~ "string_up($dest, $src)\n" #~ "preparing" #~ msgstr "" #~ "sqr(x)\n" #~ "二乗" #, fuzzy #~ msgid "scale selection" #~ msgstr "マーク選択" #~ msgid "_Geometry" #~ msgstr "ウィンドウのサイズと位置(_G)" #~ msgid "Clear Image" #~ msgstr "クリア" #~ msgid "Clear Viewer Window" #~ msgstr "ビューアのクリア" #~ msgid "Activate Data Window" #~ msgstr "Data Windowをアクティブにする" #~ msgid "Activate Axis Window" #~ msgstr "Axis Windowをアクティブにする" #~ msgid "Activate Legend Window" #~ msgstr "Legend Windowをアクティブにする" #~ msgid "Activate Merge Window" #~ msgstr "Merge Windowをアクティブにする" #~ msgid "Activate Coordinate Window" #~ msgstr "Coordinate Windowをアクティブにする" #~ msgid "Activate Information Window" #~ msgstr "Information Windowをアクティブにする" #~ msgid "Single window mode" #~ msgstr "シングルウィンドウモード" #~ msgid "Toggle single window mode" #~ msgstr "シングルウィンドウモード表示の切り替え" #~ msgid "default _Window config" #~ msgstr "初期状態のウィンドウ配置(_W)" #~ msgid "_Child Geometry" #~ msgstr "子ウィンドウのサイズと位置(_C)" #~ msgid "No zero" #~ msgstr "ゼロ非表示" #~ msgid "marker _Begin" #~ msgstr "始点マーカ(_B)" #~ msgid "marker _End" #~ msgstr "終点マーカ(_E)" #~ msgid "_Mark begin:" #~ msgstr "始点マーク(_M):" #~ msgid "_Mark end:" #~ msgstr "終点マーク(_M):" #~ msgid "Mark type" #~ msgstr "マークタイプ" #~ msgid "Mark begin" #~ msgstr "始点マーク" #~ msgid "Mark end" #~ msgstr "終点マーク" #~ msgid "_Arrow:" #~ msgstr "矢印(_A):" #~ msgid "_Zero display:" #~ msgstr "ゼロ非表示 (_Z):" #~ msgid "Zero display" #~ msgstr "ゼロ非表示" #~ msgid "Math:" #~ msgstr "式:" #~ msgid "%s (%d for %d) '%s()' (%d:%d)" #~ msgstr "%s (%d for %d) '%s()' (%d:%d)" #~ msgid "%s '%s()' (line %d)" #~ msgstr "%s '%s()' (行 %d)" #~ msgid "%s '%s' (line %d)" #~ msgstr "%s '%s' (行 %d)" #~ msgid "" #~ "obj_alpha(id, obj)\n" #~ "Set the A and A2 value to the same value as the instance of obj " #~ "whose ID is id.\n" #~ "obj is one of id.\n" #~ "obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, " #~ "MARK_OBJ or TEXT_OBJ." #~ msgstr "" #~ "obj_alpha(id, obj)\n" #~ "A, A2 値を ID が idobj で指定したオブジェクトと同じ値に" #~ "する。\n" #~ "objDATA_OBJ, PATH_OBJ, ARC_OBJ, " #~ "MARK_OBJ, TEXT_OBJ のいずれか。" #~ msgid "Data new" #~ msgstr "新規作成" #~ msgid "Redo" #~ msgstr "取り消した動作をやり直す" #~ msgid "Undo" #~ msgstr "直前の操作を取り消す" #~ msgid "_Legend" #~ msgstr "レジェンド(_L)" #~ msgid "Pick a Color" #~ msgstr "色の選択" #~ msgid "_Web browser:" #~ msgstr "ウェブ・ブラウザ(_W):" #~ msgid "Check" #~ msgstr "チェック" #~ msgid "loadprm" #~ msgstr "PRM ファイル読込" #~ msgid "_Ignore file path" #~ msgstr "パス情報無視(_I)" #~ msgid "_Function" #~ msgstr "関数(_F)" #~ msgid "Plot %d (Function)" #~ msgstr "プロット %d (関数)" #~ msgid "Data %d" #~ msgstr "データ %d" #~ msgid "_New" #~ msgstr "新規作成(_N)" #~ msgid "_QUIT" #~ msgstr "終了(_Q) " #~ msgid "_Left" #~ msgstr "左揃え(_L)" #~ msgid "_Clear Image" #~ msgstr "クリア(_C) " #~ msgid "_Fit" #~ msgstr "フィット(_F)" #~ msgid "Stroke color" #~ msgstr "ストローク色" #~ msgid "Fill color" #~ msgstr "塗りつぶし色" #~ msgid "%s%stype:%-2d" #~ msgstr "%s%sタイプ:%-2d" #~ msgid "type:%-2d" #~ msgstr "タイプ:%-2d" #~ msgid "points:%-3d %s%s%s%s" #~ msgstr "点:%-3d %s%s%s%s" #~ msgid "style:" #~ msgstr "線種:" #~ msgid "arrow:" #~ msgstr "矢印:" #~ msgid "fill" #~ msgstr "塗りつぶし" #~ msgid "w:%.2f h:%.2f%s%s%s" #~ msgstr "幅:%.2f 高さ:%.2f%s%s%s" #~ msgid " style:" #~ msgstr " 線種:" #~ msgid " fill" #~ msgstr " 塗りつぶし" #~ msgid "lw/size" #~ msgstr "線幅/サイズ" #~ msgid "_Addin:" #~ msgstr "アドイン(_A)" #~ msgid "Data open" #~ msgstr "データを開く" #~ msgid "Merge open" #~ msgstr "合成ファイルを開く" #~ msgid "Open Data" #~ msgstr "データファイルを開く" #~ msgid "_Save file history" #~ msgstr "終了時にファイル履歴を保存(_S)" #~ msgid "Data Window" #~ msgstr "新規作成" #, fuzzy #~ msgid "Axis Window" #~ msgstr "Axis Windowをアクティブにする" #, fuzzy #~ msgid "Legend Window" #~ msgstr "Legend Windowをアクティブにする" #, fuzzy #~ msgid "Merge Window" #~ msgstr "Merge Windowをアクティブにする" #, fuzzy #~ msgid "Coordinate Window" #~ msgstr "_Coordinate window:" #~ msgid "Merge" #~ msgstr "合成" #~ msgid "Coordinate" #~ msgstr "座標" #~ msgid "Information" #~ msgstr "情報" #~ msgid "Load" #~ msgstr "NGPファイル読込" #~ msgid "Clear" #~ msgstr "スケールクリア" #~ msgid "Math" #~ msgstr "変換式" #~ msgid "external _Driver" #~ msgstr "外部ドライバ(_D)" #~ msgid "pa_Ge" #~ msgstr "用紙(_G)" #~ msgid "External _Driver" #~ msgstr "外部ドライバ(_D)" #~ msgid "_90 degree clockwise" #~ msgstr "_90° 時計回り" #~ msgid "9_0 degree counter-clockwise" #~ msgstr "9_0° 反時計回り" #~ msgid "_DPI:" #~ msgstr "_DPI:" #~ msgid "_Opacity:" #~ msgstr "不透明度(_O):" #~ msgid "_New alias:" #~ msgstr "新規別名(_N):" #~ msgid "_Greek Symbol" #~ msgstr "全角ギリシア -> シンボル(_G)" #~ msgid "style" #~ msgstr "スタイル" #~ msgid "_Jfont:" #~ msgstr "邦文フォント(_J):" #~ msgid "GreekSymbol" #~ msgstr "全角ギリシア -> シンボル(_G)" #~ msgid "Save NGP file " #~ msgstr "NGPファイルへ保存" #~ msgid "_Fill:" #~ msgstr "塗りつぶし(_F):" #~ msgid "empty" #~ msgstr "なし" #~ msgid "_Frame" #~ msgstr "フレーム(_F)" #~ msgid " frame" #~ msgstr " フレーム" #~ msgid "Line" #~ msgstr "直線" #~ msgid "arrow:%s" #~ msgstr "矢印:%s" #~ msgid "interpolation:%s" #~ msgstr "補完法:%s" #~ msgid "fill:%s" #~ msgstr "塗りつぶし:%s" #~ msgid "legend curve" #~ msgstr "曲線" #~ msgid "legend polygon" #~ msgstr "多角形" #~ msgid "Legend curve %d" #~ msgstr "曲線 %d" #~ msgid "Legend polygon %d" #~ msgstr "多角形 %d" #~ msgid "Curve" #~ msgstr "曲線" #~ msgid "New Legend Curve (+SHIFT: Fine +CONTROL: snap angle)" #~ msgstr "曲線の新規作成 (+SHIFT:微動 +CONTROL:角度をスナップ)" #~ msgid "Polygon" #~ msgstr "多角形" #~ msgid "New Legend Polygon (+SHIFT: Fine +CONTROL: snap angle)" #~ msgstr "多角形の新規作成 (+SHIFT:微動 +CONTROL:角度をスナップ)" #~ msgid "_Line" #~ msgstr "直線(_L)" #~ msgid "_Curve" #~ msgstr "曲線(_C)" #~ msgid "_Polygon" #~ msgstr "多角形(_P)" #~ msgid "slant1" #~ msgstr "軸と斜交1" #~ msgid "slant2" #~ msgstr "軸と斜交2" #~ msgid "Ex. Viewer" #~ msgstr "外部ビューア" #~ msgid "Open External Viewer" #~ msgstr "外部ビューア" #~ msgid "_Output" #~ msgstr "出力(_O)" #~ msgid "external _Viewer" #~ msgstr "外部ビューア(_V)" #~ msgid "data _File" #~ msgstr "データファイル(_F)" #~ msgid "normal" #~ msgstr "水平" #~ msgid "_Browser:" #~ msgstr "ブラウザ(_B):" #~ msgid "Editor" #~ msgstr "エディター" #~ msgid "Couldn't convert filename from UTF-8." #~ msgstr "UTF8 文字列からファイル名に変換できません." #~ msgid "Couldn't convert filename to UTF-8." #~ msgstr "ファイル名から UTF8 文字列に変換できません." #~ msgid "_Use rectangle for draft" #~ msgstr "下書き時に矩形を使用(_U)" #~ msgid "_Addin script" #~ msgstr "アドインスクリプト(_A)" #~ msgid "data move" #~ msgstr "移動" #~ msgid "data mask" #~ msgstr "マスク" #~ msgid "data load" #~ msgstr "読み込み" #~ msgid "data math" #~ msgstr "数式変換" #~ msgid "_Ifs:" #~ msgstr "区切文字(_I):" #~ msgid "Axis Baseine" #~ msgstr "軸基線" #~ msgid "Axis Position" #~ msgstr "位置" #~ msgid "Axis Font" #~ msgstr "フォント" #~ msgid "_Baseline ..." #~ msgstr "軸基線(_B)..." #~ msgid "_Gauge ..." #~ msgstr "目盛線(_G)..." #~ msgid "_Numbering ..." #~ msgstr "目盛数字(_N)..." #~ msgid "_Font ..." #~ msgstr "フォント(_F)..." #~ msgid "Invalid character in the filename" #~ msgstr "不正な文字を含むファイル名" #~ msgid "type:%-2d size:%-5.2f" #~ msgstr "タイプ:%-2d サイズ:%-5.2f" #~ msgid "lw/pt" #~ msgstr "線幅/ポイント" #~ msgid "type:%-2d %s size:%-5.2f" #~ msgstr "タイプ:%-2d %s サイズ:%-5.2f" #~ msgid "object" #~ msgstr "オブジェクト" #~ msgid "Overwrite existing setting?" #~ msgstr "既存の設定に上書きしますか?" #~ msgid "Delete existing setting?" #~ msgstr "既存の設定を削除しますか?" #~ msgid "Fit setting" #~ msgstr "フィット設定" #~ msgid "vertical" #~ msgstr "垂直" #~ msgid "" #~ "Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: " #~ "Fine)" #~ msgstr "軸の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)" #, fuzzy #~ msgid "_Font of file preview:" #~ msgstr "データプレビューの行数(_L):" #~ msgid "" #~ "A file named `%s'already exists.\n" #~ "Do you want to replace it?" #~ msgstr "" #~ "'%s' というファイルは既に存在しています。\n" #~ "上書きしてもよろしいですか?" #, fuzzy #~ msgid "data file" #~ msgstr "データの保存" #~ msgid "Flip _Vertically" #~ msgstr "垂直反転(_V)" #~ msgid "_Window" #~ msgstr "ウィンドウ(_W)" #~ msgid "I/O error: Write" #~ msgstr "I/O エラー: 書き込み" #~ msgid "_Auto redraw" #~ msgstr "自動再描画(_A)" #~ msgid "addin" #~ msgstr "アドイン" #~ msgid "Script" #~ msgstr "スクリプト" #~ msgid "Addin" #~ msgstr "アドイン" #~ msgid "prefscript" #~ msgstr "スクリプト" #~ msgid "setdriver" #~ msgstr "ドライバ" #~ msgid "prefdriver" #~ msgstr "ドライバ" #~ msgid "preffont" #~ msgstr "フォント" #~ msgid "misc" #~ msgstr "各種設定" #~ msgid "extviewer" #~ msgstr "外部ビューア" #~ msgid "viewer" #~ msgstr "ビューア" #~ msgid "_JFont" #~ msgstr "英文フォント(_F):" #~ msgid "Printing" #~ msgstr "印刷中" #~ msgid "New Frame Graph (+SHIFT: Fine)" #~ msgstr "フレームグラフの新規作成 (+SHIFT:微動)" #~ msgid "New Section Graph (+SHIFT: Fine)" #~ msgstr "方眼グラフの新規作成 (+SHIFT:微動)" #~ msgid "New Cross Graph (+SHIFT: Fine)" #~ msgstr "交差グラフの新規作成 (+SHIFT:微動)" #~ msgid "New Single Axis (+SHIFT: Fine)" #~ msgstr "単体軸の新規作成 (+SHIFT:微動)" #~ msgid "New Legend Line (+SHIFT: Fine)" #~ msgstr "直線の新規作成 (+SHIFT:微動)" #~ msgid "New Legend Curve (+SHIFT: Fine)" #~ msgstr "曲線の新規作成 (+SHIFT:微動)" #~ msgid "New Legend Arc (+SHIFT: Fine)" #~ msgstr "円の新規作成 (+SHIFT:微動)" #~ msgid "Pointer (+SHIFT: Multi select)" #~ msgstr "選択 (+SHIFT:複数選択)" #~ msgid "Axis Pointer (+SHIFT: Multi select)" #~ msgstr "軸の選択 (+SHIFT:複数選択)" #~ msgid "Move" #~ msgstr "移動(_M)" #~ msgid "Move object (+CONTROL: Horizontal/Vertical +SHIFT: Fine)" #~ msgstr "オブジェクトの移動 (+CONTROL:水平/垂直移動 +SHIFT:微動)" #~ msgid "Spawning external driver" #~ msgstr "外部ドライバに出力中" #~ msgid "Spawning external viewer" #~ msgstr "外部ビューアに出力中" #~ msgid "Making GRA file" #~ msgstr "合成ファイル作成中" #~ msgid "Interrupt" #~ msgstr "中止" #~ msgid "Interrupt Drawing, etc." #~ msgstr "描画の中止" #~ msgid "_Store in memory" #~ msgstr "メモリに保存(_S)" ngraph-gtk-6.09.05/po/Rules-quot0000644000175000017500000000453314142161772013311 00000000000000# Special Makefile rules for English message catalogs with quotation marks. # # Copyright (C) 2001-2017 Free Software Foundation, Inc. # This file, Rules-quot, and its auxiliary files (listed under # DISTFILES.common.extra1) are free software; the Free Software Foundation # gives unlimited permission to use, copy, distribute, and modify them. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ ;; \ *) \ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ ;; \ esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ ; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header ngraph-gtk-6.09.05/po/stamp-po0000644000175000017500000000001214143613333012751 00000000000000timestamp ngraph-gtk-6.09.05/po/ChangeLog0000644000175000017500000000106113070106167013045 000000000000002013-02-21 Ito Hiroyuki * POTFILES.in: add "src/gtk/gtk_liststore.c". 2008-05-27 gettextize * Makefile.in.in: New file, from gettext-0.17. * Rules-quot: New file, from gettext-0.17. * boldquot.sed: New file, from gettext-0.17. * en@boldquot.header: New file, from gettext-0.17. * en@quot.header: New file, from gettext-0.17. * insert-header.sin: New file, from gettext-0.17. * quot.sed: New file, from gettext-0.17. * remove-potcdate.sin: New file, from gettext-0.17. * POTFILES.in: New file. ngraph-gtk-6.09.05/po/en@boldquot.header0000644000175000017500000000247214142161772014734 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # ngraph-gtk-6.09.05/po/ja.gmo0000644000175000017500000033160114143613333012377 00000000000000 !B Xo!X&[[[ [3[0!\:R\\\<\%]0(]0Y]<]%]0]0^7O^-^-^2^<_:S__ _<_n `]y`l`Da6a5b<Tb(b"b"b"c"#c(Fc-oc!c<c cA d5Kd*d*d:d:eMebe#eee<ef21f;df)f9fgpgKhjhShRBii/jPjPk`kmCl]lLmU\m'm7m*n:=n&xnbnoo$r0rI&spssNu3v?Qwx;Kyz {|{f||}Ap~~1]AEu^%4GZj*6 3Wcu2`97V5=ď9z<z2FђL;0 <1W3'3[>?ΘahpgٙuArf*iA=2WIW[;p qzov\ӣ:S]xtuua?".ĩ:.!pȫ%9m_mͭx;Lpx\Hptsvue} ¼9%1Cu,|̾yIÿNEo,gJK2|~|xeglXZ- Yclsw    5 A NYpt P %3Pdu  %+3;D!Ln&u    ! .8OVo   ! *8 L Wcl     (3GPV\e t=    $:*AlR{[ *8GVjy    "<@Xiz  66KG:3$LX83^1     + G Q [ gt " !=CKT]cs   "09 L V ak"z  & -9HQi   (.5:Wv((  ! 7EHX _5k !0?HQY`h mx   * =GOU]bj!  %4L^d s    #/ 5@F L X cms  %+2 8F M W b oy "2:IXhpx    ;HOU kw  "  (7?E L Wei o z     # - 7B W cp    &. 5 CMS dov ~   % &-<D LW^dk s~      -: CNV\d mx    &-48>D ITmpu  4TZ `j   .J es      %/AFeiNo%'O@    ". 3 >JPT]fk~    (05 < G T `l }   " & + 6CHZbg|    !)KQV]flsx #,27P ly     *8=BH O \ htz B3*'8R88)"'J"j( .38AVj p}8,y =FF..H%4(Z(H%((D4m223H<"Hv(l 45@jH32(2[220)%OHmM@8Y8== ,G3t<,3HF%.)%;4pu6JzJr Q   O4 O  Tl O CKU"8+A)(ki$ #!17S[ MtGZyCm 3!!/"7"2"#3#$%&'PW(,(+)3*b5**:+#,+2-^.//j0/f/`0Bc0e0b 1o1:n22?,3=l3;3A3?(4_h4\4|%5b5663*7K^77 -8N8!889F:CK;@;G;G<W`<Y<={=$>X>?C?@3@@ AfBHCCbC2C"DDXEZEXUF|F+G>G[GkFHjIfJJKKLToMM4M2NKN8O P&PmFPDPQtRRSU&VcVJWWXUYYuj[[r]%^_pabbc/d4Kd'd=ddefggmhP-ig~ii/jjhikkJRl>l;lZm=smVmCn\Lnn+oppppppq7qSqiqyq+qqqq q qrr-rCrVrirmrtr xrrr rOrr1r1sAsQs dsnsussssssss tt)t-t3t9tOtBVtt"tttttuBu[ukuuuuu"uu.v'1vYv`vhvovvvvv v v'vv v ww"w2wHw[wnwuw#wwwwww xx,x ?x LxYxoxxxxx xxy yyv&yyyyy6yz0z 7zDzLziz?yz zSzW{r{ y{ { {{{{{{ {{ {{|#+|O|b|v|||'|||} $}.}A}Q}a} z} } }} }4}T}Y@~V~V~(HDq\+S?Gyۀ U0`$-  %;4Zʂ9݂%.,4[:.˃.)07>X_r  !Ƅ'̈́- FSf|݅ͅ$; O\u†܆(/C Yf+ -ԇ   - 7A`s   1.1AP?҉ 2Qah xV   /<.R#  ͋ 4H ]h|̌ Ԍ  +@H hv    ō+ٍ< B"Ps!  ˎ ֎ "$G _m  ď%ҏ   @ KV jv    ː ِ %'<"ZB}(=Q` r}˒ ! /; O]t   ʓؓ %":]r    ˔ה('+<h&w   ˕)ו   4' \"g ˖ږ  %0&?f u   ɗ՗   %15L cn   Θ ߘ  * <H P [&g  " Ǚҙ  "-2"M p{  Ԛߚ ( :E\s ؛$BCTۜ, &2 L X co  ĝ ֝ 3HW^o  ƞ ؞  ' / =J[ls {  ß՟\AW^n  !!  $: P Z d nx ˡ$ҡ-% )3 :[w ŢϢ!'7G_!x$ۣ  %, < IWmͤ-Ԥ cwB0֥6`>**ʦ  &< O\z   ħѧ , F S`gn *ըܨ%"3:>NRe lv }  ˩۩   $6 =GN ^k r   ŪҪ  )9 R\n}  -     ) 3 @ MZah ~  ɬ -0!Rq$ϭ'$5M eo    ʮ ݮ  ! E.9t'-֯QQVQ00+3\06 '-1 PZ j(%ڲ37 M [ i ugdhP!"GQS9.n5t`>srmwwGi&Y?R'H-C |VJwM2oy]S#l \f&u%,+,!lpM/[mf6+^?czNH8<0"3Kn8 @]BxDeFY@gl}0aT8dWXhHU3%k@g  Q(Q-0 n}{~e~I(WaC+t|Xq2Y9,=i]jO&EoF%I4y`~Z ELN7<O >>1g 7Z$sc> ;2?^qxj4afwMGyK4] BZq,k.F9)cO/vJxrz J(U .R ud/GfmVqUp kxv$A}3<)pM!ih/P=[beQ%* DIW`u- EZE|v$:Dk\pO_4N+0 <=B^ 6yz ~S*F:hAds SHW \Cr\|#'PXa= : iU m:'(T#_  e7j_[!NTAI-{TXr`uj  t7K1L31cR1K_n'bP{6B?V"L5t;Jb" )L#)}o9ARD@l6oYV$;C8.s;*b&5^{z*2[5v%a The abbreviated weekday name. %A The full weekday name. %b The abbreviated month name. %B The full month name. %c Equivalent to %a %b %e %T %Y. %C The century number (year/100). %d The day of the month (01 to 31). %e The day of the month (1 to 31). %F Equivalent to %Y-%m-%d. %H The hour (00 to 23). %I The hour (01 to 12). %j The day of the year (001 to 366). %k The hour (0 to 23). %l The hour (1 to 12). %m The month (01 to 12). %M The minute (00 to 59). %n A newline character. %p Either "AM" or "PM". %P Either "am" or "pm". %r Equivalent to %I:%M:%S %p. %R Equivalent to %H:%M. %S The second (00 to 60). %T Equivalent to %H:%M:%S. %u The day of the week, Monday being 1 (1 to 7). %w The day of the week, Sunday being 0 (0 to 6). %y The year without a century (00 to 99). %Y The year including the century. %+ Equivalent to %a %b %e %T GMT %Y. %% A literal '%' character.%s (%d:%d) the error is found at: %s%s file (*.%s)%s property (multi select)2-dot dash%D The ID of the instance of the data object%N The number of instances of data objectARC_OBJ The identification number of the arc objectAVX The average of XAVY The average of XAXISX The ID of the axis instance specified as X axisAXISX_LEN Length of the X axisAXISX_MAX The maximum value of the X axisAXISX_MIN The minimum value of the X axisAXISY The ID of the axis instance specified as Y axisAXISY_LEN Length of the Y axisAXISY_MAX The maximum value of the Y axisAXISY_MIN The minimum value of the Y axisBREAK Missing data (data lines are not combined)COLX The column number specified for XCOLY The column number specified for YCONT Missing data (data lines are combined)DATA_OBJ The identification number of the data objectE The base of natural logarithm (Napier's constant)EULER Euler's constantFALSE the FALSE value (0)FILE_OBJ The identification number of the file objectFILL_RULE_EVEN_ODD Defined for the function draw_polygon(). fill the polygon with evin-odd rule.FILL_RULE_NONE Defined for the function draw_polygon(). don't fill the polygon.FILL_RULE_WINDING Defined for the function draw_polygon(). fill the polygon with winding rule.FIRST When conversion is performed twice with one line of data such as diagonal or errorbar plot, true (1) in the first call, false (0) in the second call.FLINE Number of lines specified as "Final line"HSKIP Number of lines specified as "Head skip"MARK_OBJ The identification number of the mark objectMASK Number of lines set for maskMAXX The maximum value of XMAXY The maximum value of YMINX The minimum value of XMINY The minimum value of YMOVE Number of lines set for moveNAN Missing data with error indicationNUM The number of the dataPATH_OBJ The identification number of the path objectPI PiRECT_OBJ The identification number of the rectangle objectRSTEP Number of lines specified as "Read step"STDEVPX The standard deviation of XSTDEVPY The standard deviation of YSTDEVX The corrected sample standard deviation of XSTDEVY The corrected sample standard deviation of YSUMX Sum of XSUMXX Square sum of XSUMXY Product sum of X and YSUMY Sum of YSUMYY Square sum of YTEXT_OBJ The identification number of the text objectTRUE the TRUE value (1)UNDEF Missing data without error indicationabs(x) compute the absolute value of xacos(x) arc cosine functionacosh(x) inverse hyperbolic cosine functionalpha(x, i) Set A (i == 1) or A2 (i == 2) values to x (0 <= x < 256) when i == 0, set A and A2 values to xam(a) copy the contents of the array a to the memory (return the number of copied elements)and(x, y) True (= 1) when (x != 0) and (y != 0)array(a, v1, v2, ...) initialize an array a with the rest arguments return the number of elements of the arrayarray_average(a) return the average of the elements of array aarray_clear(a) set the number of elements of the array a to 0array_compact(a) Remove non-numeric values from the elements of the array of array a and return the number of elements after removalarray_copy(dest, src) copy the contents of the array src to the array dest. (return the number of copied elements)array_max(a) returns the maximum value contained in array aarray_min(a) returns the minimum value contained in array aarray_moving_average(dest, src, n, type) calculate moving average of (n * 2 + 1) sample of the array src and set them to the array dest. Weighted moving average is used when type is 1.array_stdev(a) return the corrected sample standard deviation of the elements of array aarray_stdevp(a) return the standard deviation of the elements of array aarray_sum(a) returns the sum of the elements of array aarray_sumsq(a) returns the square sum of the elements of array aasin(x) arc sine functionasinh(x) inverse hyperbolic sine functionatan(x) arc tangent functionatanh(x) inverse hyperbolic tangent functionbeta(x, y) beta functionchoose(n, m) the combinatorial factor n choose m: n!/(m!(n-m)!)cm(x, n) initialize n memories from the beginning with x initialize whole memory when n is 0 and n memories from the end when x is negative (return x)color(i, x) i = 0: Set the R value to x (0 <= x < 256) i = 1: Set the G value to x (0 <= x < 256) i = 2: Set the B value to x (0 <= x < 256) i = 3: Set the R, G and B values to x (0 <= x < 256) i = 4: Set the R2 value to x (0 <= x < 256) i = 5: Set the G2 value to x (0 <= x < 256) i = 6: Set the B2 value to x (0 <= x < 256) i = 7: Set the R2, G2 and B2 values to x (0 <= x < 256) i = 8: Set the R, G and B values to be hexadecimal color of x i = 9: Set the R2, G2 and B2 values to be hexadecimal color of xcos(x) cosine functioncosh(x) hyperbolic cosine functiondelta(x) Kronecker delta (1 when x = 0, 0 otherwise)dif(x) Differencedraw_arc(x, y, rx, ry, start, arc, pieslice, stroke, fill, close) draw an arc with the X direction radius rx and the Y direction radius ry centered on (x, y). start and arc specify start angle and arc angle respectively. When stroke and fill are 0, do not draw contours and fills respectively. If pieslice is not 0, draw a sector. If close is not 0, close the outline.draw_errorbar2(x1, y1, x2, y2, size) draw an errorbar from (x1, y1) to (x2, y2). The length of ticks can be specified with size. When size is 0, specification of the file object is used.draw_errorbar(x, y, erx, ery, size) draw errorbars from (x - erx, y) to (x + erx, y) and from (x, y - ery) to (x, y + ery). The length of ticks can be specified with size. When size is 0, specification of the file object is used.draw_line(x1, y1, x2, y2, arrow, size) draw a line form (x1, y1) to (x2, y2). When arrow is 1, 2 or 3, draw arrow end, begin and both side of the line respectively. The size of a arrow can be specified with size. When size is 0, specification of the file object is used.draw_mark(x, y, size) draw a mark on (x, y). The size of a mark can be specified with size. When size is 0, specification of the file object is used.draw_polygon(ax, ay, stroke, fill) draw polygon defined by coordinates (ax[0], ay[0]), (ax[1], ay[1]), .... when stroke is 0, do not draw contours. fill can be specified with one of FILL_RULE_NONE, FILL_RULE_EVEN_ODD or FILL_RULE_WINDING.draw_polyline(ax, ay) connect coordinates (ax[0], ay[0]), (ax[1], ay[1]), ... by polyline.draw_rect(x, y, w, h, stroke, fill) draw a rectangle with (x, y) and (x + w, y + h) as diagonal vertices. When stroke and fill are 0, do not draw contours and fills respectively.draw_text($str, x, y, dir) Draw the string $str at (x, y). Direction is specified by dir.draw_text_raw($str, x, y, dir) Draw the raw string $str at (x, y). Direction is specified by dir.each(a, item, ex) Evaluate ex for each element of the array a. The element of the array can be referred by the variable item.each_with_index(a, item, index, ex) Evaluate ex for each element of the array a. The element of the array and the loop count can be referred by the variable item and index respectively.ei(x) compute the exponential integral Ei(x)eq(x, y, prec) True (= 1) when x == y. The number of digits of comparison can be specified with prec (prec == 0 is exact match).erf(x) error function erf(x)erfc(x) complementary error function erfc(x)exp(x) base-e exponential function (x <= 690)expm1(x) exp(x)-1. The result is computed in a way that is accurate even if the value of x is near zero.filename($str, basename) Assign filename of the the data object to the variable $str. Any leading directory components are removed when basename is not zero. Return the length of the string $str in characters.filter(dest, src, item, ex) Find elements in the array src that satisfies that the evaluated value of ex is true and set them to the array dest. An element of the array src can be referred by the variable item.find(a, item, ex) Returns the value of the first element in the array a that satisfies that the evaluated value of ex is true. An element of the array can be referred by the variable item.fit_calc(id, x) When the plot type of the data object whose ID is id is fit, the corresponding fit result f(x) is calculated.fit_prm(id, x) When the plot type of the data object whose ID is id is fit, the value of the field "%0x" of the corresponding fit object.fmod(x, y) compute the floating-point remainder of dividing x by yfor(m, begin, end, step, ex) Set the value in step from begin to end to the m-th memory and repeat ex. When m is negative, no setting to memory is done. Returns the value of ex evaluated last.frac(x) remaindergamma(x) gamma functiongauss(x) largest integral value not greater than xge(x, y, prec) True (= 1) when x >= y. The precision allows you to specify the number of digits for comparison (prec == 0 does not specify the number of digits).getobj($obj, $field, id) Return the value of the $field of the $obj object which ID is id. The field type must be int, bool, enum or double.getobj_array(array, $obj, $field, id) Set values of the $field of the $obj object which ID is id to the array array. The field type must be char*[], double[] or int[]. Retuern the number of elements saved to the array.getobj_string($str, $obj, $field, id) Set the value of the $field of the $obj object which ID is id to the variable $str. The field type must be char*. Return the length of the string $str in characters.gt(x, y, prec) True (= 1) when x > y. The precision allows you to specify the number of digits for comparison (prec == 0 does not specify the number of digits).hn(n, x) Hermite polynomialshsb2(h, s, b) Set the R2, G2 and B2 values of the color to h, s, b (0 <= h, s, b <=1) from the HSB valuehsb(h, s, b) Set the R, G and B values of the color to h, s, b (0 <= h, s, b <=1) from the HSB valueicbeta(a, b, x) incomplete beta functionicgam(m, x) incomplete gamma functionif(x, ex1, ex2) evaluate ex1 when x != 0, evaluate ex2 otherwisein(n, x) compute the regular modified cylindrical Bessel function of order |n|, In(|x|)index(a, item, ex) Returns the first index at which a given element in the array a that satisfies that the evaluated value of ex is true. An element of the array can be referred by the variable item.int(x) round to integer, toward zeroinu(nu, x) compute the regular modified Bessel function of fractional order |nu|, Inu(|x|)isbreak(x) True if x is BREAKiscont(x) True if x is CONTisnan(x) True if x is NANisnormal(x) True if x is a normal numberisundef(x) True if x is UNDEFjl(l, x) compute the regular spherical Bessel function of order |l|, jl(|x|)jn(n, x) compute the regular cylindrical Bessel function of order n, Jn(|x|)jnu(nu, x) compute the regular cylindrical Bessel function of fractional order |nu|, Jnu(|x|)kn(n, x) compute the irregular modified cylindrical Bessel function of order |n|, Kn(|x|)knu(nu, x) compute the irregular modified Bessel function of fractional order |nu|, Knu(|x|)le(x, y, prec) True (= 1) when x <= y. The precision allows you to specify the number of digits for comparison (prec == 0 does not specify the number of digits).lgn(n, a, x) evaluate the generalized Laguerre polynomials Lan(x) for a > -1, n >= 0line_number() File line number being processed (1st line is 1)ln1p(x) ln(1+x). The result is computed in a way that is accurate even if the value of x is near zero.ln(x) natural logarithmic functionlog1p(x) log(1+x). The result is computed in a way that is accurate even if the value of x is near zero.log(x) base-10 logarithmic functionlt(x, y, prec) True (= 1) when x < y. The precision allows you to specify the number of digits for comparison (prec == 0 does not specify the number of digits).m(i, x) assigns x to the i-th memory (i = 0 to 65535) the index from the tail when i is negative (return x)map(dest, src, item, ex) Evaluate ex for each element of the array src and set them to the array dest. The element of the array can be referred by the variable item.marksize(x) Set mark size to xmarktype(x) Set mark type to xmax(a, b, c, ...) The largest value of argumentsmin(a, b, c, ...) The smallest value of argumentsmjd2day(mjd) Gregorian calendar day corresponding to Modified Julian Day mjdmjd2month(mjd) month of Gregorian calendar corresponding to Modified Julian Day mjdmjd2unix(mjd) time represents the number of seconds elapsed since the Epoch at mjdmjd2wday(mjd) The day of the week as a decimal range 1 to 7, Monday being 1 corresponding to mjdmjd2yday(mjd) The day of the year as a decimal number (range 001 to 366) corresponding to mjdmjd2year(mjd) year of Gregorian calendar corresponding to Modified Julian Day mjdmjd(year, month, day, hour, min, sec) Modified Julian Date (date and time are given in UTC)mtime() returns last modification time of the file.neq(x, y, prec) True (= 1) when x != y. The number of digits of comparison can be specified with prec (prec == 0 is exact match).not(x) True (= 1) when x == 0obj_alpha(id, obj) Set the A and A2 value to the same value as the instance of obj whose ID is id. obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ or TEXT_OBJ.obj_color(id, obj) Set the R, G, B, R2, G2 and B2 values to the same value as the instance of obj whose ID is id. obj is one of DATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ or TEXT_OBJ.on_end(proc) Evaluate proc at the end of plottong the data object.or(x, y) True (= 1) when (x != 0) or (y != 0)parameter(id) Returns the value of the prameter object which ID is id.pn(l, x) evaluate the Legendre polynomial Pl(x) for a specific value of l, x subject to l >= 0, |x| <= 1pop(a ,n) remove the last n elements of array a (n = 0 is as same as n = 1). Returns the new size of the array.printf($format, v1, v2, ...) Converts v1, v2, ... to a string according to $format and show in the information window. Return the length of the string $str in characters.prog1(arg1, arg2, ...) Evaluate the arguments and return the evaluated value of the first argumentprog2(arg1, arg2, ...) Evaluate the arguments and return the evaluated value of the second argumentprogn(arg1, arg2, ...) Evaluate the arguments and return the evaluated value of the last argumentpush(a, x) adds new element x to the end of an array a. Returns the new size of the array.puts($str) Show $str in the information window. Return the length of the string $str in characters.qinv(x) inverse complementary error functionrand(x) returns a random value equally distributed over the range [0..x)reduce(a, item, result, ex) Evaluate ex for each element of the array a and return last evaluated value of ex. The element of the array and the result of previous evaluation can be referred by the variable item and result.rgb2(r, g, b) Set the R2, G2 and B2 values of the color to r, g, b (0 <= r, g, b <= 1)rgb(r, g, b) Set the R, G and B values of the color to r, g, b (0 <= r, g, b <= 1)rm(i) the value of the current i-th memory (i = 0 to 65535), the index from the tail when i is negativeround(x, digit) round the number x, away from zero. digit is the number of digits to which you want to round x.rsort(a, ignore_case) reverse sort elements of array a fold lower case to upper case characters when ignore_case is not zero.shift(a, n) remove the first n elements of array a (n = 0 is as same as n = 1). Returns the new size of the array.sign(x) positive / negative sign (-1 with x < 0, 1 with x >= 0)sin(x) sine functionsinh(x) hyperbolic sine functionsize(a) number of elements of array asort(a, ignore_case) sort elements of array a fold lower case to upper case characters when ignore_case is not zero.sprintf($str, $format, v1, v2, ...) Converts v1, v2, ... to a string according to $format and set to $str. Return the length of the string $str in characters.sqr(x) squaringsqrt(x) square rootsrand(x) Sets the seed for the random number generator which is used by the rand() functionstrftime($str, $fmt, t, utc) convers t (the number of seconds elapsed since the Epoch) according to the format specification $fmt and places the result in the string $str. When utc is true, $str is expressed in Coordinated Universal Time (UTC).string($str, value) Converts value to a string and set to $str. Return the value.string_append($dest, $src) Adds the string $src onto the end of the string $dest.string_column($dest, index) Set indexth column in the reading data-line to the string $dest.string_compare($str1, $str2, ignore_case) Compare two strings, ignoring the case of ASCII characters when ignore_case is not zero.string_down($dest, $src) Converts all uppercase ASCII letters to lowercase ASCII letters in the string $src and set to the string $dest.string_erase($str, pos, len) Removes len characters from the string $str, starting at position pos.string_float($str) Converts the string $str to a floating-point value and return the value.string_float_array(dest, $ary) Converts the string element of the array $ary to a floating-point value and set them to the array dest.string_insert($dest, $src, pos) Inserts the string $src into the string $dest at the position pos.string_join($dest, $sep, $array) Joins a number of strings in the array $array together to form one long string $dest, with the optional separator $sepinserted between each of them.string_length($str) Return the length of the string $str in characters.string_match($str, $regexp, ignore_case) Scans for a match in the string $str for the regular expression pattern $regexp. Return non-zero value if the string matched, zero otherwise.string_prepend($dest, $src) Adds the string $src onto the start of the string $dest.string_replace($dest, $src, $regexp, $replacement, ignore_case) Replaces all occurrences of the regular expression pattern in $regex with the $replacement text. Backreferences of the form '\number' or '\g<number>' in the replacement text are interpolated by the number-th captured subexpression of the match, '\g<name>' refers to the captured subexpression with the given name. '\0' refers to the complete match, but '\0' followed by a number is the octal representation of a character. Letters in $regex match both upper- and lowercase letters when ignore_case is not zero.string_reverse($dest, $src) Reverses the UTF-8 string $src and set to the string $dest.string_split($dest, $src, $separator, use_regexp) Splits the string $src into pieces, using the given $separator. Each strings are saved in the array $dest $separator is treated as a regular expression when use_regexp is not 0. Letters in $separator match both upper- and lowercase letters when use_regexp is 2.string_split_float(dest, $src, $separator, use_regexp) Splits the string $src into pieces, using the given $separator. Each strings are converted to float value and saved in the array dest $separator is treated as a regular expression when use_regexp is not 0. Letters in $separator match both upper- and lowercase letters when use_regexp is 2.string_strip($str) Removes leading and trailing whitespace from the string $str.string_substring($dest, $src, start, end) Copies a substring out of a UTF-8 encoded string $src. The substring will contain end - start characters.string_truncate($str, len) Cuts off the end of the string $str, leaving the first len characters.string_up($dest, $src) Converts all lowercase ASCII letters to uppercase ASCII letters in the string $src and set to the string $dest.sum(x) Integrationsumsq(a, b, c, ...) square sum of argumentstan(x) tangent functiontanh(x) hyperbolic tangent functiontext_align(x, y) Set alignment of a text drawing. x and y represent alignment of parallel and normal direction respectively. (0 <= x, y <= 1)text_font(font) Set font setting of drawing texts. The value font 0, 1 and 2 represent "Sans-serif", "Serif" and "Monospace" respectively.text_obj_get(id, $text) assign text of the the text object which ID is id to the variable $text.text_obj_set(id, $text) set text of the the text object which ID is id as the variable $text.text_size(pt, space, script) Set font size and other settings of drawing texts. Font size can be specified by pt. Font-spacing and script-size are specified by the following arguments.text_style(style) Set font style settings of drawing texts. The value style 0, 1, 2 and 3 represent "normal", "bold", "italic" and "bold-italic" respectively.theta(x) staircase function (1 if x >= 0, 0 otherwise)time() returns the time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)times(n, index, ex) Repeat ex n times. The loop count can be referred by the variable index.tn(n, x) Chebyshev polynomialsunix2mjd(time) Modified Julian Date time represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC))unless(x, ex1, ex2) evaluate ex2 when x != 0, evaluate ex1 otherwiseunshift(a, x) adds new element x to the beginning of an array a. Returns the new size of the array.xor(x, y) True (= 1) when (x != 0) xor (y != 0)yl(l, x) compute the irregular spherical Bessel function of order |l|, yl(|x|)yn(n, x) compute the irregular cylindrical Bessel function of order n, Yn(|x|)ynu(nu, x) compute the irregular cylindrical Bessel function of fractional order |nu|, Ynu(|x|)zeta(s) compute the Riemann zeta function zeta(s) for arbitrary s, s != 1zeta_int(n) compute the Riemann zeta function zeta(n) for integer n, n != 1zetam1(s) compute zeta(s) - 1 for arbitrary s, s != 1zetam1_int(n) compute zeta(n) - 1 for integer n, n != 1zip(a1, a2, item1, item2, ex) Evaluate ex for each element of two arrays a1 and a2. The elements of the arrays can be referred by the variable item1 and item2.zip_map(dest, src1, src2, item1, item2, ex) Evaluate ex for each element of two arrays src1 and sec2 and set them to the array dest.. The elements of the arrays can be referred by the variable item1 and item2.About %sActionAddAdd DataAdd Data fileAdd Merge fileAdd data fileAdd-in ScriptAdd-in scriptAdd-in script setupAdjust _Position:Alias name already exists.AlignAlign _BottomAlign _Horizontal CenterAlign _LeftAlign _RightAlign _TopAlign _Vertical CenterAllAlternative fontAlternative fontsArcArrowAxisAxis %d %sAxis (_X):Axis (_Y):Axis PointerAxis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: Fine)Axis TrimmingAxis Trimming (+SHIFT: Fine)Axis baseline colorAxis gauge colorAxis numbering colorBaselineBoldCairo EMF OutputCairo EPS OutputCairo PDF OutputCairo PNG OutputCairo PS OutputCairo SVG OutputCheckButtonClear ScaleClipClose pathColorColor 1Color 2ComboBoxConfirmCopy selected object to clipboardCreateCreate scientific 2-dimensional graphsCross GraphCross axisCu_tCurrent Dir:CustomCut selected object to clipboardDataData %d (Array)Data %d (File)Data %d (Range)Data PointerData fileData points are moved.DeleteDelete the profile '%s'?Delete the selected objectDirectionDirection:DownDrawDraw X rangeDraw _BaselineDraw on Viewer WindowDrawingDrawing.Duplicate the selected objectE_MF fileErrorError:EvaluateEvaluate DataEvaluate Data PointEvaluatingEvaluating.ExchangeExecuting `%.128s'.Executive (184.2x266.7)Expand directoryExternal programsExternal viewerFillFill ColorFill ruleFit %dFitting ResultsFontFont nameFont sizeFormatFrame GraphFrame axisFrame/Section GraphGRA fileGaugeGaussGaussianGraph _Height:Graph _Width:Graphs can be exported to PostScript, SVG, PNG or PDF format.Grid %dHide %sHide OthersInputInstall `Ngraph.ini' to %s ?Instance nameItalicJoinL_andscapeLegal (215.90x355.60)LegendLegend Gaussian/Lorentzian/Parabola/Sin %dLegend PointerLegend Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: Fine)Legend and Axis Pointer (+SHIFT: Multi select / +CONTROL: Horizontal/Vertical +SHIFT: Fine)Legend arc %dLegend line %dLegend mark %dLegend rectangle %dLegend text %dLetter (215.90x279.40)Line No.Line StyleLine WidthLine _Style:Line styleLinkLoad NGPLoad NGP fileLoad a graph (NGP file)Load graphLoading `%.128s'.Log powerLower selection to bottomMJDMain application windowMaking GRA file.Making data fileMaking data file.MarkMark sizeMarker beginMarker endMath TransformationMath XMath YMerge %dMessageMiscellaneousMoving data points is canceled.New Cross Graph (+SHIFT: Fine +CONTROL: integer ratio)New Frame Graph (+SHIFT: Fine +CONTROL: integer ratio)New Legend Arc (+SHIFT: Fine +CONTROL: circle or integer ratio ellipse)New Legend Gaussian (+SHIFT: Fine +CONTROL: integer ratio)New Legend Mark (+SHIFT: Fine)New Legend Path (+SHIFT: Fine +CONTROL: snap angle)New Legend Rectangle (+SHIFT: Fine +CONTROL: square integer ratio rectangle)New Legend Text (+SHIFT: Fine)New Section Graph (+SHIFT: Fine +CONTROL: integer ratio)New Single Axis (+SHIFT: Fine +CONTROL: snap angle)Ngraph is the program to create scientific 2-dimensional graphs for researchers and engineers.Ngraph-GTKNgraph.ini could not be copied.Ngraph.ini is not found.Ngraph.ini is write protected.No settings.NumberingObjectOpenOpen fileOpen filesOverwrite existing profile?P_DF fileP_NG filePage Set_upParameter %dPaste object from clipboardPathPausePlayPlease specify a new alias name.Please specify script description.Please specify script file name.Please specify script name.Please specify the profile.PointPointerPositionPre_viewPrintPrint the graphPrinting error: %sPrinting.QuestionQuit %sQuit the applicationRangeRecent Data FilesRecent GraphsRectangleRedo previous commandRepeatRise selection to topSave NGPSave NGP fileSave _AsSave as Ngraph.ngpSave fileSave graphSave menuSave the graphSave the graph with a new filenameSaving `%.128s'.ScaleScale UndoScale ZoomScale _ClearScale _UndoScale _ZoomScalingSearching for data.Section GraphSection axisSelectSelect _AllSelect programServicesSet Math TransformationSetting file not found.Show AllShow cross gaugeShow shortcut keysShow the help documentSingle AxisSingle _AxisSingle axisSizeSpawning external viewer.SpinButtonStrokeStroke ColorStyleSwitchTextThe profile '%s' is deleted.The profile '%s' is not exist.The profile '%s' is saved.This file contain invalid UTF-8 strings.This graph is modified. Save this graph?To startTo stopTransitionTrimmingTypeUndo Scale SettingsUndo previous commandUnsaved GraphUpUser definitionViewerViewer ZoomViewer Zoom-In (+CONTROL: Zoom-Out +SHIFT: Centering)WaveWindow _Height:Window _Width:X:%.2f Y:%.2f %s%stype:%-2dZeroZoom_About_Active (initial state)_Add_Add plus_Add-in_Add-in Script_Add-in script_Add-in:_Adjust:_Alias:_Align_Align:_All_All clear_Angle1:_Angle2:_Antialias:_Apply all_Arc_Array:_Arrow length:_Arrow width:_Auto normalization:_Auto scale margin:_Averaging type:_Axis_Axis grid default_Background_Background Color:_Baseline_Begin:_Bold_Bottom_CSV_Cancel_Change current directory_Check "change current directory"_Clear_Clear information view_Clip_Clipboard (EMF)_Close_Close path_Color 1:_Color 2:_Color2:_Color:_Command toolbar_Converge (%):_Convert texts to paths_Coordinate view:_Copy_Copy Settings_Cross graph_Current directory_Curve:_Data_Data file default_Date/time format:_Decimalsign:_Default decimalsign:_Delete_Demonstration_Derivatives_Description:_Dim:_Direction:_Div:_Division:_Down_Draw_Draw order_Duplicate_EPS file_Edit_Edit custom palette_Editor:_Expand directory:_Expand include file_Expand included file_Export image_External Viewer_External viewer_File_File:_Fill_Final line:_Fit:_Flip_Focus_Font_Font aliases_Font:_Formula:_Fraction:_Frame graph_GRA file_Gauge_Gauge:_Gauss_Graph_Greece_Grid_Grid:_Head skip:_Head:_Height:_Help_Help browser:_IFS:_Inc:_Include data file_Include merge file_Information view:_Initial value:_Insert_Instance name_Interpolation_Interpolation:_Italic_Items:_Join:_Keyboard shortcus_Left Margin:_Left margin:_Legend text default_Length %d:_Length of data preview:_Length of information view:_Length:_Line Width:_Line attribute of focus frame:_Line width:_Line:_Load_Load files on redraw_Load graph_Load settings_Log power_Lorentz_Mark_Mark:_Marker:_Mask_Math_Math Transformation_Mathematics_Max:_Maximum number of data on redraw:_Maximum:_Merge_Min:_Minimum:_Miscellaneous_Miter:_Move_Name:_New graph_Ngraph shell_No_Num:_Numbering_Numbering:_OK_Object_Objects_Open_Option:_Orientation:_PS file_Paper:_Parabola_Parameter_Paste_Path_Path:_Physics_Pieslice_Plain_Plot_Point:_Points:_Portrait_Position_Position:_PostScript Version:_Preference_Preferences_Preserve line width and style_Print_Profile:_Properties_Pt:_Quit_R axis_Range_Raw_Read step:_Recent file_Rectangle_Redo_Redo: %s_Redraw_Ref:_Remark:_Remove_Result_Rotate_Ruler_SVG Version:_SVG file_Save_Save as default_Save data_Scale_Scale:_Script file:_Script size:_Script:_Scrollbar_Section graph_Select Dir:_Selected:_Show select data dialog on exporting_Sidebar_Sin_Size of completion history:_Size:_Source style:_Space:_Start:_Statusbar_Step:_Stop_Stop:_Stroke_Style %d:_Style:_Table_Tail:_Text_Text:_Through_Title:_Toolbox_Top_Top Margin:_Top margin:_Type:_U axis_Undo_Undo: %s_Up_Use opacity_View_Viewer_Wait:_Wave length:_Wave width:_Weight:_Width %d:_Width:_Wrap_X axis_X axis:_X column:_X math_X math:_X smooth:_Y axis_Y axis:_Y column:_Y math_Y math:_Y smooth:_Yes_Zero:_Zoom:`%s' Overwrite existing file?add rangealiasalignalternative fontsangle1angle2arcarrayarrowautoauto scaleautoscale (multi select)axaxisaxis property (single select)axisgridaybarbar_fill_xbar_fill_ybar_solid_fill_xbar_solid_fill_ybar_xbar_ybasebeginbevelbothbsplinebspline_closecenterclose data (multi select)close merge file (multi select)colorcommaconstantscopy property (single select)create objectcross _Gaugecurrent equationscurvecustom palettedashdatadata _Preview:data defaultdata property (multi select)defaultdelete %s (multi select)delete axis (single select)delete grid (multi select)delete objectdelete parameter (multi select)descriptiondi_ViSion:diagonaldirdirectiondirectorydotdot 2-dashdot dashdraw _Orderdraw _X griddraw _Y griddrawing %s (%.1f%%)drawobjduplicateduplicate _Behindeditedit data file (single select)enderrorerror, a parameter cannot be used in a user function or a constant definition.error, calculation error.error, cannot allocate enough memory.error, invalid parameter.error, the constant is already defined.error, the function cannot be used in a user function or a constant definition.error, unknown error.error, unknown function.errorbar_xerrorbar_yevaluationeven_odd_ruleexecute add-inexecute shellexpexpand _Directory:exponentialfilefile/rangefill _Rule:finalfitfit loadfit saveflipflip _Horizontallyflip _Verticallyfocus _Allfontfullfunctionfunctionsgraygridgrid defaultgrid property (multi select)heighthorizontalincinclude _Data fileinclude _Merge fileinverseleftlegendlegend arclegend gausslegend linelegend marklegend rectanglelegend textlenlineline widthlinearloadlocalelogmarkmark selectionmarker beginmarker endmathmath textmaxmergemerge file property (multi select)minmitermovemulti linemulti selectnameno_floating_pointno_zerononenormal display (4:3)normal1normal2numnumbering _Math:oblique1oblique2open fileorderoutput dataoutput imagepagepaper _Height:paper _Width:paper _Zoom:parallel1parallel2parameterparameter property (multi select)pastepathperiodpieslicepointpointspolypolygonpolygon_solid_fillpowptrangerectanglerectangle_fillrectangle_solid_fillregularrelativerightrotaterotate 9_0 degree counter-clockwiserotate _90 degree clockwiseroundsavesave as default (_Graph)save as default (_Settings)save defaultscalescale clearscale clear (multi select)scale trimmingscale undoscale undo (multi select)scale zoom (multi select)shift (_N):shift (_P):short dashsimplesingle linesingle selectsizeskipsolidsplinespline_closestaircase_xstaircase_ystartstepstopstroke/fillsyntax error, constant cannot be defined in a function definition.syntax error, function definition cannot be nested.syntax error, invalid argument.syntax error, invalid function definition.syntax error, unexpected end of equation, expecting ')'.syntax error, unexpected end of equation, expecting ']'.syntax error, unexpected end of equation, expecting '}'.syntax error, unexpected end of equation.syntax error, unexpected operator.syntax error, unexpected token.syntax error, unterminated string.syntax error, wrong number of arguments.texttext defaulttoptrimming (multi select)typeunchangeuse _Dark themeuse _External previeweruse custom _Paletteuserwaveweightedwide display (16:10)wide display (16:9)widthwinding_rulezoom _X:zoom _Y:zoom_xzoom_yProject-Id-Version: 6.08.07 Report-Msgid-Bugs-To: ZXB01226@nifty.com PO-Revision-Date: 2021-09-24 17:06+0900 Last-Translator: Ito Hiroyuki Language-Team: Ito Hiroyuki Language: ja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit %a 曜日の省略名. %A 曜日. %b 月の省略名. %B 月の完全な名前. %c %a %b %e %T %Y と同等. %C 世紀 (西暦年の上 2 桁). %d 月内通算日 (01 から 31). %e 月内通算日 (1 から 31). %F %Y-%m-%d と同等. %H 24 時間表記での時 (00 から 23). %I 14 時間表記での時 (01 から 12). %j 年の初めから通算の日数 (001 から 366). %k 24 時間表記での時 (0 から 23). %l 12 時間表記での時 (1 から 12). %m 月 (01 から 12). %M 分 (00 から 59). %n 改行. %p "AM" または "PM". %P "am" または "pm". %r %I:%M:%S %p と同等. %R %H:%M と同等. %S 秒 (00 から 60). %T %H:%M:%S と同等. %u 週の何番目の日か。月曜日を 1 とする (1 から 7). %w 週の何番目の日か。日曜日を 0 とする (0 から 6). %y 西暦の下2桁 (世紀部分を含まない年) (00 から 99). %Y 西暦年. %+ %a %b %e %T GMT %Y と同等. %% '%' 文字.%s (%d:%d) エラーの起きた場所: %s%s ファイル (*.%s)%sプロパティ (複数選択)二点鎖線%D データの番号%N データオブジェクトのインスタンス数ARC_OBJ arc オブジェクトのオブジェクト識別番号AVX (X) column の生データの平均AVY (Y) column の生データの平均AXISX 「X 軸」に指定された axis オブジェクトの IDAXISX_LEN 「X 軸」の長さAXISX_MAX 「X 軸」の最大値AXISX_MIN 「X 軸」の最小値AXISY 「Y 軸」に指定された axis オブジェクトの IDAXISY_LEN 「Y 軸」の長さAXISY_MAX 「Y 軸」の最大値AXISY_MIN 「Y 軸」の最小値BREAK 欠損データ (データ線は分断)COLX 「X カラム」に指定された数COLY 「Y カラム」に指定された数CONT 欠損データ (データ線は結合)DATA_OBJ data オブジェクトのオブジェクト識別番号E 自然対数の底EULER オイラーの定数FALSE 偽の値 (0)FILE_OBJ file オブジェクトのオブジェクト識別番号FILL_RULE_EVEN_ODD ポリゴンを偶奇則で塗りつぶす。 draw_polygon() 関数で利用する。FILL_RULE_NONE ポリゴンを塗りつぶさない。 draw_polygon() 関数で利用する。FILL_RULE_WINDING ポリゴンをワインディング則で塗りつぶす。 draw_polygon() 関数で利用する。FIRST diagonal, errorbar など一行のデータで 2回の変換が行われる場合、 1回目の呼出しで真(=1)、 2回目の呼出しで偽(=0)。FLINE 「最終行」に指定された行数HSKIP 「先頭スキップ行」に指定された行数MARK_OBJ mark オブジェクトのオブジェクト識別番号MASK 「マスク」に設定された行数MAXX (X) column の生データの最大値MAXY (Y) column の生データの最大値MINX (X) column の生データの最小値MINY (Y) column の生データの最小値MOVE 「移動」に設定された行数NAN 欠損データエラー表示NUM データの個数PATH_OBJ path オブジェクトのオブジェクト識別番号PI 円周率RECT_OBJ rectangle オブジェクトのオブジェクト識別番号RSTEP 「読込ステップ行」に指定された行数STDEVPX (X) column の生データの標準偏差STDEVPY (Y) column の生データの標準偏差STDEVX (X) column の生データの不偏標準偏差STDEVY (Y) column の生データの不偏標準偏差SUMX (X) column の生データの和SUMXX (X) column の生データの二乗和SUMXY (X) column, (Y) column の生データの積和SUMY (Y) column の生データの和SUMYY (Y) column の生データの二乗和TEXT_OBJ text オブジェクトのオブジェクト識別番号TRUE 代表的な真の値 (1)UNDEF 欠損データエラー非表示abs(x) xの絶対値acos(x) 逆コサインacosh(x) 逆ハイパボリックコサインalpha(x, i) A (i == 1) または A2 (i == 1) 値を x (0≦x<256)に設定 i == 0 のときは A, A2 値を x (0≦x<256)に設定am(a) 配列 a の内容をメモリーにコピーする (戻り値はコピーした要素数)and(x, y) (x≠0) and (y≠0) のとき真(=1)array(a, v1, v2, ...) 配列 a を残りの引数で初期化する。 配列の要素数を返す。array_average(a) 配列 a の要素の平均を返すarray_clear(a) 配列 a の配列の要素数を 0 にするarray_compact(a) 配列 a の配列の要素から通常の数値以外を取り除き、取り除いた後の要素数を返すarray_copy(dest, src) 配列 src の内容を配列 dest にコピーする (戻り値はコピーした要素数)array_max(a) 配列 a に含まれる最大の値を返すarray_min(a) 配列 a に含まれる最小の値を返すarray_moving_average(dest, src, n, type) 配列 src の隣接平均を計算し、配列 dest に格納する。 隣接平均の計算に使われるデータ数を n で指定する (1 の時、前後1つのデータと合わせて3つのデータの平均がとられる)。 type が 0 の時は単純移動平均、1 の時は加重移動平均を計算する。array_stdev(a) 配列 a の要素の不偏標準偏差を返すarray_stdevp(a) 配列 a の要素の標準偏差を返すarray_sum(a) 配列 a の要素の和を返すarray_sumsq(a) 配列 a の要素の自乗和を返すasin(x) 逆サインasinh(x) 逆ハイパボリックサインatan(x) 逆タンジェントatanh(x) 逆ハイパボリックタンジェントbeta(x, y) ベータ関数choose(n, m) 組み合わせ nCm = n!/(m!(n-m)!)cm(x, n) 先頭からn個のメモリーを x で初期化する n が 0 のときはメモリー全体を x で初期化する n が負のときは末尾から n 個のメモリーを x で初期化する (戻り値は x)color(i, x) i = 0: R 値を x (0 <= x < 256) に設定 i = 1: G 値を x (0 <= x < 256) に設定 i = 2: B 値を x (0 <= x < 256) に設定 i = 3: R, G, B 値を x (0 <= x < 256) に設定 i = 4: R2 値を x (0 <= x < 256) に設定 i = 5: G2 値を x (0 <= x < 256) に設定 i = 6: B2 値を x (0 <= x < 256) に設定 i = 7: R2, G2 and B2 値を x (0 <= x < 256) に設定 i = 8: x を16進数のカラーコードとして R, G, B 値に設定 i = 9: x を16進数のカラーコードとして R2, G2, B2 値に設定cos(x) コサインcosh(x) ハイパボリックコサインdelta(x) クロネッカーのδ(x = 0 のとき 1, それ以外は 0)dif(x) 差分draw_arc(x, y, rx, ry, start, angle, pieslice, stroke, fill, close) (x, y) を中心とし X 方向半径 rx, Y 方向半径 ry の円弧を描画する。 start, angle で開始角、円弧角を指定する。 stroke, fill が 0 の場合はそれぞれ輪郭、塗りつぶしを描画しない。 pieslice が 0 以外の場合は扇形を描画する。 close が 0 以外の場合は輪郭を閉じる。draw_errorbar2(x1, y1, x2, y2, size) (x1, y1) から (x2, y2) に誤差棒を描画する。 size で tick の長さを指定できる。 size が 0 のときはファイルオブジェクトのサイズ指定が使われる。draw_errorbar(x, y, erx, ery, size) (x - erx, y) から (x + erx, y) および (x, y - ery) から (x, y + ery) に誤差棒を描画する。 size で tick の長さを指定できる。 size が 0 のときはファイルオブジェクトのサイズ指定が使われる。draw_line(x1, y1, x2, y2, arrow, size) (x1, y1) から (x2, y2) に直線を描画する。 arrow が 1, 2, 3 の時は、それぞれ終点、始点、両端に矢印を描画する。 size で矢印の大きさを指定できる。 size が 0 のときはファイルオブジェクトのサイズ指定が使われる。draw_mark(x, y, size) (x, y) にマークを描画する。 size でマークのサイズを指定できる。 size が 0 のときはファイルオブジェクトのサイズ指定が使われる。draw_polygon(ax, ay, stroke, fill) 座標 (ax[0], ay[0]), (ax[1], ay[1]), ... で囲まれた領域を描画する。 stroke が 0 の場合は輪郭を描画しない。 fill には次の定数を指定できる。 FILL_RULE_NONE, FILL_RULE_EVEN_ODD, FILL_RULE_WINDINGdraw_polyline(ax, ay) 座標 (ax[0], ay[0]), (ax[1], ay[1]), ... を直線で結ぶ。draw_rect(x, y, w, h, stroke, fill) (x, y) と (x + w, y + h) を対角の頂点とする矩形を描画する。 stroke, fill が 0 の場合はそれぞれ輪郭、塗りつぶしを描画しない。draw_text($str, x, y, dir) (x, y) に文字列 $str を描画する。 dir で方向を指定できる。draw_text_raw($str, x, y, dir) (x, y) に文字列 $str をそのまま描画する。 dir で方向を指定できる。each(a, item, ex) 配列 a の各要素に対して、式 ex を評価する。 配列の各要素は、第二引数に指定した変数 (item) で参照できる。each_with_index(a, item, index, ex) 配列 a の各要素に対して、式 ex を評価する。 配列の各要素は、第二引数に指定した変数 (item) で参照できる。 繰り返しのカウンタは、第三引数に指定した変数 (index) で参照できる。ei(x) 積分指数関数 Ei(x)eq(x, y, prec) x == y のとき真(=1)。 prec で比較の桁数を指定できる (prec == 0 は完全一致)。erf(x) 誤差関数 erf(x)erfc(x) 相補誤差関数 erfc(x)exp(x) 指数関数 (x≦690)expm1(x) exp(x)-1 x の値が 0 に近い場合でも正確に計算できる方法が用いられる。filename($str, basename) 変数 $str にデータオブジェクトのファイル名を代入する。 変数 basename が 0 以外の場合は ファイル名からディレクトリ部分を取り除く。 正しい UTF-8 文字列の場合、文字列の文字数を返す。filter(dest, src, item, ex) 配列 src の各要素に対して、式 ex を評価して その結果が真である要素を配列 dest に設定する。 配列の各要素は、第三引数に指定した変数 (item) で参照できる。find(a, item, ex) 配列 a の各要素に対して、式 ex を評価して その結果が真である最初の要素を返す。 配列の各要素は、第二引数に指定した変数 (item) で参照できる。fit_calc(id, x) ID が id の data オブジェクトのプロットタイプが fit のとき、 対応する fit 結果 f(x) を計算する。fit_prm(id, x) ID が id の data オブジェクトのプロットタイプが fit のとき、 対応する fit object のフィールド "%0x" の値。fmod(x, y) xy で割った浮動小数点剰余for(m, begin, end, step, ex) 第mメモリーの値に begin から end まで step で値を設定し、 ex を繰り返す。 m が負の時はメモリーへの設定は行われない。 最後に評価された ex の値を返す。frac(x) x の小数部gamma(x) ガンマ関数 Γ(x)gauss(x) ガウスの記号[ ] ([x]はxを越えない最大の整数)ge(x, y, prec) xy のとき真(=1)。 prec で比較の桁数を指定できる (prec == 0 は桁数指定なし)。getobj($obj, $field, id) ID が id のオブジェクト $obj のフィールド $field の値を返す。 field type が int, bool, enum, double の場合に利用できる。getobj_array(array, $obj, $field, id) ID が id のオブジェクト $obj のフィールド $field の値を array に代入する。 field type が char*[], double[], int[] の場合に利用できる。 設定した配列の要素数を返す。getobj_string($str, $obj, $field, id) ID が id のオブジェクト $obj のフィールド $field の値を $str に代入する。 field type が char* の場合に利用できる。 正しい UTF-8 文字列の場合、文字列の文字数を返す。gt(x, y, prec) xy のとき真(=1)。 prec で比較の桁数を指定できる (prec == 0 は桁数指定なし)。hn(n, x) エルミート多項式hsb2(h, s, b) R2, G2, B2 の値をHSB値 h, s, b (0≦h, s, b≦1)から設定hsb(h, s, b) R, G, B の値をHSB値 h, s, b (0≦h, s, b≦1)から設定icbeta(a, b, x) 不完全ベータ関数 I(a, b, x) (0 ≦ x ≦ 1) icgam(m, x) 不完全ガンマ関数 Γ(m, x)if(x, ex1, ex2) x ≠ 0 のとき ex1, x == 0 のとき ex2in(n, x) 第1種n次変形ベッセル関数 In(|x|)index(a, item, ex) 配列 a の各要素に対して、式 ex を評価して その結果が真である最初の位置を返す。 配列の各要素は、第二引数に指定した変数 (item) で参照できる。int(x) 0に向かって切捨てた整数部inu(nu, x) 第1種nu次変形ベッセル関数 (nu は正の実数) Inu(|x|)isbreak(x) xBREAK の場合真iscont(x) xCONT の場合真isnan(x) xNAN の場合真isnormal(x) x が通常の数値の場合真isundef(x) xUNDEF の場合真jl(l, x) 第1種l次球ベッセル関数 jl(|x|)jn(n, x) 第1種n次ベッセル関数 Jn(|x|)jnu(nu, x) 第1種nu次ベッセル関数 (nu は正の実数) Jnu(|x|)kn(n, x) 第2種n次変形ベッセル関数 Kn(|x|)knu(nu, x) 第2種nu次変形ベッセル関数 (nu は正の実数) Knu(|x|)le(x, y, prec) xy のとき真(=1)。 prec で比較の桁数を指定できる (prec == 0 は桁数指定なし)。lgn(n, a, x) ラゲール倍多項式line_number() 処理中のファイル行番号 (1行目が1)ln1p(x) ln(1+x) x の値が 0 に近い場合でも正確に計算できる方法が用いられる。ln(x) 自然対数log1p(x) log(1+x) x の値が 0 に近い場合でも正確に計算できる方法が用いられる。log(x) 常用対数lt(x, y, prec) xy のとき真(=1)。 prec で比較の桁数を指定できる (prec == 0 は桁数指定なし)。m(i, x) 引数を第iメモリーに代入する(i=0〜65535) i が負のときは末尾からのインデックス (戻り値は x)map(dest, src, item, ex) 配列 src の各要素に対して、式 ex を評価し、 その結果を配列 dest に設定する。 配列の各要素は、第三引数に指定した変数 (item) で参照できる。marksize(x) マークのサイズをxに設定marktype(x) マークの種類をxに設定max(a, b, c, ...) 引数のうちもっとも大きな値min(a, b, c, ...) 引数のうちもっとも小さな値mjd2day(mjd) 修正ユリウス日に対応するグレゴリオ暦の日mjd2month(mjd) 修正ユリウス日に対応するグレゴリオ暦の月mjd2unix(mjd) 修正ユリウス日 mjd の1970年1月1日00:00:00 UTC からの経過秒数 (うるう秒は考慮されない)mjd2wday(mjd) 修正ユリウス日に対応するグレゴリオ暦の曜日 (1:月曜日から 7:日曜日)mjd2yday(mjd) 修正ユリウス日に対応するグレゴリオ暦の 1 月 1 日からの通算日数 (1 から 366)mjd2year(mjd) 修正ユリウス日に対応するグレゴリオ暦の年mjd(year, month, day, hour, min, sec) 修正ユリウス日(year, month, day はグレゴリオ暦、hour, min, sec は UTC 時刻)mtime() ファイルの最終修正時刻を返す。neq(x, y, prec) xy のとき真(=1)。 prec で比較の桁数を指定できる (prec == 0 は完全一致)。not(x) x == 0 のとき真(=1)obj_alpha(id, obj) A, A2 値を ID が idobj で指定したオブジェクトと同じ値にする。 objDATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ, TEXT_OBJ のいずれか。obj_color(id, obj) R, G, B, R2, G2, B2 値を ID が idobj で指定したオブジェクトと同じ値にする。 objDATA_OBJ, PATH_OBJ, ARC_OBJ, MARK_OBJ, TEXT_OBJ のいずれか。end_proc(proc) data オブジェクトの描画終了時にprocを評価する。or(x, y) (x≠0) or (y≠0) のとき真(=1)parameter(id) ID が id の parameter オブジェクトの設定値を返すpn(l, x) ルジャンドル多項式pop(a, n) 配列 a から末尾のn要素を取り除く (n = 0 は n = 1 と同義)。 操作後の配列の要素数を返す。printf($format, v1, v2, ...) 数値 v1, v2, ...$format に従い 文字列に変換して information window に表示する。 変換された文字列の文字数を返す。prog1(arg1, arg2, ...) 引数を評価し、最初の引数の値を返すprog2(arg1, arg2, ...) 引数を評価し、2 番目の引数の値を返すprogn(arg1, arg2, ...) 引数を評価し、最後の引数の値を返すpush(a, x) 配列 a の末尾に x を追加する。 操作後の配列の要素数を返す。puts($str) $str を information window に表示する。 $str に含まれる文字数を返す。qinv(x) 誤差関数 erfc(x) の逆関数rand(x) 0≦rand(x)<x (x>0のとき)の乱数reduce(a, item, result, ex) 配列 src の各要素に対して、式 ex を評価し、最後の評価結果返す。 配列の各要素は、第二引数に指定した変数 (item) で参照できる。 前回の繰り返しにおける計算結果は、第三引数に指定した変数 (result) で参照できる。rgb2(r, g, b) R2, G2, B2 値をそれぞれ r, g, b (0≦r, g, b≦1)に設定rgb(r, g, b) R, G, B 値をそれぞれ r, g, b (0≦r, g, b≦1)に設定rm(i) 現在の第iメモリーの値(i = 0〜65535) i が負のときは末尾からのインデックスround(x, digit) xを四捨五入した値を返す。 digit で四捨五入した結果の桁数を指定できる。rsort(a, ignore_case) 配列 a を逆順に整列する aが文字列の配列で ignore_case が 0 以外の場合は 文字列に含まれる ascii 文字の 大文字小文字を区別せずに比較する。shift(a) 配列 a の先頭のn要素を取り除く (n = 0 は n = 1 と同義)。 残りの要素は前に詰められる。 操作後の配列の要素数を返す。sign(x) 正負の符号 (x < 0 で -1、x ≧ 0 で 1)sin(x) サインsinh(x) ハイパボリックサインsize(a) 配列 a の要素数sort(a, ignore_case) 配列 a を整列する aが文字列の配列で ignore_case が 0 以外の場合は 文字列に含まれる ascii 文字の 大文字小文字を区別せずに比較する。sprintf($str, $format, v1, v2, ...) 数値 v1, v2, ...$format に従い 文字列に変換して $str に代入する。 変換された文字列の文字数を返す。sqr(x) 二乗sqrt(x) 平方根srand(x) rand() 関数で作られる疑似乱数系列の新しい種を設定する。strftime($str, $fmt, t, utc) 時刻 t (紀元からの経過秒数)を $fmt で 指定された書式指定にしたがって変換し、 文字列 $str に書き込む。 utc が偽 (0) の時はローカル時刻、 それ以外の場合は協定世界時 (UTC) に変換する。string($str, value) 数値 value を文字列に変換して $str に代入する。 value を返す。string_append($dest, $src) 文字列 $dest の最後に文字列 $src を連結する。string_column($dest, index) データファイルを読み込んだ時に index カラムの 文字列を $dest に代入する。 index が 0 のときは行全体の文字列が代入される。string_compare($str1, $str2, ignore_case) 2つの文字列 $str1$str2 を比較して $str1$str2 に較べて 1)小さい、2)等しい、3)大きい場合に、 ゼロよりも 1)小さい、2)等しい、3)大きい整数を返す。 ignore_case が 0 以外の場合は文字列に含まれる ascii 文字の 大文字小文字を区別せずに比較する。string_down($dest, $src) 文字列 $src に含まれる ascii 文字を小文字にした 文字列を $dest に代入する。string_erase($str, pos, len) 文字列 $str から、pos 文字目から始まる len 文字を削除する。 UTF-8 以外の文字列では使えない。string_float($str) $str を浮動小数点に変換し、その値を返す。string_float_array(dest, $ary) 配列 $ary の各要素を浮動小数点に変換し、 その値を配列 dest に代入する。string_insert($dest, $src, pos) 文字列 $destpos 番目の文字の前に文字列 $src を挿入する。string_join($dest, $sep, $array) 文字列の配列 $array の各要素を連結して $dest に代入する。 各要素のあいだには、文字列 $sep が挿入される。string_length($str) $str に含まれる文字数を返す。 UTF-8 以外の文字列では使えない。string_match($str, $regexp, ignore_case) 文字列 $str に対して、文字列 $regexp が表す正規表現によるマッチングを行う。 マッチした場合は 0 以外の数値、マッチしなかった場合は 0 を返す。 ignore_case が 0 以外の場合は文字列に含まれる ascii 文字の大文字小文字を区別せずに比較する。string_prepend($dest, $src) 文字列 $dest の最初に文字列 $src を連結する。string_replace($dest, $src, $regexp, $replacement, ignore_case) 文字列 $src 中の、文字列 $regexp が表す正規表現にマッチする 文字列を $replacement で置換した文字列を $dest に代入する。 ignore_case が 0 以外の場合は文字列に含まれる ascii 文字の大文字小文字を区別せずに比較する。string_reverse($dest, $src) 文字列 $src の並びを逆にした文字列を $dest に代入する。 UTF-8 以外の文字列では使えない。string_split($dest, $src, $separator, use_regexp) 文字列 $src を文字列 $separator で分割し、 分割された文字列を配列 $dest に代入する。 use_regexp が 0 以外の場合 $separator は 正規表現として扱われる use_regexp が 2 の場合、文字列に含まれる ascii 文字の大文字小文字を区別せずに分割する。string_split_float(dest, $src, $separator, use_regexp) 文字列 $src を文字列 $separator で分割し、 分割された文字列を浮動小数点に変換して配列 dest に代入する。 use_regexp が 0 以外の場合 $separator は 正規表現として扱われる use_regexp が 2 の場合、文字列に含まれる ascii 文字の大文字小文字を区別せずに分割する。string_strip($str) 文字列 $str の先頭、最後にある空白文字を削除する。string_substring($dest, $src, start, end) 文字列 $srcpos 文字目から始まり end 文字までからなる 文字列を $dest に代入する。 UTF-8 以外の文字列では使えない。string_truncate($str, len) 文字列 $str の先頭 len 文字以降を削除する。 UTF-8 以外の文字列では使えない。string_up($dest, $src) 文字列 $src に含まれる ascii 文字を大文字にした 文字列を $dest に代入する。sum(x) 積算sumsq(a, b, c, ...) 引数の自乗和tan(x) タンジェントtanh(x) ハイパボリックタンジェントtext_align(x, y) 文字列を描画するときの位置合わせを指定する。 xy は文字列の描画方向およびそれと直行する方向の位置を表す。 (0 ≦ x, y ≦ 1)text_font(font) 描画する文字列のフォントを設定する。 font は 0, 1, 2 がそれぞれ "Sans-serif", "Serif", "Monospace" に対応する。text_obj_get(id, $text) $text に ID が id の text オブジェクトの文字列を設定する。text_obj_set(id, $text) ID が id の text オブジェクトの文字列を $text に設定する。text_size(pt, space, script) 描画する文字列のサイズなどを設定する。 pt でフォントサイズを指定できる。 続く引数で文字間隔、スクリプトサイズを指定できる。text_style(style) 描画する文字列のスタイルを設定する。 style は 0, 1, 2, 3 がそれぞれ "normal", "bold", "italic", "bold-italic" に対応する。theta(x) 階段関数(x≧0 のとき 1, それ以外は 0)time() 紀元 (1970年1月1日00:00:00 UTC) からの経過時間を秒単位で返す。times(n, index, ex) 式 exn 回評価する。 繰り返しのカウンタは、第二引数に指定した変数 (index) で参照できる。tn(n, x) チェビシフ多項式unix2mjd(time) 修正ユリウス日 (time は 1970年1月1日00:00:00 UTC からの経過秒数、うるう秒は考慮されない)unless(x, ex1, ex2) x ≠ 0 のとき ex2, x = 0 のとき ex1unshift(a, x) 配列 a の先頭に x を挿入する。 操作後の配列の要素数を返す。xor(x, y) (x≠0) xor (y≠0) のとき真(=1)yl(l, x) 第2種l次球ベッセル関数yn(n, x) 第2種n次ベッセル関数ynu(nu, x) 第2種nu次ベッセル関数 (nu は正の実数)zeta(s) リーマンゼータ関数ζ(s)zeta_int(n) リーマンゼータ関数ζ(n) (n は整数)zetam1(s) リーマンゼータ関数ζ(s) - 1zetam1_int(n) リーマンゼータ関数ζ(n) - 1 (n は整数)zip(a1, a2, item1, item2, ex) 配列 a1, a2 の各要素に対して、式 ex を評価する。 配列の各要素は、第3, 第4引数に指定した変数 (item1, item2) で参照できる。zip_map(dest, src1, src2, item1, item2, ex) 配列 asrc1, src2 の各要素に対して、式 ex を評価し、 その結果を配列 dest に設定する。 配列の各要素は、第4, 第5引数に指定した変数 (item1, item2) で参照できる。%sについて動作追加データ追加データの追加合成ファイルの追加データファイルの追加アドインスクリプトスクリプト設定スクリプト交差位置(_P):フォント別名が既に存在します.位置合わせ下端揃え(_B)横中央揃え(_H)左揃え(_L)右揃え(_R)上端揃え(_T)縦中央揃え(_V)全てのファイル代替フォント代替フォント円矢印軸軸 %d %s_X 軸:_Y 軸:軸選択軸の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)軸トリミング軸スケールのトリミング (+SHIFT:微動)軸基線の色目盛線の色目盛数字の色軸基線太字Cairo EMF 出力Cairo EPS 出力Cairo PDF 出力Cairo PNG 出力Cairo PS 出力Cairo SVG 出力チェックボタンスケールのクリアクリップパスを閉じる色色 1色 2コンボボックス確認選択したオブジェクトをクリップボードにコピー作成科学技術用 2D グラフ作成交差グラフ交差グラフ切り取り(_T)現在のディレクトリ:任意選択したオブジェクトをクリップボードにカットデータ選択データ %d (配列)データ %d (ファイル)データ%d (範囲)データの選択データの保存データは移動されました.削除プロファイル '%s' を削除しますか?選択したオブジェクトの削除方向方向:下へ描画X 描画範囲軸基線描画(_B)ビューアに描画描画中描画中選択したオブジェクトを複製E_MF ファイルエラーエラー:データ評価データ評価データ点の評価データ評価中データ評価中交換実行中 `%.128s'.エグゼクティブ (184.2x266.7)展開ディレクトリ外部プログラム外部ビューア塗りつぶし塗りつぶし色ルールフィット %dフィット結果フォントフォントフォントサイズフォーマットフレームグラフフレームグラフフレーム/方眼グラフ合成ファイルの保存目盛線ガウス関数ガウス関数高さ(_H):幅(_W):作成したグラフは、PostScript、SVG、PNGまたはPDF形式にエクスポートすることができます。グリッド %d%s を非表示他のウィンドウを隠す入力%s に 'Ngraph.ini' をインストールしますか?インスタンス名斜体ジョイン横(_A)リーガル (215.90x355.60)レジェンドガウス関数/ローレンツ関数/双曲線/三角関数 %dLegend選択Legend の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)Legend, 軸の選択 (+SHIFT:複数選択 / +CONTROL:水平/垂直移動 +SHIFT:微動)円 %d直線 %dマーク %d矩形 %dテキスト %dレター (215.90x279.40)行線種線幅線種(_S):線種リンクNGPファイルの読み込みNGPファイルを開くグラフ(NGPファイル)を開くグラフの読込読込中 `%.128s'.ベキ形式(ログ)最背面に移動MJDアプリケーションウィンドウ合成ファイル作成中データファイル作成中データファイル作成中マークマークサイズ始点マーカ終点マーカ変換式の一括入力X 変換式Y 変換式合成 %dメッセージその他データの移動はキャンセルされました.交差グラフの新規作成 (+SHIFT:微動 +CONTROL: 縦横を整数比にする)フレームグラフの新規作成 (+SHIFT:微動 +CONTROL:縦横を整数比にする)円の新規作成 (+SHIFT:微動 +CONTROL:真円または縦横が整数比の楕円)ガウス関数等の新規作成 (+SHIFT:微動 +CONTROL:縦横を整数比にする)マークの新規作成 (+SHIFT:微動)パスの新規作成 (+SHIFT:微動 +CONTROL:角度をスナップ)矩形の新規作成 (+SHIFT:微動 +CONTROL:正方形または縦横が整数比の矩形)テキストの新規作成 (+SHIFT:微動)方眼グラフの新規作成 (+SHIFT:微動 +CONTROL:縦横を整数比にする)単体軸の新規作成 (+SHIFT:微動 +CONTROL:角度をスナップ)Ngraph は理工系学生、研究者、技術者のために作られた2次元グラフ作成プログラムです。Ngraph-GTKNgraph.ini をコピーできませんでした.Ngraph.ini が見つかりません.Ngraph.ini に書き込めませんでした.設定がありません.目盛数字オブジェクト開くファイルを開く複数のファイルを開く既存のプロファイルに上書きしますか?P_DF ファイルP_NG ファイルページの設定(_U)パラメータ %dクリップボードのオブジェクトを貼り付けパス停止開始フォント別名を指定してください.スクリプトの説明を設定してください.スクリプトファイル名を設定してください.スクリプト名を設定してください.プロファイルを設定してください.選択選択位置印刷プレビュー(_V)印刷グラフを印刷印刷エラー: %s印刷中質問%s を終了アプリケーションの終了範囲最近使用したデータファイル最近使用したグラフ矩形直前に取り消した操作をやり直すリピート最前面に移動NGPファイル保存NGPファイルの保存名前をつけて保存(_A)Ngraph.ngp として保存別名で保存グラフの保存保存メニューグラフの保存グラフに名前をつけて保存保存中 `%.128s'.スケールスケールアンドゥスケールズームスケールクリア(_C)スケールアンドゥ(_U)スケールズーム(_Z)軸スケール設定中データ検索中方眼グラフ方眼グラフ選択すべて選択(_A)プログラム選択サービス変換式の一括入力設定ファイルが見つかりません.全て表示クロスゲージを表示キーボードショートカットの表示ヘルプの表示単体軸単一軸(_A)単体軸サイズ外部ビューアに出力中スピンボタンストロークストローク色スタイルスイッチテキストプロファイル '%s' は削除されました.プロファイル '%s' は存在しません.プロファイル '%s' は保存されました.ファイルに不正な UTF-8 文字列が含まれています.このグラフは変更されています. 保存しますか?最初の値へ最後の値へ遷移軸トリミングタイプスケール設定を戻す直前の操作を取り消す新規グラフ上へユーザ定義ビューアビューアズームビューアのズームイン (+CONTROL:ズームアウト +SHIFT:センタリング)波型高さ(_H):幅(_W):X:%.2f Y:%.2f %s%sタイプ:%-2dゼロ表示ビューアズームこのアプリケーションについて(_A)アクティブ (初期状態) (_A)追加(_A)+追加(_A)アドイン(_A)アドイン設定(_A)アドイン設定(_A)アドイン(_A):交差軸(_A):フォント別名(_A):位置合わせ(_A)位置合わせ(_A):全て(_A)全てクリア(_A)開始角(_A):円弧角(_A):アンチエイリアス(_A):全てに適用(_A)円(_A)配列(_A):長さ(_A):幅(_A):自動スケール(_A):自動スケール余白(_A):平均化手法(_A):軸(_A)軸グリッド初期状態(_A)背景色(_B)背景色(_B):軸基線(_B)開始点(_B):太字(_B)最後へ(_B)CSV形式キャンセル(_C)カレントディレクトリを移動(_C)"カレントディレクトリを移動"をチェック(_C)クリア(_C)Information 表示をクリア(_C)クリップ(_C)クリップボード (EMF) (_C) 閉じる(_C)パスを閉じる(_C)色 1(_C):色 2(_C):色2(_C):色(_C):コマンドツールバー(_C)収束(%) (_C):テキストをパスに変換(_C)_Coordinate 表示(_C):コピー(_C)設定のコピー(_C)交差グラフ(_C)現在のディレクトリ(_C)曲線(_C):データ(_D)データファイル初期状態(_D)日時書式(_D):小数点記号(_D):小数点記号の既定値(_D):削除(_D)デモ(_D)微分式指定(_D)説明(_D):多項式次元(_D):方向(_D):分割数(_D):分割数(_D):下へ(_D)描画(_D)描画順(_D)複製(_D)_EPS ファイル編集(_E)カスタムパレットの編集(_E)エディター(_E):展開ディレクトリ(_E):データファイルの展開(_E)データファイルの展開(データ込 NGP ファイル) (_E)画像にエクスポート(_E)外部ビューアー設定(_E)外部ビューア(_E)ファイル(_F)ファイル名(_F):塗りつぶし(_F)最終行(_F):フィット(_F):反転(_F)フォーカス(_F)フォント(_F)フォント別名(_F)フォント(_F):フィット式(_F):小数部桁数(_F):フレームグラフ(_F)_GRA ファイル目盛線(_G)位置(_G):ガウス関数(_G)グラフ(_G)ギリシャ文字(_G)グリッド(_G)グリッド(_G):先頭スキップ行(_H):先頭(_H):高さ(_H):ヘルプ(_H)ヘルプ・ブラウザ(_H):区切文字(_I):増分(_I):データファイルを含める(_I)合成ファイルを含める(_I)_Information 表示:初期値(_I):挿入(_I)インスタンス名(_I)補完(_I)補完法(_I):斜体(_I)項目(_I):ジョイン(_J):キーボードショートカット(_K)左マージン(_L):左マージン(_L):レジェンドテキスト初期状態(_T)長さ %d(_L):データプレビューの行数(_L):information 表示の行数(_L):長さ(_L):線幅(_W):フォーカスフレームの線種(_L):線幅(_W):新規行(_L):読込(_L)再描画時にデータファイル読み込み(_L)開く(_L)ファイルから設定読込(_L)ベキ形式(ログ)(_L)ローレンツ関数(_L)マーク(_M)マーク(_M):マーカ(_M):マスク(_M)変換数式(_M)変換式の一括入力(_M)数学(_M)最大値(_M):再描画時の最大データ数(_M):最大値(_M):合成(_M)最小値(_M):最小値(_M):その他(_M)マイター(_M):移動(_M)名称(_N):新規作成(_N)Ngraphシェル(_N)いいえ(_N)個数(_N):目盛数字(_N)位置(_N):_OKオブジェクト(_O)オブジェクト(_O)開く(_O)オプション(_O):向き(_O):_PS ファイル用紙(_P):双曲線(_P)パラメータ(_P)貼り付け(_P)パス(_P)パス情報(_P):物理(_P)扇型(_P)_Plainプロット(_P)ポイント(_P):座標(_P):縦(_P)位置(_P)位置(_P):ポストスクリプトレベル(_P):設定(_P)設定(_P)線幅と線種を保持する(_S)印刷(_P)プロフィール(_P):プロパティ(_P)ポイント(_P):終了(_Q)_R 軸範囲(_R)_Raw読込ステップ行(_S):最近使用したファイル(_R)矩形(_R)やり直し(_R)やり直し: %s (_R)再描画(_R)参照軸(_R):コメント行(_R):削除(_R)フィット結果(_R)回転(_R)ルーラー(_R)_SVG バージョン:_SVG ファイル保存(_S)初期値に設定(_S)データの保存(_S)スケール(_S)スケール法(_S):スクリプトファイル(_S):スクリプトサイズ(_S):スクリプトサイズ(_S):スクロールバー(_S)方眼グラフ(_S)ディレクトリ選択(_S):選択項目(_S):エクスポート時にデータ選択ダイアログを表示(_S)サイドバー(_S)三角関数(_S)補完履歴のサイズ(_S):サイズ(_S):数式変換入力の表示スタイル(_S):文字間(_S):開始(_S):ステータスバー(_S)間隔(_S):停止(_S)終了(_S):ストローク(_S)線種 %d(_S):線種(_S):表(_T) 後続(_T):テキスト(_T)テキスト(_T):通過点(_T)タイトル(_T):ツールボックス(_T)先頭へ(_T)上マージン(_T):上マージン(_T):タイプ(_T):_U 軸元に戻す(_U)元に戻す: %s (_U)上へ(_U)不透明度を使う(_U)表示(_V)ビューア(_V)ウェイト(_W):長さ(_W):線幅(_W):重み付け(_W):線幅 %d(_W):幅(_W):_Wrap_X 軸_X 軸:_X カラム:_X 変換式_X 変換数式:_X 隣接平均:_Y 軸_Y 軸:_Y カラム:_Y 変換式_Y 変換数式:_Y 隣接平均:はい(_Y)ゼロ表示(_Z):ズーム(_Z):'%s' というファイルは既に存在します. 上書きしてもよろしいですか?「範囲」の追加別名位置合わせ代替フォント開始角円弧角円配列矢印自動自動スケール自動スケール (複数選択)x軸軸軸プロパティ (単一選択)グリッドy軸棒塗りつぶし横棒塗りつぶし縦棒実横棒実縦棒空横棒空縦棒ファイル名のみ始点斜結合両方Bスプライン閉Bスプライン中央データを閉じる (複数選択)合成ファイルを閉じる (複数選択)色コンマ定数設定のコピー(単一選択)オブジェクトの作成クロスゲージ(_G)現在の数式曲線カスタムパレット鎖線データデータプレビュー(_P):データファイル初期状態データプロパティ (複数選択)デフォルト%s削除 (複数選択)軸削除 (単一選択)グリッド削除 (複数選択)オブジェクトの削除パラメータ削除 (複数選択)説明分割数(_V):対角線方向方向現在のディレクトリ点線一点二鎖線一点鎖線描画順(_O)_X グリッド描画_Y グリッド描画%s 描画中 (%.1f%%)描画オブジェクト複製直後に複製(_B)編集データファイルの編集 (単一選択)終点エラー数式エラー, パラメータはユーザー関数中や定数宣言では使用できません.エラー, 計算エラー.エラー, 十分なメモリーを確保できませんでした.数式エラー, 不正なパラメータです.数式エラー, この定数は既に存在します.数式エラー, この関数はユーザー関数中や定数宣言では使用できません.数式エラー, 未知のエラーです.数式エラー, 未定義の関数です.横誤差棒縦誤差棒データ評価偶奇アドインの実行シェルの実行指数関数展開ディレクトリ(_D):指数移動平均ファイルファイル/式ルール(_R):最終行フィットフィット設定読込フィット設定保存反転水平反転(_H)垂直反転(_V)全てフォーカス(_A)フォントフルパス関数関数グレイスケールグリッドグリッド初期状態グリッドプロパティ (複数選択)高さ水平増分データファイルを含める(_D)合成ファイルを含める(_M)逆数左レジェンド円ガウス関数等直線マーク矩形テキスト長さ直線線幅線形読込ロケール対数マークマーク選択始点終点変換数式数式入力最大合成合成プロパティ (複数選択)最小角結合移動複数行入力複数選択名前整数表示ゼロ非表示なし標準画面 (4:3)軸と直交1軸と直交2データ数変換数式(_M):軸と斜交1軸と斜交2ファイルを開く描画順の変更データ出力画像ファイル出力ページ用紙高さ(_H):用紙幅(_W):拡大率(_Z):軸と平行1軸と平行2パラメータパラメータプロパティ (複数選択)貼り付けパスピリオド扇型小数点点数多項式多角形実多角形べき関数ポイント範囲矩形塗りつぶし矩形実矩形通常表示相対パス右回転9_0° 反時計回り回転_90° 時計回り回転丸結合保存初期状態としてセーブ(グラフ)(_G)初期状態としてセーブ(各種設定)(_S)初期状態としてセーブ拡大・縮小スケールクリアスケールクリア (複数選択)軸トリミングスケールアンドゥスケールアンドゥ (複数選択)スケールズーム (複数選択)垂直シフト量(_N):並行シフト量(_P):短鎖線単純移動平均1行入力単一選択サイズスキップ実線スプライン閉スプライン縦階段横階段開始ステップ終了ストローク・塗りつぶし構文エラー, 関数定義内で定数の宣言は出来ません.構文エラー, 関数定義はネストできません.構文エラー, 不正な引数です.構文エラー, 不正な関数定義です.構文エラー, 予期しない数式の終わりです. ')' がありません.構文エラー, 予期しない数式の終わりです. ']' がありません.構文エラー, 予期しない数式の終わりです. '}' がありません.構文エラー, 予期しない数式の終了.構文エラー, 予期しない演算子です.構文エラー, 予期しないトークンです.構文エラー, 終端のない文字列です.構文エラー, 引数の数が間違っています.テキストレジェンドテキスト初期状態上トリミング (複数選択)タイプ変更しないダークテーマを使う (_D)外部プログラムを使用する(_E)カスタムパレットを使う(_P)ユーザ定義波型加重移動平均ワイド画面 (16:10)ワイド画面 (16:9)幅ワインディング_X ズーム:_Y ズーム:X ズームY ズームngraph-gtk-6.09.05/po/en@quot.header0000644000175000017500000000226414142161772014072 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # ngraph-gtk-6.09.05/po/POTFILES.in0000644000175000017500000000166514002172670013060 00000000000000# List of source files which contain translatable strings. misc/com.github.htrb.ngraph-gtk.metainfo.xml src/gtk/ox11menu.c src/gtk/ox11dlg.c src/gtk/ogra2cairo.c src/gtk/x11axis.c src/gtk/x11commn.c src/gtk/x11dialg.c src/gtk/x11file.c src/gtk/x11graph.c src/gtk/x11gui.c src/gtk/x11lgnd.c src/gtk/x11lgndx.c src/gtk/x11menu.c src/gtk/x11merge.c src/gtk/x11opt.c src/gtk/x11print.c src/gtk/x11view.c src/gtk/x11parameter.c src/gtk/gtk_widget.c src/gtk/gtk_subwin.c src/gtk/gtk_liststore.c src/gtk/gtk_presettings.c src/gtk/completion_info_data.c src/gtk/data/gtk/menus-common.ui.in src/gtk/data/gtk/menus-common-win.ui.in src/gtk/data/gtk/menus-tool.ui src/gtk/data/gtk/help-overlay.ui src/gtk/data/gtk/menus-appmenu.ui src/gtk/data/gtk/menus-common.ui src/gtk/x11opt_proto.h src/math/math_error.c src/nstring.c src/odraw.c src/oagrid.c src/oarc.c src/oaxis.c src/ofit.c src/odata.c src/ogra.c src/olegend.c src/oparameter.c src/opath.c src/otext.c ngraph-gtk-6.09.05/po/quot.sed0000644000175000017500000000023113070106167012756 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g ngraph-gtk-6.09.05/po/boldquot.sed0000644000175000017500000000033113070106167013620 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g ngraph-gtk-6.09.05/po/insert-header.sin0000644000175000017500000000161214142161772014546 00000000000000# Sed script that inserts the file called HEADER before the header entry. # # Copyright (C) 2001 Free Software Foundation, Inc. # Written by Bruno Haible , 2001. # This file is free software; the Free Software Foundation gives # unlimited permission to use, copy, distribute, and modify it. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ngraph-gtk-6.09.05/README0000644000175000017500000000012313070106167011533 00000000000000Homepage for ngraph-gtk is at: http://hito.music.coocan.jp/ngraph/ngraph-gtk.html ngraph-gtk-6.09.05/mingw/0000755000175000017500000000000014143613316012061 500000000000000ngraph-gtk-6.09.05/mingw/Makefile.in0000644000175000017500000003314614143146775014067 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = mingw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ EXTRA_DIST = windows64.sh associate.bat winrc_version.awk all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu mingw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu mingw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/mingw/associate.bat0000644000175000017500000000012613070106167014442 00000000000000@echo off ASSOC .ngp=NgraphGraph FTYPE NgraphGraph="%CD%\bin\ngraph.exe" "%%1" %%* ngraph-gtk-6.09.05/mingw/winrc_version.awk0000644000175000017500000000030713070106167015373 00000000000000#!/usr/bin/awk BEGIN { n = gsub(/[.]/, ",", VERSION); if (n == 2) { VERSION = sprintf("%s,00", VERSION); } gsub(/,0/, ",", VERSION); } { gsub("%VERSION%", VERSION); print } ngraph-gtk-6.09.05/mingw/windows64.sh0000644000175000017500000000573713733274154014224 00000000000000#! /bin/sh PKG_DIR=ngraph-gtk WIN_PATH=/mingw ARCHIVE=`ls ngraph-gtk-*.tar.gz | tail -1` if [ -z "$ARCHIVE" ] then echo "Cannot find an archive file." exit fi MO_FILES="gtk30.mo ngraph-gtk.mo" VERSION=`basename $ARCHIVE '.tar.gz' | sed -e 's/ngraph-gtk-//'` BINFILES="libatk-1.0-0.dll libbz2-1.dll libcairo-2.dll libcairo-gobject-2.dll libepoxy-0.dll libexpat-1.dll libffi-7.dll libfontconfig-1.dll libfreetype-6.dll libgdk_pixbuf-2.0-0.dll libgdk-3-0.dll libgio-2.0-0.dll libglib-2.0-0.dll libgmodule-2.0-0.dll libgobject-2.0-0.dll libgraphite2.dll libgsl-25.dll libgslcblas-0.dll libgtk-3-0.dll libharfbuzz-0.dll libiconv-2.dll libintl-8.dll libp11-kit-0.dll libpango-1.0-0.dll libfribidi-0.dll libgtksourceview-4-0.dll libpangocairo-1.0-0.dll libbrotlidec.dll libbrotlicommon.dll libpangoft2-1.0-0.dll libpangowin32-1.0-0.dll libpcre-1.dll libpixman-1-0.dll libpng16-16.dll libstdc++-6.dll libtermcap-0.dll libwinpthread-1.dll zlib1.dll liblzma-5.dll libthai-0.dll libdatrie-1.dll libreadline8.dll libpdcurses.dll libssp-0.dll librsvg-2-2.dll libxml2-2.dll libngraph-0.dll gdbus.exe ngraph.exe ngp2" BINFILES64="libgcc_s_seh-1.dll gspawn-win64-helper-console.exe" BINFILES32="libgcc_s_dw2-1.dll gspawn-win32-helper-console.exe" make_zip() { echo create win$1 archive. if [ -d $PKG_DIR ] then rm -rf $PKG_DIR fi mkdir $PKG_DIR win_path=$WIN_PATH$1 for subdir in bin etc lib share do echo " copy $subdir." mkdir $PKG_DIR/$subdir/ case $subdir in bin) for i in $BINFILES do cp $win_path/$subdir/$i $PKG_DIR/$subdir/ done if [ $1 = "64" ] then for i in $BINFILES64 do cp $win_path/$subdir/$i $PKG_DIR/$subdir/ done else for i in $BINFILES32 do cp $win_path/$subdir/$i $PKG_DIR/$subdir/ done fi ;; etc) for i in fonts gtk-3.0 ngraph-gtk do cp -r $win_path/$subdir/$i $PKG_DIR/$subdir/ done ;; lib) for i in gdk-pixbuf-2.0 glib-2.0 gtk-3.0 ngraph-gtk do cp -r $win_path/$subdir/$i $PKG_DIR/$subdir/ done ;; share) for i in GConf glib-2.0 gtksourceview-4 icons themes ngraph-gtk libthai do cp -r $win_path/$subdir/$i $PKG_DIR/$subdir/ done locale_dir="$PKG_DIR/$subdir/locale" mkdir "$locale_dir" for i in $win_path/$subdir/locale/* do if [ -d "$i" ] then modir=`basename "$i"`/LC_MESSAGES mkdir -p "$locale_dir/$modir" for mo in $MO_FILES do mofile="$i"/LC_MESSAGES/$mo if [ -f $mofile ] then cp $mofile $locale_dir/$modir/ fi done else cp "$i" $PKG_DIR/$subdir/locale/ fi done mkdir $PKG_DIR/$subdir/doc cp -r $win_path/$subdir/doc/ngraph-gtk $PKG_DIR/$subdir/doc ;; esac done cat <<'[EOF]' > $PKG_DIR/ngraph.bat @echo off start "" "%~dp0bin\ngraph.exe" %* [EOF] archive=ngraph-gtk-${VERSION}-win$1.zip if [ -f $archive ] then rm $archive fi echo " archiving." zip -qr9 $archive $PKG_DIR } for arch in 32 64 do make_zip $arch done ngraph-gtk-6.09.05/mingw/Makefile.am0000644000175000017500000000007213503355674014045 00000000000000EXTRA_DIST = windows64.sh associate.bat winrc_version.awk ngraph-gtk-6.09.05/configure0000755000175000017500000250703414143146776012615 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71 for ngraph 6.09.05. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="as_nop=: if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and ZXB01226@nifty.com $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ngraph' PACKAGE_TARNAME='ngraph-gtk' PACKAGE_VERSION='6.09.05' PACKAGE_STRING='ngraph 6.09.05' PACKAGE_BUGREPORT='ZXB01226@nifty.com' PACKAGE_URL='' ac_unique_file="src/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= gt_needs= ac_func_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS POW_LIB ALLOCA LIBOBJS XMKMF GTKSOURCEVIEW_CFLAGS GTKSOURCEVIEW_LIBS GTKSOURCEVIEW4_LIBS GTKSOURCEVIEW4_CFLAGS GSL_LIBS GSL_CFLAGS GSL_CONFIG GTK_LIBS GTK_CFLAGS GLIB_COMPILE_RESOURCES GLIB_MKENUMS GOBJECT_QUERY GLIB_GENMARSHAL GLIB_LIBS GLIB_CFLAGS HAVE_RUBY_DEV_FALSE HAVE_RUBY_DEV_TRUE RUBY_DLEXT RUBY READLINE_LIBS POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS CPP XGETTEXT_EXTRA_OPTIONS MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS RM LIBTOOL_DEPS AS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM OS_OSX_FALSE OS_OSX_TRUE MAC_INTEGRATION_LIBS MAC_INTEGRATION_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG OS_WIN32_FALSE OS_WIN32_TRUE WINDRES vsymldflags OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBNGRAPH_VERSION target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_largefile with_versioned_symbol enable_dependency_tracking enable_silent_rules enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_nls enable_rpath with_libiconv_prefix with_libintl_prefix enable_glibtest with_gsl_prefix with_gsl_exec_prefix enable_gsltest with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR MAC_INTEGRATION_CFLAGS MAC_INTEGRATION_LIBS LT_SYS_LIBRARY_PATH CPP GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS GLIB_COMPILE_RESOURCES GTK_CFLAGS GTK_LIBS GTKSOURCEVIEW4_CFLAGS GTKSOURCEVIEW4_LIBS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures ngraph 6.09.05 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ngraph-gtk] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of ngraph 6.09.05:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-largefile omit support for large files --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --disable-glibtest do not try to compile and run a test GLIB program --disable-gsltest Do not try to compile and run a test GSL program Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-versioned-symbol Use versioned symbols --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-gsl-prefix=PFX Prefix where GSL is installed (optional) --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional) --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path MAC_INTEGRATION_CFLAGS C compiler flags for MAC_INTEGRATION, overriding pkg-config MAC_INTEGRATION_LIBS linker flags for MAC_INTEGRATION, overriding pkg-config LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config GLIB_GENMARSHAL value of glib_genmarshal for glib-2.0, overriding pkg-config GOBJECT_QUERY value of gobject_query for glib-2.0, overriding pkg-config GLIB_MKENUMS value of glib_mkenums for glib-2.0, overriding pkg-config GLIB_COMPILE_RESOURCES value of glib_compile_resources for gio-2.0, overriding pkg-config GTK_CFLAGS C compiler flags for GTK, overriding pkg-config GTK_LIBS linker flags for GTK, overriding pkg-config GTKSOURCEVIEW4_CFLAGS C compiler flags for GTKSOURCEVIEW4, overriding pkg-config GTKSOURCEVIEW4_LIBS linker flags for GTKSOURCEVIEW4, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ngraph configure 6.09.05 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ngraph $as_me 6.09.05, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" gt_needs="$gt_needs " as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H" as_fn_append ac_func_c_list " fork HAVE_FORK" as_fn_append ac_func_c_list " vfork HAVE_VFORK" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_func_c_list " alarm HAVE_ALARM" as_fn_append ac_header_c_list " utime.h utime_h HAVE_UTIME_H" as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE" # Auxiliary files required by this configure script. ac_aux_files="config.rpath ltmain.sh missing install-sh compile config.guess config.sub" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LIBNGRAPH_VERSION=0:0:0 # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check whether --enable-largefile was given. if test ${enable_largefile+y} then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 printf %s "checking for special C compiler options needed for large files... " >&6; } if test ${ac_cv_sys_largefile_CC+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : break fi rm -f core conftest.err conftest.$ac_objext conftest.beam CC="$CC -n32" if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if test ${ac_cv_sys_file_offset_bits+y} then : printf %s "(cached) " >&6 else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } if test ${ac_cv_sys_large_files+y} then : printf %s "(cached) " >&6 else $as_nop while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 printf "%s\n" "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h ;; esac rm -rf conftest* fi fi vsymldflags= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version script options" >&5 printf %s "checking version script options... " >&6; } # Check whether --with-versioned-symbol was given. if test ${with_versioned_symbol+y} then : withval=$with_versioned_symbol; vsymldflags="-Wl,--version-script,ngraph_export.map -Wl,-O1" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${vsymldflags}" >&5 printf "%s\n" "${vsymldflags}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5 printf %s "checking for native Win32... " >&6; } case "$host" in *-*-mingw*) os_win32=yes if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_WINDRES+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 printf "%s\n" "$WINDRES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_WINDRES"; then ac_ct_WINDRES=$WINDRES # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_WINDRES+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_WINDRES"; then ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_WINDRES="windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES if test -n "$ac_ct_WINDRES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 printf "%s\n" "$ac_ct_WINDRES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_WINDRES" = x; then WINDRES="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac WINDRES=$ac_ct_WINDRES fi else WINDRES="$ac_cv_prog_WINDRES" fi ;; *) os_win32=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $os_win32" >&5 printf "%s\n" "$os_win32" >&6; } if test "$os_win32" = "yes"; then OS_WIN32_TRUE= OS_WIN32_FALSE='#' else OS_WIN32_TRUE='#' OS_WIN32_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native OSX" >&5 printf %s "checking for native OSX... " >&6; } case "$host" in *-apple-darwin*) os_osx=yes if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gtk-mac-integration-gtk3" >&5 printf %s "checking for gtk-mac-integration-gtk3... " >&6; } if test -n "$MAC_INTEGRATION_CFLAGS"; then pkg_cv_MAC_INTEGRATION_CFLAGS="$MAC_INTEGRATION_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration-gtk3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-mac-integration-gtk3") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAC_INTEGRATION_CFLAGS=`$PKG_CONFIG --cflags "gtk-mac-integration-gtk3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$MAC_INTEGRATION_LIBS"; then pkg_cv_MAC_INTEGRATION_LIBS="$MAC_INTEGRATION_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-mac-integration-gtk3\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk-mac-integration-gtk3") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAC_INTEGRATION_LIBS=`$PKG_CONFIG --libs "gtk-mac-integration-gtk3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then MAC_INTEGRATION_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk-mac-integration-gtk3" 2>&1` else MAC_INTEGRATION_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk-mac-integration-gtk3" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$MAC_INTEGRATION_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtk-mac-integration-gtk3) were not met: $MAC_INTEGRATION_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables MAC_INTEGRATION_CFLAGS and MAC_INTEGRATION_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables MAC_INTEGRATION_CFLAGS and MAC_INTEGRATION_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else MAC_INTEGRATION_CFLAGS=$pkg_cv_MAC_INTEGRATION_CFLAGS MAC_INTEGRATION_LIBS=$pkg_cv_MAC_INTEGRATION_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi ;; *) os_osx=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $os_osx" >&5 printf "%s\n" "$os_osx" >&6; } if test "$os_osx" = "yes"; then OS_OSX_TRUE= OS_OSX_FALSE='#' else OS_OSX_TRUE='#' OS_OSX_FALSE= fi am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='ngraph-gtk' VERSION='6.09.05' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in fgrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else $as_nop i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_reload_flag='-r' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cr} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else $as_nop with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else $as_nop lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_mainfest_tool+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else $as_nop lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cr libconftest.a conftest.o" >&5 $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[912]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test ${enable_shared+y} then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop enable_shared=yes fi # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop enable_static=yes fi # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop pic_mode=default fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else $as_nop enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else $as_nop if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes else $as_nop lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char shl_load (); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else $as_nop ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else $as_nop ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char dld_link (); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else $as_nop ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 printf "%s\n" "$AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AS+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 printf "%s\n" "$ac_ct_AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump #_LT_SET_OPTION([LT_INIT],[dlopen]) # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else $as_nop if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' GSL_REQUIRED_VERSION=0.2.5 GTK3_REQUIRED_VERSION=3.24.0 GLIB_REQUIRED_VERSION=2.32.0 ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RM+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$RM"; then ac_cv_prog_RM="$RM" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RM="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_RM" && ac_cv_prog_RM="no" fi fi RM=$ac_cv_prog_RM if test -n "$RM"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 printf "%s\n" "$RM" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ALL_LINGUAS="ja" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test ${enable_nls+y} then : enableval=$enable_nls; USE_NLS=$enableval else $as_nop USE_NLS=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.20 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 printf "%s\n" "$MSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GMSGFMT+y} then : printf %s "(cached) " >&6 else $as_nop case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 printf "%s\n" "$GMSGFMT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XGETTEXT+y} then : printf %s "(cached) " >&6 else $as_nop case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 printf "%s\n" "$XGETTEXT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MSGMERGE+y} then : printf %s "(cached) " >&6 else $as_nop case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 printf "%s\n" "$MSGMERGE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' else if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' else MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' fi fi test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else $as_nop with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which # contains only /bin. Note that ksh looks also at the FPATH variable, # so we have to set that as well for the test. PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ || PATH_SEPARATOR=';' } fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 printf %s "checking for ld... " >&6; } elif test "$GCC" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } elif test "$with_gnu_ld" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test -n "$LD"; then # Let the user override the test with a path. : else if test ${acl_cv_path_LD+y} then : printf %s "(cached) " >&6 else $as_nop acl_cv_path_LD= # Final result of this test ac_prog=ld # Program to search in $PATH if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) acl_output=`($CC -print-prog-name=ld) 2>&5` ;; esac case $acl_output in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` done # Got the pathname. No search in PATH is needed. acl_cv_path_LD="$acl_output" ac_prog= ;; "") # If it fails, then pretend we aren't using GCC. ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac fi if test -n "$ac_prog"; then # Search for $ac_prog in $PATH. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$acl_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : # The compiler produces 64-bit code. Add option '-b64' so that the # linker groks 64-bit object files. case "$acl_cv_path_LD " in *" -b64 "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc64-*-netbsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # The compiler produces 32-bit code. Add option '-m elf32_sparc' # so that the linker groks 32-bit object files. case "$acl_cv_path_LD " in *" -m elf32_sparc "*) ;; *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi LD="$acl_cv_path_LD" fi if test -n "$LD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${acl_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 printf %s "checking for shared library run path origin... " >&6; } if test ${acl_cv_rpath+y} then : printf %s "(cached) " >&6 else $as_nop CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test ${enable_rpath+y} then : enableval=$enable_rpath; : else $as_nop enable_rpath=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 printf %s "checking 32-bit host C ABI... " >&6; } if test ${gl_cv_host_cpu_c_abi_32bit+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$gl_cv_host_cpu_c_abi"; then case "$gl_cv_host_cpu_c_abi" in i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) gl_cv_host_cpu_c_abi_32bit=no ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac else case "$host_cpu" in # CPUs that only support a 32-bit ABI. arc \ | bfin \ | cris* \ | csky \ | epiphany \ | ft32 \ | h8300 \ | m68k \ | microblaze | microblazeel \ | nds32 | nds32le | nds32be \ | nios2 | nios2eb | nios2el \ | or1k* \ | or32 \ | sh | sh1234 | sh1234elb \ | tic6x \ | xtensa* ) gl_cv_host_cpu_c_abi_32bit=yes ;; # CPUs that only support a 64-bit ABI. alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | mmix ) gl_cv_host_cpu_c_abi_32bit=no ;; i[34567]86 ) gl_cv_host_cpu_c_abi_32bit=yes ;; x86_64 ) # On x86_64 systems, the C compiler may be generating code in one of # these ABIs: # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 # with native Windows (mingw, MSVC). # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if (defined __x86_64__ || defined __amd64__ \ || defined _M_X64 || defined _M_AMD64) \ && !(defined __ILP32__ || defined _ILP32) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; arm* | aarch64 ) # Assume arm with EABI. # On arm64 systems, the C compiler may be generating code in one of # these ABIs: # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) # On hppa, the C compiler may be generating 32-bit code or 64-bit # code. In the latter case, it defines _LP64 and __LP64__. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; ia64* ) # On ia64 on HP-UX, the C compiler may be generating 64-bit code or # 32-bit code. In the latter case, it defines _ILP32. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _ILP32 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=yes else $as_nop gl_cv_host_cpu_c_abi_32bit=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; mips* ) # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this # at 32. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; powerpc* ) # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. # No need to distinguish them here; the caller may distinguish # them based on the OS. # On powerpc64 systems, the C compiler may still be generating # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may # be generating 64-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __powerpc64__ || defined _ARCH_PPC64 int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; rs6000 ) gl_cv_host_cpu_c_abi_32bit=yes ;; riscv32 | riscv64 ) # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. # Size of 'long' and 'void *': cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; s390* ) # On s390x, the C compiler may be generating 64-bit (= s390x) code # or 31-bit (= s390) code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __s390x__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; sparc | sparc64 ) # UltraSPARCs running Linux have `uname -m` = "sparc64", but the # C compiler still generates 32-bit code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __sparcv9 || defined __arch64__ int ok; #else error fail #endif _ACEOF if ac_fn_c_try_compile "$LINENO" then : gl_cv_host_cpu_c_abi_32bit=no else $as_nop gl_cv_host_cpu_c_abi_32bit=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; *) gl_cv_host_cpu_c_abi_32bit=unknown ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else $as_nop # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else $as_nop # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 printf %s "checking for ELF binary format... " >&6; } if test ${gl_cv_elf+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ELF__ Extensible Linking Format #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Extensible Linking Format" >/dev/null 2>&1 then : gl_cv_elf=yes else $as_nop gl_cv_elf=no fi rm -rf conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 printf "%s\n" "$gl_cv_elf" >&6; } if test $gl_cv_elf; then # Extract the ELF class of a file (5th byte) in decimal. # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header if od -A x < /dev/null >/dev/null 2>/dev/null; then # Use POSIX od. func_elfclass () { od -A n -t d1 -j 4 -N 1 } else # Use BSD hexdump. func_elfclass () { dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' echo } fi case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 } ;; *) # Unknown. acl_is_expected_elfclass () { : } ;; esac else acl_is_expected_elfclass () { : } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 printf %s "checking for the common suffixes of directories in the library search path... " >&6; } if test ${acl_cv_libdirstems+y} then : printf %s "(cached) " >&6 else $as_nop acl_libdirstem=lib acl_libdirstem2= acl_libdirstem3= case "$host_os" in solaris*) if test $HOST_CPU_C_ABI_32BIT = no; then acl_libdirstem2=lib/64 case "$host_cpu" in sparc*) acl_libdirstem3=lib/sparcv9 ;; i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; esac fi ;; *) searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test $HOST_CPU_C_ABI_32BIT != no; then # 32-bit or unknown ABI. if test -d /usr/lib32; then acl_libdirstem2=lib32 fi fi if test $HOST_CPU_C_ABI_32BIT != yes; then # 64-bit or unknown ABI. if test -d /usr/lib64; then acl_libdirstem3=lib64 fi fi if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; */../ | */.. ) # Better ignore directories of this form. They are misleading. ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib32 ) acl_libdirstem2=lib32 ;; */lib64 ) acl_libdirstem3=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" if test $HOST_CPU_C_ABI_32BIT = yes; then # 32-bit ABI. acl_libdirstem3= fi if test $HOST_CPU_C_ABI_32BIT = no; then # 64-bit ABI. acl_libdirstem2= fi fi ;; esac test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 printf "%s\n" "$acl_cv_libdirstems" >&6; } acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test ${with_libiconv_prefix+y} then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= HAVE_LIBICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'iconv'; then LIBICONV_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 printf %s "checking for CFPreferencesCopyAppValue... " >&6; } if test ${gt_cv_func_CFPreferencesCopyAppValue+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFPreferencesCopyAppValue=yes else $as_nop gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : gt_cv_func_CFLocaleCopyPreferredLanguages=yes else $as_nop gt_cv_func_CFLocaleCopyPreferredLanguages=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 printf %s "checking for GNU gettext in libc... " >&6; } if eval test \${$gt_func_gnugettext_libc+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libc=yes" else $as_nop eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 printf %s "checking for iconv... " >&6; } if test ${am_cv_func_iconv+y} then : printf %s "(cached) " >&6 else $as_nop am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 printf %s "checking for working iconv... " >&6; } if test ${am_cv_func_iconv_works+y} then : printf %s "(cached) " >&6 else $as_nop am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do if test "$cross_compiling" = yes then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef ICONV_CONST # define ICONV_CONST $ac_iconv_const #endif int main (void) { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; iconv_close (cd_utf8_to_88591); } } /* Test against Solaris 10 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\263"; char buf[10]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; iconv_close (cd_ascii_to_88591); } } /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ { iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; iconv_close (cd_88591_to_utf8); } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ { /* Try standardized names. */ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); /* Try IRIX, OSF/1 names. */ iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); /* Try AIX names. */ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); /* Try HP-UX names. */ iconv_t cd4 = iconv_open ("utf8", "eucJP"); if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) result |= 16; if (cd1 != (iconv_t)(-1)) iconv_close (cd1); if (cd2 != (iconv_t)(-1)) iconv_close (cd2); if (cd3 != (iconv_t)(-1)) iconv_close (cd3); if (cd4 != (iconv_t)(-1)) iconv_close (cd4); } return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi test "$am_cv_func_iconv_works" = no || break done LIBS="$am_save_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 printf %s "checking how to link with libiconv... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test ${with_libintl_prefix+y} then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" additional_libdir2="$withval/$acl_libdirstem2" additional_libdir3="$withval/$acl_libdirstem3" fi fi fi if test "X$additional_libdir2" = "X$additional_libdir"; then additional_libdir2= fi if test "X$additional_libdir3" = "X$additional_libdir"; then additional_libdir3= fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= HAVE_LIBINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do if test "X$found_dir" = "X"; then eval dir=\$$additional_libdir_variable if test -n "$dir"; then if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi fi done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; */$acl_libdirstem3 | */$acl_libdirstem3/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` if test "$name" = 'intl'; then LIBINTL_PREFIX="$basedir" fi additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$dependency_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 printf %s "checking for GNU gettext in libintl... " >&6; } if eval test \${$gt_func_gnugettext_libintl+y} then : printf %s "(cached) " >&6 else $as_nop gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$gt_func_gnugettext_libintl=yes" else $as_nop eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GNU_GETTEXT_SUPPORTED_REVISION extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) #else #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 #endif $gt_revision_test_code int main (void) { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 printf %s "checking whether to use NLS... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 printf "%s\n" "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 printf %s "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 printf "%s\n" "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 printf %s "checking how to link with libintl... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 printf "%s\n" "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 printf %s "checking for sqrt in -lm... " >&6; } if test ${ac_cv_lib_m_sqrt+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char sqrt (); int main (void) { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_sqrt=yes else $as_nop ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 printf "%s\n" "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes then : printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h LIBS="-lm $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5 printf %s "checking for rl_completion_matches in -lreadline... " >&6; } if test ${ac_cv_lib_readline_rl_completion_matches+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char rl_completion_matches (); int main (void) { return rl_completion_matches (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_readline_rl_completion_matches=yes else $as_nop ac_cv_lib_readline_rl_completion_matches=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5 printf "%s\n" "$ac_cv_lib_readline_rl_completion_matches" >&6; } if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes then : printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h READLINE_LIBS=-lreadline fi # Extract the first word of "ruby", so it can be a program name with args. set dummy ruby; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RUBY+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$RUBY"; then ac_cv_prog_RUBY="$RUBY" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RUBY="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_RUBY" && ac_cv_prog_RUBY="no" fi fi RUBY=$ac_cv_prog_RUBY if test -n "$RUBY"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 printf "%s\n" "$RUBY" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test $RUBY = yes; then ruby_incrudedir=`ruby -e 'puts(RbConfig::CONFIG["rubyhdrdir"])'` as_ac_File=`printf "%s\n" "ac_cv_file_$ruby_incrudedir/ruby.h" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ruby_incrudedir/ruby.h" >&5 printf %s "checking for $ruby_incrudedir/ruby.h... " >&6; } if eval test \${$as_ac_File+y} then : printf %s "(cached) " >&6 else $as_nop test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "$ruby_incrudedir/ruby.h"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes" then : have_ruby_dev=yes fi RUBY_DLEXT=`ruby -e 'puts(RbConfig::CONFIG["DLEXT"])'` fi if test x$have_ruby_dev = xyes; then HAVE_RUBY_DEV_TRUE= HAVE_RUBY_DEV_FALSE='#' else HAVE_RUBY_DEV_TRUE='#' HAVE_RUBY_DEV_FALSE= fi # Check whether --enable-glibtest was given. if test ${enable_glibtest+y} then : enableval=$enable_glibtest; else $as_nop enable_glibtest=yes fi min_glib_version=$GLIB_REQUIRED_VERSION pkg_config_args="glib-2.0 >= $min_glib_version" for module in . gobject gthread gmodule do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; gio*) pkg_config_args="$pkg_config_args $module-2.0" ;; esac done if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.16 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pkg_config_args" >&5 printf %s "checking for $pkg_config_args... " >&6; } if test -n "$GLIB_CFLAGS"; then pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_config_args\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_config_args") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "$pkg_config_args" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLIB_LIBS"; then pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_config_args\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_config_args") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "$pkg_config_args" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_config_args" 2>&1` else GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_config_args" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } : else GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS GLIB_LIBS=$pkg_cv_GLIB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } : fi if test -n "$GLIB_GENMARSHAL"; then pkg_cv_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_GENMARSHAL=`$PKG_CONFIG --variable="glib_genmarshal" "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GLIB_GENMARSHAL=$pkg_cv_GLIB_GENMARSHAL if test "x$GLIB_GENMARSHAL" = x"" then : fi if test -n "$GOBJECT_QUERY"; then pkg_cv_GOBJECT_QUERY="$GOBJECT_QUERY" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GOBJECT_QUERY=`$PKG_CONFIG --variable="gobject_query" "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GOBJECT_QUERY=$pkg_cv_GOBJECT_QUERY if test "x$GOBJECT_QUERY" = x"" then : fi if test -n "$GLIB_MKENUMS"; then pkg_cv_GLIB_MKENUMS="$GLIB_MKENUMS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_MKENUMS=`$PKG_CONFIG --variable="glib_mkenums" "glib-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GLIB_MKENUMS=$pkg_cv_GLIB_MKENUMS if test "x$GLIB_MKENUMS" = x"" then : fi if test -n "$GLIB_COMPILE_RESOURCES"; then pkg_cv_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gio-2.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable="glib_compile_resources" "gio-2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi GLIB_COMPILE_RESOURCES=$pkg_cv_GLIB_COMPILE_RESOURCES if test "x$GLIB_COMPILE_RESOURCES" = x"" then : fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GLIB - version >= $min_glib_version" >&5 printf %s "checking for GLIB - version >= $min_glib_version... " >&6; } if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes then : echo $ac_n "cross compiling; assumed OK... $ac_c" else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main (void) { unsigned int major, minor, micro; fclose (fopen ("conf.glibtest", "w")); if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%u.%u.%u) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %u.%u.%u. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO" then : else $as_nop no_glib=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 printf "%s\n" "yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; } : else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else $as_nop echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" GLIB_COMPILE_RESOURCES="" as_fn_error $? "Test for GLib failed." "$LINENO" 5 fi rm -f conf.glibtest #AM_PATH_GTK_3_0($GTK3_REQUIRED_VERSION,,AC_MSG_ERROR(Test for GTK failed.),) pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gtk+-3.0 >= $GTK3_REQUIRED_VERSION" >&5 printf %s "checking for gtk+-3.0 >= $GTK3_REQUIRED_VERSION... " >&6; } if test -n "$GTK_CFLAGS"; then pkg_cv_GTK_CFLAGS="$GTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_REQUIRED_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_REQUIRED_VERSION") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-3.0 >= $GTK3_REQUIRED_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTK_LIBS"; then pkg_cv_GTK_LIBS="$GTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-3.0 >= \$GTK3_REQUIRED_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtk+-3.0 >= $GTK3_REQUIRED_VERSION") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION" 2>&1` else GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-3.0 >= $GTK3_REQUIRED_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTK_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (gtk+-3.0 >= $GTK3_REQUIRED_VERSION) were not met: $GTK_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GTK_CFLAGS and GTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else GTK_CFLAGS=$pkg_cv_GTK_CFLAGS GTK_LIBS=$pkg_cv_GTK_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi # Check whether --with-gsl-prefix was given. if test ${with_gsl_prefix+y} then : withval=$with_gsl_prefix; gsl_prefix="$withval" else $as_nop gsl_prefix="" fi # Check whether --with-gsl-exec-prefix was given. if test ${with_gsl_exec_prefix+y} then : withval=$with_gsl_exec_prefix; gsl_exec_prefix="$withval" else $as_nop gsl_exec_prefix="" fi # Check whether --enable-gsltest was given. if test ${enable_gsltest+y} then : enableval=$enable_gsltest; else $as_nop enable_gsltest=yes fi if test "x${GSL_CONFIG+set}" != xset ; then if test "x$gsl_prefix" != x ; then GSL_CONFIG="$gsl_prefix/bin/gsl-config" fi if test "x$gsl_exec_prefix" != x ; then GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config" fi fi # Extract the first word of "gsl-config", so it can be a program name with args. set dummy gsl-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GSL_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $GSL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GSL_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GSL_CONFIG" && ac_cv_path_GSL_CONFIG="no" ;; esac fi GSL_CONFIG=$ac_cv_path_GSL_CONFIG if test -n "$GSL_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GSL_CONFIG" >&5 printf "%s\n" "$GSL_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi min_gsl_version=$GSL_REQUIRED_VERSION { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GSL - version >= $min_gsl_version" >&5 printf %s "checking for GSL - version >= $min_gsl_version... " >&6; } no_gsl="" if test "$GSL_CONFIG" = "no" ; then no_gsl=yes else GSL_CFLAGS=`$GSL_CONFIG --cflags` GSL_LIBS=`$GSL_CONFIG --libs` gsl_major_version=`$GSL_CONFIG --version | \ sed 's/^\([0-9]*\).*/\1/'` if test "x${gsl_major_version}" = "x" ; then gsl_major_version=0 fi gsl_minor_version=`$GSL_CONFIG --version | \ sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'` if test "x${gsl_minor_version}" = "x" ; then gsl_minor_version=0 fi gsl_micro_version=`$GSL_CONFIG --version | \ sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'` if test "x${gsl_micro_version}" = "x" ; then gsl_micro_version=0 fi if test "x$enable_gsltest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GSL_CFLAGS" LIBS="$LIBS $GSL_LIBS" rm -f conf.gsltest if test "$cross_compiling" = yes then : echo $ac_n "cross compiling; assumed OK... $ac_c" else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include char* my_strdup (const char *str); char* my_strdup (const char *str) { char *new_str; if (str) { new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); strcpy (new_str, str); } else new_str = NULL; return new_str; } int main (void) { int major = 0, minor = 0, micro = 0; int n; char *tmp_version; system ("touch conf.gsltest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = my_strdup("$min_gsl_version"); n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) ; if (n != 2 && n != 3) { printf("%s, bad version string\n", "$min_gsl_version"); exit(1); } if (($gsl_major_version > major) || (($gsl_major_version == major) && ($gsl_minor_version > minor)) || (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro))) { exit(0); } else { exit(1); } } _ACEOF if ac_fn_c_try_run "$LINENO" then : else $as_nop no_gsl=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gsl" = x ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_LIBGSL 1" >>confdefs.h else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if test "$GSL_CONFIG" = "no" ; then echo "*** The gsl-config script installed by GSL could not be found" echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GSL_CONFIG environment variable to the" echo "*** full path to gsl-config." else if test -f conf.gsltest ; then : else echo "*** Could not run GSL test program, checking why..." CFLAGS="$CFLAGS $GSL_CFLAGS" LIBS="$LIBS $GSL_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GSL or finding the wrong" echo "*** version of GSL. If it is not finding GSL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else $as_nop echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GSL was incorrectly installed" echo "*** or that you have moved GSL since it was installed. In the latter case, you" echo "*** may want to edit the gsl-config script: $GSL_CONFIG" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi # GSL_CFLAGS="" # GSL_LIBS="" : fi rm -f conf.gsltest # Extract the first word of "glib-compile-resources", so it can be a program name with args. set dummy glib-compile-resources; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y} then : printf %s "(cached) " >&6 else $as_nop case $GLIB_COMPILE_RESOURCES in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES if test -n "$GLIB_COMPILE_RESOURCES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5 printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi # Extract the first word of "glib-mkenums", so it can be a program name with args. set dummy glib-mkenums; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GLIB_MKENUMS+y} then : printf %s "(cached) " >&6 else $as_nop case $GLIB_MKENUMS in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_MKENUMS="$GLIB_MKENUMS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_MKENUMS="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GLIB_MKENUMS=$ac_cv_path_GLIB_MKENUMS if test -n "$GLIB_MKENUMS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_MKENUMS" >&5 printf "%s\n" "$GLIB_MKENUMS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gtksourceview-4" >&5 printf %s "checking for gtksourceview-4... " >&6; } if test -n "$GTKSOURCEVIEW4_CFLAGS"; then pkg_cv_GTKSOURCEVIEW4_CFLAGS="$GTKSOURCEVIEW4_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtksourceview-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtksourceview-4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKSOURCEVIEW4_CFLAGS=`$PKG_CONFIG --cflags "gtksourceview-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GTKSOURCEVIEW4_LIBS"; then pkg_cv_GTKSOURCEVIEW4_LIBS="$GTKSOURCEVIEW4_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtksourceview-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "gtksourceview-4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKSOURCEVIEW4_LIBS=`$PKG_CONFIG --libs "gtksourceview-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GTKSOURCEVIEW4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtksourceview-4" 2>&1` else GTKSOURCEVIEW4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtksourceview-4" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GTKSOURCEVIEW4_PKG_ERRORS" >&5 GTKSOURCEVIEW4="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } GTKSOURCEVIEW4="no" else GTKSOURCEVIEW4_CFLAGS=$pkg_cv_GTKSOURCEVIEW4_CFLAGS GTKSOURCEVIEW4_LIBS=$pkg_cv_GTKSOURCEVIEW4_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } GTKSOURCEVIEW4="yes" fi if test "$GTKSOURCEVIEW4" = yes; then GTKSOURCEVIEW_LIBS=$GTKSOURCEVIEW4_LIBS GTKSOURCEVIEW_CFLAGS=$GTKSOURCEVIEW4_CFLAGS else as_fn_error $? "(Test for GtkSourceview failed.)" "$LINENO" 5 fi # Checks for header files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5 printf %s "checking for X... " >&6; } # Check whether --with-x was given. if test ${with_x+y} then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test ${ac_cv_have_x+y} then : printf %s "(cached) " >&6 else $as_nop # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no # Do we need to do anything special at all? ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : # We can compile and link X programs with no special options. ac_x_includes= ac_x_libraries= fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_save_LIBS" # If that didn't work, only try xmkmf and file system searches # for native compilation. if test x"$ac_x_includes" = xno && test "$cross_compiling" = no then : rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /opt/X11/include /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # We can compile using X headers with no special include directory. ac_x_includes= else $as_nop for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else $as_nop LIBS=$ac_save_LIBS for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no fi # Record the results. case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) : # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no" ;; #( *) : # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" ;; esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 printf "%s\n" "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; } fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main (void) { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" else $as_nop eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char opendir (); int main (void) { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char opendir (); int main (void) { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. # AC_CHECK_INCLUDES_DEFAULT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test ${ac_cv_header_sys_wait_h+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main (void) { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_sys_wait_h=yes else $as_nop ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes then : printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" if test "x$ac_cv_header_strings_h" = xyes then : printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_ioctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default" if test "x$ac_cv_header_utime_h" = xyes then : printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_readline_readline_h" = xyes then : printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h fi # Checks for typedefs, structures, and compiler characteristics. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes else $as_nop ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default " if test "x$ac_cv_type_pid_t" = xyes then : else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ LLP64 #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' else $as_nop ac_pid_type='__int64' fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : else $as_nop printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h else $as_nop ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi # Checks for library functions. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 printf %s "checking whether closedir returns void... " >&6; } if test ${ac_cv_func_closedir_void+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$ac_header_dirent> int main (void) { return closedir(0); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_closedir_void=no else $as_nop ac_cv_func_closedir_void=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 printf "%s\n" "$ac_cv_func_closedir_void" >&6; } if test $ac_cv_func_closedir_void = yes; then printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 printf %s "checking for error_at_line... " >&6; } if test ${ac_cv_lib_error_at_line+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { error_at_line (0, 0, "", 0, "an error occurred"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_error_at_line=yes else $as_nop ac_cv_lib_error_at_line=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; } if test $ac_cv_lib_error_at_line = no; then case " $LIBOBJS " in *" error.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS error.$ac_objext" ;; esac fi ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done if test "x$ac_cv_func_fork" = xyes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 printf %s "checking for working fork... " >&6; } if test ${ac_cv_func_fork_works+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_func_fork_works=cross else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_fork_works=yes else $as_nop ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 printf "%s\n" "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 printf %s "checking for working vfork... " >&6; } if test ${ac_cv_func_vfork_works+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_func_vfork_works=cross else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #include #ifdef HAVE_VFORK_H # include #endif static void do_nothing (int sig) { (void) sig; } /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void sparc_address_test (int arg) { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main (void) { pid_t parent = getpid (); pid_t child; sparc_address_test (0); /* On Solaris 2.4, changes by the child to the signal handler also munge signal handlers in the parent. To detect this, start by putting the parent's handler in a known state. */ signal (SIGTERM, SIG_DFL); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* Alter the child's signal handler. */ if (signal (SIGTERM, do_nothing) != SIG_DFL) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child munge the parent's signal handler? */ || signal (SIGTERM, SIG_DFL) != SIG_DFL /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_vfork_works=yes else $as_nop ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 printf "%s\n" "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h else printf "%s\n" "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 printf %s "checking for GNU libc compatible malloc... " >&6; } if test ${ac_cv_func_malloc_0_nonnull+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ | hpux* | solaris* | cygwin* | mingw* | msys* ) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_malloc_0_nonnull=no ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { void *p = malloc (0); int result = !p; free (p); return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_malloc_0_nonnull=yes else $as_nop ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes then : printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h else $as_nop printf "%s\n" "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac printf "%s\n" "#define malloc rpl_malloc" >>confdefs.h fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 printf %s "checking for working alloca.h... " >&6; } if test ${ac_cv_working_alloca_h+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_working_alloca_h=yes else $as_nop ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 printf "%s\n" "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 printf %s "checking for alloca... " >&6; } if test ${ac_cv_func_alloca_works+y} then : printf %s "(cached) " >&6 else $as_nop if test $ac_cv_working_alloca_h = yes; then ac_cv_func_alloca_works=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _MSC_VER # include # define alloca _alloca # else # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif int main (void) { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_alloca_works=yes else $as_nop ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 printf "%s\n" "$ac_cv_func_alloca_works" >&6; } fi if test $ac_cv_func_alloca_works = yes; then printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 printf %s "checking stack direction for C alloca... " >&6; } if test ${ac_cv_c_stack_direction+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_c_stack_direction=0 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_stack_direction=1 else $as_nop ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 printf "%s\n" "$ac_cv_c_stack_direction" >&6; } printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 printf %s "checking for working mktime... " >&6; } if test ${ac_cv_func_working_mktime+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_func_working_mktime=no else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #include #ifdef HAVE_SYS_TIME_H # include #endif #include #include #ifdef HAVE_UNISTD_H # include #endif #ifndef HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static const char *tz_strings[] = { (const char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Return 0 if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static int spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; return mktime (&tm) != (time_t) -1; } static int mktime_test1 (time_t now) { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int mktime_test (time_t now) { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) && mktime_test1 ((time_t) (time_t_min + now))); } static int irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); return tm.tm_mon == 2 && tm.tm_mday == 31; } static int bigtime_test (int j) { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) return 0; } return 1; } static int year_2050_test () { /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ignoring leap seconds. */ unsigned long int answer = 2527315200UL; struct tm tm; time_t t; tm.tm_year = 2050 - 1900; tm.tm_mon = 2 - 1; tm.tm_mday = 1; tm.tm_hour = tm.tm_min = tm.tm_sec = 0; tm.tm_isdst = -1; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); /* Check that the result is either a failure, or close enough to the correct answer that we can assume the discrepancy is due to leap seconds. */ return (t == (time_t) -1 || (0 < t && answer - 120 <= t && t <= answer + 120)); } int main (void) { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (;;) { t = (time_t_max << 1) + 1; if (t <= time_t_max) break; time_t_max = t; } time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv ((char*) tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) return 1; if (! (mktime_test ((time_t) 1) && mktime_test ((time_t) (60 * 60)) && mktime_test ((time_t) (60 * 60 * 24)))) return 1; for (j = 1; ; j <<= 1) if (! bigtime_test (j)) return 1; else if (INT_MAX / 2 < j) break; if (! bigtime_test (INT_MAX)) return 1; } return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_working_mktime=yes else $as_nop ac_cv_func_working_mktime=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 printf "%s\n" "$ac_cv_func_working_mktime" >&6; } if test $ac_cv_func_working_mktime = no; then case " $LIBOBJS " in *" mktime.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS mktime.$ac_objext" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 printf %s "checking for GNU libc compatible realloc... " >&6; } if test ${ac_cv_func_realloc_0_nonnull+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ | hpux* | solaris* | cygwin* | mingw* | msys* ) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. *) ac_cv_func_realloc_0_nonnull=no ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { void *p = realloc (0, 0); int result = !p; free (p); return result; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_realloc_0_nonnull=yes else $as_nop ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 printf "%s\n" "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes then : printf "%s\n" "#define HAVE_REALLOC 1" >>confdefs.h else $as_nop printf "%s\n" "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac printf "%s\n" "#define realloc rpl_realloc" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 printf %s "checking return type of signal handlers... " >&6; } if test ${ac_cv_type_signal+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_type_signal=int else $as_nop ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 printf "%s\n" "$ac_cv_type_signal" >&6; } printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 printf %s "checking whether lstat correctly handles trailing slash... " >&6; } if test ${ac_cv_func_lstat_dereferences_slashed_symlink+y} then : printf %s "(cached) " >&6 else $as_nop rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on glibc systems. *-gnu*) ac_cv_func_lstat_dereferences_slashed_symlink=yes ;; # If we don't know, assume the worst. *) ac_cv_func_lstat_dereferences_slashed_symlink=no ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else $as_nop ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 printf "%s\n" "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 printf %s "checking whether stat accepts an empty string... " >&6; } if test ${ac_cv_func_stat_empty_string_bug+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_func_stat_empty_string_bug=yes else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_stat_empty_string_bug=no else $as_nop ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 printf "%s\n" "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac printf "%s\n" "#define HAVE_STAT_EMPTY_STRING_BUG 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 printf %s "checking for working strtod... " >&6; } if test ${ac_cv_func_strtod+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : ac_cv_func_strtod=no else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifndef strtod double strtod (); #endif int main (void) { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) return 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_strtod=yes else $as_nop ac_cv_func_strtod=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 printf "%s\n" "$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = no; then case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" if test "x$ac_cv_func_pow" = xyes then : fi if test $ac_cv_func_pow = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 printf %s "checking for pow in -lm... " >&6; } if test ${ac_cv_lib_m_pow+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ char pow (); int main (void) { return pow (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_pow=yes else $as_nop ac_cv_lib_m_pow=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 printf "%s\n" "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = xyes then : POW_LIB=-lm else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 printf "%s\n" "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether utime accepts a null argument" >&5 printf %s "checking whether utime accepts a null argument... " >&6; } if test ${ac_cv_func_utime_null+y} then : printf %s "(cached) " >&6 else $as_nop rm -f conftest.data; >conftest.data # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. if test "$cross_compiling" = yes then : ac_cv_func_utime_null='guessing yes' else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_UTIME_H # include #endif int main (void) { struct stat s, t; return ! (stat ("conftest.data", &s) == 0 && utime ("conftest.data", 0) == 0 && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_utime_null=yes else $as_nop ac_cv_func_utime_null=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_utime_null" >&5 printf "%s\n" "$ac_cv_func_utime_null" >&6; } if test "x$ac_cv_func_utime_null" != xno; then ac_cv_func_utime_null=yes printf "%s\n" "#define HAVE_UTIME_NULL 1" >>confdefs.h fi rm -f conftest.data if test "x$ac_cv_func_vprintf" = xno then : ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes then : printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 printf %s "checking for working mmap... " >&6; } if test ${ac_cv_func_mmap_fixed_mapped+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : case "$host_os" in # (( # Guess yes on platforms where we know the result. linux*) ac_cv_func_mmap_fixed_mapped=yes ;; # If we don't know, assume the worst. *) ac_cv_func_mmap_fixed_mapped=no ;; esac else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main (void) { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); free (data); free (data3); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_func_mmap_fixed_mapped=yes else $as_nop ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt ac_fn_c_check_func "$LINENO" "roundl" "ac_cv_func_roundl" if test "x$ac_cv_func_roundl" = xyes then : printf "%s\n" "#define HAVE_ROUNDL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" if test "x$ac_cv_func_sigaction" = xyes then : printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sigsuspend" "ac_cv_func_sigsuspend" if test "x$ac_cv_func_sigsuspend" = xyes then : printf "%s\n" "#define HAVE_SIGSUSPEND 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm" if test "x$ac_cv_func_alarm" = xyes then : printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" if test "x$ac_cv_func_dup2" = xyes then : printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" if test "x$ac_cv_func_getcwd" = xyes then : printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" if test "x$ac_cv_func_mkdir" = xyes then : printf "%s\n" "#define HAVE_MKDIR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "expm1" "ac_cv_func_expm1" if test "x$ac_cv_func_expm1" = xyes then : printf "%s\n" "#define HAVE_EXPM1 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" if test "x$ac_cv_func_pow" = xyes then : printf "%s\n" "#define HAVE_POW 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "powl" "ac_cv_func_powl" if test "x$ac_cv_func_powl" = xyes then : printf "%s\n" "#define HAVE_POWL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "log1p" "ac_cv_func_log1p" if test "x$ac_cv_func_log1p" = xyes then : printf "%s\n" "#define HAVE_LOG1P 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "log10l" "ac_cv_func_log10l" if test "x$ac_cv_func_log10l" = xyes then : printf "%s\n" "#define HAVE_LOG10L 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fabsl" "ac_cv_func_fabsl" if test "x$ac_cv_func_fabsl" = xyes then : printf "%s\n" "#define HAVE_FABSL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "floorl" "ac_cv_func_floorl" if test "x$ac_cv_func_floorl" = xyes then : printf "%s\n" "#define HAVE_FLOORL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sqrt" "ac_cv_func_sqrt" if test "x$ac_cv_func_sqrt" = xyes then : printf "%s\n" "#define HAVE_SQRT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" if test "x$ac_cv_func_strchr" = xyes then : printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" if test "x$ac_cv_func_strdup" = xyes then : printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" if test "x$ac_cv_func_strstr" = xyes then : printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" if test "x$ac_cv_func_strtol" = xyes then : printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime" if test "x$ac_cv_func_utime" = xyes then : printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite" if test "x$ac_cv_func_isfinite" = xyes then : printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite" if test "x$ac_cv_func_finite" = xyes then : printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" if test "x$ac_cv_func_nanosleep" = xyes then : printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sleep" "ac_cv_func_sleep" if test "x$ac_cv_func_sleep" = xyes then : printf "%s\n" "#define HAVE_SLEEP 1" >>confdefs.h fi ac_config_files="$ac_config_files Makefile pathconv.sh src/Makefile src/gtk/Makefile src/math/Makefile driver/Makefile addin/Makefile po/Makefile.in m4/Makefile demo/Makefile initfile/Makefile doc/Makefile doc/html/Makefile doc/html/img/Makefile doc/html/ja/Makefile doc/html/ja/tutorial/Makefile doc/html/ja/dialogs/Makefile zsh/Makefile test/Makefile plugins/Makefile plugins/ruby/Makefile gtksourceview/Makefile mingw/Makefile osx/Makefile osx/Info-ngraph-gtk.plist icons/Makefile icons/scalable/Makefile icons/scalable/apps/Makefile icons/scalable/mimetypes/Makefile misc/Makefile" ac_config_headers="$ac_config_headers config.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${OS_OSX_TRUE}" && test -z "${OS_OSX_FALSE}"; then as_fn_error $? "conditional \"OS_OSX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAVE_RUBY_DEV_TRUE}" && test -z "${HAVE_RUBY_DEV_FALSE}"; then as_fn_error $? "conditional \"HAVE_RUBY_DEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by ngraph $as_me 6.09.05, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ ngraph config.status 6.09.05 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ AS; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pathconv.sh") CONFIG_FILES="$CONFIG_FILES pathconv.sh" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES src/gtk/Makefile" ;; "src/math/Makefile") CONFIG_FILES="$CONFIG_FILES src/math/Makefile" ;; "driver/Makefile") CONFIG_FILES="$CONFIG_FILES driver/Makefile" ;; "addin/Makefile") CONFIG_FILES="$CONFIG_FILES addin/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; "demo/Makefile") CONFIG_FILES="$CONFIG_FILES demo/Makefile" ;; "initfile/Makefile") CONFIG_FILES="$CONFIG_FILES initfile/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/html/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/Makefile" ;; "doc/html/img/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/img/Makefile" ;; "doc/html/ja/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/ja/Makefile" ;; "doc/html/ja/tutorial/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/ja/tutorial/Makefile" ;; "doc/html/ja/dialogs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/html/ja/dialogs/Makefile" ;; "zsh/Makefile") CONFIG_FILES="$CONFIG_FILES zsh/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "plugins/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/ruby/Makefile" ;; "gtksourceview/Makefile") CONFIG_FILES="$CONFIG_FILES gtksourceview/Makefile" ;; "mingw/Makefile") CONFIG_FILES="$CONFIG_FILES mingw/Makefile" ;; "osx/Makefile") CONFIG_FILES="$CONFIG_FILES osx/Makefile" ;; "osx/Info-ngraph-gtk.plist") CONFIG_FILES="$CONFIG_FILES osx/Info-ngraph-gtk.plist" ;; "icons/Makefile") CONFIG_FILES="$CONFIG_FILES icons/Makefile" ;; "icons/scalable/Makefile") CONFIG_FILES="$CONFIG_FILES icons/scalable/Makefile" ;; "icons/scalable/apps/Makefile") CONFIG_FILES="$CONFIG_FILES icons/scalable/apps/Makefile" ;; "icons/scalable/mimetypes/Makefile") CONFIG_FILES="$CONFIG_FILES icons/scalable/mimetypes/Makefile" ;; "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Assembler program. AS=$lt_AS # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" gt_tab=`printf '\t'` cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ngraph-gtk-6.09.05/gtksourceview/0000755000175000017500000000000014143613332013637 500000000000000ngraph-gtk-6.09.05/gtksourceview/ngraph-math.lang.post0000644000175000017500000000120613615007006017611 00000000000000 ngraph-gtk-6.09.05/gtksourceview/create_lang.nsc0000644000175000017500000000061613254174507016543 00000000000000#! /usr/bin/ngraph SED="$1" cat "$2" new data echo ' ' get data -field math_functions | "$SED" -Ee 's!.+! &!' echo ' ' echo echo ' ' get data -field math_constants | "$SED" -E -e '/^%/d' -e 's/.+/ &<\/keyword>/' echo ' ' echo cat "$3" ngraph-gtk-6.09.05/gtksourceview/Makefile.in0000644000175000017500000004053014143146775015642 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gtksourceview ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gsl.m4 \ $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(langspecdir)" DATA = $(nodist_langspec_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_COMPILE_RESOURCES = @GLIB_COMPILE_RESOURCES@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GOBJECT_QUERY = @GOBJECT_QUERY@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CONFIG = @GSL_CONFIG@ GSL_LIBS = @GSL_LIBS@ GTKSOURCEVIEW4_CFLAGS = @GTKSOURCEVIEW4_CFLAGS@ GTKSOURCEVIEW4_LIBS = @GTKSOURCEVIEW4_LIBS@ GTKSOURCEVIEW_CFLAGS = @GTKSOURCEVIEW_CFLAGS@ GTKSOURCEVIEW_LIBS = @GTKSOURCEVIEW_LIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBNGRAPH_VERSION = @LIBNGRAPH_VERSION@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAC_INTEGRATION_CFLAGS = @MAC_INTEGRATION_CFLAGS@ MAC_INTEGRATION_LIBS = @MAC_INTEGRATION_LIBS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ RM = @RM@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ vsymldflags = @vsymldflags@ langspecdir = $(pkgdatadir)/gtksourceview langspecs = ngraph-math.lang nodist_langspec_DATA = $(langspecs) EXTRA_DIST = create_lang.nsc $(langspecs).pre $(langspecs).post CLEANFILES = $(langspecs) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu gtksourceview/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu gtksourceview/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_langspecDATA: $(nodist_langspec_DATA) @$(NORMAL_INSTALL) @list='$(nodist_langspec_DATA)'; test -n "$(langspecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(langspecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(langspecdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(langspecdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(langspecdir)" || exit $$?; \ done uninstall-nodist_langspecDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_langspec_DATA)'; test -n "$(langspecdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(langspecdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(langspecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_langspecDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_langspecDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nodist_langspecDATA install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-nodist_langspecDATA .PRECIOUS: Makefile $(langspecs): create_lang.nsc $(top_builddir)/src/libngraph.la $(srcdir)/$(langspecs).pre $(srcdir)/$(langspecs).post $(top_builddir)/src/ngraph -i $(srcdir)/create_lang.nsc "$(SED)" "$(srcdir)/$(langspecs).pre" "$(srcdir)/$(langspecs).post" > $(langspecs) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngraph-gtk-6.09.05/gtksourceview/Makefile.am0000644000175000017500000000071213250515777015627 00000000000000langspecdir = $(pkgdatadir)/gtksourceview langspecs = ngraph-math.lang nodist_langspec_DATA = $(langspecs) EXTRA_DIST = create_lang.nsc $(langspecs).pre $(langspecs).post $(langspecs): create_lang.nsc $(top_builddir)/src/libngraph.la $(srcdir)/$(langspecs).pre $(srcdir)/$(langspecs).post $(top_builddir)/src/ngraph -i $(srcdir)/create_lang.nsc "$(SED)" "$(srcdir)/$(langspecs).pre" "$(srcdir)/$(langspecs).post" > $(langspecs) CLEANFILES = $(langspecs) ngraph-gtk-6.09.05/gtksourceview/ngraph-math.lang.pre0000644000175000017500000001060013672607716017431 00000000000000 text/x-ngraph-math #