summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2018-11-29 22:15:37 +0100
committerAndrej Shadura <andrew.shadura@collabora.co.uk>2018-11-29 22:15:37 +0100
commit567b200b91537405689ae0ca944f121201360a6b (patch)
tree918d32d65a8588bfe06607dc94c39b4088edd5a8
parent293202087ef00accaa85af02c2c9359ab6b2513c (diff)
New upstream version 1.2018.13
-rw-r--r--pom.xml5
-rw-r--r--src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java46
-rw-r--r--src/gen/lib/cdt/dtclose__c.java63
-rw-r--r--src/gen/lib/cdt/dtdisc__c.java72
-rw-r--r--src/gen/lib/cdt/dtextract__c.java26
-rw-r--r--src/gen/lib/cdt/dtflatten__c.java4
-rw-r--r--src/gen/lib/cdt/dtopen__c.java42
-rw-r--r--src/gen/lib/cdt/dtrestore__c.java26
-rw-r--r--src/gen/lib/cdt/dtsize__c.java28
-rw-r--r--src/gen/lib/cdt/dttree__c.java256
-rw-r--r--src/gen/lib/cdt/dtview__c.java50
-rw-r--r--src/gen/lib/cgraph/apply__c.java22
-rw-r--r--src/gen/lib/cgraph/attr__c.java264
-rw-r--r--src/gen/lib/cgraph/edge__c.java242
-rw-r--r--src/gen/lib/cgraph/graph__c.java136
-rw-r--r--src/gen/lib/cgraph/id__c.java30
-rw-r--r--src/gen/lib/cgraph/imap__c.java25
-rw-r--r--src/gen/lib/cgraph/mem__c.java43
-rw-r--r--src/gen/lib/cgraph/node__c.java118
-rw-r--r--src/gen/lib/cgraph/obj__c.java46
-rw-r--r--src/gen/lib/cgraph/rec__c.java73
-rw-r--r--src/gen/lib/cgraph/refstr__c.java95
-rw-r--r--src/gen/lib/cgraph/subg__c.java55
-rw-r--r--src/gen/lib/cgraph/utils__c.java21
-rw-r--r--src/gen/lib/circogen/block__c.java41
-rw-r--r--src/gen/lib/circogen/blockpath__c.java40
-rw-r--r--src/gen/lib/circogen/blocktree__c.java40
-rw-r--r--src/gen/lib/circogen/circpos__c.java41
-rw-r--r--src/gen/lib/circogen/circular__c.java41
-rw-r--r--src/gen/lib/circogen/circularinit__c.java41
-rw-r--r--src/gen/lib/circogen/deglist__c.java41
-rw-r--r--src/gen/lib/circogen/edgelist__c.java40
-rw-r--r--src/gen/lib/circogen/nodelist__c.java41
-rw-r--r--src/gen/lib/circogen/nodeset__c.java42
-rw-r--r--src/gen/lib/common/args__c.java41
-rw-r--r--src/gen/lib/common/arrows__c.java97
-rw-r--r--src/gen/lib/common/ellipse__c.java40
-rw-r--r--src/gen/lib/common/emit__c.java89
-rw-r--r--src/gen/lib/common/geom__c.java66
-rw-r--r--src/gen/lib/common/globals__c.java40
-rw-r--r--src/gen/lib/common/htmllex__c.java40
-rw-r--r--src/gen/lib/common/htmlparse__c.java41
-rw-r--r--src/gen/lib/common/htmltable__c.java44
-rw-r--r--src/gen/lib/common/input__c.java88
-rw-r--r--src/gen/lib/common/labels__c.java174
-rw-r--r--src/gen/lib/common/memory__c.java4
-rw-r--r--src/gen/lib/common/ns__c.java209
-rw-r--r--src/gen/lib/common/output__c.java41
-rw-r--r--src/gen/lib/common/pointset__c.java40
-rw-r--r--src/gen/lib/common/postproc__c.java478
-rw-r--r--src/gen/lib/common/psusershape__c.java40
-rw-r--r--src/gen/lib/common/routespl__c.java459
-rw-r--r--src/gen/lib/common/shapes__c.java318
-rw-r--r--src/gen/lib/common/splines__c.java447
-rw-r--r--src/gen/lib/common/textspan__c.java59
-rw-r--r--src/gen/lib/common/utils__c.java344
-rw-r--r--src/gen/lib/dotgen/acyclic__c.java62
-rw-r--r--src/gen/lib/dotgen/aspect__c.java46
-rw-r--r--src/gen/lib/dotgen/class1__c.java60
-rw-r--r--src/gen/lib/dotgen/class2__c.java115
-rw-r--r--src/gen/lib/dotgen/cluster__c.java196
-rw-r--r--src/gen/lib/dotgen/compound__c.java40
-rw-r--r--src/gen/lib/dotgen/conc__c.java41
-rw-r--r--src/gen/lib/dotgen/decomp__c.java81
-rw-r--r--src/gen/lib/dotgen/dotinit__c.java111
-rw-r--r--src/gen/lib/dotgen/dotsplines__c.java919
-rw-r--r--src/gen/lib/dotgen/fastgr__c.java143
-rw-r--r--src/gen/lib/dotgen/flat__c.java189
-rw-r--r--src/gen/lib/dotgen/mincross__c.java549
-rw-r--r--src/gen/lib/dotgen/position__c.java387
-rw-r--r--src/gen/lib/dotgen/rank__c.java154
-rw-r--r--src/gen/lib/dotgen/sameport__c.java54
-rw-r--r--src/gen/lib/fdpgen/clusteredges__c.java40
-rw-r--r--src/gen/lib/fdpgen/comp__c.java40
-rw-r--r--src/gen/lib/fdpgen/fdpinit__c.java41
-rw-r--r--src/gen/lib/fdpgen/grid__c.java40
-rw-r--r--src/gen/lib/fdpgen/layout__c.java41
-rw-r--r--src/gen/lib/fdpgen/tlayout__c.java40
-rw-r--r--src/gen/lib/fdpgen/xlayout__c.java40
-rw-r--r--src/gen/lib/gvc/gvc__c.java8
-rw-r--r--src/gen/lib/gvc/gvcontext__c.java16
-rw-r--r--src/gen/lib/gvc/gvlayout__c.java59
-rw-r--r--src/gen/lib/gvc/gvplugin__c.java10
-rw-r--r--src/gen/lib/gvc/gvrender__c.java41
-rw-r--r--src/gen/lib/gvc/gvtextlayout__c.java12
-rw-r--r--src/gen/lib/label/index__c.java448
-rw-r--r--src/gen/lib/label/node__c.java252
-rw-r--r--src/gen/lib/label/nrtmain__c.java10
-rw-r--r--src/gen/lib/label/rectangle__c.java162
-rw-r--r--src/gen/lib/label/split_q__c.java423
-rw-r--r--src/gen/lib/label/xlabels__c.java1087
-rw-r--r--src/gen/lib/ortho/ortho__c.java41
-rw-r--r--src/gen/lib/pack/ccomps__c.java41
-rw-r--r--src/gen/lib/pack/pack__c.java57
-rw-r--r--src/gen/lib/pack/ptest__c.java42
-rw-r--r--src/gen/lib/pathplan/cvt__c.java7
-rw-r--r--src/gen/lib/pathplan/route__c.java220
-rw-r--r--src/gen/lib/pathplan/shortest__c.java368
-rw-r--r--src/h/Agattr_s.java68
-rw-r--r--src/h/Agattr_t.java57
-rw-r--r--src/h/Agcbdisc_s.java74
-rw-r--r--src/h/Agcbdisc_t.java57
-rw-r--r--src/h/Agclos_s.java78
-rw-r--r--src/h/Agclos_t.java57
-rw-r--r--src/h/Agcmpedge_t.java67
-rw-r--r--src/h/Agcmpgraph_t.java69
-rw-r--r--src/h/Agcmpnode_t.java69
-rw-r--r--src/h/Agdatadict_s.java72
-rw-r--r--src/h/Agdatadict_t.java57
-rw-r--r--src/h/Agdesc_s.java78
-rw-r--r--src/h/Agdesc_t.java57
-rw-r--r--src/h/Agdisc_s.java68
-rw-r--r--src/h/Agdisc_t.java57
-rw-r--r--src/h/Agdstate_t.java57
-rw-r--r--src/h/Agedge_s.java70
-rw-r--r--src/h/Agedge_t.java57
-rw-r--r--src/h/Agedgeinfo_t.java110
-rw-r--r--src/h/Agedgepair_s.java64
-rw-r--r--src/h/Agedgepair_t.java57
-rw-r--r--src/h/Agiddisc_s.java77
-rw-r--r--src/h/Agiddisc_t.java57
-rw-r--r--src/h/Agiodisc_t.java57
-rw-r--r--src/h/Agmemdisc_s.java72
-rw-r--r--src/h/Agmemdisc_t.java57
-rw-r--r--src/h/Agnode_s.java68
-rw-r--r--src/h/Agnode_t.java57
-rw-r--r--src/h/Agnodeinfo_t.java150
-rw-r--r--src/h/Agobj_s.java66
-rw-r--r--src/h/Agobj_t.java57
-rw-r--r--src/h/Agraph_s.java80
-rw-r--r--src/h/Agraph_t.java57
-rw-r--r--src/h/Agraphinfo_t.java171
-rw-r--r--src/h/Agrec_t.java57
-rw-r--r--src/h/Agsplice_arg_t.java67
-rw-r--r--src/h/Agsubnode_s.java72
-rw-r--r--src/h/Agsubnode_t.java57
-rw-r--r--src/h/Agsym_t.java57
-rw-r--r--src/h/Agtag_s.java72
-rw-r--r--src/h/Agtag_t.java57
-rw-r--r--src/h/BestPos_t.java69
-rw-r--r--src/h/Dict_t.java57
-rw-r--r--src/h/Dt_t.java57
-rw-r--r--src/h/Dtdata_t.java57
-rw-r--r--src/h/Dtdisc_t.java57
-rw-r--r--src/h/Dthold_t.java57
-rw-r--r--src/h/Dtlink_t.java57
-rw-r--r--src/h/Dtmethod_t.java57
-rw-r--r--src/h/GVC_s.java173
-rw-r--r--src/h/GVC_t.java57
-rw-r--r--src/h/GVG_s.java73
-rw-r--r--src/h/GVG_t.java57
-rw-r--r--src/h/GVJ_s.java230
-rw-r--r--src/h/GVJ_t.java57
-rw-r--r--src/h/HDict_t.java69
-rw-r--r--src/h/IMapEntry_t.java71
-rw-r--r--src/h/Pedge_t.java65
-rw-r--r--src/h/Ppoly_t.java67
-rw-r--r--src/h/RTree.java124
-rw-r--r--src/h/RTree_t.java57
-rw-r--r--src/h/Rect_t.java65
-rw-r--r--src/h/STArray.java156
-rw-r--r--src/h/ST_Agattr_s.java38
-rw-r--r--src/h/ST_Agclos_s.java98
-rw-r--r--src/h/ST_Agdatadict_s.java46
-rw-r--r--src/h/ST_Agdisc_s.java20
-rw-r--r--src/h/ST_Agdstate_s.java10
-rw-r--r--src/h/ST_Agedge_s.java238
-rw-r--r--src/h/ST_Agedgeinfo_t.java160
-rw-r--r--src/h/ST_Agedgepair_s.java21
-rw-r--r--src/h/ST_Agiddisc_s.java38
-rw-r--r--src/h/ST_Agiodisc_s.java33
-rw-r--r--src/h/ST_Agmemdisc_s.java24
-rw-r--r--src/h/ST_Agnode_s.java259
-rw-r--r--src/h/ST_Agnodeinfo_t.java267
-rw-r--r--src/h/ST_Agobj_s.java69
-rw-r--r--src/h/ST_Agraph_s.java194
-rw-r--r--src/h/ST_Agraphinfo_t.java256
-rw-r--r--src/h/ST_Agrec_s.java94
-rw-r--r--src/h/ST_Agsubnode_s.java122
-rw-r--r--src/h/ST_Agsym_s.java81
-rw-r--r--src/h/ST_Agtag_s.java2
-rw-r--r--src/h/ST_BestPos_t.java (renamed from src/h/polygon_t.java)96
-rw-r--r--src/h/ST_Branch_t.java (renamed from src/h/STStarArrayOfPointer.java)86
-rw-r--r--src/h/ST_EMPTY.java10
-rw-r--r--src/h/ST_GVCOMMON_t.java34
-rw-r--r--src/h/ST_GVC_s.java27
-rw-r--r--src/h/ST_HDict_t.java45
-rw-r--r--src/h/ST_IMapEntry_t.java18
-rw-r--r--src/h/ST_LeafList_t.java (renamed from src/h/agusererrf.java)23
-rw-r--r--src/h/ST_Node_t___.java85
-rw-r--r--src/h/ST_Node_t___or_object_t.java (renamed from src/h/Grid.java)11
-rw-r--r--src/h/ST_PartitionVars.java (renamed from src/h/agxbuf.java)87
-rw-r--r--src/h/ST_Pedge_t.java119
-rw-r--r--src/h/ST_Ppoly_t.java148
-rw-r--r--src/h/ST_RTree.java68
-rw-r--r--src/h/ST_Rect_t.java (renamed from src/h/Agsym_s.java)56
-rw-r--r--src/h/ST_SplitQ_t.java171
-rw-r--r--src/h/ST_XLabels_t.java54
-rw-r--r--src/h/ST_adjmatrix_t.java52
-rw-r--r--src/h/ST_arrowdir_t.java (renamed from src/h/Agrec_s.java)40
-rw-r--r--src/h/ST_arrowtype_t.java47
-rw-r--r--src/h/ST_aspect_t.java39
-rw-r--r--src/h/ST_bezier.java206
-rw-r--r--src/h/ST_boxf.java62
-rw-r--r--src/h/ST_cinfo_t.java (renamed from src/h/textfont_t.java)68
-rw-r--r--src/h/ST_deque_t.java129
-rw-r--r--src/h/ST_dt_s.java55
-rw-r--r--src/h/ST_dtdata_s.java57
-rw-r--r--src/h/ST_dtdisc_s.java63
-rw-r--r--src/h/ST_dthold_s.java25
-rw-r--r--src/h/ST_dtlink_s.java180
-rw-r--r--src/h/ST_dtmethod_s.java33
-rw-r--r--src/h/ST_elist.java111
-rw-r--r--src/h/ST_fontinfo.java70
-rw-r--r--src/h/ST_gvlayout_engine_s.java39
-rw-r--r--src/h/ST_gvlayout_features_t.java19
-rw-r--r--src/h/ST_gvplugin_active_layout_t.java21
-rw-r--r--src/h/ST_gvplugin_available_s.java (renamed from src/h/gvplugin_available_s.java)55
-rw-r--r--src/h/ST_gvplugin_installed_t.java35
-rw-r--r--src/h/ST_inside_t.java53
-rw-r--r--src/h/ST_label_params_t.java30
-rw-r--r--src/h/ST_layout_t.java87
-rw-r--r--src/h/ST_nlist_t.java15
-rw-r--r--src/h/ST_nodequeue.java61
-rw-r--r--src/h/ST_object_t.java155
-rw-r--r--src/h/ST_pack_info.java42
-rw-r--r--src/h/ST_path.java77
-rw-r--r--src/h/ST_pathend_t.java106
-rw-r--r--src/h/ST_point.java22
-rw-r--r--src/h/ST_pointf.java229
-rw-r--r--src/h/ST_pointnlink_t.java141
-rw-r--r--src/h/ST_polygon_t.java90
-rw-r--r--src/h/ST_port.java68
-rw-r--r--src/h/ST_rank_t.java297
-rw-r--r--src/h/ST_refstr_t.java114
-rw-r--r--src/h/ST_shape_desc.java35
-rw-r--r--src/h/ST_shape_functions.java42
-rw-r--r--src/h/ST_splineInfo.java41
-rw-r--r--src/h/ST_spline_info_t.java60
-rw-r--r--src/h/ST_splines.java49
-rw-r--r--src/h/ST_tedge_t.java88
-rw-r--r--src/h/ST_textlabel_t.java118
-rw-r--r--src/h/ST_textspan_t.java134
-rw-r--r--src/h/ST_tna_t.java129
-rw-r--r--src/h/ST_triangle_t.java119
-rw-r--r--src/h/ST_xlabel_t.java170
-rw-r--r--src/h/SplitQ_t.java71
-rw-r--r--src/h/XLabels_t.java79
-rw-r--r--src/h/_Node_t___.java69
-rw-r--r--src/h/_dt_s.java82
-rw-r--r--src/h/_dtdata_s.java85
-rw-r--r--src/h/_dtdisc_s.java80
-rw-r--r--src/h/_dthold_s.java66
-rw-r--r--src/h/_dtlink_s.java74
-rw-r--r--src/h/_dtmethod_s.java66
-rw-r--r--src/h/aag_buffer_state.java59
-rw-r--r--src/h/aag_trans_info.java67
-rw-r--r--src/h/adjmatrix_t.java67
-rw-r--r--src/h/agerrlevel_t.java63
-rw-r--r--src/h/agobjsearchfn_t.java59
-rw-r--r--src/h/ainfo.java67
-rw-r--r--src/h/arrowdir_t.java69
-rw-r--r--src/h/arrowname_t.java67
-rw-r--r--src/h/arrowtype_t.java69
-rw-r--r--src/h/aspect_t.java78
-rw-r--r--src/h/attrsym_t.java57
-rw-r--r--src/h/bend.java63
-rw-r--r--src/h/bezier.java71
-rw-r--r--src/h/blk_t.java71
-rw-r--r--src/h/block.java80
-rw-r--r--src/h/block_t.java57
-rw-r--r--src/h/blocklist_t.java67
-rw-r--r--src/h/box.java63
-rw-r--r--src/h/boxf.java63
-rw-r--r--src/h/bport_t.java69
-rw-r--r--src/h/bsearch_cmpf.java59
-rw-r--r--src/h/buff_s.java68
-rw-r--r--src/h/ccgnodeinfo_t.java79
-rw-r--r--src/h/ccgraphinfo_t.java67
-rw-r--r--src/h/cdata.java125
-rw-r--r--src/h/cell.java69
-rw-r--r--src/h/chanItem.java69
-rw-r--r--src/h/channel.java75
-rw-r--r--src/h/cinfo_t.java67
-rw-r--r--src/h/circ_state.java77
-rw-r--r--src/h/clist_t.java69
-rw-r--r--src/h/deque_t.java67
-rw-r--r--src/h/edge_t.java57
-rw-r--r--src/h/elist.java67
-rw-r--r--src/h/elist_t.java67
-rw-r--r--src/h/fail_stack_type.java70
-rw-r--r--src/h/fdpParms_s.java78
-rw-r--r--src/h/fdpParms_t.java57
-rw-r--r--src/h/field_t.java79
-rw-r--r--src/h/fill_type.java63
-rw-r--r--src/h/fitem.java67
-rw-r--r--src/h/flushfn.java59
-rw-r--r--src/h/font_type.java63
-rw-r--r--src/h/fontinfo.java68
-rw-r--r--src/h/format_type.java73
-rw-r--r--src/h/freefunc_t.java59
-rw-r--r--src/h/fspan.java67
-rw-r--r--src/h/gdata.java78
-rw-r--r--src/h/ginfo.java71
-rw-r--r--src/h/graph_t.java57
-rw-r--r--src/h/gridpt.java65
-rw-r--r--src/h/gstack_t.java71
-rw-r--r--src/h/gv_argvlist_t.java69
-rw-r--r--src/h/gvattr_t.java63
-rw-r--r--src/h/gvcolor_t.java85
-rw-r--r--src/h/gvdevice_callbacks_t.java81
-rw-r--r--src/h/gvdevice_engine_s.java68
-rw-r--r--src/h/gvdevice_engine_t.java57
-rw-r--r--src/h/gvdevice_features_t.java71
-rw-r--r--src/h/gvevent_key_binding_t.java67
-rw-r--r--src/h/gvevent_key_callback_t.java59
-rw-r--r--src/h/gvformatter_engine_t.java59
-rw-r--r--src/h/gvlayout_engine_s.java66
-rw-r--r--src/h/gvlayout_engine_t.java57
-rw-r--r--src/h/gvlayout_features_t.java65
-rw-r--r--src/h/gvloadimage_engine_s.java64
-rw-r--r--src/h/gvloadimage_engine_t.java57
-rw-r--r--src/h/gvplugin_active_device_t.java71
-rw-r--r--src/h/gvplugin_active_layout_t.java71
-rw-r--r--src/h/gvplugin_active_loadimage_t.java69
-rw-r--r--src/h/gvplugin_active_render_t.java71
-rw-r--r--src/h/gvplugin_active_textlayout_t.java69
-rw-r--r--src/h/gvplugin_available_t.java57
-rw-r--r--src/h/gvplugin_installed_t.java81
-rw-r--r--src/h/gvplugin_package_s.java68
-rw-r--r--src/h/gvplugin_package_t.java57
-rw-r--r--src/h/gvrender_engine_s.java125
-rw-r--r--src/h/gvrender_engine_t.java57
-rw-r--r--src/h/gvrender_features_t.java73
-rw-r--r--src/h/gvtextlayout_engine_s.java64
-rw-r--r--src/h/gvtextlayout_engine_t.java57
-rw-r--r--src/h/hsvrgbacolor_t.java69
-rw-r--r--src/h/htextspan_t.java73
-rw-r--r--src/h/htmlcell_t.java59
-rw-r--r--src/h/htmldata_t.java97
-rw-r--r--src/h/htmlenv_t.java77
-rw-r--r--src/h/htmlimg_t.java69
-rw-r--r--src/h/htmlmap_data_t.java77
-rw-r--r--src/h/htmltbl_t.java59
-rw-r--r--src/h/htmltxt_t.java71
-rw-r--r--src/h/inside_t.java83
-rw-r--r--src/h/label_params_t.java67
-rw-r--r--src/h/nlist_t.java67
-rw-r--r--src/h/node_list.java67
-rw-r--r--src/h/node_t.java57
-rw-r--r--src/h/nodequeue.java65
-rw-r--r--src/h/object_t.java69
-rw-r--r--src/h/pack_info.java79
-rw-r--r--src/h/path.java71
-rw-r--r--src/h/pathend_t.java73
-rw-r--r--src/h/point.java63
-rw-r--r--src/h/pointf.java63
-rw-r--r--src/h/pointnlink_t.java67
-rw-r--r--src/h/port.java88
-rw-r--r--src/h/rawgraph.java67
-rw-r--r--src/h/rdr_t.java69
-rw-r--r--src/h/re_opcode_t.java223
-rw-r--r--src/h/re_pattern_buffer.java141
-rw-r--r--src/h/re_registers.java69
-rw-r--r--src/h/refstr_t.java71
-rw-r--r--src/h/reg_errcode_t.java103
-rw-r--r--src/h/regex_t.java57
-rw-r--r--src/h/register_info_type.java84
-rw-r--r--src/h/regmatch_t.java68
-rw-r--r--src/h/route.java67
-rw-r--r--src/h/same_t.java71
-rw-r--r--src/h/save_e_t.java65
-rw-r--r--src/h/save_stack_t.java67
-rw-r--r--src/h/sedge.java59
-rw-r--r--src/h/seedMode.java65
-rw-r--r--src/h/segitem_t.java67
-rw-r--r--src/h/segment.java81
-rw-r--r--src/h/segment_t.java73
-rw-r--r--src/h/sfont_t.java67
-rw-r--r--src/h/sgraph.java71
-rw-r--r--src/h/shape_desc.java71
-rw-r--r--src/h/shape_functions.java75
-rw-r--r--src/h/shape_t.java69
-rw-r--r--src/h/snode.java59
-rw-r--r--src/h/snodeitem.java69
-rw-r--r--src/h/splineInfo.java71
-rw-r--r--src/h/spline_info_t.java67
-rw-r--r--src/h/splines.java69
-rw-r--r--src/h/textlabel_t.java101
-rw-r--r--src/h/textspan_t.java77
-rw-r--r--src/h/tna_t.java67
-rw-r--r--src/h/triangle_t.java67
-rw-r--r--src/h/xlabel_t.java71
-rw-r--r--src/net/sourceforge/plantuml/AFile.java (renamed from src/net/sourceforge/plantuml/project2/TimeElement.java)20
-rw-r--r--src/net/sourceforge/plantuml/AFileRegular.java89
-rw-r--r--src/net/sourceforge/plantuml/AFileZipEntry.java124
-rw-r--r--src/net/sourceforge/plantuml/AParentFolder.java (renamed from src/net/sourceforge/plantuml/project2/Ressource.java)12
-rw-r--r--src/net/sourceforge/plantuml/AParentFolderRegular.java71
-rw-r--r--src/net/sourceforge/plantuml/AParentFolderZip.java76
-rw-r--r--src/net/sourceforge/plantuml/Annotated.java3
-rw-r--r--src/net/sourceforge/plantuml/AnnotatedWorker.java74
-rw-r--r--src/net/sourceforge/plantuml/BackSlash.java4
-rw-r--r--src/net/sourceforge/plantuml/BlockUml.java12
-rw-r--r--src/net/sourceforge/plantuml/BlockUmlBuilder.java17
-rw-r--r--src/net/sourceforge/plantuml/ErrorUml.java4
-rw-r--r--src/net/sourceforge/plantuml/FileSystem.java30
-rw-r--r--src/net/sourceforge/plantuml/FontParam.java4
-rw-r--r--src/net/sourceforge/plantuml/ISkinParam.java11
-rw-r--r--src/net/sourceforge/plantuml/ISkinSimple.java5
-rw-r--r--src/net/sourceforge/plantuml/LineLocationImpl.java10
-rw-r--r--src/net/sourceforge/plantuml/Option.java5
-rw-r--r--src/net/sourceforge/plantuml/OptionFlags.java21
-rw-r--r--src/net/sourceforge/plantuml/OptionPrint.java3
-rw-r--r--src/net/sourceforge/plantuml/PSystemBuilder.java6
-rw-r--r--src/net/sourceforge/plantuml/PSystemError.java151
-rw-r--r--src/net/sourceforge/plantuml/QString.java (renamed from src/net/sourceforge/plantuml/project2/TaskImpl.java)82
-rw-r--r--src/net/sourceforge/plantuml/Run.java11
-rw-r--r--src/net/sourceforge/plantuml/SignatureUtils.java12
-rw-r--r--src/net/sourceforge/plantuml/SkinParam.java50
-rw-r--r--src/net/sourceforge/plantuml/SkinParamColors.java4
-rw-r--r--src/net/sourceforge/plantuml/SkinParamDelegator.java16
-rw-r--r--src/net/sourceforge/plantuml/SourceFileReader.java3
-rw-r--r--src/net/sourceforge/plantuml/SourceFileReader2.java3
-rw-r--r--src/net/sourceforge/plantuml/SourceFileReaderAbstract.java4
-rw-r--r--src/net/sourceforge/plantuml/SourceStringReader.java22
-rw-r--r--src/net/sourceforge/plantuml/SpriteContainerEmpty.java10
-rw-r--r--src/net/sourceforge/plantuml/StringUtils.java12
-rw-r--r--src/net/sourceforge/plantuml/UmlDiagram.java23
-rw-r--r--src/net/sourceforge/plantuml/UmlDiagramType.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java10
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/Branch.java13
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java9
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java6
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java3
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java51
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java3
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java5
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorAddNote.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorCreateGroup.java6
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java14
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java14
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java45
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java7
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java4
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java7
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java3
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java4
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java2
-rw-r--r--src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java2
-rw-r--r--src/net/sourceforge/plantuml/ant/CheckZipTask.java136
-rw-r--r--src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java2
-rw-r--r--src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java2
-rw-r--r--src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java2
-rw-r--r--src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java2
-rw-r--r--src/net/sourceforge/plantuml/classdiagram/command/CommandHideShow2.java5
-rw-r--r--src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java2
-rw-r--r--src/net/sourceforge/plantuml/code/ArobaseStringCompressor2.java4
-rw-r--r--src/net/sourceforge/plantuml/command/CommandMainframe.java (renamed from src/net/sourceforge/plantuml/project2/RowUtils.java)26
-rw-r--r--src/net/sourceforge/plantuml/command/CommandMultilinesLegend.java2
-rw-r--r--src/net/sourceforge/plantuml/command/CommandMultilinesTitle.java2
-rw-r--r--src/net/sourceforge/plantuml/command/CommandPragma.java8
-rw-r--r--src/net/sourceforge/plantuml/command/CommandSpriteFile.java3
-rw-r--r--src/net/sourceforge/plantuml/command/PSystemBasicFactory.java4
-rw-r--r--src/net/sourceforge/plantuml/command/UmlDiagramFactory.java1
-rw-r--r--src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java4
-rw-r--r--src/net/sourceforge/plantuml/core/DiagramType.java5
-rw-r--r--src/net/sourceforge/plantuml/core/UmlSource.java86
-rw-r--r--src/net/sourceforge/plantuml/creole/AtomEmbededSystem.java2
-rw-r--r--src/net/sourceforge/plantuml/creole/AtomImg.java14
-rw-r--r--src/net/sourceforge/plantuml/creole/AtomMath.java18
-rw-r--r--src/net/sourceforge/plantuml/creole/AtomOpenIcon.java4
-rw-r--r--src/net/sourceforge/plantuml/creole/AtomSprite.java13
-rw-r--r--src/net/sourceforge/plantuml/creole/AtomText.java32
-rw-r--r--src/net/sourceforge/plantuml/creole/CommandCreoleImg.java8
-rw-r--r--src/net/sourceforge/plantuml/creole/CommandCreoleQrcode.java74
-rw-r--r--src/net/sourceforge/plantuml/creole/CommandCreoleSprite.java2
-rw-r--r--src/net/sourceforge/plantuml/creole/StripeSimple.java14
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/Display.java28
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/LeafType.java3
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/Link.java11
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java2
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java11
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java2
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/entity/EntityFactory.java12
-rw-r--r--src/net/sourceforge/plantuml/cucadiagram/entity/EntityImpl.java10
-rw-r--r--src/net/sourceforge/plantuml/dedication/Dedication.java13
-rw-r--r--src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java2
-rw-r--r--src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java2
-rw-r--r--src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java2
-rw-r--r--src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java119
-rw-r--r--src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java1
-rw-r--r--src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java4
-rw-r--r--src/net/sourceforge/plantuml/donors/PSystemDonors.java32
-rw-r--r--src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java648
-rw-r--r--src/net/sourceforge/plantuml/flashcode/FlashCodeUtils.java3
-rw-r--r--src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsNone.java3
-rw-r--r--src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java13
-rw-r--r--src/net/sourceforge/plantuml/graphic/EmbededSystemLine.java2
-rw-r--r--src/net/sourceforge/plantuml/graphic/HtmlColorGradient.java6
-rw-r--r--src/net/sourceforge/plantuml/graphic/QuoteUtils.java16
-rw-r--r--src/net/sourceforge/plantuml/graphic/Splitter.java3
-rw-r--r--src/net/sourceforge/plantuml/graphic/TextBlockRecentred.java5
-rw-r--r--src/net/sourceforge/plantuml/graphic/TextBlockUtils.java50
-rw-r--r--src/net/sourceforge/plantuml/graphic/UGraphicDelegator.java10
-rw-r--r--src/net/sourceforge/plantuml/graphic/USymbol.java4
-rw-r--r--src/net/sourceforge/plantuml/graphic/USymbolFolder.java11
-rw-r--r--src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java4
-rw-r--r--src/net/sourceforge/plantuml/hector2/graphic/Foo1.java4
-rw-r--r--src/net/sourceforge/plantuml/hector2/graphic/Foo2.java4
-rw-r--r--src/net/sourceforge/plantuml/jdot/CucaDiagramFileMakerJDot.java127
-rw-r--r--src/net/sourceforge/plantuml/jdot/DebugUtils.java103
-rw-r--r--src/net/sourceforge/plantuml/jdot/JDotPath.java112
-rw-r--r--src/net/sourceforge/plantuml/math/ScientificEquationSafe.java4
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandComment.java (renamed from src/net/sourceforge/plantuml/project2/command/CommandCloseWeekDay.java)27
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandElement.java65
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandEndSomething.java (renamed from src/net/sourceforge/plantuml/project2/command/CommandAffectation.java)36
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandGroup.java67
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandLink.java67
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandNetwork.java66
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandNwDiagInit.java64
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/CommandProperty.java68
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/DiagElement.java120
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/DiagGroup.java (renamed from src/net/sourceforge/plantuml/project2/TaskMerge.java)50
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/GridTextBlockDecorated.java136
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/GridTextBlockSimple.java131
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/LinkedElement.java136
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/Network.java103
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/NwDiagram.java291
-rw-r--r--src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java (renamed from src/net/sourceforge/plantuml/project2/PSystemProjectFactory2.java)35
-rw-r--r--src/net/sourceforge/plantuml/png/PngIOMetadata.java14
-rw-r--r--src/net/sourceforge/plantuml/posimo/data.txt38
-rw-r--r--src/net/sourceforge/plantuml/preproc/Define.java40
-rw-r--r--src/net/sourceforge/plantuml/preproc/DefineSignature.java8
-rw-r--r--src/net/sourceforge/plantuml/preproc/Defines.java74
-rw-r--r--src/net/sourceforge/plantuml/preproc/DefinesGet.java (renamed from src/net/sourceforge/plantuml/project2/ValueInt.java)23
-rw-r--r--src/net/sourceforge/plantuml/preproc/FileWithSuffix.java126
-rw-r--r--src/net/sourceforge/plantuml/preproc/IfManager.java8
-rw-r--r--src/net/sourceforge/plantuml/preproc/IfManagerFilter.java (renamed from src/net/sourceforge/plantuml/preproc/ReadLineConcat.java)38
-rw-r--r--src/net/sourceforge/plantuml/preproc/IfManagerNegatif.java2
-rw-r--r--src/net/sourceforge/plantuml/preproc/IfManagerPositif.java2
-rw-r--r--src/net/sourceforge/plantuml/preproc/ImportedFiles.java126
-rw-r--r--src/net/sourceforge/plantuml/preproc/Preprocessor.java98
-rw-r--r--src/net/sourceforge/plantuml/preproc/PreprocessorInclude.java343
-rw-r--r--src/net/sourceforge/plantuml/preproc/ReadLineEmpty.java49
-rw-r--r--src/net/sourceforge/plantuml/preproc/ReadLineNumbered.java (renamed from src/net/sourceforge/plantuml/project2/TimeResolution.java)9
-rw-r--r--src/net/sourceforge/plantuml/preproc/ReadLineSingle.java60
-rw-r--r--src/net/sourceforge/plantuml/preproc/StartDiagramExtractReader.java44
-rw-r--r--src/net/sourceforge/plantuml/preproc/SubPreprocessor.java185
-rw-r--r--src/net/sourceforge/plantuml/preproc2/Preprocessor2.java97
-rw-r--r--src/net/sourceforge/plantuml/preproc2/PreprocessorDefine3Learner.java (renamed from src/net/sourceforge/plantuml/preproc/PreprocessorDefine.java)157
-rw-r--r--src/net/sourceforge/plantuml/preproc2/PreprocessorDefine4Apply.java92
-rw-r--r--src/net/sourceforge/plantuml/preproc2/PreprocessorInclude3.java363
-rw-r--r--src/net/sourceforge/plantuml/preproc2/PreprocessorIncludeStrategy.java (renamed from src/net/sourceforge/plantuml/project2/ValueTime.java)18
-rw-r--r--src/net/sourceforge/plantuml/preproc2/ReadFilter.java (renamed from src/net/sourceforge/plantuml/project2/Value.java)9
-rw-r--r--src/net/sourceforge/plantuml/preproc2/ReadFilterAnd2.java (renamed from src/net/sourceforge/plantuml/project2/TimeLineDay.java)45
-rw-r--r--src/net/sourceforge/plantuml/preproc2/ReadLineAddConfig2.java84
-rw-r--r--src/net/sourceforge/plantuml/preproc2/ReadLineInsertable.java (renamed from src/net/sourceforge/plantuml/preproc/ReadLineInsertable.java)51
-rw-r--r--src/net/sourceforge/plantuml/preproc2/ReadLineList2.java (renamed from src/net/sourceforge/plantuml/project2/TimeUtils.java)49
-rw-r--r--src/net/sourceforge/plantuml/preproc2/ReadLineQuoteComment2.java (renamed from src/net/sourceforge/plantuml/preproc/ReadLineQuoteComment.java)74
-rw-r--r--src/net/sourceforge/plantuml/preproc2/SubPreprocessor2.java197
-rw-r--r--src/net/sourceforge/plantuml/project2/Day.java171
-rw-r--r--src/net/sourceforge/plantuml/project2/GanttDiagram2.java112
-rw-r--r--src/net/sourceforge/plantuml/project2/Knowledge.java118
-rw-r--r--src/net/sourceforge/plantuml/project2/PSystemProject2.java128
-rw-r--r--src/net/sourceforge/plantuml/project2/Project2.java166
-rw-r--r--src/net/sourceforge/plantuml/project2/Row.java52
-rw-r--r--src/net/sourceforge/plantuml/project2/RowMerge.java102
-rw-r--r--src/net/sourceforge/plantuml/project2/RowOverwrite.java92
-rw-r--r--src/net/sourceforge/plantuml/project2/RowSimple.java114
-rw-r--r--src/net/sourceforge/plantuml/project2/TimeConverter.java46
-rw-r--r--src/net/sourceforge/plantuml/project2/TimeConverterDay.java112
-rw-r--r--src/net/sourceforge/plantuml/project2/TimeHeaderDay.java102
-rw-r--r--src/net/sourceforge/plantuml/project2/TimeHeaderMonth.java119
-rw-r--r--src/net/sourceforge/plantuml/project3/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java2
-rw-r--r--src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java12
-rw-r--r--src/net/sourceforge/plantuml/project3/GanttArrow.java4
-rw-r--r--src/net/sourceforge/plantuml/project3/GanttDiagram.java98
-rw-r--r--src/net/sourceforge/plantuml/project3/Moment.java (renamed from src/net/sourceforge/plantuml/project2/TaskContainer.java)8
-rw-r--r--src/net/sourceforge/plantuml/project3/MomentImpl.java (renamed from src/net/sourceforge/plantuml/project2/TimeLine.java)20
-rw-r--r--src/net/sourceforge/plantuml/project3/SubjectDaysAsDates.java35
-rw-r--r--src/net/sourceforge/plantuml/project3/Task.java2
-rw-r--r--src/net/sourceforge/plantuml/project3/TaskInstant.java12
-rw-r--r--src/net/sourceforge/plantuml/project3/VerbTaskStarts.java4
-rw-r--r--src/net/sourceforge/plantuml/salt/Dictionary.java11
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/GroupingLeaf.java1
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/LifeEvent.java14
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java7
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/command/CommandReturn.java43
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java41
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSetInitializer.java2
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java11
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationExoTile.java2
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileSelf.java8
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/EmptyTile.java11
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/EventsHistory.java6
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/LiveBoxFinder.java2
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java2
-rw-r--r--src/net/sourceforge/plantuml/sequencediagram/teoz/TileBuilder.java9
-rw-r--r--src/net/sourceforge/plantuml/skin/ArrowConfiguration.java51
-rw-r--r--src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java3
-rw-r--r--src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java6
-rw-r--r--src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java4
-rw-r--r--src/net/sourceforge/plantuml/skin/rose/Rose.java16
-rw-r--r--src/net/sourceforge/plantuml/svek/Cluster.java12
-rw-r--r--src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java9
-rw-r--r--src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java (renamed from src/net/sourceforge/plantuml/svek/DotDataImageBuilder.java)4
-rw-r--r--src/net/sourceforge/plantuml/svek/GraphvizCrash.java5
-rw-r--r--src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java4
-rw-r--r--src/net/sourceforge/plantuml/svek/GroupPngMakerState.java16
-rw-r--r--src/net/sourceforge/plantuml/svek/Line.java25
-rw-r--r--src/net/sourceforge/plantuml/svek/RoundedContainer.java3
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java4
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageClass.java6
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java13
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java4
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java4
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageNote.java4
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageObject.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageState.java5
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageState2.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java5
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageTips.java2
-rw-r--r--src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java2
-rw-r--r--src/net/sourceforge/plantuml/svg/SvgGraphics.java4
-rw-r--r--src/net/sourceforge/plantuml/swing/LicenseWindow.java2
-rw-r--r--src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java4
-rw-r--r--src/net/sourceforge/plantuml/syntax/SyntaxChecker.java4
-rw-r--r--src/net/sourceforge/plantuml/tikz/TikzGraphics.java11
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/Histogram.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/Player.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/Ribbon.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/RibbonNew.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/RibbonOld.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java3
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/TimingNote.java2
-rw-r--r--src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java2
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/AbstractUGraphicHorizontalLine.java4
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java9
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/MinMax.java5
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/UGraphic.java1
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/UImage.java11
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java5
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/g2d/DriverImageG2d.java15
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/HandJiggle.java15
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/UDotPathHand.java5
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/UEllipseHand.java14
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/UGraphicHandwritten.java19
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/ULineHand.java6
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/UPathHand.java5
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/UPolygonHand.java5
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/hand/URectangleHand.java8
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/sprite/SpriteMonochrome.java21
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/tikz/DriverImageTikz.java (renamed from src/net/sourceforge/plantuml/project2/TaskAttribute.java)36
-rw-r--r--src/net/sourceforge/plantuml/ugraphic/tikz/UGraphicTikz.java2
-rw-r--r--src/net/sourceforge/plantuml/utils/StartUtils.java11
-rw-r--r--src/net/sourceforge/plantuml/version/License.java50
-rw-r--r--src/net/sourceforge/plantuml/version/LicenseInfo.java166
-rw-r--r--src/net/sourceforge/plantuml/version/LicenseType.java (renamed from src/net/sourceforge/plantuml/project2/Task.java)34
-rw-r--r--src/net/sourceforge/plantuml/version/Magic.java8
-rw-r--r--src/net/sourceforge/plantuml/version/PSystemKeycheck.java154
-rw-r--r--src/net/sourceforge/plantuml/version/PSystemKeygen.java34
-rw-r--r--src/net/sourceforge/plantuml/version/PSystemLicense.java2
-rw-r--r--src/net/sourceforge/plantuml/version/PSystemVersion.java112
-rw-r--r--src/net/sourceforge/plantuml/version/PSystemVersionFactory.java21
-rw-r--r--src/net/sourceforge/plantuml/version/Version.java4
-rw-r--r--src/net/sourceforge/plantuml/version/apple2.pngbin0 -> 5428 bytes
-rw-r--r--src/net/sourceforge/plantuml/version/arecibo.pngbin0 -> 722 bytes
-rw-r--r--src/net/sourceforge/plantuml/version/time01.pngbin0 -> 3034 bytes
-rw-r--r--src/net/sourceforge/plantuml/version/time15.pngbin0 -> 3949 bytes
-rw-r--r--src/smetana/core/AllH.java12
-rw-r--r--src/smetana/core/CFunction.java4
-rw-r--r--src/smetana/core/CString.java71
-rw-r--r--src/smetana/core/CType.java13
-rw-r--r--src/smetana/core/JUtils.java680
-rw-r--r--src/smetana/core/JUtilsDebug.java18
-rw-r--r--src/smetana/core/JUtilsOk1.java652
-rw-r--r--src/smetana/core/Macro.java939
-rw-r--r--src/smetana/core/Memory.java26
-rw-r--r--src/smetana/core/UnsupportedArrayOfPtr.java60
-rw-r--r--src/smetana/core/UnsupportedArrayOfStruct.java14
-rw-r--r--src/smetana/core/UnsupportedArrayOfStruct2.java153
-rw-r--r--src/smetana/core/UnsupportedC.java55
-rw-r--r--src/smetana/core/UnsupportedSize_t.java80
-rw-r--r--src/smetana/core/UnsupportedStarStruct.java60
-rw-r--r--src/smetana/core/UnsupportedStruct.java52
-rw-r--r--src/smetana/core/Z.java183
-rw-r--r--src/smetana/core/__array_of_cstring__.java3
-rw-r--r--src/smetana/core/__array_of_cstring_impl__.java12
-rw-r--r--src/smetana/core/__array_of_double__.java5
-rw-r--r--src/smetana/core/__array_of_integer_impl__.java4
-rw-r--r--src/smetana/core/__array_of_ptr__.java8
-rw-r--r--src/smetana/core/__array_of_ptr_impl__.java243
-rw-r--r--src/smetana/core/__array_of_struct__.java75
-rw-r--r--src/smetana/core/__array_of_struct_impl__.java177
-rw-r--r--src/smetana/core/__c__fields.java16
-rw-r--r--src/smetana/core/__ptr__.java2
-rw-r--r--src/smetana/core/__struct__.java2
-rw-r--r--src/smetana/core/__struct_impl__.java177
-rw-r--r--src/smetana/core/amiga/AreaInt.java2
-rw-r--r--src/smetana/core/amiga/BucketToAreaFactory.java113
-rw-r--r--src/smetana/core/amiga/Counter.java (renamed from src/smetana/core/Ppolyline_t.java)6
-rw-r--r--src/smetana/core/amiga/StarArrayOfInteger.java1
-rw-r--r--src/smetana/core/amiga/StarArrayOfPtr.java201
-rw-r--r--src/smetana/core/amiga/StarArrayOfStruct.java130
-rw-r--r--src/smetana/core/amiga/StarStar.java116
-rw-r--r--src/smetana/core/amiga/StarStruct.java31
-rw-r--r--src/smetana/core/amiga/StarStructImpl.java544
-rw-r--r--src/smetana/core/debug/Debug.java34
-rw-r--r--src/smetana/core/size_t_array_of_array_of_something_allocated.java83
-rw-r--r--src/smetana/core/size_t_array_of_array_of_something_empty.java94
-rw-r--r--src/smetana/core/size_t_array_of_charstars.java3
-rw-r--r--src/smetana/core/size_t_array_of_something.java94
-rw-r--r--stdlib/aws-dex.repxbin443080 -> 414626 bytes
-rw-r--r--stdlib/azure-abx.repxbin0 -> 4002 bytes
-rw-r--r--stdlib/azure-dex.repxbin0 -> 27764 bytes
-rw-r--r--stdlib/devicons-abx.repxbin8209 -> 0 bytes
-rw-r--r--stdlib/devicons-dex.repxbin36910 -> 0 bytes
-rw-r--r--stdlib/font-awesome-abx.repxbin26659 -> 0 bytes
-rw-r--r--stdlib/font-awesome-dex.repxbin81625 -> 0 bytes
-rw-r--r--stdlib/home.repx4
-rw-r--r--stdlib/tupadr3-abx.repxbin0 -> 123247 bytes
-rw-r--r--stdlib/tupadr3-dex.repxbin0 -> 373792 bytes
743 files changed, 14995 insertions, 34638 deletions
diff --git a/pom.xml b/pom.xml
index 642323d..49a345b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,12 +30,13 @@
Script Author: Julien Eluard
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
- <version>1.2018.10-SNAPSHOT</version>
+ <version>1.2018.13-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PlantUML</name>
diff --git a/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java b/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java
index 0d7db4f..237d9a9 100644
--- a/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java
+++ b/src/ext/plantuml/com/google/zxing/client/j2se/MatrixToImageWriter.java
@@ -43,38 +43,38 @@ public final class MatrixToImageWriter {
* Renders a {@link BitMatrix} as an image, where "false" bits are rendered
* as white, and "true" bits are rendered as black.
*/
- public static BufferedImage toBufferedImage(BitMatrix matrix) {
+ public static BufferedImage toBufferedImage(BitMatrix matrix, int fore, int back) {
int width = matrix.getWidth();
int height = matrix.getHeight();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
- image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
+ image.setRGB(x, y, matrix.get(x, y) ? fore : back);
}
}
return image;
}
- /**
- * Writes a {@link BitMatrix} to a file.
- *
- * @see #toBufferedImage(BitMatrix)
- */
- public static void writeToFile(BitMatrix matrix, String format, File file)
- throws IOException {
- BufferedImage image = toBufferedImage(matrix);
- ImageIO.write(image, format, file);
- }
-
- /**
- * Writes a {@link BitMatrix} to a stream.
- *
- * @see #toBufferedImage(BitMatrix)
- */
- public static void writeToStream(BitMatrix matrix, String format, OutputStream stream)
- throws IOException {
- BufferedImage image = toBufferedImage(matrix);
- ImageIO.write(image, format, stream);
- }
+// /**
+// * Writes a {@link BitMatrix} to a file.
+// *
+// * @see #toBufferedImage(BitMatrix)
+// */
+// public static void writeToFile(BitMatrix matrix, String format, File file)
+// throws IOException {
+// BufferedImage image = toBufferedImage(matrix);
+// ImageIO.write(image, format, file);
+// }
+//
+// /**
+// * Writes a {@link BitMatrix} to a stream.
+// *
+// * @see #toBufferedImage(BitMatrix)
+// */
+// public static void writeToStream(BitMatrix matrix, String format, OutputStream stream)
+// throws IOException {
+// BufferedImage image = toBufferedImage(matrix);
+// ImageIO.write(image, format, stream);
+// }
}
diff --git a/src/gen/lib/cdt/dtclose__c.java b/src/gen/lib/cdt/dtclose__c.java
index 4a2f7da..4468f03 100644
--- a/src/gen/lib/cdt/dtclose__c.java
+++ b/src/gen/lib/cdt/dtclose__c.java
@@ -44,7 +44,14 @@
*
*/
package gen.lib.cdt;
+import static gen.lib.cdt.dtsize__c.dtsize_;
+import static smetana.core.JUtilsDebug.ENTERING;
+import static smetana.core.JUtilsDebug.LEAVING;
+import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import smetana.core.Memory;
public class dtclose__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -115,38 +122,38 @@ public class dtclose__c {
//3 7ggbhlblmrfr1wq1k20npwyxb
// int dtclose(register Dt_t* dt)
-public static Object dtclose(Object... arg) {
-UNSUPPORTED("5o7j3hhxxjdvmz0k3eg98i8in"); // int dtclose(register Dt_t* dt)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("2fi55lg37rcjprso1i0385cj5"); // Dtdisc_t *disc;
-UNSUPPORTED("pz52m7579heh6vdbqc3dt84v"); // int ev = 0;
-UNSUPPORTED("3iyrv07qx7n0s211y8m7mopsz"); // if(!dt || dt->nview > 0 ) /* can't close if being viewed */
-UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1;
-UNSUPPORTED("9y2zao3al22pjv2p480p4klcc"); // /* announce the close event to see if we should continue */
-UNSUPPORTED("70rampeezpyz05ynxa49umbrz"); // disc = dt->disc;
-UNSUPPORTED("8gsk9kzxnlwgo3aceze9c6gl7"); // if(disc->eventf &&
-UNSUPPORTED("ho436wfj1mjidd6obd19mhll"); // (ev = (*disc->eventf)(dt,2,((void*)0),disc)) < 0)
-UNSUPPORTED("b0epxudfxjm8kichhaautm2qi"); // return -1;
-UNSUPPORTED("66fqrcqd57dw3fzb30i176w0r"); // if(dt->view) /* turn off viewing */
+public static int dtclose(ST_dt_s dt) {
+ENTERING("7ggbhlblmrfr1wq1k20npwyxb","dtclose");
+ try {
+ ST_dtdisc_s disc;
+ int ev = 0;
+ if(N(dt) || dt.nview > 0 ) /* can't close if being viewed */
+ return -1;
+ /* announce the close event to see if we should continue */
+ disc = (ST_dtdisc_s) dt.disc;
+ if(disc.eventf!=null &&
+ (ev = (Integer)disc.eventf.exe(dt, 2, null, disc)) < 0)
+ return -1;
+ if(dt.view!=null) /* turn off viewing */
UNSUPPORTED("1xbo7gf92fmqmu2tzpfeuc0wk"); // dtview(dt,((Dt_t*)0));
-UNSUPPORTED("9vl9psbe52rphrxhc41erj2qd"); // if(ev == 0) /* release all allocated data */
-UNSUPPORTED("8fubw8ssxlx99qjv7n52cf3ru"); // { (void)(*(dt->meth->searchf))(dt,((void*)0),0000100);
-UNSUPPORTED("5rbpcw29jwi3l66b11are2xd5"); // if(dtsize(dt) > 0)
-UNSUPPORTED("896vcxnvc07fbkh09vojp66fv"); // return -1;
-UNSUPPORTED("8po7fioot1issl5obmk5hqndd"); // if(dt->data->ntab > 0)
+ if(ev == 0) /* release all allocated data */ {
+ dt.meth.searchf.exe(dt, null, 0000100);
+ if(dtsize_(dt) > 0)
+ return -1;
+if(dt.data.ntab > 0)
UNSUPPORTED("4ugmcpi8vkb013vuo4wykn0a3"); // (*dt->memoryf)(dt,(void*)dt->data->hh._htab,0,disc);
-UNSUPPORTED("1bguaull3m0kl140obilq4ucp"); // (*dt->memoryf)(dt,(void*)dt->data,0,disc);
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("4wjw4hx0hptydzyvkohwgzoo"); // if(dt->type == 0)
-UNSUPPORTED("9jx9g23tuicm5x7f5cvznr3rt"); // free((void*)dt);
-UNSUPPORTED("4r6n1aai6737i36g78f9z4apm"); // else if(ev == 0 && dt->type == 1)
+dt.memoryf.exe(dt, dt.data, null, disc);
+ }
+ if(dt.type == 0)
+ Memory.free(dt);
+ else if(ev == 0 && dt.type == 1)
UNSUPPORTED("6wqxv1f7tzvjk0lwmqdrcq8la"); // (*dt->memoryf)(dt, (void*)dt, 0, disc);
-UNSUPPORTED("oxrmf64nqi0a580iiczqkmky"); // if(disc->eventf)
+ if(disc.eventf!=null)
UNSUPPORTED("8bce06bdd64ypwb17ddloqzu8"); // (void)(*disc->eventf)(dt, 6, ((void*)0), disc);
-UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ return 0;
+} finally {
+LEAVING("7ggbhlblmrfr1wq1k20npwyxb","dtclose");
+}
}
diff --git a/src/gen/lib/cdt/dtdisc__c.java b/src/gen/lib/cdt/dtdisc__c.java
index 2e361a7..871ca01 100644
--- a/src/gen/lib/cdt/dtdisc__c.java
+++ b/src/gen/lib/cdt/dtdisc__c.java
@@ -44,16 +44,19 @@
*
*/
package gen.lib.cdt;
+import static gen.lib.cdt.dtflatten__c.dtflatten;
+import static gen.lib.cdt.dtrestore__c.dtrestore;
import static smetana.core.JUtils.function;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
import h.Dtsearch_f;
-import h._dt_s;
-import h._dtdisc_s;
-import h._dtlink_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import h.ST_dtlink_s;
import smetana.core.CString;
+import smetana.core.Memory;
import smetana.core.size_t;
public class dtdisc__c {
@@ -125,16 +128,21 @@ public class dtdisc__c {
//3 507t9jcy6v9twvl30rs9i2nwi
// static void* dtmemory(Dt_t* dt,void* addr,size_t size,Dtdisc_t* disc)
-public static Object dtmemory(_dt_s dt, Object addr, size_t size, _dtdisc_s disc) {
+public static Object dtmemory(ST_dt_s dt, Object addr, size_t size, ST_dtdisc_s disc) {
+ENTERING("507t9jcy6v9twvl30rs9i2nwi","dtmemory");
+try {
if(addr!=null) {
-UNSUPPORTED("bn1cyxafod2777wzl55qh14xq"); // if(size == 0)
-UNSUPPORTED("15j5ccp5owse1ebc5ljhbzg59"); // { free(addr);
-UNSUPPORTED("aihzmr4oo3tuh6kkxwtn9tlbd"); // return ((void*)0);
-UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
+ if(size == null) {
+ Memory.free(addr);
+ return null;
+ }
UNSUPPORTED("9ed8imo9cbvwtwe92qmavoqko"); // else return realloc(addr,size);
}
else return size.isStrictPositive() ? size.malloc() : null;
throw new UnsupportedOperationException();
+} finally {
+LEAVING("507t9jcy6v9twvl30rs9i2nwi","dtmemory");
+}
}
@@ -142,45 +150,45 @@ throw new UnsupportedOperationException();
//3 axpvuswclmi9bx3qtlh4quyah
// Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t* disc, int type)
-public static _dtdisc_s dtdisc(_dt_s dt, _dtdisc_s disc, int type) {
+public static ST_dtdisc_s dtdisc(ST_dt_s dt, ST_dtdisc_s disc, int type) {
ENTERING("axpvuswclmi9bx3qtlh4quyah","dtdisc");
try {
Dtsearch_f searchf;
- _dtlink_s r, t;
+ ST_dtlink_s r, t;
CString k;
- _dtdisc_s old;
- if(N(old = (_dtdisc_s) dt.getPtr("disc")) ) /* initialization call from dtopen() */
+ ST_dtdisc_s old;
+ if(N(old = (ST_dtdisc_s) dt.disc) ) /* initialization call from dtopen() */
{ dt.setPtr("disc", disc);
- if(N(dt.setPtr("memoryf", disc.getPtr("memoryf") )))
+ if(N(dt.setPtr("memoryf", disc.memoryf )))
dt.setPtr("memoryf", function(dtdisc__c.class, "dtmemory"));
return disc;
}
if(N(disc)) /* only want to know current discipline */
return old;
-UNSUPPORTED("6htlkpaqff61iwmsg1be47uci"); // searchf = dt->meth->searchf;
-UNSUPPORTED("ckjxpmega2z5oju8xk72wsy0q"); // ((dt->data->type&010000) ? dtrestore(dt,((Dtlink_t*)0)) : 0);
-UNSUPPORTED("34klfi71a7k7iqdrvezqetdjg"); // if(old->eventf && (*old->eventf)(dt,3,(void*)disc,old) < 0)
-UNSUPPORTED("1cft3x8zrdzefdb93v3f1tuo7"); // return ((Dtdisc_t*)0);
-UNSUPPORTED("4e4gm32ypcbtlzkym7sh79rrd"); // dt->disc = disc;
-UNSUPPORTED("6nr96is5y2ct55pupgycwbjmt"); // if(!(dt->memoryf = disc->memoryf) )
-UNSUPPORTED("1prh3v6ko1v9w39hgk7wiknjc"); // dt->memoryf = dtmemory;
-UNSUPPORTED("epetks7tchxd027a5fogh5s8y"); // if(dt->data->type&(0000040|0000100|0000020))
+ searchf = (Dtsearch_f) dt.meth.searchf;
+ if((dt.data.type&010000)!=0) dtrestore(dt,null);
+ if(old.eventf!=null && ((Integer)old.eventf.exe(dt,3, disc,old)) < 0)
+ return null;
+ dt.setPtr("disc", disc);
+ if(N(dt.setPtr("memoryf", disc.memoryf)))
+ dt.setPtr("memoryf", function(dtdisc__c.class, "dtmemory"));
+ if((dt.data.type&(0000040|0000100|0000020))!=0)
UNSUPPORTED("e2tzh95k1lvjl6wbtpwizam8q"); // goto done;
-UNSUPPORTED("9z4k8xq4t2p909fvi8gusmmww"); // else if(dt->data->type&0000002)
-UNSUPPORTED("3q5nyguq8mgdfwmm0yrzq2br8"); // { if(type&0000002)
+ else if((dt.data.type&0000002)!=0) {
+UNSUPPORTED("3q5nyguq8mgdfwmm0yrzq2br8"); // if(type&0000002)
UNSUPPORTED("93q6zqzlgfz2qd0yl6koyw99c"); // goto done;
UNSUPPORTED("6d1rfacssm8768oz9fu5o66t8"); // else goto dt_renew;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("eu35368wm4jf6yedwkayoycx4"); // else if(dt->data->type&(0000001|0000002))
-UNSUPPORTED("8xmm1djjds55s86jodixkp72u"); // { if((type&0000002) && (type&0000001))
+ }
+ else if((dt.data.type&(0000001|0000002))!=0) {
+UNSUPPORTED("8xmm1djjds55s86jodixkp72u"); // if((type&0000002) && (type&0000001))
UNSUPPORTED("93q6zqzlgfz2qd0yl6koyw99c"); // goto done;
UNSUPPORTED("6d1rfacssm8768oz9fu5o66t8"); // else goto dt_renew;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("1ww5saiqcss2tdx5nts4rxpou"); // else /*if(dt->data->type&(DT_OSET|DT_OBAG))*/
-UNSUPPORTED("4582pmh67cgbsphrw05tf0hmm"); // { if(type&0000001)
+ }
+ else /*if(dt->data->type&(DT_OSET|DT_OBAG))*/ {
+ if((type&0000001)!=0)
UNSUPPORTED("93q6zqzlgfz2qd0yl6koyw99c"); // goto done;
-UNSUPPORTED("8njey2jaa662w29s8zcqbjln5"); // dt_renew:
-UNSUPPORTED("assw6t0chu41lwws2ysqi4fgi"); // r = dtflatten(dt);
+// dt_renew:
+ r = dtflatten(dt);
UNSUPPORTED("1rry7yjzos90pgbf3li2qpa18"); // dt->data->type &= ~010000;
UNSUPPORTED("6vkn7padspfbtju9g5b65b34w"); // dt->data->here = ((Dtlink_t*)0);
UNSUPPORTED("2jfi30wa60xp7iqlk9yyf4k5j"); // dt->data->size = 0;
@@ -204,7 +212,7 @@ UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
UNSUPPORTED("cerydbb7i6l7c4pgeygvwoqk2"); // done:
UNSUPPORTED("bi0p581nen18ypj0ey48s6ete"); // return old;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+ }
throw new UnsupportedOperationException();
} finally {
diff --git a/src/gen/lib/cdt/dtextract__c.java b/src/gen/lib/cdt/dtextract__c.java
index dafad9d..f9b946a 100644
--- a/src/gen/lib/cdt/dtextract__c.java
+++ b/src/gen/lib/cdt/dtextract__c.java
@@ -47,8 +47,8 @@ package gen.lib.cdt;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h._dt_s;
-import h._dtlink_s;
+import h.ST_dt_s;
+import h.ST_dtlink_s;
public class dtextract__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -119,25 +119,25 @@ public class dtextract__c {
//3 ar89jjwhuitmbhut1o3ft3zpb
// Dtlink_t* dtextract(register Dt_t* dt)
-public static _dtlink_s dtextract(_dt_s dt) {
+public static ST_dtlink_s dtextract(ST_dt_s dt) {
ENTERING("ar89jjwhuitmbhut1o3ft3zpb","dtextract");
try {
- _dtlink_s list = null;
- _dtlink_s s[], ends[];
- if((dt.getPtr("data").getInt("type")&(0000004|0000010) )!=0)
- list = (_dtlink_s) dt.getPtr("data").getPtr("here");
- else if((dt.getPtr("data").getInt("type")&(0000001|0000002))!=0)
+ ST_dtlink_s list = null;
+ ST_dtlink_s s[], ends[];
+ if((dt.data.type&(0000004|0000010) )!=0)
+ list = (ST_dtlink_s) dt.data.here;
+ else if((dt.data.type&(0000001|0000002))!=0)
{ UNSUPPORTED("list = dtflatten(dt)");
UNSUPPORTED("8i2mufw9f604gvj48u8nbdazp"); // for(ends = (s = dt->data->hh._htab) + dt->data->ntab; s < ends; ++s)
UNSUPPORTED("4sml4zdr938yth6x815jt1dlm"); // *s = ((Dtlink_t*)0);
}
else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
- { list = (_dtlink_s) dt.getPtr("data").getPtr("hh").getPtr("_head");
- dt.getPtr("data").getPtr("hh").setPtr("_head", null);
+ { list = (ST_dtlink_s) dt.data._head;
+ dt.data._head = null;
}
- dt.getPtr("data").setInt("type", dt.getPtr("data").getInt("type") & ~010000);
- dt.getPtr("data").setInt("size", 0);
- dt.getPtr("data").setPtr("here", null);
+ dt.data.setInt("type", dt.data.type & ~010000);
+ dt.data.setInt("size", 0);
+ dt.data.here = null;
return list;
} finally {
LEAVING("ar89jjwhuitmbhut1o3ft3zpb","dtextract");
diff --git a/src/gen/lib/cdt/dtflatten__c.java b/src/gen/lib/cdt/dtflatten__c.java
index 9c27097..3b7d2ff 100644
--- a/src/gen/lib/cdt/dtflatten__c.java
+++ b/src/gen/lib/cdt/dtflatten__c.java
@@ -45,6 +45,8 @@
*/
package gen.lib.cdt;
import static smetana.core.Macro.UNSUPPORTED;
+import h.ST_dt_s;
+import h.ST_dtlink_s;
public class dtflatten__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -115,7 +117,7 @@ public class dtflatten__c {
//3 5zkzkycgp4e90pajuq4tczdbu
// Dtlink_t* dtflatten(Dt_t* dt)
-public static Object dtflatten(Object... arg) {
+public static ST_dtlink_s dtflatten(ST_dt_s dt) {
UNSUPPORTED("1u9gaaespn5nsfpluy23yon7s"); // Dtlink_t* dtflatten(Dt_t* dt)
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
UNSUPPORTED("82qvflv3akadrlktyouix927i"); // register Dtlink_t *t, *r, *list, *last, **s, **ends;
diff --git a/src/gen/lib/cdt/dtopen__c.java b/src/gen/lib/cdt/dtopen__c.java
index ae1262c..92d1f78 100644
--- a/src/gen/lib/cdt/dtopen__c.java
+++ b/src/gen/lib/cdt/dtopen__c.java
@@ -49,10 +49,10 @@ import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.N;
-import h._dt_s;
-import h._dtdata_s;
-import h._dtdisc_s;
-import h._dtmethod_s;
+import h.ST_dt_s;
+import h.ST_dtdata_s;
+import h.ST_dtdisc_s;
+import h.ST_dtmethod_s;
import smetana.core.Memory;
public class dtopen__c {
@@ -128,16 +128,16 @@ public class dtopen__c {
//3 34nbfbdgwe34hb4vmfr5p6kbh
// Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth)
-public static _dt_s dtopen(_dtdisc_s disc, _dtmethod_s meth) {
+public static ST_dt_s dtopen(ST_dtdisc_s disc, ST_dtmethod_s meth) {
ENTERING("34nbfbdgwe34hb4vmfr5p6kbh","dtopen");
try {
- _dt_s dt = null;
+ ST_dt_s dt = null;
int e;
- _dtdata_s data;
+ ST_dtdata_s data;
if(N(disc) || N(meth))
return null;
/* allocate space for dictionary */
- if(N(dt = (_dt_s) Memory.malloc(_dt_s.class)))
+ if(N(dt = new ST_dt_s()))
return null;
// /* initialize all absolutely private data */
dt.setPtr("searchf", null);
@@ -149,7 +149,7 @@ try {
dt.setPtr("view", null);
dt.setPtr("walk", null);
dt.setPtr("user", null);
- if(disc.getPtr("eventf")!=null)
+ if(disc.eventf!=null)
{ /* if shared/persistent dictionary, get existing data */
throw new UnsupportedOperationException();
// data = ((Dtdata_t*)0);
@@ -176,23 +176,23 @@ try {
// }
}
/* allocate sharable data */
- if(N(data = (_dtdata_s) (dt.call("memoryf", dt,null,sizeof(_dtdata_s.class),disc)) ))
+ if(N(data = (ST_dtdata_s) (dt.memoryf.exe(dt,null,sizeof(ST_dtdata_s.class),disc)) ))
{ err_open:
Memory.free(dt);
return (null);
}
- data.setInt("type", meth.getInt("type"));
- data.setPtr("here", null);
- data.setPtr("hh._htab", null);
- data.setInt("ntab", 0);
- data.setInt("size", 0);
- data.setInt("loop", 0);
- data.setInt("minp", 0);
+ data.type = meth.type;
+ data.here = null;
+ data._htab = null;
+ data.ntab = 0;
+ data.size = 0;
+ data.loop = 0;
+ data.minp = 0;
//done:
- dt.setPtr("data", data);
- dt.setPtr("searchf", meth.getPtr("searchf"));
- dt.setPtr("meth", meth);
- if(disc.getPtr("eventf")!=null)
+ dt.data = data;
+ dt.searchf = meth.searchf;
+ dt.meth = meth;
+ if(disc.eventf!=null)
throw new UnsupportedOperationException();
// (*disc->eventf)(dt, 5, (void*)dt, disc);
return dt;
diff --git a/src/gen/lib/cdt/dtrestore__c.java b/src/gen/lib/cdt/dtrestore__c.java
index 8f04bde..b20961c 100644
--- a/src/gen/lib/cdt/dtrestore__c.java
+++ b/src/gen/lib/cdt/dtrestore__c.java
@@ -49,8 +49,8 @@ import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
import h.Dtsearch_f;
-import h._dt_s;
-import h._dtlink_s;
+import h.ST_dt_s;
+import h.ST_dtlink_s;
public class dtrestore__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -121,26 +121,26 @@ public class dtrestore__c {
//3 8dfut8799tvg4tjvn2yz48d7h
// int dtrestore(register Dt_t* dt, register Dtlink_t* list)
-public static int dtrestore(_dt_s dt, _dtlink_s list) {
+public static int dtrestore(ST_dt_s dt, ST_dtlink_s list) {
ENTERING("8dfut8799tvg4tjvn2yz48d7h","dtrestore");
try {
- _dtlink_s t;
+ ST_dtlink_s t;
//Dtlink_t **s, **ends;
int type;
- Dtsearch_f searchf = (Dtsearch_f) dt.getPtr("meth").getPtr("searchf");
- type = dt.getPtr("data").getInt("type")&010000;
+ Dtsearch_f searchf = (Dtsearch_f) dt.meth.searchf;
+ type = dt.data.type&010000;
if(N(list)) /* restoring a flattened dictionary */
{ if(N(type))
return -1;
- list = (_dtlink_s) dt.getPtr("data").getPtr("here");
+ list = (ST_dtlink_s) dt.data.here;
}
else /* restoring an extracted list of elements */
- { if(dt.getPtr("data").getInt("size") != 0)
+ { if(dt.data.size != 0)
return -1;
type = 0;
}
- dt.getPtr("data").setInt("type", dt.getPtr("data").getInt("type") & ~010000);
- if((dt.getPtr("data").getInt("type")&(0000001|0000002))!=0)
+ dt.data.setInt("type", dt.data.type & ~010000);
+ if((dt.data.type&(0000001|0000002))!=0)
{ //dt->data->here = ((Dtlink_t*)0);
UNSUPPORTED("4xawc48hce5sov89n8h4j7xw0"); // if(type) /* restoring a flattened dictionary */
UNSUPPORTED("3yrjmgus9a9415ocrrtj1e733"); // { for(ends = (s = dt->data->hh._htab) + dt->data->ntab; s < ends; ++s)
@@ -161,14 +161,14 @@ UNSUPPORTED("3to5h0rvqxdeqs38mhv47mm3o"); // }
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
}
else
- { if((dt.getPtr("data").getInt("type")&(0000004|0000010))!=0)
- dt.getPtr("data").setPtr("here", list);
+ { if((dt.data.type&(0000004|0000010))!=0)
+ dt.data.here = list;
else /*if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE))*/
{UNSUPPORTED("79wu0m7edfdq02msgoqkzb32"); // { dt->data->here = ((Dtlink_t*)0);
UNSUPPORTED("c8q10nh3f6o4rjxtacmbgjxqj"); // dt->data->hh._head = list;
}
if(N(type))
- dt.getPtr("data").setInt("size", -1);
+ dt.data.setInt("size", -1);
}
return 0;
} finally {
diff --git a/src/gen/lib/cdt/dtsize__c.java b/src/gen/lib/cdt/dtsize__c.java
index 580dd46..a7881bf 100644
--- a/src/gen/lib/cdt/dtsize__c.java
+++ b/src/gen/lib/cdt/dtsize__c.java
@@ -47,8 +47,8 @@ package gen.lib.cdt;
import static gen.lib.cdt.dtrestore__c.dtrestore;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
-import h._dt_s;
-import h._dtlink_s;
+import h.ST_dt_s;
+import h.ST_dtlink_s;
public class dtsize__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -119,10 +119,10 @@ public class dtsize__c {
//3 6j49zum5hqto1t7fyrz8qjv1u
// static int treecount(register Dtlink_t* e)
-public static int treecount(_dtlink_s e) {
+public static int treecount(ST_dtlink_s e) {
ENTERING("6j49zum5hqto1t7fyrz8qjv1u","treecount");
try {
- return e!=null ? treecount((_dtlink_s) e.getPtr("hl._left")) + treecount((_dtlink_s) e.getPtr("right")) + 1 : 0;
+ return e!=null ? treecount((ST_dtlink_s) e._left) + treecount((ST_dtlink_s) e.right) + 1 : 0;
} finally {
LEAVING("6j49zum5hqto1t7fyrz8qjv1u","treecount");
}
@@ -133,23 +133,23 @@ LEAVING("6j49zum5hqto1t7fyrz8qjv1u","treecount");
//3 bci0ea1fa7egf4aads6gdgvsq
// int dtsize(Dt_t* dt)
-public static int dtsize_(_dt_s dt) {
+public static int dtsize_(ST_dt_s dt) {
ENTERING("bci0ea1fa7egf4aads6gdgvsq","dtsize");
try {
- _dtlink_s t;
+ ST_dtlink_s t;
int size;
- if (((dt.getPtr("data").getInt("type")&010000)!=0)) dtrestore(dt,null);
- if(dt.getPtr("data").getInt("size") < 0) /* !(dt->data->type&(DT_SET|DT_BAG)) */
- { if((dt.getPtr("data").getInt("type")&(0000004|0000010))!=0)
- dt.getPtr("data").setInt("size", treecount((_dtlink_s) dt.getPtr("data").getPtr("here")));
- else if((dt.getPtr("data").getInt("type")&(0000020|0000040|0000100))!=0)
+ if (((dt.data.type&010000)!=0)) dtrestore(dt,null);
+ if(dt.data.size < 0) /* !(dt->data->type&(DT_SET|DT_BAG)) */
+ { if((dt.data.type&(0000004|0000010))!=0)
+ dt.data.setInt("size", treecount((ST_dtlink_s) dt.data.here));
+ else if((dt.data.type&(0000020|0000040|0000100))!=0)
{ size=0;
- for(t = (_dtlink_s) dt.getPtr("data").getPtr("hh").getPtr("_head"); t!=null; t = (_dtlink_s) t.getPtr("right"))
+ for(t = (ST_dtlink_s) dt.data._head; t!=null; t = (ST_dtlink_s) t.right)
size += 1;
- dt.getPtr("data").setInt("size", size);
+ dt.data.setInt("size", size);
}
}
- return dt.getPtr("data").getInt("size");
+ return dt.data.size;
} finally {
LEAVING("bci0ea1fa7egf4aads6gdgvsq","dtsize");
diff --git a/src/gen/lib/cdt/dttree__c.java b/src/gen/lib/cdt/dttree__c.java
index 614f0e7..4921198 100644
--- a/src/gen/lib/cdt/dttree__c.java
+++ b/src/gen/lib/cdt/dttree__c.java
@@ -54,15 +54,14 @@ import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.Macro.UNSUPPORTED_INT;
import h.Dtcompar_f;
-import h._dt_s;
-import h._dtdisc_s;
-import h._dthold_s;
-import h._dtlink_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import h.ST_dthold_s;
+import h.ST_dtlink_s;
+import h.ST_dthold_s;
import smetana.core.CFunction;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class dttree__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -131,77 +130,80 @@ public class dttree__c {
-//3 abqfzg1d1vkzk51225tcdlik5
-// static void* dttree(Dt_t* dt, void* obj, int type)
static class no_root extends RuntimeException {}
static class has_root extends RuntimeException {}
static class do_search extends RuntimeException {}
static class dt_delete extends RuntimeException {}
static class dt_insert extends RuntimeException {}
static class dt_next extends RuntimeException {}
-public static Object dttree(_dt_s dt, __ptr__ obj, int type) {
+//3 abqfzg1d1vkzk51225tcdlik5
+//static void* dttree(Dt_t* dt, void* obj, int type)
+public static Object dttree(ST_dt_s dt, __ptr__ obj, int type) {
ENTERING("abqfzg1d1vkzk51225tcdlik5","dttree");
try {
- _dtlink_s root, t;
+ ST_dtlink_s root, t;
int cmp, lk, sz, ky;
- _dtlink_s l, r, me=null;
- final __struct__<_dtlink_s> link = JUtils.from(_dtlink_s.class);
+ ST_dtlink_s l, r, me=null;
+ final ST_dtlink_s link = new ST_dtlink_s();
Object o, k, key = null;
int n, minp; //, turn[(sizeof(size_t)*8 - 2)];
Dtcompar_f cmpf;
- _dtdisc_s disc;
- if (((dt.getPtr("data").getInt("type")) & 010000) !=0) { dtrestore(dt,null); }
- disc = (_dtdisc_s) dt.getPtr("disc"); ky = disc.getInt("key");
- sz = disc.getInt("size");
- lk = disc.getInt("link");
- cmpf = (Dtcompar_f) disc.getPtr("comparf");
- dt.setInt("type", dt.getInt("type")&~0100000);
- root = (_dtlink_s) dt.getPtr("data").getPtr("here");
+ ST_dtdisc_s disc;
+ if (((dt.data.type) & 010000) !=0) { dtrestore(dt,null); }
+ disc = (ST_dtdisc_s) dt.disc; ky = disc.key;
+ sz = disc.size;
+ lk = disc.link;
+ cmpf = (Dtcompar_f) disc.comparf;
+ dt.setInt("type", dt.type&~0100000);
+ root = (ST_dtlink_s) dt.data.here;
if(N(obj))
{ if(N(root) || N(type&(0000100|0000200|0000400)) )
return null;
if((type&0000100)!=0) /* delete all objects */
{
- throw new UnsupportedOperationException();
-// if(disc->freef || disc->link < 0)
-// { do
-// { while((t = root->hl._left) )
-// (((root)->hl._left = (t)->right, (t)->right = (root)), (root) = (t));
-// t = root->right;
-// if(disc->freef)
+ if(disc.freef!=null || disc.link < 0) {
+ do {
+ while((t = (ST_dtlink_s) root._left)!=null ) {
+ root._left = t.right;
+ t.right = root;
+ root = t;
+ }
+ t = (ST_dtlink_s) root.right;
+ if(disc.freef!=null)
+ throw new UnsupportedOperationException();
// (*disc->freef)(dt,(lk < 0 ? ((Dthold_t*)(root))->obj : (void*)((char*)(root) - lk) ),disc);
-// if(disc->link < 0)
-// (*dt->memoryf)(dt,(void*)root,0,disc);
-// } while((root = t) );
-// }
-// dt->data->size = 0;
-// dt->data->here = ((Dtlink_t*)0);
-// return ((void*)0);
+ if(disc.link < 0)
+ dt.memoryf.exe(dt, root, null, disc);
+ } while((root = t)!=null );
+ }
+ dt.data.setInt("size", 0);
+ dt.data.here = null;
+ return null;
}
else /* computing largest/smallest element */
{ if((type&0000400)!=0)
- { while((t = (_dtlink_s) root.getPtr("right"))!=null ) {
- root.setPtr("right", t.getPtr("hl._left"));
- t.setPtr("hl._left", root);
+ { while((t = (ST_dtlink_s) root.right)!=null ) {
+ root.right = t._left;
+ t._left = root;
root = t;
}
}
else /* type&DT_FIRST */
- { while((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) {
- root.setPtr("hl._left", t.getPtr("right"));
- t.setPtr("right", root);
+ { while((t = (ST_dtlink_s) root._left)!=null ) {
+ root._left = t.right;
+ t.right = root;
root = t;
}
}
- dt.getPtr("data").setPtr("here", root);
- return (lk < 0 ? root.castTo(_dthold_s.class).getPtr("obj") : root.addVirtualBytes(-lk) );
+ dt.data.here = root;
+ return (lk < 0 ? root.castTo_ST_dthold_s().obj : root.addVirtualBytes(-lk) );
}
}
/* note that link.right is LEFT tree and link.left is RIGHT tree */
- l = r = link.amp();
+ l = r = link;
/* allow apps to delete an object "actually" in the dictionary */
try {
- if(dt.getPtr("meth").getInt("type") == 0000010 && ((type&(0000002|0010000))!=0) ) {
+ if(dt.meth.type == 0000010 && ((type&(0000002|0010000))!=0) ) {
throw new UnsupportedOperationException();
// { key = (void*)(sz < 0 ? *((char**)((char*)(obj)+ky)) : ((char*)(obj)+ky));
// for(o = (*(((Dt_t*)(dt))->searchf))((dt),(void*)(obj),0000004); o; o = (*(((Dt_t*)(dt))->searchf))((dt),(void*)(o),0000010) )
@@ -230,14 +232,14 @@ try {
// if(root)
// goto do_search;
}
- else if(root!=null && (lk < 0 ? (root.castTo(_dthold_s.class).getPtr("obj")!=null): NEQ(root.addVirtualBytes(-lk), obj)))
+ else if(root!=null && (lk < 0 ? (root.castTo_ST_dthold_s().obj!=null): NEQ(root.addVirtualBytes(-lk), obj)))
{ key = (sz < 0 ? ((__ptr__)obj).addVirtualBytes(ky) : ((__ptr__)obj).addVirtualBytes(ky));
throw new do_search();
}
} catch (do_search do_search) {
// do_search:
- if(dt.getPtr("meth").getInt("type") == 0000004 &&
- (minp = dt.getPtr("data").getInt("minp")) != 0 && (type&(0001000|0000004))!=0)
+ if(dt.meth.type == 0000004 &&
+ (minp = dt.data.minp) != 0 && (type&(0001000|0000004))!=0)
{ /* simple search, note that minp should be even */
// for(t = root, n = 0; n < minp; ++n)
// { k = (lk < 0 ? ((Dthold_t*)(t))->obj : (void*)((char*)(t) - lk) ); k = (void*)(sz < 0 ? *((char**)((char*)(k)+ky)) : ((char*)(k)+ky));
@@ -281,80 +283,80 @@ try {
throw new UnsupportedOperationException("do_search1");
}
while(true) {
- k = lk < 0 ? root.castTo(_dthold_s.class).getPtr("obj") : root.addVirtualBytes(-lk);
+ k = lk < 0 ? root.castTo_ST_dthold_s().obj : root.addVirtualBytes(-lk);
k = sz < 0 ? ((__ptr__)k).addVirtualBytes(ky) : ((__ptr__)k).addVirtualBytes(ky);
if((cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(dt,key,k,disc) :
(sz <= 0 ? strcmp((CString)key,(CString)k) : UNSUPPORTED_INT("memcmp(key,k,sz))") ))) == 0)
break;
else if(cmp < 0)
- { if((t = (_dtlink_s) root.getPtr("hl._left"))!=null )
+ { if((t = (ST_dtlink_s) root._left)!=null )
{
- k = lk < 0 ? t.castTo(_dthold_s.class).getPtr("obj") : t.addVirtualBytes(-lk);
+ k = lk < 0 ? t.castTo_ST_dthold_s().obj : t.addVirtualBytes(-lk);
k = sz < 0 ? ((__ptr__)k).addVirtualBytes(ky) : ((__ptr__)k).addVirtualBytes(ky);
if((cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(dt,key,k,disc)
: (sz <= 0 ? strcmp((CString)key,(CString)k) : UNSUPPORTED_INT("memcmp(key,k,sz))") ))) < 0)
- { root.setPtr("hl._left", t.getPtr("right"));
- t.setPtr("right", root);
- r.setPtr("hl._left", t);
+ { root._left = t.right;
+ t.right = root;
+ r._left = t;
r = t;
- if(N(root = (_dtlink_s) t.getPtr("hl._left")) )
+ if(N(root = (ST_dtlink_s) t._left) )
break;
}
else if(cmp == 0)
- { r.setPtr("hl._left", root);
+ { r._left = root;
r = root;
root = t;
break;
}
else /* if(cmp > 0) */
- { l.setPtr("right", t);
+ { l.right = t;
l = t;
- r.setPtr("hl._left", root);
+ r._left = root;
r = root;
- if(N(root = (_dtlink_s) t.getPtr("right")) )
+ if(N(root = (ST_dtlink_s) t.right) )
break;
}
}
else
{
- r.setPtr("hl._left", root);
+ r._left = root;
r = root;
root = null;
break;
}
}
else /* if(cmp > 0) */
- { if ((t = (_dtlink_s) root.getPtr("right"))!=null )
+ { if ((t = (ST_dtlink_s) root.right)!=null )
{
- k = (lk < 0 ? t.castTo(_dthold_s.class).getPtr("obj") : t.addVirtualBytes(-lk) );
+ k = (lk < 0 ? t.castTo_ST_dthold_s().obj : t.addVirtualBytes(-lk) );
k = sz < 0 ? ((__ptr__)k).addVirtualBytes(ky) : ((__ptr__)k).addVirtualBytes(ky);
if((cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(dt,key,k,disc)
: (sz <= 0 ? strcmp((CString)key,(CString)k) : UNSUPPORTED_INT("memcmp(key,k,sz))") ))) > 0)
{
- root.setPtr("right", t.getPtr("hl._left"));
- t.setPtr("hl._left", root);
- l.setPtr("right", t);
+ root.right = t._left;
+ t._left = root;
+ l.right = t;
l = t;
- if(N(root = (_dtlink_s) t.getPtr("right") ))
+ if(N(root = (ST_dtlink_s) t.right ))
break;
}
else if(cmp == 0)
- { l.setPtr("right", root);
+ { l.right = root;
l = root;
root = t;
break;
}
else /* if(cmp < 0) */
- { r.setPtr("hl._left", t);
+ { r._left = t;
r = t;
- l.setPtr("right", root);
+ l.right = root;
l = root;
- if(N(root = (_dtlink_s) t.getPtr("hl._left") ))
+ if(N(root = (ST_dtlink_s) t._left ))
break;
}
}
else
- { l.setPtr("right", root);
+ { l.right = root;
l = root;
root = null;
break;
@@ -364,25 +366,25 @@ try {
}
if(root!=null)
{ /* found it, now isolate it */
- dt.setInt("type", dt.getInt("type") | 0100000);
- l.setPtr("right", root.getPtr("hl._left"));
- r.setPtr("hl._left", root.getPtr("right"));
+ dt.setInt("type", dt.type | 0100000);
+ l.right = root._left;
+ r._left = root.right;
if((type&(0000004|0001000))!=0)
{ /*has_root:*/
throw new has_root();
}
else if((type&0000010)!=0)
- { root.setPtr("hl._left", link.getPtr("right"));
- root.setPtr("right", null);
- link.setPtr("right", root);
+ { root._left = link.right;
+ root.right = null;
+ link.right = root;
//dt_next:
- if((root = (_dtlink_s) link.getPtr("hl._left"))!=null )
- { while((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) {
- root.setPtr("hl._left", t.getPtr("right"));
- t.setPtr("right", root);
+ if((root = (ST_dtlink_s) link._left)!=null )
+ { while((t = (ST_dtlink_s) root._left)!=null ) {
+ root._left = t.right;
+ t.right = root;
root = t;
}
- link.setPtr("hl._left", root.getPtr("right"));
+ link._left = root.right;
throw new has_root();
}
else throw new no_root();
@@ -415,14 +417,38 @@ try {
// goto no_root;
}
else if((type&(0000001|0004000))!=0)
- { if((dt.getPtr("meth").getInt("type")&0000004)!=0)
+ { if((dt.meth.type&0000004)!=0)
throw new has_root();
- else throw new UnsupportedOperationException();
-// { root->hl._left = ((Dtlink_t*)0);
-// root->right = link.hl._left;
-// link.hl._left = root;
-// goto dt_insert;
-// }
+ else
+ {
+ root._left = null;
+ root.right = link._left;
+ link._left = root;
+ /*dt_insert: DUPLICATION*/
+ if(disc.makef!=null && (type&0000001)!=0)
+ obj = (__ptr__) disc.makef.exe(dt,obj,disc);
+ if(obj!=null)
+ {
+ if(lk >= 0)
+ root = (ST_dtlink_s) ((__ptr__)obj.addVirtualBytes(lk)).castTo(ST_dtlink_s.class);
+ else
+ {
+ root = (ST_dtlink_s)(((ST_dthold_s)dt.memoryf.exe(
+ dt,null,sizeof(ST_dthold_s.class),disc)).castTo(ST_dtlink_s.class));
+ if(root!=null)
+ root.castTo(ST_dthold_s.class).setPtr("obj", obj);
+ else if(disc.makef!=null && disc.freef!=null &&
+ ((type&0000001))!=0)
+ UNSUPPORTED("(*disc->freef)(dt,obj,disc);");
+ }
+ }
+ if(root!=null)
+ { if(dt.data.size >= 0)
+ dt.data.setInt("size", dt.data.size+1 );
+ throw new has_root();
+ }
+ else throw new UnsupportedOperationException("goto no_root");
+ }
}
else if((type&0000040)!=0) /* a duplicate */ {
throw new UnsupportedOperationException();
@@ -443,18 +469,18 @@ try {
}
else
{ /* not found, finish up LEFT and RIGHT trees */
- r.setPtr("hl._left", null);
- l.setPtr("right", null);
+ r._left = null;
+ l.right = null;
if((type&0000010)!=0)
{
//goto dt_next:
- if((root = (_dtlink_s) link.getPtr("hl._left"))!=null )
- { while((t = (_dtlink_s) root.getPtr("hl._left"))!=null ) {
- root.setPtr("hl._left", t.getPtr("right"));
- t.setPtr("right", root);
+ if((root = (ST_dtlink_s) link._left)!=null )
+ { while((t = (ST_dtlink_s) root._left)!=null ) {
+ root._left = t.right;
+ t.right = root;
root = t;
}
- link.setPtr("hl._left", root.getPtr("right"));
+ link._left = root.right;
throw new has_root();
}
else throw new no_root();
@@ -467,34 +493,34 @@ try {
throw new no_root();
}
else if((type&(0000001|0004000))!=0)
- { /*dt_insert:*/
- if(disc.getPtr("makef")!=null && (type&0000001)!=0)
- obj = (__ptr__) disc.call("makef", dt,obj,disc);
+ { /*dt_insert: DUPLICATION*/
+ if(disc.makef!=null && (type&0000001)!=0)
+ obj = (__ptr__) disc.makef.exe(dt,obj,disc);
if(obj!=null)
{
if(lk >= 0)
- root = (_dtlink_s) ((__ptr__)obj.addVirtualBytes(lk)).castTo(_dtlink_s.class);
+ root = (ST_dtlink_s) ((__ptr__)obj.addVirtualBytes(lk)).castTo(ST_dtlink_s.class);
else
{
- root = (_dtlink_s)(dt.call("memoryf",
- dt,null,sizeof(_dthold_s.class),disc));
+ root = (ST_dtlink_s)(((ST_dthold_s)dt.memoryf.exe(
+ dt,null,sizeof(ST_dthold_s.class),disc)).castTo(ST_dtlink_s.class));
if(root!=null)
- root.castTo(_dthold_s.class).setPtr("obj", obj);
- else if(disc.getPtr("makef")!=null && disc.getPtr("freef")!=null &&
+ root.castTo(ST_dthold_s.class).setPtr("obj", obj);
+ else if(disc.makef!=null && disc.freef!=null &&
((type&0000001))!=0)
UNSUPPORTED("(*disc->freef)(dt,obj,disc);");
}
}
if(root!=null)
- { if(dt.getPtr("data").getInt("size") >= 0)
- dt.getPtr("data").setInt("size", dt.getPtr("data").getInt("size")+1 );
+ { if(dt.data.size >= 0)
+ dt.data.setInt("size", dt.data.size+1 );
throw new has_root();
}
else throw new UnsupportedOperationException("goto no_root");
}
else if((type&0000040)!=0)
{ root = me;
- dt.getPtr("data").setInt("size", dt.getPtr("data").getInt("size")+1 );
+ dt.data.setInt("size", dt.data.size+1 );
throw new UnsupportedOperationException("goto has_root");
}
else /*if(type&DT_DELETE)*/
@@ -505,10 +531,10 @@ try {
}
// return ((void*)0);
} catch (has_root has_root) {
- root = (_dtlink_s) root.castTo(_dtlink_s.class);
- root.setPtr("hl._left", link.getPtr("right"));
- root.setPtr("right", link.getPtr("hl._left"));
- if((dt.getPtr("meth").getInt("type")&0000010)!=0 && (type&(0000004|0001000))!=0 )
+ root = (ST_dtlink_s) root.castTo(ST_dtlink_s.class);
+ root._left = link.right;
+ root.right = link._left;
+ if((dt.meth.type&0000010)!=0 && (type&(0000004|0001000))!=0 )
{ //key = (lk < 0 ? ((Dthold_t*)(root))->obj : (void*)((char*)(root) - lk) ); key = (void*)(sz < 0 ? *((char**)((char*)(key)+ky)) : ((char*)(key)+ky));
throw new UnsupportedOperationException();
// while((t = root->hl._left) )
@@ -523,13 +549,13 @@ try {
// (((root)->hl._left = (t)->right, (t)->right = (root)), (root) = (t));
// }
}
- dt.getPtr("data").setPtr("here", root);
- return (lk < 0 ? root.castTo(_dthold_s.class).getPtr("obj") : root.addVirtualBytes(-lk));
+ dt.data.here = root;
+ return (lk < 0 ? root.castTo_ST_dthold_s().obj : root.addVirtualBytes(-lk));
} catch (no_root no_root) {
- while((t = (_dtlink_s) r.getPtr("hl._left"))!=null)
+ while((t = (ST_dtlink_s) r._left)!=null)
r = t;
- r.setPtr("hl._left", link.getPtr("right"));
- dt.getPtr("data").setPtr("here", link.getPtr("hl._left"));
+ r._left = link.right;
+ dt.data.here = link._left;
return (type&0000002)!=0 ? obj : null;
}
throw new UnsupportedOperationException();
diff --git a/src/gen/lib/cdt/dtview__c.java b/src/gen/lib/cdt/dtview__c.java
index e098539..f116d90 100644
--- a/src/gen/lib/cdt/dtview__c.java
+++ b/src/gen/lib/cdt/dtview__c.java
@@ -55,7 +55,7 @@ import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.Macro.UNSUPPORTED_INT;
import h.Dtcompar_f;
-import h._dt_s;
+import h.ST_dt_s;
import smetana.core.CFunction;
import smetana.core.CString;
import smetana.core.__ptr__;
@@ -129,38 +129,38 @@ public class dtview__c {
//3 6spidg45w8teb64726drdswaa
// static void* dtvsearch(Dt_t* dt, register void* obj, register int type)
-public static __ptr__ dtvsearch(_dt_s dt, __ptr__ obj, int type) {
+public static __ptr__ dtvsearch(ST_dt_s dt, __ptr__ obj, int type) {
ENTERING("6spidg45w8teb64726drdswaa","dtvsearch");
try {
- _dt_s d, p;
+ ST_dt_s d, p;
__ptr__ o=null, n, ok, nk;
int cmp, lk, sz, ky;
Dtcompar_f cmpf;
/* these operations only happen at the top level */
if ((type&(0000001|0000002|0000100|0000040))!=0)
- return (__ptr__) dt.getPtr("meth").call("searchf", dt, obj, type);
+ return (__ptr__) dt.meth.searchf.exe(dt, obj, type);
if(((type&(0001000|0000004))!=0) || /* order sets first/last done below */
- (((type&(0000200|0000400))!=0) && N(dt.getPtr("meth").getInt("type")&(0000010|0000004)) ) )
- { for(d = dt; d!=null; d = (_dt_s) d.getPtr("view"))
- if((o = (__ptr__) d.getPtr("meth").call("searchf", d,obj,type))!=null )
+ (((type&(0000200|0000400))!=0) && N(dt.meth.type&(0000010|0000004)) ) )
+ { for(d = dt; d!=null; d = (ST_dt_s) d.view)
+ if((o = (__ptr__) d.meth.searchf.exe(d,obj,type))!=null )
break;
dt.setPtr("walk", d);
return o;
}
- if((dt.getPtr("meth").getInt("type") & (0000010|0000004) )!=0)
+ if((dt.meth.type & (0000010|0000004) )!=0)
{ if(N(type & (0000200|0000400|0000010|0000020)) )
return null;
n = nk = null; p = null;
- for(d = dt; d!=null; d = (_dt_s) d.getPtr("view"))
- { if(N(o = (__ptr__) d.getPtr("meth").call("searchf", d, obj, type) ))
+ for(d = dt; d!=null; d = (ST_dt_s) d.view)
+ { if(N(o = (__ptr__) d.meth.searchf.exe(d, obj, type) ))
continue;
- ky = d.getPtr("disc").getInt("key");
- sz = d.getPtr("disc").getInt("size");
- lk = d.getPtr("disc").getInt("link");
- cmpf = (Dtcompar_f) d.getPtr("disc").getPtr("comparf");
+ ky = d.disc.key;
+ sz = d.disc.size;
+ lk = d.disc.link;
+ cmpf = (Dtcompar_f) d.disc.comparf;
ok = (__ptr__) (sz < 0 ? ((__ptr__)o).addVirtualBytes(ky) : ((__ptr__)o).addVirtualBytes(ky));
if(n!=null) /* get the right one among all dictionaries */
- { cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(d,ok,nk,d.getPtr("disc")) : (sz <= 0 ? strcmp((CString)ok,(CString)nk) : UNSUPPORTED_INT("memcmp(ok,nk,sz)")) );
+ { cmp = (cmpf!=null ? (Integer)((CFunction)cmpf).exe(d,ok,nk,d.disc) : (sz <= 0 ? strcmp((CString)ok,(CString)nk) : UNSUPPORTED_INT("memcmp(ok,nk,sz)")) );
if(((type & (0000010|0000200))!=0 && cmp < 0) ||
((type & (0000020|0000400))!=0 && cmp > 0) )
UNSUPPORTED("5o3u9aaanyd9yh74sjfkkofmo"); // goto a_dj;
@@ -214,33 +214,33 @@ LEAVING("6spidg45w8teb64726drdswaa","dtvsearch");
//3 dfryioch2xz35w8nq6lxbk5kh
// Dt_t* dtview(register Dt_t* dt, register Dt_t* view)
-public static _dt_s dtview(_dt_s dt, _dt_s view) {
+public static ST_dt_s dtview(ST_dt_s dt, ST_dt_s view) {
ENTERING("dfryioch2xz35w8nq6lxbk5kh","dtview");
try {
- _dt_s d;
- if ((dt.getPtr("data").getInt("type")&010000)!=0) dtrestore(dt,null);
+ ST_dt_s d;
+ if ((dt.data.type&010000)!=0) dtrestore(dt,null);
if(view!=null)
- { if ((view.getPtr("data").getInt("type")&010000)!=0) dtrestore(view,null);
- if(NEQ(view.getPtr("meth"), dt.getPtr("meth"))) /* must use the same method */
+ { if ((view.data.type&010000)!=0) dtrestore(view,null);
+ if(NEQ(view.meth, dt.meth)) /* must use the same method */
UNSUPPORTED("return null;");
}
/* make sure there won't be a cycle */
- for(d = view; d!=null; d = (_dt_s)d.getPtr("view"))
+ for(d = view; d!=null; d = (ST_dt_s)d.view)
if(EQ(d, dt))
return null;
/* no more viewing lower dictionary */
- if((d = (_dt_s)dt.getPtr("view"))!=null )
- d.setInt("nview", d.getInt("nview")-1);
+ if((d = (ST_dt_s)dt.view)!=null )
+ d.setInt("nview", d.nview-1);
dt.setPtr("walk", null);
dt.setPtr("view", null);
if(N(view))
- { dt.setPtr("searchf", dt.getPtr("meth").getPtr("searchf"));
+ { dt.setPtr("searchf", dt.meth.searchf);
return d;
}
/* ok */
dt.setPtr("view", view);
dt.setPtr("searchf", function(dtview__c.class, "dtvsearch"));
- view.setInt("nview", view.getInt("nview")+1 );
+ view.setInt("nview", view.nview+1 );
return view;
} finally {
LEAVING("dfryioch2xz35w8nq6lxbk5kh","dtview");
diff --git a/src/gen/lib/cgraph/apply__c.java b/src/gen/lib/cgraph/apply__c.java
index 3a83187..840289c 100644
--- a/src/gen/lib/cgraph/apply__c.java
+++ b/src/gen/lib/cgraph/apply__c.java
@@ -56,8 +56,8 @@ import static smetana.core.Macro.AGRAPH;
import static smetana.core.Macro.AGTYPE;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agobj_s;
-import h.Agraph_s;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
import smetana.core.CFunction;
import smetana.core.__ptr__;
@@ -230,10 +230,10 @@ throw new UnsupportedOperationException();
//3 95y4aknoddh42lieikrb72vxw
// static Agobj_t *subgraph_search(Agraph_t * sub, Agobj_t * g)
-public static Agobj_s subgraph_search(Agraph_s sub, Agobj_s g) {
+public static ST_Agobj_s subgraph_search(ST_Agraph_s sub, ST_Agobj_s g) {
ENTERING("95y4aknoddh42lieikrb72vxw","subgraph_search");
try {
- return (Agobj_s) sub.castTo(Agobj_s.class);
+ return (ST_Agobj_s) sub.castTo_ST_Agobj_s();
} finally {
LEAVING("95y4aknoddh42lieikrb72vxw","subgraph_search");
}
@@ -244,15 +244,15 @@ LEAVING("95y4aknoddh42lieikrb72vxw","subgraph_search");
//3 8s9l15wqucf1glmbeb6fmya8e
// static void rec_apply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, agobjsearchfn_t objsearch, int preorder)
-public static void rec_apply(Agraph_s g, Agobj_s obj, CFunction fn, __ptr__ arg, CFunction objsearch, boolean preorder) {
+public static void rec_apply(ST_Agraph_s g, ST_Agobj_s obj, CFunction fn, __ptr__ arg, CFunction objsearch, boolean preorder) {
ENTERING("8s9l15wqucf1glmbeb6fmya8e","rec_apply");
try {
- Agraph_s sub;
- Agobj_s subobj;
+ ST_Agraph_s sub;
+ ST_Agobj_s subobj;
if (preorder)
fn.exe(g, obj, arg);
for (sub = agfstsubg(g); sub!=null; sub = agnxtsubg(sub)) {
- if ((subobj = (Agobj_s) objsearch.exe(sub, obj))!=null)
+ if ((subobj = (ST_Agobj_s) objsearch.exe(sub, obj))!=null)
rec_apply(sub, subobj, fn, arg, objsearch, preorder);
}
if (N(preorder))
@@ -267,10 +267,10 @@ LEAVING("8s9l15wqucf1glmbeb6fmya8e","rec_apply");
//3 9hqql178zpl8iudlf6sgnv7aj
// int agapply(Agraph_t * g, Agobj_t * obj, agobjfn_t fn, void *arg, int preorder)
-public static int agapply(Agraph_s g, Agobj_s obj, CFunction fn, __ptr__ arg, boolean preorder) {
+public static int agapply(ST_Agraph_s g, ST_Agobj_s obj, CFunction fn, __ptr__ arg, boolean preorder) {
ENTERING("9hqql178zpl8iudlf6sgnv7aj","agapply");
try {
- Agobj_s subobj;
+ ST_Agobj_s subobj;
CFunction objsearch=null;
switch (AGTYPE(obj)) {
case AGRAPH:
@@ -288,7 +288,7 @@ UNSUPPORTED("2pc67byzirrkhe1cmdoguh6i1"); // agerr(AGERR, "agapply: unknown obj
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
break;
}
- if ((subobj = (Agobj_s) objsearch.exe(g, obj))!=null) {
+ if ((subobj = (ST_Agobj_s) objsearch.exe(g, obj))!=null) {
rec_apply(g, subobj, fn, arg, objsearch, preorder);
return 0;
} else
diff --git a/src/gen/lib/cgraph/attr__c.java b/src/gen/lib/cgraph/attr__c.java
index 4867d9a..7596ba8 100644
--- a/src/gen/lib/cgraph/attr__c.java
+++ b/src/gen/lib/cgraph/attr__c.java
@@ -75,18 +75,21 @@ import static smetana.core.Macro.AGRAPH;
import static smetana.core.Macro.AGTYPE;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agattr_s;
-import h.Agdatadict_s;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agobj_s;
-import h.Agraph_s;
-import h.Agrec_s;
-import h.Agsym_s;
+import h.ST_Agattr_s;
+import h.ST_Agdatadict_s;
import h.ST_Agdesc_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
+import h.ST_Agrec_s;
+import h.ST_Agsym_s;
import h.ST_Agtag_s;
-import h._dt_s;
-import h._dtdisc_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+
+import java.util.ArrayList;
+
import smetana.core.CString;
import smetana.core.Memory;
import smetana.core.Z;
@@ -262,15 +265,15 @@ static {
//3 4bm10isw1qq1eqcse8afbxee3
// Agdatadict_t *agdatadict(Agraph_t * g, int cflag)
-public static Agdatadict_s agdatadict(Agraph_s g, boolean cflag) {
+public static ST_Agdatadict_s agdatadict(ST_Agraph_s g, boolean cflag) {
ENTERING("4bm10isw1qq1eqcse8afbxee3","agdatadict");
try {
- Agdatadict_s rv;
- rv = (Agdatadict_s) aggetrec(g, DataDictName, false).castTo(Agdatadict_s.class);
+ ST_Agdatadict_s rv;
+ rv = (ST_Agdatadict_s) aggetrec(g, DataDictName, false).castTo(ST_Agdatadict_s.class);
if (rv!=null || N(cflag))
return rv;
init_all_attrs(g);
- rv = (Agdatadict_s) aggetrec(g, DataDictName, false).castTo(Agdatadict_s.class);
+ rv = (ST_Agdatadict_s) aggetrec(g, DataDictName, false).castTo(ST_Agdatadict_s.class);
return rv;
} finally {
LEAVING("4bm10isw1qq1eqcse8afbxee3","agdatadict");
@@ -282,23 +285,23 @@ LEAVING("4bm10isw1qq1eqcse8afbxee3","agdatadict");
//3 2b2cg0am9e1lwc0nqikl2wczb
// Dict_t *agdictof(Agraph_t * g, int kind)
-public static _dt_s agdictof(Agraph_s g, int kind) {
+public static ST_dt_s agdictof(ST_Agraph_s g, int kind) {
ENTERING("2b2cg0am9e1lwc0nqikl2wczb","agdictof");
try {
- Agdatadict_s dd;
- _dt_s dict;
+ ST_Agdatadict_s dd;
+ ST_dt_s dict;
dd = agdatadict(g, false);
if (dd!=null)
switch (kind) {
case AGRAPH:
- dict = (_dt_s) dd.getPtr("dict.g");
+ dict = (ST_dt_s) dd.dict_g;
break;
case AGNODE:
- dict = (_dt_s) dd.getPtr("dict.n");
+ dict = (ST_dt_s) dd.dict_n;
break;
case AGINEDGE:
case AGOUTEDGE:
- dict = (_dt_s) dd.getPtr("dict.e");
+ dict = (ST_dt_s) dd.dict_e;
break;
default:
System.err.println("agdictof: unknown kind "+ kind);
@@ -317,11 +320,11 @@ LEAVING("2b2cg0am9e1lwc0nqikl2wczb","agdictof");
//3 dbhw2q2jfsz9qwawchy0hxj4i
// Agsym_t *agnewsym(Agraph_t * g, char *name, char *value, int id, int kind)
-public static Agsym_s agnewsym(Agraph_s g, CString name, CString value, int id, int kind) {
+public static ST_Agsym_s agnewsym(ST_Agraph_s g, CString name, CString value, int id, int kind) {
ENTERING("dbhw2q2jfsz9qwawchy0hxj4i","agnewsym");
try {
- Agsym_s sym;
- sym = (Agsym_s) agalloc(g, sizeof(Agsym_s.class));
+ ST_Agsym_s sym;
+ sym = (ST_Agsym_s) agalloc(g, sizeof(ST_Agsym_s.class));
sym.setInt("kind", kind);
sym.setPtr("name", agstrdup(g, name));
sym.setPtr("defval", agstrdup(g, value));
@@ -359,29 +362,29 @@ throw new UnsupportedOperationException();
//3 alb1d5x6huba3q44ms1wt0rr5
// static Agdatadict_t *agmakedatadict(Agraph_t * g)
-public static Agdatadict_s agmakedatadict(Agraph_s g) {
+public static ST_Agdatadict_s agmakedatadict(ST_Agraph_s g) {
ENTERING("alb1d5x6huba3q44ms1wt0rr5","agmakedatadict");
try {
- Agraph_s par;
- Agdatadict_s parent_dd, dd;
- dd = (Agdatadict_s) agbindrec(g, DataDictName, sizeof(Agdatadict_s.class),
- false).castTo(Agdatadict_s.class);
- dd.setPtr("dict.n", agdtopen(g, Z.z().AgDataDictDisc.amp(), Z.z().Dttree));
- dd.setPtr("dict.e", agdtopen(g, Z.z().AgDataDictDisc.amp(),Z.z(). Dttree));
- dd.setPtr("dict.g", agdtopen(g, Z.z().AgDataDictDisc.amp(), Z.z().Dttree));
+ ST_Agraph_s par;
+ ST_Agdatadict_s parent_dd, dd;
+ dd = (ST_Agdatadict_s) agbindrec(g, DataDictName, sizeof(ST_Agdatadict_s.class),
+ false).castTo(ST_Agdatadict_s.class);
+ dd.setPtr("dict.n", agdtopen(g, Z.z().AgDataDictDisc, Z.z().Dttree));
+ dd.setPtr("dict.e", agdtopen(g, Z.z().AgDataDictDisc,Z.z(). Dttree));
+ dd.setPtr("dict.g", agdtopen(g, Z.z().AgDataDictDisc, Z.z().Dttree));
if ((par = agparent(g))!=null) {
parent_dd = agdatadict(par, false);
- dtview((_dt_s)dd.getPtr("dict.n"), (_dt_s)parent_dd.getPtr("dict.n"));
- dtview((_dt_s)dd.getPtr("dict.e"), (_dt_s)parent_dd.getPtr("dict.e"));
- dtview((_dt_s)dd.getPtr("dict.g"), (_dt_s)parent_dd.getPtr("dict.g"));
+ dtview((ST_dt_s)dd.dict_n, (ST_dt_s)parent_dd.dict_n);
+ dtview((ST_dt_s)dd.dict_e, (ST_dt_s)parent_dd.dict_e);
+ dtview((ST_dt_s)dd.dict_g, (ST_dt_s)parent_dd.dict_g);
} else {
if (Z.z().ProtoGraph!=null && NEQ(g, Z.z().ProtoGraph)) {
/* it's not ok to dtview here for several reasons. the proto
graph could change, and the sym indices don't match */
parent_dd = agdatadict(Z.z().ProtoGraph, false);
- agcopydict(parent_dd.getPtr("dict.n"), dd.getPtr("dict.n"), g, AGNODE);
- agcopydict(parent_dd.getPtr("dict.e"), dd.getPtr("dict.e"), g, AGEDGE);
- agcopydict(parent_dd.getPtr("dict.g"), dd.getPtr("dict.g"), g, AGRAPH);
+ agcopydict(parent_dd.dict_n, dd.dict_n, g, AGNODE);
+ agcopydict(parent_dd.dict_e, dd.dict_e, g, AGEDGE);
+ agcopydict(parent_dd.dict_g, dd.dict_g, g, AGRAPH);
}
}
return dd;
@@ -395,12 +398,12 @@ LEAVING("alb1d5x6huba3q44ms1wt0rr5","agmakedatadict");
//3 50wfzq5wy8wc7vuyvs3mrx5ct
// Agsym_t *agdictsym(Dict_t * dict, char *name)
-public static Agsym_s agdictsym(_dt_s dict, CString name) {
+public static ST_Agsym_s agdictsym(ST_dt_s dict, CString name) {
ENTERING("50wfzq5wy8wc7vuyvs3mrx5ct","agdictsym");
try {
- Agsym_s key = (Agsym_s) Memory.malloc(Agsym_s.class);
+ ST_Agsym_s key = (ST_Agsym_s) Memory.malloc(ST_Agsym_s.class);
key.setPtr("name", name);
- return (Agsym_s) dict.call("searchf", (dict),key,0000004);
+ return (ST_Agsym_s) dict.searchf.exe((dict),key,0000004);
} finally {
LEAVING("50wfzq5wy8wc7vuyvs3mrx5ct","agdictsym");
}
@@ -411,11 +414,11 @@ LEAVING("50wfzq5wy8wc7vuyvs3mrx5ct","agdictsym");
//3 4wy4ggu70d7harhix8xnh5w4l
// Agsym_t *aglocaldictsym(Dict_t * dict, char *name)
-public static Agsym_s aglocaldictsym(_dt_s dict, CString name) {
+public static ST_Agsym_s aglocaldictsym(ST_dt_s dict, CString name) {
ENTERING("4wy4ggu70d7harhix8xnh5w4l","aglocaldictsym");
try {
- Agsym_s rv;
- _dt_s view;
+ ST_Agsym_s rv;
+ ST_dt_s view;
view = dtview(dict, null);
rv = agdictsym(dict, name);
dtview(dict, view);
@@ -430,15 +433,15 @@ LEAVING("4wy4ggu70d7harhix8xnh5w4l","aglocaldictsym");
//3 8hy9sl3zmwobwm960jz466ufe
// Agsym_t *agattrsym(void *obj, char *name)
-public static Agsym_s agattrsym(__ptr__ obj, CString name) {
+public static ST_Agsym_s agattrsym(__ptr__ obj, CString name) {
ENTERING("8hy9sl3zmwobwm960jz466ufe","agattrsym");
try {
- Agattr_s data;
- Agsym_s rv;
+ ST_Agattr_s data;
+ ST_Agsym_s rv;
CString arg = name;
- data = agattrrec(obj.castTo(Agobj_s.class));
+ data = agattrrec(obj.castTo(ST_Agobj_s.class));
if (data!=null)
- rv = agdictsym((_dt_s)data.getPtr("dict"), arg);
+ rv = agdictsym((ST_dt_s)data.dict, arg);
else
rv = null;
return rv;
@@ -456,10 +459,10 @@ public final static CString AgDataRecName = new CString("_AG_strdata");
//3 6az8xu0sgu1d6abu0xfpd89hi
// static int topdictsize(Agobj_t * obj)
-public static int topdictsize(Agobj_s obj) {
+public static int topdictsize(ST_Agobj_s obj) {
ENTERING("6az8xu0sgu1d6abu0xfpd89hi","topdictsize");
try {
- _dt_s d;
+ ST_dt_s d;
d = agdictof(agroot(agraphof(obj)), AGTYPE(obj));
return d!=null ? dtsize_(d) : 0;
} finally {
@@ -472,31 +475,31 @@ LEAVING("6az8xu0sgu1d6abu0xfpd89hi","topdictsize");
//3 3wjrlyjdlz8k9nfxenxsfiqmj
// static Agrec_t *agmakeattrs(Agraph_t * context, void *obj)
-public static Agrec_s agmakeattrs(Agraph_s context, __ptr__ obj) {
+public static ST_Agrec_s agmakeattrs(ST_Agraph_s context, __ptr__ obj) {
ENTERING("3wjrlyjdlz8k9nfxenxsfiqmj","agmakeattrs");
try {
int sz;
- Agattr_s rec;
- Agsym_s sym;
- _dt_s datadict;
- rec = (Agattr_s) agbindrec(obj, AgDataRecName, sizeof(Agattr_s.class), false).castTo(Agattr_s.class);
+ ST_Agattr_s rec;
+ ST_Agsym_s sym;
+ ST_dt_s datadict;
+ rec = (ST_Agattr_s) agbindrec(obj, AgDataRecName, sizeof(ST_Agattr_s.class), false).castTo(ST_Agattr_s.class);
datadict = agdictof(context, AGTYPE(obj));
- if (rec.getPtr("dict") == null) {
- rec.setPtr("dict", agdictof(agroot(context), AGTYPE(obj)));
+ if (rec.dict == null) {
+ rec.dict = agdictof(agroot(context), AGTYPE(obj));
/* don't malloc(0) */
- sz = topdictsize((Agobj_s) obj);
+ sz = topdictsize((ST_Agobj_s) obj.castTo(ST_Agobj_s.class));
if (sz < 4)
sz = 4;
- rec.setPtr("str", agalloc(agraphof(obj), sizeof("char*", sz)));
+ rec.str = new ArrayList<CString>(); for (int i=0; i<sz; i++) rec.str.add(null);
/* doesn't call agxset() so no obj-modified callbacks occur */
- for (sym = (Agsym_s) ((__ptr__)datadict.call("searchf", datadict,null,0000200)); sym!=null;
- sym = (Agsym_s) ((__ptr__)datadict.call("searchf", datadict,sym,0000010)))
- rec.getArrayOfCString("str").plus(sym.getInt("id")).setCString( agstrdup(agraphof(obj), sym.getCString("defval")));
+ for (sym = (ST_Agsym_s) ((__ptr__)datadict.searchf.exe(datadict,null,0000200)); sym!=null;
+ sym = (ST_Agsym_s) ((__ptr__)datadict.searchf.exe(datadict,sym,0000010)))
+ rec.str.set(sym.id, agstrdup(agraphof(obj), sym.defval));
} else {
}
- return (Agrec_s) rec;
+ return (ST_Agrec_s) rec.castTo(ST_Agrec_s.class);
} finally {
LEAVING("3wjrlyjdlz8k9nfxenxsfiqmj","agmakeattrs");
}
@@ -527,7 +530,7 @@ throw new UnsupportedOperationException();
//3 6b3c2syvj23lbf7kz0aal8vmc
// static void freesym(Dict_t * d, void * obj, Dtdisc_t * disc)
-public static void freesym(_dt_s d, Object obj, _dtdisc_s disc) {
+public static void freesym(ST_dt_s d, Object obj, ST_dtdisc_s disc) {
ENTERING("6b3c2syvj23lbf7kz0aal8vmc","freesym");
try {
UNSUPPORTED("bf9av4xbx61835st3og3wfqr8"); // static void freesym(Dict_t * d, void * obj, Dtdisc_t * disc)
@@ -552,10 +555,10 @@ LEAVING("6b3c2syvj23lbf7kz0aal8vmc","freesym");
//3 13sfx74lme08ur04vkrqta25j
// Agattr_t *agattrrec(void *obj)
-public static Agattr_s agattrrec(__ptr__ obj) {
+public static ST_Agattr_s agattrrec(__ptr__ obj) {
ENTERING("13sfx74lme08ur04vkrqta25j","agattrrec");
try {
- return (Agattr_s) aggetrec(obj, AgDataRecName, false).castTo(Agattr_s.class);
+ return (ST_Agattr_s) aggetrec(obj, AgDataRecName, false).castTo(ST_Agattr_s.class);
} finally {
LEAVING("13sfx74lme08ur04vkrqta25j","agattrrec");
}
@@ -566,18 +569,19 @@ LEAVING("13sfx74lme08ur04vkrqta25j","agattrrec");
//3 2io7b26wq70e7kwdlzsh6bw7f
// static void addattr(Agraph_t * g, Agobj_t * obj, Agsym_t * sym)
-public static void addattr(Agraph_s g, Agobj_s obj, Agsym_s sym) {
+public static void addattr(ST_Agraph_s g, ST_Agobj_s obj, ST_Agsym_s sym) {
ENTERING("2io7b26wq70e7kwdlzsh6bw7f","addattr");
try {
- Agattr_s attr;
- attr = (Agattr_s) agattrrec(obj);
-
- if (sym.getInt("id") >= 4)
- attr.setPtr("str", (__ptr__) g.getPtr("clos").getPtr("disc").getPtr("mem").call("resize", g.getPtr("clos").getPtr("state").getPtr("mem"),
- attr.getPtr("str"),
- sizeof("char*", sym.getInt("id")),
- sizeof("char*", sym.getInt("id") + 1)));
- attr.getArrayOfCString("str").plus(sym.getInt("id")).setCString(agstrdup(g, sym.getCString("defval")));
+ ST_Agattr_s attr;
+ attr = (ST_Agattr_s) agattrrec(obj);
+
+ if (sym.id >= 4)
+// attr.str = (StarArrayOfCString) g.clos.disc.mem.call("resize", g.clos.state.mem,
+// attr.str,
+// sizeof("char*", sym.id),
+// sizeof("char*", sym.id + 1));
+ attr.str.add(null);
+ attr.str.set(sym.id, agstrdup(g, sym.defval));
/* agmethod_upd(g,obj,sym); JCE and GN didn't like this. */
} finally {
LEAVING("2io7b26wq70e7kwdlzsh6bw7f","addattr");
@@ -589,48 +593,48 @@ LEAVING("2io7b26wq70e7kwdlzsh6bw7f","addattr");
//3 a3qr8ug1rkxp6ocieyp41ly3o
// static Agsym_t *setattr(Agraph_t * g, int kind, char *name, char *value)
-public static Agsym_s setattr(Agraph_s g, int kind, CString name, CString value) {
+public static ST_Agsym_s setattr(ST_Agraph_s g, int kind, CString name, CString value) {
ENTERING("a3qr8ug1rkxp6ocieyp41ly3o","setattr");
try {
- Agdatadict_s dd;
- _dt_s ldict, rdict;
- Agsym_s lsym, psym, rsym, rv;
- Agraph_s root;
- Agnode_s n;
- Agedge_s e;
+ ST_Agdatadict_s dd;
+ ST_dt_s ldict, rdict;
+ ST_Agsym_s lsym, psym, rsym, rv;
+ ST_Agraph_s root;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
root = agroot(g);
dd = agdatadict(g, (N(0))); /* force initialization of string attributes */
ldict = agdictof(g, kind);
lsym = aglocaldictsym(ldict, name);
if (lsym!=null) { /* update old local definiton */
- agstrfree(g, lsym.getCString("defval"));
+ agstrfree(g, lsym.defval);
lsym.setPtr("defval", agstrdup(g, value));
rv = lsym;
} else {
psym = agdictsym(ldict, name); /* search with viewpath up to root */
if (psym!=null) { /* new local definition */
- lsym = agnewsym(g, name, value, psym.getInt("id"), kind);
- ldict.castTo(_dt_s.class).call("searchf",ldict,lsym,0000001);
+ lsym = agnewsym(g, name, value, psym.id, kind);
+ ldict.searchf.exe(ldict,lsym,0000001);
rv = lsym;
} else { /* new global definition */
rdict = agdictof(root, kind);
rsym = agnewsym(g, name, value, dtsize_(rdict), kind);
- rdict.castTo(_dt_s.class).call("searchf",rdict,rsym,0000001);
+ rdict.searchf.exe(rdict,rsym,0000001);
switch (kind) {
case AGRAPH:
- agapply(root, (Agobj_s) root.castTo(Agobj_s.class), function(attr__c.class, "addattr"),
+ agapply(root, (ST_Agobj_s) root.castTo(ST_Agobj_s.class), function(attr__c.class, "addattr"),
rsym, (N(0)));
break;
case AGNODE:
for (n = agfstnode(root); n!=null; n = agnxtnode(root, n))
- addattr(g, (Agobj_s) n.castTo(Agobj_s.class), rsym);
+ addattr(g, (ST_Agobj_s) n.castTo(ST_Agobj_s.class), rsym);
break;
case AGINEDGE:
case AGOUTEDGE:
for (n = agfstnode(root); n!=null; n = agnxtnode(root, n))
for (e = agfstout(root, n); e!=null; e = agnxtout(root, e))
- addattr(g, (Agobj_s) e.castTo(Agobj_s.class), rsym);
+ addattr(g, (ST_Agobj_s) e.castTo(ST_Agobj_s.class), rsym);
break;
}
rv = rsym;
@@ -650,11 +654,11 @@ LEAVING("a3qr8ug1rkxp6ocieyp41ly3o","setattr");
//3 8f80aahwb8cqc2t9592v47ttd
// static Agsym_t *getattr(Agraph_t * g, int kind, char *name)
-public static Agsym_s getattr(Agraph_s g, int kind, CString name) {
+public static ST_Agsym_s getattr(ST_Agraph_s g, int kind, CString name) {
ENTERING("8f80aahwb8cqc2t9592v47ttd","getattr");
try {
- Agsym_s rv = null;
- _dt_s dict;
+ ST_Agsym_s rv = null;
+ ST_dt_s dict;
dict = agdictof(g, kind);
if (dict!=null)
rv = agdictsym(dict, name); /* viewpath up to root */
@@ -669,13 +673,13 @@ LEAVING("8f80aahwb8cqc2t9592v47ttd","getattr");
//3 blr3drm2hxuzwd6gpeeb84yyg
// Agsym_t *agattr(Agraph_t * g, int kind, char *name, char *value)
-public static Agsym_s agattr(Agraph_s g, int kind, CString name, CString value) {
+public static ST_Agsym_s agattr(ST_Agraph_s g, int kind, CString name, CString value) {
ENTERING("blr3drm2hxuzwd6gpeeb84yyg","agattr");
try {
- Agsym_s rv;
+ ST_Agsym_s rv;
if (g == null) {
if (Z.z().ProtoGraph == null)
- Z.z().ProtoGraph = agopen(null, Z.z().ProtoDesc.copy(), null);
+ Z.z().ProtoGraph = agopen(null, (ST_Agdesc_s) Z.z().ProtoDesc.copy(), null);
g = Z.z().ProtoGraph;
}
if (value!=null)
@@ -716,13 +720,13 @@ throw new UnsupportedOperationException();
//3 ex2qtmuwz0o2e5svkujdbux78
// void agraphattr_init(Agraph_t * g)
-public static void agraphattr_init(Agraph_s g) {
+public static void agraphattr_init(ST_Agraph_s g) {
ENTERING("ex2qtmuwz0o2e5svkujdbux78","agraphattr_init");
try {
/* Agdatadict_t *dd; */
/* Agrec_t *attr; */
- Agraph_s context;
- ((ST_Agdesc_s)g.getStruct("desc")).has_attrs = 1;
+ ST_Agraph_s context;
+ ((ST_Agdesc_s)g.desc).has_attrs = 1;
/* dd = */ agmakedatadict(g);
if (N(context = agparent(g)))
context = g;
@@ -764,12 +768,12 @@ throw new UnsupportedOperationException();
//3 2pp4ot3pqy71jpfvu3g398y4y
// void agnodeattr_init(Agraph_t * g, Agnode_t * n)
-public static void agnodeattr_init(Agraph_s g, Agnode_s n) {
+public static void agnodeattr_init(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("2pp4ot3pqy71jpfvu3g398y4y","agnodeattr_init");
try {
- Agattr_s data;
- data = (Agattr_s) agattrrec(n);
- if ((N(data)) || (N(data.getPtr("dict"))))
+ ST_Agattr_s data;
+ data = (ST_Agattr_s) agattrrec(n);
+ if ((N(data)) || (N(data.dict)))
agmakeattrs(g, n);
} finally {
LEAVING("2pp4ot3pqy71jpfvu3g398y4y","agnodeattr_init");
@@ -799,12 +803,12 @@ throw new UnsupportedOperationException();
//3 ckfzmnxfi0jiiayxmq38giw0r
// void agedgeattr_init(Agraph_t * g, Agedge_t * e)
-public static void agedgeattr_init(Agraph_s g, Agedge_s e) {
+public static void agedgeattr_init(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("ckfzmnxfi0jiiayxmq38giw0r","agedgeattr_init");
try {
- Agattr_s data;
+ ST_Agattr_s data;
data = agattrrec(e);
- if ((N(data)) || (N(data.getPtr("dict"))))
+ if ((N(data)) || (N(data.dict)))
agmakeattrs(g, e);
} finally {
LEAVING("ckfzmnxfi0jiiayxmq38giw0r","agedgeattr_init");
@@ -837,15 +841,15 @@ throw new UnsupportedOperationException();
public static CString agget(__ptr__ obj, CString name) {
ENTERING("eydjyhexv5jr6vi7uhk0cgphv","agget");
try {
- Agsym_s sym;
- Agattr_s data;
+ ST_Agsym_s sym;
+ ST_Agattr_s data;
CString rv = null;
sym = agattrsym(obj, name);
if (sym == null)
rv = null; /* note was "", but this provides more info */
else {
- data = agattrrec(obj.castTo(Agobj_s.class));
- rv = data.getArrayOfCString("str").plus(sym.getInt("id")).getCString();
+ data = agattrrec(obj.castTo(ST_Agobj_s.class));
+ rv = data.str.get(sym.id);
}
return rv;
} finally {
@@ -858,14 +862,14 @@ LEAVING("eydjyhexv5jr6vi7uhk0cgphv","agget");
//3 9h5oymhfkp6k34zl0fonn10k9
// char *agxget(void *obj, Agsym_t * sym)
-public static CString agxget(__ptr__ obj, Agsym_s sym) {
+public static CString agxget(__ptr__ obj, ST_Agsym_s sym) {
ENTERING("9h5oymhfkp6k34zl0fonn10k9","agxget");
try {
- Agattr_s data;
+ ST_Agattr_s data;
CString rv;
- data = agattrrec(obj.castTo(Agobj_s.class));
+ data = agattrrec(obj.castTo(ST_Agobj_s.class));
- rv = data.getArrayOfCString("str").plus(sym.getInt("id")).getCString();
+ rv = data.str.get(sym.id);
return rv;
} finally {
LEAVING("9h5oymhfkp6k34zl0fonn10k9","agxget");
@@ -898,29 +902,29 @@ throw new UnsupportedOperationException();
//3 4q8xvstvl6fbijhucfd1endxc
// int agxset(void *obj, Agsym_t * sym, char *value)
-public static int agxset(__ptr__ obj, Agsym_s sym, CString value) {
+public static int agxset(__ptr__ obj, ST_Agsym_s sym, CString value) {
ENTERING("4q8xvstvl6fbijhucfd1endxc","agxset");
try {
- Agraph_s g;
- Agobj_s hdr;
- Agattr_s data;
- Agsym_s lsym;
+ ST_Agraph_s g;
+ ST_Agobj_s hdr;
+ ST_Agattr_s data;
+ ST_Agsym_s lsym;
g = agraphof(obj);
- hdr = (Agobj_s) obj.castTo(Agobj_s.class);
+ hdr = (ST_Agobj_s) obj.castTo(ST_Agobj_s.class);
data = agattrrec(hdr);
- agstrfree(g, data.getArrayOfCString("str").plus(sym.getInt("id")).getCString());
- data.getArrayOfCString("str").plus(sym.getInt("id")).setCString(agstrdup(g, value));
- if (((ST_Agtag_s)hdr.getStruct("tag")).objtype == AGRAPH) {
+ agstrfree(g, data.str.get(sym.id));
+ data.str.set(sym.id, agstrdup(g, value));
+ if (((ST_Agtag_s)hdr.tag).objtype == AGRAPH) {
/* also update dict default */
- _dt_s dict;
- dict = (_dt_s) agdatadict(g, false).getPtr("dict.g");
- if ((lsym = aglocaldictsym(dict, sym.getCString("name")))!=null) {
- agstrfree(g, lsym.getCString("defval"));
+ ST_dt_s dict;
+ dict = (ST_dt_s) agdatadict(g, false).dict_g;
+ if ((lsym = aglocaldictsym(dict, sym.name))!=null) {
+ agstrfree(g, lsym.defval);
lsym.setPtr("defval", agstrdup(g, value));
} else {
- lsym = agnewsym(g, sym.getCString("name"), value, sym.getInt("id"), AGTYPE(hdr));
- dict.call("searchf", dict, lsym, 0000001);
+ lsym = agnewsym(g, sym.name, value, sym.id, AGTYPE(hdr));
+ dict.searchf.exe(dict, lsym, 0000001);
}
}
agmethod_upd(g, obj, sym);
@@ -938,7 +942,7 @@ LEAVING("4q8xvstvl6fbijhucfd1endxc","agxset");
public static int agsafeset(__ptr__ obj, CString name, CString value, CString def) {
ENTERING("9b7vn95cin8o7mb2f21exh1qr","agsafeset");
try {
- Agsym_s a;
+ ST_Agsym_s a;
a = agattr(agraphof(obj), AGTYPE(obj), name, null);
if (N(a))
a = agattr(agraphof(obj), AGTYPE(obj), name, def);
diff --git a/src/gen/lib/cgraph/edge__c.java b/src/gen/lib/cgraph/edge__c.java
index 861d1f4..80a8816 100644
--- a/src/gen/lib/cgraph/edge__c.java
+++ b/src/gen/lib/cgraph/edge__c.java
@@ -79,26 +79,22 @@ import static smetana.core.Macro.AGTYPE;
import static smetana.core.Macro.N;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agattr_s;
-import h.Agedge_s;
-import h.Agedgepair_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsubnode_s;
-import h.Agtag_s;
+import h.ST_Agattr_s;
import h.ST_Agdesc_s;
+import h.ST_Agedge_s;
+import h.ST_Agedgepair_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Agsubnode_s;
import h.ST_Agtag_s;
-import h._dt_s;
-import h._dtdisc_s;
-import h._dtlink_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import h.ST_dtlink_s;
import smetana.core.ACCESS;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.Memory;
import smetana.core.STARSTAR;
import smetana.core.Z;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class edge__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -241,16 +237,16 @@ public class edge__c {
//3 9vamtktowqtk4955i546z9obw
// Agedge_t *agfstout(Agraph_t * g, Agnode_t * n)
-public static Agedge_s agfstout(Agraph_s g, Agnode_s n) {
+public static ST_Agedge_s agfstout(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("9vamtktowqtk4955i546z9obw","agfstout");
try {
- Agsubnode_s sn;
- Agedge_s e = null;
+ ST_Agsubnode_s sn;
+ ST_Agedge_s e = null;
sn = agsubrep(g, n);
if (sn!=null) {
- dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("out_seq"));
- e = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),null,0000200);
- sn.setPtr("out_seq", dtextract((_dt_s)g.getPtr("e_seq")));
+ dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.out_seq);
+ e = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,null,0000200);
+ sn.out_seq = dtextract((ST_dt_s)g.e_seq);
}
return e;
} finally {
@@ -263,18 +259,18 @@ LEAVING("9vamtktowqtk4955i546z9obw","agfstout");
//3 1qh7mgqwomkdqvczauv4ex1lu
// Agedge_t *agnxtout(Agraph_t * g, Agedge_t * e)
-public static Agedge_s agnxtout(Agraph_s g, Agedge_s e) {
+public static ST_Agedge_s agnxtout(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("1qh7mgqwomkdqvczauv4ex1lu","agnxtout");
try {
- Agnode_s n;
- Agsubnode_s sn;
- Agedge_s f = null;
+ ST_Agnode_s n;
+ ST_Agsubnode_s sn;
+ ST_Agedge_s f = null;
n = AGTAIL(e);
sn = agsubrep(g, n);
if (sn!=null) {
- dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("out_seq"));
- f = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),e,0000010);
- sn.setPtr("out_seq", dtextract((_dt_s)g.getPtr("e_seq")));
+ dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.out_seq);
+ f = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,e,0000010);
+ sn.out_seq = dtextract((ST_dt_s)g.e_seq);
}
return f;
} finally {
@@ -287,16 +283,16 @@ LEAVING("1qh7mgqwomkdqvczauv4ex1lu","agnxtout");
//3 c60qt3ycq0xweabgtqt16xe93
// Agedge_t *agfstin(Agraph_t * g, Agnode_t * n)
-public static Agedge_s agfstin(Agraph_s g, Agnode_s n) {
+public static ST_Agedge_s agfstin(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("c60qt3ycq0xweabgtqt16xe93","agfstin");
try {
- Agsubnode_s sn;
- Agedge_s e = null;
+ ST_Agsubnode_s sn;
+ ST_Agedge_s e = null;
sn = agsubrep(g, n);
if (sn!=null) {
- dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("in_seq"));
- e = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),null,0000200);
- sn.setPtr("in_seq", dtextract((_dt_s)g.getPtr("e_seq")));
+ dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.in_seq);
+ e = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,null,0000200);
+ sn.setPtr("in_seq", dtextract((ST_dt_s)g.e_seq));
}
return e;
} finally {
@@ -309,18 +305,18 @@ LEAVING("c60qt3ycq0xweabgtqt16xe93","agfstin");
//3 f2af4x97mqn16npd6alsw7avs
// Agedge_t *agnxtin(Agraph_t * g, Agedge_t * e)
-public static Agedge_s agnxtin(Agraph_s g, Agedge_s e) {
+public static ST_Agedge_s agnxtin(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("f2af4x97mqn16npd6alsw7avs","agnxtin");
try {
- Agnode_s n;
- Agsubnode_s sn;
- Agedge_s f = null;
+ ST_Agnode_s n;
+ ST_Agsubnode_s sn;
+ ST_Agedge_s f = null;
n = AGHEAD(e);
sn = agsubrep(g, n);
if (sn!=null) {
- dtrestore((_dt_s)g.getPtr("e_seq"), (_dtlink_s)sn.getPtr("in_seq"));
- f = (Agedge_s) g.getPtr("e_seq").castTo(_dt_s.class).call("searchf", g.getPtr("e_seq"),e,0000010);
- sn.setPtr("in_seq", dtextract((_dt_s)g.getPtr("e_seq")));
+ dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.in_seq);
+ f = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,e,0000010);
+ sn.setPtr("in_seq", dtextract((ST_dt_s)g.e_seq));
}
return f;
} finally {
@@ -333,10 +329,10 @@ LEAVING("f2af4x97mqn16npd6alsw7avs","agnxtin");
//3 6nwyo5bklramr0d093aa1h25o
// Agedge_t *agfstedge(Agraph_t * g, Agnode_t * n)
-public static Agedge_s agfstedge(Agraph_s g, Agnode_s n) {
+public static ST_Agedge_s agfstedge(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("6nwyo5bklramr0d093aa1h25o","agfstedge");
try {
- Agedge_s rv;
+ ST_Agedge_s rv;
rv = agfstout(g, n);
if (rv == null)
rv = agfstin(g, n);
@@ -351,22 +347,22 @@ LEAVING("6nwyo5bklramr0d093aa1h25o","agfstedge");
//3 8zy2u6gsi2xzv2ffv8o4v4uvf
// Agedge_t *agnxtedge(Agraph_t * g, Agedge_t * e, Agnode_t * n)
-public static Agedge_s agnxtedge(Agraph_s g, Agedge_s e, Agnode_s n) {
+public static ST_Agedge_s agnxtedge(ST_Agraph_s g, ST_Agedge_s e, ST_Agnode_s n) {
ENTERING("8zy2u6gsi2xzv2ffv8o4v4uvf","agnxtedge");
try {
- Agedge_s rv;
+ ST_Agedge_s rv;
if (AGTYPE(e) == AGOUTEDGE) {
rv = agnxtout(g, e);
if (rv == null) {
do {
rv = N(rv) ? agfstin(g, n) : agnxtin(g,rv);
- } while (rv!=null && EQ(rv.getPtr("node"), n));
+ } while (rv!=null && EQ(rv.node, n));
}
} else {
do {
rv = agnxtin(g, e); /* so that we only see each edge once, */
e = rv;
- } while (rv!=null && EQ(rv.getPtr("node"), n)); /* ignore loops as in-edges */
+ } while (rv!=null && EQ(rv.node, n)); /* ignore loops as in-edges */
}
return rv;
} finally {
@@ -379,26 +375,26 @@ LEAVING("8zy2u6gsi2xzv2ffv8o4v4uvf","agnxtedge");
//3 c175o6j61jqmfnl4o1g1h1mie
// static Agedge_t *agfindedge_by_key(Agraph_t * g, Agnode_t * t, Agnode_t * h, Agtag_t key)
-public static Agedge_s agfindedge_by_key(Agraph_s g, Agnode_s t, Agnode_s h, final __struct__<Agtag_s> key) {
+public static ST_Agedge_s agfindedge_by_key(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, final ST_Agtag_s key) {
// WARNING!! STRUCT
-return agfindedge_by_key_w_(g, t, h, key.copy());
+return agfindedge_by_key_w_(g, t, h, (ST_Agtag_s) key.copy());
}
-private static Agedge_s agfindedge_by_key_w_(Agraph_s g, Agnode_s t, Agnode_s h, final __struct__<Agtag_s> key) {
+private static ST_Agedge_s agfindedge_by_key_w_(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, final ST_Agtag_s key) {
ENTERING("c175o6j61jqmfnl4o1g1h1mie","agfindedge_by_key");
try {
- Agedge_s e, template = (Agedge_s) Memory.malloc(Agedge_s.class);
- Agsubnode_s sn;
+ ST_Agedge_s e;
+ final ST_Agedge_s template = new ST_Agedge_s();
+ ST_Agsubnode_s sn;
if ((t == null) || (h == null))
return null;
- template.getStruct("base").setStruct("tag", key);
+ template.base.setStruct("tag", key);
template.setPtr("node", t); /* guess that fan-in < fan-out */
sn = agsubrep(g, h);
if (N(sn)) e = null;
else {
- dtrestore((_dt_s)g.getPtr("e_id"), (_dtlink_s)sn.getPtr("in_id"));
- e = (Agedge_s) ((__ptr__)g.getPtr("e_id").castTo(_dt_s.class).call("searchf", g.getPtr("e_id"),template,0000004));
- if (e!=null) e = (Agedge_s) e.castTo(Agedge_s.class);
- sn.setPtr("in_id", dtextract((_dt_s)g.getPtr("e_id")));
+ dtrestore((ST_dt_s)g.e_id, (ST_dtlink_s)sn.in_id);
+ e = ((ST_Agedge_s)g.e_id.searchf.exe(g.e_id,template,0000004));
+ sn.setPtr("in_id", dtextract((ST_dt_s)g.e_id));
}
return e;
} finally {
@@ -430,15 +426,15 @@ throw new UnsupportedOperationException();
//3 b32ssm6ex1pdz1b3nt4fwlhul
// Agsubnode_t *agsubrep(Agraph_t * g, Agnode_t * n)
-public static Agsubnode_s agsubrep(Agraph_s g, Agnode_s n) {
+public static ST_Agsubnode_s agsubrep(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep");
try {
- Agsubnode_s sn;
- final __struct__<Agsubnode_s> template = JUtils.from(Agsubnode_s.class);
- if (EQ(g, n.getPtr("root"))) sn = (Agsubnode_s) n.getStruct("mainsub").amp();
+ ST_Agsubnode_s sn;
+ final ST_Agsubnode_s template = new ST_Agsubnode_s();
+ if (EQ(g, n.root)) sn = (ST_Agsubnode_s) n.mainsub;
else {
template.setPtr("node", n);
- sn = (Agsubnode_s) g.getPtr("n_id").castTo(_dt_s.class).call("searchf", g.getPtr("n_id"), template.amp(), 0000004);
+ sn = (ST_Agsubnode_s) g.n_id.searchf.exe(g.n_id, template, 0000004);
}
return sn;
} finally {
@@ -451,11 +447,11 @@ LEAVING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep");
//3 6u0niow33w9gva780waluva4n
// static void ins(Dict_t * d, Dtlink_t ** set, Agedge_t * e)
-public static void ins(_dt_s d, STARSTAR<_dtlink_s> set, Agedge_s e) {
+public static void ins(ST_dt_s d, STARSTAR<ST_dtlink_s> set, ST_Agedge_s e) {
ENTERING("6u0niow33w9gva780waluva4n","ins");
try {
dtrestore(d, set.getMe());
- d.call("searchf", d,e,0000001);
+ d.searchf.exe(d,e,0000001);
set.setMe(dtextract(d));
} finally {
LEAVING("6u0niow33w9gva780waluva4n","ins");
@@ -485,56 +481,56 @@ throw new UnsupportedOperationException();
//3 8kizmg7gziussfgx8zs3qvkfw
// static void installedge(Agraph_t * g, Agedge_t * e)
-public static void installedge(Agraph_s g, Agedge_s e) {
+public static void installedge(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("8kizmg7gziussfgx8zs3qvkfw","installedge");
try {
- Agnode_s t, h;
- Agedge_s out, in;
- Agsubnode_s sn;
+ ST_Agnode_s t, h;
+ ST_Agedge_s out, in;
+ ST_Agsubnode_s sn;
out = AGMKOUT(e);
in = AGMKIN(e);
t = agtail(e);
h = aghead(e);
while (g!=null) {
if (agfindedge_by_key(g, t, h, AGTAG(e))!=null) break;
- sn = agsubrep(g, t); final Agsubnode_s sn1 = sn;
- ins((_dt_s)g.getPtr("e_seq"),
- STARSTAR.amp(new ACCESS<_dtlink_s>() {
- public _dtlink_s get() {
- return (_dtlink_s) sn1.getPtr("out_seq");
+ sn = agsubrep(g, t); final ST_Agsubnode_s sn1 = sn;
+ ins((ST_dt_s)g.e_seq,
+ STARSTAR.amp(new ACCESS<ST_dtlink_s>() {
+ public ST_dtlink_s get() {
+ return (ST_dtlink_s) sn1.out_seq;
}
- public void set(_dtlink_s obj) {
+ public void set(ST_dtlink_s obj) {
sn1.setPtr("out_seq", obj);
}})
- , (Agedge_s)out);
- ins((_dt_s)g.getPtr("e_id"),
- STARSTAR.amp(new ACCESS<_dtlink_s>() {
- public _dtlink_s get() {
- return (_dtlink_s) sn1.getPtr("out_id");
+ , (ST_Agedge_s)out);
+ ins((ST_dt_s)g.e_id,
+ STARSTAR.amp(new ACCESS<ST_dtlink_s>() {
+ public ST_dtlink_s get() {
+ return (ST_dtlink_s) sn1.out_id;
}
- public void set(_dtlink_s obj) {
+ public void set(ST_dtlink_s obj) {
sn1.setPtr("out_id", obj);
}})
- , (Agedge_s)out);
- sn = agsubrep(g, h); final Agsubnode_s sn2 = sn;
- ins((_dt_s)g.getPtr("e_seq"),
- STARSTAR.amp(new ACCESS<_dtlink_s>() {
- public _dtlink_s get() {
- return (_dtlink_s) sn2.getPtr("in_seq");
+ , (ST_Agedge_s)out);
+ sn = agsubrep(g, h); final ST_Agsubnode_s sn2 = sn;
+ ins((ST_dt_s)g.e_seq,
+ STARSTAR.amp(new ACCESS<ST_dtlink_s>() {
+ public ST_dtlink_s get() {
+ return (ST_dtlink_s) sn2.in_seq;
}
- public void set(_dtlink_s obj) {
+ public void set(ST_dtlink_s obj) {
sn2.setPtr("in_seq", obj);
}})
- , (Agedge_s)in);
- ins((_dt_s)g.getPtr("e_id"),
- STARSTAR.amp(new ACCESS<_dtlink_s>() {
- public _dtlink_s get() {
- return (_dtlink_s) sn2.getPtr("in_id");
+ , (ST_Agedge_s)in);
+ ins((ST_dt_s)g.e_id,
+ STARSTAR.amp(new ACCESS<ST_dtlink_s>() {
+ public ST_dtlink_s get() {
+ return (ST_dtlink_s) sn2.in_id;
}
- public void set(_dtlink_s obj) {
+ public void set(ST_dtlink_s obj) {
sn2.setPtr("in_id", obj);
}})
- , (Agedge_s)in);
+ , (ST_Agedge_s)in);
g = agparent(g);
}
} finally {
@@ -562,17 +558,17 @@ throw new UnsupportedOperationException();
//3 4rzjui6oo0k009o64bxwgjmvq
// static Agedge_t *newedge(Agraph_t * g, Agnode_t * t, Agnode_t * h, unsigned long id)
-public static Agedge_s newedge(Agraph_s g, Agnode_s t, Agnode_s h, int id) {
+public static ST_Agedge_s newedge(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, int id) {
ENTERING("4rzjui6oo0k009o64bxwgjmvq","newedge");
try {
- Agedgepair_s e2;
- Agedge_s in, out;
+ ST_Agedgepair_s e2;
+ ST_Agedge_s in, out;
int seq;
agsubnode(g,t,(N(0)));
agsubnode(g,h,(N(0)));
- e2 = (Agedgepair_s) agalloc(g, sizeof(Agedgepair_s.class));
- in = (Agedge_s) e2.getStruct("in").amp();
- out = (Agedge_s) e2.getStruct("out").amp();
+ e2 = (ST_Agedgepair_s) agalloc(g, sizeof(ST_Agedgepair_s.class));
+ in = (ST_Agedge_s) e2.in;
+ out = (ST_Agedge_s) e2.out;
seq = agnextseq(g, AGEDGE);
AGTYPE(in, AGINEDGE);
AGTYPE(out, AGOUTEDGE);
@@ -583,8 +579,8 @@ try {
in.setPtr("node", t);
out.setPtr("node", h);
installedge(g, out);
- if (((ST_Agdesc_s)g.getStruct("desc")).has_attrs!=0) {
- agbindrec(out, AgDataRecName, sizeof(Agattr_s.class), false);
+ if (((ST_Agdesc_s)g.desc).has_attrs!=0) {
+ agbindrec(out, AgDataRecName, sizeof(ST_Agattr_s.class), false);
agedgeattr_init(g, out);
}
agmethod_init(g, out);
@@ -599,13 +595,13 @@ LEAVING("4rzjui6oo0k009o64bxwgjmvq","newedge");
//3 1ufxhg5xnmll1pe5339477823
// static int ok_to_make_edge(Agraph_t * g, Agnode_t * t, Agnode_t * h)
-public static boolean ok_to_make_edge(Agraph_s g, Agnode_s t, Agnode_s h) {
+public static boolean ok_to_make_edge(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h) {
ENTERING("1ufxhg5xnmll1pe5339477823","ok_to_make_edge");
try {
- final __struct__<Agtag_s> key = JUtils.from(Agtag_s.class);
+ final ST_Agtag_s key = new ST_Agtag_s();
/* protect against self, multi-edges in strict graphs */
if (agisstrict(g)) {
- if (g.getPtr("desc").getBoolean("no_loop") && (EQ(t, h))) /* simple graphs */
+ if (g.desc.no_loop!=0 && (EQ(t, h))) /* simple graphs */
return false;
key.___(Z.z().Tag);
key.setInt("objtype", 0); /* wild card */
@@ -653,10 +649,10 @@ throw new UnsupportedOperationException();
//3 4361pvzr3ozft2ov0fgx6t8bo
// Agedge_t *agedge(Agraph_t * g, Agnode_t * t, Agnode_t * h, char *name, int cflag)
-public static Agedge_s agedge(Agraph_s g, Agnode_s t, Agnode_s h, CString name, boolean cflag) {
+public static ST_Agedge_s agedge(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, CString name, boolean cflag) {
ENTERING("4361pvzr3ozft2ov0fgx6t8bo","agedge");
try {
- Agedge_s e;
+ ST_Agedge_s e;
int id[] = new int[1];
int have_id;
have_id = agmapnametoid(g, AGEDGE, name, id, false);
@@ -766,11 +762,11 @@ throw new UnsupportedOperationException();
//3 30v8z3tlda81fbqbkzx6m9fkn
// Agedge_t *agsubedge(Agraph_t * g, Agedge_t * e, int cflag)
-public static Agedge_s agsubedge(Agraph_s g, Agedge_s e, boolean cflag) {
+public static ST_Agedge_s agsubedge(ST_Agraph_s g, ST_Agedge_s e, boolean cflag) {
ENTERING("30v8z3tlda81fbqbkzx6m9fkn","agsubedge");
try {
- Agnode_s t, h;
- Agedge_s rv;
+ ST_Agnode_s t, h;
+ ST_Agedge_s rv;
rv = null;
t = agsubnode(g, AGTAIL(e), cflag);
h = agsubnode(g, AGHEAD(e), cflag);
@@ -794,14 +790,14 @@ LEAVING("30v8z3tlda81fbqbkzx6m9fkn","agsubedge");
//3 avk47eh26r45qk2dtoipwiqvz
// int agedgeidcmpf(Dict_t * d, void *arg_e0, void *arg_e1, Dtdisc_t * disc)
-public static int agedgeidcmpf(_dt_s d, __ptr__ arg_e0, __ptr__ arg_e1, _dtdisc_s disc) {
+public static int agedgeidcmpf(ST_dt_s d, ST_Agedge_s arg_e0, ST_Agedge_s arg_e1, ST_dtdisc_s disc) {
ENTERING("avk47eh26r45qk2dtoipwiqvz","agedgeidcmpf");
try {
int v;
- Agedge_s e0, e1;
- e0 = (Agedge_s) arg_e0;
- e1 = (Agedge_s) arg_e1;
- v = AGID(e0.getPtr("node")) - AGID(e1.getPtr("node"));
+ ST_Agedge_s e0, e1;
+ e0 = (ST_Agedge_s) arg_e0;
+ e1 = (ST_Agedge_s) arg_e1;
+ v = AGID(e0.node) - AGID(e1.node);
if (v == 0) { /* same node */
if ((AGTYPE(e0) == 0) || (AGTYPE(e1) == 0))
v = 0;
@@ -819,14 +815,14 @@ LEAVING("avk47eh26r45qk2dtoipwiqvz","agedgeidcmpf");
//3 b6jhzc16xvrknu4e7jp6zx0ue
// int agedgeseqcmpf(Dict_t * d, void *arg_e0, void *arg_e1, Dtdisc_t * disc)
-public static int agedgeseqcmpf(_dt_s d, __ptr__ arg_e0, __ptr__ arg_e1, _dtdisc_s disc) {
+public static int agedgeseqcmpf(ST_dt_s d, ST_Agedge_s arg_e0, ST_Agedge_s arg_e1, ST_dtdisc_s disc) {
ENTERING("b6jhzc16xvrknu4e7jp6zx0ue","agedgeseqcmpf");
try {
int v;
- Agedge_s e0, e1;
- e0 = (Agedge_s) arg_e0;
- e1 = (Agedge_s) arg_e1;
- if (NEQ(e0.getPtr("node"), e1.getPtr("node"))) v = AGSEQ(e0.getPtr("node")) - AGSEQ(e1.getPtr("node"));
+ ST_Agedge_s e0, e1;
+ e0 = (ST_Agedge_s) arg_e0;
+ e1 = (ST_Agedge_s) arg_e1;
+ if (NEQ(e0.node, e1.node)) v = AGSEQ(e0.node) - AGSEQ(e1.node);
else v = (AGSEQ(e0) - AGSEQ(e1));
return ((v==0)?0:(v<0?-1:1));
} finally {
@@ -900,7 +896,7 @@ static {
//3 ceexs6t1q4jxwz6h0g8fszxp4
// Agnode_t *agtail(Agedge_t * e)
-public static Agnode_s agtail(Agedge_s e) {
+public static ST_Agnode_s agtail(ST_Agedge_s e) {
ENTERING("ceexs6t1q4jxwz6h0g8fszxp4","agtail");
try {
return AGTAIL(e);
@@ -914,10 +910,10 @@ LEAVING("ceexs6t1q4jxwz6h0g8fszxp4","agtail");
//3 3tj9gj3dvrpox6grrdd3rftd8
// Agnode_t *aghead(Agedge_t * e)
-public static Agnode_s aghead(__ptr__ e) {
+public static ST_Agnode_s aghead(__ptr__ e) {
ENTERING("3tj9gj3dvrpox6grrdd3rftd8","aghead");
try {
- return AGHEAD((Agedge_s) e);
+ return AGHEAD((ST_Agedge_s) e);
} finally {
LEAVING("3tj9gj3dvrpox6grrdd3rftd8","aghead");
}
@@ -928,10 +924,10 @@ LEAVING("3tj9gj3dvrpox6grrdd3rftd8","aghead");
//3 15e6s5bh5hey2u79yoebir59w
// Agedge_t *agopp(Agedge_t * e)
-public static Agedge_s agopp(__ptr__ e) {
+public static ST_Agedge_s agopp(__ptr__ e) {
ENTERING("15e6s5bh5hey2u79yoebir59w","agopp");
try {
- return AGOPP((Agedge_s) e);
+ return AGOPP((ST_Agedge_s) e);
} finally {
LEAVING("15e6s5bh5hey2u79yoebir59w","agopp");
}
diff --git a/src/gen/lib/cgraph/graph__c.java b/src/gen/lib/cgraph/graph__c.java
index 64a36c3..b984e18 100644
--- a/src/gen/lib/cgraph/graph__c.java
+++ b/src/gen/lib/cgraph/graph__c.java
@@ -69,23 +69,21 @@ import static smetana.core.Macro.ASINT;
import static smetana.core.Macro.N;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agclos_s;
-import h.Agdesc_s;
-import h.Agdisc_s;
-import h.Agmemdisc_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsubnode_s;
+import h.ST_Agclos_s;
import h.ST_Agdesc_s;
-import h._dt_s;
-import h._dtdisc_s;
-import h._dtlink_s;
+import h.ST_Agdisc_s;
+import h.ST_Agmemdisc_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Agsubnode_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import h.ST_dtlink_s;
import smetana.core.ACCESS;
import smetana.core.CString;
import smetana.core.STARSTAR;
import smetana.core.Z;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class graph__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -228,22 +226,22 @@ public class graph__c {
//3 bb2bu9iyqx0u6xx44l282vmch
// static Agclos_t *agclos(Agdisc_t * proto)
-public static Agclos_s agclos(Agdisc_s proto) {
+public static ST_Agclos_s agclos(ST_Agdisc_s proto) {
ENTERING("bb2bu9iyqx0u6xx44l282vmch","agclos");
try {
- Agmemdisc_s memdisc;
+ ST_Agmemdisc_s memdisc;
__ptr__ memclosure;
- Agclos_s rv;
+ ST_Agclos_s rv;
/* establish an allocation arena */
- memdisc = (Agmemdisc_s) ((proto != null && proto.getPtr("mem") != null) ? proto.getPtr("mem") : Z.z().AgMemDisc.amp());
- memclosure = (__ptr__) memdisc.call("open", proto);
- rv = (Agclos_s) memdisc.call("alloc", memclosure, sizeof(Agclos_s.class));
- rv.getStruct("disc").setPtr("mem", memdisc);
- rv.getStruct("state").setPtr("mem", memclosure);
- rv.getStruct("disc").setPtr("id", ((proto != null && proto.getPtr("id") != null) ? proto.getPtr("id") : Z.z().AgIdDisc.amp()));
+ memdisc = (ST_Agmemdisc_s) ((proto != null && proto.mem != null) ? proto.mem : Z.z().AgMemDisc);
+ memclosure = (__ptr__) memdisc.open.exe(proto);
+ rv = (ST_Agclos_s) memdisc.alloc.exe(memclosure, sizeof(ST_Agclos_s.class));
+ rv.disc.setPtr("mem", memdisc);
+ rv.state.setPtr("mem", memclosure);
+ rv.disc.setPtr("id", ((proto != null && proto.id != null) ? proto.id : Z.z().AgIdDisc));
// Translation bug in next line: should be AgIoDisc and not AgIdDisc
- // rv.getStruct("disc").setPtr("io", ((proto != null && proto.getPtr("io") != null) ? proto.getPtr("io") : Z.z().AgIdDisc.amp()));
- rv.setBoolean("callbacks_enabled", (N(0)));
+ // rv.disc.setPtr("io", ((proto != null && proto.getPtr("io") != null) ? proto.getPtr("io") : Z.z().AgIoDisc));
+ rv.callbacks_enabled = (N(0));
return rv;
} finally {
LEAVING("bb2bu9iyqx0u6xx44l282vmch","agclos");
@@ -255,24 +253,24 @@ LEAVING("bb2bu9iyqx0u6xx44l282vmch","agclos");
//3 d5yqn56yii8cdoahswt4n6bug
// Agraph_t *agopen(char *name, Agdesc_t desc, Agdisc_t * arg_disc)
-public static Agraph_s agopen(CString name, final __struct__<Agdesc_s> desc, Agdisc_s arg_disc) {
+public static ST_Agraph_s agopen(CString name, final ST_Agdesc_s desc, ST_Agdisc_s arg_disc) {
// WARNING!! STRUCT
-return agopen_w_(name, desc.copy(), arg_disc);
+return agopen_w_(name, (ST_Agdesc_s) desc.copy(), arg_disc);
}
-private static Agraph_s agopen_w_(CString name, final __struct__<Agdesc_s> desc, Agdisc_s arg_disc) {
+private static ST_Agraph_s agopen_w_(CString name, final ST_Agdesc_s desc, ST_Agdisc_s arg_disc) {
ENTERING("d5yqn56yii8cdoahswt4n6bug","agopen");
try {
- Agraph_s g;
- Agclos_s clos;
+ ST_Agraph_s g;
+ ST_Agclos_s clos;
int gid[] = new int[1];
clos = agclos(arg_disc);
- g = (Agraph_s) clos.getStruct("disc").getPtr("mem").call("alloc", clos.getStruct("state").getPtr("mem"), sizeof(Agraph_s.class));
+ g = (ST_Agraph_s) clos.disc.mem.alloc.exe(clos.state.mem, sizeof(ST_Agraph_s.class));
AGTYPE(g, AGRAPH);
g.setPtr("clos", clos);
g.setStruct("desc", desc);
- ((ST_Agdesc_s)g.getStruct("desc")).maingraph = ASINT((N(0)));
+ ((ST_Agdesc_s)g.desc).maingraph = ASINT((N(0)));
g.setPtr("root", g);
- g.getPtr("clos").getStruct("state").setPtr("id", (__ptr__) g.getPtr("clos").getStruct("disc").getPtr("id").call("open", g, arg_disc));
+ g.clos.state.setPtr("id", (__ptr__) g.clos.disc.id.open.exe(g, arg_disc));
if (agmapnametoid(g, AGRAPH, name, gid, (N(0)))!=0)
AGID(g, gid[0]);
// /* else AGID(g) = 0 because we have no alternatives */
@@ -289,21 +287,21 @@ LEAVING("d5yqn56yii8cdoahswt4n6bug","agopen");
//3 8jyhwfdfm0a877qfz8cjlb8rk
// Agraph_t *agopen1(Agraph_t * g)
-public static Agraph_s agopen1(Agraph_s g) {
+public static ST_Agraph_s agopen1(ST_Agraph_s g) {
ENTERING("8jyhwfdfm0a877qfz8cjlb8rk","agopen1");
try {
- Agraph_s par;
- g.setPtr("n_seq", agdtopen(g, Z.z().Ag_subnode_seq_disc.amp(), Z.z().Dttree));
- g.setPtr("n_id", agdtopen(g, Z.z().Ag_subnode_id_disc.amp(), Z.z().Dttree));
- g.setPtr("e_seq", agdtopen(g, EQ(g, agroot(g))? Z.z().Ag_mainedge_seq_disc.amp() : Z.z().Ag_subedge_seq_disc.amp(), Z.z().Dttree));
- g.setPtr("e_id", agdtopen(g, EQ(g, agroot(g))? Z.z().Ag_mainedge_id_disc.amp() : Z.z().Ag_subedge_id_disc.amp(), Z.z().Dttree));
- g.setPtr("g_dict", agdtopen(g, Z.z().Ag_subgraph_id_disc.amp(), Z.z().Dttree));
+ ST_Agraph_s par;
+ g.setPtr("n_seq", agdtopen(g, Z.z().Ag_subnode_seq_disc, Z.z().Dttree));
+ g.setPtr("n_id", agdtopen(g, Z.z().Ag_subnode_id_disc, Z.z().Dttree));
+ g.setPtr("e_seq", agdtopen(g, EQ(g, agroot(g))? Z.z().Ag_mainedge_seq_disc : Z.z().Ag_subedge_seq_disc, Z.z().Dttree));
+ g.setPtr("e_id", agdtopen(g, EQ(g, agroot(g))? Z.z().Ag_mainedge_id_disc : Z.z().Ag_subedge_id_disc, Z.z().Dttree));
+ g.setPtr("g_dict", agdtopen(g, Z.z().Ag_subgraph_id_disc, Z.z().Dttree));
par = agparent(g);
if (par!=null) {
AGSEQ(g, agnextseq(par, AGRAPH));
- par.getPtr("g_dict").call("searchf", par.getPtr("g_dict"),g,0000001);
+ par.g_dict.searchf.exe(par.g_dict,g,0000001);
} /* else AGSEQ=0 */
- if (N(par) || ((ST_Agdesc_s)par.getStruct("desc")).has_attrs!=0)
+ if (N(par) || ((ST_Agdesc_s)par.desc).has_attrs!=0)
agraphattr_init(g);
agmethod_init(g, g);
return g;
@@ -381,12 +379,12 @@ throw new UnsupportedOperationException();
//3 axmdmml95l55vlp1vqmh0v5sn
// unsigned long agnextseq(Agraph_t * g, int objtype)
-public static int agnextseq(Agraph_s g, int objtype) {
+public static int agnextseq(ST_Agraph_s g, int objtype) {
ENTERING("axmdmml95l55vlp1vqmh0v5sn","agnextseq");
try {
- int tmp = g.getPtr("clos").getArrayOfInteger("seq").plus(objtype).getInt();
+ int tmp = g.clos.seq[objtype];
tmp++;
- g.getPtr("clos").getArrayOfInteger("seq").plus(objtype).setInt(tmp);
+ g.clos.seq[objtype]=tmp;
return tmp;
} finally {
LEAVING("axmdmml95l55vlp1vqmh0v5sn","agnextseq");
@@ -398,10 +396,10 @@ LEAVING("axmdmml95l55vlp1vqmh0v5sn","agnextseq");
//3 688euygrkbl10cveflgwalo2n
// int agnnodes(Agraph_t * g)
-public static int agnnodes(Agraph_s g) {
+public static int agnnodes(ST_Agraph_s g) {
ENTERING("688euygrkbl10cveflgwalo2n","agnnodes");
try {
- return dtsize_((_dt_s)g.getPtr("n_id"));
+ return dtsize_((ST_dt_s)g.n_id);
} finally {
LEAVING("688euygrkbl10cveflgwalo2n","agnnodes");
}
@@ -412,10 +410,10 @@ LEAVING("688euygrkbl10cveflgwalo2n","agnnodes");
//3 8zjne7uv8rfpmbv5t96zhnr4u
// int agnedges(Agraph_t * g)
-public static int agnedges(Agraph_s g) {
+public static int agnedges(ST_Agraph_s g) {
ENTERING("8zjne7uv8rfpmbv5t96zhnr4u","agnedges");
try {
- Agnode_s n;
+ ST_Agnode_s n;
int rv = 0;
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n))
rv += agdegree(g, n, (false), (N(0))); /* must use OUT to get self-arcs */
@@ -444,10 +442,10 @@ throw new UnsupportedOperationException();
//3 blvn1w3v0icnucu5m5xvbrba1
// int agisdirected(Agraph_t * g)
-public static boolean agisdirected(Agraph_s g) {
+public static boolean agisdirected(ST_Agraph_s g) {
ENTERING("blvn1w3v0icnucu5m5xvbrba1","agisdirected");
try {
- return ((ST_Agdesc_s)g.getStruct("desc")).directed!=0;
+ return ((ST_Agdesc_s)g.desc).directed!=0;
} finally {
LEAVING("blvn1w3v0icnucu5m5xvbrba1","agisdirected");
}
@@ -458,7 +456,7 @@ LEAVING("blvn1w3v0icnucu5m5xvbrba1","agisdirected");
//3 8thgds4eioot64flko26m8ns0
// int agisundirected(Agraph_t * g)
-public static boolean agisundirected(Agraph_s g) {
+public static boolean agisundirected(ST_Agraph_s g) {
ENTERING("8thgds4eioot64flko26m8ns0","agisundirected");
try {
return (NOT(agisdirected(g)));
@@ -472,10 +470,10 @@ LEAVING("8thgds4eioot64flko26m8ns0","agisundirected");
//3 9qgdebmdfrcfjm394bg59a7y5
// int agisstrict(Agraph_t * g)
-public static boolean agisstrict(Agraph_s g) {
+public static boolean agisstrict(ST_Agraph_s g) {
ENTERING("9qgdebmdfrcfjm394bg59a7y5","agisstrict");
try {
- return ((ST_Agdesc_s)g.getStruct("desc")).strict!=0;
+ return ((ST_Agdesc_s)g.desc).strict!=0;
} finally {
LEAVING("9qgdebmdfrcfjm394bg59a7y5","agisstrict");
}
@@ -500,7 +498,7 @@ throw new UnsupportedOperationException();
//3 abaldeo2ie6zi60cazxp7rv47
// static int cnt(Dict_t * d, Dtlink_t ** set)
-public static int cnt(_dt_s d, STARSTAR<_dtlink_s> set) {
+public static int cnt(ST_dt_s d, STARSTAR<ST_dtlink_s> set) {
ENTERING("abaldeo2ie6zi60cazxp7rv47","cnt");
try {
int rv;
@@ -544,29 +542,29 @@ throw new UnsupportedOperationException();
//3 2bz40qf0qo7pd6er1ut25gthp
// int agdegree(Agraph_t * g, Agnode_t * n, int want_in, int want_out)
-public static int agdegree(Agraph_s g, Agnode_s n, boolean want_in, boolean want_out) {
+public static int agdegree(ST_Agraph_s g, ST_Agnode_s n, boolean want_in, boolean want_out) {
ENTERING("2bz40qf0qo7pd6er1ut25gthp","agdegree");
try {
- Agsubnode_s sn;
+ ST_Agsubnode_s sn;
int rv = 0;
sn = agsubrep(g, n);
- final Agsubnode_s sn1 = sn;
+ final ST_Agsubnode_s sn1 = sn;
if (sn!=null) {
- if (want_out) rv += cnt((_dt_s)g.getPtr("e_seq"),
- STARSTAR.amp(new ACCESS<_dtlink_s>() {
- public _dtlink_s get() {
- return (_dtlink_s) sn1.getPtr("out_seq");
+ if (want_out) rv += cnt((ST_dt_s)g.e_seq,
+ STARSTAR.amp(new ACCESS<ST_dtlink_s>() {
+ public ST_dtlink_s get() {
+ return (ST_dtlink_s) sn1.out_seq;
}
- public void set(_dtlink_s obj) {
+ public void set(ST_dtlink_s obj) {
sn1.setPtr("out_seq", obj);
}})
);
- if (want_in) rv += cnt((_dt_s)g.getPtr("e_seq"),
- STARSTAR.amp(new ACCESS<_dtlink_s>() {
- public _dtlink_s get() {
- return (_dtlink_s) sn1.getPtr("in_seq");
+ if (want_in) rv += cnt((ST_dt_s)g.e_seq,
+ STARSTAR.amp(new ACCESS<ST_dtlink_s>() {
+ public ST_dtlink_s get() {
+ return (ST_dtlink_s) sn1.in_seq;
}
- public void set(_dtlink_s obj) {
+ public void set(ST_dtlink_s obj) {
sn1.setPtr("in_seq", obj);
}})
);
@@ -582,13 +580,13 @@ LEAVING("2bz40qf0qo7pd6er1ut25gthp","agdegree");
//3 dhbtfzzp8n5yygqmhmluo9bxl
// int agraphidcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc)
-public static int agraphidcmpf(_dt_s d, __ptr__ arg0, __ptr__ arg1, _dtdisc_s disc) {
+public static int agraphidcmpf(ST_dt_s d, ST_Agraph_s arg0, ST_Agraph_s arg1, ST_dtdisc_s disc) {
ENTERING("dhbtfzzp8n5yygqmhmluo9bxl","agraphidcmpf");
try {
int v;
- Agraph_s sg0, sg1;
- sg0 = (Agraph_s) arg0;
- sg1 = (Agraph_s) arg1;
+ ST_Agraph_s sg0, sg1;
+ sg0 = (ST_Agraph_s) arg0;
+ sg1 = (ST_Agraph_s) arg1;
v = (AGID(sg0) - AGID(sg1));
return ((v==0)?0:(v<0?-1:1));
} finally {
diff --git a/src/gen/lib/cgraph/id__c.java b/src/gen/lib/cgraph/id__c.java
index 90b0493..ec591af 100644
--- a/src/gen/lib/cgraph/id__c.java
+++ b/src/gen/lib/cgraph/id__c.java
@@ -58,9 +58,9 @@ import static smetana.core.Macro.AGTYPE;
import static smetana.core.Macro.ASINT;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agdisc_s;
-import h.Agobj_s;
-import h.Agraph_s;
+import h.ST_Agdisc_s;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
import smetana.core.CString;
import smetana.core.Memory;
import smetana.core.Z;
@@ -203,7 +203,7 @@ public class id__c {
//3 a0a2zxsu8n019hzm1rwf1jc7f
// static void *idopen(Agraph_t * g, Agdisc_t* disc)
-public static Object idopen(Agraph_s g, Agdisc_s disc) {
+public static Object idopen(ST_Agraph_s g, ST_Agdisc_s disc) {
ENTERING("a0a2zxsu8n019hzm1rwf1jc7f","idopen");
try {
return g;
@@ -223,8 +223,8 @@ ENTERING("lsl0c1gejls1wv04ga6xy2cf","idmap");
try {
CString s;
if (str!=null) {
- Agraph_s g;
- g = (Agraph_s) state;
+ ST_Agraph_s g;
+ g = (ST_Agraph_s) state;
if (createflag)
s = agstrdup(g, str);
else
@@ -336,12 +336,12 @@ static {
//3 aq30wwcj4ugatsgx0zdtdmeed
// int agmapnametoid(Agraph_t * g, int objtype, char *str, unsigned long *result, int createflag)
-public static int agmapnametoid(Agraph_s g, int objtype, CString str, int result[], boolean createflag) {
+public static int agmapnametoid(ST_Agraph_s g, int objtype, CString str, int result[], boolean createflag) {
ENTERING("aq30wwcj4ugatsgx0zdtdmeed","agmapnametoid");
try {
int rv;
if (str!=null && (str.charAt(0) != '%')) {
- rv = (Integer) g.getPtr("clos").getStruct("disc").getPtr("id").call("map", g.getPtr("clos").getStruct("state").getPtr("id"), objtype, str, result, createflag);
+ rv = (Integer) g.clos.disc.id.map.exe(g.clos.state.id, objtype, str, result, createflag);
if (rv!=0)
return rv;
}
@@ -354,7 +354,7 @@ try {
rv = 0;
if (createflag) {
/* get a new anonymous ID, and store in the internal map */
- rv = (Integer) g.getPtr("clos").getStruct("disc").getPtr("id").call("map", g.getPtr("clos").getStruct("state").getPtr("id"), objtype, null, result,
+ rv = (Integer) g.clos.disc.id.map.exe(g.clos.state.id, objtype, null, result,
createflag);
if (rv!=0 && str!=null)
aginternalmapinsert(g, objtype, str, result[0]);
@@ -403,21 +403,21 @@ throw new UnsupportedOperationException();
public static CString agnameof(__ptr__ obj) {
ENTERING("cctsybrl54fy799aynfej4iiy","agnameof");
try {
- Agraph_s g;
+ ST_Agraph_s g;
CString rv;
/* perform internal lookup first */
g = agraphof(obj);
if ((rv = aginternalmapprint(g, AGTYPE(obj), AGID(obj)))!=null)
return rv;
- if (g.getPtr("clos").getStruct("disc").getPtr("id").getPtr("print")!=null) {
+ if (g.clos.disc.id.print!=null) {
if ((rv =
- (CString) g.getPtr("clos").getStruct("disc").getPtr("id").call("print", g.getPtr("clos").getStruct("state").getPtr("id"),
+ (CString) g.clos.disc.id.print.exe(g.clos.state.id,
AGTYPE(obj),
AGID(obj)))!=null)
return rv;
}
if (AGTYPE(obj) != AGEDGE) {
- rv = new CString("%"+obj.castTo(Agobj_s.class).getStruct("tag").getInt("id"));
+ rv = new CString("%"+((ST_Agobj_s)obj.castTo(ST_Agobj_s.class)).tag.id);
}
else
rv = null;
@@ -432,10 +432,10 @@ LEAVING("cctsybrl54fy799aynfej4iiy","agnameof");
//3 emt63ldde99jnwe2vvjal9kt9
// void agregister(Agraph_t * g, int objtype, void *obj)
-public static void agregister(Agraph_s g, int objtype, Object obj) {
+public static void agregister(ST_Agraph_s g, int objtype, Object obj) {
ENTERING("emt63ldde99jnwe2vvjal9kt9","agregister");
try {
- g.getPtr("clos").getStruct("disc").getPtr("id").call("idregister", g.getPtr("clos").getStruct("state").getPtr("id"), objtype, obj);
+ g.clos.disc.id.idregister.exe(g.clos.state.id, objtype, obj);
} finally {
LEAVING("emt63ldde99jnwe2vvjal9kt9","agregister");
}
diff --git a/src/gen/lib/cgraph/imap__c.java b/src/gen/lib/cgraph/imap__c.java
index eb8ed83..9ca615b 100644
--- a/src/gen/lib/cgraph/imap__c.java
+++ b/src/gen/lib/cgraph/imap__c.java
@@ -49,11 +49,10 @@ import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGEDGE;
import static smetana.core.Macro.AGINEDGE;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h.IMapEntry_t;
-import h._dt_s;
+import h.ST_Agraph_s;
+import h.ST_IMapEntry_t;
+import h.ST_dt_s;
import smetana.core.CString;
-import smetana.core.Memory;
public class imap__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -239,7 +238,7 @@ throw new UnsupportedOperationException();
//3 mx2krtbgfhcihopw9rw8kcv3
// int aginternalmaplookup(Agraph_t * g, int objtype, char *str, unsigned long *result)
-public static int aginternalmaplookup(Agraph_s g, int objtype, CString str, int result[]) {
+public static int aginternalmaplookup(ST_Agraph_s g, int objtype, CString str, int result[]) {
ENTERING("mx2krtbgfhcihopw9rw8kcv3","aginternalmaplookup");
try {
UNSUPPORTED("9xuzgjxqveawe6v2n4x48r93l"); // int aginternalmaplookup(Agraph_t * g, int objtype, char *str,
@@ -303,16 +302,16 @@ throw new UnsupportedOperationException();
//3 3r16pkjiksv8i7o961ltxyge6
// static IMapEntry_t *find_isym(Agraph_t * g, int objtype, unsigned long id)
-public static IMapEntry_t find_isym(Agraph_s g, int objtype, int id) {
+public static ST_IMapEntry_t find_isym(ST_Agraph_s g, int objtype, int id) {
ENTERING("3r16pkjiksv8i7o961ltxyge6","find_isym");
try {
- _dt_s d;
- IMapEntry_t isym, itemplate = (IMapEntry_t) Memory.malloc(IMapEntry_t.class);
+ ST_dt_s d;
+ ST_IMapEntry_t isym, itemplate = new ST_IMapEntry_t();
if (objtype == AGINEDGE)
objtype = AGEDGE;
- if ((d = (_dt_s) g.getPtr("clos").getArrayOfPtr("lookup_by_id").plus(objtype).getPtr())!=null) {
+ if ((d = g.clos.lookup_by_id[objtype])!=null) {
itemplate.setInt("id", id);
- isym = (IMapEntry_t) UNSUPPORTED("(IMapEntry_t *) (*(((Dt_t*)(d))->searchf))((d),(void*)(&itemplate),0000004)");
+ isym = (ST_IMapEntry_t) UNSUPPORTED("(IMapEntry_t *) (*(((Dt_t*)(d))->searchf))((d),(void*)(&itemplate),0000004)");
} else
isym = null;
return isym;
@@ -326,12 +325,12 @@ LEAVING("3r16pkjiksv8i7o961ltxyge6","find_isym");
//3 foe6bvtujfevsc0f3m8aqln8
// char *aginternalmapprint(Agraph_t * g, int objtype, unsigned long id)
-public static CString aginternalmapprint(Agraph_s g, int objtype, int id) {
+public static CString aginternalmapprint(ST_Agraph_s g, int objtype, int id) {
ENTERING("foe6bvtujfevsc0f3m8aqln8","aginternalmapprint");
try {
- IMapEntry_t isym;
+ ST_IMapEntry_t isym;
if ((isym = find_isym(g, objtype, id))!=null)
- return isym.getCString("str");
+ return isym.str;
return null;
} finally {
LEAVING("foe6bvtujfevsc0f3m8aqln8","aginternalmapprint");
diff --git a/src/gen/lib/cgraph/mem__c.java b/src/gen/lib/cgraph/mem__c.java
index 7de15ad..fd2cac1 100644
--- a/src/gen/lib/cgraph/mem__c.java
+++ b/src/gen/lib/cgraph/mem__c.java
@@ -47,8 +47,8 @@ package gen.lib.cgraph;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agdisc_s;
-import h.Agraph_s;
+import h.ST_Agdisc_s;
+import h.ST_Agraph_s;
import smetana.core.__ptr__;
import smetana.core.size_t;
@@ -189,7 +189,7 @@ public class mem__c {
//3 akq0jgwdspf75ypeatgcnfn8w
// static void *memopen(Agdisc_t* disc)
-public static Object memopen(Agdisc_s disc) {
+public static Object memopen(ST_Agdisc_s disc) {
ENTERING("akq0jgwdspf75ypeatgcnfn8w","memopen");
try {
return null;
@@ -219,19 +219,26 @@ LEAVING("9mtjrx0vjzwuecjwpxylr9tag","memalloc");
//3 18v2hhjculhnb3b7fc4tx3yjw
// static void *memresize(void *heap, void *ptr, size_t oldsize, size_t request)
-public static Object memresize(Object... arg) {
-UNSUPPORTED("1s6udii0nias7f8g4vimpkefh"); // static void *memresize(void *heap, void *ptr, size_t oldsize,
-UNSUPPORTED("8zs6530gai5ogf503wd0333qh"); // size_t request)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("5ccnu5m92hidffpixzo964tna"); // void *rv;
-UNSUPPORTED("74rq74mh7lnfr9i3qmwsbx2hd"); // (void) heap;
-UNSUPPORTED("ebomd3babnm180zhyrfeg59wi"); // rv = realloc(ptr, request);
-UNSUPPORTED("bzgpl0js1bzsovafg9g24v4ya"); // if (request > oldsize)
-UNSUPPORTED("9cjvc6kya9bwic7bue6mcj8yf"); // memset((char *) rv + oldsize, 0, request - oldsize);
-UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static __ptr__ memresize(__ptr__ heap, __ptr__ ptr, size_t oldsize, size_t request) {
+ENTERING("18v2hhjculhnb3b7fc4tx3yjw","memresize");
+try {
+ request.realloc(ptr);
+ return ptr;
+} finally {
+LEAVING("18v2hhjculhnb3b7fc4tx3yjw","memresize");
+}
+//UNSUPPORTED("1s6udii0nias7f8g4vimpkefh"); // static void *memresize(void *heap, void *ptr, size_t oldsize,
+//UNSUPPORTED("8zs6530gai5ogf503wd0333qh"); // size_t request)
+//UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
+//UNSUPPORTED("5ccnu5m92hidffpixzo964tna"); // void *rv;
+//UNSUPPORTED("74rq74mh7lnfr9i3qmwsbx2hd"); // (void) heap;
+//UNSUPPORTED("ebomd3babnm180zhyrfeg59wi"); // rv = realloc(ptr, request);
+//UNSUPPORTED("bzgpl0js1bzsovafg9g24v4ya"); // if (request > oldsize)
+//UNSUPPORTED("9cjvc6kya9bwic7bue6mcj8yf"); // memset((char *) rv + oldsize, 0, request - oldsize);
+//UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); // return rv;
+//UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+//
+//throw new UnsupportedOperationException();
}
@@ -265,11 +272,11 @@ static {
//3 7newv1hmzvt4vtttc9cxdxfpn
// void *agalloc(Agraph_t * g, size_t size)
-public static __ptr__ agalloc(Agraph_s g, size_t size) {
+public static __ptr__ agalloc(ST_Agraph_s g, size_t size) {
ENTERING("7newv1hmzvt4vtttc9cxdxfpn","agalloc");
try {
__ptr__ mem;
- mem = (__ptr__) g.getPtr("clos").getStruct("disc").getPtr("mem").call("alloc", g.getPtr("clos").getStruct("state").getPtr("mem"), size);
+ mem = (__ptr__) g.clos.disc.mem.alloc.exe(g.clos.state.mem, size);
if (mem == null)
System.err.println("memory allocation failure");
return mem;
diff --git a/src/gen/lib/cgraph/node__c.java b/src/gen/lib/cgraph/node__c.java
index 67bf6d0..25c5860 100644
--- a/src/gen/lib/cgraph/node__c.java
+++ b/src/gen/lib/cgraph/node__c.java
@@ -68,14 +68,14 @@ import static smetana.core.Macro.AGSEQ;
import static smetana.core.Macro.AGTYPE;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agattr_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsubnode_s;
+import h.ST_Agattr_s;
import h.ST_Agdesc_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Agsubnode_s;
import h.ST_Agtag_s;
-import h._dt_s;
-import h._dtdisc_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
import smetana.core.CString;
import smetana.core.Z;
import smetana.core.__ptr__;
@@ -215,18 +215,18 @@ public class node__c {
-//3 4w89du6uel405pm3vxsr3ayxt
-// Agnode_t *agfindnode_by_id(Agraph_t * g, unsigned long id)
//private static __struct__<Agsubnode_s> template = JUtils.from(Agsubnode_s.class);
//private static __struct__<Agnode_s> dummy = JUtils.from(Agnode_s.class);
-public static Agnode_s agfindnode_by_id(Agraph_s g, int id) {
+//3 4w89du6uel405pm3vxsr3ayxt
+// Agnode_t *agfindnode_by_id(Agraph_t * g, unsigned long id)
+public static ST_Agnode_s agfindnode_by_id(ST_Agraph_s g, int id) {
ENTERING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id");
try {
- Agsubnode_s sn;
- ((ST_Agtag_s)Z.z().dummy.getStruct("base").getStruct("tag")).id = id;
- Z.z().template.setPtr("node", Z.z().dummy.amp());
- sn = (Agsubnode_s) (g.getPtr("n_id").call("searchf", g.getPtr("n_id"), Z.z().template.amp(),0000004));
- return (Agnode_s) (sn!=null ? sn.getPtr("node") : null);
+ ST_Agsubnode_s sn;
+ ((ST_Agtag_s)Z.z().dummy.base.tag).id = id;
+ Z.z().template.node = Z.z().dummy;
+ sn = (ST_Agsubnode_s) (g.n_id.searchf.exe(g.n_id, Z.z().template,0000004));
+ return (ST_Agnode_s) (sn!=null ? sn.node : null);
} finally {
LEAVING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id");
}
@@ -255,12 +255,12 @@ throw new UnsupportedOperationException();
//3 55wopi2gd93zpmycxoywlxm0y
// Agnode_t *agfstnode(Agraph_t * g)
-public static Agnode_s agfstnode(Agraph_s g) {
+public static ST_Agnode_s agfstnode(ST_Agraph_s g) {
ENTERING("55wopi2gd93zpmycxoywlxm0y","agfstnode");
try {
- Agsubnode_s sn;
- sn = (Agsubnode_s) g.getPtr("n_seq").castTo(_dt_s.class).call("searchf", g.getPtr("n_seq"),null,0000200);
- return sn!=null ? (Agnode_s) sn.getPtr("node") : null;
+ ST_Agsubnode_s sn;
+ sn = (ST_Agsubnode_s) g.n_seq.searchf.exe(g.n_seq,null,0000200);
+ return sn!=null ? (ST_Agnode_s) sn.node : null;
} finally {
LEAVING("55wopi2gd93zpmycxoywlxm0y","agfstnode");
}
@@ -272,7 +272,7 @@ LEAVING("55wopi2gd93zpmycxoywlxm0y","agfstnode");
//3 bek79ccvjys1j9q404i3y6oh8
// Agnode_t *agnxtnode(Agraph_t * g, Agnode_t * n)
public static int NB = 0;
-public static Agnode_s agnxtnode(Agraph_s g, Agnode_s n) {
+public static ST_Agnode_s agnxtnode(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("bek79ccvjys1j9q404i3y6oh8","agnxtnode");
try {
//ZOOTO
@@ -281,14 +281,14 @@ try {
}
NB++;
LOG2("NB="+NB);
- Agsubnode_s sn;
+ ST_Agsubnode_s sn;
sn = agsubrep(g, n);
LOG2("sn1="+sn);
- if (sn!=null) sn = (Agsubnode_s) g.getPtr("n_seq").castTo(_dt_s.class).call("searchf", g.getPtr("n_seq"),sn,0000010);
+ if (sn!=null) sn = (ST_Agsubnode_s) g.n_seq.searchf.exe(g.n_seq,sn,0000010);
LOG2("sn2="+sn);
- final __ptr__ result = sn!=null ? sn.getPtr("node") : null;
+ final __ptr__ result = sn!=null ? sn.node : null;
LOG2("result="+result);
- return (Agnode_s) result;
+ return (ST_Agnode_s) result;
} finally {
LEAVING("bek79ccvjys1j9q404i3y6oh8","agnxtnode");
}
@@ -332,17 +332,17 @@ throw new UnsupportedOperationException();
//3 dzb7m0p5xsngvtyr8zs912og4
// static Agnode_t *newnode(Agraph_t * g, unsigned long id, unsigned long seq)
-public static Agnode_s newnode(Agraph_s g, int id, int seq) {
+public static ST_Agnode_s newnode(ST_Agraph_s g, int id, int seq) {
ENTERING("dzb7m0p5xsngvtyr8zs912og4","newnode");
try {
- Agnode_s n;
- n = (Agnode_s) ((__ptr__)agalloc(g, sizeof(Agnode_s.class))).castTo(Agnode_s.class);
+ ST_Agnode_s n;
+ n = (ST_Agnode_s) ((__ptr__)agalloc(g, sizeof(ST_Agnode_s.class))).castTo(ST_Agnode_s.class);
AGTYPE(n, AGNODE);
AGID(n, id);
AGSEQ(n, seq);
n.setPtr("root", agroot(g));
- if (((ST_Agdesc_s)agroot(g).getStruct("desc")).has_attrs!=0)
- agbindrec(n, AgDataRecName, sizeof(Agattr_s.class), false);
+ if (((ST_Agdesc_s)agroot(g).desc).has_attrs!=0)
+ agbindrec(n, AgDataRecName, sizeof(ST_Agattr_s.class), false);
/* nodeattr_init and method_init will be called later, from the
* subgraph where the node was actually created, but first it has
* to be installed in all the (sub)graphs up to root. */
@@ -357,17 +357,17 @@ LEAVING("dzb7m0p5xsngvtyr8zs912og4","newnode");
//3 4m26dpgaiw44hcleugjy71eus
// static void installnode(Agraph_t * g, Agnode_t * n)
-public static void installnode(Agraph_s g, Agnode_s n) {
+public static void installnode(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("4m26dpgaiw44hcleugjy71eus","installnode");
try {
- Agsubnode_s sn;
+ ST_Agsubnode_s sn;
int osize;
- osize = dtsize_((_dt_s)g.getPtr("n_id"));
- if (EQ(g, agroot(g))) sn = (Agsubnode_s) n.getStruct("mainsub").amp().castTo(Agsubnode_s.class);
- else sn = (Agsubnode_s) ((__ptr__)agalloc(g, sizeof(Agsubnode_s.class))).castTo(Agsubnode_s.class);
+ osize = dtsize_((ST_dt_s)g.n_id);
+ if (EQ(g, agroot(g))) sn = (ST_Agsubnode_s) n.mainsub;
+ else sn = (ST_Agsubnode_s) ((__ptr__)agalloc(g, sizeof(ST_Agsubnode_s.class))).castTo(ST_Agsubnode_s.class);
sn.setPtr("node", n);
- g.getPtr("n_id").call("searchf", g.getPtr("n_id"),sn,0000001);
- g.getPtr("n_seq").call("searchf", g.getPtr("n_seq"),sn,0000001);
+ g.n_id.searchf.exe(g.n_id,sn,0000001);
+ g.n_seq.searchf.exe(g.n_seq,sn,0000001);
} finally {
LEAVING("4m26dpgaiw44hcleugjy71eus","installnode");
}
@@ -378,10 +378,10 @@ LEAVING("4m26dpgaiw44hcleugjy71eus","installnode");
//3 3mfxjcaeepn8nitirs3yoqaed
// static void installnodetoroot(Agraph_t * g, Agnode_t * n)
-public static void installnodetoroot(Agraph_s g, Agnode_s n) {
+public static void installnodetoroot(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot");
try {
- Agraph_s par;
+ ST_Agraph_s par;
installnode(g, n);
if ((par = agparent(g))!=null)
installnodetoroot(par, n);
@@ -395,10 +395,10 @@ LEAVING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot");
//3 85bb9mezhsgtzar3kqz95mq1
// static void initnode(Agraph_t * g, Agnode_t * n)
-public static void initnode(Agraph_s g, Agnode_s n) {
+public static void initnode(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("85bb9mezhsgtzar3kqz95mq1","initnode");
try {
- if (((ST_Agdesc_s)agroot(g).getStruct("desc")).has_attrs!=0)
+ if (((ST_Agdesc_s)agroot(g).desc).has_attrs!=0)
agnodeattr_init(g,n);
agmethod_init(g, n);
} finally {
@@ -411,11 +411,11 @@ LEAVING("85bb9mezhsgtzar3kqz95mq1","initnode");
//3 1m6sl9df2yaolmufyq5i577a3
// Agnode_t *agidnode(Agraph_t * g, unsigned long id, int cflag)
-public static Agnode_s agidnode(Agraph_s g, int id, int cflag) {
+public static ST_Agnode_s agidnode(ST_Agraph_s g, int id, int cflag) {
ENTERING("1m6sl9df2yaolmufyq5i577a3","agidnode");
try {
- Agraph_s root;
- Agnode_s n;
+ ST_Agraph_s root;
+ ST_Agnode_s n;
n = agfindnode_by_id(g, id);
if ((n == null) && cflag!=0) {
UNSUPPORTED("7zol2448bccu90sqoxkvnbuif"); // root = agroot(g);
@@ -442,11 +442,11 @@ LEAVING("1m6sl9df2yaolmufyq5i577a3","agidnode");
//3 4yh1h1cwoitzb1t8869b79e3g
// Agnode_t *agnode(Agraph_t * g, char *name, int cflag)
-public static Agnode_s agnode(Agraph_s g, CString name, boolean cflag) {
+public static ST_Agnode_s agnode(ST_Agraph_s g, CString name, boolean cflag) {
ENTERING("4yh1h1cwoitzb1t8869b79e3g","agnode");
try {
- Agraph_s root;
- Agnode_s n;
+ ST_Agraph_s root;
+ ST_Agnode_s n;
int id[] = new int[1];
root = agroot(g);
/* probe for existing node */
@@ -588,12 +588,12 @@ throw new UnsupportedOperationException();
//3 d5farp22buvesyi4pydjam4g2
// Agnode_t *agsubnode(Agraph_t * g, Agnode_t * n0, int cflag)
-public static Agnode_s agsubnode(Agraph_s g, Agnode_s n0, boolean cflag) {
+public static ST_Agnode_s agsubnode(ST_Agraph_s g, ST_Agnode_s n0, boolean cflag) {
ENTERING("d5farp22buvesyi4pydjam4g2","agsubnode");
try {
- Agraph_s par;
- Agnode_s n;
- if (NEQ(agroot(g), n0.getPtr("root")))
+ ST_Agraph_s par;
+ ST_Agnode_s n;
+ if (NEQ(agroot(g), n0.root))
return null;
n = agfindnode_by_id(g, AGID(n0));
if ((n == null) && cflag) {
@@ -616,14 +616,14 @@ LEAVING("d5farp22buvesyi4pydjam4g2","agsubnode");
//3 awwiazixy9c76hvyxlkvvb3vo
// int agsubnodeidcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc)
-public static int agsubnodeidcmpf(_dt_s d, __ptr__ arg0, __ptr__ arg1, _dtdisc_s disc) {
+public static int agsubnodeidcmpf(ST_dt_s d, __ptr__ arg0, __ptr__ arg1, ST_dtdisc_s disc) {
ENTERING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf");
try {
int v;
- Agsubnode_s sn0, sn1;
- sn0 = (Agsubnode_s) arg0.castTo(Agsubnode_s.class);
- sn1 = (Agsubnode_s) arg1.castTo(Agsubnode_s.class);
- v = (AGID(sn0.getPtr("node")) - AGID(sn1.getPtr("node")));
+ ST_Agsubnode_s sn0, sn1;
+ sn0 = (ST_Agsubnode_s) arg0.castTo(ST_Agsubnode_s.class);
+ sn1 = (ST_Agsubnode_s) arg1.castTo(ST_Agsubnode_s.class);
+ v = (AGID(sn0.node) - AGID(sn1.node));
return ((v==0)?0:(v<0?-1:1));
} finally {
LEAVING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf");
@@ -635,14 +635,14 @@ LEAVING("awwiazixy9c76hvyxlkvvb3vo","agsubnodeidcmpf");
//3 41fjseux0nxzpr0aq7igym9ux
// int agsubnodeseqcmpf(Dict_t * d, void *arg0, void *arg1, Dtdisc_t * disc)
-public static int agsubnodeseqcmpf(_dt_s d, __ptr__ arg0, __ptr__ arg1, _dtdisc_s disc) {
+public static int agsubnodeseqcmpf(ST_dt_s d, __ptr__ arg0, __ptr__ arg1, ST_dtdisc_s disc) {
ENTERING("41fjseux0nxzpr0aq7igym9ux","agsubnodeseqcmpf");
try {
- Agsubnode_s sn0, sn1;
+ ST_Agsubnode_s sn0, sn1;
int v;
- sn0 = (Agsubnode_s) arg0.castTo(Agsubnode_s.class);
- sn1 = (Agsubnode_s) arg1.castTo(Agsubnode_s.class);
- v = (AGSEQ(sn0.getPtr("node")) - AGSEQ(sn1.getPtr("node")));
+ sn0 = (ST_Agsubnode_s) arg0.castTo(ST_Agsubnode_s.class);
+ sn1 = (ST_Agsubnode_s) arg1.castTo(ST_Agsubnode_s.class);
+ v = (AGSEQ(sn0.node) - AGSEQ(sn1.node));
return ((v==0)?0:(v<0?-1:1));
} finally {
LEAVING("41fjseux0nxzpr0aq7igym9ux","agsubnodeseqcmpf");
diff --git a/src/gen/lib/cgraph/obj__c.java b/src/gen/lib/cgraph/obj__c.java
index bfb3822..6412193 100644
--- a/src/gen/lib/cgraph/obj__c.java
+++ b/src/gen/lib/cgraph/obj__c.java
@@ -58,10 +58,10 @@ import static smetana.core.Macro.AGRAPH;
import static smetana.core.Macro.AGTYPE;
import static smetana.core.Macro.UNSUPPORTED;
import h.Agcbstack_s;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsym_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Agsym_s;
import h.agobjfn_t;
import h.agobjupdfn_t;
import smetana.core.__ptr__;
@@ -275,11 +275,11 @@ throw new UnsupportedOperationException();
//3 c4ft3rxx9au29a2ns2nhod4dn
// void agmethod_init(Agraph_t * g, void *obj)
-public static void agmethod_init(Agraph_s g, __ptr__ obj) {
+public static void agmethod_init(ST_Agraph_s g, __ptr__ obj) {
ENTERING("c4ft3rxx9au29a2ns2nhod4dn","agmethod_init");
try {
- if (g.getPtr("clos").getBoolean("callbacks_enabled"))
- aginitcb(g, obj, (Agcbstack_s) g.getPtr("clos").getPtr("cb"));
+ if (g.clos.callbacks_enabled)
+ aginitcb(g, obj, (Agcbstack_s) g.clos.cb);
else
agrecord_callback(g, obj, 100, null);
} finally {
@@ -292,7 +292,7 @@ LEAVING("c4ft3rxx9au29a2ns2nhod4dn","agmethod_init");
//3 eobcsheti70b9gzoi3z968zev
// void aginitcb(Agraph_t * g, void *obj, Agcbstack_t * cbstack)
-public static void aginitcb(Agraph_s g, __ptr__ obj, Agcbstack_s cbstack) {
+public static void aginitcb(ST_Agraph_s g, __ptr__ obj, Agcbstack_s cbstack) {
ENTERING("eobcsheti70b9gzoi3z968zev","aginitcb");
try {
agobjfn_t fn;
@@ -326,11 +326,11 @@ LEAVING("eobcsheti70b9gzoi3z968zev","aginitcb");
//3 29p743rx2pw81slkoaayfeael
// void agmethod_upd(Agraph_t * g, void *obj, Agsym_t * sym)
-public static void agmethod_upd(Agraph_s g, __ptr__ obj, Agsym_s sym) {
+public static void agmethod_upd(ST_Agraph_s g, __ptr__ obj, ST_Agsym_s sym) {
ENTERING("29p743rx2pw81slkoaayfeael","agmethod_upd");
try {
- if (g.getPtr("clos").getBoolean("callbacks_enabled"))
- agupdcb(g, obj, sym, (Agcbstack_s) g.getPtr("clos").getPtr("cb"));
+ if (g.clos.callbacks_enabled)
+ agupdcb(g, obj, sym, (Agcbstack_s) g.clos.cb);
else
agrecord_callback(g, obj, 101, sym);
} finally {
@@ -343,7 +343,7 @@ LEAVING("29p743rx2pw81slkoaayfeael","agmethod_upd");
//3 8t9rkcpdvmxph6krjvfmz3s51
// void agupdcb(Agraph_t * g, void *obj, Agsym_t * sym, Agcbstack_t * cbstack)
-public static void agupdcb(Agraph_s g, __ptr__ obj, Agsym_s sym, Agcbstack_s cbstack) {
+public static void agupdcb(ST_Agraph_s g, __ptr__ obj, ST_Agsym_s sym, Agcbstack_s cbstack) {
ENTERING("8t9rkcpdvmxph6krjvfmz3s51","agupdcb");
try {
agobjupdfn_t fn;
@@ -425,17 +425,17 @@ throw new UnsupportedOperationException();
//3 53858x47ifwq7ldf9ukvpdc5r
// Agraph_t *agroot(void* obj)
-public static Agraph_s agroot(__ptr__ obj) {
+public static ST_Agraph_s agroot(__ptr__ obj) {
ENTERING("53858x47ifwq7ldf9ukvpdc5r","agroot");
try {
switch (AGTYPE(obj)) {
case AGINEDGE:
case AGOUTEDGE:
- return (Agraph_s) obj.castTo(Agedge_s.class).getPtr("node").getPtr("root");
+ return (ST_Agraph_s) ((ST_Agedge_s)obj.castTo(ST_Agedge_s.class)).node.root;
case AGNODE:
- return (Agraph_s) obj.castTo(Agnode_s.class).getPtr("root");
+ return (ST_Agraph_s) ((ST_Agnode_s)obj.castTo(ST_Agnode_s.class)).root;
case AGRAPH:
- return (Agraph_s) obj.castTo(Agraph_s.class).getPtr("root");
+ return (ST_Agraph_s) ((ST_Agraph_s)obj.castTo(ST_Agraph_s.class)).root;
default: /* actually can't occur if only 2 bit tags */
System.err.println("agroot of a bad object");
return null;
@@ -450,17 +450,17 @@ LEAVING("53858x47ifwq7ldf9ukvpdc5r","agroot");
//3 brxx6qho8cw09dg7o27lc7c6z
// Agraph_t *agraphof(void *obj)
-public static Agraph_s agraphof(__ptr__ obj) {
+public static ST_Agraph_s agraphof(__ptr__ obj) {
ENTERING("brxx6qho8cw09dg7o27lc7c6z","agraphof");
try {
switch (AGTYPE(obj)) {
case AGINEDGE:
case AGOUTEDGE:
- return (Agraph_s) obj.castTo(Agedge_s.class).getPtr("node").getPtr("root").castTo(Agraph_s.class);
+ return (ST_Agraph_s) ((ST_Agedge_s)obj.castTo(ST_Agedge_s.class)).node.root.castTo(ST_Agraph_s.class);
case AGNODE:
- return (Agraph_s) obj.castTo(Agnode_s.class).getPtr("root").castTo(Agraph_s.class);
+ return (ST_Agraph_s) ((ST_Agnode_s)obj.castTo(ST_Agnode_s.class)).root.castTo(ST_Agraph_s.class);
case AGRAPH:
- return (Agraph_s) obj.castTo(Agraph_s.class);
+ return (ST_Agraph_s) obj.castTo(ST_Agraph_s.class);
default: /* actually can't occur if only 2 bit tags */
System.err.println("agraphof a bad object");
return null;
@@ -542,10 +542,10 @@ throw new UnsupportedOperationException();
//3 91ej8cxcc0kzgkg2yk3pdiifs
// int agcontains(Agraph_t* g, void* obj)
-public static boolean agcontains(Agraph_s g, __ptr__ obj) {
+public static boolean agcontains(ST_Agraph_s g, __ptr__ obj) {
ENTERING("91ej8cxcc0kzgkg2yk3pdiifs","agcontains");
try {
- Agraph_s subg;
+ ST_Agraph_s subg;
if (NEQ(agroot(g), agroot(obj))) return false;
switch (AGTYPE(obj)) {
case AGRAPH:
@@ -557,7 +557,7 @@ UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
case AGNODE:
return (agidnode(g, AGID(obj), 0) != null);
default:
- return (agsubedge(g, (Agedge_s) obj, false) != null);
+ return (agsubedge(g, (ST_Agedge_s) obj, false) != null);
}
} finally {
LEAVING("91ej8cxcc0kzgkg2yk3pdiifs","agcontains");
diff --git a/src/gen/lib/cgraph/rec__c.java b/src/gen/lib/cgraph/rec__c.java
index d04fe85..bd31c9a 100644
--- a/src/gen/lib/cgraph/rec__c.java
+++ b/src/gen/lib/cgraph/rec__c.java
@@ -63,11 +63,10 @@ import static smetana.core.Macro.ASINT;
import static smetana.core.Macro.N;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agobj_s;
-import h.Agraph_s;
-import h.Agrec_s;
-import h.ST_Agdesc_s;
+import h.ST_Agedge_s;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
+import h.ST_Agrec_s;
import h.ST_Agtag_s;
import smetana.core.CString;
import smetana.core.__ptr__;
@@ -210,16 +209,16 @@ public class rec__c {
//3 62z9z5vraa2as0c9t108j9xaf
// static void set_data(Agobj_t * obj, Agrec_t * data, int mtflock)
-public static void set_data(Agobj_s obj, Agrec_s data, int mtflock) {
+public static void set_data(ST_Agobj_s obj, ST_Agrec_s data, int mtflock) {
ENTERING("62z9z5vraa2as0c9t108j9xaf","set_data");
try {
- Agedge_s e;
+ ST_Agedge_s e;
obj.setPtr("data", data);
- ((ST_Agtag_s)obj.getStruct("tag")).mtflock = mtflock;
+ ((ST_Agtag_s)obj.tag).mtflock = mtflock;
if ((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)) {
- e = (Agedge_s) agopp(obj.castTo(Agedge_s.class));
+ e = (ST_Agedge_s) agopp(obj.castTo(ST_Agedge_s.class));
AGDATA(e, data);
- ((ST_Agtag_s)e.getStruct("base").getStruct("tag")).mtflock = mtflock;
+ ((ST_Agtag_s)e.base.tag).mtflock = mtflock;
}
} finally {
LEAVING("62z9z5vraa2as0c9t108j9xaf","set_data");
@@ -231,28 +230,28 @@ LEAVING("62z9z5vraa2as0c9t108j9xaf","set_data");
//3 7p2ne3oknmyclvsw4lh3axtd8
// Agrec_t *aggetrec(void *obj, char *name, int mtf)
-public static Agrec_s aggetrec(__ptr__ obj, CString name, boolean mtf) {
+public static ST_Agrec_s aggetrec(__ptr__ obj, CString name, boolean mtf) {
ENTERING("7p2ne3oknmyclvsw4lh3axtd8","aggetrec");
try {
- Agobj_s hdr;
- Agrec_s d, first;
- hdr = (Agobj_s) obj.castTo(Agobj_s.class);
- first = d = (Agrec_s) hdr.getPtr("data");
+ ST_Agobj_s hdr;
+ ST_Agrec_s d, first;
+ hdr = (ST_Agobj_s) obj.castTo(ST_Agobj_s.class);
+ first = d = (ST_Agrec_s) hdr.data;
while (d!=null) {
- if (N(strcmp(name,d.getCString("name"))))
+ if (N(strcmp(name,d.name)))
break;
- d = (Agrec_s) d.getPtr("next");
+ d = (ST_Agrec_s) d.next;
if (EQ(d, first)) {
d = null;
break;
}
}
if (d!=null) {
- if (((ST_Agtag_s)hdr.getStruct("tag")).mtflock!=0) {
- if (mtf && NEQ(hdr.getPtr("data"), d))
+ if (((ST_Agtag_s)hdr.tag).mtflock!=0) {
+ if (mtf && NEQ(hdr.data, d))
System.err.println("move to front lock inconsistency");
} else {
- if (NEQ(d, first) || (mtf != ((((ST_Agtag_s)hdr.getStruct("tag")).mtflock)!=0)))
+ if (NEQ(d, first) || (mtf != ((((ST_Agtag_s)hdr.tag).mtflock)!=0)))
set_data(hdr, d, ASINT(mtf)); /* Always optimize */
}
}
@@ -267,24 +266,24 @@ LEAVING("7p2ne3oknmyclvsw4lh3axtd8","aggetrec");
//3 7sk4k5ipm2jnd244556g1kr6
// static void objputrec(Agraph_t * g, Agobj_t * obj, void *arg)
-public static void objputrec(Agraph_s g, Agobj_s obj, Object arg) {
+public static void objputrec(ST_Agraph_s g, ST_Agobj_s obj, Object arg) {
ENTERING("7sk4k5ipm2jnd244556g1kr6","objputrec");
try {
- Agrec_s firstrec, newrec;
- newrec = (Agrec_s) arg;
- firstrec = (Agrec_s) obj.getPtr("data");
+ ST_Agrec_s firstrec, newrec;
+ newrec = (ST_Agrec_s) arg;
+ firstrec = (ST_Agrec_s) obj.data;
if (firstrec == null)
- newrec.setPtr("next", newrec); /* 0 elts */
+ newrec.next = newrec; /* 0 elts */
else {
- if (EQ(firstrec.getPtr("next"), firstrec)) {
- firstrec.setPtr("next", newrec); /* 1 elt */
- newrec.setPtr("next", firstrec);
+ if (EQ(firstrec.next, firstrec)) {
+ firstrec.next = newrec; /* 1 elt */
+ newrec.next = firstrec;
} else {
- newrec.setPtr("next", firstrec.getPtr("next"));
- firstrec.setPtr("next", newrec);
+ newrec.next = firstrec.next;
+ firstrec.next = newrec;
}
}
- if (NOT(((ST_Agtag_s)obj.getStruct("tag")).mtflock))
+ if (NOT(((ST_Agtag_s)obj.tag).mtflock))
set_data(obj, newrec, (0));
} finally {
LEAVING("7sk4k5ipm2jnd244556g1kr6","objputrec");
@@ -299,17 +298,17 @@ LEAVING("7sk4k5ipm2jnd244556g1kr6","objputrec");
public static __ptr__ agbindrec(__ptr__ arg_obj, CString recname, size_t recsize, boolean mtf) {
ENTERING("dmh5i83l15mnn1pnu6f5dfv8l","agbindrec");
try {
- Agraph_s g;
- Agobj_s obj;
- Agrec_s rec;
- obj = (Agobj_s) arg_obj.castTo(Agobj_s.class);
+ ST_Agraph_s g;
+ ST_Agobj_s obj;
+ ST_Agrec_s rec;
+ obj = (ST_Agobj_s) arg_obj.castTo(ST_Agobj_s.class);
g = agraphof(obj);
rec = aggetrec(obj, recname, false);
if ((rec == null && recsize.isStrictPositive())) {
- rec = (Agrec_s) ((__ptr__)agalloc(g, recsize)).castTo(Agrec_s.class);
+ rec = (ST_Agrec_s) ((__ptr__)agalloc(g, recsize)).castTo(ST_Agrec_s.class);
// rec = (Agrec_s) Memory.malloc(Agrec_s.class);
rec.setPtr("name", agstrdup(g, recname));
- switch (((ST_Agtag_s)obj.getStruct("tag")).objtype) {
+ switch (((ST_Agtag_s)obj.tag).objtype) {
case AGRAPH:
objputrec(g, obj, rec);
break;
diff --git a/src/gen/lib/cgraph/refstr__c.java b/src/gen/lib/cgraph/refstr__c.java
index 0bc080a..c7d699a 100644
--- a/src/gen/lib/cgraph/refstr__c.java
+++ b/src/gen/lib/cgraph/refstr__c.java
@@ -52,16 +52,13 @@ import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h._dt_s;
-import h.refstr_t;
+import h.ST_Agraph_s;
+import h.ST_dt_s;
+import h.ST_refstr_t;
import smetana.core.ACCESS;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.OFFSET;
import smetana.core.STARSTAR;
import smetana.core.Z;
-import smetana.core.__struct__;
import smetana.core.size_t;
public class refstr__c {
@@ -228,30 +225,30 @@ static {
//3 f1nwss2xoaub1hyord232ugoj
// static Dict_t *refdict(Agraph_t * g)
-public static _dt_s refdict(final Agraph_s g) {
+public static ST_dt_s refdict(final ST_Agraph_s g) {
ENTERING("f1nwss2xoaub1hyord232ugoj","refdict");
try {
- STARSTAR<_dt_s> dictref;
+ STARSTAR<ST_dt_s> dictref;
if (g != null)
- dictref = STARSTAR.amp(new ACCESS<_dt_s>() {
- public _dt_s get() {
- return (_dt_s) g.getPtr("clos").getPtr("strdict");
+ dictref = STARSTAR.amp(new ACCESS<ST_dt_s>() {
+ public ST_dt_s get() {
+ return (ST_dt_s) g.clos.strdict;
}
- public void set(_dt_s obj) {
- g.getPtr("clos").setPtr("strdict", obj);
+ public void set(ST_dt_s obj) {
+ g.clos.setPtr("strdict", obj);
}
});
else
- dictref = STARSTAR.amp(new ACCESS<_dt_s>() {
- public _dt_s get() {
+ dictref = STARSTAR.amp(new ACCESS<ST_dt_s>() {
+ public ST_dt_s get() {
return Z.z().Refdict_default;
}
- public void set(_dt_s obj) {
+ public void set(ST_dt_s obj) {
Z.z().Refdict_default = obj;
}
});
if (dictref.getMe() == null) {
- dictref.setMe(agdtopen(g, Z.z().Refstrdisc.amp(), Z.z().Dttree));
+ dictref.setMe(agdtopen(g, Z.z().Refstrdisc, Z.z().Dttree));
}
Z.z().HTML_BIT = 1 << 31;
Z.z().CNT_BITS = ~Z.z().HTML_BIT;
@@ -280,14 +277,14 @@ throw new UnsupportedOperationException();
//3 9ts4wqhw2xafdv3tlcilneewq
// static refstr_t *refsymbind(Dict_t * strdict, char *s)
-public static refstr_t refsymbind(_dt_s strdict, CString s) {
+public static ST_refstr_t refsymbind(ST_dt_s strdict, CString s) {
ENTERING("9ts4wqhw2xafdv3tlcilneewq","refsymbind");
try {
- final __struct__<refstr_t> key = JUtils.from(refstr_t.class);
- refstr_t r;
+ final ST_refstr_t key = new ST_refstr_t();
+ ST_refstr_t r;
// key.setPtr("s", s.duplicate());
- key.setPtr("s", s);
- r = (refstr_t) strdict.call("searchf", strdict, key.amp(), 0000004);
+ key.setString(s);
+ r = (ST_refstr_t) strdict.searchf.exe(strdict, key, 0000004);
return r;
} finally {
LEAVING("9ts4wqhw2xafdv3tlcilneewq","refsymbind");
@@ -299,13 +296,13 @@ LEAVING("9ts4wqhw2xafdv3tlcilneewq","refsymbind");
//3 1scntgo71z7c2v15zapiyw59w
// static char *refstrbind(Dict_t * strdict, char *s)
-public static CString refstrbind(_dt_s strdict, CString s) {
+public static CString refstrbind(ST_dt_s strdict, CString s) {
ENTERING("1scntgo71z7c2v15zapiyw59w","refstrbind");
try {
- refstr_t r;
+ ST_refstr_t r;
r = refsymbind(strdict, s);
if (r!=null)
- return r.getCString("s");
+ return r.s;
else
return null;
} finally {
@@ -318,7 +315,7 @@ LEAVING("1scntgo71z7c2v15zapiyw59w","refstrbind");
//3 bb8aqjshw3ecae2lsmhigd0mc
// char *agstrbind(Agraph_t * g, char *s)
-public static CString agstrbind(Agraph_s g, CString s) {
+public static CString agstrbind(ST_Agraph_s g, CString s) {
ENTERING("bb8aqjshw3ecae2lsmhigd0mc","agstrbind");
try {
return refstrbind(refdict(g), s);
@@ -332,32 +329,31 @@ LEAVING("bb8aqjshw3ecae2lsmhigd0mc","agstrbind");
//3 86oznromwhn9qeym0k7pih73q
// char *agstrdup(Agraph_t * g, char *s)
-public static CString agstrdup(Agraph_s g, CString s) {
+public static CString agstrdup(ST_Agraph_s g, CString s) {
ENTERING("86oznromwhn9qeym0k7pih73q","agstrdup");
try {
- refstr_t r;
- _dt_s strdict;
+ ST_refstr_t r;
+ ST_dt_s strdict;
size_t sz;
if (s == null)
return null;
strdict = refdict(g);
- r = (refstr_t) refsymbind(strdict, s);
- if (r!=null) r = (refstr_t) r.castTo(refstr_t.class);
+ r = (ST_refstr_t) refsymbind(strdict, s);
if (r!=null)
- r.setInt("refcnt", r.getInt("refcnt")+1);
+ r.refcnt++;
else {
- sz = sizeof(refstr_t.class).plus(s.length());
+ sz = sizeof(ST_refstr_t.class).plus(s.length());
if (g!=null)
- r = (refstr_t) agalloc(g, sz);
+ r = (ST_refstr_t) agalloc(g, sz);
else
- r = (refstr_t) sz.malloc();
- r.setInt("refcnt", 1);
- r.setPtr("s", s.duplicate());
+ r = new ST_refstr_t();
+ r.refcnt = 1;
+ r.setString(s.duplicate());
// strcpy(r->store, s);
// r->s = r->store;
- strdict.call("searchf", strdict,r,0000001);
+ strdict.searchf.exe(strdict,r,0000001);
}
- return r.getCString("s");
+ return r.s;
} finally {
LEAVING("86oznromwhn9qeym0k7pih73q","agstrdup");
}
@@ -402,19 +398,18 @@ throw new UnsupportedOperationException();
//3 enhn1ajfo86a19dgm4b8lduz7
// int agstrfree(Agraph_t * g, char *s)
-public static int agstrfree(Agraph_s g, CString s) {
+public static int agstrfree(ST_Agraph_s g, CString s) {
ENTERING("enhn1ajfo86a19dgm4b8lduz7","agstrfree");
try {
- refstr_t r;
- _dt_s strdict;
+ ST_refstr_t r;
+ ST_dt_s strdict;
if (s == null)
return -1;
strdict = refdict(g);
- r = refsymbind(strdict, s);
- if (r!=null) r = (refstr_t) r.castTo(refstr_t.class);
- if (r!=null && (EQ(r.getPtr("s"), s))) {
- r.setInt("refcnt", r.getInt("refcnt")-1);
- if ((r.getInt("refcnt")!=0 && Z.z().CNT_BITS!=0) == false) {
+ r = (ST_refstr_t) refsymbind(strdict, s);
+ if (r!=null && (EQ(r.s, s))) {
+ r.refcnt--;
+ if ((r.refcnt!=0 && Z.z().CNT_BITS!=0) == false) {
agdtdelete(g, strdict, r);
/*
if (g) agfree(g,r);
@@ -438,11 +433,11 @@ LEAVING("enhn1ajfo86a19dgm4b8lduz7","agstrfree");
public static int aghtmlstr(CString s) {
ENTERING("3em4wzjnpajd5d3igb90l3rml","aghtmlstr");
try {
- refstr_t key;
+ ST_refstr_t key;
if (s == null)
return 0;
- key = (refstr_t) s.addVirtualBytes(-OFFSET.create(refstr_t.class, "s").toInt());
- return (key.getInt("refcnt") & Z.z().HTML_BIT);
+ key = (ST_refstr_t) s.getParent();
+ return (key.refcnt & Z.z().HTML_BIT);
} finally {
LEAVING("3em4wzjnpajd5d3igb90l3rml","aghtmlstr");
}
diff --git a/src/gen/lib/cgraph/subg__c.java b/src/gen/lib/cgraph/subg__c.java
index b602bca..58e4ff1 100644
--- a/src/gen/lib/cgraph/subg__c.java
+++ b/src/gen/lib/cgraph/subg__c.java
@@ -56,14 +56,12 @@ import static smetana.core.Macro.AGID;
import static smetana.core.Macro.AGRAPH;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
import h.ST_Agdesc_s;
-import h._dt_s;
+import h.ST_Agraph_s;
+import h.ST_dt_s;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Z;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class subg__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -202,13 +200,13 @@ public class subg__c {
//3 11ezyrsjsotjz9b3cyvb4ie8p
// static Agraph_t *agfindsubg_by_id(Agraph_t * g, unsigned long id)
-public static Agraph_s agfindsubg_by_id(Agraph_s g, int id) {
+public static ST_Agraph_s agfindsubg_by_id(ST_Agraph_s g, int id) {
ENTERING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id");
try {
- final __struct__<Agraph_s> template = JUtils.from(Agraph_s.class);
- agdtdisc(g, (_dt_s) g.getPtr("g_dict"), Z.z().Ag_subgraph_id_disc.amp());
- AGID(template.amp(), id);
- return (Agraph_s) g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"), template.amp(), 0000004);
+ final ST_Agraph_s template = new ST_Agraph_s();
+ agdtdisc(g, (ST_dt_s) g.g_dict, Z.z().Ag_subgraph_id_disc);
+ AGID(template, id);
+ return (ST_Agraph_s) g.g_dict.searchf.exe(g.g_dict, template, 0000004);
} finally {
LEAVING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id");
}
@@ -219,19 +217,19 @@ LEAVING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id");
//3 44saycxbfbr9lou0itlyewkb4
// static Agraph_t *localsubg(Agraph_t * g, unsigned long id)
-public static Agraph_s localsubg(Agraph_s g, int id) {
+public static ST_Agraph_s localsubg(ST_Agraph_s g, int id) {
ENTERING("44saycxbfbr9lou0itlyewkb4","localsubg");
try {
- Agraph_s subg;
+ ST_Agraph_s subg;
subg = agfindsubg_by_id(g, id);
if (subg!=null)
return subg;
- subg = (Agraph_s) agalloc(g, sizeof(Agraph_s.class));
- subg.setPtr("clos", g.getPtr("clos"));
- subg.setStruct("desc", g.getStruct("desc"));
- ((ST_Agdesc_s)subg.getStruct("desc")).maingraph = 0;
+ subg = (ST_Agraph_s) agalloc(g, sizeof(ST_Agraph_s.class));
+ subg.setPtr("clos", g.clos);
+ subg.setStruct("desc", g.desc);
+ ((ST_Agdesc_s)subg.desc).maingraph = 0;
subg.setPtr("parent", g);
- subg.setPtr("root", g.getPtr("root"));
+ subg.setPtr("root", g.root);
AGID(subg, id);
return agopen1(subg);
} finally {
@@ -262,11 +260,11 @@ throw new UnsupportedOperationException();
//3 a24jd4r2sdyb4lb2hyababrda
// Agraph_t *agsubg(Agraph_t * g, char *name, int cflag)
-public static Agraph_s agsubg(Agraph_s g, CString name, boolean cflag) {
+public static ST_Agraph_s agsubg(ST_Agraph_s g, CString name, boolean cflag) {
ENTERING("a24jd4r2sdyb4lb2hyababrda","agsubg");
try {
int id[] = new int[]{0};
- Agraph_s subg;
+ ST_Agraph_s subg;
if (name!=null && agmapnametoid(g, AGRAPH, name, id, false)!=0) {
/* might already exist */
if ((subg = agfindsubg_by_id(g, id[0]))!=null)
@@ -288,12 +286,12 @@ LEAVING("a24jd4r2sdyb4lb2hyababrda","agsubg");
//3 51eksrs0lhkgohunejlpwyc4k
// Agraph_t *agfstsubg(Agraph_t * g)
-public static Agraph_s agfstsubg(Agraph_s g) {
+public static ST_Agraph_s agfstsubg(ST_Agraph_s g) {
ENTERING("51eksrs0lhkgohunejlpwyc4k","agfstsubg");
try {
- __ptr__ tmp = (__ptr__)g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"),null,0000200);
- if (tmp!=null) tmp = tmp.castTo(Agraph_s.class);
- return (Agraph_s) tmp;
+ __ptr__ tmp = (__ptr__)g.g_dict.searchf.exe(g.g_dict,null,0000200);
+ if (tmp!=null) tmp = tmp.castTo(ST_Agraph_s.class);
+ return (ST_Agraph_s) tmp;
} finally {
LEAVING("51eksrs0lhkgohunejlpwyc4k","agfstsubg");
}
@@ -304,12 +302,15 @@ LEAVING("51eksrs0lhkgohunejlpwyc4k","agfstsubg");
//3 85c1qisrein0tzm2regoe61t
// Agraph_t *agnxtsubg(Agraph_t * subg)
-public static Agraph_s agnxtsubg(Agraph_s subg) {
+public static ST_Agraph_s agnxtsubg(ST_Agraph_s subg) {
ENTERING("85c1qisrein0tzm2regoe61t","agnxtsubg");
try {
- Agraph_s g;
+ ST_Agraph_s g;
g = agparent(subg);
- return g!=null ? (Agraph_s) g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"), subg, 0000010) : null;
+ if (g==null) return null;
+ __ptr__ tmp = (__ptr__) g.g_dict.searchf.exe(g.g_dict, subg, 0000010);
+ if (tmp==null) return null;
+ return (ST_Agraph_s) tmp.getPtr();
} finally {
LEAVING("85c1qisrein0tzm2regoe61t","agnxtsubg");
}
@@ -320,10 +321,10 @@ LEAVING("85c1qisrein0tzm2regoe61t","agnxtsubg");
//3 7kbp6j03hd7u6nnlivi0vt3ja
// Agraph_t *agparent(Agraph_t * g)
-public static Agraph_s agparent(Agraph_s g) {
+public static ST_Agraph_s agparent(ST_Agraph_s g) {
ENTERING("7kbp6j03hd7u6nnlivi0vt3ja","agparent");
try {
- return (Agraph_s) g.getPtr("parent");
+ return (ST_Agraph_s) g.parent;
} finally {
LEAVING("7kbp6j03hd7u6nnlivi0vt3ja","agparent");
}
diff --git a/src/gen/lib/cgraph/utils__c.java b/src/gen/lib/cgraph/utils__c.java
index d5b74b5..3b4913b 100644
--- a/src/gen/lib/cgraph/utils__c.java
+++ b/src/gen/lib/cgraph/utils__c.java
@@ -53,15 +53,14 @@ import static smetana.core.JUtils.function;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
import h.Dtmemory_f;
-import h._dt_s;
-import h._dtdisc_s;
-import h._dtmethod_s;
+import h.ST_Agraph_s;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import h.ST_dtmethod_s;
import smetana.core.Memory;
import smetana.core.Z;
import smetana.core.size_t;
-import smetana.core.amiga.StarStruct;
public class utils__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -204,10 +203,10 @@ public class utils__c {
//3 7dkudp41c9byhicatk2sxtxqk
// void *agdictobjmem(Dict_t * dict, void * p, size_t size, Dtdisc_t * disc)
-public static Object agdictobjmem(_dt_s dict, Object p, size_t size, _dtdisc_s disc) {
+public static Object agdictobjmem(ST_dt_s dict, Object p, size_t size, ST_dtdisc_s disc) {
ENTERING("7dkudp41c9byhicatk2sxtxqk","agdictobjmem");
try {
- Agraph_s g;
+ ST_Agraph_s g;
g = Z.z().Ag_dictop_G;
if (g!=null) {
if (p!=null)
@@ -252,12 +251,12 @@ throw new UnsupportedOperationException();
//3 48ox0bg1qmasrer8np51uwsyk
// Dict_t *agdtopen(Agraph_t * g, Dtdisc_t * disc, Dtmethod_t * method)
-public static _dt_s agdtopen(Agraph_s g, StarStruct disc, _dtmethod_s method) {
+public static ST_dt_s agdtopen(ST_Agraph_s g, ST_dtdisc_s disc, ST_dtmethod_s method) {
ENTERING("48ox0bg1qmasrer8np51uwsyk","agdtopen");
try {
Dtmemory_f memf;
- _dt_s d;
- memf = (Dtmemory_f) disc.getPtr("memoryf");
+ ST_dt_s d;
+ memf = (Dtmemory_f) disc.memoryf;
disc.setPtr("memoryf", function(utils__c.class, "agdictobjmem"));
Z.z().Ag_dictop_G = g;
d = dtopen(disc, method);
@@ -328,7 +327,7 @@ throw new UnsupportedOperationException();
//3 cym72wvu6zffc0vzoa93zha8
// void agdtdisc(Agraph_t * g, Dict_t * dict, Dtdisc_t * disc)
-public static void agdtdisc(Agraph_s g, _dt_s dict, _dtdisc_s disc) {
+public static void agdtdisc(ST_Agraph_s g, ST_dt_s dict, ST_dtdisc_s disc) {
ENTERING("cym72wvu6zffc0vzoa93zha8","agdtdisc");
try {
if (disc!=null && NEQ(dtdisc(dict, null, 0), disc)) {
diff --git a/src/gen/lib/circogen/block__c.java b/src/gen/lib/circogen/block__c.java
index 659bbbe..51ba70b 100644
--- a/src/gen/lib/circogen/block__c.java
+++ b/src/gen/lib/circogen/block__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class block__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/blockpath__c.java b/src/gen/lib/circogen/blockpath__c.java
index 4ed7134..c39f868 100644
--- a/src/gen/lib/circogen/blockpath__c.java
+++ b/src/gen/lib/circogen/blockpath__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class blockpath__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/blocktree__c.java b/src/gen/lib/circogen/blocktree__c.java
index b519d82..f94e66e 100644
--- a/src/gen/lib/circogen/blocktree__c.java
+++ b/src/gen/lib/circogen/blocktree__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class blocktree__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/circpos__c.java b/src/gen/lib/circogen/circpos__c.java
index ff2135c..435b70a 100644
--- a/src/gen/lib/circogen/circpos__c.java
+++ b/src/gen/lib/circogen/circpos__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class circpos__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/circular__c.java b/src/gen/lib/circogen/circular__c.java
index 93a8930..b26bd87 100644
--- a/src/gen/lib/circogen/circular__c.java
+++ b/src/gen/lib/circogen/circular__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class circular__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/circularinit__c.java b/src/gen/lib/circogen/circularinit__c.java
index 6a7d87d..d6df123 100644
--- a/src/gen/lib/circogen/circularinit__c.java
+++ b/src/gen/lib/circogen/circularinit__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class circularinit__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/deglist__c.java b/src/gen/lib/circogen/deglist__c.java
index 74b6856..9362984 100644
--- a/src/gen/lib/circogen/deglist__c.java
+++ b/src/gen/lib/circogen/deglist__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class deglist__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/edgelist__c.java b/src/gen/lib/circogen/edgelist__c.java
index 80ac12b..89050e7 100644
--- a/src/gen/lib/circogen/edgelist__c.java
+++ b/src/gen/lib/circogen/edgelist__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class edgelist__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/nodelist__c.java b/src/gen/lib/circogen/nodelist__c.java
index b9bef20..5784fd3 100644
--- a/src/gen/lib/circogen/nodelist__c.java
+++ b/src/gen/lib/circogen/nodelist__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class nodelist__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/circogen/nodeset__c.java b/src/gen/lib/circogen/nodeset__c.java
index 1d773c0..98f15a5 100644
--- a/src/gen/lib/circogen/nodeset__c.java
+++ b/src/gen/lib/circogen/nodeset__c.java
@@ -47,10 +47,7 @@ package gen.lib.circogen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class nodeset__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,27 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
-
//3 1n5xl70wxuabyf97mclvilsm6
@@ -388,16 +364,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/args__c.java b/src/gen/lib/common/args__c.java
index 825ef9e..53893b2 100644
--- a/src/gen/lib/common/args__c.java
+++ b/src/gen/lib/common/args__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class args__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/arrows__c.java b/src/gen/lib/common/arrows__c.java
index 00af6c0..5f3d48e 100644
--- a/src/gen/lib/common/arrows__c.java
+++ b/src/gen/lib/common/arrows__c.java
@@ -57,20 +57,15 @@ import static smetana.core.Macro.DIST2;
import static smetana.core.Macro.ED_conc_opp_flag;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.arrowdir_t;
-import h.bezier;
-import h.boxf;
-import h.inside_t;
-import h.pointf;
+import h.ST_Agedge_s;
+import h.ST_arrowdir_t;
+import h.ST_arrowname_t;
+import h.ST_bezier;
+import h.ST_inside_t;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.MutableDouble;
import smetana.core.Z;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class arrows__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -330,14 +325,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -366,25 +361,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -408,16 +384,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -767,7 +743,7 @@ private final static __struct__ createArrowtypes(int type, double lenfact, CFunc
//3 3apnay8wumntfkvud64ov7fcf
// static char *arrow_match_name_frag(char *name, arrowname_t * arrownames, int *flag)
-public static CString arrow_match_name_frag(CString name, __array_of_struct__ arrownames, int flag[]) {
+public static CString arrow_match_name_frag(CString name, ST_arrowname_t[] arrowsynonyms, int flag[]) {
ENTERING("3apnay8wumntfkvud64ov7fcf","arrow_match_name_frag");
try {
UNSUPPORTED("cw8t22aa6zs16jqowqjjkzywg"); // static char *arrow_match_name_frag(char *name, arrowname_t * arrownames, int *flag)
@@ -845,11 +821,11 @@ LEAVING("2pveqb5qcgfxcqp410ub942eg","arrow_match_name");
//3 2szgwtfieaw58pea2ohjyu8ea
// void arrow_flags(Agedge_t * e, int *sflag, int *eflag)
-public static void arrow_flags(Agedge_s e, int sflag[], int eflag[]) {
+public static void arrow_flags(ST_Agedge_s e, int sflag[], int eflag[]) {
ENTERING("2szgwtfieaw58pea2ohjyu8ea","arrow_flags");
try {
CString attr;
- arrowdir_t arrowdir;
+ ST_arrowdir_t arrowdir;
sflag[0] = (0);
eflag[0] = agisdirected(agraphof(e)) ? 1 : (0);
if (Z.z().E_dir!=null && ((attr = agxget(e, Z.z().E_dir))).charAt(0)!='\0') {
@@ -884,18 +860,17 @@ LEAVING("2szgwtfieaw58pea2ohjyu8ea","arrow_flags");
//3 1yk5wl46i7rlzcern0tefd24s
// double arrow_length(edge_t * e, int flag)
-public static double arrow_length(Agedge_s e, int flag) {
+public static double arrow_length(ST_Agedge_s e, int flag) {
ENTERING("1yk5wl46i7rlzcern0tefd24s","arrow_length");
try {
- __ptr__ arrowtype;
double lenfact = 0.0;
int f, i;
for (i = 0; i < 4; i++) {
/* we don't simply index with flag because arrowtypes are not necessarily sorted */
f = (flag >> (i * 8)) & ((1 << 4) - 1);
- for (arrowtype = Z.z().Arrowtypes.asPtr(); arrowtype.getPtr("gen")!=null; arrowtype=arrowtype.plus(1)) {
- if (f == arrowtype.getInt("type")) {
- lenfact += arrowtype.getDouble("lenfact");
+ for (int arrowtype = 0; Z.z().Arrowtypes[arrowtype].gen!=null; arrowtype++) {
+ if (f == Z.z().Arrowtypes[arrowtype].type) {
+ lenfact += Z.z().Arrowtypes[arrowtype].lenfact;
break;
}
}
@@ -913,14 +888,14 @@ LEAVING("1yk5wl46i7rlzcern0tefd24s","arrow_length");
//3 7ymcsnwqkr1crisrga0kezh1f
// static boolean inside(inside_t * inside_context, pointf p)
-public static boolean inside(inside_t inside_context, final __struct__<pointf> p) {
+public static boolean inside(ST_inside_t inside_context, final ST_pointf p) {
// WARNING!! STRUCT
return inside_w_(inside_context, p.copy());
}
-private static boolean inside_w_(inside_t inside_context, final __struct__<pointf> p) {
+private static boolean inside_w_(ST_inside_t inside_context, final ST_pointf p) {
ENTERING("7ymcsnwqkr1crisrga0kezh1f","inside");
try {
- return DIST2(p, inside_context.getPtr("a.p").plus(0).getPtr()) <= inside_context.getPtr("a.r").getDouble();
+ return DIST2(p, inside_context.a_p.get(0)) <= inside_context.a_r.getDouble();
} finally {
LEAVING("7ymcsnwqkr1crisrga0kezh1f","inside");
}
@@ -931,28 +906,28 @@ LEAVING("7ymcsnwqkr1crisrga0kezh1f","inside");
//3 9eellwhg4gsa2pdszpeqihs2d
// int arrowEndClip(edge_t* e, pointf * ps, int startp, int endp, bezier * spl, int eflag)
-public static int arrowEndClip(Agedge_s e, __ptr__ ps, int startp, int endp, bezier spl, int eflag) {
+public static int arrowEndClip(ST_Agedge_s e, ST_pointf.Array ps, int startp, int endp, ST_bezier spl, int eflag) {
ENTERING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip");
try {
- final __struct__<inside_t> inside_context = JUtils.from(inside_t.class);
- final __array_of_struct__ sp = __array_of_struct_impl__.malloc(pointf.class, 4);
+ final ST_inside_t inside_context = new ST_inside_t();
+ final ST_pointf.Array sp = new ST_pointf.Array( 4);
double elen;
MutableDouble elen2 = new MutableDouble(0);
elen = arrow_length(e, eflag);
elen2.setValue(elen * elen);
spl.setInt("eflag", eflag);
spl.setStruct("ep", ps.plus(endp + 3).getStruct());
- if (endp > startp && DIST2(ps.plus(endp).getPtr(), ps.plus(endp + 3).getPtr()) < elen2.getValue()) {
+ if (endp > startp && DIST2(ps.get(endp), ps.get(endp + 3)) < elen2.getValue()) {
endp -= 3;
}
sp.plus(3).setStruct(ps.plus(endp).getStruct());
sp.plus(2).setStruct(ps.plus(endp+1).getStruct());
sp.plus(1).setStruct(ps.plus(endp+2).getStruct());
- sp.plus(0).setStruct(spl.getStruct("ep"));
+ sp.plus(0).setStruct(spl.ep);
/* ensure endpoint starts inside */
inside_context.setPtr("a.p", sp.plus(0).asPtr());
inside_context.setPtr("a.r", elen2.amp());
- bezier_clip(inside_context.amp(), function(arrows__c.class, "inside"), sp, NOT(false));
+ bezier_clip(inside_context, function(arrows__c.class, "inside"), sp, NOT(false));
ps.plus(endp).setStruct(sp.plus(3).getStruct());
ps.plus(endp+1).setStruct(sp.plus(2).getStruct());
ps.plus(endp+2).setStruct(sp.plus(1).getStruct());
@@ -968,28 +943,28 @@ LEAVING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip");
//3 q7y4oxn0paexbgynmtg2zmiv
// int arrowStartClip(edge_t* e, pointf * ps, int startp, int endp, bezier * spl, int sflag)
-public static int arrowStartClip(Agedge_s e, __ptr__ ps, int startp, int endp, bezier spl, int sflag) {
+public static int arrowStartClip(ST_Agedge_s e, ST_pointf.Array ps, int startp, int endp, ST_bezier spl, int sflag) {
ENTERING("q7y4oxn0paexbgynmtg2zmiv","arrowStartClip");
try {
- final __struct__<inside_t> inside_context = JUtils.from(inside_t.class);
- final __array_of_struct__ sp = __array_of_struct_impl__.malloc(pointf.class, 4);
+ final ST_inside_t inside_context = new ST_inside_t();
+ final ST_pointf.Array sp = new ST_pointf.Array( 4);
double slen;
MutableDouble slen2 = new MutableDouble(0);
slen = arrow_length(e, sflag);
slen2.setValue(slen * slen);
spl.setInt("sflag", sflag);
spl.setStruct("sp", ps.plus(startp).getStruct());
- if (endp > startp && DIST2(ps.plus(startp).getPtr(), ps.plus(startp + 3).getPtr()) < slen2.getValue()) {
+ if (endp > startp && DIST2(ps.get(startp), ps.get(startp + 3)) < slen2.getValue()) {
startp += 3;
}
sp.plus(0).setStruct(ps.plus(startp+3).getStruct());
sp.plus(1).setStruct(ps.plus(startp+2).getStruct());
sp.plus(2).setStruct(ps.plus(startp+1).getStruct());
- sp.plus(3).setStruct(spl.getStruct("sp"));
+ sp.plus(3).setStruct(spl.sp);
/* ensure endpoint starts inside */
inside_context.setPtr("a.p", sp.plus(3).asPtr());
inside_context.setPtr("a.r", slen2.amp());
- bezier_clip(inside_context.amp(), function(arrows__c.class, "inside"), sp, false);
+ bezier_clip(inside_context, function(arrows__c.class, "inside"), sp, false);
ps.plus(startp).setStruct(sp.plus(3).getStruct());
ps.plus(startp+1).setStruct(sp.plus(2).getStruct());
ps.plus(startp+2).setStruct(sp.plus(1).getStruct());
diff --git a/src/gen/lib/common/ellipse__c.java b/src/gen/lib/common/ellipse__c.java
index c467707..52682e4 100644
--- a/src/gen/lib/common/ellipse__c.java
+++ b/src/gen/lib/common/ellipse__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class ellipse__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/emit__c.java b/src/gen/lib/common/emit__c.java
index 03a0459..88249d7 100644
--- a/src/gen/lib/common/emit__c.java
+++ b/src/gen/lib/common/emit__c.java
@@ -51,16 +51,12 @@ import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h.boxf;
-import h.pointf;
+import h.ST_Agraph_s;
+import h.ST_boxf;
+import h.ST_pointf;
import h.xdot;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class emit__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -320,14 +316,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -356,25 +352,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -398,16 +375,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -704,7 +681,7 @@ throw new UnsupportedOperationException();
//3 7udip7yo3ddkp9ocjftokpm9y
// void* init_xdot (Agraph_t* g)
-public static __ptr__ init_xdot(Agraph_s g) {
+public static __ptr__ init_xdot(ST_Agraph_s g) {
ENTERING("7udip7yo3ddkp9ocjftokpm9y","init_xdot");
try {
CString p;
@@ -1401,8 +1378,8 @@ throw new UnsupportedOperationException();
public static boolean check_control_points(__ptr__ cp) {
ENTERING("7nqmdkcnal35ollpstkk707t8","check_control_points");
try {
- double dis1 = ptToLine2 (cp.plus(0).getStruct(), cp.plus(3).getStruct(), cp.plus(1).getStruct());
- double dis2 = ptToLine2 (cp.plus(0).getStruct(), cp.plus(3).getStruct(), cp.plus(2).getStruct());
+ double dis1 = ptToLine2 ((ST_pointf)cp.plus(0).getStruct(), (ST_pointf)cp.plus(3).getStruct(), (ST_pointf)cp.plus(1).getStruct());
+ double dis2 = ptToLine2 ((ST_pointf)cp.plus(0).getStruct(), (ST_pointf)cp.plus(3).getStruct(), (ST_pointf)cp.plus(2).getStruct());
if (dis1 < 2.0*2.0 && dis2 < 2.0*2.0)
return true;
else
@@ -1417,36 +1394,36 @@ LEAVING("7nqmdkcnal35ollpstkk707t8","check_control_points");
//3 5wldemr88fdxl6101ugewclw9
// void update_bb_bz(boxf *bb, pointf *cp)
-public static void update_bb_bz(__ptr__ bb, __array_of_struct__ cp) {
+public static void update_bb_bz(ST_boxf bb, ST_pointf.Array cp) {
ENTERING("5wldemr88fdxl6101ugewclw9","update_bb_bz");
try {
/* if any control point of the segment is outside the bounding box */
- if (cp.plus(0).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(0).getDouble("x") < bb.getStruct("LL").getDouble("x") ||
- cp.plus(0).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(0).getDouble("y") < bb.getStruct("LL").getDouble("y") ||
- cp.plus(1).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(1).getDouble("x") < bb.getStruct("LL").getDouble("x") ||
- cp.plus(1).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(1).getDouble("y") < bb.getStruct("LL").getDouble("y") ||
- cp.plus(2).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(2).getDouble("x") < bb.getStruct("LL").getDouble("x") ||
- cp.plus(2).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(2).getDouble("y") < bb.getStruct("LL").getDouble("y") ||
- cp.plus(3).getDouble("x") > bb.getStruct("UR").getDouble("x") || cp.plus(3).getDouble("x") < bb.getStruct("LL").getDouble("x") ||
- cp.plus(3).getDouble("y") > bb.getStruct("UR").getDouble("y") || cp.plus(3).getDouble("y") < bb.getStruct("LL").getDouble("y")) {
+ if (cp.get(0).x > bb.UR.x || cp.get(0).x < bb.LL.x ||
+ cp.get(0).y > bb.UR.y || cp.get(0).y < bb.LL.y ||
+ cp.get(1).x > bb.UR.x || cp.get(1).x < bb.LL.x ||
+ cp.get(1).y > bb.UR.y || cp.get(1).y < bb.LL.y ||
+ cp.get(2).x > bb.UR.x || cp.get(2).x < bb.LL.x ||
+ cp.get(2).y > bb.UR.y || cp.get(2).y < bb.LL.y ||
+ cp.get(3).x > bb.UR.x || cp.get(3).x < bb.LL.x ||
+ cp.get(3).y > bb.UR.y || cp.get(3).y < bb.LL.y) {
/* if the segment is sufficiently refined */
if (check_control_points(cp.asPtr())) {
int i;
/* expand the bounding box */
for (i = 0; i < 4; i++) {
- if (cp.plus(i).getDouble("x") > bb.getStruct("UR").getDouble("x"))
- bb.getStruct("UR").setDouble("x", cp.plus(i).getDouble("x"));
- else if (cp.plus(i).getDouble("x") < bb.getStruct("LL").getDouble("x"))
- bb.getStruct("LL").setDouble("x", cp.plus(i).getDouble("x"));
- if (cp.plus(i).getDouble("y") > bb.getStruct("UR").getDouble("y"))
- bb.getStruct("UR").setDouble("y", cp.plus(i).getDouble("y"));
- else if (cp.plus(i).getDouble("y") < bb.getStruct("LL").getDouble("y"))
- bb.getStruct("LL").setDouble("y", cp.plus(i).getDouble("y"));
+ if (cp.get(i).x > bb.UR.x)
+ bb.UR.setDouble("x", cp.get(i).x);
+ else if (cp.get(i).x < bb.LL.x)
+ bb.LL.setDouble("x", cp.get(i).x);
+ if (cp.get(i).y > bb.UR.y)
+ bb.UR.setDouble("y", cp.get(i).y);
+ else if (cp.get(i).y < bb.LL.y)
+ bb.LL.setDouble("y", cp.get(i).y);
}
}
else { /* else refine the segment */
- final __array_of_struct__ left = __array_of_struct_impl__.malloc(pointf.class, 4);
- final __array_of_struct__ right = __array_of_struct_impl__.malloc(pointf.class, 4);
+ final ST_pointf.Array left = new ST_pointf.Array( 4);
+ final ST_pointf.Array right = new ST_pointf.Array( 4);
Bezier (cp, 3, 0.5, left.asPtr(), right.asPtr());
update_bb_bz(bb, left);
update_bb_bz(bb, right);
diff --git a/src/gen/lib/common/geom__c.java b/src/gen/lib/common/geom__c.java
index 85533ef..bf5a7de 100644
--- a/src/gen/lib/common/geom__c.java
+++ b/src/gen/lib/common/geom__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class geom__c {
@@ -74,14 +71,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -110,25 +107,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -152,16 +130,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -637,11 +615,11 @@ throw new UnsupportedOperationException();
//3 3aiyj7urv33rvps5ds204tciu
// static pointf rotatepf(pointf p, int cwrot)
-public static __struct__<pointf> rotatepf(final __struct__<pointf> p, int cwrot) {
+public static ST_pointf rotatepf(final ST_pointf p, int cwrot) {
// WARNING!! STRUCT
return rotatepf_w_(p.copy(), cwrot).copy();
}
-private static __struct__<pointf> rotatepf_w_(final __struct__<pointf> p, int cwrot) {
+private static ST_pointf rotatepf_w_(final ST_pointf p, int cwrot) {
ENTERING("3aiyj7urv33rvps5ds204tciu","rotatepf");
try {
UNSUPPORTED("adzi0wztceimu4ni3aonznmq7"); // static pointf rotatepf(pointf p, int cwrot)
@@ -726,14 +704,14 @@ throw new UnsupportedOperationException();
//3 5q8h2tm3jifiasn423wrm0y60
// pointf cwrotatepf(pointf p, int cwrot)
-public static __struct__<pointf> cwrotatepf(final __struct__<pointf> p, int cwrot) {
+public static ST_pointf cwrotatepf(final ST_pointf p, int cwrot) {
// WARNING!! STRUCT
return cwrotatepf_w_(p.copy(), cwrot).copy();
}
-private static __struct__<pointf> cwrotatepf_w_(final __struct__<pointf> p, int cwrot) {
+private static ST_pointf cwrotatepf_w_(final ST_pointf p, int cwrot) {
ENTERING("5q8h2tm3jifiasn423wrm0y60","cwrotatepf");
try {
- double x = p.getDouble("x"), y = p.getDouble("y");
+ double x = p.x, y = p.y;
switch (cwrot) {
case 0:
break;
@@ -804,14 +782,14 @@ throw new UnsupportedOperationException();
//3 6np74e9pfmv8uek8irqru2tma
// pointf ccwrotatepf(pointf p, int ccwrot)
-public static __struct__<pointf> ccwrotatepf(final __struct__<pointf> p, int ccwrot) {
+public static ST_pointf ccwrotatepf(final ST_pointf p, int ccwrot) {
// WARNING!! STRUCT
return ccwrotatepf_w_(p.copy(), ccwrot).copy();
}
-private static __struct__<pointf> ccwrotatepf_w_(final __struct__<pointf> p, int ccwrot) {
+private static ST_pointf ccwrotatepf_w_(final ST_pointf p, int ccwrot) {
ENTERING("6np74e9pfmv8uek8irqru2tma","ccwrotatepf");
try {
- double x = p.getDouble("x"), y = p.getDouble("y");
+ double x = p.x, y = p.y;
switch (ccwrot) {
case 0:
break;
@@ -895,16 +873,16 @@ throw new UnsupportedOperationException();
//3 90k9l4o3khu3dw0fzkrcd97nk
// double ptToLine2 (pointf a, pointf b, pointf p)
-public static double ptToLine2(final __struct__<pointf> a, final __struct__<pointf> b, final __struct__<pointf> p) {
+public static double ptToLine2(final ST_pointf a, final ST_pointf b, final ST_pointf p) {
// WARNING!! STRUCT
return ptToLine2_w_(a.copy(), b.copy(), p.copy());
}
-private static double ptToLine2_w_(final __struct__<pointf> a, final __struct__<pointf> b, final __struct__<pointf> p) {
+private static double ptToLine2_w_(final ST_pointf a, final ST_pointf b, final ST_pointf p) {
ENTERING("90k9l4o3khu3dw0fzkrcd97nk","ptToLine2");
try {
- double dx = b.getDouble("x")-a.getDouble("x");
- double dy = b.getDouble("y")-a.getDouble("y");
- double a2 = (p.getDouble("y")-a.getDouble("y"))*dx - (p.getDouble("x")-a.getDouble("x"))*dy;
+ double dx = b.x-a.x;
+ double dy = b.y-a.y;
+ double a2 = (p.y-a.y)*dx - (p.x-a.x)*dy;
a2 *= a2; /* square - ensures that it is positive */
if (a2 < 0.0000000001) return 0.; /* avoid 0/0 problems */
return a2 / (dx*dx + dy*dy);
diff --git a/src/gen/lib/common/globals__c.java b/src/gen/lib/common/globals__c.java
index 4ec9eb0..32b3263 100644
--- a/src/gen/lib/common/globals__c.java
+++ b/src/gen/lib/common/globals__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class globals__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -338,14 +335,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -374,25 +371,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -416,16 +394,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/htmllex__c.java b/src/gen/lib/common/htmllex__c.java
index 9c56dd2..b3911a7 100644
--- a/src/gen/lib/common/htmllex__c.java
+++ b/src/gen/lib/common/htmllex__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class htmllex__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/htmlparse__c.java b/src/gen/lib/common/htmlparse__c.java
index 1f616a6..0f064c4 100644
--- a/src/gen/lib/common/htmlparse__c.java
+++ b/src/gen/lib/common/htmlparse__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class htmlparse__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/htmltable__c.java b/src/gen/lib/common/htmltable__c.java
index 7d66336..7881482 100644
--- a/src/gen/lib/common/htmltable__c.java
+++ b/src/gen/lib/common/htmltable__c.java
@@ -47,12 +47,9 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import h.textlabel_t;
-import smetana.core.JUtils;
+import h.ST_pointf;
+import h.ST_textlabel_t;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class htmltable__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -312,14 +309,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -348,25 +345,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -390,16 +368,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -2676,7 +2654,7 @@ throw new UnsupportedOperationException();
//3 39z2hrj2uwkezxobreqxpgb10
// int make_html_label(void *obj, textlabel_t * lp)
-public static int make_html_label(__ptr__ obj, textlabel_t lp) {
+public static int make_html_label(__ptr__ obj, ST_textlabel_t lp) {
ENTERING("39z2hrj2uwkezxobreqxpgb10","make_html_label");
try {
UNSUPPORTED("3s2xr5n4swgcjctfsv6qg00p1"); // int make_html_label(void *obj, textlabel_t * lp)
diff --git a/src/gen/lib/common/input__c.java b/src/gen/lib/common/input__c.java
index 115d98b..75bb0db 100644
--- a/src/gen/lib/common/input__c.java
+++ b/src/gen/lib/common/input__c.java
@@ -51,7 +51,6 @@ import static gen.lib.cgraph.refstr__c.aghtmlstr;
import static gen.lib.common.emit__c.init_xdot;
import static gen.lib.common.labels__c.make_label;
import static gen.lib.common.labels__c.strdup_and_subst_obj;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.utils__c.late_double;
import static gen.lib.common.utils__c.late_int;
import static gen.lib.common.utils__c.late_nnstring;
@@ -64,7 +63,6 @@ import static smetana.core.JUtils.atof;
import static smetana.core.JUtils.atoi;
import static smetana.core.JUtils.enumAsInt;
import static smetana.core.JUtils.getenv;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtils.strstr;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
@@ -87,15 +85,12 @@ import static smetana.core.Macro.GD_showboxes;
import static smetana.core.Macro.N;
import static smetana.core.Macro.ROUND;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h.boxf;
+import h.ST_Agraph_s;
+import h.ST_layout_t;
+import h.ST_pointf;
import h.fontname_kind;
-import h.layout_t;
-import h.pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Z;
-import smetana.core.__struct__;
public class input__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -355,14 +350,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -391,25 +386,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -433,16 +409,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -1165,7 +1141,7 @@ throw new UnsupportedOperationException();
//3 72no6ayfvjinlnupyn5jlmayg
// static boolean getdoubles2ptf(graph_t * g, char *name, pointf * result)
-public static boolean getdoubles2ptf(Agraph_s g, CString name, pointf result) {
+public static boolean getdoubles2ptf(ST_Agraph_s g, CString name, ST_pointf result) {
ENTERING("72no6ayfvjinlnupyn5jlmayg","getdoubles2ptf");
try {
CString p;
@@ -1268,7 +1244,7 @@ throw new UnsupportedOperationException();
//3 9t08dr2ks9qz1pyfz99awla6x
// static int findCharset (graph_t * g)
-public static int findCharset(Agraph_s g) {
+public static int findCharset(ST_Agraph_s g) {
ENTERING("9t08dr2ks9qz1pyfz99awla6x","findCharset");
try {
return 0;
@@ -1282,7 +1258,7 @@ LEAVING("9t08dr2ks9qz1pyfz99awla6x","findCharset");
//3 3bnmjpvynh1j9oh2p2vi0vh2m
// static void setRatio(graph_t * g)
-public static void setRatio(Agraph_s g) {
+public static void setRatio(ST_Agraph_s g) {
ENTERING("3bnmjpvynh1j9oh2p2vi0vh2m","setRatio");
try {
CString p;
@@ -1324,20 +1300,20 @@ LEAVING("3bnmjpvynh1j9oh2p2vi0vh2m","setRatio");
-//3 8gzdr3oil2d0e2o7m84wsszfg
-// void graph_init(graph_t * g, boolean use_rankdir)
static CString rankname[] = new CString[] { new CString("local"), new CString("global"), new CString("none"), null };
static int rankcode[] = { 100, 101, 102, 100 };
static CString fontnamenames[] = new CString[] {new CString("gd"),new CString("ps"),new CString("svg"), null};
static int fontnamecodes[] = {enumAsInt(fontname_kind.class, "NATIVEFONTS"),enumAsInt(fontname_kind.class, "PSFONTS"),
enumAsInt(fontname_kind.class, "SVGFONTS"),-1};
-public static void graph_init(Agraph_s g, boolean use_rankdir) {
+//3 8gzdr3oil2d0e2o7m84wsszfg
+//void graph_init(graph_t * g, boolean use_rankdir)
+public static void graph_init(ST_Agraph_s g, boolean use_rankdir) {
ENTERING("8gzdr3oil2d0e2o7m84wsszfg","graph_init");
try {
CString p;
double xf;
int rankdir;
- GD_drawing(g, zmalloc(sizeof(layout_t.class)));
+ GD_drawing(g, new ST_layout_t());
/* set this up fairly early in case any string sizes are needed */
if ((p = agget(g, new CString("fontpath")))!=null || (p = getenv(new CString("DOTFONTPATH")))!=null) {
UNSUPPORTED("81bz3jcukzyotxiqgrlhn9cbq"); // /* overide GDFONTPATH in local environment if dot
@@ -1395,16 +1371,16 @@ UNSUPPORTED("dhhbmqv6n01j1eeyy7fpus1xw"); // xf = 0.02;
p = late_string(g, (agattr(g,AGRAPH,new CString("fontnames"),null)), null);
GD_fontnames(g, maptoken(p, fontnamenames, fontnamecodes));
setRatio(g);
- GD_drawing(g).setBoolean("filled",
- getdoubles2ptf(g, new CString("size"), (pointf) GD_drawing(g).getStruct("size").amp()));
- getdoubles2ptf(g, new CString("page"), GD_drawing(g).getStruct("page").amp());
- GD_drawing(g).setBoolean("centered", mapbool(agget(g, new CString("center"))));
+ GD_drawing(g).filled =
+ getdoubles2ptf(g, new CString("size"), (ST_pointf) GD_drawing(g).size);
+ getdoubles2ptf(g, new CString("page"), (ST_pointf) GD_drawing(g).page);
+ GD_drawing(g).centered = mapbool(agget(g, new CString("center")));
if ((p = agget(g, new CString("rotate")))!=null)
- GD_drawing(g).setBoolean("landscape", (atoi(p) == 90));
+ GD_drawing(g).landscape= (atoi(p) == 90);
else if ((p = agget(g, new CString("orientation")))!=null)
- GD_drawing(g).setBoolean("landscape", ((p.charAt(0) == 'l') || (p.charAt(0) == 'L')));
+ GD_drawing(g).landscape= ((p.charAt(0) == 'l') || (p.charAt(0) == 'L'));
else if ((p = agget(g, new CString("landscape")))!=null)
- GD_drawing(g).setBoolean("landscape", mapbool(p));
+ GD_drawing(g).landscape= mapbool(p);
p = agget(g, new CString("clusterrank"));
Z.z().CL_type = maptoken(p, rankname, rankcode);
p = agget(g, new CString("concentrate"));
@@ -1555,7 +1531,7 @@ throw new UnsupportedOperationException();
//3 5vks1zdadu5vjinaivs0j2bkb
// void do_graph_label(graph_t * sg)
-public static void do_graph_label(Agraph_s sg) {
+public static void do_graph_label(ST_Agraph_s sg) {
ENTERING("5vks1zdadu5vjinaivs0j2bkb","do_graph_label");
try {
CString str, pos, just;
@@ -1563,8 +1539,8 @@ try {
/* it would be nice to allow multiple graph labels in the future */
if ((str = agget(sg, new CString("label")))!=null && (str.charAt(0) != '\0')) {
char pos_flag=0;
- final __struct__<pointf> dimen = JUtils.from(pointf.class);
- GD_has_labels(sg.getPtr("root"), GD_has_labels(sg.getPtr("root")) | (1 << 3));
+ final ST_pointf dimen = new ST_pointf();
+ GD_has_labels(sg.root, GD_has_labels(sg.root) | (1 << 3));
GD_label(sg, make_label(sg, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)),
late_double(sg, (agattr(sg,AGRAPH,new CString("fontsize"),null)),
14.0, 1.0),
@@ -1597,15 +1573,15 @@ UNSUPPORTED("evu9w6pw3kkh7z8w7t4rx4qxc"); // pos_flag |= 4;
return;
/* Set border information for cluster labels to allow space
*/
- dimen.___(GD_label(sg).getStruct("dimen"));
- dimen.setDouble("x", dimen.getDouble("x") + 4*4);
- dimen.setDouble("y", dimen.getDouble("y") + 2*4);
+ dimen.___(GD_label(sg).dimen);
+ dimen.setDouble("x", dimen.x + 4*4);
+ dimen.setDouble("y", dimen.y + 2*4);
if (N(GD_flip(agroot(sg)))) {
if ((GD_label_pos(sg) & 1)!=0)
pos_ix = 2;
else
pos_ix = 0;
- GD_border(sg).plus(pos_ix).setStruct(dimen);
+ GD_border(sg)[pos_ix].___(dimen);
} else {
/* when rotated, the labels will be restored to TOP or BOTTOM */
UNSUPPORTED("cabz6xbjdvz5vmjulzrhlxh48"); // if ((((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->label_pos) & 1)
diff --git a/src/gen/lib/common/labels__c.java b/src/gen/lib/common/labels__c.java
index 824601b..301eb8f 100644
--- a/src/gen/lib/common/labels__c.java
+++ b/src/gen/lib/common/labels__c.java
@@ -67,28 +67,25 @@ import static smetana.core.Macro.GD_label;
import static smetana.core.Macro.MAX;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import static smetana.core.Macro.ZALLOC;
+import static smetana.core.Macro.ZALLOC_ST_textspan_t;
import static smetana.core.Macro.agtail;
import static smetana.core.Macro.hackInitDimensionFromLabel;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.Agobj_s;
-import h.Agraph_s;
-import h.Agraphinfo_t;
-import h.GVC_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
+import h.ST_Agraphinfo_t;
+import h.ST_Agrec_s;
+import h.ST_GVC_s;
import h.ST_pointf;
import h.ST_port;
-import h.boxf;
-import h.pointf;
-import h.textlabel_t;
-import h.textspan_t;
+import h.ST_textlabel_t;
+import h.ST_textspan_t;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class labels__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -348,14 +345,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -384,25 +381,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -426,16 +404,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -733,36 +711,36 @@ throw new UnsupportedOperationException();
//3 4wkeqik2dt7ecr64ej6ltbnvb
// static void storeline(GVC_t *gvc, textlabel_t *lp, char *line, char terminator)
//private static __struct__<textfont_t> tf = JUtils.from(textfont_t.class);
-public static void storeline(GVC_s gvc, textlabel_t lp, CString line, char terminator) {
+public static void storeline(ST_GVC_s gvc, ST_textlabel_t lp, CString line, char terminator) {
ENTERING("4wkeqik2dt7ecr64ej6ltbnvb","storeline");
try {
- final __struct__<pointf> size = JUtils.from(pointf.class);
- __ptr__ span = null;
- int oldsz = lp.getInt("u.txt.nspans") + 1;
- lp.setPtr("u.txt.span", ZALLOC(oldsz + 1, lp.getPtr("u.txt.span"), textspan_t.class, oldsz));
- span = lp.getPtr("u.txt.span").plus(lp.getInt("u.txt.nspans"));
- span.setPtr("str", line);
- span.setInt("just", terminator);
+ final ST_pointf size = new ST_pointf();
+ ST_textspan_t span = null;
+ int oldsz = lp.nspans + 1;
+ lp.span = ZALLOC_ST_textspan_t((ST_textspan_t.Array) lp.span, oldsz + 1);
+ span = lp.span.get(lp.nspans);
+ span.str = line;
+ span.just = terminator;
if (line!=null && line.charAt(0)!='\0') {
- Z.z().tf.setPtr("name", lp.getPtr("fontname"));
- Z.z().tf.setDouble("size", lp.getDouble("fontsize"));
+ Z.z().tf.name = lp.fontname;
+ Z.z().tf.size = lp.fontsize;
// WE CHEAT
- ((ST_pointf) size).x = 0.0;
- ((ST_pointf) size).y = (int)(lp.getDouble("fontsize") * 1.20);
+ size.x = 0.0;
+ size.y = (int)(lp.fontsize * 1.20);
hackInitDimensionFromLabel(size, line.getContent());
- ((ST_pointf) span.getStruct("size")).y = (int)size.getDouble("y");
+ span.size.y = (int)size.y;
}
else {
System.err.println("YOU SHOULD NOT SEE THAT");
- ((ST_pointf) size).x = 0.0;
- ((ST_pointf) size).y = (int)(lp.getDouble("fontsize") * 1.20);
- span.getStruct("size").setDouble("y", (int)(lp.getDouble("fontsize") * 1.20));
+ size.x = 0.0;
+ size.y = (int)(lp.fontsize * 1.20);
+ span.size.y = (int)(lp.fontsize * 1.20);
}
- lp.setInt("u.txt.nspans", lp.getInt("u.txt.nspans") + 1);
+ lp.nspans = lp.nspans + 1;
/* width = max line width */
- ((ST_pointf) lp.getStruct("dimen")).x = MAX(lp.getStruct("dimen").getDouble("x"), size.getDouble("x"));
+ lp.dimen.x = MAX(lp.dimen.x, size.x);
/* accumulate height */
- ((ST_pointf) lp.getStruct("dimen")).y = lp.getStruct("dimen").getDouble("y") + size.getDouble("y");
+ lp.dimen.y = lp.dimen.y + size.y;
} finally {
LEAVING("4wkeqik2dt7ecr64ej6ltbnvb","storeline");
}
@@ -773,14 +751,14 @@ LEAVING("4wkeqik2dt7ecr64ej6ltbnvb","storeline");
//3 22ar72ye93a8ntj8pagnt5b5k
// void make_simple_label(GVC_t * gvc, textlabel_t * lp)
-public static void make_simple_label(GVC_s gvc, textlabel_t lp) {
+public static void make_simple_label(ST_GVC_s gvc, ST_textlabel_t lp) {
ENTERING("22ar72ye93a8ntj8pagnt5b5k","make_simple_label");
try {
char c;
- CString p, line, lineptr, str = lp.getCString("text");
+ CString p, line, lineptr, str = lp.text;
char bytee = 0x00;
- ((ST_pointf) lp.getStruct("dimen")).x = 0.0;
- ((ST_pointf) lp.getStruct("dimen")).y = 0.0;
+ ((ST_pointf) lp.dimen).x = 0.0;
+ ((ST_pointf) lp.dimen).y = 0.0;
if (str.charAt(0) == '\0')
return;
line = lineptr = null;
@@ -795,7 +773,7 @@ try {
* the second in 0x40-0x7e or 0xa1-0xfe. We assume that the input
* is well-formed, but check that we don't go past the ending '\0'.
*/
- if ((lp.getInt("charset") == 2) && 0xA1 <= bytee && bytee <= 0xFE) {
+ if ((lp.charset == 2) && 0xA1 <= bytee && bytee <= 0xFE) {
UNSUPPORTED("6la63t1mnqv30shyyp3yfroxb"); // *lineptr++ = c;
UNSUPPORTED("ebmmarxykvf76hmfmjuk0ssjz"); // c = *p++;
UNSUPPORTED("6la63t1mnqv30shyyp3yfroxb"); // *lineptr++ = c;
@@ -835,7 +813,7 @@ UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break;
lineptr = lineptr.plus(1);
storeline(gvc, lp, line, 'n');
}
- lp.setStruct("space", lp.getStruct("dimen"));
+ lp.setStruct("space", lp.dimen);
} finally {
LEAVING("22ar72ye93a8ntj8pagnt5b5k","make_simple_label");
}
@@ -846,41 +824,41 @@ LEAVING("22ar72ye93a8ntj8pagnt5b5k","make_simple_label");
//3 ecq5lydlrjrlaz8o6vm6svc8i
// textlabel_t *make_label(void *obj, char *str, int kind, double fontsize, char *fontname, char *fontcolor)
-public static textlabel_t make_label(__ptr__ obj, CString str, int kind, double fontsize, CString fontname, CString fontcolor) {
+public static ST_textlabel_t make_label(__ptr__ obj, CString str, int kind, double fontsize, CString fontname, CString fontcolor) {
ENTERING("ecq5lydlrjrlaz8o6vm6svc8i","make_label");
try {
- textlabel_t rv = (textlabel_t) Memory.malloc(textlabel_t.class);
- Agraph_s g = null, sg = null;
- Agnode_s n = null;
- Agedge_s e = null;
+ ST_textlabel_t rv = new ST_textlabel_t();
+ ST_Agraph_s g = null, sg = null;
+ ST_Agnode_s n = null;
+ ST_Agedge_s e = null;
CString s = null;
switch (agobjkind(obj)) {
case AGRAPH:
- sg = (Agraph_s)obj;
- g = (Agraph_s) sg.getPtr("root");
+ sg = (ST_Agraph_s)obj;
+ g = (ST_Agraph_s) sg.root;
break;
case AGNODE:
- n = (Agnode_s)obj.castTo(Agnode_s.class);
+ n = (ST_Agnode_s)obj.castTo(ST_Agnode_s.class);
g = agroot(agraphof(n));
break;
case AGEDGE:
- e = (Agedge_s)obj.castTo(Agedge_s.class);
+ e = (ST_Agedge_s)obj.castTo(ST_Agedge_s.class);
g = agroot(agraphof(aghead(e)));
break;
}
rv.setPtr("fontname", fontname);
rv.setPtr("fontcolor", fontcolor);
rv.setDouble("fontsize", fontsize);
- rv.setInt("charset", g.castTo(Agobj_s.class).getPtr("data").castTo(Agraphinfo_t.class).getInt("charset"));
+ rv.charset = ((ST_Agraphinfo_t)g.castTo_ST_Agobj_s().data.castTo(ST_Agraphinfo_t.class)).charset;
if ((kind & (2 << 1))!=0) {
rv.setPtr("text", str.strdup());
if ((kind & (1 << 1))!=0) {
- rv.setBoolean("html", (N(0)));
+ rv.html = (N(0));
}
}
else if (kind == (1 << 1)) {
rv.setPtr("text", str.strdup());
- rv.setBoolean("html", N(0));
+ rv.html = N(0);
if (make_html_label(obj, rv)!=0) {
switch (agobjkind(obj)) {
case AGRAPH:
@@ -902,17 +880,17 @@ try {
* sequences (\n, \l, \r) are processed in make_simple_label. That call also replaces \\ with \.
*/
rv.setPtr("text", strdup_and_subst_obj0(str, obj, 0));
- switch (rv.getInt("charset")) {
+ switch (rv.charset) {
case 1:
UNSUPPORTED("s = latin1ToUTF8(rv->text);");
break;
default: /* UTF8 */
- s = htmlEntityUTF8(rv.getCString("text"), g);
+ s = htmlEntityUTF8(rv.text, g);
break;
}
- Memory.free(rv.getPtr("text"));
+ Memory.free(rv.text);
rv.setPtr("text", s);
- make_simple_label((GVC_s) g.castTo(Agobj_s.class).getPtr("data").castTo(Agraphinfo_t.class).getPtr("gvc"), rv);
+ make_simple_label(g.castTo_ST_Agobj_s().data.castTo_ST_Agraphinfo_t().gvc, rv);
}
return rv;
} finally {
@@ -1044,51 +1022,51 @@ try {
tp_len = 0, hp_len = 0;
int newlen = 0;
int isEdge = 0;
- textlabel_t tl;
+ ST_textlabel_t tl;
final ST_port pt = new ST_port();
/* prepare substitution strings */
switch (agobjkind(obj)) {
case AGRAPH:
- g_str = agnameof((Agraph_s)obj);
+ g_str = agnameof((ST_Agraph_s)obj);
g_len = strlen(g_str);
- tl = GD_label((Agraph_s)obj);
+ tl = GD_label((ST_Agraph_s)obj);
if (tl!=null) {
- l_str = tl.getCString("text");
+ l_str = tl.text;
if (str!=null) l_len = strlen(l_str);
}
break;
case AGNODE:
- g_str = agnameof(agraphof(obj.castTo(Agnode_s.class)));
+ g_str = agnameof(agraphof(obj.castTo(ST_Agnode_s.class)));
g_len = strlen(g_str);
- n_str = agnameof(obj.castTo(Agnode_s.class));
+ n_str = agnameof(obj.castTo(ST_Agnode_s.class));
n_len = strlen(n_str);
- tl = (textlabel_t) obj.castTo(Agnode_s.class).castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label");
+ tl = (ST_textlabel_t) ((ST_Agnode_s)obj.castTo(ST_Agnode_s.class)).castTo_ST_Agobj_s().data.castTo_ST_Agnodeinfo_t().label;
if (tl!=null) {
- l_str = tl.getCString("text");
+ l_str = tl.text;
if (str!=null) l_len = strlen(l_str);
}
break;
case AGEDGE:
isEdge = 1;
- g_str = agnameof(agroot(agraphof(agtail((obj.castTo(Agedge_s.class))))));
+ g_str = agnameof(agroot(agraphof(agtail((obj.castTo(ST_Agedge_s.class))))));
g_len = strlen(g_str);
- t_str = agnameof(agtail((obj.castTo(Agedge_s.class))));
+ t_str = agnameof(agtail((obj.castTo(ST_Agedge_s.class))));
t_len = strlen(t_str);
- pt.___(ED_tail_port(obj.castTo(Agedge_s.class)));
+ pt.___(ED_tail_port(obj.castTo(ST_Agedge_s.class)));
if ((tp_str = pt.name)!=null)
tp_len = strlen(tp_str);
- h_str = agnameof(aghead((obj.castTo(Agedge_s.class))));
+ h_str = agnameof(aghead((obj.castTo(ST_Agedge_s.class))));
h_len = strlen(h_str);
- pt.___(ED_head_port(obj.castTo(Agedge_s.class)));
+ pt.___(ED_head_port(obj.castTo(ST_Agedge_s.class)));
if ((hp_str = pt.name)!=null)
hp_len = strlen(hp_str);
h_len = strlen(h_str);
- tl = ED_label(obj.castTo(Agedge_s.class));
+ tl = ED_label(obj.castTo(ST_Agedge_s.class));
if (tl!=null) {
- l_str = tl.getCString("text");
+ l_str = tl.text;
if (str!=null) l_len = strlen(l_str);
}
- if (agisdirected(agroot(agraphof(agtail((obj.castTo(Agedge_s.class)))))))
+ if (agisdirected(agroot(agraphof(agtail((obj.castTo(ST_Agedge_s.class)))))))
e_str = new CString("->");
else
e_str = new CString("--");
diff --git a/src/gen/lib/common/memory__c.java b/src/gen/lib/common/memory__c.java
index 9e748a5..67913a5 100644
--- a/src/gen/lib/common/memory__c.java
+++ b/src/gen/lib/common/memory__c.java
@@ -95,11 +95,11 @@ throw new UnsupportedOperationException();
-//3 4mfikqpmxyxrke46i5xakatmc
-// void *gmalloc(size_t nbytes)
public static CString gmalloc(int nbytes) {
return new CString(nbytes);
}
+//3 4mfikqpmxyxrke46i5xakatmc
+//void *gmalloc(size_t nbytes)
public static __ptr__ gmalloc(size_t nbytes) {
ENTERING("4mfikqpmxyxrke46i5xakatmc","gmalloc");
try {
diff --git a/src/gen/lib/common/ns__c.java b/src/gen/lib/common/ns__c.java
index b22bb7a..395db0d 100644
--- a/src/gen/lib/common/ns__c.java
+++ b/src/gen/lib/common/ns__c.java
@@ -57,10 +57,8 @@ import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtils.atoi;
import static smetana.core.JUtils.setjmp;
import static smetana.core.JUtils.size_t_array_of_integer;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
-import static smetana.core.Macro.ALLOC_empty;
import static smetana.core.Macro.ED_cutvalue;
import static smetana.core.Macro.ED_minlen;
import static smetana.core.Macro.ED_tree_index;
@@ -88,18 +86,15 @@ import static smetana.core.Macro.SLACK;
import static smetana.core.Macro.TREE_EDGE;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.Macro.free_list;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.nodequeue;
-import h.pointf;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_nodequeue;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
import smetana.core.jmp_buf;
public class ns__c {
@@ -360,14 +355,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -396,26 +391,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -438,16 +413,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -775,10 +750,10 @@ private static jmp_buf jbuf = new jmp_buf();
//3 6au5htcaxhw0blmx5c48v03u0
// static void add_tree_edge(edge_t * e)
-public static void add_tree_edge(Agedge_s e) {
+public static void add_tree_edge(ST_Agedge_s e) {
ENTERING("6au5htcaxhw0blmx5c48v03u0","add_tree_edge");
try {
- Agnode_s n;
+ ST_Agnode_s n;
if (TREE_EDGE(e)) {
UNSUPPORTED("cq4nqjjxvb0dtdfy4c7pwpqai"); // agerr(AGERR, "add_tree_edge: missing tree edge\n");
UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1);
@@ -829,11 +804,11 @@ LEAVING("6au5htcaxhw0blmx5c48v03u0","add_tree_edge");
//3 9b7b78pmafynmvffztrqnlxtn
// static void exchange_tree_edges(edge_t * e, edge_t * f)
-public static void exchange_tree_edges(Agedge_s e, Agedge_s f) {
+public static void exchange_tree_edges(ST_Agedge_s e, ST_Agedge_s f) {
ENTERING("9b7b78pmafynmvffztrqnlxtn","exchange_tree_edges");
try {
int i, j;
- Agnode_s n;
+ ST_Agnode_s n;
ED_tree_index(f, ED_tree_index(e));
Z.z().Tree_edge.setInList(ED_tree_index(e), f);
ED_tree_index(e, -1);
@@ -875,9 +850,9 @@ public static void init_rank() {
ENTERING("dbxco6m0mabzhsqfo3pb8nctk","init_rank");
try {
int i, ctr;
- nodequeue Q;
- Agnode_s v;
- Agedge_s e;
+ ST_nodequeue Q;
+ ST_Agnode_s v;
+ ST_Agedge_s e;
Q = new_queue(Z.z().N_nodes);
ctr = 0;
for (v = GD_nlist(Z.z().G_ns); v!=null; v = ND_next(v)) {
@@ -887,9 +862,9 @@ try {
while ((v = dequeue(Q))!=null) {
ND_rank(v, 0);
ctr++;
- for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_in(v).getFromList(i))!=null; i++)
ND_rank(v, MAX(ND_rank(v), ND_rank(agtail(e)) + ED_minlen(e)));
- for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
ND_priority(aghead(e), ND_priority(aghead(e)) -1 );
if ((ND_priority(aghead(e))) <= 0)
enqueue(Q, aghead(e));
@@ -912,7 +887,7 @@ LEAVING("dbxco6m0mabzhsqfo3pb8nctk","init_rank");
//3 bj7ux5kz8ls2lnfh0ix6i00b9
// static node_t *incident(edge_t * e)
-public static Agnode_s incident(Agedge_s e) {
+public static ST_Agnode_s incident(ST_Agedge_s e) {
ENTERING("bj7ux5kz8ls2lnfh0ix6i00b9","incident");
try {
if (ND_mark(agtail(e))!=0) {
@@ -933,19 +908,19 @@ LEAVING("bj7ux5kz8ls2lnfh0ix6i00b9","incident");
//3 4i9tcvid2iql874c6k70s9aqm
// static edge_t *leave_edge(void)
-public static Agedge_s leave_edge() {
+public static ST_Agedge_s leave_edge() {
ENTERING("4i9tcvid2iql874c6k70s9aqm","leave_edge");
try {
- Agedge_s f, rv = null;
+ ST_Agedge_s f, rv = null;
int j, cnt = 0;
j = Z.z().S_i;
while (Z.z().S_i < Z.z().Tree_edge.size) {
- if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) {
+ if (ED_cutvalue(f = (ST_Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) {
if (rv!=null) {
if (ED_cutvalue(rv) > ED_cutvalue(f))
rv = f;
} else
- rv = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i);
+ rv = (ST_Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i);
if (++cnt >= Z.z().Search_size)
return rv;
}
@@ -954,12 +929,12 @@ try {
if (j > 0) {
Z.z().S_i = 0;
while (Z.z().S_i < j) {
- if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) {
+ if (ED_cutvalue(f = (ST_Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) {
if (rv!=null) {
if (ED_cutvalue(rv) > ED_cutvalue(f))
rv = f;
} else
- rv = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i);
+ rv = (ST_Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i);
if (++cnt >= Z.z().Search_size)
return rv;
}
@@ -985,12 +960,12 @@ LEAVING("4i9tcvid2iql874c6k70s9aqm","leave_edge");
//3 10lkpr4y40luvy2idlozfiva3
// static void dfs_enter_outedge(node_t * v)
-public static void dfs_enter_outedge(Agnode_s v) {
+public static void dfs_enter_outedge(ST_Agnode_s v) {
ENTERING("10lkpr4y40luvy2idlozfiva3","dfs_enter_outedge");
try {
int i, slack;
- Agedge_s e;
- for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
+ ST_Agedge_s e;
+ for (i = 0; (e = (ST_Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
if (TREE_EDGE(e) == false) {
if (N(SEQ(Z.z().Low, ND_lim(aghead(e)), Z.z().Lim))) {
slack = SLACK(e);
@@ -1002,7 +977,7 @@ try {
} else if (ND_lim(aghead(e)) < ND_lim(v))
dfs_enter_outedge(aghead(e));
}
- for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null && (Z.z().Slack > 0); i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_in(v).getFromList(i))!=null && (Z.z().Slack > 0); i++)
if (ND_lim(agtail(e)) < ND_lim(v))
dfs_enter_outedge(agtail(e));
} finally {
@@ -1015,12 +990,12 @@ LEAVING("10lkpr4y40luvy2idlozfiva3","dfs_enter_outedge");
//3 2z9nii6380p8qlql8nznzgvof
// static void dfs_enter_inedge(node_t * v)
-public static void dfs_enter_inedge(Agnode_s v) {
+public static void dfs_enter_inedge(ST_Agnode_s v) {
ENTERING("2z9nii6380p8qlql8nznzgvof","dfs_enter_inedge");
try {
int i, slack;
- Agedge_s e;
- for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) {
+ ST_Agedge_s e;
+ for (i = 0; (e = (ST_Agedge_s) ND_in(v).getFromList(i))!=null; i++) {
if (TREE_EDGE(e) == false) {
if (N(SEQ(Z.z().Low, ND_lim(agtail(e)), Z.z().Lim))) {
slack = SLACK(e);
@@ -1032,7 +1007,7 @@ try {
} else if (ND_lim(agtail(e)) < ND_lim(v))
dfs_enter_inedge(agtail(e));
}
- for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null && (Z.z().Slack > 0); i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_out(v).getFromList(i))!=null && (Z.z().Slack > 0); i++)
if (ND_lim(aghead(e)) < ND_lim(v))
dfs_enter_inedge(aghead(e));
} finally {
@@ -1045,10 +1020,10 @@ LEAVING("2z9nii6380p8qlql8nznzgvof","dfs_enter_inedge");
//3 aeu2po1o1rvibmafk0k8dw0fh
// static edge_t *enter_edge(edge_t * e)
-public static Agedge_s enter_edge(Agedge_s e) {
+public static ST_Agedge_s enter_edge(ST_Agedge_s e) {
ENTERING("aeu2po1o1rvibmafk0k8dw0fh","enter_edge");
try {
- Agnode_s v;
+ ST_Agnode_s v;
int outsearch;
/* v is the down node */
if (ND_lim(agtail(e)) < ND_lim(aghead(e))) {
@@ -1077,19 +1052,19 @@ LEAVING("aeu2po1o1rvibmafk0k8dw0fh","enter_edge");
//3 1gvyafmercq92v3lg6gb33cbt
// static int treesearch(node_t * v)
-public static boolean treesearch(Agnode_s v) {
+public static boolean treesearch(ST_Agnode_s v) {
ENTERING("1gvyafmercq92v3lg6gb33cbt","treesearch");
try {
int i;
- Agedge_s e;
- for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
+ ST_Agedge_s e;
+ for (i = 0; (e = (ST_Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
if ((ND_mark(aghead(e)) == 0) && (SLACK(e) == 0)) {
add_tree_edge(e);
if ((Z.z().Tree_edge.size == Z.z().N_nodes - 1) || treesearch(aghead(e)))
return NOT(0);
}
}
- for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_in(v).getFromList(i))!=null; i++) {
if ((ND_mark(agtail(e)) == 0) && (SLACK(e) == 0)) {
add_tree_edge(e);
if ((Z.z().Tree_edge.size == Z.z().N_nodes - 1) || treesearch(agtail(e)))
@@ -1111,7 +1086,7 @@ public static int tight_tree() {
ENTERING("c98bj1u8j43cdezeczn33mec0","tight_tree");
try {
int i;
- Agnode_s n;
+ ST_Agnode_s n;
for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) {
ND_mark(n, 0);
ND_tree_in(n).setInList(0, null);
@@ -1155,14 +1130,14 @@ public static int feasible_tree() {
ENTERING("756raqohoxdeiddqbyr37h7ig","feasible_tree");
try {
int i, delta;
- Agnode_s n;
- Agedge_s e, f;
+ ST_Agnode_s n;
+ ST_Agedge_s e, f;
if (Z.z().N_nodes <= 1)
return 0;
while (tight_tree() < Z.z().N_nodes) {
e = null;
for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) {
- for (i = 0; (f = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
+ for (i = 0; (f = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
if ((TREE_EDGE(f) == false) && incident(f)!=null && ((e == null)
|| (SLACK(f)
<
@@ -1195,13 +1170,13 @@ LEAVING("756raqohoxdeiddqbyr37h7ig","feasible_tree");
//3 49un8m43odrf89cedvin3wz3r
// static node_t *treeupdate(node_t * v, node_t * w, int cutvalue, int dir)
-public static Agnode_s treeupdate(Agnode_s v, Agnode_s w, int cutvalue, boolean dir) {
+public static ST_Agnode_s treeupdate(ST_Agnode_s v, ST_Agnode_s w, int cutvalue, boolean dir) {
ENTERING("49un8m43odrf89cedvin3wz3r","treeupdate");
try {
- Agedge_s e;
+ ST_Agedge_s e;
boolean d;
while (N(SEQ(ND_low(v), ND_lim(w), ND_lim(v)))) {
- e = (Agedge_s) ND_par(v);
+ e = (ST_Agedge_s) ND_par(v);
if (EQ(v, agtail(e)))
d = dir;
else
@@ -1226,16 +1201,16 @@ LEAVING("49un8m43odrf89cedvin3wz3r","treeupdate");
//3 e66n8gern1fejjsn8nefypo0g
// static void rerank(node_t * v, int delta)
-public static void rerank(Agnode_s v, int delta) {
+public static void rerank(ST_Agnode_s v, int delta) {
ENTERING("e66n8gern1fejjsn8nefypo0g","rerank");
try {
int i;
- Agedge_s e;
+ ST_Agedge_s e;
ND_rank(v, ND_rank(v) - delta);
- for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
if (NEQ(e, ND_par(v)))
rerank(aghead(e), delta);
- for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
if (NEQ(e, ND_par(v)))
rerank(agtail(e), delta);
} finally {
@@ -1248,11 +1223,11 @@ LEAVING("e66n8gern1fejjsn8nefypo0g","rerank");
//3 xww1p8bentf1qk7mgfhi1q6m
// static void update(edge_t * e, edge_t * f)
-public static void update(Agedge_s e, Agedge_s f) {
+public static void update(ST_Agedge_s e, ST_Agedge_s f) {
ENTERING("xww1p8bentf1qk7mgfhi1q6m","update");
try {
int cutvalue, delta;
- Agnode_s lca;
+ ST_Agnode_s lca;
delta = SLACK(f);
/* "for (v = in nodes in tail side of e) do ND_rank(v) -= delta;" */
if (delta > 0) {
@@ -1295,7 +1270,7 @@ LEAVING("xww1p8bentf1qk7mgfhi1q6m","update");
public static void scan_and_normalize() {
ENTERING("3yw7w42hz7af67d6qse3b2172","scan_and_normalize");
try {
- Agnode_s n;
+ ST_Agnode_s n;
Z.z().Minrank = Integer.MAX_VALUE;
Z.z().Maxrank = -Integer.MAX_VALUE;
for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) {
@@ -1320,10 +1295,10 @@ LEAVING("3yw7w42hz7af67d6qse3b2172","scan_and_normalize");
//3 7eg6zti36nbg4tqyo8yunh86r
// static void freeTreeList (graph_t* g)
-public static void freeTreeList(Agraph_s g) {
+public static void freeTreeList(ST_Agraph_s g) {
ENTERING("7eg6zti36nbg4tqyo8yunh86r","freeTreeList");
try {
- Agnode_s n;
+ ST_Agnode_s n;
for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) {
free_list(ND_tree_in(n));
free_list(ND_tree_out(n));
@@ -1343,9 +1318,9 @@ public static void LR_balance() {
ENTERING("9gx8p7md3v3mzp640xdjj814a","LR_balance");
try {
int i, delta;
- Agedge_s e, f;
+ ST_Agedge_s e, f;
for (i = 0; i < Z.z().Tree_edge.size; i++) {
- e = (Agedge_s) Z.z().Tree_edge.getFromList(i);
+ e = (ST_Agedge_s) Z.z().Tree_edge.getFromList(i);
if (ED_cutvalue(e) == 0) {
f = enter_edge(e);
if (f == null)
@@ -1373,8 +1348,8 @@ LEAVING("9gx8p7md3v3mzp640xdjj814a","LR_balance");
public static void TB_balance() {
ENTERING("5c01jnao2ubmy4l0vi5jol0jz","TB_balance");
try {
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
int i, low, high, choice;
__ptr__ nrank;
int inweight, outweight;
@@ -1392,11 +1367,11 @@ try {
inweight = outweight = 0;
low = 0;
high = Z.z().Maxrank;
- for (i = 0; (e = (Agedge_s) ND_in(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_in(n).getFromList(i))!=null; i++) {
inweight += ED_weight(e);
low = MAX(low, ND_rank(agtail(e)) + ED_minlen(e));
}
- for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
outweight += ED_weight(e);
high = MIN(high, ND_rank(aghead(e)) - ED_minlen(e));
}
@@ -1426,21 +1401,21 @@ LEAVING("5c01jnao2ubmy4l0vi5jol0jz","TB_balance");
//3 37hg5w7ywmyljdiebgp5ltl22
// static int init_graph(graph_t * g)
-public static int init_graph(Agraph_s g) {
+public static int init_graph(ST_Agraph_s g) {
ENTERING("37hg5w7ywmyljdiebgp5ltl22","init_graph");
try {
int i, feasible;
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
Z.z().G_ns = g;
Z.z().N_nodes = Z.z().N_edges = Z.z().S_i = 0;
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
ND_mark(n, 0);
Z.z().N_nodes++;
- for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++)
Z.z().N_edges++;
}
- Z.z().Tree_node.reallocEmpty(Z.z().N_nodes, Agnode_s.class);
+ Z.z().Tree_node.reallocEmpty(Z.z().N_nodes);
Z.z().Tree_node.size = 0;
// Z.z().Tree_edge.setPtr("list", ALLOC_empty(Z.z().N_nodes, Z.z().Tree_edge.getPtr("list"), Agedge_s.class));
Z.z().Tree_edge.realloc(Z.z().N_nodes);
@@ -1448,7 +1423,7 @@ try {
feasible = 1;
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
ND_priority(n, 0);
- for (i = 0; (e = (Agedge_s) ND_in(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_in(n).getFromList(i))!=null; i++) {
ND_priority(n, 1+ND_priority(n));
ED_cutvalue(e, 0);
ED_tree_index(e, -1);
@@ -1457,11 +1432,11 @@ try {
feasible = 0;
}
// ND_tree_in(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));;
- ND_tree_in(n).mallocEmpty(Agedge_s.class, i+1);
+ ND_tree_in(n).mallocEmpty(i+1);
ND_tree_in(n).size = 0;
- for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++);
+ for (i = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++);
// ND_tree_out(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));
- ND_tree_out(n).mallocEmpty(Agedge_s.class, i+1);
+ ND_tree_out(n).mallocEmpty(i+1);
ND_tree_out(n).size = 0;
}
return feasible;
@@ -1501,12 +1476,12 @@ throw new UnsupportedOperationException();
//3 5n0ipwzhr8urlx0fsdzr02gwq
// int rank2(graph_t * g, int balance, int maxiter, int search_size)
-public static int rank2(Agraph_s g, int balance, int maxiter, int search_size) {
+public static int rank2(ST_Agraph_s g, int balance, int maxiter, int search_size) {
ENTERING("5n0ipwzhr8urlx0fsdzr02gwq","rank2");
try {
int iter = 0, feasible;
CString ns = new CString("network simplex: ");
- Agedge_s e, f;
+ ST_Agedge_s e, f;
/*if (Verbose) {
int nn, ne;
graphSize (g, &nn, &ne);
@@ -1575,7 +1550,7 @@ LEAVING("5n0ipwzhr8urlx0fsdzr02gwq","rank2");
//3 aqly8eniwjr5bmh4hzwc7ftdr
// int rank(graph_t * g, int balance, int maxiter)
-public static int rank(Agraph_s g, int balance, int maxiter) {
+public static int rank(ST_Agraph_s g, int balance, int maxiter) {
ENTERING("aqly8eniwjr5bmh4hzwc7ftdr","rank");
try {
CString s;
@@ -1595,11 +1570,11 @@ LEAVING("aqly8eniwjr5bmh4hzwc7ftdr","rank");
//3 2q59mz8qtn0biifbezb8uxz17
// static void x_cutval(edge_t * f)
-public static void x_cutval(Agedge_s f) {
+public static void x_cutval(ST_Agedge_s f) {
ENTERING("2q59mz8qtn0biifbezb8uxz17","x_cutval");
try {
- Agnode_s v=null;
- Agedge_s e;
+ ST_Agnode_s v=null;
+ ST_Agedge_s e;
int i, sum, dir=0;
/* set v to the node on the side of the edge already searched */
if (EQ(ND_par(agtail(f)), f)) {
@@ -1610,9 +1585,9 @@ try {
dir = -1;
}
sum = 0;
- for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_out(v).getFromList(i))!=null; i++)
sum += x_val(e, v, dir);
- for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_in(v).getFromList(i))!=null; i++)
sum += x_val(e, v, dir);
ED_cutvalue(f, sum);
} finally {
@@ -1625,10 +1600,10 @@ LEAVING("2q59mz8qtn0biifbezb8uxz17","x_cutval");
//3 bfeafmsmmnblgizs37qj03dy4
// static int x_val(edge_t * e, node_t * v, int dir)
-public static int x_val(Agedge_s e, Agnode_s v, int dir) {
+public static int x_val(ST_Agedge_s e, ST_Agnode_s v, int dir) {
ENTERING("bfeafmsmmnblgizs37qj03dy4","x_val");
try {
- Agnode_s other;
+ ST_Agnode_s other;
int d=0, rv=0, f=0;
if (EQ(agtail(e), v))
other = aghead(e);
@@ -1671,15 +1646,15 @@ LEAVING("bfeafmsmmnblgizs37qj03dy4","x_val");
//3 ah65iqmwa5j0qwotm6amhijlg
// static void dfs_cutval(node_t * v, edge_t * par)
-public static void dfs_cutval(Agnode_s v, Agedge_s par) {
+public static void dfs_cutval(ST_Agnode_s v, ST_Agedge_s par) {
ENTERING("ah65iqmwa5j0qwotm6amhijlg","dfs_cutval");
try {
int i;
- Agedge_s e;
- for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
+ ST_Agedge_s e;
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
if (NEQ(e, par))
dfs_cutval(aghead(e), e);
- for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
if (NEQ(e, par))
dfs_cutval(agtail(e), e);
if (par!=null)
@@ -1694,18 +1669,18 @@ LEAVING("ah65iqmwa5j0qwotm6amhijlg","dfs_cutval");
//3 cgqr48qol9p8bsqjnryo5z5x9
// static int dfs_range(node_t * v, edge_t * par, int low)
-public static int dfs_range(Agnode_s v, Agedge_s par, int low) {
+public static int dfs_range(ST_Agnode_s v, ST_Agedge_s par, int low) {
ENTERING("cgqr48qol9p8bsqjnryo5z5x9","dfs_range");
try {
- Agedge_s e;
+ ST_Agedge_s e;
int i, lim;
lim = low;
ND_par(v, par);
ND_low(v, low);
- for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
if (NEQ(e, par))
lim = dfs_range(aghead(e), e, lim);
- for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
if (NEQ(e, par))
lim = dfs_range(agtail(e), e, lim);
ND_lim(v, lim);
diff --git a/src/gen/lib/common/output__c.java b/src/gen/lib/common/output__c.java
index 4c6dad4..ea0815c 100644
--- a/src/gen/lib/common/output__c.java
+++ b/src/gen/lib/common/output__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class output__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/pointset__c.java b/src/gen/lib/common/pointset__c.java
index b42b761..bac8b10 100644
--- a/src/gen/lib/common/pointset__c.java
+++ b/src/gen/lib/common/pointset__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class pointset__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/postproc__c.java b/src/gen/lib/common/postproc__c.java
index 40ee2fd..0580986 100644
--- a/src/gen/lib/common/postproc__c.java
+++ b/src/gen/lib/common/postproc__c.java
@@ -55,12 +55,12 @@ import static gen.lib.cgraph.node__c.agfstnode;
import static gen.lib.cgraph.node__c.agnxtnode;
import static gen.lib.cgraph.obj__c.agroot;
import static gen.lib.common.geom__c.ccwrotatepf;
-import static gen.lib.common.memory__c.zmalloc;
+import static gen.lib.common.splines__c.edgeMidpoint;
import static gen.lib.common.splines__c.getsplinepoints;
import static gen.lib.common.utils__c.late_bool;
+import static gen.lib.common.utils__c.updateBB;
import static gen.lib.label.xlabels__c.placeLabels;
import static smetana.core.JUtils.NEQ;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGRAPH;
@@ -88,26 +88,24 @@ import static smetana.core.Macro.ND_coord;
import static smetana.core.Macro.ND_height;
import static smetana.core.Macro.ND_width;
import static smetana.core.Macro.ND_xlabel;
-import static smetana.core.Macro.NOT;
+import static smetana.core.Macro.NOTI;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsym_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Agsym_s;
+import h.ST_bezier;
import h.ST_boxf;
-import h.bezier;
-import h.boxf;
-import h.label_params_t;
-import h.object_t;
-import h.pointf;
-import h.splines;
-import h.textlabel_t;
-import h.xlabel_t;
+import h.ST_cinfo_t;
+import h.ST_label_params_t;
+import h.ST_object_t;
+import h.ST_pointf;
+import h.ST_splines;
+import h.ST_textlabel_t;
+import h.ST_xlabel_t;
import smetana.core.CString;
-import smetana.core.JUtils;
+import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class postproc__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -367,14 +365,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -403,26 +401,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -445,16 +423,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -757,22 +735,22 @@ throw new UnsupportedOperationException();
//1 ejooa1m5uoq0ue852wtuerpy
// static pointf Offset
-//private final static __struct__<pointf> Offset = JUtils.from(pointf.class);
+//private final static ST_pointf Offset = new ST_pointf();
//3 dajapw16wus3rwimkrk5ihi2b
// static pointf map_point(pointf p)
-public static __struct__<pointf> map_point(final __struct__<pointf> p) {
+public static ST_pointf map_point(final ST_pointf p) {
// WARNING!! STRUCT
return map_point_w_(p.copy()).copy();
}
-private static __struct__<pointf> map_point_w_(final __struct__<pointf> p) {
+private static ST_pointf map_point_w_(final ST_pointf p) {
ENTERING("dajapw16wus3rwimkrk5ihi2b","map_point");
try {
p.___(ccwrotatepf(p, Z.z().Rankdir * 90));
- p.setDouble("x", p.getDouble("x") - Z.z().Offset.getDouble("x"));
- p.setDouble("y", p.getDouble("y") - Z.z().Offset.getDouble("y"));
+ p.setDouble("x", p.x - Z.z().Offset.x);
+ p.setDouble("y", p.y - Z.z().Offset.y);
return p;
} finally {
LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point");
@@ -784,37 +762,37 @@ LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point");
//3 bvq3vvonvotn47mfe5zsvchie
// static void map_edge(edge_t * e)
-public static void map_edge(Agedge_s e) {
+public static void map_edge(ST_Agedge_s e) {
ENTERING("bvq3vvonvotn47mfe5zsvchie","map_edge");
try {
int j, k;
- final __struct__<bezier> bz = JUtils.from(bezier.class);
+ final ST_bezier bz = new ST_bezier();
if (ED_spl(e) == null) {
if ((Z.z().Concentrate == false) && (ED_edge_type(e) != 6))
System.err.println("lost %s %s edge\n"+ agnameof(agtail(e))+
agnameof(aghead(e)));
return;
}
- for (j = 0; j < ED_spl(e).getInt("size"); j++) {
- bz.___(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct());
- for (k = 0; k < bz.getInt("size"); k++) {
- bz.getArrayOfPtr("list").plus(k).setStruct(map_point(bz.getArrayOfPtr("list").plus(k).getStruct()));
+ for (j = 0; j < ED_spl(e).size; j++) {
+ bz.___(ED_spl(e).list.plus(j).getStruct());
+ for (k = 0; k < bz.size; k++) {
+ bz.list.get(k).setStruct(map_point((ST_pointf) bz.list.get(k).getStruct()));
}
- if (bz.getBoolean("sflag"))
+ if (bz.sflag!=0)
UNSUPPORTED("7894dgzvk2um2w1a5ph2r0bcc"); // ED_spl(e)->list[j].sp = map_point(ED_spl(e)->list[j].sp);
- if (bz.getBoolean("eflag")) {
- ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep").___(map_point(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep")));
+ if (bz.eflag!=0) {
+ ED_spl(e).list.get(j).ep.___(map_point((ST_pointf) ED_spl(e).list.get(j).ep));
}
}
if (ED_label(e)!=null)
- ED_label(e).getStruct("pos").___(map_point(ED_label(e).getStruct("pos")));
+ ED_label(e).pos.___(map_point((ST_pointf) ED_label(e).pos));
if (ED_xlabel(e)!=null)
UNSUPPORTED("al3tnq9zjjqeq1ll7qdxyu3ja"); // ED_xlabel(e)->pos = map_point(ED_xlabel(e)->pos);
/* vladimir */
if (ED_head_label(e)!=null)
-UNSUPPORTED("6ntujaf13k6emf6cuf7ox8ath"); // ED_head_label(e)->pos = map_point(ED_head_label(e)->pos);
+ ED_head_label(e).setStruct("pos", map_point((ST_pointf) ED_head_label(e).pos));
if (ED_tail_label(e)!=null)
-UNSUPPORTED("2is3ug7jbugrkl9bu6nfnz2lt"); // ED_tail_label(e)->pos = map_point(ED_tail_label(e)->pos);
+ ED_tail_label(e).setStruct("pos", map_point((ST_pointf) ED_tail_label(e).pos));
} finally {
LEAVING("bvq3vvonvotn47mfe5zsvchie","map_edge");
}
@@ -825,7 +803,7 @@ LEAVING("bvq3vvonvotn47mfe5zsvchie","map_edge");
//3 a3hf82rxsojxbunj6p8a6bkse
// void translate_bb(graph_t * g, int rankdir)
-public static void translate_bb(Agraph_s g, int rankdir) {
+public static void translate_bb(ST_Agraph_s g, int rankdir) {
ENTERING("a3hf82rxsojxbunj6p8a6bkse","translate_bb");
try {
int c;
@@ -840,10 +818,10 @@ UNSUPPORTED("crysiae5zxc69cj3v2ygfs8xn"); // new_bb.UR = map_point(pointfof(bb.
}
GD_bb(g).___(new_bb);
if (GD_label(g)!=null) {
- GD_label(g).setStruct("pos", map_point(GD_label(g).getStruct("pos")));
+ GD_label(g).setStruct("pos", map_point((ST_pointf) GD_label(g).pos));
}
for (c = 1; c <= GD_n_cluster(g); c++)
- translate_bb((Agraph_s) GD_clust(g).plus(c).getPtr(), rankdir);
+ translate_bb((ST_Agraph_s) GD_clust(g).get(c).getPtr(), rankdir);
} finally {
LEAVING("a3hf82rxsojxbunj6p8a6bkse","translate_bb");
}
@@ -854,12 +832,12 @@ LEAVING("a3hf82rxsojxbunj6p8a6bkse","translate_bb");
//3 h4i5qxnd7hlrew919abswd13
// static void translate_drawing(graph_t * g)
-public static void translate_drawing(Agraph_s g) {
+public static void translate_drawing(ST_Agraph_s g) {
ENTERING("h4i5qxnd7hlrew919abswd13","translate_drawing");
try {
- Agnode_s v;
- Agedge_s e;
- boolean shift = (Z.z().Offset.getDouble("x")!=0.0 || Z.z().Offset.getDouble("y")!=0.0);
+ ST_Agnode_s v;
+ ST_Agedge_s e;
+ boolean shift = (Z.z().Offset.x!=0.0 || Z.z().Offset.y!=0.0);
if (N(shift) && N(Z.z().Rankdir))
return;
for (v = agfstnode(g); v!=null; v = agnxtnode(g, v)) {
@@ -911,17 +889,17 @@ throw new UnsupportedOperationException();
//3 2i713kmewjct2igf3lwm80462
// static pointf centerPt (xlabel_t* xlp)
-public static Object centerPt(Object... arg) {
-UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf
-UNSUPPORTED("1pd2hqj3zbktacr9dt2vdvkgr"); // centerPt (xlabel_t* xlp) {
-UNSUPPORTED("3f7r93jimpwvyc6atnkppttgl"); // pointf p;
-UNSUPPORTED("6jtpe3khjpc9oogxx6kerapem"); // p = xlp->pos;
-UNSUPPORTED("7rsewd63gsf3h9d5aj5v7x66c"); // p.x += (xlp->sz.x)/2.0;
-UNSUPPORTED("3c70xgshcb3nvyi64kr041yjz"); // p.y += (xlp->sz.y)/2.0;
-UNSUPPORTED("bft6601q2uop0mu5y59jg4c81"); // return p;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_pointf centerPt(ST_xlabel_t.Array xlp) {
+ENTERING("2i713kmewjct2igf3lwm80462","centerPt");
+try {
+ final ST_pointf p = new ST_pointf();
+ p.___(xlp.getStruct().pos);
+ p.setDouble("x", p.x + xlp.getStruct().sz.x/2);
+ p.setDouble("y", p.y + xlp.getStruct().sz.y/2);
+ return p;
+} finally {
+LEAVING("2i713kmewjct2igf3lwm80462","centerPt");
+}
}
@@ -964,26 +942,32 @@ throw new UnsupportedOperationException();
//3 95pnpuiq4khinrz2bqkci9nfg
// static pointf edgeTailpoint (Agedge_t* e)
-public static Object edgeTailpoint(Object... arg) {
-UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf
-UNSUPPORTED("b5i1gh69zn27sn9j8kpmvtbeb"); // edgeTailpoint (Agedge_t* e)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("6tl9mepc2bett364jduh2q4mf"); // splines *spl;
-UNSUPPORTED("3hs99atzl1l857khumt6ycmbh"); // bezier *bez;
-UNSUPPORTED("26m18ntdxgq9wp5vlh2x7auh5"); // if ((spl = getsplinepoints(e)) == NULL) {
+public static ST_pointf edgeTailpoint(ST_Agedge_s e) {
+ENTERING("95pnpuiq4khinrz2bqkci9nfg","edgeTailpoint");
+try {
+ return edgeTailpoint_(e).copy();
+} finally {
+LEAVING("95pnpuiq4khinrz2bqkci9nfg","edgeTailpoint");
+}
+}
+private static ST_pointf edgeTailpoint_(ST_Agedge_s e) {
+ ST_splines spl;
+ ST_bezier bez;
+ spl = getsplinepoints(e);
+ if (spl == null) {
UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p;
UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0;
UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("4djdvk87infum4r43tuhnm5mp"); // bez = &spl->list[0];
-UNSUPPORTED("45rq0m21hutb3z6f4npw7ke9f"); // if (bez->sflag) {
-UNSUPPORTED("9ttezx014gi1oy9xopnihsnac"); // return bez->sp;
-UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else {
-UNSUPPORTED("c00cyqleu301qclgim7szyf7"); // return bez->list[0];
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+ }
+ bez = spl.list.get(0);
+ // bez = &spl->list[0];
+if (bez.sflag!=0) {
+ return (ST_pointf) bez.sp;
+} else {
+ return (ST_pointf) (bez.getPtr()).list.get(0);
+ // return bez->list[0];
+ }
-throw new UnsupportedOperationException();
}
@@ -991,27 +975,31 @@ throw new UnsupportedOperationException();
//3 av67wf2xi70ncgl90j1ttrjjs
// static pointf edgeHeadpoint (Agedge_t* e)
-public static __struct__<pointf> edgeHeadpoint(Agedge_s e) {
+public static ST_pointf edgeHeadpoint(ST_Agedge_s e) {
+ENTERING("av67wf2xi70ncgl90j1ttrjjs","edgeHeadpoint");
+try {
return edgeHeadpoint_(e).copy();
+} finally {
+LEAVING("av67wf2xi70ncgl90j1ttrjjs","edgeHeadpoint");
}
-private static __struct__<pointf> edgeHeadpoint_(Agedge_s e) {
- splines spl;
- __ptr__ bez;
+}
+private static ST_pointf edgeHeadpoint_(ST_Agedge_s e) {
+ ST_splines spl;
+ ST_bezier bez;
spl = getsplinepoints(e);
if (spl == null) {
UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p;
UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0;
UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p;
}
-bez = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr();
+bez = spl.list.plus(spl.size - 1).getPtr();
// bez = &spl->list[spl->size - 1];
-if (bez.getBoolean("eflag")) {
- return bez.getStruct("ep");
+if (bez.eflag!=0) {
+ return (ST_pointf) bez.ep;
} else {
-UNSUPPORTED("6qzm0hh4pxrspfbvxearcz9z8"); // return bez->list[bez->size - 1];
+ return (ST_pointf) ((ST_bezier)bez.getPtr()).list.plus(bez.size - 1).getStruct();
+// return bez->list[bez->size - 1];
}
-
-throw new UnsupportedOperationException();
}
@@ -1019,18 +1007,23 @@ throw new UnsupportedOperationException();
//3 1ca6fh8ns5bgzfzcz8al4eh4k
// static boxf adjustBB (object_t* objp, boxf bb)
-public static __struct__<boxf> adjustBB(__ptr__ objp, __struct__<boxf> bb) {
+public static ST_boxf adjustBB(ST_object_t.Array objp, ST_boxf bb) {
+ENTERING("1ca6fh8ns5bgzfzcz8al4eh4k","adjustBB");
+try {
return adjustBB_(objp, bb.copy()).copy();
+} finally {
+LEAVING("1ca6fh8ns5bgzfzcz8al4eh4k","adjustBB");
}
-private static __struct__<boxf> adjustBB_(__ptr__ objp, __struct__<boxf> bb) {
- final __struct__<pointf> ur = JUtils.from(pointf.class);
+}
+private static ST_boxf adjustBB_(ST_object_t.Array objp, ST_boxf bb) {
+ final ST_pointf ur = new ST_pointf();
/* Adjust bounding box */
- bb.getStruct("LL").setDouble("x", MIN(bb.getStruct("LL").getDouble("x"), objp.getPtr("pos").getDouble("x")));
- bb.getStruct("LL").setDouble("y", MIN(bb.getStruct("LL").getDouble("y"), objp.getPtr("pos").getDouble("y")));
- ur.setDouble("x", objp.getPtr("pos").getDouble("x") + objp.getPtr("sz").getDouble("x"));
- ur.setDouble("y", objp.getPtr("pos").getDouble("y") + objp.getPtr("sz").getDouble("y"));
- bb.getStruct("UR").setDouble("x", MAX(bb.getStruct("UR").getDouble("x"), ur.getDouble("x")));
- bb.getStruct("UR").setDouble("y", MAX(bb.getStruct("UR").getDouble("y"), ur.getDouble("y")));
+ bb.LL.setDouble("x", MIN(bb.LL.x, objp.getStruct().pos.x));
+ bb.LL.setDouble("y", MIN(bb.LL.y, objp.getStruct().pos.y));
+ ur.setDouble("x", objp.getStruct().pos.x + objp.getStruct().sz.x);
+ ur.setDouble("y", objp.getStruct().pos.y + objp.getStruct().sz.y);
+ bb.UR.setDouble("x", MAX(bb.UR.x, ur.x));
+ bb.UR.setDouble("y", MAX(bb.UR.y, ur.y));
return bb;
}
@@ -1039,13 +1032,18 @@ private static __struct__<boxf> adjustBB_(__ptr__ objp, __struct__<boxf> bb) {
//3 3mefe722uemyoa0czmkkw6hjb
// static void addXLabel (textlabel_t* lp, object_t* objp, xlabel_t* xlp, int initObj, pointf pos)
-public static void addXLabel(textlabel_t lp, __ptr__ objp, __ptr__ xlp, int initObj, __struct__<pointf> pos) {
+public static void addXLabel(ST_textlabel_t lp, ST_object_t.Array objp, ST_xlabel_t.Array xlp, int initObj, ST_pointf pos) {
+ENTERING("3mefe722uemyoa0czmkkw6hjb","addXLabel");
+try {
addXLabel_(lp, objp, xlp, initObj, pos.copy());
+} finally {
+LEAVING("3mefe722uemyoa0czmkkw6hjb","addXLabel");
+}
}
-private static void addXLabel_(textlabel_t lp, __ptr__ objp, __ptr__ xlp, int initObj, __struct__<pointf> pos) {
+private static void addXLabel_(ST_textlabel_t lp, ST_object_t.Array objp, ST_xlabel_t.Array xlp, int initObj, ST_pointf pos) {
if (initObj!=0) {
- objp.getStruct("sz").setDouble("x", 0);
- objp.getStruct("sz").setDouble("y", 0);
+ objp.getStruct().sz.setDouble("x", 0);
+ objp.getStruct().sz.setDouble("y", 0);
objp.setStruct("pos", pos);
}
if (Z.z().Flip) {
@@ -1053,10 +1051,10 @@ UNSUPPORTED("99tzt7erbvtfsbo0jbdz0lc8m"); // xlp->sz.x = lp->dimen.y;
UNSUPPORTED("6v5t3ysaisj27bwc0r9zg3rpd"); // xlp->sz.y = lp->dimen.x;
}
else {
- xlp.setStruct("sz", lp.getStruct("dimen"));
+ xlp.get(0).sz.___(lp.dimen);
}
-xlp.setPtr("lbl", lp);
-xlp.setInt("set", 0);
+xlp.get(0).lbl = lp;
+xlp.get(0).set = 0;
objp.setPtr("lbl", xlp);
}
@@ -1065,27 +1063,27 @@ objp.setPtr("lbl", xlp);
//3 dwxd5kvlanbcxqfuncjg0ea54
// static boxf addLabelObj (textlabel_t* lp, object_t* objp, boxf bb)
-public static __struct__<boxf> addLabelObj(textlabel_t lp, __ptr__ objp, __struct__<boxf> bb) {
+public static ST_boxf addLabelObj(ST_textlabel_t lp, ST_object_t.Array objp, final ST_boxf bb) {
// WARNING!! STRUCT
return addLabelObj_(lp, objp, bb.copy()).copy();
}
-private static __struct__<boxf> addLabelObj_(textlabel_t lp, __ptr__ objp, __struct__<boxf> bb) {
- ENTERING("b8tjygxnwny5qoiir1mha1d62","map_point");
+private static ST_boxf addLabelObj_(ST_textlabel_t lp, ST_object_t.Array objp, final ST_boxf bb) {
+ ENTERING("dwxd5kvlanbcxqfuncjg0ea54","addLabelObj");
try {
if (Z.z().Flip) {
UNSUPPORTED("6z2yrwq81gtsk3q9c5pofow1x"); // objp->sz.x = lp->dimen.y;
UNSUPPORTED("8xsm9kavrekjrsydqe1wh1pu"); // objp->sz.y = lp->dimen.x;
}
else {
- objp.getPtr("sz").setDouble("x", lp.getStruct("dimen").getDouble("x"));
- objp.getPtr("sz").setDouble("y", lp.getStruct("dimen").getDouble("y"));
+ objp.getStruct().sz.setDouble("x", lp.dimen.x);
+ objp.getStruct().sz.setDouble("y", lp.dimen.y);
}
- objp.setStruct("pos", lp.getStruct("pos"));
- objp.getStruct("pos").setDouble("x", objp.getStruct("pos").getDouble("x") - (objp.getStruct("sz").getDouble("x") / 2.0 ));
- objp.getStruct("pos").setDouble("y", objp.getStruct("pos").getDouble("y") - (objp.getStruct("sz").getDouble("y") / 2.0 ));
+ objp.setStruct("pos", lp.pos);
+ objp.getStruct().pos.setDouble("x", objp.getStruct().pos.x - (objp.getStruct().sz.x / 2.0 ));
+ objp.getStruct().pos.setDouble("y", objp.getStruct().pos.y - (objp.getStruct().sz.y / 2.0 ));
return adjustBB(objp, bb);
} finally {
- LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point");
+ LEAVING("dwxd5kvlanbcxqfuncjg0ea54","addLabelObj");
}
}
@@ -1094,11 +1092,11 @@ UNSUPPORTED("8xsm9kavrekjrsydqe1wh1pu"); // objp->sz.y = lp->dimen.x;
//3 b8tjygxnwny5qoiir1mha1d62
// static boxf addNodeObj (node_t* np, object_t* objp, boxf bb)
-public static __struct__<boxf> addNodeObj(Agnode_s np, __ptr__ objp, __struct__<boxf> bb) {
+public static ST_boxf addNodeObj(ST_Agnode_s np, ST_object_t.Array objp, final ST_boxf bb) {
// WARNING!! STRUCT
return addNodeObj_(np, objp, bb.copy()).copy();
}
-public static __struct__<boxf> addNodeObj_(Agnode_s np, __ptr__ objp, __struct__<boxf> bb) {
+public static ST_boxf addNodeObj_(ST_Agnode_s np, ST_object_t.Array objp, final ST_boxf bb) {
ENTERING("b8tjygxnwny5qoiir1mha1d62","map_point");
try {
if (Z.z().Flip) {
@@ -1106,12 +1104,12 @@ try {
UNSUPPORTED("6r5gwwhz3sjxrssh8yo3v5c3v"); // objp->sz.y = ((ND_width(np))*(double)72);
}
else {
- objp.getPtr("sz").setDouble("x", ((ND_width(np))*(double)72));
- objp.getPtr("sz").setDouble("y", ((ND_height(np))*(double)72));
+ objp.getStruct().sz.setDouble("x", ((ND_width(np))*(double)72));
+ objp.getStruct().sz.setDouble("y", ((ND_height(np))*(double)72));
}
objp.setPtr("pos", ND_coord(np));
- objp.getPtr("pos").setDouble("x", objp.getPtr("pos").getDouble("x") - objp.getPtr("sz").getDouble("x") / 2.0);
- objp.getPtr("pos").setDouble("y", objp.getPtr("pos").getDouble("y") - objp.getPtr("sz").getDouble("y") / 2.0);
+ objp.getStruct().pos.setDouble("x", objp.getStruct().pos.x - objp.getStruct().sz.x / 2.0);
+ objp.getStruct().pos.setDouble("y", objp.getStruct().pos.y - objp.getStruct().sz.y / 2.0);
return adjustBB(objp, bb);
} finally {
LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point");
@@ -1123,22 +1121,27 @@ try {
//3 6kx3lin2ig9o2otk2bqzdvd4t
// static cinfo_t addClusterObj (Agraph_t* g, cinfo_t info)
-public static Object addClusterObj(Object... arg) {
-UNSUPPORTED("91ncv8p43nko0ygysclvv77j"); // static cinfo_t
-UNSUPPORTED("bmfjbc1td1mizemu2aa81cyli"); // addClusterObj (Agraph_t* g, cinfo_t info)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c;
-UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++)
-UNSUPPORTED("6o81thi0rqvkah0s4zkn2fcg4"); // info = addClusterObj (GD_clust(g)[c], info);
-UNSUPPORTED("1ke0hve63v76yb4shi7jfrp6x"); // if ((g != agroot(g)) && (GD_label(g)) && GD_label(g)->set) {
-UNSUPPORTED("dcgq2zlh4t0m1gno12t6h7ouy"); // object_t* objp = info.objp;
-UNSUPPORTED("ddz79zm5235krd6smukq1gza0"); // info.bb = addLabelObj (GD_label(g), objp, info.bb);
-UNSUPPORTED("be25qc3x3muxo4l87ji01t3kd"); // info.objp++;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("9kt6o7m6t7fgdh41zfez84fmv"); // return info;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_cinfo_t addClusterObj(ST_Agraph_s g, ST_cinfo_t info) {
+ENTERING("6kx3lin2ig9o2otk2bqzdvd4t","addClusterObj");
+try {
+ return addClusterObj_(g, info.copy()).copy();
+} finally {
+LEAVING("6kx3lin2ig9o2otk2bqzdvd4t","addClusterObj");
+}
+}
+private static ST_cinfo_t addClusterObj_(ST_Agraph_s g, ST_cinfo_t info) {
+ int c;
+ for (c = 1; c <= GD_n_cluster(g); c++)
+ info.___(addClusterObj ((ST_Agraph_s)GD_clust(g).get(c).castTo(ST_Agraph_s.class), info));
+ if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && GD_label(g).set!=0) {
+ ST_object_t.Array objp = info.objp;
+ info.setStruct("bb", addLabelObj (GD_label(g), objp, (ST_boxf) info.bb));
+ info.objp = info.objp.plus(1);
+//UNSUPPORTED("dcgq2zlh4t0m1gno12t6h7ouy"); // object_t* objp = info.objp;
+//UNSUPPORTED("ddz79zm5235krd6smukq1gza0"); // info.bb = addLabelObj (GD_label(g), objp, info.bb);
+//UNSUPPORTED("be25qc3x3muxo4l87ji01t3kd"); // info.objp++;
+ }
+ return info;
}
@@ -1146,19 +1149,19 @@ throw new UnsupportedOperationException();
//3 2tdbzvdtkwxp75kj0iufsynm5
// static int countClusterLabels (Agraph_t* g)
-public static Object countClusterLabels(Object... arg) {
-UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
-UNSUPPORTED("6o4fsu24jc0ezulf31fsi9bce"); // countClusterLabels (Agraph_t* g)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("2q4dlnxpy4lj011whzcbyq3xj"); // int c, i = 0;
-UNSUPPORTED("68odyos1g0n4tbs7c77r0f9wn"); // if ((g != agroot(g)) && (GD_label(g)) && GD_label(g)->set)
-UNSUPPORTED("chd2f5z6rt19lbaye25ej7q6j"); // i++;
-UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++)
-UNSUPPORTED("adgz5sd2oklf51or5uq3wduuz"); // i += countClusterLabels (GD_clust(g)[c]);
-UNSUPPORTED("ahwo5hst5k1gyq20ve63ahe81"); // return i;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+public static int countClusterLabels(ST_Agraph_s g) {
+ENTERING("2tdbzvdtkwxp75kj0iufsynm5","countClusterLabels");
+try {
+ int c, i = 0;
+ if (NEQ(g, agroot(g)) && GD_label(g)!=null && GD_label(g).set!=0)
+ i++;
+ for (c = 1; c <= GD_n_cluster(g); c++)
+ i += countClusterLabels((ST_Agraph_s) GD_clust(g).plus(c).castTo(ST_Agraph_s.class));
+ return i;
+} finally {
+LEAVING("2tdbzvdtkwxp75kj0iufsynm5","countClusterLabels");
+}
-throw new UnsupportedOperationException();
}
@@ -1166,25 +1169,25 @@ throw new UnsupportedOperationException();
//3 d4215jd9wukfn6t0iknwzjcof
// static void addXLabels(Agraph_t * gp)
-public static void addXLabels(Agraph_s gp) {
+public static void addXLabels(ST_Agraph_s gp) {
ENTERING("d4215jd9wukfn6t0iknwzjcof","addXLabels");
try {
- Agnode_s np;
- Agedge_s ep;
+ ST_Agnode_s np;
+ ST_Agedge_s ep;
int cnt, i, n_objs, n_lbls;
int n_nlbls = 0; /* # of unset node xlabels */
int n_elbls = 0; /* # of unset edge labels or xlabels */
int n_set_lbls = 0; /* # of set xlabels and edge labels */
int n_clbls = 0; /* # of set cluster labels */
- final __struct__<boxf> bb = JUtils.from(boxf.class);
- final __struct__<pointf> ur = JUtils.from(pointf.class);
- textlabel_t lp;
- final __struct__<label_params_t> params = JUtils.from(label_params_t.class);
- __ptr__ objs;
- __ptr__ lbls;
- __ptr__ objp;
- __ptr__ xlp;
- Agsym_s force;
+ final ST_boxf bb = new ST_boxf();
+ final ST_pointf ur = new ST_pointf();
+ ST_textlabel_t lp;
+ final ST_label_params_t params = new ST_label_params_t();
+ ST_object_t.Array objs;
+ ST_xlabel_t.Array lbls;
+ ST_object_t.Array objp;
+ ST_xlabel_t.Array xlp;
+ ST_Agsym_s force;
int et = (GD_flags(gp) & (7 << 1));
if (N(GD_has_labels(gp) & (1 << 4)) &&
N(GD_has_labels(gp) & (1 << 5)) &&
@@ -1207,19 +1210,19 @@ UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED
UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++;
}
if (ED_head_label(ep)!=null) {
- if (ED_head_label(ep).getBoolean("set"))
+ if (ED_head_label(ep).set!=0)
n_set_lbls++;
else if (((et != (0 << 1)) && (ED_spl(ep) != null)))
n_elbls++;
}
if (ED_tail_label(ep)!=null) {
-UNSUPPORTED("abwl715n01quq34u2qs1kn9xn"); // if (ED_tail_label(ep)->set)
-UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++;
-UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL)))
-UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++;
+ if (ED_tail_label(ep).set!=0)
+ n_set_lbls++;
+ else if (((et != (0 << 1)) && (ED_spl(ep) != null)))
+ n_elbls++;
}
if (ED_label(ep)!=null) {
- if (ED_label(ep).getBoolean("set"))
+ if (ED_label(ep).set!=0)
n_set_lbls++;
else if (((et != (0 << 1)) && (ED_spl(ep) != null)))
n_elbls++;
@@ -1227,7 +1230,7 @@ UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++;
}
}
if ((GD_has_labels(gp) & (1 << 3))!=0)
-UNSUPPORTED("4z3bgexjlrmdrfgpdaajems8q"); // n_clbls = countClusterLabels (gp);
+ n_clbls = countClusterLabels (gp);
/* A label for each unpositioned external label */
n_lbls = n_nlbls + n_elbls;
if (n_lbls == 0) return;
@@ -1235,9 +1238,9 @@ UNSUPPORTED("4z3bgexjlrmdrfgpdaajems8q"); // n_clbls = countClusterLabels (gp);
* and all unset edge labels and xlabels.
*/
n_objs = agnnodes(gp) + n_set_lbls + n_clbls + n_elbls;
- objs = zmalloc(sizeof(object_t.class, n_objs));
+ objs = new ST_object_t.Array(n_objs);
objp = objs;
- lbls = zmalloc(sizeof(xlabel_t.class, n_lbls));
+ lbls = new ST_xlabel_t.Array(n_lbls);
xlp = lbls;
bb.setStruct("LL", pointfof(INT_MAX, INT_MAX));
bb.setStruct("UR", pointfof(-INT_MAX, -INT_MAX));
@@ -1258,12 +1261,12 @@ UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
for (ep = agfstout(gp, np); ep!=null; ep = agnxtout(gp, ep)) {
lp = ED_label(ep);
if (lp != null) {
- if (lp.getBoolean("set")) {
+ if (lp.set!=0) {
bb.___(addLabelObj (lp, objp, bb));
}
else if (((et != (0 << 1)) && (ED_spl(ep) != null))) {
-UNSUPPORTED("9ffmrymv8cg4h4b3ea97t9qbp"); // addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep));
-UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++;
+ addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep));
+ xlp = xlp.plus(1);
}
else {
UNSUPPORTED("3ia66n3hqrwmh3hybkoh6f8wa"); // agerr(AGWARN, "no position for edge with label %s",
@@ -1274,23 +1277,23 @@ objp = objp.plus(1);
}
lp = ED_tail_label(ep);
if (lp != null) {
-if (lp.getBoolean("set")) {
+if (lp.set!=0) {
UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb);
}
-UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) {
-UNSUPPORTED("bqc6ukxlmt6l3osbpsmqbzutc"); // addXLabel (lp, objp, xlp, 1, edgeTailpoint(ep));
-UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++;
-UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
-UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else {
+ else if (((et != (0 << 1)) && (ED_spl(ep) != null))) {
+ addXLabel (lp, objp, xlp, 1, edgeTailpoint(ep));
+ xlp = xlp.plus(1);
+ }
+ else {
UNSUPPORTED("5ixexxcbcix5hrfl43td7pj4s"); // agerr(AGWARN, "no position for edge with tail label %s",
UNSUPPORTED("cf9qaysecgkvv4165la4uu6cb"); // ED_tail_label(ep)->text);
UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue;
-UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
+ }
objp = objp.plus(1);
}
lp = ED_head_label(ep);
if (lp != null) {
-if (lp.getBoolean("set")) {
+if (lp.set!=0) {
UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb);
}
else if (((et != (0 << 1)) && (ED_spl(ep) != null))) {
@@ -1323,39 +1326,36 @@ UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++;
}
}
if (n_clbls!=0) {
-UNSUPPORTED("48ipxdlv7xlti99g0yhi5zuai"); // cinfo_t info;
-UNSUPPORTED("7c5iohb8t706p273ae1lxal8r"); // info.bb = bb;
-UNSUPPORTED("b1474fakrbyw7p5ja42jgv90c"); // info.objp = objp;
-UNSUPPORTED("6ygw8idplugc5u6w7ro3gakmb"); // info = addClusterObj (gp, info);
-UNSUPPORTED("1l2cwgzediv4hztjhtm052rl3"); // bb = info.bb;
+ final ST_cinfo_t info = new ST_cinfo_t();
+ info.setStruct("bb", bb);
+ info.objp = objp;
+ info.___(addClusterObj (gp, info));
+ bb.___(info.bb);
}
force = (agattr(gp,AGRAPH,new CString("forcelabels"),null));
-params.setBoolean("force", late_bool(gp, force, 1));
+params.force = late_bool(gp, force, 1);
params.setStruct("bb", bb);
-placeLabels(objs, n_objs, lbls, n_lbls, params.amp());
-UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose)
-UNSUPPORTED("4iypau1fdov37qnq2ub6iq5ra"); // printData(objs, n_objs, lbls, n_lbls, &params);
-UNSUPPORTED("52mefujap7scy273ud7nyj9hn"); // xlp = lbls;
-UNSUPPORTED("3wtn792c3ql5yhn77alu6r5d8"); // cnt = 0;
-UNSUPPORTED("30yvif5t111f94y1fs2gd8crq"); // for (i = 0; i < n_lbls; i++) {
-UNSUPPORTED("w0kpfap6pb5scjkqkgsfira0"); // if (xlp->set) {
-UNSUPPORTED("7hl03wjg5yryhvbe4ar0i0b8g"); // cnt++;
-UNSUPPORTED("8xqwhcveb6ivragr1ebkp4pfh"); // lp = (textlabel_t *) (xlp->lbl);
-UNSUPPORTED("a5h8ktnl3raui7zo5kcjzd2e0"); // lp->set = 1;
-UNSUPPORTED("4lub8ddx8vt0gove63lajjr4s"); // lp->pos = centerPt(xlp);
-UNSUPPORTED("d613i6370zjpynl7n5caiorig"); // updateBB (gp, lp);
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("1966qdxqc520zc0itk8al0xus"); // xlp++;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); // if (Verbose)
-UNSUPPORTED("dy42jv2urndusl1b1jrir300t"); // fprintf (stderr, "%d out of %d labels positioned.\n", cnt, n_lbls);
-UNSUPPORTED("1jtgut2015ohnwt6qfisxgbs5"); // else if (cnt != n_lbls)
+placeLabels(objs, n_objs, lbls, n_lbls, params);
+// if (Verbose)
+// printData(objs, n_objs, lbls, n_lbls, &params);
+ xlp = lbls;
+ cnt = 0;
+ for (i = 0; i < n_lbls; i++) {
+ if (xlp.get(0).set!=0) {
+ cnt++;
+ lp = xlp.getStruct().lbl;
+ lp.setInt("set", 1);
+ lp.setStruct("pos", centerPt(xlp));
+ updateBB (gp, lp);
+ }
+ xlp = xlp.plus(1);
+ }
+// if (Verbose)
+// fprintf (stderr, "%d out of %d labels positioned.\n", cnt, n_lbls);
+if (cnt != n_lbls)
UNSUPPORTED("9hqu9h8q1a2xl4ty48ct0fdyp"); // agerr(AGWARN, "%d out of %d exterior labels positioned.\n", cnt, n_lbls);
-UNSUPPORTED("baez6nmarx9nht65vulvjojic"); // free(objs);
-UNSUPPORTED("ayak2o9js1lmsa5vuzul2sdxs"); // free(lbls);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ Memory.free(objs);
+ Memory.free(lbls);
} finally {
LEAVING("d4215jd9wukfn6t0iknwzjcof","addXLabels");
}
@@ -1366,11 +1366,11 @@ LEAVING("d4215jd9wukfn6t0iknwzjcof","addXLabels");
//3 8fc0zxg8y7hec3n4evx3jw6cq
// void gv_postprocess(Agraph_t * g, int allowTranslation)
-public static void gv_postprocess(Agraph_s g, int allowTranslation) {
+public static void gv_postprocess(ST_Agraph_s g, int allowTranslation) {
ENTERING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess");
try {
double diff;
- final __struct__<pointf> dimen = JUtils.from(pointf.class);
+ final ST_pointf dimen = new ST_pointf();
Z.z().Rankdir = GD_rankdir(g);
Z.z().Flip = GD_flip(g)!=0;
/* Handle cluster labels */
@@ -1383,7 +1383,7 @@ UNSUPPORTED("4hxky2sp978rmy6018sfmts6m"); // place_flip_graph_label(g);
*/
addXLabels(g);
/* Add space for graph label if necessary */
- if (GD_label(g)!=null && N(GD_label(g).getPtr("set"))) {
+ if (GD_label(g)!=null && N(GD_label(g).set)) {
UNSUPPORTED("crj0py2wme4b5l8apvbxqcmqa"); // dimen = GD_label(g)->dimen;
UNSUPPORTED("22jhn709g4c5wh0gb6v40rh19"); // {((dimen).x += 4*4); ((dimen).y += 2*4);};
UNSUPPORTED("9k69y89jybam5elefg45va3ey"); // if (Flip) {
@@ -1435,7 +1435,7 @@ UNSUPPORTED("3xtu7zkpqq7nsx9oe68oi6ebt"); // Offset = pointfof(GD_bb(g).LL.
}
translate_drawing(g);
}
- if (GD_label(g)!=null && N(GD_label(g).getPtr("set")))
+ if (GD_label(g)!=null && N(GD_label(g).set))
UNSUPPORTED("6dds0zsvqw48u510zcy954fh1"); // place_root_label(g, dimen);
if (Z.z().Show_boxes!=null) {
UNSUPPORTED("8c7x8di5w36ib05qan9z4sl9"); // char buf[BUFSIZ];
@@ -1456,7 +1456,7 @@ LEAVING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess");
//3 3qbbvlnq1b06ylgr0yj2slbhm
// void dotneato_postprocess(Agraph_t * g)
-public static void dotneato_postprocess(Agraph_s g) {
+public static void dotneato_postprocess(ST_Agraph_s g) {
ENTERING("3qbbvlnq1b06ylgr0yj2slbhm","dotneato_postprocess");
try {
gv_postprocess(g, 1);
@@ -1505,15 +1505,15 @@ throw new UnsupportedOperationException();
//3 72zw1alhd5vd0g6mhum507rvx
// void place_graph_label(graph_t * g)
-public static void place_graph_label(Agraph_s g) {
+public static void place_graph_label(ST_Agraph_s g) {
ENTERING("72zw1alhd5vd0g6mhum507rvx","place_graph_label");
try {
int c;
- final __struct__<pointf> p = JUtils.from(pointf.class), d = JUtils.from(pointf.class);
- if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && N(GD_label(g).getInt("set"))) {
+ final ST_pointf p = new ST_pointf(), d = new ST_pointf();
+ if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && N(GD_label(g).set)) {
if ((GD_label_pos(g) & 1)!=0) {
- d.___(GD_border(g).plus(2).getStruct());
- p.setDouble("y", GD_bb(g).UR.y - d.getDouble("y") / 2);
+ d.___(GD_border(g)[2].getStruct());
+ p.setDouble("y", GD_bb(g).UR.y - d.y / 2);
} else {
UNSUPPORTED("1w38no4welthbwa0i10hei16b"); // d = GD_border(g)[0];
UNSUPPORTED("2xa4n9ca16xpf1kahaycmkl4r"); // p.y = GD_bb(g).LL.y + d.y / 2;
@@ -1526,10 +1526,10 @@ UNSUPPORTED("7ictv9eqmjvxjii5lqlyw8nu"); // p.x = GD_bb(g).LL.x + d.x / 2;
p.setDouble("x", (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2);
}
GD_label(g).setStruct("pos", p);
- GD_label(g).setBoolean("set", NOT(false));
+ GD_label(g).set= NOTI(false);
}
for (c = 1; c <= GD_n_cluster(g); c++)
- place_graph_label((Agraph_s) GD_clust(g).plus(c).getPtr());
+ place_graph_label((ST_Agraph_s) GD_clust(g).get(c).getPtr());
} finally {
LEAVING("72zw1alhd5vd0g6mhum507rvx","place_graph_label");
}
diff --git a/src/gen/lib/common/psusershape__c.java b/src/gen/lib/common/psusershape__c.java
index d5e5485..deb6a9f 100644
--- a/src/gen/lib/common/psusershape__c.java
+++ b/src/gen/lib/common/psusershape__c.java
@@ -47,10 +47,7 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class psusershape__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/common/routespl__c.java b/src/gen/lib/common/routespl__c.java
index 7478aaf..9ed4acb 100644
--- a/src/gen/lib/common/routespl__c.java
+++ b/src/gen/lib/common/routespl__c.java
@@ -46,19 +46,17 @@
package gen.lib.common;
import static gen.lib.cgraph.edge__c.aghead;
import static gen.lib.cgraph.edge__c.agtail;
-import static gen.lib.common.memory__c.gmalloc;
import static gen.lib.pathplan.route__c.Proutespline;
import static gen.lib.pathplan.shortest__c.Pshortestpath;
import static gen.lib.pathplan.util__c.make_polyline;
import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtils.cos;
import static smetana.core.JUtils.sin;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.ABS;
-import static smetana.core.Macro.ALLOC;
-import static smetana.core.Macro.ALLOC_allocated2;
+import static smetana.core.Macro.ALLOC_allocated_ST_Pedge_t;
+import static smetana.core.Macro.ALLOC_allocated_ST_pointf;
import static smetana.core.Macro.ED_edge_type;
import static smetana.core.Macro.ED_to_orig;
import static smetana.core.Macro.INT_MAX;
@@ -66,23 +64,15 @@ import static smetana.core.Macro.INT_MIN;
import static smetana.core.Macro.MIN;
import static smetana.core.Macro.N;
import static smetana.core.Macro.NOT;
-import static smetana.core.Macro.RALLOC;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Pedge_t;
-import h.Ppoly_t;
+import h.ST_Agedge_s;
+import h.ST_Ppoly_t;
import h.ST_boxf;
-import h.boxf;
-import h.path;
-import h.pointf;
-import smetana.core.JUtils;
+import h.ST_path;
+import h.ST_pointf;
import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class routespl__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -342,14 +332,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -378,25 +368,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -420,16 +391,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -758,48 +729,48 @@ throw new UnsupportedOperationException();
//3 7ebl6qohcfpf1b9ucih5r9qgp
// pointf* simpleSplineRoute (pointf tp, pointf hp, Ppoly_t poly, int* n_spl_pts, int polyline)
-public static pointf simpleSplineRoute(final __struct__<pointf> tp, final __struct__<pointf> hp, final __struct__<Ppoly_t> poly, int[] n_spl_pts, boolean polyline) {
+public static ST_pointf.Array simpleSplineRoute(final ST_pointf tp, final ST_pointf hp, final ST_Ppoly_t poly, int[] n_spl_pts, boolean polyline) {
// WARNING!! STRUCT
-return simpleSplineRoute_w_(tp.copy(), hp.copy(), poly.copy(), n_spl_pts, polyline);
+return simpleSplineRoute_w_(tp.copy(), hp.copy(), (ST_Ppoly_t) poly.copy(), n_spl_pts, polyline);
}
-private static pointf simpleSplineRoute_w_(final __struct__<pointf> tp, final __struct__<pointf> hp, final __struct__<Ppoly_t> poly, int[] n_spl_pts, boolean polyline) {
+private static ST_pointf.Array simpleSplineRoute_w_(final ST_pointf tp, final ST_pointf hp, final ST_Ppoly_t poly, int[] n_spl_pts, boolean polyline) {
ENTERING("7ebl6qohcfpf1b9ucih5r9qgp","simpleSplineRoute");
try {
- final __struct__<Ppoly_t> pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class);
- final __array_of_struct__ eps = __array_of_struct_impl__.malloc(pointf.class, 2);
- final __array_of_struct__ evs = __array_of_struct_impl__.malloc(pointf.class, 2);
+ final ST_Ppoly_t pl = new ST_Ppoly_t(), spl = new ST_Ppoly_t();
+ final ST_pointf.Array eps = new ST_pointf.Array( 2);
+ final ST_pointf.Array evs = new ST_pointf.Array( 2);
int i;
- eps.plus(0).setDouble("x", tp.getDouble("x"));
- eps.plus(0).setDouble("y", tp.getDouble("y"));
- eps.plus(1).setDouble("x", hp.getDouble("x"));
- eps.plus(1).setDouble("y", hp.getDouble("y"));
- if (Pshortestpath(poly.amp(), eps, pl.amp()) < 0)
+ eps.plus(0).setDouble("x", tp.x);
+ eps.plus(0).setDouble("y", tp.y);
+ eps.plus(1).setDouble("x", hp.x);
+ eps.plus(1).setDouble("y", hp.y);
+ if (Pshortestpath(poly, eps, pl) < 0)
return null;
if (polyline)
- make_polyline (pl, spl.amp());
+ make_polyline (pl, spl);
else {
- if (poly.getInt("pn") > Z.z().edgen) {
- Z.z().edges = ALLOC(poly.getInt("pn"), Z.z().edges, Pedge_t.class);
- Z.z().edgen = poly.getInt("pn");
+ if (poly.pn > Z.z().edgen) {
+ Z.z().edges = ALLOC_allocated_ST_Pedge_t(Z.z().edges, poly.pn);
+ Z.z().edgen = poly.pn;
}
- for (i = 0; i < poly.getInt("pn"); i++) {
- Z.z().edges.plus(i).setStruct("a", poly.getArrayOfStruct("ps").plus(i).getStruct());
- Z.z().edges.plus(i).setStruct("b", poly.getArrayOfStruct("ps").plus((i + 1) % poly.getInt("pn")).getStruct());
+ for (i = 0; i < poly.pn; i++) {
+ Z.z().edges.plus(i).setStruct("a", poly.ps.plus(i).getStruct());
+ Z.z().edges.plus(i).setStruct("b", poly.ps.plus((i + 1) % poly.pn).getStruct());
}
evs.plus(0).setDouble("x", 0);
evs.plus(0).setDouble("y", 0);
evs.plus(1).setDouble("x", 0);
evs.plus(1).setDouble("y", 0);
- if (Proutespline(Z.z().edges, poly.getInt("pn"), pl, evs.asPtr(), spl.amp()) < 0)
+ if (Proutespline(Z.z().edges, poly.pn, pl, evs.asPtr(), spl) < 0)
return null;
}
- if (mkspacep(spl.getInt("pn")))
+ if (mkspacep(spl.pn))
return null;
- for (i = 0; i < spl.getInt("pn"); i++) {
- Z.z().ps.plus(i).setStruct(spl.getArrayOfPtr("ps").plus(i).getStruct());
+ for (i = 0; i < spl.pn; i++) {
+ Z.z().ps.plus(i).setStruct(spl.ps.plus(i).getStruct());
}
- n_spl_pts[0] = spl.getInt("pn");
- return (pointf) Z.z().ps;
+ n_spl_pts[0] = spl.pn;
+ return Z.z().ps;
} finally {
LEAVING("7ebl6qohcfpf1b9ucih5r9qgp","simpleSplineRoute");
}
@@ -814,7 +785,7 @@ public static int routesplinesinit() {
ENTERING("bfsrazjf3vkf12stnke48vc8t","routesplinesinit");
try {
if (++Z.z().routeinit > 1) return 0;
- if (N(Z.z().ps = gmalloc(sizeof(pointf.class, 300)))) {
+ if (N(Z.z().ps = new ST_pointf.Array(300))) {
UNSUPPORTED("2qoo3na2ur9oh7hmvt6xv1txd"); // agerr(AGERR, "routesplinesinit: cannot allocate ps\n");
UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1;
}
@@ -853,12 +824,12 @@ LEAVING("55j3tny5cxemrsvrt3m21jxg8","routesplinesterm");
//3 cu8ssjizw7ileqe9u7tcclq7k
// static void limitBoxes (boxf* boxes, int boxn, pointf *pps, int pn, int delta)
-public static void limitBoxes(__array_of_ptr__ boxes, int boxn, __ptr__ pps, int pn, int delta) {
+public static void limitBoxes(ST_boxf boxes[], int boxn, __ptr__ pps, int pn, int delta) {
ENTERING("cu8ssjizw7ileqe9u7tcclq7k","limitBoxes");
try {
int bi, si, splinepi;
double t;
- final __array_of_struct__ sp = __array_of_struct_impl__.malloc(pointf.class, 4);
+ final ST_pointf.Array sp = new ST_pointf.Array( 4);
int num_div = delta * boxn;
for (splinepi = 0; splinepi + 3 < pn; splinepi += 3) {
for (si = 0; si <= num_div; si++) {
@@ -867,26 +838,26 @@ try {
sp.plus(1).getStruct().___(pps.plus(splinepi+1).getStruct());
sp.plus(2).getStruct().___(pps.plus(splinepi+2).getStruct());
sp.plus(3).getStruct().___(pps.plus(splinepi+3).getStruct());
- sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x")));
- sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y")));
- sp.plus(1).setDouble("x", sp.plus(1).getDouble("x") + t * (sp.plus(2).getDouble("x") - sp.plus(1).getDouble("x")));
- sp.plus(1).setDouble("y", sp.plus(1).getDouble("y") + t * (sp.plus(2).getDouble("y") - sp.plus(1).getDouble("y")));
- sp.plus(2).setDouble("x", sp.plus(2).getDouble("x") + t * (sp.plus(3).getDouble("x") - sp.plus(2).getDouble("x")));
- sp.plus(2).setDouble("y", sp.plus(2).getDouble("y") + t * (sp.plus(3).getDouble("y") - sp.plus(2).getDouble("y")));
- sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x")));
- sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y")));
- sp.plus(1).setDouble("x", sp.plus(1).getDouble("x") + t * (sp.plus(2).getDouble("x") - sp.plus(1).getDouble("x")));
- sp.plus(1).setDouble("y", sp.plus(1).getDouble("y") + t * (sp.plus(2).getDouble("y") - sp.plus(1).getDouble("y")));
- sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x")));
- sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y")));
+ sp.plus(0).setDouble("x", sp.get(0).x + t * (sp.get(1).x - sp.get(0).x));
+ sp.plus(0).setDouble("y", sp.get(0).y + t * (sp.get(1).y - sp.get(0).y));
+ sp.plus(1).setDouble("x", sp.get(1).x + t * (sp.get(2).x - sp.get(1).x));
+ sp.plus(1).setDouble("y", sp.get(1).y + t * (sp.get(2).y - sp.get(1).y));
+ sp.plus(2).setDouble("x", sp.get(2).x + t * (sp.get(3).x - sp.get(2).x));
+ sp.plus(2).setDouble("y", sp.get(2).y + t * (sp.get(3).y - sp.get(2).y));
+ sp.plus(0).setDouble("x", sp.get(0).x + t * (sp.get(1).x - sp.get(0).x));
+ sp.plus(0).setDouble("y", sp.get(0).y + t * (sp.get(1).y - sp.get(0).y));
+ sp.plus(1).setDouble("x", sp.get(1).x + t * (sp.get(2).x - sp.get(1).x));
+ sp.plus(1).setDouble("y", sp.get(1).y + t * (sp.get(2).y - sp.get(1).y));
+ sp.plus(0).setDouble("x", sp.get(0).x + t * (sp.get(1).x - sp.get(0).x));
+ sp.plus(0).setDouble("y", sp.get(0).y + t * (sp.get(1).y - sp.get(0).y));
for (bi = 0; bi < boxn; bi++) {
/* this tested ok on 64bit machines, but on 32bit we need this FUDGE
* or graphs/directed/records.gv fails */
- if (sp.plus(0).getDouble("y") <= boxes.plus(bi).getStruct("UR").getDouble("y")+.0001 && sp.plus(0).getDouble("y") >= boxes.plus(bi).getStruct("LL").getDouble("y")-.0001) {
- if (boxes.plus(bi).getStruct("LL").getDouble("x") > sp.plus(0).getDouble("x"))
- boxes.plus(bi).getStruct("LL").setDouble("x", sp.plus(0).getDouble("x"));
- if (boxes.plus(bi).getStruct("UR").getDouble("x") < sp.plus(0).getDouble("x"))
- boxes.plus(bi).getStruct("UR").setDouble("x", sp.plus(0).getDouble("x"));
+ if (sp.get(0).y <= boxes[bi].UR.y+.0001 && sp.get(0).y >= boxes[bi].LL.y-.0001) {
+ if (boxes[bi].LL.x > sp.get(0).x)
+ boxes[bi].LL.setDouble("x", sp.get(0).x);
+ if (boxes[bi].UR.x < sp.get(0).x)
+ boxes[bi].UR.setDouble("x", sp.get(0).x);
}
}
}
@@ -901,45 +872,45 @@ LEAVING("cu8ssjizw7ileqe9u7tcclq7k","limitBoxes");
//3 3mcnemqisisnqtd4mr72ej76y
// static pointf *_routesplines(path * pp, int *npoints, int polyline)
-public static __ptr__ _routesplines(path pp, int npoints[], int polyline) {
+public static __ptr__ _routesplines(ST_path pp, int npoints[], int polyline) {
ENTERING("3mcnemqisisnqtd4mr72ej76y","_routesplines");
try {
- final __struct__<Ppoly_t> poly = JUtils.from(Ppoly_t.class);
- final __struct__<Ppoly_t> pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class);
+ final ST_Ppoly_t poly = new ST_Ppoly_t();
+ final ST_Ppoly_t pl = new ST_Ppoly_t(), spl = new ST_Ppoly_t();
int splinepi;
- final __array_of_struct__ eps = __array_of_struct_impl__.malloc(pointf.class, 2);
- final __array_of_struct__ evs = __array_of_struct_impl__.malloc(pointf.class, 2);
+ final ST_pointf.Array eps = new ST_pointf.Array( 2);
+ final ST_pointf.Array evs = new ST_pointf.Array( 2);
int edgei, prev, next;
int pi=0, bi;
- __array_of_ptr__ boxes;
+ ST_boxf[] boxes;
int boxn;
- Agedge_s realedge;
+ ST_Agedge_s realedge;
int flip;
int loopcnt, delta = 10;
boolean unbounded;
Z.z().nedges++;
- Z.z().nboxes += pp.getInt("nbox");
- for (realedge = (Agedge_s) pp.getPtr("data").castTo(Agedge_s.class);
+ Z.z().nboxes += pp.nbox;
+ for (realedge = (ST_Agedge_s) pp.data.castTo(ST_Agedge_s.class);
realedge!=null && ED_edge_type(realedge) != 0;
realedge = ED_to_orig(realedge));
if (N(realedge)) {
UNSUPPORTED("agerr(AGERR, _in routesplines, cannot find NORMAL edge");
return null;
}
- boxes = pp.getArrayOfPtr("boxes");
- boxn = pp.getInt("nbox");
+ boxes = pp.boxes;
+ boxn = pp.nbox;
if (checkpath(boxn, boxes, pp)!=0)
return null;
if (boxn * 8 > Z.z().polypointn) {
- Z.z().polypoints = ALLOC_allocated2(boxn * 8, Z.z().polypoints, pointf.class);
+ Z.z().polypoints = ALLOC_allocated_ST_pointf(Z.z().polypoints, boxn * 8);
Z.z().polypointn = boxn * 8;
}
- if ((boxn > 1) && (((ST_boxf)boxes.plus(0).getStruct()).LL.y > ((ST_boxf)boxes.plus(1).getStruct()).LL.y)) {
+ if ((boxn > 1) && (((ST_boxf)boxes[0]).LL.y > ((ST_boxf)boxes[1]).LL.y)) {
flip = 1;
for (bi = 0; bi < boxn; bi++) {
- double v = ((ST_boxf)boxes.plus(bi).getStruct()).UR.y;
- ((ST_boxf)boxes.plus(bi).getStruct()).UR.y= -1*((ST_boxf)boxes.plus(bi).getStruct()).LL.y;
- ((ST_boxf)boxes.plus(bi).getStruct()).LL.y = -v;
+ double v = ((ST_boxf)boxes[bi]).UR.y;
+ ((ST_boxf)boxes[bi]).UR.y= -1*((ST_boxf)boxes[bi]).LL.y;
+ ((ST_boxf)boxes[bi]).LL.y = -v;
}
}
else flip = 0;
@@ -949,20 +920,20 @@ try {
for (bi = 0, pi = 0; bi < boxn; bi++) {
next = prev = 0;
if (bi > 0)
- prev = (((ST_boxf)boxes.plus(bi).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi-1).getStruct()).LL.y) ? -1 : 1;
+ prev = (((ST_boxf)boxes[bi]).LL.y > ((ST_boxf)boxes[bi-1]).LL.y) ? -1 : 1;
if (bi < boxn - 1)
- next = (((ST_boxf)boxes.plus(bi+1).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi).getStruct()).LL.y) ? 1 : -1;
+ next = (((ST_boxf)boxes[bi+1]).LL.y > ((ST_boxf)boxes[bi]).LL.y) ? 1 : -1;
if (prev != next) {
if (next == -1 || prev == 1) {
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).LL.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).UR.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).LL.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).LL.y);
} else {
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).UR.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).LL.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).UR.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).UR.y);
}
}
else if (prev == 0) { /* single box */
@@ -981,20 +952,20 @@ UNSUPPORTED("9idk92zg2ysz316lfwzvvvde6"); // return NULL;
for (bi = boxn - 1; bi >= 0; bi--) {
next = prev = 0;
if (bi < boxn - 1)
- prev = (((ST_boxf)boxes.plus(bi).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi+1).getStruct()).LL.y) ? -1 : 1;
+ prev = (((ST_boxf)boxes[bi]).LL.y > ((ST_boxf)boxes[bi+1]).LL.y) ? -1 : 1;
if (bi > 0)
- next = (((ST_boxf)boxes.plus(bi-1).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi).getStruct()).LL.y) ? 1 : -1;
+ next = (((ST_boxf)boxes[bi-1]).LL.y > ((ST_boxf)boxes[bi]).LL.y) ? 1 : -1;
if (prev != next) {
if (next == -1 || prev == 1 ) {
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).LL.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).UR.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).LL.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).LL.y);
} else {
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).UR.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).LL.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).UR.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).UR.y);
}
}
else if (prev == 0) { /* single box */
@@ -1009,14 +980,14 @@ UNSUPPORTED("87y5d0ts6xdjyx905bha50f3s"); // /* it went badly, e.g. degene
UNSUPPORTED("1qt7hixteu3pt64wk1sqw352a"); // agerr(AGERR, "in routesplines, illegal values of prev %d and next %d, line %d\n", prev, next, 476);
UNSUPPORTED("35untdbpd42pt4c74gjbxqx7q"); // return NULL; /* for correctness sake, it's best to just stop */
}
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
- Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
- Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).UR.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).LL.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).UR.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).UR.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).LL.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).UR.y);
+ Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes[bi]).LL.x);
+ Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes[bi]).LL.y);
}
}
}
@@ -1027,24 +998,24 @@ UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL;
if (flip!=0) {
int i;
for (bi = 0; bi < boxn; bi++) {
- int v = (int) ((ST_boxf)boxes.plus(bi).getStruct()).UR.y;
- ((ST_boxf)boxes.plus(bi).getStruct()).UR.y = -1*((ST_boxf)boxes.plus(bi).getStruct()).LL.y;
- ((ST_boxf)boxes.plus(bi).getStruct()).LL.y = -v;
+ int v = (int) ((ST_boxf)boxes[bi]).UR.y;
+ ((ST_boxf)boxes[bi]).UR.y = -1*((ST_boxf)boxes[bi]).LL.y;
+ ((ST_boxf)boxes[bi]).LL.y = -v;
}
for (i = 0; i < pi; i++)
- Z.z().polypoints.plus(i).setDouble("y", -1 * Z.z().polypoints.plus(i).getDouble("y"));
+ Z.z().polypoints.plus(i).setDouble("y", -1 * Z.z().polypoints.get(i).y);
}
for (bi = 0; bi < boxn; bi++) {
- ((ST_boxf)boxes.plus(bi).getStruct()).LL.x = INT_MAX;
- ((ST_boxf)boxes.plus(bi).getStruct()).UR.x = INT_MIN;
+ ((ST_boxf)boxes[bi]).LL.x = INT_MAX;
+ ((ST_boxf)boxes[bi]).UR.x = INT_MIN;
}
- poly.setPtr("ps", Z.z().polypoints);
- poly.setInt("pn", pi);
- eps.plus(0).getStruct().setDouble("x", pp.getStruct("start").getStruct("p").getDouble("x"));
- eps.plus(0).getStruct().setDouble("y", pp.getStruct("start").getStruct("p").getDouble("y"));
- eps.plus(1).getStruct().setDouble("x", pp.getStruct("end").getStruct("p").getDouble("x"));
- eps.plus(1).getStruct().setDouble("y", pp.getStruct("end").getStruct("p").getDouble("y"));
- if (Pshortestpath((Ppoly_t) poly.amp(), eps, (Ppoly_t) pl.amp()) < 0) {
+ poly.ps = Z.z().polypoints;
+ poly.pn = pi;
+ eps.plus(0).getStruct().setDouble("x", pp.start.p.x);
+ eps.plus(0).getStruct().setDouble("y", pp.start.p.y);
+ eps.plus(1).getStruct().setDouble("x", pp.end.p.x);
+ eps.plus(1).getStruct().setDouble("y", pp.end.p.y);
+ if (Pshortestpath(poly, eps, pl) < 0) {
System.err.println("in routesplines, Pshortestpath failed\n");
return null;
}
@@ -1052,47 +1023,47 @@ UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL;
UNSUPPORTED("48veztc3k9dfw8tqolu7jsktk"); // make_polyline (pl, &spl);
}
else {
- if (poly.getInt("pn") > Z.z().edgen) {
- Z.z().edges = ALLOC_allocated2(poly.getInt("pn"), Z.z().edges, Pedge_t.class);
- Z.z().edgen = poly.getInt("pn");
+ if (poly.pn > Z.z().edgen) {
+ Z.z().edges = ALLOC_allocated_ST_Pedge_t(Z.z().edges, poly.pn);
+ Z.z().edgen = poly.pn;
}
- for (edgei = 0; edgei < poly.getInt("pn"); edgei++) {
+ for (edgei = 0; edgei < poly.pn; edgei++) {
Z.z().edges.plus(edgei).setStruct("a", Z.z().polypoints.plus(edgei).getStruct());
- Z.z().edges.plus(edgei).setStruct("b", Z.z().polypoints.plus((edgei + 1) % poly.getInt("pn")).getStruct());
+ Z.z().edges.plus(edgei).setStruct("b", Z.z().polypoints.plus((edgei + 1) % poly.pn).getStruct());
}
- if (pp.getStruct("start").getBoolean("constrained")) {
- evs.plus(0).getStruct().setDouble("x", cos(pp.getStruct("start").getDouble("theta")));
- evs.plus(0).getStruct().setDouble("y", sin(pp.getStruct("start").getDouble("theta")));
+ if (pp.start.constrained!=0) {
+ evs.plus(0).getStruct().setDouble("x", cos(pp.start.theta));
+ evs.plus(0).getStruct().setDouble("y", sin(pp.start.theta));
} else
{
evs.plus(0).getStruct().setDouble("x", 0);
evs.plus(0).getStruct().setDouble("y", 0);
}
- if (pp.getStruct("end").getBoolean("constrained")) {
- evs.plus(1).getStruct().setDouble("x", -cos(pp.getStruct("end").getDouble("theta")));
- evs.plus(1).getStruct().setDouble("y", -sin(pp.getStruct("end").getDouble("theta")));
+ if (pp.end.constrained!=0) {
+ evs.plus(1).getStruct().setDouble("x", -cos(pp.end.theta));
+ evs.plus(1).getStruct().setDouble("y", -sin(pp.end.theta));
} else
{
evs.plus(1).getStruct().setDouble("x", 0);
evs.plus(1).getStruct().setDouble("y", 0);
}
- if (Proutespline(Z.z().edges, poly.getInt("pn"), pl, evs.asPtr(), spl.amp()) < 0) {
+ if (Proutespline(Z.z().edges, poly.pn, pl, evs.asPtr(), spl) < 0) {
UNSUPPORTED("elkeyywrfd4hq75w7toc94rzs"); // agerr(AGERR, "in routesplines, Proutespline failed\n");
UNSUPPORTED("7t3fvwp9cv90qu5bdjdglcgtk"); // return NULL;
}
}
- if (mkspacep(spl.getInt("pn")))
+ if (mkspacep(spl.pn))
UNSUPPORTED("7x5kpcbvg4va887hky7ufm45y"); // return NULL; /* Bailout if no memory left */
for (bi = 0; bi < boxn; bi++) {
- boxes.plus(bi).getStruct("LL").setDouble("x", INT_MAX);
- boxes.plus(bi).getStruct("UR").setDouble("x", INT_MIN);
+ boxes[bi].LL.setDouble("x", INT_MAX);
+ boxes[bi].UR.setDouble("x", INT_MIN);
}
unbounded = NOT(false);
- for (splinepi = 0; splinepi < spl.getInt("pn"); splinepi++) {
- Z.z().ps.plus(splinepi).setStruct(spl.getArrayOfPtr("ps").plus(splinepi).getStruct());
+ for (splinepi = 0; splinepi < spl.pn; splinepi++) {
+ Z.z().ps.plus(splinepi).setStruct(spl.ps.plus(splinepi).getStruct());
}
for (loopcnt = 0; unbounded && (loopcnt < 15); loopcnt++) {
- limitBoxes (boxes, boxn, Z.z().ps, spl.getInt("pn"), delta);
+ limitBoxes (boxes, boxn, Z.z().ps, spl.pn, delta);
/* The following check is necessary because if a box is not very
* high, it is possible that the sampling above might miss it.
* Therefore, we make the sample finer until all boxes have
@@ -1101,7 +1072,7 @@ UNSUPPORTED("7x5kpcbvg4va887hky7ufm45y"); // return NULL; /* Bailout if no mem
for (bi = 0; bi < boxn; bi++) {
/* these fp equality tests are used only to detect if the
* values have been changed since initialization - ok */
- if ((boxes.plus(bi).getStruct("LL").getDouble("x") == INT_MAX) || (boxes.plus(bi).getStruct("UR").getDouble("x") == INT_MIN)) {
+ if ((boxes[bi].LL.x == INT_MAX) || (boxes[bi].UR.x == INT_MIN)) {
delta *= 2; /* try again with a finer interval */
if (delta > INT_MAX/boxn) /* in limitBoxes, boxn*delta must fit in an int, so give up */
loopcnt = 15;
@@ -1117,13 +1088,13 @@ UNSUPPORTED("7x5kpcbvg4va887hky7ufm45y"); // return NULL; /* Bailout if no mem
* to bound the boxes. This will probably mean a bad edge, but we avoid an infinite
* loop and we can see the bad edge, and even use the showboxes scaffolding.
*/
- final __struct__<Ppoly_t> polyspl = JUtils.from(Ppoly_t.class);
+ final ST_Ppoly_t polyspl = new ST_Ppoly_t();
System.err.println("Unable to reclaim box space in spline routing for edge \"%s\" -> \"%s\". Something is probably seriously wrong.\n");
- make_polyline (pl, polyspl.amp());
- limitBoxes (boxes, boxn, polyspl.getPtr("ps"), polyspl.getInt("pn"), 10);
- Memory.free (polyspl.getPtr("ps"));
+ make_polyline (pl, polyspl);
+ limitBoxes (boxes, boxn, polyspl.ps, polyspl.pn, 10);
+ Memory.free (polyspl.ps);
}
- npoints[0] = spl.getInt("pn");
+ npoints[0] = spl.pn;
return Z.z().ps;
} finally {
LEAVING("3mcnemqisisnqtd4mr72ej76y","_routesplines");
@@ -1135,10 +1106,10 @@ LEAVING("3mcnemqisisnqtd4mr72ej76y","_routesplines");
//3 axqoytp2rpr8crajhkuvns6q9
// pointf *routesplines(path * pp, int *npoints)
-public static pointf routesplines(path pp, int npoints[]) {
+public static ST_pointf.Array routesplines(ST_path pp, int npoints[]) {
ENTERING("axqoytp2rpr8crajhkuvns6q9","routesplines");
try {
- return (pointf) _routesplines (pp, npoints, 0);
+ return (ST_pointf.Array) _routesplines (pp, npoints, 0);
} finally {
LEAVING("axqoytp2rpr8crajhkuvns6q9","routesplines");
}
@@ -1149,7 +1120,7 @@ LEAVING("axqoytp2rpr8crajhkuvns6q9","routesplines");
//3 2v22s41xitwnnsljk9n01nrcy
// pointf *routepolylines(path * pp, int *npoints)
-public static pointf routepolylines(path pp, int npoints[]) {
+public static ST_pointf.Array routepolylines(ST_path pp, int npoints[]) {
ENTERING("2v22s41xitwnnsljk9n01nrcy","routepolylines");
try {
UNSUPPORTED("1kjkc6bl8zpf8zjcwgbyni9p3"); // pointf *routepolylines(path * pp, int *npoints)
@@ -1192,43 +1163,43 @@ LEAVING("65qv6x7ghwyt6hey5qd8cgizn","overlap");
//3 dxqjhiid5f58b9gjxp0v3j97b
// static int checkpath(int boxn, boxf* boxes, path* thepath)
-public static int checkpath(int boxn, __array_of_ptr__ boxes, path thepath) {
+public static int checkpath(int boxn, ST_boxf[] boxes, ST_path thepath) {
ENTERING("dxqjhiid5f58b9gjxp0v3j97b","checkpath");
try {
- boxf ba, bb;
+ ST_boxf ba, bb;
int bi, i, errs, l, r, d, u;
int xoverlap, yoverlap;
/* remove degenerate boxes. */
i = 0;
for (bi = 0; bi < boxn; bi++) {
- if (ABS(((ST_boxf)boxes.plus(bi).getStruct()).LL.y - ((ST_boxf)boxes.plus(bi).getStruct()).UR.y) < .01)
+ if (ABS(((ST_boxf)boxes[bi]).LL.y - ((ST_boxf)boxes[bi]).UR.y) < .01)
continue;
- if (ABS(((ST_boxf)boxes.plus(bi).getStruct()).LL.x - ((ST_boxf)boxes.plus(bi).getStruct()).UR.x) < .01)
+ if (ABS(((ST_boxf)boxes[bi]).LL.x - ((ST_boxf)boxes[bi]).UR.x) < .01)
continue;
if (i != bi)
- boxes.plus(i).setStruct(boxes.plus(bi).getStruct());
+ boxes[i].setStruct(boxes[bi]);
i++;
}
boxn = i;
- ba = boxes.plus(0).getStruct().amp();
- if (ba.getStruct("LL").getDouble("x") > ba.getStruct("UR").getDouble("x") || ba.getStruct("LL").getDouble("y") > ba.getStruct("UR").getDouble("y")) {
+ ba = (ST_boxf) boxes[0];
+ if (ba.LL.x > ba.UR.x || ba.LL.y > ba.UR.y) {
UNSUPPORTED("39tznwvf6k5lgj78jp32p0kfl"); // agerr(AGERR, "in checkpath, box 0 has LL coord > UR coord\n");
UNSUPPORTED("evdvb9esh16y8zeoczxhcz7xm"); // printpath(thepath);
UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1;
}
for (bi = 0; bi < boxn - 1; bi++) {
- ba = boxes.plus(bi).getStruct().amp();
- bb = boxes.plus(bi + 1).getStruct().amp();
- if (bb.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x") || bb.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y")) {
+ ba = (ST_boxf) boxes[bi];
+ bb = (ST_boxf) boxes[bi + 1];
+ if (bb.LL.x > bb.UR.x || bb.LL.y > bb.UR.y) {
UNSUPPORTED("c8oodo0ge4n4dglb28fvf610v"); // agerr(AGERR, "in checkpath, box %d has LL coord > UR coord\n",
UNSUPPORTED("929pkk2ob1lh7hfe4scuoo5pn"); // bi + 1);
UNSUPPORTED("2m9o6g4nneiul4gt8xb9yb9zi"); // printpath(thepath);
UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1;
}
- l = (ba.getStruct("UR").getDouble("x") < bb.getStruct("LL").getDouble("x")) ? 1 : 0;
- r = (ba.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x")) ? 1 : 0;
- d = (ba.getStruct("UR").getDouble("y") < bb.getStruct("LL").getDouble("y")) ? 1 : 0;
- u = (ba.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y")) ? 1 : 0;
+ l = (ba.UR.x < bb.LL.x) ? 1 : 0;
+ r = (ba.LL.x > bb.UR.x) ? 1 : 0;
+ d = (ba.UR.y < bb.LL.y) ? 1 : 0;
+ u = (ba.LL.y > bb.UR.y) ? 1 : 0;
errs = l + r + d + u;
/*if (errs > 0 && Verbose) {
fprintf(stderr, "in checkpath, boxes %d and %d don't touch\n",
@@ -1239,108 +1210,108 @@ UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1;
int xy;
if (l == 1)
{
- xy = (int) ba.getStruct("UR").getDouble("x");
- ba.getStruct("UR").setDouble("x", bb.getStruct("LL").getDouble("x"));
- bb.getStruct("LL").setDouble("x", xy);
+ xy = (int) ba.UR.x;
+ ba.UR.setDouble("x", bb.LL.x);
+ bb.LL.setDouble("x", xy);
l = 0;
}
else if (r == 1) {
- xy = (int)(ba.getStruct("LL").getDouble("x"));
- ba.getStruct("LL").setDouble("x", bb.getStruct("UR").getDouble("x"));
- bb.getStruct("UR").setDouble("x", xy);
+ xy = (int)(ba.LL.x);
+ ba.LL.setDouble("x", bb.UR.x);
+ bb.UR.setDouble("x", xy);
r = 0;
}
else if (d == 1) {
- xy = (int)(ba.getStruct("UR").getDouble("y"));
- ba.getStruct("UR").setDouble("y", bb.getStruct("LL").getDouble("y"));
- bb.getStruct("LL").setDouble("y", xy);
+ xy = (int)(ba.UR.y);
+ ba.UR.setDouble("y", bb.LL.y);
+ bb.LL.setDouble("y", xy);
d = 0;
}
else if (u == 1)
-UNSUPPORTED("5kcd52bwvbxxs0md0enfs100u"); // xy = ba.getStruct("LL").getDouble("y"), ba.getStruct("LL").getDouble("y") = bb.getStruct("UR").getDouble("y"), bb.getStruct("UR").getDouble("y") = xy, u = 0;
+UNSUPPORTED("5kcd52bwvbxxs0md0enfs100u"); // xy = ba.LL.y, ba.LL.y = bb.UR.y, bb.UR.y = xy, u = 0;
for (i = 0; i < errs - 1; i++) {
UNSUPPORTED("as3p2ldwbg3rbgy64oxx5phar"); // if (l == 1)
-UNSUPPORTED("efz1z5cfywki1k6q6avldku9z"); // xy = (ba.getStruct("UR").getDouble("x") + bb.getStruct("LL").getDouble("x")) / 2.0 + 0.5, ba.getStruct("UR").getDouble("x") =
-UNSUPPORTED("6dfh7cf1xptapqd1mcqtxjrxa"); // bb.getStruct("LL").getDouble("x") = xy, l = 0;
+UNSUPPORTED("efz1z5cfywki1k6q6avldku9z"); // xy = (ba.UR.x + bb.LL.x) / 2.0 + 0.5, ba.UR.x =
+UNSUPPORTED("6dfh7cf1xptapqd1mcqtxjrxa"); // bb.LL.x = xy, l = 0;
UNSUPPORTED("ang3qytu77fd5owijwbnmkdav"); // else if (r == 1)
-UNSUPPORTED("67ehof0qqlk339zgl0sqwfu5r"); // xy = (ba.getStruct("LL").getDouble("x") + bb.getStruct("UR").getDouble("x")) / 2.0 + 0.5, ba.getStruct("LL").getDouble("x") =
-UNSUPPORTED("llmwvndoq1ne9c62ohtstkwa"); // bb.getStruct("UR").getDouble("x") = xy, r = 0;
+UNSUPPORTED("67ehof0qqlk339zgl0sqwfu5r"); // xy = (ba.LL.x + bb.UR.x) / 2.0 + 0.5, ba.LL.x =
+UNSUPPORTED("llmwvndoq1ne9c62ohtstkwa"); // bb.UR.x = xy, r = 0;
UNSUPPORTED("3ce9i9asrqbuog7v1tdurqo6e"); // else if (d == 1)
-UNSUPPORTED("3mibjrb2jtfextkg9ac5k9spl"); // xy = (ba.getStruct("UR").getDouble("y") + bb.getStruct("LL").getDouble("y")) / 2.0 + 0.5, ba.getStruct("UR").getDouble("y") =
-UNSUPPORTED("bccpbv2n38c5utkfh7msoc2y"); // bb.getStruct("LL").getDouble("y") = xy, d = 0;
+UNSUPPORTED("3mibjrb2jtfextkg9ac5k9spl"); // xy = (ba.UR.y + bb.LL.y) / 2.0 + 0.5, ba.UR.y =
+UNSUPPORTED("bccpbv2n38c5utkfh7msoc2y"); // bb.LL.y = xy, d = 0;
UNSUPPORTED("7302rnmwdji9n7txquk8k36to"); // else if (u == 1)
-UNSUPPORTED("9oqpoodvpheztihe63p40guof"); // xy = (ba.getStruct("LL").getDouble("y") + bb.getStruct("UR").getDouble("y")) / 2.0 + 0.5, ba.getStruct("LL").getDouble("y") =
-UNSUPPORTED("2cnb1bdjh6y26f98vonla73qa"); // bb.getStruct("UR").getDouble("y") = xy, u = 0;
+UNSUPPORTED("9oqpoodvpheztihe63p40guof"); // xy = (ba.LL.y + bb.UR.y) / 2.0 + 0.5, ba.LL.y =
+UNSUPPORTED("2cnb1bdjh6y26f98vonla73qa"); // bb.UR.y = xy, u = 0;
}
}
/* check for overlapping boxes */
- xoverlap = overlap(ba.getStruct("LL").getDouble("x"), ba.getStruct("UR").getDouble("x"), bb.getStruct("LL").getDouble("x"), bb.getStruct("UR").getDouble("x"));
- yoverlap = overlap(ba.getStruct("LL").getDouble("y"), ba.getStruct("UR").getDouble("y"), bb.getStruct("LL").getDouble("y"), bb.getStruct("UR").getDouble("y"));
+ xoverlap = overlap(ba.LL.x, ba.UR.x, bb.LL.x, bb.UR.x);
+ yoverlap = overlap(ba.LL.y, ba.UR.y, bb.LL.y, bb.UR.y);
if (xoverlap!=0 && yoverlap!=0) {
if (xoverlap < yoverlap) {
- if (ba.getStruct("UR").getDouble("x") - ba.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x") - bb.getStruct("LL").getDouble("x")) {
+ if (ba.UR.x - ba.LL.x > bb.UR.x - bb.LL.x) {
/* take space from ba */
-UNSUPPORTED("5dqxf3gq05pjtobtnru1g2tuj"); // if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x"))
-UNSUPPORTED("8gz6k803qp9zyw9s459cpp039"); // ba.getStruct("UR").getDouble("x") = bb.getStruct("LL").getDouble("x");
+UNSUPPORTED("5dqxf3gq05pjtobtnru1g2tuj"); // if (ba.UR.x < bb.UR.x)
+UNSUPPORTED("8gz6k803qp9zyw9s459cpp039"); // ba.UR.x = bb.LL.x;
UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else
-UNSUPPORTED("5r6ck8hfb1cxywn9go61se9kx"); // ba.getStruct("LL").getDouble("x") = bb.getStruct("UR").getDouble("x");
+UNSUPPORTED("5r6ck8hfb1cxywn9go61se9kx"); // ba.LL.x = bb.UR.x;
} else {
/* take space from bb */
- if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x"))
- bb.getStruct("LL").setDouble("x", ba.getStruct("UR").getDouble("x"));
+ if (ba.UR.x < bb.UR.x)
+ bb.LL.setDouble("x", ba.UR.x);
else
- bb.getStruct("UR").setDouble("x", ba.getStruct("LL").getDouble("x"));
+ bb.UR.setDouble("x", ba.LL.x);
}
} else { /* symmetric for y coords */
- if (ba.getStruct("UR").getDouble("y") - ba.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y") - bb.getStruct("LL").getDouble("y")) {
+ if (ba.UR.y - ba.LL.y > bb.UR.y - bb.LL.y) {
/* take space from ba */
- if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y"))
- ba.getStruct("UR").setDouble("y", bb.getStruct("LL").getDouble("y"));
+ if (ba.UR.y < bb.UR.y)
+ ba.UR.setDouble("y", bb.LL.y);
else
- ba.getStruct("LL").setDouble("y", bb.getStruct("UR").getDouble("y"));
+ ba.LL.setDouble("y", bb.UR.y);
} else {
/* take space from bb */
- if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y"))
- bb.getStruct("LL").setDouble("y", ba.getStruct("UR").getDouble("y"));
+ if (ba.UR.y < bb.UR.y)
+ bb.LL.setDouble("y", ba.UR.y);
else
- bb.getStruct("UR").setDouble("y", ba.getStruct("LL").getDouble("y"));
+ bb.UR.setDouble("y", ba.LL.y);
}
}
}
}
- if (thepath.getStruct("start").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(0).getStruct()).LL.x
- || thepath.getStruct("start").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(0).getStruct()).UR.x
- || thepath.getStruct("start").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(0).getStruct()).LL.y
- || thepath.getStruct("start").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(0).getStruct()).UR.y) {
+ if (thepath.start.p.x < ((ST_boxf)boxes[0]).LL.x
+ || thepath.start.p.x > ((ST_boxf)boxes[0]).UR.x
+ || thepath.start.p.y < ((ST_boxf)boxes[0]).LL.y
+ || thepath.start.p.y > ((ST_boxf)boxes[0]).UR.y) {
/*if (Verbose) {
fprintf(stderr, "in checkpath, start port not in first box\n");
printpath(thepath);
}*/
- if (thepath.getStruct("start").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(0).getStruct()).LL.x)
- thepath.getStruct("start").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(0).getStruct()).LL.x);
- if (thepath.getStruct("start").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(0).getStruct()).UR.x)
- thepath.getStruct("start").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(0).getStruct()).UR.x);
- if (thepath.getStruct("start").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(0).getStruct()).LL.y)
- thepath.getStruct("start").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(0).getStruct()).LL.y);
- if (thepath.getStruct("start").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(0).getStruct()).UR.y)
- thepath.getStruct("start").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(0).getStruct()).UR.y);
+ if (thepath.start.p.x < ((ST_boxf)boxes[0]).LL.x)
+ thepath.start.p.setDouble("x", ((ST_boxf)boxes[0]).LL.x);
+ if (thepath.start.p.x > ((ST_boxf)boxes[0]).UR.x)
+ thepath.start.p.setDouble("x", ((ST_boxf)boxes[0]).UR.x);
+ if (thepath.start.p.y < ((ST_boxf)boxes[0]).LL.y)
+ thepath.start.p.setDouble("y", ((ST_boxf)boxes[0]).LL.y);
+ if (thepath.start.p.y > ((ST_boxf)boxes[0]).UR.y)
+ thepath.start.p.setDouble("y", ((ST_boxf)boxes[0]).UR.y);
}
- if (thepath.getStruct("end").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x
- || thepath.getStruct("end").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x
- || thepath.getStruct("end").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y
- || thepath.getStruct("end").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y) {
+ if (thepath.end.p.x < ((ST_boxf)boxes[boxn - 1]).LL.x
+ || thepath.end.p.x > ((ST_boxf)boxes[boxn - 1]).UR.x
+ || thepath.end.p.y < ((ST_boxf)boxes[boxn - 1]).LL.y
+ || thepath.end.p.y > ((ST_boxf)boxes[boxn - 1]).UR.y) {
/*if (Verbose) {
fprintf(stderr, "in checkpath, end port not in last box\n");
printpath(thepath);
}*/
- if (thepath.getStruct("end").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x)
- thepath.getStruct("end").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x);
- if (thepath.getStruct("end").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x)
- thepath.getStruct("end").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x);
- if (thepath.getStruct("end").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y)
- thepath.getStruct("end").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y);
- if (thepath.getStruct("end").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y)
- thepath.getStruct("end").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y);
+ if (thepath.end.p.x < ((ST_boxf)boxes[boxn - 1]).LL.x)
+ thepath.end.p.setDouble("x", ((ST_boxf)boxes[boxn - 1]).LL.x);
+ if (thepath.end.p.x > ((ST_boxf)boxes[boxn - 1]).UR.x)
+ thepath.end.p.setDouble("x", ((ST_boxf)boxes[boxn - 1]).UR.x);
+ if (thepath.end.p.y < ((ST_boxf)boxes[boxn - 1]).LL.y)
+ thepath.end.p.setDouble("y", ((ST_boxf)boxes[boxn - 1]).LL.y);
+ if (thepath.end.p.y > ((ST_boxf)boxes[boxn - 1]).UR.y)
+ thepath.end.p.setDouble("y", ((ST_boxf)boxes[boxn - 1]).UR.y);
}
return 0;
} finally {
@@ -1358,7 +1329,7 @@ ENTERING("de6jvvw786rx88318tuuqywgq","mkspacep");
try {
if (size > Z.z().maxpn) {
int newmax = Z.z().maxpn + (size / 300 + 1) * 300;
- Z.z().ps = RALLOC(newmax, Z.z().ps, pointf.class);
+ Z.z().ps = Z.z().ps.reallocJ(newmax);
if (N(Z.z().ps)) {
UNSUPPORTED("ds2v91aohji00tc7zmjuc3v6q"); // agerr(AGERR, "cannot re-allocate ps\n");
UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1;
diff --git a/src/gen/lib/common/shapes__c.java b/src/gen/lib/common/shapes__c.java
index de19ece..88883dd 100644
--- a/src/gen/lib/common/shapes__c.java
+++ b/src/gen/lib/common/shapes__c.java
@@ -47,7 +47,6 @@ package gen.lib.common;
import static gen.lib.cgraph.attr__c.agget;
import static gen.lib.cgraph.obj__c.agraphof;
import static gen.lib.common.geom__c.ccwrotatepf;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.utils__c.late_double;
import static gen.lib.common.utils__c.late_int;
import static gen.lib.common.utils__c.late_string;
@@ -59,7 +58,6 @@ import static smetana.core.JUtils.atan2;
import static smetana.core.JUtils.cos;
import static smetana.core.JUtils.enumAsInt;
import static smetana.core.JUtils.sin;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtils.sqrt;
import static smetana.core.JUtils.strcmp;
import static smetana.core.JUtilsDebug.ENTERING;
@@ -87,30 +85,22 @@ import static smetana.core.Macro.SQRT2;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.Macro.fabs;
import static smetana.core.Macro.hypot;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.Agobj_s;
-import h.Agraphinfo_t;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agobj_s;
+import h.ST_Agraphinfo_t;
import h.ST_boxf;
+import h.ST_inside_t;
+import h.ST_point;
import h.ST_pointf;
+import h.ST_polygon_t;
import h.ST_port;
-import h.boxf;
-import h.inside_t;
-import h.point;
-import h.pointf;
-import h.polygon_t;
-import h.port;
-import h.shape_desc;
+import h.ST_shape_desc;
import h.shape_kind;
import smetana.core.CFunctionImpl;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__c__fields;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.amiga.StarArrayOfPtr;
public class shapes__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -370,14 +360,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -406,26 +396,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -448,16 +418,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -754,8 +724,8 @@ throw new UnsupportedOperationException();
// static port Center =
/*private final static __struct__<port> Center = JUtils.from(port.class);
static {
-Center.getStruct("p").setDouble("x", 0);
-Center.getStruct("p").setDouble("y", 0);
+Center.p.setDouble("x", 0);
+Center.p.setDouble("y", 0);
Center.setDouble("theta", -1);
Center.setPtr("bp", null);
Center.setInt("defined", 0);
@@ -1077,21 +1047,21 @@ throw new UnsupportedOperationException();
//3 eb4jyrh981apg1fy13fczexdl
// static int same_side(pointf p0, pointf p1, pointf L0, pointf L1)
-public static boolean same_side(final __struct__<pointf> p0, final __struct__<pointf> p1, final __struct__<pointf> L0, final __struct__<pointf> L1) {
+public static boolean same_side(final ST_pointf p0, final ST_pointf p1, final ST_pointf L0, final ST_pointf L1) {
// WARNING!! STRUCT
return same_side_w_(p0.copy(), p1.copy(), L0.copy(), L1.copy());
}
-private static boolean same_side_w_(final __struct__<pointf> p0, final __struct__<pointf> p1, final __struct__<pointf> L0, final __struct__<pointf> L1) {
+private static boolean same_side_w_(final ST_pointf p0, final ST_pointf p1, final ST_pointf L0, final ST_pointf L1) {
ENTERING("eb4jyrh981apg1fy13fczexdl","same_side");
try {
boolean s0, s1;
double a, b, c;
/* a x + b y = c */
- a = -(L1.getDouble("y") - L0.getDouble("y"));
- b = (L1.getDouble("x") - L0.getDouble("x"));
- c = a * L0.getDouble("x") + b * L0.getDouble("y");
- s0 = (a * p0.getDouble("x") + b * p0.getDouble("y") - c >= 0);
- s1 = (a * p1.getDouble("x") + b * p1.getDouble("y") - c >= 0);
+ a = -(L1.y - L0.y);
+ b = (L1.x - L0.x);
+ c = a * L0.x + b * L0.y;
+ s0 = (a * p0.x + b * p0.y - c >= 0);
+ s1 = (a * p1.x + b * p1.y - c >= 0);
return (s0 == s1);
} finally {
LEAVING("eb4jyrh981apg1fy13fczexdl","same_side");
@@ -2527,14 +2497,14 @@ throw new UnsupportedOperationException();
//3 5gahokttzv65lspm84ao1le37
// shape_kind shapeOf(node_t * n)
-public static int shapeOf(Agnode_s n) {
+public static int shapeOf(ST_Agnode_s n) {
ENTERING("5gahokttzv65lspm84ao1le37","shapeOf");
try {
- shape_desc sh = (shape_desc) ND_shape(n);
+ ST_shape_desc sh = (ST_shape_desc) ND_shape(n);
CFunctionImpl ifn; //void (*ifn) (node_t *);
if (N(sh))
return enumAsInt(shape_kind.class, "SH_UNSET");
- ifn = (CFunctionImpl) ND_shape(n).getPtr("fns").getPtr("initfn");
+ ifn = (CFunctionImpl) ND_shape(n).fns.initfn;
if (ifn.getName().equals("poly_init"))
return enumAsInt(shape_kind.class, "SH_POLY");
UNSUPPORTED("251a710sgr57bnrs3uh7ppfpi"); // else if (ifn == record_init)
@@ -2572,13 +2542,13 @@ throw new UnsupportedOperationException();
//3 a11xv6duihbr3d6gkgo2ye2j5
// static void poly_init(node_t * n)
-public static void poly_init(Agnode_s n) {
+public static void poly_init(ST_Agnode_s n) {
ENTERING("a11xv6duihbr3d6gkgo2ye2j5","poly_init");
try {
- final __struct__<pointf> dimen = JUtils.from(pointf.class), min_bb = JUtils.from(pointf.class), bb = JUtils.from(pointf.class);
- final __struct__<point> imagesize = JUtils.from(point.class);
- final __struct__<pointf> P = JUtils.from(pointf.class), Q = JUtils.from(pointf.class), R = JUtils.from(pointf.class);
- __ptr__ vertices = null;
+ final ST_pointf dimen = new ST_pointf(), min_bb = new ST_pointf(), bb = new ST_pointf();
+ final ST_point imagesize = new ST_point();
+ final ST_pointf P = new ST_pointf(), Q = new ST_pointf(), R = new ST_pointf();
+ ST_pointf.Array vertices = null;
CString p, sfile, fxd;
double temp, alpha, beta, gamma;
double orientation, distortion, skew;
@@ -2587,13 +2557,13 @@ try {
double width=0, height=0, marginx, marginy, spacex;
boolean regular; int peripheries, sides;
boolean isBox; int i, j, outp;
- polygon_t poly = (polygon_t) Memory.malloc(polygon_t.class);
- regular = ND_shape(n).getPtr("polygon").getBoolean("regular");
- peripheries = ND_shape(n).getPtr("polygon").getInt("peripheries");
- sides = ND_shape(n).getPtr("polygon").getInt("sides");
- orientation = ND_shape(n).getPtr("polygon").getDouble("orientation");
- skew = ND_shape(n).getPtr("polygon").getDouble("skew");
- distortion = ND_shape(n).getPtr("polygon").getDouble("distortion");
+ ST_polygon_t poly = new ST_polygon_t();
+ regular = ND_shape(n).polygon.regular!=0;
+ peripheries = ND_shape(n).polygon.peripheries;
+ sides = ND_shape(n).polygon.sides;
+ orientation = ND_shape(n).polygon.orientation;
+ skew = ND_shape(n).polygon.skew;
+ distortion = ND_shape(n).polygon.distortion;
regular |= mapbool(agget(n, new CString("regular")));
/* all calculations in floating point POINTS */
/* make x and y dimensions equal if node is regular
@@ -2622,9 +2592,9 @@ UNSUPPORTED("cp83hdn3dp0a7rp9bauc3bgki"); // sides = late_int(n, N_sides, 4, 0)
UNSUPPORTED("abmuc3vqirf3i48480fj0k14g"); // distortion = late_double(n, N_distortion, 0.0, -100.0);
}
/* get label dimensions */
- dimen.___(ND_label(n).getStruct("dimen"));
+ dimen.___(ND_label(n).dimen);
/* minimal whitespace around label */
- if (ROUND(abs(dimen.getDouble("x")))!=0 || ROUND(abs(dimen.getDouble("y")))!=0) {
+ if (ROUND(abs(dimen.x))!=0 || ROUND(abs(dimen.y))!=0) {
/* padding */
if ((p = agget(n, new CString("margin")))!=null) {
UNSUPPORTED("4dlqwm3pklzgz2e777dm56n03"); // marginx = marginy = 0;
@@ -2643,20 +2613,20 @@ UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else
UNSUPPORTED("87bdwkkwbzyswxnepdd9bj8mb"); // {((dimen).x += 4*4); ((dimen).y += 2*4);};
} else
{
- ((ST_pointf) dimen).x = dimen.getDouble("x") + 4*4;
- ((ST_pointf) dimen).y = dimen.getDouble("y") + 2*4;
+ ((ST_pointf) dimen).x = dimen.x + 4*4;
+ ((ST_pointf) dimen).y = dimen.y + 2*4;
};
}
- spacex = dimen.getDouble("x") - ND_label(n).getStruct("dimen").getDouble("x");
+ spacex = dimen.x - ND_label(n).dimen.x;
/* quantization */
- if ((temp = agraphof(n).castTo(Agobj_s.class).getPtr("data").castTo(Agraphinfo_t.class).getPtr("drawing").getDouble("quantum")) > 0.0) {
+ if ((temp = ((ST_Agraphinfo_t)agraphof(n).castTo_ST_Agobj_s().data.castTo(ST_Agraphinfo_t.class)).drawing.quantum) > 0.0) {
UNSUPPORTED("3nqb0s5rkwj3igt71vooj8asd"); // temp = ((((temp)*72>=0)?(int)((temp)*72 + .5):(int)((temp)*72 - .5)));
UNSUPPORTED("5fxtqwy8liyvnx1yvsou5hb4o"); // dimen.x = quant(dimen.x, temp);
UNSUPPORTED("et885f1jcqpske6ip856arouv"); // dimen.y = quant(dimen.y, temp);
}
imagesize.setInt("x", 0);
imagesize.setInt("y", 0);
- if (ND_shape(n).getBoolean("usershape")) {
+ if (ND_shape(n).usershape) {
/* custom requires a shapefile
* not custom is an adaptable user shape such as a postscript
* function.
@@ -2689,8 +2659,8 @@ UNSUPPORTED("1x57knvrmlciu7odfroo3paso"); // imagesize.y += 2;
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
}
/* initialize node bb to labelsize */
- ((ST_pointf) bb).x = ((dimen.getDouble("x"))>(imagesize.getInt("x"))?(dimen.getDouble("x")):(imagesize.getInt("x")));
- ((ST_pointf) bb).y = ((dimen.getDouble("y"))>(imagesize.getInt("y"))?(dimen.getDouble("y")):(imagesize.getInt("y")));
+ ((ST_pointf) bb).x = ((dimen.x)>(imagesize.x)?(dimen.x):(imagesize.x));
+ ((ST_pointf) bb).y = ((dimen.y)>(imagesize.y)?(dimen.y):(imagesize.y));
/* I don't know how to distort or skew ellipses in postscript */
/* Convert request to a polygon with a large number of sides */
if ((sides <= 2) && ((distortion != 0.) || (skew != 0.))) {
@@ -2699,14 +2669,14 @@ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
/* extra sizing depends on if label is centered vertically */
p = agget(n, new CString("labelloc"));
if (p!=null && (p.charAt(0) == 't' || p.charAt(0) == 'b'))
- n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").setInt("valign", p.charAt(0));
+ n.castTo_ST_Agobj_s().data.castTo_ST_Agnodeinfo_t().label.setInt("valign", p.charAt(0));
else
- n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").setInt("valign", 'c');
+ n.castTo_ST_Agobj_s().data.castTo_ST_Agnodeinfo_t().label.setInt("valign", 'c');
isBox = (sides == 4 && (((orientation>=0)?(int)(orientation + .5):(int)(orientation - .5)) % 90) == 0
&& distortion == 0. && skew == 0.);
if (isBox) {
/* for regular boxes the fit should be exact */
- } else if (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("shape").getPtr("polygon").getPtr("vertices")!=null) {
+ } else if (((ST_Agnodeinfo_t)n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class)).shape.polygon.vertices!=null) {
UNSUPPORTED("4adqsyjwqwzs50ggjp57ok6u7"); // poly_desc_t* pd = (poly_desc_t*)(((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->polygon->vertices;
UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
} else {
@@ -2714,20 +2684,20 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
* containing bb centered on the origin, and then pad for that.
* We assume the ellipse is defined by a scaling up of bb.
*/
- temp = bb.getDouble("y") * 1.41421356237309504880;
- if (height > temp && (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").getInt("valign") == 'c')) {
+ temp = bb.y * 1.41421356237309504880;
+ if (height > temp && (((ST_Agnodeinfo_t)n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class)).label.valign == 'c')) {
/* if there is height to spare
* and the label is centered vertically
* then just pad x in proportion to the spare height */
- bb.setDouble("x", bb.getDouble("x") * sqrt(1. / (1. - ((bb.getDouble("y") / height) * (bb.getDouble("y") / height)))));
+ bb.setDouble("x", bb.x * sqrt(1. / (1. - ((bb.y / height) * (bb.y / height)))));
} else {
- bb.setDouble("x", bb.getDouble("x") * 1.41421356237309504880);
+ bb.setDouble("x", bb.x * 1.41421356237309504880);
bb.setDouble("y", temp);
}
if (sides > 2) {
temp = cos(3.14159265358979323846 / sides);
- bb.setDouble("x", bb.getDouble("x") / temp);
- bb.setDouble("y", bb.getDouble("y") / temp);
+ bb.setDouble("x", bb.x / temp);
+ bb.setDouble("y", bb.y / temp);
/* FIXME - for odd-sided polygons, e.g. triangles, there
would be a better fit with some vertical adjustment of the shape */
}
@@ -2739,27 +2709,27 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
if ((fxd.charAt(0) == 's') && (N(strcmp(fxd,new CString("shape"))))) {
bb.setDouble("x", width);
bb.setDouble("y", height);
- poly.setInt("option", poly.getInt("option") | (1 << 11));
+ poly.setInt("option", poly.option | (1 << 11));
} else if (mapbool(fxd)) {
/* check only label, as images we can scale to fit */
- if ((width < (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").getDouble("dimen.x"))
- || (height < (n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).getPtr("label").getDouble("dimen.y")))))
+ if ((width < (((ST_Agnodeinfo_t)n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class)).label.dimen.x)
+ || (height < (((ST_Agnodeinfo_t)n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class)).label.dimen.y))))
System.err.println(
"node '%s', graph '%s' size too small for label\n");
//agnameof(n), agnameof(agraphof(n)));
bb.setDouble("x", width);
bb.setDouble("y", height);
} else {
- width = MAX(width, bb.getDouble("x"));
+ width = MAX(width, bb.x);
((ST_pointf) bb).x = width;
- height = MAX(height, bb.getDouble("y"));
+ height = MAX(height, bb.y);
((ST_pointf) bb).y = height;
}
/* If regular, make dimensions the same.
* Need this to guarantee final node size is regular.
*/
if (regular) {
- width = MAX(bb.getDouble("x"), bb.getDouble("y"));
+ width = MAX(bb.x, bb.y);
height = width;
((ST_pointf) bb).x = width;
((ST_pointf) bb).y = width;
@@ -2767,35 +2737,35 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
/* Compute space available for label. Provides the justification borders */
if (N(mapbool(late_string(n, Z.z().N_nojustify, new CString("false"))))) {
if (isBox) {
- ((ST_pointf) ND_label(n).getStruct("space")).x = MAX(dimen.getDouble("x"),bb.getDouble("x")) - spacex;
+ ((ST_pointf) ND_label(n).space).x = MAX(dimen.x,bb.x) - spacex;
}
- else if (dimen.getDouble("y") < bb.getDouble("y")) {
- temp = bb.getDouble("x") * sqrt(1.0 - SQR(dimen.getDouble("y")) / SQR(bb.getDouble("y")));
- ND_label(n).getStruct("space").setDouble("x", MAX(dimen.getDouble("x"),temp) - spacex);
+ else if (dimen.y < bb.y) {
+ temp = bb.x * sqrt(1.0 - SQR(dimen.y) / SQR(bb.y));
+ ND_label(n).space.setDouble("x", MAX(dimen.x,temp) - spacex);
}
else
- ND_label(n).getStruct("space").setDouble("x", dimen.getDouble("x") - spacex);
+ ND_label(n).space.setDouble("x", dimen.x - spacex);
} else {
- ND_label(n).getStruct("space").setDouble("x", dimen.getDouble("x") - spacex);
+ ND_label(n).space.setDouble("x", dimen.x - spacex);
}
- if ((poly.getInt("option") & (1 << 11)) == 0) {
- temp = bb.getDouble("y") - min_bb.getDouble("y");
- if (dimen.getDouble("y") < imagesize.getInt("y"))
- temp += imagesize.getInt("y") - dimen.getDouble("y");
- ((ST_pointf) ND_label(n).getStruct("space")).y = dimen.getDouble("y") + temp;
+ if ((poly.option & (1 << 11)) == 0) {
+ temp = bb.y - min_bb.y;
+ if (dimen.y < imagesize.y)
+ temp += imagesize.y - dimen.y;
+ ((ST_pointf) ND_label(n).space).y = dimen.y + temp;
}
outp = peripheries;
if (peripheries < 1)
outp = 1;
if (sides < 3) { /* ellipses */
sides = 2;
- vertices = zmalloc(sizeof(pointf.class, outp * sides));
- P.setDouble("x", bb.getDouble("x") / 2.);
- P.setDouble("y", bb.getDouble("y") / 2.);
- vertices.setDouble("x", -P.getDouble("x"));
- vertices.setDouble("y", -P.getDouble("y"));
- vertices.plus(1).setDouble("x", P.getDouble("x"));
- vertices.plus(1).setDouble("y", P.getDouble("y"));
+ vertices = new ST_pointf.Array(outp * sides);
+ P.setDouble("x", bb.x / 2.);
+ P.setDouble("y", bb.y / 2.);
+ vertices.setDouble("x", -P.x);
+ vertices.setDouble("y", -P.y);
+ vertices.plus(1).setDouble("x", P.x);
+ vertices.plus(1).setDouble("y", P.y);
if (peripheries > 1) {
UNSUPPORTED("4ofenmfgj7cgyf624qmugcx77"); // for (j = 1, i = 2; j < peripheries; j++) {
UNSUPPORTED("458w3r6n3nidn2j2b154phpzt"); // P.x += 4;
@@ -2823,8 +2793,8 @@ UNSUPPORTED("b5z0hw4dacenv33xsaex70g8d"); // bb.y = 2. * P.y;
* It needs to find the point where the two lines, parallel to
* the current segments, and outside by GAP distance, intersect.
*/
- vertices = zmalloc(sizeof(pointf.class, outp * sides));
- if (ND_shape(n).getPtr("polygon").getPtr("vertices")!=null) {
+ vertices = new ST_pointf.Array(outp * sides);
+ if (((ST_polygon_t)ND_shape(n).polygon).vertices!=null) {
UNSUPPORTED("3ghle84ieryaenfnlbzrfv7bw"); // poly_desc_t* pd = (poly_desc_t*)(((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->shape)->polygon->vertices;
UNSUPPORTED("227lpcg9dt83m2bm8yshb4djf"); // pd->vertex_gen (vertices, &bb);
UNSUPPORTED("cc3jvnwvbhjhro4adeet363yd"); // xmax = bb.x/2;
@@ -2845,33 +2815,33 @@ UNSUPPORTED("39rdmp8vl9muqtv7xs1xwtrwk"); // ymax = bb.y/2;
/*next regular vertex */
angle += sectorangle;
sinx = sin(angle); cosx = cos(angle);
- ((ST_pointf) R).x = R.getDouble("x") + sidelength * cosx;
- ((ST_pointf) R).y = R.getDouble("y") + sidelength * sinx;
+ ((ST_pointf) R).x = R.x + sidelength * cosx;
+ ((ST_pointf) R).y = R.y + sidelength * sinx;
/*distort and skew */
- ((ST_pointf) P).x = R.getDouble("x") * (skewdist + R.getDouble("y") * gdistortion) + R.getDouble("y") * gskew;
- ((ST_pointf) P).y = R.getDouble("y");
+ ((ST_pointf) P).x = R.x * (skewdist + R.y * gdistortion) + R.y * gskew;
+ ((ST_pointf) P).y = R.y;
/*orient P.x,P.y */
- alpha = RADIANS(orientation) + atan2(P.getDouble("y"), P.getDouble("x"));
+ alpha = RADIANS(orientation) + atan2(P.y, P.x);
sinx = sin(alpha); cosx = cos(alpha);
- ((ST_pointf) P).y = hypot(P.getDouble("x"), P.getDouble("y"));
- ((ST_pointf) P).x = P.getDouble("y");
- ((ST_pointf) P).x = P.getDouble("x") * cosx;
- ((ST_pointf) P).y = P.getDouble("y") * sinx;
+ ((ST_pointf) P).y = hypot(P.x, P.y);
+ ((ST_pointf) P).x = P.y;
+ ((ST_pointf) P).x = P.x * cosx;
+ ((ST_pointf) P).y = P.y * sinx;
/*scale for label */
- ((ST_pointf) P).x = P.getDouble("x") * bb.getDouble("x");
- ((ST_pointf) P).y = P.getDouble("y") * bb.getDouble("y");
+ ((ST_pointf) P).x = P.x * bb.x;
+ ((ST_pointf) P).y = P.y * bb.y;
/*find max for bounding box */
- xmax = MAX(fabs(P.getDouble("x")), xmax);
- ymax = MAX(fabs(P.getDouble("y")), ymax);
+ xmax = MAX(fabs(P.x), xmax);
+ ymax = MAX(fabs(P.y), ymax);
/* store result in array of points */
vertices.plus(i).setStruct(P);
if (isBox) { /* enforce exact symmetry of box */
- ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(1)).getInternalArray().getInternal(0)))).x = -P.getDouble("x");
- ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(1)).getInternalArray().getInternal(0)))).y = P.getDouble("y");
- ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(2)).getInternalArray().getInternal(0)))).x = -P.getDouble("x");
- ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(2)).getInternalArray().getInternal(0)))).y = -P.getDouble("y");
- ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(3)).getInternalArray().getInternal(0)))).x = P.getDouble("x");
- ((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(3)).getInternalArray().getInternal(0)))).y = -P.getDouble("y");
+ vertices.get(1).x = -P.x;
+ vertices.get(1).y = P.y;
+ vertices.get(2).x = -P.x;
+ vertices.get(2).y = -P.y;
+ vertices.get(3).x = P.x;
+ vertices.get(3).y = -P.y;
break;
}
}
@@ -2881,12 +2851,12 @@ UNSUPPORTED("39rdmp8vl9muqtv7xs1xwtrwk"); // ymax = bb.y/2;
ymax *= 2.;
((ST_pointf) bb).x = MAX(width, xmax);
((ST_pointf) bb).y = MAX(height, ymax);
- scalex = bb.getDouble("x") / xmax;
- scaley = bb.getDouble("y") / ymax;
+ scalex = bb.x / xmax;
+ scaley = bb.y / ymax;
for (i = 0; i < sides; i++) {
P.____(vertices.plus(i));
- ((ST_pointf) P).x = P.getDouble("x") * scalex;
- ((ST_pointf) P).y = P.getDouble("y") * scaley;
+ ((ST_pointf) P).x = P.x * scalex;
+ ((ST_pointf) P).y = P.y * scaley;
vertices.plus(i).setStruct(P);
}
if (peripheries > 1) {
@@ -2929,16 +2899,16 @@ UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
poly.setDouble("orientation", orientation);
poly.setDouble("skew", skew);
poly.setDouble("distortion", distortion);
- poly.setPtr("vertices", vertices);
- if ((poly.getInt("option") & (1 << 11))!=0) {
+ poly.vertices = vertices;
+ if ((poly.option & (1 << 11))!=0) {
/* set width and height to reflect label and shape */
UNSUPPORTED("7kk8oru3b3copylmq3gssx6qx"); // (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->width) = ((((dimen.x)>(bb.x)?(dimen.x):(bb.x)))/(double)72);
UNSUPPORTED("8oouzms2x039fhfcfxm7yc4su"); // (((Agnodeinfo_t*)(((Agobj_t*)(n))->data))->height) = ((((dimen.y)>(bb.y)?(dimen.y):(bb.y)))/(double)72);
} else {
- n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).setDouble("width", ((bb.getDouble("x"))/(double)72));
- n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).setDouble("height", ((bb.getDouble("y"))/(double)72));
+ n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class).setDouble("width", ((bb.x)/(double)72));
+ n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class).setDouble("height", ((bb.y)/(double)72));
}
- n.castTo(Agobj_s.class).getPtr("data").castTo(Agnodeinfo_t.class).setPtr("shape_info", poly);
+ n.castTo_ST_Agobj_s().data.castTo(ST_Agnodeinfo_t.class).setPtr("shape_info", poly);
} finally {
LEAVING("a11xv6duihbr3d6gkgo2ye2j5","poly_init");
}
@@ -2965,26 +2935,26 @@ throw new UnsupportedOperationException();
-//3 570t4xovyyfqipaikkf63crmk
-// static boolean poly_inside(inside_t * inside_context, pointf p)
//static Agnode_s lastn; /* last node argument */
//static polygon_t poly;
//static int last, outp, sides;
-//static final __struct__<pointf> O = JUtils.from(pointf.class); /* point (0,0) */
+//static final ST_pointf O = new ST_pointf(); /* point (0,0) */
//static pointf vertex;
//static double xsize, ysize, scalex, scaley, box_URx, box_URy;
-public static boolean poly_inside(inside_t inside_context, final __struct__<pointf> p) {
+//3 570t4xovyyfqipaikkf63crmk
+//static boolean poly_inside(inside_t * inside_context, pointf p)
+public static boolean poly_inside(ST_inside_t inside_context, ST_pointf p) {
// WARNING!! STRUCT
return poly_inside_w_(inside_context, p.copy());
}
-private static boolean poly_inside_w_(inside_t inside_context, final __struct__<pointf> p) {
+private static boolean poly_inside_w_(ST_inside_t inside_context, final ST_pointf p) {
ENTERING("570t4xovyyfqipaikkf63crmk","poly_inside");
try {
int i, i1, j;
boolean s;
final ST_pointf P = new ST_pointf(), Q = new ST_pointf(), R = new ST_pointf();
- __ptr__ bp = inside_context.getPtr("s.bp");
- __ptr__ n = inside_context.getPtr("s.n");
+ ST_boxf bp = inside_context.s_bp;
+ ST_Agnode_s n = inside_context.s_n;
P.___(ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))));
/* Quick test if port rectangle is target */
if (bp!=null) {
@@ -2994,10 +2964,10 @@ try {
}
if (NEQ(n, Z.z().lastn)) {
double n_width = 0, n_height = 0;
- Z.z().poly = (polygon_t) ND_shape_info(n);
- Z.z().vertex = (pointf) Z.z().poly.getPtr("vertices");
- Z.z().sides = Z.z().poly.getInt("sides");
- if ((Z.z().poly.getInt("option") & (1 << 11))!=0) {
+ Z.z().poly = (ST_polygon_t) ND_shape_info(n);
+ Z.z().vertex = Z.z().poly.vertices;
+ Z.z().sides = Z.z().poly.sides;
+ if ((Z.z().poly.option & (1 << 11))!=0) {
UNSUPPORTED("18yw1scg4sol8bhyf1vedj9kn"); // boxf bb = polyBB(poly);
UNSUPPORTED("7rz7vxyxao0efec2nvd6g19m1"); // n_width = bb.UR.x - bb.LL.x;
UNSUPPORTED("4h0k2wroz3xqx1ljokdbaqaad"); // n_height = bb.UR.y - bb.LL.y;
@@ -3031,29 +3001,29 @@ UNSUPPORTED("8t3g4d9acruono62leh5a8hxh"); // xsize = ND_ht(n);
Z.z().box_URx = n_width / 2.0;
Z.z().box_URy = n_height / 2.0;
/* index to outer-periphery */
- Z.z().outp = (Z.z().poly.getInt("peripheries") - 1) * Z.z().sides;
+ Z.z().outp = (Z.z().poly.peripheries - 1) * Z.z().sides;
if (Z.z().outp < 0)
Z.z().outp = 0;
- Z.z().lastn = (Agnode_s) n;
+ Z.z().lastn = (ST_Agnode_s) n;
}
/* scale */
- P.setDouble("x", P.getDouble("x") * Z.z().scalex);
- P.setDouble("y", P.getDouble("y") * Z.z().scaley);
+ P.setDouble("x", P.x * Z.z().scalex);
+ P.setDouble("y", P.y * Z.z().scaley);
/* inside bounding box? */
- if ((fabs(P.getDouble("x")) > Z.z().box_URx) || (fabs(P.getDouble("y")) > Z.z().box_URy))
+ if ((fabs(P.x) > Z.z().box_URx) || (fabs(P.y) > Z.z().box_URy))
return false;
/* ellipses */
if (Z.z().sides <= 2)
- return (hypot(P.getDouble("x") / Z.z().box_URx, P.getDouble("y") / Z.z().box_URy) < 1.);
+ return (hypot(P.x / Z.z().box_URx, P.y / Z.z().box_URy) < 1.);
/* use fast test in case we are converging on a segment */
i = Z.z().last % Z.z().sides; /* in case last left over from larger polygon */
i1 = (i + 1) % Z.z().sides;
Q.___(Z.z().vertex.plus(i + Z.z().outp).getStruct());
R.___(Z.z().vertex.plus(i1 + Z.z().outp).getStruct());
- if (N(same_side(P, Z.z().O, Q, R))) /* false if outside the segment's face */
+ if (N(same_side(P, (ST_pointf)Z.z().O, Q, R))) /* false if outside the segment's face */
return false;
/* else inside the segment face... */
- if ((s = same_side(P, Q, R, Z.z().O)) && (same_side(P, R, Z.z().O, Q))) /* true if between the segment's sides */
+ if ((s = same_side(P, Q, R, (ST_pointf)Z.z().O)) && (same_side(P, R, (ST_pointf)Z.z().O, Q))) /* true if between the segment's sides */
return NOT(0);
/* else maybe in another segment */
for (j = 1; j < Z.z().sides; j++) { /* iterate over remaining segments */
@@ -3064,7 +3034,7 @@ UNSUPPORTED("8t3g4d9acruono62leh5a8hxh"); // xsize = ND_ht(n);
i1 = i;
i = (i + Z.z().sides - 1) % Z.z().sides;
}
- if (N(same_side(P, Z.z().O, Z.z().vertex.plus(i + Z.z().outp).getStruct(), Z.z().vertex.plus(i1 + Z.z().outp).getStruct()))) { /* false if outside any other segment's face */
+ if (N(same_side(P, (ST_pointf)Z.z().O, (ST_pointf)Z.z().vertex.plus(i + Z.z().outp).getStruct(), (ST_pointf)Z.z().vertex.plus(i1 + Z.z().outp).getStruct()))) { /* false if outside any other segment's face */
Z.z().last = i;
return false;
}
@@ -3082,11 +3052,11 @@ LEAVING("570t4xovyyfqipaikkf63crmk","poly_inside");
//3 5mmuhvq40xadw0g9mzlauyztq
// static int poly_path(node_t * n, port * p, int side, boxf rv[], int *kptr)
-public static int poly_path(Agnode_s n, port p, int side, Object rv, Object kptr) {
+public static int poly_path(ST_Agnode_s n, ST_port p, int side, Object rv, Object kptr) {
ENTERING("5mmuhvq40xadw0g9mzlauyztq","poly_path");
try {
side = 0;
- if (ND_label(n).getBoolean("html") && ND_has_port(n)) {
+ if (ND_label(n).html && ND_has_port(n)) {
UNSUPPORTED("67g7bthntnw8syb6zd03ueg84"); // side = html_path(n, p, side, rv, kptr);
}
return side;
@@ -3429,15 +3399,15 @@ throw new UnsupportedOperationException();
//3 5k2b9gfpwm2tj3zmzniuz9azt
// static port poly_port(node_t * n, char *portname, char *compass)
-public static __struct__<port> poly_port(Agnode_s n, CString portname, CString compass) {
+public static ST_port poly_port(ST_Agnode_s n, CString portname, CString compass) {
// WARNING!! STRUCT
return poly_port_w_(n, portname, compass).copy();
}
-private static __struct__<port> poly_port_w_(Agnode_s n, CString portname, CString compass) {
+private static ST_port poly_port_w_(ST_Agnode_s n, CString portname, CString compass) {
ENTERING("5k2b9gfpwm2tj3zmzniuz9azt","poly_port");
try {
- final __struct__<port> rv= JUtils.from(port.class);
- boxf bp;
+ final ST_port rv= new ST_port();
+ ST_boxf bp;
int sides; /* bitmap of which sides the port lies along */
if (portname.charAt(0) == '\0')
return Z.z().Center.copy();
@@ -4592,18 +4562,18 @@ throw new UnsupportedOperationException();
//3 bmt148wdf0a7gslm7hmp043jy
// shape_desc *bind_shape(char *name, node_t * np)
-public static shape_desc bind_shape(CString name, Agnode_s np) {
+public static ST_shape_desc bind_shape(CString name, ST_Agnode_s np) {
ENTERING("bmt148wdf0a7gslm7hmp043jy","bind_shape");
try {
- shape_desc rv = null;
+ ST_shape_desc rv = null;
CString str;
str = safefile(agget(np, new CString("shapefile")));
/* If shapefile is defined and not epsf, set shape = custom */
if (str!=null && UNSUPPORTED("!(*(name)==*(\"epsf\")&&!strcmp(name,\"epsf\"))")!=null)
name = new CString("custom");
if (N(name.charAt(0)=='c' && N(strcmp(name,new CString("custom"))))) {
- for (shape_desc ptr : Z.z().Shapes) {
- if ((N(strcmp(ptr.getCString("name"),name)))) {
+ for (ST_shape_desc ptr : Z.z().Shapes) {
+ if ((N(strcmp(ptr.name,name)))) {
rv = ptr;
break;
}
@@ -4896,11 +4866,11 @@ throw new UnsupportedOperationException();
//3 ckbg1dyu9jzx7g0c9dbriez7r
// port resolvePort(node_t * n, node_t * other, port * oldport)
-public static ST_port resolvePort(Agnode_s n, Agnode_s other, port oldport) {
+public static ST_port resolvePort(ST_Agnode_s n, ST_Agnode_s other, ST_port oldport) {
// WARNING!! STRUCT
return resolvePort_w_(n, other, oldport).copy();
}
-private static ST_port resolvePort_w_(Agnode_s n, Agnode_s other, port oldport) {
+private static ST_port resolvePort_w_(ST_Agnode_s n, ST_Agnode_s other, ST_port oldport) {
ENTERING("ckbg1dyu9jzx7g0c9dbriez7r","resolvePort");
try {
UNSUPPORTED("1aa44pvk8su341rug2x5h5h9o"); // port resolvePort(node_t * n, node_t * other, port * oldport)
diff --git a/src/gen/lib/common/splines__c.java b/src/gen/lib/common/splines__c.java
index dd80a56..d209f1e 100644
--- a/src/gen/lib/common/splines__c.java
+++ b/src/gen/lib/common/splines__c.java
@@ -51,15 +51,14 @@ import static gen.lib.common.arrows__c.arrowEndClip;
import static gen.lib.common.arrows__c.arrowStartClip;
import static gen.lib.common.arrows__c.arrow_flags;
import static gen.lib.common.emit__c.update_bb_bz;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.shapes__c.resolvePort;
import static gen.lib.common.utils__c.Bezier;
+import static gen.lib.common.utils__c.dotneato_closest;
import static smetana.core.JUtils.EQ;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.ABS;
-import static smetana.core.Macro.ALLOC;
+import static smetana.core.Macro.ALLOC_ST_bezier;
import static smetana.core.Macro.APPROXEQPT;
import static smetana.core.Macro.ED_edge_type;
import static smetana.core.Macro.ED_head_port;
@@ -68,6 +67,7 @@ import static smetana.core.Macro.ED_spl;
import static smetana.core.Macro.ED_tail_port;
import static smetana.core.Macro.ED_to_orig;
import static smetana.core.Macro.GD_bb;
+import static smetana.core.Macro.GD_flags;
import static smetana.core.Macro.GD_flip;
import static smetana.core.Macro.MAX;
import static smetana.core.Macro.MILLIPOINT;
@@ -80,28 +80,23 @@ import static smetana.core.Macro.ND_rank;
import static smetana.core.Macro.ND_rw;
import static smetana.core.Macro.ND_shape;
import static smetana.core.Macro.NOT;
+import static smetana.core.Macro.NOTI;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_bezier;
import h.ST_boxf;
+import h.ST_inside_t;
+import h.ST_path;
+import h.ST_pathend_t;
import h.ST_pointf;
-import h.bezier;
-import h.boxf;
-import h.inside_t;
-import h.path;
-import h.pathend_t;
-import h.pointf;
-import h.splineInfo;
-import h.splines;
-import h.textlabel_t;
+import h.ST_splineInfo;
+import h.ST_splines;
+import h.ST_textlabel_t;
import smetana.core.CFunction;
-import smetana.core.JUtils;
import smetana.core.MutableDouble;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class splines__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -361,14 +356,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -397,25 +392,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -439,16 +415,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -745,23 +721,23 @@ throw new UnsupportedOperationException();
//3 6izm0fbkejw7odmiw4zaw1ycp
// static void arrow_clip(edge_t * fe, node_t * hn, pointf * ps, int *startp, int *endp, bezier * spl, splineInfo * info)
-public static void arrow_clip(Agedge_s fe, Agnode_s hn, __ptr__ ps, int startp[], int endp[], bezier spl, __ptr__ info) {
+public static void arrow_clip(ST_Agedge_s fe, ST_Agnode_s hn, ST_pointf.Array ps, int startp[], int endp[], ST_bezier spl, ST_splineInfo info) {
ENTERING("6izm0fbkejw7odmiw4zaw1ycp","arrow_clip");
try {
- Agedge_s e;
+ ST_Agedge_s e;
int i;
boolean j;
int sflag[] = new int[]{0};
int eflag[] = new int[]{0};
for (e = fe; ED_to_orig(e)!=null; e = ED_to_orig(e));
- if (info.getBoolean("ignoreSwap"))
+ if (info.ignoreSwap)
j = false;
else
- j = (Boolean) info.call("swapEnds", e);
+ j = (Boolean) info.swapEnds.exe(e);
arrow_flags(e, sflag, eflag);
- if ((Boolean) info.call("splineMerge", hn))
+ if ((Boolean) info.splineMerge.exe(hn))
eflag[0] = 0;
- if ((Boolean) info.call("splineMerge", agtail(fe)))
+ if ((Boolean) info.splineMerge.exe(agtail(fe)))
sflag[0] = 0;
/* swap the two ends */
if (j) {
@@ -769,7 +745,7 @@ try {
sflag[0] = eflag[0];
eflag[0] = i;
}
- if (info.getBoolean("isOrtho")) {
+ if (info.isOrtho) {
UNSUPPORTED("7a3lmojyfh13d6shkviuogx2c"); // if (eflag || sflag)
UNSUPPORTED("dzbrwr2ulubtjkbd8j2o4yyov"); // arrowOrthoClip(e, ps, *startp, *endp, spl, sflag, eflag);
}
@@ -791,12 +767,12 @@ LEAVING("6izm0fbkejw7odmiw4zaw1ycp","arrow_clip");
//3 q4t1ywnk3wm1vyh5seoj7xye
// void bezier_clip(inside_t * inside_context, boolean(*inside) (inside_t * inside_context, pointf p), pointf * sp, boolean left_inside)
-public static void bezier_clip(__ptr__ inside_context, __ptr__ inside, __array_of_struct__ sp, boolean left_inside) {
+public static void bezier_clip(__ptr__ inside_context, __ptr__ inside, ST_pointf.Array sp, boolean left_inside) {
ENTERING("q4t1ywnk3wm1vyh5seoj7xye","bezier_clip");
try {
- final __array_of_struct__ seg = __array_of_struct_impl__.malloc(pointf.class, 4);
- final __array_of_struct__ best = __array_of_struct_impl__.malloc(pointf.class, 4);
- final __struct__<pointf> pt = JUtils.from(pointf.class), opt = JUtils.from(pointf.class);
+ final ST_pointf.Array seg = new ST_pointf.Array( 4);
+ final ST_pointf.Array best = new ST_pointf.Array( 4);
+ final ST_pointf pt = new ST_pointf(), opt = new ST_pointf();
__ptr__ left, right;
final MutableDouble low = new MutableDouble(0), high = new MutableDouble(0);
double t;
@@ -805,12 +781,12 @@ try {
int i;
if (left_inside) {
left = null;
- right = (pointf) seg.asPtr();
+ right = seg.asPtr();
pt.___(sp.plus(0).getStruct());
idir = low;
odir = high;
} else {
- left = (pointf) seg.asPtr();
+ left = seg.asPtr();
right = null;
pt.___(sp.plus(3).getStruct());
idir = high;
@@ -831,7 +807,7 @@ try {
found = NOT(false);
odir.setValue(t);
}
- } while (ABS(opt.getDouble("x") - pt.getDouble("x")) > .5 || ABS(opt.getDouble("y") - pt.getDouble("y")) > .5);
+ } while (ABS(opt.x - pt.x) > .5 || ABS(opt.y - pt.y) > .5);
if (found)
for (i = 0; i < 4; i++)
sp.plus(i).setStruct(best.plus(i).getStruct());
@@ -848,22 +824,22 @@ LEAVING("q4t1ywnk3wm1vyh5seoj7xye","bezier_clip");
//3 1fjkj1ydhtlf13pqj5r041orq
// static void shape_clip0(inside_t * inside_context, node_t * n, pointf curve[4], boolean left_inside)
-public static void shape_clip0(__ptr__ inside_context, Agnode_s n, __ptr__ curve, boolean left_inside) {
+public static void shape_clip0(__ptr__ inside_context, ST_Agnode_s n, ST_pointf.Array curve, boolean left_inside) {
ENTERING("1fjkj1ydhtlf13pqj5r041orq","shape_clip0");
try {
int i;
double save_real_size;
- final __array_of_struct__ c = __array_of_struct_impl__.malloc(pointf.class, 4);
+ final ST_pointf.Array c = new ST_pointf.Array( 4);
save_real_size = ND_rw(n);
for (i = 0; i < 4; i++) {
- c.plus(i).setDouble("x", curve.plus(i).getDouble("x") - ND_coord(n).getDouble("x"));
- c.plus(i).setDouble("y", curve.plus(i).getDouble("y") - ND_coord(n).getDouble("y"));
+ c.plus(i).setDouble("x", curve.get(i).x - ND_coord(n).x);
+ c.plus(i).setDouble("y", curve.get(i).y - ND_coord(n).y);
}
- bezier_clip(inside_context, ND_shape(n).getPtr("fns").getPtr("insidefn"), c,
+ bezier_clip(inside_context, ND_shape(n).fns.insidefn, c,
left_inside);
for (i = 0; i < 4; i++) {
- curve.plus(i).setDouble("x", c.plus(i).getDouble("x") + ND_coord(n).getDouble("x"));
- curve.plus(i).setDouble("y", c.plus(i).getDouble("y") + ND_coord(n).getDouble("y"));
+ curve.plus(i).setDouble("x", c.get(i).x + ND_coord(n).x);
+ curve.plus(i).setDouble("y", c.get(i).y + ND_coord(n).y);
}
ND_rw(n, save_real_size);
} finally {
@@ -903,25 +879,25 @@ throw new UnsupportedOperationException();
//3 bdirexg1qdtophlh0ofjvsmj7
// bezier *new_spline(edge_t * e, int sz)
-public static bezier new_spline(Agedge_s e, int sz) {
+public static ST_bezier new_spline(ST_Agedge_s e, int sz) {
ENTERING("bdirexg1qdtophlh0ofjvsmj7","new_spline");
try {
- bezier rv;
+ ST_bezier rv;
while (ED_edge_type(e) != 0)
e = ED_to_orig(e);
if (ED_spl(e) == null)
- ED_spl(e, zmalloc(sizeof(splines.class)));
- ED_spl(e).setPtr("list", ALLOC(ED_spl(e).getInt("size") + 1, ED_spl(e).getPtr("list"), bezier.class));
- rv = (bezier) ED_spl(e).getPtr("list").plus(ED_spl(e).getInt("size"));
- ED_spl(e).setInt("size", ED_spl(e).getInt("size")+1);
- rv.setPtr("list", zmalloc(sizeof(pointf.class, sz)));
+ ED_spl(e, new ST_splines());
+ ED_spl(e).list = ALLOC_ST_bezier(ED_spl(e).size + 1, ED_spl(e).list);
+ rv = (ST_bezier) ED_spl(e).list.plus(ED_spl(e).size).getPtr();
+ ED_spl(e).setInt("size", ED_spl(e).size+1);
+ rv.list = new ST_pointf.Array(sz);
rv.setInt("size", sz);
rv.setInt("sflag", 0);
rv.setInt("eflag", 0);
- rv.getStruct("sp").setDouble("x", 0);
- rv.getStruct("sp").setDouble("y", 0);
- rv.getStruct("ep").setDouble("x", 0);
- rv.getStruct("ep").setDouble("y", 0);
+ rv.sp.setDouble("x", 0);
+ rv.sp.setDouble("y", 0);
+ rv.ep.setDouble("x", 0);
+ rv.ep.setDouble("y", 0);
return rv;
} finally {
LEAVING("bdirexg1qdtophlh0ofjvsmj7","new_spline");
@@ -933,65 +909,65 @@ LEAVING("bdirexg1qdtophlh0ofjvsmj7","new_spline");
//3 duednxyuvf6xrff752uuv620f
// void clip_and_install(edge_t * fe, node_t * hn, pointf * ps, int pn, splineInfo * info)
-public static void clip_and_install(Agedge_s fe, Agnode_s hn, __ptr__ ps, int pn, __ptr__ info) {
+public static void clip_and_install(ST_Agedge_s fe, ST_Agnode_s hn, ST_pointf.Array ps, int pn, ST_splineInfo info) {
ENTERING("duednxyuvf6xrff752uuv620f","clip_and_install");
try {
- final __struct__<pointf> p2 = JUtils.from(pointf.class);
- bezier newspl;
- Agnode_s tn;
+ final ST_pointf p2 = new ST_pointf();
+ ST_bezier newspl;
+ ST_Agnode_s tn;
int start[] = new int[] {0};
int end[] = new int[] {0};
int i, clipTail=0, clipHead=0;
- Agraph_s g;
- Agedge_s orig;
- boxf tbox=null, hbox=null;
- final __struct__<inside_t> inside_context = JUtils.from(inside_t.class);
+ ST_Agraph_s g;
+ ST_Agedge_s orig;
+ ST_boxf tbox=null, hbox=null;
+ final ST_inside_t inside_context = new ST_inside_t();
tn = agtail(fe);
g = agraphof(tn);
newspl = new_spline(fe, pn);
for (orig = fe; ED_edge_type(orig) != 0; orig = ED_to_orig(orig));
/* may be a reversed flat edge */
- if (N(info.getBoolean("ignoreSwap")) && (ND_rank(tn) == ND_rank(hn)) && (ND_order(tn) > ND_order(hn))) {
- Agnode_s tmp;
+ if (N(info.ignoreSwap) && (ND_rank(tn) == ND_rank(hn)) && (ND_order(tn) > ND_order(hn))) {
+ ST_Agnode_s tmp;
tmp = hn;
hn = tn;
tn = tmp;
}
if (EQ(tn, agtail(orig))) {
- clipTail = ED_tail_port(orig).getInt("clip");
- clipHead = ED_head_port(orig).getInt("clip");
- tbox = (boxf) ED_tail_port(orig).getPtr("bp");
- hbox = (boxf) ED_head_port(orig).getPtr("bp");
+ clipTail = ED_tail_port(orig).clip;
+ clipHead = ED_head_port(orig).clip;
+ tbox = (ST_boxf) ED_tail_port(orig).bp;
+ hbox = (ST_boxf) ED_head_port(orig).bp;
}
else { /* fe and orig are reversed */
- clipTail = ED_head_port(orig).getInt("clip");
- clipHead = ED_tail_port(orig).getInt("clip");
- hbox = (boxf) ED_tail_port(orig).getPtr("bp");
- tbox = (boxf) ED_head_port(orig).getPtr("bp");
+ clipTail = ED_head_port(orig).clip;
+ clipHead = ED_tail_port(orig).clip;
+ hbox = (ST_boxf) ED_tail_port(orig).bp;
+ tbox = (ST_boxf) ED_head_port(orig).bp;
}
/* spline may be interior to node */
- if(clipHead!=0 && ND_shape(tn)!=null && ND_shape(tn).getPtr("fns").getPtr("insidefn")!=null) {
+ if(clipHead!=0 && ND_shape(tn)!=null && ND_shape(tn).fns.insidefn!=null) {
inside_context.setPtr("s.n", tn);
inside_context.setPtr("s.bp", tbox);
for (start[0] = 0; start[0] < pn - 4; start[0] += 3) {
- p2.setDouble("x", ps.plus(start[0] + 3).getDouble("x") - ND_coord(tn).getDouble("x"));
- p2.setDouble("y", ps.plus(start[0] + 3).getDouble("y") - ND_coord(tn).getDouble("y"));
- if (((Boolean)ND_shape(tn).getPtr("fns").call("insidefn", inside_context.amp(), p2)) == false)
+ p2.setDouble("x", ps.get(start[0] + 3).x - ND_coord(tn).x);
+ p2.setDouble("y", ps.get(start[0] + 3).y - ND_coord(tn).y);
+ if (((Boolean)ND_shape(tn).fns.insidefn.exe(inside_context, p2)) == false)
break;
}
- shape_clip0(inside_context.amp(), tn, ps.plus(start[0]), NOT(false));
+ shape_clip0(inside_context, tn, ps.plus(start[0]), NOT(false));
} else
start[0] = 0;
- if(clipHead!=0 && ND_shape(hn)!=null && ND_shape(hn).getPtr("fns").getPtr("insidefn")!=null) {
+ if(clipHead!=0 && ND_shape(hn)!=null && ND_shape(hn).fns.insidefn!=null) {
inside_context.setPtr("s.n", hn);
inside_context.setPtr("s.bp", hbox);
for (end[0] = pn - 4; end[0] > 0; end[0] -= 3) {
- p2.setDouble("x", ps.plus(end[0]).getDouble("x") - ND_coord(hn).getDouble("x"));
- p2.setDouble("y", ps.plus(end[0]).getDouble("y") - ND_coord(hn).getDouble("y"));
- if (((Boolean)ND_shape(hn).getPtr("fns").call("insidefn", inside_context.amp(), p2)) == false)
+ p2.setDouble("x", ps.get(end[0]).x - ND_coord(hn).x);
+ p2.setDouble("y", ps.get(end[0]).y - ND_coord(hn).y);
+ if (((Boolean)ND_shape(hn).fns.insidefn.exe(inside_context, p2)) == false)
break;
}
- shape_clip0(inside_context.amp(), hn, ps.plus(end[0]), false);
+ shape_clip0(inside_context, hn, ps.plus(end[0]), false);
} else
end[0] = pn - 4;
for (; start[0] < pn - 4; start[0] += 3)
@@ -1002,20 +978,20 @@ try {
break;
arrow_clip(fe, hn, ps, start, end, newspl, info);
for (i = start[0]; i < end[0] + 4; ) {
- final __array_of_struct__ cp = __array_of_struct_impl__.malloc(pointf.class, 4);
- newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct());
+ final ST_pointf.Array cp = new ST_pointf.Array( 4);
+ newspl.list.get(i - start[0]).setStruct(ps.plus(i).getStruct());
cp.plus(0).setStruct(ps.plus(i).getStruct());
i++;
if ( i >= end[0] + 4)
break;
- newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct());
+ newspl.list.get(i - start[0]).setStruct(ps.plus(i).getStruct());
cp.plus(1).setStruct(ps.plus(i).getStruct());
i++;
- newspl.getArrayOfPtr("list").plus(i - start[0]).setStruct(ps.plus(i).getStruct());
+ newspl.list.get(i - start[0]).setStruct(ps.plus(i).getStruct());
cp.plus(2).setStruct(ps.plus(i).getStruct());
i++;
cp.plus(3).setStruct(ps.plus(i).getStruct());
- update_bb_bz(GD_bb(g).amp(), cp);
+ update_bb_bz(GD_bb(g), cp);
}
newspl.setInt("size", end[0] - start[0] + 4);
} finally {
@@ -1028,7 +1004,7 @@ LEAVING("duednxyuvf6xrff752uuv620f","clip_and_install");
//3 25ndy15kghfrogsv0b0o0xkgv
// static double conc_slope(node_t* n)
-public static double conc_slope(Agnode_s n) {
+public static double conc_slope(ST_Agnode_s n) {
ENTERING("25ndy15kghfrogsv0b0o0xkgv","conc_slope");
try {
UNSUPPORTED("e388y3vtrp8f6spgh9q4wx37w"); // static double
@@ -1063,17 +1039,17 @@ LEAVING("25ndy15kghfrogsv0b0o0xkgv","conc_slope");
//3 egq4f4tmy1dhyj6jpj92r7xhu
// void add_box(path * P, boxf b)
-public static void add_box(path P, final ST_boxf b) {
+public static void add_box(ST_path P, final ST_boxf b) {
// WARNING!! STRUCT
add_box_w_(P, b.copy());
}
-private static void add_box_w_(path P, final ST_boxf b) {
+private static void add_box_w_(ST_path P, final ST_boxf b) {
ENTERING("egq4f4tmy1dhyj6jpj92r7xhu","add_box");
try {
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
{
- P.getArrayOfPtr("boxes").plus(P.getInt("nbox")).setStruct(b);
- P.setInt("nbox", P.getInt("nbox")+1);
+ P.boxes[P.nbox].setStruct(b);
+ P.nbox = P.nbox+1;
}
} finally {
LEAVING("egq4f4tmy1dhyj6jpj92r7xhu","add_box");
@@ -1085,34 +1061,34 @@ LEAVING("egq4f4tmy1dhyj6jpj92r7xhu","add_box");
//3 7pc43ifcw5g56449d101qf590
// void beginpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
-public static void beginpath(path P, Agedge_s e, int et, pathend_t endp, boolean merge) {
+public static void beginpath(ST_path P, ST_Agedge_s e, int et, ST_pathend_t endp, boolean merge) {
ENTERING("7pc43ifcw5g56449d101qf590","beginpath");
try {
int side, mask;
- Agnode_s n;
+ ST_Agnode_s n;
CFunction pboxfn;
n = agtail(e);
if (ED_tail_port(e).dyna!=0)
- ED_tail_port(e, resolvePort(agtail(e), aghead(e), ED_tail_port(e).amp()));
+ ED_tail_port(e, resolvePort(agtail(e), aghead(e), ED_tail_port(e)));
if (ND_shape(n)!=null)
- pboxfn = (CFunction) ND_shape(n).getPtr("fns").getPtr("pboxfn");
+ pboxfn = (CFunction) ND_shape(n).fns.pboxfn;
else
pboxfn = null;
- P.getStruct("start").setStruct("p", add_pointf(ND_coord(n), ED_tail_port(e).getStruct("p")));
+ P.start.setStruct("p", add_pointf(ND_coord(n), (ST_pointf) ED_tail_port(e).p));
if (merge) {
/*P->start.theta = - M_PI / 2; */
- P.getStruct("start").setDouble("theta", conc_slope(agtail(e)));
- P.getStruct("start").setBoolean("constrained", NOT(false));
+ P.start.setDouble("theta", conc_slope(agtail(e)));
+ P.start.constrained= NOTI(false);
} else {
- if (ED_tail_port(e).getBoolean("constrained")) {
- P.getStruct("start").setDouble("theta", ED_tail_port(e).getDouble("theta"));
- P.getStruct("start").setBoolean("constrained", NOT(false));
+ if (ED_tail_port(e).constrained!=0) {
+ P.start.setDouble("theta", ED_tail_port(e).theta);
+ P.start.constrained= NOTI(false);
} else
- P.getStruct("start").setBoolean("constrained", false);
+ P.start.constrained= 0;
}
- P.setInt("nbox", 0);
+ P.nbox = 0;
P.setPtr("data", e);
- endp.setStruct("np", P.getStruct("start").getStruct("p"));
+ endp.setStruct("np", P.start.p);
if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_tail_port(e).side)!=0)) {
UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig;
UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb;
@@ -1246,12 +1222,12 @@ UNSUPPORTED("8jqn3kj2hrrlcifbw3x9sf6qu"); // endp->sidemask = side;
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return;
}
if (et == 1) side = (1<<0);
- else side = endp.getInt("sidemask"); /* for flat edges */
+ else side = endp.sidemask; /* for flat edges */
if (pboxfn!=null
- && (mask = (Integer) pboxfn.exe(n, ED_tail_port(e).amp(), side, endp.getArrayOfStruct("boxes").plus(0).getStruct().amp(), endp.getInt("boxn")))!=0)
+ && (mask = (Integer) pboxfn.exe(n, ED_tail_port(e), side, endp.boxes[0], endp.boxn))!=0)
UNSUPPORTED("ex9kjvshm19zbu9vqonk1avd8"); // endp->sidemask = mask;
else {
- endp.getArrayOfStruct("boxes").plus(0).setStruct(endp.getStruct("nb"));
+ endp.boxes[0].setStruct(endp.nb);
endp.setInt("boxn", 1);
switch (et) {
case 8:
@@ -1263,15 +1239,15 @@ UNSUPPORTED("46vb5zg9vm9n0q21g53nj66v3"); // endp->boxes[0].UR.y = P->start
UNSUPPORTED("auefgwb39x5hzqqc9b1zgl239"); // endp->sidemask = (1<<0);
break;
case 2:
- if (endp.getInt("sidemask") == (1<<2))
- ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("start").getStruct("p").getDouble("y");
+ if (endp.sidemask == (1<<2))
+ ((ST_boxf)endp.boxes[0]).LL.y = P.start.p.y;
else
- ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("start").getStruct("p").getDouble("y");
+ ((ST_boxf)endp.boxes[0]).UR.y = P.start.p.y;
break;
case 1:
- ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("start").getStruct("p").getDouble("y");
+ ((ST_boxf)(endp).boxes[0]).UR.y = P.start.p.y;
endp.setInt("sidemask", (1<<0));
- P.getStruct("start").getStruct("p").setDouble("y", P.getStruct("start").getStruct("p").getDouble("y") - 1);
+ P.start.p.setDouble("y", P.start.p.y - 1);
break;
}
}
@@ -1285,33 +1261,33 @@ LEAVING("7pc43ifcw5g56449d101qf590","beginpath");
//3 79dr5om55xs3n5lgai1sf58vu
// void endpath(path * P, edge_t * e, int et, pathend_t * endp, boolean merge)
-public static void endpath(path P, Agedge_s e, int et, pathend_t endp, boolean merge) {
+public static void endpath(ST_path P, ST_Agedge_s e, int et, ST_pathend_t endp, boolean merge) {
ENTERING("79dr5om55xs3n5lgai1sf58vu","endpath");
try {
int side, mask;
- Agnode_s n;
+ ST_Agnode_s n;
CFunction pboxfn;
n = aghead(e);
- if (ED_head_port(e).getBoolean("dyna"))
+ if (ED_head_port(e).dyna!=0)
UNSUPPORTED("9brhx94sjudx3jtzrnwa60x8"); // ED_head_port(e) = resolvePort(aghead(e), agtail(e), &ED_head_port(e));
if (ND_shape(n)!=null)
- pboxfn = (CFunction) ND_shape(n).getPtr("fns").getPtr("pboxfn");
+ pboxfn = (CFunction) ND_shape(n).fns.pboxfn;
else
pboxfn = null;
- P.getStruct("end").setStruct("p", add_pointf(ND_coord(n), ED_head_port(e).getStruct("p")));
+ P.end.setStruct("p", add_pointf(ND_coord(n), (ST_pointf) ED_head_port(e).p));
if (merge) {
UNSUPPORTED("cproejwusj67kuugolh6tbkwz"); // /*P->end.theta = M_PI / 2; */
UNSUPPORTED("65vhfvz1d1tub3f85tdsgg2g5"); // P->end.theta = conc_slope(aghead(e)) + M_PI;
UNSUPPORTED("du4hwt6pjf3bmkvowssm7b0uo"); // assert(P->end.theta < 2 * M_PI);
UNSUPPORTED("2w0c22i5xgcch77xd9jg104nw"); // P->end.constrained = NOT(0);
} else {
- if (ED_head_port(e).getBoolean("constrained")) {
- P.getStruct("end").setDouble("theta", ED_head_port(e).getDouble("theta"));
- P.getStruct("end").setInt("constrained", 1);
+ if (ED_head_port(e).constrained!=0) {
+ P.end.setDouble("theta", ED_head_port(e).theta);
+ P.end.setInt("constrained", 1);
} else
- P.getStruct("end").setInt("constrained", 0);
+ P.end.setInt("constrained", 0);
}
- endp.setStruct("np", P.getStruct("end").getStruct("p"));
+ endp.setStruct("np", P.end.p);
if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_head_port(e).side)!=0)) {
UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig;
UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb;
@@ -1446,12 +1422,12 @@ UNSUPPORTED("8jqn3kj2hrrlcifbw3x9sf6qu"); // endp->sidemask = side;
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return;
}
if (et == 1) side = (1<<2);
- else side = endp.getInt("sidemask"); /* for flat edges */
+ else side = endp.sidemask; /* for flat edges */
if (pboxfn!=null
- && (mask = (Integer) pboxfn.exe(n, ED_head_port(e).amp(), side, endp.getArrayOfStruct("boxes").plus(0).getStruct().amp(), endp.getInt("boxn")))!=0)
+ && (mask = (Integer) pboxfn.exe(n, ED_head_port(e), side, endp.boxes[0], endp.boxn))!=0)
endp.setInt("sidemask", mask);
else {
- endp.getArrayOfStruct("boxes").plus(0).setStruct(endp.getStruct("nb"));
+ endp.boxes[0].setStruct(endp.nb);
endp.setInt("boxn", 1);
switch (et) {
case 8:
@@ -1463,15 +1439,15 @@ UNSUPPORTED("db6vmvnse8bawy8qwct7l24u8"); // endp->boxes[0].LL.y = P->end.p
UNSUPPORTED("1r4lctdj9z1ivlz3uqpcj1yzf"); // endp->sidemask = (1<<2);
UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break;
case 2:
- if (endp.getInt("sidemask") == (1<<2))
- ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("end").getStruct("p").getDouble("y");
+ if (endp.sidemask == (1<<2))
+ endp.boxes[0].LL.y = P.end.p.y;
else
- ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("end").getStruct("p").getDouble("y");
+ endp.boxes[0].UR.y = P.end.p.y;
break;
case 1:
- ((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("end").getStruct("p").getDouble("y");
+ endp.boxes[0].LL.y = P.end.p.y;
endp.setInt("sidemask", (1<<2));
- P.getStruct("end").getStruct("p").setDouble("y", P.getStruct("end").getStruct("p").getDouble("y") +1);
+ P.end.p.setDouble("y", P.end.p.y +1);
break;
}
}
@@ -1486,6 +1462,7 @@ LEAVING("79dr5om55xs3n5lgai1sf58vu","endpath");
//3 3g7alj6eirl5b2hlhluiqvaax
// static int convert_sides_to_points(int tail_side, int head_side)
public static int convert_sides_to_points(int tail_side, int head_side) {
+ENTERING("3g7alj6eirl5b2hlhluiqvaax","convert_sides_to_points");
int vertices[] = new int[] {12,4,6,2,3,1,9,8}; //the cumulative side value of each node point
int i, tail_i, head_i;
int pair_a[][] = new int[][] { //array of possible node point pairs
@@ -1498,7 +1475,6 @@ int pair_a[][] = new int[][] { //array of possible node point pairs
{71,72,73,74,75,76,77,78},
{81,82,83,84,85,86,87,88}
};
-ENTERING("3g7alj6eirl5b2hlhluiqvaax","convert_sides_to_points");
try {
tail_i = head_i = -1;
for(i=0;i< 8; i++){
@@ -1709,29 +1685,29 @@ throw new UnsupportedOperationException();
//3 3sr8gvj4141qql0v12lb89cyt
// static void selfRight (edge_t* edges[], int ind, int cnt, double stepx, double sizey, splineInfo* sinfo)
-public static void selfRight(__ptr__ edges, int ind, int cnt, double stepx, double sizey, splineInfo sinfo) {
+public static void selfRight(ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, double stepx, double sizey, ST_splineInfo sinfo) {
ENTERING("3sr8gvj4141qql0v12lb89cyt","selfRight");
try {
int i, sgn, point_pair;
double hx, tx, stepy, dx, dy, width, height;
final ST_pointf tp = new ST_pointf(), hp = new ST_pointf(), np = new ST_pointf();
- Agnode_s n;
- Agedge_s e;
- final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 1000);
+ ST_Agnode_s n;
+ ST_Agedge_s e;
+ final ST_pointf.Array points = new ST_pointf.Array( 1000);
int pointn;
- e = (Agedge_s) edges.plus(ind).getPtr();
+ e = (ST_Agedge_s) edges.get(ind);
n = agtail(e);
stepy = (sizey / 2.) / cnt;
stepy = MAX(stepy, 2.);
pointn = 0;
np.___(ND_coord(n));
- tp.___(ED_tail_port(e).getStruct("p"));
- tp.setDouble("x", tp.getDouble("x") + np.getDouble("x"));
- tp.setDouble("y", tp.getDouble("y") + np.getDouble("y"));
- hp.___(ED_head_port(e).getStruct("p"));
- hp.setDouble("x", hp.getDouble("x") + np.getDouble("x"));
- hp.setDouble("y", hp.getDouble("y") + np.getDouble("y"));
- if (tp.getDouble("y") >= hp.getDouble("y")) sgn = 1;
+ tp.___(ED_tail_port(e).p);
+ tp.setDouble("x", tp.x + np.x);
+ tp.setDouble("y", tp.y + np.y);
+ hp.___(ED_head_port(e).p);
+ hp.setDouble("x", hp.x + np.x);
+ hp.setDouble("y", hp.y + np.y);
+ if (tp.y >= hp.y) sgn = 1;
else sgn = -1;
dx = ND_rw(n);
dy = 0;
@@ -1740,36 +1716,36 @@ try {
point_pair = convert_sides_to_points(ED_tail_port(e).side,ED_head_port(e).side);
switch(point_pair){
case 32:
- case 65: if(tp.getDouble("y") == hp.getDouble("y"))
+ case 65: if(tp.y == hp.y)
sgn = -sgn;
break;
default:
break;
}
- tx = MIN(dx, 3*(np.getDouble("x") + dx - tp.getDouble("x")));
- hx = MIN(dx, 3*(np.getDouble("x") + dx - hp.getDouble("x")));
+ tx = MIN(dx, 3*(np.x + dx - tp.x));
+ hx = MIN(dx, 3*(np.x + dx - hp.x));
for (i = 0; i < cnt; i++) {
- e = (Agedge_s) edges.plus(ind++).getPtr();
+ e = (ST_Agedge_s) edges.plus(ind++).getPtr();
dx += stepx; tx += stepx; hx += stepx; dy += sgn*stepy;
pointn = 0;
points.plus(pointn++).setStruct(tp);
- points.plus(pointn++).setStruct(pointfof(tp.getDouble("x") + tx / 3, tp.getDouble("y") + dy));
- points.plus(pointn++).setStruct(pointfof(np.getDouble("x") + dx, tp.getDouble("y") + dy));
- points.plus(pointn++).setStruct(pointfof(np.getDouble("x") + dx, (tp.getDouble("y")+hp.getDouble("y"))/2));
- points.plus(pointn++).setStruct(pointfof(np.getDouble("x") + dx, hp.getDouble("y") - dy));
- points.plus(pointn++).setStruct(pointfof(hp.getDouble("x") + hx / 3, hp.getDouble("y") - dy));
+ points.plus(pointn++).setStruct(pointfof(tp.x + tx / 3, tp.y + dy));
+ points.plus(pointn++).setStruct(pointfof(np.x + dx, tp.y + dy));
+ points.plus(pointn++).setStruct(pointfof(np.x + dx, (tp.y+hp.y)/2));
+ points.plus(pointn++).setStruct(pointfof(np.x + dx, hp.y - dy));
+ points.plus(pointn++).setStruct(pointfof(hp.x + hx / 3, hp.y - dy));
points.plus(pointn++).setStruct(hp);
if (ED_label(e)!=null) {
if (GD_flip(agraphof(agtail(e)))!=0) {
- width = ED_label(e).getStruct("dimen").getDouble("y");
- height = ED_label(e).getStruct("dimen").getDouble("x");
+ width = ED_label(e).dimen.y;
+ height = ED_label(e).dimen.x;
} else {
- width = ED_label(e).getStruct("dimen").getDouble("x");
- height = ED_label(e).getStruct("dimen").getDouble("y");
+ width = ED_label(e).dimen.x;
+ height = ED_label(e).dimen.y;
}
- ED_label(e).getStruct("pos").setDouble("x", ND_coord(n).getDouble("x") + dx + width / 2.0);
- ED_label(e).getStruct("pos").setDouble("y", ND_coord(n).getDouble("y"));
- ED_label(e).setBoolean("set", NOT(false));
+ ED_label(e).pos.setDouble("x", ND_coord(n).x + dx + width / 2.0);
+ ED_label(e).pos.setDouble("y", ND_coord(n).y);
+ ED_label(e).set= NOTI(false);
if (width > stepx)
dx += width - stepx;
}
@@ -1864,12 +1840,12 @@ throw new UnsupportedOperationException();
//3 678whq05s481ertx02jloteu3
// int selfRightSpace (edge_t* e)
-public static int selfRightSpace(Agedge_s e) {
+public static int selfRightSpace(ST_Agedge_s e) {
ENTERING("678whq05s481ertx02jloteu3","selfRightSpace");
try {
int sw=0;
double label_width;
- textlabel_t l = ED_label(e);
+ ST_textlabel_t l = ED_label(e);
if ((N(ED_tail_port(e).defined) && N(ED_head_port(e).defined)) ||
(
N(ED_tail_port(e).side & (1<<3)) &&
@@ -1879,7 +1855,7 @@ try {
)) {
sw = 18;
if (l!=null) {
- label_width = GD_flip(agraphof(aghead(e)))!=0 ? l.getStruct("dimen").getDouble("y") : l.getStruct("dimen").getDouble("x");
+ label_width = GD_flip(agraphof(aghead(e)))!=0 ? l.dimen.y : l.dimen.x;
sw += label_width;
}
}
@@ -1895,11 +1871,11 @@ LEAVING("678whq05s481ertx02jloteu3","selfRightSpace");
//3 bt3fwgprixbc5rceeewozdqr9
// void makeSelfEdge(path * P, edge_t * edges[], int ind, int cnt, double sizex, double sizey, splineInfo * sinfo)
-public static void makeSelfEdge(path P, __ptr__ edges, int ind, int cnt, double sizex, double sizey, splineInfo sinfo) {
+public static void makeSelfEdge(ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, double sizex, double sizey, ST_splineInfo sinfo) {
ENTERING("bt3fwgprixbc5rceeewozdqr9","makeSelfEdge");
try {
- Agedge_s e;
- e = (Agedge_s) edges.plus(ind).getPtr();
+ ST_Agedge_s e;
+ e = (ST_Agedge_s) edges.get(ind);
/* self edge without ports or
* self edge with all ports inside, on the right, or at most 1 on top
* and at most 1 on bottom
@@ -1965,27 +1941,27 @@ throw new UnsupportedOperationException();
//3 7wyn51o9k6u7joaq9k18boffh
// static void endPoints(splines * spl, pointf * p, pointf * q)
-public static Object endPoints(Object... arg) {
-UNSUPPORTED("5r4ewx4i6zia04hwqvonnvcg9"); // static void endPoints(splines * spl, pointf * p, pointf * q)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz;
-UNSUPPORTED("2hacb9fdt2n4mkiveluxkiu2e"); // bz = spl->list[0];
-UNSUPPORTED("dtt0q54ov71fji9i2ae24aeyc"); // if (bz.sflag) {
+public static void endPoints(ST_splines spl, ST_pointf p, ST_pointf q) {
+ENTERING("7wyn51o9k6u7joaq9k18boffh","endPoints");
+try {
+ final ST_bezier bz = new ST_bezier();
+ bz.____(spl.list.get(0));
+ if (bz.sflag!=0) {
UNSUPPORTED("4wazlko0bxmzxoobqacij1btk"); // *p = bz.sp;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else {
-UNSUPPORTED("3gwxodchk1jdid7jbltvxhnaf"); // *p = bz.list[0];
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("6pj4gaguml8ocln5h92kpqk94"); // bz = spl->list[spl->size - 1];
-UNSUPPORTED("4o7tep38o3pxavxbzw15khp2r"); // if (bz.eflag) {
+ }
+ else {
+ p.____(bz.list.get(0));
+ }
+ bz.____(spl.list.plus(spl.size-1).getPtr());
+ if (bz.eflag!=0) {
UNSUPPORTED("78u9nvs8u7rxturidz5nf8hn4"); // *q = bz.ep;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else {
-UNSUPPORTED("3kkyg7t050mn59a1ekp0f0lzj"); // *q = bz.list[bz.size - 1];
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ }
+ else {
+ q.____(bz.list.get(bz.size-1));
+ }
+} finally {
+LEAVING("7wyn51o9k6u7joaq9k18boffh","endPoints");
+}
}
@@ -2039,28 +2015,35 @@ throw new UnsupportedOperationException();
//3 8hpmwzlqbj1nii32zubbe9hru
// pointf edgeMidpoint (graph_t* g, edge_t * e)
-public static Object edgeMidpoint(Object... arg) {
-UNSUPPORTED("ddgobb6cu0307nl6cc2hm7jak"); // pointf
-UNSUPPORTED("8ww957bkesrmzkmuchx2pvhb2"); // edgeMidpoint (graph_t* g, edge_t * e)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("cx1drb9eui5nioe70lvmlgm79"); // int et = (GD_flags(g) & (7 << 1));
-UNSUPPORTED("2auwjymmiryq94uc6spzynrvi"); // pointf d, spf, p, q;
-UNSUPPORTED("bpo1twbinspgdzr5k3fmntxtg"); // endPoints(ED_spl(e), &p, &q);
-UNSUPPORTED("4yaabujbmowa3lyxk4205gkpv"); // if (APPROXEQPT(p, q, MILLIPOINT)) { /* degenerate spline */
+public static ST_pointf edgeMidpoint(ST_Agraph_s g, ST_Agedge_s e) {
+ENTERING("8hpmwzlqbj1nii32zubbe9hru","edgeMidpoint");
+try {
+ return edgeMidpoint_(g, e).copy();
+} finally {
+LEAVING("8hpmwzlqbj1nii32zubbe9hru","edgeMidpoint");
+}
+}
+
+
+private static ST_pointf edgeMidpoint_(ST_Agraph_s g, ST_Agedge_s e) {
+ int et = (GD_flags(g) & (7 << 1));
+ final ST_pointf d = new ST_pointf();
+ final ST_pointf spf = new ST_pointf();
+ final ST_pointf p = new ST_pointf();
+ final ST_pointf q = new ST_pointf();
+ endPoints((ST_splines) ED_spl(e), p, q);
+ if (APPROXEQPT(p, q, MILLIPOINT)) { /* degenerate spline */
UNSUPPORTED("7i8m5mpfnv7m9uqxh015zfdaj"); // spf = p;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("bpe21xennpxofkh2a8ce70n8r"); // else if ((et == (5 << 1)) || (et == (2 << 1))) {
-UNSUPPORTED("6frrlsqvrym5x5bivjwo3rkg4"); // d.x = (q.x + p.x) / 2.;
-UNSUPPORTED("5qa6kgh9e0trsgfkiwhzxtc5n"); // d.y = (p.y + q.y) / 2.;
-UNSUPPORTED("dn0aho2lzwtnxuk3v45gd81fo"); // spf = dotneato_closest(ED_spl(e), d);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("2flg4ooa026ob187pje77te28"); // else { /* ET_PLINE, ET_ORTHO or ET_LINE */
+ }
+ else if ((et == (5 << 1)) || (et == (2 << 1))) {
+ d.x = (q.x + p.x) / 2.;
+ d.y = (p.y + q.y) / 2.;
+ spf.___(dotneato_closest((ST_splines)ED_spl(e), d));
+ }
+ else { /* ET_PLINE, ET_ORTHO or ET_LINE */
UNSUPPORTED("6he3hi05vusuthrchn4enk7o6"); // spf = polylineMidpoint (ED_spl(e), &p, &q);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("56kh0ww24ygwjntzmm9q6wec3"); // return spf;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ }
+ return spf;
}
@@ -2142,11 +2125,11 @@ throw new UnsupportedOperationException();
//3 2tbz9tbkzx8os72qiyhgnby67
// splines *getsplinepoints(edge_t * e)
-public static splines getsplinepoints(Agedge_s e) {
+public static ST_splines getsplinepoints(ST_Agedge_s e) {
ENTERING("2tbz9tbkzx8os72qiyhgnby67","getsplinepoints");
try {
- Agedge_s le;
- splines sp;
+ ST_Agedge_s le;
+ ST_splines sp;
for (le = e; N(sp = ED_spl(le)) && ED_edge_type(le) != 0;
le = ED_to_orig(le));
if (sp == null)
diff --git a/src/gen/lib/common/textspan__c.java b/src/gen/lib/common/textspan__c.java
index aed083f..2f8ab31 100644
--- a/src/gen/lib/common/textspan__c.java
+++ b/src/gen/lib/common/textspan__c.java
@@ -47,13 +47,10 @@ package gen.lib.common;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.GVC_s;
-import h._dt_s;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
+import h.ST_GVC_s;
+import h.ST_dt_s;
+import h.ST_pointf;
+import h.ST_textspan_t;
public class textspan__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -313,14 +310,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -349,26 +346,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -391,16 +368,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -796,17 +773,17 @@ throw new UnsupportedOperationException();
//3 n8tcl06mifdn779rzenam44z
// pointf textspan_size(GVC_t *gvc, textspan_t * span)
-public static __struct__<pointf> textspan_size(GVC_s gvc, __ptr__ span) {
+public static ST_pointf textspan_size(ST_GVC_s gvc, ST_textspan_t span) {
// WARNING!! STRUCT
return textspan_size_w_(gvc, span).copy();
}
-private static __struct__<pointf> textspan_size_w_(GVC_s gvc, __ptr__ span) {
+private static ST_pointf textspan_size_w_(ST_GVC_s gvc, ST_textspan_t span) {
ENTERING("n8tcl06mifdn779rzenam44z","textspan_size");
try {
System.err.println("Warning:textspan_size "+span);
- span.getStruct("size").setDouble("x", 30);
- span.getStruct("size").setDouble("y", 20);
- return span.getStruct("size").copy();
+ span.size.setDouble("x", 30);
+ span.size.setDouble("y", 20);
+ return span.size.copy();
} finally {
LEAVING("n8tcl06mifdn779rzenam44z","textspan_size");
}
@@ -889,7 +866,7 @@ throw new UnsupportedOperationException();
//3 9mfrgcpzz2d9f7nxfgx4nxj2q
// Dt_t * textfont_dict_open(GVC_t *gvc)
-public static _dt_s textfont_dict_open(GVC_s gvc) {
+public static ST_dt_s textfont_dict_open(ST_GVC_s gvc) {
ENTERING("9mfrgcpzz2d9f7nxfgx4nxj2q","textfont_dict_open");
try {
return null;
diff --git a/src/gen/lib/common/utils__c.java b/src/gen/lib/common/utils__c.java
index 2391482..2346e20 100644
--- a/src/gen/lib/common/utils__c.java
+++ b/src/gen/lib/common/utils__c.java
@@ -51,7 +51,6 @@ import static gen.lib.cgraph.edge__c.agtail;
import static gen.lib.cgraph.obj__c.agraphof;
import static gen.lib.cgraph.refstr__c.aghtmlstr;
import static gen.lib.common.labels__c.make_label;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.shapes__c.bind_shape;
import static gen.lib.common.shapes__c.shapeOf;
import static smetana.core.JUtils.EQ;
@@ -60,7 +59,6 @@ import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtils.atoi;
import static smetana.core.JUtils.enumAsInt;
import static smetana.core.JUtils.isdigit;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtils.strchr;
import static smetana.core.JUtils.strcmp;
import static smetana.core.JUtils.strtod;
@@ -68,10 +66,12 @@ import static smetana.core.JUtils.strtol;
import static smetana.core.JUtils.tolower;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
+import static smetana.core.Macro.DIST2;
import static smetana.core.Macro.ED_head_label;
import static smetana.core.Macro.ED_head_port;
import static smetana.core.Macro.ED_label;
import static smetana.core.Macro.ED_label_ontop;
+import static smetana.core.Macro.ED_tail_label;
import static smetana.core.Macro.ED_tail_port;
import static smetana.core.Macro.GD_bb;
import static smetana.core.Macro.GD_flags;
@@ -91,29 +91,25 @@ import static smetana.core.Macro.ND_shape;
import static smetana.core.Macro.ND_showboxes;
import static smetana.core.Macro.ND_width;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsym_s;
+import static smetana.core.Macro.fabs;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
import h.ST_Agsym_s;
+import h.ST_bezier;
import h.ST_boxf;
+import h.ST_fontinfo;
+import h.ST_nodequeue;
+import h.ST_pointf;
import h.ST_port;
-import h.boxf;
-import h.fontinfo;
-import h.nodequeue;
-import h.pointf;
-import h.port;
+import h.ST_splines;
+import h.ST_textlabel_t;
import h.shape_kind;
-import h.textlabel_t;
import smetana.core.CFunction;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class utils__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -373,14 +369,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -409,25 +405,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -451,16 +428,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -757,13 +734,13 @@ throw new UnsupportedOperationException();
//3 c7cptalfn8k75wyfirbnptnav
// nodequeue *new_queue(int sz)
-public static nodequeue new_queue(int sz) {
+public static ST_nodequeue new_queue(int sz) {
ENTERING("c7cptalfn8k75wyfirbnptnav","new_queue");
try {
- nodequeue q = (nodequeue)zmalloc(sizeof(nodequeue.class));
+ ST_nodequeue q = new ST_nodequeue();
if (sz <= 1)
sz = 2;
- final __ptr__ tmp__ = zmalloc(sizeof(Agnode_s.class, sz));
+ final ST_Agnode_s.ArrayOfStar tmp__ = new ST_Agnode_s.ArrayOfStar(sz);
q.setPtr("store", tmp__);
q.setPtr("tail", tmp__);
q.setPtr("head", tmp__);
@@ -779,10 +756,10 @@ LEAVING("c7cptalfn8k75wyfirbnptnav","new_queue");
//3 1uj5nmdvwmuklnpd3v5py547f
// void free_queue(nodequeue * q)
-public static void free_queue(nodequeue q) {
+public static void free_queue(ST_nodequeue q) {
ENTERING("1uj5nmdvwmuklnpd3v5py547f","free_queue");
try {
- Memory.free(q.getPtr("store"));
+ Memory.free(q.store);
Memory.free(q);
} finally {
LEAVING("1uj5nmdvwmuklnpd3v5py547f","free_queue");
@@ -794,13 +771,13 @@ LEAVING("1uj5nmdvwmuklnpd3v5py547f","free_queue");
//3 20pwd6i141q3o25lfvrdqytot
// void enqueue(nodequeue * q, node_t * n)
-public static void enqueue(nodequeue q, Agnode_s n) {
+public static void enqueue(ST_nodequeue q, ST_Agnode_s n) {
ENTERING("20pwd6i141q3o25lfvrdqytot","enqueue");
try {
- q.getArrayOfPtr("tail").plus(0).setPtr(n);
- q.setPtr("tail", q.getPtr("tail").plus(1));
- if (q.getPtr("tail").comparePointer(q.getPtr("limit")) >= 0)
- q.setPtr("tail", q.getPtr("store"));
+ q.tail.plus(0).setPtr(n);
+ q.setPtr("tail", q.tail.plus(1));
+ if (q.tail.comparePointer(q.limit) >= 0)
+ q.setPtr("tail", q.store);
} finally {
LEAVING("20pwd6i141q3o25lfvrdqytot","enqueue");
}
@@ -811,17 +788,17 @@ LEAVING("20pwd6i141q3o25lfvrdqytot","enqueue");
//3 b612nmtf16au96ztbs8pike9r
// node_t *dequeue(nodequeue * q)
-public static Agnode_s dequeue(nodequeue q) {
+public static ST_Agnode_s dequeue(ST_nodequeue q) {
ENTERING("b612nmtf16au96ztbs8pike9r","dequeue");
try {
- Agnode_s n;
- if (EQ(q.getPtr("head"), q.getPtr("tail")))
+ ST_Agnode_s n;
+ if (EQ(q.head, q.tail))
n = null;
else {
- n = (Agnode_s) q.getArrayOfPtr("head").plus(0).getPtr();
- q.setPtr("head", q.getPtr("head").plus(1));
- if (q.getPtr("head").comparePointer(q.getPtr("limit")) >= 0)
- q.setPtr("head", q.getPtr("store"));
+ n = (ST_Agnode_s) q.head.get(0);
+ q.setPtr("head", q.head.plus(1));
+ if (q.head.comparePointer(q.limit) >= 0)
+ q.setPtr("head", q.store);
}
return n;
} finally {
@@ -834,7 +811,7 @@ LEAVING("b612nmtf16au96ztbs8pike9r","dequeue");
//3 6nydxv4f2m7jcfh8ljs0neu0x
// int late_int(void *obj, attrsym_t * attr, int def, int low)
-public static int late_int(__ptr__ obj, Agsym_s attr, int def, int low) {
+public static int late_int(__ptr__ obj, ST_Agsym_s attr, int def, int low) {
ENTERING("6nydxv4f2m7jcfh8ljs0neu0x","late_int");
try {
CString p;
@@ -859,7 +836,7 @@ LEAVING("6nydxv4f2m7jcfh8ljs0neu0x","late_int");
//3 d68314e4f20r79tt0cnmxugme
// double late_double(void *obj, attrsym_t * attr, double def, double low)
-public static double late_double(__ptr__ obj, Agsym_s attr, double def, double low) {
+public static double late_double(__ptr__ obj, ST_Agsym_s attr, double def, double low) {
ENTERING("d68314e4f20r79tt0cnmxugme","late_double");
try {
CString p;
@@ -902,7 +879,7 @@ throw new UnsupportedOperationException();
//3 83xm6yc9q5h1bzufhsnv0v2up
// char *late_string(void *obj, attrsym_t * attr, char *def)
-public static CString late_string(__ptr__ obj, Agsym_s attr, CString def) {
+public static CString late_string(__ptr__ obj, ST_Agsym_s attr, CString def) {
ENTERING("83xm6yc9q5h1bzufhsnv0v2up","late_string");
try {
if (N(attr) || N(obj))
@@ -918,7 +895,7 @@ LEAVING("83xm6yc9q5h1bzufhsnv0v2up","late_string");
//3 8oon4q1mrublaru177xfntqgd
// char *late_nnstring(void *obj, attrsym_t * attr, char *def)
-public static CString late_nnstring(__ptr__ obj, Agsym_s attr, CString def) {
+public static CString late_nnstring(__ptr__ obj, ST_Agsym_s attr, CString def) {
ENTERING("8oon4q1mrublaru177xfntqgd","late_nnstring");
try {
CString rv = late_string(obj, attr, def);
@@ -935,13 +912,18 @@ LEAVING("8oon4q1mrublaru177xfntqgd","late_nnstring");
//3 87ifze04q7qzigjj1fb9y9by2
// boolean late_bool(void *obj, attrsym_t * attr, int def)
-public static boolean late_bool(__ptr__ obj, Agsym_s attr, int def) {
+public static boolean late_bool(__ptr__ obj, ST_Agsym_s attr, int def) {
+ENTERING("87ifze04q7qzigjj1fb9y9by2","late_bool");
+try {
if (attr == null)
return def!=0;
UNSUPPORTED("a0kh1y5n8u59z0xo7mag3zmt6"); // return mapbool(agxget(obj, attr));
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
throw new UnsupportedOperationException();
+} finally {
+LEAVING("87ifze04q7qzigjj1fb9y9by2","late_bool");
+}
}
@@ -949,7 +931,7 @@ throw new UnsupportedOperationException();
//3 aeq0acpkhfv3gd5jx8op4jf18
// node_t *UF_find(node_t * n)
-public static Agnode_s UF_find(Agnode_s n) {
+public static ST_Agnode_s UF_find(ST_Agnode_s n) {
ENTERING("aeq0acpkhfv3gd5jx8op4jf18","UF_find");
try {
while (ND_UF_parent(n)!=null && NEQ(ND_UF_parent(n), n)) {
@@ -968,7 +950,7 @@ LEAVING("aeq0acpkhfv3gd5jx8op4jf18","UF_find");
//3 9ldxwfr4vvijrvfcvs1hvdzrt
// node_t *UF_union(node_t * u, node_t * v)
-public static Agnode_s UF_union(Agnode_s u, Agnode_s v) {
+public static ST_Agnode_s UF_union(ST_Agnode_s u, ST_Agnode_s v) {
ENTERING("9ldxwfr4vvijrvfcvs1hvdzrt","UF_union");
try {
if (EQ(u, v))
@@ -1018,7 +1000,7 @@ throw new UnsupportedOperationException();
//3 22k0u1imxyw06k9rizqlfz153
// void UF_singleton(node_t * u)
-public static void UF_singleton(Agnode_s u) {
+public static void UF_singleton(ST_Agnode_s u) {
ENTERING("22k0u1imxyw06k9rizqlfz153","UF_singleton");
try {
ND_UF_size(u, 1);
@@ -1034,7 +1016,7 @@ LEAVING("22k0u1imxyw06k9rizqlfz153","UF_singleton");
//3 e0fn8xuzkdt0q8xoofl6j1txb
// void UF_setname(node_t * u, node_t * v)
-public static void UF_setname(Agnode_s u, Agnode_s v) {
+public static void UF_setname(ST_Agnode_s u, ST_Agnode_s v) {
ENTERING("e0fn8xuzkdt0q8xoofl6j1txb","UF_setname");
try {
assert(EQ(u, UF_find(u)));
@@ -1067,20 +1049,20 @@ throw new UnsupportedOperationException();
//3 6p0ey2c2ujk2o7h221p0b4xon
// pointf Bezier(pointf * V, int degree, double t, pointf * Left, pointf * Right)
-public static __struct__<pointf> Bezier(__array_of_struct__ V, int degree, double t, __ptr__ Left, __ptr__ Right) {
+public static ST_pointf Bezier(final ST_pointf.Array V, int degree, double t, __ptr__ Left, __ptr__ Right) {
// WARNING!! STRUCT
return Bezier_w_(V, degree, t, Left, Right).copy();
}
-private static __struct__<pointf> Bezier_w_(__array_of_struct__ V, int degree, double t, __ptr__ Left, __ptr__ Right) {
+private static ST_pointf Bezier_w_(final ST_pointf.Array V, int degree, double t, __ptr__ Left, __ptr__ Right) {
ENTERING("6p0ey2c2ujk2o7h221p0b4xon","Bezier");
try {
int i, j; /* Index variables */
- final __array_of_struct__ Vtemp[] = new __array_of_struct__[] { __array_of_struct_impl__.malloc(pointf.class, 5+1),
- __array_of_struct_impl__.malloc(pointf.class, 5+1),
- __array_of_struct_impl__.malloc(pointf.class, 5+1),
- __array_of_struct_impl__.malloc(pointf.class, 5+1),
- __array_of_struct_impl__.malloc(pointf.class, 5+1),
- __array_of_struct_impl__.malloc(pointf.class, 5+1) };
+ final ST_pointf.Array Vtemp[] = new ST_pointf.Array[] { new ST_pointf.Array( 5+1),
+ new ST_pointf.Array( 5+1),
+ new ST_pointf.Array( 5+1),
+ new ST_pointf.Array( 5+1),
+ new ST_pointf.Array( 5+1),
+ new ST_pointf.Array( 5+1) };
/* Copy control points */
for (j = 0; j <= degree; j++) {
Vtemp[0].plus(j).setStruct(V.plus(j).getStruct());
@@ -1089,9 +1071,9 @@ try {
for (i = 1; i <= degree; i++) {
for (j = 0; j <= degree - i; j++) {
Vtemp[i].plus(j).setDouble("x",
- (1.0 - t) * Vtemp[i - 1].plus(j).getDouble("x") + t * Vtemp[i - 1].plus(j + 1).getDouble("x"));
+ (1.0 - t) * Vtemp[i - 1].get(j).x + t * Vtemp[i - 1].get(j + 1).x);
Vtemp[i].plus(j).setDouble("y",
- (1.0 - t) * Vtemp[i - 1].plus(j).getDouble("y") + t * Vtemp[i - 1].plus(j + 1).getDouble("y"));
+ (1.0 - t) * Vtemp[i - 1].get(j).y + t * Vtemp[i - 1].get(j + 1).y);
}
}
if (Left != null)
@@ -1100,7 +1082,7 @@ try {
if (Right != null)
for (j = 0; j <= degree; j++)
Right.plus(j).setStruct(Vtemp[degree - j].plus(j).getStruct());
- return (Vtemp[degree].plus(0).getStruct());
+ return (ST_pointf) (Vtemp[degree].plus(0).getStruct());
} finally {
LEAVING("6p0ey2c2ujk2o7h221p0b4xon","Bezier");
}
@@ -1193,12 +1175,12 @@ throw new UnsupportedOperationException();
-//3 3xll2b0v9nthwvx9dafq49t8s
-// const char *safefile(const char *filename)
//static boolean onetime = (!(0));
//static char *pathlist = (void *)0;
//static int maxdirlen;
//static char** dirs;
+//3 3xll2b0v9nthwvx9dafq49t8s
+// const char *safefile(const char *filename)
public static CString safefile(CString filename) {
ENTERING("3xll2b0v9nthwvx9dafq49t8s","safefile");
try {
@@ -1273,53 +1255,61 @@ LEAVING("ehkvqh6bwf4jw3mj1w5p7a8m8","mapbool");
//3 37hgj44s94wf9bmz16he85pgq
// pointf dotneato_closest(splines * spl, pointf pt)
-public static Object dotneato_closest(Object... arg) {
-UNSUPPORTED("6xi9wmswic1fv76qsqa100zrg"); // pointf dotneato_closest(splines * spl, pointf pt)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("7vg6345lno41yawbke5qjffjx"); // int i, j, k, besti, bestj;
-UNSUPPORTED("7tvhpuiv2bp57tuo5a1qrptwi"); // double bestdist2, d2, dlow2, dhigh2; /* squares of distances */
-UNSUPPORTED("52bzzd12n2awux2b59j2jqh8x"); // double low, high, t;
-UNSUPPORTED("1ciwu1ibmcvutr9d4mbq8jjp"); // pointf c[4], pt2;
-UNSUPPORTED("37thdceezsvepe7tlyfatrbcw"); // bezier bz;
-UNSUPPORTED("cv0cmfkdyov0ifz46uknfgwaa"); // besti = bestj = -1;
-UNSUPPORTED("988ajfgcb4de6sx2d5un10g4x"); // bestdist2 = 1e+38;
-UNSUPPORTED("4z4l1zu33m72iirxmuhdg36iw"); // for (i = 0; i < spl->size; i++) {
-UNSUPPORTED("ewoeh3d6otc2rgpaxuzwm38x7"); // bz = spl->list[i];
-UNSUPPORTED("bdak7kaqfdpo7zuzg9fm7b6sw"); // for (j = 0; j < bz.size; j++) {
-UNSUPPORTED("wdh4m8cw4why11o5q87r88zj"); // pointf b;
-UNSUPPORTED("3tf1mdorgslv29e6azr3rzonw"); // b.x = bz.list[j].x;
-UNSUPPORTED("dxmmss8xn49bbq09iskmvgo1a"); // b.y = bz.list[j].y;
-UNSUPPORTED("d0o8y6vs1vm9qcfq5oyn2zmb5"); // d2 = DIST2(b, pt);
-UNSUPPORTED("5x61wak384zfu9waxz4iib38j"); // if ((bestj == -1) || (d2 < bestdist2)) {
-UNSUPPORTED("cmhf0aasa4t5z81xkhjsih2h3"); // besti = i;
-UNSUPPORTED("en6tmpmufawtaviu8s9gbiir5"); // bestj = j;
-UNSUPPORTED("aqecj956cthm5r94jj461cz7"); // bestdist2 = d2;
-UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("4o4fen9osijkuva0tyij06dff"); // bz = spl->list[besti];
-UNSUPPORTED("cylnfbfm0pqu1um785gk5ox0m"); // /* Pick best Bezier. If bestj is the last point in the B-spline, decrement.
-UNSUPPORTED("84b6e5g3wx9iisglwjcp5lno1"); // * Then set j to be the first point in the corresponding Bezier by dividing
-UNSUPPORTED("57jzmu3ed1g4aa00hivvreb3c"); // * then multiplying be 3. Thus, 0,1,2 => 0; 3,4,5 => 3, etc.
-UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */
-UNSUPPORTED("2oqk9suiq102615kp2p6u9pbc"); // if (bestj == bz.size-1)
-UNSUPPORTED("b8unnlnu1bnnhbs85vgllqltd"); // bestj--;
-UNSUPPORTED("34l7vean6sci8jd61jcga5t9j"); // j = 3*(bestj / 3);
-UNSUPPORTED("634ul430au56jfgnuq945ecev"); // for (k = 0; k < 4; k++) {
-UNSUPPORTED("emeum5x5u6s5wlj9pg5e18mge"); // c[k].x = bz.list[j + k].x;
-UNSUPPORTED("6fqdkdgvc0jr8pgud3rpf5blk"); // c[k].y = bz.list[j + k].y;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("13ldc3scyuiddbvqn7xeazovv"); // low = 0.0;
-UNSUPPORTED("5diyw4rai5ul7vmjhf654bvc0"); // high = 1.0;
-UNSUPPORTED("v90htrjkydw3zaf6t3apnl32"); // dlow2 = DIST2(c[0], pt);
-UNSUPPORTED("5fvcsu2wp47fo7crx2ob0h44u"); // dhigh2 = DIST2(c[3], pt);
-UNSUPPORTED("53kc41p479auwcycfsbhw8xix"); // do {
-UNSUPPORTED("14iyya2zn31kcyo2gqfx6u181"); // t = (low + high) / 2.0;
-UNSUPPORTED("5rti9akx01gql0rz4afihqg0q"); // pt2 = Bezier(c, 3, t, (void *)0, (void *)0);
-UNSUPPORTED("1mco76xn6x54y3tzfvzeptejl"); // if (fabs(dlow2 - dhigh2) < 1.0)
-UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break;
-UNSUPPORTED("aaurmb2ppl2kefmdaw9njymyt"); // if (fabs(high - low) < .00001)
-UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break;
+public static ST_pointf dotneato_closest(ST_splines spl, final ST_pointf pt) {
+ENTERING("37hgj44s94wf9bmz16he85pgq","dotneato_closest");
+try {
+ return (ST_pointf) dotneato_closest_ (spl, (ST_pointf) pt.copy()).copy();
+} finally {
+LEAVING("37hgj44s94wf9bmz16he85pgq","dotneato_closest");
+}
+}
+private static ST_pointf dotneato_closest_(ST_splines spl, final ST_pointf pt) {
+ int i, j, k, besti, bestj;
+ double bestdist2, d2, dlow2, dhigh2; /* squares of distances */
+ double low, high, t;
+ // final ST_pointf c[] = new ST_pointf[] {new ST_pointf(),new ST_pointf(),new ST_pointf(),new ST_pointf()};
+ final ST_pointf.Array c = new ST_pointf.Array( 4);
+ final ST_pointf pt2 = new ST_pointf();
+ final ST_bezier bz = new ST_bezier();
+ besti = bestj = -1;
+ bestdist2 = 1e+38;
+ for (i = 0; i < spl.size; i++) {
+ bz.____(spl.list.get(i));
+ for (j = 0; j < bz.size; j++) {
+ final ST_pointf b = new ST_pointf();
+ b.x = bz.list.get(j).x;
+ b.y = bz.list.get(j).y;
+ d2 = DIST2(b, pt);
+ if ((bestj == -1) || (d2 < bestdist2)) {
+ besti = i;
+ bestj = j;
+ bestdist2 = d2;
+ }
+ }
+ }
+ bz.____(spl.list.get(besti));
+ /* Pick best Bezier. If bestj is the last point in the B-spline, decrement.
+ * Then set j to be the first point in the corresponding Bezier by dividing
+ * then multiplying be 3. Thus, 0,1,2 => 0; 3,4,5 => 3, etc.
+ */
+ if (bestj == bz.size-1)
+ bestj--;
+ j = 3*(bestj / 3);
+ for (k = 0; k < 4; k++) {
+ c.plus(k).setDouble("x", bz.list.get(j + k).x);
+ c.plus(k).setDouble("y", bz.list.get(j + k).y);
+ }
+ low = 0.0;
+ high = 1.0;
+ dlow2 = DIST2(c.get(0), pt);
+ dhigh2 = DIST2(c.get(3), pt);
+ do {
+ t = (low + high) / 2.0;
+ pt2.___(Bezier(c, 3, t, null, null));
+ if (fabs(dlow2 - dhigh2) < 1.0)
+ break;
+ if (fabs(high - low) < .00001)
+ break;
UNSUPPORTED("6apa9aoby9j8a0eanbfhy5mn2"); // if (dlow2 < dhigh2) {
UNSUPPORTED("6jttyuryfaxa193mme86dqf58"); // high = t;
UNSUPPORTED("6avwplrum9i9qi3g9wl6yvz04"); // dhigh2 = DIST2(pt2, pt);
@@ -1327,11 +1317,8 @@ UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
UNSUPPORTED("556vs5i22602clhs1p3htz7vk"); // low = t;
UNSUPPORTED("507tgq81szei2ge3miiak4b1v"); // dlow2 = DIST2(pt2, pt);
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("bisaeb1i484iutawysrspjmfw"); // } while (1);
-UNSUPPORTED("9v7upfp8kp93skdlnpaz055xv"); // return pt2;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ } while (true);
+ return pt2;
}
@@ -1450,10 +1437,10 @@ throw new UnsupportedOperationException();
//3 cr81drt18h5feqzxyh3jb0u49
// void common_init_node(node_t * n)
-public static void common_init_node(Agnode_s n) {
+public static void common_init_node(ST_Agnode_s n) {
ENTERING("cr81drt18h5feqzxyh3jb0u49","common_init_node");
try {
- fontinfo fi = (fontinfo) Memory.malloc(fontinfo.class);
+ ST_fontinfo fi = new ST_fontinfo();
CString str;
ND_width(n,
late_double(n, Z.z().N_width, 0.75, 0.01));
@@ -1467,14 +1454,14 @@ try {
fi.setPtr("fontcolor", late_nnstring(n, Z.z().N_fontcolor, new CString("black")));
ND_label(n, make_label(n, str,
((aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)) | ( (shapeOf(n) == enumAsInt(shape_kind.class, "SH_RECORD")) ? (2 << 1) : (0 << 1))),
- fi.getDouble("fontsize"), fi.getCString("fontname"), fi.getCString("fontcolor")));
+ fi.fontsize, fi.fontname, fi.fontcolor));
if (Z.z().N_xlabel!=null && (str = agxget(n, Z.z().N_xlabel))!=null && (str.charAt(0)!='\0')) {
UNSUPPORTED("4ua9vld76wpovsm1celv2ff6e"); // ND_xlabel(n) = make_label((void*)n, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)),
UNSUPPORTED("b0zm6fkpjlt9jacykbgugjodg"); // fi.fontsize, fi.fontname, fi.fontcolor);
UNSUPPORTED("ail0d4qmxj2aqh2q721inwgqu"); // GD_has_labels(agraphof(n)) |= (1 << 4);
}
ND_showboxes(n, late_int(n, Z.z().N_showboxes, 0, 0));
- ND_shape(n).getPtr("fns").call("initfn", n);
+ ND_shape(n).fns.initfn.exe(n);
} finally {
LEAVING("cr81drt18h5feqzxyh3jb0u49","common_init_node");
}
@@ -1485,7 +1472,7 @@ LEAVING("cr81drt18h5feqzxyh3jb0u49","common_init_node");
//3 d2v8l80y27ue2fag5c0qplah8
// static void initFontEdgeAttr(edge_t * e, struct fontinfo *fi)
-public static void initFontEdgeAttr(Agedge_s e, fontinfo fi) {
+public static void initFontEdgeAttr(ST_Agedge_s e, ST_fontinfo fi) {
ENTERING("d2v8l80y27ue2fag5c0qplah8","initFontEdgeAttr");
try {
fi.setDouble("fontsize", late_double(e, Z.z().E_fontsize, 14.0, 1.0));
@@ -1501,13 +1488,13 @@ LEAVING("d2v8l80y27ue2fag5c0qplah8","initFontEdgeAttr");
//3 ak3pxrdrq900wymudwnjmbito
// static void initFontLabelEdgeAttr(edge_t * e, struct fontinfo *fi, struct fontinfo *lfi)
-public static void initFontLabelEdgeAttr(Agedge_s e, fontinfo fi, fontinfo lfi) {
+public static void initFontLabelEdgeAttr(ST_Agedge_s e, ST_fontinfo fi, ST_fontinfo lfi) {
ENTERING("ak3pxrdrq900wymudwnjmbito","initFontLabelEdgeAttr");
try {
- if (N(fi.getPtr("fontname"))) initFontEdgeAttr(e, fi);
- lfi.setDouble("fontsize", late_double(e, Z.z().E_labelfontsize, fi.getDouble("fontsize"), 1.0));
- lfi.setPtr("fontname", late_nnstring(e, Z.z().E_labelfontname, fi.getCString("fontname")));
- lfi.setPtr("fontcolor", late_nnstring(e, Z.z().E_labelfontcolor, fi.getCString("fontcolor")));
+ if (N(fi.fontname)) initFontEdgeAttr(e, fi);
+ lfi.setDouble("fontsize", late_double(e, Z.z().E_labelfontsize, fi.fontsize, 1.0));
+ lfi.setPtr("fontname", late_nnstring(e, Z.z().E_labelfontname, fi.fontname));
+ lfi.setPtr("fontcolor", late_nnstring(e, Z.z().E_labelfontcolor, fi.fontcolor));
} finally {
LEAVING("ak3pxrdrq900wymudwnjmbito","initFontLabelEdgeAttr");
}
@@ -1518,7 +1505,7 @@ LEAVING("ak3pxrdrq900wymudwnjmbito","initFontLabelEdgeAttr");
//3 bgnk1zwht9rwx6thmly98iofb
// static boolean noClip(edge_t *e, attrsym_t* sym)
-public static boolean noClip(Agedge_s e, Agsym_s sym) {
+public static boolean noClip(ST_Agedge_s e, ST_Agsym_s sym) {
ENTERING("bgnk1zwht9rwx6thmly98iofb","noClip");
try {
CString str;
@@ -1539,11 +1526,11 @@ LEAVING("bgnk1zwht9rwx6thmly98iofb","noClip");
//3 9vnr1bc7p533acazoxbhbfmx3
// static port chkPort (port (*pf)(node_t*, char*, char*), node_t* n, char* s)
-public static ST_port chkPort(CFunction pf, Agnode_s n, CString s) {
+public static ST_port chkPort(CFunction pf, ST_Agnode_s n, CString s) {
// WARNING!! STRUCT
return chkPort_w_(pf, n, s).copy();
}
-private static ST_port chkPort_w_(CFunction pf, Agnode_s n, CString s) {
+private static ST_port chkPort_w_(CFunction pf, ST_Agnode_s n, CString s) {
ENTERING("9vnr1bc7p533acazoxbhbfmx3","chkPort");
try {
final ST_port pt = new ST_port();
@@ -1557,7 +1544,7 @@ UNSUPPORTED("971i954brvgqb35cftazlqhon"); // *cp = ':';
UNSUPPORTED("2o9oidtrr5gspl1dh6vnz7mlz"); // pt.name = cp+1;
}
else
- pt.___((__struct__<port>) pf.exe(n, s, null));
+ pt.___((ST_port) pf.exe(n, s, null));
pt.name = s;
return pt;
} finally {
@@ -1570,21 +1557,21 @@ LEAVING("9vnr1bc7p533acazoxbhbfmx3","chkPort");
//3 3aqh64lxwv4da2snfe7fvr45b
// int common_init_edge(edge_t * e)
-public static int common_init_edge(Agedge_s e) {
+public static int common_init_edge(ST_Agedge_s e) {
ENTERING("3aqh64lxwv4da2snfe7fvr45b","common_init_edge");
try {
CString str;
int r = 0;
- final __struct__<fontinfo> fi = JUtils.from(fontinfo.class);
- final __struct__<fontinfo> lfi = JUtils.from(fontinfo.class);
- Agraph_s sg = agraphof(agtail(e));
+ final ST_fontinfo fi = new ST_fontinfo();
+ final ST_fontinfo lfi = new ST_fontinfo();
+ ST_Agraph_s sg = agraphof(agtail(e));
fi.setPtr("fontname", null);
lfi.setPtr("fontname", null);
if (Z.z().E_label!=null && (str = agxget(e, Z.z().E_label))!=null && (str.charAt(0)!='\0')) {
r = 1;
- initFontEdgeAttr(e, fi.amp());
+ initFontEdgeAttr(e, fi);
ED_label(e, make_label(e, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)),
- fi.getDouble("fontsize"), fi.getCString("fontname"), fi.getCString("fontcolor")));
+ fi.fontsize, fi.fontname, fi.fontcolor));
GD_has_labels(sg, GD_has_labels(sg) | (1 << 0));
ED_label_ontop(e,
mapbool(late_string(e, Z.z().E_label_float, new CString("false"))));
@@ -1598,17 +1585,16 @@ UNSUPPORTED("c078bypfszv0nsvp1nc0x28wx"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))
}
/* vladimir */
if (Z.z().E_headlabel!=null && (str = agxget(e, Z.z().E_headlabel))!=null && (str.charAt(0)!='\0')) {
- initFontLabelEdgeAttr(e, fi.amp(), lfi.amp());
+ initFontLabelEdgeAttr(e, fi, lfi);
ED_head_label(e, make_label(e, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)),
- lfi.getDouble("fontsize"), lfi.getCString("fontname"), lfi.getCString("fontcolor")));
+ lfi.fontsize, lfi.fontname, lfi.fontcolor));
GD_has_labels(sg, GD_has_labels(sg) | (1 << 1));
}
if (Z.z().E_taillabel!=null && (str = agxget(e, Z.z().E_taillabel))!=null && (str.charAt(0)!='\0')) {
-UNSUPPORTED("6y6e1y496y6j6a6065nfesr8o"); // if (!lfi.fontname)
-UNSUPPORTED("4w2bicw8rsgyy40x0vhyzzlnm"); // initFontLabelEdgeAttr(e, &fi, &lfi);
-UNSUPPORTED("ans0pi92t6ou5mworb3ohiqj3"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->tail_label) = make_label((void*)e, str, (aghtmlstr(str) ? (1 << 1) : (0 << 1)),
-UNSUPPORTED("eu3ztkfva2x87y72tnu7vv4re"); // lfi.fontsize, lfi.fontname, lfi.fontcolor);
-UNSUPPORTED("50hobbhvpqr6dj302waqr59mu"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))->data))->has_labels) |= (1 << 2);
+ initFontLabelEdgeAttr(e, fi, lfi);
+ ED_tail_label(e, make_label(e, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)),
+ lfi.fontsize, lfi.fontname, lfi.fontcolor));
+ GD_has_labels(sg, GD_has_labels(sg) | (1 << 2));
}
/* end vladimir */
/* We still accept ports beginning with colons but this is deprecated
@@ -1621,7 +1607,7 @@ UNSUPPORTED("50hobbhvpqr6dj302waqr59mu"); // (((Agraphinfo_t*)(((Agobj_t*)(sg))
if (str!=null && str.charAt(0)!='\0')
UNSUPPORTED("j71lo2acx1ydov0uj7xjjce"); // (((Agnodeinfo_t*)(((Agobj_t*)(((((((Agobj_t*)(e))->tag).objtype) == 3?(e):((e)+1))->node)))->data))->has_port) = (!(0));
- ED_tail_port(e, chkPort ((CFunction) ND_shape(agtail(e)).getPtr("fns").getPtr("portfn"), agtail(e), str));
+ ED_tail_port(e, chkPort ((CFunction) ND_shape(agtail(e)).fns.portfn, agtail(e), str));
if (noClip(e, Z.z().E_tailclip))
UNSUPPORTED("cg4z67u0dm6h9nrcx8kkalnlt"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->tail_port).clip = 0;
str = agget(e, new CString("headport"));
@@ -1630,7 +1616,7 @@ UNSUPPORTED("cg4z67u0dm6h9nrcx8kkalnlt"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))-
if (str!=null && str.charAt(0)!='\0')
UNSUPPORTED("542y57dbsosmjvsmdnzon2qb5"); // (((Agnodeinfo_t*)(((Agobj_t*)(((((((Agobj_t*)(e))->tag).objtype) == 2?(e):((e)-1))->node)))->data))->has_port) = (!(0));
- ED_head_port(e, chkPort((CFunction) ND_shape(aghead(e)).getPtr("fns").getPtr("portfn"), aghead(e), str));
+ ED_head_port(e, chkPort((CFunction) ND_shape(aghead(e)).fns.portfn, aghead(e), str));
if (noClip(e, Z.z().E_headclip))
UNSUPPORTED("ayqscz30ekhcje94wh4ib1hcu"); // (((Agedgeinfo_t*)(((Agobj_t*)(e))->data))->head_port).clip = 0;
@@ -1645,33 +1631,33 @@ LEAVING("3aqh64lxwv4da2snfe7fvr45b","common_init_edge");
//3 3mkqvtbyq9j8ktzil6t7vakg5
// static boxf addLabelBB(boxf bb, textlabel_t * lp, boolean flipxy)
-public static __struct__<boxf> addLabelBB(final ST_boxf bb, textlabel_t lp, boolean flipxy) {
+public static ST_boxf addLabelBB(final ST_boxf bb, ST_textlabel_t lp, boolean flipxy) {
// WARNING!! STRUCT
return addLabelBB_w_(bb.copy(), lp, flipxy).copy();
}
-private static __struct__<boxf> addLabelBB_w_(final ST_boxf bb, textlabel_t lp, boolean flipxy) {
+private static ST_boxf addLabelBB_w_(final ST_boxf bb, ST_textlabel_t lp, boolean flipxy) {
ENTERING("3mkqvtbyq9j8ktzil6t7vakg5","addLabelBB");
try {
double width, height;
- final __struct__<pointf> p = JUtils.from(pointf.class);
- p.___(lp.getStruct("pos"));
+ final ST_pointf p = new ST_pointf();
+ p.___(lp.pos);
double min, max;
if (flipxy) {
- height = lp.getStruct("dimen").getDouble("x");
- width = lp.getStruct("dimen").getDouble("y");
+ height = lp.dimen.x;
+ width = lp.dimen.y;
}
else {
- width = lp.getStruct("dimen").getDouble("x");
- height = lp.getStruct("dimen").getDouble("y");
+ width = lp.dimen.x;
+ height = lp.dimen.y;
}
- min = p.getDouble("x") - width / 2.;
- max = p.getDouble("x") + width / 2.;
+ min = p.x - width / 2.;
+ max = p.x + width / 2.;
if (min < bb.LL.x)
bb.LL.x = min;
if (max > bb.UR.x)
bb.UR.x = max;
- min = p.getDouble("y") - height / 2.;
- max = p.getDouble("y") + height / 2.;
+ min = p.y - height / 2.;
+ max = p.y + height / 2.;
if (min < bb.LL.y)
bb.LL.y = min;
if (max > bb.UR.y)
@@ -1713,7 +1699,7 @@ throw new UnsupportedOperationException();
//3 bz7kjecium6a7xa39qfobwwnc
// void updateBB(graph_t * g, textlabel_t * lp)
-public static void updateBB(Agraph_s g, textlabel_t lp) {
+public static void updateBB(ST_Agraph_s g, ST_textlabel_t lp) {
ENTERING("bz7kjecium6a7xa39qfobwwnc","updateBB");
try {
GD_bb(g).___(addLabelBB(GD_bb(g), lp, GD_flip(g)!=0));
@@ -2355,7 +2341,7 @@ throw new UnsupportedOperationException();
//3 9yungx7uxqkmzfh2ub6gs9l48
// char* htmlEntityUTF8 (char* s, graph_t* g)
-public static CString htmlEntityUTF8(CString s, Agraph_s g) {
+public static CString htmlEntityUTF8(CString s, ST_Agraph_s g) {
ENTERING("9yungx7uxqkmzfh2ub6gs9l48","htmlEntityUTF8");
try {
LOG2("htmlEntityUTF8 "+s);
@@ -2736,7 +2722,7 @@ LEAVING("ckavkcnz5rcrqs17lleds1uxu","edgeType");
//3 13cpqbf2ztcjdfz4a6v7nv00u
// void setEdgeType (graph_t* g, int dflt)
-public static void setEdgeType(Agraph_s g, int dflt) {
+public static void setEdgeType(ST_Agraph_s g, int dflt) {
ENTERING("13cpqbf2ztcjdfz4a6v7nv00u","setEdgeType");
try {
CString s = agget(g, new CString("splines"));
@@ -2934,7 +2920,7 @@ throw new UnsupportedOperationException();
//3 80q488y0eqojtsm7osnfydmo5
// void gv_nodesize(node_t * n, boolean flip)
-public static void gv_nodesize(Agnode_s n, int flip) {
+public static void gv_nodesize(ST_Agnode_s n, int flip) {
ENTERING("80q488y0eqojtsm7osnfydmo5","gv_nodesize");
try {
double w;
diff --git a/src/gen/lib/dotgen/acyclic__c.java b/src/gen/lib/dotgen/acyclic__c.java
index a661a10..1271f4c 100644
--- a/src/gen/lib/dotgen/acyclic__c.java
+++ b/src/gen/lib/dotgen/acyclic__c.java
@@ -59,13 +59,10 @@ import static smetana.core.Macro.ND_next;
import static smetana.core.Macro.ND_onstack;
import static smetana.core.Macro.ND_out;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_pointf;
public class acyclic__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -325,14 +322,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -361,25 +358,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -403,16 +381,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -709,10 +687,10 @@ throw new UnsupportedOperationException();
//3 9hm902ya6q6bq246ewuh67h38
// void reverse_edge(edge_t * e)
-public static void reverse_edge(Agedge_s e) {
+public static void reverse_edge(ST_Agedge_s e) {
ENTERING("9hm902ya6q6bq246ewuh67h38","reverse_edge");
try {
- Agedge_s f;
+ ST_Agedge_s f;
delete_fast_edge(e);
if ((f = find_fast_edge(aghead(e), agtail(e)))!=null)
merge_oneway(e, f);
@@ -728,17 +706,17 @@ LEAVING("9hm902ya6q6bq246ewuh67h38","reverse_edge");
//3 e9h7n52fs8rucrug9tr0zebe2
// static void dfs(node_t * n)
-public static void dfs(Agnode_s n) {
+public static void dfs(ST_Agnode_s n) {
ENTERING("e9h7n52fs8rucrug9tr0zebe2","dfs");
try {
int i;
- Agedge_s e;
- Agnode_s w;
+ ST_Agedge_s e;
+ ST_Agnode_s w;
if (ND_mark(n)!=0)
return;
ND_mark(n, 1);
ND_onstack(n, 1);
- for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
w = aghead(e);
if (ND_onstack(w)) {
reverse_edge(e);
@@ -759,11 +737,11 @@ LEAVING("e9h7n52fs8rucrug9tr0zebe2","dfs");
//3 1ejgnwd7ek344caegjwg46n6h
// void acyclic(graph_t * g)
-public static void acyclic_(Agraph_s g) {
+public static void acyclic_(ST_Agraph_s g) {
ENTERING("1ejgnwd7ek344caegjwg46n6h","acyclic");
try {
int c;
- Agnode_s n;
+ ST_Agnode_s n;
for (c = 0; c < GD_comp(g).size; c++) {
GD_nlist(g, GD_comp(g).getFromList(c));
for (n = GD_nlist(g); n!=null; n = ND_next(n))
diff --git a/src/gen/lib/dotgen/aspect__c.java b/src/gen/lib/dotgen/aspect__c.java
index cf6b5e4..5eeca97 100644
--- a/src/gen/lib/dotgen/aspect__c.java
+++ b/src/gen/lib/dotgen/aspect__c.java
@@ -49,13 +49,10 @@ import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h.aspect_t;
-import h.boxf;
-import h.pointf;
+import h.ST_Agraph_s;
+import h.ST_aspect_t;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
public class aspect__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -315,14 +312,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -351,25 +348,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -393,16 +371,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -1234,7 +1212,7 @@ throw new UnsupportedOperationException();
//3 5srsfxqlego6qiyj5mm8m4ql2
// aspect_t* setAspect (Agraph_t * g, aspect_t* adata)
-public static aspect_t setAspect(Agraph_s g, aspect_t adata) {
+public static ST_aspect_t setAspect(ST_Agraph_s g, ST_aspect_t adata) {
ENTERING("5srsfxqlego6qiyj5mm8m4ql2","setAspect");
try {
double rv;
diff --git a/src/gen/lib/dotgen/class1__c.java b/src/gen/lib/dotgen/class1__c.java
index fad352f..8f61976 100644
--- a/src/gen/lib/dotgen/class1__c.java
+++ b/src/gen/lib/dotgen/class1__c.java
@@ -71,15 +71,12 @@ import static smetana.core.Macro.ND_clust;
import static smetana.core.Macro.ND_node_type;
import static smetana.core.Macro.ND_rank;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.pointf;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Z;
-import smetana.core.__struct__;
public class class1__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -339,14 +336,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -375,25 +372,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -417,16 +395,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -723,7 +701,7 @@ throw new UnsupportedOperationException();
//3 2luyof8ca7ewf9r08z3os3lk7
// int nonconstraint_edge(edge_t * e)
-public static boolean nonconstraint_edge(Agedge_s e) {
+public static boolean nonconstraint_edge(ST_Agedge_s e) {
ENTERING("2luyof8ca7ewf9r08z3os3lk7","nonconstraint_edge");
try {
CString constr;
@@ -742,12 +720,12 @@ LEAVING("2luyof8ca7ewf9r08z3os3lk7","nonconstraint_edge");
//3 dpimuv55sylui7jx8fh3ic1qc
// static void interclust1(graph_t * g, node_t * t, node_t * h, edge_t * e)
-public static void interclust1(Agraph_s g, Agnode_s t, Agnode_s h, Agedge_s e) {
+public static void interclust1(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, ST_Agedge_s e) {
ENTERING("dpimuv55sylui7jx8fh3ic1qc","interclust1");
try {
- Agnode_s v, t0, h0;
+ ST_Agnode_s v, t0, h0;
int offset, t_len, h_len, t_rank, h_rank;
- Agedge_s rt, rh;
+ ST_Agedge_s rt, rh;
if (ND_clust(agtail(e))!=null)
t_rank = ND_rank(agtail(e)) - ND_rank(GD_leader(ND_clust(agtail(e))));
else
@@ -782,11 +760,11 @@ LEAVING("dpimuv55sylui7jx8fh3ic1qc","interclust1");
//3 acy5ct6402jgf0ga5oeeskx5m
// void class1(graph_t * g)
-public static void class1_(Agraph_s g) {
+public static void class1_(ST_Agraph_s g) {
ENTERING("acy5ct6402jgf0ga5oeeskx5m","class1");
try {
- Agnode_s n, t, h;
- Agedge_s e, rep;
+ ST_Agnode_s n, t, h;
+ ST_Agedge_s e, rep;
mark_clusters(g);
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) {
diff --git a/src/gen/lib/dotgen/class2__c.java b/src/gen/lib/dotgen/class2__c.java
index 843107d..daf2526 100644
--- a/src/gen/lib/dotgen/class2__c.java
+++ b/src/gen/lib/dotgen/class2__c.java
@@ -69,7 +69,6 @@ import static smetana.core.JUtils.EQ;
import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
-import static smetana.core.Macro.ALLOC_empty;
import static smetana.core.Macro.ED_conc_opp_flag;
import static smetana.core.Macro.ED_count;
import static smetana.core.Macro.ED_edge_type;
@@ -99,14 +98,11 @@ import static smetana.core.Macro.ND_rw;
import static smetana.core.Macro.ND_weight_class;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_pointf;
import smetana.core.Z;
-import smetana.core.__struct__;
public class class2__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -366,14 +362,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -402,27 +398,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
-
//3 1n5xl70wxuabyf97mclvilsm6
@@ -444,16 +419,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -750,22 +725,22 @@ throw new UnsupportedOperationException();
//3 2zn7c6ulmwwzaibdxo127jf04
// static node_t* label_vnode(graph_t * g, edge_t * orig)
-public static Agnode_s label_vnode(Agraph_s g, Agedge_s orig) {
+public static ST_Agnode_s label_vnode(ST_Agraph_s g, ST_Agedge_s orig) {
ENTERING("2zn7c6ulmwwzaibdxo127jf04","label_vnode");
try {
- Agnode_s v;
- final __struct__<pointf> dimen = JUtils.from(pointf.class);
- dimen.___(ED_label(orig).getStruct("dimen"));
+ ST_Agnode_s v;
+ final ST_pointf dimen = new ST_pointf();
+ dimen.___(ED_label(orig).dimen);
v = virtual_node(g);
ND_label(v, ED_label(orig));
ND_lw(v, GD_nodesep(agroot(v)));
if (N(ED_label_ontop(orig))) {
if (GD_flip(agroot(g))!=0) {
- ND_ht(v, dimen.getDouble("x"));
- ND_rw(v, dimen.getDouble("y"));
+ ND_ht(v, dimen.x);
+ ND_rw(v, dimen.y);
} else {
- ND_ht(v, dimen.getDouble("y"));
- ND_rw(v, dimen.getDouble("x"));
+ ND_ht(v, dimen.y);
+ ND_rw(v, dimen.x);
}
}
return v;
@@ -779,7 +754,7 @@ LEAVING("2zn7c6ulmwwzaibdxo127jf04","label_vnode");
//3 49tji49jdm9uges7v8lf2j2rn
// static void incr_width(graph_t * g, node_t * v)
-public static void incr_width(Agraph_s g, Agnode_s v) {
+public static void incr_width(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("49tji49jdm9uges7v8lf2j2rn","incr_width");
try {
int width = GD_nodesep(g) / 2;
@@ -795,10 +770,10 @@ LEAVING("49tji49jdm9uges7v8lf2j2rn","incr_width");
//3 xujihq6vep3ez275shtrbilo
// static node_t* plain_vnode(graph_t * g, edge_t * orig)
-public static Agnode_s plain_vnode(Agraph_s g, Agedge_s orig) {
+public static ST_Agnode_s plain_vnode(ST_Agraph_s g, ST_Agedge_s orig) {
ENTERING("xujihq6vep3ez275shtrbilo","plain_vnode");
try {
- Agnode_s v;
+ ST_Agnode_s v;
orig = orig;
v = virtual_node(g);
incr_width(g, v);
@@ -813,17 +788,17 @@ LEAVING("xujihq6vep3ez275shtrbilo","plain_vnode");
//3 9fmfj1b2jik7skv6ms0657t8r
// static node_t* leader_of(graph_t * g, node_t * v)
-public static Agnode_s leader_of(Agraph_s g, Agnode_s v) {
+public static ST_Agnode_s leader_of(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("9fmfj1b2jik7skv6ms0657t8r","leader_of");
try {
- Agraph_s clust;
- Agnode_s rv;
+ ST_Agraph_s clust;
+ ST_Agnode_s rv;
if (ND_ranktype(v) != 7) {
/*assert(v == UF_find(v)); could be leaf, so comment out */
rv = UF_find(v);
} else {
clust = ND_clust(v);
- rv = (Agnode_s) GD_rankleader(clust).plus(ND_rank(v)).getPtr();
+ rv = (ST_Agnode_s) GD_rankleader(clust).plus(ND_rank(v)).getPtr();
}
return rv;
} finally {
@@ -836,12 +811,12 @@ LEAVING("9fmfj1b2jik7skv6ms0657t8r","leader_of");
//3 6sbvlvurvkodunw2qt1ug70c2
// static void make_chain(graph_t * g, node_t * from, node_t * to, edge_t * orig)
-public static void make_chain(Agraph_s g, Agnode_s from, Agnode_s to, Agedge_s orig) {
+public static void make_chain(ST_Agraph_s g, ST_Agnode_s from, ST_Agnode_s to, ST_Agedge_s orig) {
ENTERING("6sbvlvurvkodunw2qt1ug70c2","make_chain");
try {
int r, label_rank;
- Agnode_s u, v=null;
- Agedge_s e;
+ ST_Agnode_s u, v=null;
+ ST_Agedge_s e;
u = from;
if (ED_label(orig)!=null)
label_rank = (ND_rank(from) + ND_rank(to)) / 2;
@@ -872,15 +847,15 @@ LEAVING("6sbvlvurvkodunw2qt1ug70c2","make_chain");
//3 659ld5tcseo3l0hopxb3pf0vv
// static void interclrep(graph_t * g, edge_t * e)
-public static void interclrep(Agraph_s g, Agedge_s e) {
+public static void interclrep(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("659ld5tcseo3l0hopxb3pf0vv","interclrep");
try {
- Agnode_s t, h;
- Agedge_s ve;
+ ST_Agnode_s t, h;
+ ST_Agedge_s ve;
t = leader_of(g, agtail(e));
h = leader_of(g, aghead(e));
if (ND_rank(t) > ND_rank(h)) {
- Agnode_s t0 = t;
+ ST_Agnode_s t0 = t;
t = h;
h = t0;
}
@@ -894,7 +869,7 @@ try {
make_chain(g, t, h, e);
/* mark as cluster edge */
for (ve = ED_to_virt(e); ve!=null && (ND_rank(aghead(ve)) <= ND_rank(h));
- ve = (Agedge_s) ND_out(aghead(ve)).getFromList(0))
+ ve = (ST_Agedge_s) ND_out(aghead(ve)).getFromList(0))
ED_edge_type(ve, 5);
}
/* else ignore intra-cluster edges at this point */
@@ -908,7 +883,7 @@ LEAVING("659ld5tcseo3l0hopxb3pf0vv","interclrep");
//3 c0cx00ki1i1kx0bp84e7xjg8d
// static int is_cluster_edge(edge_t * e)
-public static boolean is_cluster_edge(Agedge_s e) {
+public static boolean is_cluster_edge(ST_Agedge_s e) {
ENTERING("c0cx00ki1i1kx0bp84e7xjg8d","is_cluster_edge");
try {
return ((ND_ranktype(agtail(e)) == 7)
@@ -923,10 +898,10 @@ LEAVING("c0cx00ki1i1kx0bp84e7xjg8d","is_cluster_edge");
//3 c45973dtaighb3u0auuekcs1y
// void merge_chain(graph_t * g, edge_t * e, edge_t * f, int flag)
-public static void merge_chain(Agraph_s g, Agedge_s e, Agedge_s f, boolean flag) {
+public static void merge_chain(ST_Agraph_s g, ST_Agedge_s e, ST_Agedge_s f, boolean flag) {
ENTERING("c45973dtaighb3u0auuekcs1y","merge_chain");
try {
- Agedge_s rep;
+ ST_Agedge_s rep;
int lastrank = MAX(ND_rank(agtail(e)), ND_rank(aghead(e)));
//assert(ED_to_virt(e) == NULL);
ED_to_virt(e, f);
@@ -940,7 +915,7 @@ try {
if (ND_rank(aghead(rep)) == lastrank)
break;
incr_width(g, aghead(rep));
- rep = (Agedge_s) ND_out(aghead(rep)).getFromList(0);
+ rep = (ST_Agedge_s) ND_out(aghead(rep)).getFromList(0);
} while (rep!=null);
} finally {
LEAVING("c45973dtaighb3u0auuekcs1y","merge_chain");
@@ -952,7 +927,7 @@ LEAVING("c45973dtaighb3u0auuekcs1y","merge_chain");
//3 bg5r9wlego0d8pv0hr96zt45c
// int mergeable(edge_t * e, edge_t * f)
-public static boolean mergeable(Agedge_s e, Agedge_s f) {
+public static boolean mergeable(ST_Agedge_s e, ST_Agedge_s f) {
ENTERING("bg5r9wlego0d8pv0hr96zt45c","mergeable");
try {
if (e!=null && f!=null && EQ(agtail(e), agtail(f)) && EQ(aghead(e), aghead(f)) &&
@@ -969,17 +944,17 @@ LEAVING("bg5r9wlego0d8pv0hr96zt45c","mergeable");
//3 d0bxlkysxucmww7t74u9krrgz
// void class2(graph_t * g)
-public static void class2(Agraph_s g) {
+public static void class2(ST_Agraph_s g) {
ENTERING("d0bxlkysxucmww7t74u9krrgz","class2");
try {
int c;
- Agnode_s n, t, h;
- Agedge_s e, prev, opp;
+ ST_Agnode_s n, t, h;
+ ST_Agedge_s e, prev, opp;
GD_nlist(g, null);
GD_n_nodes(g, 0); /* new */
mark_clusters(g);
for (c = 1; c <= GD_n_cluster(g); c++)
- build_skeleton(g, (Agraph_s) GD_clust(g).plus(c).getPtr());
+ build_skeleton(g, (ST_Agraph_s) GD_clust(g).get(c).getPtr());
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n))
for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) {
if (ND_weight_class(aghead(e)) <= 2)
@@ -1088,7 +1063,7 @@ try {
}
/* since decompose() is not called on subgraphs */
if (NEQ(g, dot_root(g))) {
- GD_comp(g).reallocEmpty(1, Agnode_s.class);
+ GD_comp(g).reallocEmpty(1);
GD_comp(g).setInList(0, GD_nlist(g));
}
} finally {
diff --git a/src/gen/lib/dotgen/cluster__c.java b/src/gen/lib/dotgen/cluster__c.java
index 9befefa..a093d71 100644
--- a/src/gen/lib/dotgen/cluster__c.java
+++ b/src/gen/lib/dotgen/cluster__c.java
@@ -54,7 +54,6 @@ import static gen.lib.cgraph.node__c.agfstnode;
import static gen.lib.cgraph.node__c.agnxtnode;
import static gen.lib.cgraph.obj__c.agcontains;
import static gen.lib.cgraph.obj__c.agroot;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.utils__c.UF_setname;
import static gen.lib.common.utils__c.UF_singleton;
import static gen.lib.dotgen.class2__c.class2;
@@ -77,7 +76,6 @@ import static gen.lib.dotgen.mincross__c.install_in_rank;
import static gen.lib.dotgen.position__c.ports_eq;
import static smetana.core.JUtils.EQ;
import static smetana.core.JUtils.NEQ;
-import static smetana.core.JUtils.sizeof_starstar_empty;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGMKOUT;
@@ -109,15 +107,12 @@ import static smetana.core.Macro.ND_ranktype;
import static smetana.core.Macro.ND_rw;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.nodequeue;
-import h.pointf;
-import smetana.core.JUtils;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_nodequeue;
+import h.ST_pointf;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class cluster__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -377,14 +372,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -413,26 +408,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -455,16 +430,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -761,14 +736,14 @@ throw new UnsupportedOperationException();
//3 8bd317q0mykfu6wpr3e4cxmh2
// static node_t* map_interclust_node(node_t * n)
-public static Agnode_s map_interclust_node(Agnode_s n) {
+public static ST_Agnode_s map_interclust_node(ST_Agnode_s n) {
ENTERING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node");
try {
- Agnode_s rv;
+ ST_Agnode_s rv;
if ((ND_clust(n) == null) || ( GD_expanded(ND_clust(n))) )
rv = n;
else
- rv = (Agnode_s) GD_rankleader(ND_clust(n)).plus(ND_rank(n)).getPtr();
+ rv = (ST_Agnode_s) GD_rankleader(ND_clust(n)).plus(ND_rank(n)).getPtr();
return rv;
} finally {
LEAVING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node");
@@ -780,32 +755,32 @@ LEAVING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node");
//3 5ib4nnt2ah5fdd22zs0xds29r
// static void make_slots(graph_t * root, int r, int pos, int d)
-public static void make_slots(Agraph_s root, int r, int pos, int d) {
+public static void make_slots(ST_Agraph_s root, int r, int pos, int d) {
ENTERING("5ib4nnt2ah5fdd22zs0xds29r","make_slots");
try {
int i;
- Agnode_s v;
- __ptr__ vlist;
- vlist = GD_rank(root).plus(r).getPtr().getArrayOfPtr("v").asPtr();
+ ST_Agnode_s v;
+ ST_Agnode_s.ArrayOfStar vlist;
+ vlist = GD_rank(root).get(r).v;
if (d <= 0) {
- for (i = pos - d + 1; i < GD_rank(root).plus(r).getInt("n"); i++) {
- v = (Agnode_s) vlist.plus(i).getPtr();
+ for (i = pos - d + 1; i < GD_rank(root).get(r).n; i++) {
+ v = (ST_Agnode_s) vlist.get(i);
ND_order(v, i + d - 1);
vlist.plus(ND_order(v)).setPtr(v);
}
- for (i = GD_rank(root).plus(r).getInt("n") + d - 1; i < GD_rank(root).plus(r).getInt("n"); i++)
+ for (i = GD_rank(root).get(r).n + d - 1; i < GD_rank(root).get(r).n; i++)
vlist.plus(i).setPtr(null);
} else {
/*assert(ND_rank(root)[r].n + d - 1 <= ND_rank(root)[r].an);*/
- for (i = GD_rank(root).plus(r).getPtr().getInt("n") - 1; i > pos; i--) {
- v = (Agnode_s) vlist.plus(i).getPtr();
+ for (i = GD_rank(root).get(r).n - 1; i > pos; i--) {
+ v = (ST_Agnode_s) vlist.get(i);
ND_order(v, i + d - 1);
vlist.plus(ND_order(v)).setPtr(v);
}
for (i = pos + 1; i < pos + d; i++)
vlist.plus(i).setPtr(null);
}
- GD_rank(root).plus(r).getPtr().setInt("n", GD_rank(root).plus(r).getPtr().getInt("n") + d - 1);
+ GD_rank(root).get(r).setInt("n", GD_rank(root).get(r).n + d - 1);
} finally {
LEAVING("5ib4nnt2ah5fdd22zs0xds29r","make_slots");
}
@@ -816,10 +791,10 @@ LEAVING("5ib4nnt2ah5fdd22zs0xds29r","make_slots");
//3 d4mwxesl56uh9dyttg9cjlq70
// static node_t* clone_vn(graph_t * g, node_t * vn)
-public static Agnode_s clone_vn(Agraph_s g, Agnode_s vn) {
+public static ST_Agnode_s clone_vn(ST_Agraph_s g, ST_Agnode_s vn) {
ENTERING("d4mwxesl56uh9dyttg9cjlq70","clone_vn");
try {
- Agnode_s rv;
+ ST_Agnode_s rv;
int r;
r = ND_rank(vn);
make_slots(g, r, ND_order(vn), 2);
@@ -842,12 +817,12 @@ LEAVING("d4mwxesl56uh9dyttg9cjlq70","clone_vn");
//3 6o86r59v2ujlxqcw7761y6o5b
// static void map_path(node_t * from, node_t * to, edge_t * orig, edge_t * ve, int type)
-public static void map_path(Agnode_s from, Agnode_s to, Agedge_s orig, Agedge_s ve, int type) {
+public static void map_path(ST_Agnode_s from, ST_Agnode_s to, ST_Agedge_s orig, ST_Agedge_s ve, int type) {
ENTERING("6o86r59v2ujlxqcw7761y6o5b","map_path");
try {
int r;
- Agnode_s u, v;
- Agedge_s e;
+ ST_Agnode_s u, v;
+ ST_Agedge_s e;
assert(ND_rank(from) < ND_rank(to));
if (EQ(agtail(ve), from) && EQ(aghead(ve), to))
return;
@@ -872,7 +847,7 @@ try {
ED_edge_type(e, type);
u = v;
ED_count(ve, ED_count(ve) - 1);
- ve = (Agedge_s) ND_out(aghead(ve)).getFromList(0);
+ ve = (ST_Agedge_s) ND_out(aghead(ve)).getFromList(0);
}
} else {
if (ND_rank(to) - ND_rank(from) == 1) {
@@ -900,7 +875,7 @@ try {
} else
e = ve;
while (ND_rank(aghead(e)) != ND_rank(to))
- e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
+ e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0);
if (NEQ(aghead(e), to)) {
ve = e;
e = virtual_edge(agtail(e), to, orig);
@@ -919,11 +894,11 @@ LEAVING("6o86r59v2ujlxqcw7761y6o5b","map_path");
//3 69xbflgja0gvrsl5xcv7o7dia
// static void make_interclust_chain(graph_t * g, node_t * from, node_t * to, edge_t * orig)
-public static void make_interclust_chain(Agraph_s g, Agnode_s from, Agnode_s to, Agedge_s orig) {
+public static void make_interclust_chain(ST_Agraph_s g, ST_Agnode_s from, ST_Agnode_s to, ST_Agedge_s orig) {
ENTERING("69xbflgja0gvrsl5xcv7o7dia","make_interclust_chain");
try {
int newtype;
- Agnode_s u, v;
+ ST_Agnode_s u, v;
u = map_interclust_node(from);
v = map_interclust_node(to);
if (EQ(u, from) && EQ(v, to))
@@ -941,12 +916,12 @@ LEAVING("69xbflgja0gvrsl5xcv7o7dia","make_interclust_chain");
//3 6g2m2y44x66lajznvnon2gubv
// void interclexp(graph_t * subg)
-public static void interclexp(Agraph_s subg) {
+public static void interclexp(ST_Agraph_s subg) {
ENTERING("6g2m2y44x66lajznvnon2gubv","interclexp");
try {
- Agraph_s g;
- Agnode_s n;
- Agedge_s e, prev, next;
+ ST_Agraph_s g;
+ ST_Agnode_s n;
+ ST_Agedge_s e, prev, next;
g = dot_root(subg);
for (n = agfstnode(subg); n!=null; n = agnxtnode(subg, n)) {
/* N.B. n may be in a sub-cluster of subg */
@@ -971,7 +946,7 @@ UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue;
}
/* flat edges */
if (ND_rank(agtail(e)) == ND_rank(aghead(e))) {
- Agedge_s fe;
+ ST_Agedge_s fe;
if ((fe = find_flat_edge(agtail(e), aghead(e))) == null) {
flat_edge(g, e);
prev = e;
@@ -1009,22 +984,22 @@ LEAVING("6g2m2y44x66lajznvnon2gubv","interclexp");
//3 85nhs7tnmwunw0fsjj1kxao7l
// static void merge_ranks(graph_t * subg)
-public static void merge_ranks(Agraph_s subg) {
+public static void merge_ranks(ST_Agraph_s subg) {
ENTERING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks");
try {
int i, d, r, pos, ipos;
- Agnode_s v;
- Agraph_s root;
+ ST_Agnode_s v;
+ ST_Agraph_s root;
root = dot_root(subg);
if (GD_minrank(subg) > 0)
GD_rank(root).plus(GD_minrank(subg) - 1).getPtr().setInt("valid", 0);
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) {
- d = GD_rank(subg).plus(r).getPtr().getInt("n");
- ipos = pos = ND_order(GD_rankleader(subg).plus(r).getPtr());
+ d = GD_rank(subg).get(r).n;
+ ipos = pos = ND_order(GD_rankleader(subg).get(r));
make_slots(root, r, pos, d);
- for (i = 0; i < GD_rank(subg).plus(r).getPtr().getInt("n"); i++) {
- v = (Agnode_s) GD_rank(subg).plus(r).getArrayOfPtr("v").plus(i).getPtr();
- GD_rank(root).plus(r).getArrayOfPtr("v").plus(pos).setPtr(v);
+ for (i = 0; i < GD_rank(subg).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(subg).get(r).v.get(i);
+ GD_rank(root).get(r).v.plus(pos).setPtr(v);
ND_order(v, pos++);
/* real nodes automatically have v->root = root graph */
if (ND_node_type(v) == 1)
@@ -1033,11 +1008,11 @@ try {
fast_node(root, v);
GD_n_nodes(root, GD_n_nodes(root)+1);
}
- GD_rank(subg).plus(r).getPtr().setPtr("v", GD_rank(root).plus(r).getPtr().getPtr("v").plus(ipos));
- GD_rank(root).plus(r).getPtr().setInt("valid", 0);
+ GD_rank(subg).get(r).setPtr("v", GD_rank(root).get(r).v.plus(ipos));
+ GD_rank(root).get(r).setInt("valid", 0);
}
if (r < GD_maxrank(root))
- GD_rank(root).plus(r).getPtr().setInt("valid", 0);
+ GD_rank(root).get(r).setInt("valid", 0);
GD_expanded(subg, NOT(false));
} finally {
LEAVING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks");
@@ -1049,18 +1024,18 @@ LEAVING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks");
//3 c9p7dm16i13qktnh95os0sv58
// static void remove_rankleaders(graph_t * g)
-public static void remove_rankleaders(Agraph_s g) {
+public static void remove_rankleaders(ST_Agraph_s g) {
ENTERING("c9p7dm16i13qktnh95os0sv58","remove_rankleaders");
try {
int r;
- Agnode_s v;
- Agedge_s e;
+ ST_Agnode_s v;
+ ST_Agedge_s e;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- v = (Agnode_s) GD_rankleader(g).plus(r).getPtr();
+ v = (ST_Agnode_s) GD_rankleader(g).get(r);
/* remove the entire chain */
- while ((e = (Agedge_s) ND_out(v).getFromList(0))!=null)
+ while ((e = (ST_Agedge_s) ND_out(v).getFromList(0))!=null)
delete_fast_edge(e);
- while ((e = (Agedge_s) ND_in(v).getFromList(0))!=null)
+ while ((e = (ST_Agedge_s) ND_in(v).getFromList(0))!=null)
delete_fast_edge(e);
delete_fast_node(dot_root(g), v);
GD_rankleader(g).plus(r).setPtr(null);
@@ -1075,13 +1050,13 @@ LEAVING("c9p7dm16i13qktnh95os0sv58","remove_rankleaders");
//3 ecrplg8hsyl484f9kxc5xp0go
// void expand_cluster(graph_t * subg)
-public static void expand_cluster(Agraph_s subg) {
+public static void expand_cluster(ST_Agraph_s subg) {
ENTERING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster");
try {
/* build internal structure of the cluster */
class2(subg);
GD_comp(subg).size = 1;
- // GD_comp(subg).getArrayOfPtr("list").plus(0).setPtr(GD_nlist(subg));
+ // GD_comp(subg).list.plus(0).setPtr(GD_nlist(subg));
GD_comp(subg).setInList(0, GD_nlist(subg));
allocate_ranks(subg);
build_ranks(subg, 0);
@@ -1099,13 +1074,13 @@ LEAVING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster");
//3 cxuirggihlap2iv2khmb1w5l5
// void mark_clusters(graph_t * g)
-public static void mark_clusters(Agraph_s g) {
+public static void mark_clusters(ST_Agraph_s g) {
ENTERING("cxuirggihlap2iv2khmb1w5l5","mark_clusters");
try {
int c;
- Agnode_s n, nn=null, vn;
- Agedge_s orig, e;
- Agraph_s clust;
+ ST_Agnode_s n, nn=null, vn;
+ ST_Agedge_s orig, e;
+ ST_Agraph_s clust;
/* remove sub-clusters below this level */
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
if (ND_ranktype(n) == 7)
@@ -1113,7 +1088,7 @@ try {
ND_clust(n, null);
}
for (c = 1; c <= GD_n_cluster(g); c++) {
- clust = (Agraph_s) GD_clust(g).plus(c).getPtr();
+ clust = (ST_Agraph_s) GD_clust(g).get(c).getPtr();
for (n = agfstnode(clust); n!=null; n = nn) {
nn = agnxtnode(clust,n);
if (ND_ranktype(n) != 0) {
@@ -1132,7 +1107,7 @@ UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue;
if ((e = ED_to_virt(orig))!=null) {
while (e!=null && ND_node_type(vn =aghead(e)) == 1) {
ND_clust(vn, clust);
- e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
+ e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0);
/* trouble if concentrators and clusters are mixed */
}
}
@@ -1149,14 +1124,15 @@ LEAVING("cxuirggihlap2iv2khmb1w5l5","mark_clusters");
//3 bwrw5u0gi2rgah1cn9h0glpse
// void build_skeleton(graph_t * g, graph_t * subg)
-public static void build_skeleton(Agraph_s g, Agraph_s subg) {
+public static void build_skeleton(ST_Agraph_s g, ST_Agraph_s subg) {
ENTERING("bwrw5u0gi2rgah1cn9h0glpse","build_skeleton");
try {
int r;
- Agnode_s v, prev, rl;
- Agedge_s e;
+ ST_Agnode_s v, prev, rl;
+ ST_Agedge_s e;
prev = null;
- GD_rankleader(subg, zmalloc(sizeof_starstar_empty(Agnode_s.class, GD_maxrank(subg) + 2)));
+ // GD_rankleader(subg, zmalloc(sizeof_starstar_empty(Agnode_s.class, GD_maxrank(subg) + 2)));
+ GD_rankleader(subg, new ST_Agnode_s.Array(GD_maxrank(subg) + 2));
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) {
v = virtual_node(g);
GD_rankleader(subg).plus(r).setPtr(v);
@@ -1171,7 +1147,7 @@ try {
}
/* set the counts on virtual edges of the cluster skeleton */
for (v = agfstnode(subg); v!=null; v = agnxtnode(subg, v)) {
- rl = (Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr();
+ rl = (ST_Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr();
ND_UF_size(rl, ND_UF_size(rl)+1);
for (e = agfstout(subg, v); e!=null; e = agnxtout(subg, e)) {
for (r = ND_rank(agtail(e)); r < ND_rank(aghead(e)); r++) {
@@ -1180,7 +1156,7 @@ try {
}
}
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) {
- rl = (Agnode_s) GD_rankleader(subg).plus(r).getPtr();
+ rl = (ST_Agnode_s) GD_rankleader(subg).get(r);
if (ND_UF_size(rl) > 1)
ND_UF_size(rl, ND_UF_size(rl)-1);
}
@@ -1194,17 +1170,17 @@ LEAVING("bwrw5u0gi2rgah1cn9h0glpse","build_skeleton");
//3 75yt3xwcwnxipi827t1r8zcmn
// void install_cluster(graph_t * g, node_t * n, int pass, nodequeue * q)
-public static void install_cluster(Agraph_s g, Agnode_s n, int pass, nodequeue q) {
+public static void install_cluster(ST_Agraph_s g, ST_Agnode_s n, int pass, ST_nodequeue q) {
ENTERING("75yt3xwcwnxipi827t1r8zcmn","install_cluster");
try {
int r;
- Agraph_s clust;
+ ST_Agraph_s clust;
clust = ND_clust(n);
if (GD_installed(clust) != pass + 1) {
for (r = GD_minrank(clust); r <= GD_maxrank(clust); r++)
- install_in_rank(g, (Agnode_s) GD_rankleader(clust).plus(r).getPtr());
+ install_in_rank(g, (ST_Agnode_s) GD_rankleader(clust).get(r));
for (r = GD_minrank(clust); r <= GD_maxrank(clust); r++)
- enqueue_neighbors(q, (Agnode_s) GD_rankleader(clust).plus(r).getPtr(), pass);
+ enqueue_neighbors(q, (ST_Agnode_s) GD_rankleader(clust).get(r), pass);
GD_installed(clust, pass + 1);
}
} finally {
@@ -1217,11 +1193,11 @@ LEAVING("75yt3xwcwnxipi827t1r8zcmn","install_cluster");
//3 4muksvb3ec03mt6cvaqpb5c7a
// void mark_lowclusters(Agraph_t * root)
-public static void mark_lowclusters(Agraph_s root) {
+public static void mark_lowclusters(ST_Agraph_s root) {
ENTERING("4muksvb3ec03mt6cvaqpb5c7a","mark_lowclusters");
try {
- Agnode_s n, vn;
- Agedge_s orig, e;
+ ST_Agnode_s n, vn;
+ ST_Agedge_s orig, e;
/* first, zap any previous cluster labelings */
for (n = agfstnode(root); n!=null; n = agnxtnode(root, n)) {
ND_clust(n, null);
@@ -1229,7 +1205,7 @@ try {
if ((e = ED_to_virt(orig))!=null) {
while (e!=null && (ND_node_type(vn = aghead(e))) == 1) {
ND_clust(vn, null);
- e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
+ e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0);
}
}
}
@@ -1246,15 +1222,15 @@ LEAVING("4muksvb3ec03mt6cvaqpb5c7a","mark_lowclusters");
//3 48j6fdymvkcgeh4wde060ctac
// static void mark_lowcluster_basic(Agraph_t * g)
-public static void mark_lowcluster_basic(Agraph_s g) {
+public static void mark_lowcluster_basic(ST_Agraph_s g) {
ENTERING("48j6fdymvkcgeh4wde060ctac","mark_lowcluster_basic");
try {
- Agraph_s clust;
- Agnode_s n, vn;
- Agedge_s orig, e;
+ ST_Agraph_s clust;
+ ST_Agnode_s n, vn;
+ ST_Agedge_s orig, e;
int c;
for (c = 1; c <= GD_n_cluster(g); c++) {
- clust = (Agraph_s) GD_clust(g).plus(c).getPtr();
+ clust = (ST_Agraph_s) GD_clust(g).get(c).getPtr();
mark_lowcluster_basic(clust);
}
/* see what belongs to this graph that wasn't already marked */
@@ -1266,7 +1242,7 @@ try {
while (e!=null && (ND_node_type(vn = aghead(e))) == 1) {
if (ND_clust(vn) == null)
ND_clust(vn, g);
- e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
+ e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0);
}
}
}
diff --git a/src/gen/lib/dotgen/compound__c.java b/src/gen/lib/dotgen/compound__c.java
index 614cae9..5cd594e 100644
--- a/src/gen/lib/dotgen/compound__c.java
+++ b/src/gen/lib/dotgen/compound__c.java
@@ -47,10 +47,7 @@ package gen.lib.dotgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class compound__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/dotgen/conc__c.java b/src/gen/lib/dotgen/conc__c.java
index ea9d419..d027092 100644
--- a/src/gen/lib/dotgen/conc__c.java
+++ b/src/gen/lib/dotgen/conc__c.java
@@ -47,10 +47,7 @@ package gen.lib.dotgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
import smetana.core.jmp_buf;
public class conc__c {
@@ -311,14 +308,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -347,26 +344,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -389,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/dotgen/decomp__c.java b/src/gen/lib/dotgen/decomp__c.java
index 4c04a39..c4595cf 100644
--- a/src/gen/lib/dotgen/decomp__c.java
+++ b/src/gen/lib/dotgen/decomp__c.java
@@ -66,18 +66,12 @@ import static smetana.core.Macro.ND_out;
import static smetana.core.Macro.ND_prev;
import static smetana.core.Macro.ND_rank;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
import h.ST_elist;
-import h.boxf;
-import h.elist;
-import h.pointf;
-import smetana.core.JUtils;
+import h.ST_pointf;
import smetana.core.Z;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
-import smetana.core.__struct__;
public class decomp__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -337,14 +331,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -373,25 +367,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -415,16 +390,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -745,7 +720,7 @@ LEAVING("7ggrwt0f912kp1marrxdjq155","begin_component");
//3 7icc6b2pvnj6te1yndbel47gg
// static void add_to_component(node_t * n)
-public static void add_to_component(Agnode_s n) {
+public static void add_to_component(ST_Agnode_s n) {
ENTERING("7icc6b2pvnj6te1yndbel47gg","add_to_component");
try {
GD_n_nodes(Z.z().G_decomp, 1+GD_n_nodes(Z.z().G_decomp));
@@ -775,7 +750,7 @@ try {
int i;
i = GD_comp(Z.z().G_decomp).size;
GD_comp(Z.z().G_decomp).size = 1+GD_comp(Z.z().G_decomp).size;
- GD_comp(Z.z().G_decomp).reallocEmpty(GD_comp(Z.z().G_decomp).size, Agnode_s.class);
+ GD_comp(Z.z().G_decomp).reallocEmpty(GD_comp(Z.z().G_decomp).size);
GD_comp(Z.z().G_decomp).setInList(i ,GD_nlist(Z.z().G_decomp));
} finally {
LEAVING("5o8hxpr6ppi15pinuy79m7u04","end_component");
@@ -787,21 +762,21 @@ LEAVING("5o8hxpr6ppi15pinuy79m7u04","end_component");
//3 c5u5lnfbu0pmlk6vsvyrdj8ep
// static void search_component(graph_t * g, node_t * n)
-public static void search_component(Agraph_s g, Agnode_s n) {
+public static void search_component(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component");
try {
int c, i;
- __array_of_struct__ vec = __array_of_struct_impl__.malloc(elist.class, 4);
- Agnode_s other;
- Agedge_s e;
+ final ST_elist vec[] = new ST_elist[] {new ST_elist(),new ST_elist(),new ST_elist(),new ST_elist()};
+ ST_Agnode_s other;
+ ST_Agedge_s e;
add_to_component(n);
- vec.plus(0).setStruct(ND_out(n));
- vec.plus(1).setStruct(ND_in(n));
- vec.plus(2).setStruct(ND_flat_out(n));
- vec.plus(3).setStruct(ND_flat_in(n));
+ vec[0].setStruct(ND_out(n));
+ vec[1].setStruct(ND_in(n));
+ vec[2].setStruct(ND_flat_out(n));
+ vec[3].setStruct(ND_flat_in(n));
for (c = 0; c <= 3; c++) {
- if (((ST_elist) vec.plus(c).getStruct()).listNotNull())
- for (i = 0; (e = (Agedge_s) ((ST_elist) vec.plus(c).getStruct()).getFromList(i))!=null; i++) {
+ if (vec[c].listNotNull())
+ for (i = 0; (e = (ST_Agedge_s) vec[c].getFromList(i))!=null; i++) {
if (EQ(other = aghead(e), n))
other = agtail(e);
if ((ND_mark(other) != Z.z().Cmark) && (EQ(other, UF_find(other))))
@@ -818,11 +793,11 @@ LEAVING("c5u5lnfbu0pmlk6vsvyrdj8ep","search_component");
//3 2t7r964kqtl5qrl7i57i22tqy
// void decompose(graph_t * g, int pass)
-public static void decompose(Agraph_s g, int pass) {
+public static void decompose(ST_Agraph_s g, int pass) {
ENTERING("2t7r964kqtl5qrl7i57i22tqy","decompose");
try {
- Agraph_s subg;
- Agnode_s n, v;
+ ST_Agraph_s subg;
+ ST_Agnode_s n, v;
Z.z().G_decomp = g;
if (++Z.z().Cmark == 0)
Z.z().Cmark = 1;
@@ -831,7 +806,7 @@ try {
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
v = n;
if ((pass > 0) && (subg = ND_clust(v))!=null)
- v = (Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr();
+ v = (ST_Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr();
else if (v != UF_find(v))
continue;
if (ND_mark(v) != Z.z().Cmark) {
diff --git a/src/gen/lib/dotgen/dotinit__c.java b/src/gen/lib/dotgen/dotinit__c.java
index f6768c0..a854ef1 100644
--- a/src/gen/lib/dotgen/dotinit__c.java
+++ b/src/gen/lib/dotgen/dotinit__c.java
@@ -101,23 +101,19 @@ import static smetana.core.Macro.ND_other;
import static smetana.core.Macro.ND_out;
import static smetana.core.Macro.UNSUPPORTED;
import static smetana.core.Macro.alloc_elist;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.Agraph_s;
-import h.Agraphinfo_t;
-import h.aspect_t;
-import h.boxf;
-import h.pack_info;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agraph_s;
+import h.ST_Agraphinfo_t;
+import h.ST_aspect_t;
+import h.ST_pack_info;
+import h.ST_pointf;
import h.pack_mode;
-import h.pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.Memory;
import smetana.core.Z;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class dotinit__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -377,14 +373,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -413,25 +409,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -455,16 +432,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -765,12 +742,12 @@ throw new UnsupportedOperationException();
//3 cmr94z4p2bdeiply1d4wrqwes
// static void dot_init_subg(graph_t * g, graph_t* droot)
-public static void dot_init_subg(Agraph_s g, Agraph_s droot) {
+public static void dot_init_subg(ST_Agraph_s g, ST_Agraph_s droot) {
ENTERING("cmr94z4p2bdeiply1d4wrqwes","dot_init_subg");
try {
- Agraph_s subg;
+ ST_Agraph_s subg;
if (NEQ(g, agroot(g)))
- agbindrec(g, new CString("Agraphinfo_t"), sizeof(Agraphinfo_t.class), (N(0)));
+ agbindrec(g, new CString("Agraphinfo_t"), sizeof(ST_Agraphinfo_t.class), (N(0)));
if (EQ(g, droot))
GD_dotroot(agroot(g), droot);
for (subg = agfstsubg(g); subg!=null; subg = agnxtsubg(subg)) {
@@ -786,17 +763,17 @@ LEAVING("cmr94z4p2bdeiply1d4wrqwes","dot_init_subg");
//3 3hk92jbrfjmn6no3svn9jvje9
// static void dot_init_node(node_t * n)
-public static void dot_init_node(Agnode_s n) {
+public static void dot_init_node(ST_Agnode_s n) {
ENTERING("3hk92jbrfjmn6no3svn9jvje9","dot_init_node");
try {
- agbindrec(n, new CString("Agnodeinfo_t"), sizeof(Agnodeinfo_t.class), (N(0))); //graph custom data
+ agbindrec(n, new CString("Agnodeinfo_t"), sizeof(ST_Agnodeinfo_t.class), (N(0))); //graph custom data
common_init_node(n);
gv_nodesize(n, GD_flip(agraphof(n)));
- alloc_elist(4, ND_in(n), Agnode_s.class);
- alloc_elist(4, ND_out(n), Agnode_s.class);
- alloc_elist(2, ND_flat_in(n), Agnode_s.class);
- alloc_elist(2, ND_flat_out(n), Agnode_s.class);
- alloc_elist(2, ND_other(n), Agnode_s.class);
+ alloc_elist(4, ND_in(n));
+ alloc_elist(4, ND_out(n));
+ alloc_elist(2, ND_flat_in(n));
+ alloc_elist(2, ND_flat_out(n));
+ alloc_elist(2, ND_other(n));
ND_UF_size(n, 1);
} finally {
LEAVING("3hk92jbrfjmn6no3svn9jvje9","dot_init_node");
@@ -808,11 +785,11 @@ LEAVING("3hk92jbrfjmn6no3svn9jvje9","dot_init_node");
//3 zbvhnhd78bppq8wb872847bj
// static void dot_init_edge(edge_t * e)
-public static void dot_init_edge(Agedge_s e) {
+public static void dot_init_edge(ST_Agedge_s e) {
ENTERING("zbvhnhd78bppq8wb872847bj","dot_init_edge");
try {
CString tailgroup, headgroup;
- agbindrec(e, new CString("Agedgeinfo_t"), sizeof(Agedgeinfo_t.class), (N(0))); //graph custom data
+ agbindrec(e, new CString("Agedgeinfo_t"), sizeof(ST_Agedgeinfo_t.class), (N(0))); //graph custom data
common_init_edge(e);
ED_weight(e, late_int(e, Z.z().E_weight, 1, 0));
tailgroup = late_string(agtail(e), Z.z().N_group, new CString(""));
@@ -839,11 +816,11 @@ LEAVING("zbvhnhd78bppq8wb872847bj","dot_init_edge");
//3 2ylyhz7macit0ts1hap2tg3wy
// void dot_init_node_edge(graph_t * g)
-public static void dot_init_node_edge(Agraph_s g) {
+public static void dot_init_node_edge(ST_Agraph_s g) {
ENTERING("2ylyhz7macit0ts1hap2tg3wy","dot_init_node_edge");
try {
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n))
dot_init_node(n);
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
@@ -1072,11 +1049,11 @@ throw new UnsupportedOperationException();
//3 7t18nggek2s9vvb5opwqa8rwr
// static void dotLayout(Agraph_t * g)
-public static void dotLayout(Agraph_s g) {
+public static void dotLayout(ST_Agraph_s g) {
ENTERING("7t18nggek2s9vvb5opwqa8rwr","dotLayout");
try {
- aspect_t aspect = (aspect_t) Memory.malloc(aspect_t.class);
- aspect_t asp;
+ ST_aspect_t aspect = new ST_aspect_t();
+ ST_aspect_t asp;
int maxphase = late_int(g, (agattr(g,AGRAPH,new CString("phase"),null)), -1, 1);
setEdgeType (g, (5 << 1));
asp = setAspect (g, aspect);
@@ -1088,7 +1065,7 @@ try {
attach_phase_attrs (g, 1);
return;
}
- if (aspect.getBoolean("badGraph")) {
+ if (aspect.badGraph!=0) {
UNSUPPORTED("1yu5j8tk43i6jlmu8wk9jks15"); // agerr(AGWARN, "dot does not support the aspect attribute for disconnected graphs or graphs with clusters\n");
UNSUPPORTED("5uwp9z6jkv5uc30iyfszyg6dw"); // asp = NULL;
UNSUPPORTED("28kbszyxsjoj03gb134ov4hag"); // aspect.nextIter = 0;
@@ -1103,8 +1080,8 @@ UNSUPPORTED("28kbszyxsjoj03gb134ov4hag"); // aspect.nextIter = 0;
attach_phase_attrs (g, 2); /* positions will be attached on output */
return;
}
- aspect.setInt("nPasses", aspect.getInt("nPasses") -1);
- } while (aspect.getInt("nextIter")!=0 && aspect.getInt("nPasses")!=0);
+ aspect.setInt("nPasses", aspect.nPasses -1);
+ } while (aspect.nextIter!=0 && aspect.nPasses!=0);
if ((GD_flags(g) & (1 << 4))!=0)
removeFill (g);
dot_sameports(g);
@@ -1191,14 +1168,14 @@ throw new UnsupportedOperationException();
//3 nedairhdof6qkmjjoh4h68zy
// static void doDot (Agraph_t* g)
-public static void doDot(Agraph_s g) {
+public static void doDot(ST_Agraph_s g) {
ENTERING("nedairhdof6qkmjjoh4h68zy","doDot");
try {
- Agraph_s ccs[];
- Agraph_s sg;
+ ST_Agraph_s ccs[];
+ ST_Agraph_s sg;
int ncc;
int i;
- pack_info pinfo = (pack_info) Memory.malloc(pack_info.class);
+ final ST_pack_info pinfo = new ST_pack_info();
int Pack = getPack(g, -1, 8);
int mode = getPackModeInfo (g, enumAsInt(pack_mode.class, "l_undef"), pinfo);
getPackInfo(g, enumAsInt(pack_mode.class, "l_node"), 8, pinfo);
@@ -1253,7 +1230,7 @@ LEAVING("nedairhdof6qkmjjoh4h68zy","doDot");
//3 euvc3uoksq3e24augkwebfkcv
// void dot_layout(Agraph_t * g)
-public static void dot_layout(Agraph_s g) {
+public static void dot_layout(ST_Agraph_s g) {
ENTERING("euvc3uoksq3e24augkwebfkcv","dot_layout");
try {
if (agnnodes(g)!=0) doDot (g);
@@ -1268,7 +1245,7 @@ LEAVING("euvc3uoksq3e24augkwebfkcv","dot_layout");
//3 ca52dadcp7m8x0bqhaw4tvtaw
// Agraph_t * dot_root (void* p)
-public static Agraph_s dot_root(__ptr__ p) {
+public static ST_Agraph_s dot_root(__ptr__ p) {
ENTERING("ca52dadcp7m8x0bqhaw4tvtaw","dot_root");
try {
return GD_dotroot(agroot(p));
diff --git a/src/gen/lib/dotgen/dotsplines__c.java b/src/gen/lib/dotgen/dotsplines__c.java
index c7c5d9a..f390a6c 100644
--- a/src/gen/lib/dotgen/dotsplines__c.java
+++ b/src/gen/lib/dotgen/dotsplines__c.java
@@ -51,7 +51,6 @@ import static gen.lib.cgraph.edge__c.agtail;
import static gen.lib.cgraph.node__c.agfstnode;
import static gen.lib.cgraph.node__c.agnxtnode;
import static gen.lib.cgraph.obj__c.agraphof;
-import static gen.lib.common.memory__c.gmalloc;
import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.routespl__c.makeStraightEdge;
import static gen.lib.common.routespl__c.routepolylines;
@@ -73,12 +72,11 @@ import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtils.function;
import static smetana.core.JUtils.qsort;
import static smetana.core.JUtils.sizeof;
-import static smetana.core.JUtils.sizeof_starstar_empty;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.ABS;
import static smetana.core.Macro.AGSEQ;
-import static smetana.core.Macro.ALLOC_empty;
+import static smetana.core.Macro.ALLOC_allocated_ST_Agedge_s;
import static smetana.core.Macro.BETWEEN;
import static smetana.core.Macro.ED_adjacent;
import static smetana.core.Macro.ED_edge_type;
@@ -121,31 +119,28 @@ import static smetana.core.Macro.ND_out;
import static smetana.core.Macro.ND_rank;
import static smetana.core.Macro.ND_rw;
import static smetana.core.Macro.NOT;
+import static smetana.core.Macro.NOTI;
import static smetana.core.Macro.ROUND;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agedgepair_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Ppoly_t;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agedgepair_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Ppoly_t;
+import h.ST_bezier;
import h.ST_boxf;
+import h.ST_path;
+import h.ST_pathend_t;
+import h.ST_pointf;
import h.ST_port;
+import h.ST_rank_t;
+import h.ST_spline_info_t;
+import h.ST_splines;
import h.attr_state_t;
-import h.bezier;
-import h.boxf;
-import h.path;
-import h.pathend_t;
-import h.pointf;
-import h.spline_info_t;
-import h.splines;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class dotsplines__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -405,14 +400,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -483,16 +478,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -793,10 +788,10 @@ throw new UnsupportedOperationException();
//3 dobhmc46zwtvv8rg3ywntl91j
// static edge_t* getmainedge(edge_t * e)
-public static Agedge_s getmainedge(Agedge_s e) {
+public static ST_Agedge_s getmainedge(ST_Agedge_s e) {
ENTERING("dobhmc46zwtvv8rg3ywntl91j","getmainedge");
try {
- Agedge_s le = e;
+ ST_Agedge_s le = e;
while (ED_to_virt(le)!=null)
le = ED_to_virt(le);
while (ED_to_orig(le)!=null)
@@ -812,7 +807,7 @@ LEAVING("dobhmc46zwtvv8rg3ywntl91j","getmainedge");
//3 ddeny5ht7w8b16ztj5zt840ld
// static boolean spline_merge(node_t * n)
-public static boolean spline_merge(Agnode_s n) {
+public static boolean spline_merge(ST_Agnode_s n) {
ENTERING("ddeny5ht7w8b16ztj5zt840ld","spline_merge");
try {
return ((ND_node_type(n) == 1)
@@ -827,7 +822,7 @@ LEAVING("ddeny5ht7w8b16ztj5zt840ld","spline_merge");
//3 36ofw2qfqlh5ci8gc8cfkqgg3
// static boolean swap_ends_p(edge_t * e)
-public static boolean swap_ends_p(Agedge_s e) {
+public static boolean swap_ends_p(ST_Agedge_s e) {
ENTERING("36ofw2qfqlh5ci8gc8cfkqgg3","swap_ends_p");
try {
while (ED_to_orig(e)!=null)
@@ -884,17 +879,17 @@ LEAVING("3krohso3quojiv4fveh1en7o6","portcmp");
//3 10wbtt4gwnxgqutinpj4ymjpk
// static void swap_bezier(bezier * old, bezier * new)
-public static void swap_bezier(__ptr__ old, __ptr__ new_) {
+public static void swap_bezier(ST_bezier.Array2 old, ST_bezier.Array2 new_) {
ENTERING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier");
try {
- __ptr__ list;
- __ptr__ lp;
- __ptr__ olp;
+ ST_pointf.Array list;
+ ST_pointf.Array lp;
+ ST_pointf.Array olp;
int i, sz;
- sz = old.getInt("size");
- list = gmalloc(sizeof(pointf.class, sz));
+ sz = old.getStruct().size;
+ list = new ST_pointf.Array(sz);
lp = list;
- olp = old.getArrayOfPtr("list").plus(sz - 1).asPtr();
+ olp = old.getStruct().list.plus(sz - 1);
for (i = 0; i < sz; i++) { /* reverse list of points */
lp.getStruct().___(olp.getStruct());
lp=lp.plus(1);
@@ -902,10 +897,10 @@ try {
}
new_.setPtr("list", list);
new_.setInt("size", sz);
- new_.setInt("sflag", old.getInt("eflag"));
- new_.setInt("eflag", old.getInt("sflag"));
- new_.setStruct("sp", old.getStruct("ep"));
- new_.setStruct("ep", old.getStruct("sp"));
+ new_.setInt("sflag", old.getStruct().eflag);
+ new_.setInt("eflag", old.getStruct().sflag);
+ new_.setStruct("sp", old.getStruct().ep);
+ new_.setStruct("ep", old.getStruct().sp);
} finally {
LEAVING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier");
}
@@ -916,17 +911,17 @@ LEAVING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier");
//3 3256l3e2huarsy29dd97vqj85
// static void swap_spline(splines * s)
-public static void swap_spline(splines s) {
+public static void swap_spline(ST_splines s) {
ENTERING("3256l3e2huarsy29dd97vqj85","swap_spline");
try {
- __ptr__ list;
- __ptr__ lp;
- __ptr__ olp;
+ ST_bezier.Array2 list;
+ ST_bezier.Array2 lp;
+ ST_bezier.Array2 olp;
int i, sz;
- sz = s.getInt("size");
- list = gmalloc(sizeof(bezier.class, sz));
+ sz = s.size;
+ list = new ST_bezier.Array2(sz);
lp = list;
- olp = s.getArrayOfPtr("list").plus(sz - 1).asPtr();
+ olp = s.list.plus(sz - 1);
for (i = 0; i < sz; i++) { /* reverse and swap list of beziers */
swap_bezier(olp, lp);
olp = olp.plus(-1);
@@ -934,9 +929,9 @@ try {
}
/* free old structures */
for (i = 0; i < sz; i++)
- Memory.free(s.getArrayOfPtr("list").plus(i).getPtr().getArrayOfPtr("list"));
- Memory.free(s.getArrayOfPtr("list"));
- s.setPtr("list", list);
+ Memory.free(((ST_bezier)s.list.get(i)).getPtr().list);
+ Memory.free(s.list);
+ s.list = (ST_bezier.Array2) list;
} finally {
LEAVING("3256l3e2huarsy29dd97vqj85","swap_spline");
}
@@ -947,14 +942,14 @@ LEAVING("3256l3e2huarsy29dd97vqj85","swap_spline");
//3 dgkssqjj566ifra0xy7m46qsb
// static void edge_normalize(graph_t * g)
-public static void edge_normalize(Agraph_s g) {
+public static void edge_normalize(ST_Agraph_s g) {
ENTERING("dgkssqjj566ifra0xy7m46qsb","edge_normalize");
try {
- Agedge_s e;
- Agnode_s n;
+ ST_Agedge_s e;
+ ST_Agnode_s n;
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) {
- if ((Boolean)Z.z().sinfo.call("swapEnds", e) && ED_spl(e)!=null)
+ if ((Boolean)Z.z().sinfo.swapEnds.exe(e) && ED_spl(e)!=null)
swap_spline(ED_spl(e));
}
}
@@ -1021,21 +1016,21 @@ throw new UnsupportedOperationException();
//3 6agx6m2qof9lg57co232lwakj
// static void _dot_splines(graph_t * g, int normalize)
-static void _dot_splines(Agraph_s g, int normalize)
+static void _dot_splines(ST_Agraph_s g, int normalize)
{
ENTERING("6agx6m2qof9lg57co232lwakj","_dot_splines");
try {
int i, j, k, n_nodes, n_edges, ind, cnt;
- Agnode_s n;
- final __struct__<Agedgeinfo_t> fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class);
- final __struct__<Agedgepair_s> fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class);
- Agedge_s e, e0, e1, ea, eb, le0, le1;
- __ptr__ edges;
- path P;
- final __struct__<spline_info_t> sd = JUtils.from(spline_info_t.class);
+ ST_Agnode_s n;
+ final ST_Agedgeinfo_t fwdedgeai = new ST_Agedgeinfo_t(), fwdedgebi = new ST_Agedgeinfo_t();
+ final ST_Agedgepair_s fwdedgea = new ST_Agedgepair_s(), fwdedgeb = new ST_Agedgepair_s();
+ ST_Agedge_s e, e0, e1, ea, eb, le0, le1;
+ ST_Agedge_s.ArrayOfStar edges;
+ ST_path P;
+ final ST_spline_info_t sd = new ST_spline_info_t();
int et = (GD_flags(g) & (7 << 1));
- fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp());
- fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp());
+ fwdedgea.out.base.setPtr("data", fwdedgeai);
+ fwdedgeb.out.base.setPtr("data", fwdedgebi);
if (et == (0 << 1)) return;
if (et == (2 << 1)) {
resetRW (g);
@@ -1051,52 +1046,52 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
}
mark_lowclusters(g);
if (routesplinesinit()!=0) return;
- P = (path) zmalloc(sizeof(path.class));
+ P = (ST_path) zmalloc(sizeof(ST_path.class));
/* FlatHeight = 2 * GD_nodesep(g); */
sd.setInt("Splinesep", GD_nodesep(g) / 4);
sd.setInt("Multisep", GD_nodesep(g));
- edges = zmalloc(sizeof_starstar_empty(Agedge_s.class, 128));
+ edges = new ST_Agedge_s.ArrayOfStar(128);
/* compute boundaries and list of splines */
sd.setInt("RightBound", 0);
sd.setInt("LeftBound", 0);
n_edges = n_nodes = 0;
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
- n_nodes += GD_rank(g).plus(i).getInt("n");
- if ((n = (Agnode_s) GD_rank(g).plus(i).getArrayOfPtr("v").plus(0).getPtr())!=null)
- sd.setInt("LeftBound", (int)MIN(sd.getInt("LeftBound"), (ND_coord(n).getDouble("x") - ND_lw(n))));
- if (GD_rank(g).plus(i).getInt("n")!=0 && (n = (Agnode_s) GD_rank(g).plus(i).getArrayOfPtr("v").plus(GD_rank(g).plus(i).getInt("n") - 1).getPtr())!=null)
- sd.setInt("RightBound", (int)MAX(sd.getInt("RightBound"), (ND_coord(n).getDouble("x") + ND_rw(n))));
- sd.setInt("LeftBound", sd.getInt("LeftBound") - 16);
- sd.setInt("RightBound", sd.getInt("RightBound") + 16);
- for (j = 0; j < GD_rank(g).plus(i).getInt("n"); j++) {
- n = (Agnode_s) GD_rank(g).plus(i).getArrayOfPtr("v").plus(j).getPtr();
+ n_nodes += GD_rank(g).get(i).n;
+ if ((n = (ST_Agnode_s) GD_rank(g).get(i).v.get(0))!=null)
+ sd.setInt("LeftBound", (int)MIN(sd.LeftBound, (ND_coord(n).x - ND_lw(n))));
+ if (GD_rank(g).get(i).n!=0 && (n = (ST_Agnode_s) GD_rank(g).get(i).v.plus(GD_rank(g).get(i).n - 1).getPtr())!=null)
+ sd.setInt("RightBound", (int)MAX(sd.RightBound, (ND_coord(n).x + ND_rw(n))));
+ sd.setInt("LeftBound", sd.LeftBound - 16);
+ sd.setInt("RightBound", sd.RightBound + 16);
+ for (j = 0; j < GD_rank(g).get(i).n; j++) {
+ n = (ST_Agnode_s) GD_rank(g).get(i).v.get(j);
/* if n is the label of a flat edge, copy its position to
* the label.
*/
if (ND_alg(n)!=null) {
- Agedge_s fe = (Agedge_s) ND_alg(n);
+ ST_Agedge_s fe = (ST_Agedge_s) ND_alg(n);
assert (ED_label(fe)!=null);
ED_label(fe).setStruct("pos", ND_coord(n));
- ED_label(fe).setBoolean("set", NOT(false));
+ ED_label(fe).set= NOTI(false);
}
if ((ND_node_type(n) != 0) &&
- ((Boolean)Z.z().sinfo.call("splineMerge", n) == false))
+ ((Boolean)Z.z().sinfo.splineMerge.exe(n) == false))
continue;
- for (k = 0; (e = (Agedge_s) ND_out(n).getFromList(k))!=null; k++) {
+ for (k = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(k))!=null; k++) {
if ((ED_edge_type(e) == 4)
|| (ED_edge_type(e) == 6))
continue;
setflags(e, 1, 16, 64);
edges.plus(n_edges++).setPtr(e);
if (n_edges % 128 == 0)
- edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class);
+ edges = ALLOC_allocated_ST_Agedge_s (edges, n_edges + 128);
}
if (ND_flat_out(n).listNotNull())
- for (k = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(k))!=null; k++) {
+ for (k = 0; (e = (ST_Agedge_s) ND_flat_out(n).getFromList(k))!=null; k++) {
setflags(e, 2, 0, 128);
edges.plus(n_edges++).setPtr(e);
if (n_edges % 128 == 0)
- edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class);
+ edges = ALLOC_allocated_ST_Agedge_s (edges, n_edges + 128);
}
if (ND_other(n).listNotNull()) {
/* In position, each node has its rw stored in mval and,
@@ -1109,11 +1104,11 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
ND_rw(n, ND_mval(n));
ND_mval(n, tmp);
}
- for (k = 0; (e = (Agedge_s) ND_other(n).getFromList(k))!=null; k++) {
+ for (k = 0; (e = (ST_Agedge_s) ND_other(n).getFromList(k))!=null; k++) {
setflags(e, 0, 0, 128);
edges.plus(n_edges++).setPtr(e);
if (n_edges % 128 == 0)
- edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class);
+ edges = ALLOC_allocated_ST_Agedge_s (edges, n_edges + 128);
}
}
}
@@ -1127,11 +1122,10 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
LOG2("_dot_splines::n_edges="+n_edges);
qsort(edges,
n_edges,
- sizeof(edges.plus(0)),
function(dotsplines__c.class, "edgecmp"));
/* FIXME: just how many boxes can there be? */
- P.setPtr("boxes", zmalloc(sizeof(boxf.class, n_nodes + 20 * 2 * 9)));
- sd.setPtr("Rank_box", zmalloc(sizeof(boxf.class, i)));
+ P.boxes = ST_boxf.malloc(n_nodes + 20 * 2 * 9);
+ sd.Rank_box = ST_boxf.malloc(i);
if (et == (1 << 1)) {
/* place regular edge labels */
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
@@ -1143,7 +1137,7 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
for (i = 0; i < n_edges;) {
boolean havePorts;
ind = i;
- le0 = getmainedge((e0 = (Agedge_s) edges.plus(i++).getPtr()));
+ le0 = getmainedge((e0 = (ST_Agedge_s) edges.plus(i++).getPtr()));
if (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) {
havePorts = NOT(false);
ea = e0;
@@ -1152,11 +1146,11 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
ea = le0;
}
if ((ED_tree_index(ea) & 32)!=0) {
- MAKEFWDEDGE(fwdedgea.getStruct("out").amp(), ea);
- ea = (Agedge_s) fwdedgea.getStruct("out").amp();
+ MAKEFWDEDGE(fwdedgea.out, ea);
+ ea = (ST_Agedge_s) fwdedgea.out;
}
for (cnt = 1; i < n_edges; cnt++, i++) {
- if (NEQ(le0, (le1 = getmainedge((e1 = (Agedge_s) edges.plus(i).getPtr())))))
+ if (NEQ(le0, (le1 = getmainedge((e1 = (ST_Agedge_s) edges.get(i))))))
break;
if (ED_adjacent(e0)!=0) continue; /* all flat adjacent edges at once */
if (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) {
@@ -1169,8 +1163,8 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
eb = le1;
}
if ((ED_tree_index(eb) & 32)!=0) {
- MAKEFWDEDGE(fwdedgeb.getStruct("out").amp(), eb);
- eb = (Agedge_s) fwdedgeb.getStruct("out").amp();
+ MAKEFWDEDGE(fwdedgeb.out, eb);
+ eb = (ST_Agedge_s) fwdedgeb.out;
}
if (portcmp(ED_tail_port(ea), ED_tail_port(eb))!=0)
break;
@@ -1179,7 +1173,7 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
if ((ED_tree_index(e0) & 15) == 2
&& NEQ(ED_label(e0), ED_label(e1)))
break;
- if ((ED_tree_index(edges.plus(i).getPtr()) & 64)!=0) /* Aha! -C is on */
+ if ((ED_tree_index(edges.get(i)) & 64)!=0) /* Aha! -C is on */
break;
}
if (EQ(agtail(e0), aghead(e0))) {
@@ -1188,30 +1182,30 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
r = ND_rank(n);
if (r == GD_maxrank(g)) {
if (r > 0)
- sizey = (int) (ND_coord(GD_rank(g).plus(r-1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - ND_coord(n).getDouble("y"));
+ sizey = (int) (ND_coord(GD_rank(g).get(r-1).v.get(0)).y - ND_coord(n).y);
else
sizey = (int) ND_ht(n);
}
else if (r == GD_minrank(g)) {
- sizey = (int)(ND_coord(n).getDouble("y") - ND_coord(GD_rank(g).plus(r+1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y"));
+ sizey = (int)(ND_coord(n).y - ND_coord(GD_rank(g).get(r+1).v.get(0)).y);
}
else {
- int upy = (int) (ND_coord(GD_rank(g).plus(r-1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - ND_coord(n).getDouble("y"));
- int dwny = (int) (ND_coord(n).getDouble("y") - ND_coord(GD_rank(g).plus(r+1).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y"));
+ int upy = (int) (ND_coord(GD_rank(g).get(r-1).v.get(0)).y - ND_coord(n).y);
+ int dwny = (int) (ND_coord(n).y - ND_coord(GD_rank(g).get(r+1).v.get(0)).y);
sizey = MIN(upy, dwny);
}
- makeSelfEdge(P, edges, ind, cnt, sd.getInt("Multisep"), sizey/2, Z.z().sinfo.amp());
+ makeSelfEdge(P, edges, ind, cnt, sd.Multisep, sizey/2, Z.z().sinfo);
for (b = 0; b < cnt; b++) {
- e = (Agedge_s) edges.plus(ind+b).getPtr();
+ e = (ST_Agedge_s) edges.plus(ind+b).getPtr();
if (ED_label(e)!=null)
updateBB(g, ED_label(e));
}
}
else if (ND_rank(agtail(e0)) == ND_rank(aghead(e0))) {
- make_flat_edge(g, sd.amp(), P, edges, ind, cnt, et);
+ make_flat_edge(g, sd, P, edges, ind, cnt, et);
}
else
- make_regular_edge(g, sd.amp(), P, edges, ind, cnt, et);
+ make_regular_edge(g, sd, P, edges, ind, cnt, et);
}
/* place regular edge labels */
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
@@ -1249,9 +1243,9 @@ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
/* end vladimir */
if (et != (2 << 1)) {
Memory.free(edges);
- Memory.free(P.getPtr("boxes"));
+ Memory.free(P.boxes);
Memory.free(P);
- Memory.free(sd.getPtr("Rank_box"));
+ Memory.free(sd.Rank_box);
routesplinesterm();
}
Z.z().State = 1;
@@ -1266,7 +1260,7 @@ LEAVING("6agx6m2qof9lg57co232lwakj","_dot_splines");
//3 5n306wbdfjbfnimdo9lg6jjaa
// void dot_splines(graph_t * g)
-public static void dot_splines(Agraph_s g) {
+public static void dot_splines(ST_Agraph_s g) {
ENTERING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines");
try {
_dot_splines (g, 1);
@@ -1280,21 +1274,21 @@ LEAVING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines");
//3 8jja9ukzsq8tlb9yy7uzavg91
// static void place_vnlabel(node_t * n)
-public static void place_vnlabel(Agnode_s n) {
+public static void place_vnlabel(ST_Agnode_s n) {
ENTERING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel");
try {
- final __struct__<pointf> dimen = JUtils.from(pointf.class);
+ final ST_pointf dimen = new ST_pointf();
double width;
- Agedge_s e;
+ ST_Agedge_s e;
if (ND_in(n).size == 0)
return; /* skip flat edge labels here */
- for (e = (Agedge_s) ND_out(n).getFromList(0); ED_edge_type(e) != 0;
+ for (e = (ST_Agedge_s) ND_out(n).getFromList(0); ED_edge_type(e) != 0;
e = ED_to_orig(e));
- dimen.___(ED_label(e).getStruct("dimen"));
- width = GD_flip(agraphof(n))!=0 ? dimen.getDouble("y") : dimen.getDouble("x");
- ED_label(e).getStruct("pos").setDouble("x", ND_coord(n).getDouble("x") + width / 2.0);
- ED_label(e).getStruct("pos").setDouble("y", ND_coord(n).getDouble("y"));
- ED_label(e).setBoolean("set", NOT(false));
+ dimen.___(ED_label(e).dimen);
+ width = GD_flip(agraphof(n))!=0 ? dimen.y : dimen.x;
+ ED_label(e).pos.setDouble("x", ND_coord(n).x + width / 2.0);
+ ED_label(e).pos.setDouble("y", ND_coord(n).y);
+ ED_label(e).set= NOTI(false);
} finally {
LEAVING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel");
}
@@ -1305,7 +1299,7 @@ LEAVING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel");
//3 598jn37hjkm7j0kcg2nmdvlwq
// static void setflags(edge_t *e, int hint1, int hint2, int f3)
-public static void setflags(Agedge_s e, int hint1, int hint2, int f3) {
+public static void setflags(ST_Agedge_s e, int hint1, int hint2, int f3) {
ENTERING("598jn37hjkm7j0kcg2nmdvlwq","setflags");
try {
int f1, f2;
@@ -1346,15 +1340,15 @@ LEAVING("598jn37hjkm7j0kcg2nmdvlwq","setflags");
public static int edgecmp(__ptr__ ptr0, __ptr__ ptr1) {
ENTERING("1nf1s6wkn35ptjn884ii56fh","edgecmp");
try {
- final __struct__<Agedgeinfo_t> fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class);
- final __struct__<Agedgepair_s> fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class);
- Agedge_s e0, e1, ea, eb, le0, le1;
+ final ST_Agedgeinfo_t fwdedgeai = new ST_Agedgeinfo_t(), fwdedgebi = new ST_Agedgeinfo_t();
+ final ST_Agedgepair_s fwdedgea = new ST_Agedgepair_s(), fwdedgeb = new ST_Agedgepair_s();
+ ST_Agedge_s e0, e1, ea, eb, le0, le1;
int et0, et1, v0, v1, rv;
double t0, t1;
- fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp());
- fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp());
- e0 = (Agedge_s) ptr0.getPtr();
- e1 = (Agedge_s) ptr1.getPtr();
+ fwdedgea.out.base.setPtr("data", fwdedgeai);
+ fwdedgeb.out.base.setPtr("data", fwdedgebi);
+ e0 = (ST_Agedge_s) ptr0.getPtr();
+ e1 = (ST_Agedge_s) ptr1.getPtr();
et0 = ED_tree_index(e0) & 15;
et1 = ED_tree_index(e1) & 15;
if (et0 != et1)
@@ -1367,8 +1361,8 @@ try {
v1 = ABS((int)t1);
if (v0 != v1)
return (v0 - v1);
- t0 = ND_coord(agtail(le0)).getDouble("x") - ND_coord(aghead(le0)).getDouble("x");
- t1 = ND_coord(agtail(le1)).getDouble("x") - ND_coord(aghead(le1)).getDouble("x");
+ t0 = ND_coord(agtail(le0)).x - ND_coord(aghead(le0)).x;
+ t1 = ND_coord(agtail(le1)).x - ND_coord(aghead(le1)).x;
v0 = ABS((int)t0);
v1 = ABS((int)t1);
if (v0 != v1)
@@ -1378,13 +1372,13 @@ try {
return (AGSEQ(le0) - AGSEQ(le1));
ea = (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) ? e0 : le0;
if ((ED_tree_index(ea) & 32)!=0) {
- MAKEFWDEDGE(fwdedgea.getStruct("out").amp(), ea);
- ea = fwdedgea.getStruct("out").amp();
+ MAKEFWDEDGE(fwdedgea.out, ea);
+ ea = (ST_Agedge_s) fwdedgea.out;
}
eb = (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) ? e1 : le1;
if ((ED_tree_index(eb) & 32)!=0) {
- MAKEFWDEDGE(fwdedgeb.getStruct("out").amp(), eb);
- eb = fwdedgeb.getStruct("out").amp();
+ MAKEFWDEDGE(fwdedgeb.out, eb);
+ eb = (ST_Agedge_s) fwdedgeb.out;
}
if ((rv = portcmp(ED_tail_port(ea), ED_tail_port(eb)))!=0)
return rv;
@@ -1678,18 +1672,18 @@ throw new UnsupportedOperationException();
public static int edgelblcmpfn(__ptr__ ptr0, __ptr__ ptr1) {
ENTERING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn");
try {
- Agedge_s e0, e1;
- final __struct__<pointf> sz0 = JUtils.from(pointf.class), sz1 = JUtils.from(pointf.class);
- e0 = (Agedge_s) ptr0.getPtr();
- e1 = (Agedge_s) ptr1.getPtr();
+ ST_Agedge_s e0, e1;
+ final ST_pointf sz0 = new ST_pointf(), sz1 = new ST_pointf();
+ e0 = (ST_Agedge_s) ptr0.getPtr();
+ e1 = (ST_Agedge_s) ptr1.getPtr();
if (ED_label(e0)!=null) {
if (ED_label(e1)!=null) {
- sz0.___(ED_label(e0).getStruct("dimen"));
- sz1.___(ED_label(e1).getStruct("dimen"));
- if (sz0.getDouble("x") > sz1.getDouble("x")) return -1;
- else if (sz0.getDouble("x") < sz1.getDouble("x")) return 1;
- else if (sz0.getDouble("y") > sz1.getDouble("y")) return -1;
- else if (sz0.getDouble("y") < sz1.getDouble("y")) return 1;
+ sz0.___(ED_label(e0).dimen);
+ sz1.___(ED_label(e1).dimen);
+ if (sz0.x > sz1.x) return -1;
+ else if (sz0.x < sz1.x) return 1;
+ else if (sz0.y > sz1.y) return -1;
+ else if (sz0.y < sz1.y) return 1;
else return 0;
}
else
@@ -1710,70 +1704,69 @@ LEAVING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn");
//3 3xmylrnypvoqrj2yrxnomsj5k
// static void makeSimpleFlatLabels (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et, int n_lbls)
-public static void makeSimpleFlatLabels(Agnode_s tn, Agnode_s hn, __ptr__ edges, int ind, int cnt, int et, int n_lbls) {
+public static void makeSimpleFlatLabels(ST_Agnode_s tn, ST_Agnode_s hn, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et, int n_lbls) {
ENTERING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels");
try {
- pointf ps;
- final __struct__<Ppoly_t> poly = JUtils.from(Ppoly_t.class);
+ ST_pointf.Array ps;
+ final ST_Ppoly_t poly = new ST_Ppoly_t();
int pn[] = new int[1];
- Agedge_s e = (Agedge_s) edges.plus(ind).getPtr();
- final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 10);
- final __struct__<pointf> tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class);
+ ST_Agedge_s e = (ST_Agedge_s) edges.get(ind);
+ final ST_pointf.Array points = new ST_pointf.Array(10);
+ final ST_pointf tp = new ST_pointf(), hp = new ST_pointf();
int i, pointn;
double leftend, rightend, ctrx=0, ctry=0, miny, maxy;
double uminx=0, umaxx=0;
double lminx=0, lmaxx=0;
- __ptr__ earray = zmalloc(sizeof_starstar_empty(Agedge_s.class, cnt));
+ ST_Agedge_s.ArrayOfStar earray = new ST_Agedge_s.ArrayOfStar(cnt);
for (i = 0; i < cnt; i++) {
earray.plus(i).setPtr(edges.plus(ind + i).getPtr());
}
qsort(earray,
cnt,
- sizeof(earray.plus(0)),
function(dotsplines__c.class, "edgelblcmpfn"));
- tp.___(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p")));
- hp.___(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p")));
- leftend = tp.getDouble("x")+ND_rw(tn);
- rightend = hp.getDouble("x")-ND_lw(hn);
+ tp.___(add_pointf(ND_coord(tn), (ST_pointf) ED_tail_port(e).p));
+ hp.___(add_pointf(ND_coord(hn), (ST_pointf) ED_head_port(e).p));
+ leftend = tp.x+ND_rw(tn);
+ rightend = hp.x-ND_lw(hn);
ctrx = (leftend + rightend)/2.0;
/* do first edge */
- e = (Agedge_s) earray.plus(0).getPtr();
+ e = (ST_Agedge_s) earray.get(0);
pointn = 0;
points.plus(pointn++).setStruct(tp);
points.plus(pointn++).setStruct(tp);
points.plus(pointn++).setStruct(hp);
points.plus(pointn++).setStruct(hp);
- clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo.amp());
- ED_label(e).getStruct("pos").setDouble("x", ctrx);
- ED_label(e).getStruct("pos").setDouble("y", tp.getDouble("y") + (ED_label(e).getStruct("dimen").getDouble("y")+6)/2.0);
- ED_label(e).setBoolean("set", NOT(false));
- miny = tp.getDouble("y") + 6/2.0;
- maxy = miny + ED_label(e).getStruct("dimen").getDouble("y");
- uminx = ctrx - (ED_label(e).getStruct("dimen").getDouble("x"))/2.0;
- umaxx = ctrx + (ED_label(e).getStruct("dimen").getDouble("x"))/2.0;
+ clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo);
+ ED_label(e).pos.setDouble("x", ctrx);
+ ED_label(e).pos.setDouble("y", tp.y + (ED_label(e).dimen.y+6)/2.0);
+ ED_label(e).set= NOTI(false);
+ miny = tp.y + 6/2.0;
+ maxy = miny + ED_label(e).dimen.y;
+ uminx = ctrx - (ED_label(e).dimen.x)/2.0;
+ umaxx = ctrx + (ED_label(e).dimen.x)/2.0;
for (i = 1; i < n_lbls; i++) {
- e = (Agedge_s) earray.plus(i).getPtr();
+ e = (ST_Agedge_s) earray.get(i);
if (i%2!=0) { /* down */
if (i == 1) {
- lminx = ctrx - (ED_label(e).getStruct("dimen").getDouble("x"))/2.0;
- lmaxx = ctrx + (ED_label(e).getStruct("dimen").getDouble("x"))/2.0;
+ lminx = ctrx - (ED_label(e).dimen.x)/2.0;
+ lmaxx = ctrx + (ED_label(e).dimen.x)/2.0;
}
- miny -= 6 + ED_label(e).getStruct("dimen").getDouble("y");
+ miny -= 6 + ED_label(e).dimen.y;
points.plus(0).setStruct(tp);
- points.plus(1).setDouble("x", tp.getDouble("x"));
+ points.plus(1).setDouble("x", tp.x);
points.plus(1).setDouble("y", miny - 6);
- points.plus(2).setDouble("x", hp.getDouble("x"));
- points.plus(2).setDouble("y", points.plus(1).getDouble("y"));
+ points.plus(2).setDouble("x", hp.x);
+ points.plus(2).setDouble("y", points.get(1).y);
points.plus(3).setStruct(hp);
points.plus(4).setDouble("x", lmaxx);
- points.plus(4).setDouble("y", hp.getDouble("y"));
+ points.plus(4).setDouble("y", hp.y);
points.plus(5).setDouble("x", lmaxx);
points.plus(5).setDouble("y", miny);
points.plus(6).setDouble("x", lminx);
points.plus(6).setDouble("y", miny);
points.plus(7).setDouble("x", lminx);
- points.plus(7).setDouble("y", tp.getDouble("y"));
- ctry = miny + (ED_label(e).getStruct("dimen").getDouble("y"))/2.0;
+ points.plus(7).setDouble("y", tp.y);
+ ctry = miny + (ED_label(e).dimen.y)/2.0;
}
else { /* up */
UNSUPPORTED("7owdudualx55z2cnm9x3iio0w"); // points[0] = tp;
@@ -1794,18 +1787,18 @@ UNSUPPORTED("56zheeat0b8mo4uvlcbvgbu80"); // points[7].y = maxy + 6;
UNSUPPORTED("ehcig8trxc4ble6pcochubv7z"); // ctry = maxy + (ED_label(e)->dimen.y)/2.0 + 6;
UNSUPPORTED("e2zgxycgqefryde9nbv6cqz1u"); // maxy += ED_label(e)->dimen.y + 6;
}
- poly.setInt("pn", 8);
- poly.setPtr("ps", points.asPtr());
+ poly.pn = 8;
+ poly.ps = points;
ps = simpleSplineRoute (tp, hp, poly, pn, et == (3 << 1));
if (pn[0] == 0) return;
- ED_label(e).getStruct("pos").setDouble("x", ctrx);
- ED_label(e).getStruct("pos").setDouble("y", ctry);
- ED_label(e).setBoolean("set", NOT(false));
- clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp());
+ ED_label(e).pos.setDouble("x", ctrx);
+ ED_label(e).pos.setDouble("y", ctry);
+ ED_label(e).set= NOTI(false);
+ clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
}
/* edges with no labels */
for (; i < cnt; i++) {
- e = (Agedge_s) earray.plus(i).getPtr();
+ e = (ST_Agedge_s) earray.get(i);
if (i%2!=0) { /* down */
if (i == 1) {
lminx = (2*leftend + rightend)/3.0;
@@ -1813,19 +1806,19 @@ UNSUPPORTED("e2zgxycgqefryde9nbv6cqz1u"); // maxy += ED_label(e)->dimen.y +
}
miny -= 6;
points.plus(0).setStruct(tp);
- points.plus(1).setDouble("x", tp.getDouble("x"));
+ points.plus(1).setDouble("x", tp.x);
points.plus(1).setDouble("y", miny - 6);
- points.plus(2).setDouble("x", hp.getDouble("x"));
- points.plus(2).setDouble("y", points.plus(1).getDouble("y"));
+ points.plus(2).setDouble("x", hp.x);
+ points.plus(2).setDouble("y", points.get(1).y);
points.plus(3).setStruct(hp);
points.plus(4).setDouble("x", lmaxx);
- points.plus(4).setDouble("y", hp.getDouble("y"));
+ points.plus(4).setDouble("y", hp.y);
points.plus(5).setDouble("x", lmaxx);
points.plus(5).setDouble("y", miny);
points.plus(6).setDouble("x", lminx);
points.plus(6).setDouble("y", miny);
points.plus(7).setDouble("x", lminx);
- points.plus(7).setDouble("y", tp.getDouble("y"));
+ points.plus(7).setDouble("y", tp.y);
}
else { /* up */
UNSUPPORTED("7owdudualx55z2cnm9x3iio0w"); // points[0] = tp;
@@ -1845,11 +1838,11 @@ UNSUPPORTED("5s3o04yf5lzca6ruuygfxngj2"); // points[7].x = tp.x;
UNSUPPORTED("56zheeat0b8mo4uvlcbvgbu80"); // points[7].y = maxy + 6;
UNSUPPORTED("7un2qk34mmmhqi296vl50bacs"); // maxy += + 6;
}
- poly.setInt("pn", 8);
- poly.setPtr("ps", points.asPtr());
+ poly.pn = 8;
+ poly.ps = points;
ps = simpleSplineRoute (tp, hp, poly, pn, et == (3 << 1));
if (pn[0] == 0) return;
- clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp());
+ clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
}
Memory.free (earray);
} finally {
@@ -1862,25 +1855,25 @@ LEAVING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels");
//3 8kqyzk43ovc2sq6jegua6ytp
// static void makeSimpleFlat (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et)
-public static void makeSimpleFlat(Agnode_s tn, Agnode_s hn, __ptr__ edges, int ind, int cnt, int et) {
+public static void makeSimpleFlat(ST_Agnode_s tn, ST_Agnode_s hn, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et) {
ENTERING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat");
try {
- Agedge_s e = (Agedge_s) edges.plus(ind).getPtr();
- final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 10);
- final __struct__<pointf> tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class);
+ ST_Agedge_s e = (ST_Agedge_s) edges.get(ind);
+ final ST_pointf.Array points = new ST_pointf.Array( 10);
+ final ST_pointf tp = new ST_pointf(), hp = new ST_pointf();
int i, pointn;
double stepy, dy;
- tp.___(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p")));
- hp.___(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p")));
+ tp.___(add_pointf(ND_coord(tn), (ST_pointf) ED_tail_port(e).p));
+ hp.___(add_pointf(ND_coord(hn), (ST_pointf) ED_head_port(e).p));
stepy = (cnt > 1) ? ND_ht(tn) / (double)(cnt - 1) : 0.;
- dy = tp.getDouble("y") - ((cnt > 1) ? ND_ht(tn) / 2. : 0.);
+ dy = tp.y - ((cnt > 1) ? ND_ht(tn) / 2. : 0.);
for (i = 0; i < cnt; i++) {
- e = (Agedge_s) edges.plus(ind + i).getPtr();
+ e = (ST_Agedge_s) edges.plus(ind + i).getPtr();
pointn = 0;
if ((et == (5 << 1)) || (et == (1 << 1))) {
points.plus(pointn++).setStruct(tp);
- points.plus(pointn++).setStruct(pointfof((2 * tp.getDouble("x") + hp.getDouble("x")) / 3, dy));
- points.plus(pointn++).setStruct(pointfof((2 * hp.getDouble("x") + tp.getDouble("x")) / 3, dy));
+ points.plus(pointn++).setStruct(pointfof((2 * tp.x + hp.x) / 3, dy));
+ points.plus(pointn++).setStruct(pointfof((2 * hp.x + tp.x) / 3, dy));
points.plus(pointn++).setStruct(hp);
}
else { /* ET_PLINE */
@@ -1896,7 +1889,7 @@ UNSUPPORTED("59cwjy3j5e0igp278migykzi"); // points[pointn++] = hp;
UNSUPPORTED("59cwjy3j5e0igp278migykzi"); // points[pointn++] = hp;
}
dy += stepy;
- clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo.amp());
+ clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo);
}
} finally {
LEAVING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat");
@@ -1908,24 +1901,24 @@ LEAVING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat");
//3 bhnjospwghq4plid12757c928
// static void make_flat_adj_edges(graph_t* g, path* P, edge_t** edges, int ind, int cnt, edge_t* e0, int et)
-public static void make_flat_adj_edges(Agraph_s g, path P, __ptr__ edges, int ind, int cnt, Agedge_s e0, int et) {
+public static void make_flat_adj_edges(ST_Agraph_s g, ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, ST_Agedge_s e0, int et) {
ENTERING("bhnjospwghq4plid12757c928","make_flat_adj_edges");
try {
- Agnode_s n;
- Agnode_s tn, hn;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agnode_s tn, hn;
+ ST_Agedge_s e;
int labels = 0, ports = 0;
- Agraph_s auxg;
- Agraph_s subg;
- Agnode_s auxt, auxh;
- Agedge_s auxe;
+ ST_Agraph_s auxg;
+ ST_Agraph_s subg;
+ ST_Agnode_s auxt, auxh;
+ ST_Agedge_s auxe;
int i, j, midx, midy, leftx, rightx;
- final __struct__<pointf> del = JUtils.from(pointf.class);
- Agedge_s hvye = null;
+ final ST_pointf del = new ST_pointf();
+ ST_Agedge_s hvye = null;
attr_state_t attrs;
tn = agtail(e0); hn = aghead(e0);
for (i = 0; i < cnt; i++) {
- e = (Agedge_s) edges.plus(ind + i).getPtr();
+ e = (ST_Agedge_s) edges.plus(ind + i).getPtr();
if (ED_label(e)!=null) labels++;
if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0) ports = 1;
}
@@ -2051,7 +2044,7 @@ LEAVING("bhnjospwghq4plid12757c928","make_flat_adj_edges");
//3 fybar4mljnmkh3kure5k1eod
// static void makeFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp, boolean isBegin)
-public static void makeFlatEnd(Agraph_s g, spline_info_t sp, path P, Agnode_s n, Agedge_s e, pathend_t endp, boolean isBegin) {
+public static void makeFlatEnd(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agnode_s n, ST_Agedge_s e, ST_pathend_t endp, boolean isBegin) {
ENTERING("fybar4mljnmkh3kure5k1eod","makeFlatEnd");
try {
final ST_boxf b = new ST_boxf();
@@ -2060,9 +2053,9 @@ try {
endp.setInt("sidemask", 1<<2);
if (isBegin) beginpath(P, e, 2, endp, false);
else endpath(P, e, 2, endp, false);
- b.UR.y = ((ST_boxf)endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct()).UR.y;
- b.LL.y = ((ST_boxf)endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct()).LL.y;
- b.___(makeregularend((ST_boxf) b, (1<<2), ND_coord(n).getDouble("y") + GD_rank(g).plus(ND_rank(n)).getDouble("ht2")));
+ b.UR.y = endp.boxes[endp.boxn - 1].UR.y;
+ b.LL.y = endp.boxes[endp.boxn - 1].LL.y;
+ b.___(makeregularend((ST_boxf) b, (1<<2), ND_coord(n).y + GD_rank(g).get(ND_rank(n)).ht2));
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
UNSUPPORTED("cmjm4y40vf7wklmgz0ae4k36v"); // endp->boxes[endp->boxn++] = b;
} finally {
@@ -2100,23 +2093,23 @@ throw new UnsupportedOperationException();
//3 w8ptjibydq995d2lexg85mku
// static void make_flat_labeled_edge(graph_t* g, spline_info_t* sp, path* P, edge_t* e, int et)
-public static void make_flat_labeled_edge(Agraph_s g, spline_info_t sp, path P, Agedge_s e, int et) {
+public static void make_flat_labeled_edge(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agedge_s e, int et) {
ENTERING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge");
try {
- Agnode_s tn, hn, ln;
- pointf ps = null;
- final __struct__<pathend_t> tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class);
+ ST_Agnode_s tn, hn, ln;
+ ST_pointf.Array ps = null;
+ final ST_pathend_t tend = new ST_pathend_t(), hend = new ST_pathend_t();
final ST_boxf lb = new ST_boxf();
int boxn, i, ydelta;
int pn[] = new int[1];
- Agedge_s f;
- final __array_of_struct__ points = __array_of_struct_impl__.malloc(pointf.class, 7);
+ ST_Agedge_s f;
+ final ST_pointf.Array points = new ST_pointf.Array( 7);
tn = agtail(e);
hn = aghead(e);
for (f = ED_to_virt(e); ED_to_virt(f)!=null; f = ED_to_virt(f));
ln = agtail(f);
ED_label(e).setStruct("pos", ND_coord(ln));
- ED_label(e).setBoolean("set", NOT(false));
+ ED_label(e).set= NOTI(false);
if (et == (1 << 1)) {
UNSUPPORTED("ataaqkehwb736ts2x6olzqokx"); // pointf startp, endp, lp;
UNSUPPORTED("48h6vk2e5niep4dmpua377248"); // startp = add_pointf(ND_coord(tn), ED_tail_port(e).p);
@@ -2130,39 +2123,39 @@ UNSUPPORTED("68ojpcos92c96bc0i5ag1yb6v"); // ps = points;
UNSUPPORTED("1uunj4jbr2uhiqxwor6rzmr3j"); // pn = 7;
}
else {
- lb.LL.x = ND_coord(ln).getDouble("x") - ND_lw(ln);
- lb.UR.x = ND_coord(ln).getDouble("x") + ND_rw(ln);
- lb.UR.y = ND_coord(ln).getDouble("y") + ND_ht(ln)/2;
- ydelta = (int)(ND_coord(ln).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1") -
- ND_coord(tn).getDouble("y") + GD_rank(g).plus(ND_rank(tn)).getDouble("ht2"));
+ lb.LL.x = ND_coord(ln).x - ND_lw(ln);
+ lb.UR.x = ND_coord(ln).x + ND_rw(ln);
+ lb.UR.y = ND_coord(ln).y + ND_ht(ln)/2;
+ ydelta = (int)(ND_coord(ln).y - GD_rank(g).get(ND_rank(tn)).ht1 -
+ ND_coord(tn).y + GD_rank(g).get(ND_rank(tn)).ht2);
ydelta = (int)(ydelta / 6.);
lb.LL.y = lb.UR.y - MAX(5.,ydelta);
boxn = 0;
- makeFlatEnd (g, sp, P, tn, e, tend.amp(), NOT(false));
- makeFlatEnd (g, sp, P, hn, e, hend.amp(), false);
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).UR.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = lb.LL.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.LL.y;
+ makeFlatEnd (g, sp, P, tn, e, tend, NOT(false));
+ makeFlatEnd (g, sp, P, hn, e, hend, false);
+ ((Z.z().boxes[boxn])).LL.x = (tend).boxes[tend.boxn - 1].LL.x;
+ ((Z.z().boxes[boxn])).LL.y = (tend).boxes[tend.boxn - 1].UR.y;
+ ((Z.z().boxes[boxn])).UR.x = lb.LL.x;
+ ((Z.z().boxes[boxn])).UR.y = lb.LL.y;
boxn++;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = lb.LL.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.UR.y;
+ ((Z.z().boxes[boxn])).LL.x = (tend).boxes[tend.boxn - 1].LL.x;
+ ((Z.z().boxes[boxn])).LL.y = lb.LL.y;
+ ((Z.z().boxes[boxn])).UR.x = (hend).boxes[hend.boxn - 1].UR.x;
+ ((Z.z().boxes[boxn])).UR.y = lb.UR.y;
boxn++;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = lb.UR.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.LL.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.x;
+ ((Z.z().boxes[boxn])).LL.x = lb.UR.x;
+ ((Z.z().boxes[boxn])).UR.y = lb.LL.y;
+ ((Z.z().boxes[boxn])).LL.y = (hend).boxes[hend.boxn - 1].UR.y;
+ ((Z.z().boxes[boxn])).UR.x = (hend).boxes[hend.boxn - 1].UR.x;
boxn++;
- for (i = 0; i < tend.getInt("boxn"); i++) add_box(P, (ST_boxf)tend.getArrayOfStruct("boxes").plus(i).getStruct());
- for (i = 0; i < boxn; i++) add_box(P, (ST_boxf)Z.z().boxes.plus(i).getStruct());
- for (i = hend.getInt("boxn") - 1; i >= 0; i--) add_box(P, (ST_boxf)hend.getArrayOfStruct("boxes").plus(i).getStruct());
+ for (i = 0; i < tend.boxn; i++) add_box(P, (tend).boxes[i]);
+ for (i = 0; i < boxn; i++) add_box(P, Z.z().boxes[i]);
+ for (i = hend.boxn - 1; i >= 0; i--) add_box(P, (hend).boxes[i]);
if (et == (5 << 1)) ps = routesplines(P, pn);
else ps = routepolylines(P, pn);
if (pn[0] == 0) return;
}
- clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp());
+ clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
} finally {
LEAVING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge");
}
@@ -2242,26 +2235,26 @@ throw new UnsupportedOperationException();
//3 6yr3jfkljl5w0z6dv354ryx63
// static void make_flat_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et)
-public static void make_flat_edge(Agraph_s g, spline_info_t sp, path P, __ptr__ edges, int ind, int cnt, int et) {
+public static void make_flat_edge(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et) {
ENTERING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge");
try {
- Agnode_s tn, hn;
- final __struct__<Agedgeinfo_t> fwdedgei = JUtils.from(Agedgeinfo_t.class);
- final __struct__<Agedgepair_s> fwdedge = JUtils.from(Agedgepair_s.class);
- Agedge_s e;
+ ST_Agnode_s tn, hn;
+ final ST_Agedgeinfo_t fwdedgei = new ST_Agedgeinfo_t();
+ final ST_Agedgepair_s fwdedge = new ST_Agedgepair_s();
+ ST_Agedge_s e;
int j, i, r, isAdjacent;
double stepx, stepy, vspace;
int tside, hside;
int pn[] = new int[] {0};
- pointf ps;
- final __struct__<pathend_t> tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class);
- fwdedge.getStruct("out").getStruct("base").setPtr("data", fwdedgei.amp());
+ ST_pointf.Array ps;
+ final ST_pathend_t tend = new ST_pathend_t(), hend = new ST_pathend_t();
+ fwdedge.out.base.setPtr("data", fwdedgei);
/* Get sample edge; normalize to go from left to right */
- e = (Agedge_s) edges.plus(ind).getPtr();
+ e = (ST_Agedge_s) edges.get(ind);
isAdjacent = ED_adjacent(e);
if ((ED_tree_index(e) & 32)!=0) {
- MAKEFWDEDGE(fwdedge.getStruct("out").amp(), e);
- e = (Agedge_s) fwdedge.getStruct("out").amp();
+ MAKEFWDEDGE(fwdedge.out, e);
+ e = (ST_Agedge_s) fwdedge.out;
}
for (i = 1; i < cnt; i++) {
if (ED_adjacent(edges.plus(ind+i).getPtr())!=0) {
@@ -2284,8 +2277,8 @@ try {
makeSimpleFlat (agtail(e), aghead(e), edges, ind, cnt, et);
return;
}
- tside = ED_tail_port(e).getInt("side");
- hside = ED_head_port(e).getInt("side");
+ tside = ED_tail_port(e).side;
+ hside = ED_head_port(e).side;
if (((tside == (1<<0)) && (hside != (1<<2))) ||
((hside == (1<<0)) && (tside != (1<<2)))) {
make_flat_bottom_edges (g, sp, P, edges, ind, cnt, e, et == (5 << 1));
@@ -2295,52 +2288,52 @@ try {
hn = aghead(e);
r = ND_rank(tn);
if (r > 0) {
- __ptr__ prevr;
+ ST_rank_t.Array2 prevr;
if ((GD_has_labels(g) & (1 << 0))!=0)
prevr = GD_rank(g).plus(r-2);
else
prevr = GD_rank(g).plus(r-1);
- vspace = ND_coord(prevr.getPtr().getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - prevr.getPtr().getDouble("ht1")
- - ND_coord(tn).getDouble("y") - GD_rank(g).plus(r).getDouble("ht2");
+ vspace = ND_coord(prevr.getPtr().v.get(0)).y - prevr.getPtr().ht1
+ - ND_coord(tn).y - GD_rank(g).get(r).ht2;
}
else {
vspace = GD_ranksep(g);
}
- stepx = ((double)sp.getInt("Multisep")) / (cnt+1);
+ stepx = ((double)sp.Multisep) / (cnt+1);
stepy = vspace / (cnt+1);
- makeFlatEnd (g, sp, P, tn, e, tend.amp(), true);
- makeFlatEnd (g, sp, P, hn, e, hend.amp(), false);
+ makeFlatEnd (g, sp, P, tn, e, tend, true);
+ makeFlatEnd (g, sp, P, hn, e, hend, false);
for (i = 0; i < cnt; i++) {
int boxn;
final ST_boxf b = new ST_boxf();
- e = (Agedge_s) edges.plus(ind + i).getPtr();
+ e = (ST_Agedge_s) edges.plus(ind + i).getPtr();
boxn = 0;
- b.___(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct());
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = b.LL.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = b.UR.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = b.UR.x + (i + 1) * stepx;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = b.UR.y + (i + 1) * stepy;
+ b.___((tend).boxes[tend.boxn - 1]);
+ ((Z.z().boxes[boxn])).LL.x = b.LL.x;
+ ((Z.z().boxes[boxn])).LL.y = b.UR.y;
+ ((Z.z().boxes[boxn])).UR.x = b.UR.x + (i + 1) * stepx;
+ ((Z.z().boxes[boxn])).UR.y = b.UR.y + (i + 1) * stepy;
boxn++;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct())).LL.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)Z.z().boxes.plus(boxn-1).getStruct()).UR.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct())).UR.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y + stepy;
+ ((Z.z().boxes[boxn])).LL.x = ((ST_boxf)((tend).boxes[tend.boxn - 1])).LL.x;
+ ((Z.z().boxes[boxn])).LL.y = (Z.z().boxes[boxn-1]).UR.y;
+ ((Z.z().boxes[boxn])).UR.x = ((ST_boxf)((hend).boxes[hend.boxn - 1])).UR.x;
+ ((Z.z().boxes[boxn])).UR.y = ((Z.z().boxes[boxn])).LL.y + stepy;
boxn++;
- b.___(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct());
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = b.UR.x;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = b.UR.y;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = b.LL.x - (i + 1) * stepx;
- ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = ((ST_boxf)Z.z().boxes.plus(boxn-1).getStruct()).LL.y;
+ b.___((hend).boxes[hend.boxn - 1]);
+ ((Z.z().boxes[boxn])).UR.x = b.UR.x;
+ ((Z.z().boxes[boxn])).LL.y = b.UR.y;
+ ((Z.z().boxes[boxn])).LL.x = b.LL.x - (i + 1) * stepx;
+ ((Z.z().boxes[boxn])).UR.y = (Z.z().boxes[boxn-1]).LL.y;
boxn++;
- for (j = 0; j < tend.getInt("boxn"); j++) add_box(P, (ST_boxf)tend.getArrayOfStruct("boxes").plus(j).getStruct());
- for (j = 0; j < boxn; j++) add_box(P, (ST_boxf)Z.z().boxes.plus(j).getStruct());
- for (j = hend.getInt("boxn") - 1; j >= 0; j--) add_box(P, (ST_boxf)hend.getArrayOfStruct("boxes").plus(j).getStruct());
- if (et == (5 << 1)) ps = (pointf) routesplines(P, pn);
- else ps = (pointf) routepolylines(P, pn);
+ for (j = 0; j < tend.boxn; j++) add_box(P, (tend).boxes[j]);
+ for (j = 0; j < boxn; j++) add_box(P, Z.z().boxes[j]);
+ for (j = hend.boxn - 1; j >= 0; j--) add_box(P, (hend).boxes[j]);
+ if (et == (5 << 1)) ps = routesplines(P, pn);
+ else ps = routepolylines(P, pn);
if (pn[0] == 0)
return;
- clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo.amp());
- P.setInt("nbox", 0);
+ clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
+ P.nbox = 0;
}
} finally {
LEAVING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge");
@@ -2370,7 +2363,7 @@ throw new UnsupportedOperationException();
//3 2n9bpvx34fnukqu1f9u4v7v6n
// static int makeLineEdge(graph_t* g, edge_t* fe, pointf* points, node_t** hp)
-public static int makeLineEdge(Agraph_s g, Agedge_s fe, __ptr__ points, __ptr__ hp) {
+public static int makeLineEdge(ST_Agraph_s g, ST_Agedge_s fe, __ptr__ points, __ptr__ hp) {
ENTERING("2n9bpvx34fnukqu1f9u4v7v6n","makeLineEdge");
try {
UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int
@@ -2441,37 +2434,37 @@ LEAVING("2n9bpvx34fnukqu1f9u4v7v6n","makeLineEdge");
-//3 30wfq1dby4t07hft9io52nq6z
-// static void make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et)
//private static __ptr__ pointfs;
//private static __ptr__ pointfs2;
//private static int numpts;
//private static int numpts2;
-public static void make_regular_edge(Agraph_s g, spline_info_t sp, path P, __ptr__ edges, int ind, int cnt, int et) {
+//3 30wfq1dby4t07hft9io52nq6z
+// static void make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et)
+public static void make_regular_edge(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et) {
ENTERING("30wfq1dby4t07hft9io52nq6z","make_regular_edge");
try {
- Agnode_s tn, hn = null;
- final __struct__<Agedgeinfo_t> fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class), fwdedgei = JUtils.from(Agedgeinfo_t.class);
- final __struct__<Agedgepair_s> fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class), fwdedge = JUtils.from(Agedgepair_s.class);
- Agedge_s e, fe, le, segfirst;
- pointf ps = null;
- final __struct__<pathend_t> tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class);
+ ST_Agnode_s tn, hn = null;
+ final ST_Agedgeinfo_t fwdedgeai = new ST_Agedgeinfo_t(), fwdedgebi = new ST_Agedgeinfo_t(), fwdedgei = new ST_Agedgeinfo_t();
+ final ST_Agedgepair_s fwdedgea = new ST_Agedgepair_s(), fwdedgeb = new ST_Agedgepair_s(), fwdedge = new ST_Agedgepair_s();
+ ST_Agedge_s e, fe, le, segfirst;
+ ST_pointf.Array ps = null;
+ final ST_pathend_t tend = new ST_pathend_t(), hend = new ST_pathend_t();
final ST_boxf b = new ST_boxf();
int boxn, sl, si, i, j, dx, hackflag, longedge;
boolean smode;
int pn[] = new int[] {0};
int pointn[] = new int[] {0};
- fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp());
- fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp());
- fwdedge.getStruct("out").getStruct("base").setPtr("data", fwdedgei.amp());
+ fwdedgea.out.base.setPtr("data", fwdedgeai);
+ fwdedgeb.out.base.setPtr("data", fwdedgebi);
+ fwdedge.out.base.setPtr("data", fwdedgei);
if (N(Z.z().pointfs)) {
- Z.z().pointfs = gmalloc(sizeof(pointf.class, 2000));
- Z.z().pointfs2 = gmalloc(sizeof(pointf.class, 2000));
+ Z.z().pointfs = new ST_pointf.Array(2000);
+ Z.z().pointfs2 = new ST_pointf.Array(2000);
Z.z().numpts = 2000;
Z.z().numpts2 = 2000;
}
sl = 0;
- e = (Agedge_s) edges.plus(ind).getPtr();
+ e = (ST_Agedge_s) edges.get(ind);
hackflag = 0;
if (ABS(ND_rank(agtail(e)) - ND_rank(aghead(e))) > 1) {
UNSUPPORTED("8f17srpa5iisomehrb4b01h51"); // fwdedgeai = *(Agedgeinfo_t*)e->base.data;
@@ -2499,8 +2492,8 @@ UNSUPPORTED("eih8eaai768x1un5mixrtgstp"); // e = &fwdedgea.out;
UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0);
} else {
if ((ED_tree_index(e) & 32)!=0) {
- MAKEFWDEDGE(fwdedgea.getPtr("out"), e);
- e = (Agedge_s) fwdedgea.getPtr("out");
+ MAKEFWDEDGE(fwdedgea.out, e);
+ e = fwdedgea.out;
}
}
fe = e;
@@ -2515,24 +2508,24 @@ UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0);
tn = agtail(e);
hn = aghead(e);
b.___(maximal_bbox(g, sp, tn, null, e));
- tend.getStruct("nb").___(b);
- beginpath(P, e, 1, tend.amp(), spline_merge(tn));
+ tend.nb.___(b);
+ beginpath(P, e, 1, tend, spline_merge(tn));
b.UR.y =
- ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).UR.y;
+ (tend).boxes[tend.boxn - 1].UR.y;
b.LL.y =
- ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.y;
+ (tend).boxes[tend.boxn - 1].LL.y;
b.___(makeregularend(b, (1<<0),
- ND_coord(tn).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1")));
+ ND_coord(tn).y - GD_rank(g).get(ND_rank(tn)).ht1));
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
{
- tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn")).setStruct(b);
- tend.setInt("boxn", tend.getInt("boxn") + 1);
+ tend.boxes[tend.boxn].___(b);
+ tend.setInt("boxn", tend.boxn + 1);
}
longedge = 0;
smode = false; si = -1;
- while (ND_node_type(hn) == 1 && N(((Boolean)Z.z().sinfo.call("splineMerge", hn)).booleanValue())) {
+ while (ND_node_type(hn) == 1 && N(((Boolean)Z.z().sinfo.splineMerge.exe(hn)).booleanValue())) {
longedge = 1;
- Z.z().boxes.plus(boxn++).setStruct(rank_box(sp, g, ND_rank(tn)));
+ Z.z().boxes[boxn++].___(rank_box(sp, g, ND_rank(tn)));
if (N(smode)
&& ((sl = straight_len(hn)) >=
((GD_has_labels(g) & (1 << 0))!=0 ? 4 + 1 : 2 + 1))) {
@@ -2541,21 +2534,21 @@ UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0);
}
if (N(smode) || si > 0) {
si--;
- Z.z().boxes.plus(boxn++).setStruct( maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getFromList(0)));
- e = (Agedge_s) ND_out(hn).getFromList(0);
+ Z.z().boxes[boxn++].___(maximal_bbox(g, sp, hn, e, (ST_Agedge_s) ND_out(hn).getFromList(0)));
+ e = (ST_Agedge_s) ND_out(hn).getFromList(0);
tn = agtail(e);
hn = aghead(e);
continue;
}
- hend.setStruct("nb", maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getFromList(0)));
- endpath(P, e, 1, hend.amp(), spline_merge(aghead(e)));
- b.___(makeregularend((ST_boxf) hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct(), (1<<2),
- ND_coord(hn).getDouble("y") + GD_rank(g).plus(ND_rank(hn)).getDouble("ht2")));
+ hend.setStruct("nb", maximal_bbox(g, sp, hn, e, (ST_Agedge_s) ND_out(hn).getFromList(0)));
+ endpath(P, e, 1, hend, spline_merge(aghead(e)));
+ b.___(makeregularend((hend).boxes[hend.boxn - 1], (1<<2),
+ ND_coord(hn).y + GD_rank(g).get(ND_rank(hn)).ht2));
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
UNSUPPORTED("1crhubfzekx1qi2ti9ajqsfoc"); // hend.boxes[hend.boxn++] = b;
- P.getStruct("end").setDouble("theta", M_PI / 2);
- P.getStruct("end").setBoolean("constrained", NOT(false));
- completeregularpath(P, segfirst, e, tend.amp(), hend.amp(), Z.z().boxes, boxn, 1);
+ P.end.setDouble("theta", M_PI / 2);
+ P.end.constrained= NOTI(false);
+ completeregularpath(P, segfirst, e, tend, hend, Z.z().boxes, boxn, 1);
if (splines) ps = routesplines(P, pn);
else {
UNSUPPORTED("biyp75vm751j3qmqacagfej4b"); // ps = routepolylines (P, &pn);
@@ -2577,36 +2570,36 @@ UNSUPPORTED("8kbxhk7qirj3tr7hn1ukwar3h"); // pointfs = RALLOC(numpts, pointfs,
for (i = 0; i < pn[0]; i++) {
Z.z().pointfs.plus(pointn[0]++).setStruct(ps.plus(i).getStruct());
}
- e = straight_path((Agedge_s)ND_out(hn).getFromList(0), sl, Z.z().pointfs, pointn);
+ e = straight_path((ST_Agedge_s)ND_out(hn).getFromList(0), sl, Z.z().pointfs, pointn);
recover_slack(segfirst, P);
segfirst = e;
tn = agtail(e);
hn = aghead(e);
boxn = 0;
- tend.setStruct("nb", maximal_bbox(g, sp, tn, (Agedge_s) ND_in(tn).getFromList(0), e));
- beginpath(P, e, 1, tend.amp(), spline_merge(tn));
- b.___(makeregularend((ST_boxf) tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct(), (1<<0),
- ND_coord(tn).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1")));
+ tend.setStruct("nb", maximal_bbox(g, sp, tn, (ST_Agedge_s) ND_in(tn).getFromList(0), e));
+ beginpath(P, e, 1, tend, spline_merge(tn));
+ b.___(makeregularend((tend).boxes[tend.boxn - 1], (1<<0),
+ ND_coord(tn).y - GD_rank(g).get(ND_rank(tn)).ht1));
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
UNSUPPORTED("cjx6tldge3otk1pk6ks1pkn2w"); // tend.boxes[tend.boxn++] = b;
- P.getStruct("start").setDouble("theta", -M_PI / 2);
- P.getStruct("start").setBoolean("constrained", NOT(false));
+ P.start.setDouble("theta", -M_PI / 2);
+ P.start.constrained= NOTI(false);
smode = false;
}
- Z.z().boxes.plus(boxn++).setStruct(rank_box(sp, g, ND_rank(tn)));
+ Z.z().boxes[boxn++].___(rank_box(sp, g, ND_rank(tn)));
b.___(maximal_bbox(g, sp, hn, e, null));
- hend.getStruct("nb").___(b);
- endpath(P, hackflag!=0 ? fwdedgeb.getStruct("out").amp() : e, 1, hend.amp(), spline_merge(aghead(e)));
- b.UR.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.y;
- b.LL.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).LL.y;
+ hend.nb.___(b);
+ endpath(P, (ST_Agedge_s) (hackflag!=0 ? fwdedgeb.out : e), 1, hend, spline_merge(aghead(e)));
+ b.UR.y = (hend).boxes[hend.boxn - 1].UR.y;
+ b.LL.y = (hend).boxes[hend.boxn - 1].LL.y;
b.___(makeregularend(b, (1<<2),
- ND_coord(hn).getDouble("y") + GD_rank(g).plus(ND_rank(hn)).getDouble("ht2")));
+ ND_coord(hn).y + GD_rank(g).get(ND_rank(hn)).ht2));
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
{
- hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn")).setStruct(b);
- hend.setInt("boxn", hend.getInt("boxn")+1);
+ hend.boxes[hend.boxn].___(b);
+ hend.setInt("boxn", hend.boxn+1);
}
- completeregularpath(P, segfirst, e, tend.amp(), hend.amp(), Z.z().boxes, boxn,
+ completeregularpath(P, segfirst, e, tend, hend, Z.z().boxes, boxn,
longedge);
if (splines) ps = routesplines(P, pn);
else ps = routepolylines (P, pn);
@@ -2630,34 +2623,34 @@ UNSUPPORTED("bedaqcn9h03q6ia6zbezuee1m"); // pointfs = RALLOC(numpts, point
pointn[0]++;
}
recover_slack(segfirst, P);
- hn = hackflag!=0 ? aghead(fwdedgeb.getStruct("out").amp()) : aghead(e);
+ hn = hackflag!=0 ? aghead(fwdedgeb.out) : aghead(e);
}
/* make copies of the spline points, one per multi-edge */
if (cnt == 1) {
- clip_and_install(fe, hn, Z.z().pointfs, pointn[0], Z.z().sinfo.amp());
+ clip_and_install(fe, hn, Z.z().pointfs, pointn[0], Z.z().sinfo);
return;
}
- dx = sp.getInt("Multisep") * (cnt - 1) / 2;
+ dx = sp.Multisep * (cnt - 1) / 2;
for (i = 1; i < pointn[0] - 1; i++)
- Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.plus(i).getDouble("x") - dx);
+ Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.get(i).x - dx);
if (Z.z().numpts > Z.z().numpts2) {
UNSUPPORTED("9ubr4m7bdv5f5ldk2ta6yw3up"); // numpts2 = numpts;
UNSUPPORTED("8qwp7ddy5ztgam63fzfjmu890"); // pointfs2 = RALLOC(numpts2, pointfs2, pointf);
}
for (i = 0; i < pointn[0]; i++)
Z.z().pointfs2.plus(i).setStruct(Z.z().pointfs.plus(i).getStruct());
- clip_and_install(fe, hn, Z.z().pointfs2, pointn[0], Z.z().sinfo.amp());
+ clip_and_install(fe, hn, Z.z().pointfs2, pointn[0], Z.z().sinfo);
for (j = 1; j < cnt; j++) {
- e = (Agedge_s) edges.plus(ind + j).getPtr();
+ e = (ST_Agedge_s) edges.plus(ind + j).getPtr();
if ((ED_tree_index(e) & 32)!=0) {
- MAKEFWDEDGE(fwdedge.getStruct("out").amp(), e);
- e = (Agedge_s) fwdedge.getStruct("out").amp();
+ MAKEFWDEDGE(fwdedge.out, e);
+ e = (ST_Agedge_s) fwdedge.out;
}
for (i = 1; i < pointn[0] - 1; i++)
- Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.plus(i).getDouble("x") + sp.getInt("Multisep"));
+ Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.get(i).x + sp.Multisep);
for (i = 0; i < pointn[0]; i++)
Z.z().pointfs2.plus(i).setStruct(Z.z().pointfs.plus(i).getStruct());
- clip_and_install(e, aghead(e), Z.z().pointfs2, pointn[0], Z.z().sinfo.amp());
+ clip_and_install(e, aghead(e), Z.z().pointfs2, pointn[0], Z.z().sinfo);
}
} finally {
LEAVING("30wfq1dby4t07hft9io52nq6z","make_regular_edge");
@@ -2669,13 +2662,13 @@ LEAVING("30wfq1dby4t07hft9io52nq6z","make_regular_edge");
//3 va61hggynvb6z6j34w7otmab
// static void completeregularpath(path * P, edge_t * first, edge_t * last, pathend_t * tendp, pathend_t * hendp, boxf * boxes, int boxn, int flag)
-public static void completeregularpath(path P, Agedge_s first, Agedge_s last, pathend_t tendp, pathend_t hendp, __array_of_struct__ boxes, int boxn, int flag) {
+public static void completeregularpath(ST_path P, ST_Agedge_s first, ST_Agedge_s last, ST_pathend_t tendp, ST_pathend_t hendp, ST_boxf[] boxes, int boxn, int flag) {
ENTERING("va61hggynvb6z6j34w7otmab","completeregularpath");
try {
- Agedge_s uleft, uright, lleft, lright;
+ ST_Agedge_s uleft, uright, lleft, lright;
int i, fb, lb;
- splines spl;
- pointf pp;
+ ST_splines spl;
+ ST_pointf.Array pp;
int pn;
fb = lb = -1;
uleft = uright = null;
@@ -2683,35 +2676,35 @@ try {
uright = top_bound(first, 1);
if (uleft!=null) {
if (N(spl = getsplinepoints(uleft))) return;
- pp = (pointf) spl.getArrayOfPtr("list").plus(0).getPtr().getPtr("list");
- pn = spl.getArrayOfPtr("list").plus(0).getPtr().getInt("size");
+ pp = ((ST_bezier)spl.list.get(0).getPtr()).list;
+ pn = spl.list.get(0).size;
}
if (uright!=null) {
if (N(spl = getsplinepoints(uright))) return;
- pp = (pointf) spl.getArrayOfPtr("list").plus(0).getPtr().getPtr("list");
- pn = spl.getArrayOfPtr("list").plus(0).getPtr().getInt("size");
+ pp = ((ST_bezier)spl.list.get(0).getPtr()).list;
+ pn = spl.list.get(0).size;
}
lleft = lright = null;
lleft = bot_bound(last, -1);
lright = bot_bound(last, 1);
if (lleft!=null) {
if (N(spl = getsplinepoints(lleft))) return;
- pp = (pointf) spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getPtr("list");
- pn = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getInt("size");
+ pp = ((ST_bezier)spl.list.plus(spl.size - 1).getPtr().getPtr()).list;
+ pn = spl.list.plus(spl.size - 1).getPtr().size;
}
if (lright!=null) {
if (N(spl = getsplinepoints(lright))) return;
- pp = (pointf) spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getPtr("list");
- pn = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getInt("size");
+ pp = ((ST_bezier)spl.list.plus(spl.size - 1).getPtr().getPtr()).list;
+ pn = spl.list.plus(spl.size - 1).getPtr().size;
}
- for (i = 0; i < tendp.getInt("boxn"); i++)
- add_box(P, (ST_boxf)tendp.getArrayOfStruct("boxes").plus(i).getStruct());
- fb = P.getInt("nbox") + 1;
+ for (i = 0; i < tendp.boxn; i++)
+ add_box(P, (tendp).boxes[i]);
+ fb = P.nbox + 1;
lb = fb + boxn - 3;
for (i = 0; i < boxn; i++)
- add_box(P, (ST_boxf)boxes.plus(i).getStruct());
- for (i = hendp.getInt("boxn") - 1; i >= 0; i--)
- add_box(P, (ST_boxf)hendp.getArrayOfStruct("boxes").plus(i).getStruct());
+ add_box(P, boxes[i]);
+ for (i = hendp.boxn - 1; i >= 0; i--)
+ add_box(P, (hendp).boxes[i]);
adjustregularpath(P, fb, lb);
} finally {
LEAVING("va61hggynvb6z6j34w7otmab","completeregularpath");
@@ -2723,14 +2716,14 @@ LEAVING("va61hggynvb6z6j34w7otmab","completeregularpath");
//3 3wwhczhpkcnflwr1l9wcga7tq
// static boxf makeregularend(boxf b, int side, double y)
-public static __struct__<boxf> makeregularend(final ST_boxf b, int side, double y) {
+public static ST_boxf makeregularend(final ST_boxf b, int side, double y) {
// WARNING!! STRUCT
return makeregularend_w_(b.copy(), side, y).copy();
}
-private static __struct__<boxf> makeregularend_w_(final ST_boxf b, int side, double y) {
+private static ST_boxf makeregularend_w_(final ST_boxf b, int side, double y) {
ENTERING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend");
try {
- final __struct__<boxf> newb = JUtils.from(boxf.class);
+ final ST_boxf newb = new ST_boxf();
switch (side) {
case (1<<0):
newb.___(boxfof(b.LL.x, y, b.UR.x, b.LL.y));
@@ -2750,40 +2743,40 @@ LEAVING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend");
//3 88xrlzjovkxcnay9b2y5zyiid
// static void adjustregularpath(path * P, int fb, int lb)
-public static void adjustregularpath(path P, int fb, int lb) {
+public static void adjustregularpath(ST_path P, int fb, int lb) {
ENTERING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath");
try {
- boxf bp1, bp2;
+ ST_boxf bp1, bp2;
int i, x;
for (i = fb-1; i < lb+1; i++) {
- bp1 = P.getArrayOfPtr("boxes").plus(i).getStruct().amp();
+ bp1 = (ST_boxf) P.boxes[i];
if ((i - fb) % 2 == 0) {
- if (bp1.getStruct("LL").getDouble("x") >= bp1.getStruct("UR").getDouble("x")) {
- x = (int)((bp1.getStruct("LL").getDouble("x") + bp1.getStruct("UR").getDouble("x")) / 2);
- bp1.getStruct("LL").setDouble("x", x - 8);
- bp1.getStruct("UR").setDouble("x", x + 8);
+ if (bp1.LL.x >= bp1.UR.x) {
+ x = (int)((bp1.LL.x + bp1.UR.x) / 2);
+ bp1.LL.setDouble("x", x - 8);
+ bp1.UR.setDouble("x", x + 8);
}
} else {
- if (bp1.getStruct("LL").getDouble("x") + 16 > bp1.getStruct("UR").getDouble("x")) {
- x = (int)((bp1.getStruct("LL").getDouble("x") + bp1.getStruct("UR").getDouble("x")) / 2);
- bp1.getStruct("LL").setDouble("x", x - 8);
- bp1.getStruct("UR").setDouble("x", x + 8);
+ if (bp1.LL.x + 16 > bp1.UR.x) {
+ x = (int)((bp1.LL.x + bp1.UR.x) / 2);
+ bp1.LL.setDouble("x", x - 8);
+ bp1.UR.setDouble("x", x + 8);
}
}
}
- for (i = 0; i < P.getInt("nbox") - 1; i++) {
- bp1 = P.getArrayOfPtr("boxes").plus(i).getStruct().amp();
- bp2 = P.getArrayOfPtr("boxes").plus(i+1).getStruct().amp();
+ for (i = 0; i < P.nbox - 1; i++) {
+ bp1 = (ST_boxf) P.boxes[i];
+ bp2 = (ST_boxf) P.boxes[i+1];
if (i >= fb && i <= lb && (i - fb) % 2 == 0) {
- if (bp1.getStruct("LL").getDouble("x") + 16 > bp2.getStruct("UR").getDouble("x"))
- bp2.getStruct("UR").setDouble("x", bp1.getStruct("LL").getDouble("x") + 16);
- if (bp1.getStruct("UR").getDouble("x") - 16 < bp2.getStruct("LL").getDouble("x"))
- bp2.getStruct("LL").setDouble("x", bp1.getStruct("UR").getDouble("x") - 16);
+ if (bp1.LL.x + 16 > bp2.UR.x)
+ bp2.UR.setDouble("x", bp1.LL.x + 16);
+ if (bp1.UR.x - 16 < bp2.LL.x)
+ bp2.LL.setDouble("x", bp1.UR.x - 16);
} else if (i + 1 >= fb && i < lb && (i + 1 - fb) % 2 == 0) {
- if (bp1.getStruct("LL").getDouble("x") + 16 > bp2.getStruct("UR").getDouble("x"))
- bp1.getStruct("LL").setDouble("x", bp2.getStruct("UR").getDouble("x") - 16);
- if (bp1.getStruct("UR").getDouble("x") - 16 < bp2.getStruct("LL").getDouble("x"))
- bp1.getStruct("UR").setDouble("x", bp2.getStruct("LL").getDouble("x") + 16);
+ if (bp1.LL.x + 16 > bp2.UR.x)
+ bp1.LL.setDouble("x", bp2.UR.x - 16);
+ if (bp1.UR.x - 16 < bp2.LL.x)
+ bp1.UR.setDouble("x", bp2.LL.x + 16);
}
}
} finally {
@@ -2796,26 +2789,26 @@ LEAVING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath");
//3 bajn5vx0isu427n6dh131b985
// static boxf rank_box(spline_info_t* sp, graph_t * g, int r)
-public static ST_boxf rank_box(spline_info_t sp, Agraph_s g, int r) {
+public static ST_boxf rank_box(ST_spline_info_t sp, ST_Agraph_s g, int r) {
// WARNING!! STRUCT
return rank_box_w_(sp, g, r).copy();
}
-private static ST_boxf rank_box_w_(spline_info_t sp, Agraph_s g, int r) {
+private static ST_boxf rank_box_w_(ST_spline_info_t sp, ST_Agraph_s g, int r) {
ENTERING("bajn5vx0isu427n6dh131b985","rank_box");
try {
final ST_boxf b = new ST_boxf();
- Agnode_s /* *right0, *right1, */ left0, left1;
- b.___(sp.getPtr("Rank_box").plus(r).getStruct());
+ ST_Agnode_s /* *right0, *right1, */ left0, left1;
+ b.___(sp.Rank_box[r]);
if (b.LL.x == b.UR.x) {
- left0 = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr();
+ left0 = (ST_Agnode_s) GD_rank(g).get(r).v.get(0);
/* right0 = GD_rank(g)[r].v[GD_rank(g)[r].n - 1]; */
- left1 = (Agnode_s) GD_rank(g).plus(r + 1).getArrayOfPtr("v").plus(0).getPtr();
+ left1 = (ST_Agnode_s) GD_rank(g).get(r + 1).v.get(0);
/* right1 = GD_rank(g)[r + 1].v[GD_rank(g)[r + 1].n - 1]; */
- b.LL.x = sp.getInt("LeftBound");
- b.LL.y = ND_coord(left1).getDouble("y") + GD_rank(g).plus(r + 1).getDouble("ht2");
- b.UR.x = sp.getInt("RightBound");
- b.UR.y = ND_coord(left0).getDouble("y") - GD_rank(g).plus(r).getDouble("ht1");
- sp.getPtr("Rank_box").plus(r).setStruct(b);
+ b.LL.x = sp.LeftBound;
+ b.LL.y = ND_coord(left1).y + GD_rank(g).get(r + 1).ht2;
+ b.UR.x = sp.RightBound;
+ b.UR.y = ND_coord(left0).y - GD_rank(g).get(r).ht1;
+ sp.Rank_box[r].setStruct(b);
}
return b;
} finally {
@@ -2828,19 +2821,19 @@ LEAVING("bajn5vx0isu427n6dh131b985","rank_box");
//3 6qwcnugx2ytjrvi5rgxzyzg5i
// static int straight_len(node_t * n)
-public static int straight_len(Agnode_s n) {
+public static int straight_len(ST_Agnode_s n) {
ENTERING("6qwcnugx2ytjrvi5rgxzyzg5i","straight_len");
try {
int cnt = 0;
- Agnode_s v;
+ ST_Agnode_s v;
v = n;
while (true) {
- v = (Agnode_s) aghead(ND_out(v).getFromList(0));
+ v = (ST_Agnode_s) aghead(ND_out(v).getFromList(0));
if (ND_node_type(v) != 1)
break;
if ((ND_out(v).size != 1) || (ND_in(v).size != 1))
break;
- if (ND_coord(v).getDouble("x") != ND_coord(n).getDouble("x"))
+ if (ND_coord(v).x != ND_coord(n).x)
break;
cnt++;
}
@@ -2855,13 +2848,13 @@ LEAVING("6qwcnugx2ytjrvi5rgxzyzg5i","straight_len");
//3 15pgjjuil2c1rjldu29j07gbz
// static edge_t *straight_path(edge_t * e, int cnt, pointf * plist, int *np)
-public static Agedge_s straight_path(Agedge_s e, int cnt, __ptr__ plist, int np[]) {
+public static ST_Agedge_s straight_path(ST_Agedge_s e, int cnt, __ptr__ plist, int np[]) {
ENTERING("15pgjjuil2c1rjldu29j07gbz","straight_path");
try {
int n = np[0];
- Agedge_s f = e;
+ ST_Agedge_s f = e;
while ((cnt--)!=0)
- f = (Agedge_s) ND_out(aghead(f)).getFromList(0);
+ f = (ST_Agedge_s) ND_out(aghead(f)).getFromList(0);
plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct());
plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct());
plist.plus(np[0]).setStruct(ND_coord(agtail(f))); /* will be overwritten by next spline */
@@ -2876,28 +2869,28 @@ LEAVING("15pgjjuil2c1rjldu29j07gbz","straight_path");
//3 4ilkzqtegd5uffawb4qcjthu1
// static void recover_slack(edge_t * e, path * p)
-public static void recover_slack(Agedge_s e, path p) {
+public static void recover_slack(ST_Agedge_s e, ST_path p) {
ENTERING("4ilkzqtegd5uffawb4qcjthu1","recover_slack");
try {
int b;
- Agnode_s vn;
+ ST_Agnode_s vn;
b = 0; /* skip first rank box */
for (vn = aghead(e);
- ND_node_type(vn) == 1 && N(((Boolean)Z.z().sinfo.call("splineMerge", vn)).booleanValue());
+ ND_node_type(vn) == 1 && N(((Boolean)Z.z().sinfo.splineMerge.exe(vn)).booleanValue());
vn = aghead(ND_out(vn).getFromList(0))) {
- while ((b < p.getInt("nbox")) && (p.getPtr("boxes").plus(b).getStruct("LL").getDouble("y") > ND_coord(vn).getDouble("y")))
+ while ((b < p.nbox) && (p.boxes[b].LL.y > ND_coord(vn).y))
b++;
- if (b >= p.getInt("nbox"))
+ if (b >= p.nbox)
break;
- if (p.getPtr("boxes").plus(b).getStruct("UR").getDouble("y") < ND_coord(vn).getDouble("y"))
+ if (p.boxes[b].UR.y < ND_coord(vn).y)
continue;
if (ND_label(vn)!=null)
- resize_vn(vn, (int)p.getPtr("boxes").plus(b).getStruct("LL").getDouble("x"), (int)p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x"),
- (int)(p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x") + ND_rw(vn)));
+ resize_vn(vn, (int)p.boxes[b].LL.x, (int)p.boxes[b].UR.x,
+ (int)(p.boxes[b].UR.x + ND_rw(vn)));
else
- resize_vn(vn, (int)p.getPtr("boxes").plus(b).getStruct("LL").getDouble("x"), (int)((p.getPtr("boxes").plus(b).getStruct("LL").getDouble("x") +
- p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x")) / 2),
- (int)p.getPtr("boxes").plus(b).getStruct("UR").getDouble("x"));
+ resize_vn(vn, (int)p.boxes[b].LL.x, (int)((p.boxes[b].LL.x +
+ p.boxes[b].UR.x) / 2),
+ (int)p.boxes[b].UR.x);
}
} finally {
LEAVING("4ilkzqtegd5uffawb4qcjthu1","recover_slack");
@@ -2909,7 +2902,7 @@ LEAVING("4ilkzqtegd5uffawb4qcjthu1","recover_slack");
//3 3vmg1q1r0eb14etvjdk4cukpd
// static void resize_vn(vn, lx, cx, rx) node_t *vn
-public static void resize_vn(Agnode_s vn, int lx, int cx, int rx) {
+public static void resize_vn(ST_Agnode_s vn, int lx, int cx, int rx) {
ENTERING("3vmg1q1r0eb14etvjdk4cukpd","resize_vn");
try {
ND_coord(vn).setDouble("x", cx);
@@ -2925,12 +2918,12 @@ LEAVING("3vmg1q1r0eb14etvjdk4cukpd","resize_vn");
//3 9t0v5wicmjuc3ij9hko6iawle
// static edge_t *top_bound(edge_t * e, int side)
-public static Agedge_s top_bound(Agedge_s e, int side) {
+public static ST_Agedge_s top_bound(ST_Agedge_s e, int side) {
ENTERING("9t0v5wicmjuc3ij9hko6iawle","top_bound");
try {
- Agedge_s f, ans = null;
+ ST_Agedge_s f, ans = null;
int i;
- for (i = 0; (f = (Agedge_s) ND_out(agtail(e)).getFromList(i))!=null; i++) {
+ for (i = 0; (f = (ST_Agedge_s) ND_out(agtail(e)).getFromList(i))!=null; i++) {
if (side * (ND_order(aghead(f)) - ND_order(aghead(e))) <= 0)
continue;
if ((ED_spl(f) == null)
@@ -2951,12 +2944,12 @@ LEAVING("9t0v5wicmjuc3ij9hko6iawle","top_bound");
//3 9fsg0uiyhtrayd4mimmc0i25e
// static edge_t *bot_bound(edge_t * e, int side)
-public static Agedge_s bot_bound(Agedge_s e, int side) {
+public static ST_Agedge_s bot_bound(ST_Agedge_s e, int side) {
ENTERING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound");
try {
- Agedge_s f, ans = null;
+ ST_Agedge_s f, ans = null;
int i;
- for (i = 0; (f = (Agedge_s) ND_in(aghead(e)).getFromList(i))!=null; i++) {
+ for (i = 0; (f = (ST_Agedge_s) ND_in(aghead(e)).getFromList(i))!=null; i++) {
if (side * (ND_order(agtail(f)) - ND_order(agtail(e))) <= 0)
continue;
if ((ED_spl(f) == null)
@@ -2977,11 +2970,11 @@ LEAVING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound");
//3 65uvkv1mextaah5m997ibe3qs
// static int cl_vninside(graph_t * cl, node_t * n)
-public static boolean cl_vninside(Agraph_s cl, Agnode_s n) {
+public static boolean cl_vninside(ST_Agraph_s cl, ST_Agnode_s n) {
ENTERING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
try {
- return (BETWEEN(GD_bb(cl).LL.x, (double)(ND_coord(n).getDouble("x")), GD_bb(cl).UR.x) &&
- BETWEEN(GD_bb(cl).LL.y, (double)(ND_coord(n).getDouble("y")), GD_bb(cl).UR.y));
+ return (BETWEEN(GD_bb(cl).LL.x, (double)(ND_coord(n).x), GD_bb(cl).UR.x) &&
+ BETWEEN(GD_bb(cl).LL.y, (double)(ND_coord(n).y), GD_bb(cl).UR.y));
} finally {
LEAVING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
}
@@ -2992,11 +2985,11 @@ LEAVING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
//3 dzvvmxkya868w5x78lkvchigk
// static Agraph_t *cl_bound(graph_t* g, node_t *n, node_t *adj)
-public static Agraph_s cl_bound(Agraph_s g, Agnode_s n, Agnode_s adj) {
+public static ST_Agraph_s cl_bound(ST_Agraph_s g, ST_Agnode_s n, ST_Agnode_s adj) {
ENTERING("dzvvmxkya868w5x78lkvchigk","cl_bound");
try {
- Agraph_s rv, cl, tcl, hcl;
- Agedge_s orig;
+ ST_Agraph_s rv, cl, tcl, hcl;
+ ST_Agedge_s orig;
rv = null;
if (ND_node_type(n) == 0)
tcl = hcl = ND_clust(n);
@@ -3031,61 +3024,61 @@ LEAVING("dzvvmxkya868w5x78lkvchigk","cl_bound");
//3 6qwgl36ugfnduc5x59ohuewv1
// static boxf maximal_bbox(graph_t* g, spline_info_t* sp, node_t* vn, edge_t* ie, edge_t* oe)
-public static __struct__<boxf> maximal_bbox(Agraph_s g, spline_info_t sp, Agnode_s vn, Agedge_s ie, Agedge_s oe) {
+public static ST_boxf maximal_bbox(ST_Agraph_s g, ST_spline_info_t sp, ST_Agnode_s vn, ST_Agedge_s ie, ST_Agedge_s oe) {
// WARNING!! STRUCT
return maximal_bbox_w_(g, sp, vn, ie, oe).copy();
}
-private static __struct__<boxf> maximal_bbox_w_(Agraph_s g, spline_info_t sp, Agnode_s vn, Agedge_s ie, Agedge_s oe) {
+private static ST_boxf maximal_bbox_w_(ST_Agraph_s g, ST_spline_info_t sp, ST_Agnode_s vn, ST_Agedge_s ie, ST_Agedge_s oe) {
ENTERING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox");
try {
double b, nb;
- Agraph_s left_cl, right_cl;
- Agnode_s left, right;
+ ST_Agraph_s left_cl, right_cl;
+ ST_Agnode_s left, right;
final ST_boxf rv = new ST_boxf();
left_cl = right_cl = null;
/* give this node all the available space up to its neighbors */
- b = (double)(ND_coord(vn).getDouble("x") - ND_lw(vn) - 4);
+ b = (double)(ND_coord(vn).x - ND_lw(vn) - 4);
if ((left = neighbor(g, vn, ie, oe, -1))!=null) {
if ((left_cl = cl_bound(g, vn, left))!=null)
- nb = GD_bb(left_cl).UR.x + (double)(sp.getInt("Splinesep"));
+ nb = GD_bb(left_cl).UR.x + (double)(sp.Splinesep);
else {
- nb = (double)(ND_coord(left).getDouble("x") + ND_mval(left));
+ nb = (double)(ND_coord(left).x + ND_mval(left));
if (ND_node_type(left) == 0)
nb += GD_nodesep(g) / 2.;
else
- nb += (double)(sp.getInt("Splinesep"));
+ nb += (double)(sp.Splinesep);
}
if (nb < b)
b = nb;
rv.LL.x = ROUND(b);
} else
- rv.LL.x = MIN(ROUND(b), sp.getInt("LeftBound"));
+ rv.LL.x = MIN(ROUND(b), sp.LeftBound);
/* we have to leave room for our own label! */
if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null))
- b = (double)(ND_coord(vn).getDouble("x") + 10);
+ b = (double)(ND_coord(vn).x + 10);
else
- b = (double)(ND_coord(vn).getDouble("x") + ND_rw(vn) + 4);
+ b = (double)(ND_coord(vn).x + ND_rw(vn) + 4);
if ((right = neighbor(g, vn, ie, oe, 1))!=null) {
if ((right_cl = cl_bound(g, vn, right))!=null)
- nb = GD_bb(right_cl).LL.x - (double)(sp.getInt("Splinesep"));
+ nb = GD_bb(right_cl).LL.x - (double)(sp.Splinesep);
else {
- nb = ND_coord(right).getDouble("x") - ND_lw(right);
+ nb = ND_coord(right).x - ND_lw(right);
if (ND_node_type(right) == 0)
nb -= GD_nodesep(g) / 2.;
else
- nb -= (double)(sp.getInt("Splinesep"));
+ nb -= (double)(sp.Splinesep);
}
if (nb > b)
b = nb;
rv.UR.x = ROUND(b);
} else
- rv.UR.x = MAX(ROUND(b), sp.getInt("RightBound"));
+ rv.UR.x = MAX(ROUND(b), sp.RightBound);
if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null)) {
rv.UR.x = rv.UR.x - ND_rw(vn);
- if (rv.UR.x < rv.LL.x) rv.UR.x = ND_coord(vn).getDouble("x");
+ if (rv.UR.x < rv.LL.x) rv.UR.x = ND_coord(vn).x;
}
- rv.LL.y = ND_coord(vn).getDouble("y") - GD_rank(g).plus(ND_rank(vn)).getDouble("ht1");
- rv.UR.y = ND_coord(vn).getDouble("y") + GD_rank(g).plus(ND_rank(vn)).getDouble("ht2");
+ rv.LL.y = ND_coord(vn).y - GD_rank(g).get(ND_rank(vn)).ht1;
+ rv.UR.y = ND_coord(vn).y + GD_rank(g).get(ND_rank(vn)).ht2;
return rv;
} finally {
LEAVING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox");
@@ -3097,14 +3090,14 @@ LEAVING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox");
//3 18pm6r3xcy90f0xi5hpm9jdhk
// static node_t * neighbor(graph_t* g, node_t *vn, edge_t *ie, edge_t *oe, int dir)
-public static Agnode_s neighbor(Agraph_s g, Agnode_s vn, Agedge_s ie, Agedge_s oe, int dir) {
+public static ST_Agnode_s neighbor(ST_Agraph_s g, ST_Agnode_s vn, ST_Agedge_s ie, ST_Agedge_s oe, int dir) {
ENTERING("18pm6r3xcy90f0xi5hpm9jdhk","neighbor");
try {
int i;
- Agnode_s n, rv = null;
- __ptr__ rank = GD_rank(g).plus(ND_rank(vn));
- for (i = ND_order(vn) + dir; ((i >= 0) && (i < rank.getInt("n"))); i += dir) {
- n = (Agnode_s) rank.getArrayOfPtr("v").plus(i).getPtr();
+ ST_Agnode_s n, rv = null;
+ ST_rank_t.Array2 rank = GD_rank(g).plus(ND_rank(vn));
+ for (i = ND_order(vn) + dir; ((i >= 0) && (i < rank.getPtr().n)); i += dir) {
+ n = (ST_Agnode_s) rank.getPtr().v.get(i);
if ((ND_node_type(n) == 1) && (ND_label(n)!=null)) {
rv = n;
break;
@@ -3129,11 +3122,11 @@ LEAVING("18pm6r3xcy90f0xi5hpm9jdhk","neighbor");
//3 f4q0oqe165s9pl5k0th5noeyv
// static boolean pathscross(n0, n1, ie1, oe1) node_t *n0, *n1
-public static boolean pathscross(Agnode_s n0, Agnode_s n1, Agedge_s ie1, Agedge_s oe1) {
+public static boolean pathscross(ST_Agnode_s n0, ST_Agnode_s n1, ST_Agedge_s ie1, ST_Agedge_s oe1) {
ENTERING("f4q0oqe165s9pl5k0th5noeyv","pathscross");
try {
- Agedge_s e0, e1;
- Agnode_s na, nb;
+ ST_Agedge_s e0, e1;
+ ST_Agnode_s na, nb;
boolean order;
int cnt;
order = (ND_order(n0) > ND_order(n1));
@@ -3141,7 +3134,7 @@ try {
return false;
e1 = oe1;
if (ND_out(n0).size == 1 && e1!=null) {
- e0 = (Agedge_s) ND_out(n0).getFromList(0);
+ e0 = (ST_Agedge_s) ND_out(n0).getFromList(0);
for (cnt = 0; cnt < 2; cnt++) {
if (EQ(na = aghead(e0), nb = aghead(e1)))
break;
@@ -3149,15 +3142,15 @@ try {
return NOT(false);
if ((ND_out(na).size != 1) || (ND_node_type(na) == 0))
break;
- e0 = (Agedge_s) ND_out(na).getFromList(0);
+ e0 = (ST_Agedge_s) ND_out(na).getFromList(0);
if ((ND_out(nb).size != 1) || (ND_node_type(nb) == 0))
break;
- e1 = (Agedge_s) ND_out(nb).getFromList(0);
+ e1 = (ST_Agedge_s) ND_out(nb).getFromList(0);
}
}
e1 = ie1;
if (ND_in(n0).size == 1 && e1!=null) {
- e0 = (Agedge_s) ND_in(n0).getFromList(0);
+ e0 = (ST_Agedge_s) ND_in(n0).getFromList(0);
for (cnt = 0; cnt < 2; cnt++) {
if (EQ(na = agtail(e0), nb = agtail(e1)))
break;
@@ -3165,10 +3158,10 @@ try {
return NOT(false);
if ((ND_in(na).size != 1) || (ND_node_type(na) == 0))
break;
- e0 = (Agedge_s) ND_in(na).getFromList(0);
+ e0 = (ST_Agedge_s) ND_in(na).getFromList(0);
if ((ND_in(nb).size != 1) || (ND_node_type(nb) == 0))
break;
- e1 = (Agedge_s) ND_in(nb).getFromList(0);
+ e1 = (ST_Agedge_s) ND_in(nb).getFromList(0);
}
}
return false;
diff --git a/src/gen/lib/dotgen/fastgr__c.java b/src/gen/lib/dotgen/fastgr__c.java
index 6f9e9fe..01e27f3 100644
--- a/src/gen/lib/dotgen/fastgr__c.java
+++ b/src/gen/lib/dotgen/fastgr__c.java
@@ -47,10 +47,8 @@ package gen.lib.dotgen;
import static gen.lib.cgraph.edge__c.aghead;
import static gen.lib.cgraph.edge__c.agtail;
import static gen.lib.cgraph.obj__c.agroot;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.dotgen.dotinit__c.dot_root;
import static smetana.core.JUtils.EQ;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGINEDGE;
@@ -88,19 +86,15 @@ import static smetana.core.Macro.aghead;
import static smetana.core.Macro.agtail;
import static smetana.core.Macro.alloc_elist;
import static smetana.core.Macro.elist_append;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agedgepair_s;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.Agraph_s;
-import h.Agrec_s;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agedgepair_s;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agraph_s;
+import h.ST_Agrec_s;
import h.ST_elist;
-import h.boxf;
-import h.elist;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class fastgr__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -360,14 +354,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -396,25 +390,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -438,16 +413,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -744,22 +719,22 @@ throw new UnsupportedOperationException();
//3 econbrl314rr46qnvvw5e32j7
// static edge_t *ffe(node_t * u, elist uL, node_t * v, elist vL)
-public static Agedge_s ffe(Agnode_s u, final ST_elist uL, Agnode_s v, final ST_elist vL) {
+public static ST_Agedge_s ffe(ST_Agnode_s u, final ST_elist uL, ST_Agnode_s v, final ST_elist vL) {
// WARNING!! STRUCT
return ffe_w_(u, uL.copy(), v, vL.copy());
}
-private static Agedge_s ffe_w_(Agnode_s u, final ST_elist uL, Agnode_s v, final ST_elist vL) {
+private static ST_Agedge_s ffe_w_(ST_Agnode_s u, final ST_elist uL, ST_Agnode_s v, final ST_elist vL) {
ENTERING("econbrl314rr46qnvvw5e32j7","ffe");
try {
int i;
- Agedge_s e = null;
+ ST_Agedge_s e = null;
if ((uL.size > 0) && (vL.size > 0)) {
if (uL.size < vL.size) {
- for (i = 0; (e = (Agedge_s) uL.getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) uL.getFromList(i))!=null; i++)
if (EQ(aghead(e), v))
break;
} else {
- for (i = 0; (e = (Agedge_s) vL.getFromList(i))!=null; i++)
+ for (i = 0; (e = (ST_Agedge_s) vL.getFromList(i))!=null; i++)
if (EQ(agtail(e), u))
break;
}
@@ -776,7 +751,7 @@ LEAVING("econbrl314rr46qnvvw5e32j7","ffe");
//3 1uygfrgur73lfy9vsjozwwupm
// edge_t *find_fast_edge(node_t * u, node_t * v)
-public static Agedge_s find_fast_edge(Agnode_s u, Agnode_s v) {
+public static ST_Agedge_s find_fast_edge(ST_Agnode_s u, ST_Agnode_s v) {
ENTERING("1uygfrgur73lfy9vsjozwwupm","find_fast_edge");
try {
return ffe(u, ND_out(u), v, ND_in(v));
@@ -790,10 +765,10 @@ LEAVING("1uygfrgur73lfy9vsjozwwupm","find_fast_edge");
//3 1yw7ahdnxnexnicj552zqyyej
// static node_t* find_fast_node(graph_t * g, node_t * n)
-public static Agnode_s find_fast_node(Agraph_s g, Agnode_s n) {
+public static ST_Agnode_s find_fast_node(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("1yw7ahdnxnexnicj552zqyyej","find_fast_node");
try {
- Agnode_s v;
+ ST_Agnode_s v;
for (v = GD_nlist(g); v!=null; v = ND_next(v))
if (EQ(v, n))
break;
@@ -808,7 +783,7 @@ LEAVING("1yw7ahdnxnexnicj552zqyyej","find_fast_node");
//3 bf1j97keudu416avridkj9fpb
// edge_t *find_flat_edge(node_t * u, node_t * v)
-public static Agedge_s find_flat_edge(Agnode_s u, Agnode_s v) {
+public static ST_Agedge_s find_flat_edge(ST_Agnode_s u, ST_Agnode_s v) {
ENTERING("bf1j97keudu416avridkj9fpb","find_flat_edge");
try {
return ffe(u, ND_flat_out(u), v, ND_flat_in(v));
@@ -841,7 +816,7 @@ throw new UnsupportedOperationException();
//3 8t6gpubo908pz1pqnt1s88lnt
// edge_t *fast_edge(edge_t * e)
-public static Agedge_s fast_edge(Agedge_s e) {
+public static ST_Agedge_s fast_edge(ST_Agedge_s e) {
ENTERING("8t6gpubo908pz1pqnt1s88lnt","fast_edge");
try {
elist_append(e, ND_out(agtail(e)));
@@ -857,15 +832,15 @@ LEAVING("8t6gpubo908pz1pqnt1s88lnt","fast_edge");
//3 dxb0q8ajb7iv25aj6zdqnbwh5
// void zapinlist(elist * L, edge_t * e)
-public static void zapinlist(elist L, Agedge_s e) {
+public static void zapinlist(ST_elist L, ST_Agedge_s e) {
ENTERING("dxb0q8ajb7iv25aj6zdqnbwh5","zapinlist");
try {
int i;
- for (i = 0; i < L.getInt("size"); i++) {
- if (EQ(L.getArrayOfPtr("list").plus(i).getPtr(), e)) {
- L.setInt("size", L.getInt("size")-1);
- L.getArrayOfPtr("list").plus(i).setPtr(L.getArrayOfPtr("list").plus(L.getInt("size")).getPtr());
- L.getArrayOfPtr("list").plus(L.getInt("size")).setPtr(null);
+ for (i = 0; i < L.size; i++) {
+ if (EQ(L.list.get(i), e)) {
+ L.size = L.size-1;
+ L.list.set(i, L.list.get(L.size));
+ L.list.set(L.size, null);
break;
}
}
@@ -879,12 +854,12 @@ LEAVING("dxb0q8ajb7iv25aj6zdqnbwh5","zapinlist");
//3 dkv97rr4ytpehp291etaxe9gc
// void delete_fast_edge(edge_t * e)
-public static void delete_fast_edge(Agedge_s e) {
+public static void delete_fast_edge(ST_Agedge_s e) {
ENTERING("dkv97rr4ytpehp291etaxe9gc","delete_fast_edge");
try {
//assert(e != NULL);
- zapinlist((ND_out(agtail(e))).amp(), e);
- zapinlist((ND_in(aghead(e))).amp(), e);
+ zapinlist((ND_out(agtail(e))), e);
+ zapinlist((ND_in(aghead(e))), e);
} finally {
LEAVING("dkv97rr4ytpehp291etaxe9gc","delete_fast_edge");
}
@@ -918,7 +893,7 @@ throw new UnsupportedOperationException();
//3 73oebfcfiescklohgt8mddswc
// void other_edge(edge_t * e)
-public static void other_edge(Agedge_s e) {
+public static void other_edge(ST_Agedge_s e) {
ENTERING("73oebfcfiescklohgt8mddswc","other_edge");
try {
elist_append(e, ND_other(agtail(e)));
@@ -946,21 +921,21 @@ throw new UnsupportedOperationException();
//3 4gd9tmpq70q0rij5otj0k6sn2
// edge_t *new_virtual_edge(node_t * u, node_t * v, edge_t * orig)
-public static Agedge_s new_virtual_edge(Agnode_s u, Agnode_s v, Agedge_s orig) {
+public static ST_Agedge_s new_virtual_edge(ST_Agnode_s u, ST_Agnode_s v, ST_Agedge_s orig) {
ENTERING("4gd9tmpq70q0rij5otj0k6sn2","new_virtual_edge");
try {
- Agedge_s e;
- Agedgepair_s e2 = (Agedgepair_s)zmalloc(sizeof(Agedgepair_s.class));
- AGTYPE(e2.getStruct("in").amp(), AGINEDGE);
- AGTYPE(e2.getStruct("out").amp(), AGOUTEDGE);
- e2.getStruct("out").getStruct("base").setPtr("data", zmalloc(sizeof(Agedgeinfo_t.class)).castTo(Agedgeinfo_t.class).castTo(Agrec_s.class));
- e = (Agedge_s) e2.getStruct("out").amp();
+ ST_Agedge_s e;
+ ST_Agedgepair_s e2 = new ST_Agedgepair_s();
+ AGTYPE(e2.in, AGINEDGE);
+ AGTYPE(e2.out, AGOUTEDGE);
+ e2.out.base.setPtr("data", new ST_Agedgeinfo_t().castTo(ST_Agrec_s.class));
+ e = (ST_Agedge_s) e2.out;
agtail(e, u);
aghead(e, v);
ED_edge_type(e, 1);
if (orig!=null) {
AGSEQ(e, AGSEQ(orig));
- AGSEQ(e2.getStruct("in").amp(), AGSEQ(orig));
+ AGSEQ(e2.in, AGSEQ(orig));
ED_count(e, ED_count(orig));
ED_xpenalty(e, ED_xpenalty(orig));
ED_weight(e, ED_weight(orig));
@@ -993,7 +968,7 @@ LEAVING("4gd9tmpq70q0rij5otj0k6sn2","new_virtual_edge");
//3 9obdfflzw4cs2z9r0dng26mvw
// edge_t *virtual_edge(node_t * u, node_t * v, edge_t * orig)
-public static Agedge_s virtual_edge(Agnode_s u, Agnode_s v, Agedge_s orig) {
+public static ST_Agedge_s virtual_edge(ST_Agnode_s u, ST_Agnode_s v, ST_Agedge_s orig) {
ENTERING("9obdfflzw4cs2z9r0dng26mvw","virtual_edge");
try {
return fast_edge(new_virtual_edge(u, v, orig));
@@ -1007,7 +982,7 @@ LEAVING("9obdfflzw4cs2z9r0dng26mvw","virtual_edge");
//3 98hkec8t6fjk10bjpstumw0ey
// void fast_node(graph_t * g, Agnode_t * n)
-public static void fast_node(Agraph_s g, Agnode_s n) {
+public static void fast_node(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("98hkec8t6fjk10bjpstumw0ey","fast_node");
try {
ND_next(n, GD_nlist(g));
@@ -1046,7 +1021,7 @@ throw new UnsupportedOperationException();
//3 emsq7b6s5100lscckzy3ileqd
// void delete_fast_node(graph_t * g, node_t * n)
-public static void delete_fast_node(Agraph_s g, Agnode_s n) {
+public static void delete_fast_node(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("emsq7b6s5100lscckzy3ileqd","delete_fast_node");
try {
assert(find_fast_node(g, n)!=null);
@@ -1066,22 +1041,22 @@ LEAVING("emsq7b6s5100lscckzy3ileqd","delete_fast_node");
//3 eg08ajzojsm0224btmfi7kdxt
// node_t *virtual_node(graph_t * g)
-public static Agnode_s virtual_node(Agraph_s g) {
+public static ST_Agnode_s virtual_node(ST_Agraph_s g) {
ENTERING("eg08ajzojsm0224btmfi7kdxt","virtual_node");
try {
- Agnode_s n;
- n = (Agnode_s)zmalloc(sizeof(Agnode_s.class));
+ ST_Agnode_s n;
+ n = new ST_Agnode_s();
// agnameof(n) = "virtual";
AGTYPE(n, AGNODE);
- n.getStruct("base").setPtr("data", (Agnodeinfo_t)zmalloc(sizeof(Agnodeinfo_t.class)));
+ n.base.setPtr("data", new ST_Agnodeinfo_t());
n.setPtr("root", agroot(g));
ND_node_type(n, 1);
ND_rw(n, 1);
ND_lw(n, 1);
ND_ht(n, 1);
ND_UF_size(n, 1);
- alloc_elist(4, ND_in(n), Agnode_s.class);
- alloc_elist(4, ND_out(n), Agnode_s.class);
+ alloc_elist(4, ND_in(n));
+ alloc_elist(4, ND_out(n));
fast_node(g, n);
GD_n_nodes(g, GD_n_nodes(g)+1);
return n;
@@ -1095,7 +1070,7 @@ LEAVING("eg08ajzojsm0224btmfi7kdxt","virtual_node");
//3 8dvukicq96g5t3xgdl0ue35mj
// void flat_edge(graph_t * g, edge_t * e)
-public static void flat_edge(Agraph_s g, Agedge_s e) {
+public static void flat_edge(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("8dvukicq96g5t3xgdl0ue35mj","flat_edge");
try {
elist_append(e, ND_flat_out(agtail(e)));
@@ -1112,14 +1087,14 @@ LEAVING("8dvukicq96g5t3xgdl0ue35mj","flat_edge");
//3 clspalhiuedfnk9g9rlvfqpg7
// void delete_flat_edge(edge_t * e)
-public static void delete_flat_edge(Agedge_s e) {
+public static void delete_flat_edge(ST_Agedge_s e) {
ENTERING("clspalhiuedfnk9g9rlvfqpg7","delete_flat_edge");
try {
assert(e != null);
if (ED_to_orig(e)!=null && EQ(ED_to_virt(ED_to_orig(e)), e))
ED_to_virt(ED_to_orig(e), null);
- zapinlist((ND_flat_out(agtail(e))).amp(), e);
- zapinlist((ND_flat_in(aghead(e))).amp(), e);
+ zapinlist((ND_flat_out(agtail(e))), e);
+ zapinlist((ND_flat_in(aghead(e))), e);
} finally {
LEAVING("clspalhiuedfnk9g9rlvfqpg7","delete_flat_edge");
}
@@ -1130,7 +1105,7 @@ LEAVING("clspalhiuedfnk9g9rlvfqpg7","delete_flat_edge");
//3 dcfpol11cvlt6aaa6phqbp6fo
// static void basic_merge(edge_t * e, edge_t * rep)
-public static void basic_merge(Agedge_s e, Agedge_s rep) {
+public static void basic_merge(ST_Agedge_s e, ST_Agedge_s rep) {
ENTERING("dcfpol11cvlt6aaa6phqbp6fo","basic_merge");
try {
if (ED_minlen(rep) < ED_minlen(e))
@@ -1151,7 +1126,7 @@ LEAVING("dcfpol11cvlt6aaa6phqbp6fo","basic_merge");
//3 6dxgtoii76tmonlnvz4rmiytd
// void merge_oneway(edge_t * e, edge_t * rep)
-public static void merge_oneway(Agedge_s e, Agedge_s rep) {
+public static void merge_oneway(ST_Agedge_s e, ST_Agedge_s rep) {
ENTERING("6dxgtoii76tmonlnvz4rmiytd","merge_oneway");
try {
if (EQ(rep, ED_to_virt(e))) {
diff --git a/src/gen/lib/dotgen/flat__c.java b/src/gen/lib/dotgen/flat__c.java
index a3e79f3..fd776b5 100644
--- a/src/gen/lib/dotgen/flat__c.java
+++ b/src/gen/lib/dotgen/flat__c.java
@@ -46,17 +46,16 @@
package gen.lib.dotgen;
import static gen.lib.cgraph.edge__c.aghead;
import static gen.lib.cgraph.edge__c.agtail;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.dotgen.dotinit__c.dot_root;
import static gen.lib.dotgen.fastgr__c.virtual_edge;
import static gen.lib.dotgen.fastgr__c.virtual_node;
import static gen.lib.dotgen.mincross__c.rec_reset_vlists;
import static gen.lib.dotgen.mincross__c.rec_save_vlists;
import static smetana.core.JUtils.EQ;
-import static smetana.core.JUtils.sizeof_starstar_empty;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
-import static smetana.core.Macro.ALLOC;
+import static smetana.core.Macro.ALLOC_Agnode_s;
+import static smetana.core.Macro.ALLOC_ST_rank_t;
import static smetana.core.Macro.ED_adjacent;
import static smetana.core.Macro.ED_dist;
import static smetana.core.Macro.ED_edge_type;
@@ -90,15 +89,12 @@ import static smetana.core.Macro.ND_rank;
import static smetana.core.Macro.ND_rw;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.pointf;
-import h.rank_t;
-import smetana.core.JUtils;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_pointf;
+import h.ST_rank_t;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class flat__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -358,14 +354,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -394,27 +390,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
-
//3 1n5xl70wxuabyf97mclvilsm6
@@ -436,16 +411,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -742,25 +717,25 @@ throw new UnsupportedOperationException();
//3 e0gtvsxlvztmwu8yy44wfvf97
// static node_t *make_vn_slot(graph_t * g, int r, int pos)
-public static Agnode_s make_vn_slot(Agraph_s g, int r, int pos) {
+public static ST_Agnode_s make_vn_slot(ST_Agraph_s g, int r, int pos) {
ENTERING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot");
try {
int i;
- __ptr__ v;
- Agnode_s n;
- v = ALLOC(GD_rank(g).plus(r).getInt("n") + 2, GD_rank(g).plus(r).getPtr("v"), Agnode_s.class);
+ ST_Agnode_s.ArrayOfStar v;
+ ST_Agnode_s n;
+ v = ALLOC_Agnode_s(GD_rank(g).get(r).n + 2, (ST_Agnode_s.ArrayOfStar) GD_rank(g).get(r).v);
GD_rank(g).plus(r).setPtr("v", v);
- for (i = GD_rank(g).plus(r).getInt("n"); i > pos; i--) {
+ for (i = GD_rank(g).get(r).n; i > pos; i--) {
v.plus(i).setPtr(v.plus(i - 1).getPtr());
- ND_order(v.plus(i).getPtr(), ND_order(v.plus(i).getPtr())+1);
+ ND_order(v.get(i), ND_order(v.get(i))+1);
}
n = virtual_node(g);
v.plus(pos).setPtr(n);
ND_order(n, pos);
ND_rank(n, r);
- GD_rank(g).plus(r).setInt("n", GD_rank(g).plus(r).getInt("n")+1);
- v.plus(GD_rank(g).plus(r).getInt("n")).setPtr(null);
- return (Agnode_s) v.plus(pos).getPtr();
+ GD_rank(g).plus(r).setInt("n", GD_rank(g).get(r).n+1);
+ v.plus(GD_rank(g).get(r).n).setPtr(null);
+ return (ST_Agnode_s) v.get(pos);
} finally {
LEAVING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot");
}
@@ -771,7 +746,7 @@ LEAVING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot");
//3 d64wt9oqphauv3hp4axbg2ep3
// static void findlr(node_t * u, node_t * v, int *lp, int *rp)
-public static void findlr(Agnode_s u, Agnode_s v, int lp[], int rp[]) {
+public static void findlr(ST_Agnode_s u, ST_Agnode_s v, int lp[], int rp[]) {
ENTERING("d64wt9oqphauv3hp4axbg2ep3","findlr");
try {
int l, r;
@@ -794,17 +769,17 @@ LEAVING("d64wt9oqphauv3hp4axbg2ep3","findlr");
//3 bwjjmaydx5a2fnpeoligkha0r
// static void setbounds(node_t * v, int *bounds, int lpos, int rpos)
-public static void setbounds(Agnode_s v, int bounds[], int lpos[], int rpos[]) {
+public static void setbounds(ST_Agnode_s v, int bounds[], int lpos[], int rpos[]) {
ENTERING("bwjjmaydx5a2fnpeoligkha0r","setbounds");
try {
int i, ord;
int[] l = new int[1], r = new int[1];
- Agedge_s f;
+ ST_Agedge_s f;
if (ND_node_type(v) == 1) {
ord = ND_order(v);
if (ND_in(v).size == 0) { /* flat */
assert(ND_out(v).size == 2);
- findlr((Agnode_s) aghead(ND_out(v).getFromList(0)), (Agnode_s) aghead(ND_out(v).getFromList(1)), l,
+ findlr((ST_Agnode_s) aghead(ND_out(v).getFromList(0)), (ST_Agnode_s) aghead(ND_out(v).getFromList(1)), l,
r);
/* the other flat edge could be to the left or right */
if (r[0] <= lpos[0])
@@ -823,7 +798,7 @@ try {
} else { /* forward */
boolean onleft, onright;
onleft = onright = false;
- for (i = 0; (f = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
+ for (i = 0; (f = (ST_Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
if (ND_order(aghead(f)) <= lpos[0]) {
onleft = NOT(false);
continue;
@@ -849,24 +824,24 @@ LEAVING("bwjjmaydx5a2fnpeoligkha0r","setbounds");
//3 3bc4otcsxj1dujj49ydbb19oa
// static int flat_limits(graph_t * g, edge_t * e)
-public static int flat_limits(Agraph_s g, Agedge_s e) {
+public static int flat_limits(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("3bc4otcsxj1dujj49ydbb19oa","flat_limits");
try {
int lnode, rnode, r, pos;
int[] lpos = new int[1], rpos = new int[1];
int bounds[] = new int[4];
- __ptr__ rank;
+ ST_Agnode_s.ArrayOfStar rank;
r = ND_rank(agtail(e)) - 1;
- rank = GD_rank(g).plus(r).getPtr("v");
+ rank = GD_rank(g).get(r).v;
lnode = 0;
- rnode = GD_rank(g).plus(r).getInt("n") - 1;
+ rnode = GD_rank(g).get(r).n - 1;
bounds[0] = bounds[2] = lnode - 1;
bounds[1] = bounds[3] = rnode + 1;
findlr(agtail(e), aghead(e), lpos, rpos);
while (lnode <= rnode) {
- setbounds((Agnode_s)rank.plus(lnode).getPtr(), bounds, lpos, rpos);
+ setbounds((ST_Agnode_s)rank.get(lnode), bounds, lpos, rpos);
if (lnode != rnode)
- setbounds((Agnode_s)rank.plus(rnode).getPtr(), bounds, lpos, rpos);
+ setbounds((ST_Agnode_s)rank.get(rnode), bounds, lpos, rpos);
lnode++;
rnode--;
if (bounds[1] - bounds[0] <= 1)
@@ -887,51 +862,51 @@ LEAVING("3bc4otcsxj1dujj49ydbb19oa","flat_limits");
//3 4cw9yo9ap8ze1r873v6jat4yc
// static void flat_node(edge_t * e)
-public static void flat_node(Agedge_s e) {
+public static void flat_node(ST_Agedge_s e) {
ENTERING("4cw9yo9ap8ze1r873v6jat4yc","flat_node");
try {
int r, place, ypos, h2;
- Agraph_s g;
- Agnode_s n, vn;
- Agedge_s ve;
- final __struct__<pointf> dimen = JUtils.from(pointf.class);
+ ST_Agraph_s g;
+ ST_Agnode_s n, vn;
+ ST_Agedge_s ve;
+ final ST_pointf dimen = new ST_pointf();
if (ED_label(e) == null)
return;
g = dot_root(agtail(e));
r = ND_rank(agtail(e));
place = flat_limits(g, e);
/* grab ypos = LL.y of label box before make_vn_slot() */
- if ((n = (Agnode_s) GD_rank(g).plus(r - 1).getArrayOfPtr("v").plus(0).getPtr())!=null)
- ypos = (int)(ND_coord(n).getDouble("y") - GD_rank(g).plus(r - 1).getDouble("ht1"));
+ if ((n = (ST_Agnode_s) GD_rank(g).get(r - 1).v.get(0))!=null)
+ ypos = (int)(ND_coord(n).y - GD_rank(g).get(r - 1).ht1);
else {
- n = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr();
- ypos = (int)(ND_coord(n).getDouble("y") + GD_rank(g).plus(r).getDouble("ht2") + GD_ranksep(g));
+ n = (ST_Agnode_s) GD_rank(g).get(r).v.get(0);
+ ypos = (int)(ND_coord(n).y + GD_rank(g).get(r).ht2 + GD_ranksep(g));
}
vn = make_vn_slot(g, r - 1, place);
- dimen.___(ED_label(e).getStruct("dimen"));
+ dimen.___(ED_label(e).dimen);
if (GD_flip(g)!=0) {
- double f = dimen.getDouble("x");
- dimen.setDouble("x", dimen.getDouble("y"));
+ double f = dimen.x;
+ dimen.setDouble("x", dimen.y);
dimen.setDouble("y", f);
}
- ND_ht(vn, dimen.getDouble("y"));
+ ND_ht(vn, dimen.y);
h2 = (int)(ND_ht(vn) / 2);
- ND_rw(vn, dimen.getDouble("x") / 2);
+ ND_rw(vn, dimen.x / 2);
ND_lw(vn, ND_rw(vn));
ND_label(vn, ED_label(e));
ND_coord(vn).setDouble("y", ypos + h2);
ve = virtual_edge(vn, agtail(e), e); /* was NULL? */
- ED_tail_port(ve).getStruct("p").setDouble("x", -ND_lw(vn));
- ED_head_port(ve).getStruct("p").setDouble("x", ND_rw(agtail(e)));
+ ED_tail_port(ve).p.setDouble("x", -ND_lw(vn));
+ ED_head_port(ve).p.setDouble("x", ND_rw(agtail(e)));
ED_edge_type(ve, 4);
ve = virtual_edge(vn, aghead(e), e);
- ED_tail_port(ve).getStruct("p").setDouble("x", ND_rw(vn));
- ED_head_port(ve).getStruct("p").setDouble("x", ND_lw(aghead(e)));
+ ED_tail_port(ve).p.setDouble("x", ND_rw(vn));
+ ED_head_port(ve).p.setDouble("x", ND_lw(aghead(e)));
ED_edge_type(ve, 4);
/* another assumed symmetry of ht1/ht2 of a label node */
- if (GD_rank(g).plus(r - 1).getDouble("ht1") < h2)
+ if (GD_rank(g).get(r - 1).ht1 < h2)
GD_rank(g).plus(r - 1).setDouble("ht1", h2);
- if (GD_rank(g).plus(r - 1).getDouble("ht2") < h2)
+ if (GD_rank(g).get(r - 1).ht2 < h2)
GD_rank(g).plus(r - 1).setDouble("ht2", h2);
ND_alg(vn, e);
} finally {
@@ -944,22 +919,22 @@ LEAVING("4cw9yo9ap8ze1r873v6jat4yc","flat_node");
//3 1lopavodoru6ee52snd5l6swd
// static void abomination(graph_t * g)
-public static void abomination(Agraph_s g) {
+public static void abomination(ST_Agraph_s g) {
ENTERING("1lopavodoru6ee52snd5l6swd","abomination");
try {
int r;
- __ptr__ rptr;
+ ST_rank_t.Array2 rptr;
assert(GD_minrank(g) == 0);
/* 3 = one for new rank, one for sentinel, one for off-by-one */
r = GD_maxrank(g) + 3;
- rptr = ALLOC(r, GD_rank(g), rank_t.class);
+ rptr = ALLOC_ST_rank_t(r, (ST_rank_t.Array2) GD_rank(g));
GD_rank(g, rptr.plus(1));
for (r = GD_maxrank(g); r >= 0; r--)
- GD_rank(g).plus(r).getPtr().setStruct(GD_rank(g).plus(r - 1).getPtr().getStruct());
+ GD_rank(g).get(r).setStruct(GD_rank(g).get(r - 1).getStruct());
GD_rank(g).plus(r).setInt("n", 0);
GD_rank(g).plus(r).setInt("an", 0);
- GD_rank(g).plus(r).setPtr("v", zmalloc(sizeof_starstar_empty(Agnode_s.class, 2)));
- GD_rank(g).plus(r).setPtr("av", GD_rank(g).plus(r).getPtr("v"));
+ GD_rank(g).plus(r).setPtr("v", new ST_Agnode_s.ArrayOfStar(2));
+ GD_rank(g).plus(r).setPtr("av", GD_rank(g).get(r).v);
GD_rank(g).plus(r).setPtr("flat", null);
GD_rank(g).plus(r).setDouble("ht1", 1);
GD_rank(g).plus(r).setDouble("ht2", 1);
@@ -976,14 +951,14 @@ LEAVING("1lopavodoru6ee52snd5l6swd","abomination");
//3 ctujx6e8k3rzv08h6gswdcaqs
// static void checkFlatAdjacent (edge_t* e)
-public static void checkFlatAdjacent(Agedge_s e) {
+public static void checkFlatAdjacent(ST_Agedge_s e) {
ENTERING("ctujx6e8k3rzv08h6gswdcaqs","checkFlatAdjacent");
try {
- Agnode_s tn = agtail(e);
- Agnode_s hn = aghead(e);
+ ST_Agnode_s tn = agtail(e);
+ ST_Agnode_s hn = aghead(e);
int i, lo, hi;
- Agnode_s n;
- __ptr__ rank;
+ ST_Agnode_s n;
+ ST_rank_t.Array2 rank;
if (ND_order(tn) < ND_order(hn)) {
lo = ND_order(tn);
hi = ND_order(hn);
@@ -994,7 +969,7 @@ try {
}
rank = GD_rank(dot_root(tn)).plus(ND_rank(tn));
for (i = lo + 1; i < hi; i++) {
- n = (Agnode_s) rank.getArrayOfPtr("v").plus(i).getPtr();
+ n = (ST_Agnode_s) rank.getPtr().v.get(i);
if ((ND_node_type(n) == 1 && ND_label(n)!=null) ||
ND_node_type(n) == 0)
break;
@@ -1015,28 +990,28 @@ LEAVING("ctujx6e8k3rzv08h6gswdcaqs","checkFlatAdjacent");
//3 bjwwj6ftkm0gv04cf1edqeaw6
// int flat_edges(graph_t * g)
-public static int flat_edges(Agraph_s g) {
+public static int flat_edges(ST_Agraph_s g) {
ENTERING("bjwwj6ftkm0gv04cf1edqeaw6","flat_edges");
try {
int i, j, reset = 0;
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
int found = 0;
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
if (ND_flat_out(n).listNotNull()) {
- for (j = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(j))!=null; j++) {
+ for (j = 0; (e = (ST_Agedge_s) ND_flat_out(n).getFromList(j))!=null; j++) {
checkFlatAdjacent (e);
}
}
for (j = 0; j < ND_other(n).size; j++) {
- e = (Agedge_s) ND_other(n).getFromList(j);
+ e = (ST_Agedge_s) ND_other(n).getFromList(j);
if (ND_rank(aghead(e)) == ND_rank(agtail(e)))
checkFlatAdjacent (e);
}
}
- if ((GD_rank(g).plus(0).getPtr("flat")!=null) || (GD_n_cluster(g) > 0)) {
- for (i = 0; (n = (Agnode_s) GD_rank(g).plus(0).getArrayOfPtr("v").plus(i).getPtr())!=null; i++) {
- for (j = 0; (e = (Agedge_s) ND_flat_in(n).getFromList(j))!=null; j++) {
+ if ((GD_rank(g).get(0).flat!=null) || (GD_n_cluster(g) > 0)) {
+ for (i = 0; (n = (ST_Agnode_s) GD_rank(g).get(0).v.get(i))!=null; i++) {
+ for (j = 0; (e = (ST_Agedge_s) ND_flat_in(n).getFromList(j))!=null; j++) {
if ((ED_label(e)!=null) && N(ED_adjacent(e))) {
abomination(g);
found = 1;
@@ -1051,11 +1026,11 @@ try {
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
/* if n is the tail of any flat edge, one will be in flat_out */
if (ND_flat_out(n).listNotNull()) {
- for (i = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_flat_out(n).getFromList(i))!=null; i++) {
if (ED_label(e)!=null) {
if (ED_adjacent(e)!=0) {
- if (GD_flip(g)!=0) ED_dist(e, ED_label(e).getStruct("dimen").getDouble("y"));
- else ED_dist(e, ED_label(e).getStruct("dimen").getDouble("x"));
+ if (GD_flip(g)!=0) ED_dist(e, ED_label(e).dimen.y);
+ else ED_dist(e, ED_label(e).dimen.x);
}
else {
reset = 1;
@@ -1065,8 +1040,8 @@ try {
}
/* look for other flat edges with labels */
for (j = 0; j < ND_other(n).size; j++) {
- Agedge_s le;
- e = (Agedge_s) ND_other(n).getFromList(j);
+ ST_Agedge_s le;
+ e = (ST_Agedge_s) ND_other(n).getFromList(j);
if (ND_rank(agtail(e)) != ND_rank(aghead(e))) continue;
if (EQ(agtail(e), aghead(e))) continue; /* skip loops */
le = e;
@@ -1075,8 +1050,8 @@ try {
if (ED_label(e)!=null) {
if (ED_adjacent(e)!=0) {
double lw;
- if (GD_flip(g)!=0) lw = ED_label(e).getStruct("dimen").getDouble("y");
- else lw = ED_label(e).getStruct("dimen").getDouble("x");
+ if (GD_flip(g)!=0) lw = ED_label(e).dimen.y;
+ else lw = ED_label(e).dimen.x;
ED_dist(le, MAX(lw,ED_dist(le)));
}
else {
diff --git a/src/gen/lib/dotgen/mincross__c.java b/src/gen/lib/dotgen/mincross__c.java
index 09aef4b..5d3527e 100644
--- a/src/gen/lib/dotgen/mincross__c.java
+++ b/src/gen/lib/dotgen/mincross__c.java
@@ -75,11 +75,9 @@ import static smetana.core.JUtils.atof;
import static smetana.core.JUtils.function;
import static smetana.core.JUtils.qsort;
import static smetana.core.JUtils.size_t_array_of_integer;
-import static smetana.core.JUtils.sizeof;
-import static smetana.core.JUtils.sizeof_starstar_empty;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
-import static smetana.core.Macro.ALLOC;
+import static smetana.core.Macro.ALLOC_Agnode_s;
import static smetana.core.Macro.ALLOC_INT;
import static smetana.core.Macro.ED_edge_type;
import static smetana.core.Macro.ED_head_port;
@@ -125,24 +123,22 @@ import static smetana.core.Macro.ND_ranktype;
import static smetana.core.Macro.ND_weight_class;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import static smetana.core.Macro.agtail;
import static smetana.core.Macro.elist_append;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.adjmatrix_t;
-import h.boxf;
-import h.elist;
-import h.nodequeue;
-import h.pointf;
-import h.rank_t;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_adjmatrix_t;
+import h.ST_elist;
+import h.ST_nodequeue;
+import h.ST_pointf;
+import h.ST_rank_t;
+
+import java.util.List;
+
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class mincross__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -402,14 +398,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -438,26 +434,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -480,16 +456,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -858,7 +834,7 @@ throw new UnsupportedOperationException();
//3 e876vp4hgkzshluz6qk77cjwk
// void dot_mincross(graph_t * g, int doBalance)
-public static void dot_mincross(Agraph_s g, boolean doBalance) {
+public static void dot_mincross(ST_Agraph_s g, boolean doBalance) {
ENTERING("e876vp4hgkzshluz6qk77cjwk","dot_mincross");
try {
int c, nc;
@@ -871,7 +847,7 @@ try {
merge2(g);
/* run mincross on contents of each cluster */
for (c = 1; c <= GD_n_cluster(g); c++) {
- nc += mincross_clust(g, (Agraph_s) GD_clust(g).plus(c).getPtr(), doBalance);
+ nc += mincross_clust(g, (ST_Agraph_s) GD_clust(g).get(c).getPtr(), doBalance);
}
if ((GD_n_cluster(g) > 0)
&& (N(s = agget(g, new CString("remincross"))) || (mapbool(s)))) {
@@ -890,13 +866,13 @@ LEAVING("e876vp4hgkzshluz6qk77cjwk","dot_mincross");
//3 756bre1tpxb1tq68p7xhkrxkc
// static adjmatrix_t *new_matrix(int i, int j)
-public static adjmatrix_t new_matrix(int i, int j) {
+public static ST_adjmatrix_t new_matrix(int i, int j) {
ENTERING("756bre1tpxb1tq68p7xhkrxkc","new_matrix");
try {
- adjmatrix_t rv = (adjmatrix_t) Memory.malloc(adjmatrix_t.class);
- rv.setInt("nrows", i);
- rv.setInt("ncols", j);
- rv.setPtr("data", zmalloc(size_t_array_of_integer(i*j)));
+ ST_adjmatrix_t rv = new ST_adjmatrix_t();
+ rv.nrows = i;
+ rv.ncols = j;
+ rv.data = new int[i][j]; // Or maybe new int[j][i] ?
return rv;
} finally {
LEAVING("756bre1tpxb1tq68p7xhkrxkc","new_matrix");
@@ -908,11 +884,11 @@ LEAVING("756bre1tpxb1tq68p7xhkrxkc","new_matrix");
//3 1n1e0k0wtlbugwm3cb4na6av6
// static void free_matrix(adjmatrix_t * p)
-public static void free_matrix(adjmatrix_t p) {
+public static void free_matrix(ST_adjmatrix_t p) {
ENTERING("1n1e0k0wtlbugwm3cb4na6av6","free_matrix");
try {
if (p!=null) {
- Memory.free(p.getPtr("data"));
+ Memory.free(p.data);
Memory.free(p);
}
} finally {
@@ -925,7 +901,7 @@ LEAVING("1n1e0k0wtlbugwm3cb4na6av6","free_matrix");
//3 49vw7fkn99wbojtfksugvuruh
// static void init_mccomp(graph_t * g, int c)
-public static void init_mccomp(Agraph_s g, int c) {
+public static void init_mccomp(ST_Agraph_s g, int c) {
ENTERING("49vw7fkn99wbojtfksugvuruh","init_mccomp");
try {
int r;
@@ -933,7 +909,7 @@ try {
GD_nlist(g, GD_comp(g).getFromList(c));
if (c > 0) {
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- GD_rank(g).plus(r).setPtr("v", GD_rank(g).plus(r).getPtr("v").plus(GD_rank(g).plus(r).getInt("n")));
+ GD_rank(g).plus(r).setPtr("v", GD_rank(g).get(r).v.plus(GD_rank(g).get(r).n));
GD_rank(g).plus(r).setInt("n", 0);
}
}
@@ -1056,7 +1032,7 @@ throw new UnsupportedOperationException();
//3 hzoz2czb672i0nbjvjhbc3na
// static void ordered_edges(graph_t * g)
-public static void ordered_edges(Agraph_s g) {
+public static void ordered_edges(ST_Agraph_s g) {
ENTERING("hzoz2czb672i0nbjvjhbc3na","ordered_edges");
try {
CString ordering;
@@ -1093,7 +1069,7 @@ LEAVING("hzoz2czb672i0nbjvjhbc3na","ordered_edges");
//3 crwc5qe7fmrpgcqh1a80toyvo
// static int mincross_clust(graph_t * par, graph_t * g, int doBalance)
-public static int mincross_clust(Agraph_s par, Agraph_s g, boolean doBalance) {
+public static int mincross_clust(ST_Agraph_s par, ST_Agraph_s g, boolean doBalance) {
ENTERING("crwc5qe7fmrpgcqh1a80toyvo","mincross_clust");
try {
int c, nc;
@@ -1103,7 +1079,7 @@ try {
flat_reorder(g);
nc = mincross_(g, 2, 2, doBalance);
for (c = 1; c <= GD_n_cluster(g); c++)
- nc += mincross_clust(g, (Agraph_s) GD_clust(g).plus(c).getPtr(), doBalance);
+ nc += mincross_clust(g, (ST_Agraph_s) GD_clust(g).get(c).getPtr(), doBalance);
save_vlist(g);
return nc;
} finally {
@@ -1116,10 +1092,10 @@ LEAVING("crwc5qe7fmrpgcqh1a80toyvo","mincross_clust");
//3 657v773m21j5w3g3v94o7464t
// static int left2right(graph_t * g, node_t * v, node_t * w)
-public static boolean left2right(Agraph_s g, Agnode_s v, Agnode_s w) {
+public static boolean left2right(ST_Agraph_s g, ST_Agnode_s v, ST_Agnode_s w) {
ENTERING("657v773m21j5w3g3v94o7464t","left2right");
try {
- adjmatrix_t M;
+ ST_adjmatrix_t M;
boolean rv=false;
/* CLUSTER indicates orig nodes of clusters, and vnodes of skeletons */
if (Z.z().ReMincross == false) {
@@ -1135,19 +1111,19 @@ try {
/*return ((ND_ranktype(v) != CLUSTER) && (ND_ranktype(w) != CLUSTER)); */
}
} else {
-UNSUPPORTED("8lltx4lxwrqossx8qw1khzwf9"); // if ((ND_clust(v)) != (ND_clust(w)))
-UNSUPPORTED("9qhn9m3123s8n6wwxjfo8awlm"); // return NOT(0);
+ if (NEQ(ND_clust(v), ND_clust(w)))
+ return NOT(0);
}
- M = (adjmatrix_t) GD_rank(g).plus(ND_rank(v)).getPtr().getPtr("flat");
+ M = (ST_adjmatrix_t) GD_rank(g).plus(ND_rank(v)).getPtr().flat;
if (M == null)
rv = false;
else {
if (GD_flip(g)!=0) {
- Agnode_s t = v;
+ ST_Agnode_s t = v;
v = w;
w = t;
}
- rv = (M.getArrayOfInteger("data").plus(((ND_low(v))*M.getInt("ncols"))+(ND_low(w))).getInt())!=0;
+ rv = M.data[ND_low(v)][ND_low(w)]!=0;
}
return rv;
} finally {
@@ -1160,21 +1136,21 @@ LEAVING("657v773m21j5w3g3v94o7464t","left2right");
//3 daknncpjy7g5peiicolbmh55i
// static int in_cross(node_t * v, node_t * w)
-public static int in_cross(Agnode_s v, Agnode_s w) {
+public static int in_cross(ST_Agnode_s v, ST_Agnode_s w) {
ENTERING("daknncpjy7g5peiicolbmh55i","in_cross");
try {
- __array_of_ptr__ e1;
- __array_of_ptr__ e2;
+ List<ST_Agedge_s> e2_ = ND_in(w).list;
int inv, cross = 0, t;
- for (e2 = ND_in(w).getTheArray(); e2.getPtr()!=null; e2=e2.plus(1)) {
- int cnt = ED_xpenalty(e2.getPtr());
- inv = ND_order((agtail(e2.getPtr())));
- for (e1 = ND_in(v).getTheArray(); e1.getPtr()!=null; e1=e1.plus(1)) {
- t = ND_order(agtail(e1.getPtr())) - inv;
+ for (int ie2 = 0; e2_.get(ie2)!=null; ie2++) {
+ int cnt = ED_xpenalty(e2_.get(ie2));
+ inv = ND_order((agtail(e2_.get(ie2))));
+ List<ST_Agedge_s> e1_ = ND_in(v).list;
+ for (int ie1 = 0; e1_.get(ie1)!=null; ie1++) {
+ t = ND_order(agtail(e1_.get(ie1))) - inv;
if ((t > 0)
|| ((t == 0)
- && ( ED_tail_port(e1.getPtr()).getStruct("p").getDouble("x") > ED_tail_port(e2.getPtr()).getStruct("p").getDouble("x"))))
- cross += ED_xpenalty(e1.getPtr()) * cnt;
+ && ( ED_tail_port(e1_.get(ie1)).p.x > ED_tail_port(e2_.get(ie2)).p.x)))
+ cross += ED_xpenalty(e1_.get(ie1)) * cnt;
}
}
return cross;
@@ -1188,20 +1164,21 @@ LEAVING("daknncpjy7g5peiicolbmh55i","in_cross");
//3 b7mf74np8ewrgzwd5u0o8fqod
// static int out_cross(node_t * v, node_t * w)
-public static int out_cross(Agnode_s v, Agnode_s w) {
+public static int out_cross(ST_Agnode_s v, ST_Agnode_s w) {
ENTERING("b7mf74np8ewrgzwd5u0o8fqod","out_cross");
try {
- __array_of_ptr__ e1, e2;
+ List<ST_Agedge_s> e2_ = ND_out(w).list;
int inv, cross = 0, t;
- for (e2 = ND_out(w).getTheArray(); e2.getPtr()!=null; e2=e2.plus(1)) {
- int cnt = ED_xpenalty((Agedge_s)e2.getPtr());
- inv = ND_order(aghead(e2.getPtr()));
- for (e1 = ND_out(v).getTheArray(); e1.getPtr()!=null; e1=e1.plus(1)) {
- t = ND_order(aghead(e1.getPtr())) - inv;
+ for (int ie2 = 0; e2_.get(ie2)!=null; ie2++) {
+ int cnt = ED_xpenalty(e2_.get(ie2));
+ inv = ND_order(aghead(e2_.get(ie2)));
+ List<ST_Agedge_s> e1_ = ND_out(v).list;
+ for (int ie1 = 0; e1_.get(ie1)!=null; ie1++) {
+ t = ND_order(aghead(e1_.get(ie1))) - inv;
if ((t > 0)
|| ((t == 0)
- && ((ED_head_port(e1.getPtr())).getStruct("p").getDouble("x") > (ED_head_port(e2.getPtr())).getStruct("p").getDouble("x"))))
- cross += ((ED_xpenalty(e1.getPtr())) * cnt);
+ && ((ED_head_port(e1_.get(ie1))).p.x) > (ED_head_port(e2_.get(ie2))).p.x))
+ cross += ((ED_xpenalty(e1_.get(ie1))) * cnt);
}
}
return cross;
@@ -1215,7 +1192,7 @@ LEAVING("b7mf74np8ewrgzwd5u0o8fqod","out_cross");
//3 ba4tbr57wips1dzpgxzx3b6ja
// static void exchange(node_t * v, node_t * w)
-public static void exchange(Agnode_s v, Agnode_s w) {
+public static void exchange(ST_Agnode_s v, ST_Agnode_s w) {
ENTERING("ba4tbr57wips1dzpgxzx3b6ja","exchange");
try {
int vi, wi, r;
@@ -1223,9 +1200,9 @@ try {
vi = ND_order(v);
wi = ND_order(w);
ND_order(v, wi);
- GD_rank(Z.z().Root).plus(r).getArrayOfPtr("v").plus(wi).setPtr(v);
+ GD_rank(Z.z().Root).get(r).v.plus(wi).setPtr(v);
ND_order(w, vi);
- GD_rank(Z.z().Root).plus(r).getArrayOfPtr("v").plus(vi).setPtr(w);
+ GD_rank(Z.z().Root).get(r).v.plus(vi).setPtr(w);
} finally {
LEAVING("ba4tbr57wips1dzpgxzx3b6ja","exchange");
}
@@ -1361,16 +1338,16 @@ throw new UnsupportedOperationException();
//3 bxwzx4m9ejausu58u7abr6fm0
// static int transpose_step(graph_t * g, int r, int reverse)
-public static int transpose_step(Agraph_s g, int r, boolean reverse) {
+public static int transpose_step(ST_Agraph_s g, int r, boolean reverse) {
ENTERING("bxwzx4m9ejausu58u7abr6fm0","transpose_step");
try {
int i, c0, c1, rv;
- Agnode_s v, w;
+ ST_Agnode_s v, w;
rv = 0;
- GD_rank(g).plus(r).getPtr().setBoolean("candidate", false);
- for (i = 0; i < GD_rank(g).plus(r).getInt("n") - 1; i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
- w = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i + 1).getPtr();
+ GD_rank(g).get(r).candidate= false;
+ for (i = 0; i < GD_rank(g).get(r).n - 1; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
+ w = (ST_Agnode_s) GD_rank(g).get(r).v.plus(i + 1).getPtr();
//assert(ND_order(v) < ND_order(w));
if (left2right(g, v, w))
continue;
@@ -1379,22 +1356,22 @@ try {
c0 += in_cross(v, w);
c1 += in_cross(w, v);
}
- if (GD_rank(g).plus(r + 1).getInt("n") > 0) {
+ if (GD_rank(g).get(r + 1).n > 0) {
c0 += out_cross(v, w);
c1 += out_cross(w, v);
}
if ((c1 < c0) || ((c0 > 0) && reverse && (c1 == c0))) {
exchange(v, w);
rv += (c0 - c1);
- GD_rank(Z.z().Root).plus(r).getPtr().setBoolean("valid", false);
- GD_rank(g).plus(r).getPtr().setBoolean("candidate", NOT(false));
+ GD_rank(Z.z().Root).get(r).valid= 0;
+ GD_rank(g).get(r).candidate= NOT(false);
if (r > GD_minrank(g)) {
- GD_rank(Z.z().Root).plus(r - 1).getPtr().setBoolean("valid", false);
- GD_rank(g).plus(r - 1).getPtr().setBoolean("candidate", NOT(false));
+ GD_rank(Z.z().Root).plus(r - 1).getPtr().valid= 0;
+ GD_rank(g).get(r - 1).candidate= NOT(false);
}
if (r < GD_maxrank(g)) {
- GD_rank(Z.z().Root).plus(r + 1).getPtr().setBoolean("valid", false);
- GD_rank(g).plus(r + 1).getPtr().setBoolean("candidate", NOT(false));
+ GD_rank(Z.z().Root).plus(r + 1).getPtr().valid= 0;
+ GD_rank(g).get(r + 1).candidate= NOT(false);
}
}
}
@@ -1409,16 +1386,16 @@ LEAVING("bxwzx4m9ejausu58u7abr6fm0","transpose_step");
//3 2i22bxgg5y7v5c5d40k5zppky
// static void transpose(graph_t * g, int reverse)
-public static void transpose(Agraph_s g, boolean reverse) {
+public static void transpose(ST_Agraph_s g, boolean reverse) {
ENTERING("2i22bxgg5y7v5c5d40k5zppky","transpose");
try {
int r, delta;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++)
- GD_rank(g).plus(r).getPtr().setBoolean("candidate", NOT(false));
+ GD_rank(g).get(r).candidate= NOT(false);
do {
delta = 0;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- if (GD_rank(g).plus(r).getPtr().getBoolean("candidate")) {
+ if (GD_rank(g).get(r).candidate) {
delta += transpose_step(g, r, reverse);
}
}
@@ -1434,7 +1411,7 @@ LEAVING("2i22bxgg5y7v5c5d40k5zppky","transpose");
//3 7lrk2rxqnwwdau8cx85oqkpmv
// static int mincross(graph_t * g, int startpass, int endpass, int doBalance)
-public static int mincross_(Agraph_s g, int startpass, int endpass, boolean doBalance) {
+public static int mincross_(ST_Agraph_s g, int startpass, int endpass, boolean doBalance) {
ENTERING("7lrk2rxqnwwdau8cx85oqkpmv","mincross");
try {
int maxthispass=0, iter, trying, pass;
@@ -1505,18 +1482,17 @@ LEAVING("7lrk2rxqnwwdau8cx85oqkpmv","mincross");
//3 520049zkz9mafaeklgvm6s8e5
// static void restore_best(graph_t * g)
-public static void restore_best(Agraph_s g) {
+public static void restore_best(ST_Agraph_s g) {
ENTERING("520049zkz9mafaeklgvm6s8e5","restore_best");
try {
- Agnode_s n;
+ ST_Agnode_s n;
int r;
for (n = GD_nlist(g); n!=null; n = ND_next(n))
- ND_order(n, (int)ND_coord(n).getDouble("x"));
+ ND_order(n, (int)ND_coord(n).x);
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- GD_rank(Z.z().Root).plus(r).setBoolean("valid", false);
- qsort(GD_rank(g).plus(r).getPtr("v"),
- GD_rank(g).plus(r).getInt("n"),
- sizeof(GD_rank(g).plus(r).getPtr("v").plus(0)),
+ GD_rank(Z.z().Root).get(r).valid= 0;
+ qsort(GD_rank(g).get(r).v,
+ GD_rank(g).get(r).n,
function(mincross__c.class, "nodeposcmpf"));
}
} finally {
@@ -1529,10 +1505,10 @@ LEAVING("520049zkz9mafaeklgvm6s8e5","restore_best");
//3 8uyqc48j0oul206l3np85wj9p
// static void save_best(graph_t * g)
-public static void save_best(Agraph_s g) {
+public static void save_best(ST_Agraph_s g) {
ENTERING("8uyqc48j0oul206l3np85wj9p","save_best");
try {
- Agnode_s n;
+ ST_Agnode_s n;
for (n = GD_nlist(g); n!=null; n = ND_next(n))
(ND_coord(n)).x = ND_order(n);
} finally {
@@ -1545,16 +1521,16 @@ LEAVING("8uyqc48j0oul206l3np85wj9p","save_best");
//3 6d08fwi4dsk6ikk5d0gy6rq2h
// static void merge_components(graph_t * g)
-public static void merge_components(Agraph_s g) {
+public static void merge_components(ST_Agraph_s g) {
ENTERING("6d08fwi4dsk6ikk5d0gy6rq2h","merge_components");
try {
int c;
- Agnode_s u, v;
+ ST_Agnode_s u, v;
if (GD_comp(g).size <= 1)
return;
u = null;
for (c = 0; c < GD_comp(g).size; c++) {
- v = (Agnode_s) GD_comp(g).getFromList(c);
+ v = (ST_Agnode_s) GD_comp(g).getFromList(c);
if (u!=null)
ND_next(u, v);
ND_prev(v, u);
@@ -1577,19 +1553,19 @@ LEAVING("6d08fwi4dsk6ikk5d0gy6rq2h","merge_components");
//3 91vebcdl3q3y0uyxef0iw71n9
// static void merge2(graph_t * g)
-public static void merge2(Agraph_s g) {
+public static void merge2(ST_Agraph_s g) {
ENTERING("91vebcdl3q3y0uyxef0iw71n9","merge2");
try {
int i, r;
- Agnode_s v;
+ ST_Agnode_s v;
/* merge the components and rank limits */
merge_components(g);
/* install complete ranks */
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- GD_rank(g).plus(r).setInt("n", GD_rank(g).plus(r).getInt("an"));
- GD_rank(g).plus(r).setPtr("v", GD_rank(g).plus(r).getPtr("av"));
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ GD_rank(g).plus(r).setInt("n", GD_rank(g).get(r).an);
+ GD_rank(g).plus(r).setPtr("v", GD_rank(g).get(r).av);
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
if (v == null) {
/*if (Verbose)
fprintf(stderr,
@@ -1611,12 +1587,12 @@ LEAVING("91vebcdl3q3y0uyxef0iw71n9","merge2");
//3 3cwiyyk1d1jkoo9iqwb5bge4x
// static void cleanup2(graph_t * g, int nc)
-public static void cleanup2(Agraph_s g, int nc) {
+public static void cleanup2(ST_Agraph_s g, int nc) {
ENTERING("3cwiyyk1d1jkoo9iqwb5bge4x","cleanup2");
try {
int i, j, r, c;
- Agnode_s v;
- Agedge_s e;
+ ST_Agnode_s v;
+ ST_Agedge_s e;
if (Z.z().TI_list!=null) {
Memory.free(Z.z().TI_list);
Z.z().TI_list = null;
@@ -1627,23 +1603,23 @@ try {
}
/* fix vlists of clusters */
for (c = 1; c <= GD_n_cluster(g); c++)
- rec_reset_vlists((Agraph_s) GD_clust(g).plus(c).getPtr());
+ rec_reset_vlists((ST_Agraph_s) GD_clust(g).get(c).getPtr());
/* remove node temporary edges for ordering nodes */
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
ND_order(v, i);
if (ND_flat_out(v).listNotNull()) {
- for (j = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++)
+ for (j = 0; (e = (ST_Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++)
if (ED_edge_type(e) == 4) {
delete_flat_edge(e);
- Memory.free(e.getPtr("base.data"));
+ Memory.free(e.base.data);
Memory.free(e);
j--;
}
}
}
- free_matrix((adjmatrix_t) GD_rank(g).plus(r).getPtr("flat"));
+ free_matrix((ST_adjmatrix_t) GD_rank(g).get(r).flat);
}
/*if (Verbose)
fprintf(stderr, "mincross %s: %d crossings, %.2f secs.\n",
@@ -1658,17 +1634,17 @@ LEAVING("3cwiyyk1d1jkoo9iqwb5bge4x","cleanup2");
//3 arax68kzcf86dr2xu0gp962gq
// static node_t *neighbor(node_t * v, int dir)
-public static Agnode_s neighbor(Agnode_s v, int dir) {
+public static ST_Agnode_s neighbor(ST_Agnode_s v, int dir) {
ENTERING("arax68kzcf86dr2xu0gp962gq","neighbor");
try {
- Agnode_s rv;
+ ST_Agnode_s rv;
rv = null;
assert(v!=null);
if (dir < 0) {
if (ND_order(v) > 0)
- rv = (Agnode_s) GD_rank(Z.z().Root).plus(ND_rank(v)).getArrayOfPtr("v").plus(ND_order(v) - 1).getPtr();
+ rv = (ST_Agnode_s) GD_rank(Z.z().Root).plus(ND_rank(v)).getPtr().v.plus(ND_order(v) - 1).getPtr();
} else
- rv = (Agnode_s) GD_rank(Z.z().Root).plus(ND_rank(v)).getArrayOfPtr("v").plus(ND_order(v) + 1).getPtr();
+ rv = (ST_Agnode_s) GD_rank(Z.z().Root).plus(ND_rank(v)).getPtr().v.plus(ND_order(v) + 1).getPtr();
assert((rv == null) || (ND_order(rv)-ND_order(v))*dir > 0);
return rv;
} finally {
@@ -1681,7 +1657,7 @@ LEAVING("arax68kzcf86dr2xu0gp962gq","neighbor");
//3 1waqm8z71hi389dt1wqh0bmhr
// static int is_a_normal_node_of(graph_t * g, node_t * v)
-public static boolean is_a_normal_node_of(Agraph_s g, Agnode_s v) {
+public static boolean is_a_normal_node_of(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("1waqm8z71hi389dt1wqh0bmhr","is_a_normal_node_of");
try {
return ((ND_node_type(v) == 0) && agcontains(g, v));
@@ -1695,12 +1671,12 @@ LEAVING("1waqm8z71hi389dt1wqh0bmhr","is_a_normal_node_of");
//3 9f8atyi1unmleplge3rijdt4s
// static int is_a_vnode_of_an_edge_of(graph_t * g, node_t * v)
-public static boolean is_a_vnode_of_an_edge_of(Agraph_s g, Agnode_s v) {
+public static boolean is_a_vnode_of_an_edge_of(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("9f8atyi1unmleplge3rijdt4s","is_a_vnode_of_an_edge_of");
try {
if ((ND_node_type(v) == 1)
&& (ND_in(v).size == 1) && (ND_out(v).size == 1)) {
- Agedge_s e = (Agedge_s) ND_out(v).getFromList(0);
+ ST_Agedge_s e = (ST_Agedge_s) ND_out(v).getFromList(0);
while (ED_edge_type(e) != 0)
e = ED_to_orig(e);
if (agcontains(g, e))
@@ -1717,7 +1693,7 @@ LEAVING("9f8atyi1unmleplge3rijdt4s","is_a_vnode_of_an_edge_of");
//3 eo7ulc8vwmoaig0j479yapve2
// static int inside_cluster(graph_t * g, node_t * v)
-public static boolean inside_cluster(Agraph_s g, Agnode_s v) {
+public static boolean inside_cluster(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("eo7ulc8vwmoaig0j479yapve2","inside_cluster");
try {
return (is_a_normal_node_of(g, v) | is_a_vnode_of_an_edge_of(g, v));
@@ -1731,10 +1707,10 @@ LEAVING("eo7ulc8vwmoaig0j479yapve2","inside_cluster");
//3 8xkmkt4r6gfqj8gk0mokszoz0
// static node_t *furthestnode(graph_t * g, node_t * v, int dir)
-public static Agnode_s furthestnode(Agraph_s g, Agnode_s v, int dir) {
+public static ST_Agnode_s furthestnode(ST_Agraph_s g, ST_Agnode_s v, int dir) {
ENTERING("8xkmkt4r6gfqj8gk0mokszoz0","furthestnode");
try {
- Agnode_s u, rv;
+ ST_Agnode_s u, rv;
rv = u = v;
while ((u = neighbor(u, dir))!=null) {
if (is_a_normal_node_of(g, u))
@@ -1753,13 +1729,13 @@ LEAVING("8xkmkt4r6gfqj8gk0mokszoz0","furthestnode");
//3 bwmu2hkwud40601oq5vgo2f1h
// void save_vlist(graph_t * g)
-public static void save_vlist(Agraph_s g) {
+public static void save_vlist(ST_Agraph_s g) {
ENTERING("bwmu2hkwud40601oq5vgo2f1h","save_vlist");
try {
int r;
if (GD_rankleader(g)!=null)
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- GD_rankleader(g).plus(r).setPtr(GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr());
+ GD_rankleader(g).plus(r).setPtr(GD_rank(g).get(r).v.get(0));
}
} finally {
LEAVING("bwmu2hkwud40601oq5vgo2f1h","save_vlist");
@@ -1771,13 +1747,13 @@ LEAVING("bwmu2hkwud40601oq5vgo2f1h","save_vlist");
//3 hwdxg97sefkuyd25x2q4pgzg
// void rec_save_vlists(graph_t * g)
-public static void rec_save_vlists(Agraph_s g) {
+public static void rec_save_vlists(ST_Agraph_s g) {
ENTERING("hwdxg97sefkuyd25x2q4pgzg","rec_save_vlists");
try {
int c;
save_vlist(g);
for (c = 1; c <= GD_n_cluster(g); c++)
- rec_save_vlists((Agraph_s) GD_clust(g).plus(c).getPtr());
+ rec_save_vlists((ST_Agraph_s) GD_clust(g).get(c).getPtr());
} finally {
LEAVING("hwdxg97sefkuyd25x2q4pgzg","rec_save_vlists");
}
@@ -1788,21 +1764,21 @@ LEAVING("hwdxg97sefkuyd25x2q4pgzg","rec_save_vlists");
//3 f3b4wat4uxn5oil720i5mwq4v
// void rec_reset_vlists(graph_t * g)
-public static void rec_reset_vlists(Agraph_s g) {
+public static void rec_reset_vlists(ST_Agraph_s g) {
ENTERING("f3b4wat4uxn5oil720i5mwq4v","rec_reset_vlists");
try {
int r, c;
- Agnode_s u, v, w;
+ ST_Agnode_s u, v, w;
/* fix vlists of sub-clusters */
for (c = 1; c <= GD_n_cluster(g); c++)
- rec_reset_vlists((Agraph_s) GD_clust(g).plus(c).getPtr());
+ rec_reset_vlists((ST_Agraph_s) GD_clust(g).get(c).getPtr());
if (GD_rankleader(g)!=null)
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- v = (Agnode_s) GD_rankleader(g).plus(r).getPtr();
+ v = (ST_Agnode_s) GD_rankleader(g).get(r);
u = furthestnode(g, v, -1);
w = furthestnode(g, v, 1);
GD_rankleader(g).plus(r).setPtr(u);
- GD_rank(g).plus(r).setPtr("v", GD_rank(dot_root(g)).plus(r).getPtr("v").plus(ND_order(u)));
+ GD_rank(g).plus(r).setPtr("v", GD_rank(dot_root(g)).get(r).v.plus(ND_order(u)));
GD_rank(g).plus(r).setInt("n", ND_order(w) - ND_order(u) + 1);
}
} finally {
@@ -1815,7 +1791,7 @@ LEAVING("f3b4wat4uxn5oil720i5mwq4v","rec_reset_vlists");
//3 pv0rbbdopo4hmkbl5916qys1
// static Agraph_t* realFillRanks (Agraph_t* g, int rnks[], int rnks_sz, Agraph_t* sg)
-public static Agraph_s realFillRanks(Agraph_s g, __ptr__ rnks, int rnks_sz, Agraph_s sg) {
+public static ST_Agraph_s realFillRanks(ST_Agraph_s g, __ptr__ rnks, int rnks_sz, ST_Agraph_s sg) {
ENTERING("pv0rbbdopo4hmkbl5916qys1","realFillRanks");
try {
UNSUPPORTED("2o2sf6xi2aumo5k0vglp4ik2y"); // static Agraph_t*
@@ -1866,10 +1842,10 @@ LEAVING("pv0rbbdopo4hmkbl5916qys1","realFillRanks");
//3 1qy9bupreg1pax62owznr98k
// static void fillRanks (Agraph_t* g)
-public static void fillRanks(Agraph_s g) {
+public static void fillRanks(ST_Agraph_s g) {
ENTERING("1qy9bupreg1pax62owznr98k","fillRanks");
try {
- Agraph_s sg;
+ ST_Agraph_s sg;
int rnks_sz = GD_maxrank(g) + 2;
__ptr__ rnks = zmalloc(size_t_array_of_integer(rnks_sz));
sg = realFillRanks (g, rnks, rnks_sz, null);
@@ -1884,7 +1860,7 @@ LEAVING("1qy9bupreg1pax62owznr98k","fillRanks");
//3 7fy4chyk12o7bgp1rv3h27yl3
// static void init_mincross(graph_t * g)
-public static void init_mincross(Agraph_s g) {
+public static void init_mincross(ST_Agraph_s g) {
ENTERING("7fy4chyk12o7bgp1rv3h27yl3","init_mincross");
try {
int size;
@@ -1896,7 +1872,7 @@ try {
/* also, the +1 avoids attempts to alloc 0 sizes, something
that efence complains about */
size = agnedges(dot_root(g)) + 1;
- Z.z().TE_list = zmalloc(sizeof_starstar_empty(Agedge_s.class, size));
+ Z.z().TE_list = new ST_Agedge_s.ArrayOfStar(size);
Z.z().TI_list = zmalloc(size_t_array_of_integer(size));
mincross_options(g);
if ((GD_flags(g) & (1 << 4))!=0)
@@ -1917,16 +1893,16 @@ LEAVING("7fy4chyk12o7bgp1rv3h27yl3","init_mincross");
//3 6fprrp93vmz0jn3l4ro0iropp
// void flat_rev(Agraph_t * g, Agedge_t * e)
-public static void flat_rev(Agraph_s g, Agedge_s e) {
+public static void flat_rev(ST_Agraph_s g, ST_Agedge_s e) {
ENTERING("6fprrp93vmz0jn3l4ro0iropp","flat_rev");
try {
int j;
- Agedge_s rev;
+ ST_Agedge_s rev;
if (ND_flat_out(aghead(e)).listNotNull()==false)
- // if (N(ND_flat_out(aghead(e)).getArrayOfPtr("list")))
+ // if (N(ND_flat_out(aghead(e)).list))
rev = null;
else
- for (j = 0; (rev = (Agedge_s) ND_flat_out(aghead(e)).getFromList(j))!=null; j++)
+ for (j = 0; (rev = (ST_Agedge_s) ND_flat_out(aghead(e)).getFromList(j))!=null; j++)
if (EQ(aghead(rev), agtail(e)))
break;
if (rev!=null) {
@@ -1956,36 +1932,36 @@ LEAVING("6fprrp93vmz0jn3l4ro0iropp","flat_rev");
//3 63ol0ch6cgln1nvl5oiz6n1v0
// static void flat_search(graph_t * g, node_t * v)
-public static void flat_search(Agraph_s g, Agnode_s v) {
+public static void flat_search(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("63ol0ch6cgln1nvl5oiz6n1v0","flat_search");
try {
int i;
boolean hascl;
- Agedge_s e;
- adjmatrix_t M = (adjmatrix_t) GD_rank(g).plus(ND_rank(v)).getPtr("flat");
+ ST_Agedge_s e;
+ ST_adjmatrix_t M = (ST_adjmatrix_t) GD_rank(g).get(ND_rank(v)).flat;
ND_mark(v, NOT(false));
ND_onstack(v, NOT(false));
hascl = (GD_n_cluster(dot_root(g)) > 0);
if (ND_flat_out(v).listNotNull())
- for (i = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) {
if (hascl
&& NOT(agcontains(g, agtail(e)) && agcontains(g, aghead(e))))
continue;
if (ED_weight(e) == 0)
continue;
if (ND_onstack(aghead(e)) == NOT(false)) {
- assert(ND_low(aghead(e)) < M.getInt("nrows"));
- assert(ND_low(agtail(e)) < M.getInt("ncols"));
- M.getArrayOfInteger("data").plus(ND_low(aghead(e))*M.getInt("ncols")+ND_low(agtail(e))).setInt(1);
+ assert(ND_low(aghead(e)) < M.nrows);
+ assert(ND_low(agtail(e)) < M.ncols);
+ M.data[ND_low(aghead(e))][ND_low(agtail(e))]=1;
delete_flat_edge(e);
i--;
if (ED_edge_type(e) == 4)
continue;
flat_rev(g, e);
} else {
- assert(ND_low(aghead(e)) < M.getInt("nrows"));
- assert(ND_low(agtail(e)) < M.getInt("ncols"));
- M.getArrayOfInteger("data").plus(ND_low(agtail(e))*M.getInt("ncols")+ND_low(aghead(e))).setInt(1);
+ assert(ND_low(aghead(e)) < M.nrows);
+ assert(ND_low(agtail(e)) < M.ncols);
+ M.data[ND_low(agtail(e))][ND_low(aghead(e))]=1;
if (ND_mark(aghead(e)) == 0)
flat_search(g, aghead(e));
}
@@ -2001,27 +1977,27 @@ LEAVING("63ol0ch6cgln1nvl5oiz6n1v0","flat_search");
//3 3v5h7z4vqivibvpt913lg8at0
// static void flat_breakcycles(graph_t * g)
-public static void flat_breakcycles(Agraph_s g) {
+public static void flat_breakcycles(ST_Agraph_s g) {
ENTERING("3v5h7z4vqivibvpt913lg8at0","flat_breakcycles");
try {
int i, r, flat;
- Agnode_s v;
+ ST_Agnode_s v;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
flat = 0;
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
ND_mark(v, 0);
ND_onstack(v, 0);
ND_low(v, i);
if ((ND_flat_out(v).size > 0) && (flat == 0)) {
GD_rank(g).plus(r).setPtr("flat",
- new_matrix(GD_rank(g).plus(r).getInt("n"), GD_rank(g).plus(r).getInt("n")));
+ new_matrix(GD_rank(g).get(r).n, GD_rank(g).get(r).n));
flat = 1;
}
}
if (flat!=0) {
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
if (ND_mark(v) == 0)
flat_search(g, v);
}
@@ -2037,14 +2013,14 @@ LEAVING("3v5h7z4vqivibvpt913lg8at0","flat_breakcycles");
//3 d5vb6jiw8mhkaa8gjwn4eqfyn
// void allocate_ranks(graph_t * g)
-public static void allocate_ranks(Agraph_s g) {
+public static void allocate_ranks(ST_Agraph_s g) {
ENTERING("d5vb6jiw8mhkaa8gjwn4eqfyn","allocate_ranks");
try {
// REVIEW 17/01/2016
int r, low, high;
__ptr__ cn;
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
cn = zmalloc(size_t_array_of_integer(GD_maxrank(g) + 2));
/* must be 0 based, not GD_minrank */
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
@@ -2061,11 +2037,11 @@ try {
cn.plus(r).setInt(1+cn.plus(r).getInt());
}
}
- GD_rank(g, zmalloc(sizeof(rank_t.class, GD_maxrank(g) + 2)));
+ GD_rank(g, new ST_rank_t.Array2(GD_maxrank(g) + 2));
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
GD_rank(g).plus(r).setInt("n", cn.plus(r).getInt());
GD_rank(g).plus(r).setInt("an", cn.plus(r).getInt());
- __ptr__ tmp = zmalloc(sizeof_starstar_empty(Agnode_s.class, cn.plus(r).getInt() + 1));
+ ST_Agnode_s.ArrayOfStar tmp = new ST_Agnode_s.ArrayOfStar(cn.plus(r).getInt() + 1);
GD_rank(g).plus(r).setPtr("v", tmp);
GD_rank(g).plus(r).setPtr("av", tmp);
}
@@ -2080,22 +2056,22 @@ LEAVING("d5vb6jiw8mhkaa8gjwn4eqfyn","allocate_ranks");
//3 3lxoqxhiri9fgt20zc5jz3aa5
// void install_in_rank(graph_t * g, node_t * n)
-public static void install_in_rank(Agraph_s g, Agnode_s n) {
+public static void install_in_rank(ST_Agraph_s g, ST_Agnode_s n) {
ENTERING("3lxoqxhiri9fgt20zc5jz3aa5","install_in_rank");
try {
int i, r;
r = ND_rank(n);
- i = GD_rank(g).plus(r).getInt("n");
- if (GD_rank(g).plus(r).getInt("an") <= 0) {
+ i = GD_rank(g).get(r).n;
+ if (GD_rank(g).get(r).an <= 0) {
UNSUPPORTED("8qk1xhvvb994zhv9aq10k4v12"); // agerr(AGERR, "install_in_rank, line %d: %s %s rank %d i = %d an = 0\n",
UNSUPPORTED("53h8d82ax23hys2k21hjswp72"); // 1034, agnameof(g), agnameof(n), r, i);
return;
}
- GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).setPtr(n);
+ GD_rank(g).get(r).v.plus(i).setPtr(n);
ND_order(n, i);
- GD_rank(g).plus(r).setInt("n", 1+GD_rank(g).plus(r).getInt("n"));
+ GD_rank(g).plus(r).setInt("n", 1+GD_rank(g).get(r).n);
// assert(GD_rank(g)[r].n <= GD_rank(g)[r].an);
- if (ND_order(n) > GD_rank(Z.z().Root).plus(r).getInt("an")) {
+ if (ND_order(n) > GD_rank(Z.z().Root).get(r).an) {
UNSUPPORTED("399szcw1txekt1xssyw7s2x07"); // agerr(AGERR, "install_in_rank, line %d: ND_order(%s) [%d] > GD_rank(Root)[%d].an [%d]\n",
UNSUPPORTED("9puojrmsk6vb1qc0jtr8ge4g8"); // 1052, agnameof(n), ND_order(n), r, GD_rank(Root)[r].an);
return;
@@ -2105,8 +2081,8 @@ UNSUPPORTED("7o1thnqda767wqpe2lh9mj03t"); // agerr(AGERR, "install_in_rank, lin
UNSUPPORTED("d2ugluzf7bmj7osicgitgy3sr"); // 1057, r, GD_minrank(g), GD_maxrank(g));
return;
}
- if (GD_rank(g).plus(r).getPtr("v").plus(ND_order(n)).comparePointer(
- GD_rank(g).plus(r).getPtr("av").plus(GD_rank(Z.z().Root).plus(r).getInt("an")))>0) {
+ if (GD_rank(g).get(r).v.plus(ND_order(n)).comparePointer(
+ GD_rank(g).get(r).av.plus(GD_rank(Z.z().Root).get(r).an))>0) {
UNSUPPORTED("3eb32nc5czs5auwzz5p5mtl04"); // agerr(AGERR, "install_in_rank, line %d: GD_rank(g)[%d].v + ND_order(%s) [%d] > GD_rank(g)[%d].av + GD_rank(Root)[%d].an [%d]\n",
UNSUPPORTED("3qe3qpw5h6vse39xs1ca9sjmo"); // 1062, r, agnameof(n),GD_rank(g)[r].v + ND_order(n), r, r, GD_rank(g)[r].av+GD_rank(Root)[r].an);
return;
@@ -2121,21 +2097,21 @@ LEAVING("3lxoqxhiri9fgt20zc5jz3aa5","install_in_rank");
//3 7t49bz6lfcbd9v63ds2x3518z
// void build_ranks(graph_t * g, int pass)
-public static void build_ranks(Agraph_s g, int pass) {
+public static void build_ranks(ST_Agraph_s g, int pass) {
ENTERING("7t49bz6lfcbd9v63ds2x3518z","build_ranks");
try {
int i, j;
- Agnode_s n, n0 = null;
- __ptr__ otheredges;
- nodequeue q;
+ ST_Agnode_s n, n0 = null;
+ List<ST_Agedge_s> otheredges;
+ ST_nodequeue q;
q = new_queue(GD_n_nodes(g));
for (n = GD_nlist(g); n!=null; n = ND_next(n))
ND_mark(n, 0);
for (i = GD_minrank(g); i <= GD_maxrank(g); i++)
GD_rank(g).plus(i).setInt("n", 0);
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
- otheredges = ((pass == 0) ? ND_in(n).getTheList() : ND_out(n).getTheList());
- if (otheredges.plus(0).getPtr() != null)
+ otheredges = ((pass == 0) ? ND_in(n).list : ND_out(n).list);
+ if (otheredges.get(0)!= null)
continue;
if ((ND_mark(n)) == 0) {
ND_mark(n, 1);
@@ -2154,13 +2130,13 @@ try {
UNSUPPORTED("1b3hbd5artrq77i58q2o9kgz3"); // agerr(AGERR, "surprise\n");
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
GD_rank(Z.z().Root).plus(i).setInt("valid", 0);
- if (GD_flip(g)!=0 && (GD_rank(g).plus(i).getInt("n") > 0)) {
+ if (GD_flip(g)!=0 && (GD_rank(g).get(i).n > 0)) {
int nn, ndiv2;
- __ptr__ vlist = GD_rank(g).plus(i).getPtr("v");
- nn = GD_rank(g).plus(i).getInt("n") - 1;
+ ST_Agnode_s.ArrayOfStar vlist = GD_rank(g).get(i).v;
+ nn = GD_rank(g).get(i).n - 1;
ndiv2 = nn / 2;
for (j = 0; j <= ndiv2; j++)
- exchange((Agnode_s)vlist.plus(j).getPtr(), (Agnode_s)vlist.plus(nn - j).getPtr());
+ exchange((ST_Agnode_s)vlist.get(j), (ST_Agnode_s)vlist.plus(nn - j).getPtr());
}
}
if (EQ(g, dot_root(g)) && ncross(g) > 0)
@@ -2176,14 +2152,14 @@ LEAVING("7t49bz6lfcbd9v63ds2x3518z","build_ranks");
//3 bmjlneqxex6a9silzkkidkx6s
// void enqueue_neighbors(nodequeue * q, node_t * n0, int pass)
-public static void enqueue_neighbors(nodequeue q, Agnode_s n0, int pass) {
+public static void enqueue_neighbors(ST_nodequeue q, ST_Agnode_s n0, int pass) {
ENTERING("bmjlneqxex6a9silzkkidkx6s","enqueue_neighbors");
try {
int i;
- Agedge_s e;
+ ST_Agedge_s e;
if (pass == 0) {
for (i = 0; i < ND_out(n0).size; i++) {
- e = (Agedge_s) ND_out(n0).getFromList(i);
+ e = (ST_Agedge_s) ND_out(n0).getFromList(i);
if (((ND_mark(aghead(e)))) == 0) {
ND_mark(aghead(e), 1);
enqueue(q, aghead(e));
@@ -2191,7 +2167,7 @@ try {
}
} else {
for (i = 0; i < ND_in(n0).size; i++) {
- e = (Agedge_s) ND_in(n0).getFromList(i);
+ e = (ST_Agedge_s) ND_in(n0).getFromList(i);
if (((ND_mark(agtail(e)))) == 0) {
ND_mark(agtail(e), 1);
enqueue(q, agtail(e));
@@ -2208,7 +2184,7 @@ LEAVING("bmjlneqxex6a9silzkkidkx6s","enqueue_neighbors");
//3 c8nqj0v20api63pikohsbx92u
// static int constraining_flat_edge(Agraph_t *g, Agnode_t *v, Agedge_t *e)
-public static boolean constraining_flat_edge(Agraph_s g, Agnode_s v, Agedge_s e) {
+public static boolean constraining_flat_edge(ST_Agraph_s g, ST_Agnode_s v, ST_Agedge_s e) {
ENTERING("c8nqj0v20api63pikohsbx92u","constraining_flat_edge");
try {
if (ED_weight(e) == 0) return false;
@@ -2225,14 +2201,14 @@ LEAVING("c8nqj0v20api63pikohsbx92u","constraining_flat_edge");
//3 46to0pkk188af2dlkik2ab7e3
// static int postorder(graph_t * g, node_t * v, node_t ** list, int r)
-public static int postorder(Agraph_s g, Agnode_s v, __ptr__ list, int r) {
+public static int postorder(ST_Agraph_s g, ST_Agnode_s v, __ptr__ list, int r) {
ENTERING("46to0pkk188af2dlkik2ab7e3","postorder");
try {
- Agedge_s e;
+ ST_Agedge_s e;
int i, cnt = 0;
ND_mark(v, NOT(false));
if (ND_flat_out(v).size > 0) {
- for (i = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) {
if (N(constraining_flat_edge(g,v,e))) continue;
if ((ND_mark(aghead(e))) == 0)
cnt += postorder(g, aghead(e), list.plus(cnt), r);
@@ -2251,34 +2227,34 @@ LEAVING("46to0pkk188af2dlkik2ab7e3","postorder");
//3 zuxoswju917kyl08a5f0gtp6
// static void flat_reorder(graph_t * g)
-public static void flat_reorder(Agraph_s g) {
+public static void flat_reorder(ST_Agraph_s g) {
ENTERING("zuxoswju917kyl08a5f0gtp6","flat_reorder");
try {
int i, j, r, pos, n_search, local_in_cnt, local_out_cnt, base_order;
- Agnode_s v, t;
+ ST_Agnode_s v, t;
__ptr__ left, right;
- __ptr__ temprank = null;
- Agedge_s flat_e, e;
+ ST_Agnode_s.ArrayOfStar temprank = null;
+ ST_Agedge_s flat_e, e;
if (GD_has_flat_edges(g) == 0)
return;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- if (GD_rank(g).plus(r).getInt("n") == 0) continue;
- base_order = ND_order(GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr());
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++)
- ND_mark(GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr(), 0);
- temprank = ALLOC(i + 1, temprank, Agnode_s.class);
+ if (GD_rank(g).get(r).n == 0) continue;
+ base_order = ND_order(GD_rank(g).get(r).v.get(0));
+ for (i = 0; i < GD_rank(g).get(r).n; i++)
+ ND_mark(GD_rank(g).get(r).v.get(i), 0);
+ temprank = ALLOC_Agnode_s(i + 1, temprank);
pos = 0;
/* construct reverse topological sort order in temprank */
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- if (GD_flip(g)!=0) v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
- else v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(GD_rank(g).plus(r).getInt("n") - i - 1).getPtr();
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ if (GD_flip(g)!=0) v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
+ else v = (ST_Agnode_s) GD_rank(g).get(r).v.plus(GD_rank(g).get(r).n - i - 1).getPtr();
local_in_cnt = local_out_cnt = 0;
for (j = 0; j < ND_flat_in(v).size; j++) {
- flat_e = (Agedge_s) ND_flat_in(v).getFromList(j);
+ flat_e = (ST_Agedge_s) ND_flat_in(v).getFromList(j);
if (constraining_flat_edge(g,v,flat_e)) local_in_cnt++;
}
for (j = 0; j < ND_flat_out(v).size; j++) {
- flat_e = (Agedge_s) ND_flat_out(v).getFromList(j);
+ flat_e = (ST_Agedge_s) ND_flat_out(v).getFromList(j);
if (constraining_flat_edge(g,v,flat_e)) local_out_cnt++;
}
if ((local_in_cnt == 0) && (local_out_cnt == 0))
@@ -2296,23 +2272,23 @@ try {
left = temprank;
right = temprank.plus(pos - 1);
while (left.comparePointer(right) < 0) {
- t = (Agnode_s) left.getPtr();
+ t = (ST_Agnode_s) left.getPtr();
left.setPtr(right.getPtr());
right.setPtr(t);
left = left.plus(1);
right = right.plus(-1);
}
}
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) temprank.plus(i).getPtr();
- GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).setPtr(v);
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) temprank.get(i);
+ GD_rank(g).get(r).v.plus(i).setPtr(v);
ND_order(v, i + base_order);
}
/* nonconstraint flat edges must be made LR */
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
if (ND_flat_out(v).listNotNull()) {
- for (j = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++) {
+ for (j = 0; (e = (ST_Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++) {
if ( ((GD_flip(g) == 0) && (ND_order(aghead(e)) < ND_order(agtail(e)))) ||
( (GD_flip(g)!=0) && (ND_order(aghead(e)) > ND_order(agtail(e)) ))) {
assert(constraining_flat_edge(g,v,e) == false);
@@ -2340,15 +2316,15 @@ LEAVING("zuxoswju917kyl08a5f0gtp6","flat_reorder");
//3 inv6wazjcnh4xkzzphsdcmg4
// static void reorder(graph_t * g, int r, int reverse, int hasfixed)
-public static void reorder(Agraph_s g, int r, boolean reverse, boolean hasfixed) {
+public static void reorder(ST_Agraph_s g, int r, boolean reverse, boolean hasfixed) {
ENTERING("inv6wazjcnh4xkzzphsdcmg4","reorder");
try {
boolean changed = false;
int nelt;
boolean muststay, sawclust;
- __ptr__ vlist = GD_rank(g).plus(r).getPtr("v");
- __ptr__ lp, rp=null, ep = vlist.plus(GD_rank(g).plus(r).getInt("n"));
- for (nelt = GD_rank(g).plus(r).getInt("n") - 1; nelt >= 0; nelt--) {
+ __ptr__ vlist = GD_rank(g).get(r).v;
+ __ptr__ lp, rp=null, ep = vlist.plus(GD_rank(g).get(r).n);
+ for (nelt = GD_rank(g).get(r).n - 1; nelt >= 0; nelt--) {
lp = vlist;
while (lp.comparePointer(ep)<0) {
/* find leftmost node that can be compared */
@@ -2361,7 +2337,7 @@ try {
for (rp = lp.plus(1); rp.comparePointer(ep) < 0; rp=rp.plus(1)) {
if (sawclust && ND_clust(rp.getPtr())!=null)
continue; /* ### */
- if (left2right(g, (Agnode_s) lp.getPtr(), (Agnode_s) rp.getPtr())) {
+ if (left2right(g, (ST_Agnode_s) lp.getPtr(), (ST_Agnode_s) rp.getPtr())) {
muststay = NOT(false);
break;
}
@@ -2376,7 +2352,7 @@ try {
int p1 = (int) (ND_mval(lp.getPtr()));
int p2 = (int) (ND_mval(rp.getPtr()));
if ((p1 > p2) || ((p1 == p2) && (reverse))) {
- exchange((Agnode_s)lp.getPtr(), (Agnode_s)rp.getPtr());
+ exchange((ST_Agnode_s)lp.getPtr(), (ST_Agnode_s)rp.getPtr());
changed=true;
}
}
@@ -2386,9 +2362,9 @@ try {
ep = ep.plus(-1);
}
if (changed) {
- GD_rank(Z.z().Root).plus(r).setBoolean("valid", false);
+ GD_rank(Z.z().Root).get(r).valid= 0;
if (r > 0)
- GD_rank(Z.z().Root).plus(r - 1).setBoolean("valid", false);
+ GD_rank(Z.z().Root).plus(r - 1).getPtr().valid= 0;
}
} finally {
LEAVING("inv6wazjcnh4xkzzphsdcmg4","reorder");
@@ -2400,7 +2376,7 @@ LEAVING("inv6wazjcnh4xkzzphsdcmg4","reorder");
//3 14t80owwvm7io4ou6czb9ba9
// static void mincross_step(graph_t * g, int pass)
-public static void mincross_step(Agraph_s g, int pass) {
+public static void mincross_step(ST_Agraph_s g, int pass) {
ENTERING("14t80owwvm7io4ou6czb9ba9","mincross_step");
try {
int r, other, first, last, dir;
@@ -2446,11 +2422,11 @@ LEAVING("14t80owwvm7io4ou6czb9ba9","mincross_step");
//3 aq18oa4k4grixvfjx7r2qnl6r
// static int local_cross(elist l, int dir)
-public static int local_cross(final __struct__<elist> l, int dir) {
+public static int local_cross(final ST_elist l, int dir) {
// WARNING!! STRUCT
return local_cross_w_(l.copy(), dir);
}
-private static int local_cross_w_(final __struct__<elist> l, int dir) {
+private static int local_cross_w_(final ST_elist l, int dir) {
ENTERING("aq18oa4k4grixvfjx7r2qnl6r","local_cross");
try {
UNSUPPORTED("3jmndo6p8u1x5wp297qpt0jto"); // static int local_cross(elist l, int dir)
@@ -2487,47 +2463,47 @@ LEAVING("aq18oa4k4grixvfjx7r2qnl6r","local_cross");
-//3 bk5nklhfqgg0uwkv7tv6dn8r2
-// static int rcross(graph_t * g, int r)
//static __ptr__ Count;
//static int C;
-public static int rcross(Agraph_s g, int r) {
+//3 bk5nklhfqgg0uwkv7tv6dn8r2
+// static int rcross(graph_t * g, int r)
+public static int rcross(ST_Agraph_s g, int r) {
ENTERING("bk5nklhfqgg0uwkv7tv6dn8r2","rcross");
try {
int top, bot, cross, max, i, k;
- Agnode_s v;
- __ptr__ rtop;
+ ST_Agnode_s v;
+ ST_Agnode_s.ArrayOfStar rtop;
cross = 0;
max = 0;
- rtop = GD_rank(g).plus(r).getPtr("v");
- if (Z.z().C <= GD_rank(Z.z().Root).plus(r + 1).getInt("n")) {
- Z.z().C = GD_rank(Z.z().Root).plus(r + 1).getInt("n") + 1;
+ rtop = GD_rank(g).get(r).v;
+ if (Z.z().C <= GD_rank(Z.z().Root).plus(r + 1).getPtr().n) {
+ Z.z().C = GD_rank(Z.z().Root).plus(r + 1).getPtr().n + 1;
Z.z().Count = ALLOC_INT(Z.z().C, Z.z().Count);
}
- for (i = 0; i < GD_rank(g).plus(r + 1).getInt("n"); i++)
+ for (i = 0; i < GD_rank(g).get(r + 1).n; i++)
Z.z().Count.plus(i).setInt(0);
- for (top = 0; top < GD_rank(g).plus(r).getInt("n"); top++) {
- Agedge_s e;
+ for (top = 0; top < GD_rank(g).get(r).n; top++) {
+ ST_Agedge_s e;
if (max > 0) {
- for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_out(rtop.get(top)).getFromList(i))!=null; i++) {
for (k = ND_order(aghead(e)) + 1; k <= max; k++)
cross += Z.z().Count.plus(k).getInt() * ED_xpenalty(e);
}
}
- for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_out(rtop.get(top)).getFromList(i))!=null; i++) {
int inv = ND_order(aghead(e));
if (inv > max)
max = inv;
Z.z().Count.plus(inv).setInt(Z.z().Count.plus(inv).getInt() + ED_xpenalty(e));
}
}
- for (top = 0; top < GD_rank(g).plus(r).getInt("n"); top++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(top).getPtr();
+ for (top = 0; top < GD_rank(g).get(r).n; top++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(top);
if (ND_has_port(v))
cross += local_cross(ND_out(v), 1);
}
- for (bot = 0; bot < GD_rank(g).plus(r + 1).getInt("n"); bot++) {
- v = (Agnode_s) GD_rank(g).plus(r + 1).getArrayOfPtr("v").plus(bot).getPtr();
+ for (bot = 0; bot < GD_rank(g).get(r + 1).n; bot++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r + 1).v.get(bot);
if (ND_has_port(v))
cross += local_cross(ND_in(v), -1);
}
@@ -2542,18 +2518,18 @@ LEAVING("bk5nklhfqgg0uwkv7tv6dn8r2","rcross");
//3 dbjmz2tnii2pn9sxg26ap6w5r
// int ncross(graph_t * g)
-public static int ncross(Agraph_s g) {
+public static int ncross(ST_Agraph_s g) {
ENTERING("dbjmz2tnii2pn9sxg26ap6w5r","ncross");
try {
int r, count, nc;
g = Z.z().Root;
count = 0;
for (r = GD_minrank(g); r < GD_maxrank(g); r++) {
- if (GD_rank(g).plus(r).getBoolean("valid"))
- count += GD_rank(g).plus(r).getInt("cache_nc");
+ if (GD_rank(g).get(r).valid!=0)
+ count += GD_rank(g).get(r).cache_nc;
else {
nc = rcross(g, r);
- GD_rank(g).plus(r).getInt("cache_nc");
+ GD_rank(g).get(r).cache_nc = nc;
count += nc;
GD_rank(g).plus(r).setInt("valid", 1);
}
@@ -2583,17 +2559,17 @@ LEAVING("8wrsq8a2vooekcm3cdtv5x3ke","ordercmpf");
//3 7397kynkpqf2m1jkpmi8pgf0n
// static int flat_mval(node_t * n)
-public static boolean flat_mval(Agnode_s n) {
+public static boolean flat_mval(ST_Agnode_s n) {
ENTERING("7397kynkpqf2m1jkpmi8pgf0n","flat_mval");
try {
int i;
- Agedge_s e;
- __ptr__ fl;
- Agnode_s nn;
+ ST_Agedge_s e;
+ List<ST_Agedge_s> fl;
+ ST_Agnode_s nn;
if (ND_flat_in(n).size > 0) {
- fl = ND_flat_in(n).getTheList();
- nn = agtail(fl.plus(0).getPtr());
- for (i = 1; (e = (Agedge_s) fl.plus(i).getPtr())!=null; i++)
+ fl = ND_flat_in(n).list;
+ nn = agtail(fl.get(0));
+ for (i = 1; (e = (ST_Agedge_s) fl.get(i))!=null; i++)
if (ND_order(agtail(e)) > ND_order(nn))
nn = agtail(e);
if (ND_mval(nn) >= 0) {
@@ -2601,9 +2577,9 @@ try {
return false;
}
} else if (ND_flat_out(n).size > 0) {
- fl = ND_flat_out(n).getTheList();
- nn = aghead(fl.plus(0).getPtr());
- for (i = 1; (e = (Agedge_s) fl.plus(i).getPtr())!=null; i++)
+ fl = ND_flat_out(n).list;
+ nn = aghead(fl.get(0));
+ for (i = 1; (e = (ST_Agedge_s) fl.get(i))!=null; i++)
if (ND_order(aghead(e)) < ND_order(nn))
nn = aghead(e);
if (ND_mval(nn) > 0) {
@@ -2622,28 +2598,28 @@ LEAVING("7397kynkpqf2m1jkpmi8pgf0n","flat_mval");
//3 azvdpixwwxspl31wp7f4k4fmh
// static boolean medians(graph_t * g, int r0, int r1)
-public static boolean medians(Agraph_s g, int r0, int r1) {
+public static boolean medians(ST_Agraph_s g, int r0, int r1) {
ENTERING("azvdpixwwxspl31wp7f4k4fmh","medians");
try {
int i, j, j0, lm, rm, lspan, rspan;
__ptr__ list;
- Agnode_s n;
- __ptr__ v;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agnode_s.ArrayOfStar v;
+ ST_Agedge_s e;
boolean hasfixed = false;
list = Z.z().TI_list;
- v = GD_rank(g).plus(r0).getPtr("v");
- for (i = 0; i < GD_rank(g).plus(r0).getInt("n"); i++) {
- n = (Agnode_s) v.plus(i).getPtr();
+ v = GD_rank(g).get(r0).v;
+ for (i = 0; i < GD_rank(g).get(r0).n; i++) {
+ n = (ST_Agnode_s) v.get(i);
j = 0;
if (r1 > r0)
- for (j0 = 0; (e = (Agedge_s) ND_out(n).getFromList(j0))!=null; j0++) {
+ for (j0 = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(j0))!=null; j0++) {
if (ED_xpenalty(e) > 0)
- list.plus(j++).setInt((256 * ND_order(aghead(e)) + (ED_head_port(e)).getInt("order")));
+ list.plus(j++).setInt((256 * ND_order(aghead(e)) + (ED_head_port(e)).order));
} else
- for (j0 = 0; (e = (Agedge_s) ND_in(n).getFromList(j0))!=null; j0++) {
+ for (j0 = 0; (e = (ST_Agedge_s) ND_in(n).getFromList(j0))!=null; j0++) {
if (ED_xpenalty(e) > 0)
- list.plus(j++).setInt((256 * ND_order(agtail(e)) + (ED_tail_port(e)).getInt("order")));
+ list.plus(j++).setInt((256 * ND_order(agtail(e)) + (ED_tail_port(e)).order));
}
switch (j) {
case 0:
@@ -2658,7 +2634,6 @@ try {
default:
qsort(list,
j,
- sizeof(list.plus(0)),
function(mincross__c.class, "ordercmpf"));
if (j % 2!=0)
ND_mval(n, list.plus(j / 2).getInt());
@@ -2677,8 +2652,8 @@ try {
}
}
}
- for (i = 0; i < GD_rank(g).plus(r0).getInt("n"); i++) {
- n = (Agnode_s) v.plus(i).getPtr();
+ for (i = 0; i < GD_rank(g).get(r0).n; i++) {
+ n = (ST_Agnode_s) v.get(i);
if ((ND_out(n).size == 0) && (ND_in(n).size == 0))
hasfixed |= flat_mval(n);
}
@@ -2729,7 +2704,7 @@ private static int table[][] = new int[][]{
//3 7j638prioxd97f74v1v4adbsf
// static int endpoint_class(node_t * n)
-public static int endpoint_class(Agnode_s n) {
+public static int endpoint_class(ST_Agnode_s n) {
ENTERING("7j638prioxd97f74v1v4adbsf","endpoint_class");
try {
if (ND_node_type(n) == 1)
@@ -2747,7 +2722,7 @@ LEAVING("7j638prioxd97f74v1v4adbsf","endpoint_class");
//3 es57bn7ga4wc9tqtcixpn0451
// void virtual_weight(edge_t * e)
-public static void virtual_weight(Agedge_s e) {
+public static void virtual_weight(ST_Agedge_s e) {
ENTERING("es57bn7ga4wc9tqtcixpn0451","virtual_weight");
try {
int t;
@@ -2763,7 +2738,7 @@ LEAVING("es57bn7ga4wc9tqtcixpn0451","virtual_weight");
//3 7ru09oqbudpeofsthzveig2m2
// static void mincross_options(graph_t * g)
-public static void mincross_options(Agraph_s g) {
+public static void mincross_options(ST_Agraph_s g) {
ENTERING("7ru09oqbudpeofsthzveig2m2","mincross_options");
try {
CString p;
diff --git a/src/gen/lib/dotgen/position__c.java b/src/gen/lib/dotgen/position__c.java
index b0e40a1..a78bf74 100644
--- a/src/gen/lib/dotgen/position__c.java
+++ b/src/gen/lib/dotgen/position__c.java
@@ -50,7 +50,6 @@ import static gen.lib.cgraph.edge__c.agtail;
import static gen.lib.cgraph.graph__c.agnnodes;
import static gen.lib.cgraph.obj__c.agcontains;
import static gen.lib.cgraph.obj__c.agroot;
-import static gen.lib.common.memory__c.zmalloc;
import static gen.lib.common.ns__c.rank;
import static gen.lib.common.splines__c.selfRightSpace;
import static gen.lib.common.utils__c.late_int;
@@ -67,13 +66,12 @@ import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtils.USHRT_MAX;
import static smetana.core.JUtils.atof;
import static smetana.core.JUtils.enumAsInt;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGINEDGE;
import static smetana.core.Macro.AGOUTEDGE;
import static smetana.core.Macro.AGTYPE;
-import static smetana.core.Macro.ALLOC_empty;
+import static smetana.core.Macro.ALLOC_allocated_ST_Agnode_s;
import static smetana.core.Macro.ED_dist;
import static smetana.core.Macro.ED_head_port;
import static smetana.core.Macro.ED_label;
@@ -133,23 +131,19 @@ import static smetana.core.Macro.aghead;
import static smetana.core.Macro.agtail;
import static smetana.core.Macro.alloc_elist;
import static smetana.core.Macro.free_list;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agedgepair_s;
-import h.Agnode_s;
-import h.Agraph_s;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agedgepair_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_aspect_t;
+import h.ST_point;
import h.ST_pointf;
-import h.aspect_t;
-import h.boxf;
-import h.point;
-import h.pointf;
+import h.ST_rank_t;
import h.ratio_t;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class position__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -409,14 +403,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -445,25 +439,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -487,16 +462,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -814,23 +789,23 @@ LEAVING("6knxbdrmgk6294aw61s2lpvvf","largeMinlen");
//3 ccowbxkwmrj75tojopmhcmubx
// static void connectGraph (graph_t* g)
-public static void connectGraph(Agraph_s g) {
+public static void connectGraph(ST_Agraph_s g) {
ENTERING("ccowbxkwmrj75tojopmhcmubx","connectGraph");
try {
int i, j, r, found;
- Agnode_s tp;
- Agnode_s hp;
- Agnode_s sn;
- Agedge_s e;
- __ptr__ rp;
+ ST_Agnode_s tp;
+ ST_Agnode_s hp;
+ ST_Agnode_s sn;
+ ST_Agedge_s e;
+ ST_rank_t.Array2 rp;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
rp = GD_rank(g).plus(r);
found =0;
tp = null;
- for (i = 0; i < rp.getPtr().getInt("n"); i++) {
- tp = (Agnode_s) rp.getPtr().getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < rp.getPtr().n; i++) {
+ tp = (ST_Agnode_s) rp.getPtr().v.get(i);
if (ND_save_out(tp).listNotNull()) {
- for (j = 0; (e = (Agedge_s) ND_save_out(tp).getFromList(j))!=null; j++) {
+ for (j = 0; (e = (ST_Agedge_s) ND_save_out(tp).getFromList(j))!=null; j++) {
if ((ND_rank(aghead(e)) > r) || (ND_rank(agtail(e)) > r)) {
found = 1;
break;
@@ -839,7 +814,7 @@ try {
if (found!=0) break;
}
if (ND_save_in(tp).listNotNull()) {
- for (j = 0; (e = (Agedge_s) ND_save_in(tp).getFromList(j))!=null; j++) {
+ for (j = 0; (e = (ST_Agedge_s) ND_save_in(tp).getFromList(j))!=null; j++) {
if ((ND_rank(agtail(e)) > r) || (ND_rank(aghead(e)) > r)) {
found = 1;
break;
@@ -849,9 +824,9 @@ try {
}
}
if (found!=0 || N(tp)) continue;
- tp = (Agnode_s) rp.getPtr().getArrayOfPtr("v").plus(0).getPtr();
- if (r < GD_maxrank(g)) hp = (Agnode_s) rp.plus(1).getPtr().getArrayOfPtr("v").plus(0).getPtr();
- else hp = (Agnode_s) rp.plus(-1).getPtr().getArrayOfPtr("v").plus(0).getPtr();
+ tp = (ST_Agnode_s) rp.getPtr().v.get(0);
+ if (r < GD_maxrank(g)) hp = (ST_Agnode_s) rp.get(1).v.get(0);
+ else hp = (ST_Agnode_s) rp.plus(-1).getPtr().v.get(0);
//assert (hp);
sn = virtual_node(g);
ND_node_type(sn, 2);
@@ -869,7 +844,7 @@ LEAVING("ccowbxkwmrj75tojopmhcmubx","connectGraph");
//3 33snzyd9z0loienur06dnily9
// void dot_position(graph_t * g, aspect_t* asp)
-public static void dot_position(Agraph_s g, aspect_t asp) {
+public static void dot_position(ST_Agraph_s g, ST_aspect_t asp) {
ENTERING("33snzyd9z0loienur06dnily9","dot_position");
try {
if (GD_nlist(g) == null)
@@ -901,7 +876,7 @@ LEAVING("33snzyd9z0loienur06dnily9","dot_position");
//3 90vn63m6v0w9fn9a2dgfxxx3h
// static int nsiter2(graph_t * g)
-public static int nsiter2(Agraph_s g) {
+public static int nsiter2(ST_Agraph_s g) {
ENTERING("90vn63m6v0w9fn9a2dgfxxx3h","nsiter2");
try {
int maxiter = INT_MAX;
@@ -919,14 +894,14 @@ LEAVING("90vn63m6v0w9fn9a2dgfxxx3h","nsiter2");
//3 5bax8ut6nnk4pr7yxdumk9chl
// static int go(node_t * u, node_t * v)
-public static boolean go(Agnode_s u, Agnode_s v) {
+public static boolean go(ST_Agnode_s u, ST_Agnode_s v) {
ENTERING("5bax8ut6nnk4pr7yxdumk9chl","go");
try {
int i;
- Agedge_s e;
+ ST_Agedge_s e;
if (EQ(u, v))
return NOT(false);
- for (i = 0; (e = (Agedge_s) ND_out(u).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_out(u).getFromList(i))!=null; i++) {
if (go(aghead(e), v))
return NOT(false);
}
@@ -941,7 +916,7 @@ LEAVING("5bax8ut6nnk4pr7yxdumk9chl","go");
//3 9xz8numztzj4qsq85pziahv1k
// static int canreach(node_t * u, node_t * v)
-public static boolean canreach(Agnode_s u, Agnode_s v) {
+public static boolean canreach(ST_Agnode_s u, ST_Agnode_s v) {
ENTERING("9xz8numztzj4qsq85pziahv1k","canreach");
try {
return go(u, v);
@@ -955,15 +930,15 @@ LEAVING("9xz8numztzj4qsq85pziahv1k","canreach");
//3 4cvgiatny97ou6mhqoq6aqwek
// edge_t *make_aux_edge(node_t * u, node_t * v, double len, int wt)
-public static Agedge_s make_aux_edge(Agnode_s u, Agnode_s v, double len, int wt) {
+public static ST_Agedge_s make_aux_edge(ST_Agnode_s u, ST_Agnode_s v, double len, int wt) {
ENTERING("4cvgiatny97ou6mhqoq6aqwek","make_aux_edge");
try {
- Agedge_s e;
- Agedgepair_s e2 = (Agedgepair_s) zmalloc(sizeof(Agedgepair_s.class));
- AGTYPE(e2.getStruct("in").amp(), AGINEDGE);
- AGTYPE(e2.getStruct("out").amp(), AGOUTEDGE);
- e2.getStruct("out").getStruct("base").setPtr("data", zmalloc(sizeof(Agedgeinfo_t.class)));
- e = (Agedge_s) e2.getStruct("out").amp();
+ ST_Agedge_s e;
+ ST_Agedgepair_s e2 = new ST_Agedgepair_s();
+ AGTYPE(e2.in, AGINEDGE);
+ AGTYPE(e2.out, AGOUTEDGE);
+ e2.out.base.setPtr("data", new ST_Agedgeinfo_t());
+ e = (ST_Agedge_s) e2.out;
agtail(e, u);
aghead(e, v);
if (len > USHRT_MAX)
@@ -982,11 +957,11 @@ LEAVING("4cvgiatny97ou6mhqoq6aqwek","make_aux_edge");
//3 53fvij7oun7aezlb7x66vzuyb
// static void allocate_aux_edges(graph_t * g)
-public static void allocate_aux_edges(Agraph_s g) {
+public static void allocate_aux_edges(ST_Agraph_s g) {
ENTERING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges");
try {
int i, j, n_in;
- Agnode_s n;
+ ST_Agnode_s n;
/* allocate space for aux edge lists */
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
ND_save_in(n, ND_in(n));
@@ -994,8 +969,8 @@ try {
for (i = 0; ND_out(n).getFromList(i)!=null; i++);
for (j = 0; ND_in(n).getFromList(j)!=null; j++);
n_in = i + j;
- alloc_elist(n_in + 3, ND_in(n), Agnode_s.class);
- alloc_elist(3, ND_out(n), Agnode_s.class);
+ alloc_elist(n_in + 3, ND_in(n));
+ alloc_elist(3, ND_out(n));
}
} finally {
LEAVING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges");
@@ -1007,7 +982,7 @@ LEAVING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges");
//3 ah28nr6mxpjeosr85bhmzd3si
// static void make_LR_constraints(graph_t * g)
-public static void make_LR_constraints(Agraph_s g) {
+public static void make_LR_constraints(ST_Agraph_s g) {
ENTERING("ah28nr6mxpjeosr85bhmzd3si","make_LR_constraints");
try {
int i, j, k;
@@ -1016,9 +991,9 @@ try {
double width;
int sep[] = new int[2];
int nodesep; /* separation between nodes on same rank */
- Agedge_s e, e0, e1, ff;
- Agnode_s u, v, t0, h0;
- __ptr__ rank = GD_rank(g);
+ ST_Agedge_s e, e0, e1, ff;
+ ST_Agnode_s u, v, t0, h0;
+ ST_rank_t.Array2 rank = GD_rank(g);
/* Use smaller separation on odd ranks if g has edge labels */
if ((GD_has_labels(g) & (1 << 0))!=0) {
sep[0] = GD_nodesep(g);
@@ -1030,11 +1005,11 @@ try {
/* make edges to constrain left-to-right ordering */
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
double last;
- ND_rank(rank.plus(i).getArrayOfPtr("v").plus(0).getPtr(), 0);
+ ND_rank(rank.get(i).v.get(0), 0);
last = 0;
nodesep = sep[i & 1];
- for (j = 0; j < rank.plus(i).getInt("n"); j++) {
- u = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j).getPtr();
+ for (j = 0; j < rank.get(i).n; j++) {
+ u = (ST_Agnode_s) rank.get(i).v.get(j);
ND_mval(u, ND_rw(u)); /* keep it somewhere safe */
if (ND_other(u).size > 0) { /* compute self size */
/* FIX: dot assumes all self-edges go to the right. This
@@ -1046,14 +1021,14 @@ try {
* positioning but may also affect interrank spacing.
*/
sw = 0;
- for (k = 0; (e = (Agedge_s) ND_other(u).getFromList(k))!=null; k++) {
+ for (k = 0; (e = (ST_Agedge_s) ND_other(u).getFromList(k))!=null; k++) {
if (EQ(agtail(e), aghead(e))) {
sw += selfRightSpace (e);
}
}
ND_rw(u, ND_rw(u) + sw); /* increment to include self edges */
}
- v = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j + 1).getPtr();
+ v = (ST_Agnode_s) rank.get(i).v.plus(j + 1).getPtr();
if (v!=null) {
width = ND_rw(u) + ND_lw(v) + nodesep;
e0 = make_aux_edge(u, v, width, 0);
@@ -1061,9 +1036,9 @@ try {
last = (int)(last + width);
}
/* constraints from labels of flat edges on previous rank */
- if ((e = (Agedge_s) ND_alg(u))!=null) {
- e0 = (Agedge_s) ND_save_out(u).getFromList(0);
- e1 = (Agedge_s) ND_save_out(u).getFromList(1);
+ if ((e = (ST_Agedge_s) ND_alg(u))!=null) {
+ e0 = (ST_Agedge_s) ND_save_out(u).getFromList(0);
+ e1 = (ST_Agedge_s) ND_save_out(u).getFromList(1);
if (ND_order(aghead(e0)) > ND_order(aghead(e1))) {
ff = e0;
e0 = e1;
@@ -1083,7 +1058,7 @@ try {
}
/* position flat edge endpoints */
for (k = 0; k < ND_flat_out(u).size; k++) {
- e = (Agedge_s) ND_flat_out(u).getFromList(k);
+ e = (ST_Agedge_s) ND_flat_out(u).getFromList(k);
if (ND_order(agtail(e)) < ND_order(aghead(e))) {
t0 = agtail(e);
h0 = aghead(e);
@@ -1126,15 +1101,15 @@ LEAVING("ah28nr6mxpjeosr85bhmzd3si","make_LR_constraints");
//3 6uruo8mutxgcni9fm8jcrw4cr
// static void make_edge_pairs(graph_t * g)
-public static void make_edge_pairs(Agraph_s g) {
+public static void make_edge_pairs(ST_Agraph_s g) {
ENTERING("6uruo8mutxgcni9fm8jcrw4cr","make_edge_pairs");
try {
int i, m0, m1;
- Agnode_s n, sn;
- Agedge_s e;
+ ST_Agnode_s n, sn;
+ ST_Agedge_s e;
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
if (ND_save_out(n).listNotNull())
- for (i = 0; (e = (Agedge_s) ND_save_out(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_save_out(n).getFromList(i))!=null; i++) {
sn = virtual_node(g);
ND_node_type(sn, 2);
m0 = (int)(ED_head_port(e).p.x - ED_tail_port(e).p.x);
@@ -1161,11 +1136,11 @@ LEAVING("6uruo8mutxgcni9fm8jcrw4cr","make_edge_pairs");
//3 79v3omwzni0nm3h05l3onjsbz
// static void contain_clustnodes(graph_t * g)
-public static void contain_clustnodes(Agraph_s g) {
+public static void contain_clustnodes(ST_Agraph_s g) {
ENTERING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes");
try {
int c;
- Agedge_s e;
+ ST_Agedge_s e;
if (NEQ(g, dot_root(g))) {
contain_nodes(g);
if ((e = find_fast_edge(GD_ln(g),GD_rn(g)))!=null) /* maybe from lrvn()?*/
@@ -1174,7 +1149,7 @@ try {
make_aux_edge(GD_ln(g), GD_rn(g), 1, 128); /* clust compaction edge */
}
for (c = 1; c <= GD_n_cluster(g); c++)
- contain_clustnodes((Agraph_s) GD_clust(g).plus(c).getPtr());
+ contain_clustnodes((ST_Agraph_s) GD_clust(g).get(c).getPtr());
} finally {
LEAVING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes");
}
@@ -1185,13 +1160,13 @@ LEAVING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes");
//3 24yfgklubun581fbfyx62lzsm
// static int vnode_not_related_to(graph_t * g, node_t * v)
-public static boolean vnode_not_related_to(Agraph_s g, Agnode_s v) {
+public static boolean vnode_not_related_to(ST_Agraph_s g, ST_Agnode_s v) {
ENTERING("24yfgklubun581fbfyx62lzsm","vnode_not_related_to");
try {
- Agedge_s e;
+ ST_Agedge_s e;
if (ND_node_type(v) != 1)
return false;
- for (e = (Agedge_s) ND_save_out(v).getFromList(0); ED_to_orig(e)!=null; e = ED_to_orig(e));
+ for (e = (ST_Agedge_s) ND_save_out(v).getFromList(0); ED_to_orig(e)!=null; e = ED_to_orig(e));
if (agcontains(g, agtail(e)))
return false;
if (agcontains(g, aghead(e)))
@@ -1207,29 +1182,29 @@ LEAVING("24yfgklubun581fbfyx62lzsm","vnode_not_related_to");
//3 73cdgjl47ohty2va766evbo4
// static void keepout_othernodes(graph_t * g)
-public static void keepout_othernodes(Agraph_s g) {
+public static void keepout_othernodes(ST_Agraph_s g) {
ENTERING("73cdgjl47ohty2va766evbo4","keepout_othernodes");
try {
int i, c, r, margin;
- Agnode_s u, v;
+ ST_Agnode_s u, v;
margin = late_int (g, Z.z().G_margin, 8, 0);
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- if (GD_rank(g).plus(r).getInt("n") == 0)
+ if (GD_rank(g).get(r).n == 0)
continue;
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr();
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(0);
if (v == null)
continue;
for (i = ND_order(v) - 1; i >= 0; i--) {
- u = (Agnode_s) GD_rank(dot_root(g)).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ u = (ST_Agnode_s) GD_rank(dot_root(g)).get(r).v.get(i);
/* can't use "is_a_vnode_of" because elists are swapped */
if ((ND_node_type(u) == 0) || vnode_not_related_to(g, u)) {
make_aux_edge(u, GD_ln(g), margin + ND_rw(u), 0);
break;
}
}
- for (i = ND_order(v) + GD_rank(g).plus(r).getInt("n"); i < GD_rank(dot_root(g)).plus(r).getInt("n");
+ for (i = ND_order(v) + GD_rank(g).get(r).n; i < GD_rank(dot_root(g)).get(r).n;
i++) {
- u = (Agnode_s) GD_rank(dot_root(g)).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ u = (ST_Agnode_s) GD_rank(dot_root(g)).get(r).v.get(i);
if ((ND_node_type(u) == 0) || vnode_not_related_to(g, u)) {
make_aux_edge(GD_rn(g), u, margin + ND_lw(u), 0);
break;
@@ -1237,7 +1212,7 @@ try {
}
}
for (c = 1; c <= GD_n_cluster(g); c++)
- keepout_othernodes((Agraph_s) GD_clust(g).plus(c).getPtr());
+ keepout_othernodes((ST_Agraph_s) GD_clust(g).get(c).getPtr());
} finally {
LEAVING("73cdgjl47ohty2va766evbo4","keepout_othernodes");
}
@@ -1248,20 +1223,20 @@ LEAVING("73cdgjl47ohty2va766evbo4","keepout_othernodes");
//3 c734mx1638sfqtl7vh7itaxyx
// static void contain_subclust(graph_t * g)
-public static void contain_subclust(Agraph_s g) {
+public static void contain_subclust(ST_Agraph_s g) {
ENTERING("c734mx1638sfqtl7vh7itaxyx","contain_subclust");
try {
int margin, c;
- Agraph_s subg;
+ ST_Agraph_s subg;
margin = late_int (g, Z.z().G_margin, 8, 0);
make_lrvn(g);
for (c = 1; c <= GD_n_cluster(g); c++) {
- subg = (Agraph_s) GD_clust(g).plus(c).getPtr();
+ subg = (ST_Agraph_s) GD_clust(g).get(c).getPtr();
make_lrvn(subg);
make_aux_edge(GD_ln(g), GD_ln(subg),
- margin + GD_border(g).plus(3).getStruct().getDouble("x"), 0);
+ margin + GD_border(g)[3].x, 0);
make_aux_edge(GD_rn(subg), GD_rn(g),
- margin + GD_border(g).plus(1).getStruct().getDouble("x"), 0);
+ margin + GD_border(g)[1].x, 0);
contain_subclust(subg);
}
} finally {
@@ -1274,28 +1249,28 @@ LEAVING("c734mx1638sfqtl7vh7itaxyx","contain_subclust");
//3 6oruu1p1b7kxr5moh3kmcmvr3
// static void separate_subclust(graph_t * g)
-public static void separate_subclust(Agraph_s g) {
+public static void separate_subclust(ST_Agraph_s g) {
ENTERING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust");
try {
int i, j, margin;
- Agraph_s low, high;
- Agraph_s left, right;
+ ST_Agraph_s low, high;
+ ST_Agraph_s left, right;
margin = late_int (g, Z.z().G_margin, 8, 0);
for (i = 1; i <= GD_n_cluster(g); i++)
- make_lrvn((Agraph_s) GD_clust(g).plus(i).getPtr());
+ make_lrvn((ST_Agraph_s) GD_clust(g).get(i).getPtr());
for (i = 1; i <= GD_n_cluster(g); i++) {
for (j = i + 1; j <= GD_n_cluster(g); j++) {
- low = (Agraph_s) GD_clust(g).plus(i).getPtr();
- high = (Agraph_s) GD_clust(g).plus(j).getPtr();
+ low = (ST_Agraph_s) GD_clust(g).get(i).getPtr();
+ high = (ST_Agraph_s) GD_clust(g).get(j).getPtr();
if (GD_minrank(low) > GD_minrank(high)) {
- Agraph_s temp = low;
+ ST_Agraph_s temp = low;
low = high;
high = temp;
}
if (GD_maxrank(low) < GD_minrank(high))
continue;
- if (ND_order(GD_rank(low).plus(GD_minrank(high)).getPtr("v").plus(0).getPtr())
- < ND_order(GD_rank(high).plus(GD_minrank(high)).getPtr("v").plus(0).getPtr())) {
+ if (ND_order(GD_rank(low).get(GD_minrank(high)).v.get(0))
+ < ND_order(GD_rank(high).get(GD_minrank(high)).v.get(0))) {
left = low;
right = high;
} else {
@@ -1304,7 +1279,7 @@ try {
}
make_aux_edge(GD_rn(left), GD_ln(right), margin, 0);
}
- separate_subclust((Agraph_s) GD_clust(g).plus(i).getPtr());
+ separate_subclust((ST_Agraph_s) GD_clust(g).get(i).getPtr());
}
} finally {
LEAVING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust");
@@ -1316,7 +1291,7 @@ LEAVING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust");
//3 8f8gs2zivo4pnd3hmtb9g23x4
// static void pos_clusters(graph_t * g)
-public static void pos_clusters(Agraph_s g) {
+public static void pos_clusters(ST_Agraph_s g) {
ENTERING("8f8gs2zivo4pnd3hmtb9g23x4","pos_clusters");
try {
if (GD_n_cluster(g) > 0) {
@@ -1335,12 +1310,12 @@ LEAVING("8f8gs2zivo4pnd3hmtb9g23x4","pos_clusters");
//3 fywsxto7yvl5wa2dfu7u7jj1
// static void compress_graph(graph_t * g)
-public static void compress_graph(Agraph_s g) {
+public static void compress_graph(ST_Agraph_s g) {
ENTERING("fywsxto7yvl5wa2dfu7u7jj1","compress_graph");
try {
double x;
- pointf p = (pointf) Memory.malloc(pointf.class);
- if (GD_drawing(g).getInt("ratio_kind") != enumAsInt(ratio_t.class, "R_COMPRESS"))
+ ST_pointf p = new ST_pointf();
+ if (GD_drawing(g).ratio_kind != enumAsInt(ratio_t.class, "R_COMPRESS"))
return;
UNSUPPORTED("79oeaf0u32si2chjcpas5whjl"); // p = GD_drawing(g)->size;
UNSUPPORTED("6a2ue1i6kvwvpgapb4z8l27jn"); // if (p.x * p.y <= 1)
@@ -1369,7 +1344,7 @@ LEAVING("fywsxto7yvl5wa2dfu7u7jj1","compress_graph");
//3 b7y0htx4svbhaqb1a12dihlue
// static void create_aux_edges(graph_t * g)
-public static void create_aux_edges(Agraph_s g) {
+public static void create_aux_edges(ST_Agraph_s g) {
ENTERING("b7y0htx4svbhaqb1a12dihlue","create_aux_edges");
try {
allocate_aux_edges(g);
@@ -1387,15 +1362,15 @@ LEAVING("b7y0htx4svbhaqb1a12dihlue","create_aux_edges");
//3 euzeilq92ry8a4tcrij5s52t5
// static void remove_aux_edges(graph_t * g)
-public static void remove_aux_edges(Agraph_s g) {
+public static void remove_aux_edges(ST_Agraph_s g) {
ENTERING("euzeilq92ry8a4tcrij5s52t5","remove_aux_edges");
try {
int i;
- Agnode_s n, nnext, nprev;
- Agedge_s e;
+ ST_Agnode_s n, nnext, nprev;
+ ST_Agedge_s e;
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
- for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
- Memory.free(e.getStruct("base").getPtr("data"));
+ for (i = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
+ Memory.free(e.base.data);
Memory.free(e);
}
free_list(ND_out(n));
@@ -1412,7 +1387,7 @@ try {
ND_next(nprev, nnext);
else
GD_nlist(g, nnext);
- Memory.free(n.getStruct("base").getPtr("data"));
+ Memory.free(n.base.data);
Memory.free(n);
} else
nprev = n;
@@ -1428,15 +1403,15 @@ LEAVING("euzeilq92ry8a4tcrij5s52t5","remove_aux_edges");
//3 1oobmglea9t819y95xeel37h8
// static void set_xcoords(graph_t * g)
-public static void set_xcoords(Agraph_s g) {
+public static void set_xcoords(ST_Agraph_s g) {
ENTERING("1oobmglea9t819y95xeel37h8","set_xcoords");
try {
int i, j;
- Agnode_s v;
- __ptr__ rank = GD_rank(g);
+ ST_Agnode_s v;
+ ST_rank_t.Array2 rank = GD_rank(g);
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
- for (j = 0; j < rank.plus(i).getInt("n"); j++) {
- v = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j).getPtr();
+ for (j = 0; j < rank.get(i).n; j++) {
+ v = (ST_Agnode_s) rank.get(i).v.get(j);
ND_coord(v).x = ND_rank(v);
ND_rank(v, i);
}
@@ -1538,13 +1513,13 @@ throw new UnsupportedOperationException();
//3 emtrqv582hdma5aajqtjd76m1
// static int clust_ht(Agraph_t * g)
-public static int clust_ht(Agraph_s g) {
+public static int clust_ht(ST_Agraph_s g) {
ENTERING("emtrqv582hdma5aajqtjd76m1","clust_ht");
try {
int c;
double ht1, ht2;
- Agraph_s subg;
- __ptr__ rank = GD_rank(dot_root(g));
+ ST_Agraph_s subg;
+ ST_rank_t.Array2 rank = GD_rank(dot_root(g));
int margin, haveClustLabel = 0;
if (EQ(g, dot_root(g)))
margin = 8;
@@ -1554,7 +1529,7 @@ try {
ht2 = GD_ht2(g);
/* account for sub-clusters */
for (c = 1; c <= GD_n_cluster(g); c++) {
- subg = (Agraph_s) GD_clust(g).plus(c).getPtr();
+ subg = (ST_Agraph_s) GD_clust(g).get(c).getPtr();
haveClustLabel |= clust_ht(subg);
if (GD_maxrank(subg) == GD_maxrank(g))
ht1 = MAX(ht1, GD_ht1(subg) + margin);
@@ -1566,16 +1541,16 @@ try {
if (NEQ(g, dot_root(g)) && GD_label(g)!=null) {
haveClustLabel = 1;
if (N(GD_flip(agroot(g)))) {
- ht1 += GD_border(g).plus(0).getDouble("y");
- ht2 += GD_border(g).plus(2).getDouble("y");
+ ht1 += GD_border(g)[0].y;
+ ht2 += GD_border(g)[2].y;
}
}
GD_ht1(g, ht1);
GD_ht2(g, ht2);
/* update the global ranks */
if (NEQ(g, dot_root(g))) {
- rank.plus(GD_minrank(g)).setDouble("ht2", MAX(rank.plus(GD_minrank(g)).getDouble("ht2"), ht2));
- rank.plus(GD_maxrank(g)).setDouble("ht1", MAX(rank.plus(GD_maxrank(g)).getDouble("ht1"), ht1));
+ rank.plus(GD_minrank(g)).setDouble("ht2", MAX(rank.get(GD_minrank(g)).ht2, ht2));
+ rank.plus(GD_maxrank(g)).setDouble("ht1", MAX(rank.get(GD_maxrank(g)).ht1, ht1));
}
return haveClustLabel;
} finally {
@@ -1588,37 +1563,37 @@ LEAVING("emtrqv582hdma5aajqtjd76m1","clust_ht");
//3 bp8vmol4ncadervcfossysdtd
// static void set_ycoords(graph_t * g)
-public static void set_ycoords(Agraph_s g) {
+public static void set_ycoords(ST_Agraph_s g) {
ENTERING("bp8vmol4ncadervcfossysdtd","set_ycoords");
try {
int i, j, r;
double ht2, maxht, delta, d0, d1;
- Agnode_s n;
- Agedge_s e;
- __ptr__ rank = GD_rank(g);
- Agraph_s clust;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
+ ST_rank_t.Array2 rank = GD_rank(g);
+ ST_Agraph_s clust;
int lbl;
ht2 = maxht = 0;
/* scan ranks for tallest nodes. */
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- for (i = 0; i < rank.plus(r).getInt("n"); i++) {
- n = (Agnode_s) rank.plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < rank.get(r).n; i++) {
+ n = (ST_Agnode_s) rank.get(r).v.get(i);
/* assumes symmetry, ht1 = ht2 */
ht2 = ND_ht(n) / 2;
/* have to look for high self-edge labels, too */
if (ND_other(n).listNotNull())
- for (j = 0; (e = (Agedge_s) ND_other(n).getFromList(j))!=null; j++) {
+ for (j = 0; (e = (ST_Agedge_s) ND_other(n).getFromList(j))!=null; j++) {
if (EQ(agtail(e), aghead(e))) {
if (ED_label(e)!=null)
- ht2 = MAX(ht2, ED_label(e).getStruct("dimen").getDouble("y") / 2);
+ ht2 = MAX(ht2, ED_label(e).dimen.y / 2);
}
}
/* update global rank ht */
- if (rank.plus(r).getDouble("pht2") < ht2) {
+ if (rank.get(r).pht2 < ht2) {
rank.plus(r).setDouble("ht2", ht2);
rank.plus(r).setDouble("pht2", ht2);
}
- if (rank.plus(r).getDouble("pht1") < ht2) {
+ if (rank.get(r).pht1 < ht2) {
rank.plus(r).setDouble("ht1", ht2);
rank.plus(r).setDouble("pht1", ht2);
}
@@ -1637,13 +1612,13 @@ try {
/* make the initial assignment of ycoords to leftmost nodes by ranks */
maxht = 0;
r = GD_maxrank(g);
- (ND_coord(rank.plus(r).getArrayOfPtr("v").plus(0).getPtr())).setDouble("y", rank.plus(r).getDouble("ht1"));
+ (ND_coord(rank.get(r).v.get(0))).setDouble("y", rank.get(r).ht1);
while (--r >= GD_minrank(g)) {
- d0 = rank.plus(r + 1).getDouble("pht2") + rank.plus(r).getDouble("pht1") + GD_ranksep(g); /* prim node sep */
- d1 = rank.plus(r + 1).getDouble("ht2") + rank.plus(r).getDouble("ht1") + 8; /* cluster sep */
+ d0 = rank.get(r + 1).pht2 + rank.get(r).pht1 + GD_ranksep(g); /* prim node sep */
+ d1 = rank.get(r + 1).ht2 + rank.get(r).ht1 + 8; /* cluster sep */
delta = MAX(d0, d1);
- if (rank.plus(r).getInt("n") > 0) /* this may reflect some problem */
- (ND_coord(rank.plus(r).getArrayOfPtr("v").plus(0).getPtr())).setDouble("y", (ND_coord(rank.plus(r + 1).getArrayOfPtr("v").plus(0).getPtr())).getDouble("y") + delta);
+ if (rank.get(r).n > 0) /* this may reflect some problem */
+ (ND_coord(rank.get(r).v.get(0))).setDouble("y", (ND_coord(rank.plus(r + 1).getPtr().v.get(0))).y + delta);
maxht = MAX(maxht, delta);
}
/* If there are cluster labels and the drawing is rotated, we need special processing to
@@ -1674,7 +1649,7 @@ UNSUPPORTED("e6dfx5uesysjaefb0djyfp7f"); // (ND_coord(rank[r + 1].v[0])).y
}
/* copy ycoord assignment from leftmost nodes to others */
for (n = GD_nlist(g); n!=null; n = ND_next(n))
- ND_coord(n).y = ND_coord(rank.plus(ND_rank(n)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y");
+ ND_coord(n).y = ND_coord(rank.plus(ND_rank(n)).getPtr().v.get(0)).y;
} finally {
LEAVING("bp8vmol4ncadervcfossysdtd","set_ycoords");
}
@@ -1685,50 +1660,50 @@ LEAVING("bp8vmol4ncadervcfossysdtd","set_ycoords");
//3 9ay2xnnmh407i32pfokujfda5
//static void dot_compute_bb(graph_t * g, graph_t * root)
-public static void dot_compute_bb(Agraph_s g, Agraph_s root) {
+public static void dot_compute_bb(ST_Agraph_s g, ST_Agraph_s root) {
ENTERING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb");
try {
int r, c;
double x, offset;
- Agnode_s v;
+ ST_Agnode_s v;
final ST_pointf LL = new ST_pointf();
final ST_pointf UR = new ST_pointf();
if (EQ(g, dot_root(g))) {
LL.x = INT_MAX;
UR.x = -((double)INT_MAX);
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- int rnkn = GD_rank(g).plus(r).getInt("n");
+ int rnkn = GD_rank(g).get(r).n;
if (rnkn == 0)
continue;
- if ((v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr()) == null)
+ if ((v = (ST_Agnode_s) GD_rank(g).get(r).v.get(0)) == null)
continue;
for (c = 1; (ND_node_type(v) != 0) && c < rnkn; c++)
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(c).getPtr();
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(c);
if (ND_node_type(v) == 0) {
- x = ND_coord(v).getDouble("x") - ND_lw(v);
- LL.setDouble("x", MIN(LL.getDouble("x"), x));
+ x = ND_coord(v).x - ND_lw(v);
+ LL.setDouble("x", MIN(LL.x, x));
}
else continue;
/* At this point, we know the rank contains a NORMAL node */
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(rnkn - 1).getPtr();
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.plus(rnkn - 1).getPtr();
for (c = rnkn-2; ND_node_type(v) != 0; c--)
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(c).getPtr();
- x = ND_coord(v).getDouble("x") + ND_rw(v);
- UR.x = MAX(UR.getDouble("x"), x);
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(c);
+ x = ND_coord(v).x + ND_rw(v);
+ UR.x = MAX(UR.x, x);
}
offset = 8;
for (c = 1; c <= GD_n_cluster(g); c++) {
x = (double)(GD_bb(GD_clust(g).plus(c)).LL.x - offset);
- LL.x = MIN(LL.getDouble("x"), x);
+ LL.x = MIN(LL.x, x);
x = (double)(GD_bb(GD_clust(g).plus(c)).UR.x + offset);
- UR.x = MAX(UR.getDouble("x"), x);
+ UR.x = MAX(UR.x, x);
}
} else {
LL.x = (double)(ND_rank(GD_ln(g)));
UR.x = (double)(ND_rank(GD_rn(g)));
}
- LL.y = ND_coord(GD_rank(root).plus(GD_maxrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - GD_ht1(g);
- UR.y = ND_coord(GD_rank(root).plus(GD_minrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") + GD_ht2(g);
+ LL.y = ND_coord(GD_rank(root).plus(GD_maxrank(g)).getPtr().v.get(0)).y - GD_ht1(g);
+ UR.y = ND_coord(GD_rank(root).plus(GD_minrank(g)).getPtr().v.get(0)).y + GD_ht2(g);
GD_bb(g).setStruct("LL", LL);
GD_bb(g).setStruct("UR", UR);
} finally {
@@ -1742,12 +1717,12 @@ LEAVING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb");
//3 dlbpiimh9g9ff9w7wjoabf817
// static void rec_bb(graph_t * g, graph_t * root)
-public static void rec_bb(Agraph_s g, Agraph_s root) {
+public static void rec_bb(ST_Agraph_s g, ST_Agraph_s root) {
ENTERING("dlbpiimh9g9ff9w7wjoabf817","rec_bb");
try {
int c;
for (c = 1; c <= GD_n_cluster(g); c++)
- rec_bb((Agraph_s) GD_clust(g).plus(c).getPtr(), root);
+ rec_bb((ST_Agraph_s) GD_clust(g).get(c).getPtr(), root);
dot_compute_bb(g, root);
} finally {
LEAVING("dlbpiimh9g9ff9w7wjoabf817","rec_bb");
@@ -1810,15 +1785,15 @@ throw new UnsupportedOperationException();
//3 7effq6z6ur101wrch6ttozr26
// static void set_aspect(graph_t * g, aspect_t* asp)
-public static void set_aspect(Agraph_s g, aspect_t asp) {
+public static void set_aspect(ST_Agraph_s g, ST_aspect_t asp) {
ENTERING("7effq6z6ur101wrch6ttozr26","set_aspect");
try {
double xf = 0.0, yf = 0.0, actual, desired;
- Agnode_s n;
+ ST_Agnode_s n;
boolean scale_it, filled;
- point sz = (point) Memory.malloc(point.class);
+ ST_point sz = new ST_point();
rec_bb(g, g);
- if ((GD_maxrank(g) > 0) && (GD_drawing(g).getInt("ratio_kind")!=0)) {
+ if ((GD_maxrank(g) > 0) && (GD_drawing(g).ratio_kind!=0)) {
UNSUPPORTED("5wbmy4x78flo2ztfabki9lyjf"); // sz.x = GD_bb(g).UR.x - GD_bb(g).LL.x;
UNSUPPORTED("catd6eu5oc282ln95k9zz52f3"); // sz.y = GD_bb(g).UR.y - GD_bb(g).LL.y; /* normalize */
UNSUPPORTED("21zvq2qx1j34j1i1879zyhzpj"); // if (GD_flip(g)) {
@@ -1938,30 +1913,30 @@ throw new UnsupportedOperationException();
//3 1lejhh3evsa10auyj7cgqj8ub
// static void make_leafslots(graph_t * g)
-public static void make_leafslots(Agraph_s g) {
+public static void make_leafslots(ST_Agraph_s g) {
ENTERING("1lejhh3evsa10auyj7cgqj8ub","make_leafslots");
try {
int i, j, r;
- Agnode_s v;
+ ST_Agnode_s v;
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
j = 0;
- for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
+ for (i = 0; i < GD_rank(g).get(r).n; i++) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
ND_order(v, j);
if (ND_ranktype(v) == 6)
j = j + ND_UF_size(v);
else
j++;
}
- if (j <= GD_rank(g).plus(r).getInt("n"))
+ if (j <= GD_rank(g).get(r).n)
continue;
- GD_rank(g).plus(r).setPtr("v", ALLOC_empty(j + 1, GD_rank(g).plus(r).getPtr("v"), Agnode_s.class));
- for (i = GD_rank(g).plus(r).getInt("n") - 1; i >= 0; i--) {
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
- GD_rank(g).plus(r).getArrayOfPtr("v").plus(ND_order(v)).setPtr(v);
+ GD_rank(g).plus(r).setPtr("v", ALLOC_allocated_ST_Agnode_s((ST_Agnode_s.ArrayOfStar) GD_rank(g).get(r).v, j + 1));
+ for (i = GD_rank(g).get(r).n - 1; i >= 0; i--) {
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i);
+ GD_rank(g).get(r).v.plus(ND_order(v)).setPtr(v);
}
GD_rank(g).plus(r).setInt("n", j);
- GD_rank(g).plus(r).getArrayOfPtr("v").plus(j).setPtr(null);
+ GD_rank(g).get(r).v.plus(j).setPtr(null);
}
} finally {
LEAVING("1lejhh3evsa10auyj7cgqj8ub","make_leafslots");
@@ -2017,7 +1992,7 @@ throw new UnsupportedOperationException();
//3 alpljm8o6nsam95ly6leelnbp
// int ports_eq(edge_t * e, edge_t * f)
-public static boolean ports_eq(Agedge_s e, Agedge_s f) {
+public static boolean ports_eq(ST_Agedge_s e, ST_Agedge_s f) {
ENTERING("alpljm8o6nsam95ly6leelnbp","ports_eq");
try {
return ((ED_head_port(e).defined == ED_head_port(f).defined)
@@ -2038,12 +2013,12 @@ LEAVING("alpljm8o6nsam95ly6leelnbp","ports_eq");
//3 cfotmdif5xv7n6oauyvzv0qwa
// static void expand_leaves(graph_t * g)
-public static void expand_leaves(Agraph_s g) {
+public static void expand_leaves(ST_Agraph_s g) {
ENTERING("cfotmdif5xv7n6oauyvzv0qwa","expand_leaves");
try {
int i, d;
- Agnode_s n;
- Agedge_s e, f;
+ ST_Agnode_s n;
+ ST_Agedge_s e, f;
make_leafslots(g);
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
if (ND_inleaf(n)!=null)
@@ -2051,12 +2026,12 @@ try {
if (ND_outleaf(n)!=null)
do_leaves(g, ND_outleaf(n));
if (ND_other(n).listNotNull())
- for (i = 0; (e = (Agedge_s) ND_other(n).getFromList(i))!=null; i++) {
+ for (i = 0; (e = (ST_Agedge_s) ND_other(n).getFromList(i))!=null; i++) {
if ((d = ND_rank(aghead(e)) - ND_rank(aghead(e))) == 0)
continue;
f = ED_to_orig(e);
if (ports_eq(e, f) == false) {
- zapinlist(ND_other(n).amp(), e);
+ zapinlist(ND_other(n), e);
if (d == 1)
fast_edge(e);
/*else unitize(e); ### */
@@ -2074,10 +2049,10 @@ LEAVING("cfotmdif5xv7n6oauyvzv0qwa","expand_leaves");
//3 d4b57ugpwxy567pfmxn14ed8d
// static void make_lrvn(graph_t * g)
-public static void make_lrvn(Agraph_s g) {
+public static void make_lrvn(ST_Agraph_s g) {
ENTERING("d4b57ugpwxy567pfmxn14ed8d","make_lrvn");
try {
- Agnode_s ln, rn;
+ ST_Agnode_s ln, rn;
if (GD_ln(g)!=null)
return;
ln = virtual_node(dot_root(g));
@@ -2085,7 +2060,7 @@ try {
rn = virtual_node(dot_root(g));
ND_node_type(rn, 2);
if (GD_label(g)!=null && NEQ(g, dot_root(g)) && N(GD_flip(agroot(g)))) {
- int w = MAX((int)GD_border(g).plus(0).getDouble("x"), (int)GD_border(g).plus(2).getDouble("x"));
+ int w = MAX((int)GD_border(g)[0].x, (int)GD_border(g)[2].x);
make_aux_edge(ln, rn, w, 0);
}
GD_ln(g, ln);
@@ -2100,29 +2075,29 @@ LEAVING("d4b57ugpwxy567pfmxn14ed8d","make_lrvn");
//3 daz786541idcxnywckcbncazb
// static void contain_nodes(graph_t * g)
-public static void contain_nodes(Agraph_s g) {
+public static void contain_nodes(ST_Agraph_s g) {
ENTERING("daz786541idcxnywckcbncazb","contain_nodes");
try {
int margin, r;
- Agnode_s ln, rn, v;
+ ST_Agnode_s ln, rn, v;
margin = late_int (g, Z.z().G_margin, 8, 0);
make_lrvn(g);
ln = GD_ln(g);
rn = GD_rn(g);
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
- if (GD_rank(g).plus(r).getInt("n") == 0)
+ if (GD_rank(g).get(r).n == 0)
continue;
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr();
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.get(0);
if (v == null) {
UNSUPPORTED("1f2esoodtcrdhljk1cq1klyao"); // agerr(AGERR, "contain_nodes clust %s rank %d missing node\n",
UNSUPPORTED("7w6lv4ywtczwz2y1mg0p3jdav"); // agnameof(g), r);
UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue;
}
make_aux_edge(ln, v,
- ND_lw(v) + margin + GD_border(g).plus(3).getStruct().getDouble("x"), 0);
- v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(GD_rank(g).plus(r).getInt("n") - 1).getPtr();
+ ND_lw(v) + margin + GD_border(g)[3].x, 0);
+ v = (ST_Agnode_s) GD_rank(g).get(r).v.plus(GD_rank(g).get(r).n - 1).getPtr();
make_aux_edge(v, rn,
- ND_rw(v) + margin + GD_border(g).plus(1).getStruct().getDouble("x"), 0);
+ ND_rw(v) + margin + GD_border(g)[1].x, 0);
}
} finally {
LEAVING("daz786541idcxnywckcbncazb","contain_nodes");
diff --git a/src/gen/lib/dotgen/rank__c.java b/src/gen/lib/dotgen/rank__c.java
index 6e6aa2c..f47309e 100644
--- a/src/gen/lib/dotgen/rank__c.java
+++ b/src/gen/lib/dotgen/rank__c.java
@@ -101,20 +101,17 @@ import static smetana.core.Macro.ND_out;
import static smetana.core.Macro.ND_rank;
import static smetana.core.Macro.ND_ranktype;
import static smetana.core.Macro.UNSUPPORTED;
-import static smetana.core.Macro.ZALLOC;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.aspect_t;
-import h.boxf;
-import h.elist;
-import h.point;
-import h.pointf;
+import static smetana.core.Macro.ZALLOC_ST_Agraph_s;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_aspect_t;
+import h.ST_elist;
+import h.ST_point;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Memory;
import smetana.core.Z;
-import smetana.core.__struct__;
public class rank__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -374,14 +371,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -410,25 +407,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -452,16 +430,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -758,13 +736,13 @@ throw new UnsupportedOperationException();
//3 3f1re3nfkhxwjjb90kppwuupr
// static void renewlist(elist * L)
-public static void renewlist(elist L) {
+public static void renewlist(ST_elist L) {
ENTERING("3f1re3nfkhxwjjb90kppwuupr","renewlist");
try {
int i;
- for (i = L.getInt("size"); i >= 0; i--)
- L.getArrayOfPtr("list").plus(i).setPtr(null);
- L.setInt("size", 0);
+ for (i = L.size; i >= 0; i--)
+ L.list.set(i, null);
+ L.size = 0;
} finally {
LEAVING("3f1re3nfkhxwjjb90kppwuupr","renewlist");
}
@@ -775,17 +753,17 @@ LEAVING("3f1re3nfkhxwjjb90kppwuupr","renewlist");
//3 1xov2qhuxj1f9nbzu3xsa6679
// static void cleanup1(graph_t * g)
-public static void cleanup1(Agraph_s g) {
+public static void cleanup1(ST_Agraph_s g) {
ENTERING("1xov2qhuxj1f9nbzu3xsa6679","cleanup1");
try {
- Agnode_s n;
- Agedge_s e, f;
+ ST_Agnode_s n;
+ ST_Agedge_s e, f;
int c;
for (c = 0; c < GD_comp(g).size; c++) {
GD_nlist(g, GD_comp(g).getFromList(c));
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
- renewlist(ND_in(n).amp());
- renewlist(ND_out(n).amp());
+ renewlist(ND_in(n));
+ renewlist(ND_out(n));
ND_mark(n, 0);
}
}
@@ -797,8 +775,8 @@ try {
* share a virtual edge.
*/
if (f!=null && (EQ(e, ED_to_orig(f)))) {
- Agedge_s e1, f1;
- Agnode_s n1;
+ ST_Agedge_s e1, f1;
+ ST_Agnode_s n1;
for (n1 = agfstnode(g); n1!=null; n1 = agnxtnode(g, n1)) {
for (e1 = agfstout(g, n1); e1!=null; e1 = agnxtout(g, e1)) {
if (NEQ(e, e1)) {
@@ -809,7 +787,7 @@ try {
}
}
}
- Memory.free(f.getStruct("base").getPtr("data"));
+ Memory.free(f.base.data);
Memory.free(f);
}
ED_to_virt(e, null);
@@ -827,11 +805,11 @@ LEAVING("1xov2qhuxj1f9nbzu3xsa6679","cleanup1");
//3 bxjf5g7g953ii1hfodl1j0y4u
// static void edgelabel_ranks(graph_t * g)
-public static void edgelabel_ranks(Agraph_s g) {
+public static void edgelabel_ranks(ST_Agraph_s g) {
ENTERING("bxjf5g7g953ii1hfodl1j0y4u","edgelabel_ranks");
try {
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
if ((GD_has_labels(g) & (1 << 0))!=0) {
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n))
for (e = agfstout(g, n); e!=null; e = agnxtout(g, e))
@@ -895,7 +873,7 @@ throw new UnsupportedOperationException();
//3 65qi5f0bxp6d6vahhlcolpk88
// static int rank_set_class(graph_t * g)
-public static int rank_set_class(Agraph_s g) {
+public static int rank_set_class(ST_Agraph_s g) {
ENTERING("65qi5f0bxp6d6vahhlcolpk88","rank_set_class");
try {
CString name[] = new CString[] { new CString("same"), new CString("min"), new CString("source"), new CString("max"), new CString("sink"), null };
@@ -916,13 +894,13 @@ LEAVING("65qi5f0bxp6d6vahhlcolpk88","rank_set_class");
//3 5189iviqj57iztftckz86y6jj
// static int make_new_cluster(graph_t * g, graph_t * subg)
-public static int make_new_cluster(Agraph_s g, Agraph_s subg) {
+public static int make_new_cluster(ST_Agraph_s g, ST_Agraph_s subg) {
ENTERING("5189iviqj57iztftckz86y6jj","make_new_cluster");
try {
int cno;
GD_n_cluster(g, GD_n_cluster(g)+1);
cno = GD_n_cluster(g);
- GD_clust(g, ZALLOC(cno + 1, GD_clust(g), Agraph_s.class, GD_n_cluster(g)));
+ GD_clust(g, ZALLOC_ST_Agraph_s((ST_Agraph_s.Array) GD_clust(g), cno + 1));
GD_clust(g).plus(cno).setPtr(subg);
do_graph_label(subg);
return cno;
@@ -936,11 +914,11 @@ LEAVING("5189iviqj57iztftckz86y6jj","make_new_cluster");
//3 9lvm2ufqjzl2bsbpo0zg9go58
// static void node_induce(graph_t * par, graph_t * g)
-public static void node_induce(Agraph_s par, Agraph_s g) {
+public static void node_induce(ST_Agraph_s par, ST_Agraph_s g) {
ENTERING("9lvm2ufqjzl2bsbpo0zg9go58","node_induce");
try {
- Agnode_s n, nn;
- Agedge_s e;
+ ST_Agnode_s n, nn;
+ ST_Agedge_s e;
int i;
LOG2("node_induce");
/* enforce that a node is in at most one cluster at this level */
@@ -951,7 +929,7 @@ try {
continue;
}
for (i = 1; i < GD_n_cluster(par); i++)
- if (agcontains((Agraph_s) GD_clust(par).plus(i).getPtr(), n))
+ if (agcontains((ST_Agraph_s) GD_clust(par).get(i).getPtr(), n))
break;
if (i < GD_n_cluster(par))
agdelete(g, n);
@@ -1003,10 +981,10 @@ throw new UnsupportedOperationException();
//3 2rbs5deyvlh5s7lkhv6zouqbe
// static void cluster_leader(graph_t * clust)
-public static void cluster_leader(Agraph_s clust) {
+public static void cluster_leader(ST_Agraph_s clust) {
ENTERING("2rbs5deyvlh5s7lkhv6zouqbe","cluster_leader");
try {
- Agnode_s leader, n;
+ ST_Agnode_s leader, n;
int maxrank = 0;
/* find number of ranks and select a leader */
leader = null;
@@ -1033,7 +1011,7 @@ LEAVING("2rbs5deyvlh5s7lkhv6zouqbe","cluster_leader");
//3 f3sl627dqmre3kru883bpdxc3
// static void collapse_cluster(graph_t * g, graph_t * subg)
-public static void collapse_cluster(Agraph_s g, Agraph_s subg) {
+public static void collapse_cluster(ST_Agraph_s g, ST_Agraph_s subg) {
ENTERING("f3sl627dqmre3kru883bpdxc3","collapse_cluster");
try {
if (GD_parent(subg)!=null) {
@@ -1059,11 +1037,11 @@ LEAVING("f3sl627dqmre3kru883bpdxc3","collapse_cluster");
//3 din4qnipewrwnelaimzvlplft
// static void collapse_sets(graph_t *rg, graph_t *g)
-public static void collapse_sets(Agraph_s rg, Agraph_s g) {
+public static void collapse_sets(ST_Agraph_s rg, ST_Agraph_s g) {
ENTERING("din4qnipewrwnelaimzvlplft","collapse_sets");
try {
int c;
- Agraph_s subg;
+ ST_Agraph_s subg;
for (subg = agfstsubg(g); subg!=null; subg = agnxtsubg(subg)) {
c = rank_set_class(subg);
if (c!=0) {
@@ -1103,14 +1081,14 @@ throw new UnsupportedOperationException();
//3 12fw0esv4unfin6waf9mknc1o
// static void set_minmax(graph_t * g)
-public static void set_minmax(Agraph_s g) {
+public static void set_minmax(ST_Agraph_s g) {
ENTERING("12fw0esv4unfin6waf9mknc1o","set_minmax");
try {
int c;
GD_minrank(g, GD_minrank(g) + ND_rank(GD_leader(g)));
GD_maxrank(g, GD_maxrank(g) + ND_rank(GD_leader(g)));
for (c = 1; c <= GD_n_cluster(g); c++)
- set_minmax((Agraph_s) GD_clust(g).plus(c).getPtr());
+ set_minmax((ST_Agraph_s) GD_clust(g).get(c).getPtr());
} finally {
LEAVING("12fw0esv4unfin6waf9mknc1o","set_minmax");
}
@@ -1121,16 +1099,16 @@ LEAVING("12fw0esv4unfin6waf9mknc1o","set_minmax");
//3 3bcr1748gqnu8ogb73jeja7ly
// static point minmax_edges(graph_t * g)
-public static __struct__<point> minmax_edges(Agraph_s g) {
+public static ST_point minmax_edges(ST_Agraph_s g) {
// WARNING!! STRUCT
-return minmax_edges_w_(g).copy();
+return (ST_point) minmax_edges_w_(g).copy();
}
-private static __struct__<point> minmax_edges_w_(Agraph_s g) {
+private static ST_point minmax_edges_w_(ST_Agraph_s g) {
ENTERING("3bcr1748gqnu8ogb73jeja7ly","minmax_edges");
try {
- Agnode_s n;
- Agedge_s e;
- final __struct__<point> slen = JUtils.from(point.class);
+ ST_Agnode_s n;
+ ST_Agedge_s e;
+ final ST_point slen = new ST_point();
slen.setInt("x", 0);
slen.setInt("y", 0);
if ((GD_maxset(g) == null) && (GD_minset(g) == null))
@@ -1167,15 +1145,15 @@ LEAVING("3bcr1748gqnu8ogb73jeja7ly","minmax_edges");
//3 1rmlm1wo3t94wyet9rlwrmith
// static int minmax_edges2(graph_t * g, point slen)
-public static boolean minmax_edges2(Agraph_s g, final __struct__<point> slen) {
+public static boolean minmax_edges2(ST_Agraph_s g, final ST_point slen) {
// WARNING!! STRUCT
-return minmax_edges2_w_(g, slen.copy());
+return minmax_edges2_w_(g, (ST_point) slen.copy());
}
-private static boolean minmax_edges2_w_(Agraph_s g, final __struct__<point> slen) {
+private static boolean minmax_edges2_w_(ST_Agraph_s g, final ST_point slen) {
ENTERING("1rmlm1wo3t94wyet9rlwrmith","minmax_edges2");
try {
- Agnode_s n;
- Agedge_s e = null;
+ ST_Agnode_s n;
+ ST_Agedge_s e = null;
if ((GD_maxset(g)!=null) || (GD_minset(g)!=null)) {
UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
UNSUPPORTED("8y47p29z0c2f1xpkrsb8w8re8"); // if (n != UF_find(n))
@@ -1203,7 +1181,7 @@ LEAVING("1rmlm1wo3t94wyet9rlwrmith","minmax_edges2");
//3 3vpthwso788idvycelpnqijys
// void rank1(graph_t * g)
-public static void rank1(Agraph_s g) {
+public static void rank1(ST_Agraph_s g) {
ENTERING("3vpthwso788idvycelpnqijys","rank1");
try {
int maxiter = Integer.MAX_VALUE;
@@ -1212,7 +1190,7 @@ try {
if ((s = agget(g, new CString("nslimit1")))!=null)
UNSUPPORTED("9tp2zk1tsr4ce9rwsr0is9u3o"); // maxiter = atof(s) * agnnodes(g);
for (c = 0; c < GD_comp(g).size; c++) {
- //GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr());
+ //GD_nlist(g, GD_comp(g).list.get(c));
GD_nlist(g, GD_comp(g).getFromList(c));
rank(g, (GD_n_cluster(g) == 0 ? 1 : 0), maxiter); /* TB balance */
}
@@ -1226,11 +1204,11 @@ LEAVING("3vpthwso788idvycelpnqijys","rank1");
//3 cdh8wnb99v90dy6efpbzmrjix
// static void expand_ranksets(graph_t * g, aspect_t* asp)
-public static void expand_ranksets(Agraph_s g, aspect_t asp) {
+public static void expand_ranksets(ST_Agraph_s g, ST_aspect_t asp) {
ENTERING("cdh8wnb99v90dy6efpbzmrjix","expand_ranksets");
try {
int c;
- Agnode_s n, leader;
+ ST_Agnode_s n, leader;
if ((n = agfstnode(g))!=null) {
GD_minrank(g, MAXSHORT);
GD_maxrank(g, -1);
@@ -1252,7 +1230,7 @@ try {
if (EQ(g, dot_root(g))) {
if (Z.z().CL_type == 100) {
for (c = 1; c <= GD_n_cluster(g); c++)
- set_minmax((Agraph_s) GD_clust(g).plus(c).getPtr());
+ set_minmax((ST_Agraph_s) GD_clust(g).get(c).getPtr());
} else {
find_clusters(g);
}
@@ -1271,10 +1249,10 @@ LEAVING("cdh8wnb99v90dy6efpbzmrjix","expand_ranksets");
//3 2o4rmb4o6f6zh46ak3se91rwr
// static void dot1_rank(graph_t * g, aspect_t* asp)
-public static void dot1_rank(Agraph_s g, aspect_t asp) {
+public static void dot1_rank(ST_Agraph_s g, ST_aspect_t asp) {
ENTERING("2o4rmb4o6f6zh46ak3se91rwr","dot1_rank");
try {
- final __struct__<point> p = JUtils.from(point.class);
+ final ST_point p = new ST_point();
edgelabel_ranks(g);
if (asp!=null) {
UNSUPPORTED("kh7e20nqwuserrnpf3zpvuyl"); // init_UF_size(g);
@@ -1285,7 +1263,7 @@ UNSUPPORTED("d88j5oswhz0d3yvd4wlvxohmu"); // initEdgeTypes(g);
class1_(g);
p.___(minmax_edges(g));
decompose(g, 0);
- if (asp!=null && ((GD_comp(g).getInt("size") > 1)||(GD_n_cluster(g) > 0))) {
+ if (asp!=null && ((GD_comp(g).size > 1)||(GD_n_cluster(g) > 0))) {
UNSUPPORTED("evcjt85irnaa02v8cam07i009"); // asp->badGraph = 1;
UNSUPPORTED("45nxv6kczal9hnytkfcyt2jk8"); // asp = NULL;
}
@@ -1308,7 +1286,7 @@ LEAVING("2o4rmb4o6f6zh46ak3se91rwr","dot1_rank");
//3 asyfujgwqa407ffvqn5psbtsc
// void dot_rank(graph_t * g, aspect_t* asp)
-public static void dot_rank(Agraph_s g, aspect_t asp) {
+public static void dot_rank(ST_Agraph_s g, ST_aspect_t asp) {
ENTERING("asyfujgwqa407ffvqn5psbtsc","dot_rank");
try {
if (agget (g, new CString("newrank"))!=null) {
@@ -1329,7 +1307,7 @@ LEAVING("asyfujgwqa407ffvqn5psbtsc","dot_rank");
//3 cdncou6d2ng5i48rd1mk2cpnw
// int is_cluster(graph_t * g)
-public static boolean is_cluster(Agraph_s g) {
+public static boolean is_cluster(ST_Agraph_s g) {
ENTERING("cdncou6d2ng5i48rd1mk2cpnw","is_cluster");
try {
return (strncmp(agnameof(g), new CString("cluster"), 7) == 0);
diff --git a/src/gen/lib/dotgen/sameport__c.java b/src/gen/lib/dotgen/sameport__c.java
index 63b20dc..71ff710 100644
--- a/src/gen/lib/dotgen/sameport__c.java
+++ b/src/gen/lib/dotgen/sameport__c.java
@@ -50,15 +50,12 @@ import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGEDGE;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.boxf;
-import h.pointf;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
import smetana.core.Z;
-import smetana.core.__struct__;
public class sameport__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -318,14 +315,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -354,27 +351,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
-
//3 1n5xl70wxuabyf97mclvilsm6
@@ -396,16 +372,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -702,11 +678,11 @@ throw new UnsupportedOperationException();
//3 eu2yvovb9xx4rzic3gllij2bv
// void dot_sameports(graph_t * g)
-public static void dot_sameports(Agraph_s g) {
+public static void dot_sameports(ST_Agraph_s g) {
ENTERING("eu2yvovb9xx4rzic3gllij2bv","dot_sameports");
try {
- Agnode_s n;
- Agedge_s e;
+ ST_Agnode_s n;
+ ST_Agedge_s e;
CString id;
//same_t samehead[5];
//same_t sametail[5];
diff --git a/src/gen/lib/fdpgen/clusteredges__c.java b/src/gen/lib/fdpgen/clusteredges__c.java
index 48afde6..4626a95 100644
--- a/src/gen/lib/fdpgen/clusteredges__c.java
+++ b/src/gen/lib/fdpgen/clusteredges__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class clusteredges__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/fdpgen/comp__c.java b/src/gen/lib/fdpgen/comp__c.java
index 42f9745..6f2c75a 100644
--- a/src/gen/lib/fdpgen/comp__c.java
+++ b/src/gen/lib/fdpgen/comp__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class comp__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/fdpgen/fdpinit__c.java b/src/gen/lib/fdpgen/fdpinit__c.java
index 457cc4c..f92b6b7 100644
--- a/src/gen/lib/fdpgen/fdpinit__c.java
+++ b/src/gen/lib/fdpgen/fdpinit__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class fdpinit__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,26 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -388,16 +365,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/fdpgen/grid__c.java b/src/gen/lib/fdpgen/grid__c.java
index 35122bc..8ec5049 100644
--- a/src/gen/lib/fdpgen/grid__c.java
+++ b/src/gen/lib/fdpgen/grid__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class grid__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/fdpgen/layout__c.java b/src/gen/lib/fdpgen/layout__c.java
index 12a8203..ea6735b 100644
--- a/src/gen/lib/fdpgen/layout__c.java
+++ b/src/gen/lib/fdpgen/layout__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
import smetana.core.jmp_buf;
public class layout__c {
@@ -311,14 +308,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -347,26 +344,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -389,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/fdpgen/tlayout__c.java b/src/gen/lib/fdpgen/tlayout__c.java
index 81c5760..46c4a9f 100644
--- a/src/gen/lib/fdpgen/tlayout__c.java
+++ b/src/gen/lib/fdpgen/tlayout__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class tlayout__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/fdpgen/xlayout__c.java b/src/gen/lib/fdpgen/xlayout__c.java
index 8614a20..4eeac70 100644
--- a/src/gen/lib/fdpgen/xlayout__c.java
+++ b/src/gen/lib/fdpgen/xlayout__c.java
@@ -47,10 +47,7 @@ package gen.lib.fdpgen;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class xlayout__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,25 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
@@ -388,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/gvc/gvc__c.java b/src/gen/lib/gvc/gvc__c.java
index b084fa0..b9a2b2d 100644
--- a/src/gen/lib/gvc/gvc__c.java
+++ b/src/gen/lib/gvc/gvc__c.java
@@ -53,7 +53,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.AGNODE;
import static smetana.core.Macro.NOT;
import static smetana.core.Macro.UNSUPPORTED;
-import h.GVC_s;
+import h.ST_GVC_s;
import smetana.core.CString;
public class gvc__c {
@@ -161,13 +161,13 @@ public class gvc__c {
//3 f3vdhir2c7dz3pvmx9d3m4lx1
// GVC_t *gvContext(void)
-public static GVC_s gvContext(Object... arg) {
+public static ST_GVC_s gvContext(Object... arg) {
ENTERING("f3vdhir2c7dz3pvmx9d3m4lx1","gvContext");
try {
- GVC_s gvc;
+ ST_GVC_s gvc;
agattr(null, AGNODE, new CString("label"), new CString("\\N"));
/* default to no builtins, demand loading enabled */
- gvc = (GVC_s) gvNEWcontext(null, (NOT(0)));
+ gvc = (ST_GVC_s) gvNEWcontext(null, (NOT(0)));
/* builtins don't require LTDL */
gvc.setInt("config_found", 0);
gvtextlayout_select(gvc); /* choose best available textlayout plugin immediately */
diff --git a/src/gen/lib/gvc/gvcontext__c.java b/src/gen/lib/gvc/gvcontext__c.java
index e849ffe..29c89e7 100644
--- a/src/gen/lib/gvc/gvcontext__c.java
+++ b/src/gen/lib/gvc/gvcontext__c.java
@@ -44,13 +44,11 @@
*
*/
package gen.lib.gvc;
-import static gen.lib.common.memory__c.zmalloc;
import static smetana.core.JUtils.function;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.GVC_s;
+import h.ST_GVC_s;
import h.lt_symlist_t;
import smetana.core.__ptr__;
@@ -168,15 +166,15 @@ public static __ptr__ LibInfo = null;
//3 8jwauh4lo3kcvxhomy40s94b
// GVC_t *gvNEWcontext(const lt_symlist_t *builtins, int demand_loading)
-public static GVC_s gvNEWcontext(lt_symlist_t builtins, boolean demand_loading) {
+public static ST_GVC_s gvNEWcontext(lt_symlist_t builtins, boolean demand_loading) {
ENTERING("8jwauh4lo3kcvxhomy40s94b","gvNEWcontext");
try {
- GVC_s gvc = (GVC_s) zmalloc(sizeof(GVC_s.class));
+ ST_GVC_s gvc = new ST_GVC_s();
if (gvc!=null) {
- gvc.getStruct("common").setPtr("info", LibInfo);
- gvc.getStruct("common").setPtr("errorfn", function(gen.lib.cgraph.agerror__c.class, "agerrorf"));
- gvc.getStruct("common").setPtr("builtins", builtins);
- gvc.getStruct("common").setBoolean("demand_loading", demand_loading);
+ gvc.common.setPtr("info", LibInfo);
+ gvc.common.setPtr("errorfn", function(gen.lib.cgraph.agerror__c.class, "agerrorf"));
+ gvc.common.setPtr("builtins", builtins);
+ gvc.common.demand_loading = demand_loading;
}
return gvc;
} finally {
diff --git a/src/gen/lib/gvc/gvlayout__c.java b/src/gen/lib/gvc/gvlayout__c.java
index e305e48..1fb4ac2 100644
--- a/src/gen/lib/gvc/gvlayout__c.java
+++ b/src/gen/lib/gvc/gvlayout__c.java
@@ -60,17 +60,14 @@ import static smetana.core.Macro.GD_drawing;
import static smetana.core.Macro.GD_gvc;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h.Agraphinfo_t;
-import h.GVC_s;
-import h.gvlayout_engine_s;
-import h.gvlayout_features_t;
-import h.gvplugin_installed_t;
+import h.ST_Agraph_s;
+import h.ST_Agraphinfo_t;
+import h.ST_GVC_s;
+import h.ST_gvlayout_engine_s;
+import h.ST_gvlayout_features_t;
+import h.ST_gvplugin_installed_t;
import h.layout_type;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.Memory;
-import smetana.core.__struct__;
public class gvlayout__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -175,34 +172,34 @@ public class gvlayout__c {
-//3 2g20jitdi8afuoei8p1mcfg9l
-// int gvlayout_select(GVC_t * gvc, const char *layout)
-private final static __struct__<gvlayout_features_t> dotgen_features = JUtils.from(gvlayout_features_t.class);
-private final static __struct__<gvlayout_engine_s> dotgen_engine = JUtils.from(gvlayout_engine_s.class);
+private final static ST_gvlayout_features_t dotgen_features = new ST_gvlayout_features_t();
+private final static ST_gvlayout_engine_s dotgen_engine = new ST_gvlayout_engine_s();
static {
dotgen_features.setInt("flags", 1<<0);
dotgen_engine.setPtr("layout", function(gen.lib.dotgen.dotinit__c.class, "dot_layout"));
dotgen_engine.setPtr("cleanup", function(gen.lib.dotgen.dotinit__c.class, "dot_cleanup"));
}
-public static int gvlayout_select(GVC_s gvc, CString layout) {
+//3 2g20jitdi8afuoei8p1mcfg9l
+//int gvlayout_select(GVC_t * gvc, const char *layout)
+public static int gvlayout_select(ST_GVC_s gvc, CString layout) {
ENTERING("2g20jitdi8afuoei8p1mcfg9l","gvlayout_select");
try {
- gvplugin_installed_t gvlayout_dot_layout = (gvplugin_installed_t) Memory.malloc(gvplugin_installed_t.class);
+ ST_gvplugin_installed_t gvlayout_dot_layout = new ST_gvplugin_installed_t();
gvlayout_dot_layout.setInt("id", enumAsInt(layout_type.class, "LAYOUT_DOT"));
gvlayout_dot_layout.setPtr("type", new CString("dot"));
gvlayout_dot_layout.setInt("quality", 0);
- gvlayout_dot_layout.setPtr("engine", dotgen_engine.amp());
- gvlayout_dot_layout.setPtr("features", dotgen_features.amp());
+ gvlayout_dot_layout.setPtr("engine", dotgen_engine);
+ gvlayout_dot_layout.setPtr("features", dotgen_features);
// gvplugin_available_t *plugin;
- gvplugin_installed_t typeptr = gvlayout_dot_layout;
+ ST_gvplugin_installed_t typeptr = gvlayout_dot_layout;
// plugin = gvplugin_load(gvc, API_layout, layout);
// if (plugin) {
// typeptr = plugin->typeptr;
- gvc.getStruct("layout").setPtr("type", typeptr.getPtr("type"));
- gvc.getStruct("layout").setPtr("engine", typeptr.getPtr("engine"));
- gvc.getStruct("layout").setInt("id", typeptr.getInt("id"));
- gvc.getStruct("layout").setPtr("features", typeptr.getPtr("features"));
+ gvc.layout.setPtr("type", typeptr.type);
+ gvc.layout.setPtr("engine", typeptr.engine);
+ gvc.layout.setInt("id", typeptr.id);
+ gvc.layout.setPtr("features", typeptr.features);
return 300; /* FIXME - need better return code */
// }
// return 999;
@@ -216,13 +213,13 @@ LEAVING("2g20jitdi8afuoei8p1mcfg9l","gvlayout_select");
//3 991b7t7n0x8ifkp49zotjs78x
// int gvLayoutJobs(GVC_t * gvc, Agraph_t * g)
-public static int gvLayoutJobs(GVC_s gvc, Agraph_s g) {
+public static int gvLayoutJobs(ST_GVC_s gvc, ST_Agraph_s g) {
ENTERING("991b7t7n0x8ifkp49zotjs78x","gvLayoutJobs");
try {
- gvlayout_engine_s gvle;
+ ST_gvlayout_engine_s gvle;
CString p = null;
int rc;
- agbindrec(g, new CString("Agraphinfo_t"), sizeof(Agraphinfo_t.class), (N(0)));
+ agbindrec(g, new CString("Agraphinfo_t"), sizeof(ST_Agraphinfo_t.class), (N(0)));
GD_gvc(g, gvc);
if (NEQ(g, agroot(g)))
UNSUPPORTED("ah9ygbaap1fyxr97z734juk0j"); // (((Agraphinfo_t*)(((Agobj_t*)(agroot(g)))->data))->gvc) = gvc;
@@ -238,18 +235,18 @@ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
rc = gvlayout_select(gvc, p); //Let's force things
- gvle = (gvlayout_engine_s) gvc.getStruct("layout").getPtr("engine");
+ gvle = (ST_gvlayout_engine_s) gvc.layout.engine;
if (N(gvle))
UNSUPPORTED("return -1;");
gv_fixLocale (1);
- graph_init(g, (gvc.getStruct("layout").getPtr("features").getInt("flags") & (1<<0))!=0);
+ graph_init(g, (gvc.layout.features.flags & (1<<0))!=0);
GD_drawing(agroot(g), GD_drawing(g));
- if (gvle!=null && gvle.getPtr("layout")!=null) {
- gvle.call("layout", g);
- if (gvle.getPtr("cleanup")!=null)
+ if (gvle!=null && gvle.layout!=null) {
+ gvle.layout.exe(g);
+ if (gvle.cleanup!=null)
if (GD_cleanup(g)==null)
LOG2("WARNING WE CHEAT GD_cleanup(g) is NULL"); else
- GD_cleanup(g).setPtr(gvle.getPtr("cleanup"));
+ GD_cleanup(g).setPtr(gvle.cleanup);
}
gv_fixLocale (0);
return 0;
diff --git a/src/gen/lib/gvc/gvplugin__c.java b/src/gen/lib/gvc/gvplugin__c.java
index 4f2ae3f..4d5c7d5 100644
--- a/src/gen/lib/gvc/gvplugin__c.java
+++ b/src/gen/lib/gvc/gvplugin__c.java
@@ -50,11 +50,11 @@ import static smetana.core.JUtils.strncpy;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.GVC_s;
+import h.ST_GVC_s;
+import h.ST_gvplugin_available_s;
+import h.ST_gvplugin_installed_t;
import h.api_t;
import h.gvplugin_api_t;
-import h.gvplugin_available_s;
-import h.gvplugin_installed_t;
import h.gvplugin_library_t;
import smetana.core.CString;
@@ -294,14 +294,14 @@ throw new UnsupportedOperationException();
//3 dh7wri9ra8xvm9ur14gd95xjj
// gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, const char *str)
-public static gvplugin_available_s gvplugin_load(GVC_s gvc, int api, CString str) {
+public static ST_gvplugin_available_s gvplugin_load(ST_GVC_s gvc, int api, CString str) {
ENTERING("dh7wri9ra8xvm9ur14gd95xjj","gvplugin_load");
try {
//gvplugin_available_s **pnext;
//gvplugin_available_s rv;
gvplugin_library_t library;
gvplugin_api_t apis;
- gvplugin_installed_t types;
+ ST_gvplugin_installed_t types;
CString reqtyp = new CString(64), typ = new CString(64);
CString reqdep, dep , reqpkg;
int i;
diff --git a/src/gen/lib/gvc/gvrender__c.java b/src/gen/lib/gvc/gvrender__c.java
index 8467a48..cbe645a 100644
--- a/src/gen/lib/gvc/gvrender__c.java
+++ b/src/gen/lib/gvc/gvrender__c.java
@@ -47,10 +47,7 @@ package gen.lib.gvc;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class gvrender__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -174,14 +171,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -210,26 +207,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -252,16 +229,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/gvc/gvtextlayout__c.java b/src/gen/lib/gvc/gvtextlayout__c.java
index 7e0d856..8b0b09f 100644
--- a/src/gen/lib/gvc/gvtextlayout__c.java
+++ b/src/gen/lib/gvc/gvtextlayout__c.java
@@ -49,10 +49,10 @@ import static smetana.core.JUtils.enumAsInt;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.GVC_s;
+import h.ST_GVC_s;
+import h.ST_gvplugin_available_s;
+import h.ST_gvplugin_installed_t;
import h.api_t;
-import h.gvplugin_available_s;
-import h.gvplugin_installed_t;
import smetana.core.CString;
public class gvtextlayout__c {
@@ -160,11 +160,11 @@ public class gvtextlayout__c {
//3 f1oiyeonoigwygyq8c88wl8tz
// int gvtextlayout_select(GVC_t * gvc)
-public static int gvtextlayout_select(GVC_s gvc) {
+public static int gvtextlayout_select(ST_GVC_s gvc) {
ENTERING("f1oiyeonoigwygyq8c88wl8tz","gvtextlayout_select");
try {
- gvplugin_available_s plugin;
- gvplugin_installed_t typeptr;
+ ST_gvplugin_available_s plugin;
+ ST_gvplugin_installed_t typeptr;
plugin = gvplugin_load(gvc, enumAsInt(api_t.class, "API_textlayout"), new CString("textlayout"));
if (plugin!=null) {
UNSUPPORTED("8cnmkxanogd09zc24faarugvo"); // typeptr = plugin->typeptr;
diff --git a/src/gen/lib/label/index__c.java b/src/gen/lib/label/index__c.java
index d2221e5..eda1fc2 100644
--- a/src/gen/lib/label/index__c.java
+++ b/src/gen/lib/label/index__c.java
@@ -44,12 +44,24 @@
*
*/
package gen.lib.label;
-import static gen.lib.label.node__c.*;
-import static gen.lib.common.memory__c.zmalloc;
-import static smetana.core.JUtils.sizeof;
+import static gen.lib.label.node__c.AddBranch;
+import static gen.lib.label.node__c.DisconBranch;
+import static gen.lib.label.node__c.NodeCover;
+import static gen.lib.label.node__c.PickBranch;
+import static gen.lib.label.node__c.RTreeNewNode;
+import static gen.lib.label.rectangle__c.CombineRect;
+import static gen.lib.label.rectangle__c.Overlap;
+import static smetana.core.JUtilsDebug.ENTERING;
+import static smetana.core.JUtilsDebug.LEAVING;
+import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.RTree;
-import h._Node_t___;
+import h.ST_Branch_t;
+import h.ST_LeafList_t;
+import h.ST_Node_t___;
+import h.ST_Node_t___or_object_t;
+import h.ST_RTree;
+import h.ST_Rect_t;
+import smetana.core.Memory;
import smetana.core.__ptr__;
public class index__c {
@@ -57,18 +69,25 @@ public class index__c {
//3 1rfaqe5urty5uyp5xb2r0idce
// LeafList_t *RTreeNewLeafList(Leaf_t * lp)
-public static Object RTreeNewLeafList(Object... arg) {
-UNSUPPORTED("bu04wzk5vh5g14rcm11j6y1bc"); // LeafList_t *RTreeNewLeafList(Leaf_t * lp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("8mcrniwafqlmy5ysg6jeand6o"); // LeafList_t *llp;
-UNSUPPORTED("3b215c61vcll0rkorzyelp40j"); // if ((llp = (LeafList_t*)zmalloc(sizeof(LeafList_t)))) {
-UNSUPPORTED("48u04cv4b40c0avzy99mdycx5"); // llp->leaf = lp;
-UNSUPPORTED("bbvk7v1s0z6yw1xdoq99v233w"); // llp->next = 0;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("5a1d3zolzdjict0gus6vz04a2"); // return llp;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_LeafList_t RTreeNewLeafList(ST_Branch_t lp) {
+ENTERING("1rfaqe5urty5uyp5xb2r0idce","RTreeNewLeafList");
+try {
+ ST_LeafList_t llp;
+ llp = new ST_LeafList_t();
+ llp.leaf = lp;
+ llp.next = null;
+ return llp;
+//UNSUPPORTED("3b215c61vcll0rkorzyelp40j"); // if ((llp = (LeafList_t*)zmalloc(sizeof(LeafList_t)))) {
+//UNSUPPORTED("48u04cv4b40c0avzy99mdycx5"); // llp->leaf = lp;
+//UNSUPPORTED("bbvk7v1s0z6yw1xdoq99v233w"); // llp->next = 0;
+//UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
+//UNSUPPORTED("5a1d3zolzdjict0gus6vz04a2"); // return llp;
+//UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+//
+//throw new UnsupportedOperationException();
+} finally {
+LEAVING("1rfaqe5urty5uyp5xb2r0idce","RTreeNewLeafList");
+}
}
@@ -76,18 +95,18 @@ throw new UnsupportedOperationException();
//3 6pvstz7axi8a7saeqe3nrrmg5
// LeafList_t *RTreeLeafListAdd(LeafList_t * llp, Leaf_t * lp)
-public static Object RTreeLeafListAdd(Object... arg) {
-UNSUPPORTED("eiwtmfygcnm8i2i38dywdrxvu"); // LeafList_t *RTreeLeafListAdd(LeafList_t * llp, Leaf_t * lp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("c8jefspkzejjwynx8rg8zejbx"); // LeafList_t *nlp;
-UNSUPPORTED("5whcehr1j26r7aahssfvo2dxa"); // if (!lp)
-UNSUPPORTED("1sxqq75kqdqzr0enoukqqx3m1"); // return llp;
-UNSUPPORTED("adl5lp3lwoh3u5zssznsdnxms"); // nlp = RTreeNewLeafList(lp);
-UNSUPPORTED("373n3s0slcur0mj477nbkp2z9"); // nlp->next = llp;
-UNSUPPORTED("c398zm44c0kp59y82avlt28qs"); // return nlp;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_LeafList_t RTreeLeafListAdd(ST_LeafList_t llp, ST_Branch_t lp) {
+ENTERING("6pvstz7axi8a7saeqe3nrrmg5","RTreeLeafListAdd");
+try {
+ ST_LeafList_t nlp;
+ if (N(lp))
+ return llp;
+ nlp = RTreeNewLeafList(lp);
+ nlp.next = llp;
+ return nlp;
+} finally {
+LEAVING("6pvstz7axi8a7saeqe3nrrmg5","RTreeLeafListAdd");
+}
}
@@ -95,20 +114,19 @@ throw new UnsupportedOperationException();
//3 6zraor7x44vrnm19d2igkvow2
// void RTreeLeafListFree(LeafList_t * llp)
-public static Object RTreeLeafListFree(Object... arg) {
-UNSUPPORTED("cwsuv5x6hz2atkriag0lyrwpq"); // void RTreeLeafListFree(LeafList_t * llp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("96shepyp7pgdusod9eu04oqsa"); // LeafList_t *tlp;
-UNSUPPORTED("66etdhvz2fmsepzj2nfiioze9"); // while (llp->next) {
-UNSUPPORTED("aa7iqc08758zwe37qyy2wffec"); // tlp = llp->next;
-UNSUPPORTED("efbq5hg14ncf3x5du5wro1m6d"); // free(llp);
-UNSUPPORTED("6qcaq7a673zdej3uu1ke2kz0a"); // llp = tlp;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("41smjtwh6jsdofomjdbd76o7j"); // free(llp);
-UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void RTreeLeafListFree(ST_LeafList_t llp) {
+ENTERING("6zraor7x44vrnm19d2igkvow2","RTreeLeafListFree");
+try {
+ ST_LeafList_t tlp;
+ while (llp.next!=null) {
+ tlp = (ST_LeafList_t) llp.next;
+ Memory.free(llp);
+ llp = tlp;
+ }
+ Memory.free(llp);
+} finally {
+LEAVING("6zraor7x44vrnm19d2igkvow2","RTreeLeafListFree");
+}
}
///* Allocate space for a node in the list used in DeletRect to
@@ -122,8 +140,10 @@ throw new UnsupportedOperationException();
///* Add a node to the reinsertion list. All its branches will later
// * be reinserted into the index structure.
// */
+//3 aa19m7d7qc06m8id896e60lkg
//static int RTreeReInsert(RTree_t * rtp, Node_t * n, struct ListNode **ee)
//{
+// WARNING!! STRUCT
// register struct ListNode *l;
//
// if (!(l = RTreeNewListNode()))
@@ -134,105 +154,134 @@ throw new UnsupportedOperationException();
// return 0;
//}
//
+//3 aa29m7d7qc06m8id896e60lkg
//RTree_t *RTreeOpen()
public static __ptr__ RTreeOpen() {
- RTree rtp;
- rtp = (RTree) zmalloc(sizeof(RTree.class));
+ENTERING("aa29m7d7qc06m8id896e60lkg","RTreeOpen");
+try {
+ ST_RTree rtp;
+ rtp = new ST_RTree();
if (rtp!=null)
rtp.setPtr("root", RTreeNewIndex(rtp));
return rtp;
+} finally {
+LEAVING("aa29m7d7qc06m8id896e60lkg","RTreeOpen");
+}
}
-///* Make a new index, empty. Consists of a single node. */
+/* Make a new index, empty. Consists of a single node. */
+//3 aa39m7d7qc06m8id896e60lkg
//Node_t *RTreeNewIndex(RTree_t * rtp)
-public static _Node_t___ RTreeNewIndex(RTree rtp) {
- _Node_t___ x;
+public static ST_Node_t___ RTreeNewIndex(ST_RTree rtp) {
+ENTERING("aa39m7d7qc06m8id896e60lkg","RTreeNewIndex");
+try {
+ ST_Node_t___ x;
x = RTreeNewNode(rtp);
-// x->level = 0; /* leaf */
-// rtp->LeafCount++;
-// return x;
-//}
- throw new UnsupportedOperationException();
+ x.setInt("level", 0); /* leaf */
+ rtp.setInt("LeafCount", rtp.LeafCount+1);
+ return x;
+} finally {
+LEAVING("aa39m7d7qc06m8id896e60lkg","RTreeNewIndex");
}
-//
+}
+
+//3 aa49m7d7qc06m8id896e60lkg
//static int RTreeClose2(RTree_t * rtp, Node_t * n)
-//{
-// int i;
-//
-// if (n->level > 0) {
-// for (i = 0; i < 64; i++) {
-// if (!n->branch[i].child)
-// continue;
-// if (!RTreeClose2(rtp, n->branch[i].child)) {
-// free(n->branch[i].child);
-// DisconBranch(n, i);
-// rtp->EntryCount--;
-// if (rtp->StatFlag)
-// rtp->ElimCount++;
-// }
-// }
-// } else {
-// for (i = 0; i < 64; i++) {
-// if (!n->branch[i].child)
-// continue;
-// // free(n->branch[i].child);
-// DisconBranch(n, i);
-// rtp->EntryCount--;
-// if (rtp->StatFlag)
-// rtp->ElimCount++;
-// }
-// //free(n);
-// }
-// return 0;
-//}
-//
+public static int RTreeClose2(ST_RTree rtp, ST_Node_t___ n) {
+ENTERING("aa49m7d7qc06m8id896e60lkg","RTreeClose2");
+try {
+ int i;
+
+ if (n.level > 0) {
+ for (i = 0; i < 64; i++) {
+ if (N(n.branch[i].child))
+ continue;
+ if (N(RTreeClose2(rtp, (ST_Node_t___) n.branch[i].child))) {
+ Memory.free(n.branch[i].child);
+ DisconBranch(n, i);
+ rtp.setInt("EntryCount", rtp.EntryCount-1);
+ if (rtp.StatFlag!=0)
+ rtp.setInt("ElimCount", rtp.ElimCount+1);
+ }
+ }
+ } else {
+ for (i = 0; i < 64; i++) {
+ if (N(n.branch[i].child))
+ continue;
+ // free(n->branch[i].child);
+ DisconBranch(n, i);
+ rtp.setInt("EntryCount", rtp.EntryCount-1);
+ if (rtp.StatFlag!=0)
+ rtp.setInt("ElimCount", rtp.ElimCount+1);
+ }
+ //free(n);
+ }
+ return 0;
+} finally {
+LEAVING("aa49m7d7qc06m8id896e60lkg","RTreeClose2");
+}
+}
+
+//3 aa59m7d7qc06m8id896e60lkg
//int RTreeClose(RTree_t * rtp)
-//{
-// RTreeClose2(rtp, rtp->root);
-// free(rtp->root);
-// free(rtp);
-// return 0;
-//}
-//
-//
-///* RTreeSearch in an index tree or subtree for all data retangles that
-//** overlap the argument rectangle.
-//** Returns the number of qualifying data rects.
-//*/
+public static int RTreeClose(ST_RTree rtp) {
+ENTERING("aa59m7d7qc06m8id896e60lkg","RTreeClose");
+try {
+ RTreeClose2(rtp, (ST_Node_t___) rtp.root);
+ Memory.free(rtp.root);
+ Memory.free(rtp);
+ return 0;
+} finally {
+LEAVING("aa59m7d7qc06m8id896e60lkg","RTreeClose");
+}
+}
+
+
+
+/* RTreeSearch in an index tree or subtree for all data retangles that
+** overlap the argument rectangle.
+** Returns the number of qualifying data rects.
+*/
+//3 aa69m7d7qc06m8id896e60lkg
//LeafList_t *RTreeSearch(RTree_t * rtp, Node_t * n, Rect_t * r)
-//{
-// register int i;
-// LeafList_t *llp = 0;
-//
+public static ST_LeafList_t RTreeSearch(ST_RTree rtp, ST_Node_t___ n, ST_Rect_t r) {
+ENTERING("aa69m7d7qc06m8id896e60lkg","RTreeSearch");
+try {
+ int i;
+ ST_LeafList_t llp = null;
+
// assert(n);
// assert(n->level >= 0);
// assert(r);
-//
-// rtp->SeTouchCount++;
-//
-// if (n->level > 0) { /* this is an internal node in the tree */
-// for (i = 0; i < 64; i++)
-// if (n->branch[i].child && Overlap(r, &n->branch[i].rect)) {
-// LeafList_t *tlp = RTreeSearch(rtp, n->branch[i].child, r);
-// if (llp) {
-// LeafList_t *xlp = llp;
-// while (xlp->next)
-// xlp = xlp->next;
-// xlp->next = tlp;
-// } else
-// llp = tlp;
-// }
-// } else { /* this is a leaf node */
-// for (i = 0; i < 64; i++) {
-// if (n->branch[i].child && Overlap(r, &n->branch[i].rect)) {
-// llp = RTreeLeafListAdd(llp, (Leaf_t *) & n->branch[i]);
-//
-//
-//
-// }
-// }
-// }
-// return llp;
+
+ rtp.setInt("SeTouchCount", rtp.SeTouchCount+1);
+
+ if (n.level > 0) { /* this is an internal node in the tree */
+ for (i = 0; i < 64; i++)
+ if (n.branch[i].child!=null &&
+ Overlap(r, n.branch[i].rect)) {
+ ST_LeafList_t tlp = RTreeSearch(rtp, (ST_Node_t___) n.branch[i].child, r);
+ if (llp!=null) {
+ ST_LeafList_t xlp = llp;
+ while (xlp.next!=null)
+ xlp = (ST_LeafList_t) xlp.next;
+ xlp.next = tlp;
+ } else
+ llp = tlp;
+ }
+ } else { /* this is a leaf node */
+ for (i = 0; i < 64; i++) {
+ if (n.branch[i].child!=null && Overlap(r, n.branch[i].rect)) {
+ llp = RTreeLeafListAdd(llp, /*(Leaf_t *)*/ n.branch[i]);
+ }
+ }
+ }
+ return llp;
+} finally {
+LEAVING("aa69m7d7qc06m8id896e60lkg","RTreeSearch");
+}
+}
+
//}
//
///* Insert a data rectangle into an index structure.
@@ -250,106 +299,107 @@ public static _Node_t___ RTreeNewIndex(RTree rtp) {
//3 3wss9r0zgt5k06j8ovjv7hq0d
// int RTreeInsert(RTree_t * rtp, Rect_t * r, void *data, Node_t ** n, int level)
-public static Object RTreeInsert(Object... arg) {
-UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int
-UNSUPPORTED("4vefy88zis2pcgmerh9m6nllk"); // RTreeInsert(RTree_t * rtp, Rect_t * r, void *data, Node_t ** n, int level)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("8ey3knwkpac8aeth9v8pxu3jo"); // /* RTreeInsert(RTree_t*rtp, Rect_t*r, int data, Node_t**n, int level) { */
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("bp3fw6x5k0c1muih5wl2fmk9n"); // register Node_t *newroot;
-UNSUPPORTED("k2d14nu7r2g4yefydufxqa6l"); // Node_t *newnode=0;
-UNSUPPORTED("8jhu5fyksz5wgdvvak4rqzjog"); // Branch_t b;
-UNSUPPORTED("1dfkfq72ilaevpylx2giyequh"); // int result = 0;
-UNSUPPORTED("3lp95fcfxfbsb08w5umj6mjxb"); // assert(r && n);
-UNSUPPORTED("jakzrkbz09r9gvlx5yfqsq4t"); // assert(level >= 0 && level <= (*n)->level);
-UNSUPPORTED("1acecsj25mg52d6624llst9la"); // for (i = 0; i < 2; i++)
-UNSUPPORTED("au1dzglobtl3y92py1o59k29w"); // assert(r->boundary[i] <= r->boundary[2 + i]);
-UNSUPPORTED("21ol6vbghnu1ewovfs645sts7"); // if (rtp->StatFlag) {
+public static int RTreeInsert(ST_RTree rtp, ST_Rect_t r, __ptr__ data, ST_Node_t___ n[], int level) {
+ENTERING("3wss9r0zgt5k06j8ovjv7hq0d","RTreeInsert");
+try {
+ int i;
+ ST_Node_t___ newroot;
+ ST_Node_t___ newnode[] = new ST_Node_t___[1];
+ final ST_Branch_t b = new ST_Branch_t();
+ int result = 0;
+// assert(r && n);
+// assert(level >= 0 && level <= (*n)->level);
+// for (i = 0; i < 2; i++)
+// assert(r->boundary[i] <= r->boundary[2 + i]);
+if (rtp.StatFlag!=0) {
UNSUPPORTED("akhni40ndam0u9c6i7raxw4mp"); // if (rtp->Deleting)
UNSUPPORTED("bzb1oqc35evr96528iv16glb0"); // rtp->ReInsertCount++;
UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
UNSUPPORTED("3kxquse3qg2crme5dzybg9jxe"); // rtp->InsertCount++;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("872g4yc6sa8rtep8wdqiys74d"); // if (!rtp->Deleting)
-UNSUPPORTED("4kv2cwozm6o06e73mjdidn17p"); // rtp->RectCount++;
-UNSUPPORTED("p721o575619ujgj5774sswe4"); // if (RTreeInsert2(rtp, r, data, *n, &newnode, level)) { /* root was split */
-UNSUPPORTED("dhd7sfbis7klukcyf8rg2skvp"); // if (rtp->StatFlag) {
+}
+ if (N(rtp.Deleting))
+ rtp.setInt("RectCount", rtp.RectCount+1);
+ if (RTreeInsert2(rtp, r, data, n[0], newnode, level)!=0) { /* root was split */
+ if (rtp.StatFlag!=0) {
UNSUPPORTED("2y8kv6b3ysrr61q7tqn76rhhc"); // if (rtp->Deleting)
UNSUPPORTED("dn4oynmx9ugizzs5pkxiyptbi"); // rtp->DeTouchCount++;
UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else
UNSUPPORTED("2u8wpa4w1q7rg14t07bny6p8i"); // rtp->InTouchCount++;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("f1ubx3a7wizvjmsawzdn97nwy"); // newroot = RTreeNewNode(rtp); /* grow a new root, make tree taller */
-UNSUPPORTED("cb1h5p8jnxwwzvaoyg1k27xmf"); // rtp->NonLeafCount++;
-UNSUPPORTED("1611m4hdihz2ns6tzb00du4f"); // newroot->level = (*n)->level + 1;
-UNSUPPORTED("7abewx8c16vuk9ksc6dh0co53"); // b.rect = NodeCover(*n);
-UNSUPPORTED("465b8w8j2mnvocx78bsxgs0si"); // b.child = *n;
-UNSUPPORTED("8lf6tafgpibucjtrng2bzhqt"); // AddBranch(rtp, &b, newroot, (void *)0);
-UNSUPPORTED("5ncet5h2bsh7p0gqx0zcjk8zs"); // b.rect = NodeCover(newnode);
-UNSUPPORTED("2iec9n0l9utuq5wm6188trocr"); // b.child = newnode;
-UNSUPPORTED("8lf6tafgpibucjtrng2bzhqt"); // AddBranch(rtp, &b, newroot, (void *)0);
-UNSUPPORTED("9kv07evealck0kkd4uos4gkz"); // *n = newroot;
-UNSUPPORTED("6s4qssw97iu3cy7cu2z00dnd"); // // rtp->root = newroot;
-UNSUPPORTED("5iff078lko2zs9b2cm7erd5kj"); // rtp->EntryCount += 2;
-UNSUPPORTED("akq58xm5u8sg03eunssjzl44f"); // result = 1;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("e73y2609z2557xahrcvzmcb8e"); // return result;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ }
+ newroot = RTreeNewNode(rtp); /* grow a new root, make tree taller */
+ rtp.setInt("NonLeafCount", rtp.NonLeafCount+1);
+ newroot.setInt("level", n[0].level + 1);
+ b.setStruct("rect", NodeCover(n[0]));
+ b.child = n[0];
+ AddBranch(rtp, b, newroot, null);
+ b.setStruct("rect", NodeCover(newnode[0]));
+ b.child = newnode[0];
+ AddBranch(rtp, b, newroot, null);
+ n[0] = newroot;
+ // rtp->root = newroot;
+ rtp.setInt("EntryCount", rtp.EntryCount + 2);
+ result = 1;
+ }
+ return result;
+} finally {
+LEAVING("3wss9r0zgt5k06j8ovjv7hq0d","RTreeInsert");
+}
}
+// public static int RTreeInsert(ST_RTree rtp, ST_Rect_t r, __ptr__ data, ST_Node_t___ n[], int level) {
//3 bsc9m7d7qc06m8id896e60lkg
// static int RTreeInsert2(RTree_t * rtp, Rect_t * r, void *data, Node_t * n, Node_t ** new, int level)
-public static Object RTreeInsert2(Object... arg) {
-UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
-UNSUPPORTED("e1c7cm1mq875co9obwzzyyxt"); // RTreeInsert2(RTree_t * rtp, Rect_t * r, void *data,
-UNSUPPORTED("4errdslfbv5x54v81wpgk55l7"); // Node_t * n, Node_t ** new, int level)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("d5termnm5bwrhia82rw6jvi00"); // /*static int */
-UNSUPPORTED("12ickqloxyobilus63e3bdi65"); // /* RTreeInsert2(RTree_t*rtp, Rect_t*r,
-UNSUPPORTED("e27l28tilpvjc3y9m1iz6c51k"); // int data, Node_t*n, Node_t**new, int level) {
-UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */
-UNSUPPORTED("6crctkpvpno5y1bsv7yuqjnm2"); // register int i=0;
-UNSUPPORTED("8jhu5fyksz5wgdvvak4rqzjog"); // Branch_t b;
-UNSUPPORTED("4dqkrcduvdmv3d5fgv1enjacs"); // Node_t *n2=0;
-UNSUPPORTED("bsrr9pvjfr4ki5il3quxx4rqg"); // assert(r && n && new);
-UNSUPPORTED("5xudi4txe3k13af1mbe43tgbn"); // assert(level >= 0 && level <= n->level);
-UNSUPPORTED("21ol6vbghnu1ewovfs645sts7"); // if (rtp->StatFlag) {
+public static int RTreeInsert2(ST_RTree rtp, ST_Rect_t r, __ptr__ data, ST_Node_t___ n, ST_Node_t___ new_[], int level) {
+ENTERING("bsc9m7d7qc06m8id896e60lkg","RTreeInsert2");
+try {
+ /*static int */
+ /* RTreeInsert2(RTree_t*rtp, Rect_t*r,
+ int data, Node_t*n, Node_t**new, int level) {
+ */
+ int i=0;
+ final ST_Branch_t b = new ST_Branch_t();
+ ST_Node_t___ n2[]=new ST_Node_t___[1];
+// assert(r && n && new);
+// assert(level >= 0 && level <= n->level);
+ if (rtp.StatFlag!=0) {
UNSUPPORTED("akhni40ndam0u9c6i7raxw4mp"); // if (rtp->Deleting)
UNSUPPORTED("8k1kgaoa4b2mcye1xthc3f1kf"); // rtp->DeTouchCount++;
UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
UNSUPPORTED("1um729vqiy3529kbsrzyl9u3y"); // rtp->InTouchCount++;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("6bsiysfcc9wix18ej9zs9z659"); // /* Still above level for insertion, go down tree recursively */
-UNSUPPORTED("4hz5jfabrdewpogbs7ahesjld"); // if (n->level > level) {
-UNSUPPORTED("2sz071aqfm5owiilsfyuw76rn"); // i = PickBranch(r, n);
-UNSUPPORTED("9qcjfckv31n1pds6m7zevi25p"); // if (!RTreeInsert2(rtp, r, data, n->branch[i].child, &n2, level)) { /* recurse: child was not split */
-UNSUPPORTED("8yht6usxlnq2ubp9xeqjz71o"); // n->branch[i].rect = CombineRect(r, &(n->branch[i].rect));
-UNSUPPORTED("6f1138i13x0xz1bf1thxgjgka"); // return 0;
-UNSUPPORTED("99yufmtztzeyeo68jo3yftbcf"); // } else { /* child was split */
+ }
+/* Still above level for insertion, go down tree recursively */
+ if (n.level > level) {
+ i = PickBranch(r, n);
+ if (N(RTreeInsert2(rtp, r, data, (ST_Node_t___) n.branch[i].child, n2, level))) {
+/* recurse: child was not split */
+ n.branch[i].setStruct("rect",
+ CombineRect((ST_Rect_t)r, (ST_Rect_t) n.branch[i].rect));
+ return 0;
+ } else { /* child was split */
UNSUPPORTED("7evrfdq7uc1smqislqm9d82l6"); // n->branch[i].rect = NodeCover(n->branch[i].child);
UNSUPPORTED("echuth2qnq0o4n5gkzgtu5bgs"); // b.child = n2;
UNSUPPORTED("50z4r9qcomgi4o7vvwq0v0xs"); // b.rect = NodeCover(n2);
UNSUPPORTED("451qw2ioqybj69k9abzvqw4mk"); // rtp->EntryCount++;
UNSUPPORTED("9uz11nbvh6yp6yq2axvo7e0fb"); // return AddBranch(rtp, &b, n, new);
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("3uu0fkl3xw648hn9rehmuq54y"); // } else if (n->level == level) { /* at level for insertion. */
-UNSUPPORTED("cwtg3er5fpt2rr0k2efjapdmq"); // /*Add rect, split if necessary */
-UNSUPPORTED("1xql4kr4r981y1whzdo5zavad"); // b.rect = *r;
-UNSUPPORTED("7w1b5nw2bj3zmo70m9bczwwov"); // b.child = (Node_t *) data;
-UNSUPPORTED("7476ssw2oyxxzrqtz24g9cecp"); // rtp->EntryCount++;
-UNSUPPORTED("8gejxq93li6nilezate9nd078"); // return AddBranch(rtp, &b, n, new);
-UNSUPPORTED("an9bctf9o42m97fmlr7tb3xd5"); // } else { /* Not supposed to happen */
+ }
+ } else if (n.level == level) { /* at level for insertion. */
+ /*Add rect, split if necessary */
+ b.rect.___(r);
+ b.child = /*(Node_t *)*/(ST_Node_t___or_object_t) data; // THIS CAST IS A BIG ISSUE
+// UNSUPPORTED("7w1b5nw2bj3zmo70m9bczwwov"); // b.child = (Node_t *) data;
+ rtp.setInt("EntryCount", rtp.EntryCount+1);
+ return AddBranch(rtp, b, n, new_);
+ } else { /* Not supposed to happen */
UNSUPPORTED("22oqraxnqrjall7fj6pooexmi"); // assert((0));
UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
+ }
throw new UnsupportedOperationException();
+} finally {
+LEAVING("bsc9m7d7qc06m8id896e60lkg","RTreeInsert2");
+}
}
diff --git a/src/gen/lib/label/node__c.java b/src/gen/lib/label/node__c.java
index e6e26b3..4eaac1c 100644
--- a/src/gen/lib/label/node__c.java
+++ b/src/gen/lib/label/node__c.java
@@ -44,25 +44,34 @@
*
*/
package gen.lib.label;
+import static gen.lib.label.rectangle__c.CombineRect;
+import static gen.lib.label.rectangle__c.InitRect;
+import static gen.lib.label.rectangle__c.RectArea;
+import static gen.lib.label.split_q__c.SplitNode;
+import static smetana.core.JUtilsDebug.ENTERING;
+import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.RTree;
-import h._Node_t___;
-import smetana.core.Memory;
+import h.ST_Branch_t;
+import h.ST_Node_t___;
+import h.ST_RTree;
+import h.ST_Rect_t;
public class node__c {
//3 9uj7ni1m6q6drtoh56w82d6m4
// Node_t *RTreeNewNode(RTree_t * rtp)
-public static _Node_t___ RTreeNewNode(RTree rtp) {
- _Node_t___ n;
- rtp.setInt("NodeCount", rtp.getInt("NodeCount") + 1);
- n = (_Node_t___) Memory.malloc(_Node_t___.class);
-UNSUPPORTED("a4ey5uckjqallol1ktyqe35bv"); // InitNode(n);
-UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_Node_t___ RTreeNewNode(ST_RTree rtp) {
+ENTERING("9uj7ni1m6q6drtoh56w82d6m4","RTreeNewNode");
+try {
+ ST_Node_t___ n;
+ rtp.setInt("NodeCount", rtp.NodeCount + 1);
+ n = new ST_Node_t___();
+ InitNode(n);
+ return n;
+} finally {
+LEAVING("9uj7ni1m6q6drtoh56w82d6m4","RTreeNewNode");
+}
}
@@ -89,17 +98,18 @@ throw new UnsupportedOperationException();
//3 4qk9wkm05q2pwf20ud6g2tufg
// void InitNode(Node_t * n)
-public static Object InitNode(Object... arg) {
-UNSUPPORTED("dlpky13v9fa11z9uukagldaj1"); // void InitNode(Node_t * n)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("7rbjc9psqd4hoib2lezl7pnh"); // n->count = 0;
-UNSUPPORTED("55ukro5lb2mre4owzaww8q2hc"); // n->level = -1;
-UNSUPPORTED("8v5nz5apd36odx9nwrk8p8jow"); // for (i = 0; i < 64; i++)
-UNSUPPORTED("80i9o3c1pvhadp8xg5nka4k0z"); // InitBranch(&(n->branch[i]));
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void InitNode(ST_Node_t___ n) {
+ENTERING("4qk9wkm05q2pwf20ud6g2tufg","InitNode");
+try {
+ int i;
+ n.setInt("count", 0);
+ n.setInt("level", -1);
+ for (i = 0; i < 64; i++)
+ InitBranch(n.branch[i]);
+ // InitBranch(&(n->branch[i]));
+} finally {
+LEAVING("4qk9wkm05q2pwf20ud6g2tufg","InitNode");
+}
}
@@ -107,14 +117,14 @@ throw new UnsupportedOperationException();
//3 ruhxixxei7au9z1iaj0zggwo
// void InitBranch(Branch_t * b)
-public static Object InitBranch(Object... arg) {
-UNSUPPORTED("2ds4g44o2u9jlcjegxiplx78k"); // void InitBranch(Branch_t * b)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("7tixqnx33892tw39ys6j048c9"); // InitRect(&(b->rect));
-UNSUPPORTED("6rffpszutr9tr32hwasnosx1l"); // b->child = NULL;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void InitBranch(ST_Branch_t b) {
+ENTERING("ruhxixxei7au9z1iaj0zggwo","InitBranch");
+try {
+ InitRect(b.rect);
+ b.child = null;
+} finally {
+LEAVING("ruhxixxei7au9z1iaj0zggwo","InitBranch");
+}
}
@@ -122,26 +132,26 @@ throw new UnsupportedOperationException();
//3 42vjqe8n5yeq2jjby00xzrotk
// Rect_t NodeCover(Node_t * n)
-public static Object NodeCover(Object... arg) {
-UNSUPPORTED("2khwamjri7uz3vu8fhl4bz8yr"); // Rect_t NodeCover(Node_t * n)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("e4wfnyowhq6r7cll9ebbr5pcr"); // register int i, flag;
-UNSUPPORTED("9jotn4njsd13qx406m9otorg4"); // Rect_t r;
-UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n);
-UNSUPPORTED("7t0m2a3824uy7f5r4wu3p2no9"); // InitRect(&r);
-UNSUPPORTED("e0yg2emzy8u4jgn9z7jdfpziq"); // flag = 1;
-UNSUPPORTED("8v5nz5apd36odx9nwrk8p8jow"); // for (i = 0; i < 64; i++)
-UNSUPPORTED("1ro7ykl3rxfkkcyghzozikkfc"); // if (n->branch[i].child) {
-UNSUPPORTED("ycid67impnxkwa9mvvkvdu0q"); // if (flag) {
-UNSUPPORTED("ektombc80083wiu0lsj6kto83"); // r = n->branch[i].rect;
-UNSUPPORTED("6bejndin7u1ns7xicz114gqtn"); // flag = 0;
-UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else
-UNSUPPORTED("31n3s0xk5l7s3rhi9xeraiklo"); // r = CombineRect(&r, &(n->branch[i].rect));
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_Rect_t NodeCover(ST_Node_t___ n) {
+ENTERING("42vjqe8n5yeq2jjby00xzrotk","NodeCover");
+try {
+ int i, flag;
+ final ST_Rect_t r = new ST_Rect_t();
+ // assert(n);
+ InitRect(r);
+ flag = 1;
+ for (i = 0; i < 64; i++)
+ if (n.branch[i].child!=null) {
+ if (flag!=0) {
+ r.___(n.branch[i].rect);
+ flag = 0;
+ } else
+ r.___(CombineRect(r, (ST_Rect_t) n.branch[i].rect));
+ }
+ return r;
+} finally {
+LEAVING("42vjqe8n5yeq2jjby00xzrotk","NodeCover");
+}
}
@@ -149,37 +159,37 @@ throw new UnsupportedOperationException();
//3 bek56v2skz6jfvw4uggy2h5w3
// int PickBranch(Rect_t * r, Node_t * n)
-public static Object PickBranch(Object... arg) {
-UNSUPPORTED("efxc8619milx7pkmu113b8cl0"); // int PickBranch(Rect_t * r, Node_t * n)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("4rx3my7ninlw252mkhq0t72v7"); // register Rect_t *rr=0;
-UNSUPPORTED("cu5ueogqdqm7ym79nlop077f9"); // register int i=0, flag=1, increase=0, bestIncr=0, area=0, bestArea=0;
-UNSUPPORTED("b5pkdhy36omd5ubfol2jsyr2z"); // int best=0;
-UNSUPPORTED("3lp95fcfxfbsb08w5umj6mjxb"); // assert(r && n);
-UNSUPPORTED("82kuymnzv3rubrwutx9bcz4xs"); // for (i = 0; i < 64; i++) {
-UNSUPPORTED("1ro7ykl3rxfkkcyghzozikkfc"); // if (n->branch[i].child) {
-UNSUPPORTED("4wt347mvef1i2kr5h5z9l0g8i"); // Rect_t rect;
-UNSUPPORTED("ak8qz4z2mipw1i6img1tvc3hk"); // rr = &n->branch[i].rect;
-UNSUPPORTED("d4pnse7tksvywt9f6rcaluv8e"); // area = RectArea(rr);
-UNSUPPORTED("4wsrjtivlov1p70rt8tn4dt9v"); // /* increase = RectArea(&CombineRect(r, rr)) - area; */
-UNSUPPORTED("8b9or9d0f959zrx6zrd0o9noj"); // rect = CombineRect(r, rr);
-UNSUPPORTED("a1p1sz58nzxnj53fxzzkut6cm"); // increase = RectArea(&rect) - area;
-UNSUPPORTED("6k6tiifs973t6iordeclfqygk"); // if (increase < bestIncr || flag) {
-UNSUPPORTED("93dpfupbht4p3y9bsui3n8km4"); // best = i;
-UNSUPPORTED("apb6b50as71d87ge91yfjwr33"); // bestArea = area;
-UNSUPPORTED("45tyhbogdetuq767acgw0cvyg"); // bestIncr = increase;
-UNSUPPORTED("6bejndin7u1ns7xicz114gqtn"); // flag = 0;
-UNSUPPORTED("1wqm4msrcepk5ixg5ab8polj7"); // } else if (increase == bestIncr && area < bestArea) {
-UNSUPPORTED("93dpfupbht4p3y9bsui3n8km4"); // best = i;
-UNSUPPORTED("apb6b50as71d87ge91yfjwr33"); // bestArea = area;
-UNSUPPORTED("45tyhbogdetuq767acgw0cvyg"); // bestIncr = increase;
-UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("3kkxvbiqcsdmtjhhw3b2jcqcy"); // return best;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int PickBranch(ST_Rect_t r, ST_Node_t___ n) {
+ ENTERING("bek56v2skz6jfvw4uggy2h5w3","PickBranch");
+ try {
+ ST_Rect_t rr=null;
+ int i=0, flag=1, increase=0, bestIncr=0, area=0, bestArea=0;
+ int best=0;
+// assert(r && n);
+ for (i = 0; i < 64; i++) {
+ if (n.branch[i].child!=null) {
+ final ST_Rect_t rect = new ST_Rect_t();
+ rr = (ST_Rect_t) n.branch[i].rect;
+ area = RectArea((ST_Rect_t) rr);
+ /* increase = RectArea(&CombineRect(r, rr)) - area; */
+ rect.___(CombineRect((ST_Rect_t) r, rr));
+ increase = RectArea((ST_Rect_t) rect) - area;
+ if (increase < bestIncr || flag!=0) {
+ best = i;
+ bestArea = area;
+ bestIncr = increase;
+ flag = 0;
+ } else if (increase == bestIncr && area < bestArea) {
+ best = i;
+ bestArea = area;
+ bestIncr = increase;
+ }
+ }
+ }
+ return best;
+} finally {
+LEAVING("bek56v2skz6jfvw4uggy2h5w3","PickBranch");
+}
}
@@ -187,40 +197,40 @@ throw new UnsupportedOperationException();
//3 2njctcrpeff95ysmv9ji34x4s
// int AddBranch(RTree_t * rtp, Branch_t * b, Node_t * n, Node_t ** new)
-public static Object AddBranch(Object... arg) {
-UNSUPPORTED("abswgz0jexhhyl0we1x68i5gl"); // int AddBranch(RTree_t * rtp, Branch_t * b, Node_t * n, Node_t ** new)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("5xtwc50ov4mxby7k6gahwv12t"); // assert(b);
-UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n);
-UNSUPPORTED("8irlja6ar7hjh8mel91hltz17"); // if (n->count < 64) { /* split won't be necessary */
-UNSUPPORTED("8vlryher8oaw4h715yfzs4h0"); // for (i = 0; i < 64; i++) { /* find empty branch */
-UNSUPPORTED("3eaeba8b8yt8gq9074wtep0e0"); // if (n->branch[i].child == NULL) {
-UNSUPPORTED("9newc1m7r062crcakg2dn00kp"); // n->branch[i] = *b;
-UNSUPPORTED("b4orzj362grzvud5mj73w1cb1"); // n->count++;
-UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break;
-UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("2gjzrafpfll8afj90mhedcnnq"); // assert(i < 64);
-UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
-UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else {
-UNSUPPORTED("dhd7sfbis7klukcyf8rg2skvp"); // if (rtp->StatFlag) {
+public static int AddBranch(ST_RTree rtp, ST_Branch_t b, ST_Node_t___ n, ST_Node_t___ new_[]) {
+ENTERING("2njctcrpeff95ysmv9ji34x4s","AddBranch");
+try {
+ int i;
+// assert(b);
+// assert(n);
+ if (n.count < 64) { /* split won't be necessary */
+ for (i = 0; i < 64; i++) { /* find empty branch */
+ if (n.branch[i].child == null) {
+ n.branch[i].___(b.getStruct());
+ n.setInt("count", n.count+1);
+ break;
+ }
+}
+// assert(i < 64);
+ return 0;
+ } else {
+ if (rtp.StatFlag!=0) {
UNSUPPORTED("2y8kv6b3ysrr61q7tqn76rhhc"); // if (rtp->Deleting)
UNSUPPORTED("dn4oynmx9ugizzs5pkxiyptbi"); // rtp->DeTouchCount++;
UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else
UNSUPPORTED("2u8wpa4w1q7rg14t07bny6p8i"); // rtp->InTouchCount++;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("chipmsvc1hum7sbmvzrfmewz6"); // assert(new);
-UNSUPPORTED("91mdffv90jr6ypnu3u1bmc972"); // SplitNode(rtp, n, b, new);
-UNSUPPORTED("1t8cl7q3utcr23gvhtgc1cp0u"); // if (n->level == 0)
-UNSUPPORTED("b2cc70cq7gpras4l3rbz241at"); // rtp->LeafCount++;
-UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
+ }
+// assert(new);
+ SplitNode(rtp, n, b, new_);
+ if (n.level == 0)
+ rtp.setInt("LeafCount", rtp.LeafCount+1);
+ else
UNSUPPORTED("6tkfiebspy7ecivrzb3l5y7jd"); // rtp->NonLeafCount++;
-UNSUPPORTED("eleqpc2p2r3hvma6tipoy7tr"); // return 1;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ return 1;
+ }
+} finally {
+LEAVING("2njctcrpeff95ysmv9ji34x4s","AddBranch");
+}
}
@@ -228,16 +238,16 @@ throw new UnsupportedOperationException();
//3 eqzamflj58f43cflwns9cemnk
// void DisconBranch(Node_t * n, int i)
-public static Object DisconBranch(Object... arg) {
-UNSUPPORTED("1gbs5xw4y9htfbc5suxq1rdm4"); // void DisconBranch(Node_t * n, int i)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("ays33wicr9a5qwu2dr9g8t1h2"); // assert(n && i >= 0 && i < 64);
-UNSUPPORTED("29zl8z52z6bh8yxdkmezbs82l"); // assert(n->branch[i].child);
-UNSUPPORTED("3rvakcl9f71ez4zya83f1vvgx"); // InitBranch(&(n->branch[i]));
-UNSUPPORTED("4a3m9b5jmmhd18oa8nzovalys"); // n->count--;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void DisconBranch(ST_Node_t___ n, int i) {
+ENTERING("eqzamflj58f43cflwns9cemnk","DisconBranch");
+try {
+// assert(n && i >= 0 && i < 64);
+// assert(n->branch[i].child);
+ InitBranch(n.branch[i]);
+ n.setInt("count", n.count-1);
+} finally {
+LEAVING("eqzamflj58f43cflwns9cemnk","DisconBranch");
+}
}
diff --git a/src/gen/lib/label/nrtmain__c.java b/src/gen/lib/label/nrtmain__c.java
index 8cd4559..6447fc2 100644
--- a/src/gen/lib/label/nrtmain__c.java
+++ b/src/gen/lib/label/nrtmain__c.java
@@ -47,9 +47,7 @@ package gen.lib.label;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class nrtmain__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -164,14 +162,14 @@ public class nrtmain__c {
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
diff --git a/src/gen/lib/label/rectangle__c.java b/src/gen/lib/label/rectangle__c.java
index 981e15f..5a6e5a8 100644
--- a/src/gen/lib/label/rectangle__c.java
+++ b/src/gen/lib/label/rectangle__c.java
@@ -44,7 +44,11 @@
*
*/
package gen.lib.label;
+import static smetana.core.JUtilsDebug.ENTERING;
+import static smetana.core.JUtilsDebug.LEAVING;
+import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
+import h.ST_Rect_t;
public class rectangle__c {
//1 9k44uhd5foylaeoekf3llonjq
@@ -147,15 +151,15 @@ public class rectangle__c {
//3 1wtvfzwbzj03e6w5rw4k7qdax
// void InitRect(Rect_t * r)
-public static Object InitRect(Object... arg) {
-UNSUPPORTED("bfynnbut17s29886tfi4hmp71"); // void InitRect(Rect_t * r)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("6v26zqmzay64h92bxd4qt6qgs"); // for (i = 0; i < 2*2; i++)
-UNSUPPORTED("d3uknh6sy0xxecd62dbcemd5p"); // r->boundary[i] = 0;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void InitRect(ST_Rect_t r) {
+ENTERING("1wtvfzwbzj03e6w5rw4k7qdax","InitRect");
+try {
+ int i;
+ for (i = 0; i < 2*2; i++)
+ r.boundary[i]=0;
+} finally {
+LEAVING("1wtvfzwbzj03e6w5rw4k7qdax","InitRect");
+}
}
@@ -163,19 +167,21 @@ throw new UnsupportedOperationException();
//3 bvazxgli5q4yxvzl5kn1vjqpm
// Rect_t NullRect()
-public static Object NullRect(Object... arg) {
-UNSUPPORTED("7bfeg4qbgfa72qeao4zmwznat"); // Rect_t NullRect()
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("9jotn4njsd13qx406m9otorg4"); // Rect_t r;
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("4cmj0swptez35tqafqf86bskl"); // r.boundary[0] = 1;
-UNSUPPORTED("6lzrqh8r1olplqcbtz1n5dow7"); // r.boundary[2] = -1;
-UNSUPPORTED("ol4wmdbmn9kjw3hpmp2gwavz"); // for (i = 1; i < 2; i++)
-UNSUPPORTED("9xr8ijrn07laqlacrzelzczxa"); // r.boundary[i] = r.boundary[i + 2] = 0;
-UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_Rect_t NullRect() {
+ENTERING("bvazxgli5q4yxvzl5kn1vjqpm","NullRect");
+try {
+ ST_Rect_t r = new ST_Rect_t();
+ int i;
+ r.boundary[0]=1;
+ r.boundary[2]=-1;
+ for (i = 1; i < 2; i++) {
+ r.boundary[i]=0;
+ r.boundary[i+2]=0;
+ }
+ return r;
+} finally {
+LEAVING("bvazxgli5q4yxvzl5kn1vjqpm","NullRect");
+}
}
@@ -183,30 +189,30 @@ throw new UnsupportedOperationException();
//3 1ijarur71gcahchxz8vqf69na
// unsigned int RectArea(Rect_t * r)
-public static Object RectArea(Object... arg) {
-UNSUPPORTED("dt9366zeifsgcei4onz0fdt4i"); // unsigned int RectArea(Rect_t * r)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("9cyat6ft4tmgpumn70l9fwydy"); // register int i;
-UNSUPPORTED("eep6ne1fnwvxrzmao6aq2e80t"); // unsigned int area=1, a=1;
-UNSUPPORTED("bxtlpefe142w9pb81aa0gkkcj"); // assert(r);
-UNSUPPORTED("7xe9zz3f2fwhfptig6esqvb1t"); // if (((r)->boundary[0] > (r)->boundary[2])) return 0;
-UNSUPPORTED("9gsgfs2guis9c3c3oi57mxpq2"); // /*
-UNSUPPORTED("asaz8qrby7qugc5m3ylnjg6o7"); // * XXX add overflow checks
-UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */
-UNSUPPORTED("17o3f4aat9tkp17wsngm29nst"); // area = 1;
-UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) {
-UNSUPPORTED("6g0ik6vssf9px33quo2z9ferr"); // unsigned int b = r->boundary[i + 2] - r->boundary[i];
-UNSUPPORTED("7tqqzmxu3tsfxccs53evs54me"); // a *= b;
-UNSUPPORTED("3u7h4981b69nu4w80bhv3s4q"); // if( (a / b ) != area) {
+public static int RectArea(ST_Rect_t r) {
+ENTERING("1ijarur71gcahchxz8vqf69na","RectArea");
+try {
+ int i;
+ int area=1, a=1;
+// assert(r);
+ if (r.boundary[0] > r.boundary[2]) return 0;
+ /*
+ * XXX add overflow checks
+ */
+ area = 1;
+ for (i = 0; i < 2; i++) {
+ int b = r.boundary[i+2] - r.boundary[i];
+ a *= b;
+ if( (a / b ) != area) {
UNSUPPORTED("6qc59bm54jy4hv9gw8a50rk0u"); // agerr (AGERR, "label: area too large for rtree\n");
UNSUPPORTED("awx87c59fwl0w8r64jfd86jrd"); // return UINT_MAX;
-UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // }
-UNSUPPORTED("b34qh5cr4ie1y00nbl91sn2km"); // area = a;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("9ww3ox2wqjgbtsin4e26qgoyx"); // return area;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ }
+ area = a;
+ }
+ return area;
+} finally {
+LEAVING("1ijarur71gcahchxz8vqf69na","RectArea");
+}
}
@@ -214,25 +220,25 @@ throw new UnsupportedOperationException();
//3 tgmhi1wshyhqky2pappb6w6w
// Rect_t CombineRect(Rect_t * r, Rect_t * rr)
-public static Object CombineRect(Object... arg) {
-UNSUPPORTED("18ebi8xfcz225jqpfk5vtp9hf"); // Rect_t CombineRect(Rect_t * r, Rect_t * rr)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("7gcww32g3xx6yjb9m2tgq8f7c"); // register int i, j;
-UNSUPPORTED("ep1c21oj5vdbkci5nklq26u6d"); // Rect_t new;
-UNSUPPORTED("8woqwn01hzllzlrb8an6apviw"); // assert(r && rr);
-UNSUPPORTED("61el74qdlszr9b7htgajgnncw"); // if (((r)->boundary[0] > (r)->boundary[2]))
-UNSUPPORTED("26gbreijuodtzexgobqd73u1p"); // return *rr;
-UNSUPPORTED("9c5jzil5a7hm4bfzytn0e7aww"); // if (((rr)->boundary[0] > (rr)->boundary[2]))
-UNSUPPORTED("h0psmi4ydywx720mvhp33x5g"); // return *r;
-UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) {
-UNSUPPORTED("1p51ro3v4iw4nogctzk3y0bts"); // new.boundary[i] = MIN(r->boundary[i], rr->boundary[i]);
-UNSUPPORTED("2h0ee6s8hk7srb6xqmnfluf52"); // j = i + 2;
-UNSUPPORTED("3cljcok8kw06fphxnu0183g4"); // new.boundary[j] = MAX(r->boundary[j], rr->boundary[j]);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("4b8pgvy3c1dhlanxwmafau4pt"); // return new;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_Rect_t CombineRect(ST_Rect_t r, ST_Rect_t rr) {
+ENTERING("tgmhi1wshyhqky2pappb6w6w","CombineRect");
+try {
+ int i, j;
+ ST_Rect_t new_ = new ST_Rect_t();
+ // assert(r && rr);
+ if (r.boundary[0] > r.boundary[2])
+ return (ST_Rect_t) rr.copy();
+ if (rr.boundary[0] > rr.boundary[2])
+ return (ST_Rect_t) r.copy();
+ for (i = 0; i < 2; i++) {
+ new_.boundary[i] = Math.min(r.boundary[i], rr.boundary[i]);
+ j = i + 2;
+ new_.boundary[j] = Math.max(r.boundary[j], rr.boundary[j]);
+ }
+ return new_;
+} finally {
+LEAVING("tgmhi1wshyhqky2pappb6w6w","CombineRect");
+}
}
@@ -240,21 +246,21 @@ throw new UnsupportedOperationException();
//3 9glce34jzknoqj98agg96k03o
// int Overlap(Rect_t * r, Rect_t * s)
-public static Object Overlap(Object... arg) {
-UNSUPPORTED("75f545jos6v3su84hbt728wxr"); // int Overlap(Rect_t * r, Rect_t * s)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("7gcww32g3xx6yjb9m2tgq8f7c"); // register int i, j;
-UNSUPPORTED("3ilt6jfw7dcaebocva6xawiui"); // assert(r && s);
-UNSUPPORTED("6xp61z8h2baoxnlm757q289e3"); // for (i = 0; i < 2; i++) {
-UNSUPPORTED("71gqfx1xze9ccjzy9ids9x8cj"); // j = i + 2; /* index for high sides */
-UNSUPPORTED("b41yx5qm8jqsnyojyaztg6wy1"); // if (r->boundary[i] > s->boundary[j]
-UNSUPPORTED("cjb3lqf10yggej4b0uh9acc72"); // || s->boundary[i] > r->boundary[j])
-UNSUPPORTED("8tnlb2txucdutal7665h0v68g"); // return (0);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("4si0cf97a5sfd9ozuunds9goz"); // return (!(0));
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static boolean Overlap(ST_Rect_t r, ST_Rect_t s) {
+ENTERING("9glce34jzknoqj98agg96k03o","Overlap");
+try {
+ int i, j;
+// assert(r && s);
+ for (i = 0; i < 2; i++) {
+ j = i + 2; /* index for high sides */
+ if (r.boundary[i] > s.boundary[j]
+ || s.boundary[i] > r.boundary[j])
+ return false;
+ }
+ return (N(0));
+} finally {
+LEAVING("9glce34jzknoqj98agg96k03o","Overlap");
+}
}
diff --git a/src/gen/lib/label/split_q__c.java b/src/gen/lib/label/split_q__c.java
index 4e5b014..30f37cb 100644
--- a/src/gen/lib/label/split_q__c.java
+++ b/src/gen/lib/label/split_q__c.java
@@ -44,45 +44,61 @@
*
*/
package gen.lib.label;
+import static gen.lib.label.node__c.AddBranch;
+import static gen.lib.label.node__c.InitNode;
+import static gen.lib.label.node__c.RTreeNewNode;
+import static gen.lib.label.rectangle__c.CombineRect;
+import static gen.lib.label.rectangle__c.NullRect;
+import static gen.lib.label.rectangle__c.RectArea;
+import static smetana.core.JUtilsDebug.ENTERING;
+import static smetana.core.JUtilsDebug.LEAVING;
+import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
+import h.Branch_t;
+import h.ST_Branch_t;
+import h.ST_Node_t___;
+import h.ST_PartitionVars;
+import h.ST_RTree;
+import h.ST_Rect_t;
public class split_q__c {
//3 6vl3snxd6k95gamfkwfsfdguc
// void SplitNode(RTree_t * rtp, Node_t * n, Branch_t * b, Node_t ** nn)
-public static Object SplitNode(Object... arg) {
-UNSUPPORTED("78ce6yisssjvu8419g3hps65l"); // void SplitNode(RTree_t * rtp, Node_t * n, Branch_t * b, Node_t ** nn)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("ajyfxc076ll1tzroielljxa4s"); // register struct PartitionVars *p;
-UNSUPPORTED("8jufm5xh68khkqy7z1kcdmesw"); // register int level;
-UNSUPPORTED("7bskhxl3c4vhiobuvlm02c79c"); // int area;
-UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n);
-UNSUPPORTED("5xtwc50ov4mxby7k6gahwv12t"); // assert(b);
-UNSUPPORTED("21ol6vbghnu1ewovfs645sts7"); // if (rtp->StatFlag) {
+public static void SplitNode(ST_RTree rtp, ST_Node_t___ n, ST_Branch_t b, ST_Node_t___ nn[]) {
+ENTERING("6vl3snxd6k95gamfkwfsfdguc","SplitNode");
+try {
+ ST_PartitionVars p;
+ int level;
+ int area;
+// assert(n);
+// assert(b);
+ if (rtp.StatFlag!=0) {
UNSUPPORTED("akhni40ndam0u9c6i7raxw4mp"); // if (rtp->Deleting)
UNSUPPORTED("4g80zdlbvunm838x8g3ic9tex"); // rtp->DeSplitCount++;
UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
UNSUPPORTED("2cjo6wz1rmxfm5k7u7rw5dqpj"); // rtp->InSplitCount++;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("8396srmzb1jm8lij0ngslpcrf"); // /* load all the branches into a buffer, initialize old node */
-UNSUPPORTED("21fuexra37tdi6sx7rtjdg1nj"); // level = n->level;
-UNSUPPORTED("bqz4krdoll1zhnuqj6zgotbcu"); // GetBranches(rtp, n, b);
-UNSUPPORTED("hdjjn3pouo1k1eq8y4x0nmxs"); // /* find partition */
-UNSUPPORTED("prf503ssj57ewtg2w9ypvt6"); // p = &rtp->split.Partitions[0];
-UNSUPPORTED("e5s838qmpxfzesnb90fmga2th"); // MethodZero(rtp);
-UNSUPPORTED("e2qxl0u7yon3spy2kr56ah1lx"); // area = RectArea(&p->cover[0]) + RectArea(&p->cover[1]);
-UNSUPPORTED("bqvd9kyv5qlcddypjudg6lwpl"); // /* record how good the split was for statistics */
-UNSUPPORTED("9isnpzrwseyh76rz7fawgkdyw"); // if (rtp->StatFlag && !rtp->Deleting && area)
+ }
+ /* load all the branches into a buffer, initialize old node */
+ level = n.level;
+ GetBranches(rtp, n, b);
+ /* find partition */
+ p = rtp.split.Partitions[0];
+ MethodZero(rtp);
+ area = RectArea((ST_Rect_t)p.cover[0]) + RectArea((ST_Rect_t)p.cover[1]);
+ /* record how good the split was for statistics */
+ if (rtp.StatFlag!=0 && N(rtp.Deleting) && area!=0)
UNSUPPORTED("z7xk6s3hzi3qcoiq2exj9hpv"); // rtp->SplitMeritSum += (float) rtp->split.CoverSplitArea / area;
-UNSUPPORTED("dytz8fm640zs5ercfjtork8u2"); // /* put branches from buffer into 2 nodes according to chosen partition */
-UNSUPPORTED("3vka4yfkd2kilsogvopxmh6ry"); // *nn = RTreeNewNode(rtp);
-UNSUPPORTED("3wybhajryp9yjj3lxvzuiv7p9"); // (*nn)->level = n->level = level;
-UNSUPPORTED("izrbnvm6p45dy2xfr3265jdf"); // LoadNodes(rtp, n, *nn, p);
-UNSUPPORTED("e0lxlkm80cy0577wy8jdxbhq9"); // assert(n->count + (*nn)->count == 64 + 1);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ /* put branches from buffer into 2 nodes according to chosen partition */
+ nn[0] = RTreeNewNode(rtp);
+ n.setInt("level", level);
+ nn[0].setInt("level", level);
+ LoadNodes(rtp, n, nn[0], p);
+// assert(n->count + (*nn)->count == 64 + 1);
+} finally {
+LEAVING("6vl3snxd6k95gamfkwfsfdguc","SplitNode");
+}
}
@@ -90,29 +106,30 @@ throw new UnsupportedOperationException();
//3 al7lyin008m7kvrvuxhcuvn61
// static void GetBranches(RTree_t * rtp, Node_t * n, Branch_t * b)
-public static Object GetBranches(Object... arg) {
-UNSUPPORTED("378qaodt9k6ytly4svwl41z9w"); // static void GetBranches(RTree_t * rtp, Node_t * n, Branch_t * b)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n);
-UNSUPPORTED("5xtwc50ov4mxby7k6gahwv12t"); // assert(b);
-UNSUPPORTED("4oznkldmd6dyb0i9hwec78vcs"); // /* load the branch buffer */
-UNSUPPORTED("82kuymnzv3rubrwutx9bcz4xs"); // for (i = 0; i < 64; i++) {
-UNSUPPORTED("8q6h71l7igid38ccu2eiu2u59"); // assert(n->branch[i].child); /* node should have every entry full */
-UNSUPPORTED("gimqiz18hbjhs9folzw2kmv9"); // rtp->split.BranchBuf[i] = n->branch[i];
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("e53m9mpp58nv3640vo2p82rdv"); // rtp->split.BranchBuf[64] = *b;
-UNSUPPORTED("277onaphbigykl17b8k9ucsw3"); // /* calculate rect containing all in the set */
-UNSUPPORTED("ea4y9kg2yx11whdarwr9up60y"); // rtp->split.CoverSplit = rtp->split.BranchBuf[0].rect;
-UNSUPPORTED("27yzy7ezx5w65cas3232s6j4m"); // for (i = 1; i < 64 + 1; i++) {
-UNSUPPORTED("4qq8r3ecwl603g3xs97658ebu"); // rtp->split.CoverSplit = CombineRect(&rtp->split.CoverSplit,
-UNSUPPORTED("8fgchf6ahna7tcxprht01sodq"); // &rtp->split.BranchBuf[i].rect);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("8kobdqnp7t9xhtshqkemby6us"); // rtp->split.CoverSplitArea = RectArea(&rtp->split.CoverSplit);
-UNSUPPORTED("a4ey5uckjqallol1ktyqe35bv"); // InitNode(n);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void GetBranches(ST_RTree rtp, ST_Node_t___ n, ST_Branch_t b) {
+ENTERING("al7lyin008m7kvrvuxhcuvn61","GetBranches");
+try {
+ int i;
+// assert(n);
+// assert(b);
+ /* load the branch buffer */
+ for (i = 0; i < 64; i++) {
+ // assert(n->branch[i].child); /* node should have every entry full */
+ rtp.split.BranchBuf[i].___(n.branch[i]);
+ }
+ rtp.split.BranchBuf[64].___(b);
+ /* calculate rect containing all in the set */
+ rtp.split.CoverSplit.___(rtp.split.BranchBuf[0].rect);
+ for (i = 1; i < 64 + 1; i++) {
+ rtp.split.setStruct("CoverSplit",
+ CombineRect((ST_Rect_t)rtp.split.CoverSplit,
+ (ST_Rect_t)rtp.split.BranchBuf[i].castTo(ST_Rect_t.class)));
+ }
+ rtp.split.setInt("CoverSplitArea", RectArea((ST_Rect_t)rtp.split.CoverSplit));
+ InitNode(n);
+} finally {
+LEAVING("al7lyin008m7kvrvuxhcuvn61","GetBranches");
+}
}
@@ -120,63 +137,63 @@ throw new UnsupportedOperationException();
//3 4woz5xy4gjlahoj7no3ljxmex
// static void MethodZero(RTree_t * rtp)
-public static Object MethodZero(Object... arg) {
-UNSUPPORTED("4skckzef98x4fz6mws7s1ya15"); // static void MethodZero(RTree_t * rtp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("cdtuwprcw1d3bn91v9sde844l"); // register Rect_t *r;
-UNSUPPORTED("ackphjde797dk6rshtiyv1ydx"); // register int i, growth0, growth1, diff, biggestDiff;
-UNSUPPORTED("5lh1z9jfdefgm50i9fgjjzf8q"); // register int group, chosen, betterGroup;
-UNSUPPORTED("6y4x18eeg7eay10tbawh6myhr"); // InitPVars(rtp);
-UNSUPPORTED("5tz02egfuze5n9nquye65i9lr"); // PickSeeds(rtp);
-UNSUPPORTED("59gdg3tgr5tyx6gkffgutcpn7"); // while (rtp->split.Partitions[0].count[0] +
-UNSUPPORTED("7e0o94342ckw0syu4j0m8vyml"); // rtp->split.Partitions[0].count[1] < 64 + 1 &&
-UNSUPPORTED("3kmgnkrx7ku1nnb7vprgwnfvt"); // rtp->split.Partitions[0].count[0] < 64 + 1 - rtp->MinFill
-UNSUPPORTED("9efzei446ga5t6kd5zstv3mat"); // && rtp->split.Partitions[0].count[1] <
-UNSUPPORTED("cxlhyya4bw33nn0kxhwtgj7ni"); // 64 + 1 - rtp->MinFill) {
-UNSUPPORTED("1e60en5izveud5k83xw9vkxwy"); // biggestDiff = -1;
-UNSUPPORTED("2x1nx9nsne4x3ygmcywl1m3og"); // for (i = 0; i < 64 + 1; i++) {
-UNSUPPORTED("4c65v1kbz8jvl3tmy8gyj66qi"); // if (!rtp->split.Partitions[0].taken[i]) {
-UNSUPPORTED("6qli7mcgtgb1ne6pl33r3okkj"); // Rect_t rect;
-UNSUPPORTED("9tqgad4ybio0vj8j5qgol8sqe"); // r = &rtp->split.BranchBuf[i].rect;
-UNSUPPORTED("9xitbkq1bfy3lqwrboyzd3wk0"); // /* growth0 = RectArea(&CombineRect(r,
-UNSUPPORTED("bqznmsnmx0j2z1sfi1s0rtx0t"); // &rtp->split.Partitions[0].cover[0])) -
-UNSUPPORTED("6tdjjnpjjde476wvn4ez9gy0h"); // rtp->split.Partitions[0].area[0];
-UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */
-UNSUPPORTED("b2awl1bpq2krcq7yjahwzc77s"); // /* growth1 = RectArea(&CombineRect(r,
-UNSUPPORTED("bkjabgaskndtlequuc8ahat39"); // &rtp->split.Partitions[0].cover[1])) -
-UNSUPPORTED("567lkxsqa5bu7d4nibvr4tpe1"); // rtp->split.Partitions[0].area[1];
-UNSUPPORTED("edw1ss2r31mqgsvca2gowi52v"); // */
-UNSUPPORTED("5046nw6shbhk2m5dtt3itg1qf"); // rect = CombineRect(r, &rtp->split.Partitions[0].cover[0]);
-UNSUPPORTED("nc6om9tl3e7nixzkvrf0etup"); // growth0 =
-UNSUPPORTED("ed7mreakvazgougj1ls6ioj33"); // RectArea(&rect) - rtp->split.Partitions[0].area[0];
-UNSUPPORTED("eh4bst7jlzxrquw8wrweiosfn"); // rect = CombineRect(r, &rtp->split.Partitions[0].cover[1]);
-UNSUPPORTED("9jwgrynpgu0d39tmz3uvb0f5o"); // growth1 =
-UNSUPPORTED("i0duy3nph3k4msny0ibs81ph"); // RectArea(&rect) - rtp->split.Partitions[0].area[1];
-UNSUPPORTED("b9ktilnf5m1wc70yqwf4mdq9e"); // diff = growth1 - growth0;
-UNSUPPORTED("81ij2fgplw64rbpouql9na7a1"); // if (diff >= 0)
-UNSUPPORTED("b49dtkykbufvv3lk5trobmbw5"); // group = 0;
-UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else {
-UNSUPPORTED("7sge254zb30sgd45k1os7fw3y"); // group = 1;
-UNSUPPORTED("adlw9es1w2znqr4h71hd9k1j8"); // diff = -diff;
-UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
-UNSUPPORTED("7qd8i0mpxxu4wueggpmmx9704"); // if (diff > biggestDiff) {
-UNSUPPORTED("cc2jxkxp6wf0y4a6er7iildb4"); // biggestDiff = diff;
-UNSUPPORTED("4gq0kbfwv4ls5gbqaxqusd6k"); // chosen = i;
-UNSUPPORTED("dwalhyg0t90zo8gdq7pstef8a"); // betterGroup = group;
-UNSUPPORTED("71bce3js2b0lpi50misxff7uy"); // } else if (diff == biggestDiff &&
-UNSUPPORTED("fjvt87on1mhn9dyt0b9vp3jg"); // rtp->split.Partitions[0].count[group] <
-UNSUPPORTED("1v2g0u9t6ou9xeajwcl3u2nr4"); // rtp->split.Partitions[0].count[betterGroup]) {
-UNSUPPORTED("4gq0kbfwv4ls5gbqaxqusd6k"); // chosen = i;
-UNSUPPORTED("dwalhyg0t90zo8gdq7pstef8a"); // betterGroup = group;
-UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
-UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("967zxvkt7liyzfgjy03xrpwf2"); // Classify(rtp, chosen, betterGroup);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("15gmufvsx34eo7l2gxmf9sjph"); // /* if one group too full, put remaining rects in the other */
-UNSUPPORTED("bz0f1s1b90c4mqpxr24oamywd"); // if (rtp->split.Partitions[0].count[0] +
-UNSUPPORTED("d6a1dolgcf9n4go7fsk616dlz"); // rtp->split.Partitions[0].count[1] < 64 + 1) {
-UNSUPPORTED("9xvua0lzynx3u05pjeoibo9tt"); // group = 0;
+public static void MethodZero(ST_RTree rtp) {
+ENTERING("4woz5xy4gjlahoj7no3ljxmex","MethodZero");
+try {
+ ST_Rect_t r;
+ int i, growth0, growth1, diff, biggestDiff;
+ int group, chosen=0, betterGroup=0;
+ InitPVars(rtp);
+ PickSeeds(rtp);
+ while (rtp.split.Partitions[0].count[0] +
+ rtp.split.Partitions[0].count[1] < 64 + 1 &&
+ rtp.split.Partitions[0].count[0] < 64 + 1 - rtp.MinFill
+ && rtp.split.Partitions[0].count[1] <
+ 64 + 1 - rtp.MinFill) {
+ biggestDiff = -1;
+ for (i = 0; i < 64 + 1; i++) {
+ if (N(rtp.split.Partitions[0].taken[i])) {
+ final ST_Rect_t rect = new ST_Rect_t();
+ r = (ST_Rect_t) rtp.split.BranchBuf[i].castTo(ST_Rect_t.class);
+ /* growth0 = RectArea(&CombineRect(r,
+ &rtp->split.Partitions[0].cover[0])) -
+ rtp->split.Partitions[0].area[0];
+ */
+ /* growth1 = RectArea(&CombineRect(r,
+ &rtp->split.Partitions[0].cover[1])) -
+ rtp->split.Partitions[0].area[1];
+ */
+ rect.___(CombineRect(r, (ST_Rect_t) rtp.split.Partitions[0].cover[0]));
+ growth0 =
+ RectArea((ST_Rect_t)rect) - rtp.split.Partitions[0].area[0];
+ rect.___(CombineRect(r, (ST_Rect_t) rtp.split.Partitions[0].cover[1]));
+ growth1 =
+ RectArea((ST_Rect_t)rect) - rtp.split.Partitions[0].area[1];
+ diff = growth1 - growth0;
+ if (diff >= 0)
+ group = 0;
+ else {
+ group = 1;
+ diff = -diff;
+ }
+ if (diff > biggestDiff) {
+ biggestDiff = diff;
+ chosen = i;
+ betterGroup = group;
+ } else if (diff == biggestDiff &&
+ rtp.split.Partitions[0].count[group] <
+ rtp.split.Partitions[0].count[betterGroup]) {
+ chosen = i;
+ betterGroup = group;
+ }
+ }
+ }
+ Classify(rtp, chosen, betterGroup);
+ }
+ /* if one group too full, put remaining rects in the other */
+ if (rtp.split.Partitions[0].count[0] +
+ rtp.split.Partitions[0].count[1] < 64 + 1) {
+ group = 0;
UNSUPPORTED("4edp65b21liyii0fj1ikco7o0"); // if (rtp->split.Partitions[0].count[0] >=
UNSUPPORTED("20lpsuiyepr2ujozaf6gp4cc"); // 64 + 1 - rtp->MinFill)
UNSUPPORTED("9qtt6i40h8vtjp2cvqyb8ycaz"); // group = 1;
@@ -184,14 +201,14 @@ UNSUPPORTED("2x1nx9nsne4x3ygmcywl1m3og"); // for (i = 0; i < 64 + 1; i++) {
UNSUPPORTED("jdepsnmrs3ghh78ql301sfvu"); // if (!rtp->split.Partitions[0].taken[i])
UNSUPPORTED("gqfhorilvtlogp6f2ozx5akf"); // Classify(rtp, i, group);
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("5r5xug64f1z60bggncz1pne3f"); // assert(rtp->split.Partitions[0].count[0] +
-UNSUPPORTED("1whhfnenwvqqzfd4kkosc09z"); // rtp->split.Partitions[0].count[1] == 64 + 1);
-UNSUPPORTED("c4k8arobh90w9e9sk4s8zx6a5"); // assert(rtp->split.Partitions[0].count[0] >= rtp->MinFill
-UNSUPPORTED("2lio9rd6ztigudntp9gohkge9"); // && rtp->split.Partitions[0].count[1] >= rtp->MinFill);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ }
+ // assert(rtp->split.Partitions[0].count[0] +
+ // rtp->split.Partitions[0].count[1] == 64 + 1);
+ // assert(rtp->split.Partitions[0].count[0] >= rtp->MinFill
+ // && rtp->split.Partitions[0].count[1] >= rtp->MinFill);
+} finally {
+LEAVING("4woz5xy4gjlahoj7no3ljxmex","MethodZero");
+}
}
@@ -199,38 +216,39 @@ throw new UnsupportedOperationException();
//3 8rui4cun4tvq5xy6ke6r3p55e
// static void PickSeeds(RTree_t * rtp)
-public static Object PickSeeds(Object... arg) {
-UNSUPPORTED("4lrul9ern8gc76sno14wqgtne"); // static void PickSeeds(RTree_t * rtp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("vshrs98l6la9fwui89y20ji3"); // register int i, j;
-UNSUPPORTED("cz82o6423cha33x8v31g7lhso"); // unsigned int waste, worst;
-UNSUPPORTED("8glrb479bftuwm5m4w4eqy3id"); // int seed0, seed1;
-UNSUPPORTED("em2tlievesov4lr9nkas30k2p"); // unsigned int area[64 + 1];
-UNSUPPORTED("1rer9hfsfz4to936cdqosy26h"); // for (i = 0; i < 64 + 1; i++)
-UNSUPPORTED("2f701q18yaasbx3zewp4pc3i3"); // area[i] = RectArea(&rtp->split.BranchBuf[i].rect);
-UNSUPPORTED("5aj4ab555713s4o7hsg305y2c"); // //worst = -rtp->split.CoverSplitArea - 1;
-UNSUPPORTED("b2ayju4kcpmgel4or2zbz0dyr"); // worst=0;
-UNSUPPORTED("82kuymnzv3rubrwutx9bcz4xs"); // for (i = 0; i < 64; i++) {
-UNSUPPORTED("dw3tar5d5xv4kxcnkcevzm9iw"); // for (j = i + 1; j < 64 + 1; j++) {
-UNSUPPORTED("4wt347mvef1i2kr5h5z9l0g8i"); // Rect_t rect;
-UNSUPPORTED("d5jmdkycgoaq3d846xryh0wtz"); // /* waste = RectArea(&CombineRect(&rtp->split.BranchBuf[i].rect,
-UNSUPPORTED("1d3xkv54rko81ltklwjdtrmj1"); // // &rtp->split.BranchBuf[j].rect)) - area[i] - area[j];
-UNSUPPORTED("20m1lc1moer8x00tx9ceto0iw"); // */
-UNSUPPORTED("8vf1f6q13lthe8sasqcvpatr3"); // rect = CombineRect(&rtp->split.BranchBuf[i].rect,
-UNSUPPORTED("5wjck74u7gv0xbv7a01rp3eia"); // &rtp->split.BranchBuf[j].rect);
-UNSUPPORTED("bzjsjoq354eduv4f511rmjmtk"); // waste = RectArea(&rect) - area[i] - area[j];
-UNSUPPORTED("7g3m0cplrcsffy7f3iqsrwztc"); // if (waste > worst) {
-UNSUPPORTED("1irem1gz77fx5eym990j8l9v5"); // worst = waste;
-UNSUPPORTED("29q6pzycm1gb2gukvicejmmks"); // seed0 = i;
-UNSUPPORTED("11wyv1lzvxs0lyd59xqrp77lb"); // seed1 = j;
-UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c1o6jr885s70ej9txo4zjtk3k"); // Classify(rtp, seed0, 0);
-UNSUPPORTED("bf0ov5eigcyw1mhs6rlnwt7g"); // Classify(rtp, seed1, 1);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void PickSeeds(ST_RTree rtp) {
+ENTERING("8rui4cun4tvq5xy6ke6r3p55e","PickSeeds");
+try {
+ int i, j;
+ int waste, worst;
+ int seed0=0, seed1=0;
+ int area[] = new int[64 + 1];
+ for (i = 0; i < 64 + 1; i++)
+ area[i] = RectArea((ST_Rect_t) rtp.split.BranchBuf[i].rect);
+ //worst = -rtp->split.CoverSplitArea - 1;
+ worst=0;
+ for (i = 0; i < 64; i++) {
+ for (j = i + 1; j < 64 + 1; j++) {
+ final ST_Rect_t rect = new ST_Rect_t();
+ /* waste = RectArea(&CombineRect(&rtp->split.BranchBuf[i].rect,
+ &rtp->split.BranchBuf[j].rect)) - area[i] - area[j];
+ */
+ rect.___(
+ CombineRect((ST_Rect_t)rtp.split.BranchBuf[i].rect,
+ (ST_Rect_t)rtp.split.BranchBuf[j].rect));
+ waste = RectArea((ST_Rect_t)rect) - area[i] - area[j];
+ if (waste > worst) {
+ worst = waste;
+ seed0 = i;
+ seed1 = j;
+ }
+ }
+ }
+ Classify(rtp, seed0, 0);
+ Classify(rtp, seed1, 1);
+} finally {
+LEAVING("8rui4cun4tvq5xy6ke6r3p55e","PickSeeds");
+}
}
@@ -238,25 +256,27 @@ throw new UnsupportedOperationException();
//3 4qyy2dpbkziuubssvfwb8u1sh
// static void Classify(RTree_t * rtp, int i, int group)
-public static Object Classify(Object... arg) {
-UNSUPPORTED("8ml9djski25i25i59wyn3dld9"); // static void Classify(RTree_t * rtp, int i, int group)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("2ulo1dpl3kexdah5mcmnqpzdl"); // assert(!rtp->split.Partitions[0].taken[i]);
-UNSUPPORTED("i4edl48bp8pljcmtxd1rep7a"); // rtp->split.Partitions[0].partition[i] = group;
-UNSUPPORTED("ackdd63x1sev2rjvlsh0xgqbo"); // rtp->split.Partitions[0].taken[i] = (!(0));
-UNSUPPORTED("7bethw7ebtjrhmrrq3004xvhh"); // if (rtp->split.Partitions[0].count[group] == 0)
-UNSUPPORTED("cyhkvve52l3mzao5x0u5df13f"); // rtp->split.Partitions[0].cover[group] =
-UNSUPPORTED("9mprl7dpvobrbs232soqoyv62"); // rtp->split.BranchBuf[i].rect;
-UNSUPPORTED("div10atae09n36x269sl208r1"); // else
-UNSUPPORTED("cyhkvve52l3mzao5x0u5df13f"); // rtp->split.Partitions[0].cover[group] =
-UNSUPPORTED("7ez406d998w0vpfm3e5tbc0qq"); // CombineRect(&rtp->split.BranchBuf[i].rect,
-UNSUPPORTED("e0r4nqeeu1jmir6akus7bjggm"); // &rtp->split.Partitions[0].cover[group]);
-UNSUPPORTED("3n9txb7nb3kh2v0bsy0fufx1e"); // rtp->split.Partitions[0].area[group] =
-UNSUPPORTED("anowu5wmi1sw0e8v669a1obek"); // RectArea(&rtp->split.Partitions[0].cover[group]);
-UNSUPPORTED("d8ahf9tcusfmm5zeecg8pmdxb"); // rtp->split.Partitions[0].count[group]++;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void Classify(ST_RTree rtp, int i, int group) {
+ENTERING("4qyy2dpbkziuubssvfwb8u1sh","Classify");
+try {
+// assert(!rtp->split.Partitions[0].taken[i]);
+ rtp.split.Partitions[0].partition[i]=group;
+ rtp.split.Partitions[0].taken[i]=1;
+ if (rtp.split.Partitions[0].count[group] == 0)
+ rtp.split.Partitions[0].cover[group].___(
+ rtp.split.BranchBuf[i].rect);
+ else
+ rtp.split.Partitions[0].cover[group].___(
+ CombineRect((ST_Rect_t)rtp.split.BranchBuf[i].rect,
+ (ST_Rect_t)rtp.split.Partitions[0].cover[group]));
+ rtp.split.Partitions[0].area[group]=
+ RectArea((ST_Rect_t)rtp.split.Partitions[0].cover[group]);
+
+ rtp.split.Partitions[0].count[group]=
+ rtp.split.Partitions[0].count[group]+1;
+} finally {
+LEAVING("4qyy2dpbkziuubssvfwb8u1sh","Classify");
+}
}
@@ -264,25 +284,24 @@ throw new UnsupportedOperationException();
//3 ay7l4setwyl3hbx4o2jpa7vyz
// static void LoadNodes(RTree_t * rtp, Node_t * n, Node_t * q, struct PartitionVars *p)
-public static Object LoadNodes(Object... arg) {
-UNSUPPORTED("d0dvfornj5165j53js6eyidii"); // static void LoadNodes(RTree_t * rtp, Node_t * n, Node_t * q,
-UNSUPPORTED("an9dlrefy1hbusq999x8s9qgf"); // struct PartitionVars *p)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("25fhmphgra40j368i6b09n5xz"); // assert(n);
-UNSUPPORTED("30uxqb850wr1s0f0jg8uipd4m"); // assert(q);
-UNSUPPORTED("eh686hxootmu11yk2foc2tmr2"); // assert(p);
-UNSUPPORTED("83olszqrugs1dppzl6flgshr5"); // for (i = 0; i < 64 + 1; i++) {
-UNSUPPORTED("46lk8hxsutpzodwl5udrq4tik"); // assert(rtp->split.Partitions[0].partition[i] == 0 ||
-UNSUPPORTED("8jebrifw0oq30vs4i2wf1cbse"); // rtp->split.Partitions[0].partition[i] == 1);
-UNSUPPORTED("56sxhs1suv0k6iod6sl1w72dw"); // if (rtp->split.Partitions[0].partition[i] == 0)
-UNSUPPORTED("cwda9vt3f43bi23igyzgossds"); // AddBranch(rtp, &rtp->split.BranchBuf[i], n, (void *)0);
-UNSUPPORTED("9m8w97hthfczabpgdcm7xah33"); // else if (rtp->split.Partitions[0].partition[i] == 1)
-UNSUPPORTED("2f02d8m6p439gevwt7mxtyo4p"); // AddBranch(rtp, &rtp->split.BranchBuf[i], q, (void *)0);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void LoadNodes(ST_RTree rtp, ST_Node_t___ n, ST_Node_t___ q, ST_PartitionVars p) {
+ENTERING("ay7l4setwyl3hbx4o2jpa7vyz","LoadNodes");
+try {
+ int i;
+// assert(n);
+// assert(q);
+// assert(p);
+ for (i = 0; i < 64 + 1; i++) {
+// assert(rtp->split.Partitions[0].partition[i] == 0 ||
+// rtp->split.Partitions[0].partition[i] == 1);
+ if (rtp.split.Partitions[0].partition[i] == 0)
+ AddBranch(rtp, (ST_Branch_t)rtp.split.BranchBuf[i].castTo(Branch_t.class), n, null);
+ else if (rtp.split.Partitions[0].partition[i] == 1)
+ AddBranch(rtp, (ST_Branch_t)rtp.split.BranchBuf[i].castTo(Branch_t.class), q, null);
+ }
+} finally {
+LEAVING("ay7l4setwyl3hbx4o2jpa7vyz","LoadNodes");
+}
}
@@ -290,23 +309,23 @@ throw new UnsupportedOperationException();
//3 dvgjc83sogjhzf5kxpir405rh
// static void InitPVars(RTree_t * rtp)
-public static Object InitPVars(Object... arg) {
-UNSUPPORTED("18v3kgq3ud3q6c0nu07xyv8wa"); // static void InitPVars(RTree_t * rtp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("pp6gyv6pecd6kik4hoguluwp"); // register int i;
-UNSUPPORTED("2yvv0x8uir74h718l313i7it6"); // rtp->split.Partitions[0].count[0] = rtp->split.Partitions[0].count[1] =
-UNSUPPORTED("556sry61ttzbp13quuzhes74v"); // 0;
-UNSUPPORTED("bvhvtlpo10lxy8rquegyfg5jb"); // rtp->split.Partitions[0].cover[0] = rtp->split.Partitions[0].cover[1] =
-UNSUPPORTED("5bf9thav82syw0gzxp8b9p5ou"); // NullRect();
-UNSUPPORTED("8avyuhj51jxnpeujd7fmgcgtq"); // rtp->split.Partitions[0].area[0] = rtp->split.Partitions[0].area[1] =
-UNSUPPORTED("556sry61ttzbp13quuzhes74v"); // 0;
-UNSUPPORTED("83olszqrugs1dppzl6flgshr5"); // for (i = 0; i < 64 + 1; i++) {
-UNSUPPORTED("5dttrbxrjqa1omiz2oovpe18k"); // rtp->split.Partitions[0].taken[i] = (0);
-UNSUPPORTED("324vwwpg2hf07ejcj9w02evkm"); // rtp->split.Partitions[0].partition[i] = -1;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void InitPVars(ST_RTree rtp) {
+ENTERING("dvgjc83sogjhzf5kxpir405rh","InitPVars");
+ int i;
+ rtp.split.Partitions[0].count[0]=0;
+ rtp.split.Partitions[0].count[1]=0;
+ rtp.split.Partitions[0].cover[0].___(NullRect());
+ rtp.split.Partitions[0].cover[1].___(NullRect());
+ rtp.split.Partitions[0].area[0]=0;
+ rtp.split.Partitions[0].area[1]=0;
+ for (i = 0; i < 64 + 1; i++) {
+ rtp.split.Partitions[0].taken[i]=0;
+ rtp.split.Partitions[0].partition[i]=-1;
+ }
+try {
+} finally {
+LEAVING("dvgjc83sogjhzf5kxpir405rh","InitPVars");
+}
}
diff --git a/src/gen/lib/label/xlabels__c.java b/src/gen/lib/label/xlabels__c.java
index 8cb299f..8f48110 100644
--- a/src/gen/lib/label/xlabels__c.java
+++ b/src/gen/lib/label/xlabels__c.java
@@ -44,20 +44,35 @@
*
*/
package gen.lib.label;
+import static gen.lib.cdt.dtclose__c.dtclose;
import static gen.lib.cdt.dtopen__c.dtopen;
-import static gen.lib.common.memory__c.zmalloc;
+import static gen.lib.label.index__c.RTreeClose;
+import static gen.lib.label.index__c.RTreeInsert;
+import static gen.lib.label.index__c.RTreeLeafListFree;
import static gen.lib.label.index__c.RTreeOpen;
-import static smetana.core.JUtils.sizeof;
+import static gen.lib.label.index__c.RTreeSearch;
+import static smetana.core.JUtils.EQ;
+import static smetana.core.JUtilsDebug.ENTERING;
+import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.BestPos_t;
-import h.XLabels_t;
-import h._dt_s;
-import h._dtdisc_s;
-import h.label_params_t;
+import h.ST_BestPos_t;
+import h.ST_HDict_t;
+import h.ST_LeafList_t;
+import h.ST_Node_t___;
+import h.ST_RTree;
+import h.ST_Rect_t;
+import h.ST_XLabels_t;
+import h.ST_dt_s;
+import h.ST_dtdisc_s;
+import h.ST_label_params_t;
+import h.ST_object_t;
+import h.ST_point;
+import h.ST_pointf;
+import h.ST_xlabel_t;
+import smetana.core.Memory;
import smetana.core.Z;
import smetana.core.__ptr__;
-
public class xlabels__c {
//1 9k44uhd5foylaeoekf3llonjq
// extern Dtmethod_t* Dtset
@@ -135,13 +150,15 @@ public class xlabels__c {
//3 5p3ac8qk4gnne5hj1dc21ysi
// static int icompare(Dt_t * dt, void * v1, void * v2, Dtdisc_t * disc)
-public static int icompare(_dt_s dt, __ptr__ v1, __ptr__ v2, _dtdisc_s disc) {
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("ehks25fxahyjbjd4lm6ryh9su"); // int k1 = *((int *) v1), k2 = *((int *) v2);
-UNSUPPORTED("6in30ubiocmaih693f0arymgc"); // return k1 - k2;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int icompare(ST_dt_s dt, Object v1, Object v2, ST_dtdisc_s disc) {
+ENTERING("5p3ac8qk4gnne5hj1dc21ysi","icompare");
+try {
+ Integer k1 = (Integer) v1;
+ Integer k2 = (Integer) v2;
+ return k1 - k2;
+} finally {
+LEAVING("5p3ac8qk4gnne5hj1dc21ysi","icompare");
+}
}
@@ -149,38 +166,41 @@ throw new UnsupportedOperationException();
//3 88mbfm305igsr7cew5qx6yldp
// static XLabels_t *xlnew(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params)
-public static XLabels_t xlnew(__ptr__ objs, int n_objs, __ptr__ lbls, int n_lbls, label_params_t params) {
-__ptr__ xlp;
-xlp = zmalloc(sizeof(XLabels_t.class));
+public static ST_XLabels_t xlnew(ST_object_t.Array objs, int n_objs, ST_xlabel_t.Array lbls, int n_lbls, ST_label_params_t params) {
+ENTERING("88mbfm305igsr7cew5qx6yldp","xlnew");
+try {
+ST_XLabels_t xlp;
+xlp = new ST_XLabels_t();
/* used to load the rtree in hilbert space filling curve order */
-xlp.setPtr("hdx", dtopen(Z.z().Hdisc.amp(), Z.z().Dtobag));
-if (N(xlp.getPtr("hdx"))) {
+xlp.setPtr("hdx", dtopen(Z.z().Hdisc, Z.z().Dtobag));
+if (N(xlp.hdx)) {
UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n");
UNSUPPORTED("3m406diamp5s5kwcqtwo4pshf"); // goto bad;
}
/* for querying intersection candidates */
xlp.setPtr("spdx", RTreeOpen());
-UNSUPPORTED("7elrkgy2129t2ut4mi03dhf75"); // if (!(xlp->spdx = RTreeOpen())) {
+if (N(xlp.spdx)) {
UNSUPPORTED("4t1y5iinm4310lkpvbal1spve"); // fprintf(stderr, "out of memory\n");
UNSUPPORTED("3m406diamp5s5kwcqtwo4pshf"); // goto bad;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
+ }
/* save arg pointers in the handle */
-UNSUPPORTED("ava6c0wrmq2d6j1i4j7bd1lpp"); // xlp->objs = objs;
-UNSUPPORTED("85sh2ov52z31nsy9mk5su9p5p"); // xlp->n_objs = n_objs;
-UNSUPPORTED("3et8g76wlkf60sgxrmi3z1vom"); // xlp->lbls = lbls;
-UNSUPPORTED("2pwe3sog0n7styjgekuhrnd5e"); // xlp->n_lbls = n_lbls;
-UNSUPPORTED("52j9u0n44sdpwexr3bunb46zi"); // xlp->params = params;
-UNSUPPORTED("64t9yhsoz02rjp8vy1as25a5n"); // return xlp;
-UNSUPPORTED("98zx7s9vt8t1s5x9l35evcxnz"); // bad:
-UNSUPPORTED("66s40csd2ivd8rx4h2ut8oai5"); // if (xlp->hdx)
-UNSUPPORTED("8mg8tqxa78f1nfk4jh9drw2n0"); // dtclose(xlp->hdx);
-UNSUPPORTED("b9uy03exphaovgyz5t4gru409"); // if (xlp->spdx)
-UNSUPPORTED("4cfpl6hom6vo3btrjlhfmn6mi"); // RTreeClose(xlp->spdx);
-UNSUPPORTED("dms04fhv1vao18v2p0lmk80xf"); // free(xlp);
-UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+xlp.objs = objs;
+xlp.setInt("n_objs", n_objs);
+xlp.lbls = lbls;
+xlp.setInt("n_lbls", n_lbls);
+xlp.setPtr("params", params);
+return (ST_XLabels_t) xlp;
+} finally {
+LEAVING("88mbfm305igsr7cew5qx6yldp","xlnew");
+}
+//UNSUPPORTED("98zx7s9vt8t1s5x9l35evcxnz"); // bad:
+//UNSUPPORTED("66s40csd2ivd8rx4h2ut8oai5"); // if (xlp->hdx)
+//UNSUPPORTED("8mg8tqxa78f1nfk4jh9drw2n0"); // dtclose(xlp->hdx);
+//UNSUPPORTED("b9uy03exphaovgyz5t4gru409"); // if (xlp->spdx)
+//UNSUPPORTED("4cfpl6hom6vo3btrjlhfmn6mi"); // RTreeClose(xlp->spdx);
+//UNSUPPORTED("dms04fhv1vao18v2p0lmk80xf"); // free(xlp);
+//UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0;
+//UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
}
@@ -188,15 +208,14 @@ throw new UnsupportedOperationException();
//3 apvhod2s1yjb8717rb7gie2kb
// static void xlfree(XLabels_t * xlp)
-public static Object xlfree(Object... arg) {
-UNSUPPORTED("7jv3t0oxe54lacl7qn1meznth"); // static void xlfree(XLabels_t * xlp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("3120ftcrfb2pccpafsxzl14te"); // RTreeClose(xlp->spdx);
-UNSUPPORTED("dms04fhv1vao18v2p0lmk80xf"); // free(xlp);
-UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void xlfree(ST_XLabels_t xlp) {
+ENTERING("apvhod2s1yjb8717rb7gie2kb","xlfree");
+try {
+ RTreeClose((ST_RTree) xlp.spdx);
+ Memory.free(xlp);
+} finally {
+LEAVING("apvhod2s1yjb8717rb7gie2kb","xlfree");
+}
}
@@ -204,35 +223,35 @@ throw new UnsupportedOperationException();
//3 6lz36gkh8fla3z6f0lxniy368
// static int floorLog2(unsigned int n)
-public static Object floorLog2(Object... arg) {
-UNSUPPORTED("dhjwlofpfy5gop5y81eemv6i4"); // static int floorLog2(unsigned int n)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("3xzujk207ipx0d60nbbrwyjez"); // int pos = 0;
-UNSUPPORTED("f0os7tzuki1s9mllsml3zu2fd"); // if (n == 0)
-UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
-UNSUPPORTED("4b22up0qcghijti04gz41jqiz"); // if (n >= 1 << 16) {
-UNSUPPORTED("b8h1lnvuhauq15z5k0fs5u2l1"); // n >>= 16;
-UNSUPPORTED("e1kd6x1c70e7l8ml3qgzahq34"); // pos += 16;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("a7hxj1hb2pc8py8ywsfit3q4n"); // if (n >= 1 << 8) {
-UNSUPPORTED("aioe8c94e5sluu8n00fdgq128"); // n >>= 8;
-UNSUPPORTED("b5apnzow59vwb4z38m0bgaxuj"); // pos += 8;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("8ln2bn60t9zq7iigfqy9wa5dk"); // if (n >= 1 << 4) {
-UNSUPPORTED("albua8gefgieknhiuhr1cook"); // n >>= 4;
-UNSUPPORTED("5ivee6b3gs2khi9h8mpbr20g9"); // pos += 4;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("930rjgw6ueudlb4emmrfw8y8w"); // if (n >= 1 << 2) {
-UNSUPPORTED("3p8vzi941bcva583xzhk2o7qb"); // n >>= 2;
-UNSUPPORTED("3t90pfuwl7kz4zpjrsa99cof8"); // pos += 2;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("8b1fqmv1sxvuyxs3dcp7aas0k"); // if (n >= 1 << 1) {
-UNSUPPORTED("nx53w89cor5x9akadlbw5et8"); // pos += 1;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("2kr5zds5y6oiaubm8wiunqccr"); // return pos;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int floorLog2(int n) {
+ENTERING("6lz36gkh8fla3z6f0lxniy368","floorLog2");
+try {
+ int pos = 0;
+ if (n == 0)
+ return -1;
+ if (n >= 1 << 16) {
+ n >>= 16;
+ pos += 16;
+ }
+ if (n >= 1 << 8) {
+ n >>= 8;
+ pos += 8;
+ }
+ if (n >= 1 << 4) {
+ n >>= 4;
+ pos += 4;
+ }
+ if (n >= 1 << 2) {
+ n >>= 2;
+ pos += 2;
+ }
+ if (n >= 1 << 1) {
+ pos += 1;
+ }
+ return pos;
+} finally {
+LEAVING("6lz36gkh8fla3z6f0lxniy368","floorLog2");
+}
}
@@ -240,14 +259,15 @@ throw new UnsupportedOperationException();
//3 uvnzthcpf4xiih05gxie2rx1
// unsigned int xlhorder(XLabels_t * xlp)
-public static Object xlhorder(Object... arg) {
-UNSUPPORTED("9rtsoeopc1glcmntqwf7hz6x7"); // unsigned int xlhorder(XLabels_t * xlp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("7w1e4a6q9gftmlsxkc4v7eq9d"); // double maxx = xlp->params->bb.UR.x, maxy = xlp->params->bb.UR.y;
-UNSUPPORTED("147h47bz0sqql0238qat4fdky"); // return floorLog2(maxx > maxy ? maxx : maxy) + 1;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int xlhorder(ST_XLabels_t xlp) {
+ENTERING("uvnzthcpf4xiih05gxie2rx1","xlhorder");
+try {
+ double maxx = xlp.params.bb.UR.x;
+ double maxy = xlp.params.bb.UR.y;
+ return floorLog2(maxx > maxy ? (int)maxx : (int)maxy) + 1;
+} finally {
+LEAVING("uvnzthcpf4xiih05gxie2rx1","xlhorder");
+}
}
@@ -255,59 +275,62 @@ throw new UnsupportedOperationException();
//3 9lkyvq87bawe3yon7bdwvcjzq
// static unsigned int hd_hil_s_from_xy(point p, int n)
-public static Object hd_hil_s_from_xy(Object... arg) {
-UNSUPPORTED("9zi37w33fe5wi8h5d2dymr0tt"); // static unsigned int hd_hil_s_from_xy(point p, int n)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("65resmfdu81d1xg2em5l84y82"); // int i, x = p.x, y = p.y, xi, yi;
-UNSUPPORTED("3s2drtfrrzifwhrt8rk6kq5gq"); // unsigned s;
-UNSUPPORTED("bd5j4s2m9y2fcgu9giqi9qrhy"); // s = 0; /* Initialize. */
-UNSUPPORTED("9d7993w9kft7mplobqeb9boaz"); // for (i = n - 1; i >= 0; i--) {
-UNSUPPORTED("c1xqmgsdfzeebwk2yfoz65pue"); // xi = (x >> i) & 1; /* Get bit i of x. */
-UNSUPPORTED("270wzledmbxq3z8mp5tz7ezib"); // yi = (y >> i) & 1; /* Get bit i of y. */
-UNSUPPORTED("3d69e96cdg4apqijubufzse5z"); // s = 4 * s + 2 * xi + (xi ^ yi); /* Append two bits to s. */
-UNSUPPORTED("c4cig8vru225s8qy4aj21mfe0"); // x = x ^ y; /* These 3 lines swap */
-UNSUPPORTED("7r0w00av090u8a4vi14al4ct6"); // y = y ^ (x & (yi - 1)); /* x and y if yi = 0. */
-UNSUPPORTED("cpz7xdfh4gvp5hufdb1ij5amy"); // x = x ^ y;
-UNSUPPORTED("7i7jygllv89x29npu61cfn74p"); // x = x ^ (-xi & (yi - 1)); /* Complement x and y if */
-UNSUPPORTED("5p8kbkyzcbsr9m1b1fl7z3q0h"); // y = y ^ (-xi & (yi - 1)); /* xi = 1 and yi = 0. */
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("3y6wj3ntgmr1qkdpm7wp1dsch"); // return s;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int hd_hil_s_from_xy(ST_point p, int n) {
+ENTERING("9lkyvq87bawe3yon7bdwvcjzq","hd_hil_s_from_xy");
+try {
+ return hd_hil_s_from_xy_((ST_point) p.copy(), n);
+} finally {
+LEAVING("9lkyvq87bawe3yon7bdwvcjzq","hd_hil_s_from_xy");
+}
}
+private static int hd_hil_s_from_xy_(ST_point p, int n) {
+ int i, x = p.x, y = p.y, xi, yi;
+ int s;
+ s = 0; /* Initialize. */
+ for (i = n - 1; i >= 0; i--) {
+ xi = (x >> i) & 1; /* Get bit i of x. */
+ yi = (y >> i) & 1; /* Get bit i of y. */
+ s = 4 * s + 2 * xi + (xi ^ yi); /* Append two bits to s. */
+ x = x ^ y; /* These 3 lines swap */
+ y = y ^ (x & (yi - 1)); /* x and y if yi = 0. */
+ x = x ^ y;
+ x = x ^ (-xi & (yi - 1)); /* Complement x and y if */
+ y = y ^ (-xi & (yi - 1)); /* xi = 1 and yi = 0. */
+ }
+ return s;
+ }
//3 bpkzwylrchx5wta1qhytfgbtr
// static double aabbaabb(Rect_t * r, Rect_t * s)
-public static Object aabbaabb(Object... arg) {
-UNSUPPORTED("21oyvapf2qfnxqid5aolv4mmr"); // static double aabbaabb(Rect_t * r, Rect_t * s)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("dywr73ggaui4ayztq3tmljs4z"); // /* per dimension if( max < omin || min > omax) */
-UNSUPPORTED("981pm44oz7wkhcspjabhjqpmq"); // double iminx, iminy, imaxx, imaxy;
-UNSUPPORTED("60uso6twsxyml3pff70yndkys"); // if (r->boundary[2] < s->boundary[0] || r->boundary[0] > s->boundary[2])
-UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
-UNSUPPORTED("1tavt6umo55xyoarc64k3dxs0"); // if (r->boundary[3] < s->boundary[1] || r->boundary[1] > s->boundary[3])
-UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
-UNSUPPORTED("ls92qicz53qcx6cwst6f8om3"); // /* if we get here we have an intersection */
-UNSUPPORTED("31cw8fo82001qx6nsg22hugnf"); // /* rightmost left edge of the 2 rectangles */
-UNSUPPORTED("7d66kym3m7c0ya8b4kt7vjtvv"); // iminx =
-UNSUPPORTED("2ohiqb8vdv4gbnzqigtqd47c3"); // r->boundary[0] > s->boundary[0] ? r->boundary[0] : s->boundary[0];
-UNSUPPORTED("2bf3t8qfsxq7y4d98hc3p59gv"); // /* upmost bottom edge */
-UNSUPPORTED("cvk4ll2zvw3sljlm63j6bcjr8"); // iminy =
-UNSUPPORTED("13n8uz9c82r3pkg85oh43qf74"); // r->boundary[1] > s->boundary[1] ? r->boundary[1] : s->boundary[1];
-UNSUPPORTED("dsfdevf6xy6buo0sydh3h3fis"); // /* leftmost right edge */
-UNSUPPORTED("8rdxlzisdq5iw8b07usm1toc9"); // imaxx =
-UNSUPPORTED("a8uyhcvpgmwrihxaaa5u77i69"); // r->boundary[2] < s->boundary[2] ? r->boundary[2] : s->boundary[2];
-UNSUPPORTED("cr403g6ud2h0cyys19fti84tb"); // /* downmost top edge */
-UNSUPPORTED("cqszcttk6vqvj0hezy1t1bsig"); // imaxy =
-UNSUPPORTED("41qdog59oicvy8ku3n9vbzhj6"); // r->boundary[3] < s->boundary[3] ? r->boundary[3] : s->boundary[3];
-UNSUPPORTED("cxtiz800rb16yy2u6burhy6mi"); // return (imaxx - iminx) * (imaxy - iminy);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static double aabbaabb(ST_Rect_t r, ST_Rect_t s) {
+ENTERING("bpkzwylrchx5wta1qhytfgbtr","aabbaabb");
+try {
+ /* per dimension if( max < omin || min > omax) */
+ double iminx, iminy, imaxx, imaxy;
+ if (r.boundary[2] < s.boundary[0] || r.boundary[0] > s.boundary[2])
+ return 0;
+ if (r.boundary[3] < s.boundary[1] || r.boundary[1] > s.boundary[3])
+ return 0;
+ /* if we get here we have an intersection */
+ /* rightmost left edge of the 2 rectangles */
+ iminx =
+ r.boundary[0] > s.boundary[0] ? r.boundary[0] : s.boundary[0];
+ /* upmost bottom edge */
+ iminy =
+ r.boundary[1] > s.boundary[1] ? r.boundary[1] : s.boundary[1];
+ /* leftmost right edge */
+ imaxx =
+ r.boundary[2] < s.boundary[2] ? r.boundary[2] : s.boundary[2];
+ /* downmost top edge */
+ imaxy =
+ r.boundary[3] < s.boundary[3] ? r.boundary[3] : s.boundary[3];
+ return (imaxx - iminx) * (imaxy - iminy);
+} finally {
+LEAVING("bpkzwylrchx5wta1qhytfgbtr","aabbaabb");
+}
}
@@ -315,37 +338,42 @@ throw new UnsupportedOperationException();
//3 2g71cq6f8w5jbmbnn2x9y5qfq
// static int lblenclosing(object_t * objp, object_t * objp1)
-public static Object lblenclosing(Object... arg) {
-UNSUPPORTED("96fk2h2cameoldx630f8490ei"); // static int lblenclosing(object_t * objp, object_t * objp1)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("2uf1ispemhfeg8c7qhy0fbq2j"); // xlabel_t * xlp = objp->lbl;;
-UNSUPPORTED("txl92fx6l8dzi4yeuegwqirj"); // assert(objp1->sz.x == 0 && objp1->sz.y == 0);
-UNSUPPORTED("ek6g4dsfb8puipbh006mizket"); // if(! xlp) return 0;
-UNSUPPORTED("exdts7f2bpam5122kabq2b86c"); // return objp1->pos.x > xlp->pos.x &&
-UNSUPPORTED("99uxf5dqw5nzdymlzfj764uol"); // objp1->pos.x < (xlp->pos.x + xlp->sz.x) &&
-UNSUPPORTED("epx7s3oiw75fuioasz208w1k1"); // objp1->pos.y > xlp->pos.y &&
-UNSUPPORTED("29g3tye8vebllnv9b91xyntzi"); // objp1->pos.y < (xlp->pos.y + xlp->sz.y);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static boolean lblenclosing(ST_object_t objp, ST_object_t objp1) {
+ENTERING("2g71cq6f8w5jbmbnn2x9y5qfq","lblenclosing");
+try {
+ ST_xlabel_t.Array xlp = (ST_xlabel_t.Array) objp.lbl;
+// assert(objp1->sz.x == 0 && objp1->sz.y == 0);
+ if(N(xlp)) return false;
+ return objp1.pos.x > xlp.getStruct().pos.x &&
+ objp1.pos.x < (xlp.getStruct().pos.x + xlp.getStruct().sz.y) &&
+ objp1.pos.y > xlp.getStruct().pos.y &&
+ objp1.pos.y < (xlp.getStruct().pos.y + xlp.getStruct().sz.y);
+// UNSUPPORTED("exdts7f2bpam5122kabq2b86c"); // return objp1->pos.x > xlp->pos.x &&
+// UNSUPPORTED("99uxf5dqw5nzdymlzfj764uol"); // objp1->pos.x < (xlp->pos.x + xlp->sz.x) &&
+// UNSUPPORTED("epx7s3oiw75fuioasz208w1k1"); // objp1->pos.y > xlp->pos.y &&
+// UNSUPPORTED("29g3tye8vebllnv9b91xyntzi"); // objp1->pos.y < (xlp->pos.y + xlp->sz.y);
+// UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+} finally {
+LEAVING("2g71cq6f8w5jbmbnn2x9y5qfq","lblenclosing");
+}
}
+
//3 dq1wkb4oxshdggv6cwtgas6m
// static void objp2rect(object_t * op, Rect_t * r)
-public static Object objp2rect(Object... arg) {
-UNSUPPORTED("bmdr5joxjahq30nkb15r6rf41"); // static void objp2rect(object_t * op, Rect_t * r)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("cdtyz1w6cga7n2jo2fbh8c6ro"); // r->boundary[0] = op->pos.x;
-UNSUPPORTED("9ir52jgzphc4cgyevo2o2ltjs"); // r->boundary[1] = op->pos.y;
-UNSUPPORTED("cz4cc7haeit4u59so96vv80ch"); // r->boundary[2] = op->pos.x + op->sz.x;
-UNSUPPORTED("3m857h9kn35205vsumkenc0dx"); // r->boundary[3] = op->pos.y + op->sz.y;
-UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void objp2rect(ST_object_t op, ST_Rect_t r) {
+ENTERING("dq1wkb4oxshdggv6cwtgas6m","objp2rect");
+try {
+ r.boundary[0]=((int)op.pos.x);
+ r.boundary[1]=((int)op.pos.y);
+ r.boundary[2]=((int)(op.pos.x+op.sz.x));
+ r.boundary[3]=((int)(op.pos.y+op.sz.y));
+} finally {
+LEAVING("dq1wkb4oxshdggv6cwtgas6m","objp2rect");
+}
}
@@ -353,18 +381,17 @@ throw new UnsupportedOperationException();
//3 71b5ttp3xs7lo9fqgb7ypyqgx
// static void objplp2rect(object_t * objp, Rect_t * r)
-public static Object objplp2rect(Object... arg) {
-UNSUPPORTED("5giyzyeu3hmuyo2r06ushsohy"); // static void objplp2rect(object_t * objp, Rect_t * r)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("3wparjbgs7cft1xsjcztm8bdh"); // xlabel_t *lp = objp->lbl;
-UNSUPPORTED("5abhryoldlbjfzt4lh63gmcb4"); // r->boundary[0] = lp->pos.x;
-UNSUPPORTED("acpv39vcusl8yzf591aja97a0"); // r->boundary[1] = lp->pos.y;
-UNSUPPORTED("flr92u77dscu4d286xzfwhzs"); // r->boundary[2] = lp->pos.x + lp->sz.x;
-UNSUPPORTED("beq6fj10iaic6pf2z8xgb1atm"); // r->boundary[3] = lp->pos.y + lp->sz.y;
-UNSUPPORTED("b9185t6i77ez1ac587ul8ndnc"); // return;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void objplp2rect(ST_object_t objp, ST_Rect_t r) {
+ENTERING("71b5ttp3xs7lo9fqgb7ypyqgx","objplp2rect");
+try {
+ ST_xlabel_t.Array lp = (ST_xlabel_t.Array) objp.lbl;
+ r.boundary[0]=((int)lp.getStruct().pos.x);
+ r.boundary[1]=((int)lp.getStruct().pos.y);
+ r.boundary[2]=((int)(lp.getStruct().pos.x+lp.getStruct().sz.x));
+ r.boundary[3]=((int)(lp.getStruct().pos.y+lp.getStruct().sz.y));
+} finally {
+LEAVING("71b5ttp3xs7lo9fqgb7ypyqgx","objplp2rect");
+}
}
@@ -372,24 +399,25 @@ throw new UnsupportedOperationException();
//3 ksqjbiie0e6vvaeawdxriie5
// static Rect_t objplpmks(XLabels_t * xlp, object_t * objp)
-public static Object objplpmks(Object... arg) {
-UNSUPPORTED("56xi0kf7c3v2wjn9pgxjfd6h"); // static Rect_t objplpmks(XLabels_t * xlp, object_t * objp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("1xpsng8cc6f4327hr9iybol18"); // Rect_t rect;
-UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p;
-UNSUPPORTED("44i0d8rb96ptawj2nb9zhyuzq"); // p.x = p.y = 0.0;
-UNSUPPORTED("3dwj4u821y9ogiqj7n51lyoag"); // if (objp->lbl)
-UNSUPPORTED("43e7r8tcv1i4842l88wzlv8oh"); // p = objp->lbl->sz;
-UNSUPPORTED("5vkhq86nkkgbben2zw7acts5t"); // rect.boundary[0] = (int) floor(objp->pos.x - p.x);
-UNSUPPORTED("3smh87oiqzvpexhjkfsvfqk9x"); // rect.boundary[1] = (int) floor(objp->pos.y - p.y);
-UNSUPPORTED("2qxkma0x5w0j667gciafl1erp"); // rect.boundary[2] = (int) ceil(objp->pos.x + objp->sz.x + p.x);
-UNSUPPORTED("6jltyhrpm228xlstvy1cij4b"); // assert(rect.boundary[2] < INT_MAX);
-UNSUPPORTED("aczubaaqymb9ns1q4t70v16a2"); // rect.boundary[3] = (int) ceil(objp->pos.y + objp->sz.y + p.y);
-UNSUPPORTED("560x8steudix953y8g7kyqgph"); // assert(rect.boundary[3] < INT_MAX);
-UNSUPPORTED("5r5gm69aqx2rcthvo0oaisz5n"); // return rect;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static ST_Rect_t objplpmks(ST_XLabels_t xlp, ST_object_t objp) {
+ENTERING("ksqjbiie0e6vvaeawdxriie5","objplpmks");
+try {
+ final ST_Rect_t rect = new ST_Rect_t();
+ final ST_pointf p = new ST_pointf();
+ p.setDouble("x", 0);
+ p.setDouble("y", 0);
+ if (objp.lbl!=null)
+ p.___(objp.lbl.getStruct().sz);
+ rect.boundary[0]=((int) Math.floor(objp.pos.x - p.x));
+ rect.boundary[1]=((int) Math.floor(objp.pos.y - p.y));
+ rect.boundary[2]=((int) Math.ceil(objp.pos.x + objp.sz.x + p.x));
+ // assert(rect.boundary[2] < INT_MAX);
+ rect.boundary[3]=((int) Math.ceil(objp.pos.y + objp.sz.y + p.y));
+ // assert(rect.boundary[3] < INT_MAX);
+ return rect;
+} finally {
+LEAVING("ksqjbiie0e6vvaeawdxriie5","objplpmks");
+}
}
@@ -397,14 +425,14 @@ throw new UnsupportedOperationException();
//3 calnhom3s9dqvvi6crrz3h2wp
// static int getintrsxi(XLabels_t * xlp, object_t * op, object_t * cp)
-public static Object getintrsxi(Object... arg) {
-UNSUPPORTED("a9fedvxwftar39hm6zje929tj"); // static int getintrsxi(XLabels_t * xlp, object_t * op, object_t * cp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("451bp6msra12odk32g38u2p4l"); // int i = -1;
-UNSUPPORTED("6ve3kvakrupo08cfuexjzim3j"); // xlabel_t *lp = op->lbl, *clp = cp->lbl;
-UNSUPPORTED("bot9xncc749y7iruelw2v96mm"); // assert(lp != clp);
-UNSUPPORTED("95np7ge1zv1ws57dp9wu3twm8"); // if (lp->set == 0 || clp->set == 0)
-UNSUPPORTED("11drvggon8u61uz4iw75insly"); // return i;
+public static int getintrsxi(ST_XLabels_t xlp, ST_object_t op, ST_object_t cp) {
+ENTERING("calnhom3s9dqvvi6crrz3h2wp","getintrsxi");
+try {
+ int i = -1;
+ ST_xlabel_t.Array lp = (ST_xlabel_t.Array) op.lbl, clp = (ST_xlabel_t.Array) cp.lbl;
+ assert(lp != clp);
+ if (lp.getStruct().set == 0 || clp.getStruct().set == 0)
+ return i;
UNSUPPORTED("bofpvwtmumoe1ckgnlgbwg8bt"); // if ((op->pos.x == 0.0 && op->pos.y == 0.0) ||
UNSUPPORTED("f039op8rn0jopi9r8kora4cwz"); // (cp->pos.x == 0.0 && cp->pos.y == 0.0))
UNSUPPORTED("11drvggon8u61uz4iw75insly"); // return i;
@@ -430,6 +458,9 @@ UNSUPPORTED("ahwo5hst5k1gyq20ve63ahe81"); // return i;
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
throw new UnsupportedOperationException();
+} finally {
+LEAVING("calnhom3s9dqvvi6crrz3h2wp","getintrsxi");
+}
}
@@ -437,40 +468,38 @@ throw new UnsupportedOperationException();
//3 52awwxu810dg9a2pjq45aomam
// static double recordointrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp, double a, object_t * intrsx[9])
-public static Object recordointrsx(Object... arg) {
-UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double
-UNSUPPORTED("2zz9cixco1u51p503mmbdrgwj"); // recordointrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp,
-UNSUPPORTED("apwjxkvmqelrsmtxwca7febp5"); // double a, object_t * intrsx[9])
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("ejj0lh0dxc3weinkmoqplvk87"); // int i = getintrsxi(xlp, op, cp);
-UNSUPPORTED("7jqpiltkvdvvkjldnxqmz4nfw"); // if (i < 0)
-UNSUPPORTED("cmp9l0lizmu0ars1jf1oxdms"); // i = 5;
-UNSUPPORTED("b3zyhtz43kkfxl6c8kovnaukv"); // if (intrsx[i] != (void *)0) {
-UNSUPPORTED("908eps96desp6goewhn8nkz4v"); // double sa, maxa = 0.0;
-UNSUPPORTED("cz5yjl642c9a3c7quub0ndp2a"); // Rect_t srect;
-UNSUPPORTED("aq0f27u636o0qqw392noohjgj"); // /* keep maximally overlapping object */
-UNSUPPORTED("5vocmgb870od0q18046qxkydh"); // objp2rect(intrsx[i], &srect);
-UNSUPPORTED("3by02iwc6g6vz00qca2gs8af1"); // sa = aabbaabb(rp, &srect);
-UNSUPPORTED("77dloi6nsmguqzpi413an26qc"); // if (sa > a)
-UNSUPPORTED("8e6d6m12amff6diyc58bdpzap"); // maxa = sa;
-UNSUPPORTED("2d4heu1iudrpn42muf8z4aedr"); // /*keep maximally overlapping label */
-UNSUPPORTED("5g3p1wh0h43afgmy1ttrgr1jv"); // if (intrsx[i]->lbl) {
-UNSUPPORTED("e5ldv4apogj6g1ixv62v7fqn7"); // objplp2rect(intrsx[i], &srect);
-UNSUPPORTED("6h73h574xwo051r2xjepln3kk"); // sa = aabbaabb(rp, &srect);
-UNSUPPORTED("cl94uq2flao8cddtvg02oliwb"); // if (sa > a)
-UNSUPPORTED("d9hnc5ox6fsga1e2336gg1fwv"); // maxa = sa > maxa ? sa : maxa;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("6nmie1l1f5g573kzykn3266zd"); // if (maxa > 0.0)
-UNSUPPORTED("dm9264t4efl70h617d1apqrlj"); // return maxa;
-UNSUPPORTED("3vems3bwps1fshis117u06l2l"); // /*replace overlapping label/object pair */
-UNSUPPORTED("c3ewj48u0ngzq2xd8g3238ays"); // intrsx[i] = cp;
-UNSUPPORTED("efte22brajv8hm98pgq1oyjc5"); // return a;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("2u8wtbwfirvx570l7nhbkqwmn"); // intrsx[i] = cp;
-UNSUPPORTED("3gfohtnqgemf2e1akg4je944a"); // return a;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static double recordointrsx(ST_XLabels_t xlp, ST_object_t op, ST_object_t cp, ST_Rect_t rp, double a, ST_object_t[] intrsx) {
+ENTERING("52awwxu810dg9a2pjq45aomam","recordointrsx");
+try {
+ int i = getintrsxi(xlp, op, cp);
+ if (i < 0)
+ i = 5;
+ if (intrsx[i] != null) {
+ double sa, maxa = 0.0;
+ final ST_Rect_t srect = new ST_Rect_t();
+ /* keep maximally overlapping object */
+ objp2rect(intrsx[i], srect);
+ sa = aabbaabb(rp, srect);
+ if (sa > a)
+ maxa = sa;
+ /*keep maximally overlapping label */
+ if (intrsx[i].lbl!=null) {
+ objplp2rect(intrsx[i], srect);
+ sa = aabbaabb(rp, srect);
+ if (sa > a)
+ maxa = sa > maxa ? sa : maxa;
+ }
+ if (maxa > 0.0)
+ return maxa;
+ /*replace overlapping label/object pair */
+ intrsx[i] = cp;
+ return a;
+ }
+ intrsx[i] = cp;
+ return a;
+} finally {
+LEAVING("52awwxu810dg9a2pjq45aomam","recordointrsx");
+}
}
@@ -478,40 +507,38 @@ throw new UnsupportedOperationException();
//3 2umrncgkunxoyeuc8i9hd5pwa
// static double recordlintrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp, double a, object_t * intrsx[9])
-public static Object recordlintrsx(Object... arg) {
-UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); // static double
-UNSUPPORTED("a36vanbvru4xq84pujn0rdpr5"); // recordlintrsx(XLabels_t * xlp, object_t * op, object_t * cp, Rect_t * rp,
-UNSUPPORTED("apwjxkvmqelrsmtxwca7febp5"); // double a, object_t * intrsx[9])
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("ejj0lh0dxc3weinkmoqplvk87"); // int i = getintrsxi(xlp, op, cp);
-UNSUPPORTED("7jqpiltkvdvvkjldnxqmz4nfw"); // if (i < 0)
-UNSUPPORTED("cmp9l0lizmu0ars1jf1oxdms"); // i = 5;
-UNSUPPORTED("b3zyhtz43kkfxl6c8kovnaukv"); // if (intrsx[i] != (void *)0) {
-UNSUPPORTED("908eps96desp6goewhn8nkz4v"); // double sa, maxa = 0.0;
-UNSUPPORTED("cz5yjl642c9a3c7quub0ndp2a"); // Rect_t srect;
-UNSUPPORTED("aq0f27u636o0qqw392noohjgj"); // /* keep maximally overlapping object */
-UNSUPPORTED("5vocmgb870od0q18046qxkydh"); // objp2rect(intrsx[i], &srect);
-UNSUPPORTED("3by02iwc6g6vz00qca2gs8af1"); // sa = aabbaabb(rp, &srect);
-UNSUPPORTED("77dloi6nsmguqzpi413an26qc"); // if (sa > a)
-UNSUPPORTED("8e6d6m12amff6diyc58bdpzap"); // maxa = sa;
-UNSUPPORTED("2d4heu1iudrpn42muf8z4aedr"); // /*keep maximally overlapping label */
-UNSUPPORTED("5g3p1wh0h43afgmy1ttrgr1jv"); // if (intrsx[i]->lbl) {
-UNSUPPORTED("e5ldv4apogj6g1ixv62v7fqn7"); // objplp2rect(intrsx[i], &srect);
-UNSUPPORTED("6h73h574xwo051r2xjepln3kk"); // sa = aabbaabb(rp, &srect);
-UNSUPPORTED("cl94uq2flao8cddtvg02oliwb"); // if (sa > a)
-UNSUPPORTED("d9hnc5ox6fsga1e2336gg1fwv"); // maxa = sa > maxa ? sa : maxa;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("6nmie1l1f5g573kzykn3266zd"); // if (maxa > 0.0)
-UNSUPPORTED("dm9264t4efl70h617d1apqrlj"); // return maxa;
-UNSUPPORTED("3vems3bwps1fshis117u06l2l"); // /*replace overlapping label/object pair */
-UNSUPPORTED("c3ewj48u0ngzq2xd8g3238ays"); // intrsx[i] = cp;
-UNSUPPORTED("efte22brajv8hm98pgq1oyjc5"); // return a;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("2u8wtbwfirvx570l7nhbkqwmn"); // intrsx[i] = cp;
-UNSUPPORTED("3gfohtnqgemf2e1akg4je944a"); // return a;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static double recordlintrsx(ST_XLabels_t xlp, ST_object_t op, ST_object_t cp, ST_Rect_t rp, double a, ST_object_t intrsx[]) {
+ENTERING("2umrncgkunxoyeuc8i9hd5pwa","recordlintrsx");
+try {
+ int i = getintrsxi(xlp, op, cp);
+ if (i < 0)
+ i = 5;
+ if (intrsx[i] != null) {
+ double sa, maxa = 0.0;
+ final ST_Rect_t srect = new ST_Rect_t();
+ /* keep maximally overlapping object */
+ objp2rect(intrsx[i], srect);
+ sa = aabbaabb(rp, srect);
+ if (sa > a)
+ maxa = sa;
+ /*keep maximally overlapping label */
+ if (intrsx[i].lbl!=null) {
+ objplp2rect(intrsx[i], srect);
+ sa = aabbaabb(rp, srect);
+ if (sa > a)
+ maxa = sa > maxa ? sa : maxa;
+ }
+ if (maxa > 0.0)
+ return maxa;
+ /*replace overlapping label/object pair */
+ intrsx[i] = cp;
+ return a;
+ }
+ intrsx[i] = cp;
+ return a;
+} finally {
+LEAVING("2umrncgkunxoyeuc8i9hd5pwa","recordlintrsx");
+}
}
@@ -519,58 +546,65 @@ throw new UnsupportedOperationException();
//3 2td62i5hus8obwt8j1lo3ddj9
// static BestPos_t xlintersections(XLabels_t * xlp, object_t * objp, object_t * intrsx[9])
-public static Object xlintersections(Object... arg) {
-UNSUPPORTED("5d1nc0otrpz1jjsig9p42wcdx"); // static BestPos_t
-UNSUPPORTED("6wd33niscsg9gaphvjj2k27mk"); // xlintersections(XLabels_t * xlp, object_t * objp, object_t * intrsx[9])
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
-UNSUPPORTED("3zfiovc9yy1ux6pn9mcga1mhx"); // LeafList_t *ilp, *llp;
-UNSUPPORTED("a1j5r089evbgqbrk12ebcposk"); // Rect_t rect, srect;
-UNSUPPORTED("ac14qcqjljksbh1ulqbhsnrnb"); // BestPos_t bp;
-UNSUPPORTED("cep99zzwrn6h0kw9g90d0bcx5"); // assert(objp->lbl);
-UNSUPPORTED("at98kl98nqfoglwklw8bmf8dy"); // bp.n = 0;
-UNSUPPORTED("6umte8r5yaoo1st9aa3ak69vv"); // bp.area = 0.0;
-UNSUPPORTED("6lbd8rbktjb11npai18mqgehg"); // bp.pos = objp->lbl->pos;
-UNSUPPORTED("bu059qij9p4jrq3c2fc3dv1tc"); // for(i=0; i<xlp->n_objs; i++) {
-UNSUPPORTED("2ju28cg7zhx8a22r2nngjed1z"); // if(objp == &xlp->objs[i]) continue;
-UNSUPPORTED("8y5ea7egphfppbq3tbxnqvszd"); // if(xlp->objs[i].sz.x > 0 && xlp->objs[i].sz.y > 0) continue;
-UNSUPPORTED("8kr7yfnz75qb1mcurk9ikvqm4"); // if(lblenclosing(objp, &xlp->objs[i]) ) {
-UNSUPPORTED("4szbt8bacnec4eh6741w9202k"); // bp.n++;
-UNSUPPORTED("dquo3qofk56ds5xl95lhvcthf"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("3kxhpoylut0o1vn46d51xaxmm"); // objplp2rect(objp, &rect);
-UNSUPPORTED("2oyraxz5ikxma3gbfbygvqyfb"); // llp = RTreeSearch(xlp->spdx, xlp->spdx->root, &rect);
-UNSUPPORTED("5gmvhcq1f7m3vaw99uu5u2lhh"); // if (!llp)
-UNSUPPORTED("6t20fkj318tjhdok8hlpbsnf7"); // return bp;
-UNSUPPORTED("cu0fy461wercnkus2c5pix4y9"); // for (ilp = llp; ilp; ilp = ilp->next) {
-UNSUPPORTED("694r1mgceoxxp4ktbci1h2qnm"); // double a, ra;
-UNSUPPORTED("6sqdh7rdwpg33jt0ecjx3yobj"); // object_t *cp = ilp->leaf->data;
-UNSUPPORTED("7wl0z6xy4danjs21muyt94sm7"); // if (cp == objp)
-UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue;
-UNSUPPORTED("91gncffnouukjk2940jfpcll4"); // /*label-object intersect */
-UNSUPPORTED("8gzbd1z9dm5uszv31wx6una1n"); // objp2rect(cp, &srect);
-UNSUPPORTED("c5t1kwupnkevwfpx3deb42y52"); // a = aabbaabb(&rect, &srect);
-UNSUPPORTED("9zmfoo91yy2c8v5o1x9tul9a5"); // if (a > 0.0) {
-UNSUPPORTED("di2i1k0ht9d4tbn1d0os7lj44"); // ra = recordointrsx(xlp, objp, cp, &rect, a, intrsx);
-UNSUPPORTED("20fp32yan59vu7bbp6jc1t8fn"); // bp.n++;
-UNSUPPORTED("asfx7fyb1rvar23xmjcttxkyc"); // bp.area += ra;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("6pabj7ne9s1dinxh7rgynt84r"); // /*label-label intersect */
-UNSUPPORTED("6azbae5tbds7g6ytolv14300v"); // if (!cp->lbl || !cp->lbl->set)
-UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue;
-UNSUPPORTED("4jw7tfl9ltqgflydxukej7r0d"); // objplp2rect(cp, &srect);
-UNSUPPORTED("c5t1kwupnkevwfpx3deb42y52"); // a = aabbaabb(&rect, &srect);
-UNSUPPORTED("9zmfoo91yy2c8v5o1x9tul9a5"); // if (a > 0.0) {
-UNSUPPORTED("db5ir72mk4a23hg0pqyapmdav"); // ra = recordlintrsx(xlp, objp, cp, &rect, a, intrsx);
-UNSUPPORTED("20fp32yan59vu7bbp6jc1t8fn"); // bp.n++;
-UNSUPPORTED("asfx7fyb1rvar23xmjcttxkyc"); // bp.area += ra;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("6q4puajbcusq4jhaq2i60nlt4"); // RTreeLeafListFree(llp);
-UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+public static ST_BestPos_t xlintersections(ST_XLabels_t xlp, ST_object_t objp, ST_object_t intrsx[]) {
+ENTERING("2td62i5hus8obwt8j1lo3ddj9","xlintersections");
+try {
+ return (ST_BestPos_t) xlintersections_(xlp, objp, intrsx).copy();
+} finally {
+LEAVING("2td62i5hus8obwt8j1lo3ddj9","xlintersections");
+}
+}
-throw new UnsupportedOperationException();
+private static ST_BestPos_t xlintersections_(ST_XLabels_t xlp, ST_object_t objp, ST_object_t intrsx[]) {
+ int i;
+ ST_LeafList_t ilp, llp;
+ final ST_Rect_t rect = new ST_Rect_t();
+ final ST_Rect_t srect = new ST_Rect_t();
+ final ST_BestPos_t bp = new ST_BestPos_t();
+// assert(objp->lbl);
+ bp.setInt("n", 0);
+ bp.setDouble("area", 0.0);
+ bp.setStruct("pos", objp.lbl.getStruct().pos);
+ for(i=0; i<xlp.n_objs; i++) {
+ if (EQ(objp, xlp.objs.plus(i).getStruct())) continue;
+ if(xlp.objs.get(i).sz.x > 0 && xlp.objs.get(i).sz.y > 0) continue;
+ if(lblenclosing(objp, (ST_object_t) xlp.objs.plus(i).getStruct())) {
+ bp.setInt("n", bp.n+1);
+ }
+ }
+ objplp2rect((ST_object_t) objp.getStruct(), rect);
+ llp = RTreeSearch((ST_RTree)xlp.spdx, (ST_Node_t___)xlp.spdx.root, rect);
+ if (N(llp))
+ return bp;
+ for (ilp = llp; ilp!=null; ilp = (ST_LeafList_t) ilp.next) {
+ double a, ra;
+ // WARNING FOR TRANSLATION
+ // In the C code, "data" was used. However ST_Branch_t is very close to ST_Leaf_t
+ // So in Java version, ST_Leaf_t has been removed and ST_Branch_t is used instead
+ ST_object_t cp = (ST_object_t) ilp.leaf.child;
+ if (EQ(cp, objp))
+ continue;
+ /*label-object intersect */
+ objp2rect((ST_object_t) cp.getStruct(), srect);
+ a = aabbaabb(rect, srect);
+ if (a > 0.0) {
+ ra = recordointrsx(xlp, objp, cp, rect, a, intrsx);
+ bp.setInt("n", bp.n+1);
+ bp.setDouble("area", bp.area+ra);
+ }
+ /*label-label intersect */
+ if (N(cp.lbl) || N(cp.lbl.getStruct().set))
+ continue;
+ objplp2rect((ST_object_t) cp.getStruct(), srect);
+ a = aabbaabb(rect, srect);
+ if (a > 0.0) {
+ ra = recordlintrsx(xlp, objp, cp, rect, a, intrsx);
+ bp.setInt("n", bp.n+1);
+ bp.setDouble("area", bp.area+ra);
+ }
+ }
+ RTreeLeafListFree(llp);
+ return bp;
}
@@ -578,78 +612,85 @@ throw new UnsupportedOperationException();
//3 8rxvucqsqnqej6h8p1osfnk4b
// static BestPos_t xladjust(XLabels_t * xlp, object_t * objp)
-public static Object xladjust(Object... arg) {
-UNSUPPORTED("855u8yvlwgwm8xrgmk8yd4q2g"); // static BestPos_t xladjust(XLabels_t * xlp, object_t * objp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("3wparjbgs7cft1xsjcztm8bdh"); // xlabel_t *lp = objp->lbl;
-UNSUPPORTED("3z9wizs5r8uuyz9r6zxqmltyr"); // double xincr = ((2 * lp->sz.x) + objp->sz.x) / 8;
-UNSUPPORTED("6y5jbcs5zcnghcye723x4gerv"); // double yincr = ((2 * lp->sz.y) + objp->sz.y) / 2;
-UNSUPPORTED("75ucply06uar4cxvlazotnq23"); // object_t *intrsx[9];
-UNSUPPORTED("9akjtu5ebkpokhkmmtkmz7alu"); // BestPos_t bp, nbp;
-UNSUPPORTED("cep99zzwrn6h0kw9g90d0bcx5"); // assert(objp->lbl);
-UNSUPPORTED("8imr23u6gekt0djjf1kronrfn"); // memset(intrsx, 0, sizeof(intrsx));
-UNSUPPORTED("1yhd7hlhm8avh8zzfa6szjhz"); // /*x left */
-UNSUPPORTED("9j4u90wq1z4maw7hj3ecfdm76"); // lp->pos.x = objp->pos.x - lp->sz.x;
-UNSUPPORTED("dximv1vws8eaor4idmmxl4cxm"); // /*top */
-UNSUPPORTED("2fqhd5bouvdzxkjo7cb26f1be"); // lp->pos.y = objp->pos.y + objp->sz.y;
-UNSUPPORTED("4ol5wxgvom71bm5d6x8u1uhce"); // bp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("b2di2eiikxmj7aprwrglzmouu"); // if (bp.n == 0)
-UNSUPPORTED("6t20fkj318tjhdok8hlpbsnf7"); // return bp;
-UNSUPPORTED("aagnln5mk16fd69wnvh7p5m33"); // /*mid */
-UNSUPPORTED("b7imuebo95ow7fl42ukl08csq"); // lp->pos.y = objp->pos.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("d0vrsmmihdqn5mrg1ukoz4opr"); // /*bottom */
-UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("7fnjcyugtimcpcfm4309c9tdm"); // /*x mid */
-UNSUPPORTED("321pfgsh01nbsjro6xmf2ayfz"); // lp->pos.x = objp->pos.x;
-UNSUPPORTED("dximv1vws8eaor4idmmxl4cxm"); // /*top */
-UNSUPPORTED("2fqhd5bouvdzxkjo7cb26f1be"); // lp->pos.y = objp->pos.y + objp->sz.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("d0vrsmmihdqn5mrg1ukoz4opr"); // /*bottom */
-UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("630ofptck59xowlm1hcwiue59"); // /*x right */
-UNSUPPORTED("3zrvv0dmz98537x06egk4mwsj"); // lp->pos.x = objp->pos.x + objp->sz.x;
-UNSUPPORTED("dximv1vws8eaor4idmmxl4cxm"); // /*top */
-UNSUPPORTED("2fqhd5bouvdzxkjo7cb26f1be"); // lp->pos.y = objp->pos.y + objp->sz.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("aagnln5mk16fd69wnvh7p5m33"); // /*mid */
-UNSUPPORTED("b7imuebo95ow7fl42ukl08csq"); // lp->pos.y = objp->pos.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("d0vrsmmihdqn5mrg1ukoz4opr"); // /*bottom */
-UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y;
-UNSUPPORTED("4a8niot6lun3zef1tls6aomot"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5d0zdvxl3sgzkryeuli9o53y8"); // if (nbp.n == 0)
-UNSUPPORTED("6a6aos5zy43mcgqak0sb6pm5f"); // return nbp;
-UNSUPPORTED("anqn2ghhjsx21704j9hnkxqle"); // if (nbp.area < bp.area)
-UNSUPPORTED("ct5bwjy62uv01c11htvtjj68p"); // bp = nbp;
-UNSUPPORTED("6eft7mmbcin2x9bhx6gvtc33b"); // /*sliding from top left */
-UNSUPPORTED("2lmnvn101cpkt9b1cwipe71gz"); // if (intrsx[6] || intrsx[7] || intrsx[8] || intrsx[3] || intrsx[0]) { /* have to move */
+public static ST_BestPos_t xladjust(ST_XLabels_t xlp, ST_object_t objp) {
+ENTERING("8rxvucqsqnqej6h8p1osfnk4b","xladjust");
+try {
+ return (ST_BestPos_t) xladjust_(xlp, objp).copy();
+} finally {
+LEAVING("8rxvucqsqnqej6h8p1osfnk4b","xladjust");
+}
+}
+private static ST_BestPos_t xladjust_(ST_XLabels_t xlp, ST_object_t objp) {
+ ST_xlabel_t.Array lp = (ST_xlabel_t.Array) objp.lbl; // ST_xlabel_t
+ double xincr = ((2 * lp.getStruct().sz.x + objp.sz.x)) / 8;
+ double yincr = ((2 * lp.getStruct().sz.y + objp.sz.y)) / 2;
+ ST_object_t intrsx[] = new ST_object_t[9];
+ final ST_BestPos_t bp = new ST_BestPos_t();
+ final ST_BestPos_t nbp = new ST_BestPos_t();
+ // assert(objp->lbl);
+ // memset(intrsx, 0, sizeof(intrsx));
+ /*x left */
+ lp.getStruct().pos.setDouble("x", objp.pos.x - lp.getStruct().sz.x);
+ /*top */
+ lp.getStruct().pos.setDouble("y", objp.pos.y + objp.sz.y);
+ bp.___(xlintersections(xlp, objp, intrsx));
+ if (bp.n == 0)
+ return bp;
+ /*mid */
+ lp.getStruct().pos.setDouble("y", objp.pos.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+ if (nbp.n == 0)
+ return nbp;
+ if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*bottom */
+ lp.getStruct().pos.setDouble("y", objp.pos.y - lp.getStruct().sz.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+ if (nbp.n == 0)
+ return nbp;
+ if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*x mid */
+ lp.getStruct().pos.setDouble("x", objp.pos.x);
+ /*top */
+ lp.getStruct().pos.setDouble("y", objp.pos.y + objp.sz.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+ if (nbp.n == 0)
+ return nbp;
+ if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*bottom */
+ lp.getStruct().pos.setDouble("y", objp.pos.y - lp.getStruct().sz.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+ if (nbp.n == 0)
+ return nbp;
+ if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*x right */
+ lp.getStruct().pos.setDouble("x", objp.pos.x + objp.sz.x);
+ /*top */
+ lp.getStruct().pos.setDouble("y", objp.pos.y + objp.sz.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+if (nbp.n == 0)
+return nbp;
+if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*mid */
+ lp.getStruct().pos.setDouble("y", objp.pos.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+if (nbp.n == 0)
+return nbp;
+if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*bottom */
+ lp.getStruct().pos.setDouble("y", objp.pos.y - lp.getStruct().sz.y);
+ nbp.___(xlintersections(xlp, objp, intrsx));
+if (nbp.n == 0)
+return nbp;
+if (nbp.area < bp.area)
+ bp.___(nbp);
+ /*sliding from top left */
+ if (intrsx[6]!=null || intrsx[7]!=null || intrsx[8]!=null || intrsx[3]!=null || intrsx[0]!=null) { /* have to move */
UNSUPPORTED("c5acs4cl77hgu5j6nmhk090uz"); // if (!intrsx[7] && !intrsx[8]) { /* some room right? */
UNSUPPORTED("ez8sbh237xdqdjeewev2ys74y"); // /* slide along upper edge */
UNSUPPORTED("ajgw2jggmwmofm77lgbx5eo2n"); // for (lp->pos.x = objp->pos.x - lp->sz.x,
@@ -676,25 +717,25 @@ UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area)
UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp;
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("8nu4s12gyh52h2ot9r2mlueuv"); // /*sliding from bottom right */
-UNSUPPORTED("3zrvv0dmz98537x06egk4mwsj"); // lp->pos.x = objp->pos.x + objp->sz.x;
-UNSUPPORTED("f5b4ggww4fzy0j1ustukdd023"); // lp->pos.y = objp->pos.y - lp->sz.y;
-UNSUPPORTED("9bzyoo2lc0pw2w76mz7eeduvc"); // if (intrsx[2] || intrsx[1] || intrsx[0] || intrsx[5] || intrsx[8]) { /* have to move */
-UNSUPPORTED("dq7ul34gznvszkqhgqlz4fihm"); // if (!intrsx[1] && !intrsx[0]) { /* some room left? */
-UNSUPPORTED("ahn6dk8lj2by2umnd8pceb83d"); // /* slide along lower edge */
-UNSUPPORTED("7natp0873pfsvymhhhvki1sev"); // for (lp->pos.x = objp->pos.x + objp->sz.x,
-UNSUPPORTED("56ycmo0ljb7e86mnezdx3regh"); // lp->pos.y = objp->pos.y - lp->sz.y;
-UNSUPPORTED("3wro576dh2vj9wpmfxx4rldbm"); // lp->pos.x >= (objp->pos.x - lp->sz.x);
-UNSUPPORTED("bvw5pjd7v4j796l8hhh1zrln6"); // lp->pos.x -= xincr) {
-UNSUPPORTED("8pbum2o0fs86ceaiuxv4efbb6"); // nbp = xlintersections(xlp, objp, intrsx);
-UNSUPPORTED("5xx7o143ftoj0rhyhg1hqgioa"); // if (nbp.n == 0)
-UNSUPPORTED("eqanxe9w90oki7yqvwyzpfcw1"); // return nbp;
-UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area)
-UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp;
-UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("4owpyb9p8esm06ttngj1arl5c"); // if (!intrsx[5] && !intrsx[8]) { /* some room up? */
+ }
+ /*sliding from bottom right */
+ lp.getStruct().pos.setDouble("x", objp.pos.x + objp.sz.x);
+ lp.getStruct().pos.setDouble("y", objp.pos.y - lp.getStruct().sz.y);
+ if (intrsx[2]!=null || intrsx[1]!=null || intrsx[0]!=null || intrsx[5]!=null || intrsx[8]!=null) { /* have to move */
+ if (N(intrsx[1]) && N(intrsx[0])) { /* some room left? */
+ /* slide along lower edge */
+ for (lp.getStruct().pos.setDouble("x", objp.pos.x + objp.sz.x),
+ lp.getStruct().pos.setDouble("y", objp.pos.y - lp.getStruct().sz.y);
+ lp.getStruct().pos.x >= (objp.pos.x - lp.getStruct().sz.x);
+ lp.getStruct().pos.setDouble("x", lp.getStruct().pos.x - xincr)) {
+ nbp.___(xlintersections(xlp, objp, intrsx));
+ if (nbp.n == 0)
+ return nbp;
+ if (nbp.area < bp.area)
+ bp.___(nbp);
+ }
+ }
+ if (N(intrsx[5]) && N(intrsx[8])) { /* some room up? */
UNSUPPORTED("4bcpk3ixfwrlr0yzrjv2efigj"); // /* slide up right edge */
UNSUPPORTED("7natp0873pfsvymhhhvki1sev"); // for (lp->pos.x = objp->pos.x + objp->sz.x,
UNSUPPORTED("56ycmo0ljb7e86mnezdx3regh"); // lp->pos.y = objp->pos.y - lp->sz.y;
@@ -706,12 +747,9 @@ UNSUPPORTED("eqanxe9w90oki7yqvwyzpfcw1"); // return nbp;
UNSUPPORTED("8yd6g3a3f0g09gmu5f67vah0x"); // if (nbp.area < bp.area)
UNSUPPORTED("d6ac36j6lh6qspxwnn3vi0uc3"); // bp = nbp;
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("bgo7070e5cs998w6zp1ma85ad"); // return bp;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+ }
+ }
+ return bp;
}
@@ -719,30 +757,30 @@ throw new UnsupportedOperationException();
//3 e29g2hwlogx0zchsnvi464c7t
// static int xlhdxload(XLabels_t * xlp)
-public static Object xlhdxload(Object... arg) {
-UNSUPPORTED("ttxmlo99ck9eo0jae04cg2v0"); // static int xlhdxload(XLabels_t * xlp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
-UNSUPPORTED("5qghcwlht7sxz3cthtja5f043"); // int order = xlhorder(xlp);
-UNSUPPORTED("eali4r93mgkm937waq6to82sj"); // for (i = 0; i < xlp->n_objs; i++) {
-UNSUPPORTED("aves0wxiz65s447kr8wukl6zr"); // HDict_t *hp;
-UNSUPPORTED("43j1m17g0mjbn69pbx7ph6omt"); // point pi;
-UNSUPPORTED("bn6ewrzw1x1whedilfc6kobal"); // hp = (HDict_t*)zmalloc(sizeof(HDict_t));
-UNSUPPORTED("5wresbe1bm8eff0j10in23a8b"); // hp->d.data = &xlp->objs[i];
-UNSUPPORTED("7syosspcm4ygedrsu0c1gaqop"); // hp->d.rect = objplpmks(xlp, &xlp->objs[i]);
-UNSUPPORTED("6mb29odwxakb6cqdulhhed9j5"); // /* center of the labeling area */
-UNSUPPORTED("83ihi4lf580lzo4gdus20wr2w"); // pi.x = hp->d.rect.boundary[0] +
-UNSUPPORTED("ao944ocofv44otdeh08kl4u8o"); // (hp->d.rect.boundary[2] - hp->d.rect.boundary[0]) / 2;
-UNSUPPORTED("3igtyiyl8cpovcwukpm44iquw"); // pi.y = hp->d.rect.boundary[1] +
-UNSUPPORTED("3r4kfmd4lw5d0osh14sf4cjwg"); // (hp->d.rect.boundary[3] - hp->d.rect.boundary[1]) / 2;
-UNSUPPORTED("42x3x9vgkald7xdpbxyxih2zj"); // hp->key = hd_hil_s_from_xy(pi, order);
-UNSUPPORTED("4apoyv2n3t2fcv72hom4owvgj"); // if (!((*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(hp),0000001)))
-UNSUPPORTED("aivfd7ajlfz8o8oi68d4u5s5z"); // return -1;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int xlhdxload(ST_XLabels_t xlp) {
+ENTERING("e29g2hwlogx0zchsnvi464c7t","xlhdxload");
+try {
+ int i;
+ int order = xlhorder(xlp);
+ for (i = 0; i < xlp.n_objs; i++) {
+ ST_HDict_t hp;
+ final ST_point pi = new ST_point();
+ hp = new ST_HDict_t();
+ hp.d.child = xlp.objs.get(i);
+ hp.d.setStruct("rect", objplpmks(xlp, (ST_object_t) xlp.objs.plus(i).getStruct()));
+ /* center of the labeling area */
+ pi.setInt("x", hp.d.rect.boundary[0] +
+ (hp.d.rect.boundary[2] - hp.d.rect.boundary[0]) / 2);
+ pi.setInt("y", hp.d.rect.boundary[1] +
+ (hp.d.rect.boundary[3] - hp.d.rect.boundary[1]) / 2);
+ hp.setInt("key", hd_hil_s_from_xy(pi, order));
+ if (N(xlp.hdx.searchf.exe(xlp.hdx, hp, 0000001)))
+ return -1;
+ }
+ return 0;
+} finally {
+LEAVING("e29g2hwlogx0zchsnvi464c7t","xlhdxload");
+}
}
@@ -750,23 +788,26 @@ throw new UnsupportedOperationException();
//3 26qpvnyd6tmdut8i2wo4itza3
// static void xlhdxunload(XLabels_t * xlp)
-public static Object xlhdxunload(Object... arg) {
-UNSUPPORTED("4bsnj74f63qe288s6be1xmrzw"); // static void xlhdxunload(XLabels_t * xlp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("9sqtid8yyo2ws8avf33utdebf"); // int size=dtsize(xlp->hdx), freed=0;
-UNSUPPORTED("dm7bmt2fwlkdskmcebdm1ctqj"); // while(dtsize(xlp->hdx) ) {
-UNSUPPORTED("a3jz6ykhoarsdfviidq7beb9z"); // void*vp=(((Dt_t*)(xlp->hdx))->data->here ? (((Dt_t*)((xlp->hdx)))->disc->link < 0 ? ((Dthold_t*)((((Dt_t*)(xlp->hdx))->data->here)))->obj : (void*)((char*)((((Dt_t*)(xlp->hdx))->data->here)) - ((Dt_t*)((xlp->hdx)))->disc->link) ):(void*)(0));
-UNSUPPORTED("2covsywkzvpkysnjf34nmr1uw"); // assert(vp);
-UNSUPPORTED("a9jmr8hmnwcky7f1e1qorwnjv"); // if(vp) {
-UNSUPPORTED("d2vfgb4tj6x8x7cq0kv0qgk23"); // (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(vp),0010000);
-UNSUPPORTED("7f4abg2jsf465jjlnp95d9sk6"); // free(vp);
-UNSUPPORTED("5hklxkrkvjgi37kkm6v9xajwc"); // freed++;
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // }
-UNSUPPORTED("bifp41eoqo8l51crrab087z21"); // assert(size==freed);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static void xlhdxunload(ST_XLabels_t xlp) {
+ENTERING("26qpvnyd6tmdut8i2wo4itza3","xlhdxunload");
+try {
+//UNSUPPORTED("4bsnj74f63qe288s6be1xmrzw"); // static void xlhdxunload(XLabels_t * xlp)
+//UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
+//UNSUPPORTED("9sqtid8yyo2ws8avf33utdebf"); // int size=dtsize(xlp->hdx), freed=0;
+//UNSUPPORTED("dm7bmt2fwlkdskmcebdm1ctqj"); // while(dtsize(xlp->hdx) ) {
+//UNSUPPORTED("a3jz6ykhoarsdfviidq7beb9z"); // void*vp=(((Dt_t*)(xlp->hdx))->data->here ? (((Dt_t*)((xlp->hdx)))->disc->link < 0 ? ((Dthold_t*)((((Dt_t*)(xlp->hdx))->data->here)))->obj : (void*)((char*)((((Dt_t*)(xlp->hdx))->data->here)) - ((Dt_t*)((xlp->hdx)))->disc->link) ):(void*)(0));
+//UNSUPPORTED("2covsywkzvpkysnjf34nmr1uw"); // assert(vp);
+//UNSUPPORTED("a9jmr8hmnwcky7f1e1qorwnjv"); // if(vp) {
+//UNSUPPORTED("d2vfgb4tj6x8x7cq0kv0qgk23"); // (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(vp),0010000);
+//UNSUPPORTED("7f4abg2jsf465jjlnp95d9sk6"); // free(vp);
+//UNSUPPORTED("5hklxkrkvjgi37kkm6v9xajwc"); // freed++;
+//UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
+//UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // }
+//UNSUPPORTED("bifp41eoqo8l51crrab087z21"); // assert(size==freed);
+//UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
+} finally {
+LEAVING("26qpvnyd6tmdut8i2wo4itza3","xlhdxunload");
+}
}
@@ -774,18 +815,25 @@ throw new UnsupportedOperationException();
//3 3wrxwwd3y5ts0ekr32o8vhuvv
// static int xlspdxload(XLabels_t * xlp)
-public static Object xlspdxload(Object... arg) {
-UNSUPPORTED("87f4jxirnq7mx28zcremgaezf"); // static int xlspdxload(XLabels_t * xlp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("eoerd3bf05xvvfj7aisz4slcs"); // HDict_t *op=0;
-UNSUPPORTED("2ub4kt9g1hlj02ucnbi3as0ps"); // for (op = (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(0),0000200); op; op = (*(((Dt_t*)(xlp->hdx))->searchf))((xlp->hdx),(void*)(op),0000010)) {
-UNSUPPORTED("cklsugu3v9hzi5pvl4dqcq7gf"); // /* tree rectangle data node lvl */
-UNSUPPORTED("b49ahflq7xke1g6eoxv0jw2tg"); // RTreeInsert(xlp->spdx, &op->d.rect, op->d.data, &xlp->spdx->root, 0);
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int xlspdxload(ST_XLabels_t xlp) {
+ENTERING("3wrxwwd3y5ts0ekr32o8vhuvv","xlspdxload");
+try {
+ ST_HDict_t op=null;
+ for (op = (ST_HDict_t) xlp.hdx.searchf.exe(xlp.hdx, null, 0000200); op!=null;
+ op = (ST_HDict_t) xlp.hdx.searchf.exe(xlp.hdx, op, 0000010)) {
+ /* tree rectangle data node lvl */
+// RTreeInsert(xlp->spdx, &op->d.rect, op->d.data, &xlp->spdx->root, 0);
+ // WARNING ARRAY
+ final ST_Node_t___[] tmp = new ST_Node_t___[] {(ST_Node_t___) xlp.spdx.root};
+ RTreeInsert((ST_RTree) xlp.spdx, (ST_Rect_t)op.d.rect,
+ op.d.child,
+ tmp, 0);
+ xlp.spdx.setPtr("root", tmp[0]);
+ }
+ return 0;
+} finally {
+LEAVING("3wrxwwd3y5ts0ekr32o8vhuvv","xlspdxload");
+}
}
@@ -793,19 +841,19 @@ throw new UnsupportedOperationException();
//3 6d3fqrllm55toeo3wscwvv4ty
// static int xlinitialize(XLabels_t * xlp)
-public static Object xlinitialize(Object... arg) {
-UNSUPPORTED("732719k3woyiirridxkwkzxoo"); // static int xlinitialize(XLabels_t * xlp)
-UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
-UNSUPPORTED("4s45njph0l3mj07r60fuv2k3y"); // int r=0;
-UNSUPPORTED("ez5mifho06mx5h3ncausptuzp"); // if ((r = xlhdxload(xlp)) < 0)
-UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r;
-UNSUPPORTED("f2rrvhf7kqopq3w2vk3a66gqq"); // if ((r = xlspdxload(xlp)) < 0)
-UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r;
-UNSUPPORTED("5stn8d1urg4jlet1hh0it6cnh"); // xlhdxunload(xlp);
-UNSUPPORTED("bevdavatk2tsg3i7wugaqk0ta"); // return dtclose(xlp->hdx);
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+public static int xlinitialize(ST_XLabels_t xlp) {
+ENTERING("6d3fqrllm55toeo3wscwvv4ty","xlinitialize");
+try {
+ int r=0;
+ if ((r = xlhdxload(xlp)) < 0)
+ return r;
+ if ((r = xlspdxload(xlp)) < 0)
+ return r;
+ xlhdxunload(xlp);
+ return dtclose((ST_dt_s) xlp.hdx);
+} finally {
+LEAVING("6d3fqrllm55toeo3wscwvv4ty","xlinitialize");
+}
}
@@ -813,51 +861,54 @@ throw new UnsupportedOperationException();
//3 brqgbskh3z4ah8infjompibvu
// int placeLabels(object_t * objs, int n_objs, xlabel_t * lbls, int n_lbls, label_params_t * params)
-public static int placeLabels(__ptr__ objs, int n_objs, __ptr__ lbls, int n_lbls, label_params_t params) {
+public static int placeLabels(ST_object_t.Array objs, int n_objs, ST_xlabel_t.Array lbls, int n_lbls, ST_label_params_t params) {
+ENTERING("brqgbskh3z4ah8infjompibvu","placeLabels");
+try {
int r, i;
-BestPos_t bp;
-XLabels_t xlp = xlnew(objs, n_objs, lbls, n_lbls, params);
-UNSUPPORTED("dm5w2lmehr2rv6b2yi2v83i3g"); // if ((r = xlinitialize(xlp)) < 0)
-UNSUPPORTED("bt8wt6mqb316pv7egiekltb74"); // return r;
-UNSUPPORTED("8izrf1sxed8y2dmpz5ju27b6h"); // /* Place xlabel_t* lp near lp->obj so that the rectangle whose lower-left
-UNSUPPORTED("dy7wplw95swrlkv1ne5udmbk4"); // * corner is lp->pos, and size is lp->sz does not intersect any object
-UNSUPPORTED("8x5vdo798lnffr7xy14gs8x50"); // * in objs (by convention, an object consisting of a single point
-UNSUPPORTED("9gxb8rlhafdv5g89oagw3add7"); // * intersects nothing) nor any other label, if possible. On input,
-UNSUPPORTED("4w8t3nbzjsvab8g9jpodkwd8m"); // * lp->set is 0.
-UNSUPPORTED("e715w78m2sgdlih8srgyerdiv"); // *
-UNSUPPORTED("z4vevdpoynmn19xji08qzk3g"); // * On output, any label with a position should have this stored in
-UNSUPPORTED("4v5b9m6g4uktmdpnsll0erj7z"); // * lp->pos and have lp->set non-zero.
-UNSUPPORTED("e715w78m2sgdlih8srgyerdiv"); // *
-UNSUPPORTED("3lkc8tv6lv7r7ufa9evyti04j"); // * If params->force is true, all labels must be positioned, even if
-UNSUPPORTED("4lybka8gtaqneks34nylp952d"); // * overlaps are necessary.
-UNSUPPORTED("e715w78m2sgdlih8srgyerdiv"); // *
-UNSUPPORTED("5frb7jkllwey3jie0brk7sexw"); // * Return 0 if all labels could be placed without overlap;
-UNSUPPORTED("b8t343yuuec8v0l5c25l9lpi9"); // * non-zero otherwise.
-UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); // */
-UNSUPPORTED("dfy198s0balu93ez4di7muow9"); // r = 0;
-UNSUPPORTED("bznihqrwh4167vo2mn4du53da"); // for (i = 0; i < n_objs; i++) {
-UNSUPPORTED("1kray7p45i859cpqe20uu98y6"); // if (objs[i].lbl == 0)
-UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); // continue;
-UNSUPPORTED("572cl1ylp2iqus4kjdigoqut3"); // bp = xladjust(xlp, &objs[i]);
-UNSUPPORTED("dr8tnm5vyr6b4kb5le39f33s9"); // if (bp.n == 0) {
-UNSUPPORTED("1wsz4ptoxskyulgu7czf059sf"); // objs[i].lbl->set = 1;
-UNSUPPORTED("crlmrxaiu6t07d3ztas7pwfoi"); // } else if(bp.area == 0) {
-UNSUPPORTED("djsgfzak14js9ukvgmoqnkm8v"); // objs[i].lbl->pos.x = bp.pos.x;
-UNSUPPORTED("5s2aq4djc0l3xyilkowd7ri1r"); // objs[i].lbl->pos.y = bp.pos.y;
-UNSUPPORTED("1wsz4ptoxskyulgu7czf059sf"); // objs[i].lbl->set = 1;
-UNSUPPORTED("19st2bzrcserz5r5280g8iwb8"); // } else if (params->force == 1) {
-UNSUPPORTED("djsgfzak14js9ukvgmoqnkm8v"); // objs[i].lbl->pos.x = bp.pos.x;
-UNSUPPORTED("5s2aq4djc0l3xyilkowd7ri1r"); // objs[i].lbl->pos.y = bp.pos.y;
-UNSUPPORTED("1wsz4ptoxskyulgu7czf059sf"); // objs[i].lbl->set = 1;
-UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
-UNSUPPORTED("cqgdtl138trieiu5el4upwpg0"); // r = 1;
-UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
-UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
-UNSUPPORTED("6oy0ry9luo305no4iuqqxcdjr"); // xlfree(xlp);
-UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
-UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
-
-throw new UnsupportedOperationException();
+final ST_BestPos_t bp = new ST_BestPos_t();
+ST_XLabels_t xlp = xlnew(objs, n_objs, lbls, n_lbls, params);
+ if ((r = xlinitialize(xlp)) < 0)
+ return r;
+ /* Place xlabel_t* lp near lp->obj so that the rectangle whose lower-left
+ * corner is lp->pos, and size is lp->sz does not intersect any object
+ * in objs (by convention, an object consisting of a single point
+ * intersects nothing) nor any other label, if possible. On input,
+ * lp->set is 0.
+ *
+ * On output, any label with a position should have this stored in
+ * lp->pos and have lp->set non-zero.
+ *
+ * If params->force is true, all labels must be positioned, even if
+ * overlaps are necessary.
+ *
+ * Return 0 if all labels could be placed without overlap;
+ * non-zero otherwise.
+ */
+ r = 0;
+ for (i = 0; i < n_objs; i++) {
+ if (objs.get(i).lbl == null)
+ continue;
+ xladjust(xlp, (ST_object_t) objs.get(i).getStruct());
+ bp.___(xladjust(xlp, (ST_object_t) objs.get(i).getStruct()));
+ if (bp.n == 0) {
+ objs.get(i).lbl.setInt("set", 1);
+ } else if(bp.area == 0) {
+ objs.get(i).lbl.getStruct().pos.setDouble("x", bp.pos.x);
+ objs.get(i).lbl.getStruct().pos.setDouble("y", bp.pos.y);
+ objs.get(i).lbl.setInt("set", 1);
+ } else if (params.force) {
+ objs.get(i).lbl.getStruct().pos.setDouble("x", bp.pos.x);
+ objs.get(i).lbl.getStruct().pos.setDouble("y", bp.pos.y);
+ objs.get(i).lbl.setInt("set", 1);
+ } else {
+ r = 1;
+ }
+ }
+ xlfree(xlp);
+ return r;
+} finally {
+LEAVING("brqgbskh3z4ah8infjompibvu","placeLabels");
+}
}
diff --git a/src/gen/lib/ortho/ortho__c.java b/src/gen/lib/ortho/ortho__c.java
index 8f66e6d..02fa889 100644
--- a/src/gen/lib/ortho/ortho__c.java
+++ b/src/gen/lib/ortho/ortho__c.java
@@ -47,10 +47,7 @@ package gen.lib.ortho;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
import smetana.core.jmp_buf;
public class ortho__c {
@@ -179,14 +176,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -215,26 +212,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -257,16 +234,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/pack/ccomps__c.java b/src/gen/lib/pack/ccomps__c.java
index 48bb065..5a283ad 100644
--- a/src/gen/lib/pack/ccomps__c.java
+++ b/src/gen/lib/pack/ccomps__c.java
@@ -47,10 +47,7 @@ package gen.lib.pack;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
import smetana.core.jmp_buf;
public class ccomps__c {
@@ -311,14 +308,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -347,26 +344,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -389,16 +366,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/pack/pack__c.java b/src/gen/lib/pack/pack__c.java
index 9222007..6a0702a 100644
--- a/src/gen/lib/pack/pack__c.java
+++ b/src/gen/lib/pack/pack__c.java
@@ -48,13 +48,10 @@ import static gen.lib.cgraph.attr__c.agget;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Agraph_s;
-import h.boxf;
-import h.pack_info;
-import h.pointf;
+import h.ST_Agraph_s;
+import h.ST_pack_info;
+import h.ST_pointf;
import smetana.core.CString;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
public class pack__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -314,14 +311,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -350,26 +347,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
@@ -392,16 +369,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
@@ -1907,7 +1884,7 @@ throw new UnsupportedOperationException();
//3 dyb1n3lhbi0wnr9kvmu6onux9
// pack_mode parsePackModeInfo(char* p, pack_mode dflt, pack_info* pinfo)
-public static int parsePackModeInfo(CString p, int dflt, pack_info pinfo) {
+public static int parsePackModeInfo(CString p, int dflt, ST_pack_info pinfo) {
ENTERING("dyb1n3lhbi0wnr9kvmu6onux9","parsePackModeInfo");
try {
float v;
@@ -1957,7 +1934,7 @@ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
//fprintf (stderr, " size %d\n", pinfo->sz);
//fprintf (stderr, " flags %d\n", pinfo->flags);
//}
- return pinfo.getInt("mode");
+ return pinfo.mode;
} finally {
LEAVING("dyb1n3lhbi0wnr9kvmu6onux9","parsePackModeInfo");
}
@@ -1968,7 +1945,7 @@ LEAVING("dyb1n3lhbi0wnr9kvmu6onux9","parsePackModeInfo");
//3 bnxqpsmvz6tyekstfjte4pzwj
// pack_mode getPackModeInfo(Agraph_t * g, pack_mode dflt, pack_info* pinfo)
-public static int getPackModeInfo(Agraph_s g, int dflt, pack_info pinfo) {
+public static int getPackModeInfo(ST_Agraph_s g, int dflt, ST_pack_info pinfo) {
ENTERING("bnxqpsmvz6tyekstfjte4pzwj","getPackModeInfo");
try {
return parsePackModeInfo (agget(g, new CString("packmode")), dflt, pinfo);
@@ -1998,7 +1975,7 @@ throw new UnsupportedOperationException();
//3 ata97fmix5q1oikrmk5pezvrf
// int getPack(Agraph_t * g, int not_def, int dflt)
-public static int getPack(Agraph_s g, int not_def, int dflt) {
+public static int getPack(ST_Agraph_s g, int not_def, int dflt) {
ENTERING("ata97fmix5q1oikrmk5pezvrf","getPack");
try {
CString p;
@@ -2021,7 +1998,7 @@ LEAVING("ata97fmix5q1oikrmk5pezvrf","getPack");
//3 ce4a70w8ddkj4l9efi74h61s6
// pack_mode getPackInfo(Agraph_t * g, pack_mode dflt, int dfltMargin, pack_info* pinfo)
-public static int getPackInfo(Agraph_s g, int dflt, int dfltMargin, pack_info pinfo) {
+public static int getPackInfo(ST_Agraph_s g, int dflt, int dfltMargin, ST_pack_info pinfo) {
ENTERING("ce4a70w8ddkj4l9efi74h61s6","getPackInfo");
try {
//assert (pinfo);
@@ -2032,7 +2009,7 @@ try {
pinfo.setInt("doSplines", 0);
pinfo.setInt("fixed", 0);
getPackModeInfo(g, dflt, pinfo);
- return pinfo.getInt("mode");
+ return pinfo.mode;
} finally {
LEAVING("ce4a70w8ddkj4l9efi74h61s6","getPackInfo");
}
diff --git a/src/gen/lib/pack/ptest__c.java b/src/gen/lib/pack/ptest__c.java
index 9f2f1c9..e109420 100644
--- a/src/gen/lib/pack/ptest__c.java
+++ b/src/gen/lib/pack/ptest__c.java
@@ -47,10 +47,7 @@ package gen.lib.pack;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.boxf;
-import h.pointf;
-import smetana.core.JUtils;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class ptest__c {
//1 2digov3edok6d5srhgtlmrycs
@@ -310,14 +307,14 @@ throw new UnsupportedOperationException();
//3 c1s4k85p1cdfn176o3uryeros
// static inline pointf pointfof(double x, double y)
-public static __struct__<pointf> pointfof(double x, double y) {
+public static ST_pointf pointfof(double x, double y) {
// WARNING!! STRUCT
return pointfof_w_(x, y).copy();
}
-private static __struct__<pointf> pointfof_w_(double x, double y) {
+private static ST_pointf pointfof_w_(double x, double y) {
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
+ final ST_pointf r = new ST_pointf();
r.setDouble("x", x);
r.setDouble("y", y);
return r;
@@ -346,27 +343,6 @@ throw new UnsupportedOperationException();
-//3 1vvsta5i8of59frav6uymguav
-// static inline boxf boxfof(double llx, double lly, double urx, double ury)
-public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
-// WARNING!! STRUCT
-return boxfof_w_(llx, lly, urx, ury).copy();
-}
-private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
-ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
-try {
- final __struct__<boxf> b = JUtils.from(boxf.class);
- b.getStruct("LL").setDouble("x", llx);
- b.getStruct("LL").setDouble("y", lly);
- b.getStruct("UR").setDouble("x", urx);
- b.getStruct("UR").setDouble("y", ury);
- return b;
-} finally {
-LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
-}
-}
-
-
//3 1n5xl70wxuabyf97mclvilsm6
@@ -388,16 +364,16 @@ throw new UnsupportedOperationException();
//3 arrsbik9b5tnfcbzsm8gr2chx
// static inline pointf add_pointf(pointf p, pointf q)
-public static __struct__<pointf> add_pointf(final __struct__<pointf> p, final __struct__<pointf> q) {
+public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
// WARNING!! STRUCT
return add_pointf_w_(p.copy(), q.copy()).copy();
}
-private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
+private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
try {
- final __struct__<pointf> r = JUtils.from(pointf.class);
- r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
- r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
+ final ST_pointf r = new ST_pointf();
+ r.setDouble("x", p.x + q.x);
+ r.setDouble("y", p.y + q.y);
return r;
} finally {
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
diff --git a/src/gen/lib/pathplan/cvt__c.java b/src/gen/lib/pathplan/cvt__c.java
index dd62cee..d360a6f 100644
--- a/src/gen/lib/pathplan/cvt__c.java
+++ b/src/gen/lib/pathplan/cvt__c.java
@@ -47,8 +47,7 @@ package gen.lib.pathplan;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.UNSUPPORTED;
-import h.pointf;
-import smetana.core.__struct__;
+import h.ST_pointf;
public class cvt__c {
//1 baedz5i9est5csw3epz3cv7z
@@ -248,11 +247,11 @@ throw new UnsupportedOperationException();
//3 3xaxtxslceffm0wx9zcpiqjgb
// static ilcoord_t Bezier(ilcoord_t * V, int degree, double t, ilcoord_t * Left, ilcoord_t * Right)
-public static __struct__<pointf> Bezier(pointf V, int degree, double t, pointf Left, pointf Right) {
+public static ST_pointf Bezier(ST_pointf V, int degree, double t, ST_pointf Left, ST_pointf Right) {
// WARNING!! STRUCT
return Bezier_w_(V, degree, t, Left, Right).copy();
}
-private static __struct__<pointf> Bezier_w_(pointf V, int degree, double t, pointf Left, pointf Right) {
+private static ST_pointf Bezier_w_(ST_pointf V, int degree, double t, ST_pointf Left, ST_pointf Right) {
ENTERING("3xaxtxslceffm0wx9zcpiqjgb","Bezier");
try {
int i, j; /* Index variables */
diff --git a/src/gen/lib/pathplan/route__c.java b/src/gen/lib/pathplan/route__c.java
index c598f53..aa390f5 100644
--- a/src/gen/lib/pathplan/route__c.java
+++ b/src/gen/lib/pathplan/route__c.java
@@ -46,23 +46,18 @@
package gen.lib.pathplan;
import static gen.lib.pathplan.solvers__c.solve3;
import static smetana.core.JUtils.setjmp;
-import static smetana.core.JUtils.sizeof;
import static smetana.core.JUtils.sqrt;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.DISTSQ;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Ppoly_t;
-import h.pointf;
-import h.tna_t;
-import smetana.core.JUtils;
-import smetana.core.Memory;
+import h.ST_Pedge_t;
+import h.ST_Ppoly_t;
+import h.ST_pointf;
+import h.ST_tna_t;
import smetana.core.Z;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
import smetana.core.jmp_buf;
public class route__c {
@@ -91,31 +86,31 @@ private static jmp_buf jbuf = new jmp_buf();
//3 9stmrdqlmufyk2wutp3totr5j
// int Proutespline(Pedge_t * edges, int edgen, Ppolyline_t input, Ppoint_t * evs, Ppolyline_t * output)
-public static int Proutespline(__ptr__ edges, int edgen, final __struct__<Ppoly_t> input, __ptr__ evs, __ptr__ output) {
+public static int Proutespline(ST_Pedge_t.Array edges, int edgen, ST_Ppoly_t input, __ptr__ evs, ST_Ppoly_t output) {
// WARNING!! STRUCT
-return Proutespline_w_(edges, edgen, input.copy(), evs, output);
+return Proutespline_w_(edges, edgen, (ST_Ppoly_t) input.copy(), evs, output);
}
-private static int Proutespline_w_(__ptr__ edges, int edgen, final __struct__<Ppoly_t> input, __ptr__ evs, __ptr__ output) {
+private static int Proutespline_w_(ST_Pedge_t.Array edges, int edgen, final ST_Ppoly_t input, __ptr__ evs, ST_Ppoly_t output) {
ENTERING("9stmrdqlmufyk2wutp3totr5j","Proutespline");
try {
- __ptr__ inps;
+ ST_pointf.Array inps;
int inpn;
/* unpack into previous format rather than modify legacy code */
- inps = input.getPtr("ps");
- inpn = input.getInt("pn");
+ inps = input.ps;
+ inpn = input.pn;
if (setjmp(jbuf)!=0)
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
/* generate the splines */
- evs.plus(0).getStruct().___(normv(evs.plus(0).getStruct()));
- evs.plus(1).getStruct().___(normv(evs.plus(1).getStruct()));
+ evs.plus(0).getStruct().___(normv((ST_pointf) evs.plus(0).getStruct()));
+ evs.plus(1).getStruct().___(normv((ST_pointf) evs.plus(1).getStruct()));
Z.z().opl = 0;
growops(4);
Z.z().ops_route.plus(Z.z().opl).setStruct(inps.plus(0).getStruct());
Z.z().opl++;
- if (reallyroutespline(edges, edgen, inps, inpn, evs.plus(0).getStruct(), evs.plus(1).getStruct()) == -1)
+ if (reallyroutespline(edges, edgen, inps, inpn, (ST_pointf)evs.plus(0).getStruct(), (ST_pointf)evs.plus(1).getStruct()) == -1)
return -1;
output.setInt("pn", Z.z().opl);
- output.setPtr("ps", Z.z().ops_route);
+ output.ps = Z.z().ops_route;
return 0;
} finally {
LEAVING("9stmrdqlmufyk2wutp3totr5j","Proutespline");
@@ -129,52 +124,52 @@ LEAVING("9stmrdqlmufyk2wutp3totr5j","Proutespline");
// static int reallyroutespline(Pedge_t * edges, int edgen, Ppoint_t * inps, int inpn, Ppoint_t ev0, Ppoint_t ev1)
//private static __ptr__ tnas;
//private static int tnan;
-public static int reallyroutespline(__ptr__ edges, int edgen, __ptr__ inps, int inpn, final __struct__<pointf> ev0, final __struct__<pointf> ev1) {
+public static int reallyroutespline(ST_Pedge_t.Array edges, int edgen, ST_pointf.Array inps, int inpn, final ST_pointf ev0, final ST_pointf ev1) {
// WARNING!! STRUCT
return reallyroutespline_w_(edges, edgen, inps, inpn, ev0.copy(), ev1.copy());
}
-private static int reallyroutespline_w_(__ptr__ edges, int edgen, __ptr__ inps, int inpn, final __struct__<pointf> ev0, final __struct__<pointf> ev1) {
+private static int reallyroutespline_w_(ST_Pedge_t.Array edges, int edgen, ST_pointf.Array inps, int inpn, final ST_pointf ev0, final ST_pointf ev1) {
ENTERING("13dxqzbgtpl4ubnnvw6ehzzi9","reallyroutespline");
try {
- final __struct__<pointf> p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), cp1 = JUtils.from(pointf.class), cp2 = JUtils.from(pointf.class), p = JUtils.from(pointf.class);
- final __struct__<pointf> v1 = JUtils.from(pointf.class), v2 = JUtils.from(pointf.class), splitv = JUtils.from(pointf.class), splitv1 = JUtils.from(pointf.class), splitv2 = JUtils.from(pointf.class);
+ final ST_pointf p1 = new ST_pointf(), p2 = new ST_pointf(), cp1 = new ST_pointf(), cp2 = new ST_pointf(), p = new ST_pointf();
+ final ST_pointf v1 = new ST_pointf(), v2 = new ST_pointf(), splitv = new ST_pointf(), splitv1 = new ST_pointf(), splitv2 = new ST_pointf();
double maxd, d, t;
int maxi, i, spliti;
if (Z.z().tnan < inpn) {
if (N(Z.z().tnas)) {
- if (N(Z.z().tnas = Memory.malloc(sizeof(tna_t.class, inpn))))
+ if (N(Z.z().tnas = new ST_tna_t.Array(inpn)))
return -1;
} else {
- if (N(Z.z().tnas = Memory.realloc(Z.z().tnas, sizeof(tna_t.class, inpn))))
+ if (N(Z.z().tnas = Z.z().tnas.reallocJ(inpn)))
return -1;
}
Z.z().tnan = inpn;
}
Z.z().tnas.plus(0).getStruct().setDouble("t", 0);
for (i = 1; i < inpn; i++)
- Z.z().tnas.plus(i).getStruct().setDouble("t", Z.z().tnas.plus(i-1).getStruct().getDouble("t") + dist(inps.plus(i).getStruct(), inps.plus(i-1).getStruct()));
+ Z.z().tnas.plus(i).getStruct().setDouble("t", Z.z().tnas.plus(i-1).getStruct().t + dist((ST_pointf)inps.plus(i).getStruct(), (ST_pointf)inps.plus(i-1).getStruct()));
for (i = 1; i < inpn; i++)
- Z.z().tnas.plus(i).getStruct().setDouble("t", Z.z().tnas.plus(i).getStruct().getDouble("t") / Z.z().tnas.plus(inpn - 1).getStruct().getDouble("t"));
+ Z.z().tnas.plus(i).getStruct().setDouble("t", Z.z().tnas.plus(i).getStruct().t / Z.z().tnas.plus(inpn - 1).getStruct().t);
for (i = 0; i < inpn; i++) {
- Z.z().tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).setStruct(scale(ev0, B1(Z.z().tnas.plus(i).getStruct().getDouble("t"))));
- Z.z().tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).setStruct(scale(ev1, B2(Z.z().tnas.plus(i).getStruct().getDouble("t"))));
+ ((ST_tna_t)Z.z().tnas.plus(i).getStruct()).a[0].____(scale(ev0, B1(Z.z().tnas.plus(i).getStruct().t)));
+ ((ST_tna_t)Z.z().tnas.plus(i).getStruct()).a[1].____(scale(ev1, B2(Z.z().tnas.plus(i).getStruct().t)));
}
- if (mkspline(inps, inpn, Z.z().tnas, ev0, ev1, p1.amp(), v1.amp(), p2.amp(), v2.amp()) == -1)
+ if (mkspline(inps, inpn, Z.z().tnas, ev0, ev1, p1, v1, p2, v2) == -1)
return -1;
if (splinefits(edges, edgen, p1, v1, p2, v2, inps, inpn)!=0)
return 0;
cp1.___(add(p1, scale(v1, 1 / 3.0)));
cp2.___(sub(p2, scale(v2, 1 / 3.0)));
for (maxd = -1, maxi = -1, i = 1; i < inpn - 1; i++) {
- t = Z.z().tnas.plus(i).getDouble("t");
- p.setDouble("x", B0(t) * p1.getDouble("x") + B1(t) * cp1.getDouble("x") + B2(t) * cp2.getDouble("x") + B3(t) * p2.getDouble("x"));
- p.setDouble("y", B0(t) * p1.getDouble("y") + B1(t) * cp1.getDouble("y") + B2(t) * cp2.getDouble("y") + B3(t) * p2.getDouble("y"));
- if ((d = dist(p, inps.plus(i).getStruct())) > maxd)
+ t = Z.z().tnas.get(i).t;
+ p.setDouble("x", B0(t) * p1.x + B1(t) * cp1.x + B2(t) * cp2.x + B3(t) * p2.x);
+ p.setDouble("y", B0(t) * p1.y + B1(t) * cp1.y + B2(t) * cp2.y + B3(t) * p2.y);
+ if ((d = dist(p, (ST_pointf) inps.plus(i).getStruct())) > maxd)
{maxd = d; maxi = i;}
}
spliti = maxi;
- splitv1.___(normv(sub(inps.plus(spliti).getStruct(), inps.plus(spliti - 1).getStruct())));
- splitv2.___(normv(sub(inps.plus(spliti + 1).getStruct(), inps.plus(spliti).getStruct())));
+ splitv1.___(normv(sub((ST_pointf)inps.plus(spliti).getStruct(), (ST_pointf)inps.plus(spliti - 1).getStruct())));
+ splitv2.___(normv(sub((ST_pointf)inps.plus(spliti + 1).getStruct(), (ST_pointf)inps.plus(spliti).getStruct())));
splitv.___(normv(add(splitv1, splitv2)));
reallyroutespline(edges, edgen, inps, spliti + 1, ev0, splitv);
reallyroutespline(edges, edgen, inps.plus(spliti), inpn - spliti, splitv,
@@ -190,14 +185,14 @@ LEAVING("13dxqzbgtpl4ubnnvw6ehzzi9","reallyroutespline");
//3 29sok6jkfyobf83q130snkhmh
// static int mkspline(Ppoint_t * inps, int inpn, tna_t * tnas, Ppoint_t ev0, Ppoint_t ev1, Ppoint_t * sp0, Ppoint_t * sv0, Ppoint_t * sp1, Ppoint_t * sv1)
-public static int mkspline(__ptr__ inps, int inpn, __ptr__ tnas, final __struct__<pointf> ev0, final __struct__<pointf> ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) {
+public static int mkspline(__ptr__ inps, int inpn, ST_tna_t.Array tnas, final ST_pointf ev0, final ST_pointf ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) {
// WARNING!! STRUCT
return mkspline_w_(inps, inpn, tnas, ev0.copy(), ev1.copy(), sp0, sv0, sp1, sv1);
}
-private static int mkspline_w_(__ptr__ inps, int inpn, __ptr__ tnas, final __struct__<pointf> ev0, final __struct__<pointf> ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) {
+private static int mkspline_w_(__ptr__ inps, int inpn, ST_tna_t.Array tnas, final ST_pointf ev0, final ST_pointf ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) {
ENTERING("29sok6jkfyobf83q130snkhmh","mkspline");
try {
- final __struct__<pointf> tmp = JUtils.from(pointf.class);
+ final ST_pointf tmp = new ST_pointf();
double c[][] = new double[2][2];
double x[] = new double[2];
double det01, det0X, detX1;
@@ -207,14 +202,14 @@ try {
c[0][0] = c[0][1] = c[1][0] = c[1][1] = 0.0;
x[0] = x[1] = 0.0;
for (i = 0; i < inpn; i++) {
- c[0][0] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct());
- c[0][1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct());
+ c[0][0] += dot(((ST_tna_t)tnas.plus(i).getStruct()).a[0], ((ST_tna_t)tnas.plus(i).getStruct()).a[0]);
+ c[0][1] += dot(((ST_tna_t)tnas.plus(i).getStruct()).a[0], ((ST_tna_t)tnas.plus(i).getStruct()).a[1]);
c[1][0] = c[0][1];
- c[1][1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct());
- tmp.___(sub(inps.plus(i).getStruct(), add(scale(inps.plus(0).getStruct(), B01(tnas.plus(i).getStruct().getDouble("t"))),
- scale(inps.plus(inpn - 1).getStruct(), B23(tnas.plus(i).getStruct().getDouble("t"))))));
- x[0] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tmp);
- x[1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct(), tmp);
+ c[1][1] += dot(((ST_tna_t)tnas.plus(i).getStruct()).a[1], ((ST_tna_t)tnas.plus(i).getStruct()).a[1]);
+ tmp.___(sub((ST_pointf) inps.plus(i).getStruct(), add(scale((ST_pointf) inps.plus(0).getStruct(), B01(tnas.plus(i).getStruct().t)),
+ scale((ST_pointf) inps.plus(inpn - 1).getStruct(), B23(tnas.plus(i).getStruct().t)))));
+ x[0] += dot(((ST_tna_t)tnas.plus(i).getStruct()).a[0], tmp);
+ x[1] += dot(((ST_tna_t)tnas.plus(i).getStruct()).a[1], tmp);
}
det01 = c[0][0] * c[1][1] - c[1][0] * c[0][1];
det0X = c[0][0] * x[1] - c[0][1] * x[0];
@@ -224,7 +219,7 @@ try {
scale3 = det0X / det01;
}
if (((det01) >= 0 ? (det01) : -(det01)) < 1e-6 || scale0 <= 0.0 || scale3 <= 0.0) {
- d01 = dist(inps.plus(0).getStruct(), inps.plus(inpn - 1).getStruct()) / 3.0;
+ d01 = dist((ST_pointf)inps.plus(0).getStruct(), (ST_pointf)inps.plus(inpn - 1).getStruct()) / 3.0;
scale0 = d01;
scale3 = d01;
}
@@ -243,7 +238,7 @@ LEAVING("29sok6jkfyobf83q130snkhmh","mkspline");
//3 ea6jsc0rwfyjtmmuxax6r5ngk
// static double dist_n(Ppoint_t * p, int n)
-public static double dist_n(__ptr__ p, int n) {
+public static double dist_n(ST_pointf.Array p, int n) {
ENTERING("ea6jsc0rwfyjtmmuxax6r5ngk","dist_n");
try {
int i;
@@ -251,8 +246,8 @@ try {
rv = 0.0;
for (i = 1; i < n; i++) {
rv +=
- sqrt((p.plus(i).getStruct().getDouble("x") - p.plus(i - 1).getStruct().getDouble("x")) * (p.plus(i).getStruct().getDouble("x") - p.plus(i - 1).getStruct().getDouble("x"))+
- (p.plus(i).getStruct().getDouble("y") - p.plus(i - 1).getStruct().getDouble("y")) * (p.plus(i).getStruct().getDouble("y") - p.plus(i - 1).getStruct().getDouble("y")));
+ sqrt((p.plus(i).getStruct().x - p.plus(i - 1).getStruct().x) * (p.plus(i).getStruct().x - p.plus(i - 1).getStruct().x)+
+ (p.plus(i).getStruct().y - p.plus(i - 1).getStruct().y) * (p.plus(i).getStruct().y - p.plus(i - 1).getStruct().y));
}
return rv;
} finally {
@@ -265,14 +260,14 @@ LEAVING("ea6jsc0rwfyjtmmuxax6r5ngk","dist_n");
//3 987ednrgu5qo9dzhpiox47mhb
// static int splinefits(Pedge_t * edges, int edgen, Ppoint_t pa, Pvector_t va, Ppoint_t pb, Pvector_t vb, Ppoint_t * inps, int inpn)
-public static int splinefits(__ptr__ edges, int edgen, final __struct__<pointf> pa, final __struct__<pointf> va, final __struct__<pointf> pb, final __struct__<pointf> vb, __ptr__ inps, int inpn) {
+public static int splinefits(ST_Pedge_t.Array edges, int edgen, final ST_pointf pa, final ST_pointf va, final ST_pointf pb, final ST_pointf vb, ST_pointf.Array inps, int inpn) {
// WARNING!! STRUCT
return splinefits_w_(edges, edgen, pa.copy(), va.copy(), pb.copy(), vb.copy(), inps, inpn);
}
-private static int splinefits_w_(__ptr__ edges, int edgen, final __struct__<pointf> pa, final __struct__<pointf> va, final __struct__<pointf> pb, final __struct__<pointf> vb, __ptr__ inps, int inpn) {
+private static int splinefits_w_(ST_Pedge_t.Array edges, int edgen, final ST_pointf pa, final ST_pointf va, final ST_pointf pb, final ST_pointf vb, ST_pointf.Array inps, int inpn) {
ENTERING("987ednrgu5qo9dzhpiox47mhb","splinefits");
try {
- final __array_of_struct__ sps = __array_of_struct_impl__.malloc(pointf.class, 4);
+ final ST_pointf.Array sps = new ST_pointf.Array( 4);
double a, b;
int pi;
int forceflag;
@@ -280,14 +275,14 @@ try {
forceflag = (inpn == 2 ? 1 : 0);
a = b = 4;
for (;;) {
- sps.plus(0).getStruct().setDouble("x", pa.getDouble("x"));
- sps.plus(0).getStruct().setDouble("y", pa.getDouble("y"));
- sps.plus(1).getStruct().setDouble("x", pa.getDouble("x") + a * va.getDouble("x") / 3.0);
- sps.plus(1).getStruct().setDouble("y", pa.getDouble("y") + a * va.getDouble("y") / 3.0);
- sps.plus(2).getStruct().setDouble("x", pb.getDouble("x") - b * vb.getDouble("x") / 3.0);
- sps.plus(2).getStruct().setDouble("y", pb.getDouble("y") - b * vb.getDouble("y") / 3.0);
- sps.plus(3).getStruct().setDouble("x", pb.getDouble("x"));
- sps.plus(3).getStruct().setDouble("y", pb.getDouble("y"));
+ sps.plus(0).getStruct().setDouble("x", pa.x);
+ sps.plus(0).getStruct().setDouble("y", pa.y);
+ sps.plus(1).getStruct().setDouble("x", pa.x + a * va.x / 3.0);
+ sps.plus(1).getStruct().setDouble("y", pa.y + a * va.y / 3.0);
+ sps.plus(2).getStruct().setDouble("x", pb.x - b * vb.x / 3.0);
+ sps.plus(2).getStruct().setDouble("y", pb.y - b * vb.y / 3.0);
+ sps.plus(3).getStruct().setDouble("x", pb.x);
+ sps.plus(3).getStruct().setDouble("y", pb.y);
/* shortcuts (paths shorter than the shortest path) not allowed -
* they must be outside the constraint polygon. this can happen
* if the candidate spline intersects the constraint polygon exactly
@@ -301,8 +296,8 @@ try {
if (splineisinside(edges, edgen, sps)) {
growops(Z.z().opl + 4);
for (pi = 1; pi < 4; pi++) {
- Z.z().ops_route.plus(Z.z().opl).setDouble("x", sps.plus(pi).getStruct().getDouble("x"));
- Z.z().ops_route.plus(Z.z().opl).setDouble("y", sps.plus(pi).getStruct().getDouble("y"));
+ Z.z().ops_route.plus(Z.z().opl).setDouble("x", sps.plus(pi).getStruct().x);
+ Z.z().ops_route.plus(Z.z().opl).setDouble("y", sps.plus(pi).getStruct().y);
Z.z().opl++;
}
return 1;
@@ -312,8 +307,8 @@ try {
growops(Z.z().opl + 4);
for (pi = 1; pi < 4; pi++)
{
- Z.z().ops_route.plus(Z.z().opl).setDouble("x", sps.plus(pi).getStruct().getDouble("x"));
- Z.z().ops_route.plus(Z.z().opl).setDouble("y", sps.plus(pi).getStruct().getDouble("y"));
+ Z.z().ops_route.plus(Z.z().opl).setDouble("x", sps.plus(pi).getStruct().x);
+ Z.z().ops_route.plus(Z.z().opl).setDouble("y", sps.plus(pi).getStruct().y);
Z.z().opl++;
}
return 1;
@@ -339,18 +334,18 @@ LEAVING("987ednrgu5qo9dzhpiox47mhb","splinefits");
//3 b6eghkeu16aum3l778ig52ht1
// static int splineisinside(Pedge_t * edges, int edgen, Ppoint_t * sps)
-public static boolean splineisinside(__ptr__ edges, int edgen, __array_of_struct__ sps) {
+public static boolean splineisinside(ST_Pedge_t.Array edges, int edgen, ST_pointf.Array sps) {
ENTERING("b6eghkeu16aum3l778ig52ht1","splineisinside");
try {
double roots[] = new double[4];
int rooti, rootn;
int ei;
- final __array_of_struct__ lps = __array_of_struct_impl__.malloc(pointf.class, 2);
- final __struct__<pointf> ip = JUtils.from(pointf.class);
+ final ST_pointf.Array lps = new ST_pointf.Array( 2);
+ final ST_pointf ip = new ST_pointf();
double t, ta, tb, tc, td;
for (ei = 0; ei < edgen; ei++) {
- lps.plus(0).setStruct(edges.plus(ei).getStruct("a"));
- lps.plus(1).setStruct(edges.plus(ei).getStruct("b"));
+ lps.plus(0).setStruct(edges.get(ei).a);
+ lps.plus(1).setStruct(edges.get(ei).b);
/* if ((rootn = splineintersectsline (sps, lps, roots)) == 4)
return 1; */
if ((rootn = splineintersectsline(sps, lps, roots)) == 4)
@@ -363,10 +358,10 @@ try {
tc = 3 * t * t * (1 - t);
tb = 3 * t * (1 - t) * (1 - t);
ta = (1 - t) * (1 - t) * (1 - t);
- ip.setDouble("x", ta * sps.plus(0).getDouble("x") + tb * sps.plus(1).getDouble("x") +
- tc * sps.plus(2).getDouble("x") + td * sps.plus(3).getDouble("x"));
- ip.setDouble("y", ta * sps.plus(0).getDouble("y") + tb * sps.plus(1).getDouble("y") +
- tc * sps.plus(2).getDouble("y") + td * sps.plus(3).getDouble("y"));
+ ip.setDouble("x", ta * sps.get(0).x + tb * sps.get(1).x +
+ tc * sps.get(2).x + td * sps.get(3).x);
+ ip.setDouble("y", ta * sps.get(0).y + tb * sps.get(1).y +
+ tc * sps.get(2).y + td * sps.get(3).y);
if (DISTSQ(ip, lps.plus(0).getStruct()) < 1E-3 ||
DISTSQ(ip, lps.plus(1).getStruct()) < 1E-3)
continue;
@@ -384,7 +379,7 @@ LEAVING("b6eghkeu16aum3l778ig52ht1","splineisinside");
//3 32nc8itszi77u36la8npt2870
// static int splineintersectsline(Ppoint_t * sps, Ppoint_t * lps, double *roots)
-public static int splineintersectsline(__array_of_struct__ sps, __array_of_struct__ lps, double roots[]) {
+public static int splineintersectsline(ST_pointf.Array sps, ST_pointf.Array lps, double roots[]) {
ENTERING("32nc8itszi77u36la8npt2870","splineintersectsline");
try {
double scoeff[] = new double[4];
@@ -395,17 +390,17 @@ try {
double tv, sv, rat;
int rootn[] = new int[]{0};
int xrootn, yrootn, i, j;
- xcoeff[0] = lps.plus(0).getStruct().getDouble("x");
- xcoeff[1] = lps.plus(1).getStruct().getDouble("x") - lps.plus(0).getStruct().getDouble("x");
- ycoeff[0] = lps.plus(0).getStruct().getDouble("y");
- ycoeff[1] = lps.plus(1).getStruct().getDouble("y") - lps.plus(0).getStruct().getDouble("y");
+ xcoeff[0] = lps.plus(0).getStruct().x;
+ xcoeff[1] = lps.plus(1).getStruct().x - lps.plus(0).getStruct().x;
+ ycoeff[0] = lps.plus(0).getStruct().y;
+ ycoeff[1] = lps.plus(1).getStruct().y - lps.plus(0).getStruct().y;
rootn[0] = 0;
if (xcoeff[1] == 0) {
if (ycoeff[1] == 0) {
- points2coeff(sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("x"), scoeff);
+ points2coeff(sps.plus(0).getStruct().x, sps.plus(1).getStruct().x, sps.plus(2).getStruct().x, sps.plus(3).getStruct().x, scoeff);
scoeff[0] -= xcoeff[0];
xrootn = solve3(scoeff, xroots);
- points2coeff(sps.plus(0).getStruct().getDouble("y"), sps.plus(1).getStruct().getDouble("y"), sps.plus(2).getStruct().getDouble("y"), sps.plus(3).getStruct().getDouble("y"), scoeff);
+ points2coeff(sps.plus(0).getStruct().y, sps.plus(1).getStruct().y, sps.plus(2).getStruct().y, sps.plus(3).getStruct().y, scoeff);
scoeff[0] -= ycoeff[0];
yrootn = solve3(scoeff, yroots);
if (xrootn == 4)
@@ -424,7 +419,7 @@ try {
addroot(xroots[i], roots, rootn);
return rootn[0];
} else {
- points2coeff(sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("x"), scoeff);
+ points2coeff(sps.plus(0).getStruct().x, sps.plus(1).getStruct().x, sps.plus(2).getStruct().x, sps.plus(3).getStruct().x, scoeff);
scoeff[0] -= xcoeff[0];
xrootn = solve3(scoeff, xroots);
if (xrootn == 4)
@@ -432,7 +427,7 @@ try {
for (i = 0; i < xrootn; i++) {
tv = xroots[i];
if (tv >= 0 && tv <= 1) {
- points2coeff(sps.plus(0).getStruct().getDouble("y"), sps.plus(1).getStruct().getDouble("y"), sps.plus(2).getStruct().getDouble("y"), sps.plus(3).getStruct().getDouble("y"),
+ points2coeff(sps.plus(0).getStruct().y, sps.plus(1).getStruct().y, sps.plus(2).getStruct().y, sps.plus(3).getStruct().y,
scoeff);
sv = scoeff[0] + tv * (scoeff[1] + tv *
(scoeff[2] + tv * scoeff[3]));
@@ -445,8 +440,8 @@ try {
}
} else {
rat = ycoeff[1] / xcoeff[1];
- points2coeff(sps.plus(0).getStruct().getDouble("y") - rat * sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("y") - rat * sps.plus(1).getStruct().getDouble("x"),
- sps.plus(2).getStruct().getDouble("y") - rat * sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("y") - rat * sps.plus(3).getStruct().getDouble("x"),
+ points2coeff(sps.plus(0).getStruct().y - rat * sps.plus(0).getStruct().x, sps.plus(1).getStruct().y - rat * sps.plus(1).getStruct().x,
+ sps.plus(2).getStruct().y - rat * sps.plus(2).getStruct().x, sps.plus(3).getStruct().y - rat * sps.plus(3).getStruct().x,
scoeff);
scoeff[0] += rat * xcoeff[0] - ycoeff[0];
xrootn = solve3(scoeff, xroots);
@@ -455,7 +450,7 @@ try {
for (i = 0; i < xrootn; i++) {
tv = xroots[i];
if (tv >= 0 && tv <= 1) {
- points2coeff(sps.plus(0).getStruct().getDouble("x"), sps.plus(1).getStruct().getDouble("x"), sps.plus(2).getStruct().getDouble("x"), sps.plus(3).getStruct().getDouble("x"),
+ points2coeff(sps.plus(0).getStruct().x, sps.plus(1).getStruct().x, sps.plus(2).getStruct().x, sps.plus(3).getStruct().x,
scoeff);
sv = scoeff[0] + tv * (scoeff[1] +
tv * (scoeff[2] + tv * scoeff[3]));
@@ -510,19 +505,19 @@ LEAVING("6ldk438jjflh0huxkg4cs8kwu","addroot");
//3 3i8m1m9fg7qmnt8jloorwlu8e
// static Pvector_t normv(Pvector_t v)
-public static __struct__<pointf> normv(final __struct__<pointf> v) {
+public static ST_pointf normv(final ST_pointf v) {
// WARNING!! STRUCT
return normv_w_(v.copy()).copy();
}
-private static __struct__<pointf> normv_w_(final __struct__<pointf> v) {
+private static ST_pointf normv_w_(final ST_pointf v) {
ENTERING("3i8m1m9fg7qmnt8jloorwlu8e","normv");
try {
double d;
- d = v.getDouble("x") * v.getDouble("x") + v.getDouble("y") * v.getDouble("y");
+ d = v.x * v.x + v.y * v.y;
if (d > 1e-6) {
d = sqrt(d);
- v.setDouble("x", v.getDouble("x") / d);
- v.setDouble("y", v.getDouble("y") / d);
+ v.setDouble("x", v.x / d);
+ v.setDouble("y", v.y / d);
}
return v;
} finally {
@@ -541,13 +536,12 @@ try {
if (newopn <= Z.z().opn_route)
return;
if (N(Z.z().ops_route)) {
- if (N(Z.z().ops_route = Memory.malloc(sizeof (pointf.class, newopn)))) {
+ if (N(Z.z().ops_route = new ST_pointf.Array(newopn))) {
UNSUPPORTED("413an1hqgkb4ezaec6qdsdplx"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\route.c", 32, ("cannot malloc ops"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
} else {
- if (N(Z.z().ops_route = Memory.realloc(Z.z().ops_route,
- sizeof (pointf.class, newopn)))) {
+ if (N(Z.z().ops_route = Z.z().ops_route.reallocJ(newopn))) {
UNSUPPORTED("8u0qgahxvk5pplf90thmhwxhl"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\route.c", 32, ("cannot realloc ops"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
@@ -563,15 +557,15 @@ LEAVING("d59jcnpi1y0wr8e9uwxny2fvk","growops");
//3 f4a7nt247bokdwr2owda050of
// static Ppoint_t add(Ppoint_t p1, Ppoint_t p2)
-public static __struct__<pointf> add(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+public static ST_pointf add(final ST_pointf p1, final ST_pointf p2) {
// WARNING!! STRUCT
return add_w_(p1.copy(), p2.copy()).copy();
}
-private static __struct__<pointf> add_w_(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+private static ST_pointf add_w_(final ST_pointf p1, final ST_pointf p2) {
ENTERING("f4a7nt247bokdwr2owda050of","add");
try {
- p1.setDouble("x", p1.getDouble("x") + p2.getDouble("x"));
- p1.setDouble("y", p1.getDouble("y") + p2.getDouble("y"));
+ p1.setDouble("x", p1.x + p2.x);
+ p1.setDouble("y", p1.y + p2.y);
return p1;
} finally {
LEAVING("f4a7nt247bokdwr2owda050of","add");
@@ -583,15 +577,15 @@ LEAVING("f4a7nt247bokdwr2owda050of","add");
//3 c4l1gvlkv2s4mi6os7r9dh89f
// static Ppoint_t sub(Ppoint_t p1, Ppoint_t p2)
-public static __struct__<pointf> sub(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+public static ST_pointf sub(final ST_pointf p1, final ST_pointf p2) {
// WARNING!! STRUCT
return sub_w_(p1.copy(), p2.copy()).copy();
}
-private static __struct__<pointf> sub_w_(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+private static ST_pointf sub_w_(final ST_pointf p1, final ST_pointf p2) {
ENTERING("c4l1gvlkv2s4mi6os7r9dh89f","sub");
try {
- p1.setDouble("x", p1.getDouble("x") - p2.getDouble("x"));
- p1.setDouble("y", p1.getDouble("y") - p2.getDouble("y"));
+ p1.setDouble("x", p1.x - p2.x);
+ p1.setDouble("y", p1.y - p2.y);
return p1;
} finally {
LEAVING("c4l1gvlkv2s4mi6os7r9dh89f","sub");
@@ -603,16 +597,16 @@ LEAVING("c4l1gvlkv2s4mi6os7r9dh89f","sub");
//3 dqnlz0tceriykws4ngudl94w9
// static double dist(Ppoint_t p1, Ppoint_t p2)
-public static double dist(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+public static double dist(final ST_pointf p1, final ST_pointf p2) {
// WARNING!! STRUCT
return dist_w_(p1.copy(), p2.copy());
}
-private static double dist_w_(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+private static double dist_w_(final ST_pointf p1, final ST_pointf p2) {
ENTERING("dqnlz0tceriykws4ngudl94w9","dist");
try {
double dx, dy;
- dx = p2.getDouble("x") - p1.getDouble("x");
- dy = p2.getDouble("y") - p1.getDouble("y");
+ dx = p2.x - p1.x;
+ dy = p2.y - p1.y;
return sqrt(dx * dx + dy * dy);
} finally {
LEAVING("dqnlz0tceriykws4ngudl94w9","dist");
@@ -624,15 +618,15 @@ LEAVING("dqnlz0tceriykws4ngudl94w9","dist");
//3 19149pdllzhplvew0bsh5v6hy
// static Ppoint_t scale(Ppoint_t p, double c)
-public static __struct__<pointf> scale(final __struct__<pointf> p, double c) {
+public static ST_pointf scale(final ST_pointf p, double c) {
// WARNING!! STRUCT
return scale_w_(p.copy(), c).copy();
}
-private static __struct__<pointf> scale_w_(final __struct__<pointf> p, double c) {
+private static ST_pointf scale_w_(final ST_pointf p, double c) {
ENTERING("19149pdllzhplvew0bsh5v6hy","scale");
try {
- p.setDouble("x", p.getDouble("x") * c);
- p.setDouble("y", p.getDouble("y") * c);
+ p.setDouble("x", p.x * c);
+ p.setDouble("y", p.y * c);
return p;
} finally {
LEAVING("19149pdllzhplvew0bsh5v6hy","scale");
@@ -644,14 +638,14 @@ LEAVING("19149pdllzhplvew0bsh5v6hy","scale");
//3 7ebsa2s1eoopqj1pp43bh5fw
// static double dot(Ppoint_t p1, Ppoint_t p2)
-public static double dot(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+public static double dot(final ST_pointf p1, final ST_pointf p2) {
// WARNING!! STRUCT
return dot_w_(p1.copy(), p2.copy());
}
-private static double dot_w_(final __struct__<pointf> p1, final __struct__<pointf> p2) {
+private static double dot_w_(final ST_pointf p1, final ST_pointf p2) {
ENTERING("7ebsa2s1eoopqj1pp43bh5fw","dot");
try {
- return p1.getDouble("x") * p2.getDouble("x") + p1.getDouble("y") * p2.getDouble("y");
+ return p1.x * p2.x + p1.y * p2.y;
} finally {
LEAVING("7ebsa2s1eoopqj1pp43bh5fw","dot");
}
diff --git a/src/gen/lib/pathplan/shortest__c.java b/src/gen/lib/pathplan/shortest__c.java
index e620742..15f372e 100644
--- a/src/gen/lib/pathplan/shortest__c.java
+++ b/src/gen/lib/pathplan/shortest__c.java
@@ -48,24 +48,17 @@ import static smetana.core.JUtils.EQ;
import static smetana.core.JUtils.LOG2;
import static smetana.core.JUtils.NEQ;
import static smetana.core.JUtils.setjmp;
-import static smetana.core.JUtils.sizeof;
-import static smetana.core.JUtils.sizeof_starstar_empty;
import static smetana.core.JUtilsDebug.ENTERING;
import static smetana.core.JUtilsDebug.LEAVING;
import static smetana.core.Macro.HUGE_VAL;
import static smetana.core.Macro.N;
import static smetana.core.Macro.UNSUPPORTED;
-import h.Ppoly_t;
-import h.pointf;
-import h.pointnlink_t;
-import h.triangle_t;
-import smetana.core.JUtils;
-import smetana.core.Memory;
+import h.ST_Ppoly_t;
+import h.ST_pointf;
+import h.ST_pointnlink_t;
+import h.ST_triangle_t;
import smetana.core.Z;
-import smetana.core.__array_of_struct__;
-import smetana.core.__array_of_struct_impl__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
import smetana.core.jmp_buf;
public class shortest__c {
@@ -114,56 +107,56 @@ private static jmp_buf jbuf = new jmp_buf();
//3 2gub5b19vo2qexn56nw23wage
// int Pshortestpath(Ppoly_t * polyp, Ppoint_t * eps, Ppolyline_t * output)
-public static int Pshortestpath(Ppoly_t polyp, __array_of_struct__ eps, Ppoly_t output) {
+public static int Pshortestpath(ST_Ppoly_t polyp, ST_pointf.Array eps, ST_Ppoly_t output) {
ENTERING("2gub5b19vo2qexn56nw23wage","Pshortestpath");
try {
int pi, minpi;
double minx;
- final __struct__<pointf> p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), p3 = JUtils.from(pointf.class);
+ final ST_pointf p1 = new ST_pointf(), p2 = new ST_pointf(), p3 = new ST_pointf();
int trii, trij, ftrii, ltrii;
int ei;
- final __array_of_struct__ epnls = __array_of_struct_impl__.malloc(pointnlink_t.class, 2);
- pointnlink_t lpnlp=null, rpnlp=null, pnlp=null;
- triangle_t trip;
+ final ST_pointnlink_t[] epnls = new ST_pointnlink_t[] {new ST_pointnlink_t(),new ST_pointnlink_t()};
+ ST_pointnlink_t lpnlp=null, rpnlp=null, pnlp=null;
+ ST_triangle_t.Array trip;
int splitindex;
if (setjmp(jbuf)!=0)
return -2;
/* make space */
- growpnls(polyp.getInt("pn"));
+ growpnls(polyp.pn);
Z.z().pnll = 0;
Z.z().tril = 0;
- growdq(polyp.getInt("pn") * 2);
- Z.z().dq.setInt("fpnlpi", Z.z().dq.getInt("pnlpn") / 2);
- Z.z().dq.setInt("lpnlpi", Z.z().dq.getInt("fpnlpi") - 1);
+ growdq(polyp.pn * 2);
+ Z.z().dq.fpnlpi = Z.z().dq.pnlpn / 2;
+ Z.z().dq.lpnlpi = Z.z().dq.fpnlpi - 1;
/* make sure polygon is CCW and load pnls array */
- for (pi = 0, minx = HUGE_VAL, minpi = -1; pi < polyp.getInt("pn"); pi++) {
- if (minx > polyp.getPtr("ps").plus(pi).getDouble("x"))
- { minx = polyp.getPtr("ps").plus(pi).getDouble("x");
+ for (pi = 0, minx = HUGE_VAL, minpi = -1; pi < polyp.pn; pi++) {
+ if (minx > polyp.ps.get(pi).x)
+ { minx = polyp.ps.get(pi).x;
minpi = pi; }
}
- p2.____(polyp.getPtr("ps").plus(minpi));
- p1.____(polyp.getPtr("ps").plus(((minpi == 0) ? polyp.getInt("pn") - 1 : minpi - 1)));
- p3.____(polyp.getPtr("ps").plus(((minpi == polyp.getInt("pn") - 1) ? 0 : minpi + 1)));
- if (((p1.getDouble("x") == p2.getDouble("x") && p2.getDouble("x") == p3.getDouble("x")) && (p3.getDouble("y") > p2.getDouble("y"))) ||
- ccw(p1.amp(), p2.amp(), p3.amp()) != 1) {
- for (pi = polyp.getInt("pn") - 1; pi >= 0; pi--) {
- if (pi < polyp.getInt("pn") - 1
- && polyp.getPtr("ps").plus(pi).getDouble("x") == polyp.getPtr("ps").plus(pi+1).getDouble("x")
- && polyp.getPtr("ps").plus(pi).getDouble("y") == polyp.getPtr("ps").plus(pi+1).getDouble("y"))
+ p2.____(polyp.ps.plus(minpi));
+ p1.____(polyp.ps.plus(((minpi == 0) ? polyp.pn - 1 : minpi - 1)));
+ p3.____(polyp.ps.plus(((minpi == polyp.pn - 1) ? 0 : minpi + 1)));
+ if (((p1.x == p2.x && p2.x == p3.x) && (p3.y > p2.y)) ||
+ ccw(p1, p2, p3) != 1) {
+ for (pi = polyp.pn - 1; pi >= 0; pi--) {
+ if (pi < polyp.pn - 1
+ && polyp.ps.get(pi).x == polyp.ps.get(pi+1).x
+ && polyp.ps.get(pi).y == polyp.ps.get(pi+1).y)
continue;
- Z.z().pnls.plus(Z.z().pnll).setPtr("pp", polyp.getPtr("ps").plus(pi));
- Z.z().pnls.plus(Z.z().pnll).setPtr("link", Z.z().pnls.plus(Z.z().pnll % polyp.getInt("pn")));
- Z.z().pnlps.plus(Z.z().pnll).setPtr(Z.z().pnls.plus(Z.z().pnll).getPtr());
+ Z.z().pnls[Z.z().pnll].pp = (ST_pointf) ((ST_pointf)polyp.ps.get(pi));
+ Z.z().pnls[Z.z().pnll].link = Z.z().pnls[Z.z().pnll % polyp.pn];
+ Z.z().pnlps[Z.z().pnll] = Z.z().pnls[Z.z().pnll];
Z.z().pnll++;
}
} else {
- for (pi = 0; pi < polyp.getInt("pn"); pi++) {
- if (pi > 0 && polyp.getPtr("ps").plus(pi).getDouble("x") == polyp.getPtr("ps").plus(pi - 1).getDouble("x") &&
- polyp.getPtr("ps").plus(pi).getDouble("y") == polyp.getPtr("ps").plus(pi - 1).getDouble("y"))
+ for (pi = 0; pi < polyp.pn; pi++) {
+ if (pi > 0 && polyp.ps.get(pi).x == polyp.ps.get(pi - 1).x &&
+ polyp.ps.get(pi).y == polyp.ps.get(pi - 1).y)
continue;
- Z.z().pnls.plus(Z.z().pnll).setPtr("pp", polyp.getPtr("ps").plus(pi));
- Z.z().pnls.plus(Z.z().pnll).setPtr("link", Z.z().pnls.plus(Z.z().pnll % polyp.getInt("pn")));
- Z.z().pnlps.plus(Z.z().pnll).setPtr(Z.z().pnls.plus(Z.z().pnll));
+ Z.z().pnls[Z.z().pnll].pp = (ST_pointf) ((ST_pointf)polyp.ps.get(pi));
+ Z.z().pnls[Z.z().pnll].link = Z.z().pnls[Z.z().pnll % polyp.pn];
+ Z.z().pnlps[Z.z().pnll] = Z.z().pnls[Z.z().pnll];
Z.z().pnll++;
}
}
@@ -175,7 +168,7 @@ try {
connecttris(trii, trij);
/* find first and last triangles */
for (trii = 0; trii < Z.z().tril; trii++)
- if (pointintri(trii, eps.plus(0).getStruct().amp()))
+ if (pointintri(trii, eps.plus(0).getStruct()))
break;
if (trii == Z.z().tril) {
UNSUPPORTED("4ma3y8l4lmjcsw49kmsgknig6"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("source point not in any triangle"));
@@ -183,7 +176,7 @@ UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
}
ftrii = trii;
for (trii = 0; trii < Z.z().tril; trii++)
- if (pointintri(trii, eps.plus(1).getStruct().amp()))
+ if (pointintri(trii, eps.plus(1).getStruct()))
break;
if (trii == Z.z().tril) {
System.err.println("libpath/%s:%d: %s\n" + "graphviz-2.38.0\\lib\\pathplan\\shortest.c" + 26 + ("destination point not in any triangle"));
@@ -195,7 +188,7 @@ UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
System.err.println("libpath/%s:%d: %s" + "graphviz-2.38.0\\lib\\pathplan\\shortest.c" + 26 + ("cannot find triangle path"));
/* a straight line is better than failing */
growops(2);
- output.setInt("pn", 2);
+ output.pn = 2;
Z.z().ops_shortest.plus(0).setStruct(eps.plus(0).getStruct());
Z.z().ops_shortest.plus(1).setStruct(eps.plus(1).getStruct());
output.setPtr("ps", Z.z().ops_shortest);
@@ -210,40 +203,40 @@ UNSUPPORTED("3rcg6c9s9nmostq9c3r5n6x4h"); // output->ps = ops;
UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
}
/* build funnel and shortest path linked list (in add2dq) */
- epnls.plus(0).getStruct().setPtr("pp", eps.plus(0).asPtr());
- epnls.plus(0).getStruct().setPtr("link", null);
- epnls.plus(1).getStruct().setPtr("pp", eps.plus(1).asPtr());
- epnls.plus(1).getStruct().setPtr("link", null);
- add2dq(1, epnls.plus(0).asPtr());
- Z.z().dq.setInt("apex", Z.z().dq.getInt("fpnlpi"));
+ epnls[0].pp = eps.get(0);
+ epnls[0].link = null;
+ epnls[1].pp = eps.get(1);
+ epnls[1].link = null;
+ add2dq(1, epnls[0]);
+ Z.z().dq.apex = Z.z().dq.fpnlpi;
trii = ftrii;
while (trii != -1) {
- trip = (triangle_t) Z.z().tris.plus(trii);
- trip.setInt("mark", 2);
+ trip = Z.z().tris.plusJ(trii);
+ trip.get(0).mark = 2;
/* find the left and right points of the exiting edge */
for (ei = 0; ei < 3; ei++)
- if (trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp")!=null &&
- trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").getInt("mark") == 1)
+ if (trip.get(0).e[ei].rtp!=null &&
+ trip.get(0).e[ei].rtp.get(0).mark == 1)
break;
if (ei == 3) { /* in last triangle */
- if (ccw(eps.plus(1).asPtr(), Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).getPtr().getPtr("pp"),
- Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr().getPtr("pp")) == 1)
+ if (ccw(eps.get(1), Z.z().dq.pnlps[Z.z().dq.fpnlpi].pp,
+ Z.z().dq.pnlps[Z.z().dq.lpnlpi].pp) == 1)
{
- lpnlp = (pointnlink_t) Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr();
- rpnlp = (pointnlink_t) epnls.plus(1).asPtr();
+ lpnlp = Z.z().dq.pnlps[Z.z().dq.lpnlpi];
+ rpnlp = epnls[1];
} else {
- lpnlp = (pointnlink_t) epnls.plus(1).asPtr();
- rpnlp = (pointnlink_t) Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr();
+ lpnlp = epnls[1];
+ rpnlp = Z.z().dq.pnlps[Z.z().dq.lpnlpi];
}
} else {
- pnlp = (pointnlink_t) trip.getArrayOfStruct("e").plus((ei + 1) % 3).getStruct().getPtr("pnl1p");
- if (ccw(trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"), pnlp.getPtr("pp"),
- trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp")) == 1)
+ pnlp = trip.get(0).e[(ei + 1) % 3].pnl1p;
+ if (ccw(trip.get(0).e[ei].pnl0p.pp, pnlp.pp,
+ trip.get(0).e[ei].pnl1p.pp) == 1)
UNSUPPORTED("2cii65lhw4wb8nyvjv702v7md"); // lpnlp = trip->e[ei].pnl1p, rpnlp = trip->e[ei].pnl0p;
else
{
- lpnlp = (pointnlink_t) trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p");
- rpnlp = (pointnlink_t) trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p");
+ lpnlp = trip.get(0).e[ei].pnl0p;
+ rpnlp = trip.get(0).e[ei].pnl1p;
}
}
/* update deque */
@@ -251,40 +244,40 @@ UNSUPPORTED("2cii65lhw4wb8nyvjv702v7md"); // lpnlp = trip->e[ei].pnl1p, rpnlp
add2dq(2, lpnlp);
add2dq(1, rpnlp);
} else {
- if (NEQ(Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).getPtr(), rpnlp)
- && NEQ(Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr(), rpnlp)) {
+ if (NEQ(Z.z().dq.pnlps[Z.z().dq.fpnlpi], rpnlp)
+ && NEQ(Z.z().dq.pnlps[Z.z().dq.lpnlpi], rpnlp)) {
/* add right point to deque */
splitindex = finddqsplit(rpnlp);
splitdq(2, splitindex);
add2dq(1, rpnlp);
/* if the split is behind the apex, then reset apex */
- if (splitindex > Z.z().dq.getInt("apex"))
- Z.z().dq.setInt("apex", splitindex);
+ if (splitindex > Z.z().dq.apex)
+ Z.z().dq.apex = splitindex;
} else {
/* add left point to deque */
splitindex = finddqsplit(lpnlp);
splitdq(1, splitindex);
add2dq(2, lpnlp);
/* if the split is in front of the apex, then reset apex */
- if (splitindex < Z.z().dq.getInt("apex"))
- Z.z().dq.setInt("apex", splitindex);
+ if (splitindex < Z.z().dq.apex)
+ Z.z().dq.apex = splitindex;
}
}
trii = -1;
for (ei = 0; ei < 3; ei++)
- if (trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp")!=null &&
- trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").getInt("mark") == 1) {
- trii = trip.getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").minus(Z.z().tris);
+ if (trip.get(0).e[ei].rtp!=null &&
+ trip.get(0).e[ei].rtp.get(0).mark == 1) {
+ trii = trip.get(0).e[ei].rtp.minus(Z.z().tris);
break;
}
}
- for (pi = 0, pnlp = (pointnlink_t) epnls.plus(1).asPtr(); pnlp!=null; pnlp = (pointnlink_t) pnlp.getPtr("link"))
+ for (pi = 0, pnlp = epnls[1]; pnlp!=null; pnlp = pnlp.link)
pi++;
growops(pi);
- output.setInt("pn", pi);
- for (pi = pi - 1, pnlp = (pointnlink_t) epnls.plus(1).asPtr(); pnlp!=null; pi--, pnlp = (pointnlink_t) pnlp.getPtr("link"))
- Z.z().ops_shortest.plus(pi).setPtr(pnlp.getPtr("pp"));
- output.setPtr("ps", Z.z().ops_shortest);
+ output.pn = pi;
+ for (pi = pi - 1, pnlp = epnls[1]; pnlp!=null; pi--, pnlp = pnlp.link)
+ Z.z().ops_shortest.get(pi).____(pnlp.pp);
+ output.ps = Z.z().ops_shortest;
return 0;
} finally {
LEAVING("2gub5b19vo2qexn56nw23wage","Pshortestpath");
@@ -296,7 +289,7 @@ LEAVING("2gub5b19vo2qexn56nw23wage","Pshortestpath");
//3 73cr7m3mqvtuotpzrmaw2y8zm
// static void triangulate(pointnlink_t ** pnlps, int pnln)
-public static void triangulate(__ptr__ pnlps, int pnln) {
+public static void triangulate(ST_pointnlink_t pnlps[], int pnln) {
ENTERING("73cr7m3mqvtuotpzrmaw2y8zm","triangulate");
try {
int pnli, pnlip1, pnlip2;
@@ -309,9 +302,9 @@ try {
pnlip2 = (pnli + 2) % pnln;
if (isdiagonal(pnli, pnlip2, pnlps, pnln))
{
- loadtriangle(pnlps.plus(pnli).getPtr(), pnlps.plus(pnlip1).getPtr(), pnlps.plus(pnlip2).getPtr());
+ loadtriangle(pnlps[pnli], pnlps[pnlip1], pnlps[pnlip2]);
for (pnli = pnlip1; pnli < pnln - 1; pnli++)
- pnlps.plus(pnli).setPtr(pnlps.plus(pnli + 1).getPtr());
+ pnlps[pnli] = pnlps[pnli + 1];
triangulate(pnlps, pnln - 1);
return;
}
@@ -319,7 +312,7 @@ try {
throw new IllegalStateException("libpath/%s:%d: %s\n" + "graphviz-2.38.0\\lib\\pathplan\\shortest.c" + 26 + ("triangulation failed"));
}
else
- loadtriangle(pnlps.plus(0).getPtr(), pnlps.plus(1).getPtr(), pnlps.plus(2).getPtr());
+ loadtriangle(pnlps[0], pnlps[1], pnlps[2]);
} finally {
LEAVING("73cr7m3mqvtuotpzrmaw2y8zm","triangulate");
}
@@ -330,7 +323,7 @@ LEAVING("73cr7m3mqvtuotpzrmaw2y8zm","triangulate");
//3 72of3cd7shtwokglxapw04oe9
// static int isdiagonal(int pnli, int pnlip2, pointnlink_t ** pnlps, int pnln)
-public static boolean isdiagonal(int pnli, int pnlip2, __ptr__ pnlps, int pnln) {
+public static boolean isdiagonal(int pnli, int pnlip2, ST_pointnlink_t[] pnlps, int pnln) {
ENTERING("72of3cd7shtwokglxapw04oe9","isdiagonal");
try {
int pnlip1, pnlim1, pnlj, pnljp1;
@@ -339,17 +332,17 @@ try {
pnlip1 = (pnli + 1) % pnln;
pnlim1 = (pnli + pnln - 1) % pnln;
/* If P[pnli] is a convex vertex [ pnli+1 left of (pnli-1,pnli) ]. */
- if (ccw(pnlps.plus(pnlim1).getPtr("pp"), pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip1).getPtr("pp")) ==
+ if (ccw(pnlps[pnlim1].pp, pnlps[pnli].pp, pnlps[pnlip1].pp) ==
1)
res =
- (ccw(pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip2).getPtr("pp"), pnlps.plus(pnlim1).getPtr("pp")) ==
+ (ccw(pnlps[pnli].pp, pnlps[pnlip2].pp, pnlps[pnlim1].pp) ==
1)
- && (ccw(pnlps.plus(pnlip2).getPtr("pp"), pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip1).getPtr("pp"))
+ && (ccw(pnlps[pnlip2].pp, pnlps[pnli].pp, pnlps[pnlip1].pp)
== 1);
/* Assume (pnli - 1, pnli, pnli + 1) not collinear. */
else
- res = (ccw(pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip2).getPtr("pp"),
- pnlps.plus(pnlip1).getPtr("pp")) == 2);
+ res = (ccw(pnlps[pnli].pp, pnlps[pnlip2].pp,
+ pnlps[pnlip1].pp) == 2);
if (N(res))
return false;
/* check against all other edges */
@@ -357,8 +350,8 @@ try {
pnljp1 = (pnlj + 1) % pnln;
if (N((pnlj == pnli) || (pnljp1 == pnli) ||
(pnlj == pnlip2) || (pnljp1 == pnlip2)))
- if (intersects(pnlps.plus(pnli).getPtr("pp"), pnlps.plus(pnlip2).getPtr("pp"),
- pnlps.plus(pnlj).getPtr("pp"), pnlps.plus(pnljp1).getPtr("pp")))
+ if (intersects(pnlps[pnli].pp, pnlps[pnlip2].pp,
+ pnlps[pnlj].pp, pnlps[pnljp1].pp))
return false;
}
return ((N(false)));
@@ -375,24 +368,24 @@ LEAVING("72of3cd7shtwokglxapw04oe9","isdiagonal");
public static void loadtriangle(__ptr__ pnlap, __ptr__ pnlbp, __ptr__ pnlcp) {
ENTERING("7vf9jtj9i8rg0cxrstbqswuck","loadtriangle");
try {
- triangle_t trip;
+ ST_triangle_t.Array trip;
int ei;
/* make space */
if (Z.z().tril >= Z.z().trin)
growtris(Z.z().trin + 20);
- trip = (triangle_t) Z.z().tris.plus(Z.z().tril++);
- trip.setInt("mark", 0);
- trip.getArrayOfStruct("e").plus(0).getStruct().setPtr("pnl0p", pnlap);
- trip.getArrayOfStruct("e").plus(0).getStruct().setPtr("pnl1p", pnlbp);
- trip.getArrayOfStruct("e").plus(0).getStruct().setPtr("rtp", null);
- trip.getArrayOfStruct("e").plus(1).getStruct().setPtr("pnl0p", pnlbp);
- trip.getArrayOfStruct("e").plus(1).getStruct().setPtr("pnl1p", pnlcp);
- trip.getArrayOfStruct("e").plus(1).getStruct().setPtr("rtp", null);
- trip.getArrayOfStruct("e").plus(2).getStruct().setPtr("pnl0p", pnlcp);
- trip.getArrayOfStruct("e").plus(2).getStruct().setPtr("pnl1p", pnlap);
- trip.getArrayOfStruct("e").plus(2).getStruct().setPtr("rtp", null);
+ trip = Z.z().tris.plusJ(Z.z().tril++);
+ trip.get(0).mark = 0;
+ trip.get(0).e[0].pnl0p = (ST_pointnlink_t) pnlap;
+ trip.get(0).e[0].pnl1p = (ST_pointnlink_t) pnlbp;
+ trip.get(0).e[0].rtp = null;
+ trip.get(0).e[1].pnl0p = (ST_pointnlink_t) pnlbp;
+ trip.get(0).e[1].pnl1p = (ST_pointnlink_t) pnlcp;
+ trip.get(0).e[1].rtp = null;
+ trip.get(0).e[2].pnl0p = (ST_pointnlink_t) pnlcp;
+ trip.get(0).e[2].pnl1p = (ST_pointnlink_t) pnlap;
+ trip.get(0).e[2].rtp = null;
for (ei = 0; ei < 3; ei++)
- trip.getArrayOfStruct("e").plus(ei).getStruct().setPtr("ltp", trip);
+ trip.get(0).e[ei].lrp = trip;
} finally {
LEAVING("7vf9jtj9i8rg0cxrstbqswuck","loadtriangle");
}
@@ -406,23 +399,24 @@ LEAVING("7vf9jtj9i8rg0cxrstbqswuck","loadtriangle");
public static void connecttris(int tri1, int tri2) {
ENTERING("6coujw0qksrgu5sxj0r39qm1u","connecttris");
try {
- triangle_t tri1p, tri2p;
+ ST_triangle_t.Array tri1p;
+ ST_triangle_t.Array tri2p;
int ei, ej;
for (ei = 0; ei < 3; ei++) {
for (ej = 0; ej < 3; ej++) {
- tri1p = (triangle_t) Z.z().tris.plus(tri1);
- tri2p = (triangle_t) Z.z().tris.plus(tri2);
- if ((EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"),
- tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl0p").getPtr("pp")) &&
- EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp"),
- tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl1p").getPtr("pp"))) ||
- (EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"),
- tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl1p").getPtr("pp")) &&
- EQ(tri1p.getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp"),
- tri2p.getArrayOfStruct("e").plus(ej).getStruct().getPtr("pnl0p").getPtr("pp"))))
+ tri1p = Z.z().tris.plusJ(tri1);
+ tri2p = Z.z().tris.plusJ(tri2);
+ if ((EQ(tri1p.get(0).e[ei].pnl0p.pp,
+ tri2p.get(0).e[ej].pnl0p.pp) &&
+ EQ(tri1p.get(0).e[ei].pnl1p.pp,
+ tri2p.get(0).e[ej].pnl1p.pp)) ||
+ (EQ(tri1p.get(0).e[ei].pnl0p.pp,
+ tri2p.get(0).e[ej].pnl1p.pp) &&
+ EQ(tri1p.get(0).e[ei].pnl1p.pp,
+ tri2p.get(0).e[ej].pnl0p.pp)))
{
- tri1p.getArrayOfStruct("e").plus(ei).getStruct().setPtr("rtp", tri2p);
- tri2p.getArrayOfStruct("e").plus(ej).getStruct().setPtr("rtp", tri1p);
+ tri1p.get(0).e[ei].rtp = tri2p;
+ tri2p.get(0).e[ej].rtp = tri1p;
}
}
}
@@ -440,16 +434,16 @@ public static boolean marktripath(int trii, int trij) {
ENTERING("3waxf5wy3mwt12wpg5hxg3o9c","marktripath");
try {
int ei;
- if (Z.z().tris.plus(trii).getBoolean("mark"))
+ if (Z.z().tris.plusJ(trii).get(0).mark!=0)
return false;
- Z.z().tris.plus(trii).setInt("mark", 1);
+ Z.z().tris.plusJ(trii).get(0).mark = 1;
if (trii == trij)
return ((!(false)));
for (ei = 0; ei < 3; ei++)
- if (Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp")!=null &&
- marktripath(Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("rtp").minus(Z.z().tris), trij))
+ if ((Z.z().tris.plusJ(trii).get(0).e[ei].rtp!=null &&
+ marktripath(Z.z().tris.plusJ(trii).get(0).e[ei].rtp.minus(Z.z().tris), trij)))
return ((!(false)));
- Z.z().tris.plus(trii).setInt("mark", 0);
+ Z.z().tris.plusJ(trii).get(0).mark = 0;
return false;
} finally {
LEAVING("3waxf5wy3mwt12wpg5hxg3o9c","marktripath");
@@ -461,21 +455,21 @@ LEAVING("3waxf5wy3mwt12wpg5hxg3o9c","marktripath");
//3 44szdl31mg8mt5qrfj70kb2sn
// static void add2dq(int side, pointnlink_t * pnlp)
-public static void add2dq(int side, __ptr__ pnlp) {
+public static void add2dq(int side, ST_pointnlink_t pnlp) {
ENTERING("44szdl31mg8mt5qrfj70kb2sn","add2dq");
try {
if (side == 1) {
- if (Z.z().dq.getInt("lpnlpi") - Z.z().dq.getInt("fpnlpi") >= 0)
- pnlp.setPtr("link", Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).getPtr());
+ if (Z.z().dq.lpnlpi - Z.z().dq.fpnlpi >= 0)
+ pnlp.link = Z.z().dq.pnlps[Z.z().dq.fpnlpi];
/* shortest path links */
- Z.z().dq.setInt("fpnlpi", Z.z().dq.getInt("fpnlpi")-1);
- Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("fpnlpi")).setPtr(pnlp);
+ Z.z().dq.fpnlpi = Z.z().dq.fpnlpi-1;
+ Z.z().dq.pnlps[Z.z().dq.fpnlpi] = pnlp;
} else {
- if (Z.z().dq.getInt("lpnlpi") - Z.z().dq.getInt("fpnlpi") >= 0)
- pnlp.setPtr("link", Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).getPtr());
+ if (Z.z().dq.lpnlpi - Z.z().dq.fpnlpi >= 0)
+ pnlp.link = Z.z().dq.pnlps[Z.z().dq.lpnlpi];
/* shortest path links */
- Z.z().dq.setInt("lpnlpi", Z.z().dq.getInt("lpnlpi")+1);
- Z.z().dq.getPtr("pnlps").plus(Z.z().dq.getInt("lpnlpi")).setPtr(pnlp);
+ Z.z().dq.lpnlpi = Z.z().dq.lpnlpi+1;
+ Z.z().dq.pnlps[Z.z().dq.lpnlpi] = pnlp;
}
} finally {
LEAVING("44szdl31mg8mt5qrfj70kb2sn","add2dq");
@@ -491,9 +485,9 @@ public static void splitdq(int side, int index) {
ENTERING("572sssdz1se16w790xceiy5vr","splitdq");
try {
if (side == 1)
- Z.z().dq.setInt("lpnlpi", index);
+ Z.z().dq.lpnlpi = index;
else
- Z.z().dq.setInt("fpnlpi", index);
+ Z.z().dq.fpnlpi = index;
} finally {
LEAVING("572sssdz1se16w790xceiy5vr","splitdq");
}
@@ -504,19 +498,19 @@ LEAVING("572sssdz1se16w790xceiy5vr","splitdq");
//3 9dnrc8vqpffp5t3bmsackgqtl
// static int finddqsplit(pointnlink_t * pnlp)
-public static int finddqsplit(pointnlink_t pnlp) {
+public static int finddqsplit(ST_pointnlink_t pnlp) {
ENTERING("9dnrc8vqpffp5t3bmsackgqtl","finddqsplit");
try {
int index;
- for (index = Z.z().dq.getInt("fpnlpi"); index < Z.z().dq.getInt("apex"); index++)
- if (ccw(Z.z().dq.getPtr("pnlps").plus(index + 1).getPtr().getPtr("pp"), Z.z().dq.getPtr("pnlps").plus(index).getPtr().getPtr("pp"), pnlp.getPtr("pp")) ==
+ for (index = Z.z().dq.fpnlpi; index < Z.z().dq.apex; index++)
+ if (ccw(Z.z().dq.pnlps[index + 1].pp, Z.z().dq.pnlps[index].pp, pnlp.pp) ==
1)
return index;
- for (index = Z.z().dq.getInt("lpnlpi"); index > Z.z().dq.getInt("apex"); index--)
- if (ccw(Z.z().dq.getPtr("pnlps").plus(index - 1).getPtr().getPtr("pp"), Z.z().dq.getPtr("pnlps").plus(index).getPtr().getPtr("pp"), pnlp.getPtr("pp")) ==
+ for (index = Z.z().dq.lpnlpi; index > Z.z().dq.apex; index--)
+ if (ccw(Z.z().dq.pnlps[index - 1].pp, Z.z().dq.pnlps[index].pp, pnlp.pp) ==
2)
return index;
- return Z.z().dq.getInt("apex");
+ return Z.z().dq.apex;
} finally {
LEAVING("9dnrc8vqpffp5t3bmsackgqtl","finddqsplit");
}
@@ -527,12 +521,12 @@ LEAVING("9dnrc8vqpffp5t3bmsackgqtl","finddqsplit");
//3 72h03s8inxtto2ekvmuqjtj3d
// static int ccw(Ppoint_t * p1p, Ppoint_t * p2p, Ppoint_t * p3p)
-public static int ccw(__ptr__ p1p, __ptr__ p2p, __ptr__ p3p) {
+public static int ccw(ST_pointf p1p, ST_pointf p2p, ST_pointf p3p) {
ENTERING("72h03s8inxtto2ekvmuqjtj3d","ccw");
try {
double d;
- d = ((p1p.getDouble("y") - p2p.getDouble("y")) * (p3p.getDouble("x") - p2p.getDouble("x"))) -
- ((p3p.getDouble("y") - p2p.getDouble("y")) * (p1p.getDouble("x") - p2p.getDouble("x")));
+ d = ((p1p.y - p2p.y) * (p3p.x - p2p.x)) -
+ ((p3p.y - p2p.y) * (p1p.x - p2p.x));
return (d > 0) ? 1 : ((d < 0) ? 2 : 3);
} finally {
LEAVING("72h03s8inxtto2ekvmuqjtj3d","ccw");
@@ -544,7 +538,7 @@ LEAVING("72h03s8inxtto2ekvmuqjtj3d","ccw");
//3 22a9ajg9t8ovqsigk3tyu3rkd
// static int intersects(Ppoint_t * pap, Ppoint_t * pbp, Ppoint_t * pcp, Ppoint_t * pdp)
-public static boolean intersects(__ptr__ pap, __ptr__ pbp, __ptr__ pcp, __ptr__ pdp) {
+public static boolean intersects(ST_pointf pap, ST_pointf pbp, ST_pointf pcp, ST_pointf pdp) {
ENTERING("22a9ajg9t8ovqsigk3tyu3rkd","intersects");
try {
int ccw1, ccw2, ccw3, ccw4;
@@ -571,18 +565,18 @@ LEAVING("22a9ajg9t8ovqsigk3tyu3rkd","intersects");
//3 uh5n18rzyevtb4cwpni70qpc
// static int between(Ppoint_t * pap, Ppoint_t * pbp, Ppoint_t * pcp)
-public static boolean between(__ptr__ pap, __ptr__ pbp, __ptr__ pcp) {
+public static boolean between(ST_pointf pap, ST_pointf pbp, ST_pointf pcp) {
ENTERING("uh5n18rzyevtb4cwpni70qpc","between");
try {
- final __struct__<pointf> p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class);
- p1.setDouble("x", pbp.getDouble("x") - pap.getDouble("x"));
- p1.setDouble("y", pbp.getDouble("y") - pap.getDouble("y"));
- p2.setDouble("x", pcp.getDouble("x") - pap.getDouble("x"));
- p2.setDouble("y", pcp.getDouble("y") - pap.getDouble("y"));
+ final ST_pointf p1 = new ST_pointf(), p2 = new ST_pointf();
+ p1.setDouble("x", pbp.x - pap.x);
+ p1.setDouble("y", pbp.y - pap.y);
+ p2.setDouble("x", pcp.x - pap.x);
+ p2.setDouble("y", pcp.y - pap.y);
if (ccw(pap, pbp, pcp) != 3)
return false;
- return (p2.getDouble("x") * p1.getDouble("x") + p2.getDouble("y") * p1.getDouble("y") >= 0) &&
- (p2.getDouble("x") * p2.getDouble("x") + p2.getDouble("y") * p2.getDouble("y") <= p1.getDouble("x") * p1.getDouble("x") + p1.getDouble("y") * p1.getDouble("y"));
+ return (p2.x * p1.x + p2.y * p1.y >= 0) &&
+ (p2.x * p2.x + p2.y * p2.y <= p1.x * p1.x + p1.y * p1.y);
} finally {
LEAVING("uh5n18rzyevtb4cwpni70qpc","between");
}
@@ -593,13 +587,13 @@ LEAVING("uh5n18rzyevtb4cwpni70qpc","between");
//3 zti1mzm2m7tr2xwnbf7e8u3d
// static int pointintri(int trii, Ppoint_t * pp)
-public static boolean pointintri(int trii, __ptr__ pp) {
+public static boolean pointintri(int trii, ST_pointf pp) {
ENTERING("zti1mzm2m7tr2xwnbf7e8u3d","pointintri");
try {
int ei, sum;
for (ei = 0, sum = 0; ei < 3; ei++)
- if (ccw(Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl0p").getPtr("pp"),
- Z.z().tris.plus(trii).getArrayOfStruct("e").plus(ei).getStruct().getPtr("pnl1p").getPtr("pp"), pp) != 2)
+ if (ccw(Z.z().tris.plusJ(trii).get(0).e[ei].pnl0p.pp,
+ Z.z().tris.plusJ(trii).get(0).e[ei].pnl1p.pp, pp) != 2)
sum++;
return (sum == 3 || sum == 0);
} finally {
@@ -618,22 +612,20 @@ try {
if (newpnln <= Z.z().pnln)
return;
if (N(Z.z().pnls)) {
- if (N(Z.z().pnls = (pointnlink_t) Memory.malloc(sizeof (pointnlink_t.class, newpnln)))) {
+ if (N(Z.z().pnls = malloc(newpnln))) {
UNSUPPORTED("9zyfc4bjg3i6rrna9vqf8doys"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc pnls"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
- if (N(Z.z().pnlps = Memory.malloc(sizeof_starstar_empty(pointnlink_t.class, newpnln)))) {
+ if (N(Z.z().pnlps = malloc(newpnln))) {
UNSUPPORTED("1etar0wd2cbbvqo4jnmbvjiz4"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc pnlps"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
} else {
- if (N(Z.z().pnls = (pointnlink_t) Memory.realloc(Z.z().pnls,
- sizeof (pointnlink_t.class, newpnln)))) {
+ if (N(Z.z().pnls = realloc(Z.z().pnls, newpnln))) {
UNSUPPORTED("105nogpkt0qqut0yu4alvkk1u"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc pnls"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
- if (N(Z.z().pnlps = Memory.realloc(Z.z().pnlps,
- sizeof_starstar_empty(pointnlink_t.class, newpnln)))) {
+ if (N(Z.z().pnlps = realloc(Z.z().pnlps, newpnln))) {
UNSUPPORTED("be84alh84ub40x4um989aj20d"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc pnlps"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
@@ -644,6 +636,23 @@ LEAVING("85wstb60jkjd0kbh9tyninm4h","growpnls");
}
}
+private static ST_pointnlink_t[] malloc(int nb) {
+ ST_pointnlink_t result[] = new ST_pointnlink_t[nb];
+ for (int i = 0; i < result.length; i++) {
+ result[i] = new ST_pointnlink_t();
+ }
+ return result;
+}
+private static ST_pointnlink_t[] realloc(ST_pointnlink_t orig[], int nb) {
+ if (orig.length >= nb) {
+ return orig;
+ }
+ ST_pointnlink_t result[] = malloc(nb);
+ for (int i = 0; i < orig.length; i++) {
+ result[i] = orig[i];
+ }
+ return result;
+}
@@ -655,12 +664,12 @@ try {
if (newtrin <= Z.z().trin)
return;
if (N(Z.z().tris)) {
- if (N(Z.z().tris = Memory.malloc(sizeof(triangle_t.class, newtrin)))) {
+ if (N(Z.z().tris = new ST_triangle_t.Array(newtrin))) {
UNSUPPORTED("5782e28cjpaa3dpf8up4zmtq7"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc tris"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
} else {
- if (N(Z.z().tris = Memory.realloc(Z.z().tris, sizeof (triangle_t.class, newtrin)))) {
+ if (N(Z.z().tris = Z.z().tris.reallocJ(newtrin))) {
UNSUPPORTED("d3fgu54pn5tydfhn7z73v73ra"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc tris"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
@@ -672,6 +681,24 @@ LEAVING("c5q8ult6w26jppe5ifzgcoq82","growtris");
}
+private static ST_triangle_t[] malloc2(int nb) {
+ ST_triangle_t result[] = new ST_triangle_t[nb];
+ for (int i = 0; i < result.length; i++) {
+ result[i] = new ST_triangle_t();
+ }
+ return result;
+}
+private static ST_triangle_t[] realloc2(ST_triangle_t orig[], int nb) {
+ if (orig.length >= nb) {
+ return orig;
+ }
+ ST_triangle_t result[] = malloc2(nb);
+ for (int i = 0; i < orig.length; i++) {
+ result[i] = orig[i];
+ }
+ return result;
+}
+
//3 bzym9u6dtatii1vp4hcmofc80
@@ -679,23 +706,21 @@ LEAVING("c5q8ult6w26jppe5ifzgcoq82","growtris");
public static void growdq(int newdqn) {
ENTERING("bzym9u6dtatii1vp4hcmofc80","growdq");
try {
- if (newdqn <= Z.z().dq.getInt("pnlpn"))
+ if (newdqn <= Z.z().dq.pnlpn)
return;
- if (N(Z.z().dq.getPtr("pnlps"))) {
+ if (N(Z.z().dq.pnlps)) {
if (N
- (Z.z().dq.setPtr("pnlps",
- (__ptr__) Memory.malloc(sizeof_starstar_empty(pointnlink_t.class, newdqn))))) {
+ (Z.z().dq.malloc(newdqn))) {
UNSUPPORTED("88fwpb40wz9jc8jiz7u032s4t"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc dq.pnls"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
} else {
- if (N(Z.z().dq.setPtr("pnlps", (__ptr__) Memory.realloc(Z.z().dq.getPtr("pnlps"),
- sizeof_starstar_empty(pointnlink_t.class, newdqn))))) {
+ if (N(Z.z().dq.realloc(newdqn))) {
UNSUPPORTED("exqx4ck7h15m8whgip6xpnhoo"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc dq.pnls"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
}
- Z.z().dq.setInt("pnlpn", newdqn);
+ Z.z().dq.pnlpn = newdqn;
} finally {
LEAVING("bzym9u6dtatii1vp4hcmofc80","growdq");
}
@@ -712,13 +737,12 @@ try {
if (newopn <= Z.z().opn_shortest)
return;
if (N(Z.z().ops_shortest)) {
- if (N(Z.z().ops_shortest = Memory.malloc(sizeof(pointf.class, newopn)))) {
+ if (N(Z.z().ops_shortest = new ST_pointf.Array(newopn))) {
UNSUPPORTED("7wxgcgah7iy6vetj5yszoq4k4"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot malloc ops"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
} else {
- if (N(Z.z().ops_shortest = Memory.realloc(Z.z().ops_shortest,
- sizeof(pointf.class, newopn)))) {
+ if (N(Z.z().ops_shortest = Z.z().ops_shortest.reallocJ(newopn))) {
UNSUPPORTED("7azrdo5s3kc44taqmtmeu1s33"); // fprintf (stderr, "libpath/%s:%d: %s\n", "graphviz-2.38.0\\lib\\pathplan\\shortest.c", 26, ("cannot realloc ops"));
UNSUPPORTED("1r6uhbnmxv8c6msnscw07w0qx"); // longjmp(jbuf,1);
}
diff --git a/src/h/Agattr_s.java b/src/h/Agattr_s.java
deleted file mode 100644
index 0813e82..0000000
--- a/src/h/Agattr_s.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 bhyg6b8o9rt02pkq0cw5v7v8l
-
-public interface Agattr_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agattr_s",
-"{",
-"Agrec_t h",
-"Dict_t *dict",
-"char **str",
-"}");
-}
-
-// struct Agattr_s { /* dynamic string attributes */
-// Agrec_t h; /* common data header */
-// Dict_t *dict; /* shared dict to interpret attr field */
-// char **str; /* the attribute string values */
-// }; \ No newline at end of file
diff --git a/src/h/Agattr_t.java b/src/h/Agattr_t.java
deleted file mode 100644
index 0a816da..0000000
--- a/src/h/Agattr_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 4eab8jpwd22sxwe7231h81ak7
-
-public interface Agattr_t extends Agattr_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agattr_s Agattr_t");
-}
-
-// typedef struct Agattr_s Agattr_t; \ No newline at end of file
diff --git a/src/h/Agcbdisc_s.java b/src/h/Agcbdisc_s.java
deleted file mode 100644
index 053e1a5..0000000
--- a/src/h/Agcbdisc_s.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4bs0remcyjtoc7ic0ezb77hjt
-
-public interface Agcbdisc_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agcbdisc_s",
-"{",
-"struct",
-"{",
-"agobjfn_t ins",
-"agobjupdfn_t mod",
-"agobjfn_t del",
-"}",
-"graph, node, edge",
-"}");
-}
-
-// struct Agcbdisc_s {
-// struct {
-// agobjfn_t ins;
-// agobjupdfn_t mod;
-// agobjfn_t del;
-// } graph, node, edge;
-// }; \ No newline at end of file
diff --git a/src/h/Agcbdisc_t.java b/src/h/Agcbdisc_t.java
deleted file mode 100644
index 0800c7a..0000000
--- a/src/h/Agcbdisc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 5yq6nwzfy7wrzq92i583nbcxk
-
-public interface Agcbdisc_t extends Agcbdisc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agcbdisc_s Agcbdisc_t");
-}
-
-// typedef struct Agcbdisc_s Agcbdisc_t; \ No newline at end of file
diff --git a/src/h/Agclos_s.java b/src/h/Agclos_s.java
deleted file mode 100644
index 22eebd3..0000000
--- a/src/h/Agclos_s.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 eo8sfsh5lby147igpryzvitu7
-
-public interface Agclos_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agclos_s",
-"{",
-"Agdisc_t disc",
-"Agdstate_t state",
-"Dict_t *strdict",
-"unsigned long seq[3]",
-"Agcbstack_t *cb",
-"unsigned char callbacks_enabled",
-"Dict_t *lookup_by_name[3]",
-"Dict_t *lookup_by_id[3]",
-"}");
-}
-
-// struct Agclos_s {
-// Agdisc_t disc; /* resource discipline functions */
-// Agdstate_t state; /* resource closures */
-// Dict_t *strdict; /* shared string dict */
-// unsigned long seq[3]; /* local object sequence number counter */
-// Agcbstack_t *cb; /* user and system callback function stacks */
-// unsigned char callbacks_enabled; /* issue user callbacks or hold them? */
-// Dict_t *lookup_by_name[3];
-// Dict_t *lookup_by_id[3];
-// }; \ No newline at end of file
diff --git a/src/h/Agclos_t.java b/src/h/Agclos_t.java
deleted file mode 100644
index 406608b..0000000
--- a/src/h/Agclos_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 b7spmxawwjlyako5bvwhmto82
-
-public interface Agclos_t extends Agclos_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agclos_s Agclos_t");
-}
-
-// typedef struct Agclos_s Agclos_t; \ No newline at end of file
diff --git a/src/h/Agcmpedge_t.java b/src/h/Agcmpedge_t.java
deleted file mode 100644
index 8b449f2..0000000
--- a/src/h/Agcmpedge_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 aaoij3s9ltd2qv1eegfydx2a3
-
-public interface Agcmpedge_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agcmpedge_s",
-"{",
-"Agrec_t hdr",
-"save_stack_t stack[2]",
-"}",
-"Agcmpedge_t");
-}
-
-// typedef struct Agcmpedge_s {
-// Agrec_t hdr;
-// save_stack_t stack[2]; /* IN and OUT save stacks */
-// } Agcmpedge_t; \ No newline at end of file
diff --git a/src/h/Agcmpgraph_t.java b/src/h/Agcmpgraph_t.java
deleted file mode 100644
index f0f8527..0000000
--- a/src/h/Agcmpgraph_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5vqgch0hhxdt8uyrsm383989v
-
-public interface Agcmpgraph_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agcmpgraph_s",
-"{",
-"Agrec_t hdr",
-"Agnode_t *node",
-"Dict_t *hidden_node_set",
-"}",
-"Agcmpgraph_t");
-}
-
-// typedef struct Agcmpgraph_s {
-// Agrec_t hdr;
-// Agnode_t *node; /* its associated node */
-// Dict_t *hidden_node_set;
-// } Agcmpgraph_t; \ No newline at end of file
diff --git a/src/h/Agcmpnode_t.java b/src/h/Agcmpnode_t.java
deleted file mode 100644
index ff320a3..0000000
--- a/src/h/Agcmpnode_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 cym8pkipa9u10pg85jps0y6fj
-
-public interface Agcmpnode_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agcmpnode_s",
-"{",
-"Agrec_t hdr",
-"Agraph_t *subg",
-"int collapsed",
-"}",
-"Agcmpnode_t");
-}
-
-// typedef struct Agcmpnode_s {
-// Agrec_t hdr;
-// Agraph_t *subg;
-// int collapsed;
-// } Agcmpnode_t; \ No newline at end of file
diff --git a/src/h/Agdatadict_s.java b/src/h/Agdatadict_s.java
deleted file mode 100644
index 7917834..0000000
--- a/src/h/Agdatadict_s.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 1wbtv41cwqamseppeo0vb4kjf
-
-public interface Agdatadict_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agdatadict_s",
-"{",
-"Agrec_t h",
-"struct",
-"{",
-"Dict_t *n, *e, *g",
-"}",
-"dict",
-"}");
-}
-
-// struct Agdatadict_s { /* set of dictionaries per graph */
-// Agrec_t h; /* installed in list of graph recs */
-// struct {
-// Dict_t *n, *e, *g;
-// } dict;
-// }; \ No newline at end of file
diff --git a/src/h/Agdatadict_t.java b/src/h/Agdatadict_t.java
deleted file mode 100644
index 89bbcca..0000000
--- a/src/h/Agdatadict_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 cx24b8rdaygr5mrcvg063ostp
-
-public interface Agdatadict_t extends Agdatadict_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agdatadict_s Agdatadict_t");
-}
-
-// typedef struct Agdatadict_s Agdatadict_t; \ No newline at end of file
diff --git a/src/h/Agdesc_s.java b/src/h/Agdesc_s.java
deleted file mode 100644
index 90dc7a1..0000000
--- a/src/h/Agdesc_s.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 drqmj6wswekevi9i4ghve61wj
-
-public interface Agdesc_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agdesc_s",
-"{",
-"unsigned directed:1",
-"unsigned strict:1",
-"unsigned no_loop:1",
-"unsigned maingraph:1",
-"unsigned flatlock:1",
-"unsigned no_write:1",
-"unsigned has_attrs:1",
-"unsigned has_cmpnd:1",
-"}");
-}
-
-// struct Agdesc_s { /* graph descriptor */
-// unsigned directed:1; /* if edges are asymmetric */
-// unsigned strict:1; /* if multi-edges forbidden */
-// unsigned no_loop:1; /* if no loops */
-// unsigned maingraph:1; /* if this is the top level graph */
-// unsigned flatlock:1; /* if sets are flattened into lists in cdt */
-// unsigned no_write:1; /* if a temporary subgraph */
-// unsigned has_attrs:1; /* if string attr tables should be initialized */
-// unsigned has_cmpnd:1; /* if may contain collapsed nodes */
-// }; \ No newline at end of file
diff --git a/src/h/Agdesc_t.java b/src/h/Agdesc_t.java
deleted file mode 100644
index f41ef97..0000000
--- a/src/h/Agdesc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 2nxdbvy3uxd7hzq9yspewhiy2
-
-public interface Agdesc_t extends Agdesc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agdesc_s Agdesc_t");
-}
-
-// typedef struct Agdesc_s Agdesc_t; \ No newline at end of file
diff --git a/src/h/Agdisc_s.java b/src/h/Agdisc_s.java
deleted file mode 100644
index 92b113d..0000000
--- a/src/h/Agdisc_s.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 88aohxn7kudu5j4oxbyvcxvz9
-
-public interface Agdisc_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agdisc_s",
-"{",
-"Agmemdisc_t *mem",
-"Agiddisc_t *id",
-"Agiodisc_t *io",
-"}");
-}
-
-// struct Agdisc_s { /* user's discipline */
-// Agmemdisc_t *mem;
-// Agiddisc_t *id;
-// Agiodisc_t *io;
-// }; \ No newline at end of file
diff --git a/src/h/Agdisc_t.java b/src/h/Agdisc_t.java
deleted file mode 100644
index 70fc7c1..0000000
--- a/src/h/Agdisc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 a75fiuk7wedgsbsb3dymg9c1c
-
-public interface Agdisc_t extends Agdisc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agdisc_s Agdisc_t");
-}
-
-// typedef struct Agdisc_s Agdisc_t; \ No newline at end of file
diff --git a/src/h/Agdstate_t.java b/src/h/Agdstate_t.java
deleted file mode 100644
index c2242c9..0000000
--- a/src/h/Agdstate_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 5kp1ggrs1pvfbdfrnl42a1l69
-
-public interface Agdstate_t extends Agdstate_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agdstate_s Agdstate_t");
-}
-
-// typedef struct Agdstate_s Agdstate_t; \ No newline at end of file
diff --git a/src/h/Agedge_s.java b/src/h/Agedge_s.java
deleted file mode 100644
index dcdf5a6..0000000
--- a/src/h/Agedge_s.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5g85sn734cnzkqf8sdgtdesgl
-
-public interface Agedge_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agedge_s",
-"{",
-"Agobj_t base",
-"Dtlink_t id_link",
-"Dtlink_t seq_link",
-"Agnode_t *node",
-"}");
-}
-
-// struct Agedge_s {
-// Agobj_t base;
-// Dtlink_t id_link; /* main graph only */
-// Dtlink_t seq_link;
-// Agnode_t *node; /* the endpoint node */
-// }; \ No newline at end of file
diff --git a/src/h/Agedge_t.java b/src/h/Agedge_t.java
deleted file mode 100644
index 3496435..0000000
--- a/src/h/Agedge_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 at817e3s1icc92sqipan1gjl9
-
-public interface Agedge_t extends Agedge_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agedge_s Agedge_t");
-}
-
-// typedef struct Agedge_s Agedge_t; \ No newline at end of file
diff --git a/src/h/Agedgeinfo_t.java b/src/h/Agedgeinfo_t.java
deleted file mode 100644
index 856f5a9..0000000
--- a/src/h/Agedgeinfo_t.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c1b3tf6cmbwk2cvu1u6j2rduc
-
-public interface Agedgeinfo_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agedgeinfo_t",
-"{",
-"Agrec_t hdr",
-"splines *spl",
-"port tail_port, head_port",
-"textlabel_t *label, *head_label, *tail_label, *xlabel",
-"char edge_type",
-"char adjacent",
-"char label_ontop",
-"unsigned char gui_state",
-"edge_t *to_orig",
-"void *alg",
-"double factor",
-"double dist",
-"Ppolyline_t path",
-"unsigned char showboxes",
-"boolean conc_opp_flag",
-"short xpenalty",
-"int weight",
-"int cutvalue, tree_index",
-"short count",
-"unsigned short minlen",
-"edge_t *to_virt",
-"}",
-"Agedgeinfo_t");
-}
-
-// typedef struct Agedgeinfo_t {
-// Agrec_t hdr;
-// splines *spl;
-// port tail_port, head_port;
-// textlabel_t *label, *head_label, *tail_label, *xlabel;
-// char edge_type;
-// char adjacent; /* true for flat edge with adjacent nodes */
-// char label_ontop;
-// unsigned char gui_state; /* Edge state for GUI ops */
-// edge_t *to_orig; /* for dot's shapes.c */
-// void *alg;
-//
-//
-// double factor;
-// double dist;
-// Ppolyline_t path;
-//
-//
-// unsigned char showboxes;
-// boolean conc_opp_flag;
-// short xpenalty;
-// int weight;
-// int cutvalue, tree_index;
-// short count;
-// unsigned short minlen;
-// edge_t *to_virt;
-//
-// } Agedgeinfo_t; \ No newline at end of file
diff --git a/src/h/Agedgepair_s.java b/src/h/Agedgepair_s.java
deleted file mode 100644
index e38067d..0000000
--- a/src/h/Agedgepair_s.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 57xqkv3rhmm29ure1eqi4xjwm
-
-public interface Agedgepair_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agedgepair_s",
-"{",
-"Agedge_t out, in",
-"}");
-}
-
-// struct Agedgepair_s {
-// Agedge_t out, in;
-// }; \ No newline at end of file
diff --git a/src/h/Agedgepair_t.java b/src/h/Agedgepair_t.java
deleted file mode 100644
index 18d5277..0000000
--- a/src/h/Agedgepair_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 9y2h3138nynj283jcxucqmaib
-
-public interface Agedgepair_t extends Agedgepair_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agedgepair_s Agedgepair_t");
-}
-
-// typedef struct Agedgepair_s Agedgepair_t; \ No newline at end of file
diff --git a/src/h/Agiddisc_s.java b/src/h/Agiddisc_s.java
deleted file mode 100644
index 751bc95..0000000
--- a/src/h/Agiddisc_s.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9v8qggm3xqq7ok84lmnkhvpv8
-
-public interface Agiddisc_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agiddisc_s",
-"{",
-"void *(*open) (Agraph_t * g, Agdisc_t*)",
-"long (*map) (void *state, int objtype, char *str, unsigned long *id, int createflag)",
-"long (*alloc) (void *state, int objtype, unsigned long id)",
-"void (*free) (void *state, int objtype, unsigned long id)",
-"char *(*print) (void *state, int objtype, unsigned long id)",
-"void (*close) (void *state)",
-"void (*idregister) (void *state, int objtype, void *obj)",
-"}");
-}
-
-// struct Agiddisc_s { /* object ID allocator */
-// void *(*open) (Agraph_t * g, Agdisc_t*); /* associated with a graph */
-// long (*map) (void *state, int objtype, char *str, unsigned long *id,
-// int createflag);
-// long (*alloc) (void *state, int objtype, unsigned long id);
-// void (*free) (void *state, int objtype, unsigned long id);
-// char *(*print) (void *state, int objtype, unsigned long id);
-// void (*close) (void *state);
-// void (*idregister) (void *state, int objtype, void *obj);
-// }; \ No newline at end of file
diff --git a/src/h/Agiddisc_t.java b/src/h/Agiddisc_t.java
deleted file mode 100644
index 8cf33cc..0000000
--- a/src/h/Agiddisc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 7fbm9w57ywtqk4kw5c3z6zwm1
-
-public interface Agiddisc_t extends Agiddisc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agiddisc_s Agiddisc_t");
-}
-
-// typedef struct Agiddisc_s Agiddisc_t; \ No newline at end of file
diff --git a/src/h/Agiodisc_t.java b/src/h/Agiodisc_t.java
deleted file mode 100644
index 6d93a30..0000000
--- a/src/h/Agiodisc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 63k1fn4amvhaud4remizhg2ks
-
-public interface Agiodisc_t extends Agiodisc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agiodisc_s Agiodisc_t");
-}
-
-// typedef struct Agiodisc_s Agiodisc_t; \ No newline at end of file
diff --git a/src/h/Agmemdisc_s.java b/src/h/Agmemdisc_s.java
deleted file mode 100644
index 07d7360..0000000
--- a/src/h/Agmemdisc_s.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 366ph8t7jvjosq0zlqhb1g26x
-
-public interface Agmemdisc_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agmemdisc_s",
-"{",
-"void *(*open) (Agdisc_t*)",
-"void *(*alloc) (void *state, size_t req)",
-"void *(*resize) (void *state, void *ptr, size_t old, size_t req)",
-"void (*free) (void *state, void *ptr)",
-"void (*close) (void *state)",
-"}");
-}
-
-// struct Agmemdisc_s { /* memory allocator */
-// void *(*open) (Agdisc_t*); /* independent of other resources */
-// void *(*alloc) (void *state, size_t req);
-// void *(*resize) (void *state, void *ptr, size_t old, size_t req);
-// void (*free) (void *state, void *ptr);
-// void (*close) (void *state);
-// }; \ No newline at end of file
diff --git a/src/h/Agmemdisc_t.java b/src/h/Agmemdisc_t.java
deleted file mode 100644
index d4f2916..0000000
--- a/src/h/Agmemdisc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 e2u8m7bby3ay236un81y217mm
-
-public interface Agmemdisc_t extends Agmemdisc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agmemdisc_s Agmemdisc_t");
-}
-
-// typedef struct Agmemdisc_s Agmemdisc_t; \ No newline at end of file
diff --git a/src/h/Agnode_s.java b/src/h/Agnode_s.java
deleted file mode 100644
index 5239c0e..0000000
--- a/src/h/Agnode_s.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5h58ys5dc8q21vir1hk2r7xr7
-
-public interface Agnode_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agnode_s",
-"{",
-"Agobj_t base",
-"Agraph_t *root",
-"Agsubnode_t mainsub",
-"}");
-}
-
-// struct Agnode_s {
-// Agobj_t base;
-// Agraph_t *root;
-// Agsubnode_t mainsub; /* embedded for main graph */
-// }; \ No newline at end of file
diff --git a/src/h/Agnode_t.java b/src/h/Agnode_t.java
deleted file mode 100644
index ec5df3d..0000000
--- a/src/h/Agnode_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 8eeq5jtusu1u57hjz90nc9i9m
-
-public interface Agnode_t extends Agnode_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agnode_s Agnode_t");
-}
-
-// typedef struct Agnode_s Agnode_t; \ No newline at end of file
diff --git a/src/h/Agnodeinfo_t.java b/src/h/Agnodeinfo_t.java
deleted file mode 100644
index 2485c79..0000000
--- a/src/h/Agnodeinfo_t.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 da1kcmh9tvz6n7xaqw78dn4h8
-
-public interface Agnodeinfo_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agnodeinfo_t",
-"{",
-"Agrec_t hdr",
-"shape_desc *shape",
-"void *shape_info",
-"pointf coord",
-"double width, height",
-"boxf bb",
-"double ht, lw, rw",
-"textlabel_t *label",
-"textlabel_t *xlabel",
-"void *alg",
-"char state",
-"unsigned char gui_state",
-"boolean clustnode",
-"unsigned char pinned",
-"int id, heapindex, hops",
-"double *pos, dist",
-"unsigned char showboxes",
-"boolean has_port",
-"node_t* rep",
-"node_t *set",
-"char node_type, mark, onstack",
-"char ranktype, weight_class",
-"node_t *next, *prev",
-"elist in, out, flat_out, flat_in, other",
-"graph_t *clust",
-"int UF_size",
-"node_t *UF_parent",
-"node_t *inleaf, *outleaf",
-"int rank, order",
-"double mval",
-"elist save_in, save_out",
-"elist tree_in, tree_out",
-"edge_t *par",
-"int low, lim",
-"int priority",
-"double pad[1]",
-"}",
-"Agnodeinfo_t");
-}
-
-// typedef struct Agnodeinfo_t {
-// Agrec_t hdr;
-// shape_desc *shape;
-// void *shape_info;
-// pointf coord;
-// double width, height; /* inches */
-// boxf bb;
-// double ht, lw, rw;
-// textlabel_t *label;
-// textlabel_t *xlabel;
-// void *alg;
-// char state;
-// unsigned char gui_state; /* Node state for GUI ops */
-// boolean clustnode;
-//
-//
-// unsigned char pinned;
-// int id, heapindex, hops;
-// double *pos, dist;
-//
-//
-// unsigned char showboxes;
-// boolean has_port;
-// node_t* rep;
-// node_t *set;
-//
-// /* fast graph */
-// char node_type, mark, onstack;
-// char ranktype, weight_class;
-// node_t *next, *prev;
-// elist in, out, flat_out, flat_in, other;
-// graph_t *clust;
-//
-// /* for union-find and collapsing nodes */
-// int UF_size;
-// node_t *UF_parent;
-// node_t *inleaf, *outleaf;
-//
-// /* for placing nodes */
-// int rank, order; /* initially, order = 1 for ordered edges */
-// double mval;
-// elist save_in, save_out;
-//
-// /* for network-simplex */
-// elist tree_in, tree_out;
-// edge_t *par;
-// int low, lim;
-// int priority;
-//
-// double pad[1];
-//
-//
-// } Agnodeinfo_t; \ No newline at end of file
diff --git a/src/h/Agobj_s.java b/src/h/Agobj_s.java
deleted file mode 100644
index fa02077..0000000
--- a/src/h/Agobj_s.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 7fv7yqhmqaa7u2qszrcz1x603
-
-public interface Agobj_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agobj_s",
-"{",
-"Agtag_t tag",
-"Agrec_t *data",
-"}");
-}
-
-// struct Agobj_s {
-// Agtag_t tag;
-// Agrec_t *data;
-// }; \ No newline at end of file
diff --git a/src/h/Agobj_t.java b/src/h/Agobj_t.java
deleted file mode 100644
index 5392fe8..0000000
--- a/src/h/Agobj_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 cxj639s7ndfjcf3ku07ins96y
-
-public interface Agobj_t extends Agobj_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agobj_s Agobj_t");
-}
-
-// typedef struct Agobj_s Agobj_t; \ No newline at end of file
diff --git a/src/h/Agraph_s.java b/src/h/Agraph_s.java
deleted file mode 100644
index 09e993a..0000000
--- a/src/h/Agraph_s.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5ho0f0m8hitlfq9j032lww947
-
-public interface Agraph_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agraph_s",
-"{",
-"Agobj_t base",
-"Agdesc_t desc",
-"Dtlink_t link",
-"Dict_t *n_seq",
-"Dict_t *n_id",
-"Dict_t *e_seq, *e_id",
-"Dict_t *g_dict",
-"Agraph_t *parent, *root",
-"Agclos_t *clos",
-"}");
-}
-
-// struct Agraph_s {
-// Agobj_t base;
-// Agdesc_t desc;
-// Dtlink_t link;
-// Dict_t *n_seq; /* the node set in sequence */
-// Dict_t *n_id; /* the node set indexed by ID */
-// Dict_t *e_seq, *e_id; /* holders for edge sets */
-// Dict_t *g_dict; /* subgraphs - descendants */
-// Agraph_t *parent, *root; /* subgraphs - ancestors */
-// Agclos_t *clos; /* shared resources */
-// }; \ No newline at end of file
diff --git a/src/h/Agraph_t.java b/src/h/Agraph_t.java
deleted file mode 100644
index 062c4ae..0000000
--- a/src/h/Agraph_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 aqw3i7b3unkie2w709gyzy18f
-
-public interface Agraph_t extends Agraph_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agraph_s Agraph_t");
-}
-
-// typedef struct Agraph_s Agraph_t; \ No newline at end of file
diff --git a/src/h/Agraphinfo_t.java b/src/h/Agraphinfo_t.java
deleted file mode 100644
index e4c1559..0000000
--- a/src/h/Agraphinfo_t.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2mtqmob86ayzjvuxgvhlg4ctl
-
-public interface Agraphinfo_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agraphinfo_t",
-"{",
-"Agrec_t hdr",
-"layout_t *drawing",
-"textlabel_t *label",
-"boxf bb",
-"pointf border[4]",
-"unsigned char gui_state",
-"unsigned char has_labels",
-"boolean has_images",
-"unsigned char charset",
-"int rankdir",
-"double ht1, ht2",
-"unsigned short flags",
-"void *alg",
-"GVC_t *gvc",
-"void (*cleanup) (graph_t * g)",
-"node_t **neato_nlist",
-"int move",
-"double **dist, **spring, **sum_t, ***t",
-"unsigned short ndim",
-"unsigned short odim",
-"int n_cluster",
-"graph_t **clust",
-"graph_t *dotroot",
-"node_t *nlist",
-"rank_t *rank",
-"graph_t *parent",
-"int level",
-"node_t *minrep, *maxrep",
-"nlist_t comp",
-"node_t *minset, *maxset",
-"long n_nodes",
-"short minrank, maxrank",
-"boolean has_flat_edges",
-"boolean has_sourcerank",
-"boolean has_sinkrank",
-"unsigned char showboxes",
-"fontname_kind fontnames",
-"int nodesep, ranksep",
-"node_t *ln, *rn",
-"node_t *leader, **rankleader",
-"boolean expanded",
-"char installed",
-"char set_type",
-"char label_pos",
-"boolean exact_ranksep",
-"}",
-"Agraphinfo_t");
-}
-
-// typedef struct Agraphinfo_t {
-// Agrec_t hdr;
-// /* to generate code */
-// layout_t *drawing;
-// textlabel_t *label; /* if the cluster has a title */
-// boxf bb; /* bounding box */
-// pointf border[4]; /* sizes of margins for graph labels */
-// unsigned char gui_state; /* Graph state for GUI ops */
-// unsigned char has_labels;
-// boolean has_images;
-// unsigned char charset; /* input character set */
-// int rankdir;
-// double ht1, ht2; /* below and above extremal ranks */
-// unsigned short flags;
-// void *alg;
-// GVC_t *gvc; /* context for "globals" over multiple graphs */
-// void (*cleanup) (graph_t * g); /* function to deallocate layout-specific data */
-//
-//
-// /* to place nodes */
-// node_t **neato_nlist;
-// int move;
-// double **dist, **spring, **sum_t, ***t;
-// unsigned short ndim;
-// unsigned short odim;
-//
-//
-// /* to have subgraphs */
-// int n_cluster;
-// graph_t **clust; /* clusters are in clust[1..n_cluster] !!! */
-// graph_t *dotroot;
-// node_t *nlist;
-// rank_t *rank;
-// graph_t *parent; /* containing cluster (not parent subgraph) */
-// int level; /* cluster nesting level (not node level!) */
-// node_t *minrep, *maxrep; /* set leaders for min and max rank */
-//
-// /* fast graph node list */
-// nlist_t comp;
-// /* connected components */
-// node_t *minset, *maxset; /* set leaders */
-// long n_nodes;
-// /* includes virtual */
-// short minrank, maxrank;
-//
-// /* various flags */
-// boolean has_flat_edges;
-// boolean has_sourcerank;
-// boolean has_sinkrank;
-// unsigned char showboxes;
-// fontname_kind fontnames; /* to override mangling in SVG */
-//
-// int nodesep, ranksep;
-// node_t *ln, *rn; /* left, right nodes of bounding box */
-//
-// /* for clusters */
-// node_t *leader, **rankleader;
-// boolean expanded;
-// char installed;
-// char set_type;
-// char label_pos;
-// boolean exact_ranksep;
-//
-//
-// } Agraphinfo_t; \ No newline at end of file
diff --git a/src/h/Agrec_t.java b/src/h/Agrec_t.java
deleted file mode 100644
index 09ac6df..0000000
--- a/src/h/Agrec_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 6w4pxxbi3ief76hgbmcde192u
-
-public interface Agrec_t extends Agrec_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agrec_s Agrec_t");
-}
-
-// typedef struct Agrec_s Agrec_t; \ No newline at end of file
diff --git a/src/h/Agsplice_arg_t.java b/src/h/Agsplice_arg_t.java
deleted file mode 100644
index ae920ac..0000000
--- a/src/h/Agsplice_arg_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 6utnqddi1e85hs0re8q6xa1vy
-
-public interface Agsplice_arg_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agsplice_arg_s",
-"{",
-"int head_side",
-"Agnode_t *target",
-"}",
-"Agsplice_arg_t");
-}
-
-// typedef struct Agsplice_arg_s {
-// int head_side;
-// Agnode_t *target;
-// } Agsplice_arg_t; \ No newline at end of file
diff --git a/src/h/Agsubnode_s.java b/src/h/Agsubnode_s.java
deleted file mode 100644
index 1de80e7..0000000
--- a/src/h/Agsubnode_s.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 eykrclzau59zmxissqegaiilg
-
-public interface Agsubnode_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agsubnode_s",
-"{",
-"Dtlink_t seq_link",
-"Dtlink_t id_link",
-"Agnode_t *node",
-"Dtlink_t *in_id, *out_id",
-"Dtlink_t *in_seq, *out_seq",
-"}");
-}
-
-// struct Agsubnode_s { /* the node-per-graph-or-subgraph record */
-// Dtlink_t seq_link; /* must be first */
-// Dtlink_t id_link;
-// Agnode_t *node; /* the object */
-// Dtlink_t *in_id, *out_id; /* by node/ID for random access */
-// Dtlink_t *in_seq, *out_seq; /* by node/sequence for serial access */
-// }; \ No newline at end of file
diff --git a/src/h/Agsubnode_t.java b/src/h/Agsubnode_t.java
deleted file mode 100644
index 6283c70..0000000
--- a/src/h/Agsubnode_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 df23022lk4w8conzi4uihoqpu
-
-public interface Agsubnode_t extends Agsubnode_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agsubnode_s Agsubnode_t");
-}
-
-// typedef struct Agsubnode_s Agsubnode_t; \ No newline at end of file
diff --git a/src/h/Agsym_t.java b/src/h/Agsym_t.java
deleted file mode 100644
index 11085e5..0000000
--- a/src/h/Agsym_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 c6lodtp6m9o7i924kguh8py09
-
-public interface Agsym_t extends Agsym_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agsym_s Agsym_t");
-}
-
-// typedef struct Agsym_s Agsym_t; \ No newline at end of file
diff --git a/src/h/Agtag_s.java b/src/h/Agtag_s.java
deleted file mode 100644
index 4b51753..0000000
--- a/src/h/Agtag_s.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 f4eovs59su6ztmd1h9rq229c2
-
-public interface Agtag_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agtag_s",
-"{",
-"unsigned objtype:2",
-"unsigned mtflock:1",
-"unsigned attrwf:1",
-"unsigned seq:(sizeof(unsigned) * 8 - 4)",
-"unsigned long id",
-"}");
-}
-
-// struct Agtag_s {
-// unsigned objtype:2; /* see literal tags below */
-// unsigned mtflock:1; /* move-to-front lock, see above */
-// unsigned attrwf:1; /* attrs written (parity, write.c) */
-// unsigned seq:(sizeof(unsigned) * 8 - 4); /* sequence no. */
-// unsigned long id; /* client ID */
-// }; \ No newline at end of file
diff --git a/src/h/Agtag_t.java b/src/h/Agtag_t.java
deleted file mode 100644
index bd48d3e..0000000
--- a/src/h/Agtag_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 bfyeakqg0xg9gqt8ssajorir5
-
-public interface Agtag_t extends Agtag_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agtag_s Agtag_t");
-}
-
-// typedef struct Agtag_s Agtag_t; \ No newline at end of file
diff --git a/src/h/BestPos_t.java b/src/h/BestPos_t.java
deleted file mode 100644
index 9b8a0e2..0000000
--- a/src/h/BestPos_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 42vrsrrzqoc36nrw8vum1390l
-
-public interface BestPos_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct best_p_s",
-"{",
-"int n",
-"double area",
-"pointf pos",
-"}",
-"BestPos_t");
-}
-
-// typedef struct best_p_s {
-// int n;
-// double area;
-// pointf pos;
-// } BestPos_t; \ No newline at end of file
diff --git a/src/h/Dict_t.java b/src/h/Dict_t.java
deleted file mode 100644
index 4ae7d5f..0000000
--- a/src/h/Dict_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 2ggfcdw1rvmiwttzvdn3ew5b9
-
-public interface Dict_t extends _dt_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dt_s Dict_t");
-}
-
-// typedef struct _dt_s Dict_t; \ No newline at end of file
diff --git a/src/h/Dt_t.java b/src/h/Dt_t.java
deleted file mode 100644
index f7e44a1..0000000
--- a/src/h/Dt_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 u1i3hxdborawdyw7d778quhw
-
-public interface Dt_t extends _dt_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dt_s Dt_t");
-}
-
-// typedef struct _dt_s Dt_t; \ No newline at end of file
diff --git a/src/h/Dtdata_t.java b/src/h/Dtdata_t.java
deleted file mode 100644
index 2faee9a..0000000
--- a/src/h/Dtdata_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 864wtxvrdrty5k31pa1h7jqki
-
-public interface Dtdata_t extends _dtdata_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dtdata_s Dtdata_t");
-}
-
-// typedef struct _dtdata_s Dtdata_t; \ No newline at end of file
diff --git a/src/h/Dtdisc_t.java b/src/h/Dtdisc_t.java
deleted file mode 100644
index 9405bdc..0000000
--- a/src/h/Dtdisc_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 3n3lg4dzicyo9pzjj6bv0krf5
-
-public interface Dtdisc_t extends _dtdisc_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dtdisc_s Dtdisc_t");
-}
-
-// typedef struct _dtdisc_s Dtdisc_t; \ No newline at end of file
diff --git a/src/h/Dthold_t.java b/src/h/Dthold_t.java
deleted file mode 100644
index 3d6fdb5..0000000
--- a/src/h/Dthold_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 1tob3f90syune1bxwbffctfmj
-
-public interface Dthold_t extends _dthold_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dthold_s Dthold_t");
-}
-
-// typedef struct _dthold_s Dthold_t; \ No newline at end of file
diff --git a/src/h/Dtlink_t.java b/src/h/Dtlink_t.java
deleted file mode 100644
index 4f47de7..0000000
--- a/src/h/Dtlink_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 8y38rtlesz0zzh2ncgic680by
-
-public interface Dtlink_t extends _dtlink_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dtlink_s Dtlink_t");
-}
-
-// typedef struct _dtlink_s Dtlink_t; \ No newline at end of file
diff --git a/src/h/Dtmethod_t.java b/src/h/Dtmethod_t.java
deleted file mode 100644
index 97cd270..0000000
--- a/src/h/Dtmethod_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 14xcg8o7gvv98a59xu3dtokd
-
-public interface Dtmethod_t extends _dtmethod_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _dtmethod_s Dtmethod_t");
-}
-
-// typedef struct _dtmethod_s Dtmethod_t; \ No newline at end of file
diff --git a/src/h/GVC_s.java b/src/h/GVC_s.java
deleted file mode 100644
index 679b685..0000000
--- a/src/h/GVC_s.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 clpjw996k49ieh47hl09lwwq1
-
-public interface GVC_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct GVC_s",
-"{",
-"GVCOMMON_t common",
-"char *config_path",
-"boolean config_found",
-"char **input_filenames",
-"GVG_t *gvgs",
-"GVG_t *gvg",
-"gvplugin_available_t *apis[ +1 +1 +1 +1 +1 ]",
-"gvplugin_available_t *api[ +1 +1 +1 +1 +1 ]",
-"gvplugin_package_t *packages",
-"size_t (*write_fn) (GVJ_t *job, const char *s, size_t len)",
-"Dtdisc_t textfont_disc",
-"Dt_t *textfont_dt",
-"gvplugin_active_textlayout_t textlayout",
-"GVJ_t *jobs",
-"GVJ_t *job",
-"graph_t *g",
-"gvplugin_active_layout_t layout",
-"char *graphname",
-"GVJ_t *active_jobs",
-"char *pagedir",
-"pointf margin",
-"pointf pad",
-"pointf pageSize",
-"point pb",
-"boxf bb",
-"int rotation",
-"boolean graph_sets_pad, graph_sets_margin, graph_sets_pageSize, graph_sets_rotation",
-"char *layerDelims",
-"char *layerListDelims",
-"char *layers",
-"char **layerIDs",
-"int numLayers",
-"int *layerlist",
-"char *defaultfontname",
-"double defaultfontsize",
-"char **defaultlinestyle",
-"gvcolor_t bgcolor",
-"int fontrenaming",
-"}");
-}
-
-// struct GVC_s {
-// GVCOMMON_t common;
-//
-// char *config_path;
-// boolean config_found;
-//
-// /* gvParseArgs */
-// char **input_filenames; /* null terminated array of input filenames */
-//
-// /* gvNextInputGraph() */
-// GVG_t *gvgs; /* linked list of graphs */
-// GVG_t *gvg; /* current graph */
-//
-// /* plugins */
-//
-// /* APIS expands to "+1 +1 ... +1" to give the number of APIs */
-// gvplugin_available_t *apis[ +1 +1 +1 +1 +1 ]; /* array of linked-list of plugins per api */
-// gvplugin_available_t *api[ +1 +1 +1 +1 +1 ]; /* array of current plugins per api */
-//
-// gvplugin_package_t *packages; /* list of available packages */
-//
-// /* externally provided write() displine */
-// size_t (*write_fn) (GVJ_t *job, const char *s, size_t len);
-//
-// /* fonts and textlayout */
-// Dtdisc_t textfont_disc;
-// Dt_t *textfont_dt;
-// gvplugin_active_textlayout_t textlayout; /* always use best avail for all jobs */
-// // void (*free_layout) (void *layout); /* function for freeing layouts (mostly used by pango) */
-//
-// /* FIXME - everything below should probably move to GVG_t */
-//
-// /* gvrender_config() */
-// GVJ_t *jobs; /* linked list of jobs */
-// GVJ_t *job; /* current job */
-//
-// graph_t *g; /* current graph */
-//
-// /* gvrender_begin_job() */
-// gvplugin_active_layout_t layout;
-//
-// char *graphname; /* name from graph */
-// GVJ_t *active_jobs; /* linked list of active jobs */
-//
-// /* pagination */
-// char *pagedir; /* pagination order */
-// pointf margin; /* margins in graph units */
-// pointf pad; /* pad in graph units */
-// pointf pageSize; /* pageSize in graph units, not including margins */
-// point pb; /* page size - including margins (inches) */
-// boxf bb; /* graph bb in graph units, not including margins */
-// int rotation; /* rotation - 0 = portrait, 90 = landscape */
-// boolean graph_sets_pad, graph_sets_margin, graph_sets_pageSize, graph_sets_rotation;
-//
-// /* layers */
-// char *layerDelims; /* delimiters in layer names */
-// char *layerListDelims; /* delimiters between layer ranges */
-// char *layers; /* null delimited list of layer names */
-// char **layerIDs; /* array of layer names */
-// int numLayers; /* number of layers */
-// int *layerlist;
-//
-// /* default font */
-// char *defaultfontname;
-// double defaultfontsize;
-//
-// /* default line style */
-// char **defaultlinestyle;
-//
-// /* render defaults set from graph */
-// gvcolor_t bgcolor; /* background color */
-//
-// /* whether to mangle font names (at least in SVG), usually false */
-// int fontrenaming;
-// }; \ No newline at end of file
diff --git a/src/h/GVC_t.java b/src/h/GVC_t.java
deleted file mode 100644
index 1491e41..0000000
--- a/src/h/GVC_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 fg8z912mbk6t13fn38q7zn7l
-
-public interface GVC_t extends GVC_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct GVC_s GVC_t");
-}
-
-// typedef struct GVC_s GVC_t; \ No newline at end of file
diff --git a/src/h/GVG_s.java b/src/h/GVG_s.java
deleted file mode 100644
index 9d0caa3..0000000
--- a/src/h/GVG_s.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 cvpkcmk8fwmnuwmcjl85zzkxc
-
-public interface GVG_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct GVG_s",
-"{",
-"GVC_t *gvc",
-"GVG_t *next",
-"char *input_filename",
-"int graph_index",
-"graph_t *g",
-"}");
-}
-
-// struct GVG_s {
-// GVC_t *gvc; /* parent gvc */
-// GVG_t *next; /* next gvg in list */
-//
-// char *input_filename; /* or NULL if stdin */
-// int graph_index; /* index of graph within input_file */
-// graph_t *g;
-// }; \ No newline at end of file
diff --git a/src/h/GVG_t.java b/src/h/GVG_t.java
deleted file mode 100644
index 6df79f6..0000000
--- a/src/h/GVG_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 3h2jjekexv13eg90o5lqy1d0j
-
-public interface GVG_t extends GVG_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct GVG_s GVG_t");
-}
-
-// typedef struct GVG_s GVG_t; \ No newline at end of file
diff --git a/src/h/GVJ_s.java b/src/h/GVJ_s.java
deleted file mode 100644
index 37a1f53..0000000
--- a/src/h/GVJ_s.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 dg8cqsmppn0zl04sycueci9yw
-
-public interface GVJ_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct GVJ_s",
-"{",
-"GVC_t *gvc",
-"GVJ_t *next",
-"GVJ_t *next_active",
-"GVCOMMON_t *common",
-"obj_state_t *obj",
-"char *input_filename",
-"int graph_index",
-"const char *layout_type",
-"const char *output_filename",
-"FILE *output_file",
-"char *output_data",
-"unsigned int output_data_allocated",
-"unsigned int output_data_position",
-"const char *output_langname",
-"int output_lang",
-"gvplugin_active_render_t render",
-"gvplugin_active_device_t device",
-"gvplugin_active_loadimage_t loadimage",
-"gvdevice_callbacks_t *callbacks",
-"pointf device_dpi",
-"boolean device_sets_dpi",
-"void *display",
-"int screen",
-"void *context",
-"boolean external_context",
-"char *imagedata",
-"int flags",
-"int numLayers",
-"int layerNum",
-"point pagesArraySize",
-"point pagesArrayFirst",
-"point pagesArrayMajor",
-"point pagesArrayMinor",
-"point pagesArrayElem",
-"int numPages",
-"boxf bb",
-"pointf pad",
-"boxf clip",
-"boxf pageBox",
-"pointf pageSize",
-"pointf focus",
-"double zoom",
-"int rotation",
-"pointf view",
-"boxf canvasBox",
-"pointf margin",
-"pointf dpi",
-"unsigned int width",
-"unsigned int height",
-"box pageBoundingBox",
-"box boundingBox",
-"pointf scale",
-"pointf translation",
-"pointf devscale",
-"boolean fit_mode, needs_refresh, click, has_grown, has_been_rendered",
-"unsigned char button",
-"pointf pointer",
-"pointf oldpointer",
-"void *current_obj",
-"void *selected_obj",
-"char *active_tooltip",
-"char *selected_href",
-"gv_argvlist_t selected_obj_type_name",
-"gv_argvlist_t selected_obj_attributes",
-"void *window",
-"gvevent_key_binding_t *keybindings",
-"int numkeys",
-"void *keycodes",
-"}");
-}
-
-// struct GVJ_s {
-// GVC_t *gvc; /* parent gvc */
-// GVJ_t *next; /* linked list of jobs */
-// GVJ_t *next_active; /* linked list of active jobs (e.g. multiple windows) */
-//
-// GVCOMMON_t *common;
-//
-// obj_state_t *obj; /* objects can be nested (at least clusters can)
-// so keep object state on a stack */
-// char *input_filename;
-// int graph_index;
-//
-// const char *layout_type;
-//
-// const char *output_filename;
-// FILE *output_file;
-// char *output_data;
-// unsigned int output_data_allocated;
-// unsigned int output_data_position;
-//
-// const char *output_langname;
-// int output_lang;
-//
-// gvplugin_active_render_t render;
-// gvplugin_active_device_t device;
-// gvplugin_active_loadimage_t loadimage;
-// gvdevice_callbacks_t *callbacks;
-// pointf device_dpi;
-// boolean device_sets_dpi;
-//
-// void *display;
-// int screen;
-//
-// void *context; /* gd or cairo surface */
-// boolean external_context; /* context belongs to caller */
-// char *imagedata; /* location of imagedata */
-//
-// int flags; /* emit_graph flags */
-//
-// int numLayers; /* number of layers */
-// int layerNum; /* current layer - 1 based*/
-//
-// point pagesArraySize; /* 2D size of page array */
-// point pagesArrayFirst;/* 2D starting corner in */
-// point pagesArrayMajor;/* 2D major increment */
-// point pagesArrayMinor;/* 2D minor increment */
-// point pagesArrayElem; /* 2D coord of current page - 0,0 based */
-// int numPages; /* number of pages */
-//
-// boxf bb; /* graph bb with padding - graph units */
-// pointf pad; /* padding around bb - graph units */
-// boxf clip; /* clip region in graph units */
-// boxf pageBox; /* current page in graph units */
-// pointf pageSize; /* page size in graph units */
-// pointf focus; /* viewport focus - graph units */
-//
-// double zoom; /* viewport zoom factor (points per graph unit) */
-// int rotation; /* viewport rotation (degrees) 0=portrait, 90=landscape */
-//
-// pointf view; /* viewport size - points */
-// boxf canvasBox; /* viewport area - points */
-// pointf margin; /* job-specific margin - points */
-//
-// pointf dpi; /* device resolution device-units-per-inch */
-//
-// unsigned int width; /* device width - device units */
-// unsigned int height; /* device height - device units */
-// box pageBoundingBox;/* rotated boundingBox - device units */
-// box boundingBox; /* cumulative boundingBox over all pages - device units */
-//
-// pointf scale; /* composite device to graph units (zoom and dpi) */
-// pointf translation; /* composite translation */
-// pointf devscale; /* composite device to points: dpi, y_goes_down */
-//
-// boolean fit_mode,
-// needs_refresh,
-// click,
-// has_grown,
-// has_been_rendered;
-//
-// unsigned char button; /* active button */
-// pointf pointer; /* pointer position in device units */
-// pointf oldpointer; /* old pointer position in device units */
-//
-// void *current_obj; /* graph object that pointer is in currently */
-//
-// void *selected_obj; /* graph object that has been selected */
-// /* (e.g. button 1 clicked on current obj) */
-// char *active_tooltip; /* tooltip of active object - or NULL */
-// char *selected_href; /* href of selected object - or NULL */
-// gv_argvlist_t selected_obj_type_name; /* (e.g. "edge" "node3" "e" "->" "node5" "") */
-// gv_argvlist_t selected_obj_attributes; /* attribute triplets: name, value, type */
-// /* e.g. "color", "red", GVATTR_COLOR,
-// "style", "filled", GVATTR_BOOL, */
-//
-// void *window; /* display-specific data for gvrender plugin */
-//
-// /* keybindings for keyboard events */
-// gvevent_key_binding_t *keybindings;
-// int numkeys;
-// void *keycodes;
-// }; \ No newline at end of file
diff --git a/src/h/GVJ_t.java b/src/h/GVJ_t.java
deleted file mode 100644
index 9421980..0000000
--- a/src/h/GVJ_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 1emyokhi9lvf2dq2tz1mt5lq6
-
-public interface GVJ_t extends GVJ_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct GVJ_s GVJ_t");
-}
-
-// typedef struct GVJ_s GVJ_t; \ No newline at end of file
diff --git a/src/h/HDict_t.java b/src/h/HDict_t.java
deleted file mode 100644
index 6079501..0000000
--- a/src/h/HDict_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 d6n85f1kdf00c97r9x4uf3hdy
-
-public interface HDict_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct obyh",
-"{",
-"Dtlink_t link",
-"int key",
-"Leaf_t d",
-"}",
-"HDict_t");
-}
-
-// typedef struct obyh {
-// Dtlink_t link;
-// int key;
-// Leaf_t d;
-// } HDict_t; \ No newline at end of file
diff --git a/src/h/IMapEntry_t.java b/src/h/IMapEntry_t.java
deleted file mode 100644
index 27cbecd..0000000
--- a/src/h/IMapEntry_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 et72dr7wfb74xjns0mtbfof0b
-
-public interface IMapEntry_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct IMapEntry_s",
-"{",
-"Dtlink_t namedict_link",
-"Dtlink_t iddict_link",
-"unsigned long id",
-"char *str",
-"}",
-"IMapEntry_t");
-}
-
-// typedef struct IMapEntry_s {
-// Dtlink_t namedict_link;
-// Dtlink_t iddict_link;
-// unsigned long id;
-// char *str;
-// } IMapEntry_t; \ No newline at end of file
diff --git a/src/h/Pedge_t.java b/src/h/Pedge_t.java
deleted file mode 100644
index 78eaa39..0000000
--- a/src/h/Pedge_t.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2nvsp26kuu9u7ogyjj0s4xc6g
-
-public interface Pedge_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Pedge_t",
-"{",
-"Ppoint_t a, b",
-"}",
-"Pedge_t");
-}
-
-// typedef struct Pedge_t {
-// Ppoint_t a, b;
-// } Pedge_t; \ No newline at end of file
diff --git a/src/h/Ppoly_t.java b/src/h/Ppoly_t.java
deleted file mode 100644
index 034db5a..0000000
--- a/src/h/Ppoly_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 e64uez8phkm446sopxainj3um
-
-public interface Ppoly_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Ppoly_t",
-"{",
-"Ppoint_t *ps",
-"int pn",
-"}",
-"Ppoly_t");
-}
-
-// typedef struct Ppoly_t {
-// Ppoint_t *ps;
-// int pn;
-// } Ppoly_t; \ No newline at end of file
diff --git a/src/h/RTree.java b/src/h/RTree.java
deleted file mode 100644
index aaed3be..0000000
--- a/src/h/RTree.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 6erg9dnjb8l3vavlty90aui6v
-
-public interface RTree extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct RTree",
-"{",
-"Node_t *root",
-"SplitQ_t split",
-"int MinFill",
-"long ElapsedTime",
-"float UserTime, SystemTime",
-"int Deleting",
-"int StatFlag",
-"int InsertCount",
-"int DeleteCount",
-"int ReInsertCount",
-"int InSplitCount",
-"int DeSplitCount",
-"int ElimCount",
-"int EvalCount",
-"int InTouchCount",
-"int DeTouchCount",
-"int SeTouchCount",
-"int CallCount",
-"float SplitMeritSum",
-"int RectCount",
-"int NodeCount",
-"int LeafCount, NonLeafCount",
-"int EntryCount",
-"int SearchCount",
-"int HitCount",
-"}");
-}
-
-// struct RTree {
-// Node_t *root;
-//
-// SplitQ_t split;
-//
-// /* balance criterion for node splitting */
-// int MinFill;
-//
-// /* times */
-// long ElapsedTime;
-// float UserTime, SystemTime;
-//
-// int Deleting;
-//
-// /* variables for statistics */
-// int StatFlag; /* tells if we are counting or not */
-// /* counters affected only when StatFlag set */
-// int InsertCount;
-// int DeleteCount;
-// int ReInsertCount;
-// int InSplitCount;
-// int DeSplitCount;
-// int ElimCount;
-// int EvalCount;
-// int InTouchCount;
-// int DeTouchCount;
-// int SeTouchCount;
-// int CallCount;
-// float SplitMeritSum;
-//
-// /* counters used even when StatFlag not set */
-// int RectCount;
-// int NodeCount;
-// int LeafCount, NonLeafCount;
-// int EntryCount;
-// int SearchCount;
-// int HitCount;
-//
-// }; \ No newline at end of file
diff --git a/src/h/RTree_t.java b/src/h/RTree_t.java
deleted file mode 100644
index e57f8e8..0000000
--- a/src/h/RTree_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 2mpm2fft75drx0k0by8s54asw
-
-public interface RTree_t extends RTree {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct RTree RTree_t");
-}
-
-// typedef struct RTree RTree_t; \ No newline at end of file
diff --git a/src/h/Rect_t.java b/src/h/Rect_t.java
deleted file mode 100644
index c52979c..0000000
--- a/src/h/Rect_t.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 32vghhci9sc1tdk0jb8p5rlhk
-
-public interface Rect_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Rect",
-"{",
-"int boundary[2*2]",
-"}",
-"Rect_t");
-}
-
-// typedef struct Rect {
-// int boundary[2*2];
-// } Rect_t; \ No newline at end of file
diff --git a/src/h/STArray.java b/src/h/STArray.java
deleted file mode 100644
index b09ece6..0000000
--- a/src/h/STArray.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import smetana.core.UnsupportedArrayOfPtr;
-import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.Area;
-import smetana.core.amiga.StarArrayOfPtr;
-
-public class STArray<O extends UnsupportedStructAndPtr> extends UnsupportedArrayOfPtr {
-
- private final int pos;
- private final List<O> list;
- private final Class clazz;
-
- public STArray(int pos, List<O> list, Class clazz) {
- this.pos = pos;
- this.list = list;
- this.clazz = clazz;
- }
-
- @Override
- public int comparePointerInternal(__array_of_ptr__ other) {
- STArray<O> other2 = (STArray<O>) other;
- if (this.list != other2.list) {
- throw new IllegalArgumentException();
- }
- return this.pos - other2.pos;
- }
-
- public STArray(int size, int pos, Class clazz) {
- this.pos = pos;
- this.list = new ArrayList<O>();
- this.clazz = clazz;
- for (int i = 0; i < size; i++) {
- try {
- this.list.add((O) clazz.newInstance());
- } catch (Exception e) {
- throw new IllegalStateException(e.toString());
- }
- }
- }
-
- @Override
- public void realloc(size_t nb) {
- realloc(nb.getInternalNb());
- }
-
- @Override
- public void realloc(int nb) {
- while (list.size() < nb) {
- try {
- this.list.add((O) clazz.newInstance());
- } catch (Exception e) {
- throw new IllegalStateException(e.toString());
- }
- }
- }
-
- @Override
- public __array_of_ptr__ plus(int delta) {
- return new STArray(pos + delta, this.list, clazz);
- }
-
- @Override
- public __array_of_ptr__ move(int delta) {
- return new STArray(pos + delta, this.list, clazz);
- }
-
- @Override
- public void setStruct(__struct__ value) {
- list.get(pos).setStruct(value);
- }
-
- @Override
- public __struct__ getStruct() {
- return list.get(pos).getStruct();
- // return list.get(pos);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- return list.get(pos).getStruct(fieldName);
- }
-
- @Override
- public __ptr__ getPtr() {
- return list.get(pos).amp();
- }
-
- @Override
- public __ptr__ asPtr() {
- return new StarArrayOfPtr(this);
- }
-
- @Override
- public void setPtr(__ptr__ value) {
- list.set(pos, (O) value.getStruct());
- }
-
- @Override
- public Area getInternal(final int idx) {
- return list.get(pos + idx);
- }
-
-}
diff --git a/src/h/ST_Agattr_s.java b/src/h/ST_Agattr_s.java
index 31e3214..adfbb4a 100644
--- a/src/h/ST_Agattr_s.java
+++ b/src/h/ST_Agattr_s.java
@@ -45,17 +45,18 @@
*/
package h;
+import java.util.List;
+
+import smetana.core.CString;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_cstring__;
import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfCString;
import smetana.core.amiga.StarStruct;
public class ST_Agattr_s extends UnsupportedStructAndPtr {
private final ST_Agrec_s h = new ST_Agrec_s(this); /* common data header */
public ST_dt_s dict; /* shared dict to interpret attr field */
- public StarArrayOfCString str; /* the attribute string values */
+ public List<CString> str; /* the attribute string values */
private final StarStruct parent;
@@ -72,37 +73,8 @@ public class ST_Agattr_s extends UnsupportedStructAndPtr {
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("dict")) {
- return dict;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("dict")) {
- this.dict = (ST_dt_s) newData;
- return dict;
- }
- if (fieldName.equals("str")) {
- this.str = (StarArrayOfCString) newData;
- return str;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- if (fieldName.equals("str")) {
- return str.getInternalArray();
- }
- return super.getArrayOfCString(fieldName);
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == Agrec_s.class) {
+ if (dest == ST_Agrec_s.class) {
return h;
// return h.amp();
}
diff --git a/src/h/ST_Agclos_s.java b/src/h/ST_Agclos_s.java
index 6b93fd4..f55dc78 100644
--- a/src/h/ST_Agclos_s.java
+++ b/src/h/ST_Agclos_s.java
@@ -45,60 +45,24 @@
*/
package h;
-import java.util.ArrayList;
-import java.util.List;
-
-import smetana.core.ArrayOfInteger;
-import smetana.core.UnsupportedArrayOfPtr;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_integer__;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
public class ST_Agclos_s extends UnsupportedStructAndPtr {
+ private final StarStruct parent;
+
public final ST_Agdisc_s disc = new ST_Agdisc_s(this); /* resource discipline functions */
public final ST_Agdstate_s state = new ST_Agdstate_s(this); /* resource closures */
public ST_dt_s strdict;
- private final int[] seq = new int[3];
+ public final int[] seq = new int[3];
// "unsigned long seq[3]",
public ST_Agcbstack_s cb;
public boolean callbacks_enabled; /* issue user callbacks or hold them? */
// "Dict_t *lookup_by_name[3]",
// "Dict_t *lookup_by_id[3]",
- private final ArrayOfThreePtrDict_t lookup_by_id = new ArrayOfThreePtrDict_t();
-
- static class ArrayOfThreePtrDict_t extends UnsupportedArrayOfPtr implements __array_of_ptr__ {
- private final List<Dict_t> list;
- private final int pos;
-
- private ArrayOfThreePtrDict_t(List<Dict_t> list, int pos) {
- this.list = list;
- this.pos = pos;
- }
-
- ArrayOfThreePtrDict_t() {
- this(new ArrayList<Dict_t>(), 0);
- for (int i = 0; i < 3; i++) {
- list.add(null);
- }
- }
-
- @Override
- public __array_of_ptr__ plus(int delta) {
- return new ArrayOfThreePtrDict_t(list, pos + delta);
- }
-
- @Override
- public __ptr__ getPtr() {
- return list.get(0);
- }
-
- }
-
- private final StarStruct parent;
+ public final ST_dt_s[] lookup_by_id = new ST_dt_s[3];
public ST_Agclos_s() {
this(null);
@@ -112,24 +76,6 @@ public class ST_Agclos_s extends UnsupportedStructAndPtr {
return parent;
}
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("callbacks_enabled")) {
- return callbacks_enabled;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("strdict")) {
- return strdict;
- }
- if (fieldName.equals("cb")) {
- return cb;
- }
- return super.getPtr(fieldName);
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
@@ -140,42 +86,6 @@ public class ST_Agclos_s extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("disc")) {
- return disc;
- }
- if (fieldName.equals("state")) {
- return state;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("callbacks_enabled")) {
- this.callbacks_enabled = data;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
- @Override
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- if (fieldName.equals("seq")) {
- return new ArrayOfInteger(seq, 0);
- }
- return super.getArrayOfInteger(fieldName);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("lookup_by_id")) {
- return lookup_by_id;
- }
- return super.getArrayOfPtr(fieldName);
- }
-
// public interface ST_Agclos_s extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agclos_s",
diff --git a/src/h/ST_Agdatadict_s.java b/src/h/ST_Agdatadict_s.java
index bb015e2..ca82cc4 100644
--- a/src/h/ST_Agdatadict_s.java
+++ b/src/h/ST_Agdatadict_s.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -53,9 +52,9 @@ import smetana.core.amiga.StarStruct;
public class ST_Agdatadict_s extends UnsupportedStructAndPtr {
private final ST_Agrec_s h = new ST_Agrec_s(this); /* installed in list of graph recs */
- public ST_dt_s n;
- public ST_dt_s e;
- public ST_dt_s g;
+ public ST_dt_s dict_n;
+ public ST_dt_s dict_e;
+ public ST_dt_s dict_g;
private final StarStruct parent;
@@ -72,49 +71,26 @@ public class ST_Agdatadict_s extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("dict.n")) {
- this.n = (ST_dt_s) newData;
- return n;
+ this.dict_n = (ST_dt_s) newData;
+ return dict_n;
}
if (fieldName.equals("dict.e")) {
- this.e = (ST_dt_s) newData;
- return e;
+ this.dict_e = (ST_dt_s) newData;
+ return dict_e;
}
if (fieldName.equals("dict.g")) {
- this.g = (ST_dt_s) newData;
- return g;
+ this.dict_g = (ST_dt_s) newData;
+ return dict_g;
}
return super.setPtr(fieldName, newData);
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("dict.n")) {
- return n;
- }
- if (fieldName.equals("dict.e")) {
- return e;
- }
- if (fieldName.equals("dict.g")) {
- return g;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == Agrec_s.class) {
- return h.amp();
+ if (dest == ST_Agrec_s.class) {
+ return h;
}
return super.castTo(dest);
}
diff --git a/src/h/ST_Agdisc_s.java b/src/h/ST_Agdisc_s.java
index 76a7bd2..47493c6 100644
--- a/src/h/ST_Agdisc_s.java
+++ b/src/h/ST_Agdisc_s.java
@@ -51,9 +51,9 @@ import smetana.core.amiga.StarStruct;
public class ST_Agdisc_s extends UnsupportedStructAndPtr {
- public ST_Agmemdisc_s.Amp mem;
- public ST_Agiddisc_s.Amp id;
- public ST_Agiodisc_s.Amp io;
+ public ST_Agmemdisc_s mem;
+ public ST_Agiddisc_s id;
+ public ST_Agiodisc_s io;
private final StarStruct parent;
@@ -72,11 +72,11 @@ public class ST_Agdisc_s extends UnsupportedStructAndPtr {
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("mem")) {
- this.mem = (ST_Agmemdisc_s.Amp) newData;
+ this.mem = (ST_Agmemdisc_s) newData;
return mem;
}
if (fieldName.equals("id")) {
- this.id = (ST_Agiddisc_s.Amp) newData;
+ this.id = (ST_Agiddisc_s) newData;
return id;
}
// if (fieldName.equals("io")) {
@@ -86,16 +86,6 @@ public class ST_Agdisc_s extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("mem")) {
- return mem;
- }
- if (fieldName.equals("id")) {
- return id;
- }
- return super.getPtr(fieldName);
- }
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agdisc_s",
diff --git a/src/h/ST_Agdstate_s.java b/src/h/ST_Agdstate_s.java
index 9ca0179..1855b4e 100644
--- a/src/h/ST_Agdstate_s.java
+++ b/src/h/ST_Agdstate_s.java
@@ -81,16 +81,6 @@ public class ST_Agdstate_s extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("mem")) {
- return mem;
- }
- if (fieldName.equals("id")) {
- return id;
- }
- return super.getPtr(fieldName);
- }
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agdstate_s",
diff --git a/src/h/ST_Agedge_s.java b/src/h/ST_Agedge_s.java
index b67debd..cb52a73 100644
--- a/src/h/ST_Agedge_s.java
+++ b/src/h/ST_Agedge_s.java
@@ -45,155 +45,135 @@
*/
package h;
-import h.ST_Agrec_s.Amp;
+import java.util.ArrayList;
+import java.util.List;
+
import smetana.core.HardcodedStruct;
import smetana.core.OFFSET;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfPtr;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_Agedge_s extends UnsupportedStructAndPtr implements HardcodedStruct {
- private final ST_Agobj_s base = new ST_Agobj_s(this);
- private final ST_dtlink_s id_link = new ST_dtlink_s(this);
- private final ST_dtlink_s seq_link = new ST_dtlink_s(this);
- private ST_Agnode_s node;
-
- @Override
- public void copyDataFrom(__ptr__ arg) {
- if (arg instanceof Amp) {
- arg = ((Amp) arg).getObject();
- }
- ST_Agedge_s this2 = (ST_Agedge_s) arg;
- this.base.copyDataFrom((__struct__) this2.base);
- this.id_link.copyDataFrom((__struct__) this2.id_link);
- this.seq_link.copyDataFrom((__struct__) this2.seq_link);
- this.node = this2.node;
- }
-
private final StarStruct parent;
- public ST_Agedge_s() {
- this(null);
- }
-
- public ST_Agedge_s(StarStruct parent) {
- this.parent = parent;
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- if (other instanceof Amp) {
- Amp other2 = (Amp) other;
- return this == other2.me;
- }
- ST_Agedge_s other2 = (ST_Agedge_s) other;
- return this == other2;
- }
+ public final ST_Agobj_s base = new ST_Agobj_s(this);
+ public final ST_dtlink_s id_link = new ST_dtlink_s(this);
+ public final ST_dtlink_s seq_link = new ST_dtlink_s(this);
+ public ST_Agnode_s node;
- @Override
- public StarStruct amp() {
- return new Amp(this);
- }
+ public static class ArrayOfStar extends UnsupportedArrayOfPtr implements __ptr__, __array_of_ptr__ {
- public class Amp extends UnsupportedStarStruct {
+ private final List<ST_Agedge_s> data;
+ private final int pos;
- private final ST_Agedge_s me;
+ public ArrayOfStar(int size) {
+ this.data = new ArrayList<ST_Agedge_s>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(null);
+ }
+ }
- public Amp(ST_Agedge_s me) {
- this.me = me;
+ public void swap(int i, int j) {
+ ST_Agedge_s e1 = data.get(i);
+ ST_Agedge_s e2 = data.get(j);
+ data.set(i, e2);
+ data.set(j, e1);
}
- public ST_Agedge_s getObject() {
- return me;
+ public ArrayOfStar(List<ST_Agedge_s> data, int pos) {
+ this.data = data;
+ this.pos = pos;
}
- @Override
- public boolean isSameThan(StarStruct other) {
- if (other instanceof ST_Agedge_s) {
- ST_Agedge_s other2 = (ST_Agedge_s) other;
- return this.me == other2;
+ public ArrayOfStar reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(null);
}
- Amp other2 = (Amp) other;
- return this.me == other2.me;
+ return this;
}
@Override
- public __ptr__ castTo(Class dest) {
- return ST_Agedge_s.this.castTo(dest);
+ public ArrayOfStar plus(int delta) {
+ return new ArrayOfStar(data, pos + delta);
}
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_Agedge_s.this.setPtr(fieldName, newData);
+
+ public ST_Agedge_s get(int i) {
+ return plus(i).getPtr();
}
- @Override
- public void copyDataFrom(__struct__ other) {
- ST_Agedge_s.this.copyDataFrom(other);
- }
@Override
- public void copyDataFrom(__ptr__ other) {
- ST_Agedge_s.this.copyDataFrom(other);
+ public ArrayOfStar asPtr() {
+ return this;
}
@Override
- public __ptr__ getPtr(String fieldName) {
- return ST_Agedge_s.this.getPtr(fieldName);
+ public void setPtr(__ptr__ value) {
+ this.data.set(pos, (ST_Agedge_s) value);
}
@Override
- public __struct__ getStruct(String fieldName) {
- return ST_Agedge_s.this.getStruct(fieldName);
+ public ST_Agedge_s getPtr() {
+ return this.data.get(pos);
}
@Override
- public __ptr__ plus(int pointerMove) {
- ST_Agedgepair_s pair = (ST_Agedgepair_s) me.parent;
- // Order=out, in
- if (pair.out == me && pointerMove == 1) {
- return pair.in;
+ public int comparePointer(__ptr__ other) {
+ final ArrayOfStar this2 = (ArrayOfStar) other;
+ if (this.data != this2.data) {
+ throw new IllegalArgumentException();
}
- if (pair.in == me && pointerMove == -1) {
- return pair.out;
- }
- return super.plus(pointerMove);
+ return this.pos - this2.pos;
}
- @Override
- public Object addVirtualBytes(int virtualBytes) {
- if (virtualBytes == 0) {
- return this;
- }
- OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.Agedge_s::seq_link")) {
- return seq_link;
+ public boolean isSameThan2(ArrayOfStar other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
}
- if (offset.toString().equals("h.Agedge_s::id_link")) {
- return id_link;
- }
- System.err.println("offset1=" + offset);
- return super.addVirtualBytes(virtualBytes);
+ return this.pos == other.pos;
}
}
@Override
+ public void copyDataFrom(__ptr__ arg) {
+ ST_Agedge_s this2 = (ST_Agedge_s) arg;
+ this.base.copyDataFrom((__struct__) this2.base);
+ this.id_link.copyDataFrom((__struct__) this2.id_link);
+ this.seq_link.copyDataFrom((__struct__) this2.seq_link);
+ this.node = this2.node;
+ }
+
+ public ST_Agedge_s() {
+ this(null);
+ }
+
+ public ST_Agedge_s(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public boolean isSameThan(StarStruct other) {
+ ST_Agedge_s other2 = (ST_Agedge_s) other;
+ return this == other2;
+ }
+
+ @Override
public Object addVirtualBytes(int virtualBytes) {
if (virtualBytes == 0) {
return this;
}
OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.Agedge_s::seq_link")) {
+ if (offset.toString().equals("h.ST_Agedge_s::seq_link")) {
return seq_link;
}
- if (offset.toString().equals("h.Agedge_s::id_link")) {
+ if (offset.toString().equals("h.ST_Agedge_s::id_link")) {
return id_link;
}
System.err.println("offset2=" + offset);
@@ -201,7 +181,7 @@ public class ST_Agedge_s extends UnsupportedStructAndPtr implements HardcodedStr
}
@Override
- public __ptr__ plus(int pointerMove) {
+ public ST_Agedge_s plus(int pointerMove) {
ST_Agedgepair_s pair = (ST_Agedgepair_s) parent;
// Order=out, in
if (pair.out == this && pointerMove == 1) {
@@ -210,91 +190,53 @@ public class ST_Agedge_s extends UnsupportedStructAndPtr implements HardcodedStr
if (pair.in == this && pointerMove == -1) {
return pair.out;
}
- return super.plus(pointerMove);
+ throw new UnsupportedOperationException();
}
@Override
public __ptr__ castTo(Class dest) {
- if (dest == Agobj_s.class) {
+ if (dest == ST_Agobj_s.class) {
return base;
}
- if (dest == Agedge_s.class) {
+ if (dest == ST_Agedge_s.class) {
return this;
}
return super.castTo(dest);
}
+
+ public ST_Agobj_s castTo_ST_Agobj_s() {
+ return base;
+ }
+
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("node")) {
- if (newData instanceof ST_Agnode_s.Amp) {
- this.node = ((ST_Agnode_s.Amp) newData).getObject();
- } else {
- this.node = (ST_Agnode_s) newData;
- }
+ this.node = (ST_Agnode_s) newData;
return node;
}
return super.setPtr(fieldName, newData);
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("node")) {
- return node;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("base")) {
- return base;
- }
- return super.getStruct(fieldName);
+ public ST_Agedge_s getPtr() {
+ return this;
}
public StarStruct from_seq_link(ST_dtlink_s from) {
if (from == seq_link) {
- return amp();
+ return this;
}
throw new IllegalArgumentException();
}
public StarStruct from_id_link(ST_dtlink_s from) {
if (from == id_link) {
- return amp();
+ return this;
}
throw new IllegalArgumentException();
}
- public static size_t sizeof_starstar_empty(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return STStarArrayOfPointer.malloc(nb);
- }
-
- @Override
- public Object realloc(Object old) {
- if (old instanceof STStarArrayOfPointer) {
- STStarArrayOfPointer old2 = (STStarArrayOfPointer) old;
- old2.realloc(nb);
- return old2;
- }
- // if (old instanceof StarArrayOfPtr) {
- // StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- // old2.realloc(nb);
- // return old2;
- // }
- return super.realloc(old);
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
- };
- }
// public interface ST_Agedge_s extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
diff --git a/src/h/ST_Agedgeinfo_t.java b/src/h/ST_Agedgeinfo_t.java
index 334960b..0d93006 100644
--- a/src/h/ST_Agedgeinfo_t.java
+++ b/src/h/ST_Agedgeinfo_t.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -63,29 +62,29 @@ public class ST_Agedgeinfo_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- private final ST_Agrec_s hdr = new ST_Agrec_s(this);
+ public final ST_Agrec_s hdr = new ST_Agrec_s(this);
- private ST_splines spl;
- private final ST_port tail_port = new ST_port(this), head_port = new ST_port(this);
- private ST_textlabel_t label, head_label, tail_label, xlabel;
- private int edge_type;
- private int adjacent;
- private boolean label_ontop;
+ public ST_splines spl;
+ public final ST_port tail_port = new ST_port(this), head_port = new ST_port(this);
+ public ST_textlabel_t label, head_label, tail_label, xlabel;
+ public int edge_type;
+ public int adjacent;
+ public boolean label_ontop;
// "unsigned char gui_state",
- private ST_Agedge_s to_orig;
+ public ST_Agedge_s to_orig;
// "void *alg",
// "double factor",
- private double dist;
+ public double dist;
// "Ppolyline_t path",
- private int showboxes;
- private boolean conc_opp_flag;
- private int xpenalty;
- private int weight;
- private int cutvalue, tree_index;
- private int count;
- private int minlen;
+ public int showboxes;
+ public boolean conc_opp_flag;
+ public int xpenalty;
+ public int weight;
+ public int cutvalue, tree_index;
+ public int count;
+ public int minlen;
- private ST_Agedge_s to_virt;
+ public ST_Agedge_s to_virt;
@Override
public void copyDataFrom(__struct__ other) {
@@ -115,24 +114,11 @@ public class ST_Agedgeinfo_t extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public __ptr__ castTo(Class dest) {
- return ST_Agedgeinfo_t.this.castTo(dest);
- }
-
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == Agrec_s.class) {
+ if (dest == ST_Agrec_s.class) {
return hdr;
}
- if (dest == Agedgeinfo_t.class) {
+ if (dest == ST_Agedgeinfo_t.class) {
return this;
}
return super.castTo(dest);
@@ -152,15 +138,6 @@ public class ST_Agedgeinfo_t extends UnsupportedStructAndPtr {
}
@Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("label_ontop")) {
- this.label_ontop = data;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("dist")) {
this.dist = data;
@@ -210,110 +187,15 @@ public class ST_Agedgeinfo_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("dist")) {
- return this.dist;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("conc_opp_flag")) {
- return this.conc_opp_flag;
- }
- if (fieldName.equals("label_ontop")) {
- return this.label_ontop;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("minlen")) {
- return this.minlen;
- }
- if (fieldName.equals("weight")) {
- return this.weight;
- }
- if (fieldName.equals("cutvalue")) {
- return this.cutvalue;
- }
- if (fieldName.equals("tree_index")) {
- return this.tree_index;
- }
- if (fieldName.equals("count")) {
- return this.count;
- }
- if (fieldName.equals("xpenalty")) {
- return this.xpenalty;
- }
- if (fieldName.equals("showboxes")) {
- return this.showboxes;
- }
- if (fieldName.equals("edge_type")) {
- return this.edge_type;
- }
- if (fieldName.equals("adjacent")) {
- return this.adjacent;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("to_virt")) {
- return this.to_virt;
- }
- if (fieldName.equals("to_orig")) {
- return this.to_orig;
- }
- if (fieldName.equals("label")) {
- return this.label;
- }
- if (fieldName.equals("spl")) {
- return this.spl;
- }
- if (fieldName.equals("xlabel")) {
- return this.xlabel;
- }
- if (fieldName.equals("head_label")) {
- return this.head_label;
- }
- if (fieldName.equals("tail_label")) {
- return this.tail_label;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("tail_port")) {
- return this.tail_port;
- }
- if (fieldName.equals("head_port")) {
- return this.head_port;
- }
- return super.getStruct(fieldName);
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("to_virt")) {
- if (newData instanceof ST_Agedge_s.Amp) {
- this.to_virt = ((ST_Agedge_s.Amp) newData).getObject();
- } else {
this.to_virt = (ST_Agedge_s) newData;
- }
return this.to_virt;
}
if (fieldName.equals("to_orig")) {
- if (newData instanceof ST_Agedge_s.Amp) {
- this.to_orig = ((ST_Agedge_s.Amp) newData).getObject();
- } else {
this.to_orig = (ST_Agedge_s) newData;
- }
return this.to_orig;
}
if (fieldName.equals("spl")) {
@@ -328,6 +210,10 @@ public class ST_Agedgeinfo_t extends UnsupportedStructAndPtr {
this.head_label = (ST_textlabel_t) newData;
return this.head_label;
}
+ if (fieldName.equals("tail_label")) {
+ this.tail_label = (ST_textlabel_t) newData;
+ return this.tail_label;
+ }
return super.setPtr(fieldName, newData);
}
diff --git a/src/h/ST_Agedgepair_s.java b/src/h/ST_Agedgepair_s.java
index ed17446..a9b1b17 100644
--- a/src/h/ST_Agedgepair_s.java
+++ b/src/h/ST_Agedgepair_s.java
@@ -46,9 +46,7 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
public class ST_Agedgepair_s extends UnsupportedStructAndPtr implements HardcodedStruct {
@@ -66,25 +64,6 @@ public class ST_Agedgepair_s extends UnsupportedStructAndPtr implements Hardcode
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("out")) {
- return out;
- }
- if (fieldName.equals("in")) {
- return in;
- }
- return super.getStruct(fieldName);
- }
-
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agedgepair_s",
// "{",
diff --git a/src/h/ST_Agiddisc_s.java b/src/h/ST_Agiddisc_s.java
index aac624f..df67983 100644
--- a/src/h/ST_Agiddisc_s.java
+++ b/src/h/ST_Agiddisc_s.java
@@ -46,12 +46,9 @@
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
-import smetana.core.UnsupportedStruct;
-import smetana.core.__ptr__;
-import smetana.core.amiga.StarStruct;
+import smetana.core.UnsupportedStructAndPtr;
-public class ST_Agiddisc_s extends UnsupportedStruct {
+public class ST_Agiddisc_s extends UnsupportedStructAndPtr {
public CFunction open;
public CFunction map;
@@ -61,37 +58,6 @@ public class ST_Agiddisc_s extends UnsupportedStruct {
public CFunction close;
public CFunction idregister;
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public Object call(String fieldName, Object... args) {
- if (fieldName.equals("open")) {
- return open.exe(args);
- }
- if (fieldName.equals("map")) {
- return map.exe(args);
- }
- if (fieldName.equals("idregister")) {
- return idregister.exe(args);
- }
- if (fieldName.equals("print")) {
- return print.exe(args);
- }
- return super.call(fieldName, args);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("print")) {
- return print;
- }
- return super.getPtr(fieldName);
- }
- }
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agiddisc_s",
diff --git a/src/h/ST_Agiodisc_s.java b/src/h/ST_Agiodisc_s.java
index 084350e..55379bf 100644
--- a/src/h/ST_Agiodisc_s.java
+++ b/src/h/ST_Agiodisc_s.java
@@ -45,9 +45,7 @@
*/
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStruct;
-import smetana.core.amiga.StarStruct;
public class ST_Agiodisc_s extends UnsupportedStruct {
@@ -55,37 +53,6 @@ public class ST_Agiodisc_s extends UnsupportedStruct {
public CFunction putstr;
public CFunction flush;
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-// @Override
-// public Object call(String fieldName, Object... args) {
-// if (fieldName.equals("open")) {
-// return open.exe(args);
-// }
-// if (fieldName.equals("map")) {
-// return map.exe(args);
-// }
-// if (fieldName.equals("idregister")) {
-// return idregister.exe(args);
-// }
-// if (fieldName.equals("print")) {
-// return print.exe(args);
-// }
-// return super.call(fieldName, args);
-// }
-//
-// @Override
-// public __ptr__ getPtr(String fieldName) {
-// if (fieldName.equals("print")) {
-// return print;
-// }
-// return super.getPtr(fieldName);
-// }
- }
// public static List<String> DEFINITION = Arrays.asList(
diff --git a/src/h/ST_Agmemdisc_s.java b/src/h/ST_Agmemdisc_s.java
index 989cd7c..31f2934 100644
--- a/src/h/ST_Agmemdisc_s.java
+++ b/src/h/ST_Agmemdisc_s.java
@@ -46,11 +46,9 @@
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
-import smetana.core.UnsupportedStruct;
-import smetana.core.amiga.StarStruct;
+import smetana.core.UnsupportedStructAndPtr;
-public class ST_Agmemdisc_s extends UnsupportedStruct {
+public class ST_Agmemdisc_s extends UnsupportedStructAndPtr {
public CFunction open;
public CFunction alloc;
@@ -58,24 +56,6 @@ public class ST_Agmemdisc_s extends UnsupportedStruct {
public CFunction free;
public CFunction close;
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public Object call(String fieldName, Object... args) {
- if (fieldName.equals("open")) {
- return open.exe(args);
- }
- if (fieldName.equals("alloc")) {
- return alloc.exe(args);
- }
- return super.call(fieldName, args);
- }
- }
-
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agmemdisc_s",
// "{",
diff --git a/src/h/ST_Agnode_s.java b/src/h/ST_Agnode_s.java
index 685df91..e0bc057 100644
--- a/src/h/ST_Agnode_s.java
+++ b/src/h/ST_Agnode_s.java
@@ -45,113 +45,212 @@
*/
package h;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import java.util.ArrayList;
+import java.util.List;
+
+import smetana.core.UnsupportedArrayOfPtr;
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_Agnode_s extends UnsupportedStructAndPtr {
- private final ST_Agobj_s base = new ST_Agobj_s(this);
- private ST_Agraph_s root;
- private ST_Agsubnode_s mainsub = new ST_Agsubnode_s(this);
+ public final ST_Agobj_s base = new ST_Agobj_s(this);
+ public ST_Agraph_s root;
+ public final ST_Agsubnode_s mainsub = new ST_Agsubnode_s(this);
private final StarStruct parent;
- public ST_Agnode_s() {
- this(null);
- }
+ public static class ArrayOfStar extends UnsupportedArrayOfPtr implements __ptr__, __array_of_ptr__ {
- public ST_Agnode_s(StarStruct parent) {
- this.parent = parent;
- }
+ private final List<ST_Agnode_s> data;
+ private final int pos;
- public StarStruct getParent() {
- return parent;
- }
+ public ArrayOfStar(int size) {
+ this.data = new ArrayList<ST_Agnode_s>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(null);
+ }
+ }
- @Override
- public StarStruct amp() {
- return new Amp(this);
- }
+ public void swap(int i, int j) {
+ ST_Agnode_s e1 = data.get(i);
+ ST_Agnode_s e2 = data.get(j);
+ data.set(i, e2);
+ data.set(j, e1);
+ }
+
+ public ArrayOfStar(List<ST_Agnode_s> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ArrayOfStar reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(null);
+ }
+ return this;
+ }
+
+ @Override
+ public ArrayOfStar plus(int delta) {
+ return new ArrayOfStar(data, pos + delta);
+ }
- public class Amp extends UnsupportedStarStruct {
+ @Override
+ public ArrayOfStar asPtr() {
+ return this;
+ }
- private final ST_Agnode_s me;
+ @Override
+ public void setPtr(__ptr__ value) {
+ this.data.set(pos, (ST_Agnode_s) value);
+ }
+
+ public ST_Agnode_s get(int i) {
+ return plus(i).getPtr();
+ }
- public Amp(ST_Agnode_s me) {
- this.me = me;
+ @Override
+ public ST_Agnode_s getPtr() {
+ return this.data.get(pos);
}
@Override
- public __ptr__ castTo(Class dest) {
- if (dest == Agobj_s.class) {
- return base.amp();
+ public int comparePointer(__ptr__ other) {
+ final ArrayOfStar this2 = (ArrayOfStar) other;
+ if (this.data != this2.data) {
+ throw new IllegalArgumentException();
}
- if (dest == Agnode_s.class) {
- return me;
+ return this.pos - this2.pos;
+ }
+
+ public boolean isSameThan2(ArrayOfStar other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
}
- return super.castTo(dest);
+ return this.pos == other.pos;
}
+ }
+
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__ {
+
+ private final List<ST_Agnode_s> data;
+ private final int pos;
@Override
- public __struct__ getStruct() {
- return ST_Agnode_s.this.getStruct();
+ public void setStruct(__struct__ value) {
+ get(0).___(value);
}
@Override
- public __ptr__ getPtr(String fieldName) {
- return ST_Agnode_s.this.getPtr(fieldName);
+ public Array asPtr() {
+ return this;
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_Agnode_s>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_Agnode_s());
+ }
+ }
+
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_Agnode_s());
+ }
+ return this;
+ }
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
+
+ @Override
+ public void setPtr(__ptr__ value) {
+ this.data.set(pos, (ST_Agnode_s) value);
}
@Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_Agnode_s.this.setPtr(fieldName, newData);
+ public ST_Agnode_s getPtr() {
+ return this.data.get(pos);
+ }
+
+ private Array(List<ST_Agnode_s> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ST_Agnode_s get(int i) {
+ return this.data.get(pos + i);
}
- public ST_Agnode_s getObject() {
- return me;
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
}
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
+ }
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
+ }
+
+ public ST_Agnode_s() {
+ this(null);
+ }
+
+ public ST_Agnode_s(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ public StarStruct getParent() {
+ return parent;
}
@Override
public __ptr__ castTo(Class dest) {
- if (dest == Agnode_s.class) {
+ if (dest == ST_Agnode_s.class) {
return this;
}
- if (dest == Agobj_s.class) {
+ if (dest == ST_Agobj_s.class) {
return base;
}
return super.castTo(dest);
}
+
+ public ST_Agobj_s castTo_ST_Agobj_s() {
+ return base;
+ }
@Override
public boolean isSameThan(StarStruct other) {
- if (other instanceof Amp) {
- Amp other2 = (Amp) other;
- return this == other2.me;
- }
ST_Agnode_s other2 = (ST_Agnode_s) other;
return this == other2;
}
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("base")) {
- return base;
- }
- if (fieldName.equals("mainsub")) {
- return mainsub;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("root")) {
this.root = (ST_Agraph_s) newData;
@@ -161,60 +260,10 @@ public class ST_Agnode_s extends UnsupportedStructAndPtr {
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("root")) {
- return root;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __struct__ getStruct() {
+ public ST_Agnode_s getStruct() {
return this;
}
- public static size_t sizeof_starstar_empty(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return STStarArrayOfPointer.malloc(nb);
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
- };
- }
-
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_Agnode_s>(nb, 0, ST_Agnode_s.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- if (old instanceof STStarArrayOfPointer) {
- STStarArrayOfPointer old2 = (STStarArrayOfPointer) old;
- old2.realloc(nb);
- return old2;
- }
- if (old instanceof StarArrayOfPtr) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- return super.realloc(old);
- }
- };
- }
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agnode_s",
// "{",
diff --git a/src/h/ST_Agnodeinfo_t.java b/src/h/ST_Agnodeinfo_t.java
index 3a7d3bf..4293a8e 100644
--- a/src/h/ST_Agnodeinfo_t.java
+++ b/src/h/ST_Agnodeinfo_t.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -63,72 +62,63 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- private final ST_Agrec_s hdr = new ST_Agrec_s(this);
+ public final ST_Agrec_s hdr = new ST_Agrec_s(this);
- private ST_shape_desc shape;
- private ST_polygon_t shape_info;
- private final ST_pointf coord = new ST_pointf(this);
- private double width, height;
+ public ST_shape_desc shape;
+ public ST_polygon_t shape_info;
+ public final ST_pointf coord = new ST_pointf(this);
+ public double width, height;
// "boxf bb",
- private double ht, lw, rw;
- private ST_textlabel_t label;
- private ST_textlabel_t xlabel;
+ public double ht, lw, rw;
+ public ST_textlabel_t label;
+ public ST_textlabel_t xlabel;
// "void *alg",
- private ST_Agedge_s alg = null;
+ public ST_Agedge_s alg = null;
// "char state",
// "unsigned char gui_state",
// "boolean clustnode",
// "unsigned char pinned",
- private int id, heapindex, hops;
+ public int id, heapindex, hops;
// "double *pos, dist",
- private int showboxes;
+ public int showboxes;
- private boolean has_port;
+ public boolean has_port;
// "node_t* rep",
// "node_t *set",
- private int node_type, mark, onstack;
- private int ranktype, weight_class;
- private ST_Agnode_s next;
- private ST_Agnode_s prev;
+ public int node_type, mark, onstack;
+ public int ranktype, weight_class;
+ public ST_Agnode_s next;
+ public ST_Agnode_s prev;
// "elist in, out, flat_out, flat_in, other",
- private final ST_elist in = new ST_elist(this);
- private final ST_elist out = new ST_elist(this);
- private final ST_elist flat_out = new ST_elist(this);
- private final ST_elist flat_in = new ST_elist(this);
- private final ST_elist other = new ST_elist(this);
- private ST_Agraph_s.Amp clust;
- private int UF_size;
+ public final ST_elist in = new ST_elist(this);
+ public final ST_elist out = new ST_elist(this);
+ public final ST_elist flat_out = new ST_elist(this);
+ public final ST_elist flat_in = new ST_elist(this);
+ public final ST_elist other = new ST_elist(this);
+ public ST_Agraph_s clust;
+ public int UF_size;
- private ST_Agnode_s UF_parent;
+ public ST_Agnode_s UF_parent;
- private ST_Agnode_s inleaf, outleaf;
- private int rank, order;
- private double mval;
- private final ST_elist save_in = new ST_elist(this);
- private final ST_elist save_out = new ST_elist(this);
- private final ST_elist tree_in = new ST_elist(this);
- private final ST_elist tree_out = new ST_elist(this);
- private ST_Agedge_s par;
- private int low, lim;
- private int priority;
+ public ST_Agnode_s inleaf, outleaf;
+ public int rank, order;
+ public double mval;
+ public final ST_elist save_in = new ST_elist(this);
+ public final ST_elist save_out = new ST_elist(this);
+ public final ST_elist tree_in = new ST_elist(this);
+ public final ST_elist tree_out = new ST_elist(this);
+ public ST_Agedge_s par;
+ public int low, lim;
+ public int priority;
// "double pad[1]",
// "}",
// "Agnodeinfo_t");
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == Agrec_s.class) {
+ if (dest == ST_Agrec_s.class) {
return hdr;
}
return super.castTo(dest);
@@ -164,42 +154,6 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
}
@Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("width")) {
- return this.width;
- }
- if (fieldName.equals("height")) {
- return this.height;
- }
- if (fieldName.equals("ht")) {
- return this.ht;
- }
- if (fieldName.equals("lw")) {
- return this.lw;
- }
- if (fieldName.equals("rw")) {
- return this.rw;
- }
- if (fieldName.equals("mval")) {
- return this.mval;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("mark")) {
- this.mark = data ? 1 : 0;
- return;
- }
- if (fieldName.equals("onstack")) {
- this.onstack = data ? 1 : 0;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("showboxes")) {
this.showboxes = data;
@@ -253,67 +207,6 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
}
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("UF_size")) {
- return this.UF_size;
- }
- if (fieldName.equals("ranktype")) {
- return this.ranktype;
- }
- if (fieldName.equals("mark")) {
- return this.mark;
- }
- if (fieldName.equals("onstack")) {
- return this.onstack;
- }
- if (fieldName.equals("priority")) {
- return this.priority;
- }
- if (fieldName.equals("node_type")) {
- return this.node_type;
- }
- if (fieldName.equals("rank")) {
- return this.rank;
- }
- if (fieldName.equals("order")) {
- return this.order;
- }
- if (fieldName.equals("ranktype")) {
- return this.ranktype;
- }
- if (fieldName.equals("low")) {
- return this.low;
- }
- if (fieldName.equals("lim")) {
- return this.lim;
- }
- if (fieldName.equals("weight_class")) {
- return this.weight_class;
- }
- if (fieldName.equals("id")) {
- return this.id;
- }
- if (fieldName.equals("heapindex")) {
- return this.heapindex;
- }
- if (fieldName.equals("hops")) {
- return this.hops;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("onstack")) {
- return this.onstack != 0;
- }
- if (fieldName.equals("has_port")) {
- return this.has_port;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("shape")) {
this.shape = (ST_shape_desc) newData;
@@ -328,11 +221,7 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
return label;
}
if (fieldName.equals("clust")) {
- if (newData instanceof ST_Agraph_s) {
- this.clust = (h.ST_Agraph_s.Amp) ((ST_Agraph_s) newData).amp();
- } else {
- this.clust = (ST_Agraph_s.Amp) newData;
- }
+ this.clust = (ST_Agraph_s) newData;
return clust;
}
if (fieldName.equals("next")) {
@@ -340,11 +229,7 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
return next;
}
if (fieldName.equals("prev")) {
- if (newData instanceof ST_Agnode_s.Amp) {
- this.prev = ((ST_Agnode_s.Amp) newData).getObject();
- } else {
this.prev = (ST_Agnode_s) newData;
- }
return prev;
}
if (fieldName.equals("UF_parent")) {
@@ -352,11 +237,7 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
return UF_parent;
}
if (fieldName.equals("par")) {
- if (newData instanceof ST_Agedge_s.Amp) {
- this.par = ((ST_Agedge_s.Amp) newData).getObject();
- } else {
- this.par = (ST_Agedge_s) newData;
- }
+ this.par = (ST_Agedge_s) newData;
return par;
}
if (fieldName.equals("alg")) {
@@ -366,81 +247,7 @@ public class ST_Agnodeinfo_t extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("shape")) {
- return shape;
- }
- if (fieldName.equals("label")) {
- return label;
- }
- if (fieldName.equals("UF_parent")) {
- return UF_parent;
- }
- if (fieldName.equals("next")) {
- return next;
- }
- if (fieldName.equals("prev")) {
- return prev;
- }
- if (fieldName.equals("clust")) {
- return clust;
- }
- if (fieldName.equals("inleaf")) {
- return inleaf;
- }
- if (fieldName.equals("outleaf")) {
- return outleaf;
- }
- if (fieldName.equals("alg")) {
- return alg;
- }
- if (fieldName.equals("par")) {
- return par;
- }
- if (fieldName.equals("xlabel")) {
- return xlabel;
- }
- if (fieldName.equals("shape_info")) {
- return shape_info;
- }
- return super.getPtr(fieldName);
- }
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("in")) {
- return in;
- }
- if (fieldName.equals("out")) {
- return out;
- }
- if (fieldName.equals("flat_out")) {
- return flat_out;
- }
- if (fieldName.equals("flat_in")) {
- return flat_in;
- }
- if (fieldName.equals("other")) {
- return other;
- }
- if (fieldName.equals("save_in")) {
- return save_in;
- }
- if (fieldName.equals("save_out")) {
- return save_out;
- }
- if (fieldName.equals("tree_in")) {
- return tree_in;
- }
- if (fieldName.equals("tree_out")) {
- return tree_out;
- }
- if (fieldName.equals("coord")) {
- return coord;
- }
- return super.getStruct(fieldName);
- }
@Override
public void setStruct(String fieldName, __struct__ newData) {
diff --git a/src/h/ST_Agobj_s.java b/src/h/ST_Agobj_s.java
index 9791440..c50cd69 100644
--- a/src/h/ST_Agobj_s.java
+++ b/src/h/ST_Agobj_s.java
@@ -46,7 +46,6 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -55,7 +54,7 @@ import smetana.core.amiga.StarStruct;
public class ST_Agobj_s extends UnsupportedStructAndPtr implements WithParent, HardcodedStruct {
public final ST_Agtag_s tag = new ST_Agtag_s(this);
- public ST_Agrec_s.Amp data;
+ public ST_Agrec_s data;
@Override
public void copyDataFrom(__struct__ other) {
@@ -76,45 +75,17 @@ public class ST_Agobj_s extends UnsupportedStructAndPtr implements WithParent, H
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public __struct__ getStruct(String fieldName) {
- return ST_Agobj_s.this.getStruct(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_Agobj_s.this.getPtr(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_Agobj_s.this.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ castTo(Class dest) {
- return ST_Agobj_s.this.castTo(dest);
- }
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == Agobj_s.class) {
+ if (dest == ST_Agobj_s.class) {
return this;
}
- if (dest == Agraph_s.class && parent instanceof ST_Agraph_s) {
+ if (dest == ST_Agraph_s.class && parent instanceof ST_Agraph_s) {
return (ST_Agraph_s) parent;
}
- if (dest == Agnode_s.class && parent instanceof ST_Agnode_s) {
+ if (dest == ST_Agnode_s.class && parent instanceof ST_Agnode_s) {
return (ST_Agnode_s) parent;
}
- if (dest == Agedge_s.class && parent instanceof ST_Agedge_s) {
+ if (dest == ST_Agedge_s.class && parent instanceof ST_Agedge_s) {
return (ST_Agedge_s) parent;
}
return super.castTo(dest);
@@ -125,18 +96,16 @@ public class ST_Agobj_s extends UnsupportedStructAndPtr implements WithParent, H
if (fieldName.equals("data")) {
if (newData instanceof ST_Agnodeinfo_t) {
ST_Agnodeinfo_t info = (ST_Agnodeinfo_t) newData;
- newData = (ST_Agrec_s) info.castTo(Agrec_s.class);
+ newData = (ST_Agrec_s) info.castTo(ST_Agrec_s.class);
} else if (newData instanceof ST_Agedgeinfo_t) {
ST_Agedgeinfo_t info = (ST_Agedgeinfo_t) newData;
- newData = (ST_Agrec_s) info.castTo(Agrec_s.class);
- } else if (newData instanceof ST_Agedgeinfo_t.Amp) {
- ST_Agedgeinfo_t.Amp info = (ST_Agedgeinfo_t.Amp) newData;
- newData = (ST_Agrec_s) info.castTo(Agrec_s.class);
+ newData = (ST_Agrec_s) info.castTo(ST_Agrec_s.class);
+ } else if (newData instanceof ST_Agedgeinfo_t) {
+ ST_Agedgeinfo_t info = (ST_Agedgeinfo_t) newData;
+ newData = (ST_Agrec_s) info.castTo(ST_Agrec_s.class);
}
if (newData instanceof ST_Agrec_s) {
- this.data = (ST_Agrec_s.Amp) ((ST_Agrec_s) newData).amp();
- } else {
- this.data = (ST_Agrec_s.Amp) newData;
+ this.data = (ST_Agrec_s) newData;
}
return data;
}
@@ -144,22 +113,6 @@ public class ST_Agobj_s extends UnsupportedStructAndPtr implements WithParent, H
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("data")) {
- return data;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("tag")) {
- return tag;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public void setStruct(String fieldName, __struct__ newData) {
if (fieldName.equals("tag")) {
this.tag.copyDataFrom(newData);
diff --git a/src/h/ST_Agraph_s.java b/src/h/ST_Agraph_s.java
index e8b312d..c2d807e 100644
--- a/src/h/ST_Agraph_s.java
+++ b/src/h/ST_Agraph_s.java
@@ -45,14 +45,16 @@
*/
package h;
+import java.util.ArrayList;
+import java.util.List;
+
import smetana.core.OFFSET;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_Agraph_s extends UnsupportedStructAndPtr {
@@ -84,9 +86,9 @@ public class ST_Agraph_s extends UnsupportedStructAndPtr {
public StarStruct getParent() {
return _parent;
}
-
+
@Override
- public __struct__ getStruct() {
+ public ST_Agraph_s getStruct() {
return this;
}
@@ -100,76 +102,94 @@ public class ST_Agraph_s extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp(this);
+ public ST_Agraph_s getPtr() {
+ return this;
}
- public class Amp extends UnsupportedStarStruct {
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__ {
- private final ST_Agraph_s me;
+ private final List<ST_Agraph_s> data;
+ private final int pos;
- public Amp(ST_Agraph_s me) {
- this.me = me;
+ @Override
+ public void setStruct(String fieldName, __struct__ data) {
+ getStruct().setStruct(fieldName, data);
}
-
+
@Override
- public __ptr__ getPtr(String fieldName) {
- return ST_Agraph_s.this.getPtr(fieldName);
+ public __ptr__ castTo(Class dest) {
+ return getStruct().castTo(dest);
}
-
+
@Override
- public __struct__ getStruct() {
- return ST_Agraph_s.this.getStruct();
+ public void setPtr(__ptr__ value) {
+ this.data.set(pos, (ST_Agraph_s) value);
}
-
+
@Override
- public __struct__ getStruct(String fieldName) {
- return ST_Agraph_s.this.getStruct(fieldName);
+ public ST_Agraph_s getPtr() {
+ return this.data.get(pos);
}
@Override
- public boolean isSameThan(StarStruct other) {
- if (other instanceof Amp) {
- Amp other2 = (Amp) other;
- return this.me == other2.me;
- }
- if (other instanceof ST_Agraph_s) {
- ST_Agraph_s other2 = (ST_Agraph_s) other;
- return this.me == other2;
- }
- return super.isSameThan(other);
+ public Array asPtr() {
+ return this;
}
@Override
- public __ptr__ castTo(Class dest) {
- if (dest == Agobj_s.class) {
- return base.amp();
+ public ST_Agraph_s getStruct() {
+ return data.get(pos);
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_Agraph_s>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(null);
}
- if (dest == Agraph_s.class) {
- return ST_Agraph_s.this;
+ }
+
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(null);
}
+ return this;
+ }
- return super.castTo(dest);
+ public Array plus(int delta) {
+ return plusJ(delta);
}
- @Override
- public Object addVirtualBytes(int virtualBytes) {
- if (virtualBytes == 0) {
- return this;
- }
- OFFSET offset = OFFSET.fromInt(virtualBytes);
- // if (offset.toString().equals("h.Agedge_s::seq_link")) {
- // return seq_link;
- // }
- if (offset.toString().equals("h.Agraph_s::link")) {
- return link;
+ private Array(List<ST_Agraph_s> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ST_Agraph_s get(int i) {
+ return this.data.get(pos + i);
+ }
+
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
+ }
+
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
}
- System.err.println("offset176=" + offset);
- return super.addVirtualBytes(virtualBytes);
+ return this.pos - other.pos;
+ }
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
}
- public ST_Agraph_s getObject() {
- return me;
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
}
}
@@ -183,7 +203,7 @@ public class ST_Agraph_s extends UnsupportedStructAndPtr {
// if (offset.toString().equals("h.Agedge_s::seq_link")) {
// return seq_link;
// }
- if (offset.toString().equals("h.Agraph_s::link")) {
+ if (offset.toString().equals("h.ST_Agraph_s::link")) {
return link;
}
System.err.println("offset156=" + offset);
@@ -191,14 +211,6 @@ public class ST_Agraph_s extends UnsupportedStructAndPtr {
}
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("desc")) {
- return desc;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("clos")) {
this.clos = (ST_Agclos_s) newData;
@@ -236,45 +248,20 @@ public class ST_Agraph_s extends UnsupportedStructAndPtr {
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("clos")) {
- return clos;
- }
- if (fieldName.equals("root")) {
- return root;
- }
- if (fieldName.equals("parent")) {
- return parent;
- }
- if (fieldName.equals("n_id")) {
- return n_id;
- }
- if (fieldName.equals("n_seq")) {
- return n_seq;
- }
- if (fieldName.equals("e_id")) {
- return e_id;
- }
- if (fieldName.equals("e_seq")) {
- return e_seq;
- }
- if (fieldName.equals("g_dict")) {
- return g_dict;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == Agobj_s.class) {
+ if (dest == ST_Agobj_s.class) {
return base;
}
- if (dest == Agraph_s.class) {
+ if (dest == ST_Agraph_s.class) {
return this;
}
return super.castTo(dest);
}
+ public ST_Agobj_s castTo_ST_Agobj_s() {
+ return base;
+ }
+
@Override
public boolean isSameThan(StarStruct other) {
ST_Agraph_s other2 = (ST_Agraph_s) other;
@@ -283,33 +270,10 @@ public class ST_Agraph_s extends UnsupportedStructAndPtr {
public StarStruct from_link(ST_dtlink_s from) {
if (from == link) {
- return amp();
+ return this;
}
throw new IllegalArgumentException();
}
-
-
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_Agraph_s>(nb, 0, ST_Agraph_s.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
-
//
// public interface ST_Agraph_s extends __ptr__ {
diff --git a/src/h/ST_Agraphinfo_t.java b/src/h/ST_Agraphinfo_t.java
index cb9c87b..330c3ff 100644
--- a/src/h/ST_Agraphinfo_t.java
+++ b/src/h/ST_Agraphinfo_t.java
@@ -48,34 +48,31 @@ package h;
import smetana.core.CFunction;
import smetana.core.HardcodedStruct;
import smetana.core.UnsupportedArrayOfStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_struct__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements HardcodedStruct {
- private final ST_Agrec_s hdr = new ST_Agrec_s(this);
+ public final ST_Agrec_s hdr = new ST_Agrec_s(this);
// /* to generate code */
- private ST_layout_t drawing;
- private ST_textlabel_t label; /* if the cluster has a title */
- private final ST_boxf bb = new ST_boxf(this); /* bounding box */
+ public ST_layout_t drawing;
+ public ST_textlabel_t label; /* if the cluster has a title */
+ public final ST_boxf bb = new ST_boxf(this); /* bounding box */
// pointf border[4]; /* sizes of margins for graph labels */
- private final ST_pointf border[] = new ST_pointf[] { new ST_pointf(), new ST_pointf(), new ST_pointf(),
+ public final ST_pointf border[] = new ST_pointf[] { new ST_pointf(), new ST_pointf(), new ST_pointf(),
new ST_pointf() };
// unsigned char gui_state; /* Graph state for GUI ops */
- private int has_labels;
+ public int has_labels;
// boolean has_images;
- private int charset; /* input character set */
- private int rankdir;
- private double ht1, ht2; /* below and above extremal ranks */
- private int flags;
+ public int charset; /* input character set */
+ public int rankdir;
+ public double ht1, ht2; /* below and above extremal ranks */
+ public int flags;
// void *alg;
- private ST_GVC_s gvc; /* context for "globals" over multiple graphs */
- private CFunction cleanup;
+ public ST_GVC_s gvc; /* context for "globals" over multiple graphs */
+ public CFunction cleanup;
// void (*cleanup) (graph_t * g); /* function to deallocate layout-specific data */
//
//
@@ -88,43 +85,43 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
//
//
// /* to have subgraphs */
- private int n_cluster;
+ public int n_cluster;
// graph_t **clust; /* clusters are in clust[1..n_cluster] !!! */
- private StarArrayOfPtr clust;
- private ST_Agraph_s dotroot;
- private ST_Agnode_s nlist;
- private StarArrayOfPtr rank;
- private ST_Agraph_s parent; /* containing cluster (not parent subgraph) */
+ public ST_Agraph_s.Array clust;
+ public ST_Agraph_s dotroot;
+ public ST_Agnode_s nlist;
+ public ST_rank_t.Array2 rank;
+ public ST_Agraph_s parent; /* containing cluster (not parent subgraph) */
// int level; /* cluster nesting level (not node level!) */
// node_t *minrep, *maxrep; /* set leaders for min and max rank */
//
// /* fast graph node list */
- private final ST_nlist_t comp = new ST_nlist_t(this);
+ public final ST_nlist_t comp = new ST_nlist_t(this);
// /* connected components */
- private ST_Agnode_s minset, maxset; /* set leaders */
- private int n_nodes;
+ public ST_Agnode_s minset, maxset; /* set leaders */
+ public int n_nodes;
// /* includes virtual */
- private int minrank, maxrank;
+ public int minrank, maxrank;
//
// /* various flags */
- private int has_flat_edges;
+ public int has_flat_edges;
// boolean has_sourcerank;
// boolean has_sinkrank;
- private int showboxes;
- private int fontnames; /* to override mangling in SVG */
+ public int showboxes;
+ public int fontnames; /* to override mangling in SVG */
//
- private int nodesep, ranksep;
- private ST_Agnode_s ln, rn; /* left, right nodes of bounding box */
+ public int nodesep, ranksep;
+ public ST_Agnode_s ln, rn; /* left, right nodes of bounding box */
//
// /* for clusters */
// node_t *leader, **rankleader;
- private ST_Agnode_s leader;
- private STStarArrayOfPointer rankleader;
- private boolean expanded;
- private int installed;
- // char set_type;
- private int label_pos;
- private int exact_ranksep;
+ public ST_Agnode_s leader;
+ public ST_Agnode_s.Array rankleader;
+ public boolean expanded;
+ public int installed;
+ public int set_type;
+ public int label_pos;
+ public int exact_ranksep;
private final StarStruct parent_;
@@ -136,14 +133,6 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
this.parent_ = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
class ArrayOfFour extends UnsupportedArrayOfStruct {
final private int pos;
@@ -152,8 +141,7 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
this.pos = pos;
}
- @Override
- public __array_of_struct__ plus(int delta) {
+ public ArrayOfFour plus(int delta) {
return new ArrayOfFour(pos + delta);
}
@@ -167,36 +155,12 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
border[pos].copyDataFrom(value);
}
- @Override
- public double getDouble(String fieldName) {
- return getStruct().getDouble(fieldName);
- }
-
- }
-
- @Override
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- if (fieldName.equals("border")) {
- return new ArrayOfFour(0);
- }
- return super.getArrayOfStruct(fieldName);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("comp")) {
- return this.comp;
- }
- if (fieldName.equals("bb")) {
- return this.bb;
- }
- return super.getStruct(fieldName);
}
@Override
public __ptr__ castTo(Class dest) {
- if (dest == Agrec_s.class) {
- return hdr.amp();
+ if (dest == ST_Agrec_s.class) {
+ return hdr;
}
return super.castTo(dest);
}
@@ -216,15 +180,11 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
return dotroot;
}
if (fieldName.equals("parent")) {
- if (newData instanceof ST_Agraph_s.Amp) {
- this.parent = ((ST_Agraph_s.Amp) newData).getObject();
- } else {
- this.parent = (ST_Agraph_s) newData;
- }
+ this.parent = (ST_Agraph_s) newData;
return parent;
}
if (fieldName.equals("clust")) {
- this.clust = (StarArrayOfPtr) newData;
+ this.clust = (ST_Agraph_s.Array) newData;
return clust;
}
if (fieldName.equals("label")) {
@@ -240,11 +200,7 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
return minset;
}
if (fieldName.equals("nlist")) {
- if (newData instanceof ST_Agnode_s.Amp) {
- this.nlist = ((ST_Agnode_s.Amp) newData).getObject();
- } else {
- this.nlist = (ST_Agnode_s) newData;
- }
+ this.nlist = (ST_Agnode_s) newData;
return nlist;
}
if (fieldName.equals("leader")) {
@@ -252,11 +208,11 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
return leader;
}
if (fieldName.equals("rankleader")) {
- this.rankleader = (STStarArrayOfPointer) newData;
+ this.rankleader = (ST_Agnode_s.Array) newData;
return rankleader;
}
if (fieldName.equals("rank")) {
- this.rank = (StarArrayOfPtr) newData;
+ this.rank = (ST_rank_t.Array2) newData;
return rank;
}
if (fieldName.equals("ln")) {
@@ -271,69 +227,6 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("drawing")) {
- return drawing;
- }
- if (fieldName.equals("gvc")) {
- return gvc;
- }
- if (fieldName.equals("parent")) {
- return parent;
- }
- if (fieldName.equals("dotroot")) {
- return dotroot;
- }
- if (fieldName.equals("clust")) {
- return clust;
- }
- if (fieldName.equals("label")) {
- return label;
- }
- if (fieldName.equals("maxset")) {
- return maxset;
- }
- if (fieldName.equals("minset")) {
- return minset;
- }
- if (fieldName.equals("nlist")) {
- return nlist;
- }
- if (fieldName.equals("leader")) {
- return leader;
- }
- if (fieldName.equals("rankleader")) {
- return rankleader;
- }
- if (fieldName.equals("rank")) {
- return rank;
- }
- if (fieldName.equals("ln")) {
- return ln;
- }
- if (fieldName.equals("rn")) {
- return rn;
- }
- if (fieldName.equals("cleanup")) {
- return cleanup;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("expanded")) {
- this.expanded = data;
- return;
- }
- if (fieldName.equals("has_flat_edges")) {
- this.has_flat_edges = data ? 1 : 0;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("charset")) {
this.charset = data;
@@ -394,71 +287,6 @@ public class ST_Agraphinfo_t extends UnsupportedStructAndPtr implements Hardcode
super.setInt(fieldName, data);
}
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("expanded")) {
- return expanded;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("flags")) {
- return flags;
- }
- if (fieldName.equals("charset")) {
- return charset;
- }
- if (fieldName.equals("rankdir")) {
- return rankdir;
- }
- if (fieldName.equals("has_labels")) {
- return has_labels;
- }
- if (fieldName.equals("n_cluster")) {
- return n_cluster;
- }
- if (fieldName.equals("label_pos")) {
- return label_pos;
- }
- if (fieldName.equals("n_nodes")) {
- return n_nodes;
- }
- if (fieldName.equals("maxrank")) {
- return maxrank;
- }
- if (fieldName.equals("minrank")) {
- return minrank;
- }
- if (fieldName.equals("has_flat_edges")) {
- return has_flat_edges;
- }
- if (fieldName.equals("installed")) {
- return installed;
- }
- if (fieldName.equals("exact_ranksep")) {
- return exact_ranksep;
- }
- if (fieldName.equals("nodesep")) {
- return nodesep;
- }
- if (fieldName.equals("ranksep")) {
- return ranksep;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("ht1")) {
- return ht1;
- }
- if (fieldName.equals("ht2")) {
- return ht2;
- }
- return super.getDouble(fieldName);
- }
@Override
public void setDouble(String fieldName, double data) {
diff --git a/src/h/ST_Agrec_s.java b/src/h/ST_Agrec_s.java
index 9f466cc..f174692 100644
--- a/src/h/ST_Agrec_s.java
+++ b/src/h/ST_Agrec_s.java
@@ -46,7 +46,6 @@
package h;
import smetana.core.CString;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -55,7 +54,7 @@ import smetana.core.amiga.StarStruct;
public class ST_Agrec_s extends UnsupportedStructAndPtr implements WithParent {
public CString name;
- public ST_Agrec_s.Amp next;
+ public ST_Agrec_s next;
private final StarStruct parent;
@@ -83,79 +82,48 @@ public class ST_Agrec_s extends UnsupportedStructAndPtr implements WithParent {
}
@Override
- public StarStruct amp() {
- return new Amp(this);
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- private final ST_Agrec_s me;
-
- public Amp(ST_Agrec_s me) {
- this.me = me;
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- Amp other2 = (Amp) other;
- return this.me == other2.me;
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_Agrec_s.this.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_Agrec_s.this.getPtr(fieldName);
- }
-
- @Override
- public __ptr__ castTo(Class dest) {
- return ST_Agrec_s.this.castTo(dest);
- }
-
- @Override
- public CString getCString(String fieldName) {
- return ST_Agrec_s.this.getCString(fieldName);
- }
-
- @Override
- public void copyDataFrom(__struct__ other) {
- ST_Agrec_s.this.copyDataFrom(other);
- }
- }
-
- @Override
- public CString getCString(String fieldName) {
- if (fieldName.equals("name")) {
- return name;
- }
- return super.getCString(fieldName);
+ public boolean isSameThan(StarStruct other) {
+ ST_Agrec_s other2 = (ST_Agrec_s) other;
+ return this == other2;
}
@Override
public __ptr__ castTo(Class dest) {
- if (dest == Agdatadict_s.class && getParent() instanceof ST_Agdatadict_s) {
+ if (dest == ST_Agdatadict_s.class && getParent() instanceof ST_Agdatadict_s) {
return (ST_Agdatadict_s) getParent();
}
- if (dest == Agattr_s.class && getParent() instanceof ST_Agattr_s) {
+ if (dest == ST_Agattr_s.class && getParent() instanceof ST_Agattr_s) {
return (ST_Agattr_s) getParent();
}
- if (dest == Agraphinfo_t.class && getParent() instanceof ST_Agraphinfo_t) {
+ if (dest == ST_Agraphinfo_t.class && getParent() instanceof ST_Agraphinfo_t) {
return (ST_Agraphinfo_t) getParent();
}
- if (dest == Agnodeinfo_t.class && getParent() instanceof ST_Agnodeinfo_t) {
+ if (dest == ST_Agnodeinfo_t.class && getParent() instanceof ST_Agnodeinfo_t) {
return (ST_Agnodeinfo_t) getParent();
}
- if (dest == Agedgeinfo_t.class && getParent() instanceof ST_Agedgeinfo_t) {
+ if (dest == ST_Agedgeinfo_t.class && getParent() instanceof ST_Agedgeinfo_t) {
return (ST_Agedgeinfo_t) getParent();
}
System.err.println("dest=" + dest);
System.err.println("getParent=" + getParent().getClass());
return super.castTo(dest);
}
+
+ public ST_Agnodeinfo_t castTo_ST_Agnodeinfo_t() {
+ if (getParent() instanceof ST_Agnodeinfo_t) {
+ return (ST_Agnodeinfo_t) getParent();
+ }
+ throw new UnsupportedOperationException();
+ }
+
+
+
+ public ST_Agraphinfo_t castTo_ST_Agraphinfo_t() {
+ if (getParent() instanceof ST_Agraphinfo_t) {
+ return (ST_Agraphinfo_t) getParent();
+ }
+ throw new UnsupportedOperationException();
+ }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
@@ -165,23 +133,13 @@ public class ST_Agrec_s extends UnsupportedStructAndPtr implements WithParent {
}
if (fieldName.equals("next")) {
if (newData instanceof ST_Agrec_s) {
- this.next = (ST_Agrec_s.Amp) ((ST_Agrec_s) newData).amp();
- } else {
- this.next = (ST_Agrec_s.Amp) newData;
+ this.next = (ST_Agrec_s) newData;
}
return next;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("next")) {
- return next;
- }
- return super.getPtr(fieldName);
- }
-
// public static List<String> DEFINITION = Arrays.asList(
// "struct Agrec_s",
// "{",
diff --git a/src/h/ST_Agsubnode_s.java b/src/h/ST_Agsubnode_s.java
index 0584063..c6a1899 100644
--- a/src/h/ST_Agsubnode_s.java
+++ b/src/h/ST_Agsubnode_s.java
@@ -45,10 +45,8 @@
*/
package h;
-import h.ST_splineInfo.Amp;
import smetana.core.HardcodedStruct;
import smetana.core.OFFSET;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -57,11 +55,11 @@ public class ST_Agsubnode_s extends UnsupportedStructAndPtr implements Hardcoded
public final ST_dtlink_s seq_link = new ST_dtlink_s(this);
public final ST_dtlink_s id_link = new ST_dtlink_s(this);
- public Agnode_s node;
- public ST_dtlink_s.Amp in_id;
- public ST_dtlink_s.Amp out_id;
- public ST_dtlink_s.Amp in_seq;
- public ST_dtlink_s.Amp out_seq;
+ public ST_Agnode_s node;
+ public ST_dtlink_s in_id;
+ public ST_dtlink_s out_id;
+ public ST_dtlink_s in_seq;
+ public ST_dtlink_s out_seq;
public ST_Agsubnode_s() {
this(null);
@@ -70,98 +68,46 @@ public class ST_Agsubnode_s extends UnsupportedStructAndPtr implements Hardcoded
public ST_Agsubnode_s(StarStruct parent) {
}
- public StarStruct from_id_link(ST_dtlink_s from) {
+ public ST_Agsubnode_s from_id_link(ST_dtlink_s from) {
if (from == id_link) {
- return amp();
+ return this;
}
throw new IllegalArgumentException();
}
- public StarStruct from_seq_link(ST_dtlink_s from) {
+ public ST_Agsubnode_s from_seq_link(ST_dtlink_s from) {
if (from == seq_link) {
- return amp();
+ return this;
}
throw new IllegalArgumentException();
}
- public class Amp extends UnsupportedStarStruct {
-
- private final ST_Agsubnode_s me;
-
- public Amp(ST_Agsubnode_s me) {
- this.me = me;
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- Amp other2 = (Amp) other;
- return this.me == other2.me;
- }
-
- @Override
- public Object addVirtualBytes(int virtualBytes) {
- if (virtualBytes == 0) {
- return this;
- }
- final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.Agsubnode_s::id_link")) {
- return id_link.amp();
- }
- if (offset.toString().equals("h.Agsubnode_s::seq_link")) {
- return seq_link.amp();
- }
- System.err.println("virtualBytes=" + virtualBytes);
- System.err.println("offset=" + offset);
- return super.addVirtualBytes(virtualBytes);
- }
-
- @Override
- public __ptr__ castTo(Class dest) {
- if (dest == Agsubnode_s.class) {
- return this;
- }
- System.err.println("dest=" + dest);
- return super.castTo(dest);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_Agsubnode_s.this.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_Agsubnode_s.this.getPtr(fieldName);
- }
+ @Override
+ public boolean isSameThan(StarStruct other) {
+ return this == (ST_Agsubnode_s) other;
}
-
+
@Override
public Object addVirtualBytes(int virtualBytes) {
if (virtualBytes == 0) {
return this;
}
final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.Agsubnode_s::id_link")) {
- return id_link.amp();
+ if (offset.toString().equals("h.ST_Agsubnode_s::id_link")) {
+ return id_link;
}
- if (offset.toString().equals("h.Agsubnode_s::seq_link")) {
- return seq_link.amp();
+ if (offset.toString().equals("h.ST_Agsubnode_s::seq_link")) {
+ return seq_link;
}
System.err.println("virtualBytes=" + virtualBytes);
System.err.println("offset=" + offset);
return super.addVirtualBytes(virtualBytes);
}
-
- @Override
- public StarStruct amp() {
- return new Amp(this);
- }
-
@Override
public __ptr__ castTo(Class dest) {
- if (dest == Agsubnode_s.class) {
- return this;
+ if (dest == ST_Agsubnode_s.class) {
+ return ST_Agsubnode_s.this;
}
System.err.println("dest=" + dest);
return super.castTo(dest);
@@ -170,19 +116,19 @@ public class ST_Agsubnode_s extends UnsupportedStructAndPtr implements Hardcoded
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("node")) {
- this.node = (Agnode_s) newData;
+ this.node = (ST_Agnode_s) newData;
return node;
}
if (fieldName.equals("in_id")) {
- this.in_id = (h.ST_dtlink_s.Amp) newData;
+ this.in_id = (h.ST_dtlink_s) newData;
return in_id;
}
if (fieldName.equals("out_seq")) {
- this.out_seq = (h.ST_dtlink_s.Amp) newData;
+ this.out_seq = (h.ST_dtlink_s) newData;
return out_seq;
}
if (fieldName.equals("out_id")) {
- this.out_id = (h.ST_dtlink_s.Amp) newData;
+ this.out_id = (h.ST_dtlink_s) newData;
return out_id;
}
if (fieldName.equals("seq_link")) {
@@ -190,32 +136,12 @@ public class ST_Agsubnode_s extends UnsupportedStructAndPtr implements Hardcoded
return seq_link;
}
if (fieldName.equals("in_seq")) {
- this.in_seq = (h.ST_dtlink_s.Amp) newData;
+ this.in_seq = (h.ST_dtlink_s) newData;
return in_seq;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("node")) {
- return node;
- }
- if (fieldName.equals("in_id")) {
- return in_id;
- }
- if (fieldName.equals("out_seq")) {
- return out_seq;
- }
- if (fieldName.equals("out_id")) {
- return out_id;
- }
- if (fieldName.equals("in_seq")) {
- return in_seq;
- }
- return super.getPtr(fieldName);
- }
-
// public interface ST_Agsubnode_s extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
diff --git a/src/h/ST_Agsym_s.java b/src/h/ST_Agsym_s.java
index 6e77a15..8c5ce40 100644
--- a/src/h/ST_Agsym_s.java
+++ b/src/h/ST_Agsym_s.java
@@ -48,7 +48,6 @@ package h;
import smetana.core.CString;
import smetana.core.HardcodedStruct;
import smetana.core.OFFSET;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -75,10 +74,10 @@ public class ST_Agsym_s extends UnsupportedStructAndPtr implements HardcodedStru
return this;
}
final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.Agsym_s::name")) {
+ if (offset.toString().equals("h.ST_Agsym_s::name")) {
return name;
}
- if (offset.toString().equals("h.Agsym_s::link")) {
+ if (offset.toString().equals("h.ST_Agsym_s::link")) {
return link;
}
System.err.println("virtualBytes=" + virtualBytes);
@@ -89,56 +88,14 @@ public class ST_Agsym_s extends UnsupportedStructAndPtr implements HardcodedStru
public ST_Agsym_s() {
this(null);
}
-
- public class Amp extends UnsupportedStarStruct {
-
- private final ST_Agsym_s me;
-
- public Amp(ST_Agsym_s me) {
- this.me = me;
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- Amp other2 = (Amp) other;
- return this.me == other2.me;
- }
-
- @Override
- public Object addVirtualBytes(int virtualBytes) {
- if (virtualBytes == 0) {
- return this;
- }
- final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.Agsym_s::name")) {
- return name;
- }
- System.err.println("virtualBytes=" + virtualBytes);
- System.err.println("offset=" + offset);
- return super.addVirtualBytes(virtualBytes);
- }
-
- @Override
- public int getInt(String fieldName) {
- return ST_Agsym_s.this.getInt(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_Agsym_s.this.setPtr(fieldName, newData);
- }
-
- @Override
- public CString getCString(String fieldName) {
- return ST_Agsym_s.this.getCString(fieldName);
- }
- }
-
+
@Override
- public StarStruct amp() {
- return new Amp(this);
+ public boolean isSameThan(StarStruct other) {
+ ST_Agsym_s other2 = (ST_Agsym_s) other;
+ return this == other2;
}
+
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("name")) {
@@ -165,31 +122,9 @@ public class ST_Agsym_s extends UnsupportedStructAndPtr implements HardcodedStru
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("kind")) {
- return kind;
- }
- if (fieldName.equals("id")) {
- return id;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public CString getCString(String fieldName) {
- if (fieldName.equals("defval")) {
- return defval;
- }
- if (fieldName.equals("name")) {
- return name;
- }
- return super.getCString(fieldName);
- }
-
public StarStruct from_link(ST_dtlink_s from) {
if (from == link) {
- return amp();
+ return this;
}
throw new IllegalArgumentException();
}
diff --git a/src/h/ST_Agtag_s.java b/src/h/ST_Agtag_s.java
index cf72f25..cb3b48b 100644
--- a/src/h/ST_Agtag_s.java
+++ b/src/h/ST_Agtag_s.java
@@ -70,7 +70,7 @@ public class ST_Agtag_s extends UnsupportedStructAndPtr implements HardcodedStru
@Override
public Class getRealClass() {
- return Agtag_s.class;
+ return ST_Agtag_s.class;
}
@Override
diff --git a/src/h/polygon_t.java b/src/h/ST_BestPos_t.java
index d5b5356..7bdd3b9 100644
--- a/src/h/polygon_t.java
+++ b/src/h/ST_BestPos_t.java
@@ -44,36 +44,74 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-import smetana.core.__ptr__;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__struct__;
+import smetana.core.amiga.StarStruct;
-//2 23el548cy5m8f5wz8b2x5tihx
+public class ST_BestPos_t extends UnsupportedStructAndPtr {
-public interface polygon_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct polygon_t",
-"{",
-"int regular",
-"int peripheries",
-"int sides",
-"double orientation",
-"double distortion",
-"double skew",
-"int option",
-"pointf *vertices",
-"}",
-"polygon_t");
-}
+ private final StarStruct parent;
+
+ public int n;
+ public double area;
+ public final ST_pointf pos = new ST_pointf(this);
+
+ public ST_BestPos_t() {
+ this(null);
+ }
+
+ public ST_BestPos_t(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public __struct__ copy() {
+ final ST_BestPos_t result = new ST_BestPos_t();
+ result.n = this.n;
+ result.area = this.area;
+ result.pos.copyDataFrom((__struct__) this.pos);
+ return result;
+ }
+
+ public void ___(__struct__ other) {
+ ST_BestPos_t this2 = (ST_BestPos_t) other;
+ this.n = this2.n;
+ this.area = this2.area;
+ this.pos.copyDataFrom((__struct__) this2.pos);
+ }
-// typedef struct polygon_t { /* mutable shape information for a node */
-// int regular; /* true for symmetric shapes */
-// int peripheries; /* number of periphery lines */
-// int sides; /* number of sides */
-// double orientation; /* orientation of shape (+ve degrees) */
-// double distortion; /* distortion factor - as in trapezium */
-// double skew; /* skew factor - as in parallelogram */
-// int option; /* ROUNDED, DIAGONAL corners, etc. */
-// pointf *vertices; /* array of vertex points */
-// } polygon_t; \ No newline at end of file
+
+ @Override
+ public void setStruct(String fieldName, __struct__ newData) {
+ if (fieldName.equals("pos")) {
+ pos.copyDataFrom(newData);
+ return;
+ }
+ super.setStruct(fieldName, newData);
+ }
+
+ @Override
+ public void setInt(String fieldName, int data) {
+ if (fieldName.equals("n")) {
+ this.n = data;
+ return;
+ }
+ super.setInt(fieldName, data);
+ }
+
+ @Override
+ public void setDouble(String fieldName, double data) {
+ if (fieldName.equals("area")) {
+ this.area = data;
+ return;
+ }
+ super.setDouble(fieldName, data);
+ }
+
+ // typedef struct best_p_s {
+ // int n;
+ // double area;
+ // pointf pos;
+ // } BestPos_t;
+}
diff --git a/src/h/STStarArrayOfPointer.java b/src/h/ST_Branch_t.java
index 7025548..19089fc 100644
--- a/src/h/STStarArrayOfPointer.java
+++ b/src/h/ST_Branch_t.java
@@ -45,73 +45,67 @@
*/
package h;
-import java.util.ArrayList;
-import java.util.List;
-
-import smetana.core.UnsupportedC;
-import smetana.core.__array_of_integer__;
+import smetana.core.HardcodedStruct;
+import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
-import smetana.core.amiga.Area;
+import smetana.core.__struct__;
-public class STStarArrayOfPointer extends UnsupportedC {
+public class ST_Branch_t extends UnsupportedStructAndPtr implements HardcodedStruct {
- private final int pos;
- private final List<__ptr__> data;
+ // Warning : could be a "ST_Leaf_t" from C Version
+ public final ST_Rect_t rect = new ST_Rect_t(this);
+ public ST_Node_t___or_object_t child; // "data" : ST_object_t
- public void realloc(int nb) {
- while (data.size() < nb) {
- data.add(null);
- }
+ public ST_Branch_t() {
}
- public static STStarArrayOfPointer malloc(int size) {
- List<__ptr__> data = new ArrayList<__ptr__>();
- for (int i = 0; i < size; i++) {
- data.add(null);
- }
- return new STStarArrayOfPointer(0, data);
- }
-
- private STStarArrayOfPointer(int pos, List<__ptr__> data) {
- this.pos = pos;
- this.data = data;
+ @Override
+ public void copyDataFrom(__struct__ other) {
+ ST_Branch_t this2 = (ST_Branch_t) other;
+ this.rect.copyDataFrom((__struct__) this2.rect);
+ this.child = this2.child;
}
@Override
- public int comparePointer(__ptr__ other) {
- final STStarArrayOfPointer this2 = (STStarArrayOfPointer) other;
- if (this.data != this2.data) {
- throw new IllegalArgumentException();
+ public __ptr__ castTo(Class dest) {
+ if (dest == Branch_t.class) {
+ return ST_Branch_t.this;
+ }
+ if (dest == ST_Rect_t.class) {
+ return rect;
}
- return this.pos - this2.pos;
+ return super.castTo(dest);
}
- @Override
- public __ptr__ plus(int pointerMove) {
- return new STStarArrayOfPointer(pos + pointerMove, data);
+ public __struct__ getStruct() {
+ return this;
}
@Override
- public void setPtr(__ptr__ value) {
- data.set(pos, value);
+ public void ___(__struct__ other) {
+ this.copyDataFrom(other);
}
@Override
- public __ptr__ getPtr(String fieldName) {
- return data.get(pos).getPtr(fieldName);
+ public void setStruct(String fieldName, __struct__ newData) {
+ if (fieldName.equals("rect")) {
+ this.rect.copyDataFrom(newData);
+ return;
+ }
+ super.setStruct(fieldName, newData);
}
@Override
- public __ptr__ getPtr() {
- return data.get(pos);
- }
-
- public void swap(int i, int j) {
- __ptr__ e1 = data.get(i);
- __ptr__ e2 = data.get(j);
- data.set(i, e2);
- data.set(j, e1);
-
+ public ST_Node_t___or_object_t setPtr(String fieldName, __ptr__ newData) {
+ if (fieldName.equals("child")) {
+ this.child = (ST_Node_t___or_object_t) newData;
+ return this.child;
+ }
+ throw new UnsupportedOperationException();
}
+ // typedef struct Branch {
+ // Rect_t rect;
+ // struct Node *child;
+ // } Branch_t;
}
diff --git a/src/h/ST_EMPTY.java b/src/h/ST_EMPTY.java
index c3329c1..8e257f1 100644
--- a/src/h/ST_EMPTY.java
+++ b/src/h/ST_EMPTY.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.amiga.StarStruct;
@@ -61,13 +60,4 @@ public class ST_EMPTY extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
}
diff --git a/src/h/ST_GVCOMMON_t.java b/src/h/ST_GVCOMMON_t.java
index 2028d07..55e1e05 100644
--- a/src/h/ST_GVCOMMON_t.java
+++ b/src/h/ST_GVCOMMON_t.java
@@ -47,7 +47,6 @@ package h;
import smetana.core.CFunction;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -56,18 +55,18 @@ public class ST_GVCOMMON_t extends UnsupportedStructAndPtr implements HardcodedS
// "typedef struct GVCOMMON_s",
// "{",
- private __ptr__ info;
+ public __ptr__ info;
// "char *cmdname",
// "int verbose",
// "boolean config, auto_outfile_names",
// "void (*errorfn) (const char *fmt, ...)",
- private CFunction errorfn;
+ public CFunction errorfn;
// "const char **show_boxes",
// "const char **lib",
// "int viewNum",
// "const lt_symlist_t *builtins",
- private __ptr__ builtins;
- private boolean demand_loading;
+ public __ptr__ builtins;
+ public boolean demand_loading;
// "}",
// "GVCOMMON_t");
@@ -82,14 +81,6 @@ public class ST_GVCOMMON_t extends UnsupportedStructAndPtr implements HardcodedS
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("info")) {
this.info = newData;
@@ -106,23 +97,6 @@ public class ST_GVCOMMON_t extends UnsupportedStructAndPtr implements HardcodedS
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("builtins") && builtins == null) {
- return builtins;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("demand_loading")) {
- this.demand_loading = data;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
}
// typedef struct GVCOMMON_s {
diff --git a/src/h/ST_GVC_s.java b/src/h/ST_GVC_s.java
index 6ca8393..c30a0f6 100644
--- a/src/h/ST_GVC_s.java
+++ b/src/h/ST_GVC_s.java
@@ -46,18 +46,16 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
public class ST_GVC_s extends UnsupportedStructAndPtr implements HardcodedStruct {
// "struct GVC_s",
// "{",
- private final ST_GVCOMMON_t common = new ST_GVCOMMON_t(this);
+ public final ST_GVCOMMON_t common = new ST_GVCOMMON_t(this);
// "char *config_path",
- private int config_found;
+ public int config_found;
// "char **input_filenames",
// "GVG_t *gvgs",
// "GVG_t *gvg",
@@ -71,7 +69,7 @@ public class ST_GVC_s extends UnsupportedStructAndPtr implements HardcodedStruct
// "GVJ_t *jobs",
// "GVJ_t *job",
// "graph_t *g",
- private final ST_gvplugin_active_layout_t layout = new ST_gvplugin_active_layout_t();
+ public final ST_gvplugin_active_layout_t layout = new ST_gvplugin_active_layout_t();
// "char *graphname",
// "GVJ_t *active_jobs",
// "char *pagedir",
@@ -106,25 +104,6 @@ public class ST_GVC_s extends UnsupportedStructAndPtr implements HardcodedStruct
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("common")) {
- return common;
- }
- if (fieldName.equals("layout")) {
- return layout;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("config_found")) {
this.config_found = data;
diff --git a/src/h/ST_HDict_t.java b/src/h/ST_HDict_t.java
index 0c55223..c530d50 100644
--- a/src/h/ST_HDict_t.java
+++ b/src/h/ST_HDict_t.java
@@ -45,20 +45,18 @@
*/
package h;
-import h.ST_HDict_t.Amp;
-
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.OFFSET;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
public class ST_HDict_t extends UnsupportedStructAndPtr {
private final StarStruct parent;
+ public final ST_dtlink_s link = new ST_dtlink_s(this);
+ public int key;
+ public final ST_Branch_t d = new ST_Branch_t(); /* Should be ST_Leaf_t */
+
public ST_HDict_t() {
this(null);
}
@@ -68,13 +66,38 @@ public class ST_HDict_t extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
+ public Object addVirtualBytes(int virtualBytes) {
+ if (virtualBytes == 0) {
+ return this;
+ }
+ OFFSET offset = OFFSET.fromInt(virtualBytes);
+ if (offset.toString().equals("h.ST_HDict_t::key")) {
+ return key;
+ }
+ System.err.println("offset="+offset);
- public class Amp extends UnsupportedStarStruct {
+ // TODO Auto-generated method stub
+ return super.addVirtualBytes(virtualBytes);
+ }
+// @Override
+// public __ptr__ getPtr(String fieldName) {
+// if (fieldName.equals("d")) {
+// return this.d;
+// }
+// return super.getPtr(fieldName);
+// }
+
+ @Override
+ public void setInt(String fieldName, int data) {
+ if (fieldName.equals("key")) {
+ this.key = data;
+ return;
+ }
+ super.setInt(fieldName, data);
}
+
+
// "typedef struct obyh",
// "{",
// "Dtlink_t link",
diff --git a/src/h/ST_IMapEntry_t.java b/src/h/ST_IMapEntry_t.java
index 1f6f4de..5b2ba1a 100644
--- a/src/h/ST_IMapEntry_t.java
+++ b/src/h/ST_IMapEntry_t.java
@@ -45,19 +45,15 @@
*/
package h;
-import h.ST_IMapEntry_t.Amp;
-
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.CString;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
public class ST_IMapEntry_t extends UnsupportedStructAndPtr {
private final StarStruct parent;
+
+ public final CString str = null;
public ST_IMapEntry_t() {
this(null);
@@ -67,14 +63,6 @@ public class ST_IMapEntry_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
// "typedef struct IMapEntry_s",
// "{",
// "Dtlink_t namedict_link",
diff --git a/src/h/agusererrf.java b/src/h/ST_LeafList_t.java
index 966af9a..bd604c1 100644
--- a/src/h/agusererrf.java
+++ b/src/h/ST_LeafList_t.java
@@ -44,16 +44,21 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-import smetana.core.__ptr__;
+import smetana.core.UnsupportedStructAndPtr;
-//2 dar3eyxi2ee4qldba8o9a54az
+public class ST_LeafList_t extends UnsupportedStructAndPtr {
+
+ public ST_LeafList_t next;
+ public ST_Branch_t /* ST_Leaf_t */leaf;
+
+ public ST_LeafList_t() {
+ }
-public interface agusererrf extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef int (*agusererrf) (char*)");
-}
-// typedef int (*agusererrf) (char*); \ No newline at end of file
+ // typedef struct LeafList {
+ // struct LeafList *next;
+ // Leaf_t *leaf;
+ // } LeafList_t;
+
+}
diff --git a/src/h/ST_Node_t___.java b/src/h/ST_Node_t___.java
index 3b48a6b..22e2848 100644
--- a/src/h/ST_Node_t___.java
+++ b/src/h/ST_Node_t___.java
@@ -44,19 +44,32 @@
*
*/
package h;
-import h.ST_Node_t___.Amp;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
+import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
-public class ST_Node_t___ extends UnsupportedStructAndPtr {
+public class ST_Node_t___ extends UnsupportedStructAndPtr implements ST_Node_t___or_object_t {
private final StarStruct parent;
+ public int count;
+ public int level;
+ // Sorry guys :-)
+ public final ST_Branch_t branch[] = new ST_Branch_t[] { new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t() };
public ST_Node_t___() {
this(null);
@@ -66,25 +79,55 @@ public class ST_Node_t___ extends UnsupportedStructAndPtr {
this.parent = parent;
}
+ class ArrayOfSixtyFor extends UnsupportedArrayOfStruct {
+
+ final private int pos;
+
+ public ArrayOfSixtyFor(int pos) {
+ this.pos = pos;
+ }
+
+ public ArrayOfSixtyFor plus(int delta) {
+ return new ArrayOfSixtyFor(pos + delta);
+ }
+
+ @Override
+ public __struct__ getStruct() {
+ return branch[pos];
+ }
+
+ @Override
+ public void setStruct(__struct__ value) {
+ branch[pos].copyDataFrom(value);
+ }
+
+ }
+
@Override
- public StarStruct amp() {
- return new Amp();
+ public void setInt(String fieldName, int data) {
+ if (fieldName.equals("count")) {
+ this.count = data;
+ return;
+ }
+ if (fieldName.equals("level")) {
+ this.level = data;
+ return;
+ }
+ super.setInt(fieldName, data);
}
- public class Amp extends UnsupportedStarStruct {
- }
-//"typedef struct Node",
-//"{",
-//"int count",
-//"int level",
-//"struct Branch branch[64]",
-//"}",
-//"Node_t");
+ // "typedef struct Node",
+ // "{",
+ // "int count",
+ // "int level",
+ // "struct Branch branch[64]",
+ // "}",
+ // "Node_t");
}
// typedef struct Node {
-// int count;
-// int level; /* 0 is leaf, others positive */
-// struct Branch branch[64];
+// int count;
+// int level; /* 0 is leaf, others positive */
+// struct Branch branch[64];
// } Node_t; \ No newline at end of file
diff --git a/src/h/Grid.java b/src/h/ST_Node_t___or_object_t.java
index cfe2344..b67442f 100644
--- a/src/h/Grid.java
+++ b/src/h/ST_Node_t___or_object_t.java
@@ -44,14 +44,9 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-//2 4i6l1ddogjsyl2pt4s30fqmwy
+import smetana.core.__ptr__;
-public interface Grid extends _grid {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _grid Grid");
-}
+public interface ST_Node_t___or_object_t extends __ptr__ {
-// typedef struct _grid Grid; \ No newline at end of file
+}
diff --git a/src/h/agxbuf.java b/src/h/ST_PartitionVars.java
index 771f8a2..5ea7aed 100644
--- a/src/h/agxbuf.java
+++ b/src/h/ST_PartitionVars.java
@@ -44,28 +44,67 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2bvk4wwyb3pp3ygpa39hp9xqw
-
-public interface agxbuf extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"unsigned char *buf",
-"unsigned char *ptr",
-"unsigned char *eptr",
-"int dyna",
-"}",
-"agxbuf");
-}
-// typedef struct {
-// unsigned char *buf; /* start of buffer */
-// unsigned char *ptr; /* next place to write */
-// unsigned char *eptr; /* end of buffer */
-// int dyna; /* true if buffer is malloc'ed */
-// } agxbuf; \ No newline at end of file
+import smetana.core.UnsupportedArrayOfStruct;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__struct__;
+import smetana.core.amiga.StarStruct;
+
+public class ST_PartitionVars extends UnsupportedStructAndPtr {
+
+ private final StarStruct parent;
+
+ public final int[] partition = new int[64 + 1];
+ public final int[] taken = new int[64 + 1];
+ public final int[] count = new int[2];
+ public final ST_Rect_t[] cover = new ST_Rect_t[] { new ST_Rect_t(), new ST_Rect_t() };
+ public final int[] area = new int[2];
+
+ // int partition[64 + 1];
+ // int taken[64 + 1];
+ // int count[2];
+ // struct Rect cover[2];
+ // int area[2];
+
+ class ArrayOfTwo extends UnsupportedArrayOfStruct {
+
+ final private int pos;
+
+ public ArrayOfTwo(int pos) {
+ this.pos = pos;
+ }
+
+ public ArrayOfTwo plus(int delta) {
+ return new ArrayOfTwo(pos + delta);
+ }
+
+ @Override
+ public __struct__ getStruct() {
+ return cover[pos];
+ }
+
+ @Override
+ public void setStruct(__struct__ value) {
+ cover[pos].copyDataFrom(value);
+ }
+
+ }
+
+
+ public ST_PartitionVars() {
+ this(null);
+ }
+
+ public ST_PartitionVars(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ // struct PartitionVars {
+ // int partition[64 + 1];
+ // int taken[64 + 1];
+ // int count[2];
+ // struct Rect cover[2];
+ // int area[2];
+ // };
+
+}
diff --git a/src/h/ST_Pedge_t.java b/src/h/ST_Pedge_t.java
index 7e4fbe9..f180cf0 100644
--- a/src/h/ST_Pedge_t.java
+++ b/src/h/ST_Pedge_t.java
@@ -45,12 +45,15 @@
*/
package h;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import java.util.ArrayList;
+import java.util.List;
+
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
+import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_Pedge_t extends UnsupportedStructAndPtr {
@@ -68,32 +71,88 @@ public class ST_Pedge_t extends UnsupportedStructAndPtr {
// "typedef struct Pedge_t",
// "{",
// "Ppoint_t a, b",
- private final ST_pointf a = new ST_pointf(this);
- private final ST_pointf b = new ST_pointf(this);
+ public final ST_pointf a = new ST_pointf(this);
+ public final ST_pointf b = new ST_pointf(this);
// "}",
// "Pedge_t");
- @Override
- public StarStruct amp() {
- return new Amp();
- }
+
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__{
- public class Amp extends UnsupportedStarStruct {
+ private final List<ST_Pedge_t> data;
+ private final int pos;
+
+ @Override
+ public void setStruct(String fieldName, __struct__ data) {
+ getStruct().setStruct(fieldName, data);
+ }
+
+ @Override
+ public Array asPtr() {
+ return this;
+ }
+
+ @Override
+ public ST_Pedge_t getStruct() {
+ return data.get(pos);
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_Pedge_t>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_Pedge_t());
+ }
+ }
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("a")) {
- return a;
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_Pedge_t());
+ }
+ return this;
}
- if (fieldName.equals("b")) {
- return b;
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
+
+ private Array(List<ST_Pedge_t> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ST_Pedge_t get(int i) {
+ return this.data.get(pos + i);
+ }
+
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
}
- return super.getStruct(fieldName);
+
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
+ }
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
}
-
+
+
@Override
public void setStruct(String fieldName, __struct__ newData) {
if (fieldName.equals("a")) {
@@ -107,26 +166,6 @@ public class ST_Pedge_t extends UnsupportedStructAndPtr {
super.setStruct(fieldName, newData);
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_Pedge_t>(nb, 0, ST_Pedge_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
}
diff --git a/src/h/ST_Ppoly_t.java b/src/h/ST_Ppoly_t.java
index 6206be8..8eb791e 100644
--- a/src/h/ST_Ppoly_t.java
+++ b/src/h/ST_Ppoly_t.java
@@ -46,23 +46,16 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedArrayOfPtr;
import smetana.core.UnsupportedArrayOfStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__array_of_struct__;
-import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.amiga.Area;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarArrayOfStruct;
import smetana.core.amiga.StarStruct;
public class ST_Ppoly_t extends UnsupportedStructAndPtr implements HardcodedStruct {
- // public List ps1;
- public StarArrayOfPtr ps2;
+ // public StarArrayOfPtr ps;
+ public ST_pointf.Array ps;
public int pn;
public ST_Ppoly_t() {
@@ -75,47 +68,11 @@ public class ST_Ppoly_t extends UnsupportedStructAndPtr implements HardcodedStru
@Override
public __struct__ copy() {
ST_Ppoly_t result = new ST_Ppoly_t();
- result.ps2 = this.ps2;
+ result.ps = this.ps;
result.pn = this.pn;
return result;
}
- class Adaptor extends UnsupportedArrayOfPtr {
-
- final private StarArrayOfStruct newData2;
- final private int pos;
-
- public Adaptor(StarArrayOfStruct newData2, int pos) {
- this.newData2 = newData2;
- this.pos = pos;
- }
-
- @Override
- public __array_of_ptr__ move(int delta) {
- return new Adaptor(newData2, pos + delta);
- }
-
- @Override
- public Area getInternal(int idx) {
- return newData2.getInternalArray().getInternal(pos + idx);
- }
-
- @Override
- public __ptr__ getPtr() {
- return newData2.plus(pos).getPtr();
- }
-
- @Override
- public __struct__ getStruct() {
- return newData2.plus(pos).getStruct();
- }
-
- @Override
- public int comparePointerInternal(__array_of_ptr__ other) {
- return super.comparePointerInternal(other);
- }
-
- }
class Adaptor2 extends UnsupportedArrayOfStruct {
@@ -125,62 +82,21 @@ public class ST_Ppoly_t extends UnsupportedStructAndPtr implements HardcodedStru
this.pos = pos;
}
- @Override
- public __array_of_struct__ plus(int delta) {
+ public Adaptor2 plus(int delta) {
return new Adaptor2(pos + delta);
}
-
+
@Override
public __struct__ getStruct() {
- return ps2.plus(pos).getStruct();
+ return ps.plus(pos).getStruct();
}
}
@Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("ps")) {
- if (newData instanceof StarArrayOfStruct) {
- StarArrayOfStruct newData2 = (StarArrayOfStruct) newData;
- System.err.println("newData2B=" + newData2);
- this.ps2 = new StarArrayOfPtr(new Adaptor(newData2, 0));
- return ps2;
- }
- this.ps2 = (StarArrayOfPtr) newData;
- return ps2;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("ps")) {
- return ps2;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- if (fieldName.equals("ps")) {
- return new Adaptor2(0);
- // return ps2.getArrayOfStruct("ps");
- }
- return super.getArrayOfStruct(fieldName);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("ps")) {
- return ps2.getInternalArray();
- }
- return super.getArrayOfPtr(fieldName);
- }
-
- @Override
public void memcopyFrom(Area source) {
ST_Ppoly_t source2 = (ST_Ppoly_t) source;
- this.ps2 = source2.ps2;
+ this.ps = source2.ps;
this.pn = source2.pn;
}
@@ -193,56 +109,6 @@ public class ST_Ppoly_t extends UnsupportedStructAndPtr implements HardcodedStru
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("pn")) {
- return pn;
- }
- return super.getInt(fieldName);
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("pn")) {
- return pn;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public void setInt(String fieldName, int data) {
- if (fieldName.equals("pn")) {
- pn = data;
- return;
- }
- super.setInt(fieldName, data);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("ps")) {
- return ps2;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("ps")) {
- ps2 = (StarArrayOfPtr) newData;
- return newData;
- }
- return super.setPtr(fieldName, newData);
- }
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct Ppoly_t",
// "{",
diff --git a/src/h/ST_RTree.java b/src/h/ST_RTree.java
index dfb3db1..90b5013 100644
--- a/src/h/ST_RTree.java
+++ b/src/h/ST_RTree.java
@@ -45,12 +45,6 @@
*/
package h;
-import h.ST_RTree.Amp;
-
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -69,56 +63,70 @@ public class ST_RTree extends UnsupportedStructAndPtr {
// "struct RTree",
// "{",
+ public ST_Node_t___ root;
// "Node_t *root",
- // "SplitQ_t split",
- // "int MinFill",
+ public final ST_SplitQ_t split = new ST_SplitQ_t(this);
+ public int MinFill;
// "long ElapsedTime",
// "float UserTime, SystemTime",
- // "int Deleting",
- // "int StatFlag",
+ public int Deleting;
+ public int StatFlag;
// "int InsertCount",
// "int DeleteCount",
// "int ReInsertCount",
// "int InSplitCount",
// "int DeSplitCount",
- // "int ElimCount",
+ public int ElimCount;
// "int EvalCount",
// "int InTouchCount",
// "int DeTouchCount",
- // "int SeTouchCount",
+ public int SeTouchCount;
// "int CallCount",
// "float SplitMeritSum",
- // "int RectCount",
- private int NodeCount;
- // "int LeafCount, NonLeafCount",
- // "int EntryCount",
+ public int RectCount;
+ public int NodeCount;
+ public int LeafCount, NonLeafCount;
+
+ public int EntryCount;
// "int SearchCount",
// "int HitCount",
// "}");
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("NodeCount")) {
- return NodeCount;
+ public __ptr__ setPtr(String fieldName, __ptr__ newData) {
+ if (fieldName.equals("root")) {
+ this.root = (ST_Node_t___) newData;
+ return root;
}
- return super.getInt(fieldName);
+ return super.setPtr(fieldName, newData);
}
-
+
@Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("NodeCount")) {
this.NodeCount = data;
return;
}
+ if (fieldName.equals("LeafCount")) {
+ this.LeafCount = data;
+ return;
+ }
+ if (fieldName.equals("RectCount")) {
+ this.RectCount = data;
+ return;
+ }
+ if (fieldName.equals("EntryCount")) {
+ this.EntryCount = data;
+ return;
+ }
+ if (fieldName.equals("SeTouchCount")) {
+ this.SeTouchCount = data;
+ return;
+ }
+ if (fieldName.equals("NonLeafCount")) {
+ this.NonLeafCount = data;
+ return;
+ }
super.setInt(fieldName, data);
}
diff --git a/src/h/Agsym_s.java b/src/h/ST_Rect_t.java
index 7c2b172..70358f2 100644
--- a/src/h/Agsym_s.java
+++ b/src/h/ST_Rect_t.java
@@ -44,33 +44,37 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-import smetana.core.__ptr__;
+import smetana.core.HardcodedStruct;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__struct__;
+import smetana.core.amiga.StarStruct;
-//2 38c2s12koxcpi2c7vwl72qrsp
+public class ST_Rect_t extends UnsupportedStructAndPtr implements HardcodedStruct {
-public interface Agsym_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agsym_s",
-"{",
-"Dtlink_t link",
-"char *name",
-"char *defval",
-"int id",
-"unsigned char kind",
-"unsigned char fixed",
-"unsigned char print",
-"}");
-}
+ public final int[] boundary = new int[2 * 2];
+
+ public ST_Rect_t(StarStruct parent) {
+ }
+
+ public ST_Rect_t() {
+ }
-// struct Agsym_s { /* symbol in one of the above dictionaries */
-// Dtlink_t link;
-// char *name; /* attribute's name */
-// char *defval; /* its default value for initialization */
-// int id; /* its index in attr[] */
-// unsigned char kind; /* referent object type */
-// unsigned char fixed; /* immutable value */
-// unsigned char print; /* always print */
-// }; \ No newline at end of file
+ @Override
+ public void ___(__struct__ other) {
+ this.copyDataFrom(other);
+ }
+
+ @Override
+ public void copyDataFrom(__struct__ other) {
+ ST_Rect_t other2 = (ST_Rect_t) other;
+ this.boundary[0] = other2.boundary[0];
+ this.boundary[1] = other2.boundary[1];
+ this.boundary[2] = other2.boundary[2];
+ this.boundary[3] = other2.boundary[3];
+ }
+
+ // typedef struct Rect {
+ // int boundary[2*2];
+ // } Rect_t;
+}
diff --git a/src/h/ST_SplitQ_t.java b/src/h/ST_SplitQ_t.java
new file mode 100644
index 0000000..8349b1d
--- /dev/null
+++ b/src/h/ST_SplitQ_t.java
@@ -0,0 +1,171 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of Smetana.
+ * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * This translation is distributed under the same Licence as the original C program:
+ *
+ *************************************************************************
+ * Copyright (c) 2011 AT&T Intellectual Property
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors: See CVS logs. Details at http://www.graphviz.org/
+ *************************************************************************
+ *
+ * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+ * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
+ *
+ * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
+ * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ *
+ * You may obtain a copy of the License at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package h;
+
+import smetana.core.UnsupportedArrayOfStruct;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__struct__;
+import smetana.core.amiga.StarStruct;
+
+public class ST_SplitQ_t extends UnsupportedStructAndPtr {
+
+ private final StarStruct parent;
+
+ // typedef struct split_q_s {
+ // struct Branch BranchBuf[64 + 1];
+ // Sorry guys :-)
+ public final ST_Branch_t BranchBuf[] = new ST_Branch_t[] { new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(), new ST_Branch_t(),
+ new ST_Branch_t(), new ST_Branch_t() };
+
+ public final ST_Rect_t CoverSplit = new ST_Rect_t(this);
+ public int CoverSplitArea;
+
+ public final ST_PartitionVars Partitions[] = new ST_PartitionVars[] { new ST_PartitionVars() };
+
+ // struct PartitionVars Partitions[1];
+ // } SplitQ_t;
+
+ public ST_SplitQ_t() {
+ this(null);
+ }
+
+ @Override
+ public ST_Rect_t castTo(Class dest) {
+ if (dest == ST_Rect_t.class) {
+ return CoverSplit;
+ }
+ throw new UnsupportedOperationException();
+ }
+
+ public ST_SplitQ_t(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ class ArrayOfSixtyFive extends UnsupportedArrayOfStruct {
+
+ final private int pos;
+
+ public ArrayOfSixtyFive(int pos) {
+ this.pos = pos;
+ }
+
+ public ArrayOfSixtyFive plus(int delta) {
+ return new ArrayOfSixtyFive(pos + delta);
+ }
+
+ @Override
+ public __struct__ getStruct() {
+ return BranchBuf[pos];
+ }
+
+ @Override
+ public void setStruct(__struct__ value) {
+ BranchBuf[pos].copyDataFrom(value);
+ }
+
+ }
+
+ class ArrayOfOne extends UnsupportedArrayOfStruct {
+
+ final private int pos;
+
+ public ArrayOfOne(int pos) {
+ this.pos = pos;
+ }
+
+ public ArrayOfOne plus(int delta) {
+ return new ArrayOfOne(pos + delta);
+ }
+
+ @Override
+ public __struct__ getStruct() {
+ return Partitions[pos];
+ }
+
+ @Override
+ public void setStruct(__struct__ value) {
+ Partitions[pos].copyDataFrom(value);
+ }
+
+ }
+
+ @Override
+ public void setInt(String fieldName, int data) {
+ if (fieldName.equals("CoverSplitArea")) {
+ this.CoverSplitArea = data;
+ return;
+ }
+ super.setInt(fieldName, data);
+ }
+
+ @Override
+ public void setStruct(String fieldName, __struct__ newData) {
+ if (fieldName.equals("CoverSplit")) {
+ this.CoverSplit.copyDataFrom(newData);
+ return;
+ }
+ super.setStruct(fieldName, newData);
+ }
+
+ // typedef struct split_q_s {
+ // struct Branch BranchBuf[64 + 1];
+ // struct Rect CoverSplit;
+ // unsigned int CoverSplitArea;
+ // struct PartitionVars Partitions[1];
+ // } SplitQ_t;
+}
diff --git a/src/h/ST_XLabels_t.java b/src/h/ST_XLabels_t.java
index 54ede9c..d1b189c 100644
--- a/src/h/ST_XLabels_t.java
+++ b/src/h/ST_XLabels_t.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -64,33 +63,30 @@ public class ST_XLabels_t extends UnsupportedStructAndPtr {
// "typedef struct XLabels_s",
// "{",
- // "object_t *objs",
- // "int n_objs",
- // "xlabel_t *lbls",
- // "int n_lbls",
- // "label_params_t *params",
- private ST_dt_s hdx;
-
- // "RTree_t *spdx",
+ public ST_object_t.Array /*ST_object_t*/ objs;
+ public int n_objs;
+ public ST_xlabel_t.Array /*ST_xlabel_t*/ lbls;
+ public int n_lbls;
+ public ST_label_params_t /*ST_label_params_t*/ params;
+ public ST_dt_s hdx;
+ public ST_RTree spdx;
// "}",
// "XLabels_t");
@Override
- public StarStruct amp() {
- return new Amp();
+ public void setInt(String fieldName, int data) {
+ if (fieldName.equals("n_objs")) {
+ this.n_objs = data;
+ return;
+ }
+ if (fieldName.equals("n_lbls")) {
+ this.n_lbls = data;
+ return;
+ }
+ super.setInt(fieldName, data);
}
- public class Amp extends UnsupportedStarStruct {
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("hdx")) {
- return this.hdx;
- }
- return super.getPtr(fieldName);
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
@@ -98,6 +94,22 @@ public class ST_XLabels_t extends UnsupportedStructAndPtr {
this.hdx = (ST_dt_s) newData;
return this.hdx;
}
+ if (fieldName.equals("spdx")) {
+ this.spdx = (ST_RTree) newData;
+ return this.spdx;
+ }
+// if (fieldName.equals("objs")) {
+// this.objs = newData;
+// return this.objs;
+// }
+// if (fieldName.equals("lbls")) {
+// this.lbls = newData;
+// return this.lbls;
+// }
+ if (fieldName.equals("params")) {
+ this.params = (ST_label_params_t) newData;
+ return this.params;
+ }
return super.setPtr(fieldName, newData);
}
diff --git a/src/h/ST_adjmatrix_t.java b/src/h/ST_adjmatrix_t.java
index 9f2bb46..be4e0bc 100644
--- a/src/h/ST_adjmatrix_t.java
+++ b/src/h/ST_adjmatrix_t.java
@@ -45,11 +45,7 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_integer__;
-import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfInteger;
import smetana.core.amiga.StarStruct;
public class ST_adjmatrix_t extends UnsupportedStructAndPtr {
@@ -64,21 +60,12 @@ public class ST_adjmatrix_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct adjmatrix_t",
// "{",
- private int nrows, ncols;
+ public int nrows, ncols;
// "char *data",
- private StarArrayOfInteger data;
+ public int[][] data;
// "}",
// "adjmatrix_t");
@@ -96,41 +83,6 @@ public class ST_adjmatrix_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("nrows")) {
- return this.nrows;
- }
- if (fieldName.equals("ncols")) {
- return this.ncols;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("data")) {
- this.data = (StarArrayOfInteger) newData;
- return data;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- if (fieldName.equals("data")) {
- return data.getInternalArray();
- }
- return super.getArrayOfInteger(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("data")) {
- return data;
- }
- return super.getPtr(fieldName);
- }
}
// typedef struct adjmatrix_t {
diff --git a/src/h/Agrec_s.java b/src/h/ST_arrowdir_t.java
index 60b7803..8c5af1e 100644
--- a/src/h/Agrec_s.java
+++ b/src/h/ST_arrowdir_t.java
@@ -44,24 +44,30 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-import smetana.core.__ptr__;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.amiga.StarStruct;
-//2 87jgefxbqnrx426i1quuhv9a1
+public class ST_arrowdir_t extends UnsupportedStructAndPtr {
-public interface Agrec_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct Agrec_s",
-"{",
-"char *name",
-"Agrec_t *next",
-"}");
-}
+ // char *dir;
+ public int sflag;
+ public int eflag;
+
+ private final StarStruct parent;
+
+ public ST_arrowdir_t() {
+ this(null);
+ }
-// struct Agrec_s {
-// char *name;
-// Agrec_t *next;
-// /* following this would be any programmer-defined data */
-// }; \ No newline at end of file
+ public ST_arrowdir_t(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ // typedef struct arrowdir_t {
+ // char *dir;
+ // int sflag;
+ // int eflag;
+ // } arrowdir_t;
+
+}
diff --git a/src/h/ST_arrowtype_t.java b/src/h/ST_arrowtype_t.java
index c3e2067..31fe508 100644
--- a/src/h/ST_arrowtype_t.java
+++ b/src/h/ST_arrowtype_t.java
@@ -47,7 +47,6 @@ package h;
import smetana.core.CFunction;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
import smetana.core.__struct__;
public class ST_arrowtype_t extends UnsupportedStructAndPtr {
@@ -64,29 +63,29 @@ public class ST_arrowtype_t extends UnsupportedStructAndPtr {
gen = other2.gen;
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("type")) {
- return type;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("lenfact")) {
- return lenfact;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("gen")) {
- return gen;
- }
- return super.getPtr(fieldName);
- }
+// @Override
+// public int getInt(String fieldName) {
+// if (fieldName.equals("type")) {
+// return type;
+// }
+// return super.getInt(fieldName);
+// }
+//
+// @Override
+// public double getDouble(String fieldName) {
+// if (fieldName.equals("lenfact")) {
+// return lenfact;
+// }
+// return super.getDouble(fieldName);
+// }
+//
+// @Override
+// public __ptr__ getPtr(String fieldName) {
+// if (fieldName.equals("gen")) {
+// return gen;
+// }
+// return super.getPtr(fieldName);
+// }
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct arrowtype_t",
diff --git a/src/h/ST_aspect_t.java b/src/h/ST_aspect_t.java
index 2ddd468..2f4063b 100644
--- a/src/h/ST_aspect_t.java
+++ b/src/h/ST_aspect_t.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.amiga.StarStruct;
@@ -61,40 +60,20 @@ public class ST_aspect_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct aspect_t",
// "{",
// "double targetAR",
// "double combiAR",
- private int prevIterations;
- private int curIterations;
- private int nextIter;
- private int nPasses;
- private int badGraph;
+ public int prevIterations;
+ public int curIterations;
+ public int nextIter;
+ public int nPasses;
+ public int badGraph;
// "}",
// "aspect_t");
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("nextIter")) {
- return this.nextIter;
- }
- if (fieldName.equals("nPasses")) {
- return this.nPasses;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("nextIter")) {
this.nextIter = data;
@@ -111,14 +90,6 @@ public class ST_aspect_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("badGraph")) {
- return this.badGraph != 0;
- }
- return super.getBoolean(fieldName);
- }
-
}
// typedef struct aspect_t {
diff --git a/src/h/ST_bezier.java b/src/h/ST_bezier.java
index c310ec8..90ddde0 100644
--- a/src/h/ST_bezier.java
+++ b/src/h/ST_bezier.java
@@ -45,14 +45,16 @@
*/
package h;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import h.ST_pointf.Array;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import smetana.core.UnsupportedArrayOfPtr;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_bezier extends UnsupportedStructAndPtr {
@@ -69,87 +71,123 @@ public class ST_bezier extends UnsupportedStructAndPtr {
// "{",
// "pointf *list",
- private StarArrayOfPtr list;
+ public ST_pointf.Array list;
- private int size;
- private int sflag, eflag;
+ public int size;
+ public int sflag, eflag;
- private final ST_pointf sp = new ST_pointf(this), ep = new ST_pointf(this);
+ public final ST_pointf sp = new ST_pointf(this), ep = new ST_pointf(this);
- // "}",
- // "bezier");
+ public static class Array2 extends UnsupportedArrayOfPtr implements __ptr__, __array_of_ptr__ {
- @Override
- public void ___(__struct__ other) {
- ST_bezier this2 = (ST_bezier) other;
- this.list = this2.list;
- this.size = this2.size;
- this.sflag = this2.sflag;
- this.eflag = this2.eflag;
- this.sp.copyDataFrom((__struct__) this2.sp);
- this.ep.copyDataFrom((__struct__) this2.ep);
- }
+ private final List<ST_bezier> data;
+ private final int pos;
- @Override
- public StarStruct amp() {
- return new Amp();
- }
+ public Array2(int size) {
+ this.data = new ArrayList<ST_bezier>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_bezier());
+ }
+ }
- public class Amp extends UnsupportedStarStruct {
+ @Override
+ public ST_bezier getStruct() {
+ return data.get(pos);
+ }
@Override
- public __ptr__ getPtr(String fieldName) {
- return ST_bezier.this.getPtr(fieldName);
+ public __ptr__ setPtr(String fieldName, __ptr__ newData) {
+ return getStruct().setPtr(fieldName, newData);
}
@Override
- public int getInt(String fieldName) {
- return ST_bezier.this.getInt(fieldName);
+ public void setStruct(String fieldName, __struct__ newData) {
+ getStruct().setStruct(fieldName, newData);
}
-
+
@Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- return ST_bezier.this.getArrayOfPtr(fieldName);
+ public void setInt(String fieldName, int data) {
+ getStruct().setInt(fieldName, data);
}
-
+
+ // public void swap(int i, int j) {
+ // ST_bezier e1 = data.get(i);
+ // ST_bezier e2 = data.get(j);
+ // data.set(i, e2);
+ // data.set(j, e1);
+ // }
+
+ public Array2(List<ST_bezier> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public Array2 reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_bezier());
+ }
+ return this;
+ }
+
@Override
- public boolean getBoolean(String fieldName) {
- return ST_bezier.this.getBoolean(fieldName);
+ public Array2 plus(int delta) {
+ return new Array2(data, pos + delta);
}
@Override
- public __struct__ getStruct(String fieldName) {
- return ST_bezier.this.getStruct(fieldName);
+ public Array2 asPtr() {
+ return this;
}
- }
+ @Override
+ public void setPtr(__ptr__ value) {
+ this.data.set(pos, (ST_bezier) value);
+ }
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("sflag")) {
- return this.sflag != 0;
+ @Override
+ public ST_bezier getPtr() {
+ return this.data.get(pos);
}
- if (fieldName.equals("eflag")) {
- return this.eflag != 0;
+
+ public ST_bezier get(int i) {
+ return this.plus(i).getPtr();
+ }
+
+ @Override
+ public int comparePointer(__ptr__ other) {
+ final Array2 this2 = (Array2) other;
+ if (this.data != this2.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - this2.pos;
+ }
+
+ public boolean isSameThan2(Array2 other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos == other.pos;
}
- return super.getBoolean(fieldName);
}
+ // "}",
+ // "bezier");
+
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("list")) {
- return list;
- }
- return super.getPtr(fieldName);
+ public void ___(__struct__ other) {
+ ST_bezier this2 = (ST_bezier) other;
+ this.list = this2.list;
+ this.size = this2.size;
+ this.sflag = this2.sflag;
+ this.eflag = this2.eflag;
+ this.sp.copyDataFrom((__struct__) this2.sp);
+ this.ep.copyDataFrom((__struct__) this2.ep);
}
@Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("list")) {
- this.list = (StarArrayOfPtr) newData;
- return list;
- }
- return super.setPtr(fieldName, newData);
+ public void ____(__ptr__ other) {
+ ___(((ST_bezier) other).getStruct());
}
@Override
@@ -183,62 +221,22 @@ public class ST_bezier extends UnsupportedStructAndPtr {
}
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("size")) {
- return this.size;
- }
- if (fieldName.equals("sflag")) {
- return this.sflag;
- }
- if (fieldName.equals("eflag")) {
- return this.eflag;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("sp")) {
- return this.sp;
- }
- if (fieldName.equals("ep")) {
- return this.ep;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
+ public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("list")) {
- return this.list.getInternalArray();
+ this.list = (Array) newData;
+ return this.list;
}
- return super.getArrayOfPtr(fieldName);
+ return super.setPtr(fieldName, newData);
}
@Override
- public __struct__ getStruct() {
+ public ST_bezier getStruct() {
return this;
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_bezier>(nb, 0, ST_bezier.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
+ @Override
+ public ST_bezier getPtr() {
+ return this;
}
}
diff --git a/src/h/ST_boxf.java b/src/h/ST_boxf.java
index e097976..50db1e6 100644
--- a/src/h/ST_boxf.java
+++ b/src/h/ST_boxf.java
@@ -46,12 +46,8 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct {
@@ -72,6 +68,14 @@ public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct
// this.UR.setStruct(other.UR);
// }
+ public static ST_boxf[] malloc(int nb) {
+ final ST_boxf result[] = new ST_boxf[nb];
+ for (int i = 0; i < nb; i++) {
+ result[i] = new ST_boxf();
+ }
+ return result;
+ }
+
@Override
public __struct__ getStruct() {
return this;
@@ -82,17 +86,6 @@ public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct
copyDataFrom(value);
}
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("LL")) {
- return LL;
- }
- if (fieldName.equals("UR")) {
- return UR;
- }
- return super.getStruct(fieldName);
- }
-
public __struct__ getStructInternal(String fieldName) {
if (fieldName.equals("LL")) {
return LL;
@@ -131,13 +124,6 @@ public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct
this.UR.setStruct(other.UR);
}
- // @Override
- // public void copyDataFrom(__ptr__ value) {
- // final ST_boxf other = (ST_boxf) value;
- // this.LL.setStruct(other.LL);
- // this.UR.setStruct(other.UR);
- // }
-
@Override
public void ___(__struct__ value) {
final ST_boxf other = (ST_boxf) value;
@@ -145,39 +131,7 @@ public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct
this.UR.setStruct(other.UR);
}
- class Amp extends UnsupportedStarStruct {
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("LL")) {
- return LL;
- }
- if (fieldName.equals("UR")) {
- return UR;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
- public __struct__ getStruct() {
- return ST_boxf.this;
- }
-
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_boxf>(nb, 0, ST_boxf.class));
- }
- };
- }
// public interface ST_boxf extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
diff --git a/src/h/textfont_t.java b/src/h/ST_cinfo_t.java
index 3161ece..451f11f 100644
--- a/src/h/textfont_t.java
+++ b/src/h/ST_cinfo_t.java
@@ -44,32 +44,54 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-import smetana.core.__ptr__;
+import smetana.core.HardcodedStruct;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__struct__;
+import smetana.core.amiga.StarStruct;
+
+public class ST_cinfo_t extends UnsupportedStructAndPtr implements HardcodedStruct {
+
+ public final ST_boxf bb = new ST_boxf(this);
+ public ST_object_t.Array objp;
+
+ public ST_cinfo_t(StarStruct parent) {
+ }
+
+ public ST_cinfo_t() {
+ }
+
+ @Override
+ public void ___(__struct__ value) {
+ final ST_cinfo_t other = (ST_cinfo_t) value;
+ this.bb.setStruct(other.bb);
+ this.objp = other.objp;
+ }
+
+ @Override
+ public void setStruct(String fieldName, __struct__ newData) {
+ if (fieldName.equals("bb")) {
+ this.bb.setStruct(newData);
+ return;
+ }
+ super.setStruct(fieldName, newData);
+ }
+
+
+ @Override
+ public ST_cinfo_t copy() {
+ final ST_cinfo_t result = new ST_cinfo_t();
+ result.bb.copyDataFrom((__struct__) this.bb);
+ result.objp = this.objp;
+ return result;
+ }
+
+
-//2 7eimedro6z0j21rhmmxbqdssy
-public interface textfont_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"char* name",
-"char* color",
-"PostscriptAlias *postscript_alias",
-"double size",
-"unsigned int flags:7",
-"unsigned int cnt:(sizeof(unsigned int) * 8 - 7)",
-"}",
-"textfont_t");
}
// typedef struct {
-// char* name;
-// char* color;
-// PostscriptAlias *postscript_alias;
-// double size;
-// unsigned int flags:7; /* HTML_UL, HTML_IF, HTML_BF, etc. */
-// unsigned int cnt:(sizeof(unsigned int) * 8 - 7); /* reference count */
-// } textfont_t; \ No newline at end of file
+// boxf bb;
+// object_t* objp;
+// } cinfo_t; \ No newline at end of file
diff --git a/src/h/ST_deque_t.java b/src/h/ST_deque_t.java
index 816465a..54595c2 100644
--- a/src/h/ST_deque_t.java
+++ b/src/h/ST_deque_t.java
@@ -47,13 +47,34 @@ package h;
import smetana.core.HardcodedStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
public class ST_deque_t extends UnsupportedStructAndPtr implements HardcodedStruct {
+ // ---------------
+ public ST_pointnlink_t pnlps[];
+
+ public boolean malloc(int newdqn) {
+ this.pnlps = new ST_pointnlink_t[newdqn];
+ return true;
+ }
+
+ public boolean realloc(int newdqn) {
+ if (pnlps.length >= newdqn) {
+ return true;
+ }
+ ST_pointnlink_t pnlps2[] = new ST_pointnlink_t[newdqn];
+ for (int i = 0; i < pnlps.length; i++) {
+ pnlps2[i] = pnlps[i];
+ }
+ this.pnlps = pnlps2;
+ return true;
+ }
+ // ---------------
+
+
// "pointnlink_t **pnlps",
- public __ptr__ pnlps;
+// public __ptr__ pnlps;
public int pnlpn, fpnlpi, lpnlpi, apex;
public ST_deque_t() {
@@ -63,60 +84,60 @@ public class ST_deque_t extends UnsupportedStructAndPtr implements HardcodedStru
public ST_deque_t(StarStruct parent) {
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("pnlps")) {
- return pnlps;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("pnlps")) {
- pnlps = newData;
- return pnlps;
- }
- return super.setPtr(fieldName, newData);
- }
+// @Override
+// public __ptr__ getPtr(String fieldName) {
+// if (fieldName.equals("pnlps")) {
+// return pnlps;
+// }
+// return super.getPtr(fieldName);
+// }
+//
+// @Override
+// public __ptr__ setPtr(String fieldName, __ptr__ newData) {
+// if (fieldName.equals("pnlps")) {
+// pnlps = newData;
+// return pnlps;
+// }
+// return super.setPtr(fieldName, newData);
+// }
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("pnlpn")) {
- return pnlpn;
- }
- if (fieldName.equals("fpnlpi")) {
- return fpnlpi;
- }
- if (fieldName.equals("lpnlpi")) {
- return lpnlpi;
- }
- if (fieldName.equals("apex")) {
- return apex;
- }
- return super.getInt(fieldName);
- }
+// @Override
+// public int getInt(String fieldName) {
+// if (fieldName.equals("pnlpn")) {
+// return pnlpn;
+// }
+// if (fieldName.equals("fpnlpi")) {
+// return fpnlpi;
+// }
+// if (fieldName.equals("lpnlpi")) {
+// return lpnlpi;
+// }
+// if (fieldName.equals("apex")) {
+// return apex;
+// }
+// return super.getInt(fieldName);
+// }
- @Override
- public void setInt(String fieldName, int data) {
- if (fieldName.equals("pnlpn")) {
- pnlpn = data;
- return;
- }
- if (fieldName.equals("fpnlpi")) {
- fpnlpi = data;
- return;
- }
- if (fieldName.equals("lpnlpi")) {
- lpnlpi = data;
- return;
- }
- if (fieldName.equals("apex")) {
- apex = data;
- return;
- }
- super.setInt(fieldName, data);
- }
+// @Override
+// public void setInt(String fieldName, int data) {
+// if (fieldName.equals("pnlpn")) {
+// pnlpn = data;
+// return;
+// }
+// if (fieldName.equals("fpnlpi")) {
+// fpnlpi = data;
+// return;
+// }
+// if (fieldName.equals("lpnlpi")) {
+// lpnlpi = data;
+// return;
+// }
+// if (fieldName.equals("apex")) {
+// apex = data;
+// return;
+// }
+// super.setInt(fieldName, data);
+// }
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct deque_t",
diff --git a/src/h/ST_dt_s.java b/src/h/ST_dt_s.java
index c130c5d..10466ac 100644
--- a/src/h/ST_dt_s.java
+++ b/src/h/ST_dt_s.java
@@ -55,10 +55,10 @@ public class ST_dt_s extends UnsupportedStructAndPtr implements HardcodedStruct
public CFunction searchf;/* search function */
- public ST_dtdisc_s.Amp disc; /* method to manipulate objs */
+ public ST_dtdisc_s disc; /* method to manipulate objs */
public ST_dtdata_s data; /* sharable data */
public CFunction memoryf;/* function to alloc/free memory */
- public ST_dtmethod_s.Amp meth; /* dictionary method */
+ public ST_dtmethod_s meth; /* dictionary method */
public int type; /* type information */
public int nview; /* number of parent view dictionaries */
@@ -80,11 +80,11 @@ public class ST_dt_s extends UnsupportedStructAndPtr implements HardcodedStruct
return searchf;
}
if (fieldName.equals("meth")) {
- this.meth = (ST_dtmethod_s.Amp) newData;
+ this.meth = (ST_dtmethod_s) newData;
return meth;
}
if (fieldName.equals("disc")) {
- this.disc = (ST_dtdisc_s.Amp) newData;
+ this.disc = (ST_dtdisc_s) newData;
return disc;
}
if (fieldName.equals("memoryf")) {
@@ -111,42 +111,6 @@ public class ST_dt_s extends UnsupportedStructAndPtr implements HardcodedStruct
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("disc")) {
- return disc;
- }
- if (fieldName.equals("data")) {
- return data;
- }
- if (fieldName.equals("meth")) {
- return meth;
- }
- if (fieldName.equals("view")) {
- return view;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public Object call(String fieldName, Object... args) {
- if (fieldName.equals("memoryf")) {
- return this.memoryf.exe(args);
- }
- if (fieldName.equals("searchf")) {
- return this.searchf.exe(args);
- }
- return super.call(fieldName, args);
- }
-
- @Override
- public __ptr__ castTo(Class dest) {
- if (dest == _dt_s.class) {
- return this;
- }
- return super.castTo(dest);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("type")) {
this.type = data;
@@ -160,17 +124,6 @@ public class ST_dt_s extends UnsupportedStructAndPtr implements HardcodedStruct
}
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("type")) {
- return type;
- }
- if (fieldName.equals("nview")) {
- return nview;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public boolean isSameThan(StarStruct other) {
ST_dt_s other2 = (ST_dt_s) other;
return this == other2;
diff --git a/src/h/ST_dtdata_s.java b/src/h/ST_dtdata_s.java
index 4dfeba9..8206fc9 100644
--- a/src/h/ST_dtdata_s.java
+++ b/src/h/ST_dtdata_s.java
@@ -45,17 +45,18 @@
*/
package h;
-import h.ST_dtdisc_s.Amp;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
public class ST_dtdata_s extends UnsupportedStructAndPtr {
+ private final StarStruct parent;
+
public int type; /* type of dictionary */
- public ST_dtlink_s.Amp here; /* finger to last search element */
- private __ptr__ _htab; /* hash table */
+ public ST_dtlink_s here; /* finger to last search element */
+ public __ptr__ _htab; /* hash table */
+ public ST_dtlink_s _head = null;
// Dtlink_t* _head; /* linked list */
// } hh;
public int ntab; /* number of hash slots */
@@ -63,7 +64,6 @@ public class ST_dtdata_s extends UnsupportedStructAndPtr {
public int loop; /* number of nested loops */
public int minp; /* min path before splay, always even */
- private final StarStruct parent;
public ST_dtdata_s() {
this(null);
@@ -78,39 +78,6 @@ public class ST_dtdata_s extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("here")) {
- if (newData instanceof ST_dtlink_s) {
- this.here = (ST_dtlink_s.Amp) ((ST_dtlink_s) newData).amp();
- } else {
- this.here = (ST_dtlink_s.Amp) newData;
- }
- return here;
- }
- if (fieldName.equals("hh._htab")) {
- this._htab = newData;
- return _htab;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("here")) {
- return here;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("type")) {
this.type = data;
@@ -135,20 +102,6 @@ public class ST_dtdata_s extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("type")) {
- return type;
- }
- if (fieldName.equals("size")) {
- return size;
- }
- if (fieldName.equals("minp")) {
- return minp;
- }
- return super.getInt(fieldName);
- }
-
// public interface ST_dtdata_s extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
// "struct _dtdata_s",
diff --git a/src/h/ST_dtdisc_s.java b/src/h/ST_dtdisc_s.java
index 4998a7a..217a090 100644
--- a/src/h/ST_dtdisc_s.java
+++ b/src/h/ST_dtdisc_s.java
@@ -45,9 +45,7 @@
*/
package h;
-import h.ST_dtmethod_s.Amp;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -72,64 +70,15 @@ public class ST_dtdisc_s extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp(this);
- }
-
- public class Amp extends UnsupportedStarStruct {
- private final ST_dtdisc_s parent;
-
- public Amp(ST_dtdisc_s me) {
- parent = me;
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- final Amp other2 = (Amp) other;
- return parent == other2.parent;
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("memoryf")) {
- return memoryf;
- }
- if (fieldName.equals("eventf")) {
- return eventf;
- }
- if (fieldName.equals("comparf")) {
- return comparf;
- }
- if (fieldName.equals("makef")) {
- return makef;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("key")) {
- return key;
- }
- if (fieldName.equals("size")) {
- return size;
- }
- if (fieldName.equals("link")) {
- return link;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("memoryf")) {
- memoryf = (CFunction) newData;
- return newData;
- }
- return super.setPtr(fieldName, newData);
+ public __ptr__ setPtr(String fieldName, __ptr__ newData) {
+ if (fieldName.equals("memoryf")) {
+ memoryf = (CFunction) newData;
+ return newData;
}
+ return super.setPtr(fieldName, newData);
}
+
}
// struct _dtdisc_s
diff --git a/src/h/ST_dthold_s.java b/src/h/ST_dthold_s.java
index 50c8e68..5f63e2e 100644
--- a/src/h/ST_dthold_s.java
+++ b/src/h/ST_dthold_s.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -66,26 +65,17 @@ public class ST_dthold_s extends UnsupportedStructAndPtr {
// "{",
// "Dtlink_t hdr",
// "void* obj",
- private final ST_dtlink_s hdr = new ST_dtlink_s(this);
- private __ptr__ obj;
+ public final ST_dtlink_s hdr = new ST_dtlink_s(this);
+ public __ptr__ obj;
// "}");
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
- @Override
public __ptr__ castTo(Class dest) {
- if (dest == _dthold_s.class) {
+ if (dest == ST_dthold_s.class) {
return this;
}
- if (dest == _dtlink_s.class) {
+ if (dest == ST_dtlink_s.class) {
return hdr;
}
return super.castTo(dest);
@@ -100,13 +90,6 @@ public class ST_dthold_s extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("obj")) {
- return this.obj;
- }
- return super.getPtr(fieldName);
- }
}
// struct _dthold_s
diff --git a/src/h/ST_dtlink_s.java b/src/h/ST_dtlink_s.java
index a7ce688..11d54ea 100644
--- a/src/h/ST_dtlink_s.java
+++ b/src/h/ST_dtlink_s.java
@@ -46,8 +46,6 @@
package h;
import smetana.core.OFFSET;
-import smetana.core.UnsupportedC;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -55,10 +53,10 @@ import smetana.core.amiga.StarStruct;
public class ST_dtlink_s extends UnsupportedStructAndPtr implements WithParent {
- public ST_dtlink_s.Amp right;
- public ST_dtlink_s.Amp _left;
+ public ST_dtlink_s right;
+ public ST_dtlink_s _left;
private final StarStruct parent;
-
+
@Override
public void copyDataFrom(__struct__ other) {
ST_dtlink_s this2 = (ST_dtlink_s) other;
@@ -78,27 +76,44 @@ public class ST_dtlink_s extends UnsupportedStructAndPtr implements WithParent {
return parent;
}
+ // @Override
+ // public __ptr__ castTo(Class dest) {
+ // if (dest == ST_dtlink_s.class) {
+ // // return amp();
+ // return this;
+ // }
+ // if (dest == _dthold_s.class) {
+ // return new LinkTo_dthold_s();
+ // }
+ // return super.castTo(dest);
+ // }
+
@Override
public __ptr__ castTo(Class dest) {
- if (dest == _dtlink_s.class) {
- return amp();
- // return this;
+ if (dest == ST_dtlink_s.class) {
+ return this;
}
- if (dest == _dthold_s.class) {
- return new LinkTo_dthold_s();
+ // if (dest == refstr_t.class && getParent() instanceof ST_refstr_t) {
+ // return (ST_refstr_t) getParent();
+ // }
+ if (dest == ST_dthold_s.class && getParent() instanceof ST_dthold_s) {
+ // System.err.println("ITSME");
+ // System.err.println("getParent()=" + getParent());
+ return (ST_dthold_s) getParent();
+
}
+ System.err.println("dest=" + dest);
return super.castTo(dest);
}
- class LinkTo_dthold_s extends UnsupportedStructAndPtr {
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("obj")) {
- return new LinkTo_Obj();
- }
- return super.getPtr(fieldName);
+ public ST_dthold_s castTo_ST_dthold_s() {
+ if (getParent() instanceof ST_dthold_s) {
+ return (ST_dthold_s) getParent();
}
+ throw new UnsupportedOperationException();
+ }
+
+ class LinkTo_dthold_s extends UnsupportedStructAndPtr {
}
@@ -107,102 +122,67 @@ public class ST_dtlink_s extends UnsupportedStructAndPtr implements WithParent {
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public __ptr__ castTo(Class dest) {
- if (dest == _dtlink_s.class) {
- return this;
+ public Object addVirtualBytes(int virtualBytes) {
+ if (virtualBytes == 0) {
+ return this;
+ }
+ if (virtualBytes < 0) {
+ final OFFSET offset = OFFSET.fromInt(-virtualBytes);
+ if (offset.toString().equals("h.ST_Agsubnode_s::id_link")) {
+ return ((ST_Agsubnode_s) parent).from_id_link(ST_dtlink_s.this);
}
- if (dest == refstr_t.class && getParent() instanceof ST_refstr_t) {
- return (ST_refstr_t) getParent();
+ if (offset.toString().equals("h.ST_Agsubnode_s::seq_link")) {
+ return ((ST_Agsubnode_s) parent).from_seq_link(ST_dtlink_s.this);
}
- if (dest == _dthold_s.class && getParent() instanceof ST_dthold_s) {
- // System.err.println("ITSME");
- // System.err.println("getParent()=" + getParent());
- return (ST_dthold_s) getParent();
-
+ if (offset.toString().equals("h.ST_Agsym_s::link")) {
+ return ((ST_Agsym_s) parent).from_link(ST_dtlink_s.this);
}
- System.err.println("dest=" + dest);
- return super.castTo(dest);
- }
-
- @Override
- public Object addVirtualBytes(int virtualBytes) {
- if (virtualBytes == 0) {
- return this;
+ if (offset.toString().equals("h.ST_Agedge_s::seq_link")) {
+ return ((ST_Agedge_s) parent).from_seq_link(ST_dtlink_s.this);
}
- if (virtualBytes < 0) {
- final OFFSET offset = OFFSET.fromInt(-virtualBytes);
- if (offset.toString().equals("h.Agsubnode_s::id_link")) {
- return ((ST_Agsubnode_s) parent).from_id_link(ST_dtlink_s.this);
- }
- if (offset.toString().equals("h.Agsubnode_s::seq_link")) {
- return ((ST_Agsubnode_s) parent).from_seq_link(ST_dtlink_s.this);
- }
- if (offset.toString().equals("h.Agsym_s::link")) {
- return ((ST_Agsym_s) parent).from_link(ST_dtlink_s.this);
- }
- if (offset.toString().equals("h.Agedge_s::seq_link")) {
- return ((ST_Agedge_s) parent).from_seq_link(ST_dtlink_s.this);
- }
- if (offset.toString().equals("h.Agedge_s::id_link")) {
- return ((ST_Agedge_s) parent).from_id_link(ST_dtlink_s.this);
- }
- if (offset.toString().equals("h.Agraph_s::link")) {
- return ((ST_Agraph_s) parent).from_link(ST_dtlink_s.this);
- }
- System.err.println("virtualBytes=" + virtualBytes);
- System.err.println("offset=" + offset);
- return super.addVirtualBytes(virtualBytes);
+ if (offset.toString().equals("h.ST_Agedge_s::id_link")) {
+ return ((ST_Agedge_s) parent).from_id_link(ST_dtlink_s.this);
}
- final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.refstr_t::s") && parent instanceof ST_refstr_t) {
- return ((ST_refstr_t) parent).to_s(ST_dtlink_s.this);
-
+ if (offset.toString().equals("h.ST_Agraph_s::link")) {
+ return ((ST_Agraph_s) parent).from_link(ST_dtlink_s.this);
}
System.err.println("virtualBytes=" + virtualBytes);
System.err.println("offset=" + offset);
return super.addVirtualBytes(virtualBytes);
}
+ final OFFSET offset = OFFSET.fromInt(virtualBytes);
+ if (offset.toString().equals("h.ST_refstr_t::s") && parent instanceof ST_refstr_t) {
+ return ((ST_refstr_t) parent).to_s(ST_dtlink_s.this);
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_dtlink_s.this.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_dtlink_s.this.getPtr(fieldName);
}
+ System.err.println("virtualBytes=" + virtualBytes);
+ System.err.println("offset=" + offset);
+ return super.addVirtualBytes(virtualBytes);
}
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("hl._left")) {
- this._left = (ST_dtlink_s.Amp) newData;
- return _left;
- }
- if (fieldName.equals("right")) {
- this.right = (ST_dtlink_s.Amp) newData;
- return right;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("hl._left")) {
- return _left;
- }
- if (fieldName.equals("right")) {
- return right;
- }
- return super.getPtr(fieldName);
- }
+ // @Override
+ // public __ptr__ setPtr(String fieldName, __ptr__ newData) {
+ // if (fieldName.equals("hl._left")) {
+ // this._left = (ST_dtlink_s) newData;
+ // return _left;
+ // }
+ // if (fieldName.equals("right")) {
+ // this.right = (ST_dtlink_s) newData;
+ // return right;
+ // }
+ // return super.setPtr(fieldName, newData);
+ // }
+
+ // @Override
+ // public __ptr__ getPtr(String fieldName) {
+ // // if (fieldName.equals("hl._left")) {
+ // // return _left;
+ // // }
+ // if (fieldName.equals("right")) {
+ // return right;
+ // }
+ // return super.getPtr(fieldName);
+ // }
// public interface ST_dtlink_s extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
diff --git a/src/h/ST_dtmethod_s.java b/src/h/ST_dtmethod_s.java
index d237f09..cb52c07 100644
--- a/src/h/ST_dtmethod_s.java
+++ b/src/h/ST_dtmethod_s.java
@@ -46,10 +46,8 @@
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
-import smetana.core.amiga.StarStruct;
public class ST_dtmethod_s extends UnsupportedStructAndPtr {
@@ -70,35 +68,4 @@ public class ST_dtmethod_s extends UnsupportedStructAndPtr {
return result;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("type")) {
- return type;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("searchf")) {
- return searchf;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public Object call(String fieldName, Object... args) {
- if (fieldName.equals("searchf")) {
- return searchf.exe(args);
- }
- return super.call(fieldName, args);
- }
- }
-
} \ No newline at end of file
diff --git a/src/h/ST_elist.java b/src/h/ST_elist.java
index 63736d8..0340578 100644
--- a/src/h/ST_elist.java
+++ b/src/h/ST_elist.java
@@ -49,10 +49,7 @@ import java.util.ArrayList;
import java.util.List;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedArrayOfPtr;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
@@ -60,7 +57,7 @@ import smetana.core.amiga.StarStruct;
public class ST_elist extends UnsupportedStructAndPtr implements HardcodedStruct {
public int size;
- private List list;
+ public List<ST_Agedge_s> list;
public ST_elist() {
this(null);
@@ -77,6 +74,11 @@ public class ST_elist extends UnsupportedStructAndPtr implements HardcodedStruct
}
@Override
+ public void setStruct(__struct__ value) {
+ copyDataFrom(value);
+ }
+
+ @Override
public void ___(__struct__ other) {
ST_elist other2 = (ST_elist) other;
this.size = other2.size;
@@ -95,129 +97,36 @@ public class ST_elist extends UnsupportedStructAndPtr implements HardcodedStruct
return list != null;
}
- public void mallocEmpty(Class cl, int nb) {
- list = new ArrayList();
+ public void mallocEmpty(int nb) {
+ list = new ArrayList<ST_Agedge_s>();
while (list.size() < nb) {
list.add(null);
}
}
- class ArrayOfPtr extends UnsupportedArrayOfPtr {
-
- private int pos;
-
- private ArrayOfPtr(int pos) {
- this.pos = pos;
- }
-
- @Override
- public __array_of_ptr__ plus(int delta) {
- return new ArrayOfPtr(pos + delta);
- }
-
- @Override
- public void setPtr(__ptr__ value) {
- list.set(pos, value);
- }
-
- @Override
- public __ptr__ getPtr() {
- return (__ptr__) list.get(pos);
- }
-
- }
-
- class Amp extends UnsupportedStarStruct {
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("size")) {
- return size;
- }
- return ST_elist.this.getInt(fieldName);
- }
-
- @Override
- public void setInt(String fieldName, int data) {
- if (fieldName.equals("size")) {
- size = data;
- return;
- }
- ST_elist.this.setInt(fieldName, data);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("list")) {
- if (list == null) {
- return null;
- }
- return new ArrayOfPtr(0);
- }
- return ST_elist.this.getArrayOfPtr(fieldName);
- }
-
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
public void realloc(int nb) {
if (list == null) {
- list = new ArrayList();
+ list = new ArrayList<ST_Agedge_s>();
}
while (list.size() < nb) {
list.add(null);
}
}
- class Ptr extends UnsupportedStructAndPtr {
-
- private final int pos;
-
- public Ptr(int pos) {
- this.pos = pos;
- }
-
- @Override
- public __ptr__ plus(int pointerMove) {
- return new Ptr(pos + pointerMove);
- }
-
- @Override
- public __ptr__ getPtr() {
- return (__ptr__) list.get(pos);
- }
-
- }
public void free() {
list = null;
}
public void setInList(int idx, Object value) {
- list.set(idx, value);
+ list.set(idx, (ST_Agedge_s) value);
}
public __ptr__ getFromList(int i) {
return (__ptr__) list.get(i);
}
- public __ptr__ getTheList() {
- if (list == null) {
- throw new IllegalStateException();
- }
- return new Ptr(0);
- }
-
- public __array_of_ptr__ getTheArray() {
- if (list == null) {
- throw new IllegalStateException();
- }
- return new ArrayOfPtr(0);
- }
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct elist",
diff --git a/src/h/ST_fontinfo.java b/src/h/ST_fontinfo.java
index f7e3392..cdc728a 100644
--- a/src/h/ST_fontinfo.java
+++ b/src/h/ST_fontinfo.java
@@ -46,7 +46,6 @@
package h;
import smetana.core.CString;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -63,57 +62,15 @@ public class ST_fontinfo extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public void setDouble(String fieldName, double data) {
- ST_fontinfo.this.setDouble(fieldName, data);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_fontinfo.this.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_fontinfo.this.getPtr(fieldName);
- }
-
- @Override
- public double getDouble(String fieldName) {
- return ST_fontinfo.this.getDouble(fieldName);
- }
-
- @Override
- public CString getCString(String fieldName) {
- return ST_fontinfo.this.getCString(fieldName);
- }
-
- }
-
// "struct fontinfo",
// "{",
- private double fontsize;
- private CString fontname;
- private CString fontcolor;
+ public double fontsize;
+ public CString fontname;
+ public CString fontcolor;
// "}");
@Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("fontsize")) {
- return this.fontsize;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("fontsize")) {
this.fontsize = data;
@@ -122,27 +79,6 @@ public class ST_fontinfo extends UnsupportedStructAndPtr {
super.setDouble(fieldName, data);
}
- @Override
- public CString getCString(String fieldName) {
- if (fieldName.equals("fontname")) {
- return this.fontname;
- }
- if (fieldName.equals("fontcolor")) {
- return this.fontcolor;
- }
- return super.getCString(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("fontname")) {
- return this.fontname;
- }
- if (fieldName.equals("fontcolor")) {
- return this.fontcolor;
- }
- return super.getPtr(fieldName);
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
diff --git a/src/h/ST_gvlayout_engine_s.java b/src/h/ST_gvlayout_engine_s.java
index 094212a..97b6713 100644
--- a/src/h/ST_gvlayout_engine_s.java
+++ b/src/h/ST_gvlayout_engine_s.java
@@ -46,15 +46,13 @@
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
-import smetana.core.amiga.StarStruct;
public class ST_gvlayout_engine_s extends UnsupportedStructAndPtr {
- private CFunction layout;
- private CFunction cleanup;
+ public CFunction layout;
+ public CFunction cleanup;
// "struct gvlayout_engine_s",
// "{",
@@ -75,40 +73,7 @@ public class ST_gvlayout_engine_s extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("layout")) {
- return layout;
- }
- if (fieldName.equals("cleanup")) {
- return cleanup;
- }
- return super.getPtr(fieldName);
- }
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_gvlayout_engine_s.this.getPtr(fieldName);
- }
-
- @Override
- public Object call(String fieldName, Object... args) {
- if (fieldName.equals("layout")) {
- return layout.exe(args);
- }
- if (fieldName.equals("cleanup")) {
- return cleanup.exe(args);
- }
- return super.call(fieldName, args);
- }
- }
}
// struct gvlayout_engine_s {
diff --git a/src/h/ST_gvlayout_features_t.java b/src/h/ST_gvlayout_features_t.java
index 05cdfd4..7d744e6 100644
--- a/src/h/ST_gvlayout_features_t.java
+++ b/src/h/ST_gvlayout_features_t.java
@@ -45,15 +45,13 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.amiga.StarStruct;
public class ST_gvlayout_features_t extends UnsupportedStructAndPtr {
// "typedef struct",
// "{",
- private int flags;
+ public int flags;
// "}",
// "gvlayout_features_t");
@@ -67,21 +65,6 @@ public class ST_gvlayout_features_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("flags")) {
- return flags;
- }
- return super.getInt(fieldName);
- }
- }
}
diff --git a/src/h/ST_gvplugin_active_layout_t.java b/src/h/ST_gvplugin_active_layout_t.java
index 9b602ae..421a620 100644
--- a/src/h/ST_gvplugin_active_layout_t.java
+++ b/src/h/ST_gvplugin_active_layout_t.java
@@ -51,10 +51,10 @@ import smetana.core.__ptr__;
public class ST_gvplugin_active_layout_t extends UnsupportedStructAndPtr {
- private ST_gvlayout_engine_s.Amp engine;
+ public ST_gvlayout_engine_s engine;
private int id;
- private ST_gvlayout_features_t.Amp features;
- private CString type;
+ public ST_gvlayout_features_t features;
+ public CString type;
// "}",
@@ -65,28 +65,17 @@ public class ST_gvplugin_active_layout_t extends UnsupportedStructAndPtr {
return newData;
}
if (fieldName.equals("engine")) {
- this.engine = (ST_gvlayout_engine_s.Amp) newData;
+ this.engine = (ST_gvlayout_engine_s) newData;
return newData;
}
if (fieldName.equals("features")) {
- this.features = (ST_gvlayout_features_t.Amp) newData;
+ this.features = (ST_gvlayout_features_t) newData;
return newData;
}
return super.setPtr(fieldName, newData);
}
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("engine")) {
- return engine;
- }
- if (fieldName.equals("features")) {
- return features;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("id")) {
this.id = data;
diff --git a/src/h/gvplugin_available_s.java b/src/h/ST_gvplugin_available_s.java
index 50aad79..5923bec 100644
--- a/src/h/gvplugin_available_s.java
+++ b/src/h/ST_gvplugin_available_s.java
@@ -44,31 +44,38 @@
*
*/
package h;
-import java.util.Arrays;
-import java.util.List;
-import smetana.core.__ptr__;
+import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.amiga.StarStruct;
-//2 4mff7kl30vs5cmzxe47j17hex
+public class ST_gvplugin_available_s extends UnsupportedStructAndPtr {
-public interface gvplugin_available_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvplugin_available_s",
-"{",
-"gvplugin_available_t *next",
-"const char *typestr",
-"int quality",
-"gvplugin_package_t *package",
-"gvplugin_installed_t *typeptr",
-"}");
-}
+ private final StarStruct parent;
+
+ // gvplugin_available_t *next; /* next plugin in linked list, or NULL */
+ // const char *typestr; /* type string, e.g. "png" or "ps" */
+ // int quality; /* Programmer assigned quality ranking within type (+ve or -ve int).
+ // First implementation of type should be given "0" quality */
+ // gvplugin_package_t *package; /* details of library containing plugin */
+ // gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin,
+ // or NULL if not yet loaded */
+
+ public ST_gvplugin_available_s() {
+ this(null);
+ }
-// struct gvplugin_available_s {
-// gvplugin_available_t *next; /* next plugin in linked list, or NULL */
-// const char *typestr; /* type string, e.g. "png" or "ps" */
-// int quality; /* Programmer assigned quality ranking within type (+ve or -ve int).
-// First implementation of type should be given "0" quality */
-// gvplugin_package_t *package; /* details of library containing plugin */
-// gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin,
-// or NULL if not yet loaded */
-// }; \ No newline at end of file
+ public ST_gvplugin_available_s(StarStruct parent) {
+ this.parent = parent;
+ }
+
+ // struct gvplugin_available_s {
+ // gvplugin_available_t *next; /* next plugin in linked list, or NULL */
+ // const char *typestr; /* type string, e.g. "png" or "ps" */
+ // int quality; /* Programmer assigned quality ranking within type (+ve or -ve int).
+ // First implementation of type should be given "0" quality */
+ // gvplugin_package_t *package; /* details of library containing plugin */
+ // gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin,
+ // or NULL if not yet loaded */
+ // };
+
+}
diff --git a/src/h/ST_gvplugin_installed_t.java b/src/h/ST_gvplugin_installed_t.java
index f07d223..0fac04b 100644
--- a/src/h/ST_gvplugin_installed_t.java
+++ b/src/h/ST_gvplugin_installed_t.java
@@ -62,12 +62,12 @@ public class ST_gvplugin_installed_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- private int id;
- private CString type;
- private int quality;
+ public int id;
+ public CString type;
+ public int quality;
- private ST_gvlayout_engine_s.Amp engine;
- private ST_gvlayout_features_t.Amp features;
+ public ST_gvlayout_engine_s engine;
+ public ST_gvlayout_features_t features;
@Override
public void setInt(String fieldName, int data) {
@@ -82,13 +82,6 @@ public class ST_gvplugin_installed_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("id")) {
- return this.id;
- }
- return super.getInt(fieldName);
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
@@ -97,30 +90,16 @@ public class ST_gvplugin_installed_t extends UnsupportedStructAndPtr {
return newData;
}
if (fieldName.equals("engine")) {
- this.engine = (ST_gvlayout_engine_s.Amp) newData;
+ this.engine = (ST_gvlayout_engine_s) newData;
return newData;
}
if (fieldName.equals("features")) {
- this.features = (ST_gvlayout_features_t.Amp) newData;
+ this.features = (ST_gvlayout_features_t) newData;
return newData;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("type")) {
- return type;
- }
- if (fieldName.equals("engine")) {
- return engine;
- }
- if (fieldName.equals("features")) {
- return features;
- }
- return super.getPtr(fieldName);
- }
-
}
// typedef struct {
diff --git a/src/h/ST_inside_t.java b/src/h/ST_inside_t.java
index 9cbdc76..ee6e44e 100644
--- a/src/h/ST_inside_t.java
+++ b/src/h/ST_inside_t.java
@@ -46,10 +46,8 @@
package h;
import smetana.core.MutableDoublePtr;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfStruct;
import smetana.core.amiga.StarStruct;
public class ST_inside_t extends UnsupportedStructAndPtr {
@@ -69,16 +67,16 @@ public class ST_inside_t extends UnsupportedStructAndPtr {
// "struct",
// "{",
// "pointf* p",
- private StarArrayOfStruct p;
- private MutableDoublePtr r;
+ public ST_pointf.Array a_p;
+ public MutableDoublePtr a_r;
// "double* r",
// "}",
// "a",
// "struct",
// "{",
// "node_t* n",
- private ST_Agnode_s n;
- private ST_boxf bp;
+ public ST_Agnode_s s_n;
+ public ST_boxf s_bp;
// "boxf* bp",
// "}",
@@ -86,55 +84,28 @@ public class ST_inside_t extends UnsupportedStructAndPtr {
// "}",
// "inside_t");
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_inside_t.this.getPtr(fieldName);
- }
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("s.n")) {
- this.n = (ST_Agnode_s) newData;
- return this.n;
+ this.s_n = (ST_Agnode_s) newData;
+ return this.s_n;
}
if (fieldName.equals("s.bp")) {
- this.bp = (ST_boxf) newData;
- return this.bp;
+ this.s_bp = (ST_boxf) newData;
+ return this.s_bp;
}
if (fieldName.equals("a.p")) {
- this.p = (StarArrayOfStruct) newData;
- return this.p;
+ this.a_p = (ST_pointf.Array) newData;
+ return this.a_p;
}
if (fieldName.equals("a.r")) {
- this.r = (MutableDoublePtr) newData;
- return this.r;
+ this.a_r = (MutableDoublePtr) newData;
+ return this.a_r;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("s.n")) {
- return this.n;
- }
- if (fieldName.equals("s.bp")) {
- return this.bp;
- }
- if (fieldName.equals("a.p")) {
- return this.p;
- }
- if (fieldName.equals("a.r")) {
- return this.r;
- }
- return super.getPtr(fieldName);
- }
}
diff --git a/src/h/ST_label_params_t.java b/src/h/ST_label_params_t.java
index 0da6975..ea3c859 100644
--- a/src/h/ST_label_params_t.java
+++ b/src/h/ST_label_params_t.java
@@ -45,14 +45,7 @@
*/
package h;
-import h.ST_label_params_t.Amp;
-
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
@@ -70,22 +63,13 @@ public class ST_label_params_t extends UnsupportedStructAndPtr {
// "typedef struct",
// "{",
- private final ST_boxf bb = new ST_boxf(this);
- private boolean force;
+ public final ST_boxf bb = new ST_boxf(this);
+ public boolean force;
// "}",
// "label_params_t");
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
- @Override
public void setStruct(String fieldName, __struct__ newData) {
if (fieldName.equals("bb")) {
this.bb.copyDataFrom(newData);
@@ -93,15 +77,7 @@ public class ST_label_params_t extends UnsupportedStructAndPtr {
}
super.setStruct(fieldName, newData);
}
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("force")) {
- this.force = data;
- return;
- }
- super.setBoolean(fieldName, data);
- }
+
}
// typedef struct {
diff --git a/src/h/ST_layout_t.java b/src/h/ST_layout_t.java
index fdd4a1e..74878d5 100644
--- a/src/h/ST_layout_t.java
+++ b/src/h/ST_layout_t.java
@@ -45,10 +45,8 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
public class ST_layout_t extends UnsupportedStructAndPtr {
@@ -63,29 +61,21 @@ public class ST_layout_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
- private double quantum;
- private double scale;
- private double ratio;
- private double dpi;
+ public double quantum;
+ public double scale;
+ public double ratio;
+ public double dpi;
- private ST_pointf margin = new ST_pointf(this);
- private ST_pointf page = new ST_pointf(this);
- private ST_pointf size = new ST_pointf(this);
+ public ST_pointf margin = new ST_pointf(this);
+ public ST_pointf page = new ST_pointf(this);
+ public ST_pointf size = new ST_pointf(this);
- private boolean filled;
- private boolean landscape;
- private boolean centered;
+ public boolean filled;
+ public boolean landscape;
+ public boolean centered;
// "ratio_t ratio_kind",
- private int ratio_kind;
+ public int ratio_kind;
// "void* xdots",
// "char* id",
@@ -98,54 +88,6 @@ public class ST_layout_t extends UnsupportedStructAndPtr {
}
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("margin")) {
- return margin;
- }
- if (fieldName.equals("page")) {
- return page;
- }
- if (fieldName.equals("size")) {
- return size;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("filled")) {
- this.filled = data;
- return;
- }
- if (fieldName.equals("landscape")) {
- this.landscape = data;
- return;
- }
- if (fieldName.equals("centered")) {
- this.centered = data;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("quantum")) {
- return this.quantum;
- }
- if (fieldName.equals("scale")) {
- return this.scale;
- }
- if (fieldName.equals("ratio")) {
- return this.ratio;
- }
- if (fieldName.equals("dpi")) {
- return this.dpi;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("quantum")) {
this.quantum = data;
@@ -166,13 +108,6 @@ public class ST_layout_t extends UnsupportedStructAndPtr {
super.setDouble(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("ratio_kind")) {
- return this.ratio_kind;
- }
- return super.getInt(fieldName);
- }
}
// typedef struct layout_t {
diff --git a/src/h/ST_nlist_t.java b/src/h/ST_nlist_t.java
index fe88a55..b543709 100644
--- a/src/h/ST_nlist_t.java
+++ b/src/h/ST_nlist_t.java
@@ -50,14 +50,13 @@ import java.util.List;
import smetana.core.HardcodedStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
public class ST_nlist_t extends UnsupportedStructAndPtr implements HardcodedStruct {
// public __ptr__ list;
public int size;
- private final List data = new ArrayList();
+ private final List<ST_Agnode_s> data = new ArrayList<ST_Agnode_s>();
public ST_nlist_t(StarStruct parent) {
}
@@ -66,23 +65,23 @@ public class ST_nlist_t extends UnsupportedStructAndPtr implements HardcodedStru
this(null);
}
- public void reallocEmpty(int n_nodes, Class<Agnode_s> class1) {
+ public void reallocEmpty(int n_nodes) {
while (data.size() < n_nodes) {
data.add(null);
}
}
- public void allocEmpty(int n_nodes, Class<Agnode_s> class1) {
+ public void allocEmpty(int n_nodes) {
data.clear();
- reallocEmpty(n_nodes, class1);
+ reallocEmpty(n_nodes);
}
- public void setInList(int idx, Agnode_s value) {
+ public void setInList(int idx, ST_Agnode_s value) {
data.set(idx, value);
}
- public __ptr__ getFromList(int i) {
- return (__ptr__) data.get(i);
+ public ST_Agnode_s getFromList(int i) {
+ return data.get(i);
}
public void resetList() {
diff --git a/src/h/ST_nodequeue.java b/src/h/ST_nodequeue.java
index d6918cd..78fde72 100644
--- a/src/h/ST_nodequeue.java
+++ b/src/h/ST_nodequeue.java
@@ -45,11 +45,8 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_nodequeue extends UnsupportedStructAndPtr {
@@ -64,22 +61,13 @@ public class ST_nodequeue extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct nodequeue",
// "{",
// "node_t **store, **limit, **head, **tail",
- private StarArrayOfPtr store;
- private StarArrayOfPtr tail;
- private StarArrayOfPtr head;
- private StarArrayOfPtr limit;
+ public ST_Agnode_s.ArrayOfStar store;
+ public ST_Agnode_s.ArrayOfStar tail;
+ public ST_Agnode_s.ArrayOfStar head;
+ public ST_Agnode_s.ArrayOfStar limit;
// "}",
// "nodequeue");
@@ -87,57 +75,24 @@ public class ST_nodequeue extends UnsupportedStructAndPtr {
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("store")) {
- this.store = (StarArrayOfPtr) newData;
+ this.store = (ST_Agnode_s.ArrayOfStar) newData;
return this.store;
}
if (fieldName.equals("tail")) {
- this.tail = (StarArrayOfPtr) newData;
+ this.tail = (ST_Agnode_s.ArrayOfStar) newData;
return this.tail;
}
if (fieldName.equals("head")) {
- this.head = (StarArrayOfPtr) newData;
+ this.head = (ST_Agnode_s.ArrayOfStar) newData;
return this.head;
}
if (fieldName.equals("limit")) {
- this.limit = (StarArrayOfPtr) newData;
+ this.limit = (ST_Agnode_s.ArrayOfStar) newData;
return this.limit;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("store")) {
- return this.store.getInternalArray();
- }
- if (fieldName.equals("tail")) {
- return this.tail.getInternalArray();
- }
- if (fieldName.equals("head")) {
- return this.head.getInternalArray();
- }
- if (fieldName.equals("limit")) {
- return this.limit.getInternalArray();
- }
- return super.getArrayOfPtr(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("store")) {
- return this.store;
- }
- if (fieldName.equals("tail")) {
- return this.tail;
- }
- if (fieldName.equals("head")) {
- return this.head;
- }
- if (fieldName.equals("limit")) {
- return this.limit;
- }
- return super.getPtr(fieldName);
- }
}
// typedef struct nodequeue {
diff --git a/src/h/ST_object_t.java b/src/h/ST_object_t.java
index 8a3c45e..a8a55ac 100644
--- a/src/h/ST_object_t.java
+++ b/src/h/ST_object_t.java
@@ -45,21 +45,18 @@
*/
package h;
-import h.ST_object_t.Amp;
-
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.List;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
-public class ST_object_t extends UnsupportedStructAndPtr {
+public class ST_object_t extends UnsupportedStructAndPtr implements ST_Node_t___or_object_t {
private final StarStruct parent;
@@ -73,20 +70,107 @@ public class ST_object_t extends UnsupportedStructAndPtr {
// "typedef struct",
// "{",
- private final ST_pointf pos = new ST_pointf(this);
- private final ST_pointf sz = new ST_pointf(this);
+ public final ST_pointf pos = new ST_pointf(this);
+ public final ST_pointf sz = new ST_pointf(this);
// "xlabel_t *lbl",
- private StarArrayOfPtr lbl;
+ public ST_xlabel_t.Array lbl;
// "}",
// "object_t");
@Override
- public StarStruct amp() {
- return new Amp();
+ public ST_object_t getStruct() {
+ return this;
+ }
+
+ @Override
+ public ST_object_t getPtr() {
+ return this;
}
- public class Amp extends UnsupportedStarStruct {
+ @Override
+ public boolean isSameThan(StarStruct other) {
+ ST_object_t other2 = (ST_object_t) other;
+ return this == other2;
+ }
+
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__ {
+
+ private final List<ST_object_t> data;
+ private final int pos;
+
+ @Override
+ public Array asPtr() {
+ return this;
+ }
+
+ @Override
+ public ST_object_t getStruct() {
+ return get(0);
+ }
+
+
+ @Override
+ public __ptr__ setPtr(String fieldName, __ptr__ data) {
+ return get(0).setPtr(fieldName, data);
+ }
+
+ @Override
+ public void setStruct(String fieldName, __struct__ data) {
+ get(0).setStruct(fieldName, data);
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_object_t>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_object_t());
+ }
+ }
+
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_object_t());
+ }
+ return this;
+ }
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
+
+ private Array(List<ST_object_t> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ST_object_t get(int i) {
+ return this.data.get(pos + i);
+ }
+
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
+ }
+
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
+ }
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
}
@@ -97,24 +181,13 @@ public class ST_object_t extends UnsupportedStructAndPtr {
return newData;
}
if (fieldName.equals("lbl")) {
- this.lbl = (StarArrayOfPtr) newData;
+ this.lbl = (ST_xlabel_t.Array) newData;
return this.lbl;
}
return super.setPtr(fieldName, newData);
}
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("pos")) {
- return this.pos;
- }
- if (fieldName.equals("sz")) {
- return this.sz;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public void setStruct(String fieldName, __struct__ newData) {
if (fieldName.equals("pos")) {
this.pos.copyDataFrom(newData);
@@ -127,38 +200,6 @@ public class ST_object_t extends UnsupportedStructAndPtr {
super.setStruct(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("pos")) {
- return this.pos;
- }
- if (fieldName.equals("sz")) {
- return this.sz;
- }
- return super.getPtr(fieldName);
- }
-
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_object_t>(nb, 0, ST_object_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
-
}
// typedef struct {
diff --git a/src/h/ST_pack_info.java b/src/h/ST_pack_info.java
index 5aae6d5..aafed5f 100644
--- a/src/h/ST_pack_info.java
+++ b/src/h/ST_pack_info.java
@@ -45,12 +45,6 @@
*/
package h;
-import h.ST_pack_info.Amp;
-
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -67,50 +61,24 @@ public class ST_pack_info extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct",
// "{",
// "float aspect",
- private int sz;
- private int margin;
+ public int sz;
+ public int margin;
private int doSplines;
// "pack_mode mode",
- private int mode;
+ public int mode;
private __ptr__ fixed;
// "boolean *fixed",
// "packval_t* vals",
- private __ptr__ vals;
- private int flags;
+ public __ptr__ vals;
+ public int flags;
// "}",
// "pack_info");
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("flags")) {
- return this.flags;
- }
- if (fieldName.equals("mode")) {
- return this.mode;
- }
- if (fieldName.equals("sz")) {
- return this.sz;
- }
- if (fieldName.equals("margin")) {
- return this.margin;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("flags")) {
this.flags = data;
diff --git a/src/h/ST_path.java b/src/h/ST_path.java
index dc87643..5e4c8b8 100644
--- a/src/h/ST_path.java
+++ b/src/h/ST_path.java
@@ -45,12 +45,8 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_path extends UnsupportedStructAndPtr {
@@ -65,23 +61,14 @@ public class ST_path extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct path",
// "{",
- final ST_port start = new ST_port(this), end = new ST_port(this);
- private int nbox;
+ final public ST_port start = new ST_port(this), end = new ST_port(this);
+ public int nbox;
// "boxf *boxes",
- private StarArrayOfPtr boxes;
+ public ST_boxf boxes[];
- private ST_Agedge_s.Amp data;
+ public ST_Agedge_s data;
// "void *data",
// "}",
@@ -89,67 +76,13 @@ public class ST_path extends UnsupportedStructAndPtr {
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("boxes")) {
- this.boxes = (StarArrayOfPtr) newData;
- return this.boxes;
- }
if (fieldName.equals("data")) {
- if (newData instanceof ST_Agedge_s) {
- newData = ((ST_Agedge_s) newData).amp();
- }
- this.data = (ST_Agedge_s.Amp) newData;
+ this.data = (ST_Agedge_s) newData;
return this.data;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("data")) {
- return this.data;
- }
- if (fieldName.equals("boxes")) {
- return this.boxes;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("start")) {
- return start;
- }
- if (fieldName.equals("end")) {
- return end;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("boxes")) {
- return boxes.getInternalArray();
- }
- return super.getArrayOfPtr(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("nbox")) {
- return this.nbox;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public void setInt(String fieldName, int data) {
- if (fieldName.equals("nbox")) {
- this.nbox = data;
- return;
- }
- super.setInt(fieldName, data);
- }
-
}
// typedef struct path { /* internal specification for an edge spline */
diff --git a/src/h/ST_pathend_t.java b/src/h/ST_pathend_t.java
index 9976232..0a1f172 100644
--- a/src/h/ST_pathend_t.java
+++ b/src/h/ST_pathend_t.java
@@ -45,10 +45,8 @@
*/
package h;
-import smetana.core.UnsupportedArrayOfStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_struct__;
+import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
@@ -66,12 +64,12 @@ public class ST_pathend_t extends UnsupportedStructAndPtr {
// "typedef struct pathend_t",
// "{",
- private final ST_boxf nb = new ST_boxf(this);
- private final ST_pointf np = new ST_pointf(this);
- private int sidemask;
- private int boxn;
+ public final ST_boxf nb = new ST_boxf(this);
+ public final ST_pointf np = new ST_pointf(this);
+ public int sidemask;
+ public int boxn;
- private final ST_boxf boxes[] = new ST_boxf[] { new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(),
+ public final ST_boxf boxes[] = new ST_boxf[] { new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(),
new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(),
new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(), new ST_boxf(),
new ST_boxf(), new ST_boxf() };
@@ -80,67 +78,9 @@ public class ST_pathend_t extends UnsupportedStructAndPtr {
// "}",
// "pathend_t");
- class ArrayOfTwenty extends UnsupportedArrayOfStruct {
-
- final private int pos;
-
- public ArrayOfTwenty(int pos) {
- this.pos = pos;
- }
-
- @Override
- public __array_of_struct__ plus(int delta) {
- return new ArrayOfTwenty(pos + delta);
- }
-
- @Override
- public __struct__ getStruct() {
- return boxes[pos];
- }
-
- @Override
- public void setStruct(__struct__ value) {
- boxes[pos].copyDataFrom(value);
- }
-
- @Override
- public double getDouble(String fieldName) {
- return getStruct().getDouble(fieldName);
- }
-
- }
-
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public void setStruct(String fieldName, __struct__ newData) {
- ST_pathend_t.this.setStruct(fieldName, newData);
- }
-
- @Override
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- return ST_pathend_t.this.getArrayOfStruct(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- return ST_pathend_t.this.getInt(fieldName);
- }
-
- @Override
- public void setInt(String fieldName, int data) {
- ST_pathend_t.this.setInt(fieldName, data);
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- return ST_pathend_t.this.getStruct(fieldName);
- }
-
+ public __ptr__ getPtr() {
+ return this;
}
@Override
@@ -157,28 +97,6 @@ public class ST_pathend_t extends UnsupportedStructAndPtr {
}
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("nb")) {
- return this.nb;
- }
- if (fieldName.equals("np")) {
- return this.np;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("boxn")) {
- return this.boxn;
- }
- if (fieldName.equals("sidemask")) {
- return this.sidemask;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("boxn")) {
this.boxn = data;
@@ -191,14 +109,6 @@ public class ST_pathend_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- if (fieldName.equals("boxes")) {
- return new ArrayOfTwenty(0);
- }
- return super.getArrayOfStruct(fieldName);
- }
-
}
// typedef struct pathend_t {
diff --git a/src/h/ST_point.java b/src/h/ST_point.java
index 8d0c580..f450411 100644
--- a/src/h/ST_point.java
+++ b/src/h/ST_point.java
@@ -45,7 +45,6 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__struct__;
import smetana.core.amiga.StarStruct;
@@ -62,18 +61,10 @@ public class ST_point extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
// "typedef struct",
// "{",
- private int x, y;
+ public int x, y;
// "}",
// "point");
@@ -94,17 +85,6 @@ public class ST_point extends UnsupportedStructAndPtr {
}
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("x")) {
- return this.x;
- }
- if (fieldName.equals("y")) {
- return this.y;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("x")) {
this.x = data;
diff --git a/src/h/ST_pointf.java b/src/h/ST_pointf.java
index d4d426a..9f36f0a 100644
--- a/src/h/ST_pointf.java
+++ b/src/h/ST_pointf.java
@@ -45,70 +45,144 @@
*/
package h;
+import java.util.ArrayList;
+import java.util.List;
+
+import smetana.core.CString;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
import smetana.core.amiga.Area;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarArrayOfStruct;
import smetana.core.amiga.StarStruct;
public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruct {
public double x;
public double y;
-
- public ST_pointf() {
- this(null);
+
+ @Override
+ public boolean isSameThan(StarStruct other) {
+ return this==(ST_pointf)other;
}
- public class Amp extends UnsupportedStarStruct {
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__,
+ __array_of_ptr__ {
- public double getX() {
- return x;
- }
+ private final List<ST_pointf> data;
+ private final int pos;
- public double getY() {
- return y;
+ @Override
+ public void setStruct(__struct__ value) {
+ getStruct().___(value);
}
- public void setX(double value) {
- x = value;
+ @Override
+ public Array asPtr() {
+ return this;
}
- public void setY(double value) {
- y = value;
+ @Override
+ public void setDouble(String fieldName, double value) {
+ getStruct().setDouble(fieldName, value);
}
@Override
- public __struct__ getStruct() {
- return ST_pointf.this;
+ public ST_pointf getStruct() {
+ return get(0).getStruct();
}
@Override
- public double getDouble(String fieldName) {
- return ST_pointf.this.getDouble(fieldName);
+ public ST_pointf getPtr() {
+ return get(0);
}
- @Override
- public void setStruct(__struct__ value) {
- ST_pointf.this.setStruct(value);
+ public Array(int size) {
+ this.data = new ArrayList<ST_pointf>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_pointf());
+ }
}
- @Override
- public boolean isSameThan(StarStruct other) {
- ST_pointf.Amp other2 = (Amp) other;
- return this.getStruct() == other2.getStruct();
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_pointf());
+ }
+ return this;
+ }
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
+
+ private Array(List<ST_pointf> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ST_pointf get(int i) {
+ return this.data.get(pos + i);
+ }
+
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
+ }
+
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
+ }
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
}
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setCString(CString value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
}
+ public static ST_pointf[] malloc(int nb) {
+ final ST_pointf result[] = new ST_pointf[nb];
+ for (int i = 0; i < nb; i++) {
+ result[i] = new ST_pointf();
+ }
+ return result;
+ }
+
+ public static ST_pointf[] realloc(ST_pointf[] old, int nb) {
+ if (nb <= old.length) {
+ return old;
+ }
+ final ST_pointf result[] = new ST_pointf[nb];
+ for (int i = 0; i < nb; i++) {
+ result[i] = i < old.length ? old[i] : new ST_pointf();
+ }
+ return result;
+ }
+
+ public ST_pointf() {
+ this(null);
+ }
+
+
@Override
- public __struct__ copy() {
+ public ST_pointf copy() {
final ST_pointf result = new ST_pointf();
result.x = this.x;
result.y = this.y;
@@ -121,28 +195,28 @@ public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruc
this.x = other2.x;
this.y = other2.y;
}
-
+
@Override
public void copyDataFrom(__ptr__ value) {
final ST_pointf other2 = (ST_pointf) value;
this.x = other2.x;
this.y = other2.y;
}
-
+
@Override
- public __struct__ getStruct() {
+ public ST_pointf getStruct() {
return this;
}
@Override
public void memcopyFrom(Area source) {
- if (source instanceof StarArrayOfPtr) {
- final Amp other2 = (Amp) ((StarArrayOfPtr) source).getPtr();
- this.x = other2.getX();
- this.y = other2.getY();
- return;
-
- }
+// if (source instanceof StarArrayOfPtr) {
+// final Amp other2 = (Amp) ((StarArrayOfPtr) source).getPtr();
+// this.x = other2.getX();
+// this.y = other2.getY();
+// return;
+//
+// }
final ST_pointf other2 = (ST_pointf) source;
this.x = other2.x;
this.y = other2.y;
@@ -157,22 +231,34 @@ public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruc
@Override
public void ____(__ptr__ other) {
- if (other instanceof __array_of_ptr__) {
- Amp other2 = (Amp) other.getPtr();
- this.x = other2.getX();
- this.y = other2.getY();
+ if (other instanceof ST_pointf.Array) {
+ ST_pointf.Array other2 = (ST_pointf.Array) other;
+ this.x = other2.get(0).x;
+ this.y = other2.get(0).y;
return;
}
- if (other instanceof StarArrayOfPtr) {
- Amp other2 = (Amp) other.getPtr();
- this.x = other2.getX();
- this.y = other2.getY();
- return;
- }
- if (other instanceof StarArrayOfStruct) {
- Amp other2 = (Amp) other.getPtr();
- this.x = other2.getX();
- this.y = other2.getY();
+// if (other instanceof __array_of_ptr__) {
+// Amp other2 = (Amp) other.getPtr();
+// this.x = other2.getX();
+// this.y = other2.getY();
+// return;
+// }
+// if (other instanceof StarArrayOfPtr) {
+// Amp other2 = (Amp) other.getPtr();
+// this.x = other2.getX();
+// this.y = other2.getY();
+// return;
+// }
+// if (other instanceof Amp) {
+// Amp other2 = (Amp) other;
+// this.x = other2.getX();
+// this.y = other2.getY();
+// return;
+// }
+ if (other instanceof ST_pointf) {
+ ST_pointf other2 = (ST_pointf) other;
+ this.x = other2.x;
+ this.y = other2.y;
return;
}
System.err.println("other=" + other.getClass());
@@ -188,22 +274,6 @@ public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruc
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("x")) {
- return x;
- }
- if (fieldName.equals("y")) {
- return y;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("x")) {
this.x = data;
@@ -219,27 +289,6 @@ public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruc
public ST_pointf(StarStruct parent) {
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_pointf>(nb, 0, ST_pointf.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
-
// public interface ST_pointf extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct pointf_s",
diff --git a/src/h/ST_pointnlink_t.java b/src/h/ST_pointnlink_t.java
index 12285b6..c8a9d57 100644
--- a/src/h/ST_pointnlink_t.java
+++ b/src/h/ST_pointnlink_t.java
@@ -46,20 +46,14 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarArrayOfStruct;
import smetana.core.amiga.StarStruct;
public class ST_pointnlink_t extends UnsupportedStructAndPtr implements HardcodedStruct {
- public ST_pointf.Amp pp;
- public ST_pointnlink_t.Amp link;
+ public ST_pointf pp;
+ public ST_pointnlink_t link;
public ST_pointnlink_t() {
this(null);
@@ -68,70 +62,17 @@ public class ST_pointnlink_t extends UnsupportedStructAndPtr implements Hardcode
public ST_pointnlink_t(StarStruct parent) {
}
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("pp")) {
- return pp;
- }
- if (fieldName.equals("link")) {
- return link;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __struct__ getStruct() {
- return ST_pointnlink_t.this;
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_pointnlink_t.this.setPtr(fieldName, newData);
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- ST_pointnlink_t.Amp other2 = (Amp) other;
- return this.getStruct() == other2.getStruct();
- }
-
- @Override
- public Class getRealClass() {
- return ST_pointnlink_t.class;
- }
-
- }
-
@Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("pp")) {
- return pp;
- }
- if (fieldName.equals("link")) {
- return link;
- }
- return super.getPtr(fieldName);
+ public boolean isSameThan(StarStruct other) {
+ ST_pointnlink_t other2 = (ST_pointnlink_t) other;
+ return this == other2;
}
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("pp")) {
- if (newData instanceof StarArrayOfPtr) {
- StarArrayOfPtr tmp = (StarArrayOfPtr) newData;
- ST_pointf data = (ST_pointf) tmp.getStruct();
- pp = (ST_pointf.Amp) data.amp();
- return pp;
- }
- if (newData instanceof StarArrayOfStruct) {
- StarArrayOfStruct tmp = (StarArrayOfStruct) newData;
- ST_pointf data = (ST_pointf) tmp.getStruct();
- pp = (ST_pointf.Amp) data.amp();
- return pp;
- }
System.err.println("newData1=" + newData.getClass());
- pp = (ST_pointf.Amp) newData;
+ pp = (ST_pointf) newData;
return pp;
}
if (fieldName.equals("link")) {
@@ -139,20 +80,8 @@ public class ST_pointnlink_t extends UnsupportedStructAndPtr implements Hardcode
link = null;
return link;
}
- if (newData instanceof StarArrayOfPtr) {
- StarArrayOfPtr tmp = (StarArrayOfPtr) newData;
- ST_pointnlink_t data = (ST_pointnlink_t) tmp.getStruct();
- link = (ST_pointnlink_t.Amp) data.amp();
- return link;
- }
- if (newData instanceof StarArrayOfStruct) {
- StarArrayOfStruct tmp = (StarArrayOfStruct) newData;
- ST_pointnlink_t data = (ST_pointnlink_t) tmp.getStruct();
- link = (ST_pointnlink_t.Amp) data.amp();
- return link;
- }
- if (newData instanceof ST_pointnlink_t.Amp) {
- ST_pointnlink_t.Amp tmp = (ST_pointnlink_t.Amp) newData;
+ if (newData instanceof ST_pointnlink_t) {
+ ST_pointnlink_t tmp = (ST_pointnlink_t) newData;
link = tmp;
return link;
}
@@ -162,62 +91,10 @@ public class ST_pointnlink_t extends UnsupportedStructAndPtr implements Hardcode
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_pointnlink_t>(nb, 0, ST_pointnlink_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
- };
- }
-
- @Override
- public __struct__ getStruct() {
+ public ST_pointnlink_t getStruct() {
return this;
}
- class StarStructAdaptor extends UnsupportedStarStruct {
- private final ST_pointnlink_t me;
-
- public StarStructAdaptor(ST_pointnlink_t me) {
- this.me = me;
- }
-
- @Override
- public boolean isSameThan(StarStruct other) {
- StarStructAdaptor other2 = (StarStructAdaptor) other;
- return this.me == other2.me;
- }
- }
-
- @Override
- public StarStruct getInternalData() {
- return new StarStructAdaptor(this);
- }
-
- public static size_t sizeof_starstar_empty(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return STStarArrayOfPointer.malloc(nb);
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
- };
- }
-
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct pointnlink_t",
// "{",
diff --git a/src/h/ST_polygon_t.java b/src/h/ST_polygon_t.java
index 621fbb3..89cf65d 100644
--- a/src/h/ST_polygon_t.java
+++ b/src/h/ST_polygon_t.java
@@ -46,10 +46,7 @@
package h;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedStruct {
@@ -61,7 +58,7 @@ public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedSt
public double distortion;
public double skew;
public int option;
- private StarArrayOfPtr vertices;
+ public ST_pointf.Array vertices;
// "pointf *vertices",
@@ -72,51 +69,7 @@ public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedSt
public ST_polygon_t(StarStruct parent) {
}
- public class Amp extends UnsupportedStarStruct {
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("regular")) {
- return regular != 0;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("peripheries")) {
- return peripheries;
- }
- if (fieldName.equals("sides")) {
- return sides;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("orientation")) {
- return orientation;
- }
- if (fieldName.equals("skew")) {
- return skew;
- }
- if (fieldName.equals("distortion")) {
- return distortion;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_polygon_t.this.getPtr(fieldName);
- }
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
@Override
public void setInt(String fieldName, int data) {
@@ -136,20 +89,6 @@ public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedSt
}
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("option")) {
- return option;
- }
- if (fieldName.equals("sides")) {
- return sides;
- }
- if (fieldName.equals("peripheries")) {
- return peripheries;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("orientation")) {
this.orientation = data;
@@ -166,33 +105,6 @@ public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedSt
super.setDouble(fieldName, data);
}
- private __ptr__ getVertices() {
- if (vertices == null) {
- return null;
- }
- throw new IllegalStateException();
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("vertices")) {
- return vertices;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("vertices") && newData == null) {
- this.vertices = null;
- return null;
- }
- if (fieldName.equals("vertices") && newData instanceof StarArrayOfPtr) {
- this.vertices = (StarArrayOfPtr) newData;
- return null;
- }
- return super.setPtr(fieldName, newData);
- }
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct polygon_t",
diff --git a/src/h/ST_port.java b/src/h/ST_port.java
index 1f84319..36092cf 100644
--- a/src/h/ST_port.java
+++ b/src/h/ST_port.java
@@ -47,7 +47,6 @@ package h;
import smetana.core.CString;
import smetana.core.HardcodedStruct;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -58,7 +57,7 @@ public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct
public final ST_pointf p = new ST_pointf(this);
public double theta;
- public ST_boxf.Amp bp;
+ public ST_boxf bp;
public int defined;
public int constrained;
public int clip;
@@ -135,14 +134,6 @@ public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct
}
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("p")) {
- return p;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public void setStruct(String fieldName, __struct__ newData) {
if (fieldName.equals("p")) {
p.copyDataFrom(newData);
@@ -152,26 +143,6 @@ public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct
}
@Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("constrained")) {
- return constrained != 0;
- }
- if (fieldName.equals("dyna")) {
- return dyna != 0;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("constrained")) {
- constrained = data ? 1 : 0;
- return;
- }
- super.setBoolean(fieldName, data);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("constrained")) {
constrained = data;
@@ -180,35 +151,6 @@ public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("clip")) {
- return clip;
- }
- if (fieldName.equals("order")) {
- return order;
- }
- if (fieldName.equals("side")) {
- return side;
- }
- return super.getInt(fieldName);
- }
-
- public class Amp extends UnsupportedStarStruct {
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("bp")) {
- return bp;
- }
- return super.getPtr(fieldName);
- }
@Override
public void setDouble(String fieldName, double data) {
@@ -219,14 +161,6 @@ public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct
super.setDouble(fieldName, data);
}
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("theta")) {
- return theta;
- }
- return super.getDouble(fieldName);
- }
-
// "typedef struct port",
// "{",
// "pointf p",
diff --git a/src/h/ST_rank_t.java b/src/h/ST_rank_t.java
index 13d98e5..1f33609 100644
--- a/src/h/ST_rank_t.java
+++ b/src/h/ST_rank_t.java
@@ -45,15 +45,14 @@
*/
package h;
+import java.util.ArrayList;
+import java.util.List;
+
import smetana.core.UnsupportedArrayOfPtr;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_rank_t extends UnsupportedStructAndPtr {
@@ -68,184 +67,136 @@ public class ST_rank_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- private int n;
+ public int n;
// "node_t **v",
- private STStarArrayOfPointer v;
- private int an;
+ public ST_Agnode_s.ArrayOfStar v;
+ public int an;
// "node_t **av",
- private STStarArrayOfPointer av;
+ public ST_Agnode_s.ArrayOfStar av;
- private double ht1, ht2;
- private double pht1, pht2;
- private boolean candidate;
- private int valid;
+ public double ht1, ht2;
+ public double pht1, pht2;
+ public boolean candidate;
+ public int valid;
- private int cache_nc;
- private ST_adjmatrix_t flat;
+ public int cache_nc;
+ public ST_adjmatrix_t flat;
// "}",
// "rank_t");
+
+
+ public static class Array2 extends UnsupportedArrayOfPtr implements __ptr__, __array_of_ptr__ {
- @Override
- public void setStruct(__struct__ value) {
- ST_rank_t this2 = (ST_rank_t) value;
- this.n = this2.n;
- this.v = this2.v;
- this.an = this2.an;
- this.av = this2.av;
- this.ht1 = this2.ht1;
- this.ht2 = this2.ht2;
- this.pht1 = this2.pht1;
- this.pht2 = this2.pht2;
- this.candidate = this2.candidate;
- this.valid = this2.valid;
- this.cache_nc = this2.cache_nc;
- this.flat = this2.flat;
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public int getInt(String fieldName) {
- return ST_rank_t.this.getInt(fieldName);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- return ST_rank_t.this.getArrayOfPtr(fieldName);
- }
+ private final List<ST_rank_t> data;
+ private final int pos;
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_rank_t.this.getPtr(fieldName);
+ public Array2(int size) {
+ this.data = new ArrayList<ST_rank_t>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_rank_t());
+ }
}
-
+
@Override
- public __struct__ getStruct() {
- return ST_rank_t.this.getStruct();
+ public void setInt(String fieldName, int data) {
+ getPtr().setInt(fieldName, data);
}
-
+
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- return ST_rank_t.this.setPtr(fieldName, newData);
+ return getPtr().setPtr(fieldName, newData);
}
-
+
@Override
- public void setBoolean(String fieldName, boolean data) {
- ST_rank_t.this.setBoolean(fieldName, data);
+ public void setDouble(String fieldName, double data) {
+ getPtr().setDouble(fieldName, data);
}
-
- @Override
- public boolean getBoolean(String fieldName) {
- return ST_rank_t.this.getBoolean(fieldName);
+
+ public ST_rank_t get(int i) {
+ return plus(i).getPtr();
}
-
- @Override
- public void setInt(String fieldName, int data) {
- ST_rank_t.this.setInt(fieldName, data);
+
+ public void swap(int i, int j) {
+ ST_rank_t e1 = data.get(i);
+ ST_rank_t e2 = data.get(j);
+ data.set(i, e2);
+ data.set(j, e1);
}
- @Override
- public double getDouble(String fieldName) {
- return ST_rank_t.this.getDouble(fieldName);
- }
-
- @Override
- public void setStruct(__struct__ value) {
- ST_rank_t.this.setStruct(value);
+ public Array2(List<ST_rank_t> data, int pos) {
+ this.data = data;
+ this.pos = pos;
}
-
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("v")) {
- return new ArrayOfPtr(v, 0);
+
+ public Array2 reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_rank_t());
+ }
+ return this;
}
- return super.getArrayOfPtr(fieldName);
- }
-
- static class ArrayOfPtr extends UnsupportedArrayOfPtr {
-
- private final int pos;
- private final STStarArrayOfPointer tab;
- private ArrayOfPtr(STStarArrayOfPointer tab, int pos) {
- this.pos = pos;
- this.tab = tab;
+ @Override
+ public Array2 plus(int delta) {
+ return new Array2(data, pos + delta);
}
-
+
@Override
- public __array_of_ptr__ plus(int delta) {
- return new ArrayOfPtr(tab, pos + delta);
+ public Array2 asPtr() {
+ return this;
}
@Override
public void setPtr(__ptr__ value) {
- tab.plus(pos).setPtr(value);
+// if (value instanceof Amp) {
+// value = value.getPtr();
+// }
+ this.data.set(pos, (ST_rank_t) value);
}
-
+
@Override
- public __ptr__ getPtr() {
- return tab.plus(pos).getPtr();
+ public ST_rank_t getPtr() {
+ return this.data.get(pos);
}
@Override
- public __ptr__ asPtr() {
- if (pos == 0) {
- return tab;
+ public int comparePointer(__ptr__ other) {
+ final Array2 this2 = (Array2) other;
+ if (this.data != this2.data) {
+ throw new IllegalArgumentException();
}
- return super.asPtr();
+ return this.pos - this2.pos;
}
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("n")) {
- return n;
- }
- if (fieldName.equals("an")) {
- return an;
- }
- if (fieldName.equals("cache_nc")) {
- return cache_nc;
+ public boolean isSameThan2(Array2 other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos == other.pos;
}
- return super.getInt(fieldName);
}
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("v")) {
- return v;
- }
- if (fieldName.equals("av")) {
- return av;
- }
- if (fieldName.equals("flat")) {
- return flat;
- }
- return super.getPtr(fieldName);
- }
@Override
- public void setBoolean(String fieldName, boolean data) {
- if (fieldName.equals("candidate")) {
- this.candidate = data;
- return;
- }
- if (fieldName.equals("valid")) {
- this.valid = data ? 1 : 0;
- return;
- }
- super.setBoolean(fieldName, data);
+ public void setStruct(__struct__ value) {
+ ST_rank_t this2 = (ST_rank_t) value;
+ this.n = this2.n;
+ this.v = this2.v;
+ this.an = this2.an;
+ this.av = this2.av;
+ this.ht1 = this2.ht1;
+ this.ht2 = this2.ht2;
+ this.pht1 = this2.pht1;
+ this.pht2 = this2.pht2;
+ this.candidate = this2.candidate;
+ this.valid = this2.valid;
+ this.cache_nc = this2.cache_nc;
+ this.flat = this2.flat;
}
+
@Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("n")) {
@@ -268,34 +219,6 @@ public class ST_rank_t extends UnsupportedStructAndPtr {
}
@Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("valid")) {
- return valid != 0;
- }
- if (fieldName.equals("candidate")) {
- return candidate;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("pht1")) {
- return pht1;
- }
- if (fieldName.equals("pht2")) {
- return pht2;
- }
- if (fieldName.equals("ht1")) {
- return ht1;
- }
- if (fieldName.equals("ht2")) {
- return ht2;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("pht1")) {
this.pht1 = data;
@@ -324,11 +247,11 @@ public class ST_rank_t extends UnsupportedStructAndPtr {
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("v")) {
- this.v = (STStarArrayOfPointer) newData;
+ this.v = (ST_Agnode_s.ArrayOfStar) newData;
return v;
}
if (fieldName.equals("av")) {
- this.av = (STStarArrayOfPointer) newData;
+ this.av = (ST_Agnode_s.ArrayOfStar) newData;
return av;
}
if (fieldName.equals("flat")) {
@@ -338,26 +261,26 @@ public class ST_rank_t extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_rank_t>(nb, 0, ST_rank_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
+// public static size_t sizeof(final int nb) {
+// return new UnsupportedSize_t(nb) {
+// @Override
+// public Array2 malloc() {
+// return new Array2(nb);
+// }
+//
+// @Override
+// public int getInternalNb() {
+// return nb;
+// }
+//
+// @Override
+// public Array2 realloc(Object old) {
+// Array2 old2 = (Array2) old;
+// old2.reallocJ(nb);
+// return old2;
+// }
+// };
+// }
}
diff --git a/src/h/ST_refstr_t.java b/src/h/ST_refstr_t.java
index 60b4831..7309653 100644
--- a/src/h/ST_refstr_t.java
+++ b/src/h/ST_refstr_t.java
@@ -47,74 +47,12 @@ package h;
import smetana.core.CString;
import smetana.core.OFFSET;
-import smetana.core.UnsupportedStarStruct;
-import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
-import smetana.core.amiga.StarStruct;
-public class ST_refstr_t extends UnsupportedStructAndPtr /* implements WithParent */{
+public class ST_refstr_t extends ST_dtlink_s /* implements WithParent */{
- public final ST_dtlink_s link = new ST_dtlink_s(this);
public int refcnt;
public CString s;
- private final StarStruct parent;
-
- public ST_refstr_t() {
- this(null);
- }
-
- public ST_refstr_t(StarStruct parent) {
- this.parent = parent;
- }
-
- @Override
- public void setInt(String fieldName, int data) {
- if (fieldName.equals("refcnt")) {
- this.refcnt = data;
- return;
- }
- super.setInt(fieldName, data);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("refcnt")) {
- return refcnt;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("s")) {
- return s;
- }
- return super.getPtr(fieldName);
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public Object addVirtualBytes(int virtualBytes) {
- if (virtualBytes == 0) {
- return this;
- }
- final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.refstr_t::s")) {
- return s;
- }
- System.err.println("virtualBytes=" + virtualBytes);
- System.err.println("offset=" + offset);
- return super.addVirtualBytes(virtualBytes);
- }
-
- }
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
@Override
public Object addVirtualBytes(int virtualBytes) {
@@ -122,7 +60,7 @@ public class ST_refstr_t extends UnsupportedStructAndPtr /* implements WithParen
return this;
}
final OFFSET offset = OFFSET.fromInt(virtualBytes);
- if (offset.toString().equals("h.refstr_t::s")) {
+ if (offset.toString().equals("h.ST_refstr_t::s")) {
return s;
}
System.err.println("virtualBytes=" + virtualBytes);
@@ -130,56 +68,22 @@ public class ST_refstr_t extends UnsupportedStructAndPtr /* implements WithParen
return super.addVirtualBytes(virtualBytes);
}
- @Override
- public __ptr__ castTo(Class dest) {
- // if (dest == refstr_t.class) {
- // return this;
- // }
- if (dest == _dtlink_s.class) {
- return link;
- }
- return super.castTo(dest);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("s")) {
- this.s = (CString) newData;
- this.s.setMyFather(this);
- return s;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public CString getCString(String fieldName) {
- if (fieldName.equals("s")) {
- return s;
- }
- return super.getCString(fieldName);
+ public void setString(CString newData) {
+ this.s = newData;
+ this.s.setParent(this);
}
public CString to_s(ST_dtlink_s from) {
- if (from == link) {
+// if (from == link) {
return s;
- }
- throw new IllegalArgumentException();
+// }
+// throw new IllegalArgumentException();
}
@Override
public Class getRealClass() {
- return refstr_t.class;
+ return ST_refstr_t.class;
}
-
- // public static List<String> DEFINITION = Arrays.asList(
- // "typedef struct refstr_t",
- // "{",
- // "Dtlink_t link",
- // "unsigned long refcnt",
- // "char *s",
- // "char store[1]",
- // "}",
- // "refstr_t");
}
// typedef struct refstr_t {
diff --git a/src/h/ST_shape_desc.java b/src/h/ST_shape_desc.java
index 0c3586b..b4de2df 100644
--- a/src/h/ST_shape_desc.java
+++ b/src/h/ST_shape_desc.java
@@ -61,8 +61,8 @@ public class ST_shape_desc extends UnsupportedStructAndPtr implements HardcodedS
}
public CString name;
- public ST_shape_functions.Amp fns;
- public ST_polygon_t.Amp polygon;
+ public ST_shape_functions fns;
+ public ST_polygon_t polygon;
public boolean usershape;
@Override
@@ -72,43 +72,16 @@ public class ST_shape_desc extends UnsupportedStructAndPtr implements HardcodedS
return newData;
}
if (fieldName.equals("fns")) {
- this.fns = (ST_shape_functions.Amp) newData;
+ this.fns = (ST_shape_functions) newData;
return newData;
}
if (fieldName.equals("polygon")) {
- this.polygon = (ST_polygon_t.Amp) newData;
+ this.polygon = (ST_polygon_t) newData;
return newData;
}
return super.setPtr(fieldName, newData);
}
- @Override
- public CString getCString(String fieldName) {
- if (fieldName.equals("name")) {
- return name;
- }
- return super.getCString(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("fns")) {
- return fns;
- }
- if (fieldName.equals("polygon")) {
- return polygon;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("usershape")) {
- return usershape;
- }
- return super.getBoolean(fieldName);
- }
-
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct shape_desc",
// "{",
diff --git a/src/h/ST_shape_functions.java b/src/h/ST_shape_functions.java
index 1245685..3efa332 100644
--- a/src/h/ST_shape_functions.java
+++ b/src/h/ST_shape_functions.java
@@ -46,7 +46,6 @@
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -66,47 +65,6 @@ public class ST_shape_functions extends UnsupportedStructAndPtr {
public ST_shape_functions(StarStruct parent) {
}
-
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_shape_functions.this.getPtr(fieldName);
- }
-
- @Override
- public Object call(String fieldName, Object... args) {
- return ((CFunction) getPtr(fieldName)).exe(args);
- }
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("initfn")) {
- return initfn;
- }
- if (fieldName.equals("freefn")) {
- return freefn;
- }
- if (fieldName.equals("portfn")) {
- return portfn;
- }
- if (fieldName.equals("insidefn")) {
- return insidefn;
- }
- if (fieldName.equals("pboxfn")) {
- return pboxfn;
- }
- if (fieldName.equals("codefn")) {
- return codefn;
- }
- return super.getPtr(fieldName);
- }
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
diff --git a/src/h/ST_splineInfo.java b/src/h/ST_splineInfo.java
index 44db831..4ae18c3 100644
--- a/src/h/ST_splineInfo.java
+++ b/src/h/ST_splineInfo.java
@@ -46,7 +46,6 @@
package h;
import smetana.core.CFunction;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.amiga.StarStruct;
@@ -66,24 +65,6 @@ public class ST_splineInfo extends UnsupportedStructAndPtr {
}
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- @Override
- public boolean getBoolean(String fieldName) {
- return ST_splineInfo.this.getBoolean(fieldName);
- }
-
- @Override
- public Object call(String fieldName, Object... args) {
- return ST_splineInfo.this.call(fieldName, args);
- }
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("swapEnds")) {
this.swapEnds = (CFunction) newData;
@@ -96,28 +77,6 @@ public class ST_splineInfo extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- @Override
- public Object call(String fieldName, Object... args) {
- if (fieldName.equals("swapEnds")) {
- return swapEnds.exe(args);
- }
- if (fieldName.equals("splineMerge")) {
- return splineMerge.exe(args);
- }
- return super.call(fieldName, args);
- }
-
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("ignoreSwap")) {
- return ignoreSwap;
- }
- if (fieldName.equals("isOrtho")) {
- return isOrtho;
- }
- return super.getBoolean(fieldName);
- }
-
// public interface ST_splineInfo extends __ptr__ {
// public static List<String> DEFINITION = Arrays.asList(
// "typedef struct",
diff --git a/src/h/ST_spline_info_t.java b/src/h/ST_spline_info_t.java
index 05dc735..3e2e221 100644
--- a/src/h/ST_spline_info_t.java
+++ b/src/h/ST_spline_info_t.java
@@ -45,10 +45,7 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_spline_info_t extends UnsupportedStructAndPtr {
@@ -63,68 +60,15 @@ public class ST_spline_info_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- // public static List<String> DEFINITION = Arrays.asList(
// "typedef struct",
// "{",
- private int LeftBound, RightBound, Splinesep, Multisep;
- private StarArrayOfPtr Rank_box;
+ public int LeftBound, RightBound, Splinesep, Multisep;
+ public ST_boxf Rank_box[];
// "}",
// "spline_info_t");
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
- @Override
- public int getInt(String fieldName) {
- return ST_spline_info_t.this.getInt(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- return ST_spline_info_t.this.getPtr(fieldName);
- }
-
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("Rank_box")) {
- this.Rank_box = (StarArrayOfPtr) newData;
- return this.Rank_box;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("Rank_box")) {
- return this.Rank_box;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("LeftBound")) {
- return this.LeftBound;
- }
- if (fieldName.equals("RightBound")) {
- return this.RightBound;
- }
- if (fieldName.equals("Splinesep")) {
- return this.Splinesep;
- }
- if (fieldName.equals("Multisep")) {
- return this.Multisep;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("LeftBound")) {
this.LeftBound = data;
diff --git a/src/h/ST_splines.java b/src/h/ST_splines.java
index aca80e3..ee93330 100644
--- a/src/h/ST_splines.java
+++ b/src/h/ST_splines.java
@@ -45,11 +45,7 @@
*/
package h;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__ptr__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_splines extends UnsupportedStructAndPtr {
@@ -64,20 +60,11 @@ public class ST_splines extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct splines",
// "{",
// bezier *list;
- private StarArrayOfPtr list;
- private int size;
+ public ST_bezier.Array2 list;
+ public int size;
// "boxf bb",
// "}",
@@ -92,38 +79,6 @@ public class ST_splines extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("size")) {
- return this.size;
- }
- return super.getInt(fieldName);
- }
-
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (fieldName.equals("list")) {
- this.list = (StarArrayOfPtr) newData;
- return list;
- }
- return super.setPtr(fieldName, newData);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("list")) {
- return this.list;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- if (fieldName.equals("list")) {
- return this.list.getInternalArray();
- }
- return super.getArrayOfPtr(fieldName);
- }
}
// typedef struct splines {
diff --git a/src/h/ST_tedge_t.java b/src/h/ST_tedge_t.java
index 09806aa..e646dc7 100644
--- a/src/h/ST_tedge_t.java
+++ b/src/h/ST_tedge_t.java
@@ -45,18 +45,8 @@
*/
package h;
-import h.ST_Agclos_s.ArrayOfThreePtrDict_t;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import smetana.core.UnsupportedArrayOfPtr;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
-import smetana.core.amiga.Area;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_tedge_t extends UnsupportedStructAndPtr {
@@ -71,45 +61,34 @@ public class ST_tedge_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct tedge_t",
// "{",
- private __ptr__ pnl0p;
- private __ptr__ pnl1p;
- // private ST_pointnlink_t.Amp pnl0p;
- // private ST_pointnlink_t.Amp pnl1p;
+ public ST_pointnlink_t pnl0p;
+ public ST_pointnlink_t pnl1p;
+
+ public ST_triangle_t.Array lrp;
+ public ST_triangle_t.Array rtp;
- private StarArrayOfPtr ltp;
- private StarArrayOfPtr rtp;
+ // public StarArrayOfPtr ltp;
+ // public StarArrayOfPtr rtp;
// "struct triangle_t *ltp",
// "struct triangle_t *rtp",
// "}",
// "tedge_t");
+
@Override
- public __ptr__ getPtr(String fieldName) {
+ public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("pnl0p")) {
+ this.pnl0p = ((ST_pointnlink_t) newData);
return this.pnl0p;
}
if (fieldName.equals("pnl1p")) {
+ this.pnl1p = ((ST_pointnlink_t) newData);
return this.pnl1p;
}
- if (fieldName.equals("ltp")) {
- return this.ltp;
- }
- if (fieldName.equals("rtp")) {
- return this.rtp;
- }
- return super.getPtr(fieldName);
+ return super.setPtr(fieldName, newData);
}
// class Singleton extends UnsupportedArrayOfPtr implements __array_of_ptr__ {
@@ -153,49 +132,6 @@ public class ST_tedge_t extends UnsupportedStructAndPtr {
//
// }
- @Override
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- // if (fieldName.equals("pnl0p")) {
- // this.pnl0p = (ST_pointnlink_t.Amp) newData;
- // return this.pnl0p;
- // }
- if (fieldName.equals("pnl0p")) {
- if (newData instanceof ST_pointnlink_t.Amp) {
- this.pnl0p = (ST_pointnlink_t.Amp) newData;
- // newData = new StarArrayOfPtr(new Singleton((h.ST_pointnlink_t.Amp) newData));
- } else {
- this.pnl0p = (StarArrayOfPtr) newData;
- }
- return this.pnl0p;
- }
- if (fieldName.equals("pnl1p")) {
- if (newData instanceof ST_pointnlink_t.Amp) {
- // newData = new StarArrayOfPtr(new Singleton((h.ST_pointnlink_t.Amp) newData));
- this.pnl1p = (ST_pointnlink_t.Amp) newData;
- } else {
- this.pnl1p = (StarArrayOfPtr) newData;
- }
- return this.pnl1p;
- }
- // if (fieldName.equals("pnl1p")) {
- // this.pnl1p = (ST_pointnlink_t.Amp) newData;
- // return this.pnl1p;
- // }
- if (fieldName.equals("ltp")) {
- this.ltp = (StarArrayOfPtr) newData;
- return this.ltp;
- }
- if (fieldName.equals("rtp")) {
- this.rtp = (StarArrayOfPtr) newData;
- return this.rtp;
- }
- return super.setPtr(fieldName, newData);
- }
-
- public String foo(StarArrayOfPtr data) {
- __array_of_ptr__ array = data.getInternalArray();
- return array.toString();
- }
}
// typedef struct tedge_t {
diff --git a/src/h/ST_textlabel_t.java b/src/h/ST_textlabel_t.java
index ab15a47..069749e 100644
--- a/src/h/ST_textlabel_t.java
+++ b/src/h/ST_textlabel_t.java
@@ -46,7 +46,6 @@
package h;
import smetana.core.CString;
-import smetana.core.UnsupportedStarStruct;
import smetana.core.UnsupportedStructAndPtr;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -64,60 +63,38 @@ public class ST_textlabel_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- private CString text, fontname, fontcolor;
- private int charset;
- private double fontsize;
+ public CString text, fontname, fontcolor;
+ public int charset;
+ public double fontsize;
- private final ST_pointf dimen = new ST_pointf(this);
- private final ST_pointf space = new ST_pointf(this);
- private final ST_pointf pos = new ST_pointf(this);
+ public final ST_pointf dimen = new ST_pointf(this);
+ public final ST_pointf space = new ST_pointf(this);
+ public final ST_pointf pos = new ST_pointf(this);
// "union",
// "{",
// "struct",
// "{",
// private ST_textspan_t span;
- private __ptr__ span;
- private int nspans;
+ public ST_textspan_t.Array span;
+ public int nspans;
// "}",
// "txt",
// "htmllabel_t *html",
- private final __ptr__ html = null;
+ public final __ptr__ html__ = null;
// "}",
// "u",
- private int valign;
+ public int valign;
- private int set;
+ public int set;
+ public boolean html;
// "boolean html",
// "}",
// "textlabel_t");
@Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("dimen")) {
- return dimen;
- }
- if (fieldName.equals("space")) {
- return space;
- }
- if (fieldName.equals("pos")) {
- return pos;
- }
- return super.getStruct(fieldName);
- }
-
- @Override
public void setStruct(String fieldName, __struct__ newData) {
if (fieldName.equals("space")) {
space.copyDataFrom(newData);
@@ -145,46 +122,13 @@ public class ST_textlabel_t extends UnsupportedStructAndPtr {
return fontcolor;
}
if (fieldName.equals("u.txt.span")) {
- this.span = newData;
+ this.span = (ST_textspan_t.Array) newData;
return span;
}
return super.setPtr(fieldName, newData);
}
@Override
- public CString getCString(String fieldName) {
- if (fieldName.equals("text")) {
- return text;
- }
- return super.getCString(fieldName);
- }
-
- @Override
- public __ptr__ getPtr(String fieldName) {
- if (fieldName.equals("text")) {
- return text;
- }
- if (fieldName.equals("u.txt.span")) {
- return span;
- }
- if (fieldName.equals("fontname")) {
- return fontname;
- }
- return super.getPtr(fieldName);
- }
-
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("html")) {
- return html != null;
- }
- if (fieldName.equals("set")) {
- return set != 0;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("fontsize")) {
this.fontsize = data;
@@ -194,14 +138,6 @@ public class ST_textlabel_t extends UnsupportedStructAndPtr {
}
@Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("fontsize")) {
- return this.fontsize;
- }
- return super.getDouble(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("charset")) {
this.charset = data;
@@ -215,18 +151,13 @@ public class ST_textlabel_t extends UnsupportedStructAndPtr {
this.nspans = data;
return;
}
- super.setInt(fieldName, data);
- }
-
- @Override
- public void setBoolean(String fieldName, boolean data) {
if (fieldName.equals("set")) {
- this.set = data ? 1 : 0;
+ this.set = data;
return;
}
- super.setBoolean(fieldName, data);
+ super.setInt(fieldName, data);
}
-
+
@Override
public boolean isSameThan(StarStruct other) {
ST_textlabel_t other2 = (ST_textlabel_t) other;
@@ -234,23 +165,6 @@ public class ST_textlabel_t extends UnsupportedStructAndPtr {
}
- @Override
- public int getInt(String fieldName) {
- if (fieldName.equals("charset")) {
- return this.charset;
- }
- if (fieldName.equals("valign")) {
- return this.valign;
- }
- if (fieldName.equals("u.txt.nspans")) {
- return this.nspans;
- }
- if (fieldName.equals("set")) {
- return this.set;
- }
- return super.getInt(fieldName);
- }
-
}
// typedef struct textlabel_t {
diff --git a/src/h/ST_textspan_t.java b/src/h/ST_textspan_t.java
index 1a9c651..dcf4a39 100644
--- a/src/h/ST_textspan_t.java
+++ b/src/h/ST_textspan_t.java
@@ -45,16 +45,19 @@
*/
package h;
+import java.util.ArrayList;
+import java.util.List;
+
import smetana.core.CString;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
+// UNUSED ?
public class ST_textspan_t extends UnsupportedStructAndPtr {
private final StarStruct parent;
@@ -67,32 +70,100 @@ public class ST_textspan_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- private CString str;
+ public CString str;
// "textfont_t *font",
// "void *layout",
// "void (*free_layout) (void *layout)",
// "double yoffset_layout, yoffset_centerline",
- private final ST_pointf size = new ST_pointf(this);
- private int just;
+ public final ST_pointf size = new ST_pointf(this);
+ public int just;
- @Override
- public StarStruct amp() {
- return new Amp();
- }
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__{
- public class Amp extends UnsupportedStarStruct {
+ private final List<ST_textspan_t> data;
+ private final int pos;
+
+ @Override
+ public __ptr__ setPtr(String fieldName, __ptr__ data) {
+ return getStruct().setPtr(fieldName, data);
+ }
+
+ @Override
+ public void setInt(String fieldName, int data) {
+ getStruct().setInt(fieldName, data);
+ }
+
+ @Override
+ public void setStruct(String fieldName, __struct__ data) {
+ getStruct().setStruct(fieldName, data);
+ }
+
+ @Override
+ public Array asPtr() {
+ return this;
+ }
+
+ @Override
+ public ST_textspan_t getStruct() {
+ return data.get(pos);
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_textspan_t>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_textspan_t());
+ }
+ }
- }
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_textspan_t());
+ }
+ return this;
+ }
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
- @Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("size")) {
- return size;
+ private Array(List<ST_textspan_t> data, int pos) {
+ this.data = data;
+ this.pos = pos;
+ }
+
+ public ST_textspan_t get(int i) {
+ return this.data.get(pos + i);
+ }
+
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
+ }
+
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
}
- return super.getStruct(fieldName);
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
}
+
@Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("just")) {
@@ -103,14 +174,6 @@ public class ST_textspan_t extends UnsupportedStructAndPtr {
}
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("just")) {
- return this.just;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("str")) {
this.str = (CString) newData;
@@ -119,27 +182,6 @@ public class ST_textspan_t extends UnsupportedStructAndPtr {
return super.setPtr(fieldName, newData);
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_textspan_t>(nb, 0, ST_textspan_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
-
}
// typedef struct {
diff --git a/src/h/ST_tna_t.java b/src/h/ST_tna_t.java
index f2c74d8..9d75f9d 100644
--- a/src/h/ST_tna_t.java
+++ b/src/h/ST_tna_t.java
@@ -45,21 +45,15 @@
*/
package h;
-import h.ST_tna_t.Amp;
-import h.ST_triangle_t.ArrayOfThree;
-
-import java.util.Arrays;
+import java.util.ArrayList;
import java.util.List;
-import smetana.core.UnsupportedArrayOfStruct;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_struct__;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_tna_t extends UnsupportedStructAndPtr {
@@ -74,69 +68,85 @@ public class ST_tna_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct tna_t",
// "{",
// "Ppoint_t a[2]",
// "}",
// "tna_t");
- private double t;
- private final ST_pointf a[] = new ST_pointf[] { new ST_pointf(), new ST_pointf() };
-
- class ArrayOfTwo extends UnsupportedArrayOfStruct {
+ public double t;
+ public final ST_pointf a[] = new ST_pointf[] { new ST_pointf(), new ST_pointf() };
+
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__{
+
+ private final List<ST_tna_t> data;
+ private final int pos;
+
+
+ @Override
+ public Array asPtr() {
+ return this;
+ }
+
+ @Override
+ public ST_tna_t getStruct() {
+ return data.get(pos);
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_tna_t>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_tna_t());
+ }
+ }
- final private int pos;
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_tna_t());
+ }
+ return this;
+ }
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
- public ArrayOfTwo(int pos) {
+ private Array(List<ST_tna_t> data, int pos) {
+ this.data = data;
this.pos = pos;
}
- @Override
- public __array_of_struct__ plus(int delta) {
- return new ArrayOfTwo(pos + delta);
+ public ST_tna_t get(int i) {
+ return this.data.get(pos + i);
}
- @Override
- public __struct__ getStruct() {
- return a[pos];
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
}
- @Override
- public void setStruct(__struct__ value) {
- a[pos].copyDataFrom(value);
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
}
- @Override
- public double getDouble(String fieldName) {
- return getStruct().getDouble(fieldName);
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
}
- }
-
- @Override
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- if (fieldName.equals("a")) {
- return new ArrayOfTwo(0);
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
}
- return super.getArrayOfStruct(fieldName);
- }
- @Override
- public double getDouble(String fieldName) {
- if (fieldName.equals("t")) {
- return this.t;
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
}
- return super.getDouble(fieldName);
+
+
}
+
@Override
public void setDouble(String fieldName, double data) {
if (fieldName.equals("t")) {
@@ -151,27 +161,6 @@ public class ST_tna_t extends UnsupportedStructAndPtr {
return this;
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_tna_t>(nb, 0, ST_tna_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
-
}
// typedef struct tna_t {
diff --git a/src/h/ST_triangle_t.java b/src/h/ST_triangle_t.java
index b3eb359..248b2a4 100644
--- a/src/h/ST_triangle_t.java
+++ b/src/h/ST_triangle_t.java
@@ -45,15 +45,10 @@
*/
package h;
-import h.ST_pathend_t.ArrayOfTwenty;
-import smetana.core.UnsupportedArrayOfStruct;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import java.util.ArrayList;
+import java.util.List;
+
import smetana.core.UnsupportedStructAndPtr;
-import smetana.core.__array_of_struct__;
-import smetana.core.__struct__;
-import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_triangle_t extends UnsupportedStructAndPtr {
@@ -68,64 +63,59 @@ public class ST_triangle_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
+ public static class Array {
- }
+ private final List<ST_triangle_t> data;
+ private final int pos;
- // "typedef struct triangle_t",
- // "{",
- private int mark;
-
- private final ST_tedge_t e[] = new ST_tedge_t[] { new ST_tedge_t(), new ST_tedge_t(), new ST_tedge_t() };
-
- class ArrayOfThree extends UnsupportedArrayOfStruct {
-
- final private int pos;
+ public Array(int size) {
+ this.data = new ArrayList<ST_triangle_t>();
+ this.pos = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_triangle_t());
+ }
+ }
- public ArrayOfThree(int pos) {
- this.pos = pos;
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_triangle_t());
+ }
+ return this;
}
- @Override
- public __array_of_struct__ plus(int delta) {
- return new ArrayOfThree(pos + delta);
+ private Array(List<ST_triangle_t> data, int pos) {
+ this.data = data;
+ this.pos = pos;
}
- @Override
- public __struct__ getStruct() {
- return e[pos];
+ public ST_triangle_t get(int i) {
+ return this.data.get(pos + i);
}
- @Override
- public void setStruct(__struct__ value) {
- e[pos].copyDataFrom(value);
+ public Array plusJ(int i) {
+ return new Array(data, pos + i);
}
- @Override
- public double getDouble(String fieldName) {
- return getStruct().getDouble(fieldName);
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos - other.pos;
}
}
+ // "typedef struct triangle_t",
+ // "{",
+ public int mark;
+
+ public final ST_tedge_t e[] = new ST_tedge_t[] { new ST_tedge_t(), new ST_tedge_t(), new ST_tedge_t() };
+
// "struct tedge_t e[3]",
// "}",
// "triangle_t");
@Override
- public int getInt(String fieldName) {
- if (fieldName.equals("mark")) {
- return this.mark;
- }
- return super.getInt(fieldName);
- }
-
- @Override
public void setInt(String fieldName, int data) {
if (fieldName.equals("mark")) {
this.mark = data;
@@ -134,43 +124,6 @@ public class ST_triangle_t extends UnsupportedStructAndPtr {
super.setInt(fieldName, data);
}
- @Override
- public boolean getBoolean(String fieldName) {
- if (fieldName.equals("mark")) {
- return this.mark != 0;
- }
- return super.getBoolean(fieldName);
- }
-
- @Override
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- if (fieldName.equals("e")) {
- return new ArrayOfThree(0);
- }
- return super.getArrayOfStruct(fieldName);
- }
-
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_triangle_t>(nb, 0, ST_triangle_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
-
}
// typedef struct triangle_t {
diff --git a/src/h/ST_xlabel_t.java b/src/h/ST_xlabel_t.java
index dbd1b13..ffaee08 100644
--- a/src/h/ST_xlabel_t.java
+++ b/src/h/ST_xlabel_t.java
@@ -45,13 +45,15 @@
*/
package h;
-import smetana.core.UnsupportedSize_t;
-import smetana.core.UnsupportedStarStruct;
+import java.util.ArrayList;
+import java.util.List;
+
+import smetana.core.UnsupportedArrayOfStruct2;
import smetana.core.UnsupportedStructAndPtr;
+import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
import smetana.core.size_t;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class ST_xlabel_t extends UnsupportedStructAndPtr {
@@ -66,27 +68,109 @@ public class ST_xlabel_t extends UnsupportedStructAndPtr {
this.parent = parent;
}
- @Override
- public StarStruct amp() {
- return new Amp();
- }
-
- public class Amp extends UnsupportedStarStruct {
-
- }
-
// "typedef struct",
// "{",
- final private ST_pointf sz = new ST_pointf(this);
- final private ST_pointf pos = new ST_pointf(this);
+ final public ST_pointf sz = new ST_pointf(this);
+ final public ST_pointf pos = new ST_pointf(this);
// "void *lbl",
- private ST_textlabel_t lbl;
- private int set;
+ public ST_textlabel_t lbl;
+ public int set;
// "unsigned char set",
// "}",
// "xlabel_t");
+
+ public static class Array extends UnsupportedArrayOfStruct2 implements __ptr__, __array_of_ptr__{
+
+ private final List<ST_xlabel_t> data;
+ private final int pos_;
+
+ @Override
+ public void setInt(String fieldName, int data) {
+ get(0).setInt(fieldName, data);
+ }
+
+ @Override
+ public void setStruct(__struct__ value) {
+ get(0).___(value);
+ }
+
+ @Override
+ public Array asPtr() {
+ return this;
+ }
+
+ @Override
+ public void setDouble(String fieldName, double value) {
+ get(0).setDouble(fieldName, value);
+ }
+
+ @Override
+ public ST_xlabel_t getStruct() {
+ return get(0).getStruct();
+ }
+
+ @Override
+ public __ptr__ getPtr() {
+ return get(0);
+ }
+
+ public Array(int size) {
+ this.data = new ArrayList<ST_xlabel_t>();
+ this.pos_ = 0;
+ for (int i = 0; i < size; i++) {
+ data.add(new ST_xlabel_t());
+ }
+ }
+
+ public Array reallocJ(int newsize) {
+ while (data.size() < newsize) {
+ data.add(new ST_xlabel_t());
+ }
+ return this;
+ }
+
+ public Array plus(int delta) {
+ return plusJ(delta);
+ }
+
+ private Array(List<ST_xlabel_t> data, int pos) {
+ this.data = data;
+ this.pos_ = pos;
+ }
+
+ public ST_xlabel_t get(int i) {
+ return this.data.get(pos_ + i);
+ }
+
+ public Array plusJ(int i) {
+ return new Array(data, pos_ + i);
+ }
+
+ public int minus(Array other) {
+ if (this.data != other.data) {
+ throw new IllegalArgumentException();
+ }
+ return this.pos_ - other.pos_;
+ }
+
+ public Array move(int delta) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
+ public void realloc(size_t nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointerInternal(__array_of_ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
+ }
+
@Override
public void setInt(String fieldName, int data) {
@@ -96,7 +180,7 @@ public class ST_xlabel_t extends UnsupportedStructAndPtr {
}
super.setInt(fieldName, data);
}
-
+
@Override
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
if (fieldName.equals("lbl")) {
@@ -105,16 +189,10 @@ public class ST_xlabel_t extends UnsupportedStructAndPtr {
}
return super.setPtr(fieldName, newData);
}
-
+
@Override
- public __struct__ getStruct(String fieldName) {
- if (fieldName.equals("sz")) {
- return this.sz;
- }
- if (fieldName.equals("pos")) {
- return this.pos;
- }
- return super.getStruct(fieldName);
+ public ST_xlabel_t getStruct() {
+ return this;
}
@Override
@@ -130,26 +208,26 @@ public class ST_xlabel_t extends UnsupportedStructAndPtr {
super.setStruct(fieldName, newData);
}
- public static size_t sizeof(final int nb) {
- return new UnsupportedSize_t(nb) {
- @Override
- public Object malloc() {
- return new StarArrayOfPtr(new STArray<ST_xlabel_t>(nb, 0, ST_xlabel_t.class));
- }
-
- @Override
- public int getInternalNb() {
- return nb;
- }
-
- @Override
- public Object realloc(Object old) {
- StarArrayOfPtr old2 = (StarArrayOfPtr) old;
- old2.realloc(nb);
- return old2;
- }
- };
- }
+// public static size_t sizeof(final int nb) {
+// return new UnsupportedSize_t(nb) {
+// @Override
+// public Object malloc() {
+// return new StarArrayOfPtr(new STArray<ST_xlabel_t>(nb, 0, ST_xlabel_t.class));
+// }
+//
+// @Override
+// public int getInternalNb() {
+// return nb;
+// }
+//
+// @Override
+// public Object realloc(Object old) {
+// StarArrayOfPtr old2 = (StarArrayOfPtr) old;
+// old2.realloc(nb);
+// return old2;
+// }
+// };
+// }
}
diff --git a/src/h/SplitQ_t.java b/src/h/SplitQ_t.java
deleted file mode 100644
index 99bd3c3..0000000
--- a/src/h/SplitQ_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5la7qmeq461s77rfwh637x31k
-
-public interface SplitQ_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct split_q_s",
-"{",
-"struct Branch BranchBuf[64 + 1]",
-"struct Rect CoverSplit",
-"unsigned int CoverSplitArea",
-"struct PartitionVars Partitions[1]",
-"}",
-"SplitQ_t");
-}
-
-// typedef struct split_q_s {
-// struct Branch BranchBuf[64 + 1];
-// struct Rect CoverSplit;
-// unsigned int CoverSplitArea;
-// struct PartitionVars Partitions[1];
-// } SplitQ_t; \ No newline at end of file
diff --git a/src/h/XLabels_t.java b/src/h/XLabels_t.java
deleted file mode 100644
index 402e117..0000000
--- a/src/h/XLabels_t.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5g5jopfxwib4iq0tncmxengai
-
-public interface XLabels_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct XLabels_s",
-"{",
-"object_t *objs",
-"int n_objs",
-"xlabel_t *lbls",
-"int n_lbls",
-"label_params_t *params",
-"Dt_t *hdx",
-"RTree_t *spdx",
-"}",
-"XLabels_t");
-}
-
-// typedef struct XLabels_s {
-// object_t *objs;
-// int n_objs;
-// xlabel_t *lbls;
-// int n_lbls;
-// label_params_t *params;
-//
-// Dt_t *hdx; // splay tree keyed with hilbert spatial codes
-// RTree_t *spdx; // rtree
-//
-// } XLabels_t; \ No newline at end of file
diff --git a/src/h/_Node_t___.java b/src/h/_Node_t___.java
deleted file mode 100644
index 388c425..0000000
--- a/src/h/_Node_t___.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 aqoki3wwzhqcy2mpz21vzdona
-
-public interface _Node_t___ extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Node",
-"{",
-"int count",
-"int level",
-"struct Branch branch[64]",
-"}",
-"Node_t");
-}
-
-// typedef struct Node {
-// int count;
-// int level; /* 0 is leaf, others positive */
-// struct Branch branch[64];
-// } Node_t; \ No newline at end of file
diff --git a/src/h/_dt_s.java b/src/h/_dt_s.java
deleted file mode 100644
index 12be796..0000000
--- a/src/h/_dt_s.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 926gualwyh744kklf86qw5qsj
-
-public interface _dt_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct _dt_s",
-"{",
-"Dtsearch_f searchf",
-"Dtdisc_t* disc",
-"Dtdata_t* data",
-"Dtmemory_f memoryf",
-"Dtmethod_t* meth",
-"int type",
-"int nview",
-"Dt_t* view",
-"Dt_t* walk",
-"void* user",
-"}");
-}
-
-// struct _dt_s
-// { Dtsearch_f searchf;/* search function */
-// Dtdisc_t* disc; /* method to manipulate objs */
-// Dtdata_t* data; /* sharable data */
-// Dtmemory_f memoryf;/* function to alloc/free memory */
-// Dtmethod_t* meth; /* dictionary method */
-// int type; /* type information */
-// int nview; /* number of parent view dictionaries */
-// Dt_t* view; /* next on viewpath */
-// Dt_t* walk; /* dictionary being walked */
-// void* user; /* for user's usage */
-// }; \ No newline at end of file
diff --git a/src/h/_dtdata_s.java b/src/h/_dtdata_s.java
deleted file mode 100644
index 0cb395a..0000000
--- a/src/h/_dtdata_s.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2ncfjhm10yijctdn20pwnelos
-
-public interface _dtdata_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct _dtdata_s",
-"{",
-"int type",
-"Dtlink_t* here",
-"union",
-"{",
-"Dtlink_t** _htab",
-"Dtlink_t* _head",
-"}",
-"hh",
-"int ntab",
-"int size",
-"int loop",
-"int minp",
-"}");
-}
-
-// struct _dtdata_s
-// { int type; /* type of dictionary */
-// Dtlink_t* here; /* finger to last search element */
-// union
-// { Dtlink_t** _htab; /* hash table */
-// Dtlink_t* _head; /* linked list */
-// } hh;
-// int ntab; /* number of hash slots */
-// int size; /* number of objects */
-// int loop; /* number of nested loops */
-// int minp; /* min path before splay, always even */
-// /* for hash dt, > 0: fixed table size */
-// }; \ No newline at end of file
diff --git a/src/h/_dtdisc_s.java b/src/h/_dtdisc_s.java
deleted file mode 100644
index 3bd7e79..0000000
--- a/src/h/_dtdisc_s.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 7uiwhqnseej0oaqiv35vi47k1
-
-public interface _dtdisc_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct _dtdisc_s",
-"{",
-"int key",
-"int size",
-"int link",
-"Dtmake_f makef",
-"Dtfree_f freef",
-"Dtcompar_f comparf",
-"Dthash_f hashf",
-"Dtmemory_f memoryf",
-"Dtevent_f eventf",
-"}");
-}
-
-// struct _dtdisc_s
-// { int key; /* where the key begins in an object */
-// int size; /* key size and type */
-// int link; /* offset to Dtlink_t field */
-// Dtmake_f makef; /* object constructor */
-// Dtfree_f freef; /* object destructor */
-// Dtcompar_f comparf;/* to compare two objects */
-// Dthash_f hashf; /* to compute hash value of an object */
-// Dtmemory_f memoryf;/* to allocate/free memory */
-// Dtevent_f eventf; /* to process events */
-// }; \ No newline at end of file
diff --git a/src/h/_dthold_s.java b/src/h/_dthold_s.java
deleted file mode 100644
index a33c625..0000000
--- a/src/h/_dthold_s.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 bj5vks4vb3mb95f68v6qwe1q
-
-public interface _dthold_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct _dthold_s",
-"{",
-"Dtlink_t hdr",
-"void* obj",
-"}");
-}
-
-// struct _dthold_s
-// { Dtlink_t hdr; /* header */
-// void* obj; /* user object */
-// }; \ No newline at end of file
diff --git a/src/h/_dtlink_s.java b/src/h/_dtlink_s.java
deleted file mode 100644
index 12dba24..0000000
--- a/src/h/_dtlink_s.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 6b881ar4wz3iwu5spghy0ocnj
-
-public interface _dtlink_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct _dtlink_s",
-"{",
-"Dtlink_t* right",
-"union",
-"{",
-"unsigned int _hash",
-"Dtlink_t* _left",
-"}",
-"hl",
-"}");
-}
-
-// struct _dtlink_s
-// { Dtlink_t* right; /* right child */
-// union
-// { unsigned int _hash; /* hash value */
-// Dtlink_t* _left; /* left child */
-// } hl;
-// }; \ No newline at end of file
diff --git a/src/h/_dtmethod_s.java b/src/h/_dtmethod_s.java
deleted file mode 100644
index 2375484..0000000
--- a/src/h/_dtmethod_s.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4djfx98e5oxk0jjryvk4600wt
-
-public interface _dtmethod_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct _dtmethod_s",
-"{",
-"Dtsearch_f searchf",
-"int type",
-"}");
-}
-
-// struct _dtmethod_s
-// { Dtsearch_f searchf; /* search function */
-// int type; /* type of operation */
-// }; \ No newline at end of file
diff --git a/src/h/aag_buffer_state.java b/src/h/aag_buffer_state.java
deleted file mode 100644
index c869b87..0000000
--- a/src/h/aag_buffer_state.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 e7lgo132acoi1iqay15jxdzl9
-
-public interface aag_buffer_state extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct aag_buffer_state *YY_BUFFER_STATE");
-}
-
-// typedef struct aag_buffer_state *YY_BUFFER_STATE; \ No newline at end of file
diff --git a/src/h/aag_trans_info.java b/src/h/aag_trans_info.java
deleted file mode 100644
index 5a25dfa..0000000
--- a/src/h/aag_trans_info.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8hrh4p1c1600bqkq54h8v51u7
-
-public interface aag_trans_info extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct aag_trans_info",
-"{",
-"flex_int32_t aag_verify",
-"flex_int32_t aag_nxt",
-"}");
-}
-
-// struct aag_trans_info
-// {
-// flex_int32_t aag_verify;
-// flex_int32_t aag_nxt;
-// }; \ No newline at end of file
diff --git a/src/h/adjmatrix_t.java b/src/h/adjmatrix_t.java
deleted file mode 100644
index 3de4a60..0000000
--- a/src/h/adjmatrix_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 lba1kw4oxusponhglgarjnj1
-
-public interface adjmatrix_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct adjmatrix_t",
-"{",
-"int nrows, ncols",
-"char *data",
-"}",
-"adjmatrix_t");
-}
-
-// typedef struct adjmatrix_t {
-// int nrows, ncols;
-// char *data;
-// } adjmatrix_t; \ No newline at end of file
diff --git a/src/h/agerrlevel_t.java b/src/h/agerrlevel_t.java
deleted file mode 100644
index bbd97c7..0000000
--- a/src/h/agerrlevel_t.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 eplx3pd5fkm68aeae4k6rwmj7
-
-public interface agerrlevel_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"AGWARN, AGERR, AGMAX, AGPREV",
-"}",
-"agerrlevel_t");
-}
-
-// typedef enum { AGWARN, AGERR, AGMAX, AGPREV } agerrlevel_t; \ No newline at end of file
diff --git a/src/h/agobjsearchfn_t.java b/src/h/agobjsearchfn_t.java
deleted file mode 100644
index 9d1170f..0000000
--- a/src/h/agobjsearchfn_t.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 dr9rtwhzssf8aypcenb0z3tfy
-
-public interface agobjsearchfn_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef Agobj_t *(*agobjsearchfn_t) (Agraph_t * g, Agobj_t * obj)");
-}
-
-// typedef Agobj_t *(*agobjsearchfn_t) (Agraph_t * g, Agobj_t * obj); \ No newline at end of file
diff --git a/src/h/ainfo.java b/src/h/ainfo.java
deleted file mode 100644
index 86d664e..0000000
--- a/src/h/ainfo.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 aqlnras6a8pluk7ulr2jzajlz
-
-public interface ainfo extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"double width, height",
-"int index",
-"}",
-"ainfo");
-}
-
-// typedef struct {
-// double width, height;
-// int index; /* index in original array */
-// } ainfo; \ No newline at end of file
diff --git a/src/h/arrowdir_t.java b/src/h/arrowdir_t.java
deleted file mode 100644
index 7e174ef..0000000
--- a/src/h/arrowdir_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5ghieyxthirf2pc6x8z6vuj05
-
-public interface arrowdir_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct arrowdir_t",
-"{",
-"char *dir",
-"int sflag",
-"int eflag",
-"}",
-"arrowdir_t");
-}
-
-// typedef struct arrowdir_t {
-// char *dir;
-// int sflag;
-// int eflag;
-// } arrowdir_t; \ No newline at end of file
diff --git a/src/h/arrowname_t.java b/src/h/arrowname_t.java
deleted file mode 100644
index d9df990..0000000
--- a/src/h/arrowname_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9xua47nwla43qv3cmy92tx1mr
-
-public interface arrowname_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct arrowname_t",
-"{",
-"char *name",
-"int type",
-"}",
-"arrowname_t");
-}
-
-// typedef struct arrowname_t {
-// char *name;
-// int type;
-// } arrowname_t; \ No newline at end of file
diff --git a/src/h/arrowtype_t.java b/src/h/arrowtype_t.java
deleted file mode 100644
index fa0d511..0000000
--- a/src/h/arrowtype_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 cvw01xnbdvcxj00pawmicyx3p
-
-public interface arrowtype_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct arrowtype_t",
-"{",
-"int type",
-"double lenfact",
-"void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag)",
-"}",
-"arrowtype_t");
-}
-
-// typedef struct arrowtype_t {
-// int type;
-// double lenfact; /* ratio of length of this arrow type to standard arrow */
-// void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag); /* generator function for type */
-// } arrowtype_t; \ No newline at end of file
diff --git a/src/h/aspect_t.java b/src/h/aspect_t.java
deleted file mode 100644
index 5eb8d91..0000000
--- a/src/h/aspect_t.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 7ric227rdgzts8ajl8qu4g4r3
-
-public interface aspect_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct aspect_t",
-"{",
-"double targetAR",
-"double combiAR",
-"int prevIterations",
-"int curIterations",
-"int nextIter",
-"int nPasses",
-"int badGraph",
-"}",
-"aspect_t");
-}
-
-// typedef struct aspect_t {
-// double targetAR; /* target aspect ratio */
-// double combiAR;
-// int prevIterations; /* no. of iterations in previous pass */
-// int curIterations; /* no. of iterations in current pass */
-// int nextIter; /* dynamically adjusted no. of iterations */
-// int nPasses; /* bound on no. of top-level passes */
-// int badGraph; /* hack: set if graph is disconnected or has
-// * clusters. If so, turn off aspect */
-// } aspect_t; \ No newline at end of file
diff --git a/src/h/attrsym_t.java b/src/h/attrsym_t.java
deleted file mode 100644
index 0620b71..0000000
--- a/src/h/attrsym_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 d4orkcxq0xaek87mt94led8jv
-
-public interface attrsym_t extends Agsym_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agsym_s attrsym_t");
-}
-
-// typedef struct Agsym_s attrsym_t; \ No newline at end of file
diff --git a/src/h/bend.java b/src/h/bend.java
deleted file mode 100644
index 481dc82..0000000
--- a/src/h/bend.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5vksevapsq3dmbrs630cwnpqp
-
-public interface bend extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT",
-"}",
-"bend");
-}
-
-// typedef enum {B_NODE, B_UP, B_LEFT, B_DOWN, B_RIGHT} bend; \ No newline at end of file
diff --git a/src/h/bezier.java b/src/h/bezier.java
deleted file mode 100644
index eff314e..0000000
--- a/src/h/bezier.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2rm8pcuhkjly1xk9haledn1k9
-
-public interface bezier extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct bezier",
-"{",
-"pointf *list",
-"int size",
-"int sflag, eflag",
-"pointf sp, ep",
-"}",
-"bezier");
-}
-
-// typedef struct bezier {
-// pointf *list;
-// int size;
-// int sflag, eflag;
-// pointf sp, ep;
-// } bezier; \ No newline at end of file
diff --git a/src/h/blk_t.java b/src/h/blk_t.java
deleted file mode 100644
index fbc6f73..0000000
--- a/src/h/blk_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 az8jvz0appwxv09fzo6ia7pw2
-
-public interface blk_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct blk_t",
-"{",
-"Agnode_t **data",
-"Agnode_t **endp",
-"struct blk_t *prev",
-"struct blk_t *next",
-"}",
-"blk_t");
-}
-
-// typedef struct blk_t {
-// Agnode_t **data;
-// Agnode_t **endp;
-// struct blk_t *prev;
-// struct blk_t *next;
-// } blk_t; \ No newline at end of file
diff --git a/src/h/block.java b/src/h/block.java
deleted file mode 100644
index bf068be..0000000
--- a/src/h/block.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 aeiesb8xknt6qv58gj7tdny3l
-
-public interface block extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct block",
-"{",
-"Agnode_t *child",
-"block_t *next",
-"Agraph_t *sub_graph",
-"double radius",
-"double rad0",
-"nodelist_t *circle_list",
-"blocklist_t children",
-"double parent_pos",
-"int flags",
-"}");
-}
-
-// struct block {
-// Agnode_t *child; /* if non-null, points to node in parent block */
-// block_t *next; /* sibling block */
-// Agraph_t *sub_graph; /* nodes and edges in this block */
-// double radius; /* radius of block and subblocks */
-// double rad0; /* radius of block */
-// nodelist_t *circle_list; /* ordered list of nodes in block */
-// blocklist_t children; /* child blocks */
-// double parent_pos; /* if block has 1 node, angle to place parent */
-// int flags;
-// }; \ No newline at end of file
diff --git a/src/h/block_t.java b/src/h/block_t.java
deleted file mode 100644
index 24b0269..0000000
--- a/src/h/block_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 9hb5i7kwpg2hbs4jpz9n14is
-
-public interface block_t extends block {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct block block_t");
-}
-
-// typedef struct block block_t; \ No newline at end of file
diff --git a/src/h/blocklist_t.java b/src/h/blocklist_t.java
deleted file mode 100644
index 22b2554..0000000
--- a/src/h/blocklist_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4fuyio1lh8xw103g3n4akljx4
-
-public interface blocklist_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"block_t *first",
-"block_t *last",
-"}",
-"blocklist_t");
-}
-
-// typedef struct {
-// block_t *first;
-// block_t *last;
-// } blocklist_t; \ No newline at end of file
diff --git a/src/h/box.java b/src/h/box.java
deleted file mode 100644
index d74d211..0000000
--- a/src/h/box.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 ecciois6ttiu20v5ds6ne801k
-
-public interface box extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"point LL, UR",
-"}",
-"box");
-}
-
-// typedef struct { point LL, UR; } box; \ No newline at end of file
diff --git a/src/h/boxf.java b/src/h/boxf.java
deleted file mode 100644
index d840303..0000000
--- a/src/h/boxf.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5ixaxdj4kxutnllqftpefs67r
-
-public interface boxf extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"pointf LL, UR",
-"}",
-"boxf");
-}
-
-// typedef struct { pointf LL, UR; } boxf; \ No newline at end of file
diff --git a/src/h/bport_t.java b/src/h/bport_t.java
deleted file mode 100644
index 675e36f..0000000
--- a/src/h/bport_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 enjd0328nmx4raj6kmm6ktq7y
-
-public interface bport_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct bport_s",
-"{",
-"edge_t *e",
-"node_t *n",
-"double alpha",
-"}",
-"bport_t");
-}
-
-// typedef struct bport_s {
-// edge_t *e;
-// node_t *n;
-// double alpha;
-// } bport_t; \ No newline at end of file
diff --git a/src/h/bsearch_cmpf.java b/src/h/bsearch_cmpf.java
deleted file mode 100644
index 11d87eb..0000000
--- a/src/h/bsearch_cmpf.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 dw2o83im6nk4bxd64xd6z2z00
-
-public interface bsearch_cmpf extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef int (*bsearch_cmpf) (const void *, const void *)");
-}
-
-// typedef int (*bsearch_cmpf) (const void *, const void *); \ No newline at end of file
diff --git a/src/h/buff_s.java b/src/h/buff_s.java
deleted file mode 100644
index 98ea374..0000000
--- a/src/h/buff_s.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 f33zs2sbhgsvvrelmw2nq6vt3
-
-public interface buff_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct buff_s",
-"{",
-"int fd",
-"fpos_t pos",
-"char *template",
-"}");
-}
-
-// struct buff_s {
-// int fd;
-// fpos_t pos;
-// char *template;
-// }; \ No newline at end of file
diff --git a/src/h/ccgnodeinfo_t.java b/src/h/ccgnodeinfo_t.java
deleted file mode 100644
index 65fe565..0000000
--- a/src/h/ccgnodeinfo_t.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 e6r3vblqbmjwwqavuqcrl06zb
-
-public interface ccgnodeinfo_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"Agrec_t h",
-"char mark",
-"union",
-"{",
-"Agraph_t* g",
-"Agnode_t* n",
-"void* v",
-"}",
-"ptr",
-"}",
-"ccgnodeinfo_t");
-}
-
-// typedef struct {
-// Agrec_t h;
-// char mark;
-// union {
-// Agraph_t* g;
-// Agnode_t* n;
-// void* v;
-// } ptr;
-// } ccgnodeinfo_t; \ No newline at end of file
diff --git a/src/h/ccgraphinfo_t.java b/src/h/ccgraphinfo_t.java
deleted file mode 100644
index f9835e1..0000000
--- a/src/h/ccgraphinfo_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 b28r73e4bd3fdpfewruggsvk1
-
-public interface ccgraphinfo_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"Agrec_t h",
-"char cc_subg",
-"}",
-"ccgraphinfo_t");
-}
-
-// typedef struct {
-// Agrec_t h;
-// char cc_subg; /* true iff subgraph corresponds to a component */
-// } ccgraphinfo_t; \ No newline at end of file
diff --git a/src/h/cdata.java b/src/h/cdata.java
deleted file mode 100644
index e527bc1..0000000
--- a/src/h/cdata.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 39c66ffd2kgahvaaf8e61dspv
-
-public interface cdata extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"union",
-"{",
-"Agraph_t *g",
-"Agnode_t *np",
-"}",
-"orig",
-"int flags",
-"node_t *parent",
-"block_t *block",
-"union",
-"{",
-"struct",
-"{",
-"node_t *next",
-"int val",
-"int low_val",
-"}",
-"bc",
-"node_t *clone",
-"struct",
-"{",
-"node_t *tparent",
-"node_t *first",
-"node_t *second",
-"int fdist",
-"int sdist",
-"}",
-"t",
-"struct",
-"{",
-"int pos",
-"double psi",
-"}",
-"f",
-"}",
-"u",
-"}",
-"cdata");
-}
-
-// typedef struct {
-// union { /* Pointer to node/cluster in original graph */
-// Agraph_t *g;
-// Agnode_t *np;
-// } orig;
-// int flags;
-// node_t *parent; /* parent in block-cutpoint traversal (1,2,4) */
-// block_t *block; /* Block containing node (1,2,3,4) */
-// union {
-// struct { /* Pass 1 */
-// node_t *next; /* used for stack */
-// int val;
-// int low_val;
-// } bc;
-// node_t *clone; /* Cloned node (3a) */
-// struct { /* Spanning tree and longest path (3b) */
-// node_t *tparent; /* Parent in tree */
-// node_t *first; /* Leaf on longest path from node */
-// node_t *second; /* Leaf on 2nd longest path from node */
-// int fdist; /* Length of longest path from node */
-// int sdist; /* Length of 2nd longest path from node */
-// } t;
-// struct {
-// int pos; /* Index of node in block circle (3c,4) */
-// double psi; /* Offset angle of children (4) */
-// } f;
-// } u;
-// } cdata; \ No newline at end of file
diff --git a/src/h/cell.java b/src/h/cell.java
deleted file mode 100644
index 2e4bd22..0000000
--- a/src/h/cell.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5st453umnwqp8rukqzc30apk6
-
-public interface cell extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"gridpt p",
-"node_list *nodes",
-"Dtlink_t link",
-"}",
-"cell");
-}
-
-// typedef struct {
-// gridpt p; /* index of cell */
-// node_list *nodes; /* nodes in cell */
-// Dtlink_t link; /* cdt data */
-// } cell; \ No newline at end of file
diff --git a/src/h/chanItem.java b/src/h/chanItem.java
deleted file mode 100644
index 45ca41e..0000000
--- a/src/h/chanItem.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 caod2kxpi4xwamq1g7wm3mm6o
-
-public interface chanItem extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"Dtlink_t link",
-"double v",
-"Dt_t* chans",
-"}",
-"chanItem");
-}
-
-// typedef struct {
-// Dtlink_t link;
-// double v;
-// Dt_t* chans;
-// } chanItem; \ No newline at end of file
diff --git a/src/h/channel.java b/src/h/channel.java
deleted file mode 100644
index 9f96d3d..0000000
--- a/src/h/channel.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 71crbqpwuxwtsnppsp39wccqp
-
-public interface channel extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"Dtlink_t link",
-"paird p",
-"int cnt",
-"segment** seg_list",
-"rawgraph* G",
-"struct cell* cp",
-"}",
-"channel");
-}
-
-// typedef struct {
-// Dtlink_t link;
-// paird p; /* extrema of channel */
-// int cnt; /* number of segments */
-// segment** seg_list; /* array of segment pointers */
-// rawgraph* G;
-// struct cell* cp;
-// } channel; \ No newline at end of file
diff --git a/src/h/cinfo_t.java b/src/h/cinfo_t.java
deleted file mode 100644
index 04d3566..0000000
--- a/src/h/cinfo_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9i2jwknpgmej0gz38zz670oa
-
-public interface cinfo_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"boxf bb",
-"object_t* objp",
-"}",
-"cinfo_t");
-}
-
-// typedef struct {
-// boxf bb;
-// object_t* objp;
-// } cinfo_t; \ No newline at end of file
diff --git a/src/h/circ_state.java b/src/h/circ_state.java
deleted file mode 100644
index 4680576..0000000
--- a/src/h/circ_state.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3lnrtud6sukofbfngncbfav33
-
-public interface circ_state extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"blocklist_t bl",
-"int orderCount",
-"int blockCount",
-"attrsym_t *N_artpos",
-"attrsym_t *N_root",
-"char *rootname",
-"double min_dist",
-"}",
-"circ_state");
-}
-
-// typedef struct {
-// blocklist_t bl;
-// int orderCount;
-// int blockCount;
-// attrsym_t *N_artpos;
-// attrsym_t *N_root;
-// char *rootname;
-// double min_dist;
-// } circ_state; \ No newline at end of file
diff --git a/src/h/clist_t.java b/src/h/clist_t.java
deleted file mode 100644
index 97e4c4b..0000000
--- a/src/h/clist_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2ibe0en9njq1f3z4y5g2kzaj2
-
-public interface clist_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"graph_t **cl",
-"int sz",
-"int cnt",
-"}",
-"clist_t");
-}
-
-// typedef struct {
-// graph_t **cl;
-// int sz;
-// int cnt;
-// } clist_t; \ No newline at end of file
diff --git a/src/h/deque_t.java b/src/h/deque_t.java
deleted file mode 100644
index a062686..0000000
--- a/src/h/deque_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 15n6mbjkpo4mjswqo3d30dej6
-
-public interface deque_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct deque_t",
-"{",
-"pointnlink_t **pnlps",
-"int pnlpn, fpnlpi, lpnlpi, apex",
-"}",
-"deque_t");
-}
-
-// typedef struct deque_t {
-// pointnlink_t **pnlps;
-// int pnlpn, fpnlpi, lpnlpi, apex;
-// } deque_t; \ No newline at end of file
diff --git a/src/h/edge_t.java b/src/h/edge_t.java
deleted file mode 100644
index 54f1258..0000000
--- a/src/h/edge_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 1fsfdd86c8isg6ylp15pwknbu
-
-public interface edge_t extends Agedge_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agedge_s edge_t");
-}
-
-// typedef struct Agedge_s edge_t; \ No newline at end of file
diff --git a/src/h/elist.java b/src/h/elist.java
deleted file mode 100644
index 28aa6a4..0000000
--- a/src/h/elist.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8lw80si2xjoivlskhxdmff5mu
-
-public interface elist extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct elist",
-"{",
-"edge_t **list",
-"int size",
-"}",
-"elist");
-}
-
-// typedef struct elist {
-// edge_t **list;
-// int size;
-// } elist; \ No newline at end of file
diff --git a/src/h/elist_t.java b/src/h/elist_t.java
deleted file mode 100644
index a7a7989..0000000
--- a/src/h/elist_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8ya2p1uqesbvs87po5upckzn0
-
-public interface elist_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct elist_t",
-"{",
-"Pedge_t *ep",
-"struct elist_t *next, *prev",
-"}",
-"elist_t");
-}
-
-// typedef struct elist_t {
-// Pedge_t *ep;
-// struct elist_t *next, *prev;
-// } elist_t; \ No newline at end of file
diff --git a/src/h/fail_stack_type.java b/src/h/fail_stack_type.java
deleted file mode 100644
index 423eeda..0000000
--- a/src/h/fail_stack_type.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 el5ktmij22s6d4cvfe81842jd
-
-public interface fail_stack_type extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"fail_stack_elt_t *stack",
-"unsigned size",
-"unsigned avail",
-"}",
-"fail_stack_type");
-}
-
-// typedef struct
-// {
-// fail_stack_elt_t *stack;
-// unsigned size;
-// unsigned avail; /* Offset of next open position. */
-// } fail_stack_type; \ No newline at end of file
diff --git a/src/h/fdpParms_s.java b/src/h/fdpParms_s.java
deleted file mode 100644
index 26a046a..0000000
--- a/src/h/fdpParms_s.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 f7uv7vj69dm0khl1b380tapm
-
-public interface fdpParms_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct fdpParms_s",
-"{",
-"int useGrid",
-"int useNew",
-"int numIters",
-"int unscaled",
-"double C",
-"double Tfact",
-"double K",
-"double T0",
-"}");
-}
-
-// struct fdpParms_s {
-// int useGrid; /* use grid for speed up */
-// int useNew; /* encode x-K into attractive force */
-// int numIters; /* actual iterations in layout */
-// int unscaled; /* % of iterations used in pass 1 */
-// double C; /* Repulsion factor in xLayout */
-// double Tfact; /* scale temp from default expression */
-// double K; /* spring constant; ideal distance */
-// double T0; /* initial temperature */
-// }; \ No newline at end of file
diff --git a/src/h/fdpParms_t.java b/src/h/fdpParms_t.java
deleted file mode 100644
index 16f97f3..0000000
--- a/src/h/fdpParms_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 8unwxxsfji1yz0v4p07nrybhu
-
-public interface fdpParms_t extends fdpParms_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct fdpParms_s fdpParms_t");
-}
-
-// typedef struct fdpParms_s fdpParms_t; \ No newline at end of file
diff --git a/src/h/field_t.java b/src/h/field_t.java
deleted file mode 100644
index e7657a7..0000000
--- a/src/h/field_t.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5slbuxsxkyuboijzrnorwqjk4
-
-public interface field_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct field_t",
-"{",
-"pointf size",
-"boxf b",
-"int n_flds",
-"textlabel_t *lp",
-"struct field_t **fld",
-"char *id",
-"unsigned char LR",
-"unsigned char sides",
-"}",
-"field_t");
-}
-
-// typedef struct field_t {
-// pointf size; /* its dimension */
-// boxf b; /* its placement in node's coordinates */
-// int n_flds;
-// textlabel_t *lp; /* n_flds == 0 */
-// struct field_t **fld; /* n_flds > 0 */
-// char *id; /* user's identifier */
-// unsigned char LR; /* if box list is horizontal (left to right) */
-// unsigned char sides; /* sides of node exposed to field */
-// } field_t; \ No newline at end of file
diff --git a/src/h/fill_type.java b/src/h/fill_type.java
deleted file mode 100644
index 3d11854..0000000
--- a/src/h/fill_type.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 7yr1sspvlqw3sgiyhkr854cd
-
-public interface fill_type extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"FILL_NONE, FILL_SOLID, FILL_LINEAR, FILL_RADIAL",
-"}",
-"fill_type");
-}
-
-// typedef enum { FILL_NONE, FILL_SOLID, FILL_LINEAR, FILL_RADIAL } fill_type; \ No newline at end of file
diff --git a/src/h/fitem.java b/src/h/fitem.java
deleted file mode 100644
index 97dd22c..0000000
--- a/src/h/fitem.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2w2z3tmg7hmxrqko2dt5rsqag
-
-public interface fitem extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"Dtlink_t link",
-"textspan_t ti",
-"}",
-"fitem");
-}
-
-// typedef struct {
-// Dtlink_t link;
-// textspan_t ti;
-// } fitem; \ No newline at end of file
diff --git a/src/h/flushfn.java b/src/h/flushfn.java
deleted file mode 100644
index a5a1611..0000000
--- a/src/h/flushfn.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 6co8gnhn5xjhq4c6lyebol0jr
-
-public interface flushfn extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef int (*flushfn) (void *chan)");
-}
-
-// typedef int (*flushfn) (void *chan); \ No newline at end of file
diff --git a/src/h/font_type.java b/src/h/font_type.java
deleted file mode 100644
index 4ddfa1f..0000000
--- a/src/h/font_type.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2xdqtc3a2c3n08rywh1rm8cjw
-
-public interface font_type extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"FONT_REGULAR, FONT_BOLD, FONT_ITALIC",
-"}",
-"font_type");
-}
-
-// typedef enum { FONT_REGULAR, FONT_BOLD, FONT_ITALIC } font_type; \ No newline at end of file
diff --git a/src/h/fontinfo.java b/src/h/fontinfo.java
deleted file mode 100644
index 8c36531..0000000
--- a/src/h/fontinfo.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 964775l6tcok47z2sykyt451v
-
-public interface fontinfo extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct fontinfo",
-"{",
-"double fontsize",
-"char *fontname",
-"char *fontcolor",
-"}");
-}
-
-// struct fontinfo {
-// double fontsize;
-// char *fontname;
-// char *fontcolor;
-// }; \ No newline at end of file
diff --git a/src/h/format_type.java b/src/h/format_type.java
deleted file mode 100644
index 29b0818..0000000
--- a/src/h/format_type.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 48gvd3f5a7qs6f6eid493tvyl
-
-public interface format_type extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"FORMAT_PNG_XDOT, FORMAT_GIF_XDOT, FORMAT_JPEG_XDOT, FORMAT_SVG_XDOT, FORMAT_PS_XDOT, FORMAT_PNG_DOT, FORMAT_GIF_DOT, FORMAT_JPEG_DOT, FORMAT_SVG_DOT, FORMAT_PS_DOT, FORMAT_PNG_MAP, FORMAT_GIF_MAP, FORMAT_JPEG_MAP, FORMAT_SVG_MAP, FORMAT_PS_MAP, FORMAT_PNG_SVG, FORMAT_GIF_SVG, FORMAT_JPEG_SVG, FORMAT_SVG_SVG, FORMAT_PNG_FIG, FORMAT_GIF_FIG, FORMAT_JPEG_FIG, FORMAT_PNG_VRML, FORMAT_GIF_VRML, FORMAT_JPEG_VRML, FORMAT_PS_PS, FORMAT_PSLIB_PS, FORMAT_PNG_VML, FORMAT_GIF_VML, FORMAT_JPEG_VML, FORMAT_GIF_TK,",
-"}",
-"format_type");
-}
-
-// typedef enum {
-// FORMAT_PNG_XDOT, FORMAT_GIF_XDOT, FORMAT_JPEG_XDOT, FORMAT_SVG_XDOT, FORMAT_PS_XDOT,
-// FORMAT_PNG_DOT, FORMAT_GIF_DOT, FORMAT_JPEG_DOT, FORMAT_SVG_DOT, FORMAT_PS_DOT,
-// FORMAT_PNG_MAP, FORMAT_GIF_MAP, FORMAT_JPEG_MAP, FORMAT_SVG_MAP, FORMAT_PS_MAP,
-// FORMAT_PNG_SVG, FORMAT_GIF_SVG, FORMAT_JPEG_SVG, FORMAT_SVG_SVG,
-// FORMAT_PNG_FIG, FORMAT_GIF_FIG, FORMAT_JPEG_FIG,
-// FORMAT_PNG_VRML, FORMAT_GIF_VRML, FORMAT_JPEG_VRML,
-// FORMAT_PS_PS, FORMAT_PSLIB_PS,
-// FORMAT_PNG_VML, FORMAT_GIF_VML, FORMAT_JPEG_VML,
-// FORMAT_GIF_TK,
-// } format_type; \ No newline at end of file
diff --git a/src/h/freefunc_t.java b/src/h/freefunc_t.java
deleted file mode 100644
index b932d55..0000000
--- a/src/h/freefunc_t.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 e8aa7nh48ajm604b51pz19bub
-
-public interface freefunc_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef void (*freefunc_t)(xdot_op*)");
-}
-
-// typedef void (*freefunc_t)(xdot_op*); \ No newline at end of file
diff --git a/src/h/fspan.java b/src/h/fspan.java
deleted file mode 100644
index 00dd251..0000000
--- a/src/h/fspan.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 ey73hen3l0l82tzpokzw8heu4
-
-public interface fspan extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"Dtlink_t link",
-"htextspan_t lp",
-"}",
-"fspan");
-}
-
-// typedef struct {
-// Dtlink_t link;
-// htextspan_t lp;
-// } fspan; \ No newline at end of file
diff --git a/src/h/gdata.java b/src/h/gdata.java
deleted file mode 100644
index 0518e95..0000000
--- a/src/h/gdata.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2ruxso0qdpjclz5edssp197zm
-
-public interface gdata extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"bport_t *ports",
-"int nports",
-"boxf bb",
-"int flags",
-"int level",
-"graph_t *parent",
-"}",
-"gdata");
-}
-
-// typedef struct {
-// bport_t *ports; /* boundary ports. 0-terminated */
-// int nports; /* no. of ports */
-// boxf bb; /* bounding box of graph */
-// int flags;
-// int level; /* depth in graph hierarchy */
-// graph_t *parent; /* smallest containing cluster */
-//
-//
-//
-// } gdata; \ No newline at end of file
diff --git a/src/h/ginfo.java b/src/h/ginfo.java
deleted file mode 100644
index 3438bfc..0000000
--- a/src/h/ginfo.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 49o2f0vj6o2k7glkg59q1t341
-
-public interface ginfo extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int perim",
-"point *cells",
-"int nc",
-"int index",
-"}",
-"ginfo");
-}
-
-// typedef struct {
-// int perim; /* half size of bounding rectangle perimeter */
-// point *cells; /* cells in covering polyomino */
-// int nc; /* no. of cells */
-// int index; /* index in original array */
-// } ginfo; \ No newline at end of file
diff --git a/src/h/graph_t.java b/src/h/graph_t.java
deleted file mode 100644
index 34eb207..0000000
--- a/src/h/graph_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 ebapqf0991e4p4fqcr0tva8qa
-
-public interface graph_t extends Agraph_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agraph_s graph_t");
-}
-
-// typedef struct Agraph_s graph_t; \ No newline at end of file
diff --git a/src/h/gridpt.java b/src/h/gridpt.java
deleted file mode 100644
index 27bf88c..0000000
--- a/src/h/gridpt.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 bh966kf6yzel6b62omfkro2sw
-
-public interface gridpt extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int i, j",
-"}",
-"gridpt");
-}
-
-// typedef struct {
-// int i, j;
-// } gridpt; \ No newline at end of file
diff --git a/src/h/gstack_t.java b/src/h/gstack_t.java
deleted file mode 100644
index c40b479..0000000
--- a/src/h/gstack_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML is free software; you can redistribute it and/or modify it
- * under the terms of the Eclipse Public License.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 831302imlb2pb01kdebykh623
-
-public interface gstack_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gstack_s",
-"{",
-"Agraph_t *g",
-"Agraph_t *subg",
-"list_t nodelist,edgelist,attrlist",
-"struct gstack_s *down",
-"}",
-"gstack_t");
-}
-
-// typedef struct gstack_s {
-// Agraph_t *g;
-// Agraph_t *subg;
-// list_t nodelist,edgelist,attrlist;
-// struct gstack_s *down;
-// } gstack_t; \ No newline at end of file
diff --git a/src/h/gv_argvlist_t.java b/src/h/gv_argvlist_t.java
deleted file mode 100644
index 837e647..0000000
--- a/src/h/gv_argvlist_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 ed9gxxtmujpu6gyrtmhxdut42
-
-public interface gv_argvlist_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gv_argvlist_s",
-"{",
-"char **argv",
-"int argc",
-"int alloc",
-"}",
-"gv_argvlist_t");
-}
-
-// typedef struct gv_argvlist_s {
-// char **argv;
-// int argc;
-// int alloc;
-// } gv_argvlist_t; \ No newline at end of file
diff --git a/src/h/gvattr_t.java b/src/h/gvattr_t.java
deleted file mode 100644
index b4a0984..0000000
--- a/src/h/gvattr_t.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2sx3fd85hu0bac6ji75ngovnu
-
-public interface gvattr_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"GVATTR_STRING, GVATTR_BOOL, GVATTR_COLOR",
-"}",
-"gvattr_t");
-}
-
-// typedef enum { GVATTR_STRING, GVATTR_BOOL, GVATTR_COLOR } gvattr_t; \ No newline at end of file
diff --git a/src/h/gvcolor_t.java b/src/h/gvcolor_t.java
deleted file mode 100644
index 187762d..0000000
--- a/src/h/gvcolor_t.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9xilv9or3ptvy3gupp6t2ql19
-
-public interface gvcolor_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct color_s",
-"{",
-"union",
-"{",
-"double RGBA[4]",
-"double HSVA[4]",
-"unsigned char rgba[4]",
-"unsigned char cmyk[4]",
-"int rrggbbaa[4]",
-"char *string",
-"int index",
-"}",
-"u",
-"color_type_t type",
-"}",
-"gvcolor_t");
-}
-
-// typedef struct color_s {
-// union {
-// double RGBA[4];
-// double HSVA[4];
-// unsigned char rgba[4];
-// unsigned char cmyk[4];
-// int rrggbbaa[4];
-// char *string;
-// int index;
-// } u;
-// color_type_t type;
-// } gvcolor_t; \ No newline at end of file
diff --git a/src/h/gvdevice_callbacks_t.java b/src/h/gvdevice_callbacks_t.java
deleted file mode 100644
index ebae6a8..0000000
--- a/src/h/gvdevice_callbacks_t.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 f3e0bdxm3k2e7dwusmutjfhyg
-
-public interface gvdevice_callbacks_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvdevice_callbacks_s",
-"{",
-"void (*refresh) (GVJ_t * job)",
-"void (*button_press) (GVJ_t * job, int button, pointf pointer)",
-"void (*button_release) (GVJ_t * job, int button, pointf pointer)",
-"void (*motion) (GVJ_t * job, pointf pointer)",
-"void (*modify) (GVJ_t * job, const char *name, const char *value)",
-"void (*del) (GVJ_t * job)",
-"void (*read) (GVJ_t * job, const char *filename, const char *layout)",
-"void (*layout) (GVJ_t * job, const char *layout)",
-"void (*render) (GVJ_t * job, const char *format, const char *filename)",
-"}",
-"gvdevice_callbacks_t");
-}
-
-// typedef struct gvdevice_callbacks_s {
-// void (*refresh) (GVJ_t * job);
-// void (*button_press) (GVJ_t * job, int button, pointf pointer);
-// void (*button_release) (GVJ_t * job, int button, pointf pointer);
-// void (*motion) (GVJ_t * job, pointf pointer);
-// void (*modify) (GVJ_t * job, const char *name, const char *value);
-// void (*del) (GVJ_t * job); /* can't use "delete" 'cos C++ stole it */
-// void (*read) (GVJ_t * job, const char *filename, const char *layout);
-// void (*layout) (GVJ_t * job, const char *layout);
-// void (*render) (GVJ_t * job, const char *format, const char *filename);
-// } gvdevice_callbacks_t; \ No newline at end of file
diff --git a/src/h/gvdevice_engine_s.java b/src/h/gvdevice_engine_s.java
deleted file mode 100644
index 5b00bb9..0000000
--- a/src/h/gvdevice_engine_s.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 z4n2hij703yppdzze03zzgi6
-
-public interface gvdevice_engine_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvdevice_engine_s",
-"{",
-"void (*initialize) (GVJ_t * firstjob)",
-"void (*format) (GVJ_t * firstjob)",
-"void (*finalize) (GVJ_t * firstjob)",
-"}");
-}
-
-// struct gvdevice_engine_s {
-// void (*initialize) (GVJ_t * firstjob);
-// void (*format) (GVJ_t * firstjob);
-// void (*finalize) (GVJ_t * firstjob);
-// }; \ No newline at end of file
diff --git a/src/h/gvdevice_engine_t.java b/src/h/gvdevice_engine_t.java
deleted file mode 100644
index 8cee2ea..0000000
--- a/src/h/gvdevice_engine_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 3xl6s6o9sk6ni7l5g3amrl4p3
-
-public interface gvdevice_engine_t extends gvdevice_engine_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvdevice_engine_s gvdevice_engine_t");
-}
-
-// typedef struct gvdevice_engine_s gvdevice_engine_t; \ No newline at end of file
diff --git a/src/h/gvdevice_features_t.java b/src/h/gvdevice_features_t.java
deleted file mode 100644
index 0c4ddfe..0000000
--- a/src/h/gvdevice_features_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 7mtrzu9286sibihpev6m1kq0d
-
-public interface gvdevice_features_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int flags",
-"pointf default_margin",
-"pointf default_pagesize",
-"pointf default_dpi",
-"}",
-"gvdevice_features_t");
-}
-
-// typedef struct {
-// int flags;
-// pointf default_margin; /* left/right, top/bottom - points */
-// pointf default_pagesize;/* default page width, height - points */
-// pointf default_dpi;
-// } gvdevice_features_t; \ No newline at end of file
diff --git a/src/h/gvevent_key_binding_t.java b/src/h/gvevent_key_binding_t.java
deleted file mode 100644
index bd3a51a..0000000
--- a/src/h/gvevent_key_binding_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 36q7p68bw2kihtosgcli2ebnl
-
-public interface gvevent_key_binding_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvevent_key_binding_s",
-"{",
-"char *keystring",
-"gvevent_key_callback_t callback",
-"}",
-"gvevent_key_binding_t");
-}
-
-// typedef struct gvevent_key_binding_s {
-// char *keystring;
-// gvevent_key_callback_t callback;
-// } gvevent_key_binding_t; \ No newline at end of file
diff --git a/src/h/gvevent_key_callback_t.java b/src/h/gvevent_key_callback_t.java
deleted file mode 100644
index 362e770..0000000
--- a/src/h/gvevent_key_callback_t.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8od0u0s38rvhqrafwy4nh1i0
-
-public interface gvevent_key_callback_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef int (*gvevent_key_callback_t) (GVJ_t * job)");
-}
-
-// typedef int (*gvevent_key_callback_t) (GVJ_t * job); \ No newline at end of file
diff --git a/src/h/gvformatter_engine_t.java b/src/h/gvformatter_engine_t.java
deleted file mode 100644
index 15f4505..0000000
--- a/src/h/gvformatter_engine_t.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.gvformatter_engine_s;
-
-//2 3vj53t416qxwn8efaetlwcvoc
-
-public interface gvformatter_engine_t extends gvformatter_engine_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvformatter_engine_s gvformatter_engine_t");
-}
-
-// typedef struct gvformatter_engine_s gvformatter_engine_t; \ No newline at end of file
diff --git a/src/h/gvlayout_engine_s.java b/src/h/gvlayout_engine_s.java
deleted file mode 100644
index 4ca7d42..0000000
--- a/src/h/gvlayout_engine_s.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 aufqatak555umhtr2zwzdxcam
-
-public interface gvlayout_engine_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvlayout_engine_s",
-"{",
-"void (*layout) (graph_t * g)",
-"void (*cleanup) (graph_t * g)",
-"}");
-}
-
-// struct gvlayout_engine_s {
-// void (*layout) (graph_t * g);
-// void (*cleanup) (graph_t * g);
-// }; \ No newline at end of file
diff --git a/src/h/gvlayout_engine_t.java b/src/h/gvlayout_engine_t.java
deleted file mode 100644
index 88d920c..0000000
--- a/src/h/gvlayout_engine_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 6neg5ydx7okjqcbqz9nndxl88
-
-public interface gvlayout_engine_t extends gvlayout_engine_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvlayout_engine_s gvlayout_engine_t");
-}
-
-// typedef struct gvlayout_engine_s gvlayout_engine_t; \ No newline at end of file
diff --git a/src/h/gvlayout_features_t.java b/src/h/gvlayout_features_t.java
deleted file mode 100644
index 111fb91..0000000
--- a/src/h/gvlayout_features_t.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5ixrh5lzf6cgqakcirp2uozbb
-
-public interface gvlayout_features_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int flags",
-"}",
-"gvlayout_features_t");
-}
-
-// typedef struct {
-// int flags;
-// } gvlayout_features_t; \ No newline at end of file
diff --git a/src/h/gvloadimage_engine_s.java b/src/h/gvloadimage_engine_s.java
deleted file mode 100644
index 188f880..0000000
--- a/src/h/gvloadimage_engine_s.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9857ym486lfba1vbejkz0jesv
-
-public interface gvloadimage_engine_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvloadimage_engine_s",
-"{",
-"void (*loadimage) (GVJ_t *job, usershape_t *us, boxf b, boolean filled)",
-"}");
-}
-
-// struct gvloadimage_engine_s {
-// void (*loadimage) (GVJ_t *job, usershape_t *us, boxf b, boolean filled);
-// }; \ No newline at end of file
diff --git a/src/h/gvloadimage_engine_t.java b/src/h/gvloadimage_engine_t.java
deleted file mode 100644
index 5d7db23..0000000
--- a/src/h/gvloadimage_engine_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 2ribkbowigqfs0otd9wwditp5
-
-public interface gvloadimage_engine_t extends gvloadimage_engine_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvloadimage_engine_s gvloadimage_engine_t");
-}
-
-// typedef struct gvloadimage_engine_s gvloadimage_engine_t; \ No newline at end of file
diff --git a/src/h/gvplugin_active_device_t.java b/src/h/gvplugin_active_device_t.java
deleted file mode 100644
index aad8f04..0000000
--- a/src/h/gvplugin_active_device_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c5u1u6iz4msxf9y4q5w78w22
-
-public interface gvplugin_active_device_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_active_device_s",
-"{",
-"gvdevice_engine_t *engine",
-"int id",
-"gvdevice_features_t *features",
-"const char *type",
-"}",
-"gvplugin_active_device_t");
-}
-
-// typedef struct gvplugin_active_device_s {
-// gvdevice_engine_t *engine;
-// int id;
-// gvdevice_features_t *features;
-// const char *type;
-// } gvplugin_active_device_t; \ No newline at end of file
diff --git a/src/h/gvplugin_active_layout_t.java b/src/h/gvplugin_active_layout_t.java
deleted file mode 100644
index 539c284..0000000
--- a/src/h/gvplugin_active_layout_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 13w4wtxe0z0sh446ur163yvhf
-
-public interface gvplugin_active_layout_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_active_layout_s",
-"{",
-"gvlayout_engine_t *engine",
-"int id",
-"gvlayout_features_t *features",
-"const char *type",
-"}",
-"gvplugin_active_layout_t");
-}
-
-// typedef struct gvplugin_active_layout_s {
-// gvlayout_engine_t *engine;
-// int id;
-// gvlayout_features_t *features;
-// const char *type;
-// } gvplugin_active_layout_t; \ No newline at end of file
diff --git a/src/h/gvplugin_active_loadimage_t.java b/src/h/gvplugin_active_loadimage_t.java
deleted file mode 100644
index 66bb0d7..0000000
--- a/src/h/gvplugin_active_loadimage_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 633mt1gwzq159n5j6n0lzgzam
-
-public interface gvplugin_active_loadimage_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_active_loadimage_t",
-"{",
-"gvloadimage_engine_t *engine",
-"int id",
-"const char *type",
-"}",
-"gvplugin_active_loadimage_t");
-}
-
-// typedef struct gvplugin_active_loadimage_t {
-// gvloadimage_engine_t *engine;
-// int id;
-// const char *type;
-// } gvplugin_active_loadimage_t; \ No newline at end of file
diff --git a/src/h/gvplugin_active_render_t.java b/src/h/gvplugin_active_render_t.java
deleted file mode 100644
index 2c27766..0000000
--- a/src/h/gvplugin_active_render_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4af9oysh9wk1u0m5wjc60jcr3
-
-public interface gvplugin_active_render_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_active_render_s",
-"{",
-"gvrender_engine_t *engine",
-"int id",
-"gvrender_features_t *features",
-"const char *type",
-"}",
-"gvplugin_active_render_t");
-}
-
-// typedef struct gvplugin_active_render_s {
-// gvrender_engine_t *engine;
-// int id;
-// gvrender_features_t *features;
-// const char *type;
-// } gvplugin_active_render_t; \ No newline at end of file
diff --git a/src/h/gvplugin_active_textlayout_t.java b/src/h/gvplugin_active_textlayout_t.java
deleted file mode 100644
index fcc05da..0000000
--- a/src/h/gvplugin_active_textlayout_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4ht0rt62yul08h6v5kje6jk1x
-
-public interface gvplugin_active_textlayout_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_active_textlayout_s",
-"{",
-"gvtextlayout_engine_t *engine",
-"int id",
-"char *type",
-"}",
-"gvplugin_active_textlayout_t");
-}
-
-// typedef struct gvplugin_active_textlayout_s {
-// gvtextlayout_engine_t *engine;
-// int id;
-// char *type;
-// } gvplugin_active_textlayout_t; \ No newline at end of file
diff --git a/src/h/gvplugin_available_t.java b/src/h/gvplugin_available_t.java
deleted file mode 100644
index 2facbab..0000000
--- a/src/h/gvplugin_available_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 6ct699hskqmknua7dg0fdwvmz
-
-public interface gvplugin_available_t extends gvplugin_available_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_available_s gvplugin_available_t");
-}
-
-// typedef struct gvplugin_available_s gvplugin_available_t; \ No newline at end of file
diff --git a/src/h/gvplugin_installed_t.java b/src/h/gvplugin_installed_t.java
deleted file mode 100644
index a92037f..0000000
--- a/src/h/gvplugin_installed_t.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 dcmpl8ruksxab5p8161qcvxcw
-
-public interface gvplugin_installed_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int id",
-"const char *type",
-"int quality",
-"void *engine",
-"void *features",
-"}",
-"gvplugin_installed_t");
-}
-
-// typedef struct {
-// int id; /* an id that is only unique within a package
-// of plugins of the same api.
-// A renderer-type such as "png" in the cairo package
-// has an id that is different from the "ps" type
-// in the same package */
-// const char *type; /* a string name, such as "png" or "ps" that
-// distinguishes different types withing the same
-// (renderer in this case) */
-// int quality; /* an arbitrary integer used for ordering plugins of
-// the same type from different packages */
-// void *engine; /* pointer to the jump table for the plugin */
-// void *features; /* pointer to the feature description
-// void* because type varies by api */
-// } gvplugin_installed_t; \ No newline at end of file
diff --git a/src/h/gvplugin_package_s.java b/src/h/gvplugin_package_s.java
deleted file mode 100644
index ca9603d..0000000
--- a/src/h/gvplugin_package_s.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4x42jt53r4w0hua6kytv25z05
-
-public interface gvplugin_package_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvplugin_package_s",
-"{",
-"gvplugin_package_t *next",
-"char *path",
-"char *name",
-"}");
-}
-
-// struct gvplugin_package_s {
-// gvplugin_package_t *next;
-// char *path;
-// char *name;
-// }; \ No newline at end of file
diff --git a/src/h/gvplugin_package_t.java b/src/h/gvplugin_package_t.java
deleted file mode 100644
index e94a721..0000000
--- a/src/h/gvplugin_package_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 4mfo0bv62esvw8qme2tplg7k
-
-public interface gvplugin_package_t extends gvplugin_package_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvplugin_package_s gvplugin_package_t");
-}
-
-// typedef struct gvplugin_package_s gvplugin_package_t; \ No newline at end of file
diff --git a/src/h/gvrender_engine_s.java b/src/h/gvrender_engine_s.java
deleted file mode 100644
index 942b5d4..0000000
--- a/src/h/gvrender_engine_s.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c9lcfmvndhmluehnjakiea1ei
-
-public interface gvrender_engine_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvrender_engine_s",
-"{",
-"void (*begin_job) (GVJ_t * job)",
-"void (*end_job) (GVJ_t * job)",
-"void (*begin_graph) (GVJ_t * job)",
-"void (*end_graph) (GVJ_t * job)",
-"void (*begin_layer) (GVJ_t * job, char *layername, int layerNum, int numLayers)",
-"void (*end_layer) (GVJ_t * job)",
-"void (*begin_page) (GVJ_t * job)",
-"void (*end_page) (GVJ_t * job)",
-"void (*begin_cluster) (GVJ_t * job)",
-"void (*end_cluster) (GVJ_t * job)",
-"void (*begin_nodes) (GVJ_t * job)",
-"void (*end_nodes) (GVJ_t * job)",
-"void (*begin_edges) (GVJ_t * job)",
-"void (*end_edges) (GVJ_t * job)",
-"void (*begin_node) (GVJ_t * job)",
-"void (*end_node) (GVJ_t * job)",
-"void (*begin_edge) (GVJ_t * job)",
-"void (*end_edge) (GVJ_t * job)",
-"void (*begin_anchor) (GVJ_t * job, char *href, char *tooltip, char *target, char *id)",
-"void (*end_anchor) (GVJ_t * job)",
-"void (*begin_label) (GVJ_t * job, label_type type)",
-"void (*end_label) (GVJ_t * job)",
-"void (*textspan) (GVJ_t * job, pointf p, textspan_t * span)",
-"void (*resolve_color) (GVJ_t * job, gvcolor_t * color)",
-"void (*ellipse) (GVJ_t * job, pointf * A, int filled)",
-"void (*polygon) (GVJ_t * job, pointf * A, int n, int filled)",
-"void (*beziercurve) (GVJ_t * job, pointf * A, int n, int arrow_at_start, int arrow_at_end, int)",
-"void (*polyline) (GVJ_t * job, pointf * A, int n)",
-"void (*comment) (GVJ_t * job, char *comment)",
-"void (*library_shape) (GVJ_t * job, char *name, pointf * A, int n, int filled)",
-"}");
-}
-
-// struct gvrender_engine_s {
-// void (*begin_job) (GVJ_t * job);
-// void (*end_job) (GVJ_t * job);
-// void (*begin_graph) (GVJ_t * job);
-// void (*end_graph) (GVJ_t * job);
-// void (*begin_layer) (GVJ_t * job, char *layername,
-// int layerNum, int numLayers);
-// void (*end_layer) (GVJ_t * job);
-// void (*begin_page) (GVJ_t * job);
-// void (*end_page) (GVJ_t * job);
-// void (*begin_cluster) (GVJ_t * job);
-// void (*end_cluster) (GVJ_t * job);
-// void (*begin_nodes) (GVJ_t * job);
-// void (*end_nodes) (GVJ_t * job);
-// void (*begin_edges) (GVJ_t * job);
-// void (*end_edges) (GVJ_t * job);
-// void (*begin_node) (GVJ_t * job);
-// void (*end_node) (GVJ_t * job);
-// void (*begin_edge) (GVJ_t * job);
-// void (*end_edge) (GVJ_t * job);
-// void (*begin_anchor) (GVJ_t * job,
-// char *href, char *tooltip, char *target, char *id);
-// void (*end_anchor) (GVJ_t * job);
-// void (*begin_label) (GVJ_t * job, label_type type);
-// void (*end_label) (GVJ_t * job);
-// void (*textspan) (GVJ_t * job, pointf p, textspan_t * span);
-// void (*resolve_color) (GVJ_t * job, gvcolor_t * color);
-// void (*ellipse) (GVJ_t * job, pointf * A, int filled);
-// void (*polygon) (GVJ_t * job, pointf * A, int n, int filled);
-// void (*beziercurve) (GVJ_t * job, pointf * A, int n,
-// int arrow_at_start, int arrow_at_end, int);
-// void (*polyline) (GVJ_t * job, pointf * A, int n);
-// void (*comment) (GVJ_t * job, char *comment);
-// void (*library_shape) (GVJ_t * job, char *name, pointf * A, int n, int filled);
-// }; \ No newline at end of file
diff --git a/src/h/gvrender_engine_t.java b/src/h/gvrender_engine_t.java
deleted file mode 100644
index c9440fd..0000000
--- a/src/h/gvrender_engine_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 5bxr6kqlo53bavjt2xfhgd4p8
-
-public interface gvrender_engine_t extends gvrender_engine_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvrender_engine_s gvrender_engine_t");
-}
-
-// typedef struct gvrender_engine_s gvrender_engine_t; \ No newline at end of file
diff --git a/src/h/gvrender_features_t.java b/src/h/gvrender_features_t.java
deleted file mode 100644
index 940bf2c..0000000
--- a/src/h/gvrender_features_t.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 b5pxs48fv8n5ovo8dntg7yyiw
-
-public interface gvrender_features_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int flags",
-"double default_pad",
-"char **knowncolors",
-"int sz_knowncolors",
-"color_type_t color_type",
-"}",
-"gvrender_features_t");
-}
-
-// typedef struct {
-// int flags;
-// double default_pad; /* graph units */
-// char **knowncolors;
-// int sz_knowncolors;
-// color_type_t color_type;
-// } gvrender_features_t; \ No newline at end of file
diff --git a/src/h/gvtextlayout_engine_s.java b/src/h/gvtextlayout_engine_s.java
deleted file mode 100644
index d742d44..0000000
--- a/src/h/gvtextlayout_engine_s.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 btpkmksp5qljd7s3c2whxtupr
-
-public interface gvtextlayout_engine_s extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct gvtextlayout_engine_s",
-"{",
-"boolean (*textlayout) (textspan_t *span, char** fontpath)",
-"}");
-}
-
-// struct gvtextlayout_engine_s {
-// boolean (*textlayout) (textspan_t *span, char** fontpath);
-// }; \ No newline at end of file
diff --git a/src/h/gvtextlayout_engine_t.java b/src/h/gvtextlayout_engine_t.java
deleted file mode 100644
index 2446c93..0000000
--- a/src/h/gvtextlayout_engine_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 6ftez1uvnskvljccs3z0sfspf
-
-public interface gvtextlayout_engine_t extends gvtextlayout_engine_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct gvtextlayout_engine_s gvtextlayout_engine_t");
-}
-
-// typedef struct gvtextlayout_engine_s gvtextlayout_engine_t; \ No newline at end of file
diff --git a/src/h/hsvrgbacolor_t.java b/src/h/hsvrgbacolor_t.java
deleted file mode 100644
index da3b21d..0000000
--- a/src/h/hsvrgbacolor_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 a81kzkq5n7k0bft1xpxzn8sof
-
-public interface hsvrgbacolor_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct hsvrgbacolor_t",
-"{",
-"char *name",
-"unsigned char h, s, v",
-"unsigned char r, g, b, a",
-"}",
-"hsvrgbacolor_t");
-}
-
-// typedef struct hsvrgbacolor_t {
-// char *name;
-// unsigned char h, s, v;
-// unsigned char r, g, b, a;
-// } hsvrgbacolor_t; \ No newline at end of file
diff --git a/src/h/htextspan_t.java b/src/h/htextspan_t.java
deleted file mode 100644
index feffed0..0000000
--- a/src/h/htextspan_t.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 73dlf2ef4p53l8j1jla74ryhq
-
-public interface htextspan_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"textspan_t *items",
-"short nitems",
-"char just",
-"double size",
-"double lfsize",
-"}",
-"htextspan_t");
-}
-
-// typedef struct {
-// textspan_t *items;
-// short nitems;
-// char just;
-// double size; /* width of span */
-// double lfsize; /* offset from previous baseline to current one */
-// } htextspan_t; \ No newline at end of file
diff --git a/src/h/htmlcell_t.java b/src/h/htmlcell_t.java
deleted file mode 100644
index 9fe62f8..0000000
--- a/src/h/htmlcell_t.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c3fdy8b5qt90u4c5ss75lcguu
-
-public interface htmlcell_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct htmlcell_t htmlcell_t");
-}
-
-// typedef struct htmlcell_t htmlcell_t; \ No newline at end of file
diff --git a/src/h/htmldata_t.java b/src/h/htmldata_t.java
deleted file mode 100644
index 6673fad..0000000
--- a/src/h/htmldata_t.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3ndpf3koymkortrl6lwwvih5k
-
-public interface htmldata_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"char *href",
-"char *port",
-"char *target",
-"char *title",
-"char *id",
-"char *bgcolor",
-"char *pencolor",
-"int gradientangle",
-"signed char space",
-"unsigned char border",
-"unsigned char pad",
-"unsigned char sides",
-"unsigned short flags",
-"unsigned short width",
-"unsigned short height",
-"unsigned short style",
-"boxf box",
-"}",
-"htmldata_t");
-}
-
-// typedef struct {
-// char *href; /* pointer to an external resource */
-// char *port;
-// char *target;
-// char *title;
-// char *id;
-// char *bgcolor;
-// char *pencolor;
-// int gradientangle;
-// signed char space;
-// unsigned char border;
-// unsigned char pad;
-// unsigned char sides; /* set of sides exposed to field */
-// unsigned short flags;
-// unsigned short width;
-// unsigned short height;
-// unsigned short style;
-// boxf box; /* its geometric placement in points */
-// } htmldata_t; \ No newline at end of file
diff --git a/src/h/htmlenv_t.java b/src/h/htmlenv_t.java
deleted file mode 100644
index 3bbfa1e..0000000
--- a/src/h/htmlenv_t.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c1g03t0hv8uptocwfcdelqwqa
-
-public interface htmlenv_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"pointf pos",
-"textfont_t finfo",
-"void *obj",
-"graph_t *g",
-"char *imgscale",
-"char *objid",
-"boolean objid_set",
-"}",
-"htmlenv_t");
-}
-
-// typedef struct {
-// pointf pos;
-// textfont_t finfo;
-// void *obj;
-// graph_t *g;
-// char *imgscale;
-// char *objid;
-// boolean objid_set;
-// } htmlenv_t; \ No newline at end of file
diff --git a/src/h/htmlimg_t.java b/src/h/htmlimg_t.java
deleted file mode 100644
index d3f3bc9..0000000
--- a/src/h/htmlimg_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 2qx8kiwbmyh61vxkplyhzp0i7
-
-public interface htmlimg_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"boxf box",
-"char *src",
-"char *scale",
-"}",
-"htmlimg_t");
-}
-
-// typedef struct {
-// boxf box;
-// char *src;
-// char *scale;
-// } htmlimg_t; \ No newline at end of file
diff --git a/src/h/htmlmap_data_t.java b/src/h/htmlmap_data_t.java
deleted file mode 100644
index 833c10c..0000000
--- a/src/h/htmlmap_data_t.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 d20oliwp4ordsbln3u0w8ovgu
-
-public interface htmlmap_data_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"char *url",
-"char *tooltip",
-"char *target",
-"char *id",
-"boolean explicit_tooltip",
-"point LL",
-"point UR",
-"}",
-"htmlmap_data_t");
-}
-
-// typedef struct {
-// char *url;
-// char *tooltip;
-// char *target;
-// char *id;
-// boolean explicit_tooltip;
-// point LL;
-// point UR;
-// } htmlmap_data_t; \ No newline at end of file
diff --git a/src/h/htmltbl_t.java b/src/h/htmltbl_t.java
deleted file mode 100644
index cf966a8..0000000
--- a/src/h/htmltbl_t.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4l8qax3cpj0f9m5mv6n7ijuw3
-
-public interface htmltbl_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct htmltbl_t htmltbl_t");
-}
-
-// typedef struct htmltbl_t htmltbl_t; \ No newline at end of file
diff --git a/src/h/htmltxt_t.java b/src/h/htmltxt_t.java
deleted file mode 100644
index 61541b7..0000000
--- a/src/h/htmltxt_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9d3jp17twvv6zmypz9ry6ulqm
-
-public interface htmltxt_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"htextspan_t *spans",
-"short nspans",
-"char simple",
-"boxf box",
-"}",
-"htmltxt_t");
-}
-
-// typedef struct {
-// htextspan_t *spans;
-// short nspans;
-// char simple;
-// boxf box;
-// } htmltxt_t; \ No newline at end of file
diff --git a/src/h/inside_t.java b/src/h/inside_t.java
deleted file mode 100644
index 92dda84..0000000
--- a/src/h/inside_t.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 1ntxl46xf9k1rah2wosqhcdno
-
-public interface inside_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef union inside_t",
-"{",
-"struct",
-"{",
-"pointf* p",
-"double* r",
-"}",
-"a",
-"struct",
-"{",
-"node_t* n",
-"boxf* bp",
-"}",
-"s",
-"}",
-"inside_t");
-}
-
-// typedef union inside_t {
-// struct {
-// pointf* p;
-// double* r;
-// } a;
-// struct {
-// node_t* n;
-// boxf* bp;
-// } s;
-// } inside_t; \ No newline at end of file
diff --git a/src/h/label_params_t.java b/src/h/label_params_t.java
deleted file mode 100644
index b93607e..0000000
--- a/src/h/label_params_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 hnxz1757w4pts48w055n1a2r
-
-public interface label_params_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"boxf bb",
-"unsigned char force",
-"}",
-"label_params_t");
-}
-
-// typedef struct {
-// boxf bb; /* Bounding box of all objects */
-// unsigned char force; /* If true, all labels must be placed */
-// } label_params_t; \ No newline at end of file
diff --git a/src/h/nlist_t.java b/src/h/nlist_t.java
deleted file mode 100644
index 7381f01..0000000
--- a/src/h/nlist_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 21yt3x3ukjw41rbx7gc4w7ebj
-
-public interface nlist_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct nlist_t",
-"{",
-"node_t **list",
-"int size",
-"}",
-"nlist_t");
-}
-
-// typedef struct nlist_t {
-// node_t **list;
-// int size;
-// } nlist_t; \ No newline at end of file
diff --git a/src/h/node_list.java b/src/h/node_list.java
deleted file mode 100644
index dde8460..0000000
--- a/src/h/node_list.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 vma2gttg3cuyksw8xvwfgf30
-
-public interface node_list extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct _node_list",
-"{",
-"Agnode_t *node",
-"struct _node_list *next",
-"}",
-"node_list");
-}
-
-// typedef struct _node_list {
-// Agnode_t *node;
-// struct _node_list *next;
-// } node_list; \ No newline at end of file
diff --git a/src/h/node_t.java b/src/h/node_t.java
deleted file mode 100644
index 7563cdb..0000000
--- a/src/h/node_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 9eay2w1ulq4b60xf1edcfkkmi
-
-public interface node_t extends Agnode_s {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct Agnode_s node_t");
-}
-
-// typedef struct Agnode_s node_t; \ No newline at end of file
diff --git a/src/h/nodequeue.java b/src/h/nodequeue.java
deleted file mode 100644
index 4faaf32..0000000
--- a/src/h/nodequeue.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 aevkl4zsbstj3pc33rpzrocul
-
-public interface nodequeue extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct nodequeue",
-"{",
-"node_t **store, **limit, **head, **tail",
-"}",
-"nodequeue");
-}
-
-// typedef struct nodequeue {
-// node_t **store, **limit, **head, **tail;
-// } nodequeue; \ No newline at end of file
diff --git a/src/h/object_t.java b/src/h/object_t.java
deleted file mode 100644
index 159193b..0000000
--- a/src/h/object_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3ll53gc239t205eaimof9u6ah
-
-public interface object_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"pointf pos",
-"pointf sz",
-"xlabel_t *lbl",
-"}",
-"object_t");
-}
-
-// typedef struct {
-// pointf pos; /* Position of lower-left corner of object */
-// pointf sz; /* Size of object; may be zero for a point */
-// xlabel_t *lbl; /* Label attached to object, or NULL */
-// } object_t; \ No newline at end of file
diff --git a/src/h/pack_info.java b/src/h/pack_info.java
deleted file mode 100644
index 1ccbcca..0000000
--- a/src/h/pack_info.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 95stwmwomxnw1qea4q6lmeekb
-
-public interface pack_info extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"float aspect",
-"int sz",
-"unsigned int margin",
-"int doSplines",
-"pack_mode mode",
-"boolean *fixed",
-"packval_t* vals",
-"int flags",
-"}",
-"pack_info");
-}
-
-// typedef struct {
-// float aspect; /* desired aspect ratio */
-// int sz; /* row/column size size */
-// unsigned int margin; /* margin left around objects, in points */
-// int doSplines; /* use splines in constructing graph shape */
-// pack_mode mode; /* granularity and method */
-// boolean *fixed; /* fixed[i] == true implies g[i] should not be moved */
-// packval_t* vals; /* for arrays, sort numbers */
-// int flags;
-// } pack_info; \ No newline at end of file
diff --git a/src/h/path.java b/src/h/path.java
deleted file mode 100644
index 9ec4500..0000000
--- a/src/h/path.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 ccnx75vstszprxk6fxhq89rpu
-
-public interface path extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct path",
-"{",
-"port start, end",
-"int nbox",
-"boxf *boxes",
-"void *data",
-"}",
-"path");
-}
-
-// typedef struct path { /* internal specification for an edge spline */
-// port start, end;
-// int nbox; /* number of subdivisions */
-// boxf *boxes; /* rectangular regions of subdivision */
-// void *data;
-// } path; \ No newline at end of file
diff --git a/src/h/pathend_t.java b/src/h/pathend_t.java
deleted file mode 100644
index bcc5eb1..0000000
--- a/src/h/pathend_t.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 42vd8ru4xms0dzzipvkxpb5xt
-
-public interface pathend_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct pathend_t",
-"{",
-"boxf nb",
-"pointf np",
-"int sidemask",
-"int boxn",
-"boxf boxes[20]",
-"}",
-"pathend_t");
-}
-
-// typedef struct pathend_t {
-// boxf nb; /* the node box */
-// pointf np; /* node port */
-// int sidemask;
-// int boxn;
-// boxf boxes[20];
-// } pathend_t; \ No newline at end of file
diff --git a/src/h/point.java b/src/h/point.java
deleted file mode 100644
index 8f6c3f8..0000000
--- a/src/h/point.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 axpj7c8u90q3k5tbk9sy03qy6
-
-public interface point extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int x, y",
-"}",
-"point");
-}
-
-// typedef struct { int x, y; } point; \ No newline at end of file
diff --git a/src/h/pointf.java b/src/h/pointf.java
deleted file mode 100644
index 02c8beb..0000000
--- a/src/h/pointf.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c2dqy43vdg0rr841peh6gqytj
-
-public interface pointf extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct pointf_s",
-"{",
-"double x, y",
-"}",
-"pointf");
-}
-
-// typedef struct pointf_s { double x, y; } pointf; \ No newline at end of file
diff --git a/src/h/pointnlink_t.java b/src/h/pointnlink_t.java
deleted file mode 100644
index e01096e..0000000
--- a/src/h/pointnlink_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3pqj1ldfe9xn0d28j7xc7apm0
-
-public interface pointnlink_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct pointnlink_t",
-"{",
-"Ppoint_t *pp",
-"struct pointnlink_t *link",
-"}",
-"pointnlink_t");
-}
-
-// typedef struct pointnlink_t {
-// Ppoint_t *pp;
-// struct pointnlink_t *link;
-// } pointnlink_t; \ No newline at end of file
diff --git a/src/h/port.java b/src/h/port.java
deleted file mode 100644
index daacea6..0000000
--- a/src/h/port.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 71w78cxaan0929s365t8kncr6
-
-public interface port extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct port",
-"{",
-"pointf p",
-"double theta",
-"boxf *bp",
-"boolean defined",
-"boolean constrained",
-"boolean clip",
-"boolean dyna",
-"unsigned char order",
-"unsigned char side",
-"char *name",
-"}",
-"port");
-}
-
-// typedef struct port { /* internal edge endpoint specification */
-// pointf p; /* aiming point relative to node center */
-// double theta; /* slope in radians */
-// boxf *bp; /* if not null, points to bbox of
-// * rectangular area that is port target
-// */
-// boolean defined; /* if true, edge has port info at this end */
-// boolean constrained; /* if true, constraints such as theta are set */
-// boolean clip; /* if true, clip end to node/port shape */
-// boolean dyna; /* if true, assign compass point dynamically */
-// unsigned char order; /* for mincross */
-// unsigned char side; /* if port is on perimeter of node, this
-// * contains the bitwise OR of the sides (TOP,
-// * BOTTOM, etc.) it is on.
-// */
-// char *name; /* port name, if it was explicitly given, otherwise NULL */
-// } port; \ No newline at end of file
diff --git a/src/h/rawgraph.java b/src/h/rawgraph.java
deleted file mode 100644
index 37c5dc9..0000000
--- a/src/h/rawgraph.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3gcy12n7txwt4m8zgbj4peo1e
-
-public interface rawgraph extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int nvs",
-"vertex* vertices",
-"}",
-"rawgraph");
-}
-
-// typedef struct {
-// int nvs;
-// vertex* vertices;
-// } rawgraph; \ No newline at end of file
diff --git a/src/h/rdr_t.java b/src/h/rdr_t.java
deleted file mode 100644
index 295808a..0000000
--- a/src/h/rdr_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8ps8r8mtrw6f5dhflc33s2dtg
-
-public interface rdr_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"const char *data",
-"int len",
-"int cur",
-"}",
-"rdr_t");
-}
-
-// typedef struct {
-// const char *data;
-// int len;
-// int cur;
-// } rdr_t; \ No newline at end of file
diff --git a/src/h/re_opcode_t.java b/src/h/re_opcode_t.java
deleted file mode 100644
index 8a64977..0000000
--- a/src/h/re_opcode_t.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 e3hfh80mtu75t9spasjqrsdrh
-
-public interface re_opcode_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"no_op = 0,",
-"succeed,",
-"exactn,",
-"anychar,",
-"charset,",
-"charset_not,",
-"start_memory,",
-"stop_memory,",
-"duplicate,",
-"begline,",
-"endline,",
-"begbuf,",
-"endbuf,",
-"jump,",
-"jump_past_alt,",
-"on_failure_jump,",
-"on_failure_keep_string_jump,",
-"pop_failure_jump,",
-"maybe_pop_jump,",
-"dummy_failure_jump,",
-"push_dummy_failure,",
-"succeed_n,",
-"jump_n,",
-"set_number_at, wordchar,",
-"notwordchar,",
-"wordbeg,",
-"wordend,",
-"wordbound,",
-"notwordbound",
-"}",
-"re_opcode_t");
-}
-
-// typedef enum
-// {
-// no_op = 0,
-//
-// /* Succeed right away--no more backtracking. */
-// succeed,
-//
-// /* Followed by one byte giving n, then by n literal bytes. */
-// exactn,
-//
-// /* Matches any (more or less) character. */
-// anychar,
-//
-// /* Matches any one char belonging to specified set. First
-// following byte is number of bitmap bytes. Then come bytes
-// for a bitmap saying which chars are in. Bits in each byte
-// are ordered low-bit-first. A character is in the set if its
-// bit is 1. A character too large to have a bit in the map is
-// automatically not in the set. */
-// charset,
-//
-// /* Same parameters as charset, but match any character that is
-// not one of those specified. */
-// charset_not,
-//
-// /* Start remembering the text that is matched, for storing in a
-// register. Followed by one byte with the register number, in
-// the range 0 to one less than the pattern buffer's re_nsub
-// field. Then followed by one byte with the number of groups
-// inner to this one. (This last has to be part of the
-// start_memory only because we need it in the on_failure_jump
-// of re_match_2.) */
-// start_memory,
-//
-// /* Stop remembering the text that is matched and store it in a
-// memory register. Followed by one byte with the register
-// number, in the range 0 to one less than `re_nsub' in the
-// pattern buffer, and one byte with the number of inner groups,
-// just like `start_memory'. (We need the number of inner
-// groups here because we don't have any easy way of finding the
-// corresponding start_memory when we're at a stop_memory.) */
-// stop_memory,
-//
-// /* Match a duplicate of something remembered. Followed by one
-// byte containing the register number. */
-// duplicate,
-//
-// /* Fail unless at beginning of line. */
-// begline,
-//
-// /* Fail unless at end of line. */
-// endline,
-//
-// /* Succeeds if at beginning of buffer (if emacs) or at beginning
-// of string to be matched (if not). */
-// begbuf,
-//
-// /* Analogously, for end of buffer/string. */
-// endbuf,
-//
-// /* Followed by two byte relative address to which to jump. */
-// jump,
-//
-// /* Same as jump, but marks the end of an alternative. */
-// jump_past_alt,
-//
-// /* Followed by two-byte relative address of place to resume at
-// in case of failure. */
-// on_failure_jump,
-//
-// /* Like on_failure_jump, but pushes a placeholder instead of the
-// current string position when executed. */
-// on_failure_keep_string_jump,
-//
-// /* Throw away latest failure point and then jump to following
-// two-byte relative address. */
-// pop_failure_jump,
-//
-// /* Change to pop_failure_jump if know won't have to backtrack to
-// match; otherwise change to jump. This is used to jump
-// back to the beginning of a repeat. If what follows this jump
-// clearly won't match what the repeat does, such that we can be
-// sure that there is no use backtracking out of repetitions
-// already matched, then we change it to a pop_failure_jump.
-// Followed by two-byte address. */
-// maybe_pop_jump,
-//
-// /* Jump to following two-byte address, and push a dummy failure
-// point. This failure point will be thrown away if an attempt
-// is made to use it for a failure. A `+' construct makes this
-// before the first repeat. Also used as an intermediary kind
-// of jump when compiling an alternative. */
-// dummy_failure_jump,
-//
-// /* Push a dummy failure point and continue. Used at the end of
-// alternatives. */
-// push_dummy_failure,
-//
-// /* Followed by two-byte relative address and two-byte number n.
-// After matching N times, jump to the address upon failure. */
-// succeed_n,
-//
-// /* Followed by two-byte relative address, and two-byte number n.
-// Jump to the address N times, then fail. */
-// jump_n,
-//
-// /* Set the following two-byte relative address to the
-// subsequent two-byte number. The address *includes* the two
-// bytes of number. */
-// set_number_at,
-//
-// wordchar, /* Matches any word-constituent character. */
-// notwordchar, /* Matches any char that is not a word-constituent. */
-//
-// wordbeg, /* Succeeds if at word beginning. */
-// wordend, /* Succeeds if at word end. */
-//
-// wordbound, /* Succeeds if at a word boundary. */
-// notwordbound /* Succeeds if not at a word boundary. */
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-// } re_opcode_t; \ No newline at end of file
diff --git a/src/h/re_pattern_buffer.java b/src/h/re_pattern_buffer.java
deleted file mode 100644
index b041a54..0000000
--- a/src/h/re_pattern_buffer.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3hom62aciieyjg8pgbfmp1qik
-
-public interface re_pattern_buffer extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct re_pattern_buffer",
-"{",
-"unsigned char *buffer",
-"unsigned long int allocated",
-"unsigned long int used",
-"reg_syntax_t syntax",
-"char *fastmap",
-"char * translate",
-"size_t re_nsub",
-"unsigned can_be_null : 1",
-"unsigned regs_allocated : 2",
-"unsigned fastmap_accurate : 1",
-"unsigned no_sub : 1",
-"unsigned not_bol : 1",
-"unsigned not_eol : 1",
-"unsigned newline_anchor : 1",
-"}");
-}
-
-// struct re_pattern_buffer
-// {
-// /* [[[begin pattern_buffer]]] */
-// /* Space that holds the compiled pattern. It is declared as
-// `unsigned char *' because its elements are
-// sometimes used as array indexes. */
-// unsigned char *buffer;
-//
-// /* Number of bytes to which `buffer' points. */
-// unsigned long int allocated;
-//
-// /* Number of bytes actually used in `buffer'. */
-// unsigned long int used;
-//
-// /* Syntax setting with which the pattern was compiled. */
-// reg_syntax_t syntax;
-//
-// /* Pointer to a fastmap, if any, otherwise zero. re_search uses
-// the fastmap, if there is one, to skip over impossible
-// starting points for matches. */
-// char *fastmap;
-//
-// /* Either a translate table to apply to all characters before
-// comparing them, or zero for no translation. The translation
-// is applied to a pattern when it is compiled and to a string
-// when it is matched. */
-// char * translate;
-//
-// /* Number of subexpressions found by the compiler. */
-// size_t re_nsub;
-//
-// /* Zero if this pattern cannot match the empty string, one else.
-// Well, in truth it's used only in `re_search_2', to see
-// whether or not we should use the fastmap, so we don't set
-// this absolutely perfectly; see `re_compile_fastmap' (the
-// `duplicate' case). */
-// unsigned can_be_null : 1;
-//
-// /* If REGS_UNALLOCATED, allocate space in the `regs' structure
-// for `max (RE_NREGS, re_nsub + 1)' groups.
-// If REGS_REALLOCATE, reallocate space if necessary.
-// If REGS_FIXED, use what's there. */
-//
-//
-//
-// unsigned regs_allocated : 2;
-//
-// /* Set to zero when `regex_compile' compiles a pattern; set to one
-// by `re_compile_fastmap' if it updates the fastmap. */
-// unsigned fastmap_accurate : 1;
-//
-// /* If set, `re_match_2' does not return information about
-// subexpressions. */
-// unsigned no_sub : 1;
-//
-// /* If set, a beginning-of-line anchor doesn't match at the
-// beginning of the string. */
-// unsigned not_bol : 1;
-//
-// /* Similarly for an end-of-line anchor. */
-// unsigned not_eol : 1;
-//
-// /* If true, an anchor at a newline matches. */
-// unsigned newline_anchor : 1;
-//
-// /* [[[end pattern_buffer]]] */
-// }; \ No newline at end of file
diff --git a/src/h/re_registers.java b/src/h/re_registers.java
deleted file mode 100644
index 1198356..0000000
--- a/src/h/re_registers.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 c6l7vumjull8d6poh7y1xqrct
-
-public interface re_registers extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"struct re_registers",
-"{",
-"unsigned num_regs",
-"regoff_t *start",
-"regoff_t *end",
-"}");
-}
-
-// struct re_registers
-// {
-// unsigned num_regs;
-// regoff_t *start;
-// regoff_t *end;
-// }; \ No newline at end of file
diff --git a/src/h/refstr_t.java b/src/h/refstr_t.java
deleted file mode 100644
index 833aa0d..0000000
--- a/src/h/refstr_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 61ughvl20d1mf5vtkmd94wfy
-
-public interface refstr_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct refstr_t",
-"{",
-"Dtlink_t link",
-"unsigned long refcnt",
-"char *s",
-"char store[1]",
-"}",
-"refstr_t");
-}
-
-// typedef struct refstr_t {
-// Dtlink_t link;
-// unsigned long refcnt;
-// char *s;
-// char store[1]; /* this is actually a dynamic array */
-// } refstr_t; \ No newline at end of file
diff --git a/src/h/reg_errcode_t.java b/src/h/reg_errcode_t.java
deleted file mode 100644
index 4b21da9..0000000
--- a/src/h/reg_errcode_t.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 ap7c4ii9ux7nlggs68fm76fy6
-
-public interface reg_errcode_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"REG_NOERROR = 0,",
-"REG_NOMATCH,",
-"REG_BADPAT,",
-"REG_ECOLLATE,",
-"REG_ECTYPE,",
-"REG_EESCAPE,",
-"REG_ESUBREG,",
-"REG_EBRACK,",
-"REG_EPAREN,",
-"REG_EBRACE,",
-"REG_BADBR,",
-"REG_ERANGE,",
-"REG_ESPACE,",
-"REG_BADRPT,",
-"REG_EEND,",
-"REG_ESIZE,",
-"REG_ERPAREN",
-"}",
-"reg_errcode_t");
-}
-
-// typedef enum
-// {
-// REG_NOERROR = 0, /* Success. */
-// REG_NOMATCH, /* Didn't find a match (for regexec). */
-//
-// /* POSIX regcomp return error codes. (In the order listed in the
-// standard.) */
-// REG_BADPAT, /* Invalid pattern. */
-// REG_ECOLLATE, /* Not implemented. */
-// REG_ECTYPE, /* Invalid character class name. */
-// REG_EESCAPE, /* Trailing backslash. */
-// REG_ESUBREG, /* Invalid back reference. */
-// REG_EBRACK, /* Unmatched left bracket. */
-// REG_EPAREN, /* Parenthesis imbalance. */
-// REG_EBRACE, /* Unmatched \{. */
-// REG_BADBR, /* Invalid contents of \{\}. */
-// REG_ERANGE, /* Invalid range end. */
-// REG_ESPACE, /* Ran out of memory. */
-// REG_BADRPT, /* No preceding re for repetition op. */
-//
-// /* Error codes we've added. */
-// REG_EEND, /* Premature end. */
-// REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
-// REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
-// } reg_errcode_t; \ No newline at end of file
diff --git a/src/h/regex_t.java b/src/h/regex_t.java
deleted file mode 100644
index 9c20a8e..0000000
--- a/src/h/regex_t.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-//2 a0207gwp8wnf6l2kb9poka4m4
-
-public interface regex_t extends re_pattern_buffer {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct re_pattern_buffer regex_t");
-}
-
-// typedef struct re_pattern_buffer regex_t; \ No newline at end of file
diff --git a/src/h/register_info_type.java b/src/h/register_info_type.java
deleted file mode 100644
index ef64ec0..0000000
--- a/src/h/register_info_type.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 32aq50hgdk3miqrwc4915dj1o
-
-public interface register_info_type extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef union",
-"{",
-"fail_stack_elt_t word",
-"struct",
-"{",
-"unsigned match_null_string_p : 2",
-"unsigned is_active : 1",
-"unsigned matched_something : 1",
-"unsigned ever_matched_something : 1",
-"}",
-"bits",
-"}",
-"register_info_type");
-}
-
-// typedef union
-// {
-// fail_stack_elt_t word;
-// struct
-// {
-// /* This field is one if this group can match the empty string,
-// zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
-//
-// unsigned match_null_string_p : 2;
-// unsigned is_active : 1;
-// unsigned matched_something : 1;
-// unsigned ever_matched_something : 1;
-// } bits;
-// } register_info_type; \ No newline at end of file
diff --git a/src/h/regmatch_t.java b/src/h/regmatch_t.java
deleted file mode 100644
index ebe8355..0000000
--- a/src/h/regmatch_t.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 pj9qzzazlscp3s43o8lug1br
-
-public interface regmatch_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"regoff_t rm_so",
-"regoff_t rm_eo",
-"}",
-"regmatch_t");
-}
-
-// typedef struct
-// {
-// regoff_t rm_so; /* Byte offset from string's start to substring's start. */
-// regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
-// } regmatch_t; \ No newline at end of file
diff --git a/src/h/route.java b/src/h/route.java
deleted file mode 100644
index 471bb5b..0000000
--- a/src/h/route.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5fq657all5l5bqizkuz5ggrdj
-
-public interface route extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int n",
-"segment* segs",
-"}",
-"route");
-}
-
-// typedef struct {
-// int n;
-// segment* segs;
-// } route; \ No newline at end of file
diff --git a/src/h/same_t.java b/src/h/same_t.java
deleted file mode 100644
index 1b78805..0000000
--- a/src/h/same_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8c359dwrpz9nffi3rk433ukjt
-
-public interface same_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct same_t",
-"{",
-"char *id",
-"elist l",
-"int n_arr",
-"double arr_len",
-"}",
-"same_t");
-}
-
-// typedef struct same_t {
-// char *id; /* group id */
-// elist l; /* edges in the group */
-// int n_arr; /* number of edges with arrows */
-// double arr_len; /* arrow length of an edge in the group */
-// } same_t; \ No newline at end of file
diff --git a/src/h/save_e_t.java b/src/h/save_e_t.java
deleted file mode 100644
index 2abfef2..0000000
--- a/src/h/save_e_t.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 24xdytkhdvt79rfwsa7gp6do2
-
-public interface save_e_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct save_e_s",
-"{",
-"Agnode_t *from, *to",
-"}",
-"save_e_t");
-}
-
-// typedef struct save_e_s {
-// Agnode_t *from, *to;
-// } save_e_t; \ No newline at end of file
diff --git a/src/h/save_stack_t.java b/src/h/save_stack_t.java
deleted file mode 100644
index 932c642..0000000
--- a/src/h/save_stack_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9a1whydr7ixbfnkje6ytmde8t
-
-public interface save_stack_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct save_stack_s",
-"{",
-"save_e_t *mem",
-"int stacksize",
-"}",
-"save_stack_t");
-}
-
-// typedef struct save_stack_s {
-// save_e_t *mem;
-// int stacksize;
-// } save_stack_t; \ No newline at end of file
diff --git a/src/h/sedge.java b/src/h/sedge.java
deleted file mode 100644
index 07f3812..0000000
--- a/src/h/sedge.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 15ruicbgesimuhfhph6r72639
-
-public interface sedge extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct sedge sedge");
-}
-
-// typedef struct sedge sedge; \ No newline at end of file
diff --git a/src/h/seedMode.java b/src/h/seedMode.java
deleted file mode 100644
index b301782..0000000
--- a/src/h/seedMode.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 7n29466qjouzyf7izmjndudt5
-
-public interface seedMode extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef enum",
-"{",
-"seed_unset, seed_val, seed_time, seed_regular",
-"}",
-"seedMode");
-}
-
-// typedef enum {
-// seed_unset, seed_val, seed_time, seed_regular
-// } seedMode; \ No newline at end of file
diff --git a/src/h/segitem_t.java b/src/h/segitem_t.java
deleted file mode 100644
index cd4c813..0000000
--- a/src/h/segitem_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 btsf9u7kgq9gvrmm3ikqza2ix
-
-public interface segitem_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct segitem_s",
-"{",
-"pointf p",
-"struct segitem_s* next",
-"}",
-"segitem_t");
-}
-
-// typedef struct segitem_s {
-// pointf p;
-// struct segitem_s* next;
-// } segitem_t; \ No newline at end of file
diff --git a/src/h/segment.java b/src/h/segment.java
deleted file mode 100644
index 9f3bafc..0000000
--- a/src/h/segment.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 chpljvx1wjvc6a9wott6pl7mo
-
-public interface segment extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct segment",
-"{",
-"boolean isVert",
-"boolean flipped",
-"double comm_coord",
-"paird p",
-"bend l1, l2",
-"int ind_no",
-"int track_no",
-"struct segment* prev",
-"struct segment* next",
-"}",
-"segment");
-}
-
-// typedef struct segment {
-// boolean isVert;
-// boolean flipped;
-// double comm_coord; /* the common coordinate */
-// paird p; /* end points */
-// bend l1, l2;
-// int ind_no; /* index number of this segment in its channel */
-// int track_no; /* track number assigned in the channel */
-// struct segment* prev;
-// struct segment* next;
-// } segment; \ No newline at end of file
diff --git a/src/h/segment_t.java b/src/h/segment_t.java
deleted file mode 100644
index 941f597..0000000
--- a/src/h/segment_t.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 4p5dhxpx14ooxgkym0hnv7g04
-
-public interface segment_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"pointf v0, v1",
-"int is_inserted",
-"int root0, root1",
-"int next",
-"int prev",
-"}",
-"segment_t");
-}
-
-// typedef struct {
-// pointf v0, v1; /* two endpoints */
-// int is_inserted; /* inserted in trapezoidation yet ? */
-// int root0, root1; /* root nodes in Q */
-// int next; /* Next logical segment */
-// int prev; /* Previous segment */
-// } segment_t; \ No newline at end of file
diff --git a/src/h/sfont_t.java b/src/h/sfont_t.java
deleted file mode 100644
index 69dad64..0000000
--- a/src/h/sfont_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 e0z0hnt02wemy4xf87o17z7cp
-
-public interface sfont_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct sfont_t",
-"{",
-"textfont_t *cfont",
-"struct sfont_t *pfont",
-"}",
-"sfont_t");
-}
-
-// typedef struct sfont_t {
-// textfont_t *cfont;
-// struct sfont_t *pfont;
-// } sfont_t; \ No newline at end of file
diff --git a/src/h/sgraph.java b/src/h/sgraph.java
deleted file mode 100644
index a6aba9c..0000000
--- a/src/h/sgraph.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 dxskpbv74lxltj165fmgf70cp
-
-public interface sgraph extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int nnodes, nedges",
-"int save_nnodes, save_nedges",
-"snode* nodes",
-"sedge* edges",
-"}",
-"sgraph");
-}
-
-// typedef struct {
-// int nnodes, nedges;
-// int save_nnodes, save_nedges;
-// snode* nodes;
-// sedge* edges;
-// } sgraph; \ No newline at end of file
diff --git a/src/h/shape_desc.java b/src/h/shape_desc.java
deleted file mode 100644
index acbe140..0000000
--- a/src/h/shape_desc.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8ger4o0h260ys1ca9fc7x46eq
-
-public interface shape_desc extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct shape_desc",
-"{",
-"char *name",
-"shape_functions *fns",
-"polygon_t *polygon",
-"boolean usershape",
-"}",
-"shape_desc");
-}
-
-// typedef struct shape_desc { /* read-only shape descriptor */
-// char *name; /* as read from graph file */
-// shape_functions *fns;
-// polygon_t *polygon; /* base polygon info */
-// boolean usershape;
-// } shape_desc; \ No newline at end of file
diff --git a/src/h/shape_functions.java b/src/h/shape_functions.java
deleted file mode 100644
index 291fd42..0000000
--- a/src/h/shape_functions.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5mip14tura2l8b750vykgeun3
-
-public interface shape_functions extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct shape_functions",
-"{",
-"void (*initfn) (node_t *)",
-"void (*freefn) (node_t *)",
-"port(*portfn) (node_t *, char *, char *)",
-"boolean(*insidefn) (inside_t * inside_context, pointf)",
-"int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr)",
-"void (*codefn) (GVJ_t * job, node_t * n)",
-"}",
-"shape_functions");
-}
-
-// typedef struct shape_functions { /* read-only shape functions */
-// void (*initfn) (node_t *); /* initializes shape from node u.shape_info structure */
-// void (*freefn) (node_t *); /* frees shape from node u.shape_info structure */
-// port(*portfn) (node_t *, char *, char *); /* finds aiming point and slope of port */
-// boolean(*insidefn) (inside_t * inside_context, pointf); /* clips incident gvc->e spline on shape of gvc->n */
-// int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr); /* finds box path to reach port */
-// void (*codefn) (GVJ_t * job, node_t * n); /* emits graphics code for node */
-// } shape_functions; \ No newline at end of file
diff --git a/src/h/shape_t.java b/src/h/shape_t.java
deleted file mode 100644
index f4ed6ea..0000000
--- a/src/h/shape_t.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 a6qcq27iylfbrgiga37cxkr9t
-
-public interface shape_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct shape_t",
-"{",
-"int nstrokes",
-"stroke_t *strokes",
-"}",
-"shape_t");
-}
-
-// typedef struct shape_t { /* mutable shape information for a node */
-// int nstrokes; /* number of strokes in array */
-// stroke_t *strokes; /* array of strokes */
-// /* The last stroke must always be closed, but can be pen_up.
-// * It is used as the clipping path */
-// } shape_t; \ No newline at end of file
diff --git a/src/h/snode.java b/src/h/snode.java
deleted file mode 100644
index 2b91f82..0000000
--- a/src/h/snode.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 dp60xuei2ue2x586frihti3gr
-
-public interface snode extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct snode snode");
-}
-
-// typedef struct snode snode; \ No newline at end of file
diff --git a/src/h/snodeitem.java b/src/h/snodeitem.java
deleted file mode 100644
index 831983b..0000000
--- a/src/h/snodeitem.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 d89g0gupg4cmbfbww7yqebufn
-
-public interface snodeitem extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"snode* np",
-"pointf p",
-"Dtlink_t link",
-"}",
-"snodeitem");
-}
-
-// typedef struct {
-// snode* np;
-// pointf p;
-// Dtlink_t link;
-// } snodeitem; \ No newline at end of file
diff --git a/src/h/splineInfo.java b/src/h/splineInfo.java
deleted file mode 100644
index 9dc3222..0000000
--- a/src/h/splineInfo.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8u1r3c3d0g8hn19fq04x9z0ht
-
-public interface splineInfo extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"boolean(*swapEnds) (edge_t * e)",
-"boolean(*splineMerge) (node_t * n)",
-"boolean ignoreSwap",
-"boolean isOrtho",
-"}",
-"splineInfo");
-}
-
-// typedef struct {
-// boolean(*swapEnds) (edge_t * e); /* Should head and tail be swapped? */
-// boolean(*splineMerge) (node_t * n); /* Is n a node in the middle of an edge? */
-// boolean ignoreSwap; /* Test for swapped edges if false */
-// boolean isOrtho; /* Orthogonal routing used */
-// } splineInfo; \ No newline at end of file
diff --git a/src/h/spline_info_t.java b/src/h/spline_info_t.java
deleted file mode 100644
index 9cf5708..0000000
--- a/src/h/spline_info_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 368du94hwpmwj2vxjibw1kyxw
-
-public interface spline_info_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"int LeftBound, RightBound, Splinesep, Multisep",
-"boxf* Rank_box",
-"}",
-"spline_info_t");
-}
-
-// typedef struct {
-// int LeftBound, RightBound, Splinesep, Multisep;
-// boxf* Rank_box;
-// } spline_info_t; \ No newline at end of file
diff --git a/src/h/splines.java b/src/h/splines.java
deleted file mode 100644
index dc88d33..0000000
--- a/src/h/splines.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 966xu1ddmyus6hb8a0jpk0mxv
-
-public interface splines extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct splines",
-"{",
-"bezier *list",
-"int size",
-"boxf bb",
-"}",
-"splines");
-}
-
-// typedef struct splines {
-// bezier *list;
-// int size;
-// boxf bb;
-// } splines; \ No newline at end of file
diff --git a/src/h/textlabel_t.java b/src/h/textlabel_t.java
deleted file mode 100644
index bc4f78f..0000000
--- a/src/h/textlabel_t.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 9qqo4pt0x97lv7fp9yneflgkr
-
-public interface textlabel_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct textlabel_t",
-"{",
-"char *text, *fontname, *fontcolor",
-"int charset",
-"double fontsize",
-"pointf dimen",
-"pointf space",
-"pointf pos",
-"union",
-"{",
-"struct",
-"{",
-"textspan_t *span",
-"short nspans",
-"}",
-"txt",
-"htmllabel_t *html",
-"}",
-"u",
-"char valign",
-"boolean set",
-"boolean html",
-"}",
-"textlabel_t");
-}
-
-// typedef struct textlabel_t {
-// char *text, *fontname, *fontcolor;
-// int charset;
-// double fontsize;
-// pointf dimen; /* the diagonal size of the label (estimated by layout) */
-// pointf space; /* the diagonal size of the space for the label */
-// /* the rendered label is aligned in this box */
-// /* space does not include pad or margin */
-// pointf pos; /* the center of the space for the label */
-// union {
-// struct {
-// textspan_t *span;
-// short nspans;
-// } txt;
-// htmllabel_t *html;
-// } u;
-// char valign; /* 't' 'c' 'b' */
-// boolean set; /* true if position is set */
-// boolean html; /* true if html label */
-// } textlabel_t; \ No newline at end of file
diff --git a/src/h/textspan_t.java b/src/h/textspan_t.java
deleted file mode 100644
index 4d8a916..0000000
--- a/src/h/textspan_t.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 3u5j54p26whh9zkbxuboqgjl8
-
-public interface textspan_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"char *str",
-"textfont_t *font",
-"void *layout",
-"void (*free_layout) (void *layout)",
-"double yoffset_layout, yoffset_centerline",
-"pointf size",
-"char just",
-"}",
-"textspan_t");
-}
-
-// typedef struct {
-// char *str; /* stored in utf-8 */
-// textfont_t *font;
-// void *layout;
-// void (*free_layout) (void *layout); /* FIXME - this is ugly */
-// double yoffset_layout, yoffset_centerline;
-// pointf size;
-// char just; /* 'l' 'n' 'r' */ /* FIXME */
-// } textspan_t; \ No newline at end of file
diff --git a/src/h/tna_t.java b/src/h/tna_t.java
deleted file mode 100644
index ea2419a..0000000
--- a/src/h/tna_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 8b2ok0k4502ln9ebjmmz8i24b
-
-public interface tna_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct tna_t",
-"{",
-"double t",
-"Ppoint_t a[2]",
-"}",
-"tna_t");
-}
-
-// typedef struct tna_t {
-// double t;
-// Ppoint_t a[2];
-// } tna_t; \ No newline at end of file
diff --git a/src/h/triangle_t.java b/src/h/triangle_t.java
deleted file mode 100644
index a245cca..0000000
--- a/src/h/triangle_t.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 5ecxnf8ebe9n3gyiow712oltk
-
-public interface triangle_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct triangle_t",
-"{",
-"int mark",
-"struct tedge_t e[3]",
-"}",
-"triangle_t");
-}
-
-// typedef struct triangle_t {
-// int mark;
-// struct tedge_t e[3];
-// } triangle_t; \ No newline at end of file
diff --git a/src/h/xlabel_t.java b/src/h/xlabel_t.java
deleted file mode 100644
index 4ac3c87..0000000
--- a/src/h/xlabel_t.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program:
- *
- *************************************************************************
- * Copyright (c) 2011 AT&T Intellectual Property
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: See CVS logs. Details at http://www.graphviz.org/
- *************************************************************************
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package h;
-import java.util.Arrays;
-import java.util.List;
-
-import smetana.core.__ptr__;
-
-//2 cguvocw1bak2n3x4pc98z410a
-
-public interface xlabel_t extends __ptr__ {
- public static List<String> DEFINITION = Arrays.asList(
-"typedef struct",
-"{",
-"pointf sz",
-"pointf pos",
-"void *lbl",
-"unsigned char set",
-"}",
-"xlabel_t");
-}
-
-// typedef struct {
-// pointf sz; /* Size of label (input) */
-// pointf pos; /* Position of lower-left corner of label (output) */
-// void *lbl; /* Pointer to label in the graph */
-// unsigned char set; /* True if the position has been set (input/output) */
-// } xlabel_t; \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/project2/TimeElement.java b/src/net/sourceforge/plantuml/AFile.java
index e8f6bca..f27bbdc 100644
--- a/src/net/sourceforge/plantuml/project2/TimeElement.java
+++ b/src/net/sourceforge/plantuml/AFile.java
@@ -30,21 +30,25 @@
*
*
* Original Author: Arnaud Roques
- *
+ *
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
-public interface TimeElement extends Comparable<TimeElement> {
+public interface AFile {
- public long getTypicalDuration();
+ public InputStream open() throws IOException;
- public long getStartUTC();
+ public boolean isOk();
- public long getEndUTC();
+ public AParentFolder getParentFile();
- public TimeElement next();
+ public String getAbsolutePath();
- public TimeElement previous();
+ public File getUnderlyingFile();
}
diff --git a/src/net/sourceforge/plantuml/AFileRegular.java b/src/net/sourceforge/plantuml/AFileRegular.java
new file mode 100644
index 0000000..406af3c
--- /dev/null
+++ b/src/net/sourceforge/plantuml/AFileRegular.java
@@ -0,0 +1,89 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class AFileRegular implements AFile {
+
+ private final File file;
+
+ @Override
+ public String toString() {
+ return "AFileRegular::" + file;
+ }
+
+ public AFileRegular(File file) {
+ this.file = file;
+ }
+
+ public InputStream open() throws IOException {
+ return new FileInputStream(file);
+ }
+
+ public boolean isOk() {
+ return file.exists() && file.isDirectory() == false;
+ }
+
+ @Override
+ public int hashCode() {
+ return file.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof AFileRegular == false) {
+ return false;
+ }
+ return this.file.equals(((AFileRegular) obj).file);
+ }
+
+ public AParentFolder getParentFile() {
+ return new AParentFolderRegular(file.getParentFile());
+ }
+
+ public String getAbsolutePath() {
+ return file.getAbsolutePath();
+ }
+
+ public File getUnderlyingFile() {
+ return file;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/AFileZipEntry.java b/src/net/sourceforge/plantuml/AFileZipEntry.java
new file mode 100644
index 0000000..cf3cb05
--- /dev/null
+++ b/src/net/sourceforge/plantuml/AFileZipEntry.java
@@ -0,0 +1,124 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+public class AFileZipEntry implements AFile {
+
+ private final File zipFile;
+ private final String entry;
+
+ public AFileZipEntry(File file, String entry) {
+ this.zipFile = file;
+ this.entry = entry;
+ }
+
+ @Override
+ public String toString() {
+ return "AFileZipEntry::" + zipFile + " " + entry;
+ }
+
+ public InputStream open() throws IOException {
+ final ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile));
+ ZipEntry ze = zis.getNextEntry();
+
+ while (ze != null) {
+ final String fileName = ze.getName();
+ if (ze.isDirectory()) {
+ } else if (fileName.trim().equalsIgnoreCase(entry.trim())) {
+ return zis;
+ }
+ ze = zis.getNextEntry();
+ }
+ zis.closeEntry();
+ zis.close();
+ throw new IOException();
+ }
+
+ public boolean isOk() {
+ if (zipFile.exists() && zipFile.isDirectory() == false) {
+ InputStream is = null;
+ try {
+ is = open();
+ return true;
+ } catch (IOException e) {
+ // e.printStackTrace();
+ } finally {
+ try {
+ if (is != null) {
+ is.close();
+ }
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return zipFile.hashCode() + entry.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof AFileZipEntry == false) {
+ return false;
+ }
+ final AFileZipEntry other = (AFileZipEntry) obj;
+ return this.zipFile.equals(other.zipFile) && this.entry.equals(other.entry);
+ }
+
+ public AParentFolder getParentFile() {
+ return new AParentFolderZip(zipFile, entry);
+ }
+
+ public String getAbsolutePath() {
+ return zipFile.getAbsolutePath() + "~" + entry;
+ }
+
+ public File getUnderlyingFile() {
+ return zipFile;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/project2/Ressource.java b/src/net/sourceforge/plantuml/AParentFolder.java
index 5ea2a80..a9aa699 100644
--- a/src/net/sourceforge/plantuml/project2/Ressource.java
+++ b/src/net/sourceforge/plantuml/AParentFolder.java
@@ -30,17 +30,15 @@
*
*
* Original Author: Arnaud Roques
- *
+ *
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml;
-public class Ressource {
+import java.io.IOException;
- private final String code;
+public interface AParentFolder {
- public Ressource(String code) {
- this.code = code;
- }
+ public AFile getAFile(String nameOrPath) throws IOException;
}
diff --git a/src/net/sourceforge/plantuml/AParentFolderRegular.java b/src/net/sourceforge/plantuml/AParentFolderRegular.java
new file mode 100644
index 0000000..0c68e25
--- /dev/null
+++ b/src/net/sourceforge/plantuml/AParentFolderRegular.java
@@ -0,0 +1,71 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml;
+
+import java.io.File;
+import java.io.IOException;
+
+public class AParentFolderRegular implements AParentFolder {
+
+ private final File dir;
+
+ public AParentFolderRegular(File dir) {
+ this.dir = dir;
+ Log.info("Creating AParentFolderRegular " + dir);
+ }
+
+ @Override
+ public String toString() {
+ return "AParentFolderRegular::" + (dir == null ? "NULL" : dir.getAbsolutePath());
+ }
+
+ public AFile getAFile(String nameOrPath) throws IOException {
+ final File filecurrent;
+ Log.info("AParentFolderRegular::looking for " + nameOrPath);
+ Log.info("AParentFolderRegular::dir = " + dir);
+ if (dir == null) {
+ filecurrent = new File(nameOrPath);
+ } else {
+ filecurrent = new File(dir.getAbsoluteFile(), nameOrPath);
+ }
+ Log.info("AParentFolderRegular::Filecurrent " + filecurrent);
+ if (filecurrent.exists()) {
+ return new AFileRegular(filecurrent.getCanonicalFile());
+ }
+ return null;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/AParentFolderZip.java b/src/net/sourceforge/plantuml/AParentFolderZip.java
new file mode 100644
index 0000000..744459c
--- /dev/null
+++ b/src/net/sourceforge/plantuml/AParentFolderZip.java
@@ -0,0 +1,76 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml;
+
+import java.io.File;
+import java.io.IOException;
+
+public class AParentFolderZip implements AParentFolder {
+
+ private final File zipFile;
+ private final String parent;
+
+ @Override
+ public String toString() {
+ return "AParentFolderZip::" + zipFile + " " + parent;
+ }
+
+ public AParentFolderZip(File zipFile, String entry) {
+ this.zipFile = zipFile;
+ final int idx = entry.lastIndexOf('/');
+ if (idx == -1) {
+ parent = "";
+ } else {
+ parent = entry.substring(0, idx + 1);
+ }
+ }
+
+ public AFile getAFile(String nameOrPath) throws IOException {
+ return new AFileZipEntry(zipFile, merge(parent + nameOrPath));
+ }
+
+ String merge(String full) {
+ // full = full.replaceFirst("\\.", "Z");
+ while (true) {
+ int len = full.length();
+ full = full.replaceFirst("[^/]+/\\.\\./", "");
+ if (full.length() == len) {
+ return full;
+ }
+ }
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/Annotated.java b/src/net/sourceforge/plantuml/Annotated.java
index 7bf7596..4201f0d 100644
--- a/src/net/sourceforge/plantuml/Annotated.java
+++ b/src/net/sourceforge/plantuml/Annotated.java
@@ -35,6 +35,7 @@
*/
package net.sourceforge.plantuml;
+import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.DisplayPositionned;
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
@@ -50,4 +51,6 @@ public interface Annotated {
public DisplaySection getFooter();
+ public Display getMainFrame();
+
}
diff --git a/src/net/sourceforge/plantuml/AnnotatedWorker.java b/src/net/sourceforge/plantuml/AnnotatedWorker.java
index 0331b08..3911dad 100644
--- a/src/net/sourceforge/plantuml/AnnotatedWorker.java
+++ b/src/net/sourceforge/plantuml/AnnotatedWorker.java
@@ -35,35 +35,97 @@
*/
package net.sourceforge.plantuml;
+import java.awt.geom.Dimension2D;
+import java.awt.geom.Rectangle2D;
+
import net.sourceforge.plantuml.activitydiagram3.ftile.EntityImageLegend;
+import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.DisplayPositionned;
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
+import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.HtmlColorUtils;
+import net.sourceforge.plantuml.graphic.InnerStrategy;
+import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.svek.DecorateEntityImage;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
+import net.sourceforge.plantuml.ugraphic.MinMax;
+import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.UTranslate;
public class AnnotatedWorker {
private final Annotated annotated;
private final ISkinParam skinParam;
+ private final StringBounder stringBounder;
- public AnnotatedWorker(Annotated annotated, ISkinParam skinParam) {
+ public AnnotatedWorker(Annotated annotated, ISkinParam skinParam, StringBounder stringBounder) {
this.annotated = annotated;
this.skinParam = skinParam;
-
+ this.stringBounder = stringBounder;
}
public TextBlockBackcolored addAdd(TextBlock result) {
- result = addLegend(result);
result = addTitle(result);
+ result = addFrame(result);
+ result = addLegend(result);
result = addCaption(result);
result = addHeaderAndFooter(result);
return (TextBlockBackcolored) result;
}
+ public TextBlock addFrame(final TextBlock original) {
+ final Display mainFrame = annotated.getMainFrame();
+ if (mainFrame == null) {
+ return original;
+ }
+
+ final double x1 = 5;
+ final double x2 = 7;
+ final double y1 = 10;
+ final double y2 = 10;
+
+ final SymbolContext symbolContext = new SymbolContext(getSkinParam().getBackgroundColor(), HtmlColorUtils.BLACK)
+ .withShadow(getSkinParam().shadowing(null));
+ final TextBlock title = mainFrame.create(new FontConfiguration(getSkinParam(), FontParam.CAPTION, null),
+ HorizontalAlignment.CENTER, getSkinParam());
+ final Dimension2D dimTitle = title.calculateDimension(stringBounder);
+ final Dimension2D dimOriginal = original.calculateDimension(stringBounder);
+ final double width = x1 + Math.max(dimOriginal.getWidth(), dimTitle.getWidth()) + x2;
+ final double height = dimTitle.getHeight() + y1 + dimOriginal.getHeight() + y2;
+ final TextBlock result = USymbol.FRAME.asBig(title, HorizontalAlignment.LEFT, TextBlockUtils.empty(0, 0),
+ width, height, symbolContext);
+
+ return new TextBlockBackcolored() {
+
+ public void drawU(UGraphic ug) {
+ result.drawU(ug);
+ original.drawU(ug.apply(new UTranslate(x1, y1 + dimTitle.getHeight())));
+ }
+
+ public MinMax getMinMax(StringBounder stringBounder) {
+ return TextBlockUtils.getMinMax(result, stringBounder);
+ }
+
+ public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
+ return result.getInnerPosition(member, stringBounder, strategy);
+ }
+
+ public Dimension2D calculateDimension(StringBounder stringBounder) {
+ return result.calculateDimension(stringBounder);
+ }
+
+ public HtmlColor getBackcolor() {
+ return symbolContext.getBackColor();
+ }
+ };
+ }
+
private TextBlock addLegend(TextBlock original) {
final DisplayPositionned legend = annotated.getLegend();
if (legend.isNull()) {
@@ -117,11 +179,13 @@ public class AnnotatedWorker {
}
TextBlock textFooter = null;
if (footer.isNull() == false) {
- textFooter = footer.createRibbon(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null), getSkinParam());
+ textFooter = footer.createRibbon(new FontConfiguration(getSkinParam(), FontParam.FOOTER, null),
+ getSkinParam());
}
TextBlock textHeader = null;
if (header.isNull() == false) {
- textHeader = header.createRibbon(new FontConfiguration(getSkinParam(), FontParam.HEADER, null), getSkinParam());
+ textHeader = header.createRibbon(new FontConfiguration(getSkinParam(), FontParam.HEADER, null),
+ getSkinParam());
}
return DecorateEntityImage.addTopAndBottom(original, textHeader, header.getHorizontalAlignment(), textFooter,
diff --git a/src/net/sourceforge/plantuml/BackSlash.java b/src/net/sourceforge/plantuml/BackSlash.java
index 1985c19..60308b3 100644
--- a/src/net/sourceforge/plantuml/BackSlash.java
+++ b/src/net/sourceforge/plantuml/BackSlash.java
@@ -96,6 +96,10 @@ public class BackSlash {
if (s == null) {
return null;
}
+ // final String tmps = s.toString();
+ // if (tmps.indexOf('\\') == -1) {
+ // return tmps;
+ // }
final StringBuilder result = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
final char c = s.charAt(i);
diff --git a/src/net/sourceforge/plantuml/BlockUml.java b/src/net/sourceforge/plantuml/BlockUml.java
index 70dfbf8..0c37d16 100644
--- a/src/net/sourceforge/plantuml/BlockUml.java
+++ b/src/net/sourceforge/plantuml/BlockUml.java
@@ -54,12 +54,11 @@ import net.sourceforge.plantuml.version.Version;
public class BlockUml {
private final List<CharSequence2> data;
- private final int startLine;
private Diagram system;
private final Defines localDefines;
BlockUml(String... strings) {
- this(convert(strings), 0, Defines.createEmpty());
+ this(convert(strings), Defines.createEmpty());
}
public String getEncodedUrl() throws IOException {
@@ -93,8 +92,7 @@ public class BlockUml {
return result;
}
- public BlockUml(List<CharSequence2> strings, int startLine, Defines defines) {
- this.startLine = startLine;
+ public BlockUml(List<CharSequence2> strings, Defines defines) {
this.localDefines = defines;
final CharSequence2 s0 = strings.get(0).trin();
if (StartUtils.startsWithSymbolAnd("start", s0) == false) {
@@ -132,15 +130,11 @@ public class BlockUml {
public Diagram getDiagram() {
if (system == null) {
- system = new PSystemBuilder().createPSystem(data, startLine);
+ system = new PSystemBuilder().createPSystem(data);
}
return system;
}
- public final int getStartLine() {
- return startLine;
- }
-
public final List<CharSequence2> getData() {
return data;
}
diff --git a/src/net/sourceforge/plantuml/BlockUmlBuilder.java b/src/net/sourceforge/plantuml/BlockUmlBuilder.java
index ef1587a..c7311b3 100644
--- a/src/net/sourceforge/plantuml/BlockUmlBuilder.java
+++ b/src/net/sourceforge/plantuml/BlockUmlBuilder.java
@@ -45,10 +45,13 @@ import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.DefinesGet;
import net.sourceforge.plantuml.preproc.FileWithSuffix;
-import net.sourceforge.plantuml.preproc.Preprocessor;
+import net.sourceforge.plantuml.preproc.ImportedFiles;
+import net.sourceforge.plantuml.preproc.ReadLineNumbered;
import net.sourceforge.plantuml.preproc.ReadLineReader;
import net.sourceforge.plantuml.preproc.UncommentReadLine;
+import net.sourceforge.plantuml.preproc2.Preprocessor2;
import net.sourceforge.plantuml.utils.StartUtils;
public final class BlockUmlBuilder implements DefinitionsContainer {
@@ -60,11 +63,12 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
public BlockUmlBuilder(List<String> config, String charset, Defines defines, Reader reader, File newCurrentDir,
String desc) throws IOException {
- Preprocessor includer = null;
+ ReadLineNumbered includer = null;
this.defines = defines;
try {
reader2 = new UncommentReadLine(ReadLineReader.create(reader, desc));
- includer = new Preprocessor(config, reader2, charset, defines, newCurrentDir, this);
+ includer = new Preprocessor2(config, reader2, charset, defines, this,
+ ImportedFiles.createImportedFiles(new AParentFolderRegular(newCurrentDir)));
init(includer);
} finally {
if (includer != null) {
@@ -78,16 +82,15 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
this(config, charset, defines, reader, null, null);
}
- private void init(Preprocessor includer) throws IOException {
+ private void init(ReadLineNumbered includer) throws IOException {
CharSequence2 s = null;
List<CharSequence2> current2 = null;
boolean paused = false;
- int startLine = 0;
+
while ((s = includer.readLine()) != null) {
if (StartUtils.isArobaseStartDiagram(s)) {
current2 = new ArrayList<CharSequence2>();
paused = false;
- startLine = includer.getLineNumber();
}
if (StartUtils.isArobasePauseDiagram(s)) {
paused = true;
@@ -114,7 +117,7 @@ public final class BlockUmlBuilder implements DefinitionsContainer {
if (paused) {
current2.add(s);
}
- blocks.add(new BlockUml(current2, startLine/* - config.size() */, defines.cloneMe()));
+ blocks.add(new BlockUml(current2, defines.cloneMe()));
current2 = null;
reader2.setPaused(false);
}
diff --git a/src/net/sourceforge/plantuml/ErrorUml.java b/src/net/sourceforge/plantuml/ErrorUml.java
index f1e25e4..638b1b1 100644
--- a/src/net/sourceforge/plantuml/ErrorUml.java
+++ b/src/net/sourceforge/plantuml/ErrorUml.java
@@ -44,13 +44,11 @@ public class ErrorUml {
private final ErrorUmlType type;
private SuggestEngineResult suggest;
private final LineLocation lineLocation;
-// private final int startLine;
public ErrorUml(ErrorUmlType type, String error, LineLocation lineLocation) {
- if (error == null || type == null || StringUtils.isEmpty(error)) {
+ if (error == null || type == null) {
throw new IllegalArgumentException();
}
-// this.startLine = startLine;
this.error = error;
this.type = type;
this.lineLocation = lineLocation;
diff --git a/src/net/sourceforge/plantuml/FileSystem.java b/src/net/sourceforge/plantuml/FileSystem.java
index bb6768c..2db8af2 100644
--- a/src/net/sourceforge/plantuml/FileSystem.java
+++ b/src/net/sourceforge/plantuml/FileSystem.java
@@ -56,9 +56,9 @@ public class FileSystem {
}
public void setCurrentDir(File dir) {
- if (dir == null) {
- throw new IllegalArgumentException();
- }
+ // if (dir == null) {
+ // throw new IllegalArgumentException();
+ // }
Log.info("Setting current dir: " + dir);
this.currentDir.set(dir);
}
@@ -76,22 +76,26 @@ public class FileSystem {
if (filecurrent.exists()) {
return filecurrent.getCanonicalFile();
}
- for (File d : getPath("plantuml.include.path")) {
- final File file = new File(d, nameOrPath);
- if (file.exists()) {
- return file.getCanonicalFile();
+ for (File d : getPath("plantuml.include.path", true)) {
+ if (d.isDirectory()) {
+ final File file = new File(d, nameOrPath);
+ if (file.exists()) {
+ return file.getCanonicalFile();
+ }
}
}
- for (File d : getPath("java.class.path")) {
- final File file = new File(d, nameOrPath);
- if (file.exists()) {
- return file.getCanonicalFile();
+ for (File d : getPath("java.class.path", true)) {
+ if (d.isDirectory()) {
+ final File file = new File(d, nameOrPath);
+ if (file.exists()) {
+ return file.getCanonicalFile();
+ }
}
}
return filecurrent;
}
- private List<File> getPath(String prop) {
+ public static List<File> getPath(String prop, boolean onlyDir) {
final List<File> result = new ArrayList<File>();
String paths = System.getProperty(prop);
if (paths == null) {
@@ -101,7 +105,7 @@ public class FileSystem {
final StringTokenizer st = new StringTokenizer(paths, System.getProperty("path.separator"));
while (st.hasMoreTokens()) {
final File f = new File(st.nextToken());
- if (f.exists() && f.isDirectory()) {
+ if (f.exists() && (onlyDir == false || f.isDirectory())) {
result.add(f);
}
}
diff --git a/src/net/sourceforge/plantuml/FontParam.java b/src/net/sourceforge/plantuml/FontParam.java
index 2ebfca7..d718d29 100644
--- a/src/net/sourceforge/plantuml/FontParam.java
+++ b/src/net/sourceforge/plantuml/FontParam.java
@@ -45,6 +45,7 @@ interface FontParamConstant {
}
public enum FontParam {
+ TIMING(12, Font.PLAIN), //
ACTIVITY(12, Font.PLAIN), //
ACTIVITY_DIAMOND(11, Font.PLAIN), //
// ACTIVITY_ARROW(11, Font.PLAIN), //
@@ -118,8 +119,7 @@ public enum FontParam {
STACK_STEREOTYPE(14, Font.ITALIC), //
ACTOR_STEREOTYPE(14, Font.ITALIC), //
SEQUENCE_STEREOTYPE(14, Font.ITALIC), //
- PARTITION(14, Font.PLAIN),
- DESIGNED_DOMAIN(12, Font.PLAIN), //
+ PARTITION(14, Font.PLAIN), DESIGNED_DOMAIN(12, Font.PLAIN), //
DESIGNED_DOMAIN_STEREOTYPE(12, Font.ITALIC), //
DOMAIN(12, Font.PLAIN), //
DOMAIN_STEREOTYPE(12, Font.ITALIC), //
diff --git a/src/net/sourceforge/plantuml/ISkinParam.java b/src/net/sourceforge/plantuml/ISkinParam.java
index 22aed02..81730a0 100644
--- a/src/net/sourceforge/plantuml/ISkinParam.java
+++ b/src/net/sourceforge/plantuml/ISkinParam.java
@@ -45,7 +45,6 @@ import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.ArrowDirection;
import net.sourceforge.plantuml.svek.ConditionStyle;
import net.sourceforge.plantuml.svek.PackageStyle;
-import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke;
@@ -69,7 +68,7 @@ public interface ISkinParam extends ISkinSimple {
public UFont getFont(Stereotype stereotype, boolean inPackageTitle, FontParam... fontParam);
- public HorizontalAlignment getHorizontalAlignment(AlignmentParam param, ArrowDirection arrowDirection);
+ public HorizontalAlignment getHorizontalAlignment(AlignmentParam param, ArrowDirection arrowDirection, boolean isReverseDefine);
public HorizontalAlignment getDefaultTextAlignment(HorizontalAlignment defaultValue);
@@ -79,17 +78,15 @@ public interface ISkinParam extends ISkinSimple {
public int classAttributeIconSize();
- public ColorMapper getColorMapper();
-
public DotSplines getDotSplines();
public String getDotExecutable();
- public boolean shadowing();
+ public boolean shadowing(Stereotype stereotype);
public boolean shadowingForNote(Stereotype stereotype);
- public boolean shadowing2(SkinParameter skinParameter);
+ public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter);
public PackageStyle getPackageStyle();
@@ -160,5 +157,7 @@ public interface ISkinParam extends ISkinSimple {
public boolean responseMessageBelowArrow();
public boolean svgDimensionStyle();
+
+ public boolean fixCircleLabelOverlapping();
} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/ISkinSimple.java b/src/net/sourceforge/plantuml/ISkinSimple.java
index e8568f0..84e0e53 100644
--- a/src/net/sourceforge/plantuml/ISkinSimple.java
+++ b/src/net/sourceforge/plantuml/ISkinSimple.java
@@ -36,6 +36,7 @@
package net.sourceforge.plantuml;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
+import net.sourceforge.plantuml.ugraphic.ColorMapper;
public interface ISkinSimple extends SpriteContainer {
@@ -50,5 +51,9 @@ public interface ISkinSimple extends SpriteContainer {
public IHtmlColorSet getIHtmlColorSet();
public int getDpi();
+
+ public LineBreakStrategy wrapWidth();
+
+ public ColorMapper getColorMapper();
} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/LineLocationImpl.java b/src/net/sourceforge/plantuml/LineLocationImpl.java
index af4524b..659c43a 100644
--- a/src/net/sourceforge/plantuml/LineLocationImpl.java
+++ b/src/net/sourceforge/plantuml/LineLocationImpl.java
@@ -82,8 +82,18 @@ public class LineLocationImpl implements LineLocation {
return parent;
}
+ private boolean isStandardLibrary() {
+ return desc.startsWith("<");
+ }
+
public int compareTo(LineLocation other) {
final LineLocationImpl other2 = (LineLocationImpl) other;
+ if (this.isStandardLibrary() && other2.isStandardLibrary() == false) {
+ return -1;
+ }
+ if (this.isStandardLibrary() == false && other2.isStandardLibrary()) {
+ return 1;
+ }
return this.position - other2.position;
}
diff --git a/src/net/sourceforge/plantuml/Option.java b/src/net/sourceforge/plantuml/Option.java
index 0968f8f..4bb0e8d 100644
--- a/src/net/sourceforge/plantuml/Option.java
+++ b/src/net/sourceforge/plantuml/Option.java
@@ -281,6 +281,11 @@ public class Option {
OptionPrint.printLicense();
} else if (s.equalsIgnoreCase("-checkversion")) {
OptionPrint.checkVersion();
+ } else if (s.startsWith("-DPLANTUML_LIMIT_SIZE=")) {
+ final String v = s.substring("-DPLANTUML_LIMIT_SIZE=".length());
+ if (v.matches("\\d+")) {
+ System.setProperty("PLANTUML_LIMIT_SIZE", v);
+ }
} else if (s.startsWith("-D")) {
manageDefine(s.substring(2));
} else if (s.startsWith("-S")) {
diff --git a/src/net/sourceforge/plantuml/OptionFlags.java b/src/net/sourceforge/plantuml/OptionFlags.java
index c0588d4..1869b4f 100644
--- a/src/net/sourceforge/plantuml/OptionFlags.java
+++ b/src/net/sourceforge/plantuml/OptionFlags.java
@@ -87,7 +87,6 @@ public class OptionFlags {
}
private void reset(boolean exit) {
- // keepTmpFiles = false;
verbose = false;
extractFromMetadata = false;
word = false;
@@ -96,7 +95,6 @@ public class OptionFlags {
quiet = false;
checkDotError = false;
printFonts = false;
- // useSuggestEngine = true;
// failOnError = false;
encodesprite = false;
// PIC_LINE = false;
@@ -106,7 +104,6 @@ public class OptionFlags {
return false;
}
- // private boolean keepTmpFiles;
private boolean verbose;
private boolean extractFromMetadata;
private boolean word;
@@ -115,7 +112,6 @@ public class OptionFlags {
private boolean quiet;
private boolean checkDotError;
private boolean printFonts;
- // private boolean useSuggestEngine;
private boolean encodesprite;
private boolean dumpHtmlStats;
private boolean dumpStats;
@@ -123,6 +119,7 @@ public class OptionFlags {
private boolean overwrite;
private boolean enableStats = defaultForStats();
private boolean stdLib;
+ private boolean silentlyCompletelyIgnoreErrors;
private boolean extractStdLib;
private boolean clipboardLoop;
private boolean clipboard;
@@ -257,14 +254,6 @@ public class OptionFlags {
return false;
}
- // public final boolean isUseSuggestEngine() {
- // return useSuggestEngine;
- // }
- //
- // public final void setUseSuggestEngine(boolean useSuggestEngine) {
- // this.useSuggestEngine = useSuggestEngine;
- // }
-
public final boolean isEncodesprite() {
return encodesprite;
}
@@ -368,4 +357,12 @@ public class OptionFlags {
public final void setStdLib(boolean stdLib) {
this.stdLib = stdLib;
}
+
+ public final boolean isSilentlyCompletelyIgnoreErrors() {
+ return silentlyCompletelyIgnoreErrors;
+ }
+
+ public final void setSilentlyCompletelyIgnoreErrors(boolean silentlyCompletelyIgnoreErrors) {
+ this.silentlyCompletelyIgnoreErrors = silentlyCompletelyIgnoreErrors;
+ }
}
diff --git a/src/net/sourceforge/plantuml/OptionPrint.java b/src/net/sourceforge/plantuml/OptionPrint.java
index bd3e6e2..edae8e3 100644
--- a/src/net/sourceforge/plantuml/OptionPrint.java
+++ b/src/net/sourceforge/plantuml/OptionPrint.java
@@ -146,6 +146,7 @@ public class OptionPrint {
System.out.println(" -extractstdlib\tTo extract PlantUML Standard Library into stdlib folder");
System.out.println(" -filename \"example.puml\"\tTo override %filename% variable");
System.out.println(" -preproc\t\tTo output preprocessor text of diagrams");
+ System.out.println(" -cypher\t\tTo cypher texts of diagrams so that you can share them");
System.out.println();
System.out.println("If needed, you can setup the environment variable GRAPHVIZ_DOT.");
exit();
@@ -159,7 +160,7 @@ public class OptionPrint {
}
public static void printLicense() throws InterruptedException {
- for (String s : License.getCurrent().getText()) {
+ for (String s : License.getCurrent().getText(false)) {
System.out.println(s);
}
exit();
diff --git a/src/net/sourceforge/plantuml/PSystemBuilder.java b/src/net/sourceforge/plantuml/PSystemBuilder.java
index 68d767c..41abd02 100644
--- a/src/net/sourceforge/plantuml/PSystemBuilder.java
+++ b/src/net/sourceforge/plantuml/PSystemBuilder.java
@@ -73,6 +73,7 @@ import net.sourceforge.plantuml.jungle.PSystemTreeFactory;
import net.sourceforge.plantuml.logo.PSystemLogoFactory;
import net.sourceforge.plantuml.math.PSystemLatexFactory;
import net.sourceforge.plantuml.math.PSystemMathFactory;
+import net.sourceforge.plantuml.nwdiag.NwDiagramFactory;
import net.sourceforge.plantuml.openiconic.PSystemListOpenIconicFactory;
import net.sourceforge.plantuml.openiconic.PSystemOpenIconicFactory;
import net.sourceforge.plantuml.oregon.PSystemOregonFactory;
@@ -94,14 +95,14 @@ public class PSystemBuilder {
public static final long startTime = System.currentTimeMillis();
- final public Diagram createPSystem(final List<CharSequence2> strings2, int startLine) {
+ final public Diagram createPSystem(final List<CharSequence2> strings2) {
final long now = System.currentTimeMillis();
Diagram result = null;
try {
final DiagramType type = DiagramType.getTypeFromArobaseStart(strings2.get(0).toString2());
- final UmlSource umlSource = new UmlSource(strings2, type == DiagramType.UML, startLine);
+ final UmlSource umlSource = new UmlSource(strings2, type == DiagramType.UML);
// int cpt = 0;
for (CharSequence2 s : strings2) {
@@ -167,6 +168,7 @@ public class PSystemBuilder {
factories.add(new PSystemSaltFactory(DiagramType.UML));
factories.add(new PSystemDotFactory(DiagramType.DOT));
factories.add(new PSystemDotFactory(DiagramType.UML));
+ factories.add(new NwDiagramFactory());
if (License.getCurrent() == License.GPL || License.getCurrent() == License.GPLV2) {
factories.add(new PSystemDitaaFactory(DiagramType.DITAA));
factories.add(new PSystemDitaaFactory(DiagramType.UML));
diff --git a/src/net/sourceforge/plantuml/PSystemError.java b/src/net/sourceforge/plantuml/PSystemError.java
index 407affa..8528ad6 100644
--- a/src/net/sourceforge/plantuml/PSystemError.java
+++ b/src/net/sourceforge/plantuml/PSystemError.java
@@ -37,6 +37,7 @@ package net.sourceforge.plantuml;
import java.awt.Color;
import java.awt.geom.Dimension2D;
import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
@@ -53,20 +54,28 @@ import net.sourceforge.plantuml.asciiart.UmlCharArea;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
+import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.eggs.PSystemWelcome;
+import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
+import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
+import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.GraphicPosition;
import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
+import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.InnerStrategy;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
+import net.sourceforge.plantuml.graphic.VerticalAlignment;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
import net.sourceforge.plantuml.ugraphic.MinMax;
+import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UImage;
import net.sourceforge.plantuml.ugraphic.UTranslate;
@@ -145,11 +154,15 @@ public class PSystemError extends AbstractPSystem {
} else {
udrawable = result;
}
- if (LicenseInfo.retrieveQuick().isValid() == false) {
- final int min = (int) (System.currentTimeMillis() / 60000L) % 60;
- if (min == 0) {
- udrawable = addMessage(udrawable);
- }
+ final int min = (int) (System.currentTimeMillis() / 60000L) % 60;
+ if (min == 1 && LicenseInfo.retrieveNamedOrDistributorQuickIsValid() == false) {
+ udrawable = addMessagePatreon(udrawable);
+ } else if (min == 15 && LicenseInfo.retrieveNamedOrDistributorQuickIsValid() == false) {
+ udrawable = addMessageLiberapay(udrawable);
+ } else if (min == 30 && LicenseInfo.retrieveNamedOrDistributorQuickIsValid() == false) {
+ udrawable = addMessageDedication(udrawable);
+ } else if (getSource().containsIgnoreCase("arecibo")) {
+ udrawable = addMessageArecibo(udrawable);
}
imageBuilder.setUDrawable(udrawable);
final ImageData imageData = imageBuilder.writeImageTOBEMOVED(fileFormat, seed(), os);
@@ -166,22 +179,124 @@ public class PSystemError extends AbstractPSystem {
return TextBlockUtils.mergeTB(welcome, result, HorizontalAlignment.LEFT);
}
- private TextBlock addMessage(final TextBlock source) throws IOException {
- final TextBlock message = getMessage();
+ private TextBlock addMessageLiberapay(final TextBlock source) throws IOException {
+ final TextBlock message = getMessageLiberapay();
TextBlock result = TextBlockUtils.mergeTB(message, source, HorizontalAlignment.LEFT);
result = TextBlockUtils.mergeTB(result, message, HorizontalAlignment.LEFT);
return result;
}
- private TextBlockBackcolored getMessage() {
- final UImage message = new UImage(PSystemVersion.getTime());
- final HtmlColor backImage = new HtmlColorSimple(new Color(message.getImage().getRGB(0, 0)), false);
- final double imWidth = message.getWidth();
- final double imHeight = message.getHeight();
+ private TextBlock addMessagePatreon(final TextBlock source) throws IOException {
+ final TextBlock message = getMessagePatreon();
+ TextBlock result = TextBlockUtils.mergeTB(message, source, HorizontalAlignment.LEFT);
+ result = TextBlockUtils.mergeTB(result, message, HorizontalAlignment.LEFT);
+ return result;
+ }
+
+ private TextBlock addMessageDedication(final TextBlock source) throws IOException {
+ final TextBlock message = getMessageDedication();
+ TextBlock result = TextBlockUtils.mergeTB(message, source, HorizontalAlignment.LEFT);
+ return result;
+ }
+
+ private TextBlock addMessageArecibo(final TextBlock source) throws IOException {
+ final UImage message = new UImage(PSystemVersion.getArecibo());
+ TextBlock result = TextBlockUtils.mergeLR(source, TextBlockUtils.fromUImage(message), VerticalAlignment.TOP);
+ return result;
+ }
+
+ private TextBlockBackcolored getMessageDedication() {
+ final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
+ final HtmlColorSimple backColor = (HtmlColorSimple) new HtmlColorSetSimple().getColorIfValid("#DFDCD3");
+
+ final BufferedImage qrcode = smaller(utils.exportFlashcode("http://plantuml.com/dedication", Color.BLACK,
+ backColor.getColor999()));
+ final Display disp = Display.create("<b>Add your own dedication into PlantUML", " ", "For just $5 per month!",
+ "Details on <i>[[http://plantuml.com/dedication]]");
+
+ final UFont font = UFont.sansSerif(14);
+ final FontConfiguration fc = new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLACK, false);
+ final TextBlock text = TextBlockUtils.withMargin(
+ disp.create(fc, HorizontalAlignment.LEFT, new SpriteContainerEmpty()), 10, 0);
+ final TextBlock result;
+ if (qrcode == null) {
+ result = text;
+ } else {
+ final UImage qr = new UImage(qrcode).scaleNearestNeighbor(3);
+ result = TextBlockUtils.mergeLR(text, TextBlockUtils.fromUImage(qr), VerticalAlignment.CENTER);
+ }
+ return TextBlockUtils.addBackcolor(result, backColor);
+
+ }
+
+ private TextBlockBackcolored getMessagePatreon() {
+ final UImage message = new UImage(PSystemVersion.getTime01());
+ final Color back = new Color(message.getImage().getRGB(0, 0));
+ final HtmlColor backColor = new HtmlColorSimple(back, false);
+
+ final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
+ final BufferedImage qrcode = smaller(utils.exportFlashcode("http://plantuml.com/patreon", Color.BLACK,
+ Color.WHITE));
+
+ final int scale = 2;
+
+ final double imWidth = message.getWidth() + (qrcode == null ? 0 : qrcode.getWidth() * scale + 20);
+ final double imHeight = qrcode == null ? message.getHeight() : Math.max(message.getHeight(), qrcode.getHeight()
+ * scale + 10);
+ return new TextBlockBackcolored() {
+
+ public void drawU(UGraphic ug) {
+ if (qrcode == null) {
+ ug.apply(new UTranslate(1, 1)).draw(message);
+ } else {
+ final UImage qr = new UImage(qrcode).scaleNearestNeighbor(scale);
+ ug.apply(new UTranslate(1, (imHeight - message.getHeight()) / 2)).draw(message);
+ ug.apply(new UTranslate(1 + message.getWidth(), (imHeight - qr.getHeight()) / 2)).draw(qr);
+ }
+ }
+
+ public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
+ return null;
+ }
+
+ public Dimension2D calculateDimension(StringBounder stringBounder) {
+ return new Dimension2DDouble(imWidth + 1, imHeight + 1);
+ }
+
+ public MinMax getMinMax(StringBounder stringBounder) {
+ return MinMax.fromMax(imWidth + 1, imHeight + 1);
+ }
+
+ public HtmlColor getBackcolor() {
+ return backColor;
+ }
+ };
+
+ }
+
+ private TextBlockBackcolored getMessageLiberapay() {
+ final UImage message = new UImage(PSystemVersion.getTime15());
+ final Color back = new Color(message.getImage().getRGB(0, 0));
+ final HtmlColor backColor = new HtmlColorSimple(back, false);
+
+ final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
+ final BufferedImage qrcode = smaller(utils.exportFlashcode("http://plantuml.com/lp", Color.BLACK, Color.WHITE));
+
+ final int scale = 2;
+
+ final double imWidth = message.getWidth() + (qrcode == null ? 0 : qrcode.getWidth() * scale + 20);
+ final double imHeight = qrcode == null ? message.getHeight() : Math.max(message.getHeight(), qrcode.getHeight()
+ * scale + 10);
return new TextBlockBackcolored() {
public void drawU(UGraphic ug) {
- ug.apply(new UTranslate(1, 1)).draw(message);
+ if (qrcode == null) {
+ ug.apply(new UTranslate(1, 1)).draw(message);
+ } else {
+ final UImage qr = new UImage(qrcode).scaleNearestNeighbor(scale);
+ ug.apply(new UTranslate(1, (imHeight - message.getHeight()) / 2)).draw(message);
+ ug.apply(new UTranslate(1 + message.getWidth(), (imHeight - qr.getHeight()) / 2)).draw(qr);
+ }
}
public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
@@ -197,12 +312,20 @@ public class PSystemError extends AbstractPSystem {
}
public HtmlColor getBackcolor() {
- return backImage;
+ return backColor;
}
};
}
+ private BufferedImage smaller(BufferedImage im) {
+ if (im == null) {
+ return null;
+ }
+ final int nb = 1;
+ return im.getSubimage(nb, nb, im.getWidth() - 2 * nb, im.getHeight() - 2 * nb);
+ }
+
private List<String> getTextStrings() {
final List<String> result = new ArrayList<String>(getStack());
if (result.size() > 0) {
diff --git a/src/net/sourceforge/plantuml/project2/TaskImpl.java b/src/net/sourceforge/plantuml/QString.java
index ebbebc6..caeaea5 100644
--- a/src/net/sourceforge/plantuml/project2/TaskImpl.java
+++ b/src/net/sourceforge/plantuml/QString.java
@@ -30,61 +30,61 @@
*
*
* Original Author: Arnaud Roques
- *
+ *
*
*/
-package net.sourceforge.plantuml.project2;
-
-public class TaskImpl implements Task {
+package net.sourceforge.plantuml;
- private final String code;
- private TimeElement start;
- private TimeElement end;
- private int duration;
- private final TimeLine timeLine;
-
- public TaskImpl(TimeLine timeLine, String code) {
- this.code = code;
- this.timeLine = timeLine;
- }
+public class QString {
- public String getCode() {
- return code;
- }
+ private final String data;
+ private final long mask;
- public String getName() {
- return code;
+ public QString(String data) {
+ this.data = data;
+ this.mask = getMask(data);
}
-
- public long getLoad() {
- throw new UnsupportedOperationException();
+
+ @Override
+ public String toString() {
+ return data;
}
- public TimeElement getStart() {
- return start;
+ public boolean containsQ(QString other) {
+ if ((this.mask & other.mask) != other.mask) {
+ return false;
+ }
+ return this.data.contains(other.data);
}
- public TimeElement getEnd() {
- TimeElement result = start;
- for (int i = 1; i < duration; i++) {
- result = timeLine.next(result);
+ static long getMask(String s) {
+ long result = 0;
+ for (int i = 0; i < s.length(); i++) {
+ result |= getMask(s.charAt(i));
}
return result;
}
- public TimeElement getCompleted() {
- return timeLine.next(getEnd());
- }
-
- public void setStart(TimeElement exp) {
- this.start = exp;
- }
-
- public void setDuration(int value) {
- this.duration = value;
- }
-
- public void setLoad(int value) {
+ static long getMask(char c) {
+ if (c >= '0' && c <= '9') {
+ final int n = c - '0';
+ return 1L << n;
+ }
+ if (c >= 'a' && c <= 'z') {
+ final int n = c - 'a' + 10;
+ return 1L << n;
+ }
+ if (c >= 'A' && c <= 'Z') {
+ final int n = c - 'A' + 10 + 26;
+ return 1L << n;
+ }
+ if (c == '_') {
+ return 1L << (10 + 26 + 26);
+ }
+ if (c == '(') {
+ return 1L << 63;
+ }
+ return 0;
}
}
diff --git a/src/net/sourceforge/plantuml/Run.java b/src/net/sourceforge/plantuml/Run.java
index 7182af8..e19d033 100644
--- a/src/net/sourceforge/plantuml/Run.java
+++ b/src/net/sourceforge/plantuml/Run.java
@@ -460,7 +460,13 @@ public class Run {
System.out.println(f);
// new Metadata().readAndDisplayMetadata(f);
System.out.println();
- System.out.println(new MetadataTag(f, "plantuml").getData());
+ final String data = new MetadataTag(f, "plantuml").getData();
+ // File file = new File("tmp.txt");
+ // PrintWriter pw = new PrintWriter(file, "UTF-8");
+ // pw.println(NastyEncoder.fromISO_8859_1(data));
+ // pw.close();
+
+ System.out.println(data);
System.out.println("------------------------");
return false;
}
@@ -491,6 +497,9 @@ public class Run {
return false;
}
final List<GeneratedImage> result = sourceFileReader.getGeneratedImages();
+ if (result.size() == 0) {
+ Log.error("Warning: no image in " + f.getCanonicalPath());
+ }
return hasErrors(f, result);
}
diff --git a/src/net/sourceforge/plantuml/SignatureUtils.java b/src/net/sourceforge/plantuml/SignatureUtils.java
index ea0cf2d..7bca78b 100644
--- a/src/net/sourceforge/plantuml/SignatureUtils.java
+++ b/src/net/sourceforge/plantuml/SignatureUtils.java
@@ -52,14 +52,20 @@ import net.sourceforge.plantuml.code.AsciiEncoder;
public class SignatureUtils {
- public static byte[] salting(String pass, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException,
- UnsupportedEncodingException {
+// private static byte[] salting(String pass, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException,
+// UnsupportedEncodingException {
+// final byte[] tmp = salting2(pass, salt);
+// return SignatureUtils.getSHA512raw(tmp);
+// }
+
+ public static byte[] salting(String pass, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException {
final int iterations = 10000;
final int keyLength = 512;
final SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
final PBEKeySpec spec = new PBEKeySpec(pass.toCharArray(), salt, iterations, keyLength);
final SecretKey key = skf.generateSecret(spec);
- return SignatureUtils.getSHA512raw(key.getEncoded());
+ final byte[] tmp = key.getEncoded();
+ return tmp;
}
public static String getSignature(String s) {
diff --git a/src/net/sourceforge/plantuml/SkinParam.java b/src/net/sourceforge/plantuml/SkinParam.java
index 2216ab0..b8854da 100644
--- a/src/net/sourceforge/plantuml/SkinParam.java
+++ b/src/net/sourceforge/plantuml/SkinParam.java
@@ -415,6 +415,8 @@ public class SkinParam implements ISkinParam {
result.add("SameClassWidth");
result.add("HyperlinkUnderline");
result.add("Padding");
+ result.add("BoxPadding");
+ result.add("ParticipantPadding");
result.add("Guillemet");
result.add("SvglinkTarget");
result.add("DefaultMonospacedFontName");
@@ -431,6 +433,7 @@ public class SkinParam implements ISkinParam {
result.add("WrapWidth");
result.add("SwimlaneWidth");
result.add("SwimlaneWrapTitleWidth");
+ result.add("FixCircleLabelOverlapping");
for (FontParam p : EnumSet.allOf(FontParam.class)) {
final String h = humanName(p.name());
@@ -477,7 +480,8 @@ public class SkinParam implements ISkinParam {
return DotSplines.SPLINES;
}
- public HorizontalAlignment getHorizontalAlignment(AlignmentParam param, ArrowDirection arrowDirection) {
+ public HorizontalAlignment getHorizontalAlignment(AlignmentParam param, ArrowDirection arrowDirection,
+ boolean isReverseDefine) {
final String value;
switch (param) {
case sequenceMessageAlignment:
@@ -489,6 +493,19 @@ public class SkinParam implements ISkinParam {
default:
value = getValue(param.name());
}
+ if ("first".equalsIgnoreCase(value)) {
+ if (arrowDirection == ArrowDirection.RIGHT_TO_LEFT_REVERSE) {
+ if (isReverseDefine) {
+ return HorizontalAlignment.LEFT;
+ }
+ return HorizontalAlignment.RIGHT;
+ } else {
+ if (isReverseDefine) {
+ return HorizontalAlignment.RIGHT;
+ }
+ return HorizontalAlignment.LEFT;
+ }
+ }
if ("direction".equalsIgnoreCase(value)) {
if (arrowDirection == ArrowDirection.LEFT_TO_RIGHT_NORMAL) {
return HorizontalAlignment.LEFT;
@@ -559,7 +576,14 @@ public class SkinParam implements ISkinParam {
return new ColorMapperReverse(order);
}
- public boolean shadowing() {
+ public boolean shadowing(Stereotype stereotype) {
+ if (stereotype != null) {
+ checkStereotype(stereotype);
+ final String value2 = getValue("shadowing" + stereotype.getLabel(false));
+ if (value2 != null) {
+ return value2.equalsIgnoreCase("true");
+ }
+ }
final String value = getValue("shadowing");
if ("false".equalsIgnoreCase(value)) {
return false;
@@ -585,17 +609,25 @@ public class SkinParam implements ISkinParam {
if (value2 != null) {
return value2.equalsIgnoreCase("true");
}
- return shadowing();
+ return shadowing(stereotype);
}
- public boolean shadowing2(SkinParameter skinParameter) {
+ public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) {
if (skinParameter == null) {
throw new IllegalArgumentException();
}
final String name = skinParameter.getUpperCaseName();
+ if (stereotype != null) {
+ checkStereotype(stereotype);
+ final String value2 = getValue(name + "shadowing" + stereotype.getLabel(false));
+ if (value2 != null) {
+ return value2.equalsIgnoreCase("true");
+ }
+ }
+
final String value = getValue(name + "shadowing");
if (value == null) {
- return shadowing();
+ return shadowing(stereotype);
}
if ("false".equalsIgnoreCase(value)) {
return false;
@@ -1006,4 +1038,12 @@ public class SkinParam implements ISkinParam {
return true;
}
+ public boolean fixCircleLabelOverlapping() {
+ final String value = getValue("fixcirclelabeloverlapping");
+ if ("true".equalsIgnoreCase(value)) {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/SkinParamColors.java b/src/net/sourceforge/plantuml/SkinParamColors.java
index e8eab63..a0757b7 100644
--- a/src/net/sourceforge/plantuml/SkinParamColors.java
+++ b/src/net/sourceforge/plantuml/SkinParamColors.java
@@ -55,9 +55,9 @@ public class SkinParamColors extends SkinParamDelegator {
}
@Override
- public boolean shadowing() {
+ public boolean shadowing(Stereotype stereotype) {
if (colors.getShadowing() == null) {
- return super.shadowing();
+ return super.shadowing(stereotype);
}
return colors.getShadowing();
}
diff --git a/src/net/sourceforge/plantuml/SkinParamDelegator.java b/src/net/sourceforge/plantuml/SkinParamDelegator.java
index 854b150..afae945 100644
--- a/src/net/sourceforge/plantuml/SkinParamDelegator.java
+++ b/src/net/sourceforge/plantuml/SkinParamDelegator.java
@@ -103,20 +103,20 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.getDotExecutable();
}
- public HorizontalAlignment getHorizontalAlignment(AlignmentParam param, ArrowDirection arrowDirection) {
- return skinParam.getHorizontalAlignment(param, arrowDirection);
+ public HorizontalAlignment getHorizontalAlignment(AlignmentParam param, ArrowDirection arrowDirection, boolean isReverseDefine) {
+ return skinParam.getHorizontalAlignment(param, arrowDirection, isReverseDefine);
}
public ColorMapper getColorMapper() {
return skinParam.getColorMapper();
}
- public boolean shadowing() {
- return skinParam.shadowing();
+ public boolean shadowing(Stereotype stereotype) {
+ return skinParam.shadowing(stereotype);
}
- public boolean shadowing2(SkinParameter skinParameter) {
- return skinParam.shadowing2(skinParameter);
+ public boolean shadowing2(Stereotype stereotype, SkinParameter skinParameter) {
+ return skinParam.shadowing2(stereotype, skinParameter);
}
public PackageStyle getPackageStyle() {
@@ -299,4 +299,8 @@ public class SkinParamDelegator implements ISkinParam {
return skinParam.swimlaneWrapTitleWidth();
}
+ public boolean fixCircleLabelOverlapping() {
+ return skinParam.fixCircleLabelOverlapping();
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/SourceFileReader.java b/src/net/sourceforge/plantuml/SourceFileReader.java
index de35ddd..2e25b74 100644
--- a/src/net/sourceforge/plantuml/SourceFileReader.java
+++ b/src/net/sourceforge/plantuml/SourceFileReader.java
@@ -41,6 +41,7 @@ import java.util.Collections;
import java.util.List;
import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
public class SourceFileReader extends SourceFileReaderAbstract implements ISourceFileReader {
@@ -83,7 +84,7 @@ public class SourceFileReader extends SourceFileReaderAbstract implements ISourc
this.outputDirectory = outputDirectory;
builder = new BlockUmlBuilder(config, charset, defines, getReader(charset), file.getAbsoluteFile()
- .getParentFile(), file.getAbsolutePath());
+ .getParentFile(), FileWithSuffix.getFileName(file));
}
private File getDirIfDirectory(String newName) {
diff --git a/src/net/sourceforge/plantuml/SourceFileReader2.java b/src/net/sourceforge/plantuml/SourceFileReader2.java
index 1821a2e..49e7255 100644
--- a/src/net/sourceforge/plantuml/SourceFileReader2.java
+++ b/src/net/sourceforge/plantuml/SourceFileReader2.java
@@ -40,6 +40,7 @@ import java.io.IOException;
import java.util.List;
import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
public class SourceFileReader2 extends SourceFileReaderAbstract implements ISourceFileReader {
@@ -54,7 +55,7 @@ public class SourceFileReader2 extends SourceFileReaderAbstract implements ISour
FileSystem.getInstance().setCurrentDir(file.getAbsoluteFile().getParentFile());
builder = new BlockUmlBuilder(config, charset, defines, getReader(charset), file.getAbsoluteFile()
- .getParentFile(), file.getAbsolutePath());
+ .getParentFile(), FileWithSuffix.getFileName(file));
}
@Override
diff --git a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java
index 7b4bd12..5618445 100644
--- a/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java
+++ b/src/net/sourceforge/plantuml/SourceFileReaderAbstract.java
@@ -149,6 +149,10 @@ public abstract class SourceFileReaderAbstract {
return getCrashedImage(blockUml, t, suggested.getFile(0));
}
+ if (OptionFlags.getInstance().isSilentlyCompletelyIgnoreErrors() && system instanceof PSystemError) {
+ continue;
+ }
+
OptionFlags.getInstance().logData(file, system);
final List<FileImageData> exportDiagrams = PSystemUtils.exportDiagrams(system, suggested, fileFormatOption,
checkMetadata);
diff --git a/src/net/sourceforge/plantuml/SourceStringReader.java b/src/net/sourceforge/plantuml/SourceStringReader.java
index cd906e6..f12d3c0 100644
--- a/src/net/sourceforge/plantuml/SourceStringReader.java
+++ b/src/net/sourceforge/plantuml/SourceStringReader.java
@@ -75,21 +75,21 @@ public class SourceStringReader {
}
public SourceStringReader(Defines defines, String source, String charset, List<String> config) {
- this(defines, source, charset, config, null);
+ this(defines, source, charset, config, FileSystem.getInstance().getCurrentDir());
}
public SourceStringReader(Defines defines, String source, String charset, List<String> config, File newCurrentDir) {
- // WARNING GLOBAL LOCK HERE
- synchronized (SourceStringReader.class) {
- try {
- final BlockUmlBuilder builder = new BlockUmlBuilder(config, charset, defines, new StringReader(source),
- newCurrentDir, "string");
- this.blocks = builder.getBlockUmls();
- } catch (IOException e) {
- Log.error("error " + e);
- throw new IllegalStateException(e);
- }
+ // // WARNING GLOBAL LOCK HERE
+ // synchronized (SourceStringReader.class) {
+ try {
+ final BlockUmlBuilder builder = new BlockUmlBuilder(config, charset, defines, new StringReader(source),
+ newCurrentDir, "string");
+ this.blocks = builder.getBlockUmls();
+ } catch (IOException e) {
+ Log.error("error " + e);
+ throw new IllegalStateException(e);
}
+ // }
}
@Deprecated
diff --git a/src/net/sourceforge/plantuml/SpriteContainerEmpty.java b/src/net/sourceforge/plantuml/SpriteContainerEmpty.java
index 44dda63..ecfa892 100644
--- a/src/net/sourceforge/plantuml/SpriteContainerEmpty.java
+++ b/src/net/sourceforge/plantuml/SpriteContainerEmpty.java
@@ -38,6 +38,8 @@ package net.sourceforge.plantuml;
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced;
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
+import net.sourceforge.plantuml.ugraphic.ColorMapper;
+import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
import net.sourceforge.plantuml.ugraphic.sprite.SpriteImage;
@@ -75,4 +77,12 @@ public class SpriteContainerEmpty implements SpriteContainer, ISkinSimple {
return 96;
}
+ public LineBreakStrategy wrapWidth() {
+ return LineBreakStrategy.NONE;
+ }
+
+ public ColorMapper getColorMapper() {
+ return new ColorMapperIdentity();
+ }
+
} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/StringUtils.java b/src/net/sourceforge/plantuml/StringUtils.java
index bacf7df..c279c34 100644
--- a/src/net/sourceforge/plantuml/StringUtils.java
+++ b/src/net/sourceforge/plantuml/StringUtils.java
@@ -317,10 +317,6 @@ public class StringUtils {
return stringsToDisplay.size();
}
- private static boolean isSpaceOrTab(char c) {
- return c == ' ' || c == '\t';
- }
-
public static boolean isDiagramCacheable(String uml) {
uml = uml.toLowerCase();
if (uml.startsWith("@startuml\nversion\n")) {
@@ -490,11 +486,11 @@ public class StringUtils {
return arg.toString();
}
int i = 0;
- while (i < arg.length() && isSpaceOrTab(arg.charAt(i))) {
+ while (i < arg.length() && isSpaceOrTabOrNull(arg.charAt(i))) {
i++;
}
int j = arg.length() - 1;
- while (j >= i && isSpaceOrTab(arg.charAt(j))) {
+ while (j >= i && isSpaceOrTabOrNull(arg.charAt(j))) {
j--;
}
if (i == 0 && j == arg.length() - 1) {
@@ -503,5 +499,9 @@ public class StringUtils {
return arg.subSequence(i, j + 1).toString();
}
+ private static boolean isSpaceOrTabOrNull(char c) {
+ return c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\0';
+ }
+
// http://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html
}
diff --git a/src/net/sourceforge/plantuml/UmlDiagram.java b/src/net/sourceforge/plantuml/UmlDiagram.java
index 26ce1aa..2254ba8 100644
--- a/src/net/sourceforge/plantuml/UmlDiagram.java
+++ b/src/net/sourceforge/plantuml/UmlDiagram.java
@@ -35,6 +35,7 @@
*/
package net.sourceforge.plantuml;
+import java.awt.Color;
import java.awt.geom.AffineTransform;
import java.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
@@ -59,6 +60,7 @@ import net.sourceforge.plantuml.command.CommandExecutionResult;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
+import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.DisplayPositionned;
import net.sourceforge.plantuml.cucadiagram.DisplaySection;
import net.sourceforge.plantuml.cucadiagram.UnparsableGraphvizException;
@@ -97,6 +99,7 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
private DisplayPositionned legend = DisplayPositionned.none(HorizontalAlignment.CENTER, VerticalAlignment.BOTTOM);
private final DisplaySection header = DisplaySection.none();
private final DisplaySection footer = DisplaySection.none();
+ private Display mainFrame;
private final Pragma pragma = new Pragma();
private Animation animation;
@@ -110,6 +113,10 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
this.title = title;
}
+ final public void setMainFrame(Display mainFrame) {
+ this.mainFrame = mainFrame;
+ }
+
final public void setCaption(DisplayPositionned caption) {
this.caption = caption;
}
@@ -209,7 +216,9 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
throws IOException {
final HtmlColor hover = getSkinParam().getHoverPathColor();
- fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget());
+ if (fileFormatOption.getSvgLinkTarget() == null || fileFormatOption.getSvgLinkTarget().equals("_top")) {
+ fileFormatOption = fileFormatOption.withSvgLinkTarget(getSkinParam().getSvgLinkTarget());
+ }
fileFormatOption = fileFormatOption.withTikzFontDistortion(getSkinParam().getTikzFontDistortion());
if (hover != null) {
fileFormatOption = fileFormatOption.withHoverColor(StringUtils.getAsHtml(getSkinParam().getColorMapper()
@@ -254,7 +263,7 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
metadata, null, 0, 0, null, false);
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
- final BufferedImage im = utils.exportFlashcode(flash);
+ final BufferedImage im = utils.exportFlashcode(flash, Color.BLACK, Color.WHITE);
if (im != null) {
GraphvizCrash.addDecodeHint(strings);
}
@@ -428,11 +437,19 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
this.useJDot = useJDot;
}
+ public static final boolean FORCE_JDOT = false;
+
public boolean isUseJDot() {
+ if (FORCE_JDOT)
+ return true;
return useJDot;
}
- public void setDotExecutable(String dotExecutable) {
+ private void setDotExecutable(String dotExecutable) {
skinParam.setDotExecutable(dotExecutable);
}
+
+ public final Display getMainFrame() {
+ return mainFrame;
+ }
}
diff --git a/src/net/sourceforge/plantuml/UmlDiagramType.java b/src/net/sourceforge/plantuml/UmlDiagramType.java
index e2abea3..dee8a46 100644
--- a/src/net/sourceforge/plantuml/UmlDiagramType.java
+++ b/src/net/sourceforge/plantuml/UmlDiagramType.java
@@ -36,5 +36,5 @@
package net.sourceforge.plantuml;
public enum UmlDiagramType {
- SEQUENCE, STATE, CLASS, OBJECT, ACTIVITY, DESCRIPTION, COMPOSITE, FLOW, TIMING, BPM
+ SEQUENCE, STATE, CLASS, OBJECT, ACTIVITY, DESCRIPTION, COMPOSITE, FLOW, TIMING, BPM, NWDIAG
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java
index 2b037a8..34174c3 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ActivityDiagram3.java
@@ -57,6 +57,7 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockRecentred;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
@@ -194,11 +195,11 @@ public class ActivityDiagram3 extends UmlDiagram {
// COMPRESSION
TextBlock result = swinlanes;
// result = new TextBlockCompressedOnY(CompressionMode.ON_Y, result);
- // result = new TextBlockCompressedOnXorY(CompressionMode.ON_X, result);
+ result = new TextBlockCompressedOnXorY(CompressionMode.ON_X, result);
result = new TextBlockCompressedOnXorY(CompressionMode.ON_Y, result);
result = new TextBlockRecentred(result);
final ISkinParam skinParam = getSkinParam();
- result = new AnnotatedWorker(this, skinParam).addAdd(result);
+ result = new AnnotatedWorker(this, skinParam, fileFormatOption.getDefaultStringBounder()).addAdd(result);
// final Dimension2D dim = TextBlockUtils.getMinMax(result, fileFormatOption.getDefaultStringBounder())
// .getDimension();
final Dimension2D dim = result.getMinMax(fileFormatOption.getDefaultStringBounder()).getDimension();
@@ -389,10 +390,11 @@ public class ActivityDiagram3 extends UmlDiagram {
return CommandExecutionResult.ok();
}
- public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor) {
+ public void startGroup(Display name, HtmlColor backColor, HtmlColor titleColor, HtmlColor borderColor,
+ USymbol type, double roundCorner) {
manageSwimlaneStrategy();
final InstructionGroup instructionGroup = new InstructionGroup(current(), name, backColor, titleColor,
- swinlanes.getCurrentSwimlane(), borderColor, nextLinkRenderer());
+ swinlanes.getCurrentSwimlane(), borderColor, nextLinkRenderer(), type, roundCorner);
current().add(instructionGroup);
setCurrent(instructionGroup);
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java
index 87c6dd2..77e872b 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/Branch.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/Branch.java
@@ -76,12 +76,11 @@ public class Branch {
this.labelPositive = labelPositive;
this.color = color;
}
-
+
public Collection<WeldingPoint> getWeldingPoints() {
return ftile.getWeldingPoints();
}
-
public void add(Instruction ins) {
list.add(ins);
}
@@ -153,4 +152,14 @@ public class Branch {
return list.isOnlySingleStopOrSpot();
}
+ private LinkRendering special;
+
+ public void setSpecial(LinkRendering link) {
+ this.special = link;
+ }
+
+ public final LinkRendering getSpecial() {
+ return special;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java
index 951321f..d8cbe10 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionGroup.java
@@ -44,6 +44,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.activitydiagram3.ftile.vcompact.FtileWithNotes;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.sequencediagram.NotePosition;
import net.sourceforge.plantuml.sequencediagram.NoteType;
@@ -56,19 +57,23 @@ public class InstructionGroup implements Instruction, InstructionCollection {
private final HtmlColor borderColor;
private final HtmlColor titleColor;
private final LinkRendering linkRendering;
+ private final USymbol type;
private final Display test;
+ private final double roundCorner;
private PositionedNote note = null;
public InstructionGroup(Instruction parent, Display test, HtmlColor backColor, HtmlColor titleColor,
- Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering) {
+ Swimlane swimlane, HtmlColor borderColor, LinkRendering linkRendering, USymbol type, double roundCorner) {
this.list = new InstructionList(swimlane);
+ this.type = type;
this.linkRendering = linkRendering;
this.parent = parent;
this.test = test;
this.borderColor = borderColor;
this.backColor = backColor;
this.titleColor = titleColor;
+ this.roundCorner = roundCorner;
}
public void add(Instruction ins) {
@@ -80,7 +85,7 @@ public class InstructionGroup implements Instruction, InstructionCollection {
if (note != null) {
tmp = new FtileWithNotes(tmp, Collections.singleton(note), factory.skinParam());
}
- return factory.createGroup(tmp, test, backColor, titleColor, null, borderColor);
+ return factory.createGroup(tmp, test, backColor, titleColor, null, borderColor, type, roundCorner);
}
public Instruction getParent() {
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java
index 3d6c7cf..0d870f3 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/InstructionIf.java
@@ -128,7 +128,8 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
if (elseBranch != null) {
return false;
}
- this.current.setInlinkRendering(nextLinkRenderer);
+ // this.current.setInlinkRendering(nextLinkRenderer);
+ this.current.setSpecial(nextLinkRenderer);
this.current = new Branch(swimlane, whenThen, test, color, inlabel);
this.thens.add(current);
return true;
@@ -140,6 +141,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
if (elseBranch == null) {
this.elseBranch = new Branch(swimlane, Display.NULL, Display.NULL, null, Display.NULL);
}
+ this.elseBranch.setSpecial(nextLinkRenderer);
this.current.setInlinkRendering(nextLinkRenderer);
}
@@ -149,7 +151,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
if (branch.getLast().kill() == false) {
return false;
}
- if (elseBranch != null && elseBranch.getLast()!=null && elseBranch.getLast().kill() == false) {
+ if (elseBranch != null && elseBranch.getLast() != null && elseBranch.getLast().kill() == false) {
return false;
}
return true;
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java
index f876040..7ae1357 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandGroup3.java
@@ -42,6 +42,7 @@ import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
+import net.sourceforge.plantuml.graphic.USymbol;
public class CommandGroup3 extends SingleLineCommand2<ActivityDiagram3> {
@@ -59,7 +60,7 @@ public class CommandGroup3 extends SingleLineCommand2<ActivityDiagram3> {
@Override
protected CommandExecutionResult executeArg(ActivityDiagram3 diagram, RegexResult arg) {
- diagram.startGroup(Display.getWithNewlines(arg.get("NAME", 0)), null, null, null);
+ diagram.startGroup(Display.getWithNewlines(arg.get("NAME", 0)), null, null, null, USymbol.FRAME, 0);
return CommandExecutionResult.ok();
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java
index 336a856..e16c19c 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/command/CommandPartition3.java
@@ -45,8 +45,10 @@ import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOptional;
import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
+import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.graphic.color.Colors;
@@ -59,7 +61,7 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
static RegexConcat getRegexConcat() {
return new RegexConcat(new RegexLeaf("^"), //
- new RegexLeaf("partition"), //
+ new RegexLeaf("TYPE", "(partition|package|rectangle|card)"), //
new RegexLeaf("[%s]+"), //
new RegexOptional(//
new RegexConcat( //
@@ -70,7 +72,37 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
new RegexConcat( //
new RegexLeaf("[%s]+"), //
color("BACK2").getRegex())), //
- new RegexLeaf("[%s]*\\{?$"));
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("STEREO", "(\\<{2}.*\\>{2})?"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("\\{?$"));
+ }
+
+ private USymbol getUSymbol(String type) {
+ if ("card".equalsIgnoreCase(type)) {
+ return USymbol.CARD;
+ }
+ if ("package".equalsIgnoreCase(type)) {
+ return USymbol.PACKAGE;
+ }
+ if ("rectangle".equalsIgnoreCase(type)) {
+ return USymbol.RECTANGLE;
+ }
+ return USymbol.FRAME;
+ }
+
+ private ColorParam getColorParamBorder(final USymbol symbol) {
+ if (symbol == USymbol.FRAME) {
+ return ColorParam.partitionBorder;
+ }
+ return symbol.getColorParamBorder();
+ }
+
+ private ColorParam getColorParamBack(final USymbol symbol) {
+ if (symbol == USymbol.FRAME) {
+ return ColorParam.partitionBackground;
+ }
+ return symbol.getColorParamBack();
}
private static ColorParser color(String id) {
@@ -85,8 +117,12 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
final Colors colors = color(b1 == null ? "BACK2" : "BACK1").getColor(arg,
diagram.getSkinParam().getIHtmlColorSet());
- final HtmlColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(ColorParam.partitionBackground,
- null, false);
+ final USymbol symbol = getUSymbol(arg.get("TYPE", 0));
+ final String stereo = arg.get("STEREO", 0);
+ final Stereotype stereotype = stereo == null ? null : new Stereotype(stereo);
+
+ final HtmlColor backColorInSkinparam = diagram.getSkinParam().getHtmlColor(getColorParamBack(symbol),
+ stereotype, false);
final HtmlColor backColor;
if (backColorInSkinparam == null) {
backColor = colors.getColor(ColorType.BACK);
@@ -96,13 +132,16 @@ public class CommandPartition3 extends SingleLineCommand2<ActivityDiagram3> {
final HtmlColor titleColor = colors.getColor(ColorType.HEADER);
// Warning : titleColor unused in FTileGroupW
- HtmlColor borderColor = diagram.getSkinParam().getHtmlColor(ColorParam.partitionBorder, null, false);
+ HtmlColor borderColor = diagram.getSkinParam().getHtmlColor(getColorParamBorder(symbol), stereotype, false);
if (borderColor == null) {
borderColor = HtmlColorUtils.BLACK;
}
+ final double roundCorner = symbol.getSkinParameter().getRoundCorner(diagram.getSkinParam(), stereotype);
- diagram.startGroup(Display.getWithNewlines(partitionTitle), backColor, titleColor, borderColor);
+ diagram.startGroup(Display.getWithNewlines(partitionTitle), backColor, titleColor, borderColor, symbol,
+ roundCorner);
return CommandExecutionResult.ok();
}
+
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java
index 7d3984a..4a7a25a 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/AbstractFtile.java
@@ -98,7 +98,7 @@ public abstract class AbstractFtile extends AbstractTextBlock implements Ftile {
}
public HorizontalAlignment arrowHorizontalAlignment() {
- return skinParam.getHorizontalAlignment(AlignmentParam.arrowMessageAlignment, null);
+ return skinParam.getHorizontalAlignment(AlignmentParam.arrowMessageAlignment, null, false);
}
private FtileGeometry cachedGeometry;
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java
index 3e4f03b..dd0bffb 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactory.java
@@ -48,6 +48,7 @@ import net.sourceforge.plantuml.activitydiagram3.PositionedNote;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
public interface FtileFactory {
@@ -89,6 +90,6 @@ public interface FtileFactory {
public Ftile createParallel(Swimlane swimlane, List<Ftile> all, ForkStyle style, String label);
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
- HtmlColor borderColor);
+ HtmlColor borderColor, USymbol type, double roundCorner);
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java
index 8061639..cebcfa1 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/FtileFactoryDelegator.java
@@ -55,6 +55,7 @@ import net.sourceforge.plantuml.graphic.HtmlColorAndStyle;
import net.sourceforge.plantuml.graphic.Rainbow;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.rose.Rose;
@@ -167,8 +168,8 @@ public class FtileFactoryDelegator implements FtileFactory {
}
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
- HtmlColor borderColor) {
- return factory.createGroup(list, name, backColor, titleColor, note, borderColor);
+ HtmlColor borderColor, USymbol type, double roundCorner) {
+ return factory.createGroup(list, name, backColor, titleColor, note, borderColor, type, roundCorner);
}
public StringBounder getStringBounder() {
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java
index 33dbcb2..94a8185 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FloatingNote.java
@@ -76,7 +76,7 @@ public class FloatingNote extends AbstractTextBlock implements Stencil, TextBloc
skinParam, CreoleMode.FULL).createSheet(note);
final SheetBlock2 sheetBlock2 = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this,
new UStroke(1));
- this.opale = new Opale(borderColor, noteBackgroundColor, sheetBlock2, skinParam.shadowing(), false);
+ this.opale = new Opale(borderColor, noteBackgroundColor, sheetBlock2, skinParam.shadowing(null), false);
// this.text = sheetBlock2;
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorAddNote.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorAddNote.java
index aa4ce66..701da90 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorAddNote.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorAddNote.java
@@ -65,7 +65,7 @@ public class FtileFactoryDelegatorAddNote extends FtileFactoryDelegator {
if (note.getColors() != null) {
skinParam = note.getColors().mute(skinParam);
}
- return new FtileNoteAlone(skinParam.shadowing(), note.getDisplay(), skinParam,
+ return new FtileNoteAlone(skinParam.shadowing(null), note.getDisplay(), skinParam,
note.getType() == NoteType.NOTE, swimlane);
}
return FtileWithNoteOpale.create(ftile, notes, skinParam, true);
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorCreateGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorCreateGroup.java
index 557fa3e..e9a72a5 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorCreateGroup.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorCreateGroup.java
@@ -44,6 +44,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactory;
import net.sourceforge.plantuml.activitydiagram3.ftile.FtileFactoryDelegator;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.skin.rose.Rose;
public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
@@ -56,9 +57,10 @@ public class FtileFactoryDelegatorCreateGroup extends FtileFactoryDelegator {
@Override
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
- HtmlColor borderColor) {
+ HtmlColor borderColor, USymbol type, double roundCorner) {
final HtmlColor arrowColor = rose.getHtmlColor(skinParam(), ColorParam.arrow);
- Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor);
+ Ftile result = new FtileGroup(list, name, null, arrowColor, backColor, titleColor, skinParam(), borderColor,
+ type, roundCorner);
if (note != null) {
result = new FtileWithNotes(result, Collections.singleton(note), skinParam());
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java
index 682188b..2accc7c 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileFactoryDelegatorIf.java
@@ -75,19 +75,19 @@ public class FtileFactoryDelegatorIf extends FtileFactoryDelegator {
final Rainbow arrowColor = HtmlColorAndStyle.build(skinParam());
final FontConfiguration fcArrow = new FontConfiguration(skinParam(), FontParam.ARROW, null);
- // .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
+
+ final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND
+ : FontParam.ARROW;
+ final FontConfiguration fcTest = new FontConfiguration(skinParam(), testParam, null)
+ .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
+
if (thens.size() > 1) {
if (pragma.useVerticalIf()/* OptionFlags.USE_IF_VERTICAL */)
return FtileIfLongVertical.create(swimlane, borderColor, backColor, arrowColor, getFactory(),
conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile);
return FtileIfLongHorizontal.create(swimlane, borderColor, backColor, arrowColor, getFactory(),
- conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile);
+ conditionStyle, thens, elseBranch, fcArrow, topInlinkRendering, afterEndwhile, fcTest);
}
- final FontParam testParam = conditionStyle == ConditionStyle.INSIDE ? FontParam.ACTIVITY_DIAMOND
- : FontParam.ARROW;
- final FontConfiguration fcTest = new FontConfiguration(skinParam(), testParam, null)
- .changeColor(fontColor(FontParam.ACTIVITY_DIAMOND));
-
return ConditionalBuilder.create(swimlane, borderColor, backColor, arrowColor, getFactory(), conditionStyle,
thens.get(0), elseBranch, skinParam(), getStringBounder(), fcArrow, fcTest);
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java
index c566a34..6af1933 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileGroup.java
@@ -77,10 +77,14 @@ public class FtileGroup extends AbstractFtile {
private final HtmlColor borderColor;
private final HtmlColor backColor;
private final UStroke stroke;
+ private final USymbol type;
+ private final double roundCorner;
public FtileGroup(Ftile inner, Display title, Display displayNote, HtmlColor arrowColor, HtmlColor backColor,
- HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor) {
+ HtmlColor titleColor, ISkinParam skinParam, HtmlColor borderColor, USymbol type, double roundCorner) {
super(inner.skinParam());
+ this.roundCorner = roundCorner;
+ this.type = type;
this.backColor = backColor == null ? HtmlColorUtils.WHITE : backColor;
this.inner = FtileUtils.addHorizontalMargin(inner, 10);
this.borderColor = borderColor == null ? HtmlColorUtils.BLACK : borderColor;
@@ -194,9 +198,11 @@ public class FtileGroup extends AbstractFtile {
final StringBounder stringBounder = ug.getStringBounder();
final Dimension2D dimTotal = calculateDimension(stringBounder);
- final SymbolContext symbolContext = new SymbolContext(backColor, borderColor).withShadow(
- skinParam().shadowing()).withStroke(stroke);
- USymbol.FRAME.asBig(name, inner.skinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null),
+ // final double roundCorner = type.getSkinParameter().getRoundCorner(skinParam(), null);
+ final SymbolContext symbolContext = new SymbolContext(backColor, borderColor)
+ .withShadow(skinParam().shadowing(null)).withStroke(stroke).withCorner(roundCorner, 0);
+
+ type.asBig(name, inner.skinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false),
TextBlockUtils.empty(0, 0), dimTotal.getWidth(), dimTotal.getHeight(), symbolContext).drawU(ug);
final Dimension2D dimHeaderNote = headerNote.calculateDimension(stringBounder);
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java
index 557ca5d..eafabd1 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileIfLongHorizontal.java
@@ -45,6 +45,7 @@ import java.util.List;
import java.util.Set;
import net.sourceforge.plantuml.Dimension2DDouble;
+import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.activitydiagram3.Branch;
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
import net.sourceforge.plantuml.activitydiagram3.ftile.AbstractConnection;
@@ -142,7 +143,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
static Ftile create(Swimlane swimlane, HtmlColor borderColor, HtmlColor backColor, Rainbow arrowColor,
FtileFactory ftileFactory, ConditionStyle conditionStyle, List<Branch> thens, Branch branch2,
- FontConfiguration fc, LinkRendering topInlinkRendering, LinkRendering afterEndwhile) {
+ FontConfiguration fcArrow, LinkRendering topInlinkRendering, LinkRendering afterEndwhile,
+ FontConfiguration fcTest) {
if (afterEndwhile == null) {
throw new IllegalArgumentException();
}
@@ -157,9 +159,9 @@ class FtileIfLongHorizontal extends AbstractFtile {
List<Ftile> diamonds = new ArrayList<Ftile>();
List<Double> inlabelSizes = new ArrayList<Double>();
for (Branch branch : thens) {
- final TextBlock tb1 = branch.getLabelPositive().create(fc, HorizontalAlignment.LEFT,
+ final TextBlock tb1 = branch.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
ftileFactory.skinParam());
- final TextBlock tbTest = branch.getLabelTest().create(fc, HorizontalAlignment.LEFT,
+ final TextBlock tbTest = branch.getLabelTest().create(fcTest, HorizontalAlignment.LEFT,
ftileFactory.skinParam());
final HtmlColor diamondColor = branch.getColor() == null ? backColor : branch.getColor();
@@ -169,7 +171,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
if (Display.isNull(branch.getInlabel())) {
inlabelSizes.add(0.0);
} else {
- tbInlabel = branch.getInlabel().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam());
+ tbInlabel = branch.getInlabel().create(fcArrow, HorizontalAlignment.LEFT, ftileFactory.skinParam());
inlabelSizes.add(tbInlabel.calculateDimension(ftileFactory.getStringBounder()).getWidth());
diamond = diamond.withWest(tbInlabel);
}
@@ -177,7 +179,8 @@ class FtileIfLongHorizontal extends AbstractFtile {
diamonds.add(diamond);
}
- final TextBlock tb2 = branch2.getLabelPositive().create(fc, HorizontalAlignment.LEFT, ftileFactory.skinParam());
+ final TextBlock tb2 = branch2.getLabelPositive().create(fcArrow, HorizontalAlignment.LEFT,
+ ftileFactory.skinParam());
final int last = diamonds.size() - 1;
diamonds.set(last, ((FtileDiamondInside2) diamonds.get(last)).withEast(tb2));
@@ -193,8 +196,13 @@ class FtileIfLongHorizontal extends AbstractFtile {
final Rainbow rainbowIn = FtileIfWithLinks.getInColor(thens.get(i), arrowColor);
final Branch branch = thens.get(i);
final Rainbow rainbowOut = branch.getInlinkRenderingColorAndStyle();
+ TextBlock out2 = null;
+ if (branch.getSpecial() != null) {
+ out2 = branch.getSpecial().getDisplay()
+ .create(fcTest, HorizontalAlignment.LEFT, ftileFactory.skinParam());
+ }
conns.add(result.new ConnectionVerticalIn(diam, ftile, rainbowIn.size() == 0 ? arrowColor : rainbowIn));
- conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut));
+ conns.add(result.new ConnectionVerticalOut(ftile, rainbowOut.size() == 0 ? arrowColor : rainbowOut, out2));
}
final Rainbow topInColor = topInlinkRendering.getRainbow(arrowColor);
@@ -204,8 +212,13 @@ class FtileIfLongHorizontal extends AbstractFtile {
conns.add(result.new ConnectionHorizontal(diam1, diam2, arrowColor));
}
conns.add(result.new ConnectionIn(topInColor));
+ TextBlock out2 = null;
+ if (branch2.getSpecial() != null) {
+ out2 = branch2.getSpecial().getDisplay().create(fcTest, HorizontalAlignment.LEFT, ftileFactory.skinParam());
+ }
+
conns.add(result.new ConnectionLastElseIn(FtileIfWithLinks.getInColor(branch2, arrowColor)));
- conns.add(result.new ConnectionLastElseOut(arrowColor));
+ conns.add(result.new ConnectionLastElseOut(arrowColor, out2));
final Rainbow horizontalOutColor = afterEndwhile.getRainbow(arrowColor);
conns.add(result.new ConnectionHline(horizontalOutColor));
// conns.add(result.new ConnectionHline(HtmlColorUtils.BLUE));
@@ -213,6 +226,13 @@ class FtileIfLongHorizontal extends AbstractFtile {
return FtileUtils.addConnection(result, conns);
}
+ static private TextBlock getSpecial(Branch branch, FontConfiguration fcTest, ISkinParam skinParam) {
+ if (branch.getSpecial() == null) {
+ return null;
+ }
+ return branch.getSpecial().getDisplay().create(fcTest, HorizontalAlignment.LEFT, skinParam);
+ }
+
class ConnectionHorizontal extends AbstractConnection {
private final Rainbow color;
@@ -308,10 +328,12 @@ class FtileIfLongHorizontal extends AbstractFtile {
class ConnectionLastElseOut extends AbstractConnection {
private final Rainbow arrowColor;
+ private final TextBlock out2;
- public ConnectionLastElseOut(Rainbow arrowColor) {
+ public ConnectionLastElseOut(Rainbow arrowColor, TextBlock out2) {
super(tile2, null);
this.arrowColor = arrowColor;
+ this.out2 = out2;
}
public void drawU(UGraphic ug) {
@@ -326,6 +348,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
final Point2D p2 = new Point2D.Double(p1.getX(), totalHeight);
final Snake snake = new Snake(arrowHorizontalAlignment(), arrowColor, Arrows.asToDown());
+ snake.setLabel(out2);
snake.addPoint(p1);
snake.addPoint(p2);
ug.draw(snake);
@@ -384,10 +407,12 @@ class FtileIfLongHorizontal extends AbstractFtile {
class ConnectionVerticalOut extends AbstractConnection {
private final Rainbow color;
+ private final TextBlock out2;
- public ConnectionVerticalOut(Ftile tile, Rainbow color) {
+ public ConnectionVerticalOut(Ftile tile, Rainbow color, TextBlock out2) {
super(tile, null);
this.color = color;
+ this.out2 = out2;
}
public void drawU(UGraphic ug) {
@@ -400,6 +425,7 @@ class FtileIfLongHorizontal extends AbstractFtile {
final Point2D p2 = new Point2D.Double(p1.getX(), totalHeight);
final Snake snake = new Snake(arrowHorizontalAlignment(), color, Arrows.asToDown());
+ snake.setLabel(out2);
snake.addPoint(p1);
snake.addPoint(p2);
ug.draw(snake);
@@ -477,7 +503,6 @@ class FtileIfLongHorizontal extends AbstractFtile {
return Collections.unmodifiableList(result);
}
-
@Override
public UTranslate getTranslateFor(Ftile child, StringBounder stringBounder) {
if (child == tile2) {
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java
index 0a3ab2d..0cfb8ad 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileNoteAlone.java
@@ -105,7 +105,7 @@ public class FtileNoteAlone extends AbstractFtile implements Stencil {
final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT),
skinParam, CreoleMode.FULL).createSheet(note);
final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()), this, new UStroke(1));
- opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(), false);
+ opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(null), false);
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java
index 85c1736..b35b338 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWhile.java
@@ -522,7 +522,12 @@ class FtileWhile extends AbstractFtile {
final FtileGeometry dimDiamond1 = diamond1.calculateDimension(stringBounder);
final double half = (dimDiamond1.getOutY() - dimDiamond1.getInY()) / 2;
final double y1 = Math.max(3 * half, 4 * Diamond.diamondHalfSize);
- final double x1 = getTranslateForWhile(stringBounder).getDx() - xDeltaBecauseSpecial(stringBounder);
+ final double xWhile = getTranslateForWhile(stringBounder).getDx() - Diamond.diamondHalfSize;
+ final double xDiamond = getTranslateDiamond1(stringBounder).getDx();
+ // final double x1 = xWhile - xDeltaBecauseSpecial(stringBounder);
+ final double x1 = Math.min(xWhile, xDiamond) - xDeltaBecauseSpecial(stringBounder);
+ // final double x1 = getTranslateForWhile(stringBounder).getDx() - dimDiamond1.getWidth()
+ // - xDeltaBecauseSpecial(stringBounder);
return new UTranslate(x1, y1);
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java
index d4b41bd..e2a574e 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNoteOpale.java
@@ -135,9 +135,9 @@ public class FtileWithNoteOpale extends AbstractFtile implements Stencil {
final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT),
skinParam, CreoleMode.FULL).createSheet(note.getDisplay());
- final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding()),
+ final TextBlock text = new SheetBlock2(new SheetBlock1(sheet, skinParam.wrapWidth() , skinParam.getPadding()),
this, new UStroke(1));
- opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(), withLink);
+ opale = new Opale(borderColor, noteBackgroundColor, text, skinParam.shadowing(null), withLink);
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java
index cf2e906..805065f 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/FtileWithNotes.java
@@ -116,7 +116,7 @@ public class FtileWithNotes extends AbstractFtile {
}
}, new UStroke());
- final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet2, skinParam.shadowing(), false);
+ final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet2, skinParam.shadowing(null), false);
final TextBlock opaleMarged = TextBlockUtils.withMargin(opale, 10, 10);
if (note.getNotePosition() == NotePosition.LEFT) {
if (left == null) {
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java
index c442271..d810706 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/ParallelBuilderSplit2.java
@@ -78,7 +78,7 @@ public class ParallelBuilderSplit2 extends ParallelFtilesBuilder {
for (Ftile tmp : getList()) {
final FtileGeometry dim = tmp.calculateDimension(getStringBounder());
if (first == 0) {
- first = dim.getLeft();
+ first = x + dim.getLeft();
}
last = x + dim.getLeft();
conns.add(new ConnectionIn(thin, tmp, x, tmp.getInLinkRendering().getRainbow(
@@ -123,7 +123,7 @@ public class ParallelBuilderSplit2 extends ParallelFtilesBuilder {
final FtileGeometry dim = tmp.calculateDimension(getStringBounder());
if (dim.hasPointOut()) {
if (first == 0) {
- first = dim.getLeft();
+ first = x + dim.getLeft();
}
last = x + dim.getLeft();
}
@@ -134,6 +134,9 @@ public class ParallelBuilderSplit2 extends ParallelFtilesBuilder {
if (last < geom.getLeft()) {
last = geom.getLeft();
}
+ if (first > geom.getLeft()) {
+ first = geom.getLeft();
+ }
((FtileThinSplit) out).setGeom(first, last, geom.getWidth());
result = FtileUtils.addConnection(result, conns);
return result;
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java
index 11ca981..1ca6377 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vcompact/VCompactFactory.java
@@ -63,6 +63,7 @@ import net.sourceforge.plantuml.activitydiagram3.ftile.vertical.FtileDecorateOut
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.USymbol;
import net.sourceforge.plantuml.graphic.color.Colors;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.ugraphic.UFont;
@@ -149,7 +150,7 @@ public class VCompactFactory implements FtileFactory {
}
public Ftile createGroup(Ftile list, Display name, HtmlColor backColor, HtmlColor titleColor, PositionedNote note,
- HtmlColor borderColor) {
+ HtmlColor borderColor, USymbol type, double roundCorner) {
return list;
}
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java
index 92973f2..5b13e81 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBlackBlock.java
@@ -92,7 +92,7 @@ public class FtileBlackBlock extends AbstractFtile {
public void drawU(UGraphic ug) {
final URectangle rect = new URectangle(width, height, 5, 5);
- if (skinParam().shadowing()) {
+ if (skinParam().shadowing(null)) {
rect.setDeltaShadow(3);
}
ug.apply(new UChangeColor(colorBar)).apply(new UChangeBackColor(colorBar)).draw(rect);
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java
index d7868eb..5a5b46e 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileBox.java
@@ -140,7 +140,7 @@ public class FtileBox extends AbstractFtile {
final Dimension2D dimTotal = calculateDimension(ug.getStringBounder());
final double widthTotal = dimTotal.getWidth();
final double heightTotal = dimTotal.getHeight();
- final UDrawable rect = style.getUDrawable(widthTotal, heightTotal, skinParam().shadowing());
+ final UDrawable rect = style.getUDrawable(widthTotal, heightTotal, skinParam().shadowing(null));
final HtmlColor borderColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBorder, null);
final HtmlColor backColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBackground, null);
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java
index 0654f33..af85b48 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleEnd.java
@@ -95,7 +95,7 @@ public class FtileCircleEnd extends AbstractFtile {
yTheoricalPosition = Math.round(yTheoricalPosition);
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (skinParam().shadowing()) {
+ if (skinParam().shadowing(null)) {
circle.setDeltaShadow(3);
}
ug = ug.apply(new UChangeColor(backColor));
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java
index 56bb8bb..c5c965d 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleSpot.java
@@ -100,7 +100,7 @@ public class FtileCircleSpot extends AbstractFtile {
final HtmlColor backColor = SkinParamUtils.getColor(skinParam(), ColorParam.activityBackground, null);
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (skinParam().shadowing()) {
+ if (skinParam().shadowing(null)) {
circle.setDeltaShadow(3);
}
ug.apply(new UChangeColor(borderColor)).apply(new UChangeBackColor(backColor)).apply(getThickness())
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java
index d1bcc52..b625fd9 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStart.java
@@ -86,7 +86,7 @@ public class FtileCircleStart extends AbstractFtile {
public void drawU(UGraphic ug) {
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (skinParam().shadowing()) {
+ if (skinParam().shadowing(null)) {
circle.setDeltaShadow(3);
}
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor)).draw(circle);
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java
index c121fe0..0048261 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileCircleStop.java
@@ -92,7 +92,7 @@ public class FtileCircleStop extends AbstractFtile {
yTheoricalPosition = Math.round(yTheoricalPosition);
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (skinParam().shadowing()) {
+ if (skinParam().shadowing(null)) {
circle.setDeltaShadow(3);
}
ug.apply(new UChangeColor(backColor)).apply(new UChangeBackColor(null))
@@ -100,7 +100,7 @@ public class FtileCircleStop extends AbstractFtile {
final double delta = 4;
final UEllipse circleSmall = new UEllipse(SIZE - delta * 2, SIZE - delta * 2);
- if (skinParam().shadowing()) {
+ if (skinParam().shadowing(null)) {
circleSmall.setDeltaShadow(3);
}
ug.apply(new UChangeColor(null)).apply(new UChangeBackColor(backColor))
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java
index fab6461..20c2f4a 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamond.java
@@ -130,7 +130,7 @@ public class FtileDiamond extends AbstractFtile {
final double suppY1 = north.calculateDimension(ug.getStringBounder()).getHeight();
ug = ug.apply(new UTranslate(0, suppY1));
ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor))
- .draw(Diamond.asPolygon(skinParam().shadowing()));
+ .draw(Diamond.asPolygon(skinParam().shadowing(null)));
// final Dimension2D dimNorth = north.calculateDimension(ug.getStringBounder());
north.drawU(ug.apply(new UTranslate(Diamond.diamondHalfSize * 1.5, -suppY1)));
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java
index 4d95012..52b1cd8 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondFoo1.java
@@ -114,7 +114,7 @@ public class FtileDiamondFoo1 extends AbstractFtile {
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
final Dimension2D dimTotal = calculateDimensionInternal(stringBounder);
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
- ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
+ ug.draw(Diamond.asPolygonFoo1(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java
index d655fd4..46415dc 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside.java
@@ -131,7 +131,7 @@ public class FtileDiamondInside extends AbstractFtile {
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
- ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
+ ug.draw(Diamond.asPolygon(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java
index 979ef38..f902659 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside2.java
@@ -120,7 +120,7 @@ public class FtileDiamondInside2 extends AbstractFtile {
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
- ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
+ ug.draw(Diamond.asPolygon(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
diff --git a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java
index 28eeab3..c9dc6ec 100644
--- a/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java
+++ b/src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDiamondInside3.java
@@ -122,7 +122,7 @@ public class FtileDiamondInside3 extends AbstractFtile implements FtileOverpassi
final Dimension2D dimLabel = label.calculateDimension(stringBounder);
final Dimension2D dimTotal = calculateDimensionAlone(stringBounder);
ug = ug.apply(new UChangeColor(borderColor)).apply(getThickness()).apply(new UChangeBackColor(backColor));
- ug.draw(Diamond.asPolygon(skinParam().shadowing(), dimTotal.getWidth(), dimTotal.getHeight()));
+ ug.draw(Diamond.asPolygon(skinParam().shadowing(null), dimTotal.getWidth(), dimTotal.getHeight()));
north.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
south.drawU(ug.apply(new UTranslate(4 + dimTotal.getWidth() / 2, dimTotal.getHeight())));
diff --git a/src/net/sourceforge/plantuml/ant/CheckZipTask.java b/src/net/sourceforge/plantuml/ant/CheckZipTask.java
new file mode 100644
index 0000000..a53f4f1
--- /dev/null
+++ b/src/net/sourceforge/plantuml/ant/CheckZipTask.java
@@ -0,0 +1,136 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.ant;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileList;
+import org.apache.tools.ant.types.FileSet;
+
+public class CheckZipTask extends Task {
+
+ private String zipfile = null;
+ private List<FileSet> filesets = new ArrayList<FileSet>();
+ private List<FileList> filelists = new ArrayList<FileList>();
+
+ /**
+ * Add a set of files to touch
+ */
+ public void addFileset(FileSet set) {
+ filesets.add(set);
+ }
+
+ /**
+ * Add a filelist to touch
+ */
+ public void addFilelist(FileList list) {
+ filelists.add(list);
+ }
+
+ // The method executing the task
+ @Override
+ public void execute() throws BuildException {
+
+ myLog("Check " + zipfile);
+
+ try {
+ loadZipFile(new File(zipfile));
+ for (FileList fileList : filelists) {
+ manageFileList(fileList);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ throw new BuildException(e.toString());
+ }
+ }
+
+ private void manageFileList(FileList fileList) {
+ boolean error = false;
+ final String[] srcFiles = fileList.getFiles(getProject());
+ for (String s : srcFiles) {
+ if (isPresentInFile(s) == false) {
+ myLog("Missing " + s);
+ error = true;
+ }
+ }
+ if (error) {
+ throw new BuildException("Some entries are missing in the zipfile");
+ }
+ }
+
+ private boolean isPresentInFile(String s) {
+ return entries.contains(s);
+ }
+
+ private final List<String> entries = new ArrayList<String>();
+
+ private void loadZipFile(File file) throws IOException {
+
+ this.entries.clear();
+ final PrintWriter pw = new PrintWriter("tmp.txt");
+ final ZipInputStream zis = new ZipInputStream(new FileInputStream(file));
+ ZipEntry ze = zis.getNextEntry();
+
+ while (ze != null) {
+ final String fileName = ze.getName();
+ this.entries.add(fileName);
+ if (fileName.endsWith("/") == false) {
+ pw.println("<file name=\"" + fileName + "\" />");
+ }
+ ze = zis.getNextEntry();
+ }
+ pw.close();
+ zis.close();
+ }
+
+ private synchronized void myLog(String s) {
+ this.log(s);
+ }
+
+ public void setZipfile(String s) {
+ this.zipfile = s;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java b/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java
index b8021ed..ebc0c6a 100644
--- a/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java
+++ b/src/net/sourceforge/plantuml/classdiagram/ClassDiagramFactory.java
@@ -47,8 +47,6 @@ import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2;
import net.sourceforge.plantuml.classdiagram.command.CommandCreateElementFull2.Mode;
import net.sourceforge.plantuml.classdiagram.command.CommandDiamondAssociation;
import net.sourceforge.plantuml.classdiagram.command.CommandHideShow2;
-import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificClass;
-import net.sourceforge.plantuml.classdiagram.command.CommandHideShowSpecificStereotype;
import net.sourceforge.plantuml.classdiagram.command.CommandImport;
import net.sourceforge.plantuml.classdiagram.command.CommandLayoutNewLine;
import net.sourceforge.plantuml.classdiagram.command.CommandLinkClass;
diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
index 4c4f0e2..35481b4 100644
--- a/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
+++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandAllowMixing.java
@@ -51,7 +51,7 @@ public class CommandAllowMixing extends SingleLineCommand2<ClassDiagram> {
private static RegexConcat getRegexConcat() {
return new RegexConcat(new RegexLeaf("^"), //
- new RegexLeaf("allow_mixing"), //
+ new RegexLeaf("allow_?mixing"), //
new RegexLeaf("$"));
}
diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java
index d047558..e730651 100644
--- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java
+++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateClass.java
@@ -75,7 +75,7 @@ public class CommandCreateClass extends SingleLineCommand2<ClassDiagram> {
private static RegexConcat getRegexConcat() {
return new RegexConcat(new RegexLeaf("^"), //
new RegexLeaf("TYPE", //
- "(interface|enum|annotation|abstract[%s]+class|abstract|class|entity|circle)[%s]+"), //
+ "(interface|enum|annotation|abstract[%s]+class|abstract|class|entity|circle|diamond)[%s]+"), //
new RegexOr(//
new RegexConcat(//
new RegexLeaf("DISPLAY1", DISPLAY_WITH_GENERIC), //
diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java
index b8d24b7..7d482c4 100644
--- a/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java
+++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandCreateElementFull2.java
@@ -113,7 +113,7 @@ public class CommandCreateElementFull2 extends SingleLineCommand2<ClassDiagram>
protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) {
if (mode == Mode.NORMAL_KEYWORD && diagram.isAllowMixing() == false) {
return CommandExecutionResult
- .error("Use 'allow_mixing' if you want to mix classes and other UML elements.");
+ .error("Use 'allowmixing' if you want to mix classes and other UML elements.");
}
String codeRaw = arg.getLazzy("CODE", 0);
final String displayRaw = arg.getLazzy("DISPLAY", 0);
diff --git a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShow2.java b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShow2.java
index 6df8885..21025b9 100644
--- a/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShow2.java
+++ b/src/net/sourceforge/plantuml/classdiagram/command/CommandHideShow2.java
@@ -50,7 +50,7 @@ public class CommandHideShow2 extends SingleLineCommand2<CucaDiagram> {
static RegexConcat getRegexConcat() {
return new RegexConcat(new RegexLeaf("^"), //
- new RegexLeaf("COMMAND", "(hide|show)"), //
+ new RegexLeaf("COMMAND", "(hide|hide-class|show|show-class)"), //
new RegexLeaf("[%s]+"), //
new RegexLeaf("WHAT", "(.+)"), //
new RegexLeaf("$"));
@@ -59,7 +59,8 @@ public class CommandHideShow2 extends SingleLineCommand2<CucaDiagram> {
@Override
protected CommandExecutionResult executeArg(CucaDiagram diagram, RegexResult arg) {
- final boolean show = arg.get("COMMAND", 0).equalsIgnoreCase("show");
+ final char tmp = arg.get("COMMAND", 0).charAt(0);
+ final boolean show = tmp == 's' || tmp == 'S';
final String what = arg.get("WHAT", 0).trim();
diagram.hideOrShow2(what, show);
return CommandExecutionResult.ok();
diff --git a/src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java b/src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java
index 87884a3..68de004 100644
--- a/src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java
+++ b/src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java
@@ -102,7 +102,7 @@ public class ArobaseStringCompressor implements StringCompressor {
}
private String clean(String s) {
- s = s.replace("\0", "");
+ // s = s.replace("\0", "");
s = StringUtils.trin(s);
s = clean1(s);
s = s.replaceAll("@enduml[^\\n\\r]*", "");
diff --git a/src/net/sourceforge/plantuml/code/ArobaseStringCompressor2.java b/src/net/sourceforge/plantuml/code/ArobaseStringCompressor2.java
index 3433de7..065581e 100644
--- a/src/net/sourceforge/plantuml/code/ArobaseStringCompressor2.java
+++ b/src/net/sourceforge/plantuml/code/ArobaseStringCompressor2.java
@@ -50,9 +50,9 @@ public class ArobaseStringCompressor2 implements StringCompressor {
}
private String clean2(String s) {
- s = s.replace("\0", "");
+ // s = s.replace("\0", "");
s = StringUtils.trin(s);
- s = s.replace("\r", "").replaceAll("\n+$", "");
+ // s = s.replace("\r", "").replaceAll("\n+$", "");
if (s.startsWith("@start")) {
return s;
}
diff --git a/src/net/sourceforge/plantuml/project2/RowUtils.java b/src/net/sourceforge/plantuml/command/CommandMainframe.java
index b591c1d..9ca260c 100644
--- a/src/net/sourceforge/plantuml/project2/RowUtils.java
+++ b/src/net/sourceforge/plantuml/command/CommandMainframe.java
@@ -33,27 +33,23 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.command;
import java.util.List;
-public abstract class RowUtils {
+import net.sourceforge.plantuml.UmlDiagram;
+import net.sourceforge.plantuml.cucadiagram.Display;
- public static Row overwrite(Row r1, Row r2) {
- return new RowOverwrite(r1, r2);
- }
+public class CommandMainframe extends SingleLineCommand<UmlDiagram> {
- public static Row merge(Row r1, Row r2) {
- return new RowMerge(r1, r2);
+ public CommandMainframe() {
+ super("(?i)^mainframe(?:[%s]*:[%s]*|[%s]+)(.*[\\p{L}0-9_.].*)$");
}
- public static Row merge(List<Row> rows) {
- Row result = rows.get(0);
- for (int i = 1; i < rows.size(); i++) {
- result = merge(result, rows.get(i));
- }
- return result;
-
+ @Override
+ protected CommandExecutionResult executeArg(UmlDiagram diagram, List<String> arg) {
+ final Display label = Display.getWithNewlines(arg.get(0));
+ diagram.setMainFrame(label);
+ return CommandExecutionResult.ok();
}
-
}
diff --git a/src/net/sourceforge/plantuml/command/CommandMultilinesLegend.java b/src/net/sourceforge/plantuml/command/CommandMultilinesLegend.java
index e8944ea..9bd23e2 100644
--- a/src/net/sourceforge/plantuml/command/CommandMultilinesLegend.java
+++ b/src/net/sourceforge/plantuml/command/CommandMultilinesLegend.java
@@ -79,7 +79,7 @@ public class CommandMultilinesLegend extends CommandMultilines2<UmlDiagram> {
if (alignment == null) {
alignment = HorizontalAlignment.CENTER;
}
- diagram.setLegend(DisplayPositionned.single(strings, alignment, valignment));
+ diagram.setLegend(DisplayPositionned.single(strings.replaceBackslashT(), alignment, valignment));
return CommandExecutionResult.ok();
}
return CommandExecutionResult.error("No legend defined");
diff --git a/src/net/sourceforge/plantuml/command/CommandMultilinesTitle.java b/src/net/sourceforge/plantuml/command/CommandMultilinesTitle.java
index 60eb4a4..b67d131 100644
--- a/src/net/sourceforge/plantuml/command/CommandMultilinesTitle.java
+++ b/src/net/sourceforge/plantuml/command/CommandMultilinesTitle.java
@@ -57,7 +57,7 @@ public class CommandMultilinesTitle extends CommandMultilines<UmlDiagram> {
lines = lines.removeEmptyColumns();
final Display strings = lines.toDisplay();
if (strings.size() > 0) {
- diagram.setTitle(DisplayPositionned.single(strings, HorizontalAlignment.CENTER, VerticalAlignment.TOP));
+ diagram.setTitle(DisplayPositionned.single(strings.replaceBackslashT(), HorizontalAlignment.CENTER, VerticalAlignment.TOP));
return CommandExecutionResult.ok();
}
return CommandExecutionResult.error("No title defined");
diff --git a/src/net/sourceforge/plantuml/command/CommandPragma.java b/src/net/sourceforge/plantuml/command/CommandPragma.java
index ec712ec..a430705 100644
--- a/src/net/sourceforge/plantuml/command/CommandPragma.java
+++ b/src/net/sourceforge/plantuml/command/CommandPragma.java
@@ -53,9 +53,13 @@ public class CommandPragma extends SingleLineCommand<UmlDiagram> {
system.getPragma().define(name, value);
if (name.equalsIgnoreCase("graphviz_dot") && value.equalsIgnoreCase("jdot")) {
system.setUseJDot(true);
- } else if (name.equalsIgnoreCase("graphviz_dot")) {
- system.setDotExecutable(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value));
}
+ // else if (name.equalsIgnoreCase("graphviz_dot") && OptionFlags.ALLOW_INCLUDE) {
+ // final String cmd = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value);
+ // if (cmd.toLowerCase().endsWith("dot") || cmd.toLowerCase().endsWith("dot.exe")) {
+ // system.setDotExecutable(cmd);
+ // }
+ // }
return CommandExecutionResult.ok();
}
diff --git a/src/net/sourceforge/plantuml/command/CommandSpriteFile.java b/src/net/sourceforge/plantuml/command/CommandSpriteFile.java
index 28a7cc5..a848a63 100644
--- a/src/net/sourceforge/plantuml/command/CommandSpriteFile.java
+++ b/src/net/sourceforge/plantuml/command/CommandSpriteFile.java
@@ -51,6 +51,7 @@ import net.sourceforge.plantuml.UmlDiagram;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
import net.sourceforge.plantuml.ugraphic.sprite.SpriteImage;
import net.sourceforge.plantuml.ugraphic.sprite.SpriteSvg;
@@ -91,7 +92,7 @@ public class CommandSpriteFile extends SingleLineCommand2<UmlDiagram> {
final String name = src.substring(idx + 1);
sprite = getImageFromZip(f, name);
if (sprite == null) {
- return CommandExecutionResult.error("No image " + name + " in " + f.getAbsolutePath());
+ return CommandExecutionResult.error("No image " + name + " in " + FileWithSuffix.getFileName(f));
}
} else {
final File f = FileSystem.getInstance().getFile(src);
diff --git a/src/net/sourceforge/plantuml/command/PSystemBasicFactory.java b/src/net/sourceforge/plantuml/command/PSystemBasicFactory.java
index f9f0b77..be863ff 100644
--- a/src/net/sourceforge/plantuml/command/PSystemBasicFactory.java
+++ b/src/net/sourceforge/plantuml/command/PSystemBasicFactory.java
@@ -67,6 +67,7 @@ public abstract class PSystemBasicFactory<P extends AbstractPSystem> extends PSy
}
final public Diagram createSystem(UmlSource source) {
+ source = source.removeInitialSkinparam();
final IteratorCounter2 it = source.iterator2();
final CharSequence2 startLine = it.next();
P system = init(startLine.toString2());
@@ -88,8 +89,7 @@ public abstract class PSystemBasicFactory<P extends AbstractPSystem> extends PSy
}
system = executeLine(system, s.toString2());
if (system == null) {
- final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Syntax Error?",
- /* it.currentNum() - 1, */s.getLocation());
+ final ErrorUml err = new ErrorUml(ErrorUmlType.SYNTAX_ERROR, "Syntax Error?", s.getLocation());
return new PSystemError(source, err, null);
}
}
diff --git a/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java b/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java
index c323dac..c77f666 100644
--- a/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java
+++ b/src/net/sourceforge/plantuml/command/UmlDiagramFactory.java
@@ -209,6 +209,7 @@ public abstract class UmlDiagramFactory extends PSystemAbstractFactory {
// cmds.add(new CommandMultilinesComment());
cmds.add(new CommandPragma());
cmds.add(new CommandTitle());
+ cmds.add(new CommandMainframe());
cmds.add(new CommandCaption());
cmds.add(new CommandMultilinesTitle());
cmds.add(new CommandMultilinesLegend());
diff --git a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java
index 0c26398..632f4d8 100644
--- a/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java
+++ b/src/net/sourceforge/plantuml/command/note/sequence/FactorySequenceNoteCommand.java
@@ -51,6 +51,7 @@ import net.sourceforge.plantuml.command.note.SingleMultiFactoryCommand;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
+import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.color.ColorParser;
import net.sourceforge.plantuml.graphic.color.ColorType;
@@ -136,7 +137,8 @@ public final class FactorySequenceNoteCommand implements SingleMultiFactoryComma
if (strings.size() > 0) {
final boolean tryMerge = arg.get("VMERGE", 0) != null;
- final Note note = new Note(p, position, strings.toDisplay());
+ final Display display = diagram.manageVariable(strings.toDisplay());
+ final Note note = new Note(p, position, display);
Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet());
final String stereotypeString = arg.get("STEREO", 0);
if (stereotypeString != null) {
diff --git a/src/net/sourceforge/plantuml/core/DiagramType.java b/src/net/sourceforge/plantuml/core/DiagramType.java
index 8da57c9..d58a5d0 100644
--- a/src/net/sourceforge/plantuml/core/DiagramType.java
+++ b/src/net/sourceforge/plantuml/core/DiagramType.java
@@ -38,7 +38,7 @@ package net.sourceforge.plantuml.core;
import net.sourceforge.plantuml.utils.StartUtils;
public enum DiagramType {
- UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, JUNGLE, CUTE, MATH, LATEX, DEFINITION, GANTT, UNKNOWN;
+ UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, JUNGLE, CUTE, MATH, LATEX, DEFINITION, GANTT, NW, UNKNOWN;
static public DiagramType getTypeFromArobaseStart(String s) {
s = s.toLowerCase();
@@ -90,6 +90,9 @@ public enum DiagramType {
if (StartUtils.startsWithSymbolAnd("startgantt", s)) {
return GANTT;
}
+ if (StartUtils.startsWithSymbolAnd("startnwdiag", s)) {
+ return NW;
+ }
return UNKNOWN;
}
}
diff --git a/src/net/sourceforge/plantuml/core/UmlSource.java b/src/net/sourceforge/plantuml/core/UmlSource.java
index f43e993..c4623ff 100644
--- a/src/net/sourceforge/plantuml/core/UmlSource.java
+++ b/src/net/sourceforge/plantuml/core/UmlSource.java
@@ -36,7 +36,6 @@
package net.sourceforge.plantuml.core;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -65,48 +64,62 @@ import net.sourceforge.plantuml.version.IteratorCounter2Impl;
*/
final public class UmlSource {
- final private List<String> source;
- final private List<CharSequence2> source2;
+ final private List<CharSequence2> source;
- // final private int startLine;
- // final private LineLocation startLocation;
+ public UmlSource removeInitialSkinparam() {
+ if (hasInitialSkinparam(source) == false) {
+ return this;
+ }
+ final List<CharSequence2> copy = new ArrayList<CharSequence2>(source);
+ while (hasInitialSkinparam(copy)) {
+ copy.remove(1);
+ }
+ return new UmlSource(copy);
+ }
+
+ public boolean containsIgnoreCase(String searched) {
+ for (CharSequence2 s : source) {
+ if (StringUtils.goLowerCase(s.toString()).contains(searched)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean hasInitialSkinparam(final List<CharSequence2> copy) {
+ return copy.size() > 1 && (copy.get(1).startsWith("skinparam ") || copy.get(1).startsWith("skinparamlocked "));
+ }
+
+ private UmlSource(List<CharSequence2> source) {
+ this.source = source;
+ }
/**
* Build the source from a text.
*
- * @param source
+ * @param data
* the source of the diagram
* @param checkEndingBackslash
* <code>true</code> if an ending backslash means that a line has to be collapsed with the following one.
- * @param startLine
*/
- public UmlSource(List<CharSequence2> source, boolean checkEndingBackslash, int startLine) {
- // this.startLocation = source.get(0).getLocation();
- // this.startLine = startLine;
- final List<String> tmp = new ArrayList<String>();
- final List<CharSequence2> tmp2 = new ArrayList<CharSequence2>();
+ public UmlSource(List<CharSequence2> data, boolean checkEndingBackslash) {
+ this(new ArrayList<CharSequence2>());
if (checkEndingBackslash) {
final StringBuilder pending = new StringBuilder();
- for (CharSequence2 cs : source) {
+ for (CharSequence2 cs : data) {
final String s = cs.toString2();
if (StringUtils.endsWithBackslash(s)) {
pending.append(s.substring(0, s.length() - 1));
} else {
pending.append(s);
- tmp.add(pending.toString());
- tmp2.add(new CharSequence2Impl(pending.toString(), cs.getLocation()));
+ this.source.add(new CharSequence2Impl(pending.toString(), cs.getLocation()));
pending.setLength(0);
}
}
} else {
- for (CharSequence2 s : source) {
- tmp.add(s.toString2());
- tmp2.add(s);
- }
+ this.source.addAll(data);
}
- this.source = Collections.unmodifiableList(tmp);
- this.source2 = Collections.unmodifiableList(tmp2);
}
/**
@@ -115,7 +128,7 @@ final public class UmlSource {
* @return the type of the diagram.
*/
public DiagramType getDiagramType() {
- return DiagramType.getTypeFromArobaseStart(source.get(0));
+ return DiagramType.getTypeFromArobaseStart(source.get(0).toString2());
}
/**
@@ -124,7 +137,7 @@ final public class UmlSource {
* @return a iterator that allow counting line number.
*/
public IteratorCounter2 iterator2() {
- return new IteratorCounter2Impl(source2);
+ return new IteratorCounter2Impl(source);
}
/**
@@ -134,7 +147,7 @@ final public class UmlSource {
*/
public String getPlainString() {
final StringBuilder sb = new StringBuilder();
- for (String s : source) {
+ for (CharSequence2 s : source) {
sb.append(s);
sb.append('\r');
sb.append(BackSlash.CHAR_NEWLINE);
@@ -153,22 +166,8 @@ final public class UmlSource {
return h;
}
- /**
- * Return a specific line of the diagram description.
- *
- * @param n
- * line number, starting at 0
- * @return
- */
- private String getLine(int n) {
- if (n < 0 || n >= source.size()) {
- return "";
- }
- return source.get(n);
- }
-
public String getLine(LineLocation n) {
- for (CharSequence2 s : source2) {
+ for (CharSequence2 s : source) {
if (s.getLocation().compareTo(n) == 0) {
return s.toString();
}
@@ -191,14 +190,14 @@ final public class UmlSource {
* @return <code>true<code> if the diagram does not contain information.
*/
public boolean isEmpty() {
- for (String s : source) {
+ for (CharSequence2 s : source) {
if (StartUtils.isArobaseStartDiagram(s)) {
continue;
}
if (StartUtils.isArobaseEndDiagram(s)) {
continue;
}
- if (s.matches("\\s*'.*")) {
+ if (s.toString().matches("\\s*'.*")) {
continue;
}
if (StringUtils.trin(s).length() != 0) {
@@ -215,7 +214,7 @@ final public class UmlSource {
*/
public Display getTitle() {
final Pattern2 p = MyPattern.cmpile("(?i)^[%s]*title[%s]+(.+)$");
- for (String s : source) {
+ for (CharSequence2 s : source) {
final Matcher2 m = p.matcher(s);
final boolean ok = m.matches();
if (ok) {
@@ -238,7 +237,4 @@ final public class UmlSource {
return null;
}
- // public final int getStartLine() {
- // return startLine;
- // }
}
diff --git a/src/net/sourceforge/plantuml/creole/AtomEmbededSystem.java b/src/net/sourceforge/plantuml/creole/AtomEmbededSystem.java
index d06c66d..f77c866 100644
--- a/src/net/sourceforge/plantuml/creole/AtomEmbededSystem.java
+++ b/src/net/sourceforge/plantuml/creole/AtomEmbededSystem.java
@@ -127,7 +127,7 @@ class AtomEmbededSystem implements Atom {
// }
//
private Diagram getSystem() throws IOException, InterruptedException {
- final BlockUml blockUml = new BlockUml(lines2, 0, Defines.createEmpty());
+ final BlockUml blockUml = new BlockUml(lines2, Defines.createEmpty());
return blockUml.getDiagram();
}
diff --git a/src/net/sourceforge/plantuml/creole/AtomImg.java b/src/net/sourceforge/plantuml/creole/AtomImg.java
index 3fe2aaa..de87d2e 100644
--- a/src/net/sourceforge/plantuml/creole/AtomImg.java
+++ b/src/net/sourceforge/plantuml/creole/AtomImg.java
@@ -35,6 +35,7 @@
*/
package net.sourceforge.plantuml.creole;
+import java.awt.Color;
import java.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
@@ -51,6 +52,8 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.FileSystem;
import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.code.Base64Coder;
+import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
+import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.ImgValign;
import net.sourceforge.plantuml.graphic.StringBounder;
@@ -70,6 +73,15 @@ public class AtomImg implements Atom {
this.scale = scale;
}
+ public static Atom createQrcode(String flash, double scale) {
+ final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
+ BufferedImage im = utils.exportFlashcode(flash, Color.BLACK, Color.WHITE);
+ if (im == null) {
+ im = new BufferedImage(10, 10, BufferedImage.TYPE_INT_RGB);
+ }
+ return new AtomImg(new UImage(im).scaleNearestNeighbor(scale).getImage(), 1);
+ }
+
public static Atom create(String src, final ImgValign valign, final int vspace, final double scale) {
final UFont font = UFont.monospaced(14);
final FontConfiguration fc = FontConfiguration.blackBlueTrue(font);
@@ -158,7 +170,7 @@ public class AtomImg implements Atom {
public void drawU(UGraphic ug) {
// final double h = calculateDimension(ug.getStringBounder()).getHeight();
- ug.draw(new UImage(image).scale(scale * ug.dpiFactor()));
+ ug.draw(new UImage(image).scale(scale));
// tileImage.drawU(ug.apply(new UTranslate(0, -h)));
}
diff --git a/src/net/sourceforge/plantuml/creole/AtomMath.java b/src/net/sourceforge/plantuml/creole/AtomMath.java
index 59ed324..1f8ec42 100644
--- a/src/net/sourceforge/plantuml/creole/AtomMath.java
+++ b/src/net/sourceforge/plantuml/creole/AtomMath.java
@@ -45,6 +45,7 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorSimple;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.math.ScientificEquationSafe;
+import net.sourceforge.plantuml.ugraphic.ColorMapper;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UImage;
import net.sourceforge.plantuml.ugraphic.UImageSvg;
@@ -55,9 +56,12 @@ public class AtomMath implements Atom {
private final ScientificEquationSafe math;
private final HtmlColor foreground;
private final HtmlColor background;
+ private final ColorMapper colorMapper;
- public AtomMath(ScientificEquationSafe math, HtmlColor foreground, HtmlColor background, double scale) {
+ public AtomMath(ScientificEquationSafe math, HtmlColor foreground, HtmlColor background, double scale,
+ ColorMapper colorMapper) {
this.math = math;
+ this.colorMapper = colorMapper;
this.foreground = foreground;
this.background = background;
this.scale = scale;
@@ -84,24 +88,26 @@ public class AtomMath implements Atom {
public void drawU(UGraphic ug) {
final boolean isSvg = ug.matchesProperty("SVG");
final Color back;
- if (isSvg && background == null) {
+ if (background == null) {
back = null;
} else {
- back = getColor(background == null ? ug.getParam().getBackcolor() : background, Color.WHITE);
+ back = getColor(background, Color.WHITE);
}
final Color fore = getColor(foreground, Color.BLACK);
- final double dpiFactor = ug.dpiFactor();
+ // final double dpiFactor = ug.dpiFactor();
if (isSvg) {
final SvgString svg = math.getSvg(scale, fore, back);
ug.draw(new UImageSvg(svg));
} else {
- ug.draw(new UImage(math.getImage(scale * dpiFactor, fore, back)));
+ final UImage image = new UImage(math.getImage(scale, fore, back), math.getFormula());
+ ug.draw(image);
}
}
private Color getColor(HtmlColor color, Color defaultValue) {
if (color instanceof HtmlColorSimple) {
- return ((HtmlColorSimple) color).getColor999();
+ return colorMapper.getMappedColor(color);
+ // return ((HtmlColorSimple) color).getColor999();
}
return defaultValue;
diff --git a/src/net/sourceforge/plantuml/creole/AtomOpenIcon.java b/src/net/sourceforge/plantuml/creole/AtomOpenIcon.java
index c98cc0a..c1d306f 100644
--- a/src/net/sourceforge/plantuml/creole/AtomOpenIcon.java
+++ b/src/net/sourceforge/plantuml/creole/AtomOpenIcon.java
@@ -52,10 +52,6 @@ public class AtomOpenIcon implements Atom {
private final double factor;
private final Url url;
- public AtomOpenIcon(OpenIcon openIcon, FontConfiguration fontConfiguration) {
- this(openIcon, fontConfiguration, null);
- }
-
public AtomOpenIcon(OpenIcon openIcon, FontConfiguration fontConfiguration, Url url) {
this.url = url;
this.openIcon = openIcon;
diff --git a/src/net/sourceforge/plantuml/creole/AtomSprite.java b/src/net/sourceforge/plantuml/creole/AtomSprite.java
index ceb52d6..59c4f55 100644
--- a/src/net/sourceforge/plantuml/creole/AtomSprite.java
+++ b/src/net/sourceforge/plantuml/creole/AtomSprite.java
@@ -37,6 +37,7 @@ package net.sourceforge.plantuml.creole;
import java.awt.geom.Dimension2D;
+import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.ugraphic.UGraphic;
@@ -47,11 +48,13 @@ public class AtomSprite implements Atom {
private final FontConfiguration fontConfiguration;
private final Sprite sprite;
private final double scale;
+ private final Url url;
- public AtomSprite(double scale, FontConfiguration fontConfiguration, Sprite sprite) {
+ public AtomSprite(double scale, FontConfiguration fontConfiguration, Sprite sprite, Url url) {
this.scale = scale;
this.fontConfiguration = fontConfiguration;
this.sprite = sprite;
+ this.url = url;
}
public Dimension2D calculateDimension(StringBounder stringBounder) {
@@ -63,7 +66,13 @@ public class AtomSprite implements Atom {
}
public void drawU(UGraphic ug) {
- sprite.asTextBlock(fontConfiguration.getColor(), scale * ug.dpiFactor()).drawU(ug);
+ if (url != null) {
+ ug.startUrl(url);
+ }
+ sprite.asTextBlock(fontConfiguration.getColor(), scale).drawU(ug);
+ if (url != null) {
+ ug.closeAction();
+ }
}
}
diff --git a/src/net/sourceforge/plantuml/creole/AtomText.java b/src/net/sourceforge/plantuml/creole/AtomText.java
index 47d51ec..053b148 100644
--- a/src/net/sourceforge/plantuml/creole/AtomText.java
+++ b/src/net/sourceforge/plantuml/creole/AtomText.java
@@ -46,6 +46,7 @@ import java.util.regex.Pattern;
import net.sourceforge.plantuml.BackSlash;
import net.sourceforge.plantuml.Dimension2DDouble;
+import net.sourceforge.plantuml.ISkinSimple;
import net.sourceforge.plantuml.LineBreakStrategy;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.StringUtils;
@@ -62,6 +63,7 @@ import net.sourceforge.plantuml.openiconic.OpenIcon;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UText;
import net.sourceforge.plantuml.ugraphic.UTranslate;
+import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
import net.sourceforge.plantuml.utils.CharHidder;
public class AtomText implements Atom {
@@ -86,35 +88,45 @@ public class AtomText implements Atom {
return new AtomText(text, fontConfiguration, null, ZERO, ZERO);
}
- public static Atom createUrl(Url url, FontConfiguration fontConfiguration) {
+ public static Atom createUrl(Url url, FontConfiguration fontConfiguration, ISkinSimple skinSimple) {
fontConfiguration = fontConfiguration.hyperlink();
final Display display = Display.getWithNewlines(url.getLabel());
if (display.size() > 1) {
final List<Atom> all = new ArrayList<Atom>();
for (CharSequence s : display.as()) {
- all.add(createAtomText(s.toString(), url, fontConfiguration));
+ all.add(createAtomText(s.toString(), url, fontConfiguration, skinSimple));
}
return new AtomVerticalTexts(all);
}
- return createAtomText(url.getLabel(), url, fontConfiguration);
+ return createAtomText(url.getLabel(), url, fontConfiguration, skinSimple);
}
- private static Atom createAtomText(final String text, Url url, FontConfiguration fontConfiguration) {
- final Pattern p = Pattern.compile(Splitter.openiconPattern);
+ private static Atom createAtomText(final String text, Url url, FontConfiguration fontConfiguration,
+ ISkinSimple skinSimple) {
+ final Pattern p = Pattern.compile(Splitter.openiconPattern + "|" + Splitter.spritePattern2);
final Matcher m = p.matcher(text);
final List<Atom> result = new ArrayList<Atom>();
-
while (m.find()) {
- final String val = m.group(1);
final StringBuffer sb = new StringBuffer();
m.appendReplacement(sb, "");
if (sb.length() > 0) {
result.add(new AtomText(sb.toString(), fontConfiguration, url, ZERO, ZERO));
}
- final OpenIcon openIcon = OpenIcon.retrieve(val);
- if (openIcon != null) {
- result.add(new AtomOpenIcon(openIcon, fontConfiguration, url));
+ final String valOpenicon = m.group(1);
+ final String valSprite = m.group(2);
+ if (valOpenicon != null) {
+ final OpenIcon openIcon = OpenIcon.retrieve(valOpenicon);
+ if (openIcon != null) {
+ result.add(new AtomOpenIcon(openIcon, fontConfiguration, url));
+ }
+ } else if (valSprite != null) {
+ final Sprite sprite = skinSimple.getSprite(valSprite);
+ if (sprite != null) {
+ final double scale = CommandCreoleImg.getScale(m.group(3), 1);
+ result.add(new AtomSprite(scale, fontConfiguration, sprite, url));
+ }
+
}
}
final StringBuffer sb = new StringBuffer();
diff --git a/src/net/sourceforge/plantuml/creole/CommandCreoleImg.java b/src/net/sourceforge/plantuml/creole/CommandCreoleImg.java
index 7bbc0b9..6e38da9 100644
--- a/src/net/sourceforge/plantuml/creole/CommandCreoleImg.java
+++ b/src/net/sourceforge/plantuml/creole/CommandCreoleImg.java
@@ -70,7 +70,7 @@ public class CommandCreoleImg implements Command {
throw new IllegalStateException();
}
String src = m.group(2);
- final double scale = getScale(m.group(3));
+ final double scale = getScale(m.group(3), 1);
if (src.toLowerCase().startsWith("src=")) {
src = src.substring(4);
}
@@ -79,16 +79,16 @@ public class CommandCreoleImg implements Command {
return line.substring(m.group(1).length());
}
- public static double getScale(String s) {
+ public static double getScale(String s, double def) {
if (s == null) {
- return 1;
+ return def;
}
final Pattern p = Pattern.compile("(?:scale=|\\*)([0-9.]+)");
final Matcher m = p.matcher(s);
if (m.find()) {
return Double.parseDouble(m.group(1));
}
- return 1;
+ return def;
}
}
diff --git a/src/net/sourceforge/plantuml/creole/CommandCreoleQrcode.java b/src/net/sourceforge/plantuml/creole/CommandCreoleQrcode.java
new file mode 100644
index 0000000..908fdfb
--- /dev/null
+++ b/src/net/sourceforge/plantuml/creole/CommandCreoleQrcode.java
@@ -0,0 +1,74 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.creole;
+
+import net.sourceforge.plantuml.command.regex.Matcher2;
+import net.sourceforge.plantuml.command.regex.MyPattern;
+import net.sourceforge.plantuml.command.regex.Pattern2;
+import net.sourceforge.plantuml.graphic.Splitter;
+
+public class CommandCreoleQrcode implements Command {
+
+ private final Pattern2 pattern;
+
+ private CommandCreoleQrcode(String p) {
+ this.pattern = MyPattern.cmpile(p);
+ }
+
+ public static Command create() {
+ return new CommandCreoleQrcode("^(?i)(" + Splitter.qrcodePattern + ")");
+ }
+
+ public int matchingSize(String line) {
+ final Matcher2 m = pattern.matcher(line);
+ if (m.find() == false) {
+ return 0;
+ }
+ return m.group(1).length();
+ }
+
+ public String executeAndGetRemaining(String line, StripeSimple stripe) {
+ final Matcher2 m = pattern.matcher(line);
+ if (m.find() == false) {
+ throw new IllegalStateException();
+ }
+ final String src = m.group(2);
+ final double scale = CommandCreoleImg.getScale(m.group(3), 3);
+ stripe.addQrcode(src, scale);
+ return line.substring(m.group(1).length());
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/creole/CommandCreoleSprite.java b/src/net/sourceforge/plantuml/creole/CommandCreoleSprite.java
index b26ed1c..6e0baee 100644
--- a/src/net/sourceforge/plantuml/creole/CommandCreoleSprite.java
+++ b/src/net/sourceforge/plantuml/creole/CommandCreoleSprite.java
@@ -66,7 +66,7 @@ public class CommandCreoleSprite implements Command {
throw new IllegalStateException();
}
final String src = m.group(2);
- final double scale = CommandCreoleImg.getScale(m.group(3));
+ final double scale = CommandCreoleImg.getScale(m.group(3), 1);
stripe.addSprite(src, scale);
return line.substring(m.group(1).length());
}
diff --git a/src/net/sourceforge/plantuml/creole/StripeSimple.java b/src/net/sourceforge/plantuml/creole/StripeSimple.java
index 3e18e81..af7c677 100644
--- a/src/net/sourceforge/plantuml/creole/StripeSimple.java
+++ b/src/net/sourceforge/plantuml/creole/StripeSimple.java
@@ -113,6 +113,7 @@ public class StripeSimple implements Stripe {
this.commands.add(CommandCreoleExposantChange.create(FontPosition.EXPOSANT));
this.commands.add(CommandCreoleExposantChange.create(FontPosition.INDICE));
this.commands.add(CommandCreoleImg.create());
+ this.commands.add(CommandCreoleQrcode.create());
this.commands.add(CommandCreoleOpenIcon.create());
final double scale = skinParam.getDpi() / 96.0;
this.commands.add(CommandCreoleMath.create(scale));
@@ -168,30 +169,35 @@ public class StripeSimple implements Stripe {
atoms.add(AtomImg.create(src, ImgValign.TOP, 0, scale));
}
+ public void addQrcode(String src, double scale) {
+ atoms.add(AtomImg.createQrcode(src, scale));
+ }
+
public void addSpace(int size) {
atoms.add(AtomSpace.create(size));
}
public void addUrl(Url url) {
- atoms.add(AtomText.createUrl(url, fontConfiguration));
+ atoms.add(AtomText.createUrl(url, fontConfiguration, skinParam));
}
public void addSprite(String src, double scale) {
final Sprite sprite = skinParam.getSprite(src);
if (sprite != null) {
- atoms.add(new AtomSprite(scale, fontConfiguration, sprite));
+ atoms.add(new AtomSprite(scale, fontConfiguration, sprite, null));
}
}
public void addOpenIcon(String src) {
final OpenIcon openIcon = OpenIcon.retrieve(src);
if (openIcon != null) {
- atoms.add(new AtomOpenIcon(openIcon, fontConfiguration));
+ atoms.add(new AtomOpenIcon(openIcon, fontConfiguration, null));
}
}
public void addMath(ScientificEquationSafe math, double scale) {
- atoms.add(new AtomMath(math, fontConfiguration.getColor(), fontConfiguration.getExtendedColor(), scale));
+ atoms.add(new AtomMath(math, fontConfiguration.getColor(), fontConfiguration.getExtendedColor(), scale,
+ skinParam.getColorMapper()));
}
private void modifyStripe(String line) {
diff --git a/src/net/sourceforge/plantuml/cucadiagram/Display.java b/src/net/sourceforge/plantuml/cucadiagram/Display.java
index 4e6e169..ee68dbe 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/Display.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/Display.java
@@ -70,6 +70,7 @@ import net.sourceforge.plantuml.graphic.TextBlockSprited;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.graphic.VerticalAlignment;
import net.sourceforge.plantuml.sequencediagram.MessageNumber;
+import net.sourceforge.plantuml.skin.VisibilityModifier;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UStroke;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
@@ -83,6 +84,17 @@ public class Display implements Iterable<CharSequence> {
public final static Display NULL = new Display(null, null, true, CreoleMode.FULL);
+ public Display replaceBackslashT() {
+ final Display result = new Display(this, defaultCreoleMode);
+ for (int i = 0; i < result.display.size(); i++) {
+ final CharSequence s = display.get(i);
+ if (s.toString().contains("\\t")) {
+ result.display.set(i, s.toString().replace("\\t", "\t"));
+ }
+ }
+ return result;
+ }
+
public Display replace(String src, String dest) {
final List<CharSequence> newDisplay = new ArrayList<CharSequence>();
for (CharSequence cs : display) {
@@ -207,13 +219,19 @@ public class Display implements Iterable<CharSequence> {
public Display manageGuillemet() {
final List<CharSequence> result = new ArrayList<CharSequence>();
+ boolean first = true;
for (CharSequence line : display) {
- final String withGuillement = StringUtils.manageGuillemet(line.toString());
- if (withGuillement.equals(line.toString())) {
- result.add(line);
- } else {
- result.add(withGuillement);
+ String lineString = line.toString();
+ if (first && VisibilityModifier.isVisibilityCharacter(line)) {
+ lineString = lineString.substring(1).trim();
}
+ final String withGuillement = StringUtils.manageGuillemet(lineString);
+ // if (withGuillement.equals(lineString)) {
+ // result.add(lineString);
+ // } else {
+ result.add(withGuillement);
+ // }
+ first = false;
}
return new Display(result, this.naturalHorizontalAlignment, this.isNull, this.defaultCreoleMode);
}
diff --git a/src/net/sourceforge/plantuml/cucadiagram/LeafType.java b/src/net/sourceforge/plantuml/cucadiagram/LeafType.java
index 452e874..c1cae0f 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/LeafType.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/LeafType.java
@@ -64,6 +64,9 @@ public enum LeafType {
if (type.startsWith("ABSTRACT")) {
return LeafType.ABSTRACT_CLASS;
}
+ if (type.startsWith("DIAMOND")) {
+ return LeafType.STATE_CHOICE;
+ }
return LeafType.valueOf(type);
}
diff --git a/src/net/sourceforge/plantuml/cucadiagram/Link.java b/src/net/sourceforge/plantuml/cucadiagram/Link.java
index 992bd6a..e4f9cdc 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/Link.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/Link.java
@@ -46,11 +46,11 @@ import net.sourceforge.plantuml.command.Position;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
-import net.sourceforge.plantuml.graphic.HtmlColorSet;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.USymbolInterface;
import net.sourceforge.plantuml.graphic.color.Colors;
+import net.sourceforge.plantuml.skin.VisibilityModifier;
import net.sourceforge.plantuml.svek.Bibliotekon;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.utils.UniqueSequence;
@@ -88,6 +88,7 @@ public class Link extends WithLinkType implements Hideable, Removeable {
private boolean opale;
private boolean horizontalSolitary;
private String sametail;
+ private VisibilityModifier visibilityModifier;
private Url url;
@@ -122,6 +123,10 @@ public class Link extends WithLinkType implements Hideable, Removeable {
// this.label = label.removeHeadingUrl(url).manageGuillemet();
} else {
this.label = label.manageGuillemet();
+ if (VisibilityModifier.isVisibilityCharacter(label.get(0))) {
+ visibilityModifier = VisibilityModifier.getVisibilityModifier(label.get(0), false);
+ }
+
}
this.length = length;
this.qualifier1 = qualifier1;
@@ -522,4 +527,8 @@ public class Link extends WithLinkType implements Hideable, Removeable {
}
}
+ public final VisibilityModifier getVisibilityModifier() {
+ return visibilityModifier;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java b/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java
index f59bb9d..38d1197 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/MethodsOrFieldsArea.java
@@ -262,7 +262,7 @@ public class MethodsOrFieldsArea extends AbstractTextBlock implements TextBlockW
} else if (align == HorizontalAlignment.CENTER) {
placementStrategy = new PlacementStrategyY1Y2Center(stringBounder);
} else {
- throw new IllegalStateException();
+ placementStrategy = new PlacementStrategyY1Y2Left(stringBounder);
}
group = new ULayoutGroup(placementStrategy);
for (Member att : members) {
diff --git a/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java b/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java
index 6e85c7a..9eb96c4 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/WithLinkType.java
@@ -46,6 +46,7 @@ public abstract class WithLinkType {
protected LinkType type;
protected boolean hidden = false;
+ private boolean single = false;
private Colors colors = Colors.empty();
@@ -87,6 +88,14 @@ public abstract class WithLinkType {
type = type.goBold();
}
+ public final void goSingle() {
+ this.single = true;
+ }
+
+ public boolean isSingle() {
+ return single;
+ }
+
public void applyStyle(String arrowStyle) {
if (arrowStyle == null) {
return;
@@ -102,6 +111,8 @@ public abstract class WithLinkType {
this.goDotted();
} else if (s.equalsIgnoreCase("hidden")) {
this.goHidden();
+ } else if (s.equalsIgnoreCase("single")) {
+ this.goSingle();
} else if (s.equalsIgnoreCase("plain")) {
// Do nothing
} else if (s.equalsIgnoreCase("norank")) {
diff --git a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java
index 4e6c0da..a690c9b 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/dot/GraphvizUtils.java
@@ -66,7 +66,7 @@ public class GraphvizUtils {
}
public static final void setDotExecutable(String value) {
- dotExecutable = value;
+ dotExecutable = value == null ? null : value.trim();
}
public static Graphviz create(ISkinParam skinParam, String dotString, String... type) {
diff --git a/src/net/sourceforge/plantuml/cucadiagram/entity/EntityFactory.java b/src/net/sourceforge/plantuml/cucadiagram/entity/EntityFactory.java
index 99d6d28..4e48d92 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/entity/EntityFactory.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/entity/EntityFactory.java
@@ -180,9 +180,21 @@ public class EntityFactory {
}
public void addLink(Link link) {
+ if (link.isSingle() && containsSimilarLink(link)) {
+ return;
+ }
links.add(link);
}
+ private boolean containsSimilarLink(Link other) {
+ for (Link link : links) {
+ if (other.sameConnections(link)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public void removeLink(Link link) {
final boolean ok = links.remove(link);
if (ok == false) {
diff --git a/src/net/sourceforge/plantuml/cucadiagram/entity/EntityImpl.java b/src/net/sourceforge/plantuml/cucadiagram/entity/EntityImpl.java
index a039512..42d5d51 100644
--- a/src/net/sourceforge/plantuml/cucadiagram/entity/EntityImpl.java
+++ b/src/net/sourceforge/plantuml/cucadiagram/entity/EntityImpl.java
@@ -470,9 +470,9 @@ final class EntityImpl implements ILeaf, IGroup {
if (getLeafType() == LeafType.CIRCLE) {
return USymbol.INTERFACE;
}
- if (symbol != null && stereotype != null && stereotype.getSprite() != null) {
- return symbol.withStereoAlignment(HorizontalAlignment.RIGHT);
- }
+ // if (symbol != null && stereotype != null && stereotype.getSprite() != null) {
+ // return symbol.withStereoAlignment(HorizontalAlignment.RIGHT);
+ // }
return symbol;
}
@@ -520,7 +520,7 @@ final class EntityImpl implements ILeaf, IGroup {
}
return isRemovedInternal();
}
-
+
private boolean isRemovedInternal() {
if (isGroup()) {
if (entityFactory.isRemoved(this)) {
@@ -544,8 +544,6 @@ final class EntityImpl implements ILeaf, IGroup {
return entityFactory.isRemoved(this);
}
-
-
private int layer;
public int getHectorLayer() {
diff --git a/src/net/sourceforge/plantuml/dedication/Dedication.java b/src/net/sourceforge/plantuml/dedication/Dedication.java
index 01685eb..9d6fe45 100644
--- a/src/net/sourceforge/plantuml/dedication/Dedication.java
+++ b/src/net/sourceforge/plantuml/dedication/Dedication.java
@@ -70,13 +70,12 @@ public class Dedication {
return new ByteArrayInputStream(baos.toByteArray());
}
- public BufferedImage getBufferedImage(String keepLetter) {
+ public static BufferedImage getBufferedImage(InputStream is) {
try {
final Class<?> clVP8Decoder = Class.forName("net.sourceforge.plantuml.webp.VP8Decoder");
final Object vp8Decoder = clVP8Decoder.newInstance();
// final VP8Decoder vp8Decoder = new VP8Decoder();
final Method decodeFrame = clVP8Decoder.getMethod("decodeFrame", ImageInputStream.class);
- final InputStream is = getInputStream(keepLetter);
final ImageInputStream iis = ImageIO.createImageInputStream(is);
decodeFrame.invoke(vp8Decoder, iis);
// vp8Decoder.decodeFrame(iis);
@@ -91,4 +90,14 @@ public class Dedication {
}
}
+ public BufferedImage getBufferedImage(String keepLetter) {
+ try {
+ final InputStream is = getInputStream(keepLetter);
+ return getBufferedImage(is);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java
index 2c058ba..07ac26c 100644
--- a/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java
+++ b/src/net/sourceforge/plantuml/descdiagram/DescriptionDiagramFactory.java
@@ -53,6 +53,7 @@ import net.sourceforge.plantuml.command.note.FactoryNoteOnLinkCommand;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexOr;
import net.sourceforge.plantuml.descdiagram.command.CommandArchimate;
+import net.sourceforge.plantuml.descdiagram.command.CommandArchimateMultilines;
import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementFull;
import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementMultilines;
import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement;
@@ -116,6 +117,7 @@ public class DescriptionDiagramFactory extends UmlDiagramFactory {
// cmds.add(new CommandHideShowSpecificClass());
cmds.add(new CommandArchimate());
+ cmds.add(new CommandArchimateMultilines());
cmds.add(new CommandCreateDomain());
return cmds;
diff --git a/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java b/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java
index c63d0a0..cae259f 100644
--- a/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java
+++ b/src/net/sourceforge/plantuml/descdiagram/EntityImageRequirement.java
@@ -109,7 +109,7 @@ public class EntityImageRequirement extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final StringBounder stringBounder = ug.getStringBounder();
final TextBlockInEllipse ellipse = new TextBlockInEllipse(desc, stringBounder);
- if (getSkinParam().shadowing2(SkinParameter.USECASE)) {
+ if (getSkinParam().shadowing2(getStereo(), SkinParameter.USECASE)) {
ellipse.setDeltaShadow(3);
}
diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java
index 0e4c6de..019e781 100644
--- a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java
+++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimate.java
@@ -118,7 +118,7 @@ public class CommandArchimate extends SingleLineCommand2<DescriptionDiagram> {
FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet()));
}
- Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet());
+ final Colors colors = color().getColor(arg, diagram.getSkinParam().getIHtmlColorSet());
entity.setColors(colors);
return CommandExecutionResult.ok();
diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java
new file mode 100644
index 0000000..6d83424
--- /dev/null
+++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandArchimateMultilines.java
@@ -0,0 +1,119 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.descdiagram.command;
+
+import net.sourceforge.plantuml.FontParam;
+import net.sourceforge.plantuml.StringUtils;
+import net.sourceforge.plantuml.UrlBuilder;
+import net.sourceforge.plantuml.classdiagram.AbstractEntityDiagram;
+import net.sourceforge.plantuml.command.BlocLines;
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.CommandMultilines2;
+import net.sourceforge.plantuml.command.MultilinesStrategy;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+import net.sourceforge.plantuml.cucadiagram.Code;
+import net.sourceforge.plantuml.cucadiagram.Display;
+import net.sourceforge.plantuml.cucadiagram.IEntity;
+import net.sourceforge.plantuml.cucadiagram.LeafType;
+import net.sourceforge.plantuml.cucadiagram.Stereotype;
+import net.sourceforge.plantuml.graphic.USymbol;
+import net.sourceforge.plantuml.graphic.color.ColorParser;
+import net.sourceforge.plantuml.graphic.color.ColorType;
+import net.sourceforge.plantuml.graphic.color.Colors;
+
+public class CommandArchimateMultilines extends CommandMultilines2<AbstractEntityDiagram> {
+
+ public CommandArchimateMultilines() {
+ super(getRegexConcat(), MultilinesStrategy.REMOVE_STARTING_QUOTE);
+ }
+
+ @Override
+ public String getPatternEnd() {
+ return "(?i)^(.*)\\]$";
+ }
+
+ private static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("archimate"), //
+ new RegexLeaf("[%s]+"), //
+ color().getRegex(), //
+ new RegexLeaf("[%s]+"), //
+ new RegexLeaf("CODE", "([\\p{L}0-9_.]+)"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("STEREOTYPE", "(?:[%s]+(?:\\<\\<([-\\w]+)\\>\\>))?"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("URL", "(" + UrlBuilder.getRegexp() + ")?"), //
+ new RegexLeaf("[%s]*"), //
+ ColorParser.exp1(), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("DESC", "\\[(.*)$"));
+ }
+
+ private static ColorParser color() {
+ return ColorParser.simpleColor(ColorType.BACK);
+ }
+
+ @Override
+ protected CommandExecutionResult executeNow(AbstractEntityDiagram diagram, BlocLines lines) {
+ lines = lines.trim(false);
+ final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499()));
+ final String codeRaw = line0.getLazzy("CODE", 0);
+
+ final Code code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(codeRaw));
+ final String icon = line0.getLazzy("STEREOTYPE", 0);
+
+ final IEntity entity = diagram.getOrCreateLeaf(code, LeafType.DESCRIPTION, USymbol.RECTANGLE);
+
+ lines = lines.subExtract(1, 1);
+ Display display = lines.toDisplay();
+
+ entity.setDisplay(display);
+ entity.setUSymbol(USymbol.RECTANGLE);
+ if (icon != null) {
+ entity.setStereotype(new Stereotype("<<$archimate/" + icon + ">>", diagram.getSkinParam()
+ .getCircledCharacterRadius(), diagram.getSkinParam().getFont(null, false,
+ FontParam.CIRCLED_CHARACTER), diagram.getSkinParam().getIHtmlColorSet()));
+ }
+
+ final Colors colors = color().getColor(line0, diagram.getSkinParam().getIHtmlColorSet());
+ entity.setColors(colors);
+
+ return CommandExecutionResult.ok();
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java
index 27213b8..e8f37ca 100644
--- a/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java
+++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandCreateElementMultilines.java
@@ -114,6 +114,7 @@ public class CommandCreateElementMultilines extends CommandMultilines2<AbstractE
throw new IllegalArgumentException();
}
+ @Override
protected CommandExecutionResult executeNow(AbstractEntityDiagram diagram, BlocLines lines) {
lines = lines.trim(false);
final RegexResult line0 = getStartingPattern().matcher(StringUtils.trin(lines.getFirst499()));
diff --git a/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java b/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java
index ab83b15..0a4377f 100644
--- a/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java
+++ b/src/net/sourceforge/plantuml/descdiagram/command/CommandLinkElement.java
@@ -62,8 +62,8 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
public class CommandLinkElement extends SingleLineCommand2<DescriptionDiagram> {
- static private final String KEY1 = "dotted|dashed|plain|bold|hidden|norank|thickness=\\d+";
- static private final String KEY2 = ",dotted|,dashed|,plain|,bold|,hidden|,norank|,thickness=\\d+";
+ static private final String KEY1 = "dotted|dashed|plain|bold|hidden|norank|single|thickness=\\d+";
+ static private final String KEY2 = ",dotted|,dashed|,plain|,bold|,hidden|,norank|,single|,thickness=\\d+";
static public final String LINE_STYLE = "(?:#\\w+|" + CommandLinkElement.KEY1 + ")(?:,#\\w+|"
+ CommandLinkElement.KEY2 + ")*";
diff --git a/src/net/sourceforge/plantuml/donors/PSystemDonors.java b/src/net/sourceforge/plantuml/donors/PSystemDonors.java
index c69ed06..2165e07 100644
--- a/src/net/sourceforge/plantuml/donors/PSystemDonors.java
+++ b/src/net/sourceforge/plantuml/donors/PSystemDonors.java
@@ -67,21 +67,21 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.version.PSystemVersion;
public class PSystemDonors extends AbstractPSystem {
-
- public static final String DONORS = "6wW70AmEU9ELAuNYZT_MZn6AGOgeeHNOWjgQuZoZA1P0SxnDhXdMoRgDdR45mND5SGKL8Az2C-THCiPX"
- + "qGYJjjcQVk6-VTu2CLLilsL2UtyTQ4BoLZ2km4tbpF_b0XiJv0R8GZti1NIZZNlZcZIc_NyMPXz_WHRm"
- + "DBfiMLGwq5cTNHLD233np1odb9A7OjnVaSBNZIs0buu7kTfO7U4RgRFlr0AQj6RJa9are5X6YaJpiT7Q"
- + "SO3jOnWuqM5T7JOGEvGuw1kC0-eRCKh65JJ8ZE9cRAZcdIS4J3YXmavyKPAQeuLaHXawq65jWGAyFnC4"
- + "n3uffoHdAsy32hR85ZKDahhmkZDTx1-MKe7yqd0ATB0Sj0Ae0F8Vw8O_PvkvnBcENL4pv5qPvx9no6kz"
- + "Lx6_UQ2liwuCb9VDYvdnMdvKjnRIEUMwng-k1lcX8IjxUnXhlBA4yFnlBeNsnG8wFe2EjOQAyVV3-Sr2"
- + "6eJ7bBgGWtFopdOJ0R7AKbZeNLnIBV3pBccnkbWUpLayH_lNXLOoi8Ch5fkXZsi5irldZ9AgeVvvoQkk"
- + "urFacg1PtfVeHx9fIFp_BSqCqXsqteGFrwM8KgMlhAh5HHU1qw1_Gsu1kGFLq-JHTLg-9Bxt1-JUUv50"
- + "53OJx9-wPjIdtBo4UM9Bfwfu01Zl4kr6X_CWCuYg0rq7bMTas5s_tQHdsBGnTcxqYdhJRWnT7zDfoitq"
- + "tLpWCmo3icWE7DRUuYZWFfnG3gsMRwleDjVmRbkanZiPxAzXpWYapuXo76bBfazrb9dbiUHDNUBTt2x-"
- + "F7JnJ-yMjT1vT_j7wljDVYMrr2F6esimz9PTrczjikXOG6prZ0Kk0tPgjnkJ0vNSGgSsd1KznGbOzxRE"
- + "mN4jWukcTREIdQcT73Dh1nskINx8qO1HqPr83hwsEoFFU1G5zYVddLZrKD-757yNK2o62PvIeMmZfEWA"
- + "czF9f76hPzmTl8zRcozKj_7DXIS4XH-RQDDoWzUd0FSK-a5J1v0wgrNoqiR42E1tVFq6FS-j3ZpAQ6cL"
- + "SNQv8PRIf_S8y1ioyahsjhkX10q0";
+ public static final String DONORS = "6rK809m7nctnXhJewjSHZX8n3MVAYw086_hm054IjRdwqUp4_JWT81c0qvE5N5zqDfkGDMFIpNEMyuoY"
+ + "M3uDM2zrsEPcFuYbilsNYTjr7R2bcYiX7iHwwS_VkmUE0bdSfipZmCR6EPRTasMlw6Rt1Lf0zRVHovPz"
+ + "IWKtWSqlH9CQulutnzUhP56CxXGfihgn1SYueqQmRtIEyGNrnd_K8ZLfpQOXxZM0M4OAMVEsokHnaFqd"
+ + "C50Y9r5tC8250uc3Vv63lZ-X05AnQjZmZs8orbgzvma799HG8GN_o4brRY7XKGOFv2Ik1W8oFu4HWBrM"
+ + "K4dCrkm6P6aHBP8Q17N5Ui4Zih-OcZBdISDvv0w925e1LG2v2Bh0LsapboZNiIiiUFokZ7Ux542kiWO0"
+ + "wSc2ljgwCc3-rqzchBgygMyjf7FATOv_dGtmh24pztOpkdXaCHRpnrmAmnSBa5-0JcqRBCRpY_FEGWm4"
+ + "nvIweCpPStoTHC2ainGMVX5BMZF_hKlLMb74jsOi-W_xwugXX644LoAk0NnDo-8adIyKTmtrxqEkTXtV"
+ + "8jPO9DIReMUdpEdizx9RYXcb6sXn4pfCbqUO6_QLLQ9OD14O0Vezu259xgJws-HHVLi-nDxs9y6yQU60"
+ + "v3PZxE-gCnn53giW2zAsjui5m6ILQ1ToKZVYXaCTw2get4CZtFNNJRg7JHaJvutUyLWFCmRr9Jf6ll2u"
+ + "c4j6SKEBp9lDXxItE0gu4L-SruzzgCzL0ElgtbMBq7W50_eUvWn3UWt9nv6snAEemumijmNFwcBFpUta"
+ + "vg4ZVpXcjgZdZUCF7dyUCXDgtzkdbhf5cBi6GzyQapNPorEKMrWDrL616f5n7t0-CpbIoH5oOiEP3e6O"
+ + "926txRns5DJWaYSM-dNBzjIq1Dcxh-u2tS4FoniPgFWxvY3YxE-KEAFNAB9VCU_Ch9lwFgJ4kO2SCKHm"
+ + "bmhcDaAAQjYSHeRi-wYdEphvp9SsMqXiuvSjZoaKFY6YTOiD1fj2DEhmRzX50AxVfavUp9W80NoFqs_G"
+ + "qqzraBEDbbOH1t1pIGY42drxr1_6ZZ9jjwQmBj7hjctxM3R--i-SPGMda5_6gWEaAaZl_sm8B1DsKzPT"
+ + "qVU2JvkJMiWC7EfaErREZ9uAC2IeTqi0";
@Override
final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed)
@@ -94,7 +94,7 @@ public class PSystemDonors extends AbstractPSystem {
}
private UDrawable getGraphicStrings() throws IOException {
- final List<TextBlock> cols = getCols(getDonors(), 4, 5);
+ final List<TextBlock> cols = getCols(getDonors(), 6, 5);
return new UDrawable() {
public void drawU(UGraphic ug) {
final TextBlockBackcolored header = GraphicStrings.createBlackOnWhite(Arrays
diff --git a/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java b/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java
index 77ebb90..436cb6b 100644
--- a/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java
+++ b/src/net/sourceforge/plantuml/eggs/PSystemAppleTwo.java
@@ -36,15 +36,11 @@
package net.sourceforge.plantuml.eggs;
import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
-import javax.imageio.ImageIO;
-
import net.sourceforge.plantuml.AbstractPSystem;
import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.core.DiagramDescription;
@@ -54,6 +50,7 @@ import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
+import net.sourceforge.plantuml.version.PSystemVersion;
public class PSystemAppleTwo extends AbstractPSystem {
@@ -61,12 +58,10 @@ public class PSystemAppleTwo extends AbstractPSystem {
private final BufferedImage image;
public PSystemAppleTwo() throws IOException {
- strings.add(" <b><size:18>Apple //e for ever ! ");
+ strings.add(" <b><size:18>Apple //e for ever ! ");
strings.add(" ");
- final InputStream is = new ByteArrayInputStream(imm);
- image = ImageIO.read(is);
- is.close();
+ image = PSystemVersion.getApple2Image();
}
@Override
@@ -92,641 +87,4 @@ public class PSystemAppleTwo extends AbstractPSystem {
return new DiagramDescription("(Apple //e)");
}
- private static final byte imm[] = new byte[] { (byte) 255, (byte) 216, (byte) 255, (byte) 224, (byte) 0, (byte) 16,
- (byte) 74, (byte) 70, (byte) 73, (byte) 70, (byte) 0, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 96,
- (byte) 0, (byte) 96, (byte) 0, (byte) 0, (byte) 255, (byte) 219, (byte) 0, (byte) 67, (byte) 0, (byte) 10,
- (byte) 7, (byte) 7, (byte) 8, (byte) 7, (byte) 6, (byte) 10, (byte) 8, (byte) 8, (byte) 8, (byte) 11,
- (byte) 10, (byte) 10, (byte) 11, (byte) 14, (byte) 24, (byte) 16, (byte) 14, (byte) 13, (byte) 13,
- (byte) 14, (byte) 29, (byte) 21, (byte) 22, (byte) 17, (byte) 24, (byte) 35, (byte) 31, (byte) 37,
- (byte) 36, (byte) 34, (byte) 31, (byte) 34, (byte) 33, (byte) 38, (byte) 43, (byte) 55, (byte) 47,
- (byte) 38, (byte) 41, (byte) 52, (byte) 41, (byte) 33, (byte) 34, (byte) 48, (byte) 65, (byte) 49,
- (byte) 52, (byte) 57, (byte) 59, (byte) 62, (byte) 62, (byte) 62, (byte) 37, (byte) 46, (byte) 68,
- (byte) 73, (byte) 67, (byte) 60, (byte) 72, (byte) 55, (byte) 61, (byte) 62, (byte) 59, (byte) 255,
- (byte) 219, (byte) 0, (byte) 67, (byte) 1, (byte) 10, (byte) 11, (byte) 11, (byte) 14, (byte) 13,
- (byte) 14, (byte) 28, (byte) 16, (byte) 16, (byte) 28, (byte) 59, (byte) 40, (byte) 34, (byte) 40,
- (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
- (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
- (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
- (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
- (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59,
- (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 59, (byte) 255, (byte) 192, (byte) 0, (byte) 17,
- (byte) 8, (byte) 0, (byte) 136, (byte) 0, (byte) 200, (byte) 3, (byte) 1, (byte) 34, (byte) 0, (byte) 2,
- (byte) 17, (byte) 1, (byte) 3, (byte) 17, (byte) 1, (byte) 255, (byte) 196, (byte) 0, (byte) 31, (byte) 0,
- (byte) 0, (byte) 1, (byte) 5, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0,
- (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 3,
- (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10, (byte) 11, (byte) 255, (byte) 196,
- (byte) 0, (byte) 181, (byte) 16, (byte) 0, (byte) 2, (byte) 1, (byte) 3, (byte) 3, (byte) 2, (byte) 4,
- (byte) 3, (byte) 5, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 0, (byte) 1, (byte) 125, (byte) 1,
- (byte) 2, (byte) 3, (byte) 0, (byte) 4, (byte) 17, (byte) 5, (byte) 18, (byte) 33, (byte) 49, (byte) 65,
- (byte) 6, (byte) 19, (byte) 81, (byte) 97, (byte) 7, (byte) 34, (byte) 113, (byte) 20, (byte) 50,
- (byte) 129, (byte) 145, (byte) 161, (byte) 8, (byte) 35, (byte) 66, (byte) 177, (byte) 193, (byte) 21,
- (byte) 82, (byte) 209, (byte) 240, (byte) 36, (byte) 51, (byte) 98, (byte) 114, (byte) 130, (byte) 9,
- (byte) 10, (byte) 22, (byte) 23, (byte) 24, (byte) 25, (byte) 26, (byte) 37, (byte) 38, (byte) 39,
- (byte) 40, (byte) 41, (byte) 42, (byte) 52, (byte) 53, (byte) 54, (byte) 55, (byte) 56, (byte) 57,
- (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70, (byte) 71, (byte) 72, (byte) 73, (byte) 74,
- (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87, (byte) 88, (byte) 89, (byte) 90, (byte) 99,
- (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104, (byte) 105, (byte) 106, (byte) 115, (byte) 116,
- (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121, (byte) 122, (byte) 131, (byte) 132, (byte) 133,
- (byte) 134, (byte) 135, (byte) 136, (byte) 137, (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149,
- (byte) 150, (byte) 151, (byte) 152, (byte) 153, (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165,
- (byte) 166, (byte) 167, (byte) 168, (byte) 169, (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181,
- (byte) 182, (byte) 183, (byte) 184, (byte) 185, (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197,
- (byte) 198, (byte) 199, (byte) 200, (byte) 201, (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213,
- (byte) 214, (byte) 215, (byte) 216, (byte) 217, (byte) 218, (byte) 225, (byte) 226, (byte) 227, (byte) 228,
- (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233, (byte) 234, (byte) 241, (byte) 242, (byte) 243,
- (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249, (byte) 250, (byte) 255, (byte) 196,
- (byte) 0, (byte) 31, (byte) 1, (byte) 0, (byte) 3, (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 1,
- (byte) 1, (byte) 1, (byte) 1, (byte) 1, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0,
- (byte) 1, (byte) 2, (byte) 3, (byte) 4, (byte) 5, (byte) 6, (byte) 7, (byte) 8, (byte) 9, (byte) 10,
- (byte) 11, (byte) 255, (byte) 196, (byte) 0, (byte) 181, (byte) 17, (byte) 0, (byte) 2, (byte) 1, (byte) 2,
- (byte) 4, (byte) 4, (byte) 3, (byte) 4, (byte) 7, (byte) 5, (byte) 4, (byte) 4, (byte) 0, (byte) 1,
- (byte) 2, (byte) 119, (byte) 0, (byte) 1, (byte) 2, (byte) 3, (byte) 17, (byte) 4, (byte) 5, (byte) 33,
- (byte) 49, (byte) 6, (byte) 18, (byte) 65, (byte) 81, (byte) 7, (byte) 97, (byte) 113, (byte) 19,
- (byte) 34, (byte) 50, (byte) 129, (byte) 8, (byte) 20, (byte) 66, (byte) 145, (byte) 161, (byte) 177,
- (byte) 193, (byte) 9, (byte) 35, (byte) 51, (byte) 82, (byte) 240, (byte) 21, (byte) 98, (byte) 114,
- (byte) 209, (byte) 10, (byte) 22, (byte) 36, (byte) 52, (byte) 225, (byte) 37, (byte) 241, (byte) 23,
- (byte) 24, (byte) 25, (byte) 26, (byte) 38, (byte) 39, (byte) 40, (byte) 41, (byte) 42, (byte) 53,
- (byte) 54, (byte) 55, (byte) 56, (byte) 57, (byte) 58, (byte) 67, (byte) 68, (byte) 69, (byte) 70,
- (byte) 71, (byte) 72, (byte) 73, (byte) 74, (byte) 83, (byte) 84, (byte) 85, (byte) 86, (byte) 87,
- (byte) 88, (byte) 89, (byte) 90, (byte) 99, (byte) 100, (byte) 101, (byte) 102, (byte) 103, (byte) 104,
- (byte) 105, (byte) 106, (byte) 115, (byte) 116, (byte) 117, (byte) 118, (byte) 119, (byte) 120, (byte) 121,
- (byte) 122, (byte) 130, (byte) 131, (byte) 132, (byte) 133, (byte) 134, (byte) 135, (byte) 136, (byte) 137,
- (byte) 138, (byte) 146, (byte) 147, (byte) 148, (byte) 149, (byte) 150, (byte) 151, (byte) 152, (byte) 153,
- (byte) 154, (byte) 162, (byte) 163, (byte) 164, (byte) 165, (byte) 166, (byte) 167, (byte) 168, (byte) 169,
- (byte) 170, (byte) 178, (byte) 179, (byte) 180, (byte) 181, (byte) 182, (byte) 183, (byte) 184, (byte) 185,
- (byte) 186, (byte) 194, (byte) 195, (byte) 196, (byte) 197, (byte) 198, (byte) 199, (byte) 200, (byte) 201,
- (byte) 202, (byte) 210, (byte) 211, (byte) 212, (byte) 213, (byte) 214, (byte) 215, (byte) 216, (byte) 217,
- (byte) 218, (byte) 226, (byte) 227, (byte) 228, (byte) 229, (byte) 230, (byte) 231, (byte) 232, (byte) 233,
- (byte) 234, (byte) 242, (byte) 243, (byte) 244, (byte) 245, (byte) 246, (byte) 247, (byte) 248, (byte) 249,
- (byte) 250, (byte) 255, (byte) 218, (byte) 0, (byte) 12, (byte) 3, (byte) 1, (byte) 0, (byte) 2, (byte) 17,
- (byte) 3, (byte) 17, (byte) 0, (byte) 63, (byte) 0, (byte) 246, (byte) 106, (byte) 40, (byte) 162,
- (byte) 128, (byte) 10, (byte) 40, (byte) 162, (byte) 128, (byte) 43, (byte) 221, (byte) 92, (byte) 253,
- (byte) 153, (byte) 3, (byte) 121, (byte) 79, (byte) 41, (byte) 39, (byte) 133, (byte) 66, (byte) 185,
- (byte) 253, (byte) 72, (byte) 21, (byte) 145, (byte) 115, (byte) 173, (byte) 106, (byte) 157, (byte) 45,
- (byte) 180, (byte) 146, (byte) 191, (byte) 237, (byte) 73, (byte) 42, (byte) 31, (byte) 208, (byte) 55,
- (byte) 245, (byte) 173, (byte) 59, (byte) 225, (byte) 157, (byte) 159, (byte) 83, (byte) 92, (byte) 61,
- (byte) 182, (byte) 181, (byte) 169, (byte) 181, (byte) 149, (byte) 188, (byte) 243, (byte) 223, (byte) 91,
- (byte) 71, (byte) 44, (byte) 209, (byte) 171, (byte) 149, (byte) 54, (byte) 228, (byte) 129, (byte) 144,
- (byte) 9, (byte) 254, (byte) 44, (byte) 247, (byte) 245, (byte) 172, (byte) 165, (byte) 39, (byte) 114,
- (byte) 210, (byte) 69, (byte) 251, (byte) 155, (byte) 239, (byte) 19, (byte) 78, (byte) 113, (byte) 135,
- (byte) 133, (byte) 79, (byte) 240, (byte) 196, (byte) 168, (byte) 63, (byte) 92, (byte) 147, (byte) 250,
- (byte) 213, (byte) 80, (byte) 254, (byte) 34, (byte) 67, (byte) 129, (byte) 53, (byte) 222, (byte) 115,
- (byte) 221, (byte) 203, (byte) 127, (byte) 141, (byte) 52, (byte) 107, (byte) 183, (byte) 185, (byte) 192,
- (byte) 213, (byte) 180, (byte) 188, (byte) 142, (byte) 205, (byte) 106, (byte) 223, (byte) 252, (byte) 120,
- (byte) 84, (byte) 131, (byte) 90, (byte) 212, (byte) 63, (byte) 232, (byte) 41, (byte) 164, (byte) 127,
- (byte) 224, (byte) 51, (byte) 127, (byte) 241, (byte) 250, (byte) 139, (byte) 190, (byte) 229, (byte) 104,
- (byte) 39, (byte) 159, (byte) 226, (byte) 64, (byte) 120, (byte) 158, (byte) 232, (byte) 255, (byte) 0,
- (byte) 192, (byte) 88, (byte) 255, (byte) 0, (byte) 74, (byte) 67, (byte) 121, (byte) 226, (byte) 96,
- (byte) 121, (byte) 158, (byte) 243, (byte) 131, (byte) 198, (byte) 32, (byte) 110, (byte) 127, (byte) 241,
- (byte) 202, (byte) 144, (byte) 107, (byte) 119, (byte) 223, (byte) 244, (byte) 16, (byte) 210, (byte) 88,
- (byte) 250, (byte) 8, (byte) 136, (byte) 255, (byte) 0, (byte) 218, (byte) 198, (byte) 158, (byte) 53,
- (byte) 203, (byte) 220, (byte) 224, (byte) 73, (byte) 167, (byte) 183, (byte) 209, (byte) 138, (byte) 255,
- (byte) 0, (byte) 83, (byte) 74, (byte) 236, (byte) 44, (byte) 66, (byte) 53, (byte) 63, (byte) 18,
- (byte) 131, (byte) 180, (byte) 205, (byte) 121, (byte) 248, (byte) 218, (byte) 31, (byte) 254, (byte) 34,
- (byte) 156, (byte) 53, (byte) 143, (byte) 16, (byte) 142, (byte) 179, (byte) 207, (byte) 199, (byte) 247,
- (byte) 173, (byte) 64, (byte) 254, (byte) 105, (byte) 86, (byte) 6, (byte) 181, (byte) 169, (byte) 127,
- (byte) 207, (byte) 173, (byte) 131, (byte) 255, (byte) 0, (byte) 219, (byte) 211, (byte) 47, (byte) 254,
- (byte) 211, (byte) 52, (byte) 241, (byte) 172, (byte) 234, (byte) 196, (byte) 241, (byte) 166, (byte) 88,
- (byte) 48, (byte) 246, (byte) 191, (byte) 147, (byte) 255, (byte) 0, (byte) 140, (byte) 83, (byte) 187,
- (byte) 2, (byte) 161, (byte) 215, (byte) 181, (byte) 213, (byte) 25, (byte) 55, (byte) 79, (byte) 248,
- (byte) 194, (byte) 131, (byte) 255, (byte) 0, (byte) 101, (byte) 163, (byte) 254, (byte) 18, (byte) 61,
- (byte) 100, (byte) 114, (byte) 110, (byte) 112, (byte) 61, (byte) 227, (byte) 65, (byte) 253, (byte) 42,
- (byte) 231, (byte) 246, (byte) 206, (byte) 168, (byte) 57, (byte) 109, (byte) 46, (byte) 215, (byte) 254,
- (byte) 3, (byte) 122, (byte) 231, (byte) 255, (byte) 0, (byte) 104, (byte) 138, (byte) 81, (byte) 175,
- (byte) 95, (byte) 15, (byte) 189, (byte) 166, (byte) 1, (byte) 254, (byte) 237, (byte) 206, (byte) 127,
- (byte) 154, (byte) 138, (byte) 46, (byte) 251, (byte) 133, (byte) 151, (byte) 98, (byte) 160, (byte) 241,
- (byte) 54, (byte) 172, (byte) 188, (byte) 153, (byte) 227, (byte) 56, (byte) 245, (byte) 9, (byte) 82,
- (byte) 47, (byte) 136, (byte) 181, (byte) 210, (byte) 55, (byte) 36, (byte) 45, (byte) 34, (byte) 255,
- (byte) 0, (byte) 121, (byte) 45, (byte) 139, (byte) 143, (byte) 204, (byte) 86, (byte) 134, (byte) 153,
- (byte) 172, (byte) 46, (byte) 177, (byte) 101, (byte) 117, (byte) 34, (byte) 197, (byte) 36, (byte) 45,
- (byte) 4, (byte) 175, (byte) 4, (byte) 138, (byte) 236, (byte) 15, (byte) 204, (byte) 160, (byte) 19,
- (byte) 211, (byte) 168, (byte) 230, (byte) 132, (byte) 211, (byte) 165, (byte) 142, (byte) 118, (byte) 104,
- (byte) 239, (byte) 25, (byte) 119, (byte) 73, (byte) 189, (byte) 129, (byte) 81, (byte) 202, (byte) 231,
- (byte) 59, (byte) 126, (byte) 152, (byte) 226, (byte) 142, (byte) 103, (byte) 220, (byte) 44, (byte) 140,
- (byte) 209, (byte) 226, (byte) 173, (byte) 88, (byte) 16, (byte) 79, (byte) 144, (byte) 65, (byte) 231,
- (byte) 5, (byte) 63, (byte) 250, (byte) 249, (byte) 167, (byte) 127, (byte) 194, (byte) 95, (byte) 169,
- (byte) 47, (byte) 38, (byte) 43, (byte) 102, (byte) 3, (byte) 146, (byte) 54, (byte) 48, (byte) 255,
- (byte) 0, (byte) 217, (byte) 171, (byte) 50, (byte) 225, (byte) 118, (byte) 201, (byte) 34, (byte) 246,
- (byte) 87, (byte) 35, (byte) 167, (byte) 185, (byte) 170, (byte) 237, (byte) 83, (byte) 205, (byte) 46,
- (byte) 227, (byte) 178, (byte) 61, (byte) 58, (byte) 55, (byte) 89, (byte) 35, (byte) 87, (byte) 83,
- (byte) 149, (byte) 97, (byte) 144, (byte) 125, (byte) 69, (byte) 62, (byte) 178, (byte) 252, (byte) 61,
- (byte) 113, (byte) 246, (byte) 141, (byte) 14, (byte) 217, (byte) 179, (byte) 146, (byte) 139, (byte) 229,
- (byte) 159, (byte) 248, (byte) 9, (byte) 199, (byte) 242, (byte) 197, (byte) 106, (byte) 87, (byte) 74,
- (byte) 119, (byte) 70, (byte) 33, (byte) 69, (byte) 20, (byte) 83, (byte) 0, (byte) 162, (byte) 138,
- (byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 0, (byte) 162, (byte) 138, (byte) 40,
- (byte) 0, (byte) 162, (byte) 138, (byte) 40, (byte) 2, (byte) 181, (byte) 224, (byte) 253, (byte) 218,
- (byte) 253, (byte) 107, (byte) 202, (byte) 245, (byte) 112, (byte) 97, (byte) 142, (byte) 201, (byte) 84,
- (byte) 227, (byte) 98, (byte) 178, (byte) 140, (byte) 123, (byte) 96, (byte) 127, (byte) 74, (byte) 245,
- (byte) 91, (byte) 177, (byte) 152, (byte) 135, (byte) 177, (byte) 175, (byte) 46, (byte) 241, (byte) 26,
- (byte) 20, (byte) 158, (byte) 37, (byte) 56, (byte) 225, (byte) 229, (byte) 0, (byte) 99, (byte) 253,
- (byte) 161, (byte) 88, (byte) 207, (byte) 114, (byte) 227, (byte) 177, (byte) 199, (byte) 94, (byte) 11,
- (byte) 155, (byte) 251, (byte) 249, (byte) 101, (byte) 121, (byte) 164, (byte) 42, (byte) 174, (byte) 81,
- (byte) 20, (byte) 49, (byte) 194, (byte) 237, (byte) 249, (byte) 78, (byte) 7, (byte) 185, (byte) 6,
- (byte) 180, (byte) 52, (byte) 125, (byte) 58, (byte) 53, (byte) 156, (byte) 25, (byte) 162, (byte) 71,
- (byte) 207, (byte) 247, (byte) 192, (byte) 111, (byte) 231, (byte) 78, (byte) 181, (byte) 69, (byte) 49,
- (byte) 22, (byte) 199, (byte) 223, (byte) 146, (byte) 70, (byte) 252, (byte) 221, (byte) 143, (byte) 245,
- (byte) 171, (byte) 208, (byte) 29, (byte) 146, (byte) 2, (byte) 43, (byte) 101, (byte) 162, (byte) 49,
- (byte) 111, (byte) 83, (byte) 164, (byte) 131, (byte) 72, (byte) 181, (byte) 104, (byte) 195, (byte) 44,
- (byte) 17, (byte) 129, (byte) 140, (byte) 240, (byte) 130, (byte) 164, (byte) 146, (byte) 194, (byte) 203,
- (byte) 162, (byte) 194, (byte) 83, (byte) 28, (byte) 96, (byte) 128, (byte) 217, (byte) 231, (byte) 175,
- (byte) 229, (byte) 69, (byte) 133, (byte) 223, (byte) 238, (byte) 128, (byte) 207, (byte) 106, (byte) 145,
- (byte) 229, (byte) 6, (byte) 168, (byte) 30, (byte) 166, (byte) 117, (byte) 214, (byte) 159, (byte) 0,
- (byte) 145, (byte) 188, (byte) 164, (byte) 194, (byte) 103, (byte) 140, (byte) 129, (byte) 156, (byte) 126,
- (byte) 21, (byte) 151, (byte) 113, (byte) 96, (byte) 64, (byte) 37, (byte) 93, (byte) 212, (byte) 255,
- (byte) 0, (byte) 178, (byte) 228, (byte) 127, (byte) 90, (byte) 218, (byte) 185, (byte) 151, (byte) 142,
- (byte) 43, (byte) 53, (byte) 230, (byte) 39, (byte) 140, (byte) 210, (byte) 29, (byte) 236, (byte) 97,
- (byte) 77, (byte) 29, (byte) 228, (byte) 71, (byte) 228, (byte) 185, (byte) 153, (byte) 123, (byte) 242,
- (byte) 217, (byte) 254, (byte) 117, (byte) 99, (byte) 64, (byte) 188, (byte) 212, (byte) 134, (byte) 187,
- (byte) 107, (byte) 12, (byte) 215, (byte) 38, (byte) 104, (byte) 100, (byte) 44, (byte) 25, (byte) 89,
- (byte) 20, (byte) 17, (byte) 242, (byte) 147, (byte) 144, (byte) 64, (byte) 29, (byte) 197, (byte) 93,
- (byte) 145, (byte) 65, (byte) 228, (byte) 210, (byte) 105, (byte) 113, (byte) 168, (byte) 214, (byte) 109,
- (byte) 155, (byte) 28, (byte) 135, (byte) 63, (byte) 250, (byte) 9, (byte) 169, (byte) 146, (byte) 86,
- (byte) 8, (byte) 201, (byte) 220, (byte) 234, (byte) 124, (byte) 34, (byte) 127, (byte) 119, (byte) 173,
- (byte) 199, (byte) 233, (byte) 168, (byte) 74, (byte) 223, (byte) 154, (byte) 175, (byte) 248, (byte) 87,
- (byte) 79, (byte) 92, (byte) 199, (byte) 132, (byte) 191, (byte) 227, (byte) 243, (byte) 93, (byte) 143,
- (byte) 176, (byte) 187, (byte) 45, (byte) 215, (byte) 212, (byte) 176, (byte) 254, (byte) 149, (byte) 211,
- (byte) 175, (byte) 32, (byte) 31, (byte) 106, (byte) 230, (byte) 55, (byte) 56, (byte) 219, (byte) 209,
- (byte) 139, (byte) 139, (byte) 128, (byte) 58, (byte) 9, (byte) 152, (byte) 126, (byte) 166, (byte) 170,
- (byte) 53, (byte) 93, (byte) 212, (byte) 70, (byte) 46, (byte) 238, (byte) 127, (byte) 235, (byte) 187,
- (byte) 255, (byte) 0, (byte) 232, (byte) 77, (byte) 84, (byte) 24, (byte) 212, (byte) 148, (byte) 117,
- (byte) 126, (byte) 12, (byte) 184, (byte) 6, (byte) 11, (byte) 155, (byte) 98, (byte) 126, (byte) 235,
- (byte) 135, (byte) 25, (byte) 247, (byte) 24, (byte) 254, (byte) 131, (byte) 243, (byte) 174, (byte) 162,
- (byte) 184, (byte) 63, (byte) 10, (byte) 220, (byte) 121, (byte) 26, (byte) 226, (byte) 33, (byte) 56,
- (byte) 19, (byte) 163, (byte) 39, (byte) 63, (byte) 159, (byte) 244, (byte) 174, (byte) 238, (byte) 186,
- (byte) 105, (byte) 187, (byte) 196, (byte) 202, (byte) 75, (byte) 81, (byte) 104, (byte) 162, (byte) 138,
- (byte) 178, (byte) 66, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160,
- (byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 2, (byte) 138, (byte) 40, (byte) 160, (byte) 10,
- (byte) 247, (byte) 127, (byte) 234, (byte) 9, (byte) 244, (byte) 34, (byte) 188, (byte) 215, (byte) 197,
- (byte) 75, (byte) 139, (byte) 248, (byte) 135, (byte) 253, (byte) 52, (byte) 148, (byte) 127, (byte) 227,
- (byte) 194, (byte) 189, (byte) 50, (byte) 228, (byte) 102, (byte) 221, (byte) 171, (byte) 205, (byte) 124,
- (byte) 87, (byte) 197, (byte) 236, (byte) 39, (byte) 254, (byte) 154, (byte) 74, (byte) 127, (byte) 85,
- (byte) 172, (byte) 103, (byte) 185, (byte) 113, (byte) 216, (byte) 229, (byte) 108, (byte) 159, (byte) 253,
- (byte) 10, (byte) 220, (byte) 250, (byte) 198, (byte) 191, (byte) 202, (byte) 174, (byte) 198, (byte) 220,
- (byte) 138, (byte) 205, (byte) 180, (byte) 56, (byte) 180, (byte) 128, (byte) 122, (byte) 32, (byte) 31,
- (byte) 149, (byte) 91, (byte) 141, (byte) 186, (byte) 86, (byte) 199, (byte) 59, (byte) 220, (byte) 232,
- (byte) 109, (byte) 37, (byte) 2, (byte) 33, (byte) 207, (byte) 52, (byte) 247, (byte) 185, (byte) 219,
- (byte) 222, (byte) 179, (byte) 160, (byte) 124, (byte) 39, (byte) 90, (byte) 116, (byte) 143, (byte) 129,
- (byte) 78, (byte) 227, (byte) 38, (byte) 146, (byte) 125, (byte) 245, (byte) 3, (byte) 250, (byte) 211,
- (byte) 21, (byte) 179, (byte) 77, (byte) 145, (byte) 248, (byte) 160, (byte) 67, (byte) 36, (byte) 147,
- (byte) 60, (byte) 84, (byte) 186, (byte) 79, (byte) 58, (byte) 189, (byte) 184, (byte) 245, (byte) 111,
- (byte) 232, (byte) 106, (byte) 163, (byte) 18, (byte) 77, (byte) 90, (byte) 210, (byte) 71, (byte) 252,
- (byte) 77, (byte) 109, (byte) 191, (byte) 223, (byte) 254, (byte) 148, (byte) 158, (byte) 195, (byte) 91,
- (byte) 157, (byte) 79, (byte) 132, (byte) 255, (byte) 0, (byte) 228, (byte) 51, (byte) 174, (byte) 175,
- (byte) 253, (byte) 54, (byte) 67, (byte) 249, (byte) 188, (byte) 191, (byte) 225, (byte) 93, (byte) 60,
- (byte) 99, (byte) 247, (byte) 106, (byte) 79, (byte) 112, (byte) 43, (byte) 150, (byte) 240, (byte) 153,
- (byte) 198, (byte) 187, (byte) 173, (byte) 251, (byte) 200, (byte) 191, (byte) 250, (byte) 28, (byte) 191,
- (byte) 227, (byte) 93, (byte) 76, (byte) 103, (byte) 247, (byte) 72, (byte) 48, (byte) 79, (byte) 202,
- (byte) 58, (byte) 125, (byte) 43, (byte) 152, (byte) 232, (byte) 103, (byte) 35, (byte) 170, (byte) 140,
- (byte) 94, (byte) 220, (byte) 15, (byte) 250, (byte) 106, (byte) 199, (byte) 245, (byte) 53, (byte) 154,
- (byte) 213, (byte) 161, (byte) 172, (byte) 200, (byte) 201, (byte) 172, (byte) 79, (byte) 27, (byte) 40,
- (byte) 40, (byte) 228, (byte) 237, (byte) 97, (byte) 215, (byte) 119, (byte) 4, (byte) 254, (byte) 24,
- (byte) 34, (byte) 179, (byte) 92, (byte) 212, (byte) 50, (byte) 209, (byte) 53, (byte) 140, (byte) 205,
- (byte) 14, (byte) 161, (byte) 109, (byte) 34, (byte) 156, (byte) 21, (byte) 153, (byte) 79, (byte) 235,
- (byte) 94, (byte) 159, (byte) 94, (byte) 79, (byte) 19, (byte) 133, (byte) 184, (byte) 141, (byte) 137,
- (byte) 198, (byte) 28, (byte) 28, (byte) 231, (byte) 222, (byte) 189, (byte) 96, (byte) 86, (byte) 244,
- (byte) 182, (byte) 51, (byte) 152, (byte) 180, (byte) 81, (byte) 69, (byte) 106, (byte) 64, (byte) 81,
- (byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 0, (byte) 81, (byte) 69, (byte) 20,
- (byte) 0, (byte) 81, (byte) 69, (byte) 20, (byte) 1, (byte) 28, (byte) 195, (byte) 48, (byte) 191,
- (byte) 210, (byte) 188, (byte) 215, (byte) 198, (byte) 3, (byte) 253, (byte) 34, (byte) 31, (byte) 247,
- (byte) 165, (byte) 255, (byte) 0, (byte) 217, (byte) 107, (byte) 210, (byte) 228, (byte) 25, (byte) 141,
- (byte) 135, (byte) 168, (byte) 175, (byte) 55, (byte) 241, (byte) 136, (byte) 255, (byte) 0, (byte) 72,
- (byte) 132, (byte) 255, (byte) 0, (byte) 181, (byte) 39, (byte) 254, (byte) 201, (byte) 89, (byte) 79,
- (byte) 114, (byte) 226, (byte) 112, (byte) 240, (byte) 182, (byte) 17, (byte) 151, (byte) 251, (byte) 146,
- (byte) 200, (byte) 191, (byte) 147, (byte) 176, (byte) 171, (byte) 49, (byte) 190, (byte) 42, (byte) 175,
- (byte) 221, (byte) 185, (byte) 158, (byte) 62, (byte) 226, (byte) 82, (byte) 199, (byte) 254, (byte) 5,
- (byte) 134, (byte) 255, (byte) 0, (byte) 217, (byte) 170, (byte) 236, (byte) 54, (byte) 238, (byte) 216,
- (byte) 35, (byte) 161, (byte) 173, (byte) 86, (byte) 198, (byte) 13, (byte) 106, (byte) 93, (byte) 134,
- (byte) 76, (byte) 12, (byte) 158, (byte) 148, (byte) 231, (byte) 155, (byte) 119, (byte) 21, (byte) 25,
- (byte) 2, (byte) 40, (byte) 241, (byte) 222, (byte) 171, (byte) 249, (byte) 148, (byte) 192, (byte) 176,
- (byte) 37, (byte) 197, (byte) 33, (byte) 147, (byte) 53, (byte) 84, (byte) 189, (byte) 39, (byte) 155,
- (byte) 72, (byte) 46, (byte) 88, (byte) 105, (byte) 0, (byte) 171, (byte) 122, (byte) 83, (byte) 143,
- (byte) 237, (byte) 75, (byte) 111, (byte) 250, (byte) 232, (byte) 5, (byte) 101, (byte) 51, (byte) 213,
- (byte) 253, (byte) 24, (byte) 238, (byte) 213, (byte) 109, (byte) 6, (byte) 122, (byte) 201, (byte) 252,
- (byte) 129, (byte) 63, (byte) 210, (byte) 147, (byte) 216, (byte) 22, (byte) 231, (byte) 85, (byte) 225,
- (byte) 118, (byte) 199, (byte) 136, (byte) 245, (byte) 81, (byte) 234, (byte) 73, (byte) 252, (byte) 164,
- (byte) 111, (byte) 241, (byte) 174, (byte) 186, (byte) 48, (byte) 60, (byte) 181, (byte) 200, (byte) 228,
- (byte) 10, (byte) 227, (byte) 60, (byte) 52, (byte) 216, (byte) 241, (byte) 93, (byte) 242, (byte) 250,
- (byte) 199, (byte) 43, (byte) 126, (byte) 82, (byte) 175, (byte) 248, (byte) 215, (byte) 103, (byte) 23,
- (byte) 220, (byte) 252, (byte) 127, (byte) 173, (byte) 115, (byte) 35, (byte) 162, (byte) 71, (byte) 39,
- (byte) 173, (byte) 32, (byte) 26, (byte) 165, (byte) 219, (byte) 115, (byte) 146, (byte) 16, (byte) 117,
- (byte) 246, (byte) 83, (byte) 254, (byte) 126, (byte) 130, (byte) 177, (byte) 166, (byte) 32, (byte) 119,
- (byte) 226, (byte) 182, (byte) 124, (byte) 69, (byte) 32, (byte) 139, (byte) 81, (byte) 186, (byte) 245,
- (byte) 33, (byte) 14, (byte) 63, (byte) 5, (byte) 172, (byte) 24, (byte) 109, (byte) 47, (byte) 53,
- (byte) 55, (byte) 253, (byte) 218, (byte) 236, (byte) 132, (byte) 28, (byte) 25, (byte) 24, (byte) 113,
- (byte) 248, (byte) 122, (byte) 159, (byte) 242, (byte) 113, (byte) 72, (byte) 181, (byte) 177, (byte) 93,
- (byte) 167, (byte) 253, (byte) 224, (byte) 84, (byte) 203, (byte) 49, (byte) 56, (byte) 0, (byte) 117,
- (byte) 39, (byte) 210, (byte) 189, (byte) 58, (byte) 231, (byte) 196, (byte) 54, (byte) 176, (byte) 79,
- (byte) 229, (byte) 162, (byte) 60, (byte) 216, (byte) 234, (byte) 202, (byte) 64, (byte) 31, (byte) 175,
- (byte) 90, (byte) 229, (byte) 116, (byte) 253, (byte) 34, (byte) 11, (byte) 33, (byte) 242, (byte) 21,
- (byte) 18, (byte) 145, (byte) 204, (byte) 178, (byte) 2, (byte) 73, (byte) 250, (byte) 96, (byte) 112,
- (byte) 61, (byte) 191, (byte) 60, (byte) 213, (byte) 209, (byte) 106, (byte) 63, (byte) 231, (byte) 162,
- (byte) 49, (byte) 250, (byte) 31, (byte) 234, (byte) 42, (byte) 226, (byte) 218, (byte) 37, (byte) 171,
- (byte) 238, (byte) 110, (byte) 175, (byte) 136, (byte) 45, (byte) 207, (byte) 222, (byte) 133, (byte) 199,
- (byte) 210, (byte) 88, (byte) 207, (byte) 254, (byte) 205, (byte) 82, (byte) 13, (byte) 114, (byte) 212,
- (byte) 255, (byte) 0, (byte) 4, (byte) 191, (byte) 130, (byte) 134, (byte) 254, (byte) 68, (byte) 215,
- (byte) 62, (byte) 45, (byte) 155, (byte) 213, (byte) 63, (byte) 25, (byte) 20, (byte) 127, (byte) 51,
- (byte) 71, (byte) 217, (byte) 155, (byte) 217, (byte) 190, (byte) 142, (byte) 15, (byte) 245, (byte) 167,
- (byte) 207, (byte) 33, (byte) 114, (byte) 163, (byte) 164, (byte) 26, (byte) 189, (byte) 169, (byte) 237,
- (byte) 48, (byte) 250, (byte) 192, (byte) 255, (byte) 0, (byte) 225, (byte) 75, (byte) 253, (byte) 175,
- (byte) 99, (byte) 156, (byte) 25, (byte) 246, (byte) 159, (byte) 246, (byte) 145, (byte) 135, (byte) 243,
- (byte) 21, (byte) 203, (byte) 152, (byte) 121, (byte) 195, (byte) 46, (byte) 8, (byte) 235, (byte) 145,
- (byte) 72, (byte) 242, (byte) 164, (byte) 67, (byte) 229, (byte) 33, (byte) 219, (byte) 182, (byte) 41,
- (byte) 169, (byte) 177, (byte) 114, (byte) 163, (byte) 174, (byte) 183, (byte) 189, (byte) 182, (byte) 186,
- (byte) 37, (byte) 96, (byte) 157, (byte) 36, (byte) 101, (byte) 25, (byte) 32, (byte) 30, (byte) 69,
- (byte) 21, (byte) 129, (byte) 225, (byte) 167, (byte) 102, (byte) 212, (byte) 102, (byte) 220, (byte) 73,
- (byte) 38, (byte) 46, (byte) 191, (byte) 66, (byte) 63, (byte) 198, (byte) 138, (byte) 210, (byte) 46,
- (byte) 234, (byte) 228, (byte) 181, (byte) 99, (byte) 168, (byte) 162, (byte) 138, (byte) 42, (byte) 132,
- (byte) 20, (byte) 81, (byte) 69, (byte) 0, (byte) 53, (byte) 134, (byte) 65, (byte) 30, (byte) 162,
- (byte) 184, (byte) 63, (byte) 17, (byte) 216, (byte) 75, (byte) 125, (byte) 118, (byte) 60, (byte) 160,
- (byte) 27, (byte) 203, (byte) 39, (byte) 43, (byte) 144, (byte) 51, (byte) 144, (byte) 190, (byte) 191,
- (byte) 74, (byte) 239, (byte) 24, (byte) 133, (byte) 4, (byte) 146, (byte) 0, (byte) 3, (byte) 36,
- (byte) 154, (byte) 228, (byte) 117, (byte) 41, (byte) 188, (byte) 61, (byte) 125, (byte) 40, (byte) 55,
- (byte) 83, (byte) 72, (byte) 207, (byte) 16, (byte) 40, (byte) 36, (byte) 141, (byte) 102, (byte) 78,
- (byte) 255, (byte) 0, (byte) 222, (byte) 80, (byte) 1, (byte) 233, (byte) 235, (byte) 89, (byte) 84,
- (byte) 42, (byte) 39, (byte) 23, (byte) 123, (byte) 225, (byte) 171, (byte) 201, (byte) 231, (byte) 19,
- (byte) 165, (byte) 179, (byte) 68, (byte) 224, (byte) 96, (byte) 149, (byte) 145, (byte) 8, (byte) 108,
- (byte) 116, (byte) 200, (byte) 207, (byte) 63, (byte) 134, (byte) 63, (byte) 149, (byte) 39, (byte) 246,
- (byte) 118, (byte) 167, (byte) 18, (byte) 5, (byte) 22, (byte) 146, (byte) 57, (byte) 232, (byte) 74,
- (byte) 198, (byte) 216, (byte) 253, (byte) 51, (byte) 93, (byte) 71, (byte) 217, (byte) 124, (byte) 49,
- (byte) 252, (byte) 26, (byte) 244, (byte) 144, (byte) 158, (byte) 152, (byte) 125, (byte) 102, (byte) 81,
- (byte) 250, (byte) 59, (byte) 212, (byte) 145, (byte) 233, (byte) 118, (byte) 115, (byte) 241, (byte) 103,
- (byte) 226, (byte) 121, (byte) 219, (byte) 61, (byte) 60, (byte) 185, (byte) 160, (byte) 155, (byte) 255,
- (byte) 0, (byte) 66, (byte) 86, (byte) 169, (byte) 83, (byte) 104, (byte) 171, (byte) 38, (byte) 113,
- (byte) 83, (byte) 218, (byte) 223, (byte) 15, (byte) 191, (byte) 105, (byte) 34, (byte) 253, (byte) 84,
- (byte) 143, (byte) 253, (byte) 8, (byte) 10, (byte) 164, (byte) 203, (byte) 42, (byte) 253, (byte) 232,
- (byte) 219, (byte) 240, (byte) 32, (byte) 255, (byte) 0, (byte) 42, (byte) 244, (byte) 143, (byte) 248,
- (byte) 71, (byte) 245, (byte) 56, (byte) 190, (byte) 104, (byte) 245, (byte) 105, (byte) 95, (byte) 143,
- (byte) 249, (byte) 109, (byte) 111, (byte) 30, (byte) 63, (byte) 241, (byte) 213, (byte) 90, (byte) 67,
- (byte) 166, (byte) 107, (byte) 153, (byte) 255, (byte) 0, (byte) 143, (byte) 251, (byte) 22, (byte) 29,
- (byte) 54, (byte) 155, (byte) 103, (byte) 255, (byte) 0, (byte) 227, (byte) 148, (byte) 253, (byte) 161,
- (byte) 62, (byte) 205, (byte) 30, (byte) 108, (byte) 86, (byte) 99, (byte) 210, (byte) 9, (byte) 143,
- (byte) 210, (byte) 38, (byte) 255, (byte) 0, (byte) 10, (byte) 102, (byte) 38, (byte) 255, (byte) 0,
- (byte) 158, (byte) 19, (byte) 127, (byte) 223, (byte) 166, (byte) 255, (byte) 0, (byte) 10, (byte) 244,
- (byte) 71, (byte) 211, (byte) 117, (byte) 126, (byte) 127, (byte) 208, (byte) 52, (byte) 185, (byte) 207,
- (byte) 171, (byte) 59, (byte) 39, (byte) 254, (byte) 200, (byte) 213, (byte) 3, (byte) 216, (byte) 234,
- (byte) 73, (byte) 247, (byte) 252, (byte) 57, (byte) 167, (byte) 185, (byte) 207, (byte) 252, (byte) 177,
- (byte) 185, (byte) 25, (byte) 253, (byte) 98, (byte) 20, (byte) 253, (byte) 160, (byte) 189, (byte) 154,
- (byte) 56, (byte) 34, (byte) 179, (byte) 127, (byte) 207, (byte) 9, (byte) 191, (byte) 239, (byte) 211,
- (byte) 127, (byte) 133, (byte) 106, (byte) 248, (byte) 126, (byte) 25, (byte) 155, (byte) 92, (byte) 180,
- (byte) 38, (byte) 25, (byte) 2, (byte) 161, (byte) 102, (byte) 102, (byte) 101, (byte) 35, (byte) 31,
- (byte) 35, (byte) 122, (byte) 245, (byte) 231, (byte) 21, (byte) 209, (byte) 73, (byte) 107, (byte) 56,
- (byte) 255, (byte) 0, (byte) 91, (byte) 225, (byte) 75, (byte) 156, (byte) 122, (byte) 197, (byte) 60,
- (byte) 68, (byte) 127, (byte) 232, (byte) 98, (byte) 155, (byte) 11, (byte) 219, (byte) 90, (byte) 74,
- (byte) 37, (byte) 254, (byte) 195, (byte) 213, (byte) 33, (byte) 96, (byte) 15, (byte) 34, (byte) 35,
- (byte) 39, (byte) 111, (byte) 246, (byte) 93, (byte) 168, (byte) 117, (byte) 52, (byte) 26, (byte) 133,
- (byte) 152, (byte) 190, (byte) 26, (byte) 111, (byte) 248, (byte) 172, (byte) 46, (byte) 125, (byte) 224,
- (byte) 159, (byte) 255, (byte) 0, (byte) 70, (byte) 199, (byte) 93, (byte) 188, (byte) 127, (byte) 112,
- (byte) 253, (byte) 79, (byte) 243, (byte) 174, (byte) 19, (byte) 195, (byte) 2, (byte) 87, (byte) 241,
- (byte) 91, (byte) 74, (byte) 109, (byte) 174, (byte) 163, (byte) 83, (byte) 4, (byte) 191, (byte) 52,
- (byte) 182, (byte) 242, (byte) 70, (byte) 57, (byte) 116, (byte) 56, (byte) 249, (byte) 128, (byte) 231,
- (byte) 143, (byte) 210, (byte) 187, (byte) 57, (byte) 110, (byte) 227, (byte) 180, (byte) 143, (byte) 116,
- (byte) 188, (byte) 41, (byte) 220, (byte) 217, (byte) 200, (byte) 236, (byte) 195, (byte) 143, (byte) 215,
- (byte) 244, (byte) 172, (byte) 139, (byte) 145, (byte) 201, (byte) 248, (byte) 171, (byte) 82, (byte) 139,
- (byte) 79, (byte) 213, (byte) 247, (byte) 203, (byte) 100, (byte) 46, (byte) 132, (byte) 135, (byte) 104,
- (byte) 87, (byte) 144, (byte) 168, (byte) 27, (byte) 85, (byte) 14, (byte) 72, (byte) 193, (byte) 207,
- (byte) 222, (byte) 233, (byte) 237, (byte) 223, (byte) 60, (byte) 81, (byte) 79, (byte) 25, (byte) 67,
- (byte) 128, (byte) 26, (byte) 192, (byte) 160, (byte) 3, (byte) 133, (byte) 73, (byte) 65, (byte) 254,
- (byte) 130, (byte) 163, (byte) 248, (byte) 147, (byte) 58, (byte) 90, (byte) 223, (byte) 219, (byte) 187,
- (byte) 134, (byte) 101, (byte) 33, (byte) 219, (byte) 228, (byte) 93, (byte) 199, (byte) 145, (byte) 24,
- (byte) 254, (byte) 149, (byte) 196, (byte) 255, (byte) 0, (byte) 107, (byte) 91, (byte) 19, (byte) 203,
- (byte) 72, (byte) 163, (byte) 253, (byte) 168, (byte) 95, (byte) 252, (byte) 43, (byte) 120, (byte) 194,
- (byte) 45, (byte) 106, (byte) 67, (byte) 108, (byte) 239, (byte) 215, (byte) 198, (byte) 186, (byte) 104,
- (byte) 225, (byte) 237, (byte) 238, (byte) 198, (byte) 61, (byte) 21, (byte) 63, (byte) 248, (byte) 161,
- (byte) 82, (byte) 199, (byte) 227, (byte) 13, (byte) 33, (byte) 241, (byte) 151, (byte) 120, (byte) 243,
- (byte) 211, (byte) 112, (byte) 207, (byte) 254, (byte) 131, (byte) 154, (byte) 224, (byte) 132, (byte) 158,
- (byte) 110, (byte) 217, (byte) 85, (byte) 91, (byte) 100, (byte) 136, (byte) 25, (byte) 24, (byte) 169,
- (byte) 27, (byte) 128, (byte) 102, (byte) 25, (byte) 25, (byte) 247, (byte) 4, (byte) 126, (byte) 6,
- (byte) 131, (byte) 46, (byte) 196, (byte) 203, (byte) 182, (byte) 213, (byte) 4, (byte) 100, (byte) 147,
- (byte) 199, (byte) 90, (byte) 175, (byte) 103, (byte) 17, (byte) 115, (byte) 51, (byte) 209, (byte) 87,
- (byte) 196, (byte) 250, (byte) 43, (byte) 112, (byte) 47, (byte) 9, (byte) 63, (byte) 245, (byte) 198,
- (byte) 79, (byte) 234, (byte) 181, (byte) 98, (byte) 29, (byte) 91, (byte) 79, (byte) 185, (byte) 144,
- (byte) 71, (byte) 21, (byte) 204, (byte) 108, (byte) 228, (byte) 18, (byte) 23, (byte) 112, (byte) 207,
- (byte) 3, (byte) 39, (byte) 3, (byte) 169, (byte) 224, (byte) 19, (byte) 248, (byte) 87, (byte) 155,
- (byte) 69, (byte) 34, (byte) 56, (byte) 249, (byte) 27, (byte) 119, (byte) 161, (byte) 21, (byte) 167,
- (byte) 161, (byte) 182, (byte) 221, (byte) 102, (byte) 220, (byte) 247, (byte) 219, (byte) 40, (byte) 252,
- (byte) 227, (byte) 97, (byte) 253, (byte) 105, (byte) 58, (byte) 106, (byte) 195, (byte) 82, (byte) 103,
- (byte) 111, (byte) 52, (byte) 172, (byte) 252, (byte) 46, (byte) 85, (byte) 125, (byte) 61, (byte) 106,
- (byte) 12, (byte) 96, (byte) 99, (byte) 240, (byte) 169, (byte) 202, (byte) 212, (byte) 101, (byte) 107,
- (byte) 3, (byte) 67, (byte) 83, (byte) 195, (byte) 7, (byte) 254, (byte) 38, (byte) 50, (byte) 231,
- (byte) 254, (byte) 120, (byte) 159, (byte) 253, (byte) 8, (byte) 81, (byte) 75, (byte) 225, (byte) 180,
- (byte) 35, (byte) 82, (byte) 118, (byte) 231, (byte) 2, (byte) 18, (byte) 9, (byte) 199, (byte) 251,
- (byte) 75, (byte) 69, (byte) 111, (byte) 13, (byte) 140, (byte) 158, (byte) 231, (byte) 83, (byte) 69,
- (byte) 20, (byte) 85, (byte) 8, (byte) 41, (byte) 172, (byte) 202, (byte) 168, (byte) 89, (byte) 136,
- (byte) 10, (byte) 7, (byte) 36, (byte) 210, (byte) 59, (byte) 172, (byte) 104, (byte) 89, (byte) 206,
- (byte) 0, (byte) 234, (byte) 107, (byte) 50, (byte) 123, (byte) 212, (byte) 153, (byte) 202, (byte) 188,
- (byte) 37, (byte) 226, (byte) 237, (byte) 243, (byte) 17, (byte) 248, (byte) 241, (byte) 82, (byte) 221,
- (byte) 134, (byte) 149, (byte) 200, (byte) 239, (byte) 47, (byte) 26, (byte) 228, (byte) 152, (byte) 227,
- (byte) 202, (byte) 197, (byte) 233, (byte) 221, (byte) 170, (byte) 151, (byte) 151, (byte) 20, (byte) 201,
- (byte) 204, (byte) 104, (byte) 87, (byte) 28, (byte) 54, (byte) 7, (byte) 205, (byte) 255, (byte) 0,
- (byte) 214, (byte) 255, (byte) 0, (byte) 61, (byte) 58, (byte) 217, (byte) 117, (byte) 180, (byte) 158,
- (byte) 65, (byte) 31, (byte) 149, (byte) 60, (byte) 104, (byte) 6, (byte) 231, (byte) 97, (byte) 200,
- (byte) 62, (byte) 220, (byte) 245, (byte) 255, (byte) 0, (byte) 235, (byte) 115, (byte) 193, (byte) 230,
- (byte) 95, (byte) 46, (byte) 208, (byte) 253, (byte) 219, (byte) 163, (byte) 207, (byte) 170, (byte) 19,
- (byte) 89, (byte) 61, (byte) 77, (byte) 17, (byte) 158, (byte) 108, (byte) 237, (byte) 143, (byte) 88,
- (byte) 23, (byte) 240, (byte) 36, (byte) 127, (byte) 42, (byte) 175, (byte) 54, (byte) 143, (byte) 167,
- (byte) 78, (byte) 49, (byte) 37, (byte) 170, (byte) 48, (byte) 247, (byte) 231, (byte) 249, (byte) 230,
- (byte) 181, (byte) 205, (byte) 164, (byte) 103, (byte) 238, (byte) 221, (byte) 196, (byte) 126, (byte) 191,
- (byte) 45, (byte) 31, (byte) 96, (byte) 145, (byte) 190, (byte) 228, (byte) 145, (byte) 55, (byte) 209,
- (byte) 243, (byte) 253, (byte) 41, (byte) 89, (byte) 133, (byte) 209, (byte) 203, (byte) 220, (byte) 105,
- (byte) 30, (byte) 28, (byte) 177, (byte) 144, (byte) 44, (byte) 162, (byte) 218, (byte) 217, (byte) 200,
- (byte) 200, (byte) 201, (byte) 69, (byte) 63, (byte) 94, (byte) 153, (byte) 20, (byte) 244, (byte) 181,
- (byte) 211, (byte) 179, (byte) 182, (byte) 13, (byte) 126, (byte) 72, (byte) 200, (byte) 63, (byte) 118,
- (byte) 27, (byte) 246, (byte) 31, (byte) 160, (byte) 113, (byte) 90, (byte) 18, (byte) 120, (byte) 78,
- (byte) 79, (byte) 53, (byte) 230, (byte) 89, (byte) 239, (byte) 11, (byte) 200, (byte) 114, (byte) 205,
- (byte) 231, (byte) 1, (byte) 159, (byte) 110, (byte) 48, (byte) 106, (byte) 164, (byte) 158, (byte) 18,
- (byte) 186, (byte) 199, (byte) 55, (byte) 37, (byte) 143, (byte) 253, (byte) 52, (byte) 181, (byte) 14,
- (byte) 127, (byte) 70, (byte) 231, (byte) 252, (byte) 105, (byte) 217, (byte) 245, (byte) 27, (byte) 113,
- (byte) 182, (byte) 132, (byte) 137, (byte) 166, (byte) 94, (byte) 227, (byte) 117, (byte) 174, (byte) 175,
- (byte) 118, (byte) 71, (byte) 247, (byte) 153, (byte) 203, (byte) 255, (byte) 0, (byte) 232, (byte) 91,
- (byte) 169, (byte) 77, (byte) 182, (byte) 186, (byte) 135, (byte) 141, (byte) 105, (byte) 155, (byte) 31,
- (byte) 194, (byte) 97, (byte) 139, (byte) 255, (byte) 0, (byte) 141, (byte) 131, (byte) 250, (byte) 214,
- (byte) 115, (byte) 248, (byte) 70, (byte) 97, (byte) 255, (byte) 0, (byte) 44, (byte) 108, (byte) 206,
- (byte) 14, (byte) 114, (byte) 208, (byte) 24, (byte) 255, (byte) 0, (byte) 161, (byte) 173, (byte) 29,
- (byte) 39, (byte) 74, (byte) 26, (byte) 126, (byte) 247, (byte) 149, (byte) 209, (byte) 166, (byte) 147,
- (byte) 130, (byte) 35, (byte) 56, (byte) 69, (byte) 95, (byte) 65, (byte) 211, (byte) 63, (byte) 92,
- (byte) 127, (byte) 92, (byte) 161, (byte) 33, (byte) 124, (byte) 207, (byte) 17, (byte) 39, (byte) 11,
- (byte) 45, (byte) 148, (byte) 131, (byte) 214, (byte) 72, (byte) 73, (byte) 63, (byte) 163, (byte) 143,
- (byte) 229, (byte) 74, (byte) 47, (byte) 245, (byte) 216, (byte) 190, (byte) 245, (byte) 157, (byte) 180,
- (byte) 196, (byte) 127, (byte) 207, (byte) 48, (byte) 201, (byte) 253, (byte) 90, (byte) 180, (byte) 48,
- (byte) 126, (byte) 180, (byte) 224, (byte) 15, (byte) 231, (byte) 72, (byte) 101, (byte) 1, (byte) 173,
- (byte) 106, (byte) 163, (byte) 253, (byte) 102, (byte) 134, (byte) 20, (byte) 122, (byte) 173, (byte) 211,
- (byte) 31, (byte) 231, (byte) 24, (byte) 254, (byte) 116, (byte) 198, (byte) 215, (byte) 81, (byte) 198,
- (byte) 219, (byte) 173, (byte) 26, (byte) 241, (byte) 186, (byte) 224, (byte) 175, (byte) 150, (byte) 71,
- (byte) 39, (byte) 61, (byte) 75, (byte) 131, (byte) 255, (byte) 0, (byte) 234, (byte) 173, (byte) 46,
- (byte) 248, (byte) 252, (byte) 205, (byte) 57, (byte) 229, (byte) 16, (byte) 199, (byte) 187, (byte) 156,
- (byte) 14, (byte) 128, (byte) 127, (byte) 42, (byte) 5, (byte) 99, (byte) 138, (byte) 241, (byte) 77,
- (byte) 192, (byte) 212, (byte) 110, (byte) 32, (byte) 157, (byte) 109, (byte) 228, (byte) 137, (byte) 22,
- (byte) 63, (byte) 44, (byte) 9, (byte) 217, (byte) 50, (byte) 79, (byte) 83, (byte) 209, (byte) 142,
- (byte) 56, (byte) 199, (byte) 83, (byte) 216, (byte) 215, (byte) 57, (byte) 60, (byte) 16, (byte) 164,
- (byte) 139, (byte) 27, (byte) 199, (byte) 9, (byte) 103, (byte) 206, (byte) 54, (byte) 149, (byte) 113,
- (byte) 198, (byte) 123, (byte) 174, (byte) 64, (byte) 233, (byte) 252, (byte) 143, (byte) 66, (byte) 43,
- (byte) 168, (byte) 215, (byte) 230, (byte) 55, (byte) 183, (byte) 10, (byte) 3, (byte) 65, (byte) 186,
- (byte) 55, (byte) 70, (byte) 223, (byte) 59, (byte) 98, (byte) 54, (byte) 251, (byte) 223, (byte) 41,
- (byte) 245, (byte) 206, (byte) 56, (byte) 3, (byte) 168, (byte) 13, (byte) 233, (byte) 85, (byte) 103,
- (byte) 179, (byte) 188, (byte) 189, (byte) 71, (byte) 242, (byte) 116, (byte) 171, (byte) 50, (byte) 204,
- (byte) 191, (byte) 122, (byte) 198, (byte) 9, (byte) 64, (byte) 31, (byte) 48, (byte) 111, (byte) 226,
- (byte) 24, (byte) 29, (byte) 8, (byte) 227, (byte) 28, (byte) 55, (byte) 126, (byte) 49, (byte) 211,
- (byte) 77, (byte) 251, (byte) 166, (byte) 82, (byte) 90, (byte) 156, (byte) 133, (byte) 236, (byte) 12,
- (byte) 183, (byte) 150, (byte) 235, (byte) 109, (byte) 251, (byte) 165, (byte) 116, (byte) 145, (byte) 164,
- (byte) 218, (byte) 163, (byte) 230, (byte) 198, (byte) 192, (byte) 58, (byte) 143, (byte) 246, (byte) 169,
- (byte) 5, (byte) 169, (byte) 152, (byte) 136, (byte) 166, (byte) 145, (byte) 165, (byte) 141, (byte) 136,
- (byte) 12, (byte) 164, (byte) 46, (byte) 15, (byte) 62, (byte) 192, (byte) 86, (byte) 244, (byte) 186,
- (byte) 93, (byte) 228, (byte) 92, (byte) 203, (byte) 28, (byte) 113, (byte) 251, (byte) 60, (byte) 241,
- (byte) 131, (byte) 249, (byte) 110, (byte) 205, (byte) 71, (byte) 30, (byte) 159, (byte) 117, (byte) 47,
- (byte) 250, (byte) 171, (byte) 57, (byte) 165, (byte) 199, (byte) 59, (byte) 162, (byte) 132, (byte) 183,
- (byte) 234, (byte) 5, (byte) 105, (byte) 161, (byte) 55, (byte) 118, (byte) 51, (byte) 101, (byte) 209,
- (byte) 45, (byte) 47, (byte) 103, (byte) 6, (byte) 68, (byte) 105, (byte) 102, (byte) 147, (byte) 10,
- (byte) 25, (byte) 216, (byte) 51, (byte) 30, (byte) 138, (byte) 6, (byte) 79, (byte) 62, (byte) 128,
- (byte) 126, (byte) 21, (byte) 111, (byte) 64, (byte) 210, (byte) 109, (byte) 173, (byte) 53, (byte) 120,
- (byte) 37, (byte) 129, (byte) 202, (byte) 228, (byte) 227, (byte) 29, (byte) 71, (byte) 63, (byte) 141,
- (byte) 109, (byte) 233, (byte) 26, (byte) 129, (byte) 209, (byte) 94, (byte) 113, (byte) 117, (byte) 246,
- (byte) 155, (byte) 101, (byte) 152, (byte) 47, (byte) 42, (byte) 160, (byte) 19, (byte) 130, (byte) 120,
- (byte) 33, (byte) 177, (byte) 235, (byte) 80, (byte) 45, (byte) 228, (byte) 55, (byte) 94, (byte) 35,
- (byte) 89, (byte) 161, (byte) 152, (byte) 202, (byte) 178, (byte) 93, (byte) 33, (byte) 220, (byte) 196,
- (byte) 100, (byte) 229, (byte) 134, (byte) 123, (byte) 250, (byte) 231, (byte) 30, (byte) 216, (byte) 168,
- (byte) 247, (byte) 155, (byte) 105, (byte) 173, (byte) 7, (byte) 100, (byte) 146, (byte) 119, (byte) 215,
- (byte) 177, (byte) 214, (byte) 176, (byte) 228, (byte) 213, (byte) 121, (byte) 164, (byte) 218, (byte) 226,
- (byte) 56, (byte) 212, (byte) 201, (byte) 41, (byte) 25, (byte) 10, (byte) 14, (byte) 49, (byte) 238,
- (byte) 79, (byte) 97, (byte) 254, (byte) 7, (byte) 0, (byte) 224, (byte) 225, (byte) 210, (byte) 76,
- (byte) 242, (byte) 187, (byte) 69, (byte) 109, (byte) 141, (byte) 192, (byte) 225, (byte) 229, (byte) 35,
- (byte) 33, (byte) 61, (byte) 135, (byte) 171, (byte) 126, (byte) 131, (byte) 190, (byte) 113, (byte) 180,
- (byte) 190, (byte) 24, (byte) 86, (byte) 8, (byte) 202, (byte) 140, (byte) 156, (byte) 156, (byte) 150,
- (byte) 39, (byte) 37, (byte) 142, (byte) 7, (byte) 39, (byte) 215, (byte) 255, (byte) 0, (byte) 172,
- (byte) 43, (byte) 152, (byte) 216, (byte) 185, (byte) 225, (byte) 200, (byte) 60, (byte) 173, (byte) 87,
- (byte) 204, (byte) 119, (byte) 50, (byte) 74, (byte) 209, (byte) 48, (byte) 45, (byte) 140, (byte) 0,
- (byte) 50, (byte) 188, (byte) 1, (byte) 216, (byte) 127, (byte) 128, (byte) 201, (byte) 39, (byte) 154,
- (byte) 42, (byte) 93, (byte) 12, (byte) 255, (byte) 0, (byte) 196, (byte) 208, (byte) 127, (byte) 184,
- (byte) 194, (byte) 138, (byte) 214, (byte) 27, (byte) 25, (byte) 189, (byte) 206, (byte) 158, (byte) 152,
- (byte) 238, (byte) 168, (byte) 165, (byte) 152, (byte) 224, (byte) 10, (byte) 29, (byte) 213, (byte) 20,
- (byte) 179, (byte) 28, (byte) 1, (byte) 89, (byte) 151, (byte) 51, (byte) 180, (byte) 242, (byte) 99,
- (byte) 149, (byte) 3, (byte) 166, (byte) 123, (byte) 127, (byte) 245, (byte) 255, (byte) 0, (byte) 207,
- (byte) 213, (byte) 202, (byte) 86, (byte) 4, (byte) 174, (byte) 54, (byte) 230, (byte) 225, (byte) 238,
- (byte) 31, (byte) 28, (byte) 170, (byte) 131, (byte) 211, (byte) 211, (byte) 255, (byte) 0, (byte) 175,
- (byte) 254, (byte) 126, (byte) 180, (byte) 53, (byte) 43, (byte) 248, (byte) 244, (byte) 219, (byte) 38,
- (byte) 153, (byte) 204, (byte) 69, (byte) 254, (byte) 236, (byte) 105, (byte) 38, (byte) 62, (byte) 118,
- (byte) 244, (byte) 232, (byte) 79, (byte) 191, (byte) 3, (byte) 160, (byte) 53, (byte) 120, (byte) 0,
- (byte) 56, (byte) 3, (byte) 35, (byte) 182, (byte) 43, (byte) 151, (byte) 214, (byte) 32, (byte) 186,
- (byte) 184, (byte) 251, (byte) 68, (byte) 177, (byte) 45, (byte) 203, (byte) 179, (byte) 137, (byte) 4,
- (byte) 34, (byte) 9, (byte) 140, (byte) 160, (byte) 28, (byte) 124, (byte) 167, (byte) 98, (byte) 18,
- (byte) 6, (byte) 62, (byte) 92, (byte) 241, (byte) 233, (byte) 156, (byte) 214, (byte) 90, (byte) 189,
- (byte) 77, (byte) 52, (byte) 71, (byte) 63, (byte) 172, (byte) 107, (byte) 115, (byte) 107, (byte) 22,
- (byte) 242, (byte) 51, (byte) 181, (byte) 178, (byte) 136, (byte) 207, (byte) 151, (byte) 19, (byte) 67,
- (byte) 41, (byte) 92, (byte) 177, (byte) 56, (byte) 222, (byte) 20, (byte) 156, (byte) 119, (byte) 199,
- (byte) 174, (byte) 51, (byte) 239, (byte) 78, (byte) 142, (byte) 246, (byte) 255, (byte) 0, (byte) 251,
- (byte) 68, (byte) 132, (byte) 184, (byte) 188, (byte) 40, (byte) 97, (byte) 12, (byte) 203, (byte) 21,
- (byte) 217, (byte) 113, (byte) 184, (byte) 177, (byte) 231, (byte) 61, (byte) 73, (byte) 249, (byte) 72,
- (byte) 252, (byte) 61, (byte) 14, (byte) 40, (byte) 184, (byte) 211, (byte) 210, (byte) 214, (byte) 91,
- (byte) 85, (byte) 197, (byte) 223, (byte) 151, (byte) 2, (byte) 54, (byte) 67, (byte) 68, (byte) 9,
- (byte) 83, (byte) 133, (byte) 11, (byte) 213, (byte) 112, (byte) 6, (byte) 55, (byte) 113, (byte) 236,
- (byte) 181, (byte) 71, (byte) 201, (byte) 141, (byte) 173, (byte) 164, (byte) 6, (byte) 72, (byte) 196,
- (byte) 211, (byte) 92, (byte) 130, (byte) 223, (byte) 185, (byte) 31, (byte) 42, (byte) 121, (byte) 157,
- (byte) 114, (byte) 15, (byte) 63, (byte) 39, (byte) 59, (byte) 70, (byte) 59, (byte) 129, (byte) 72,
- (byte) 11, (byte) 208, (byte) 107, (byte) 186, (byte) 180, (byte) 80, (byte) 89, (byte) 187, (byte) 92,
- (byte) 207, (byte) 153, (byte) 78, (byte) 11, (byte) 60, (byte) 10, (byte) 251, (byte) 151, (byte) 4,
- (byte) 228, (byte) 119, (byte) 35, (byte) 145, (byte) 201, (byte) 237, (byte) 223, (byte) 140, (byte) 84,
- (byte) 237, (byte) 226, (byte) 205, (byte) 66, (byte) 56, (byte) 238, (byte) 143, (byte) 155, (byte) 4,
- (byte) 173, (byte) 9, (byte) 253, (byte) 216, (byte) 146, (byte) 50, (byte) 9, (byte) 24, (byte) 29,
- (byte) 74, (byte) 225, (byte) 122, (byte) 231, (byte) 211, (byte) 159, (byte) 65, (byte) 129, (byte) 84,
- (byte) 163, (byte) 130, (byte) 36, (byte) 189, (byte) 105, (byte) 35, (byte) 104, (byte) 22, (byte) 59,
- (byte) 120, (byte) 151, (byte) 203, (byte) 0, (byte) 186, (byte) 6, (byte) 56, (byte) 108, (byte) 237,
- (byte) 4, (byte) 17, (byte) 156, (byte) 96, (byte) 115, (byte) 237, (byte) 239, (byte) 76, (byte) 91,
- (byte) 105, (byte) 222, (byte) 210, (byte) 218, (byte) 220, (byte) 202, (byte) 210, (byte) 53, (byte) 227,
- (byte) 111, (byte) 153, (byte) 86, (byte) 225, (byte) 91, (byte) 113, (byte) 10, (byte) 9, (byte) 220,
- (byte) 27, (byte) 1, (byte) 79, (byte) 11, (byte) 199, (byte) 177, (byte) 29, (byte) 133, (byte) 49,
- (byte) 155, (byte) 145, (byte) 120, (byte) 190, (byte) 228, (byte) 92, (byte) 172, (byte) 97, (byte) 108,
- (byte) 217, (byte) 36, (byte) 66, (byte) 200, (byte) 233, (byte) 33, (byte) 64, (byte) 57, (byte) 28,
- (byte) 100, (byte) 245, (byte) 56, (byte) 201, (byte) 237, (byte) 248, (byte) 98, (byte) 172, (byte) 65,
- (byte) 227, (byte) 137, (byte) 140, (byte) 16, (byte) 74, (byte) 246, (byte) 115, (byte) 42, (byte) 203,
- (byte) 32, (byte) 143, (byte) 11, (byte) 114, (byte) 25, (byte) 129, (byte) 44, (byte) 71, (byte) 76,
- (byte) 122, (byte) 14, (byte) 228, (byte) 117, (byte) 252, (byte) 107, (byte) 157, (byte) 144, (byte) 92,
- (byte) 43, (byte) 222, (byte) 223, (byte) 58, (byte) 22, (byte) 22, (byte) 160, (byte) 196, (byte) 26,
- (byte) 72, (byte) 17, (byte) 151, (byte) 43, (byte) 134, (byte) 195, (byte) 31, (byte) 169, (byte) 198,
- (byte) 125, (byte) 198, (byte) 15, (byte) 81, (byte) 81, (byte) 53, (byte) 160, (byte) 133, (byte) 45,
- (byte) 237, (byte) 36, (byte) 72, (byte) 198, (byte) 73, (byte) 146, (byte) 67, (byte) 36, (byte) 82,
- (byte) 70, (byte) 207, (byte) 131, (byte) 247, (byte) 88, (byte) 117, (byte) 193, (byte) 207, (byte) 233,
- (byte) 138, (byte) 44, (byte) 35, (byte) 179, (byte) 143, (byte) 199, (byte) 10, (byte) 30, (byte) 84,
- (byte) 146, (byte) 43, (byte) 196, (byte) 120, (byte) 66, (byte) 153, (byte) 23, (byte) 201, (byte) 86,
- (byte) 218, (byte) 8, (byte) 39, (byte) 57, (byte) 207, (byte) 160, (byte) 255, (byte) 0, (byte) 12,
- (byte) 243, (byte) 86, (byte) 35, (byte) 241, (byte) 197, (byte) 131, (byte) 136, (byte) 183, (byte) 220,
- (byte) 5, (byte) 89, (byte) 64, (byte) 43, (byte) 230, (byte) 196, (byte) 70, (byte) 114, (byte) 51,
- (byte) 142, (byte) 7, (byte) 167, (byte) 225, (byte) 232, (byte) 77, (byte) 112, (byte) 161, (byte) 227,
- (byte) 243, (byte) 47, (byte) 38, (byte) 85, (byte) 82, (byte) 71, (byte) 238, (byte) 149, (byte) 97,
- (byte) 148, (byte) 118, (byte) 249, (byte) 115, (byte) 176, (byte) 142, (byte) 65, (byte) 36, (byte) 30,
- (byte) 123, (byte) 103, (byte) 165, (byte) 77, (byte) 30, (byte) 200, (byte) 18, (byte) 218, (byte) 216,
- (byte) 153, (byte) 62, (byte) 210, (byte) 177, (byte) 147, (byte) 27, (byte) 9, (byte) 183, (byte) 34,
- (byte) 54, (byte) 210, (byte) 48, (byte) 48, (byte) 64, (byte) 3, (byte) 57, (byte) 29, (byte) 248,
- (byte) 35, (byte) 182, (byte) 40, (byte) 11, (byte) 30, (byte) 133, (byte) 105, (byte) 173, (byte) 217,
- (byte) 95, (byte) 150, (byte) 16, (byte) 165, (byte) 188, (byte) 204, (byte) 167, (byte) 5, (byte) 76,
- (byte) 101, (byte) 24, (byte) 113, (byte) 232, (byte) 220, (byte) 254, (byte) 149, (byte) 108, (byte) 205,
- (byte) 22, (byte) 15, (byte) 250, (byte) 24, (byte) 83, (byte) 219, (byte) 14, (byte) 71, (byte) 242,
- (byte) 172, (byte) 15, (byte) 11, (byte) 104, (byte) 247, (byte) 54, (byte) 22, (byte) 242, (byte) 94,
- (byte) 94, (byte) 51, (byte) 139, (byte) 155, (byte) 189, (byte) 164, (byte) 198, (byte) 78, (byte) 54,
- (byte) 168, (byte) 233, (byte) 145, (byte) 221, (byte) 185, (byte) 231, (byte) 250, (byte) 115, (byte) 157,
- (byte) 226, (byte) 63, (byte) 217, (byte) 95, (byte) 251, (byte) 228, (byte) 127, (byte) 133, (byte) 23,
- (byte) 21, (byte) 134, (byte) 198, (byte) 246, (byte) 113, (byte) 68, (byte) 136, (byte) 240, (byte) 200,
- (byte) 48, (byte) 48, (byte) 88, (byte) 177, (byte) 228, (byte) 250, (byte) 253, (byte) 127, (byte) 198,
- (byte) 178, (byte) 53, (byte) 235, (byte) 216, (byte) 6, (byte) 32, (byte) 183, (byte) 82, (byte) 175,
- (byte) 143, (byte) 152, (byte) 150, (byte) 206, (byte) 1, (byte) 254, (byte) 167, (byte) 249, (byte) 84,
- (byte) 154, (byte) 165, (byte) 202, (byte) 136, (byte) 252, (byte) 161, (byte) 134, (byte) 207, (byte) 64,
- (byte) 123, (byte) 251, (byte) 214, (byte) 20, (byte) 185, (byte) 98, (byte) 89, (byte) 137, (byte) 44,
- (byte) 78, (byte) 73, (byte) 39, (byte) 169, (byte) 160, (byte) 102, (byte) 7, (byte) 138, (byte) 142,
- (byte) 52, (byte) 66, (byte) 115, (byte) 130, (byte) 110, (byte) 98, (byte) 239, (byte) 232, (byte) 178,
- (byte) 255, (byte) 0, (byte) 241, (byte) 85, (byte) 201, (byte) 196, (byte) 98, (byte) 126, (byte) 89,
- (byte) 85, (byte) 143, (byte) 184, (byte) 174, (byte) 195, (byte) 196, (byte) 177, (byte) 121, (byte) 186,
- (byte) 28, (byte) 153, (byte) 255, (byte) 0, (byte) 150, (byte) 114, (byte) 43, (byte) 244, (byte) 247,
- (byte) 11, (byte) 255, (byte) 0, (byte) 179, (byte) 87, (byte) 22, (byte) 150, (byte) 11, (byte) 213,
- (byte) 102, (byte) 157, (byte) 125, (byte) 196, (byte) 135, (byte) 250, (byte) 154, (byte) 222, (byte) 27,
- (byte) 25, (byte) 200, (byte) 212, (byte) 183, (byte) 185, (byte) 184, (byte) 135, (byte) 30, (byte) 69,
- (byte) 204, (byte) 208, (byte) 143, (byte) 250, (byte) 98, (byte) 251, (byte) 127, (byte) 149, (byte) 91,
- (byte) 254, (byte) 209, (byte) 191, (byte) 63, (byte) 52, (byte) 151, (byte) 215, (byte) 19, (byte) 96,
- (byte) 103, (byte) 247, (byte) 242, (byte) 180, (byte) 159, (byte) 204, (byte) 226, (byte) 178, (byte) 213,
- (byte) 150, (byte) 217, (byte) 34, (byte) 71, (byte) 18, (byte) 76, (byte) 207, (byte) 38, (byte) 208,
- (byte) 217, (byte) 203, (byte) 156, (byte) 140, (byte) 128, (byte) 121, (byte) 0, (byte) 1, (byte) 180,
- (byte) 246, (byte) 207, (byte) 60, (byte) 231, (byte) 140, (byte) 77, (byte) 43, (byte) 19, (byte) 19,
- (byte) 132, (byte) 141, (byte) 214, (byte) 77, (byte) 135, (byte) 104, (byte) 32, (byte) 156, (byte) 156,
- (byte) 113, (byte) 156, (byte) 86, (byte) 150, (byte) 68, (byte) 154, (byte) 209, (byte) 107, (byte) 26,
- (byte) 132, (byte) 35, (byte) 17, (byte) 204, (byte) 136, (byte) 63, (byte) 217, (byte) 130, (byte) 32,
- (byte) 127, (byte) 61, (byte) 185, (byte) 253, (byte) 106, (byte) 253, (byte) 134, (byte) 181, (byte) 117,
- (byte) 115, (byte) 168, (byte) 90, (byte) 219, (byte) 204, (byte) 161, (byte) 214, (byte) 73, (byte) 146,
- (byte) 51, (byte) 151, (byte) 144, (byte) 99, (byte) 115, (byte) 1, (byte) 192, (byte) 12, (byte) 6,
- (byte) 121, (byte) 244, (byte) 197, (byte) 114, (byte) 210, (byte) 182, (byte) 162, (byte) 187, (byte) 124,
- (byte) 152, (byte) 226, (byte) 101, (byte) 11, (byte) 243, (byte) 229, (byte) 246, (byte) 252, (byte) 222,
- (byte) 221, (byte) 120, (byte) 171, (byte) 218, (byte) 20, (byte) 215, (byte) 103, (byte) 95, (byte) 211,
- (byte) 146, (byte) 107, (byte) 95, (byte) 45, (byte) 126, (byte) 215, (byte) 15, (byte) 204, (byte) 31,
- (byte) 112, (byte) 255, (byte) 0, (byte) 88, (byte) 190, (byte) 194, (byte) 165, (byte) 164, (byte) 23,
- (byte) 61, (byte) 49, (byte) 34, (byte) 72, (byte) 163, (byte) 84, (byte) 69, (byte) 10, (byte) 160,
- (byte) 96, (byte) 40, (byte) 24, (byte) 0, (byte) 82, (byte) 17, (byte) 252, (byte) 234, (byte) 96,
- (byte) 50, (byte) 128, (byte) 251, (byte) 85, (byte) 123, (byte) 169, (byte) 225, (byte) 182, (byte) 129,
- (byte) 230, (byte) 158, (byte) 69, (byte) 138, (byte) 40, (byte) 198, (byte) 89, (byte) 152, (byte) 224,
- (byte) 10, (byte) 230, (byte) 53, (byte) 47, (byte) 104, (byte) 132, (byte) 13, (byte) 81, (byte) 51,
- (byte) 221, (byte) 88, (byte) 15, (byte) 202, (byte) 138, (byte) 161, (byte) 225, (byte) 221, (byte) 62,
- (byte) 255, (byte) 0, (byte) 87, (byte) 212, (byte) 33, (byte) 213, (byte) 231, (byte) 243, (byte) 44,
- (byte) 244, (byte) 248, (byte) 78, (byte) 235, (byte) 104, (byte) 72, (byte) 195, (byte) 206, (byte) 113,
- (byte) 141, (byte) 205, (byte) 232, (byte) 190, (byte) 131, (byte) 243, (byte) 246, (byte) 43, (byte) 88,
- (byte) 232, (byte) 181, (byte) 33, (byte) 157, (byte) 85, (byte) 237, (byte) 220, (byte) 22, (byte) 216,
- (byte) 251, (byte) 66, (byte) 72, (byte) 83, (byte) 25, (byte) 222, (byte) 177, (byte) 150, (byte) 11,
- (byte) 245, (byte) 199, (byte) 74, (byte) 170, (byte) 154, (byte) 158, (byte) 143, (byte) 41, (byte) 194,
- (byte) 222, (byte) 70, (byte) 173, (byte) 220, (byte) 59, (byte) 21, (byte) 35, (byte) 240, (byte) 61,
- (byte) 43, (byte) 86, (byte) 177, (byte) 117, (byte) 63, (byte) 13, (byte) 165, (byte) 235, (byte) 249,
- (byte) 182, (byte) 183, (byte) 114, (byte) 88, (byte) 200, (byte) 78, (byte) 91, (byte) 98, (byte) 171,
- (byte) 163, (byte) 127, (byte) 192, (byte) 72, (byte) 224, (byte) 253, (byte) 49, (byte) 78, (byte) 200,
- (byte) 69, (byte) 216, (byte) 141, (byte) 165, (byte) 193, (byte) 255, (byte) 0, (byte) 71, (byte) 186,
- (byte) 142, (byte) 67, (byte) 219, (byte) 99, (byte) 131, (byte) 252, (byte) 169, (byte) 205, (byte) 103,
- (byte) 201, (byte) 109, (byte) 192, (byte) 177, (byte) 234, (byte) 72, (byte) 228, (byte) 215, (byte) 51,
- (byte) 55, (byte) 133, (byte) 181, (byte) 193, (byte) 247, (byte) 47, (byte) 244, (byte) 251, (byte) 128,
- (byte) 58, (byte) 9, (byte) 173, (byte) 221, (byte) 79, (byte) 232, (byte) 216, (byte) 253, (byte) 42,
- (byte) 31, (byte) 236, (byte) 175, (byte) 18, (byte) 218, (byte) 255, (byte) 0, (byte) 171, (byte) 211,
- (byte) 173, (byte) 155, (byte) 31, (byte) 197, (byte) 109, (byte) 122, (byte) 99, (byte) 63, (byte) 150,
- (byte) 223, (byte) 235, (byte) 71, (byte) 42, (byte) 29, (byte) 217, (byte) 208, (byte) 79, (byte) 161,
- (byte) 199, (byte) 60, (byte) 134, (byte) 82, (byte) 89, (byte) 93, (byte) 186, (byte) 178, (byte) 185,
- (byte) 244, (byte) 199, (byte) 126, (byte) 59, (byte) 85, (byte) 89, (byte) 60, (byte) 58, (byte) 88,
- (byte) 96, (byte) 79, (byte) 43, (byte) 15, (byte) 250, (byte) 106, (byte) 21, (byte) 135, (byte) 233,
- (byte) 138, (byte) 199, (byte) 55, (byte) 190, (byte) 35, (byte) 182, (byte) 63, (byte) 61, (byte) 142,
- (byte) 176, (byte) 152, (byte) 234, (byte) 35, (byte) 242, (byte) 231, (byte) 95, (byte) 204, (byte) 146,
- (byte) 105, (byte) 195, (byte) 197, (byte) 247, (byte) 86, (byte) 223, (byte) 241, (byte) 242, (byte) 215,
- (byte) 49, (byte) 30, (byte) 255, (byte) 0, (byte) 104, (byte) 177, (byte) 112, (byte) 63, (byte) 48,
- (byte) 160, (byte) 126, (byte) 180, (byte) 185, (byte) 16, (byte) 249, (byte) 153, (byte) 106, (byte) 79,
- (byte) 11, (byte) 47, (byte) 95, (byte) 46, (byte) 217, (byte) 207, (byte) 253, (byte) 123, (byte) 108,
- (byte) 253, (byte) 121, (byte) 170, (byte) 146, (byte) 120, (byte) 85, (byte) 59, (byte) 219, (byte) 64,
- (byte) 73, (byte) 254, (byte) 228, (byte) 207, (byte) 159, (byte) 200, (byte) 224, (byte) 85, (byte) 136,
- (byte) 188, (byte) 117, (byte) 1, (byte) 225, (byte) 174, (byte) 244, (byte) 246, (byte) 99, (byte) 252,
- (byte) 38, (byte) 79, (byte) 44, (byte) 254, (byte) 68, (byte) 154, (byte) 209, (byte) 139, (byte) 196,
- (byte) 194, (byte) 84, (byte) 207, (byte) 216, (byte) 252, (byte) 193, (byte) 216, (byte) 67, (byte) 40,
- (byte) 124, (byte) 254, (byte) 96, (byte) 15, (byte) 214, (byte) 151, (byte) 32, (byte) 115, (byte) 28,
- (byte) 228, (byte) 190, (byte) 18, (byte) 5, (byte) 24, (byte) 27, (byte) 107, (byte) 133, (byte) 82,
- (byte) 48, (byte) 64, (byte) 146, (byte) 50, (byte) 63, (byte) 46, (byte) 77, (byte) 55, (byte) 73,
- (byte) 240, (byte) 230, (byte) 172, (byte) 111, (byte) 110, (byte) 110, (byte) 103, (byte) 185, (byte) 48,
- (byte) 172, (byte) 108, (byte) 241, (byte) 192, (byte) 38, (byte) 82, (byte) 204, (byte) 232, (byte) 72,
- (byte) 231, (byte) 253, (byte) 145, (byte) 242, (byte) 143, (byte) 199, (byte) 61, (byte) 59, (byte) 245,
- (byte) 81, (byte) 248, (byte) 130, (byte) 193, (byte) 254, (byte) 253, (byte) 172, (byte) 209, (byte) 99,
- (byte) 174, (byte) 228, (byte) 94, (byte) 63, (byte) 34, (byte) 106, (byte) 117, (byte) 213, (byte) 180,
- (byte) 167, (byte) 255, (byte) 0, (byte) 150, (byte) 165, (byte) 127, (byte) 222, (byte) 71, (byte) 31,
- (byte) 210, (byte) 151, (byte) 35, (byte) 31, (byte) 49, (byte) 206, (byte) 71, (byte) 225, (byte) 235,
- (byte) 232, (byte) 99, (byte) 49, (byte) 175, (byte) 216, (byte) 221, (byte) 76, (byte) 143, (byte) 38,
- (byte) 30, (byte) 70, (byte) 234, (byte) 204, (byte) 91, (byte) 166, (byte) 223, (byte) 124, (byte) 126,
- (byte) 21, (byte) 47, (byte) 135, (byte) 188, (byte) 48, (byte) 154, (byte) 76, (byte) 179, (byte) 93,
- (byte) 207, (byte) 181, (byte) 238, (byte) 100, (byte) 118, (byte) 217, (byte) 180, (byte) 252, (byte) 177,
- (byte) 169, (byte) 61, (byte) 184, (byte) 228, (byte) 145, (byte) 140, (byte) 159, (byte) 192, (byte) 119,
- (byte) 39, (byte) 163, (byte) 91, (byte) 189, (byte) 57, (byte) 248, (byte) 75, (byte) 216, (byte) 24,
- (byte) 158, (byte) 194, (byte) 85, (byte) 205, (byte) 76, (byte) 45, (byte) 209, (byte) 134, (byte) 84,
- (byte) 130, (byte) 15, (byte) 124, (byte) 102, (byte) 151, (byte) 43, (byte) 14, (byte) 100, (byte) 84,
- (byte) 219, (byte) 207, (byte) 184, (byte) 170, (byte) 151, (byte) 247, (byte) 43, (byte) 12, (byte) 100,
- (byte) 117, (byte) 61, (byte) 14, (byte) 63, (byte) 149, (byte) 106, (byte) 61, (byte) 190, (byte) 216,
- (byte) 216, (byte) 134, (byte) 3, (byte) 3, (byte) 60, (byte) 10, (byte) 229, (byte) 238, (byte) 93,
- (byte) 166, (byte) 148, (byte) 147, (byte) 156, (byte) 3, (byte) 128, (byte) 42, (byte) 90, (byte) 177,
- (byte) 73, (byte) 220, (byte) 169, (byte) 41, (byte) 105, (byte) 92, (byte) 187, (byte) 117, (byte) 53,
- (byte) 3, (byte) 165, (byte) 91, (byte) 43, (byte) 219, (byte) 244, (byte) 172, (byte) 248, (byte) 228,
- (byte) 187, (byte) 214, (byte) 47, (byte) 26, (byte) 195, (byte) 68, (byte) 69, (byte) 145, (byte) 208,
- (byte) 226, (byte) 107, (byte) 182, (byte) 25, (byte) 138, (byte) 15, (byte) 254, (byte) 41, (byte) 189,
- (byte) 191, (byte) 62, (byte) 132, (byte) 80, (byte) 149, (byte) 193, (byte) 153, (byte) 186, (byte) 246,
- (byte) 211, (byte) 164, (byte) 94, (byte) 219, (byte) 161, (byte) 221, (byte) 57, (byte) 133, (byte) 29,
- (byte) 34, (byte) 31, (byte) 120, (byte) 129, (byte) 52, (byte) 121, (byte) 56, (byte) 244, (byte) 255,
- (byte) 0, (byte) 3, (byte) 88, (byte) 87, (byte) 54, (byte) 90, (byte) 91, (byte) 70, (byte) 162,
- (byte) 29, (byte) 118, (byte) 25, (byte) 153, (byte) 3, (byte) 62, (byte) 193, (byte) 98, (byte) 97,
- (byte) 125, (byte) 193, (byte) 51, (byte) 140, (byte) 224, (byte) 100, (byte) 18, (byte) 161, (byte) 112,
- (byte) 79, (byte) 4, (byte) 231, (byte) 28, (byte) 147, (byte) 94, (byte) 181, (byte) 166, (byte) 120,
- (byte) 67, (byte) 75, (byte) 177, (byte) 179, (byte) 120, (byte) 102, (byte) 139, (byte) 237, (byte) 147,
- (byte) 79, (byte) 131, (byte) 61, (byte) 196, (byte) 220, (byte) 188, (byte) 135, (byte) 235, (byte) 216,
- (byte) 123, (byte) 10, (byte) 124, (byte) 222, (byte) 19, (byte) 211, (byte) 93, (byte) 54, (byte) 196,
- (byte) 247, (byte) 80, (byte) 127, (byte) 185, (byte) 59, (byte) 17, (byte) 244, (byte) 195, (byte) 100,
- (byte) 126, (byte) 149, (byte) 180, (byte) 116, (byte) 86, (byte) 51, (byte) 111, (byte) 83, (byte) 197,
- (byte) 26, (byte) 12, (byte) 188, (byte) 108, (byte) 73, (byte) 83, (byte) 27, (byte) 110, (byte) 7,
- (byte) 29, (byte) 240, (byte) 71, (byte) 245, (byte) 171, (byte) 34, (byte) 95, (byte) 246, (byte) 114,
- (byte) 58, (byte) 115, (byte) 197, (byte) 122, (byte) 140, (byte) 190, (byte) 2, (byte) 183, (byte) 111,
- (byte) 185, (byte) 120, (byte) 157, (byte) 115, (byte) 137, (byte) 44, (byte) 45, (byte) 219, (byte) 245,
- (byte) 8, (byte) 15, (byte) 235, (byte) 84, (byte) 102, (byte) 248, (byte) 124, (byte) 255, (byte) 0,
- (byte) 193, (byte) 253, (byte) 157, (byte) 39, (byte) 185, (byte) 142, (byte) 116, (byte) 63, (byte) 248,
- (byte) 236, (byte) 184, (byte) 253, (byte) 42, (byte) 249, (byte) 137, (byte) 177, (byte) 196, (byte) 232,
- (byte) 250, (byte) 116, (byte) 26, (byte) 133, (byte) 196, (byte) 177, (byte) 207, (byte) 36, (byte) 232,
- (byte) 171, (byte) 30, (byte) 71, (byte) 145, (byte) 24, (byte) 115, (byte) 156, (byte) 129, (byte) 158,
- (byte) 189, (byte) 6, (byte) 106, (byte) 118, (byte) 183, (byte) 142, (byte) 203, (byte) 197, (byte) 22,
- (byte) 241, (byte) 195, (byte) 191, (byte) 202, (byte) 23, (byte) 49, (byte) 58, (byte) 110, (byte) 77,
- (byte) 188, (byte) 22, (byte) 7, (byte) 212, (byte) 156, (byte) 3, (byte) 145, (byte) 215, (byte) 181,
- (byte) 116, (byte) 167, (byte) 193, (byte) 23, (byte) 246, (byte) 239, (byte) 190, (byte) 11, (byte) 82,
- (byte) 174, (byte) 58, (byte) 61, (byte) 174, (byte) 163, (byte) 229, (byte) 159, (byte) 195, (byte) 116,
- (byte) 68, (byte) 255, (byte) 0, (byte) 227, (byte) 213, (byte) 93, (byte) 188, (byte) 35, (byte) 173,
- (byte) 155, (byte) 184, (byte) 238, (byte) 166, (byte) 183, (byte) 184, (byte) 118, (byte) 71, (byte) 83,
- (byte) 243, (byte) 92, (byte) 164, (byte) 206, (byte) 66, (byte) 158, (byte) 57, (byte) 37, (byte) 106,
- (byte) 44, (byte) 249, (byte) 249, (byte) 175, (byte) 167, (byte) 99, (byte) 75, (byte) 195, (byte) 146,
- (byte) 214, (byte) 215, (byte) 189, (byte) 255, (byte) 0, (byte) 67, (byte) 110, (byte) 238, (byte) 242,
- (byte) 223, (byte) 79, (byte) 178, (byte) 251, (byte) 69, (byte) 204, (byte) 155, (byte) 16, (byte) 0,
- (byte) 56, (byte) 25, (byte) 44, (byte) 79, (byte) 64, (byte) 7, (byte) 114, (byte) 125, (byte) 41,
- (byte) 52, (byte) 127, (byte) 14, (byte) 220, (byte) 106, (byte) 247, (byte) 17, (byte) 234, (byte) 154,
- (byte) 236, (byte) 94, (byte) 92, (byte) 40, (byte) 119, (byte) 91, (byte) 88, (byte) 30, (byte) 139,
- (byte) 232, (byte) 242, (byte) 122, (byte) 183, (byte) 183, (byte) 111, (byte) 207, (byte) 55, (byte) 52,
- (byte) 95, (byte) 13, (byte) 204, (byte) 247, (byte) 73, (byte) 171, (byte) 107, (byte) 155, (byte) 94,
- (byte) 237, (byte) 127, (byte) 212, (byte) 91, (byte) 41, (byte) 204, (byte) 118, (byte) 163, (byte) 219,
- (byte) 213, (byte) 189, (byte) 91, (byte) 250, (byte) 99, (byte) 29, (byte) 53, (byte) 76, (byte) 99,
- (byte) 97, (byte) 54, (byte) 0, (byte) 1, (byte) 192, (byte) 224, (byte) 81, (byte) 75, (byte) 69,
- (byte) 89, (byte) 33, (byte) 69, (byte) 20, (byte) 80, (byte) 1, (byte) 73, (byte) 69, (byte) 20, (byte) 0,
- (byte) 180, (byte) 152, (byte) 207, (byte) 90, (byte) 40, (byte) 160, (byte) 10, (byte) 243, (byte) 88,
- (byte) 89, (byte) 220, (byte) 12, (byte) 77, (byte) 105, (byte) 4, (byte) 128, (byte) 255, (byte) 0,
- (byte) 122, (byte) 48, (byte) 107, (byte) 54, (byte) 111, (byte) 7, (byte) 120, (byte) 114, (byte) 115,
- (byte) 185, (byte) 244, (byte) 123, (byte) 96, (byte) 222, (byte) 168, (byte) 155, (byte) 79, (byte) 233,
- (byte) 69, (byte) 20, (byte) 1, (byte) 89, (byte) 188, (byte) 17, (byte) 165, (byte) 143, (byte) 248,
- (byte) 247, (byte) 184, (byte) 212, (byte) 45, (byte) 135, (byte) 101, (byte) 138, (byte) 241, (byte) 246,
- (byte) 143, (byte) 192, (byte) 146, (byte) 42, (byte) 7, (byte) 240, (byte) 93, (byte) 194, (byte) 255,
- (byte) 0, (byte) 199, (byte) 182, (byte) 191, (byte) 118, (byte) 163, (byte) 178, (byte) 205, (byte) 20,
- (byte) 114, (byte) 126, (byte) 187, (byte) 115, (byte) 69, (byte) 20, (byte) 92, (byte) 8, (byte) 31,
- (byte) 194, (byte) 254, (byte) 32, (byte) 143, (byte) 136, (byte) 181, (byte) 27, (byte) 9, (byte) 215,
- (byte) 210, (byte) 88, (byte) 29, (byte) 79, (byte) 232, (byte) 216, (byte) 253, (byte) 42, (byte) 164,
- (byte) 154, (byte) 39, (byte) 136, (byte) 225, (byte) 231, (byte) 251, (byte) 54, (byte) 218, (byte) 95,
- (byte) 246, (byte) 173, (byte) 175, (byte) 154, (byte) 35, (byte) 255, (byte) 0, (byte) 160, (byte) 231,
- (byte) 245, (byte) 162, (byte) 138, (byte) 119, (byte) 1, (byte) 26, (byte) 125, (byte) 122, (byte) 216,
- (byte) 98, (byte) 77, (byte) 47, (byte) 88, (byte) 140, (byte) 142, (byte) 134, (byte) 23, (byte) 89,
- (byte) 64, (byte) 252, (byte) 11, (byte) 16, (byte) 127, (byte) 21, (byte) 52, (byte) 209, (byte) 173,
- (byte) 100, (byte) 236, (byte) 187, (byte) 211, (byte) 111, (byte) 195, (byte) 147, (byte) 247, (byte) 163,
- (byte) 178, (byte) 144, (byte) 17, (byte) 245, (byte) 24, (byte) 193, (byte) 247, (byte) 32, (byte) 253,
- (byte) 5, (byte) 20, (byte) 82, (byte) 105, (byte) 49, (byte) 167, (byte) 97, (byte) 214, (byte) 218,
- (byte) 62, (byte) 163, (byte) 226, (byte) 89, (byte) 74, (byte) 186, (byte) 207, (byte) 167, (byte) 105,
- (byte) 32, (byte) 225, (byte) 153, (byte) 148, (byte) 164, (byte) 247, (byte) 62, (byte) 192, (byte) 117,
- (byte) 69, (byte) 253, (byte) 79, (byte) 183, (byte) 34, (byte) 187, (byte) 75, (byte) 13, (byte) 62,
- (byte) 211, (byte) 75, (byte) 179, (byte) 142, (byte) 210, (byte) 202, (byte) 4, (byte) 130, (byte) 24,
- (byte) 198, (byte) 21, (byte) 84, (byte) 81, (byte) 69, (byte) 36, (byte) 172, (byte) 13, (byte) 220,
- (byte) 181, (byte) 69, (byte) 20, (byte) 83, (byte) 16, (byte) 81, (byte) 69, (byte) 20, (byte) 0,
- (byte) 148, (byte) 81, (byte) 69, (byte) 0, (byte) 45, (byte) 20, (byte) 81, (byte) 64, (byte) 5,
- (byte) 20, (byte) 81, (byte) 64, (byte) 31, (byte) 255, (byte) 217
-
- };
-
}
diff --git a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtils.java b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtils.java
index dfe6226..bfb4c5b 100644
--- a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtils.java
+++ b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtils.java
@@ -35,10 +35,11 @@
*/
package net.sourceforge.plantuml.flashcode;
+import java.awt.Color;
import java.awt.image.BufferedImage;
public interface FlashCodeUtils {
- public BufferedImage exportFlashcode(String s);
+ public BufferedImage exportFlashcode(String s, Color fore, Color back);
}
diff --git a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsNone.java b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsNone.java
index bb03777..b5d496d 100644
--- a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsNone.java
+++ b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsNone.java
@@ -35,11 +35,12 @@
*/
package net.sourceforge.plantuml.flashcode;
+import java.awt.Color;
import java.awt.image.BufferedImage;
public class FlashCodeUtilsNone implements FlashCodeUtils {
- public BufferedImage exportFlashcode(String s) {
+ public BufferedImage exportFlashcode(String s, Color fore, Color back) {
return null;
}
diff --git a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java
index d108b85..107b49b 100644
--- a/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java
+++ b/src/net/sourceforge/plantuml/flashcode/FlashCodeUtilsZxing.java
@@ -35,11 +35,11 @@
*/
package net.sourceforge.plantuml.flashcode;
+import java.awt.Color;
import java.awt.image.BufferedImage;
import java.util.Hashtable;
import net.sourceforge.plantuml.Log;
-
import ext.plantuml.com.google.zxing.BarcodeFormat;
import ext.plantuml.com.google.zxing.EncodeHintType;
import ext.plantuml.com.google.zxing.WriterException;
@@ -50,7 +50,12 @@ import ext.plantuml.com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
public class FlashCodeUtilsZxing implements FlashCodeUtils {
- public BufferedImage exportFlashcode(String s) {
+ private static final boolean USE_FLASH = true;
+
+ public BufferedImage exportFlashcode(String s, Color fore, Color back) {
+ if (USE_FLASH == false) {
+ return null;
+ }
try {
final QRCodeWriter writer = new QRCodeWriter();
final Hashtable hints = new Hashtable();
@@ -58,9 +63,9 @@ public class FlashCodeUtilsZxing implements FlashCodeUtils {
hints.put(EncodeHintType.CHARACTER_SET, "UTF8");
final int multiple = 1;
final BitMatrix bit = writer.encode(s, BarcodeFormat.QR_CODE, multiple, hints);
- return MatrixToImageWriter.toBufferedImage(bit);
+ return MatrixToImageWriter.toBufferedImage(bit, fore.getRGB() | 0xFF000000, back.getRGB() | 0xFF000000);
} catch (WriterException e) {
- Log.debug("Cannot create flashcode " + e);
+ Log.debug("Cannot create qrcode " + e);
// e.printStackTrace();
return null;
}
diff --git a/src/net/sourceforge/plantuml/graphic/EmbededSystemLine.java b/src/net/sourceforge/plantuml/graphic/EmbededSystemLine.java
index f2dae41..47f5ade 100644
--- a/src/net/sourceforge/plantuml/graphic/EmbededSystemLine.java
+++ b/src/net/sourceforge/plantuml/graphic/EmbededSystemLine.java
@@ -105,7 +105,7 @@ class EmbededSystemLine extends AbstractTextBlock implements Line {
}
private Diagram getSystem() throws IOException, InterruptedException {
- final BlockUml blockUml = new BlockUml(lines2, 0, Defines.createEmpty());
+ final BlockUml blockUml = new BlockUml(lines2, Defines.createEmpty());
return blockUml.getDiagram();
}
diff --git a/src/net/sourceforge/plantuml/graphic/HtmlColorGradient.java b/src/net/sourceforge/plantuml/graphic/HtmlColorGradient.java
index 45ebe98..fe682ae 100644
--- a/src/net/sourceforge/plantuml/graphic/HtmlColorGradient.java
+++ b/src/net/sourceforge/plantuml/graphic/HtmlColorGradient.java
@@ -48,6 +48,12 @@ public class HtmlColorGradient implements HtmlColor {
if (color1 == null || color2 == null) {
throw new IllegalArgumentException();
}
+ if (color1 instanceof HtmlColorGradient) {
+ color1 = ((HtmlColorGradient) color1).color1;
+ }
+ if (color2 instanceof HtmlColorGradient) {
+ color2 = ((HtmlColorGradient) color2).color2;
+ }
this.color1 = color1;
this.color2 = color2;
this.policy = policy;
diff --git a/src/net/sourceforge/plantuml/graphic/QuoteUtils.java b/src/net/sourceforge/plantuml/graphic/QuoteUtils.java
index a335490..9492ba8 100644
--- a/src/net/sourceforge/plantuml/graphic/QuoteUtils.java
+++ b/src/net/sourceforge/plantuml/graphic/QuoteUtils.java
@@ -254,10 +254,18 @@ public class QuoteUtils {
"Lbh xabj jung fhecevfrq zr gur zbfg? Vg jnfa'g zrrgvat gurz. Vg jnf zrrgvat lbh.",
"Va jne gurer ner ab jvaaref, bayl jvqbjf",
"Vs lbh guvax guvf Havirefr vf onq, lbh fubhyq frr fbzr bs gur bguref", "Cnp-Zna'f n onq thl?",
- "Zl ernyvgl vf whfg qvssrerag guna lbhef",
- "Uvfgbel vf n avtugzner sebz juvpu V nz gelvat gb njnxr",
- "L'ra n dh'bag rffnlr, vyf bag rh qrf ceboyrzrf",
- "Gb ree vf uhzna, ohg gb ernyyl sbhy guvatf hc erdhverf n pbzchgre.");
+ "Zl ernyvgl vf whfg qvssrerag guna lbhef", "L'ra n dh'bag rffnlr, vyf bag rh qrf ceboyrzrf",
+ "Gb ree vf uhzna, ohg gb ernyyl sbhy guvatf hc erdhverf n pbzchgre.",
+ "Vs lbh oryvrir rirelguvat lbh ernq, lbh orggre abg ernq",
+ "Gurer vf ab ceboyrz fb onq lbh pna'g znxr vg jbefr", "Pn p'rfg qh ybheq... Ha gehp qr znynqr.",
+ "V qb abg guvax, gung V guvax.. V guvax.", "Gurer ner cynprf ybjre guna gur onfrzrag",
+ "Gurer ner 10 glcrf bs crbcyr: gubfr jub haqrefgnaq ovanel, naq gubfr jub qba'g.",
+ "Cyrnfr zvaq gur tnc orgjrra gur genva naq gur cyngsbez", "Nfuvzbgb av tb-puhv xhqnfnv",
+ "Vs lbh'er erprvivat guvf genafzvffvba, znxr ab nggrzcg gb pbzr gb vgf cbvag bs bevtva.",
+ "Obl, qb V ungr orvat evtug nyy gur gvzr!",
+ "Jub funirf gur oneore jub funirf nyy gur zra jub qba'g funir gurzfryirf?",
+ "V haqrefgnaq uhzna rzbgvbaf, nygubhtu V qb abg srry gurz zlfrys.",
+ "Lbh qvqa'g fnl gur zntvp jbeq!");
private QuoteUtils() {
}
diff --git a/src/net/sourceforge/plantuml/graphic/Splitter.java b/src/net/sourceforge/plantuml/graphic/Splitter.java
index 8eca8ab..7216149 100644
--- a/src/net/sourceforge/plantuml/graphic/Splitter.java
+++ b/src/net/sourceforge/plantuml/graphic/Splitter.java
@@ -57,6 +57,7 @@ public class Splitter {
public static final String fontSizePattern2 = "\\<size[\\s:]+(\\d+)[%s]*\\>";
static final String fontSup = "\\<sup\\>";
static final String fontSub = "\\<sub\\>";
+ public static final String qrcodePattern = "\\<qrcode[\\s:]+([^>{}]+)" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>";
static final String imgPattern = "\\<img\\s+(src[%s]*=[%s]*[%q%g]?[^\\s%g>]+[%q%g]?[%s]*|vspace\\s*=\\s*[%q%g]?\\d+[%q%g]?\\s*|valign[%s]*=[%s]*[%q%g]?(top|middle|bottom)[%q%g]?[%s]*)+\\>";
public static final String imgPatternNoSrcColon = "\\<img[\\s:]+([^>{}]+)" + "(\\{scale=(?:[0-9.]+)\\})?" + "\\>";
public static final String fontFamilyPattern = "\\<font[\\s:]+([^>]+)/?\\>";
@@ -97,6 +98,8 @@ public class Splitter {
sb.append('|');
sb.append(endSupSub);
sb.append('|');
+ sb.append(qrcodePattern);
+ sb.append('|');
sb.append(imgPattern);
sb.append('|');
sb.append(imgPatternNoSrcColon);
diff --git a/src/net/sourceforge/plantuml/graphic/TextBlockRecentred.java b/src/net/sourceforge/plantuml/graphic/TextBlockRecentred.java
index 6bbe9fd..5801b2e 100644
--- a/src/net/sourceforge/plantuml/graphic/TextBlockRecentred.java
+++ b/src/net/sourceforge/plantuml/graphic/TextBlockRecentred.java
@@ -78,7 +78,10 @@ public class TextBlockRecentred extends AbstractTextBlock implements TextBlockBa
}
public HtmlColor getBackcolor() {
- return ((TextBlockBackcolored) textBlock).getBackcolor();
+ if (textBlock instanceof TextBlockBackcolored) {
+ return ((TextBlockBackcolored) textBlock).getBackcolor();
+ }
+ return null;
}
} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/graphic/TextBlockUtils.java b/src/net/sourceforge/plantuml/graphic/TextBlockUtils.java
index 4dd8e2c..b1afe5f 100644
--- a/src/net/sourceforge/plantuml/graphic/TextBlockUtils.java
+++ b/src/net/sourceforge/plantuml/graphic/TextBlockUtils.java
@@ -54,10 +54,12 @@ import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.posimo.Positionable;
import net.sourceforge.plantuml.posimo.PositionableImpl;
import net.sourceforge.plantuml.skin.rose.Rose;
+import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.LimitFinder;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UFont;
import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.UImage;
import net.sourceforge.plantuml.ugraphic.UStroke;
public class TextBlockUtils {
@@ -165,7 +167,7 @@ public class TextBlockUtils {
public Dimension2D calculateDimension(StringBounder stringBounder) {
return bloc.calculateDimension(stringBounder);
}
-
+
public MinMax getMinMax(StringBounder stringBounder) {
return bloc.getMinMax(stringBounder);
}
@@ -181,4 +183,50 @@ public class TextBlockUtils {
};
}
+ public static TextBlockBackcolored addBackcolor(final TextBlock text, final HtmlColor backColor) {
+ return new TextBlockBackcolored() {
+ public void drawU(UGraphic ug) {
+ text.drawU(ug);
+ }
+
+ public MinMax getMinMax(StringBounder stringBounder) {
+ return text.getMinMax(stringBounder);
+ }
+
+ public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
+ return text.getInnerPosition(member, stringBounder, strategy);
+ }
+
+ public Dimension2D calculateDimension(StringBounder stringBounder) {
+ return text.calculateDimension(stringBounder);
+ }
+
+ public HtmlColor getBackcolor() {
+ return backColor;
+ }
+ };
+ }
+
+ public static TextBlock fromUImage(final UImage image) {
+ return new TextBlock() {
+
+ public void drawU(UGraphic ug) {
+ ug.draw(image);
+ }
+
+ public Dimension2D calculateDimension(StringBounder stringBounder) {
+ return new Dimension2DDouble(image.getWidth(), image.getHeight());
+ }
+
+ public MinMax getMinMax(StringBounder stringBounder) {
+ return MinMax.fromMax(image.getWidth(), image.getHeight());
+ }
+
+ public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
+ return null;
+ }
+
+ };
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/graphic/UGraphicDelegator.java b/src/net/sourceforge/plantuml/graphic/UGraphicDelegator.java
index cea1dbb..f23b808 100644
--- a/src/net/sourceforge/plantuml/graphic/UGraphicDelegator.java
+++ b/src/net/sourceforge/plantuml/graphic/UGraphicDelegator.java
@@ -45,12 +45,14 @@ public abstract class UGraphicDelegator implements UGraphic {
final private UGraphic ug;
- public final boolean matchesProperty(String propertyName) {
- return ug.matchesProperty(propertyName);
+ @Override
+ public String toString() {
+ return super.toString() + " " + getUg().toString();
}
- public double dpiFactor() {
- return ug.dpiFactor();
+
+ public final boolean matchesProperty(String propertyName) {
+ return ug.matchesProperty(propertyName);
}
public UGraphicDelegator(UGraphic ug) {
diff --git a/src/net/sourceforge/plantuml/graphic/USymbol.java b/src/net/sourceforge/plantuml/graphic/USymbol.java
index 0962733..fc836f0 100644
--- a/src/net/sourceforge/plantuml/graphic/USymbol.java
+++ b/src/net/sourceforge/plantuml/graphic/USymbol.java
@@ -57,8 +57,8 @@ public abstract class USymbol {
public final static USymbol NODE = record("NODE", SkinParameter.NODE, new USymbolNode());
public final static USymbol ARTIFACT = record("ARTIFACT", SkinParameter.ARTIFACT, new USymbolArtifact());
public final static USymbol PACKAGE = record("PACKAGE", SkinParameter.PACKAGE, new USymbolFolder(
- SkinParameter.PACKAGE));
- public final static USymbol FOLDER = record("FOLDER", SkinParameter.FOLDER, new USymbolFolder(SkinParameter.FOLDER));
+ SkinParameter.PACKAGE, true));
+ public final static USymbol FOLDER = record("FOLDER", SkinParameter.FOLDER, new USymbolFolder(SkinParameter.FOLDER, false));
public final static USymbol FILE = record("FILE", SkinParameter.FILE, new USymbolFile());
public final static USymbol RECTANGLE = record("RECTANGLE", SkinParameter.RECTANGLE, new USymbolRect(
SkinParameter.RECTANGLE, HorizontalAlignment.CENTER));
diff --git a/src/net/sourceforge/plantuml/graphic/USymbolFolder.java b/src/net/sourceforge/plantuml/graphic/USymbolFolder.java
index 5495d3d..d8fd2e2 100644
--- a/src/net/sourceforge/plantuml/graphic/USymbolFolder.java
+++ b/src/net/sourceforge/plantuml/graphic/USymbolFolder.java
@@ -58,9 +58,11 @@ public class USymbolFolder extends USymbol {
private final static int marginTitleY2 = 3;
private final SkinParameter skinParameter;
+ private final boolean showTitle;
- public USymbolFolder(SkinParameter skinParameter) {
+ public USymbolFolder(SkinParameter skinParameter, boolean showTitle) {
this.skinParameter = skinParameter;
+ this.showTitle = showTitle;
}
@Override
@@ -142,12 +144,15 @@ public class USymbolFolder extends USymbol {
final Dimension2D dim = calculateDimension(ug.getStringBounder());
ug = UGraphicStencil.create(ug, getRectangleStencil(dim), new UStroke());
ug = symbolContext.apply(ug);
- final Dimension2D dimName = name.calculateDimension(ug.getStringBounder());
+ final Dimension2D dimName = showTitle ? name.calculateDimension(ug.getStringBounder())
+ : new Dimension2DDouble(40, 15);
drawFolder(ug, dim.getWidth(), dim.getHeight(), dimName, symbolContext.isShadowing(),
symbolContext.getRoundCorner());
final Margin margin = getMargin();
final TextBlock tb = TextBlockUtils.mergeTB(stereotype, label, HorizontalAlignment.CENTER);
- name.drawU(ug.apply(new UTranslate(4, 3)));
+ if (showTitle) {
+ name.drawU(ug.apply(new UTranslate(4, 3)));
+ }
tb.drawU(ug.apply(new UTranslate(margin.getX1(), margin.getY1() + dimName.getHeight())));
}
diff --git a/src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java b/src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java
index c39b807..0588f9e 100644
--- a/src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java
+++ b/src/net/sourceforge/plantuml/hector/CucaDiagramFileMakerHectorB1.java
@@ -54,7 +54,7 @@ import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.svek.CucaDiagramFileMaker;
-import net.sourceforge.plantuml.svek.DotDataImageBuilder;
+import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.IEntityImage;
import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
@@ -162,7 +162,7 @@ public class CucaDiagramFileMakerHectorB1 implements CucaDiagramFileMaker {
}
private IEntityImage computeImage(final ILeaf leaf) {
- final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
+ final IEntityImage image = GeneralImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
false, diagram, null, null, null, diagram.getLinks());
return image;
}
diff --git a/src/net/sourceforge/plantuml/hector2/graphic/Foo1.java b/src/net/sourceforge/plantuml/hector2/graphic/Foo1.java
index 679dcb2..e3df59f 100644
--- a/src/net/sourceforge/plantuml/hector2/graphic/Foo1.java
+++ b/src/net/sourceforge/plantuml/hector2/graphic/Foo1.java
@@ -43,7 +43,7 @@ import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.ILeaf;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.hector2.layering.Layer;
-import net.sourceforge.plantuml.svek.DotDataImageBuilder;
+import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.IEntityImage;
public class Foo1 {
@@ -59,7 +59,7 @@ public class Foo1 {
}
private static IEntityImage computeImage(final ILeaf leaf, CucaDiagram diagram) {
- final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
+ final IEntityImage image = GeneralImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
false, diagram, null, null, null, diagram.getLinks());
return image;
}
diff --git a/src/net/sourceforge/plantuml/hector2/graphic/Foo2.java b/src/net/sourceforge/plantuml/hector2/graphic/Foo2.java
index 06e7126..92fedb0 100644
--- a/src/net/sourceforge/plantuml/hector2/graphic/Foo2.java
+++ b/src/net/sourceforge/plantuml/hector2/graphic/Foo2.java
@@ -47,7 +47,7 @@ import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.hector2.MinMax;
import net.sourceforge.plantuml.hector2.layering.Layer;
import net.sourceforge.plantuml.hector2.mpos.Distribution;
-import net.sourceforge.plantuml.svek.DotDataImageBuilder;
+import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.IEntityImage;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UTranslate;
@@ -100,7 +100,7 @@ public class Foo2 extends AbstractTextBlock implements TextBlock {
}
private IEntityImage computeImage(final ILeaf leaf) {
- final IEntityImage image = DotDataImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
+ final IEntityImage image = GeneralImageBuilder.createEntityImageBlock(leaf, diagram.getSkinParam(),
false, diagram, null, null, null, diagram.getLinks());
return image;
}
diff --git a/src/net/sourceforge/plantuml/jdot/CucaDiagramFileMakerJDot.java b/src/net/sourceforge/plantuml/jdot/CucaDiagramFileMakerJDot.java
index 7e2dbc5..341ef61 100644
--- a/src/net/sourceforge/plantuml/jdot/CucaDiagramFileMakerJDot.java
+++ b/src/net/sourceforge/plantuml/jdot/CucaDiagramFileMakerJDot.java
@@ -42,14 +42,14 @@ import static gen.lib.cgraph.node__c.agnode;
import static gen.lib.cgraph.subg__c.agsubg;
import static gen.lib.gvc.gvc__c.gvContext;
import static gen.lib.gvc.gvlayout__c.gvLayoutJobs;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.Agraph_s;
-import h.Agraphinfo_t;
-import h.GVC_s;
+import h.ST_Agraph_s;
+import h.ST_Agraphinfo_t;
+import h.ST_Agedge_s;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agraphinfo_t;
+import h.ST_GVC_s;
import h.ST_boxf;
-import h.boxf;
import java.awt.geom.Dimension2D;
import java.awt.geom.Point2D;
@@ -99,8 +99,8 @@ import net.sourceforge.plantuml.graphic.color.ColorType;
import net.sourceforge.plantuml.svek.Bibliotekon;
import net.sourceforge.plantuml.svek.Cluster;
import net.sourceforge.plantuml.svek.CucaDiagramFileMaker;
-import net.sourceforge.plantuml.svek.DotDataImageBuilder;
import net.sourceforge.plantuml.svek.DotStringFactory;
+import net.sourceforge.plantuml.svek.GeneralImageBuilder;
import net.sourceforge.plantuml.svek.GraphvizCrash;
import net.sourceforge.plantuml.svek.IEntityImage;
import net.sourceforge.plantuml.svek.Shape;
@@ -111,19 +111,18 @@ import net.sourceforge.plantuml.ugraphic.UTranslate;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
import smetana.core.CString;
import smetana.core.JUtils;
+import smetana.core.JUtilsDebug;
import smetana.core.Macro;
import smetana.core.Z;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
private final CucaDiagram diagram;
private final StringBounder stringBounder;
- private final Map<ILeaf, Agnode_s> nodes = new LinkedHashMap<ILeaf, Agnode_s>();
- private final Map<Link, Agedge_s> edges = new LinkedHashMap<Link, Agedge_s>();
- private final Map<IGroup, Agraph_s> clusters = new LinkedHashMap<IGroup, Agraph_s>();
+ private final Map<ILeaf, ST_Agnode_s> nodes = new LinkedHashMap<ILeaf, ST_Agnode_s>();
+ private final Map<Link, ST_Agedge_s> edges = new LinkedHashMap<Link, ST_Agedge_s>();
+ private final Map<IGroup, ST_Agraph_s> clusters = new LinkedHashMap<IGroup, ST_Agraph_s>();
private Map<IGroup, ILeaf> emptyGroups = new HashMap<IGroup, ILeaf>();
private final DotStringFactory dotStringFactory;
@@ -138,13 +137,13 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
public void drawU(UGraphic ug) {
- for (Map.Entry<IGroup, Agraph_s> ent : clusters.entrySet()) {
+ for (Map.Entry<IGroup, ST_Agraph_s> ent : clusters.entrySet()) {
drawGroup(ug, ymirror, ent.getKey(), ent.getValue());
}
- for (Map.Entry<ILeaf, Agnode_s> ent : nodes.entrySet()) {
+ for (Map.Entry<ILeaf, ST_Agnode_s> ent : nodes.entrySet()) {
final ILeaf leaf = ent.getKey();
- final Agnode_s node = ent.getValue();
+ final ST_Agnode_s node = ent.getValue();
final Point2D corner = getCorner(node);
final Shape shape = dotStringFactory.getBibliotekon().getShape(leaf);
@@ -152,19 +151,19 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
image.drawU(ug.apply(new UTranslate(corner)));
}
- for (Map.Entry<Link, Agedge_s> ent : edges.entrySet()) {
+ for (Map.Entry<Link, ST_Agedge_s> ent : edges.entrySet()) {
final Link link = ent.getKey();
- final Agedge_s edge = ent.getValue();
- new JDotPath(link, edge, ymirror, diagram, getLabel(link)).drawU(ug);
+ final ST_Agedge_s edge = ent.getValue();
+ new JDotPath(link, edge, ymirror, diagram, getLabel(link), getQualifier(link, 1), getQualifier(link, 2)).drawU(ug);
}
}
- private Point2D getCorner(Agnode_s n) {
- final Agnodeinfo_t data = (Agnodeinfo_t) Macro.AGDATA(n).castTo(Agnodeinfo_t.class);
- final double width = data.getDouble("width") * 72;
- final double height = data.getDouble("height") * 72;
- final double x = data.getStruct("coord").getDouble("x");
- final double y = data.getStruct("coord").getDouble("y");
+ private Point2D getCorner(ST_Agnode_s n) {
+ final ST_Agnodeinfo_t data = (ST_Agnodeinfo_t) Macro.AGDATA(n).castTo(ST_Agnodeinfo_t.class);
+ final double width = data.width * 72;
+ final double height = data.height * 72;
+ final double x = data.coord.x;
+ final double y = data.coord.y;
if (ymirror == null) {
return new Point2D.Double(x - width / 2, y - height / 2);
@@ -184,10 +183,10 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
- public void drawGroup(UGraphic ug, YMirror ymirror, IGroup group, Agraph_s gr) {
+ public void drawGroup(UGraphic ug, YMirror ymirror, IGroup group, ST_Agraph_s gr) {
JUtils.LOG2("drawGroup");
- final __ptr__ data = Macro.AGDATA(gr).castTo(Agraphinfo_t.class);
- final ST_boxf bb = (ST_boxf) data.getStruct("bb");
+ final ST_Agraphinfo_t data = (ST_Agraphinfo_t) Macro.AGDATA(gr).castTo(ST_Agraphinfo_t.class);
+ final ST_boxf bb = (ST_boxf) data.bb;
final double llx = bb.LL.x;
double lly = bb.LL.y;
final double urx = bb.UR.x;
@@ -283,7 +282,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
}
- private void exportEntities(Agraph_s g, Collection<ILeaf> entities2) {
+ private void exportEntities(ST_Agraph_s g, Collection<ILeaf> entities2) {
for (ILeaf ent : entities2) {
if (ent.isRemoved()) {
continue;
@@ -292,10 +291,10 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
}
- private void exportEntity(Agraph_s g, ILeaf leaf) {
+ private void exportEntity(ST_Agraph_s g, ILeaf leaf) {
final Shape shape = dotStringFactory.getBibliotekon().getShape(leaf);
// System.err.println("exportEntity " + leaf);
- final Agnode_s node = agnode(g, new CString(shape.getUid()), true);
+ final ST_Agnode_s node = agnode(g, new CString(shape.getUid()), true);
agsafeset(node, new CString("shape"), new CString("box"), new CString(""));
final String width = "" + (shape.getWidth() / 72);
final String height = "" + (shape.getHeight() / 72);
@@ -364,9 +363,9 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
return result;
}
- private void printCluster(Agraph_s g, Cluster cluster) {
+ private void printCluster(ST_Agraph_s g, Cluster cluster) {
for (Shape shape : cluster.getShapes()) {
- final Agnode_s node = agnode(g, new CString(shape.getUid()), true);
+ final ST_Agnode_s node = agnode(g, new CString(shape.getUid()), true);
agsafeset(node, new CString("shape"), new CString("box"), new CString(""));
final String width = "" + (shape.getWidth() / 72);
final String height = "" + (shape.getHeight() / 72);
@@ -399,7 +398,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
Z.open();
try {
- final Agraph_s g = agopen(new CString("g"), Z.z().Agdirected, null);
+ final ST_Agraph_s g = agopen(new CString("g"), Z.z().Agdirected, null);
// printCluster(g, root);
exportEntities(g, getUnpackagedEntities());
@@ -420,15 +419,17 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
//
for (Link link : diagram.getLinks()) {
// System.err.println("link=" + link);
- final Agedge_s e = createEdge(g, link);
+ final ST_Agedge_s e = createEdge(g, link);
// System.err.println("Agedge_s=" + e);
if (e != null) {
edges.put(link, e);
}
}
- final GVC_s gvc = gvContext();
+ final ST_GVC_s gvc = gvContext();
+ JUtilsDebug.reset();
gvLayoutJobs(gvc, g);
+ JUtilsDebug.printMe();
// for (Agedge_s e : edges.values()) {
// DebugUtils.printDebugEdge(e);
@@ -447,6 +448,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
return imageBuilder.writeImageTOBEMOVED(fileFormatOption, diagram.seed(), os);
} catch (Throwable e) {
+ JUtilsDebug.printMe();
UmlDiagram.exportDiagramError(os, e, fileFormatOption, diagram.seed(), diagram.getMetadata(),
diagram.getFlashData(), getFailureText3(e));
return ImageDataSimple.error();
@@ -455,7 +457,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
}
- private void exportGroups(Agraph_s graph, IGroup parent) {
+ private void exportGroups(ST_Agraph_s graph, IGroup parent) {
for (IGroup g : diagram.getChildrenGroups(parent)) {
if (g.isRemoved()) {
continue;
@@ -470,10 +472,10 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
- private void exportGroup(Agraph_s graph, IGroup group) {
+ private void exportGroup(ST_Agraph_s graph, IGroup group) {
final Cluster cluster = getBibliotekon().getCluster(group);
JUtils.LOG2("cluster = " + cluster.getClusterId());
- final Agraph_s cluster1 = agsubg(graph, new CString(cluster.getClusterId()), true);
+ final ST_Agraph_s cluster1 = agsubg(graph, new CString(cluster.getClusterId()), true);
if (cluster.isLabel()) {
final double width = cluster.getTitleAndAttributeWidth();
final double height = cluster.getTitleAndAttributeHeight() - 5;
@@ -495,16 +497,31 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
return label;
}
return TextBlockUtils.withMargin(label, marginLabel, marginLabel);
+ }
+ private TextBlock getQualifier(Link link, int n) {
+ final String tmp = n == 1 ? link.getQualifier1() : link.getQualifier2();
+ if (tmp == null) {
+ return null;
+ }
+ final double marginLabel = 1; // startUid.equals(endUid) ? 6 : 1;
+ ISkinParam skinParam = diagram.getSkinParam();
+ final FontConfiguration labelFont = new FontConfiguration(skinParam, FontParam.ARROW, null);
+ final TextBlock label = Display.getWithNewlines(tmp).create(labelFont,
+ skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam);
+ if (TextBlockUtils.isEmpty(label, stringBounder)) {
+ return label;
+ }
+ return TextBlockUtils.withMargin(label, marginLabel, marginLabel);
}
- private Agnode_s getAgnodeFromLeaf(IEntity entity) {
- final Agnode_s n = nodes.get(entity);
+ private ST_Agnode_s getAgnodeFromLeaf(IEntity entity) {
+ final ST_Agnode_s n = nodes.get(entity);
if (n != null) {
return n;
}
final String id = getBibliotekon().getShapeUid((ILeaf) entity);
- for (Map.Entry<ILeaf, Agnode_s> ent : nodes.entrySet()) {
+ for (Map.Entry<ILeaf, ST_Agnode_s> ent : nodes.entrySet()) {
if (id.equals(getBibliotekon().getShapeUid(ent.getKey()))) {
return ent.getValue();
}
@@ -513,16 +530,16 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
}
- private Agedge_s createEdge(final Agraph_s g, Link link) {
- final Agnode_s n = getAgnodeFromLeaf(link.getEntity1());
- final Agnode_s m = getAgnodeFromLeaf(link.getEntity2());
+ private ST_Agedge_s createEdge(final ST_Agraph_s g, Link link) {
+ final ST_Agnode_s n = getAgnodeFromLeaf(link.getEntity1());
+ final ST_Agnode_s m = getAgnodeFromLeaf(link.getEntity2());
if (n == null) {
return null;
}
if (m == null) {
return null;
}
- final Agedge_s e = agedge(g, n, m, null, true);
+ final ST_Agedge_s e = agedge(g, n, m, null, true);
// System.err.println("createEdge " + link);
agsafeset(e, new CString("arrowtail"), new CString("none"), new CString(""));
agsafeset(e, new CString("arrowhead"), new CString("none"), new CString(""));
@@ -544,6 +561,22 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
agsafeset(e, new CString("label"), hackDim, new CString(""));
// System.err.print("label=" + hackDim.getContent());
}
+ final TextBlock q1 = getQualifier(link, 1);
+ if (q1 != null) {
+ final Dimension2D dimLabel = q1.calculateDimension(stringBounder);
+ // System.err.println("dimLabel = " + dimLabel);
+ final CString hackDim = Macro.createHackInitDimensionFromLabel((int) dimLabel.getWidth(),
+ (int) dimLabel.getHeight());
+ agsafeset(e, new CString("taillabel"), hackDim, new CString(""));
+ }
+ final TextBlock q2 = getQualifier(link, 2);
+ if (q2 != null) {
+ final Dimension2D dimLabel = q2.calculateDimension(stringBounder);
+ // System.err.println("dimLabel = " + dimLabel);
+ final CString hackDim = Macro.createHackInitDimensionFromLabel((int) dimLabel.getWidth(),
+ (int) dimLabel.getHeight());
+ agsafeset(e, new CString("headlabel"), hackDim, new CString(""));
+ }
// System.err.println();
return e;
}
@@ -594,7 +627,7 @@ public class CucaDiagramFileMakerJDot implements CucaDiagramFileMaker {
// skinParam = new SkinParamSameClassWidth(dotData.getSkinParam(), width);
}
- return DotDataImageBuilder.createEntityImageBlock(ent, skinParam, diagram.isHideEmptyDescriptionForState(),
+ return GeneralImageBuilder.createEntityImageBlock(ent, skinParam, diagram.isHideEmptyDescriptionForState(),
diagram, getBibliotekon(), null, diagram.getUmlDiagramType(), diagram.getLinks());
}
return ent.getSvekImage();
diff --git a/src/net/sourceforge/plantuml/jdot/DebugUtils.java b/src/net/sourceforge/plantuml/jdot/DebugUtils.java
index 4731f40..c15d402 100644
--- a/src/net/sourceforge/plantuml/jdot/DebugUtils.java
+++ b/src/net/sourceforge/plantuml/jdot/DebugUtils.java
@@ -34,99 +34,84 @@
*/
package net.sourceforge.plantuml.jdot;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.bezier;
-import h.boxf;
-import h.pointf;
-import h.splines;
-import h.textlabel_t;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_bezier;
+import h.ST_boxf;
+import h.ST_pointf;
+import h.ST_splines;
+import h.ST_textlabel_t;
import smetana.core.Macro;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.amiga.StarArrayOfPtr;
import smetana.core.amiga.StarStruct;
public class DebugUtils {
- public static void printDebugEdge(Agedge_s e) {
+ public static void printDebugEdge(ST_Agedge_s e) {
System.err.println("*********** PRINT EDGE ********** " + getUID(e));
- final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(e).castTo(Agedgeinfo_t.class);
- final splines splines = (splines) data.getPtr("spl");
- __struct__<boxf> bb = splines.getStruct("bb");
+ final ST_Agedgeinfo_t data = (ST_Agedgeinfo_t) Macro.AGDATA(e).castTo(ST_Agedgeinfo_t.class);
+ final ST_splines splines = (ST_splines) data.spl;
+ //ST_boxf bb = (ST_boxf) splines.bb;
// final bezier list = (bezier) splines.getPtr("list");
System.err.println("splines.UID=" + ((StarStruct) splines).getUID36());
- System.err.println("splines.size=" + splines.getInt("size"));
- System.err.println("bb.LL=" + pointftoString(bb.getStruct("LL")));
- System.err.println("bb.UR=" + pointftoString(bb.getStruct("UR")));
- printDebugBezier((bezier) splines.getPtr("list").getPtr());
+ System.err.println("splines.size=" + splines.size);
+ //System.err.println("bb.LL=" + pointftoString((ST_pointf) bb.LL));
+ //System.err.println("bb.UR=" + pointftoString((ST_pointf) bb.UR));
+ printDebugBezier(splines.list.getPtr());
- textlabel_t label = (textlabel_t) data.getPtr("label");
+ ST_textlabel_t label = data.label;
if (label != null) {
- System.err.println("LABEL dimen=" + pointftoString(label.getStruct("dimen")));
- System.err.println("LABEL space=" + pointftoString(label.getStruct("space")));
- System.err.println("LABEL pos=" + pointftoString(label.getStruct("pos")));
+ System.err.println("LABEL dimen=" + pointftoString(label.dimen));
+ System.err.println("LABEL space=" + pointftoString(label.space));
+ System.err.println("LABEL pos=" + pointftoString(label.pos));
}
}
public static String getUID(Object o) {
- if (o instanceof StarArrayOfPtr) {
- return ((StarArrayOfPtr) o).getUID36();
- }
return ((StarStruct) o).getUID36();
}
- public static void printDebugBezier(bezier bezier) {
- System.err.println("bezier.size=" + bezier.getInt("size"));
- System.err.println("bezier.sflag=" + bezier.getInt("sflag"));
- System.err.println("splines.eflag=" + bezier.getInt("eflag"));
- System.err.println("bezier.sp=" + pointftoString(bezier.getStruct("sp")));
- System.err.println("bezier.ep=" + pointftoString(bezier.getStruct("ep")));
- System.err.println("bezier.list=" + getUID(bezier.getPtr("list")));
- for (int i = 0; i < bezier.getInt("size"); i++) {
- final __ptr__ pt = bezier.getPtr("list").plus(i).getPtr();
+ public static void printDebugBezier(ST_bezier bezier) {
+ System.err.println("bezier.size=" + bezier.size);
+ System.err.println("bezier.sflag=" + bezier.sflag);
+ System.err.println("splines.eflag=" + bezier.eflag);
+ System.err.println("bezier.sp=" + pointftoString((ST_pointf) bezier.sp));
+ System.err.println("bezier.ep=" + pointftoString((ST_pointf) bezier.ep));
+ System.err.println("bezier.list=" + getUID(bezier.list.getPtr()));
+ for (int i = 0; i < bezier.size; i++) {
+ final ST_pointf pt = bezier.list.get(i);
System.err.println("pt=" + pointftoString(pt));
}
}
- public static void printDebugNode(Agnode_s n) {
+ public static void printDebugNode(ST_Agnode_s n) {
System.err.println("*********** PRINT NODE ********** ");
- final Agnodeinfo_t data = (Agnodeinfo_t) Macro.AGDATA(n).castTo(Agnodeinfo_t.class);
- System.err.println("width=" + data.getDouble("width"));
- System.err.println("height=" + data.getDouble("height"));
- System.err.println("ht=" + data.getDouble("ht"));
- System.err.println("lw=" + data.getDouble("lw"));
- System.err.println("rw=" + data.getDouble("rw"));
- System.err.println("coord=" + pointftoString(data.getStruct("coord")));
+ final ST_Agnodeinfo_t data = (ST_Agnodeinfo_t) Macro.AGDATA(n).castTo(ST_Agnodeinfo_t.class);
+ System.err.println("width=" + data.width);
+ System.err.println("height=" + data.height);
+ System.err.println("ht=" + data.ht);
+ System.err.println("lw=" + data.lw);
+ System.err.println("rw=" + data.rw);
+ System.err.println("coord=" + pointftoString((ST_pointf) data.coord));
- __struct__<boxf> bb = data.getStruct("bb");
- System.err.println("bb.LL=" + pointftoString(bb.getStruct("LL")));
- System.err.println("bb.UR=" + pointftoString(bb.getStruct("UR")));
+ //ST_boxf bb = (ST_boxf) data.bb;
+ //System.err.println("bb.LL=" + pointftoString((ST_pointf) bb.LL));
+ //System.err.println("bb.UR=" + pointftoString((ST_pointf) bb.UR));
// TODO Auto-generated method stub
}
- public static String pointftoString(__struct__<pointf> point) {
+ public static String pointftoString(ST_pointf point) {
final StringBuilder sb = new StringBuilder();
sb.append("(");
- sb.append(point.getDouble("x"));
+ sb.append(point.x);
sb.append(" ; ");
- sb.append(point.getDouble("y"));
+ sb.append(point.y);
sb.append(")");
return sb.toString();
}
-
- public static String pointftoString(__ptr__ point) {
- final StringBuilder sb = new StringBuilder();
- sb.append("(");
- sb.append(point.getDouble("x"));
- sb.append(" ; ");
- sb.append(point.getDouble("y"));
- sb.append(")");
- return sb.toString();
- }
}
diff --git a/src/net/sourceforge/plantuml/jdot/JDotPath.java b/src/net/sourceforge/plantuml/jdot/JDotPath.java
index 9c5cc1d..bea0e2f 100644
--- a/src/net/sourceforge/plantuml/jdot/JDotPath.java
+++ b/src/net/sourceforge/plantuml/jdot/JDotPath.java
@@ -35,12 +35,12 @@
*/
package net.sourceforge.plantuml.jdot;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.bezier;
-import h.pointf;
-import h.splines;
-import h.textlabel_t;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_bezier;
+import h.ST_pointf;
+import h.ST_textlabel_t;
+import h.ST_splines;
import java.awt.geom.Point2D;
@@ -63,23 +63,27 @@ import net.sourceforge.plantuml.ugraphic.URectangle;
import net.sourceforge.plantuml.ugraphic.UTranslate;
import smetana.core.Macro;
import smetana.core.__ptr__;
-import smetana.core.__struct__;
public class JDotPath implements UDrawable {
private final Link link;
- private final Agedge_s edge;
+ private final ST_Agedge_s edge;
private final YMirror ymirror;
private final CucaDiagram diagram;
private final TextBlock label;
+ private final TextBlock headLabel;
+ private final TextBlock tailLabel;
private final Rose rose = new Rose();
- public JDotPath(Link link, Agedge_s edge, YMirror ymirror, CucaDiagram diagram, TextBlock label) {
+ public JDotPath(Link link, ST_Agedge_s edge, YMirror ymirror, CucaDiagram diagram, TextBlock label,
+ TextBlock tailLabel, TextBlock headLabel) {
this.link = link;
this.edge = edge;
this.ymirror = ymirror;
this.diagram = diagram;
this.label = label;
+ this.tailLabel = tailLabel;
+ this.headLabel = headLabel;
}
private ColorParam getArrowColorParam() {
@@ -119,8 +123,14 @@ public class JDotPath implements UDrawable {
if (dotPath != null) {
ug.apply(new UChangeColor(color)).draw(dotPath);
}
- if (getLabelRectangleTranslate() != null) {
- label.drawU(ug.apply(getLabelRectangleTranslate()));
+ if (getLabelRectangleTranslate("label") != null) {
+ label.drawU(ug.apply(getLabelRectangleTranslate("label")));
+ }
+ if (getLabelRectangleTranslate("head_label") != null) {
+ headLabel.drawU(ug.apply(getLabelRectangleTranslate("head_label")));
+ }
+ if (getLabelRectangleTranslate("tail_label") != null) {
+ tailLabel.drawU(ug.apply(getLabelRectangleTranslate("tail_label")));
}
// printDebug(ug);
@@ -128,51 +138,59 @@ public class JDotPath implements UDrawable {
private void printDebug(UGraphic ug) {
ug = ug.apply(new UChangeColor(HtmlColorUtils.BLUE)).apply(new UChangeBackColor(HtmlColorUtils.BLUE));
- final splines splines = getSplines(edge);
- final bezier beziers = (bezier) splines.getPtr("list");
- for (int i = 0; i < beziers.getInt("size"); i++) {
+ final ST_splines splines = getSplines(edge);
+ final ST_bezier beziers = splines.list.getPtr();
+ for (int i = 0; i < beziers.size; i++) {
Point2D pt = getPoint(splines, i);
if (ymirror != null) {
pt = ymirror.getMirrored(pt);
}
ug.apply(new UTranslate(pt).compose(new UTranslate(-1, -1))).draw(new UEllipse(3, 3));
}
- if (getLabelRectangleTranslate() != null && getLabelURectangle() != null) {
+ if (getLabelRectangleTranslate("label") != null && getLabelURectangle() != null) {
ug = ug.apply(new UChangeColor(HtmlColorUtils.BLUE)).apply(new UChangeBackColor(null));
- ug.apply(getLabelRectangleTranslate()).draw(getLabelURectangle());
+ ug.apply(getLabelRectangleTranslate("label")).draw(getLabelURectangle());
}
}
private URectangle getLabelURectangle() {
- final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(edge).castTo(Agedgeinfo_t.class);
- textlabel_t label = (textlabel_t) data.getPtr("label");
+ final ST_Agedgeinfo_t data = (ST_Agedgeinfo_t) Macro.AGDATA(edge).castTo(ST_Agedgeinfo_t.class);
+ ST_textlabel_t label = (ST_textlabel_t) data.label;
if (label == null) {
return null;
}
- final __struct__<pointf> dimen = label.getStruct("dimen");
- final __struct__<pointf> space = label.getStruct("space");
- final __struct__<pointf> pos = label.getStruct("pos");
- final double x = pos.getDouble("x");
- final double y = pos.getDouble("y");
- final double width = dimen.getDouble("x");
- final double height = dimen.getDouble("y");
+ final ST_pointf dimen = (ST_pointf) label.dimen;
+ final ST_pointf space = (ST_pointf) label.space;
+ final ST_pointf pos = (ST_pointf) label.pos;
+ final double x = pos.x;
+ final double y = pos.y;
+ final double width = dimen.x;
+ final double height = dimen.y;
return new URectangle(width, height);
}
- private UTranslate getLabelRectangleTranslate() {
- final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(edge).castTo(Agedgeinfo_t.class);
- textlabel_t label = (textlabel_t) data.getPtr("label");
+ private UTranslate getLabelRectangleTranslate(String fieldName) {
+ // final String fieldName = "label";
+ final ST_Agedgeinfo_t data = (ST_Agedgeinfo_t) Macro.AGDATA(edge).castTo(ST_Agedgeinfo_t.class);
+ ST_textlabel_t label = null;
+ if (fieldName.equals("label")) {
+ label = data.label;
+ } else if (fieldName.equals("head_label")) {
+ label = data.head_label;
+ } else if (fieldName.equals("tail_label")) {
+ label = data.tail_label;
+ }
if (label == null) {
return null;
}
- final __struct__<pointf> dimen = label.getStruct("dimen");
- final __struct__<pointf> space = label.getStruct("space");
- final __struct__<pointf> pos = label.getStruct("pos");
- final double x = pos.getDouble("x");
- final double y = pos.getDouble("y");
- final double width = dimen.getDouble("x");
- final double height = dimen.getDouble("y");
+ final ST_pointf dimen = (ST_pointf) label.dimen;
+ final ST_pointf space = (ST_pointf) label.space;
+ final ST_pointf pos = (ST_pointf) label.pos;
+ final double x = pos.x;
+ final double y = pos.y;
+ final double width = dimen.x;
+ final double height = dimen.y;
if (ymirror == null) {
return new UTranslate(x - width / 2, y - height / 2);
@@ -180,30 +198,30 @@ public class JDotPath implements UDrawable {
return ymirror.getMirrored(new UTranslate(x - width / 2, y + height / 2));
}
- public DotPath getDotPath(Agedge_s e) {
- final splines splines = getSplines(e);
+ public DotPath getDotPath(ST_Agedge_s e) {
+ final ST_splines splines = getSplines(e);
return getDotPath(splines);
}
- private splines getSplines(Agedge_s e) {
- final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(e).castTo(Agedgeinfo_t.class);
- final splines splines = (splines) data.getPtr("spl");
+ private ST_splines getSplines(ST_Agedge_s e) {
+ final ST_Agedgeinfo_t data = (ST_Agedgeinfo_t) Macro.AGDATA(e).castTo(ST_Agedgeinfo_t.class);
+ final ST_splines splines = (ST_splines) data.spl;
return splines;
}
- private DotPath getDotPath(splines splines) {
+ private DotPath getDotPath(ST_splines splines) {
if (splines == null) {
System.err.println("ERROR, no splines for getDotPath");
return null;
}
DotPath result = new DotPath();
- final bezier beziers = (bezier) splines.getPtr("list");
+ final ST_bezier beziers = (ST_bezier) splines.list.getPtr();
final Point2D pt1 = getPoint(splines, 0);
final Point2D pt2 = getPoint(splines, 1);
final Point2D pt3 = getPoint(splines, 2);
final Point2D pt4 = getPoint(splines, 3);
result = result.addCurve(pt1, pt2, pt3, pt4);
- final int n = beziers.getInt("size");
+ final int n = beziers.size;
for (int i = 4; i < n; i += 3) {
final Point2D ppt2 = getPoint(splines, i);
final Point2D ppt3 = getPoint(splines, i + 1);
@@ -213,10 +231,10 @@ public class JDotPath implements UDrawable {
return result;
}
- private Point2D getPoint(splines splines, int i) {
- final bezier beziers = (bezier) splines.getPtr("list");
- final __ptr__ pt = beziers.getPtr("list").plus(i).getPtr();
- return new Point2D.Double(pt.getDouble("x"), pt.getDouble("y"));
+ private Point2D getPoint(ST_splines splines, int i) {
+ final ST_bezier beziers = (ST_bezier) splines.list.getPtr();
+ final ST_pointf pt = beziers.list.get(i);
+ return new Point2D.Double(pt.x, pt.y);
}
}
diff --git a/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java b/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java
index e8b8271..6cfc788 100644
--- a/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java
+++ b/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java
@@ -153,4 +153,8 @@ public class ScientificEquationSafe {
return null;
}
+ public final String getFormula() {
+ return formula;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/project2/command/CommandCloseWeekDay.java b/src/net/sourceforge/plantuml/nwdiag/CommandComment.java
index 3731eeb..22b0687 100644
--- a/src/net/sourceforge/plantuml/project2/command/CommandCloseWeekDay.java
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandComment.java
@@ -33,24 +33,29 @@
*
*
*/
-package net.sourceforge.plantuml.project2.command;
-
-import java.util.List;
+package net.sourceforge.plantuml.nwdiag;
import net.sourceforge.plantuml.command.CommandExecutionResult;
-import net.sourceforge.plantuml.command.SingleLineCommand;
-import net.sourceforge.plantuml.project2.PSystemProject2;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandComment extends SingleLineCommand2<NwDiagram> {
-public class CommandCloseWeekDay extends SingleLineCommand<PSystemProject2> {
+ public CommandComment() {
+ super(getRegexConcat());
+ }
- public CommandCloseWeekDay() {
- super("(?i)^[%s]*close[%s]+(\\w{3,}day)[%s]*$");
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*//.*"), //
+ new RegexLeaf("$"));
}
@Override
- protected CommandExecutionResult executeArg(PSystemProject2 diagram, List<String> arg) {
- // final WeekDay weekDay = WeekDay.valueOf(arg.get(0).substring(0, 3).goUpperCase());
-// getSystem().getProject().closeWeekDay(weekDay);
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
return CommandExecutionResult.ok();
}
+
}
diff --git a/src/net/sourceforge/plantuml/nwdiag/CommandElement.java b/src/net/sourceforge/plantuml/nwdiag/CommandElement.java
new file mode 100644
index 0000000..e496434
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandElement.java
@@ -0,0 +1,65 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandElement extends SingleLineCommand2<NwDiagram> {
+
+ public CommandElement() {
+ super(getRegexConcat());
+ }
+
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("NAME", "([\\p{L}0-9_]+)"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("DEFINITION", "(\\[(.*)\\])?"), //
+ new RegexLeaf(";?"), //
+ new RegexLeaf("$"));
+ }
+
+ @Override
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ return diagram.addElement(arg.get("NAME", 0), arg.get("DEFINITION", 1));
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/project2/command/CommandAffectation.java b/src/net/sourceforge/plantuml/nwdiag/CommandEndSomething.java
index 695b560..7a82545 100644
--- a/src/net/sourceforge/plantuml/project2/command/CommandAffectation.java
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandEndSomething.java
@@ -33,29 +33,31 @@
*
*
*/
-package net.sourceforge.plantuml.project2.command;
+package net.sourceforge.plantuml.nwdiag;
-import java.util.List;
-
-import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.command.CommandExecutionResult;
-import net.sourceforge.plantuml.command.SingleLineCommand;
-import net.sourceforge.plantuml.project2.PSystemProject2;
-import net.sourceforge.plantuml.project2.Value;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandEndSomething extends SingleLineCommand2<NwDiagram> {
-public class CommandAffectation extends SingleLineCommand<PSystemProject2> {
+ public CommandEndSomething() {
+ super(getRegexConcat());
+ }
- public CommandAffectation() {
- super("(?i)^[%s]*([~\\^]?[\\w$/]+)[%s]*:=[%s]*(.+)$");
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("\\}"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("$"));
}
@Override
- protected CommandExecutionResult executeArg(PSystemProject2 diagram, List<String> arg) {
- final Value exp = diagram.getProject().getExpression(StringUtils.trin(arg.get(1)));
- final boolean ok = diagram.getProject().affectation(StringUtils.trin(arg.get(0)), exp);
- if (ok) {
- return CommandExecutionResult.ok();
- }
- return CommandExecutionResult.error("Cannot execute CommandAffectation");
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ return diagram.endSomething();
}
+
}
diff --git a/src/net/sourceforge/plantuml/nwdiag/CommandGroup.java b/src/net/sourceforge/plantuml/nwdiag/CommandGroup.java
new file mode 100644
index 0000000..5d78d0b
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandGroup.java
@@ -0,0 +1,67 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandGroup extends SingleLineCommand2<NwDiagram> {
+
+ public CommandGroup() {
+ super(getRegexConcat());
+ }
+
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("group"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("NAME", "([\\p{L}0-9_]+)?"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("\\{"), //
+ new RegexLeaf("$"));
+ }
+
+
+ @Override
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ return diagram.openGroup(arg.get("NAME", 0));
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/CommandLink.java b/src/net/sourceforge/plantuml/nwdiag/CommandLink.java
new file mode 100644
index 0000000..ed6d349
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandLink.java
@@ -0,0 +1,67 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandLink extends SingleLineCommand2<NwDiagram> {
+
+ public CommandLink() {
+ super(getRegexConcat());
+ }
+
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("NAME1", "[\\p{L}0-9_]+"), //
+ new RegexLeaf("[%s]*--[%s]*"), //
+ new RegexLeaf("NAME2", "[\\p{L}0-9_]+"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf(";?"), //
+ new RegexLeaf("$"));
+ }
+
+
+ @Override
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ return diagram.link();
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/CommandNetwork.java b/src/net/sourceforge/plantuml/nwdiag/CommandNetwork.java
new file mode 100644
index 0000000..0564dfc
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandNetwork.java
@@ -0,0 +1,66 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandNetwork extends SingleLineCommand2<NwDiagram> {
+
+ public CommandNetwork() {
+ super(getRegexConcat());
+ }
+
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("network"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("NAME", "([\\p{L}0-9_]+)?"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("\\{"), //
+ new RegexLeaf("$"));
+ }
+
+ @Override
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ return diagram.openNetwork(arg.get("NAME", 0));
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/CommandNwDiagInit.java b/src/net/sourceforge/plantuml/nwdiag/CommandNwDiagInit.java
new file mode 100644
index 0000000..be8aae6
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandNwDiagInit.java
@@ -0,0 +1,64 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandNwDiagInit extends SingleLineCommand2<NwDiagram> {
+
+ public CommandNwDiagInit() {
+ super(getRegexConcat());
+ }
+
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("TYPE", "nwdiag"), //
+ new RegexLeaf("[%s]+"), //
+ new RegexLeaf("\\{"), //
+ new RegexLeaf("$"));
+ }
+
+ @Override
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ diagram.init();
+ return CommandExecutionResult.ok();
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/CommandProperty.java b/src/net/sourceforge/plantuml/nwdiag/CommandProperty.java
new file mode 100644
index 0000000..458281b
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/CommandProperty.java
@@ -0,0 +1,68 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
+
+public class CommandProperty extends SingleLineCommand2<NwDiagram> {
+
+ public CommandProperty() {
+ super(getRegexConcat());
+ }
+
+ static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("NAME", "(address|color)"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("="), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("VALUE", "\"(.*)\""), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf(";?"), //
+ new RegexLeaf("$"));
+ }
+
+ @Override
+ protected CommandExecutionResult executeArg(NwDiagram diagram, RegexResult arg) {
+ return diagram.setProperty(arg.get("NAME", 0), arg.get("VALUE", 0));
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/DiagElement.java b/src/net/sourceforge/plantuml/nwdiag/DiagElement.java
new file mode 100644
index 0000000..c204bf3
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/DiagElement.java
@@ -0,0 +1,120 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import net.sourceforge.plantuml.ColorParam;
+import net.sourceforge.plantuml.SpriteContainerEmpty;
+import net.sourceforge.plantuml.cucadiagram.Display;
+import net.sourceforge.plantuml.graphic.FontConfiguration;
+import net.sourceforge.plantuml.graphic.HorizontalAlignment;
+import net.sourceforge.plantuml.graphic.HtmlColorUtils;
+import net.sourceforge.plantuml.graphic.SymbolContext;
+import net.sourceforge.plantuml.graphic.TextBlock;
+import net.sourceforge.plantuml.graphic.TextBlockUtils;
+import net.sourceforge.plantuml.graphic.USymbol;
+import net.sourceforge.plantuml.ugraphic.UFont;
+
+public class DiagElement {
+
+ private USymbol shape = USymbol.RECTANGLE;
+ private final String name;
+ private String description;
+ private final Network mainNetwork;
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public DiagElement(String name, Network network) {
+ this.description = name;
+ this.mainNetwork = network;
+ this.name = name;
+ }
+
+ private TextBlock toTextBlock(String s) {
+ if (s == null) {
+ return null;
+ }
+ if (s.length() == 0) {
+ return TextBlockUtils.empty(0, 0);
+ }
+ s = s.replace(", ", "\\n");
+ return Display.getWithNewlines(s).create(getFontConfiguration(), HorizontalAlignment.LEFT,
+ new SpriteContainerEmpty());
+ }
+
+ private FontConfiguration getFontConfiguration() {
+ final UFont font = UFont.serif(11);
+ return new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLACK, false);
+ }
+
+ public LinkedElement asTextBlock(final String adress1, final String adress2) {
+ final TextBlock ad1 = toTextBlock(adress1);
+ final TextBlock ad2 = toTextBlock(adress2);
+ final SymbolContext symbolContext = new SymbolContext(ColorParam.activityBackground.getDefaultValue(),
+ ColorParam.activityBorder.getDefaultValue()).withShadow(true);
+ final TextBlock desc = toTextBlock(description);
+ final TextBlock box = shape
+ .asSmall(TextBlockUtils.empty(0, 0), desc, TextBlockUtils.empty(0, 0), symbolContext);
+ return new LinkedElement(ad1, box, ad2, mainNetwork, this);
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public final Network getMainNetwork() {
+ return mainNetwork;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public final void setShape(String shapeName) {
+ if ("database".equalsIgnoreCase(shapeName)) {
+ this.shape = USymbol.DATABASE;
+ }
+ if ("node".equalsIgnoreCase(shapeName)) {
+ this.shape = USymbol.NODE;
+ }
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/project2/TaskMerge.java b/src/net/sourceforge/plantuml/nwdiag/DiagGroup.java
index 5b55a43..58c8cd9 100644
--- a/src/net/sourceforge/plantuml/project2/TaskMerge.java
+++ b/src/net/sourceforge/plantuml/nwdiag/DiagGroup.java
@@ -30,47 +30,53 @@
*
*
* Original Author: Arnaud Roques
- *
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.nwdiag;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import net.sourceforge.plantuml.graphic.HtmlColor;
-class TaskMerge implements Task {
+public class DiagGroup {
- private final String code;
private final String name;
- private final Task task1;
- private final Task task2;
+ private final Network network;
+ private final Set<String> elements = new HashSet<String>();
+ private HtmlColor color;
- TaskMerge(String code, String name, Task task1, Task task2) {
- this.code = code;
- this.name = name;
- this.task1 = task1;
- this.task2 = task2;
+ @Override
+ public String toString() {
+ return name + " " + network + " " + elements;
}
- public String getCode() {
- return code;
+ public DiagGroup(String name, Network network) {
+ this.name = name;
+ this.network = network;
}
- public String getName() {
+ public final String getName() {
return name;
}
- public long getLoad() {
- throw new UnsupportedOperationException();
+ public void addElement(String name) {
+ this.elements.add(name);
}
- public TimeElement getStart() {
- return TimeUtils.min(task1.getStart(), task2.getStart());
+ public boolean matches(LinkedElement tested) {
+ if (network != null && network != tested.getNetwork()) {
+ return false;
+ }
+ return elements.contains(tested.getElement().getName());
}
- public TimeElement getEnd() {
- return TimeUtils.max(task1.getEnd(), task2.getEnd());
+ public final HtmlColor getColor() {
+ return color;
}
- public TimeElement getCompleted() {
- return TimeUtils.max(task1.getCompleted(), task2.getCompleted());
+ public final void setColor(HtmlColor color) {
+ this.color = color;
}
}
diff --git a/src/net/sourceforge/plantuml/nwdiag/GridTextBlockDecorated.java b/src/net/sourceforge/plantuml/nwdiag/GridTextBlockDecorated.java
new file mode 100644
index 0000000..9ddf958
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/GridTextBlockDecorated.java
@@ -0,0 +1,136 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import java.util.Collection;
+
+import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
+import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.ugraphic.MinMax;
+import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
+import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.URectangle;
+import net.sourceforge.plantuml.ugraphic.UTranslate;
+
+public class GridTextBlockDecorated extends GridTextBlockSimple {
+
+ public static final HtmlColorSetSimple colors = new HtmlColorSetSimple();
+
+ public static final int NETWORK_THIN = 5;
+
+ private final Collection<DiagGroup> groups;
+
+ public GridTextBlockDecorated(int lines, int cols, Collection<DiagGroup> groups) {
+ super(lines, cols);
+ this.groups = groups;
+ }
+
+ @Override
+ public void drawGrid(UGraphic ug) {
+ for (DiagGroup group : groups) {
+ drawGroups(ug, group);
+ }
+ drawNetworkTube(ug);
+ }
+
+ private void drawGroups(UGraphic ug, DiagGroup group) {
+ final StringBounder stringBounder = ug.getStringBounder();
+
+ MinMax size = null;
+ double y = 0;
+ for (int i = 0; i < data.length; i++) {
+ final double lineHeight = lineHeight(stringBounder, i);
+ double x = 0;
+ for (int j = 0; j < data[i].length; j++) {
+ final double colWidth = colWidth(stringBounder, j);
+ final LinkedElement element = data[i][j];
+ if (element != null && group.matches(element)) {
+ final MinMax minMax = element.getMinMax(stringBounder, colWidth, lineHeight).translate(
+ new UTranslate(x, y));
+ size = size == null ? minMax : size.addMinMax(minMax);
+ }
+ x += colWidth;
+ }
+ y += lineHeight;
+ }
+ if (size != null) {
+ HtmlColor color = group.getColor();
+ if (color == null) {
+ color = colors.getColorIfValid("#AAA");
+ }
+ size.draw(ug, color);
+ }
+
+ }
+
+ private void drawNetworkTube(final UGraphic ug) {
+ final StringBounder stringBounder = ug.getStringBounder();
+ double y = 0;
+ for (int i = 0; i < data.length; i++) {
+ final Network network = getNetwork(i);
+ double x = 0;
+ double xmin = -1;
+ double xmax = 0;
+ for (int j = 0; j < data[i].length; j++) {
+ final boolean hline = isPresent(i, j) || isPresent(i - 1, j);
+ if (hline && xmin < 0) {
+ xmin = x;
+ }
+ x += colWidth(stringBounder, j);
+ if (hline) {
+ xmax = x;
+ }
+ }
+ final URectangle rect = new URectangle(xmax - xmin, NETWORK_THIN);
+ rect.setDeltaShadow(1.0);
+ UGraphic ug2 = ug.apply(new UTranslate(xmin, y));
+ if (network != null && network.getColor() != null) {
+ ug2 = ug2.apply(new UChangeBackColor(network.getColor()));
+ }
+ ug2.draw(rect);
+ y += lineHeight(stringBounder, i);
+ }
+ }
+
+ private Network getNetwork(int i) {
+ for (int j = 0; j < data[i].length; j++) {
+ if (isPresent(i, j)) {
+ return data[i][j].getNetwork();
+ }
+ }
+ return null;
+ }
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/GridTextBlockSimple.java b/src/net/sourceforge/plantuml/nwdiag/GridTextBlockSimple.java
new file mode 100644
index 0000000..d435a56
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/GridTextBlockSimple.java
@@ -0,0 +1,131 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import java.awt.geom.Dimension2D;
+import java.awt.geom.Rectangle2D;
+
+import net.sourceforge.plantuml.Dimension2DDouble;
+import net.sourceforge.plantuml.graphic.InnerStrategy;
+import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.TextBlock;
+import net.sourceforge.plantuml.ugraphic.MinMax;
+import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.UTranslate;
+
+public class GridTextBlockSimple implements TextBlock {
+
+ protected final LinkedElement data[][];
+
+ public GridTextBlockSimple(int lines, int cols) {
+ this.data = new LinkedElement[lines][cols];
+ }
+
+ protected boolean isPresent(int i, int j) {
+ if (i == -1) {
+ return false;
+ }
+ return data[i][j] != null;
+ }
+
+ public void drawGrid(UGraphic ug) {
+ }
+
+ public void drawU(UGraphic ug) {
+ drawGrid(ug);
+ final StringBounder stringBounder = ug.getStringBounder();
+ double y = 0;
+ for (int i = 0; i < data.length; i++) {
+ final double lineHeight = lineHeight(stringBounder, i);
+ double x = 0;
+ for (int j = 0; j < data[i].length; j++) {
+ final double colWidth = colWidth(stringBounder, j);
+ if (data[i][j] != null) {
+ data[i][j].drawMe(ug.apply(new UTranslate(x, y)), colWidth, lineHeight);
+ }
+ x += colWidth;
+ }
+ y += lineHeight;
+ }
+ }
+
+ protected double colWidth(StringBounder stringBounder, final int j) {
+ double width = 0;
+ for (int i = 0; i < data.length; i++) {
+ if (data[i][j] != null) {
+ width = Math.max(width, data[i][j].naturalDimension(stringBounder).getWidth());
+ }
+ }
+ return width;
+ }
+
+ public double lineHeight(StringBounder stringBounder, final int i) {
+ double height = 0;
+ for (int j = 0; j < data[i].length; j++) {
+ if (data[i][j] != null) {
+ height = Math.max(height, data[i][j].naturalDimension(stringBounder).getHeight());
+ }
+ }
+ return height;
+ }
+
+ public Dimension2D calculateDimension(StringBounder stringBounder) {
+ if (data.length == 0) {
+ return new Dimension2DDouble(0, 0);
+ }
+ double height = 0;
+ for (int i = 0; i < data.length; i++) {
+ height += lineHeight(stringBounder, i);
+ }
+ double width = 0;
+ for (int j = 0; j < data[0].length; j++) {
+ width += colWidth(stringBounder, j);
+ }
+ return new Dimension2DDouble(width, height);
+ }
+
+ public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
+ throw new UnsupportedOperationException("member=" + member + " " + getClass().toString());
+ }
+
+ public MinMax getMinMax(StringBounder stringBounder) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void add(int i, int j, LinkedElement value) {
+ data[i][j] = value;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/LinkedElement.java b/src/net/sourceforge/plantuml/nwdiag/LinkedElement.java
new file mode 100644
index 0000000..443e949
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/LinkedElement.java
@@ -0,0 +1,136 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import java.awt.geom.Dimension2D;
+
+import net.sourceforge.plantuml.ColorParam;
+import net.sourceforge.plantuml.Dimension2DDouble;
+import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.TextBlock;
+import net.sourceforge.plantuml.ugraphic.MinMax;
+import net.sourceforge.plantuml.ugraphic.UChangeColor;
+import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.ULine;
+import net.sourceforge.plantuml.ugraphic.UTranslate;
+import net.sourceforge.plantuml.utils.MathUtils;
+
+public class LinkedElement {
+
+ private final TextBlock ad1;
+ private final TextBlock box;
+ private final TextBlock ad2;
+ private final Network network;
+ private final DiagElement element;
+
+ public LinkedElement(TextBlock ad1, TextBlock box, TextBlock ad2, Network network, DiagElement element) {
+ this.ad1 = ad1;
+ this.box = box;
+ this.ad2 = ad2;
+ this.network = network;
+ this.element = element;
+ }
+
+ private final double marginAd = 10;
+ private final double marginBox = 15;
+
+ public MinMax getMinMax(StringBounder stringBounder, double width, double height) {
+ final double xMiddle = width / 2;
+ final double yMiddle = height / 2;
+ final Dimension2D dimBox = box.calculateDimension(stringBounder);
+
+ final double x1 = xMiddle - dimBox.getWidth() / 2;
+ final double y1 = yMiddle - dimBox.getHeight() / 2;
+ final double x2 = xMiddle + dimBox.getWidth() / 2;
+ final double y2 = yMiddle + dimBox.getHeight() / 2;
+ return MinMax.getEmpty(false).addPoint(x1 - 5, y1 - 5).addPoint(x2 + 5, y2 + 5);
+ }
+
+ public void drawMe(UGraphic ug, double width, double height) {
+ final double xMiddle = width / 2;
+ final double yMiddle = height / 2;
+ final StringBounder stringBounder = ug.getStringBounder();
+ final Dimension2D dimBox = box.calculateDimension(stringBounder);
+
+ final double y1 = yMiddle - dimBox.getHeight() / 2;
+ final double y2 = yMiddle + dimBox.getHeight() / 2;
+
+ drawCenter(ug, box, xMiddle, yMiddle);
+
+ final HtmlColor color = ColorParam.activityBorder.getDefaultValue();
+ ug = ug.apply(new UChangeColor(color));
+ drawHLine(ug, xMiddle, GridTextBlockDecorated.NETWORK_THIN, y1);
+ if (ad2 != null) {
+ drawHLine(ug, xMiddle, y2, height);
+ }
+
+ drawCenter(ug, ad1, xMiddle, (GridTextBlockDecorated.NETWORK_THIN + y1) / 2);
+ if (ad2 != null) {
+ drawCenter(ug, ad2, xMiddle, (y2 + height - GridTextBlockDecorated.NETWORK_THIN) / 2);
+ }
+ }
+
+ private void drawCenter(UGraphic ug, TextBlock block, double x, double y) {
+ final Dimension2D dim = block.calculateDimension(ug.getStringBounder());
+ block.drawU(ug.apply(new UTranslate(x - dim.getWidth() / 2, y - dim.getHeight() / 2)));
+
+ }
+
+ private void drawHLine(UGraphic ug, double x, double y1, double y2) {
+ final ULine line = new ULine(0, y2 - y1);
+ ug.apply(new UTranslate(x, y1)).draw(line);
+ }
+
+ public Dimension2D naturalDimension(StringBounder stringBounder) {
+ final Dimension2D dim1 = ad1.calculateDimension(stringBounder);
+ final Dimension2D dimBox = box.calculateDimension(stringBounder);
+ final Dimension2D dim2 = ad2 == null ? new Dimension2DDouble(0, 0) : ad2.calculateDimension(stringBounder);
+ final double width = MathUtils.max(dim1.getWidth() + 2 * marginAd, dimBox.getWidth() + 2 * marginBox,
+ dim2.getWidth() + 2 * marginAd);
+ final double height = dim1.getHeight() + 2 * marginAd + dimBox.getHeight() + 2 * marginBox + dim2.getHeight()
+ + 2 * marginAd;
+ return new Dimension2DDouble(width, height);
+ }
+
+ public final Network getNetwork() {
+ return network;
+ }
+
+ public final DiagElement getElement() {
+ return element;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/Network.java b/src/net/sourceforge/plantuml/nwdiag/Network.java
new file mode 100644
index 0000000..1c3b252
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/Network.java
@@ -0,0 +1,103 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import net.sourceforge.plantuml.graphic.HtmlColor;
+
+public class Network {
+
+ private final String name;
+ private final Map<DiagElement, String> localElements = new LinkedHashMap<DiagElement, String>();
+ private HtmlColor color;
+
+ private String ownAdress;
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public Network(String name) {
+ this.name = name;
+ }
+
+ public String getAdress(DiagElement element) {
+ return localElements.get(element);
+ }
+
+ public void addElement(DiagElement element, Map<String, String> props) {
+ String address = props.get("address");
+ if (address == null) {
+ address = "";
+ }
+ if (address.length() == 0 && localElements.containsKey(element)) {
+ return;
+ }
+ localElements.put(element, address);
+ }
+
+ public boolean constainsLocally(String name) {
+ for (DiagElement element : localElements.keySet()) {
+ if (element.getName().equals(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public final String getOwnAdress() {
+ return ownAdress;
+ }
+
+ public final void setOwnAdress(String ownAdress) {
+ this.ownAdress = ownAdress;
+ }
+
+ public final String getName() {
+ return name;
+ }
+
+ public final HtmlColor getColor() {
+ return color;
+ }
+
+ public final void setColor(HtmlColor color) {
+ this.color = color;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java b/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java
new file mode 100644
index 0000000..e1ac9d3
--- /dev/null
+++ b/src/net/sourceforge/plantuml/nwdiag/NwDiagram.java
@@ -0,0 +1,291 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.nwdiag;
+
+import java.awt.geom.Dimension2D;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import net.sourceforge.plantuml.ColorParam;
+import net.sourceforge.plantuml.FileFormatOption;
+import net.sourceforge.plantuml.Scale;
+import net.sourceforge.plantuml.SpriteContainerEmpty;
+import net.sourceforge.plantuml.UmlDiagram;
+import net.sourceforge.plantuml.UmlDiagramType;
+import net.sourceforge.plantuml.command.CommandExecutionResult;
+import net.sourceforge.plantuml.core.DiagramDescription;
+import net.sourceforge.plantuml.core.ImageData;
+import net.sourceforge.plantuml.cucadiagram.Display;
+import net.sourceforge.plantuml.graphic.FontConfiguration;
+import net.sourceforge.plantuml.graphic.HorizontalAlignment;
+import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.HtmlColorUtils;
+import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.TextBlock;
+import net.sourceforge.plantuml.graphic.UDrawable;
+import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
+import net.sourceforge.plantuml.ugraphic.ImageBuilder;
+import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
+import net.sourceforge.plantuml.ugraphic.UChangeColor;
+import net.sourceforge.plantuml.ugraphic.UEmpty;
+import net.sourceforge.plantuml.ugraphic.UFont;
+import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.UTranslate;
+
+public class NwDiagram extends UmlDiagram {
+
+ private boolean initDone;
+ private final Map<String, DiagElement> elements = new LinkedHashMap<String, DiagElement>();
+ private final List<Network> networks = new ArrayList<Network>();
+ private final List<DiagGroup> groups = new ArrayList<DiagGroup>();
+ private DiagGroup currentGroup = null;
+
+ public DiagramDescription getDescription() {
+ return new DiagramDescription("(Nwdiag)");
+ }
+
+ @Override
+ public UmlDiagramType getUmlDiagramType() {
+ return UmlDiagramType.NWDIAG;
+ }
+
+ public void init() {
+ initDone = true;
+ }
+
+ private Network currentNetwork() {
+ if (networks.size() == 0) {
+ return null;
+ }
+ return networks.get(networks.size() - 1);
+ }
+
+ public CommandExecutionResult openGroup(String name) {
+ if (initDone == false) {
+ return error();
+ }
+ currentGroup = new DiagGroup(name, currentNetwork());
+ groups.add(currentGroup);
+ return CommandExecutionResult.ok();
+ }
+
+ public CommandExecutionResult openNetwork(String name) {
+ if (initDone == false) {
+ return error();
+ }
+ final Network network = new Network(name);
+ networks.add(network);
+ return CommandExecutionResult.ok();
+ }
+
+ public CommandExecutionResult endSomething() {
+ if (initDone == false) {
+ return error();
+ }
+ this.currentGroup = null;
+ return CommandExecutionResult.ok();
+ }
+
+ public CommandExecutionResult addElement(String name, String definition) {
+ if (initDone == false) {
+ return error();
+ }
+ if (currentGroup != null) {
+ currentGroup.addElement(name);
+ }
+ if (currentNetwork() != null) {
+ DiagElement element = elements.get(name);
+ if (element == null) {
+ element = new DiagElement(name, currentNetwork());
+ elements.put(name, element);
+ }
+ final Map<String, String> props = toSet(definition);
+ final String description = props.get("description");
+ if (description != null) {
+ element.setDescription(description);
+ }
+ final String shape = props.get("shape");
+ if (shape != null) {
+ element.setShape(shape);
+ }
+ currentNetwork().addElement(element, props);
+ }
+ return CommandExecutionResult.ok();
+ }
+
+ private CommandExecutionResult error() {
+ return CommandExecutionResult.error("");
+ }
+
+ private Map<String, String> toSet(String definition) {
+ final Map<String, String> result = new HashMap<String, String>();
+ if (definition == null) {
+ return result;
+ }
+ final Pattern p = Pattern.compile("\\s*(\\w+)\\s*=\\s*(\"([^\"]*)\"|[^\\s,]+)");
+ final Matcher m = p.matcher(definition);
+ while (m.find()) {
+ final String name = m.group(1);
+ final String value = m.group(3) == null ? m.group(2) : m.group(3);
+ result.put(name, value);
+ }
+ return result;
+
+ }
+
+ @Override
+ protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption)
+ throws IOException {
+ final Scale scale = getScale();
+
+ final double dpiFactor = scale == null ? 1 : scale.getScale(100, 100);
+ final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), dpiFactor, null, "", "", 0, 0,
+ null, false);
+ final UDrawable result = getUDrawable();
+ imageBuilder.setUDrawable(result);
+
+ return imageBuilder.writeImageTOBEMOVED(fileFormatOption, 0, os);
+ }
+
+ private UDrawable getUDrawable() {
+ return new UDrawable() {
+ public void drawU(UGraphic ug) {
+ drawMe(ug);
+ }
+ };
+ }
+
+ private TextBlock toTextBlock(String name, String s) {
+ if (s != null) {
+ name += "\\n" + s;
+ }
+ return Display.getWithNewlines(name).create(getFontConfiguration(), HorizontalAlignment.RIGHT,
+ new SpriteContainerEmpty());
+ }
+
+ private FontConfiguration getFontConfiguration() {
+ final UFont font = UFont.serif(11);
+ return new FontConfiguration(font, HtmlColorUtils.BLACK, HtmlColorUtils.BLACK, false);
+ }
+
+ private void drawMe(UGraphic ug) {
+ final double margin = 5;
+ ug = ug.apply(new UTranslate(margin, margin));
+
+ final StringBounder stringBounder = ug.getStringBounder();
+ final GridTextBlockDecorated grid = new GridTextBlockDecorated(networks.size(), elements.size(), groups);
+
+ for (int i = 0; i < networks.size(); i++) {
+ final Network current = networks.get(i);
+ final Network next = i + 1 < networks.size() ? networks.get(i + 1) : null;
+ int j = 0;
+ for (Map.Entry<String, DiagElement> ent : elements.entrySet()) {
+ final DiagElement element = ent.getValue();
+ if (element.getMainNetwork() == current && current.constainsLocally(ent.getKey())) {
+ final String ad1 = current.getAdress(element);
+ final String ad2 = next == null ? null : next.getAdress(element);
+ grid.add(i, j, element.asTextBlock(ad1, ad2));
+ }
+ j++;
+ }
+ }
+
+ double deltaX = 0;
+ double deltaY = 0;
+ for (int i = 0; i < networks.size(); i++) {
+ final Network current = networks.get(i);
+ final String address = current.getOwnAdress();
+ final TextBlock desc = toTextBlock(current.getName(), address);
+ final Dimension2D dim = desc.calculateDimension(stringBounder);
+ if (i == 0) {
+ deltaY = (dim.getHeight() - GridTextBlockDecorated.NETWORK_THIN) / 2;
+ }
+ deltaX = Math.max(deltaX, dim.getWidth());
+ }
+ double y = 0;
+ for (int i = 0; i < networks.size(); i++) {
+ final Network current = networks.get(i);
+ final String address = current.getOwnAdress();
+ final TextBlock desc = toTextBlock(current.getName(), address);
+ final Dimension2D dim = desc.calculateDimension(stringBounder);
+ desc.drawU(ug.apply(new UTranslate(deltaX - dim.getWidth(), y)));
+
+ y += grid.lineHeight(stringBounder, i);
+ }
+ deltaX += 5;
+
+ grid.drawU(ug.apply(new UChangeColor(ColorParam.activityBorder.getDefaultValue()))
+ .apply(new UChangeBackColor(ColorParam.activityBackground.getDefaultValue()))
+ .apply(new UTranslate(deltaX, deltaY)));
+ final Dimension2D dimGrid = grid.calculateDimension(stringBounder);
+
+ ug.apply(new UTranslate(dimGrid.getWidth() + deltaX + margin, dimGrid.getHeight() + deltaY + margin)).draw(
+ new UEmpty(1, 1));
+
+ }
+
+ public CommandExecutionResult setProperty(String property, String value) {
+ if (initDone == false) {
+ return error();
+ }
+ if ("address".equalsIgnoreCase(property) && currentNetwork() != null) {
+ currentNetwork().setOwnAdress(value);
+ }
+ if ("color".equalsIgnoreCase(property)) {
+ final HtmlColor color = GridTextBlockDecorated.colors.getColorIfValid(value);
+ if (currentGroup != null) {
+ currentGroup.setColor(color);
+ } else if (currentNetwork() != null) {
+ currentNetwork().setColor(color);
+ }
+ }
+ return CommandExecutionResult.ok();
+ }
+
+ public CommandExecutionResult link() {
+ if (initDone == false) {
+ return error();
+ }
+ return CommandExecutionResult.ok();
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/project2/PSystemProjectFactory2.java b/src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java
index 8050332..3dee33b 100644
--- a/src/net/sourceforge/plantuml/project2/PSystemProjectFactory2.java
+++ b/src/net/sourceforge/plantuml/nwdiag/NwDiagramFactory.java
@@ -33,40 +33,35 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.nwdiag;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.command.Command;
-import net.sourceforge.plantuml.command.CommandComment;
-import net.sourceforge.plantuml.command.CommandMultilinesComment;
-import net.sourceforge.plantuml.command.CommandNope;
import net.sourceforge.plantuml.command.UmlDiagramFactory;
-import net.sourceforge.plantuml.core.DiagramType;
-import net.sourceforge.plantuml.project2.command.CommandAffectation;
-import net.sourceforge.plantuml.project2.command.CommandCloseWeekDay;
-public class PSystemProjectFactory2 extends UmlDiagramFactory {
+public class NwDiagramFactory extends UmlDiagramFactory {
- public PSystemProjectFactory2() {
- super(DiagramType.PROJECT);
+ @Override
+ public NwDiagram createEmptyDiagram() {
+ return new NwDiagram();
}
@Override
protected List<Command> createCommands() {
+
final List<Command> cmds = new ArrayList<Command>();
- cmds.add(new CommandNope());
-// cmds.add(new CommandComment());
-// cmds.add(new CommandMultilinesComment());
- cmds.add(new CommandAffectation());
- cmds.add(new CommandCloseWeekDay());
+ addCommonCommands(cmds);
+ cmds.add(new CommandNwDiagInit());
+ cmds.add(new CommandComment());
+ cmds.add(new CommandElement());
+ cmds.add(new CommandGroup());
+ cmds.add(new CommandNetwork());
+ cmds.add(new CommandLink());
+ cmds.add(new CommandProperty());
+ cmds.add(new CommandEndSomething());
return cmds;
}
- @Override
- public PSystemProject2 createEmptyDiagram() {
- return new PSystemProject2();
- }
-
}
diff --git a/src/net/sourceforge/plantuml/png/PngIOMetadata.java b/src/net/sourceforge/plantuml/png/PngIOMetadata.java
index 6d2dcb1..6ac90af 100644
--- a/src/net/sourceforge/plantuml/png/PngIOMetadata.java
+++ b/src/net/sourceforge/plantuml/png/PngIOMetadata.java
@@ -79,9 +79,17 @@ public class PngIOMetadata {
}
if (metadata != null) {
- pngMetadata.zTXt_keyword.add("plantuml");
- pngMetadata.zTXt_compressionMethod.add(new Integer(0));
- pngMetadata.zTXt_text.add(metadata);
+ // pngMetadata.zTXt_keyword.add("plantuml");
+ // pngMetadata.zTXt_compressionMethod.add(new Integer(0));
+ // pngMetadata.zTXt_text.add(metadata);
+
+ pngMetadata.iTXt_compressionFlag.add(new Boolean(true));
+ pngMetadata.iTXt_compressionMethod.add(new Integer(0));
+ pngMetadata.iTXt_keyword.add("plantuml");
+ pngMetadata.iTXt_languageTag.add("");
+ pngMetadata.iTXt_text.add(metadata);
+ pngMetadata.iTXt_translatedKeyword.add("");
+
}
if (debugData != null) {
diff --git a/src/net/sourceforge/plantuml/posimo/data.txt b/src/net/sourceforge/plantuml/posimo/data.txt
new file mode 100644
index 0000000..2fe8aec
--- /dev/null
+++ b/src/net/sourceforge/plantuml/posimo/data.txt
@@ -0,0 +1,38 @@
+@startuml
+interface Positionable {
+ + Dimension2D getSize();
+ + Point2D getPosition();
+}
+
+interface Clusterable {
+ +Cluster getParent();
+}
+
+Positionable <|-- Clusterable
+
+class Cluster
+
+Cluster *-- Cluster : subclusters
+Clusterable <|.. Cluster
+Cluster *-- Block
+Clusterable <|.. Block
+
+Path *-- "2" Cluster
+Path --> Label : has one
+Positionable <|-- Label
+
+SimpleDrawer --> Cluster
+SimpleDrawer *--> Path
+
+class GraphvizSolver {
+ + Dimension2D solve(Cluster root, Collection<Path> paths)
+}
+GraphvizSolver --> Cluster
+GraphvizSolver *--> Path
+
+
+'Clusterable --> Cluster : Parent
+
+
+
+@enduml
diff --git a/src/net/sourceforge/plantuml/preproc/Define.java b/src/net/sourceforge/plantuml/preproc/Define.java
index 02fe96a..96863fb 100644
--- a/src/net/sourceforge/plantuml/preproc/Define.java
+++ b/src/net/sourceforge/plantuml/preproc/Define.java
@@ -38,6 +38,7 @@ package net.sourceforge.plantuml.preproc;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import net.sourceforge.plantuml.BackSlash;
@@ -47,6 +48,7 @@ public class Define {
private final String definition;
private final String definitionQuoted;
private final boolean emptyParentheses;
+ private Pattern pattern;
public Define(String key, List<String> lines, boolean emptyParentheses) {
this.emptyParentheses = emptyParentheses;
@@ -65,6 +67,7 @@ public class Define {
this.definitionQuoted = Matcher.quoteReplacement(definition);
}
this.signature = new DefineSignature(key, this.definitionQuoted);
+
}
@Override
@@ -76,17 +79,44 @@ public class Define {
if (definition == null) {
return line;
}
+ // if (getFunctionName().indexOf('_') >= 0 && line.indexOf('_') == -1) {
+ // return line;
+ // }
+ if (/* line.length() < getFunctionName().length() || */line.contains(getFunctionName()) == false) {
+ return line;
+ }
if (signature.isMethod()) {
- for (Variables vars : signature.getVariationVariables()) {
- line = vars.applyOn(line);
+ if (line.indexOf('(') == -1) {
+ return line;
}
+ line = apply1(line);
} else {
+ line = apply2(line);
+ }
+ return line;
+ }
+
+ private String apply2(String line) {
+ if (pattern == null) {
final String regex = "\\b" + signature.getKey() + "\\b" + (emptyParentheses ? "(\\(\\))?" : "");
- line = BackSlash.translateBackSlashes(line);
- line = line.replaceAll(regex, definitionQuoted);
- line = BackSlash.untranslateBackSlashes(line);
+ pattern = Pattern.compile(regex);
}
+
+ line = BackSlash.translateBackSlashes(line);
+ line = pattern.matcher(line).replaceAll(definitionQuoted);
+ line = BackSlash.untranslateBackSlashes(line);
return line;
}
+ private String apply1(String line) {
+ for (Variables vars : signature.getVariationVariables()) {
+ line = vars.applyOn(line);
+ }
+ return line;
+ }
+
+ public final String getFunctionName() {
+ return signature.getFonctionName();
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/preproc/DefineSignature.java b/src/net/sourceforge/plantuml/preproc/DefineSignature.java
index 6952810..8fd7249 100644
--- a/src/net/sourceforge/plantuml/preproc/DefineSignature.java
+++ b/src/net/sourceforge/plantuml/preproc/DefineSignature.java
@@ -45,9 +45,11 @@ public class DefineSignature {
private final String key;
private final String fonctionName;
private final List<Variables> variables = new ArrayList<Variables>();
+ private final boolean isMethod;
public DefineSignature(String key, String definitionQuoted) {
this.key = key;
+ this.isMethod = key.contains("(");
final StringTokenizer st = new StringTokenizer(key, "(),");
this.fonctionName = st.nextToken().trim();
@@ -70,7 +72,7 @@ public class DefineSignature {
}
public boolean isMethod() {
- return key.contains("(");
+ return isMethod;
}
public String getKey() {
@@ -81,4 +83,8 @@ public class DefineSignature {
return Collections.unmodifiableList(variables);
}
+ public final String getFonctionName() {
+ return fonctionName;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/preproc/Defines.java b/src/net/sourceforge/plantuml/preproc/Defines.java
index 6fbe902..06611b5 100644
--- a/src/net/sourceforge/plantuml/preproc/Defines.java
+++ b/src/net/sourceforge/plantuml/preproc/Defines.java
@@ -37,11 +37,15 @@ package net.sourceforge.plantuml.preproc;
import java.io.File;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Date;
+import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -63,7 +67,7 @@ public class Defines implements Truth {
@Override
public String toString() {
- return values.keySet().toString();
+ return values.keySet().toString() + " " + environment.keySet();
}
public static Defines createEmpty() {
@@ -80,6 +84,7 @@ public class Defines implements Truth {
public void importFrom(Defines other) {
this.environment.putAll(other.environment);
this.values.putAll(other.values);
+ magic = null;
}
public Defines cloneMe() {
@@ -111,6 +116,7 @@ public class Defines implements Truth {
public void define(String name, List<String> value, boolean emptyParentheses) {
values.put(name, new Define(name, value, emptyParentheses));
+ magic = null;
}
public boolean isDefine(String expression) {
@@ -134,16 +140,67 @@ public class Defines implements Truth {
public void undefine(String name) {
values.remove(name);
+ magic = null;
}
public List<String> applyDefines(String line) {
+ // System.err.println("line=" + line + " " + values.size());
line = manageDate(line);
line = manageEnvironment(line);
- for (Map.Entry<String, Define> ent : values.entrySet()) {
- final Define def = ent.getValue();
+ line = method1(line);
+ // line = values.size() < 10 ? method1(line) : method2(line);
+ return Arrays.asList(line.split("\n"));
+ }
+
+ private String method1(String line) {
+ for (Define def : values.values()) {
line = def.apply(line);
}
- return Arrays.asList(line.split("\n"));
+ return line;
+ }
+
+ private Map<String, Collection<Define>> getAll() {
+ final Map<String, Collection<Define>> result = new LinkedHashMap<String, Collection<Define>>();
+ for (Define def : values.values()) {
+ Collection<Define> tmp = result.get(def.getFunctionName());
+ if (tmp == null) {
+ tmp = new ArrayList<Define>();
+ result.put(def.getFunctionName(), tmp);
+ }
+ tmp.add(def);
+ }
+ return result;
+ }
+
+ private Map<String, Collection<Define>> magic;
+
+ private String method2(String line) {
+ final Set<String> words = words(line);
+ if (magic == null) {
+ magic = getAll();
+
+ }
+ for (String w : words) {
+ Collection<Define> tmp = magic.get(w);
+ if (tmp == null) {
+ continue;
+ }
+ for (Define def : tmp) {
+ line = def.apply(line);
+ }
+ }
+ return line;
+ }
+
+ private Set<String> words(String line) {
+ final String ID = "[A-Za-z_][A-Za-z_0-9]*";
+ Pattern p = Pattern.compile(ID);
+ Matcher m = p.matcher(line);
+ final Set<String> words = new HashSet<String>();
+ while (m.find()) {
+ words.add(m.group(0));
+ }
+ return words;
}
private String manageEnvironment(String line) {
@@ -176,18 +233,15 @@ public class Defines implements Truth {
return line;
}
- public void saveState() {
- if (savedState.size() > 0) {
- throw new IllegalStateException();
- }
+ public void saveState1() {
this.savedState.putAll(values);
}
- public void restoreState() {
+ public void restoreState1() {
this.values.clear();
this.values.putAll(savedState);
-
+ magic = null;
}
}
diff --git a/src/net/sourceforge/plantuml/project2/ValueInt.java b/src/net/sourceforge/plantuml/preproc/DefinesGet.java
index 30ac5d2..7b2f3bc 100644
--- a/src/net/sourceforge/plantuml/project2/ValueInt.java
+++ b/src/net/sourceforge/plantuml/preproc/DefinesGet.java
@@ -33,23 +33,26 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.preproc;
-public class ValueInt implements Value {
+public class DefinesGet {
- private final int value;
+ private final Defines defines;
- public ValueInt(int value) {
- this.value = value;
+ public DefinesGet(Defines defines) {
+ this.defines = defines;
}
- public final int getValue() {
- return value;
+ public final Defines get() {
+ return defines;
}
- public Value plus(Value other) {
- final ValueInt other2 = (ValueInt) other;
- return new ValueInt(value + other2.value);
+ public void saveState() {
+ this.defines.saveState1();
+ }
+
+ public void restoreState() {
+ this.defines.restoreState1();
}
}
diff --git a/src/net/sourceforge/plantuml/preproc/FileWithSuffix.java b/src/net/sourceforge/plantuml/preproc/FileWithSuffix.java
index cd617bf..1087774 100644
--- a/src/net/sourceforge/plantuml/preproc/FileWithSuffix.java
+++ b/src/net/sourceforge/plantuml/preproc/FileWithSuffix.java
@@ -37,28 +37,128 @@
package net.sourceforge.plantuml.preproc;
import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
import java.util.HashSet;
import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import net.sourceforge.plantuml.AFile;
+import net.sourceforge.plantuml.AFileRegular;
+import net.sourceforge.plantuml.AParentFolder;
+import net.sourceforge.plantuml.Log;
public class FileWithSuffix {
- private final File file;
+ private final AFile file;
private final String suffix;
+ private final String entry;
+ private final String description;
+
+ public Reader getReader(String charset) throws IOException {
+ if (entry == null) {
+ if (charset == null) {
+ Log.info("Using default charset");
+ return new InputStreamReader(file.open());
+ }
+ Log.info("Using charset " + charset);
+ return new InputStreamReader(file.open(), charset);
+ }
+ final InputStream is = getDataFromZip(file.open(), entry);
+ if (is == null) {
+ return null;
+ }
+ if (charset == null) {
+ Log.info("Using default charset");
+ return new InputStreamReader(is);
+ }
+ Log.info("Using charset " + charset);
+ return new InputStreamReader(is, charset);
+ }
+
+ private InputStream getDataFromZip(InputStream is, String name) throws IOException {
+ final ZipInputStream zis = new ZipInputStream(is);
+ ZipEntry ze = zis.getNextEntry();
+
+ while (ze != null) {
+ final String fileName = ze.getName();
+ if (ze.isDirectory()) {
+ } else if (fileName.equals(name)) {
+ return zis;
+ }
+ ze = zis.getNextEntry();
+ }
+ zis.closeEntry();
+ zis.close();
+ return null;
+ }
+
+ public boolean fileOk() {
+ return file != null && file.isOk();
+ }
+
+ FileWithSuffix(File file, String suffix) {
+ this.file = new AFileRegular(file);
+ this.suffix = suffix;
+ this.entry = null;
+ // this.description = file.getAbsolutePath();
+ this.description = getFileName(file);
+ }
+
+ public static String getFileName(File file) {
+ return file.getName();
+ }
+
+ public static String getAbsolutePath(File file) {
+ return file.getAbsolutePath();
+ }
- public FileWithSuffix(File file, String suffix) {
- this.file = file;
+ public FileWithSuffix(ImportedFiles importedFiles, String fileName, String suffix) throws IOException {
+ final int idx = fileName.indexOf('~');
this.suffix = suffix;
+ if (idx == -1) {
+ this.file = importedFiles.getAFile(fileName);
+ this.entry = null;
+ } else {
+ this.file = importedFiles.getAFile(fileName.substring(0, idx));
+ this.entry = fileName.substring(idx + 1);
+ }
+
+ if (file == null) {
+ this.description = fileName;
+ } else if (entry == null) {
+ // this.description = file.getAbsolutePath();
+ this.description = fileName;
+ } else {
+ // this.description = file.getAbsolutePath() + "~" + entry;
+ this.description = fileName;
+ }
+
}
@Override
public int hashCode() {
- return file.hashCode() + (suffix == null ? 0 : suffix.hashCode() * 43);
+ return (file == null ? 0 : file.hashCode()) + (suffix == null ? 0 : suffix.hashCode() * 43)
+ + (entry == null ? 0 : entry.hashCode());
}
@Override
public boolean equals(Object arg) {
final FileWithSuffix other = (FileWithSuffix) arg;
- return this.file.equals(other.file) && equals(suffix, other.suffix);
+ return this.file.equals(other.file) && equals(suffix, other.suffix) && same(entry, other.entry);
+ }
+
+ private static boolean same(String s1, String s2) {
+ if (s1 == null && s2 == null) {
+ return true;
+ }
+ if (s1 != null && s2 != null) {
+ return s1.equals(s2);
+ }
+ return false;
}
private static boolean equals(String s1, String s2) {
@@ -75,9 +175,23 @@ public class FileWithSuffix {
public static Set<File> convert(Set<FileWithSuffix> all) {
final Set<File> result = new HashSet<File>();
for (FileWithSuffix f : all) {
- result.add(f.file);
+ result.add(f.file.getUnderlyingFile());
}
return result;
}
+ public AParentFolder getParentFile() {
+ Log.info("Getting parent of " + file);
+ Log.info("-->The parent is " + file.getParentFile());
+ return file.getParentFile();
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public final String getSuffix() {
+ return suffix;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/preproc/IfManager.java b/src/net/sourceforge/plantuml/preproc/IfManager.java
index dd38d19..21e4c0e 100644
--- a/src/net/sourceforge/plantuml/preproc/IfManager.java
+++ b/src/net/sourceforge/plantuml/preproc/IfManager.java
@@ -43,7 +43,7 @@ import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
import net.sourceforge.plantuml.version.Version;
-class IfManager extends ReadLineInstrumented implements ReadLine {
+public class IfManager extends ReadLineInstrumented implements ReadLine {
protected static final Pattern2 ifdefPattern = MyPattern.cmpile("^[%s]*!if(n)?def[%s]+(.+)$");
protected static final Pattern2 ifcomparePattern = MyPattern
@@ -51,12 +51,12 @@ class IfManager extends ReadLineInstrumented implements ReadLine {
protected static final Pattern2 elsePattern = MyPattern.cmpile("^[%s]*!else[%s]*$");
protected static final Pattern2 endifPattern = MyPattern.cmpile("^[%s]*!endif[%s]*$");
- private final Defines defines;
+ private final DefinesGet defines;
private final ReadLine source;
private IfManager child;
- public IfManager(ReadLine source, Defines defines) {
+ public IfManager(ReadLine source, DefinesGet defines) {
this.defines = defines;
this.source = source;
}
@@ -96,7 +96,7 @@ class IfManager extends ReadLineInstrumented implements ReadLine {
m = ifdefPattern.matcher(s);
if (m.find()) {
- boolean ok = defines.isDefine(m.group(2));
+ boolean ok = defines.get().isDefine(m.group(2));
if (m.group(1) != null) {
ok = !ok;
}
diff --git a/src/net/sourceforge/plantuml/preproc/ReadLineConcat.java b/src/net/sourceforge/plantuml/preproc/IfManagerFilter.java
index 4ebfa0a..1d4a7c7 100644
--- a/src/net/sourceforge/plantuml/preproc/ReadLineConcat.java
+++ b/src/net/sourceforge/plantuml/preproc/IfManagerFilter.java
@@ -38,35 +38,29 @@ package net.sourceforge.plantuml.preproc;
import java.io.IOException;
import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.preproc2.ReadFilter;
-public class ReadLineConcat implements ReadLine {
+public class IfManagerFilter implements ReadFilter {
- private ReadLine file1;
- final private ReadLine file2;
+ private final DefinesGet defines;
- public ReadLineConcat(ReadLine file1, ReadLine file2) {
- this.file1 = file1;
- this.file2 = file2;
+ public IfManagerFilter(DefinesGet defines) {
+ this.defines = defines;
}
- public void close() throws IOException {
- if (file1 != null) {
- throw new IllegalStateException();
- }
- file2.close();
- }
+ public ReadLine applyFilter(final ReadLine source) {
+ return new ReadLine() {
+
+ final IfManager ifManager = new IfManager(source, defines);
+
+ public void close() throws IOException {
+ source.close();
+ }
- public CharSequence2 readLine() throws IOException {
- CharSequence2 result = null;
- if (file1 != null) {
- result = file1.readLine();
- if (result == null) {
- file1.close();
- file1 = null;
+ public CharSequence2 readLine() throws IOException {
+ return ifManager.readLine();
}
- return readLine();
- }
- return file2.readLine();
+ };
}
}
diff --git a/src/net/sourceforge/plantuml/preproc/IfManagerNegatif.java b/src/net/sourceforge/plantuml/preproc/IfManagerNegatif.java
index 9d42c4c..0cae937 100644
--- a/src/net/sourceforge/plantuml/preproc/IfManagerNegatif.java
+++ b/src/net/sourceforge/plantuml/preproc/IfManagerNegatif.java
@@ -44,7 +44,7 @@ class IfManagerNegatif extends IfManager {
private boolean skippingDone = false;
- public IfManagerNegatif(ReadLine source, Defines defines) {
+ public IfManagerNegatif(ReadLine source, DefinesGet defines) {
super(source, defines);
}
diff --git a/src/net/sourceforge/plantuml/preproc/IfManagerPositif.java b/src/net/sourceforge/plantuml/preproc/IfManagerPositif.java
index d1102cd..e4f3f3a 100644
--- a/src/net/sourceforge/plantuml/preproc/IfManagerPositif.java
+++ b/src/net/sourceforge/plantuml/preproc/IfManagerPositif.java
@@ -42,7 +42,7 @@ import net.sourceforge.plantuml.command.regex.Matcher2;
class IfManagerPositif extends IfManager {
- public IfManagerPositif(ReadLine source, Defines defines) {
+ public IfManagerPositif(ReadLine source, DefinesGet defines) {
super(source, defines);
}
diff --git a/src/net/sourceforge/plantuml/preproc/ImportedFiles.java b/src/net/sourceforge/plantuml/preproc/ImportedFiles.java
new file mode 100644
index 0000000..cd621c0
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc/ImportedFiles.java
@@ -0,0 +1,126 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ * Modified by: Nicolas Jouanin
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import net.sourceforge.plantuml.AFile;
+import net.sourceforge.plantuml.AFileRegular;
+import net.sourceforge.plantuml.AFileZipEntry;
+import net.sourceforge.plantuml.AParentFolder;
+import net.sourceforge.plantuml.FileSystem;
+import net.sourceforge.plantuml.Log;
+
+public class ImportedFiles {
+
+ private final List<File> imported;
+ private final AParentFolder currentDir;
+
+ private ImportedFiles(List<File> imported, AParentFolder currentDir) {
+ this.imported = imported;
+ this.currentDir = currentDir;
+ }
+
+ public ImportedFiles withCurrentDir(AParentFolder newCurrentDir) {
+ if (newCurrentDir == null) {
+ return this;
+ }
+ return new ImportedFiles(imported, newCurrentDir);
+ }
+
+ public static ImportedFiles createImportedFiles(AParentFolder newCurrentDir) {
+ return new ImportedFiles(new ArrayList<File>(), newCurrentDir);
+ }
+
+ @Override
+ public String toString() {
+ return "ImportedFiles=" + imported + " currentDir=" + currentDir;
+ }
+
+ public AFile getAFile(String nameOrPath) throws IOException {
+ Log.info("ImportedFiles::getAFile nameOrPath = " + nameOrPath);
+ Log.info("ImportedFiles::getAFile currentDir = " + currentDir);
+ final AParentFolder dir = currentDir;
+ if (dir == null || isAbsolute(nameOrPath)) {
+ return new AFileRegular(new File(nameOrPath).getCanonicalFile());
+ }
+ // final File filecurrent = new File(dir.getAbsoluteFile(), nameOrPath);
+ final AFile filecurrent = dir.getAFile(nameOrPath);
+ Log.info("ImportedFiles::getAFile filecurrent = " + filecurrent);
+ if (filecurrent != null && filecurrent.isOk()) {
+ return filecurrent;
+ }
+ for (File d : getPath()) {
+ if (d.isDirectory()) {
+ final File file = new File(d, nameOrPath);
+ if (file.exists()) {
+ return new AFileRegular(file.getCanonicalFile());
+ }
+ } else if (d.isFile()) {
+ final AFileZipEntry zipEntry = new AFileZipEntry(d, nameOrPath);
+ if (zipEntry.isOk()) {
+ return zipEntry;
+ }
+ }
+ }
+ return filecurrent;
+ }
+
+ public List<File> getPath() {
+ final List<File> result = new ArrayList<File>(imported);
+ result.addAll(FileSystem.getPath("plantuml.include.path", true));
+ result.addAll(FileSystem.getPath("java.class.path", true));
+ return result;
+ }
+
+ private boolean isAbsolute(String nameOrPath) {
+ final File f = new File(nameOrPath);
+ return f.isAbsolute();
+ }
+
+ public void add(File file) {
+ this.imported.add(file);
+ }
+
+ public AParentFolder getCurrentDir() {
+ return currentDir;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/preproc/Preprocessor.java b/src/net/sourceforge/plantuml/preproc/Preprocessor.java
deleted file mode 100644
index 1a2e242..0000000
--- a/src/net/sourceforge/plantuml/preproc/Preprocessor.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.preproc;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import net.sourceforge.plantuml.CharSequence2;
-import net.sourceforge.plantuml.DefinitionsContainer;
-import net.sourceforge.plantuml.Log;
-
-public class Preprocessor extends ReadLineInstrumented implements ReadLine {
-
- private final PreprocessorInclude include;
- private final SubPreprocessor subPreprocessor;
- private final String description;
-
- public Sub getSub(String blocname) {
- return subPreprocessor.getSub(blocname);
- }
-
- // public Preprocessor(List<String> config, ReadLine reader, String charset, Defines defines, File newCurrentDir,
- // DefinitionsContainer definitionsContainer) {
- //
- // final ReadLine source2 = new IfManager(reader, defines);
- // final ReadLineInsertable source3 = new ReadLineInsertable(source2);
- // final ReadLine source4 = new PreprocessorDefine(defines, source3);
- // this.include = new PreprocessorInclude(config, source4, defines, charset, newCurrentDir, definitionsContainer);
- // this.subPreprocessor = new SubPreprocessor(config, charset, defines, definitionsContainer, include);
- // }
-
- public Preprocessor(List<String> config, ReadLine reader, String charset, Defines defines, File newCurrentDir,
- DefinitionsContainer definitionsContainer) {
- this.description = reader.toString();
- this.include = new PreprocessorInclude(config, reader, defines, charset, newCurrentDir, definitionsContainer);
- final ReadLine source2 = new IfManager(include, defines);
- final ReadLineInsertable source3 = new ReadLineInsertable(source2);
- final ReadLine source4 = new PreprocessorDefine(defines, source3);
- this.subPreprocessor = new SubPreprocessor(config, charset, defines, definitionsContainer, source4);
- }
-
- @Override
- CharSequence2 readLineInst() throws IOException {
- return subPreprocessor.readLine();
- }
-
- public int getLineNumber() {
- return include.getLineNumber();
- }
-
- @Override
- void closeInst() throws IOException {
- // Log.info("Closing preprocessor of " + description);
- include.close();
- subPreprocessor.close();
- }
-
- public Set<FileWithSuffix> getFilesUsed() {
- return Collections.unmodifiableSet(include.getFilesUsedGlobal());
- }
-
-} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/preproc/PreprocessorInclude.java b/src/net/sourceforge/plantuml/preproc/PreprocessorInclude.java
deleted file mode 100644
index bf542c7..0000000
--- a/src/net/sourceforge/plantuml/preproc/PreprocessorInclude.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- * Modified by: Nicolas Jouanin
- *
- *
- */
-package net.sourceforge.plantuml.preproc;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import net.sourceforge.plantuml.CharSequence2;
-import net.sourceforge.plantuml.DefinitionsContainer;
-import net.sourceforge.plantuml.FileSystem;
-import net.sourceforge.plantuml.Log;
-import net.sourceforge.plantuml.OptionFlags;
-import net.sourceforge.plantuml.StringUtils;
-import net.sourceforge.plantuml.command.regex.Matcher2;
-import net.sourceforge.plantuml.command.regex.MyPattern;
-import net.sourceforge.plantuml.command.regex.Pattern2;
-import net.sourceforge.plantuml.utils.StartUtils;
-
-public class PreprocessorInclude extends ReadLineInstrumented implements ReadLine {
-
- private static final Pattern2 includeDefPattern = MyPattern.cmpile("^[%s]*!includedef[%s]+[%g]?([^%g]+)[%g]?$");
- private static final Pattern2 includePattern = MyPattern.cmpile("^[%s]*!include[%s]+[%g]?([^%g]+)[%g]?$");
- private static final Pattern2 includePatternStdlib = MyPattern.cmpile("^[%s]*!include[%s]+(\\<[^%g]+\\>)$");
- private static final Pattern2 includeManyPattern = MyPattern.cmpile("^[%s]*!include_many[%s]+[%g]?([^%g]+)[%g]?$");
- private static final Pattern2 includeURLPattern = MyPattern.cmpile("^[%s]*!includeurl[%s]+[%g]?([^%g]+)[%g]?$");
-
- private final ReadLine reader2;
- private final String charset;
- private final Defines defines;
- private final List<String> config;
- private final DefinitionsContainer definitionsContainer;
-
- private int numLine = 0;
-
- private PreprocessorInclude included = null;
-
- private final File oldCurrentDir;
- private final Set<FileWithSuffix> filesUsedCurrent;
- private final Set<FileWithSuffix> filesUsedGlobal;
-
- public PreprocessorInclude(List<String> config, ReadLine reader, Defines defines, String charset,
- File newCurrentDir, DefinitionsContainer definitionsContainer) {
- this(config, reader, defines, charset, newCurrentDir, new HashSet<FileWithSuffix>(),
- new HashSet<FileWithSuffix>(), definitionsContainer);
- }
-
- public Set<FileWithSuffix> getFilesUsedGlobal() {
- return Collections.unmodifiableSet(filesUsedGlobal);
- }
-
- private PreprocessorInclude(List<String> config, ReadLine reader, Defines defines, String charset,
- File newCurrentDir, Set<FileWithSuffix> filesUsedCurrent, Set<FileWithSuffix> filesUsedGlobal,
- DefinitionsContainer definitionsContainer) {
- this.config = config;
- this.defines = defines;
- this.charset = charset;
- this.reader2 = new ReadLineQuoteComment(reader);
- this.definitionsContainer = definitionsContainer;
- this.filesUsedCurrent = filesUsedCurrent;
- this.filesUsedGlobal = filesUsedGlobal;
- if (newCurrentDir == null) {
- oldCurrentDir = null;
- } else {
- oldCurrentDir = FileSystem.getInstance().getCurrentDir();
- FileSystem.getInstance().setCurrentDir(newCurrentDir);
- }
- }
-
- private void restoreCurrentDir() {
- if (oldCurrentDir != null) {
- FileSystem.getInstance().setCurrentDir(oldCurrentDir);
- }
- }
-
- @Override
- CharSequence2 readLineInst() throws IOException {
- final CharSequence2 result = readLineInternal();
- if (result != null && StartUtils.isArobaseStartDiagram(result) && config.size() > 0) {
- final List<String> empty = new ArrayList<String>();
- included = new PreprocessorInclude(empty, new ReadLineList(config, result.getLocation()), defines, charset,
- null, filesUsedCurrent, filesUsedGlobal, definitionsContainer);
- }
- if (result != null && (StartUtils.isArobaseEndDiagram(result) || StartUtils.isArobaseStartDiagram(result))) {
- // http://plantuml.sourceforge.net/qa/?qa=3389/error-generating-when-same-file-included-different-diagram
- filesUsedCurrent.clear();
- }
- return result;
- }
-
- private CharSequence2 readLineInternal() throws IOException {
- if (included != null) {
- final CharSequence2 s = included.readLine();
- if (s != null) {
- return s;
- }
- included.close();
- included = null;
- }
-
- final CharSequence2 s = reader2.readLine();
- numLine++;
- if (s == null) {
- return null;
- }
- if (OptionFlags.ALLOW_INCLUDE) {
- assert included == null;
- final Matcher2 m1 = includePattern.matcher(s);
- if (m1.find()) {
- return manageFileInclude(s, m1, false);
- }
- final Matcher2 m2 = includeManyPattern.matcher(s);
- if (m2.find()) {
- return manageFileInclude(s, m2, true);
- }
- final Matcher2 m3 = includeDefPattern.matcher(s);
- if (m3.find()) {
- return manageDefinitionInclude(s, m3);
- }
- } else {
- final Matcher2 m1 = includePatternStdlib.matcher(s);
- if (m1.find()) {
- return manageFileInclude(s, m1, false);
- }
- }
- final Matcher2 mUrl = includeURLPattern.matcher(s);
- if (s.getPreprocessorError() == null && mUrl.find()) {
- return manageUrlInclude(s, mUrl);
- }
- return s;
- }
-
- private CharSequence2 manageUrlInclude(CharSequence2 s, Matcher2 m) throws IOException {
- String urlString = m.group(1);
- urlString = defines.applyDefines(urlString).get(0);
- //
- final int idx = urlString.lastIndexOf('!');
- String suf = null;
- if (idx != -1) {
- suf = urlString.substring(idx + 1);
- urlString = urlString.substring(0, idx);
- }
- try {
- final URL url = new URL(urlString);
- included = new PreprocessorInclude(config, getReaderInclude(s, url, suf), defines, charset, null,
- filesUsedCurrent, filesUsedGlobal, definitionsContainer);
- } catch (MalformedURLException e) {
- return s.withErrorPreprocessor("Cannot include url " + urlString);
- }
- return this.readLine();
- }
-
- private CharSequence2 manageDefinitionInclude(CharSequence2 s, Matcher2 matcher) throws IOException {
- final String definitionName = matcher.group(1);
- final List<? extends CharSequence> definition = definitionsContainer.getDefinition(definitionName);
- included = new PreprocessorInclude(config, new ReadLineList(definition, s.getLocation()), defines, charset,
- null, filesUsedCurrent, filesUsedGlobal, definitionsContainer);
- return this.readLine();
- }
-
- private CharSequence2 manageFileInclude(CharSequence2 s, Matcher2 matcher, boolean allowMany) throws IOException {
- String fileName = matcher.group(1);
- fileName = defines.applyDefines(fileName).get(0);
- if (fileName.startsWith("<") && fileName.endsWith(">")) {
- final ReadLine strlibReader = getReaderStdlibInclude(s, fileName.substring(1, fileName.length() - 1));
- if (strlibReader == null) {
- return s.withErrorPreprocessor("Cannot include " + fileName);
- }
- included = new PreprocessorInclude(config, strlibReader, defines, charset, null, filesUsedCurrent,
- filesUsedGlobal, definitionsContainer);
- return this.readLine();
- }
- final int idx = fileName.lastIndexOf('!');
- String suf = null;
- if (idx != -1) {
- suf = fileName.substring(idx + 1);
- fileName = fileName.substring(0, idx);
- }
- final File f = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName));
- final FileWithSuffix f2 = new FileWithSuffix(f, suf);
- if (f.exists() == false || f.isDirectory()) {
- return s.withErrorPreprocessor("Cannot include " + f.getAbsolutePath());
- } else if (allowMany == false && filesUsedCurrent.contains(f2)) {
- // return CharSequence2Impl.errorPreprocessor("File already included " + f.getAbsolutePath(), lineLocation);
- return this.readLine();
- }
- filesUsedCurrent.add(f2);
- filesUsedGlobal.add(f2);
- included = new PreprocessorInclude(config, getReaderInclude(s, f, suf), defines, charset, f.getParentFile(),
- filesUsedCurrent, filesUsedGlobal, definitionsContainer);
- return this.readLine();
- }
-
- static String withEnvironmentVariable(String s) {
- final Pattern p = Pattern.compile("%(\\w+)%");
-
- final Matcher m = p.matcher(s);
- final StringBuffer sb = new StringBuffer();
- while (m.find()) {
- final String var = m.group(1);
- final String value = getenv(var);
- if (value != null) {
- m.appendReplacement(sb, Matcher.quoteReplacement(value));
- }
- }
- m.appendTail(sb);
- s = sb.toString();
- return s;
- }
-
- public static String getenv(String var) {
- final String env = System.getProperty(var);
- if (StringUtils.isNotEmpty(env)) {
- return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(env);
- }
- final String getenv = System.getenv(var);
- if (StringUtils.isNotEmpty(getenv)) {
- return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(getenv);
- }
- return null;
- }
-
- private InputStream getStdlibInputStream(String filename) {
- final InputStream result = Stdlib.getResourceAsStream(filename);
- // Log.info("Loading sdlib " + filename + " ok");
- return result;
- }
-
- private ReadLine getReaderStdlibInclude(CharSequence2 s, String filename) {
- Log.info("Loading sdlib " + filename);
- InputStream is = getStdlibInputStream(filename);
- if (is == null) {
- return null;
- }
- final String description = "<" + filename + ">";
- try {
- if (StartDiagramExtractReader.containsStartDiagram(s, is, description)) {
- is = getStdlibInputStream(filename);
- return new StartDiagramExtractReader(s, is, description);
- }
- is = getStdlibInputStream(filename);
- if (is == null) {
- return null;
- }
- return ReadLineReader.create(new InputStreamReader(is), description);
- } catch (IOException e) {
- return new ReadLineSimple(s, e.toString());
- }
- }
-
- private ReadLine getReaderInclude(CharSequence2 s, final File f, String suf) {
- try {
- if (StartDiagramExtractReader.containsStartDiagram(s, f, charset)) {
- return new StartDiagramExtractReader(s, f, suf, charset);
- }
- if (charset == null) {
- Log.info("Using default charset");
- return ReadLineReader.create(new FileReader(f), f.getAbsolutePath(), s.getLocation());
- }
- Log.info("Using charset " + charset);
- return ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset), f.getAbsolutePath(),
- s.getLocation());
- } catch (IOException e) {
- return new ReadLineSimple(s, e.toString());
- }
-
- }
-
- private ReadLine getReaderInclude(CharSequence2 s, final URL url, String suf) {
- try {
- if (StartDiagramExtractReader.containsStartDiagram(s, url, charset)) {
- return new StartDiagramExtractReader(s, url, suf, charset);
- }
- final InputStream is = url.openStream();
- if (charset == null) {
- Log.info("Using default charset");
- return ReadLineReader.create(new InputStreamReader(is), url.toString(), s.getLocation());
- }
- Log.info("Using charset " + charset);
- return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation());
- } catch (IOException e) {
- return new ReadLineSimple(s, e.toString());
- }
-
- }
-
- public int getLineNumber() {
- return numLine;
- }
-
- @Override
- void closeInst() throws IOException {
- restoreCurrentDir();
- reader2.close();
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/preproc/ReadLineEmpty.java b/src/net/sourceforge/plantuml/preproc/ReadLineEmpty.java
new file mode 100644
index 0000000..2395f9e
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc/ReadLineEmpty.java
@@ -0,0 +1,49 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc;
+
+import net.sourceforge.plantuml.CharSequence2;
+
+public class ReadLineEmpty implements ReadLine {
+
+ public void close() {
+ }
+
+ public CharSequence2 readLine() {
+ return null;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/project2/TimeResolution.java b/src/net/sourceforge/plantuml/preproc/ReadLineNumbered.java
index bc73807..c873526 100644
--- a/src/net/sourceforge/plantuml/project2/TimeResolution.java
+++ b/src/net/sourceforge/plantuml/preproc/ReadLineNumbered.java
@@ -33,8 +33,11 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.preproc;
-public enum TimeResolution {
- DAY, WEEK, MONTH, YEAR
+import java.util.Set;
+
+public interface ReadLineNumbered extends ReadLine {
+
+ public Set<FileWithSuffix> getFilesUsed();
}
diff --git a/src/net/sourceforge/plantuml/preproc/ReadLineSingle.java b/src/net/sourceforge/plantuml/preproc/ReadLineSingle.java
new file mode 100644
index 0000000..84be519
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc/ReadLineSingle.java
@@ -0,0 +1,60 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc;
+
+import net.sourceforge.plantuml.CharSequence2;
+
+public class ReadLineSingle implements ReadLine {
+
+ private final CharSequence2 data;
+ private int current = 0;
+
+ public ReadLineSingle(CharSequence2 s2) {
+ this.data = s2;
+ }
+
+ public void close() {
+ }
+
+ public CharSequence2 readLine() {
+ if (current > 0) {
+ return null;
+ }
+ current++;
+ return data;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/preproc/StartDiagramExtractReader.java b/src/net/sourceforge/plantuml/preproc/StartDiagramExtractReader.java
index ceba7f4..e3b08ca 100644
--- a/src/net/sourceforge/plantuml/preproc/StartDiagramExtractReader.java
+++ b/src/net/sourceforge/plantuml/preproc/StartDiagramExtractReader.java
@@ -35,12 +35,10 @@
*/
package net.sourceforge.plantuml.preproc;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.Reader;
import java.net.URL;
import net.sourceforge.plantuml.CharSequence2;
@@ -52,16 +50,16 @@ public class StartDiagramExtractReader implements ReadLine {
private final ReadLine raw;
private boolean finished = false;
- public StartDiagramExtractReader(CharSequence2 s, File f, String uid, String charset) {
- this(getReadLine(s, f, charset), uid);
+ public static StartDiagramExtractReader build(FileWithSuffix f2, CharSequence2 s, String charset) {
+ return new StartDiagramExtractReader(getReadLine(f2, s, charset), f2.getSuffix());
}
- public StartDiagramExtractReader(CharSequence2 s, URL url, String uid, String charset) {
- this(getReadLine(s, url, charset), uid);
+ public static StartDiagramExtractReader build(URL url, CharSequence2 s, String uid, String charset) {
+ return new StartDiagramExtractReader(getReadLine(url, s, charset), uid);
}
- public StartDiagramExtractReader(CharSequence2 s, InputStream is, String desc) {
- this(getReadLine(s, is, desc), null);
+ public static StartDiagramExtractReader build(InputStream is, CharSequence2 s, String desc) {
+ return new StartDiagramExtractReader(getReadLine(is, s, desc), null);
}
private StartDiagramExtractReader(ReadLine raw, String suf) {
@@ -103,25 +101,23 @@ public class StartDiagramExtractReader implements ReadLine {
return false;
}
- private static ReadLine getReadLine(CharSequence2 s, File f, String charset) {
+ private static ReadLine getReadLine(FileWithSuffix f2, CharSequence2 s, String charset) {
try {
- if (charset == null) {
- Log.info("Using default charset");
- return new UncommentReadLine(ReadLineReader.create(new FileReader(f), f.getAbsolutePath()));
+ final Reader tmp1 = f2.getReader(charset);
+ if (tmp1 == null) {
+ return new ReadLineSimple(s, "Cannot open " + f2.getDescription());
}
- Log.info("Using charset " + charset);
- return new UncommentReadLine(ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset),
- f.getAbsolutePath()));
+ return new UncommentReadLine(ReadLineReader.create(tmp1, f2.getDescription()));
} catch (IOException e) {
return new ReadLineSimple(s, e.toString());
}
}
- private static ReadLine getReadLine(CharSequence2 s, InputStream is, String description) {
+ private static ReadLine getReadLine(InputStream is, CharSequence2 s, String description) {
return new UncommentReadLine(ReadLineReader.create(new InputStreamReader(is), description));
}
- private static ReadLine getReadLine(CharSequence2 s, URL url, String charset) {
+ private static ReadLine getReadLine(URL url, CharSequence2 s, String charset) {
try {
if (charset == null) {
Log.info("Using default charset");
@@ -136,18 +132,18 @@ public class StartDiagramExtractReader implements ReadLine {
}
}
- static public boolean containsStartDiagram(CharSequence2 s, File f, String charset) throws IOException {
- final ReadLine r = getReadLine(s, f, charset);
+ static public boolean containsStartDiagram(FileWithSuffix f2, CharSequence2 s, String charset) throws IOException {
+ final ReadLine r = getReadLine(f2, s, charset);
return containsStartDiagram(r);
}
- static public boolean containsStartDiagram(CharSequence2 s, URL url, String charset) throws IOException {
- final ReadLine r = getReadLine(s, url, charset);
+ static public boolean containsStartDiagram(URL url, CharSequence2 s, String charset) throws IOException {
+ final ReadLine r = getReadLine(url, s, charset);
return containsStartDiagram(r);
}
- static public boolean containsStartDiagram(CharSequence2 s, InputStream is, String description) throws IOException {
- final ReadLine r = getReadLine(s, is, description);
+ static public boolean containsStartDiagram(InputStream is, CharSequence2 s, String description) throws IOException {
+ final ReadLine r = getReadLine(is, s, description);
return containsStartDiagram(r);
}
diff --git a/src/net/sourceforge/plantuml/preproc/SubPreprocessor.java b/src/net/sourceforge/plantuml/preproc/SubPreprocessor.java
deleted file mode 100644
index f9030f3..0000000
--- a/src/net/sourceforge/plantuml/preproc/SubPreprocessor.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.preproc;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.sourceforge.plantuml.CharSequence2;
-import net.sourceforge.plantuml.DefinitionsContainer;
-import net.sourceforge.plantuml.FileSystem;
-import net.sourceforge.plantuml.Log;
-import net.sourceforge.plantuml.command.regex.Matcher2;
-import net.sourceforge.plantuml.command.regex.MyPattern;
-import net.sourceforge.plantuml.command.regex.Pattern2;
-
-public class SubPreprocessor extends ReadLineInstrumented implements ReadLine {
-
- private static final String ID = "[A-Za-z_][A-Za-z_0-9]*";
-
- private static final Pattern2 includeSubPattern = MyPattern.cmpile("^[%s]*!includesub[%s]+[%g]?([^%g]+)[%g]?$");
-
- private static final Pattern2 startsub = MyPattern.cmpile("^[%s]*!startsub[%s]+(" + ID + ")");
- private static final Pattern2 endsub = MyPattern.cmpile("^[%s]*!endsub[%s]*");
-
- private final ReadLine source;
- private final Defines defines;
- private final DefinitionsContainer definitionsContainer;
- private final String charset;
- private final Map<String, Sub> subs = new HashMap<String, Sub>();
- private final List<String> config;
- private Sub learningSub;
- private ReadLine includedSub;
-
- public SubPreprocessor(List<String> config, String charset, Defines defines,
- DefinitionsContainer definitionsContainer, ReadLine source) {
- this.config = config;
- this.source = source;
- this.charset = charset;
- this.defines = defines;
- this.definitionsContainer = definitionsContainer;
- }
-
- @Override
- CharSequence2 readLineInst() throws IOException {
- if (includedSub != null) {
- final CharSequence2 s = includedSub.readLine();
- if (s != null) {
- eventuallyLearn(s);
- return s;
- }
- includedSub = null;
- }
-
- final CharSequence2 s = source.readLine();
- if (s == null) {
- return null;
- }
-
- final Matcher2 m1 = includeSubPattern.matcher(s);
- if (m1.find()) {
- return manageIncludeSub(s, m1);
- }
-
- Matcher2 m = startsub.matcher(s);
- if (m.find()) {
- return manageStartsub(m);
- }
-
- m = endsub.matcher(s);
- if (m.find()) {
- return manageEndsub(m);
- }
- eventuallyLearn(s);
- return s;
- }
-
- private void eventuallyLearn(final CharSequence2 s) {
- if (learningSub != null) {
- learningSub.add(s);
- }
- }
-
- private CharSequence2 manageIncludeSub(CharSequence2 s, Matcher2 m) throws IOException {
- final String name = m.group(1);
- final int idx = name.indexOf('!');
- if (idx != -1) {
- final String filename = name.substring(0, idx);
- final String blocname = name.substring(idx + 1);
- final File f = FileSystem.getInstance().getFile(PreprocessorInclude.withEnvironmentVariable(filename));
- if (f.exists() == false || f.isDirectory()) {
- return s.withErrorPreprocessor("Cannot include " + f.getAbsolutePath());
- }
- final Preprocessor data = new Preprocessor(config, getReaderInclude(s, f), charset, defines, null,
- definitionsContainer);
- while (data.readLine() != null) {
- // Read file
- }
- data.close();
- this.includedSub = data.getSub(blocname).getReadLine(s.getLocation());
- } else {
- this.includedSub = getSub(name).getReadLine(s.getLocation());
- }
- return this.readLine();
- }
-
- private ReadLine getReaderInclude(CharSequence2 s, final File f) {
- try {
- if (charset == null) {
- Log.info("Using default charset");
- return ReadLineReader.create(new FileReader(f), f.getAbsolutePath(), s.getLocation());
- }
- Log.info("Using charset " + charset);
- return ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset), f.getAbsolutePath(),
- s.getLocation());
- } catch (IOException e) {
- return new ReadLineSimple(s, e.toString());
- }
-
- }
-
- private CharSequence2 manageStartsub(Matcher2 m) throws IOException {
- final String name = m.group(1);
- this.learningSub = getSub(name);
- return this.readLine();
- }
-
- private CharSequence2 manageEndsub(Matcher2 m) throws IOException {
- this.learningSub = null;
- return this.readLine();
- }
-
- Sub getSub(String name) {
- Sub result = subs.get(name);
- if (result == null) {
- result = new Sub(name);
- subs.put(name, result);
- }
- return result;
- }
-
- @Override
- void closeInst() throws IOException {
- source.close();
- }
-
-} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/preproc2/Preprocessor2.java b/src/net/sourceforge/plantuml/preproc2/Preprocessor2.java
new file mode 100644
index 0000000..9463fef
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc2/Preprocessor2.java
@@ -0,0 +1,97 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc2;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.DefinitionsContainer;
+import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.DefinesGet;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
+import net.sourceforge.plantuml.preproc.IfManagerFilter;
+import net.sourceforge.plantuml.preproc.ImportedFiles;
+import net.sourceforge.plantuml.preproc.ReadLine;
+import net.sourceforge.plantuml.preproc.ReadLineNumbered;
+
+public class Preprocessor2 implements ReadLineNumbered {
+
+ private final ReadLine source;
+ private final PreprocessorInclude3 include;
+
+ public Preprocessor2(List<String> config, ReadLine reader, String charset, Defines defines,
+ DefinitionsContainer definitionsContainer, ImportedFiles importedFiles) throws IOException {
+ this(config, reader, charset, new DefinesGet(defines), definitionsContainer, new HashSet<FileWithSuffix>(),
+ importedFiles);
+ }
+
+ Preprocessor2(List<String> config, ReadLine reader, String charset, DefinesGet defines,
+ DefinitionsContainer definitionsContainer, Set<FileWithSuffix> filesUsedGlobal, ImportedFiles importedFiles)
+ throws IOException {
+ final ReadFilterAnd2 filters = new ReadFilterAnd2();
+ defines.saveState();
+
+ filters.add(new ReadLineQuoteComment2());
+ include = new PreprocessorInclude3(config, charset, defines, definitionsContainer, importedFiles,
+ filesUsedGlobal);
+ filters.add(new ReadLineAddConfig2(config));
+ filters.add(new IfManagerFilter(defines));
+ filters.add(new PreprocessorDefine4Apply(defines));
+ filters.add(new SubPreprocessor2(charset, definitionsContainer));
+ filters.add(new PreprocessorDefine3Learner(defines));
+ filters.add(include);
+
+ this.source = filters.applyFilter(reader);
+ }
+
+ public CharSequence2 readLine() throws IOException {
+ return source.readLine();
+ }
+
+ public void close() throws IOException {
+ this.source.close();
+ }
+
+ public Set<FileWithSuffix> getFilesUsed() {
+ // System.err.println("************************** WARNING **************************");
+ // return Collections.emptySet();
+ return Collections.unmodifiableSet(include.getFilesUsedGlobal());
+ }
+} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/preproc/PreprocessorDefine.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorDefine3Learner.java
index 13de984..9c17bc2 100644
--- a/src/net/sourceforge/plantuml/preproc/PreprocessorDefine.java
+++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorDefine3Learner.java
@@ -33,21 +33,23 @@
*
*
*/
-package net.sourceforge.plantuml.preproc;
+package net.sourceforge.plantuml.preproc2;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.CharSequence2;
-import net.sourceforge.plantuml.CharSequence2Impl;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.command.regex.Matcher2;
import net.sourceforge.plantuml.command.regex.MyPattern;
import net.sourceforge.plantuml.command.regex.Pattern2;
+import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.DefinesGet;
+import net.sourceforge.plantuml.preproc.ReadLine;
import net.sourceforge.plantuml.utils.StartUtils;
-public class PreprocessorDefine extends ReadLineInstrumented implements ReadLine {
+public class PreprocessorDefine3Learner implements ReadFilter {
private static final String END_DEFINE_LONG = "!enddefinelong";
private static final String ID = "[A-Za-z_][A-Za-z_0-9]*";
@@ -60,142 +62,119 @@ public class PreprocessorDefine extends ReadLineInstrumented implements ReadLine
private static final Pattern2 definelongPattern = MyPattern.cmpile("^[%s]*!definelong[%s]+(" + ID + ARG + ")");
private static final Pattern2 enddefinelongPattern = MyPattern.cmpile("^[%s]*" + END_DEFINE_LONG + "[%s]*$");
- private final Defines defines;
+ private final DefinesGet defines;
- private final ReadLineInsertable source;
-
- public PreprocessorDefine(Defines defines, ReadLineInsertable source) {
+ public PreprocessorDefine3Learner(DefinesGet defines) {
this.defines = defines;
- this.defines.saveState();
- this.source = source;
}
- @Override
- CharSequence2 readLineInst() throws IOException {
- final CharSequence2 s = source.readLine();
- if (s == null) {
- return null;
- }
- if (StartUtils.isArobaseStartDiagram(s)) {
- this.defines.restoreState();
- }
-
- Matcher2 m = filenamePattern.matcher(s);
- if (m.find()) {
- return manageFilename(m);
- }
- m = definePattern.matcher(s);
+ public static boolean isLearningLine(CharSequence2 s) {
+ Matcher2 m = definePattern.matcher(s);
if (m.find()) {
- return manageDefine(m, s.toString().trim().endsWith("()"));
+ return true;
}
-
m = definelongPattern.matcher(s);
if (m.find()) {
- return manageDefineLong(m, s.toString().trim().endsWith("()"));
+ return true;
}
-
m = undefPattern.matcher(s);
if (m.find()) {
- return manageUndef(m);
- }
-
- if (ignoreDefineDuringSeveralLines > 0) {
- ignoreDefineDuringSeveralLines--;
- return s;
- }
-
- List<String> result = defines.applyDefines(s.toString2());
- if (result.size() > 1) {
- result = cleanEndDefineLong(result);
- final List<String> inserted = cleanEndDefineLong(result.subList(1, result.size()));
- ignoreDefineDuringSeveralLines = inserted.size();
- source.insert(inserted, s.getLocation());
+ return true;
}
- return new CharSequence2Impl(result.get(0), s.getLocation(), s.getPreprocessorError());
+ return false;
}
- private List<String> cleanEndDefineLong(List<String> data) {
- final List<String> result = new ArrayList<String>();
- for (String s : data) {
- final String clean = cleanEndDefineLong(s);
- if (clean != null) {
- result.add(clean);
- }
- }
- return result;
+ public ReadLine applyFilter(final ReadLine source) {
+ return new ReadLine() {
- }
+ public void close() throws IOException {
+ source.close();
+ }
- private String cleanEndDefineLong(String s) {
- if (s.trim().startsWith(END_DEFINE_LONG)) {
- s = s.trim().substring(END_DEFINE_LONG.length());
- if (s.length() == 0) {
- return null;
+ public CharSequence2 readLine() throws IOException {
+ while (true) {
+ final CharSequence2 s = source.readLine();
+ if (s == null || s.getPreprocessorError() != null) {
+ return s;
+ }
+ if (StartUtils.isArobaseStartDiagram(s)) {
+ defines.restoreState();
+ return s;
+ }
+
+ Matcher2 m = filenamePattern.matcher(s);
+ if (m.find()) {
+ manageFilename(m);
+ continue;
+ }
+ m = definePattern.matcher(s);
+ if (m.find()) {
+ manageDefine(source, m, s.toString().trim().endsWith("()"));
+ continue;
+ }
+ m = definelongPattern.matcher(s);
+ if (m.find()) {
+ manageDefineLong(source, m, s.toString().trim().endsWith("()"));
+ continue;
+ }
+
+ m = undefPattern.matcher(s);
+ if (m.find()) {
+ manageUndef(m);
+ continue;
+ }
+ return s;
+ }
}
- }
- return s;
+ };
}
- private int ignoreDefineDuringSeveralLines = 0;
-
- private CharSequence2 manageUndef(Matcher2 m) throws IOException {
- defines.undefine(m.group(1));
- return this.readLine();
+ private void manageUndef(Matcher2 m) throws IOException {
+ defines.get().undefine(m.group(1));
}
- private CharSequence2 manageDefineLong(Matcher2 m, boolean emptyParentheses) throws IOException {
+ private void manageDefineLong(ReadLine source, Matcher2 m, boolean emptyParentheses) throws IOException {
final String group1 = m.group(1);
final List<String> def = new ArrayList<String>();
while (true) {
- final CharSequence2 read = this.readLine();
+ final CharSequence2 read = source.readLine();
if (read == null) {
- return null;
+ return;
}
if (enddefinelongPattern.matcher(read).find()) {
- defines.define(group1, def, emptyParentheses);
- return this.readLine();
+ defines.get().define(group1, def, emptyParentheses);
+ return;
}
def.add(read.toString2());
}
}
- private CharSequence2 manageFilename(Matcher2 m) throws IOException {
+ private void manageFilename(Matcher2 m) {
final String group1 = m.group(1);
- this.defines.overrideFilename(group1);
- return this.readLine();
+ this.defines.get().overrideFilename(group1);
}
- private CharSequence2 manageDefine(Matcher2 m, boolean emptyParentheses) throws IOException {
+ private void manageDefine(ReadLine source, Matcher2 m, boolean emptyParentheses) throws IOException {
final String group1 = m.group(1);
final String group2 = m.group(2);
if (group2 == null) {
- defines.define(group1, null, emptyParentheses);
+ defines.get().define(group1, null, emptyParentheses);
} else {
- final List<String> strings = defines.applyDefines(group2);
+ final List<String> strings = defines.get().applyDefines(group2);
if (strings.size() > 1) {
- defines.define(group1, strings, emptyParentheses);
+ defines.get().define(group1, strings, emptyParentheses);
} else {
final StringBuilder value = new StringBuilder(strings.get(0));
while (StringUtils.endsWithBackslash(value.toString())) {
value.setLength(value.length() - 1);
- final CharSequence2 read = this.readLine();
+ final CharSequence2 read = source.readLine();
value.append(read.toString2());
}
final List<String> li = new ArrayList<String>();
li.add(value.toString());
- defines.define(group1, li, emptyParentheses);
+ defines.get().define(group1, li, emptyParentheses);
}
}
- return this.readLine();
- }
-
-// public int getLineNumber() {
-// return source.getLineNumber();
-// }
-
- @Override
- void closeInst() throws IOException {
- source.close();
}
} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/preproc2/PreprocessorDefine4Apply.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorDefine4Apply.java
new file mode 100644
index 0000000..f74a265
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorDefine4Apply.java
@@ -0,0 +1,92 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc2;
+
+import java.io.IOException;
+import java.util.List;
+
+import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.CharSequence2Impl;
+import net.sourceforge.plantuml.preproc.DefinesGet;
+import net.sourceforge.plantuml.preproc.ReadLine;
+import net.sourceforge.plantuml.preproc.ReadLineList;
+
+public class PreprocessorDefine4Apply implements ReadFilter {
+
+ private final DefinesGet defines;
+
+ public PreprocessorDefine4Apply(DefinesGet defines) throws IOException {
+ this.defines = defines;
+ }
+
+ public ReadLine applyFilter(final ReadLine source) {
+ return new Inner(source);
+ }
+
+ class Inner extends ReadLineInsertable {
+
+ final ReadLine source;
+
+ Inner(ReadLine source) {
+ this.source = source;
+ }
+
+ @Override
+ void closeInternal() throws IOException {
+ source.close();
+ }
+
+ @Override
+ CharSequence2 readLineInternal() throws IOException {
+ final CharSequence2 s = this.source.readLine();
+ if (s == null || s.getPreprocessorError() != null) {
+ return s;
+ }
+ if (PreprocessorDefine3Learner.isLearningLine(s)) {
+ return s;
+ }
+ final List<String> result = defines.get().applyDefines(s.toString2());
+ if (result.size() > 1) {
+ insert(new ReadLineList(result, s.getLocation()));
+ return readLine();
+ }
+ String tmp = result.get(0);
+ return new CharSequence2Impl(tmp, s.getLocation(), s.getPreprocessorError());
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/preproc2/PreprocessorInclude3.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorInclude3.java
new file mode 100644
index 0000000..a3a0474
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorInclude3.java
@@ -0,0 +1,363 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ * Modified by: Nicolas Jouanin
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc2;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.DefinitionsContainer;
+import net.sourceforge.plantuml.FileSystem;
+import net.sourceforge.plantuml.Log;
+import net.sourceforge.plantuml.OptionFlags;
+import net.sourceforge.plantuml.StringUtils;
+import net.sourceforge.plantuml.command.regex.Matcher2;
+import net.sourceforge.plantuml.command.regex.MyPattern;
+import net.sourceforge.plantuml.command.regex.Pattern2;
+import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.DefinesGet;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
+import net.sourceforge.plantuml.preproc.ImportedFiles;
+import net.sourceforge.plantuml.preproc.ReadLine;
+import net.sourceforge.plantuml.preproc.ReadLineEmpty;
+import net.sourceforge.plantuml.preproc.ReadLineList;
+import net.sourceforge.plantuml.preproc.ReadLineReader;
+import net.sourceforge.plantuml.preproc.ReadLineSimple;
+import net.sourceforge.plantuml.preproc.ReadLineSingle;
+import net.sourceforge.plantuml.preproc.StartDiagramExtractReader;
+import net.sourceforge.plantuml.preproc.Stdlib;
+import net.sourceforge.plantuml.utils.StartUtils;
+
+public class PreprocessorInclude3 implements ReadFilter {
+
+ private static final Pattern2 includeDefPattern = MyPattern.cmpile("^[%s]*!includedef[%s]+[%g]?([^%g]+)[%g]?$");
+
+ private static final Pattern2 includeDefaultStrategy = MyPattern.cmpile("^[%s]*!default_include[%s]+(once|many)$");
+
+ private static final Pattern2 includePattern = MyPattern.cmpile("^[%s]*!include[%s]+[%g]?([^%g]+)[%g]?$");
+ private static final Pattern2 includeManyPattern = MyPattern.cmpile("^[%s]*!include_many[%s]+[%g]?([^%g]+)[%g]?$");
+ private static final Pattern2 includeOncePattern = MyPattern.cmpile("^[%s]*!include_once[%s]+[%g]?([^%g]+)[%g]?$");
+
+ private static final Pattern2 importPattern = MyPattern.cmpile("^[%s]*!import[%s]+[%g]?([^%g]+)[%g]?$");
+ private static final Pattern2 includePatternStdlib = MyPattern.cmpile("^[%s]*!include[%s]+(\\<[^%g]+\\>)$");
+ private static final Pattern2 includeURLPattern = MyPattern.cmpile("^[%s]*!includeurl[%s]+[%g]?([^%g]+)[%g]?$");
+
+ private final String charset;
+ private final DefinesGet defines;
+ private final List<String> config;
+ private final DefinitionsContainer definitionsContainer;
+ private final ImportedFiles importedFiles;
+
+ private final Set<FileWithSuffix> filesUsedCurrent = new HashSet<FileWithSuffix>();
+ private final Set<FileWithSuffix> filesUsedGlobal;
+ private PreprocessorIncludeStrategy strategy = PreprocessorIncludeStrategy.ONCE;
+
+ public PreprocessorInclude3(List<String> config, String charset, DefinesGet defines,
+ DefinitionsContainer definitionsContainer, ImportedFiles importedFiles, Set<FileWithSuffix> filesUsedGlobal) {
+ this.charset = charset;
+ this.config = config;
+ this.defines = defines;
+ this.definitionsContainer = definitionsContainer;
+ this.importedFiles = importedFiles;
+ this.filesUsedGlobal = filesUsedGlobal;
+ }
+
+ public ReadLine applyFilter(ReadLine source) {
+ return new Inner(source);
+ }
+
+ class Inner extends ReadLineInsertable {
+
+ final ReadLine source;
+
+ Inner(ReadLine source) {
+ this.source = source;
+ }
+
+ @Override
+ void closeInternal() throws IOException {
+ source.close();
+ }
+
+ @Override
+ CharSequence2 readLineInternal() throws IOException {
+ final CharSequence2 s = source.readLine();
+ if (s == null || s.getPreprocessorError() != null) {
+ return s;
+ }
+ if (s != null && StartUtils.startOrEnd(s)) {
+ // http://plantuml.sourceforge.net/qa/?qa=3389/error-generating-when-same-file-included-different-diagram
+ filesUsedCurrent.clear();
+ strategy = PreprocessorIncludeStrategy.ONCE;
+ return s;
+ }
+ if (s.getPreprocessorError() == null && OptionFlags.ALLOW_INCLUDE) {
+ final Matcher2 m0 = importPattern.matcher(s);
+ if (m0.find()) {
+ final CharSequence2 err = manageFileImport(s, m0);
+ if (err != null) {
+ insert(new ReadLineSingle(err));
+ }
+ return readLine();
+ }
+ final Matcher2 m1 = includePattern.matcher(s);
+ if (m1.find()) {
+ insert(manageFileInclude(s, m1, strategy));
+ return readLine();
+ }
+ final Matcher2 m2 = includeManyPattern.matcher(s);
+ if (m2.find()) {
+ insert(manageFileInclude(s, m2, PreprocessorIncludeStrategy.MANY));
+ return readLine();
+ }
+ final Matcher2 m3 = includeOncePattern.matcher(s);
+ if (m3.find()) {
+ insert(manageFileInclude(s, m3, PreprocessorIncludeStrategy.ONCE));
+ return readLine();
+ }
+ final Matcher2 m4 = includeDefPattern.matcher(s);
+ if (m4.find()) {
+ insert(manageDefinitionInclude(s, m4));
+ return readLine();
+ }
+ } else {
+ final Matcher2 m1 = includePatternStdlib.matcher(s);
+ if (m1.find()) {
+ insert(manageFileInclude(s, m1, PreprocessorIncludeStrategy.ONCE));
+ return readLine();
+ }
+ }
+ final Matcher2 mUrl = includeURLPattern.matcher(s);
+ if (s.getPreprocessorError() == null && mUrl.find()) {
+ insert(manageUrlInclude(s, mUrl));
+ return readLine();
+ }
+ final Matcher2 m2 = includeDefaultStrategy.matcher(s);
+ if (m2.find()) {
+ strategy = PreprocessorIncludeStrategy.fromString(m2.group(1));
+ return readLine();
+ }
+
+ return s;
+ }
+
+ }
+
+ private CharSequence2 manageFileImport(CharSequence2 s, Matcher2 m) throws IOException {
+ final String fileName = m.group(1);
+ final File file = FileSystem.getInstance().getFile(withEnvironmentVariable(fileName));
+ if (file.exists() && file.isDirectory() == false) {
+ importedFiles.add(file);
+ return null;
+ }
+ return s.withErrorPreprocessor("Cannot import " + FileWithSuffix.getFileName(file));
+
+ }
+
+ private ReadLine manageUrlInclude(CharSequence2 s, Matcher2 m) throws IOException {
+ String urlString = m.group(1);
+ urlString = defines.get().applyDefines(urlString).get(0);
+
+ final int idx = urlString.lastIndexOf('!');
+ String suf = null;
+ if (idx != -1) {
+ suf = urlString.substring(idx + 1);
+ urlString = urlString.substring(0, idx);
+ }
+ try {
+ if (urlString.toLowerCase().startsWith("https://") == false
+ && urlString.toLowerCase().startsWith("http://") == false) {
+ return new ReadLineSingle(s.withErrorPreprocessor("Cannot include url " + urlString));
+ }
+ final URL url = new URL(urlString);
+ return new Preprocessor2(config, getReaderInclude(url, s, suf), charset, defines, definitionsContainer,
+ filesUsedGlobal, importedFiles);
+
+ } catch (MalformedURLException e) {
+ return new ReadLineSingle(s.withErrorPreprocessor("Cannot include url " + urlString));
+ }
+ }
+
+ private ReadLine manageDefinitionInclude(CharSequence2 s, Matcher2 matcher) throws IOException {
+ final String definitionName = matcher.group(1);
+ final List<? extends CharSequence> definition = definitionsContainer.getDefinition(definitionName);
+ return new Preprocessor2(config, new ReadLineList(definition, s.getLocation()), charset, defines,
+ definitionsContainer, filesUsedGlobal, importedFiles);
+ }
+
+ private ReadLine manageFileInclude(CharSequence2 s, Matcher2 matcher, PreprocessorIncludeStrategy allowMany)
+ throws IOException {
+ String fileName = matcher.group(1);
+ fileName = defines.get().applyDefines(fileName).get(0);
+ if (fileName.startsWith("<") && fileName.endsWith(">")) {
+ final ReadLine strlibReader = getReaderStdlibInclude(s, fileName.substring(1, fileName.length() - 1));
+ if (strlibReader == null) {
+ return new ReadLineSingle(s.withErrorPreprocessor("Cannot include " + fileName));
+ }
+ return new Preprocessor2(config, strlibReader, charset, defines, definitionsContainer, filesUsedGlobal,
+ importedFiles);
+ }
+ final int idx = fileName.lastIndexOf('!');
+ String suf = null;
+ if (idx != -1) {
+ suf = fileName.substring(idx + 1);
+ fileName = fileName.substring(0, idx);
+ }
+ final FileWithSuffix f2 = new FileWithSuffix(importedFiles, withEnvironmentVariable(fileName), suf);
+ if (f2.fileOk() == false) {
+ Log.error("Current path is " + FileWithSuffix.getAbsolutePath(new File(".")));
+ Log.error("Cannot include " + f2.getDescription());
+ return new ReadLineSingle(s.withErrorPreprocessor("Cannot include " + f2.getDescription()));
+ } else if (allowMany == PreprocessorIncludeStrategy.ONCE && filesUsedCurrent.contains(f2)) {
+ // return new ReadLineSimple(s, "File already included " + f2.getDescription());
+ return new ReadLineEmpty();
+ }
+ filesUsedCurrent.add(f2);
+ filesUsedGlobal.add(f2);
+
+ return new Preprocessor2(config, getReaderInclude(f2, s), charset, defines, definitionsContainer,
+ filesUsedGlobal, importedFiles.withCurrentDir(f2.getParentFile()));
+ }
+
+ public static String withEnvironmentVariable(String s) {
+ final Pattern p = Pattern.compile("%(\\w+)%");
+
+ final Matcher m = p.matcher(s);
+ final StringBuffer sb = new StringBuffer();
+ while (m.find()) {
+ final String var = m.group(1);
+ final String value = getenv(var);
+ if (value != null) {
+ m.appendReplacement(sb, Matcher.quoteReplacement(value));
+ }
+ }
+ m.appendTail(sb);
+ s = sb.toString();
+ return s;
+ }
+
+ public static String getenv(String var) {
+ final String env = System.getProperty(var);
+ if (StringUtils.isNotEmpty(env)) {
+ return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(env);
+ }
+ final String getenv = System.getenv(var);
+ if (StringUtils.isNotEmpty(getenv)) {
+ return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(getenv);
+ }
+ return null;
+ }
+
+ private InputStream getStdlibInputStream(String filename) {
+ final InputStream result = Stdlib.getResourceAsStream(filename);
+ // Log.info("Loading sdlib " + filename + " ok");
+ return result;
+ }
+
+ private ReadLine getReaderStdlibInclude(CharSequence2 s, String filename) {
+ Log.info("Loading sdlib " + filename);
+ InputStream is = getStdlibInputStream(filename);
+ if (is == null) {
+ return null;
+ }
+ final String description = "<" + filename + ">";
+ try {
+ if (StartDiagramExtractReader.containsStartDiagram(is, s, description)) {
+ is = getStdlibInputStream(filename);
+ return StartDiagramExtractReader.build(is, s, description);
+ }
+ is = getStdlibInputStream(filename);
+ if (is == null) {
+ return null;
+ }
+ return ReadLineReader.create(new InputStreamReader(is), description);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return new ReadLineSimple(s, e.toString());
+ }
+ }
+
+ private ReadLine getReaderInclude(FileWithSuffix f2, CharSequence2 s) {
+ try {
+ if (StartDiagramExtractReader.containsStartDiagram(f2, s, charset)) {
+ return StartDiagramExtractReader.build(f2, s, charset);
+ }
+ final Reader reader = f2.getReader(charset);
+ if (reader == null) {
+ return new ReadLineSimple(s, "Cannot open " + f2.getDescription());
+ }
+ return ReadLineReader.create(reader, f2.getDescription(), s.getLocation());
+ } catch (IOException e) {
+ e.printStackTrace();
+ return new ReadLineSimple(s, e.toString());
+ }
+ }
+
+ private ReadLine getReaderInclude(final URL url, CharSequence2 s, String suf) {
+ try {
+ if (StartDiagramExtractReader.containsStartDiagram(url, s, charset)) {
+ return StartDiagramExtractReader.build(url, s, suf, charset);
+ }
+ final InputStream is = url.openStream();
+ if (charset == null) {
+ Log.info("Using default charset");
+ return ReadLineReader.create(new InputStreamReader(is), url.toString(), s.getLocation());
+ }
+ Log.info("Using charset " + charset);
+ return ReadLineReader.create(new InputStreamReader(is, charset), url.toString(), s.getLocation());
+ } catch (IOException e) {
+ e.printStackTrace();
+ return new ReadLineSimple(s, e.toString());
+ }
+
+ }
+
+ public Set<FileWithSuffix> getFilesUsedGlobal() {
+ return filesUsedGlobal;
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/project2/ValueTime.java b/src/net/sourceforge/plantuml/preproc2/PreprocessorIncludeStrategy.java
index f8fd34b..144b55f 100644
--- a/src/net/sourceforge/plantuml/project2/ValueTime.java
+++ b/src/net/sourceforge/plantuml/preproc2/PreprocessorIncludeStrategy.java
@@ -30,20 +30,20 @@
*
*
* Original Author: Arnaud Roques
+ * Modified by: Nicolas Jouanin
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.preproc2;
-public class ValueTime implements Value {
+public enum PreprocessorIncludeStrategy {
+ ONCE, MANY;
- private final TimeElement value;
-
- public ValueTime(TimeElement value) {
- this.value = value;
+ public static PreprocessorIncludeStrategy fromString(String group) {
+ if ("once".equalsIgnoreCase(group)) {
+ return ONCE;
+ }
+ return MANY;
}
- public final TimeElement getValue() {
- return value;
- }
}
diff --git a/src/net/sourceforge/plantuml/project2/Value.java b/src/net/sourceforge/plantuml/preproc2/ReadFilter.java
index e841355..386531f 100644
--- a/src/net/sourceforge/plantuml/project2/Value.java
+++ b/src/net/sourceforge/plantuml/preproc2/ReadFilter.java
@@ -33,7 +33,12 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.preproc2;
+
+import net.sourceforge.plantuml.preproc.ReadLine;
+
+public interface ReadFilter {
+
+ public ReadLine applyFilter(ReadLine source);
-public interface Value {
}
diff --git a/src/net/sourceforge/plantuml/project2/TimeLineDay.java b/src/net/sourceforge/plantuml/preproc2/ReadFilterAnd2.java
index e52ed34..c0b9f0a 100644
--- a/src/net/sourceforge/plantuml/project2/TimeLineDay.java
+++ b/src/net/sourceforge/plantuml/preproc2/ReadFilterAnd2.java
@@ -33,40 +33,33 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.preproc2;
-import net.sourceforge.plantuml.project.WeekDay;
+import java.util.ArrayList;
+import java.util.Collection;
-public class TimeLineDay implements TimeLine {
+import net.sourceforge.plantuml.preproc.ReadLine;
- public TimeElement next(TimeElement timeElement) {
- do {
- timeElement = timeElement.next();
- if (isClosed(timeElement) == false) {
- return timeElement;
- }
- } while (true);
- }
+public class ReadFilterAnd2 implements ReadFilter {
- public TimeElement previous(TimeElement timeElement) {
- do {
- timeElement = timeElement.previous();
- if (isClosed(timeElement) == false) {
- return timeElement;
- }
- } while (true);
- }
+ private final Collection<ReadFilter> all = new ArrayList<ReadFilter>();
- public TimeResolution getTimeResolution() {
- return TimeResolution.DAY;
+ public void add(ReadFilter filter) {
+ all.add(filter);
}
- public boolean isClosed(TimeElement timeElement) {
- final WeekDay wd = ((Day) timeElement).getWeekDay();
- if (wd == WeekDay.SAT || wd == WeekDay.SUN) {
- return true;
+ public ReadLine applyFilter(ReadLine current) {
+ for (ReadFilter f : all) {
+ current = f.applyFilter(current);
}
- return false;
+ return current;
+ // if (filter3 == null && filter4 == null) {
+ // return filter2.applyFilter(filter1.applyFilter(source));
+ // }
+ // if (filter4 == null) {
+ // return filter3.applyFilter(filter2.applyFilter(filter1.applyFilter(source)));
+ // }
+ // return filter4.applyFilter(filter3.applyFilter(filter2.applyFilter(filter1.applyFilter(source))));
}
}
diff --git a/src/net/sourceforge/plantuml/preproc2/ReadLineAddConfig2.java b/src/net/sourceforge/plantuml/preproc2/ReadLineAddConfig2.java
new file mode 100644
index 0000000..acf20f6
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc2/ReadLineAddConfig2.java
@@ -0,0 +1,84 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc2;
+
+import java.io.IOException;
+import java.util.List;
+
+import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.preproc.ReadLine;
+import net.sourceforge.plantuml.preproc.ReadLineList;
+import net.sourceforge.plantuml.utils.StartUtils;
+
+public class ReadLineAddConfig2 implements ReadFilter {
+
+ private final List<String> config;
+
+ public ReadLineAddConfig2(List<String> config) {
+ this.config = config;
+ }
+
+ public ReadLine applyFilter(final ReadLine raw) {
+
+ return new ReadLine() {
+
+ private ReadLine inserted;
+
+ public void close() throws IOException {
+ raw.close();
+ }
+
+ public CharSequence2 readLine() throws IOException {
+ CharSequence2 result = null;
+ if (inserted != null) {
+ result = inserted.readLine();
+ if (result == null) {
+ inserted.close();
+ inserted = null;
+ } else {
+ return result;
+ }
+ }
+ result = raw.readLine();
+ if (result != null && StartUtils.isArobaseStartDiagram(result) && config.size() > 0) {
+ inserted = new ReadLineQuoteComment2().applyFilter(new ReadLineList(config, result.getLocation()));
+ }
+ return result;
+ }
+ };
+ }
+
+}
diff --git a/src/net/sourceforge/plantuml/preproc/ReadLineInsertable.java b/src/net/sourceforge/plantuml/preproc2/ReadLineInsertable.java
index e5980b2..84331fc 100644
--- a/src/net/sourceforge/plantuml/preproc/ReadLineInsertable.java
+++ b/src/net/sourceforge/plantuml/preproc2/ReadLineInsertable.java
@@ -33,48 +33,45 @@
*
*
*/
-package net.sourceforge.plantuml.preproc;
+package net.sourceforge.plantuml.preproc2;
import java.io.IOException;
-import java.util.Iterator;
-import java.util.LinkedList;
+import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.CharSequence2;
-import net.sourceforge.plantuml.CharSequence2Impl;
-import net.sourceforge.plantuml.LineLocation;
+import net.sourceforge.plantuml.preproc.ReadLine;
-class ReadLineInsertable implements ReadLine {
+public abstract class ReadLineInsertable implements ReadLine {
- private final ReadLine source;
- private final List<CharSequence2> inserted = new LinkedList<CharSequence2>();
+ private final List<ReadLine> sources = new ArrayList<ReadLine>();
- public ReadLineInsertable(ReadLine source) {
- this.source = source;
+ final protected void insert(ReadLine inserted) throws IOException {
+ sources.add(0, inserted);
}
- public void close() throws IOException {
- source.close();
- }
+ abstract CharSequence2 readLineInternal() throws IOException;
- public CharSequence2 readLine() throws IOException {
- if (inserted.size() > 0) {
- final Iterator<CharSequence2> it = inserted.iterator();
- final CharSequence2 result = it.next();
- it.remove();
- return result;
+ final public CharSequence2 readLine() throws IOException {
+ while (sources.size() > 0) {
+ final ReadLine tmp = sources.get(0);
+ final CharSequence2 result = tmp.readLine();
+ if (result != null) {
+ return result;
+ }
+ tmp.close();
+ sources.remove(0);
}
- return source.readLine();
+ return readLineInternal();
}
- public void insert(List<? extends CharSequence> data, LineLocation location) {
- for (CharSequence s : data) {
- insert(s, location);
- }
- }
+ abstract void closeInternal() throws IOException;
- public void insert(CharSequence s, LineLocation location) {
- inserted.add(new CharSequence2Impl(s, location));
+ final public void close() throws IOException {
+ for (ReadLine s : sources) {
+ s.close();
+ }
+ closeInternal();
}
}
diff --git a/src/net/sourceforge/plantuml/project2/TimeUtils.java b/src/net/sourceforge/plantuml/preproc2/ReadLineList2.java
index bd41143..b511d42 100644
--- a/src/net/sourceforge/plantuml/project2/TimeUtils.java
+++ b/src/net/sourceforge/plantuml/preproc2/ReadLineList2.java
@@ -33,34 +33,37 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.preproc2;
-public class TimeUtils {
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
- static public TimeElement max(TimeElement t1, TimeElement t2) {
- if (t1 == null) {
- throw new IllegalArgumentException();
- }
- if (t2 == null) {
- throw new IllegalArgumentException();
- }
- if (t1.compareTo(t2) > 0) {
- return t1;
- }
- return t2;
+import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
+import net.sourceforge.plantuml.preproc.ReadLineNumbered;
+
+public class ReadLineList2 implements ReadLineNumbered {
+
+ private final Iterator<CharSequence2> iterator;
+
+ public ReadLineList2(List<CharSequence2> definition) {
+ this.iterator = definition.iterator();
}
- static public TimeElement min(TimeElement t1, TimeElement t2) {
- if (t1 == null) {
- throw new IllegalArgumentException();
- }
- if (t2 == null) {
- throw new IllegalArgumentException();
- }
- if (t1.compareTo(t2) < 0) {
- return t1;
+ public void close() {
+ }
+
+ public CharSequence2 readLine() {
+ if (iterator.hasNext() == false) {
+ return null;
}
- return t2;
+ return iterator.next();
+ }
+
+ public Set<FileWithSuffix> getFilesUsed() {
+ return Collections.emptySet();
}
}
diff --git a/src/net/sourceforge/plantuml/preproc/ReadLineQuoteComment.java b/src/net/sourceforge/plantuml/preproc2/ReadLineQuoteComment2.java
index 60e2979..dbb2e5d 100644
--- a/src/net/sourceforge/plantuml/preproc/ReadLineQuoteComment.java
+++ b/src/net/sourceforge/plantuml/preproc2/ReadLineQuoteComment2.java
@@ -33,54 +33,52 @@
*
*
*/
-package net.sourceforge.plantuml.preproc;
+package net.sourceforge.plantuml.preproc2;
import java.io.IOException;
import net.sourceforge.plantuml.CharSequence2;
import net.sourceforge.plantuml.CharSequence2Impl;
+import net.sourceforge.plantuml.preproc.ReadLine;
-public class ReadLineQuoteComment extends ReadLineInstrumented implements ReadLine {
+public class ReadLineQuoteComment2 implements ReadFilter {
- private final ReadLine raw;
- private boolean longComment = false;
+ public ReadLine applyFilter(final ReadLine source) {
+ return new ReadLine() {
- public ReadLineQuoteComment(ReadLine source) {
- this.raw = source;
- }
-
- @Override
- void closeInst() throws IOException {
- raw.close();
- }
-
- @Override
- CharSequence2 readLineInst() throws IOException {
- while (true) {
- final CharSequence2 result = raw.readLine();
- if (result == null) {
- return null;
- }
- final String trim = result.toString().replace('\t', ' ').trim();
- if (this.longComment && trim.endsWith("'/")) {
- this.longComment = false;
- continue;
+ public void close() throws IOException {
+ source.close();
}
- if (this.longComment) {
- continue;
- }
- if (trim.startsWith("'")) {
- continue;
- }
- if (trim.startsWith("/'") && trim.endsWith("'/")) {
- continue;
- }
- if (trim.startsWith("/'") && trim.contains("'/") == false) {
- this.longComment = true;
- continue;
+
+ public CharSequence2 readLine() throws IOException {
+ boolean longComment = false;
+ while (true) {
+ final CharSequence2 result = source.readLine();
+ if (result == null) {
+ return null;
+ }
+ final String trim = result.toString().replace('\t', ' ').trim();
+ if (longComment && trim.endsWith("'/")) {
+ longComment = false;
+ continue;
+ }
+ if (longComment) {
+ continue;
+ }
+ if (trim.startsWith("'")) {
+ continue;
+ }
+ if (trim.startsWith("/'") && trim.endsWith("'/")) {
+ continue;
+ }
+ if (trim.startsWith("/'") && trim.contains("'/") == false) {
+ longComment = true;
+ continue;
+ }
+ return ((CharSequence2Impl) result).removeInnerComment();
+ }
}
- return ((CharSequence2Impl) result).removeInnerComment();
- }
+ };
}
}
diff --git a/src/net/sourceforge/plantuml/preproc2/SubPreprocessor2.java b/src/net/sourceforge/plantuml/preproc2/SubPreprocessor2.java
new file mode 100644
index 0000000..80770d9
--- /dev/null
+++ b/src/net/sourceforge/plantuml/preproc2/SubPreprocessor2.java
@@ -0,0 +1,197 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ *
+ */
+package net.sourceforge.plantuml.preproc2;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.HashMap;
+import java.util.Map;
+
+import net.sourceforge.plantuml.CharSequence2;
+import net.sourceforge.plantuml.DefinitionsContainer;
+import net.sourceforge.plantuml.FileSystem;
+import net.sourceforge.plantuml.Log;
+import net.sourceforge.plantuml.command.regex.Matcher2;
+import net.sourceforge.plantuml.command.regex.MyPattern;
+import net.sourceforge.plantuml.command.regex.Pattern2;
+import net.sourceforge.plantuml.preproc.Defines;
+import net.sourceforge.plantuml.preproc.DefinesGet;
+import net.sourceforge.plantuml.preproc.FileWithSuffix;
+import net.sourceforge.plantuml.preproc.ReadLine;
+import net.sourceforge.plantuml.preproc.ReadLineReader;
+import net.sourceforge.plantuml.preproc.ReadLineSimple;
+import net.sourceforge.plantuml.preproc.Sub;
+
+public class SubPreprocessor2 implements ReadFilter {
+
+ private static final String ID = "[A-Za-z_][A-Za-z_0-9]*";
+
+ private static final Pattern2 includeSubPattern = MyPattern.cmpile("^[%s]*!includesub[%s]+[%g]?([^%g]+)[%g]?$");
+
+ private static final Pattern2 startsub = MyPattern.cmpile("^[%s]*!startsub[%s]+(" + ID + ")");
+ private static final Pattern2 endsub = MyPattern.cmpile("^[%s]*!endsub[%s]*");
+
+ private final DefinitionsContainer definitionsContainer;
+ private final String charset;
+
+ public SubPreprocessor2(String charset, DefinitionsContainer definitionsContainer) {
+ this.charset = charset;
+ this.definitionsContainer = definitionsContainer;
+ }
+
+ private final Map<String, Sub> subs = new HashMap<String, Sub>();
+ private Sub learningSub;
+ private ReadLine includedSub;
+
+ public ReadLine applyFilter(ReadLine source) {
+ return new InnerReadLine(source);
+ }
+
+ class InnerReadLine implements ReadLine {
+ final ReadLine source;
+
+ public InnerReadLine(ReadLine source) {
+ this.source = source;
+ }
+
+ private CharSequence2 manageStartsub(Matcher2 m) throws IOException {
+ final String name = m.group(1);
+ learningSub = getSub(name);
+ return this.readLine();
+ }
+
+ private CharSequence2 manageEndsub(Matcher2 m) throws IOException {
+ learningSub = null;
+ return this.readLine();
+ }
+
+ public void close() throws IOException {
+ source.close();
+ }
+
+ private CharSequence2 manageIncludeSub(CharSequence2 s, Matcher2 m) throws IOException {
+ final String name = m.group(1);
+ final int idx = name.indexOf('!');
+ if (idx != -1) {
+ final String filename = name.substring(0, idx);
+ final String blocname = name.substring(idx + 1);
+ final File f = FileSystem.getInstance().getFile(PreprocessorInclude3.withEnvironmentVariable(filename));
+ if (f.exists() == false || f.isDirectory()) {
+ Log.error("Cannot include " + FileWithSuffix.getAbsolutePath(f));
+ return s.withErrorPreprocessor("Cannot include " + FileWithSuffix.getFileName(f));
+ }
+ final SubPreprocessor2 data = new SubPreprocessor2(charset, definitionsContainer);
+ InnerReadLine tmp = (InnerReadLine) data.applyFilter(getReaderInclude(s, f));
+ while (tmp.readLine() != null) {
+ // Read file
+ }
+ tmp.close();
+ includedSub = tmp.getSub(blocname).getReadLine(s.getLocation());
+ } else {
+ includedSub = getSub(name).getReadLine(s.getLocation());
+ }
+ return this.readLine();
+ }
+
+ public CharSequence2 readLine() throws IOException {
+ if (includedSub != null) {
+ final CharSequence2 s = includedSub.readLine();
+ if (s != null) {
+ eventuallyLearn(s);
+ return s;
+ }
+ includedSub = null;
+ }
+
+ final CharSequence2 s = source.readLine();
+ if (s == null) {
+ return null;
+ }
+
+ final Matcher2 m1 = includeSubPattern.matcher(s);
+ if (m1.find()) {
+ return manageIncludeSub(s, m1);
+ }
+
+ Matcher2 m = startsub.matcher(s);
+ if (m.find()) {
+ return manageStartsub(m);
+ }
+
+ m = endsub.matcher(s);
+ if (m.find()) {
+ return manageEndsub(m);
+ }
+ eventuallyLearn(s);
+ return s;
+ }
+
+ private void eventuallyLearn(final CharSequence2 s) {
+ if (learningSub != null) {
+ learningSub.add(s);
+ }
+ }
+
+ Sub getSub(String name) {
+ Sub result = subs.get(name);
+ if (result == null) {
+ result = new Sub(name);
+ subs.put(name, result);
+ }
+ return result;
+ }
+
+ }
+
+ private ReadLine getReaderInclude(CharSequence2 s, final File f) {
+ try {
+ if (charset == null) {
+ Log.info("Using default charset");
+ return ReadLineReader.create(new FileReader(f), FileWithSuffix.getFileName(f), s.getLocation());
+ }
+ Log.info("Using charset " + charset);
+ return ReadLineReader.create(new InputStreamReader(new FileInputStream(f), charset), FileWithSuffix.getFileName(f),
+ s.getLocation());
+ } catch (IOException e) {
+ return new ReadLineSimple(s, e.toString());
+ }
+
+ }
+
+} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/project2/Day.java b/src/net/sourceforge/plantuml/project2/Day.java
deleted file mode 100644
index 1d61723..0000000
--- a/src/net/sourceforge/plantuml/project2/Day.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.SimpleTimeZone;
-
-import net.sourceforge.plantuml.project.Month;
-import net.sourceforge.plantuml.project.WeekDay;
-
-public class Day implements TimeElement {
-
- private final int numDay;
- private final Month month;
- private final int year;
- private final WeekDay weekDay;
-
- private Day(int year, Month month, int numDay, WeekDay weekDay) {
- this.year = year;
- this.month = month;
- this.numDay = numDay;
- this.weekDay = weekDay;
- }
-
- public static boolean isValidDesc(String desc) {
- if (desc.matches("^\\d{4}/\\d{2}/\\d{2}$")) {
- return true;
- }
- if (desc.matches("^\\d{2}-[A-Za-z]{3}-\\d{4}$")) {
- return true;
- }
- return false;
- }
-
- public Day(String desc) {
- if (desc.matches("^\\d{4}/\\d{2}/\\d{2}$")) {
- this.year = Integer.parseInt(desc.substring(0, 4));
- this.month = Month.fromNum(Integer.parseInt(desc.substring(5, 7)));
- this.numDay = Integer.parseInt(desc.substring(8, 10));
- } else if (desc.matches("^\\d{2}-[A-Za-z]{3}-\\d{4}$")) {
- this.year = Integer.parseInt(desc.substring(7, 11));
- this.month = Month.valueOf(desc.substring(3, 6));
- this.numDay = Integer.parseInt(desc.substring(0, 2));
- } else {
- throw new IllegalArgumentException(desc);
- }
- final int wd = new GregorianCalendar(year, month.getNum() - 1, numDay).get(Calendar.DAY_OF_WEEK);
- this.weekDay = WeekDay.values()[wd - 1];
- }
-
- public Day next() {
- if (numDay < month.getNbDays(year)) {
- return new Day(year, month, numDay + 1, weekDay.next());
- }
- final Month next = month.next();
- if (next == null) {
- return new Day(year + 1, Month.JAN, 1, weekDay.next());
- }
- return new Day(year, next, 1, weekDay.next());
- }
-
- public Day previous() {
- if (numDay > 1) {
- return new Day(year, month, numDay - 1, weekDay.prev());
- }
- final Month prev = month.prev();
- if (prev == null) {
- return new Day(year - 1, Month.DEC, 31, weekDay.prev());
- }
- return new Day(year, prev, prev.getNbDays(year), weekDay.prev());
- }
-
- @Override
- public String toString() {
- return "" + weekDay + " " + year + "-" + month + "-" + String.format("%02d", numDay);
- }
-
- public final int getNumDay() {
- return numDay;
- }
-
- public final Month getMonth() {
- return month;
- }
-
- public final int getYear() {
- return year;
- }
-
- public int compareTo(TimeElement other2) {
- final Day other = (Day) other2;
- if (year > other.year) {
- return 1;
- }
- if (year < other.year) {
- return -1;
- }
- final int cmpMonth = month.compareTo(other.month);
- if (cmpMonth != 0) {
- return cmpMonth;
- }
- return numDay - other.numDay;
- }
-
- @Override
- public boolean equals(Object obj) {
- final Day this2 = (Day) obj;
- return this.numDay == this2.numDay && this.month == this2.month && this.year == this2.year;
- }
-
- @Override
- public int hashCode() {
- return numDay * 420 + year + month.hashCode();
- }
-
- public final WeekDay getWeekDay() {
- return weekDay;
- }
-
- public long getTypicalDuration() {
- return 1000L * 60 * 60 * 24;
- }
-
- public long getStartUTC() {
- final GregorianCalendar cal = new GregorianCalendar(new SimpleTimeZone(0, "GMT"));
- cal.setTimeInMillis(0);
- cal.set(GregorianCalendar.YEAR, year);
- cal.set(GregorianCalendar.MONTH, month.getNumNormal());
- cal.set(GregorianCalendar.DAY_OF_MONTH, numDay);
- return cal.getTimeInMillis();
- }
-
- public long getEndUTC() {
- return next().getStartUTC();
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/GanttDiagram2.java b/src/net/sourceforge/plantuml/project2/GanttDiagram2.java
deleted file mode 100644
index fc0b47e..0000000
--- a/src/net/sourceforge/plantuml/project2/GanttDiagram2.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.Font;
-import java.util.ArrayList;
-import java.util.List;
-
-import net.sourceforge.plantuml.SpriteContainerEmpty;
-import net.sourceforge.plantuml.cucadiagram.Display;
-import net.sourceforge.plantuml.graphic.FontConfiguration;
-import net.sourceforge.plantuml.graphic.HorizontalAlignment;
-import net.sourceforge.plantuml.graphic.HtmlColorUtils;
-import net.sourceforge.plantuml.graphic.StringBounder;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.graphic.TextBlockUtils;
-import net.sourceforge.plantuml.ugraphic.UFont;
-import net.sourceforge.plantuml.ugraphic.UGraphic;
-import net.sourceforge.plantuml.ugraphic.UTranslate;
-
-public class GanttDiagram2 {
-
- private final Project2 project;
- private final double dayWith = 20;
-
- public GanttDiagram2(Project2 project) {
- this.project = project;
- }
-
- private final UFont font = UFont.serif(9);
- private final FontConfiguration fontConfig = FontConfiguration.blackBlueTrue(font);
-
- public void draw(UGraphic ug, double x, double y) {
-
- final TextBlock timeHeader = project.getTimeHeader(dayWith);
- final Row row = getMainRow();
- final TextBlock headers = row.header();
-
- final double deltaX = headers.calculateDimension(ug.getStringBounder()).getWidth();
- final double deltaY = timeHeader.calculateDimension(ug.getStringBounder()).getHeight();
-
- headers.drawU(ug.apply(new UTranslate(x, (y + deltaY))));
- final TextBlock tbRow = row.asTextBloc(project.getTimeConverter(dayWith));
- tbRow.drawU(ug.apply(new UTranslate((x + deltaX), (y + deltaY))));
-
- timeHeader.drawU(ug.apply(new UTranslate((x + deltaX), y)));
- }
-
- private Row getMainRow() {
- final List<Task> tasks = project.getTasks();
- final List<Row> rows = new ArrayList<Row>();
- for (Task t : tasks) {
- final String text = t.getCode();
- final TextBlock label = Display.create(text).create(fontConfig, HorizontalAlignment.LEFT,
- new SpriteContainerEmpty());
- rows.add(new RowSimple((Day) t.getStart(), (Day) t.getEnd(), HtmlColorUtils.BLACK, TextBlockUtils
- .withMargin(label, 3, 3)));
- }
- final Row row = RowUtils.merge(rows);
- return row;
- }
-
- public double getWidth(StringBounder stringBounder) {
- final TextBlock timeHeader = project.getTimeHeader(dayWith);
- final Row row = getMainRow();
- final TextBlock headers = row.header();
- return headers.calculateDimension(stringBounder).getWidth()
- + timeHeader.calculateDimension(stringBounder).getWidth() + 1;
- }
-
- public double getHeight(StringBounder stringBounder) {
- final TextBlock timeHeader = project.getTimeHeader(dayWith);
- final Row row = getMainRow();
- final TextBlock headers = row.header();
- return headers.calculateDimension(stringBounder).getHeight()
- + timeHeader.calculateDimension(stringBounder).getHeight();
- }
-
-} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/project2/Knowledge.java b/src/net/sourceforge/plantuml/project2/Knowledge.java
deleted file mode 100644
index ac7dace..0000000
--- a/src/net/sourceforge/plantuml/project2/Knowledge.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import net.sourceforge.plantuml.StringUtils;
-
-public class Knowledge {
-
- private final TaskContainer taskContainer;
- private final TimeLine timeline;
- private final Map<String, Value> variables = new HashMap<String, Value>();
-
- public Knowledge(TaskContainer taskContainer, TimeLine timeline) {
- this.taskContainer = taskContainer;
- this.timeline = timeline;
- }
-
- public Value evaluate(String exp) {
- exp = StringUtils.trin(exp);
- int idx = exp.indexOf('$');
- if (idx != -1) {
- return evaluate(exp.substring(0, idx), exp.substring(idx + 1));
- }
- if (exp.matches("\\d+")) {
- return new ValueInt(Integer.parseInt(exp));
- }
- if (Day.isValidDesc(exp)) {
- final Day day = new Day(exp);
- return new ValueTime(day);
- }
- if (exp.startsWith("^")) {
- exp = exp.substring(1);
- }
- if (variables.containsKey(exp)) {
- return variables.get(exp);
- }
- idx = exp.indexOf("+");
- if (idx != -1) {
- return plus(exp.substring(0, idx), exp.substring(idx + 1));
- }
- throw new UnsupportedOperationException(exp);
-
- }
-
- private Value plus(String arg1, String arg2) {
- final Value v1 = evaluate(arg1);
- final Value v2 = evaluate(arg2);
- if (v1 instanceof ValueInt && v2 instanceof ValueInt) {
- return new ValueInt(((ValueInt) v1).getValue() + ((ValueInt) v2).getValue());
- }
- if (v1 instanceof ValueTime && v2 instanceof ValueInt) {
- final int nb = ((ValueInt) v2).getValue();
- TimeElement t = ((ValueTime) v1).getValue();
- if (nb > 0) {
- for (int i = 0; i < nb; i++) {
- t = timeline.next(t);
- }
- }
- if (nb < 0) {
- for (int i = 0; i < -nb; i++) {
- t = timeline.previous(t);
- }
- }
- return new ValueTime(t);
- }
- throw new UnsupportedOperationException();
- }
-
- private Value evaluate(String task, String attribute) {
- final Task t = taskContainer.getTask(task);
- final TaskAttribute att = TaskAttribute.fromString(attribute);
- if (att == TaskAttribute.COMPLETED) {
- return new ValueTime(t.getCompleted());
- }
- throw new UnsupportedOperationException();
- }
-
- public void set(String var, Value exp) {
- variables.put(var, exp);
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/PSystemProject2.java b/src/net/sourceforge/plantuml/project2/PSystemProject2.java
deleted file mode 100644
index 926e1d1..0000000
--- a/src/net/sourceforge/plantuml/project2/PSystemProject2.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.Color;
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.OutputStream;
-
-import net.sourceforge.plantuml.AbstractPSystem;
-import net.sourceforge.plantuml.Dimension2DDouble;
-import net.sourceforge.plantuml.EmptyImageBuilder;
-import net.sourceforge.plantuml.FileFormat;
-import net.sourceforge.plantuml.FileFormatOption;
-import net.sourceforge.plantuml.StringUtils;
-import net.sourceforge.plantuml.api.ImageDataSimple;
-import net.sourceforge.plantuml.core.DiagramDescription;
-import net.sourceforge.plantuml.core.ImageData;
-import net.sourceforge.plantuml.eps.EpsStrategy;
-import net.sourceforge.plantuml.png.PngIO;
-import net.sourceforge.plantuml.ugraphic.ColorMapper;
-import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
-import net.sourceforge.plantuml.ugraphic.eps.UGraphicEps;
-import net.sourceforge.plantuml.ugraphic.g2d.UGraphicG2d;
-import net.sourceforge.plantuml.ugraphic.svg.UGraphicSvg;
-
-public class PSystemProject2 extends AbstractPSystem {
-
- private final Project2 project = new Project2();
- private final Color background = Color.WHITE;
- private final ColorMapper colorMapper = new ColorMapperIdentity();
-
- public int getNbImages() {
- return 1;
- }
-
- public DiagramDescription getDescription() {
- return new DiagramDescription("(Project)");
- }
-
- @Override
- final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormatOption, long seed)
- throws IOException {
- final GanttDiagram2 diagram = new GanttDiagram2(project);
- final FileFormat fileFormat = fileFormatOption.getFileFormat();
- if (fileFormat == FileFormat.PNG) {
- final BufferedImage im = createImage(diagram);
- PngIO.write(im, os, fileFormatOption.isWithMetadata() ? getMetadata() : null, 96);
- } else if (fileFormat == FileFormat.SVG) {
- final UGraphicSvg svg = new UGraphicSvg(true, new Dimension2DDouble(0, 0), colorMapper,
- StringUtils.getAsHtml(background), false, 1.0, fileFormatOption.getSvgLinkTarget(),
- fileFormatOption.getHoverColor(), seed());
- diagram.draw(svg, 0, 0);
- svg.createXml(os, fileFormatOption.isWithMetadata() ? getMetadata() : null);
- } else if (fileFormat == FileFormat.EPS) {
- final UGraphicEps eps = new UGraphicEps(colorMapper, EpsStrategy.getDefault2());
- diagram.draw(eps, 0, 0);
- os.write(eps.getEPSCode().getBytes());
- } else if (fileFormat == FileFormat.EPS_TEXT) {
- final UGraphicEps eps = new UGraphicEps(colorMapper, EpsStrategy.WITH_MACRO_AND_TEXT);
- diagram.draw(eps, 0, 0);
- os.write(eps.getEPSCode().getBytes());
- } else {
- throw new UnsupportedOperationException();
- }
- return ImageDataSimple.ok();
- }
-
- private BufferedImage createImage(GanttDiagram2 diagram) {
- EmptyImageBuilder builder = new EmptyImageBuilder(10, 10, background);
- Graphics2D g2d = builder.getGraphics2D();
- UGraphicG2d ug = new UGraphicG2d(colorMapper, g2d, 1.0);
-
- final double height = diagram.getHeight(ug.getStringBounder());
- final double width = diagram.getWidth(ug.getStringBounder());
-
- g2d.dispose();
-
- builder = new EmptyImageBuilder(width, height, background);
- final BufferedImage im = builder.getBufferedImage();
- g2d = builder.getGraphics2D();
-
- ug = new UGraphicG2d(colorMapper, g2d, 1.0);
- ug.setBufferedImage(im);
- diagram.draw(ug, 0, 0);
- g2d.dispose();
- return im;
- }
-
- public final Project2 getProject() {
- return project;
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/Project2.java b/src/net/sourceforge/plantuml/project2/Project2.java
deleted file mode 100644
index ed5a2fe..0000000
--- a/src/net/sourceforge/plantuml/project2/Project2.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import net.sourceforge.plantuml.graphic.HorizontalAlignment;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.graphic.TextBlockUtils;
-
-public class Project2 implements TaskContainer {
-
- private final TimeLine timeline;
- private final Knowledge knowledge;
- private final List<TaskImpl> tasks = new ArrayList<TaskImpl>();
-
- public Project2() {
- this.timeline = new TimeLineDay();
- this.knowledge = new Knowledge(this, timeline);
- }
-
- public TimeConverter getTimeConverter(double dayWith) {
- return new TimeConverterDay(timeline, getStart(), dayWith);
- }
-
- public Value getExpression(String exp) {
- return knowledge.evaluate(exp);
- }
-
- public boolean affectation(String var, Value exp) {
- final int idx = var.indexOf('$');
- if (idx != -1) {
- return affectationTask(var.substring(0, idx), var.substring(idx + 1), exp);
- }
- if (var.startsWith("^")) {
- return affectationJalon(var.substring(1), exp);
- }
- knowledge.set(var, exp);
- return true;
- }
-
- private boolean affectationJalon(String taskCode, Value exp) {
- final TaskImpl result = new TaskImpl(timeline, taskCode);
- result.setStart(((ValueTime) exp).getValue());
- result.setDuration(0);
- tasks.add(result);
- knowledge.set(taskCode, exp);
- return true;
- }
-
- private boolean affectationTask(String taskCode, String attribute, Value exp) {
- final TaskImpl t = getOrCreateTask(taskCode);
- final TaskAttribute att = TaskAttribute.fromString(attribute);
- if (att == TaskAttribute.START) {
- t.setStart(((ValueTime) exp).getValue());
- return true;
- }
- if (att == TaskAttribute.DURATION) {
- t.setDuration(((ValueInt) exp).getValue());
- return true;
- }
- if (att == TaskAttribute.LOAD) {
- t.setLoad(((ValueInt) exp).getValue());
- return true;
- }
- throw new UnsupportedOperationException();
- }
-
- private TaskImpl getOrCreateTask(String taskCode) {
- TaskImpl result = (TaskImpl) getTask(taskCode);
- if (result != null) {
- return result;
- }
- result = new TaskImpl(timeline, taskCode);
- tasks.add(result);
- return result;
- }
-
- public final List<Task> getTasks() {
- final List<Task> result = new ArrayList<Task>(tasks);
- return Collections.unmodifiableList(result);
- }
-
- public Task getTask(String code) {
- for (TaskImpl t : tasks) {
- if (t.getCode().equals(code)) {
- return t;
- }
- }
- Task result = null;
- for (Task t : tasks) {
- if (t.getCode().startsWith(code) == false) {
- continue;
- }
- if (result == null) {
- result = t;
- } else {
- result = new TaskMerge(result.getCode(), result.getName(), result, t);
- }
-
- }
- return result;
- }
-
- public TextBlock getTimeHeader(double dayWith) {
- final TimeHeaderDay day = new TimeHeaderDay(getStart(), getEnd(), timeline, dayWith);
- final TimeHeaderMonth month = new TimeHeaderMonth(getStart(), getEnd(), timeline, dayWith);
- return TextBlockUtils.mergeTB(month, day, HorizontalAlignment.CENTER);
- }
-
- private Day getStart() {
- Day result = null;
- for (Task t : tasks) {
- if (result == null || result.compareTo(t.getStart()) > 0) {
- result = (Day) t.getStart();
- }
- }
- return result;
- }
-
- private Day getEnd() {
- Day result = null;
- for (Task t : tasks) {
- if (result == null || result.compareTo(t.getEnd()) < 0) {
- result = (Day) t.getEnd();
- }
- }
- return result;
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/Row.java b/src/net/sourceforge/plantuml/project2/Row.java
deleted file mode 100644
index 22b4871..0000000
--- a/src/net/sourceforge/plantuml/project2/Row.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import net.sourceforge.plantuml.graphic.TextBlock;
-
-public interface Row {
-
- public TextBlock asTextBloc(TimeConverter timeConverter);
-
- public double getMinXwithoutHeader(TimeConverter timeConverter);
-
- public double getMaxXwithoutHeader(TimeConverter timeConverter);
-
- public TextBlock header();
-
- public double getHeight();
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/RowMerge.java b/src/net/sourceforge/plantuml/project2/RowMerge.java
deleted file mode 100644
index 3b10948..0000000
--- a/src/net/sourceforge/plantuml/project2/RowMerge.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.geom.Dimension2D;
-
-import net.sourceforge.plantuml.Dimension2DDouble;
-import net.sourceforge.plantuml.graphic.AbstractTextBlock;
-import net.sourceforge.plantuml.graphic.StringBounder;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.ugraphic.UGraphic;
-import net.sourceforge.plantuml.ugraphic.UTranslate;
-
-class RowMerge implements Row {
-
- private final Row r1;
- private final Row r2;
-
- public RowMerge(Row r1, Row r2) {
- this.r1 = r1;
- this.r2 = r2;
- }
-
- public TextBlock asTextBloc(final TimeConverter timeConverter) {
- return new AbstractTextBlock() {
-
- public void drawU(UGraphic ug) {
- r1.asTextBloc(timeConverter).drawU(ug);
- r2.asTextBloc(timeConverter).drawU(ug.apply(new UTranslate(0, r1.getHeight())));
- }
-
- public Dimension2D calculateDimension(StringBounder stringBounder) {
- final double width = getMaxXwithoutHeader(timeConverter) - getMinXwithoutHeader(timeConverter);
- final double height = getHeight();
- return new Dimension2DDouble(width, height);
- }
- };
- }
-
- public double getMinXwithoutHeader(TimeConverter timeConverter) {
- return Math.min(r1.getMinXwithoutHeader(timeConverter), r2.getMinXwithoutHeader(timeConverter));
- }
-
- public double getMaxXwithoutHeader(TimeConverter timeConverter) {
- return Math.max(r1.getMaxXwithoutHeader(timeConverter), r2.getMaxXwithoutHeader(timeConverter));
- }
-
- public double getHeight() {
- return r1.getHeight() + r2.getHeight();
- }
-
- public TextBlock header() {
- return new AbstractTextBlock() {
-
- public void drawU(UGraphic ug) {
- r1.header().drawU(ug);
- r2.header().drawU(ug.apply(new UTranslate(0, r1.getHeight())));
- }
-
- public Dimension2D calculateDimension(StringBounder stringBounder) {
- final double width = Math.max(r1.header().calculateDimension(stringBounder).getWidth(), r2.header()
- .calculateDimension(stringBounder).getWidth());
- final double height = getHeight();
- return new Dimension2DDouble(width, height);
- }
- };
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/RowOverwrite.java b/src/net/sourceforge/plantuml/project2/RowOverwrite.java
deleted file mode 100644
index 0d7e518..0000000
--- a/src/net/sourceforge/plantuml/project2/RowOverwrite.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.geom.Dimension2D;
-
-import net.sourceforge.plantuml.Dimension2DDouble;
-import net.sourceforge.plantuml.graphic.AbstractTextBlock;
-import net.sourceforge.plantuml.graphic.StringBounder;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.ugraphic.UGraphic;
-import net.sourceforge.plantuml.ugraphic.UTranslate;
-
-class RowOverwrite implements Row {
-
- private final Row r1;
- private final Row r2;
-
- public RowOverwrite(Row r1, Row r2) {
- this.r1 = r1;
- this.r2 = r2;
- }
-
- public TextBlock asTextBloc(final TimeConverter timeConverter) {
- return new AbstractTextBlock() {
-
- public void drawU(UGraphic ug) {
- final double minX = getMinXwithoutHeader(timeConverter);
- final double minXr1 = r1.getMinXwithoutHeader(timeConverter);
- final double minXr2 = r2.getMinXwithoutHeader(timeConverter);
- r1.asTextBloc(timeConverter).drawU(ug.apply(new UTranslate((minXr1 - minX), 0)));
- r2.asTextBloc(timeConverter).drawU(ug.apply(new UTranslate((minXr2 - minX), 0)));
- }
-
- public Dimension2D calculateDimension(StringBounder stringBounder) {
- final double width = getMaxXwithoutHeader(timeConverter) - getMinXwithoutHeader(timeConverter);
- final double height = getHeight();
- return new Dimension2DDouble(width, height);
- }
- };
- }
-
- public double getMinXwithoutHeader(TimeConverter timeConverter) {
- return Math.min(r1.getMinXwithoutHeader(timeConverter), r2.getMinXwithoutHeader(timeConverter));
- }
-
- public double getMaxXwithoutHeader(TimeConverter timeConverter) {
- return Math.max(r1.getMaxXwithoutHeader(timeConverter), r2.getMaxXwithoutHeader(timeConverter));
- }
-
- public double getHeight() {
- return Math.max(r1.getHeight(), r2.getHeight());
- }
-
- public TextBlock header() {
- return r1.header();
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/RowSimple.java b/src/net/sourceforge/plantuml/project2/RowSimple.java
deleted file mode 100644
index a1471a2..0000000
--- a/src/net/sourceforge/plantuml/project2/RowSimple.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.geom.Dimension2D;
-
-import net.sourceforge.plantuml.Dimension2DDouble;
-import net.sourceforge.plantuml.graphic.AbstractTextBlock;
-import net.sourceforge.plantuml.graphic.HtmlColor;
-import net.sourceforge.plantuml.graphic.HtmlColorUtils;
-import net.sourceforge.plantuml.graphic.StringBounder;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.graphic.TextBlockUtils;
-import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
-import net.sourceforge.plantuml.ugraphic.UChangeColor;
-import net.sourceforge.plantuml.ugraphic.UGraphic;
-import net.sourceforge.plantuml.ugraphic.URectangle;
-import net.sourceforge.plantuml.ugraphic.UShape;
-import net.sourceforge.plantuml.ugraphic.UTranslate;
-
-public class RowSimple implements Row {
-
- private static final int HEIGHT = 12;
- private final Day first;
- private final Day last;
- private final HtmlColor backcolor;
- private final TextBlock header;
-
- public RowSimple(Day first, Day last) {
- this(first, last, HtmlColorUtils.BLACK);
- }
-
- public RowSimple(Day first, Day last, HtmlColor backcolor) {
- this(first, last, backcolor, TextBlockUtils.empty(0, HEIGHT));
- }
-
- public RowSimple(Day first, Day last, HtmlColor backcolor, TextBlock header) {
- this.first = first;
- this.last = last;
- this.backcolor = backcolor;
- if (last.compareTo(first) < 0) {
- throw new IllegalArgumentException();
- }
- this.header = header;
- }
-
- public TextBlock asTextBloc(final TimeConverter timeConverter) {
- return new AbstractTextBlock() {
-
- public void drawU(UGraphic ug) {
- final double x1 = getMinXwithoutHeader(timeConverter) + 1;
- final double x2 = getMaxXwithoutHeader(timeConverter) - 1;
- final double height = getHeight() - 4;
- final UShape rect = new URectangle(x2 - x1, height, 4, 4);
- ug.apply(new UChangeColor(HtmlColorUtils.RED)).apply(new UChangeBackColor(backcolor)).apply(new UTranslate(x1, 2)).draw(rect);
- }
-
- public Dimension2D calculateDimension(StringBounder stringBounder) {
- final double width = getMaxXwithoutHeader(timeConverter) - getMinXwithoutHeader(timeConverter);
- final double height = getHeight();
- return new Dimension2DDouble(width, height);
- }
- };
- }
-
- public double getMinXwithoutHeader(TimeConverter timeConverter) {
- return timeConverter.getStartPosition(first);
- }
-
- public double getMaxXwithoutHeader(TimeConverter timeConverter) {
- return timeConverter.getEndPosition(last);
- }
-
- public double getHeight() {
- return HEIGHT;
- }
-
- public TextBlock header() {
- return header;
- }
-}
diff --git a/src/net/sourceforge/plantuml/project2/TimeConverter.java b/src/net/sourceforge/plantuml/project2/TimeConverter.java
deleted file mode 100644
index 0f37426..0000000
--- a/src/net/sourceforge/plantuml/project2/TimeConverter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-public interface TimeConverter {
-
- public TimeElement getCorrespondingElement(long position);
-
- public double getStartPosition(TimeElement timeElement);
-
- public double getEndPosition(TimeElement timeElement);
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/TimeConverterDay.java b/src/net/sourceforge/plantuml/project2/TimeConverterDay.java
deleted file mode 100644
index 21c362f..0000000
--- a/src/net/sourceforge/plantuml/project2/TimeConverterDay.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class TimeConverterDay implements TimeConverter {
-
- private Day biggest;
- private Day smallest;
- private final double dayWith;
- private final Map<Day, Integer> map1 = new HashMap<Day, Integer>();
- private final Map<Integer, Day> map2 = new HashMap<Integer, Day>();
- private final TimeLine timeLine;
-
- public TimeConverterDay(TimeLine timeLine, Day start, double dayWith) {
- this.timeLine = timeLine;
- this.dayWith = dayWith;
- this.biggest = start;
- this.smallest = start;
- putDay(start, 0);
- }
-
-// private boolean isClosed(Day d) {
-// WeekDay wd = d.getWeekDay();
-// if (wd == WeekDay.SAT || wd == WeekDay.SUN) {
-// return true;
-// }
-// return false;
-// }
-
- private int getPosition(Day d) {
- Integer result = map1.get(d);
- if (result != null) {
- return result.intValue();
- }
- while (d.compareTo(biggest) > 0) {
- int n = getPosition(biggest);
- biggest = biggest.next();
- if (timeLine.isClosed(biggest) == false) {
- n++;
- }
- putDay(biggest, n);
- }
- while (d.compareTo(smallest) < 0) {
- int n = getPosition(smallest);
- smallest = smallest.previous();
- if (timeLine.isClosed(smallest) == false) {
- n--;
- }
- putDay(smallest, n);
- }
- result = map1.get(d);
- if (result != null) {
- return result.intValue();
- }
- throw new UnsupportedOperationException();
- }
-
- private void putDay(Day d, int n) {
- map1.put(d, n);
- map2.put(n, d);
-
- }
-
- public Day getCorrespondingElement(long position) {
- throw new UnsupportedOperationException();
- }
-
- public double getStartPosition(TimeElement timeElement) {
- return getPosition((Day) timeElement) * dayWith;
- }
-
- public double getEndPosition(TimeElement timeElement) {
- return (getPosition((Day) timeElement) + 1) * dayWith;
- }
-
-}
diff --git a/src/net/sourceforge/plantuml/project2/TimeHeaderDay.java b/src/net/sourceforge/plantuml/project2/TimeHeaderDay.java
deleted file mode 100644
index 7e08908..0000000
--- a/src/net/sourceforge/plantuml/project2/TimeHeaderDay.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.Font;
-import java.awt.geom.Dimension2D;
-
-import net.sourceforge.plantuml.Dimension2DDouble;
-import net.sourceforge.plantuml.SpriteContainerEmpty;
-import net.sourceforge.plantuml.cucadiagram.Display;
-import net.sourceforge.plantuml.graphic.AbstractTextBlock;
-import net.sourceforge.plantuml.graphic.FontConfiguration;
-import net.sourceforge.plantuml.graphic.HorizontalAlignment;
-import net.sourceforge.plantuml.graphic.HtmlColorUtils;
-import net.sourceforge.plantuml.graphic.StringBounder;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
-import net.sourceforge.plantuml.ugraphic.UChangeColor;
-import net.sourceforge.plantuml.ugraphic.UFont;
-import net.sourceforge.plantuml.ugraphic.UGraphic;
-import net.sourceforge.plantuml.ugraphic.URectangle;
-import net.sourceforge.plantuml.ugraphic.UTranslate;
-
-public class TimeHeaderDay extends AbstractTextBlock implements TextBlock {
-
- private final Day start;
- private final Day end;
- private final TimeLine timeline;
- private final double dayWidth;
-
- private final UFont font = UFont.serif(9);
- private final FontConfiguration fontConfig = FontConfiguration.blackBlueTrue(font);
-
- public TimeHeaderDay(Day start, Day end, TimeLine timeline, double dayWidth) {
- this.start = start;
- this.end = end;
- this.timeline = timeline;
- this.dayWidth = dayWidth;
- }
-
- public void drawU(UGraphic ug) {
- int n = 0;
- for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
- final String text = "" + d.getNumDay();
- final TextBlock b = Display.create(text).create(fontConfig, HorizontalAlignment.LEFT,
- new SpriteContainerEmpty());
- final Dimension2D dimText = b.calculateDimension(ug.getStringBounder());
- final double diffX = dayWidth - dimText.getWidth();
- final double diffY = getHeight() - dimText.getHeight();
- ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
- ug = ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE));
- ug.apply(new UTranslate(n * dayWidth, 0)).draw(new URectangle(dayWidth, getHeight()));
- b.drawU(ug.apply(new UTranslate((n * dayWidth + diffX / 2), (diffY / 2))));
- n++;
- }
- }
-
- private double getHeight() {
- return 20;
- }
-
- public Dimension2D calculateDimension(StringBounder stringBounder) {
- int n = 0;
- for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
- n++;
- }
- return new Dimension2DDouble(n * dayWidth, getHeight());
- }
-} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/project2/TimeHeaderMonth.java b/src/net/sourceforge/plantuml/project2/TimeHeaderMonth.java
deleted file mode 100644
index 79a98aa..0000000
--- a/src/net/sourceforge/plantuml/project2/TimeHeaderMonth.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of PlantUML.
- *
- * PlantUML 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.
- *
- * PlantUML 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 library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- * USA.
- *
- *
- * Original Author: Arnaud Roques
- *
- *
- */
-package net.sourceforge.plantuml.project2;
-
-import java.awt.Font;
-import java.awt.geom.Dimension2D;
-
-import net.sourceforge.plantuml.Dimension2DDouble;
-import net.sourceforge.plantuml.SpriteContainerEmpty;
-import net.sourceforge.plantuml.cucadiagram.Display;
-import net.sourceforge.plantuml.graphic.AbstractTextBlock;
-import net.sourceforge.plantuml.graphic.FontConfiguration;
-import net.sourceforge.plantuml.graphic.HorizontalAlignment;
-import net.sourceforge.plantuml.graphic.HtmlColorUtils;
-import net.sourceforge.plantuml.graphic.StringBounder;
-import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.ugraphic.UChangeBackColor;
-import net.sourceforge.plantuml.ugraphic.UChangeColor;
-import net.sourceforge.plantuml.ugraphic.UFont;
-import net.sourceforge.plantuml.ugraphic.UGraphic;
-import net.sourceforge.plantuml.ugraphic.URectangle;
-import net.sourceforge.plantuml.ugraphic.UTranslate;
-
-public class TimeHeaderMonth extends AbstractTextBlock implements TextBlock {
-
- private final Day start;
- private final Day end;
- private final TimeLine timeline;
- private final double dayWidth;
-
- private final UFont font = UFont.serif(9);
- private final FontConfiguration fontConfig = FontConfiguration.blackBlueTrue(font);
-
- public TimeHeaderMonth(Day start, Day end, TimeLine timeline, double dayWidth) {
- this.start = start;
- this.end = end;
- this.timeline = timeline;
- this.dayWidth = dayWidth;
- }
-
- public void drawU(UGraphic ug) {
- int n = 0;
- String last = null;
-
- double pendingX = -1;
- for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
- final String text = "" + d.getMonth().name();
- if (pendingX == -1) {
- pendingX = n * dayWidth;
- last = text;
- }
- ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
- ug = ug.apply(new UChangeBackColor(HtmlColorUtils.WHITE));
- if (text.equals(last) == false) {
- manage(ug, 0, 0, n, last, pendingX);
- pendingX = n * dayWidth;
- }
- last = text;
- n++;
- }
- manage(ug, 0, 0, n, last, pendingX);
- }
-
- private void manage(UGraphic ug, double x, double y, int n, String last, double pendingX) {
- final double width = n * dayWidth - pendingX;
- ug.apply(new UTranslate(x + pendingX, y)).draw(new URectangle(width, getHeight()));
- final TextBlock b = Display.create(last).create(fontConfig, HorizontalAlignment.LEFT,
- new SpriteContainerEmpty());
- final Dimension2D dimText = b.calculateDimension(ug.getStringBounder());
- final double diffX = width - dimText.getWidth();
- final double diffY = getHeight() - dimText.getHeight();
- b.drawU(ug.apply(new UTranslate((x + pendingX + diffX / 2), (y + diffY / 2))));
- }
-
- private double getHeight() {
- return 20;
- }
-
- public Dimension2D calculateDimension(StringBounder stringBounder) {
- int n = 0;
- for (Day d = start; d.compareTo(end) <= 0; d = (Day) timeline.next(d)) {
- n++;
- }
- return new Dimension2DDouble(n * dayWidth, getHeight());
- }
-} \ No newline at end of file
diff --git a/src/net/sourceforge/plantuml/project3/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java b/src/net/sourceforge/plantuml/project3/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java
index 7e645ef..5a76af8 100644
--- a/src/net/sourceforge/plantuml/project3/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java
+++ b/src/net/sourceforge/plantuml/project3/ComplementBeforeOrAfterOrAtTaskStartOrEnd.java
@@ -49,7 +49,7 @@ public class ComplementBeforeOrAfterOrAtTaskStartOrEnd implements ComplementPatt
public Failable<Complement> getComplement(GanttDiagram system, RegexResult arg, String suffix) {
final String code = arg.get("COMPLEMENT" + suffix, 2);
final String position = arg.get("COMPLEMENT" + suffix, 3);
- final Task task = system.getExistingTask(code);
+ final Moment task = system.getExistingMoment(code);
if (task == null) {
return Failable.<Complement> error("No such task " + code);
}
diff --git a/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java b/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java
index fd6e20c..5d2ea18 100644
--- a/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java
+++ b/src/net/sourceforge/plantuml/project3/ComplementSeveralDays.java
@@ -44,16 +44,20 @@ public class ComplementSeveralDays implements ComplementPattern {
public IRegex toRegex(String suffix) {
return new RegexConcat( //
- new RegexLeaf("COMPLEMENT" + suffix, "(\\d+)[%s]+days?"), //
+ new RegexLeaf("COMPLEMENT" + suffix, "(\\d+)[%s]+(days?|weeks?)"), //
new RegexLeaf("LOAD" + suffix, "([%s]+at[%s]+(\\d+)%)?"));
}
public Failable<Complement> getComplement(GanttDiagram system, RegexResult arg, String suffix) {
- final String days = arg.get("COMPLEMENT" + suffix, 0);
+ final String number = arg.get("COMPLEMENT" + suffix, 0);
+ final boolean inWeeks = arg.get("COMPLEMENT" + suffix, 1).startsWith("w");
+ final int factor = inWeeks ? system.daysInWeek() : 1;
final String load = arg.get("LOAD" + suffix, 1);
+ final int days = Integer.parseInt(number) * factor;
if (load == null) {
- return Failable.<Complement> ok(LoadInDays.inDay(Integer.parseInt(days)));
+ return Failable.<Complement> ok(LoadInDays.inDay(days));
}
- return Failable.<Complement> ok(LoadInDays.inDayWithLoad(Integer.parseInt(days), Integer.parseInt(load)));
+ return Failable.<Complement> ok(LoadInDays.inDayWithLoad(days, Integer.parseInt(load)));
}
+
}
diff --git a/src/net/sourceforge/plantuml/project3/GanttArrow.java b/src/net/sourceforge/plantuml/project3/GanttArrow.java
index d48659c..20ce441 100644
--- a/src/net/sourceforge/plantuml/project3/GanttArrow.java
+++ b/src/net/sourceforge/plantuml/project3/GanttArrow.java
@@ -79,8 +79,8 @@ public class GanttArrow implements UDrawable {
ug = ug.apply(new UChangeBackColor(HtmlColorUtils.RED_DARK)).apply(new UChangeColor(HtmlColorUtils.RED_DARK))
.apply(new UStroke(1.5));
- final TaskDraw draw1 = source.getTask().getTaskDraw();
- final TaskDraw draw2 = dest.getTask().getTaskDraw();
+ final TaskDraw draw1 = ((Task) source.getMoment()).getTaskDraw();
+ final TaskDraw draw2 = ((Task) dest.getMoment()).getTaskDraw();
double x1 = getX(source.withDelta(0), atStart);
double y1 = draw1.getY(atStart);
diff --git a/src/net/sourceforge/plantuml/project3/GanttDiagram.java b/src/net/sourceforge/plantuml/project3/GanttDiagram.java
index 3308389..48a1c81 100644
--- a/src/net/sourceforge/plantuml/project3/GanttDiagram.java
+++ b/src/net/sourceforge/plantuml/project3/GanttDiagram.java
@@ -357,22 +357,55 @@ public class GanttDiagram extends AbstractPSystem implements Subject {
private void initMinMax() {
// min = tasks.values().iterator().next().getStart();
- max = tasks.values().iterator().next().getEnd();
- for (Task task : tasks.values()) {
- if (task instanceof TaskSeparator) {
- continue;
+ if (tasks.size() == 0) {
+ max = min.increment();
+ } else {
+ max = tasks.values().iterator().next().getEnd();
+ for (Task task : tasks.values()) {
+ if (task instanceof TaskSeparator) {
+ continue;
+ }
+ final Instant start = task.getStart();
+ final Instant end = task.getEnd();
+ // if (min.compareTo(start) > 0) {
+ // min = start;
+ // }
+ if (max.compareTo(end) < 0) {
+ max = end;
+ }
+ }
+ }
+ if (calendar != null) {
+ for (DayAsDate d : colorDays.keySet()) {
+ final Instant instant = calendar.fromDayAsDate(d);
+ if (instant.compareTo(max) > 0) {
+ max = instant;
+ }
}
- final Instant start = task.getStart();
- final Instant end = task.getEnd();
- // if (min.compareTo(start) > 0) {
- // min = start;
- // }
- if (max.compareTo(end) < 0) {
- max = end;
+ for (DayAsDate d : nameDays.keySet()) {
+ final Instant instant = calendar.fromDayAsDate(d);
+ if (instant.compareTo(max) > 0) {
+ max = instant;
+ }
}
}
}
+ public DayAsDate getThenDate() {
+ DayAsDate result = getStartingDate();
+ for (DayAsDate d : colorDays.keySet()) {
+ if (d.compareTo(result) > 0) {
+ result = d;
+ }
+ }
+ for (DayAsDate d : nameDays.keySet()) {
+ if (d.compareTo(result) > 0) {
+ result = d;
+ }
+ }
+ return result;
+ }
+
private void drawTasks(final UGraphic ug, TimeScale timeScale) {
for (Task task : tasks.values()) {
final TaskDraw draw = task.getTaskDraw();
@@ -494,6 +527,10 @@ public class GanttDiagram extends AbstractPSystem implements Subject {
return this.calendar.getStartingDate();
}
+ public int daysInWeek() {
+ return 7 - closedDayOfWeek.size();
+ }
+
public void closeDayOfWeek(DayOfWeek day) {
closedDayOfWeek.add(day);
}
@@ -541,6 +578,45 @@ public class GanttDiagram extends AbstractPSystem implements Subject {
private final Map<DayAsDate, HtmlColor> colorDays = new HashMap<DayAsDate, HtmlColor>();
private final Map<DayAsDate, String> nameDays = new HashMap<DayAsDate, String>();
+ public Moment getExistingMoment(String id) {
+ Moment result = getExistingTask(id);
+ if (result == null) {
+ DayAsDate start = null;
+ DayAsDate end = null;
+ for (Map.Entry<DayAsDate, String> ent : nameDays.entrySet()) {
+ if (ent.getValue().equalsIgnoreCase(id) == false) {
+ continue;
+ }
+ start = min(start, ent.getKey());
+ end = max(end, ent.getKey());
+ }
+ if (start != null) {
+ result = new MomentImpl(convert(start), convert(end));
+ }
+ }
+ return result;
+ }
+
+ private DayAsDate min(DayAsDate d1, DayAsDate d2) {
+ if (d1 == null) {
+ return d2;
+ }
+ if (d1.compareTo(d2) > 0) {
+ return d2;
+ }
+ return d1;
+ }
+
+ private DayAsDate max(DayAsDate d1, DayAsDate d2) {
+ if (d1 == null) {
+ return d2;
+ }
+ if (d1.compareTo(d2) < 0) {
+ return d2;
+ }
+ return d1;
+ }
+
public void colorDay(DayAsDate day, HtmlColor color) {
colorDays.put(day, color);
}
diff --git a/src/net/sourceforge/plantuml/project2/TaskContainer.java b/src/net/sourceforge/plantuml/project3/Moment.java
index d02ff1e..99525f1 100644
--- a/src/net/sourceforge/plantuml/project2/TaskContainer.java
+++ b/src/net/sourceforge/plantuml/project3/Moment.java
@@ -33,10 +33,12 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.project3;
-public interface TaskContainer {
+public interface Moment {
- public Task getTask(String code);
+ public Instant getStart();
+
+ public Instant getEnd();
}
diff --git a/src/net/sourceforge/plantuml/project2/TimeLine.java b/src/net/sourceforge/plantuml/project3/MomentImpl.java
index f94ee18..0c9888b 100644
--- a/src/net/sourceforge/plantuml/project2/TimeLine.java
+++ b/src/net/sourceforge/plantuml/project3/MomentImpl.java
@@ -33,16 +33,24 @@
*
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.project3;
-public interface TimeLine {
+public class MomentImpl implements Moment {
- public TimeElement next(TimeElement timeElement);
+ private final Instant start;
+ private final Instant end;
- public TimeElement previous(TimeElement timeElement);
+ public MomentImpl(Instant start, Instant end) {
+ this.start = start;
+ this.end = end;
+ }
- public TimeResolution getTimeResolution();
+ public Instant getStart() {
+ return start;
+ }
- public boolean isClosed(TimeElement timeElement);
+ public Instant getEnd() {
+ return end;
+ }
}
diff --git a/src/net/sourceforge/plantuml/project3/SubjectDaysAsDates.java b/src/net/sourceforge/plantuml/project3/SubjectDaysAsDates.java
index 5a9d63f..addd900 100644
--- a/src/net/sourceforge/plantuml/project3/SubjectDaysAsDates.java
+++ b/src/net/sourceforge/plantuml/project3/SubjectDaysAsDates.java
@@ -51,7 +51,7 @@ public class SubjectDaysAsDates implements SubjectPattern {
}
public IRegex toRegex() {
- return new RegexOr(regexTo(), regexAnd());
+ return new RegexOr(regexTo(), regexAnd(), regexThen());
}
@@ -79,22 +79,37 @@ public class SubjectDaysAsDates implements SubjectPattern {
new RegexLeaf("\\D"), //
new RegexLeaf("DAY3", "([\\d]{1,2})"), //
new RegexLeaf("[%s]+and[%s]+"), //
- new RegexLeaf("COUNT", "([\\d]+)"), //
+ new RegexLeaf("COUNT_AND", "([\\d]+)"), //
+ new RegexLeaf("[%s]+days?") //
+
+ );
+ }
+
+ private IRegex regexThen() {
+ return new RegexConcat( //
+ new RegexLeaf("then[%s]+"), //
+ new RegexLeaf("COUNT_THEN", "([\\d]+)"), //
new RegexLeaf("[%s]+days?") //
);
}
public Subject getSubject(GanttDiagram project, RegexResult arg) {
- final String count = arg.get("COUNT", 0);
- if (count == null) {
- final DayAsDate date1 = getDate(arg, "1");
- final DayAsDate date2 = getDate(arg, "2");
- return new DaysAsDates(date1, date2);
+ final String countAnd = arg.get("COUNT_AND", 0);
+ if (countAnd != null) {
+ final DayAsDate date3 = getDate(arg, "3");
+ final int nb = Integer.parseInt(countAnd);
+ return new DaysAsDates(project, date3, nb);
+ }
+ final String countThen = arg.get("COUNT_THEN", 0);
+ if (countThen != null) {
+ final DayAsDate date3 = project.getThenDate();
+ final int nb = Integer.parseInt(countThen);
+ return new DaysAsDates(project, date3, nb);
}
- final DayAsDate date3 = getDate(arg, "3");
- final int nb = Integer.parseInt(count);
- return new DaysAsDates(project, date3, nb);
+ final DayAsDate date1 = getDate(arg, "1");
+ final DayAsDate date2 = getDate(arg, "2");
+ return new DaysAsDates(date1, date2);
}
private DayAsDate getDate(RegexResult arg, String suffix) {
diff --git a/src/net/sourceforge/plantuml/project3/Task.java b/src/net/sourceforge/plantuml/project3/Task.java
index 770eb09..fc42f26 100644
--- a/src/net/sourceforge/plantuml/project3/Task.java
+++ b/src/net/sourceforge/plantuml/project3/Task.java
@@ -35,7 +35,7 @@
*/
package net.sourceforge.plantuml.project3;
-public interface Task extends Subject {
+public interface Task extends Subject, Moment {
public TaskCode getCode();
diff --git a/src/net/sourceforge/plantuml/project3/TaskInstant.java b/src/net/sourceforge/plantuml/project3/TaskInstant.java
index c74fd6d..6d40594 100644
--- a/src/net/sourceforge/plantuml/project3/TaskInstant.java
+++ b/src/net/sourceforge/plantuml/project3/TaskInstant.java
@@ -37,15 +37,15 @@ package net.sourceforge.plantuml.project3;
public class TaskInstant implements Complement {
- private final Task task;
+ private final Moment task;
private final TaskAttribute attribute;
private final int delta;
- public TaskInstant(Task task, TaskAttribute attribute) {
+ public TaskInstant(Moment task, TaskAttribute attribute) {
this(task, attribute, 0);
}
- private TaskInstant(Task task, TaskAttribute attribute, int delta) {
+ private TaskInstant(Moment task, TaskAttribute attribute, int delta) {
this.task = task;
this.attribute = attribute;
this.delta = delta;
@@ -97,10 +97,14 @@ public class TaskInstant implements Complement {
return attribute.toString() + " of " + task;
}
- public final Task getTask() {
+ public final Moment getMoment() {
return task;
}
+ public final boolean isTask() {
+ return task instanceof Task;
+ }
+
public final TaskAttribute getAttribute() {
return attribute;
}
diff --git a/src/net/sourceforge/plantuml/project3/VerbTaskStarts.java b/src/net/sourceforge/plantuml/project3/VerbTaskStarts.java
index 3cec23a..e8e7445 100644
--- a/src/net/sourceforge/plantuml/project3/VerbTaskStarts.java
+++ b/src/net/sourceforge/plantuml/project3/VerbTaskStarts.java
@@ -59,7 +59,9 @@ public class VerbTaskStarts implements VerbPattern {
final Task task = (Task) subject;
final TaskInstant when = (TaskInstant) complement;
task.setStart(when.getInstantPrecise());
- project.addContraint(new GanttConstraint(when, new TaskInstant(task, TaskAttribute.START)));
+ if (when.isTask()) {
+ project.addContraint(new GanttConstraint(when, new TaskInstant(task, TaskAttribute.START)));
+ }
return CommandExecutionResult.ok();
}
diff --git a/src/net/sourceforge/plantuml/salt/Dictionary.java b/src/net/sourceforge/plantuml/salt/Dictionary.java
index a549558..2c12abc 100644
--- a/src/net/sourceforge/plantuml/salt/Dictionary.java
+++ b/src/net/sourceforge/plantuml/salt/Dictionary.java
@@ -39,12 +39,15 @@ import java.util.HashMap;
import java.util.Map;
import net.sourceforge.plantuml.ISkinSimple;
+import net.sourceforge.plantuml.LineBreakStrategy;
import net.sourceforge.plantuml.SpriteContainer;
import net.sourceforge.plantuml.creole.CommandCreoleMonospaced;
import net.sourceforge.plantuml.graphic.HtmlColorSetSimple;
import net.sourceforge.plantuml.graphic.IHtmlColorSet;
import net.sourceforge.plantuml.salt.element.Element;
import net.sourceforge.plantuml.salt.element.WrappedElement;
+import net.sourceforge.plantuml.ugraphic.ColorMapper;
+import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
public class Dictionary implements SpriteContainer, ISkinSimple {
@@ -102,4 +105,12 @@ public class Dictionary implements SpriteContainer, ISkinSimple {
}
+ public LineBreakStrategy wrapWidth() {
+ return LineBreakStrategy.NONE;
+ }
+
+ public ColorMapper getColorMapper() {
+ return new ColorMapperIdentity();
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/sequencediagram/GroupingLeaf.java b/src/net/sourceforge/plantuml/sequencediagram/GroupingLeaf.java
index 994afb5..0e8f7f0 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/GroupingLeaf.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/GroupingLeaf.java
@@ -113,7 +113,6 @@ final public class GroupingLeaf extends Grouping implements EventWithDeactivate
}
public boolean addLifeEvent(LifeEvent lifeEvent) {
- lifeEvent.setLinkedToGroupingEnd(true);
return true;
}
diff --git a/src/net/sourceforge/plantuml/sequencediagram/LifeEvent.java b/src/net/sourceforge/plantuml/sequencediagram/LifeEvent.java
index a887b93..131d52d 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/LifeEvent.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/LifeEvent.java
@@ -87,10 +87,6 @@ public class LifeEvent extends AbstractEvent implements Event {
return this.p == p && type == LifeEventType.DESTROY;
}
- // public double getStrangePos() {
- // return message.getPosYendLevel();
- // }
- //
private AbstractMessage message;
public void setMessage(AbstractMessage message) {
@@ -101,14 +97,4 @@ public class LifeEvent extends AbstractEvent implements Event {
return message;
}
- // private boolean linkedToGroupingEnd;
- //
- // // public boolean isLinkedToGroupingEnd() {
- // // return linkedToGroupingEnd;
- // // }
-
- public void setLinkedToGroupingEnd(boolean linkedToGroupingEnd) {
- // this.linkedToGroupingEnd = linkedToGroupingEnd;
- }
-
}
diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java
index ba86a48..4f8fa0b 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandArrow.java
@@ -152,16 +152,19 @@ public class CommandArrow extends SingleLineCommand2<SequenceDiagram> {
final boolean hasDressing2 = contains(dressing2, ">", "\\", "/", "x");
final boolean hasDressing1 = contains(dressing1, "x", "<", "\\", "/");
+ final boolean reverseDefine;
if (hasDressing2) {
p1 = getOrCreateParticipant(diagram, arg, "PART1");
p2 = getOrCreateParticipant(diagram, arg, "PART2");
circleAtStart = dressing1.contains("o");
circleAtEnd = dressing2.contains("o");
+ reverseDefine = false;
} else if (hasDressing1) {
p2 = getOrCreateParticipant(diagram, arg, "PART1");
p1 = getOrCreateParticipant(diagram, arg, "PART2");
circleAtStart = dressing2.contains("o");
circleAtEnd = dressing1.contains("o");
+ reverseDefine = true;
} else {
return CommandExecutionResult.error("Illegal sequence arrow");
@@ -202,11 +205,13 @@ public class CommandArrow extends SingleLineCommand2<SequenceDiagram> {
}
if (dressing1.contains("x")) {
config = config.withHead2(ArrowHead.CROSSX);
-
}
if (dressing2.contains("x")) {
config = config.withHead2(ArrowHead.CROSSX);
}
+ if (reverseDefine) {
+ config = config.reverseDefine();
+ }
config = applyStyle(arg.getLazzy("ARROW_STYLE", 0), config);
diff --git a/src/net/sourceforge/plantuml/sequencediagram/command/CommandReturn.java b/src/net/sourceforge/plantuml/sequencediagram/command/CommandReturn.java
index 961d61d..50f21da 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/command/CommandReturn.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/command/CommandReturn.java
@@ -35,10 +35,11 @@
*/
package net.sourceforge.plantuml.sequencediagram.command;
-import java.util.List;
-
import net.sourceforge.plantuml.command.CommandExecutionResult;
-import net.sourceforge.plantuml.command.SingleLineCommand;
+import net.sourceforge.plantuml.command.SingleLineCommand2;
+import net.sourceforge.plantuml.command.regex.RegexConcat;
+import net.sourceforge.plantuml.command.regex.RegexLeaf;
+import net.sourceforge.plantuml.command.regex.RegexResult;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.sequencediagram.EventWithDeactivate;
import net.sourceforge.plantuml.sequencediagram.LifeEventType;
@@ -47,34 +48,48 @@ import net.sourceforge.plantuml.sequencediagram.SequenceDiagram;
import net.sourceforge.plantuml.skin.ArrowBody;
import net.sourceforge.plantuml.skin.ArrowConfiguration;
-public class CommandReturn extends SingleLineCommand<SequenceDiagram> {
+public class CommandReturn extends SingleLineCommand2<SequenceDiagram> {
public CommandReturn() {
- super("(?i)^return[%s]*(.*)$");
+ super(getRegexConcat());
+ }
+
+ private static RegexConcat getRegexConcat() {
+ return new RegexConcat(new RegexLeaf("^"), //
+ new RegexLeaf("PARALLEL", "(&%s*)?"), //
+ new RegexLeaf("[%s]*"), //
+ new RegexLeaf("return[%s]*"), //
+ new RegexLeaf("MESSAGE", "(.*)"), //
+ new RegexLeaf("$"));
}
@Override
- protected CommandExecutionResult executeArg(SequenceDiagram sequenceDiagram, List<String> arg) {
+ protected CommandExecutionResult executeArg(SequenceDiagram sequenceDiagram, RegexResult arg) {
- Message message = sequenceDiagram.getActivatingMessage();
+ Message message1 = sequenceDiagram.getActivatingMessage();
boolean doDeactivation = true;
- if (message == null) {
+ if (message1 == null) {
final EventWithDeactivate last = sequenceDiagram.getLastEventWithDeactivate();
if (last instanceof Message == false) {
return CommandExecutionResult.error("Nowhere to return to.");
}
- message = (Message) last;
+ message1 = (Message) last;
doDeactivation = false;
}
- final ArrowConfiguration arrow = message.getArrowConfiguration().withBody(ArrowBody.DOTTED);
+ final ArrowConfiguration arrow = message1.getArrowConfiguration().withBody(ArrowBody.DOTTED);
- sequenceDiagram.addMessage(
- new Message(message.getParticipant2(), message.getParticipant1(), Display.getWithNewlines(arg
- .get(0)), arrow, sequenceDiagram.getNextMessageNumber()));
+ final Display display = Display.getWithNewlines(arg.get("MESSAGE", 0));
+ final Message message2 = new Message(message1.getParticipant2(), message1.getParticipant1(), display, arrow,
+ sequenceDiagram.getNextMessageNumber());
+ final boolean parallel = arg.get("PARALLEL", 0) != null;
+ if (parallel) {
+ message2.goParallel();
+ }
+ sequenceDiagram.addMessage(message2);
if (doDeactivation) {
- final String error = sequenceDiagram.activate(message.getParticipant2(), LifeEventType.DEACTIVATE, null);
+ final String error = sequenceDiagram.activate(message1.getParticipant2(), LifeEventType.DEACTIVATE, null);
if (error != null) {
return CommandExecutionResult.error(error);
}
diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java
index 13392dc..9be36c0 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSet.java
@@ -36,6 +36,7 @@
package net.sourceforge.plantuml.sequencediagram.graphic;
import java.awt.geom.Dimension2D;
+import java.awt.geom.Rectangle2D;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -50,7 +51,9 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineParam;
import net.sourceforge.plantuml.SkinParamBackcolored;
import net.sourceforge.plantuml.Url;
+import net.sourceforge.plantuml.graphic.InnerStrategy;
import net.sourceforge.plantuml.graphic.StringBounder;
+import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.sequencediagram.Englober;
import net.sourceforge.plantuml.sequencediagram.Event;
import net.sourceforge.plantuml.sequencediagram.Newpage;
@@ -62,6 +65,7 @@ import net.sourceforge.plantuml.skin.ComponentType;
import net.sourceforge.plantuml.skin.Context2D;
import net.sourceforge.plantuml.skin.SimpleContext2D;
import net.sourceforge.plantuml.skin.Skin;
+import net.sourceforge.plantuml.ugraphic.MinMax;
import net.sourceforge.plantuml.ugraphic.UClip;
import net.sourceforge.plantuml.ugraphic.UGraphic;
import net.sourceforge.plantuml.ugraphic.UStroke;
@@ -244,30 +248,55 @@ public class DrawableSet {
return dimension;
}
+ TextBlock asTextBlock(final double delta, final double width, final Page page, final boolean showTail) {
+ return new TextBlock() {
+
+ public void drawU(UGraphic ug) {
+ drawU22(ug, delta, width, page, showTail);
+ }
+
+ public Dimension2D calculateDimension(StringBounder stringBounder) {
+ final double height = page.getHeight();
+ return new Dimension2DDouble(width, height);
+ }
+
+ public MinMax getMinMax(StringBounder stringBounder) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Rectangle2D getInnerPosition(String member, StringBounder stringBounder, InnerStrategy strategy) {
+ throw new UnsupportedOperationException();
+ }
+
+ };
+
+ }
+
void drawU22(final UGraphic ug, final double delta, double width, Page page, boolean showTail) {
- // final UGraphic ugOrig = ug;
final double height = page.getHeight();
final UGraphic ugTranslated = clipAndTranslate2(delta, width, page, ug);
final SimpleContext2D context = new SimpleContext2D(true);
this.drawEnglobers(ug, height - MARGIN_FOR_ENGLOBERS1, context);
this.drawPlaygroundU(ugTranslated, context);
- // ug = ugOrig;
-
this.drawLineU22(ug, showTail, page);
this.drawHeadTailU(ug, page, showTail ? height - getTailHeight(ug.getStringBounder(), true) : 0);
- // ug = clipAndTranslate2(delta, width, page, ug);
this.drawPlaygroundU(ugTranslated, new SimpleContext2D(false));
}
private UGraphic clipAndTranslate2(final double delta, double width, Page p, UGraphic ug) {
ug = ug.apply(new UClip(0, p.getBodyRelativePosition(), width, p.getBodyHeight() + 1));
+ ug = ug.apply(getTranslate4(delta));
+ return ug;
+ }
+
+ private UTranslate getTranslate4(final double delta) {
if (delta > 0) {
- ug = ug.apply(new UTranslate(0, -delta));
+ return new UTranslate(0, -delta);
}
- return ug;
+ return new UTranslate();
}
private void drawLineU22(UGraphic ug, boolean showTail, Page page) {
diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSetInitializer.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSetInitializer.java
index af988a9..822d889 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSetInitializer.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/DrawableSetInitializer.java
@@ -626,7 +626,7 @@ class DrawableSetInitializer {
drawableSet.getSkinParam(), null);
final LifeLine lifeLine = new LifeLine(box, comp.getPreferredWidth(stringBounder), drawableSet.getSkinParam()
- .shadowing());
+ .shadowing(p.getStereotype()));
drawableSet.setLivingParticipantBox(p, new LivingParticipantBox(box, lifeLine));
this.freeX = box.getMaxX(stringBounder);
diff --git a/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java b/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java
index 80dc784..e4e4b13 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/graphic/SequenceDiagramFileMakerPuma2.java
@@ -147,7 +147,8 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
final SequenceDiagramArea area = new SequenceDiagramArea(fullDimension.getWidth(), page.getHeight());
final TextBlock compTitle;
- final TextBlock caption = new AnnotatedWorker(diagram, diagram.getSkinParam()).getCaption();
+ final AnnotatedWorker annotatedWorker = new AnnotatedWorker(diagram, diagram.getSkinParam(), stringBounder);
+ final TextBlock caption = annotatedWorker.getCaption();
area.setCaptionArea(caption.calculateDimension(stringBounder));
if (Display.isNull(page.getTitle())) {
@@ -211,8 +212,12 @@ public class SequenceDiagramFileMakerPuma2 implements FileMaker {
if (legendTop) {
sequenceAreaY += legendBlock.calculateDimension(ug.getStringBounder()).getHeight();
}
- drawableSet.drawU22(ug.apply(new UTranslate(area.getSequenceAreaX() + delta1 / 2, sequenceAreaY)),
- delta, fullDimension.getWidth(), page, diagram.isShowFootbox());
+ final UTranslate forCore = new UTranslate(area.getSequenceAreaX() + delta1 / 2, sequenceAreaY);
+ TextBlock core = drawableSet.asTextBlock(delta, fullDimension.getWidth(), page, diagram.isShowFootbox());
+ core = annotatedWorker.addFrame(core);
+ core.drawU(ug.apply(forCore));
+ // drawableSet.drawU22(ug.apply(forCore), delta, fullDimension.getWidth(), page,
+ // diagram.isShowFootbox());
drawHeader(area, ug, index);
drawFooter(area, ug, index);
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationExoTile.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationExoTile.java
index fd168d6..2f8569d 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationExoTile.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationExoTile.java
@@ -82,7 +82,7 @@ public class CommunicationExoTile implements TileWithUpdateStairs {
arrowConfiguration = arrowConfiguration.reverse();
}
final Component comp = skin.createComponent(ComponentType.ARROW, arrowConfiguration, skinParam,
- message.getLabel());
+ message.getLabelNumbered());
return comp;
}
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileSelf.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileSelf.java
index 894feb6..8a0b0b8 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileSelf.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/CommunicationTileSelf.java
@@ -40,6 +40,7 @@ import java.awt.geom.Point2D;
import java.util.Iterator;
import net.sourceforge.plantuml.ISkinParam;
+import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.real.Real;
import net.sourceforge.plantuml.sequencediagram.Event;
@@ -101,10 +102,10 @@ public class CommunicationTileSelf implements TileWithUpdateStairs {
if (message.isActivate()) {
livingSpace1.addStepForLivebox(getEvent(), y + p2.getY());
- System.err.println("CommunicationTileSelf::updateStairs activate y=" + (y + p2.getY()) + " " + message);
+ Log.info("CommunicationTileSelf::updateStairs activate y=" + (y + p2.getY()) + " " + message);
} else if (message.isDeactivate()) {
livingSpace1.addStepForLivebox(getEvent(), y + p1.getY());
- System.err.println("CommunicationTileSelf::updateStairs deactivate y=" + (y + p1.getY()) + " " + message);
+ Log.info("CommunicationTileSelf::updateStairs deactivate y=" + (y + p1.getY()) + " " + message);
}
// livingSpace1.addStep(y + arrowY, level1);
@@ -121,8 +122,7 @@ public class CommunicationTileSelf implements TileWithUpdateStairs {
double x1 = getPoint1(stringBounder).getCurrentValue();
final int levelIgnore = livingSpace1.getLevelAt(this, EventsHistoryMode.IGNORE_FUTURE_ACTIVATE);
final int levelConsidere = livingSpace1.getLevelAt(this, EventsHistoryMode.CONSIDERE_FUTURE_DEACTIVATE);
- System.err.println("CommunicationTileSelf::drawU levelIgnore=" + levelIgnore + " levelConsidere="
- + levelConsidere);
+ Log.info("CommunicationTileSelf::drawU levelIgnore=" + levelIgnore + " levelConsidere=" + levelConsidere);
x1 += CommunicationTile.LIVE_DELTA_SIZE * levelIgnore;
if (levelIgnore < levelConsidere) {
x1 += CommunicationTile.LIVE_DELTA_SIZE;
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/EmptyTile.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/EmptyTile.java
index adb8779..a377aac 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/EmptyTile.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/EmptyTile.java
@@ -45,12 +45,11 @@ import net.sourceforge.plantuml.ugraphic.UGraphic;
public class EmptyTile implements Tile {
private final double height;
+ private final Tile position;
- private final Real origin;
-
- public EmptyTile(double height, TileArguments tileArguments) {
- this.origin = tileArguments.getOrigin();
+ public EmptyTile(double height, Tile position) {
this.height = height;
+ this.position = position;
}
public void drawU(UGraphic ug) {
@@ -64,11 +63,11 @@ public class EmptyTile implements Tile {
}
public Real getMinX(StringBounder stringBounder) {
- return origin;
+ return position.getMinX(stringBounder);
}
public Real getMaxX(StringBounder stringBounder) {
- return origin;
+ return position.getMaxX(stringBounder);
}
public Event getEvent() {
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/EventsHistory.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/EventsHistory.java
index 887f604..5bae2e1 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/EventsHistory.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/EventsHistory.java
@@ -135,6 +135,12 @@ public class EventsHistory {
}
private SymbolContext getActivateColor(Event event) {
+ if (event instanceof LifeEvent) {
+ final LifeEvent le = (LifeEvent) event;
+ if (le.isActivate()) {
+ return le.getSpecificColors();
+ }
+ }
for (Iterator<Event> it = events.iterator(); it.hasNext();) {
final Event current = it.next();
if (event != current) {
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/LiveBoxFinder.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/LiveBoxFinder.java
index c1ba862..1644fb4 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/LiveBoxFinder.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/LiveBoxFinder.java
@@ -112,7 +112,7 @@ public class LiveBoxFinder implements UGraphic {
} else if (shape instanceof NotesTile) {
// Nothing ?
} else if (shape instanceof Tile) {
- Log.error("OtherTile " + shape);
+ Log.info("OtherTile " + shape);
} else {
throw new UnsupportedOperationException(shape.getClass().getName());
}
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java
index b3edc67..4f2b360 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/SequenceDiagramFileMakerTeoz.java
@@ -84,7 +84,7 @@ public class SequenceDiagramFileMakerTeoz implements FileMaker {
this.skin = skin;
this.footer = getFooterOrHeader(FontParam.FOOTER);
this.header = getFooterOrHeader(FontParam.HEADER);
- this.annotatedWorker = new AnnotatedWorker(sequenceDiagram, sequenceDiagram.getSkinParam());
+ this.annotatedWorker = new AnnotatedWorker(sequenceDiagram, sequenceDiagram.getSkinParam(), stringBounder);
this.main = new MainTileAdapter(createMainTile());
this.min1 = ((MainTileAdapter) main).getMinX(stringBounder);
diff --git a/src/net/sourceforge/plantuml/sequencediagram/teoz/TileBuilder.java b/src/net/sourceforge/plantuml/sequencediagram/teoz/TileBuilder.java
index 86d8c94..c5a0b1d 100644
--- a/src/net/sourceforge/plantuml/sequencediagram/teoz/TileBuilder.java
+++ b/src/net/sourceforge/plantuml/sequencediagram/teoz/TileBuilder.java
@@ -139,10 +139,11 @@ public class TileBuilder {
tiles.add(new DividerTile(divider, tileArguments));
} else if (ev instanceof GroupingStart) {
final GroupingStart start = (GroupingStart) ev;
- tiles.add(new EmptyTile(4, tileArguments));
- tiles.add(new GroupingTile(it, start, tileArguments.withBackColorGeneral(start.getBackColorElement(),
- start.getBackColorGeneral()), tileArguments));
- tiles.add(new EmptyTile(4, tileArguments));
+ final GroupingTile groupingTile = new GroupingTile(it, start, tileArguments.withBackColorGeneral(
+ start.getBackColorElement(), start.getBackColorGeneral()), tileArguments);
+ tiles.add(new EmptyTile(4, groupingTile));
+ tiles.add(groupingTile);
+ tiles.add(new EmptyTile(4, groupingTile));
// tiles.add(TileUtils.withMargin(tile, 0, 0, 4, 4);
} else if (ev instanceof GroupingLeaf && ((GroupingLeaf) ev).getType() == GroupingType.ELSE) {
final GroupingLeaf anElse = (GroupingLeaf) ev;
diff --git a/src/net/sourceforge/plantuml/skin/ArrowConfiguration.java b/src/net/sourceforge/plantuml/skin/ArrowConfiguration.java
index 333f061..fe5fa75 100644
--- a/src/net/sourceforge/plantuml/skin/ArrowConfiguration.java
+++ b/src/net/sourceforge/plantuml/skin/ArrowConfiguration.java
@@ -53,12 +53,15 @@ public class ArrowConfiguration {
private final boolean isSelf;
private final double thickness;
+ private final boolean reverseDefine;
private ArrowConfiguration(ArrowBody body, ArrowDressing dressing1, ArrowDressing dressing2,
- ArrowDecoration decoration1, ArrowDecoration decoration2, HtmlColor color, boolean isSelf, double thickness) {
+ ArrowDecoration decoration1, ArrowDecoration decoration2, HtmlColor color, boolean isSelf,
+ double thickness, boolean reverseDefine) {
if (body == null || dressing1 == null || dressing2 == null) {
throw new IllegalArgumentException();
}
+ this.reverseDefine = reverseDefine;
this.thickness = thickness;
this.body = body;
this.dressing1 = dressing1;
@@ -81,19 +84,19 @@ public class ArrowConfiguration {
public static ArrowConfiguration withDirectionNormal() {
return new ArrowConfiguration(ArrowBody.NORMAL, ArrowDressing.create(), ArrowDressing.create().withHead(
- ArrowHead.NORMAL), ArrowDecoration.NONE, ArrowDecoration.NONE, null, false, 1);
+ ArrowHead.NORMAL), ArrowDecoration.NONE, ArrowDecoration.NONE, null, false, 1, false);
}
public static ArrowConfiguration withDirectionBoth() {
return new ArrowConfiguration(ArrowBody.NORMAL, ArrowDressing.create().withHead(ArrowHead.NORMAL),
ArrowDressing.create().withHead(ArrowHead.NORMAL), ArrowDecoration.NONE, ArrowDecoration.NONE, null,
- false, 1);
+ false, 1, false);
}
public static ArrowConfiguration withDirectionSelf() {
return new ArrowConfiguration(ArrowBody.NORMAL, ArrowDressing.create().withHead(ArrowHead.NORMAL),
ArrowDressing.create().withHead(ArrowHead.NORMAL), ArrowDecoration.NONE, ArrowDecoration.NONE, null,
- true, 1);
+ true, 1, false);
}
public static ArrowConfiguration withDirectionReverse() {
@@ -101,22 +104,25 @@ public class ArrowConfiguration {
}
public ArrowConfiguration reverse() {
- return new ArrowConfiguration(body, dressing2, dressing1, decoration2, decoration1, color, isSelf, thickness);
+ return new ArrowConfiguration(body, dressing2, dressing1, decoration2, decoration1, color, isSelf, thickness,
+ reverseDefine);
}
public ArrowConfiguration self() {
- return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, true, thickness);
+ return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, true, thickness,
+ reverseDefine);
}
public ArrowConfiguration withBody(ArrowBody type) {
- return new ArrowConfiguration(type, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness);
+ return new ArrowConfiguration(type, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness,
+ reverseDefine);
}
public ArrowConfiguration withHead(ArrowHead head) {
final ArrowDressing newDressing1 = addHead(dressing1, head);
final ArrowDressing newDressing2 = addHead(dressing2, head);
return new ArrowConfiguration(body, newDressing1, newDressing2, decoration1, decoration2, color, isSelf,
- thickness);
+ thickness, reverseDefine);
}
private static ArrowDressing addHead(ArrowDressing dressing, ArrowHead head) {
@@ -128,33 +134,36 @@ public class ArrowConfiguration {
public ArrowConfiguration withHead1(ArrowHead head) {
return new ArrowConfiguration(body, dressing1.withHead(head), dressing2, decoration1, decoration2, color,
- isSelf, thickness);
+ isSelf, thickness, reverseDefine);
}
public ArrowConfiguration withHead2(ArrowHead head) {
return new ArrowConfiguration(body, dressing1, dressing2.withHead(head), decoration1, decoration2, color,
- isSelf, thickness);
+ isSelf, thickness, reverseDefine);
}
public ArrowConfiguration withPart(ArrowPart part) {
if (dressing2.getHead() != ArrowHead.NONE) {
return new ArrowConfiguration(body, dressing1, dressing2.withPart(part), decoration1, decoration2, color,
- isSelf, thickness);
+ isSelf, thickness, reverseDefine);
}
return new ArrowConfiguration(body, dressing1.withPart(part), dressing2, decoration1, decoration2, color,
- isSelf, thickness);
+ isSelf, thickness, reverseDefine);
}
public ArrowConfiguration withDecoration1(ArrowDecoration decoration1) {
- return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness);
+ return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness,
+ reverseDefine);
}
public ArrowConfiguration withDecoration2(ArrowDecoration decoration2) {
- return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness);
+ return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness,
+ reverseDefine);
}
public ArrowConfiguration withColor(HtmlColor color) {
- return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness);
+ return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness,
+ reverseDefine);
}
public final ArrowDecoration getDecoration1() {
@@ -236,7 +245,17 @@ public class ArrowConfiguration {
}
public ArrowConfiguration withThickness(double thickness) {
- return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness);
+ return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness,
+ reverseDefine);
+ }
+
+ public ArrowConfiguration reverseDefine() {
+ return new ArrowConfiguration(body, dressing1, dressing2, decoration1, decoration2, color, isSelf, thickness,
+ !reverseDefine);
+ }
+
+ public final boolean isReverseDefine() {
+ return reverseDefine;
}
}
diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java
index f9bf9f4..5c78dd6 100644
--- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java
+++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNote.java
@@ -36,7 +36,6 @@
package net.sourceforge.plantuml.skin.rose;
import net.sourceforge.plantuml.ISkinSimple;
-import net.sourceforge.plantuml.LineBreakStrategy;
import net.sourceforge.plantuml.creole.Stencil;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
@@ -61,7 +60,7 @@ final public class ComponentRoseNote extends AbstractTextualComponent implements
public ComponentRoseNote(SymbolContext symbolContext, FontConfiguration font, Display strings, double paddingX,
double paddingY, ISkinSimple spriteContainer, double roundCorner, HorizontalAlignment horizontalAlignment) {
- super(LineBreakStrategy.NONE, strings, font, horizontalAlignment,
+ super(spriteContainer.wrapWidth(), strings, font, horizontalAlignment,
horizontalAlignment == HorizontalAlignment.CENTER ? 15 : 6, 15, 5, spriteContainer, true, null, null);
this.roundCorner = roundCorner;
this.paddingX = paddingX;
diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java
index 6ce8956..6b68d01 100644
--- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java
+++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteBox.java
@@ -36,7 +36,6 @@
package net.sourceforge.plantuml.skin.rose;
import net.sourceforge.plantuml.ISkinSimple;
-import net.sourceforge.plantuml.LineBreakStrategy;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
@@ -54,8 +53,9 @@ final public class ComponentRoseNoteBox extends AbstractTextualComponent {
private final SymbolContext symbolContext;
public ComponentRoseNoteBox(SymbolContext symbolContext, FontConfiguration font, Display strings,
- ISkinSimple spriteContainer) {
- super(LineBreakStrategy.NONE, strings, font, HorizontalAlignment.LEFT, 4, 4, 4, spriteContainer, false, null, null);
+ ISkinSimple spriteContainer, HorizontalAlignment alignment) {
+ super(spriteContainer.wrapWidth(), strings, font, alignment, 4, 4, 4, spriteContainer, false,
+ null, null);
this.symbolContext = symbolContext;
}
diff --git a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java
index cfbb938..59b2ce7 100644
--- a/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java
+++ b/src/net/sourceforge/plantuml/skin/rose/ComponentRoseNoteHexagonal.java
@@ -56,8 +56,8 @@ final public class ComponentRoseNoteHexagonal extends AbstractTextualComponent {
public ComponentRoseNoteHexagonal(SymbolContext symbolContext, FontConfiguration font, Display strings,
- ISkinSimple spriteContainer) {
- super(LineBreakStrategy.NONE, strings, font, HorizontalAlignment.LEFT, 12, 12, 4, spriteContainer, false, null, null);
+ ISkinSimple spriteContainer, HorizontalAlignment alignment) {
+ super(LineBreakStrategy.NONE, strings, font, alignment, 12, 12, 4, spriteContainer, false, null, null);
this.symbolContext = symbolContext;
}
diff --git a/src/net/sourceforge/plantuml/skin/rose/Rose.java b/src/net/sourceforge/plantuml/skin/rose/Rose.java
index 784aa18..c049493 100644
--- a/src/net/sourceforge/plantuml/skin/rose/Rose.java
+++ b/src/net/sourceforge/plantuml/skin/rose/Rose.java
@@ -100,9 +100,9 @@ public class Rose implements Skin {
config, param, param.maxMessageSize(), param.strictUmlStyle() == false);
}
final HorizontalAlignment messageHorizontalAlignment = param.getHorizontalAlignment(
- AlignmentParam.sequenceMessageAlignment, config.getArrowDirection());
+ AlignmentParam.sequenceMessageAlignment, config.getArrowDirection(), config.isReverseDefine());
final HorizontalAlignment textHorizontalAlignment = param.getHorizontalAlignment(
- AlignmentParam.sequenceMessageTextAlignment, config.getArrowDirection());
+ AlignmentParam.sequenceMessageTextAlignment, config.getArrowDirection(), false);
return new ComponentRoseArrow(sequenceArrow, getUFont2(param, FontParam.ARROW), stringsToDisplay, config,
messageHorizontalAlignment, param, textHorizontalAlignment, param.maxMessageSize(),
param.strictUmlStyle() == false, param.responseMessageBelowArrow());
@@ -198,17 +198,19 @@ public class Rose implements Skin {
FontParam.DATABASE_STEREOTYPE));
}
if (type == ComponentType.NOTE) {
- final HorizontalAlignment alignment = param.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null);
+ final HorizontalAlignment alignment = param.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null, false);
return new ComponentRoseNote(getSymbolContext(param, ColorParam.noteBorder), getUFont2(param,
FontParam.NOTE), stringsToDisplay, paddingX, paddingY, param, roundCorner, alignment);
}
if (type == ComponentType.NOTE_HEXAGONAL) {
+ final HorizontalAlignment alignment = param.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null, false);
return new ComponentRoseNoteHexagonal(getSymbolContext(param, ColorParam.noteBorder), getUFont2(param,
- FontParam.NOTE), stringsToDisplay, param);
+ FontParam.NOTE), stringsToDisplay, param, alignment);
}
if (type == ComponentType.NOTE_BOX) {
+ final HorizontalAlignment alignment = param.getHorizontalAlignment(AlignmentParam.noteTextAlignment, null, false);
return new ComponentRoseNoteBox(getSymbolContext(param, ColorParam.noteBorder), getUFont2(param,
- FontParam.NOTE), stringsToDisplay, param);
+ FontParam.NOTE), stringsToDisplay, param, alignment);
}
final FontConfiguration bigFont = getUFont2(param, FontParam.SEQUENCE_GROUP_HEADER);
if (type == ComponentType.GROUPING_HEADER) {
@@ -259,7 +261,7 @@ public class Rose implements Skin {
if (type == ComponentType.REFERENCE) {
return new ComponentRoseReference(getUFont2(param, FontParam.SEQUENCE_REFERENCE), getSymbolContext(param,
ColorParam.sequenceReferenceBorder), bigFont, stringsToDisplay, param.getHorizontalAlignment(
- AlignmentParam.sequenceReferenceAlignment, null), param, getHtmlColor(param,
+ AlignmentParam.sequenceReferenceAlignment, null, false), param, getHtmlColor(param,
ColorParam.sequenceReferenceBackground));
}
// if (type == ComponentType.TITLE) {
@@ -279,7 +281,7 @@ public class Rose implements Skin {
}
private double deltaShadow(ISkinParam param) {
- return param.shadowing() ? 4.0 : 0;
+ return param.shadowing(null) ? 4.0 : 0;
}
private SymbolContext getSymbolContext(ISkinParam param, ColorParam color) {
diff --git a/src/net/sourceforge/plantuml/svek/Cluster.java b/src/net/sourceforge/plantuml/svek/Cluster.java
index f1c2d99..4b6dfd5 100644
--- a/src/net/sourceforge/plantuml/svek/Cluster.java
+++ b/src/net/sourceforge/plantuml/svek/Cluster.java
@@ -354,8 +354,8 @@ public class Cluster implements Moveable {
}
}
- final boolean shadowing = group.getUSymbol() == null ? skinParam2.shadowing() : skinParam2.shadowing2(group
- .getUSymbol().getSkinParameter());
+ final boolean shadowing = group.getUSymbol() == null ? skinParam2.shadowing2(group.getStereotype(), USymbol.PACKAGE.getSkinParameter())
+ : skinParam2.shadowing2(group.getStereotype(), group.getUSymbol().getSkinParameter());
if (ztitle != null || zstereo != null) {
final HtmlColor back = getBackColor(getBackColor(umlDiagramType), skinParam2, group.getStereotype());
final double roundCorner = group.getUSymbol() == null ? 0 : group.getUSymbol().getSkinParameter()
@@ -365,7 +365,7 @@ public class Cluster implements Moveable {
final ClusterDecoration decoration = new ClusterDecoration(style, group.getUSymbol(), ztitle, zstereo,
minX, minY, maxX, maxY, stroke2);
decoration.drawU(ug, back, borderColor, shadowing, roundCorner,
- skinParam2.getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null));
+ skinParam2.getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false));
return;
}
final URectangle rect = new URectangle(maxX - minX, maxY - minY);
@@ -462,7 +462,7 @@ public class Cluster implements Moveable {
final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight();
final RoundedContainer r = new RoundedContainer(total, suppY, attributeHeight
+ (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, stateBack, background, stroke);
- r.drawU(ug.apply(new UTranslate(minX, minY)), skinParam2.shadowing());
+ r.drawU(ug.apply(new UTranslate(minX, minY)), skinParam2.shadowing(group.getStereotype()));
if (ztitle != null) {
ztitle.drawU(ug.apply(new UTranslate(xTitle, yTitle)));
@@ -741,8 +741,8 @@ public class Cluster implements Moveable {
Line.appendTable(sblabel, getTitleAndAttributeWidth(), getTitleAndAttributeHeight() - 5, colorTitle);
sblabel.append(">");
label = sblabel.toString();
- final HorizontalAlignment align = skinParam
- .getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null);
+ final HorizontalAlignment align = skinParam.getHorizontalAlignment(AlignmentParam.packageTitleAlignment,
+ null, false);
sb.append("labeljust=\"" + align.getGraphVizValue() + "\";");
} else {
label = "\"\"";
diff --git a/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java b/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java
index 5c25be4..2d5e16f 100644
--- a/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java
+++ b/src/net/sourceforge/plantuml/svek/CucaDiagramFileMakerSvek.java
@@ -75,12 +75,12 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
}
}
- private DotDataImageBuilder createDotDataImageBuilder(DotMode dotMode, StringBounder stringBounder) {
+ private GeneralImageBuilder createDotDataImageBuilder(DotMode dotMode, StringBounder stringBounder) {
final DotData dotData = new DotData(diagram.getEntityFactory().getRootGroup(), getOrderedLinks(),
diagram.getLeafsvalues(), diagram.getUmlDiagramType(), diagram.getSkinParam(), diagram, diagram,
diagram.getColorMapper(), diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(),
dotMode, diagram.getNamespaceSeparator(), diagram.getPragma());
- return new DotDataImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(),
+ return new GeneralImageBuilder(dotData, diagram.getEntityFactory(), diagram.getSource(), diagram.getPragma(),
stringBounder);
}
@@ -94,7 +94,7 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
}
// System.err.println("FOO11 type=" + os.getClass());
- DotDataImageBuilder svek2 = createDotDataImageBuilder(DotMode.NORMAL,
+ GeneralImageBuilder svek2 = createDotDataImageBuilder(DotMode.NORMAL,
fileFormatOption.getDefaultStringBounder());
BaseFile basefile = null;
if (fileFormatOption.isDebugSvek() && os instanceof NamedOutputStream) {
@@ -109,7 +109,8 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
result = svek2.buildImage(basefile, diagram.getDotStringSkek());
}
final boolean isGraphvizCrash = result instanceof GraphvizCrash;
- result = new AnnotatedWorker(diagram, diagram.getSkinParam()).addAdd(result);
+ result = new AnnotatedWorker(diagram, diagram.getSkinParam(), fileFormatOption.getDefaultStringBounder())
+ .addAdd(result);
final String widthwarning = diagram.getSkinParam().getValue("widthwarning");
String warningOrError = null;
diff --git a/src/net/sourceforge/plantuml/svek/DotDataImageBuilder.java b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java
index 2929e2b..38cc28e 100644
--- a/src/net/sourceforge/plantuml/svek/DotDataImageBuilder.java
+++ b/src/net/sourceforge/plantuml/svek/GeneralImageBuilder.java
@@ -120,7 +120,7 @@ import net.sourceforge.plantuml.svek.image.EntityImageTips;
import net.sourceforge.plantuml.svek.image.EntityImageUseCase;
import net.sourceforge.plantuml.ugraphic.sprite.Sprite;
-public final class DotDataImageBuilder {
+public final class GeneralImageBuilder {
private final DotData dotData;
private final EntityFactory entityFactory;
@@ -130,7 +130,7 @@ public final class DotDataImageBuilder {
private final StringBounder stringBounder;
- public DotDataImageBuilder(DotData dotData, EntityFactory entityFactory, UmlSource source, Pragma pragma,
+ public GeneralImageBuilder(DotData dotData, EntityFactory entityFactory, UmlSource source, Pragma pragma,
StringBounder stringBounder) {
this.dotData = dotData;
this.entityFactory = entityFactory;
diff --git a/src/net/sourceforge/plantuml/svek/GraphvizCrash.java b/src/net/sourceforge/plantuml/svek/GraphvizCrash.java
index f7ea9c9..d2d4500 100644
--- a/src/net/sourceforge/plantuml/svek/GraphvizCrash.java
+++ b/src/net/sourceforge/plantuml/svek/GraphvizCrash.java
@@ -35,6 +35,7 @@
*/
package net.sourceforge.plantuml.svek;
+import java.awt.Color;
import java.awt.geom.Dimension2D;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
@@ -69,7 +70,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage {
public GraphvizCrash(String text) {
this.text = text;
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
- this.flashCode = utils.exportFlashcode(text);
+ this.flashCode = utils.exportFlashcode(text, Color.BLACK, Color.WHITE);
this.graphicStrings = GraphicStrings.createBlackOnWhite(init(), IconLoader.getRandom(),
GraphicPosition.BACKGROUND_CORNER_TOP_RIGHT);
}
@@ -150,7 +151,7 @@ public class GraphvizCrash extends AbstractTextBlock implements IEntityImage {
public static void addDecodeHint(final List<String> strings) {
strings.add(" ");
- strings.add(" Diagram source: (Use http://zxing.org/w/decode.jspx to decode the flashcode)");
+ strings.add(" Diagram source: (Use http://zxing.org/w/decode.jspx to decode the qrcode)");
}
public static void addProperties(final List<String> strings) {
diff --git a/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java b/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java
index 9995d18..b60136e 100644
--- a/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java
+++ b/src/net/sourceforge/plantuml/svek/GroupPngMakerActivity.java
@@ -116,7 +116,7 @@ public final class GroupPngMakerActivity {
skinParam, new InnerGroupHierarchy(), diagram.getColorMapper(), diagram.getEntityFactory(), false,
DotMode.NORMAL, diagram.getNamespaceSeparator(), diagram.getPragma());
- final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(),
+ final GeneralImageBuilder svek2 = new GeneralImageBuilder(dotData, diagram.getEntityFactory(),
diagram.getSource(), diagram.getPragma(), stringBounder);
if (group.getGroupType() == GroupType.INNER_ACTIVITY) {
@@ -125,7 +125,7 @@ public final class GroupPngMakerActivity {
final HtmlColor backColor = group.getColors(skinParam).getColor(ColorType.BACK) == null ? getColor(
ColorParam.background, stereo) : group.getColors(skinParam).getColor(ColorType.BACK);
return new InnerActivity(svek2.buildImage(null, new String[0]), borderColor, backColor,
- skinParam.shadowing());
+ skinParam.shadowing(group.getStereotype()));
}
throw new UnsupportedOperationException(group.getGroupType().toString());
diff --git a/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java b/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java
index f215938..82b6484 100644
--- a/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java
+++ b/src/net/sourceforge/plantuml/svek/GroupPngMakerState.java
@@ -124,7 +124,7 @@ public final class GroupPngMakerState {
diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL, diagram.getNamespaceSeparator(),
diagram.getPragma());
- final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(),
+ final GeneralImageBuilder svek2 = new GeneralImageBuilder(dotData, diagram.getEntityFactory(),
diagram.getSource(), diagram.getPragma(), stringBounder);
if (group.getGroupType() == GroupType.CONCURRENT_STATE) {
@@ -155,8 +155,8 @@ public final class GroupPngMakerState {
if (stroke == null) {
stroke = new UStroke(1.5);
}
- return new InnerStateAutonom(image, title, attribute, borderColor, backColor, skinParam.shadowing(),
- group.getUrl99(), withSymbol, stroke);
+ return new InnerStateAutonom(image, title, attribute, borderColor, backColor, skinParam.shadowing(group
+ .getStereotype()), group.getUrl99(), withSymbol, stroke);
}
@@ -167,7 +167,15 @@ public final class GroupPngMakerState {
return new TextBlockEmpty();
}
final FontConfiguration fontConfiguration = new FontConfiguration(skinParam, FontParam.STATE_ATTRIBUTE, null);
- final Display display = details.size() == 1 ? Display.getWithNewlines(details.get(0)) : Display.create(details);
+ Display display = null;
+ for (String s : details) {
+ if (display == null) {
+ display = Display.getWithNewlines(s);
+ } else {
+ display = display.addAll(Display.getWithNewlines(s));
+ }
+ }
+
final TextBlock result = display.create(fontConfiguration, HorizontalAlignment.LEFT, skinParam);
return new TextBlockWidthAdapter(result, 0);
diff --git a/src/net/sourceforge/plantuml/svek/Line.java b/src/net/sourceforge/plantuml/svek/Line.java
index 5b31032..ba4fed8 100644
--- a/src/net/sourceforge/plantuml/svek/Line.java
+++ b/src/net/sourceforge/plantuml/svek/Line.java
@@ -80,6 +80,8 @@ import net.sourceforge.plantuml.posimo.DotPath;
import net.sourceforge.plantuml.posimo.Moveable;
import net.sourceforge.plantuml.posimo.Positionable;
import net.sourceforge.plantuml.posimo.PositionableUtils;
+import net.sourceforge.plantuml.skin.VisibilityModifier;
+import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.svek.extremity.Extremity;
import net.sourceforge.plantuml.svek.extremity.ExtremityFactory;
import net.sourceforge.plantuml.svek.extremity.ExtremityFactoryExtends;
@@ -264,10 +266,7 @@ public class Line implements Moveable, Hideable {
labelOnly = new DirectionalTextBlock(right, left, up, down);
}
} else {
- final double marginLabel = startUid.equalsId(endUid) ? 6 : 1;
- final TextBlock label = TextBlockUtils.withMargin(
- link.getLabel().create(labelFont, skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER),
- skinParam, skinParam.maxMessageSize()), marginLabel, marginLabel);
+ final TextBlock label = getLineLabel(link, skinParam, labelFont);
if (getLinkArrow() == LinkArrow.NONE) {
labelOnly = label;
} else {
@@ -328,6 +327,24 @@ public class Line implements Moveable, Hideable {
}
+ private TextBlock getLineLabel(Link link, ISkinParam skinParam, FontConfiguration labelFont) {
+ final double marginLabel = startUid.equalsId(endUid) ? 6 : 1;
+ TextBlock label = link.getLabel().create(labelFont,
+ skinParam.getDefaultTextAlignment(HorizontalAlignment.CENTER), skinParam, skinParam.maxMessageSize());
+ final VisibilityModifier visibilityModifier = link.getVisibilityModifier();
+ if (visibilityModifier != null) {
+ final Rose rose = new Rose();
+ // final HtmlColor back = visibilityModifier.getBackground() == null ? null : rose.getHtmlColor(skinParam,
+ // visibilityModifier.getBackground());
+ final HtmlColor fore = rose.getHtmlColor(skinParam, visibilityModifier.getForeground());
+ TextBlock visibility = visibilityModifier.getUBlock(skinParam.classAttributeIconSize(), fore, null, false);
+ visibility = TextBlockUtils.withMargin(visibility, 0, 1, 2, 0);
+ label = TextBlockUtils.mergeLR(visibility, label, VerticalAlignment.CENTER);
+ }
+ label = TextBlockUtils.withMargin(label, marginLabel, marginLabel);
+ return label;
+ }
+
public boolean hasNoteLabelText() {
return labelText != null;
}
diff --git a/src/net/sourceforge/plantuml/svek/RoundedContainer.java b/src/net/sourceforge/plantuml/svek/RoundedContainer.java
index 7871730..a82a972 100644
--- a/src/net/sourceforge/plantuml/svek/RoundedContainer.java
+++ b/src/net/sourceforge/plantuml/svek/RoundedContainer.java
@@ -58,6 +58,9 @@ public final class RoundedContainer {
public RoundedContainer(Dimension2D dim, double titleHeight, double attributeHeight, HtmlColor borderColor,
HtmlColor backColor, HtmlColor imgBackcolor, UStroke stroke) {
+ if (dim.getWidth() == 0) {
+ throw new IllegalArgumentException();
+ }
this.dim = dim;
this.imgBackcolor = imgBackcolor;
this.titleHeight = titleHeight;
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java b/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java
index 3524430..3caec84 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageActivity.java
@@ -105,7 +105,7 @@ public class EntityImageActivity extends AbstractEntityImage {
private UGraphic drawOctagon(UGraphic ug) {
final Shape shape = bibliotekon.getShape(getEntity());
final Shadowable octagon = shape.getOctagon();
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
octagon.setDeltaShadow(4);
}
ug = applyColors(ug);
@@ -122,7 +122,7 @@ public class EntityImageActivity extends AbstractEntityImage {
final double widthTotal = dimTotal.getWidth();
final double heightTotal = dimTotal.getHeight();
final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
rect.setDeltaShadow(4);
}
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java
index ed629e6..7466c2a 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageAssociation.java
@@ -65,7 +65,7 @@ public class EntityImageAssociation extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final UPolygon diams = new UPolygon();
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
diams.setDeltaShadow(5);
}
diams.addPoint(SIZE, 0);
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java b/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java
index 1990685..b692f82 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageBranch.java
@@ -65,7 +65,7 @@ public class EntityImageBranch extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final UPolygon diams = new UPolygon();
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
diams.setDeltaShadow(5);
}
diams.addPoint(SIZE, 0);
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java
index 8d4876a..878ee38 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleEnd.java
@@ -68,7 +68,7 @@ public class EntityImageCircleEnd extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
circle.setDeltaShadow(3);
}
ug.apply(new UChangeBackColor(null))
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java
index 11ceb00..61fe293 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageCircleStart.java
@@ -66,7 +66,7 @@ public class EntityImageCircleStart extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
circle.setDeltaShadow(3);
}
ug.apply(new UChangeBackColor(SkinParamUtils.getColor(getSkinParam(), colorParam, getStereo())))
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java
index 99e01c3..9afccfb 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageClass.java
@@ -142,7 +142,7 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
final double heightTotal = dimTotal.getHeight();
final Shadowable rect = new URectangle(widthTotal, heightTotal, roundCorner, roundCorner, getEntity().getCode()
.getFullName());
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
rect.setDeltaShadow(4);
}
@@ -165,8 +165,8 @@ public class EntityImageClass extends AbstractEntityImage implements Stencil, Wi
headerBackcolor = getSkinParam().getHtmlColor(ColorParam.classHeaderBackground, getStereo(), false);
}
UGraphic ugHeader = ug;
- if (headerBackcolor != null) {
- final Shadowable rect2 = new URectangle(widthTotal, dimHeader.getHeight());
+ if (headerBackcolor != null && roundCorner == 0) {
+ final Shadowable rect2 = new URectangle(widthTotal, dimHeader.getHeight(), roundCorner, roundCorner);
ugHeader = ugHeader.apply(new UChangeBackColor(headerBackcolor));
ugHeader.apply(stroke).draw(rect2);
}
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java b/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java
index 256a313..b0aec15 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageDescription.java
@@ -56,6 +56,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.HtmlColor;
+import net.sourceforge.plantuml.graphic.SkinParameter;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.SymbolContext;
import net.sourceforge.plantuml.graphic.TextBlock;
@@ -89,11 +90,13 @@ public class EntityImageDescription extends AbstractEntityImage {
private final boolean hideText;
private final Collection<Link> links;
private final boolean useRankSame;
+ private final boolean fixCircleLabelOverlapping;
public EntityImageDescription(ILeaf entity, ISkinParam skinParam, PortionShower portionShower,
Collection<Link> links) {
super(entity, entity.getColors(skinParam).mute(skinParam));
this.useRankSame = skinParam.useRankSame();
+ this.fixCircleLabelOverlapping = skinParam.fixCircleLabelOverlapping();
this.links = links;
final Stereotype stereotype = entity.getStereotype();
@@ -101,15 +104,15 @@ public class EntityImageDescription extends AbstractEntityImage {
if (symbol == USymbol.FOLDER) {
this.shapeType = ShapeType.FOLDER;
} else if (symbol == USymbol.INTERFACE) {
- this.shapeType = ShapeType.RECTANGLE;
- // this.shapeType = ShapeType.RECTANGLE_WITH_CIRCLE_INSIDE;
+ this.shapeType = skinParam.fixCircleLabelOverlapping() ? ShapeType.RECTANGLE_WITH_CIRCLE_INSIDE
+ : ShapeType.RECTANGLE;
} else {
this.shapeType = ShapeType.RECTANGLE;
}
this.hideText = symbol == USymbol.INTERFACE;
final Display codeDisplay = Display.getWithNewlines(entity.getCode());
- desc = (entity.getDisplay().equals(codeDisplay) && symbol instanceof USymbolFolder)
+ desc = (entity.getDisplay().equals(codeDisplay) && symbol.getSkinParameter() == SkinParameter.PACKAGE)
|| entity.getDisplay().isWhite() ? TextBlockUtils.empty(0, 0) : new BodyEnhanced(entity.getDisplay(),
symbol.getFontParam(), getSkinParam(), HorizontalAlignment.LEFT, stereotype,
symbol.manageHorizontalLine(), false, entity);
@@ -129,7 +132,7 @@ public class EntityImageDescription extends AbstractEntityImage {
final UStroke stroke = colors.muteStroke(symbol.getSkinParameter().getStroke(getSkinParam(), stereotype));
final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(stroke)
- .withShadow(getSkinParam().shadowing2(symbol.getSkinParameter()))
+ .withShadow(getSkinParam().shadowing2(getEntity().getStereotype(), symbol.getSkinParameter()))
.withCorner(roundCorner, diagonalCorner);
stereo = TextBlockUtils.empty(0, 0);
@@ -187,7 +190,7 @@ public class EntityImageDescription extends AbstractEntityImage {
if (isThereADoubleLink((ILeaf) getEntity(), links)) {
return Margins.NONE;
}
- if (hasSomeHorizontalLinkVisible((ILeaf) getEntity(), links)) {
+ if (fixCircleLabelOverlapping == false && hasSomeHorizontalLinkVisible((ILeaf) getEntity(), links)) {
return Margins.NONE;
}
if (hasSomeHorizontalLinkDoubleDecorated((ILeaf) getEntity(), links)) {
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java
index 3d86ef8..852564b 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageEmptyPackage.java
@@ -129,8 +129,8 @@ public class EntityImageEmptyPackage extends AbstractEntityImage {
stereoBlock, 0, 0, widthTotal, heightTotal, getStroke());
decoration.drawU(ug, back, SkinParamUtils.getColor(getSkinParam(), ColorParam.packageBorder, getStereo()),
- getSkinParam().shadowing(), roundCorner,
- getSkinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null));
+ getSkinParam().shadowing(getEntity().getStereotype()), roundCorner,
+ getSkinParam().getHorizontalAlignment(AlignmentParam.packageTitleAlignment, null, false));
if (url != null) {
ug.closeAction();
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java
index bfef7ab..06618fc 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterface.java
@@ -79,7 +79,7 @@ public class EntityImageLollipopInterface extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
circle.setDeltaShadow(4);
}
ug = ug.apply(
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java
index 7504101..b59cc0d 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye1.java
@@ -93,7 +93,7 @@ public class EntityImageLollipopInterfaceEye1 extends AbstractEntityImage {
final double sizeSmall = 14;
final double diff = (SIZE - sizeSmall) / 2;
final UEllipse circle1 = new UEllipse(sizeSmall, sizeSmall);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
// circle.setDeltaShadow(4);
}
ug.apply(new UStroke(1.5)).apply(new UTranslate(diff, diff)).draw(circle1);
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java
index 8274ebd..a75c5b1 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageLollipopInterfaceEye2.java
@@ -93,7 +93,7 @@ public class EntityImageLollipopInterfaceEye2 extends AbstractEntityImage {
// backcolor = HtmlColorUtils.BLUE;
final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), getStereo());
this.ctx = new SymbolContext(backcolor, forecolor).withStroke(new UStroke(1.5)).withShadow(
- getSkinParam().shadowing());
+ getSkinParam().shadowing(getEntity().getStereotype()));
if (stereotype != null && stereotype.getLabel(false) != null
&& portionShower.showPortion(EntityPortion.STEREOTYPE, entity)) {
@@ -115,7 +115,7 @@ public class EntityImageLollipopInterfaceEye2 extends AbstractEntityImage {
ug.startUrl(url);
}
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
circle.setDeltaShadow(4);
}
ctx.apply(ug).draw(circle);
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java b/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java
index ec8f58f..3888448 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageNote.java
@@ -94,7 +94,7 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
super(entity, getSkin(getISkinParam(skinParam, entity), entity));
this.skinParam = getISkinParam(skinParam, entity);
- this.withShadow = getSkinParam().shadowing();
+ this.withShadow = getSkinParam().shadowing(getEntity().getStereotype());
final Display strings = entity.getDisplay();
final Rose rose = new Rose();
@@ -209,7 +209,7 @@ public class EntityImageNote extends AbstractEntityImage implements Stencil {
final Point2D newRefpp2 = move(pp2, shape.getMinX(), shape.getMinY());
final Point2D projection = move(other.projection(newRefpp2, stringBounder), -shape.getMinX(),
-shape.getMinY());
- final Opale opale = new Opale(borderColor, noteBackgroundColor, textBlock, skinParam.shadowing(), true);
+ final Opale opale = new Opale(borderColor, noteBackgroundColor, textBlock, skinParam.shadowing(getEntity().getStereotype()), true);
opale.setRoundCorner(getRoundCorner());
opale.setOpale(strategy, pp1, projection);
final UGraphic stroked = applyStroke(ug2);
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java
index c4821ab..9700f84 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageObject.java
@@ -133,7 +133,7 @@ public class EntityImageObject extends AbstractEntityImage implements Stencil {
final double widthTotal = dimTotal.getWidth();
final double heightTotal = dimTotal.getHeight();
final Shadowable rect = new URectangle(widthTotal, heightTotal, roundCorner, roundCorner);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
rect.setDeltaShadow(4);
}
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java b/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java
index 775fa23..fa3bb2f 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImagePseudoState.java
@@ -77,7 +77,7 @@ public class EntityImagePseudoState extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final UEllipse circle = new UEllipse(SIZE, SIZE);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
circle.setDeltaShadow(4);
}
ug = ug.apply(new UStroke(1.5));
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageState.java b/src/net/sourceforge/plantuml/svek/image/EntityImageState.java
index 2a58317..6a9a64b 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageState.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageState.java
@@ -44,6 +44,7 @@ import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.LineConfigurable;
import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url;
+import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.Member;
@@ -91,7 +92,7 @@ public class EntityImageState extends AbstractEntityImage {
this.withSymbol = stereotype != null && stereotype.isWithOOSymbol();
this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype),
- HorizontalAlignment.CENTER, skinParam);
+ HorizontalAlignment.CENTER, skinParam, CreoleMode.FULL, skinParam.wrapWidth());
Display list = Display.empty();
for (Member att : entity.getBodier().getFieldsToDisplay()) {
@@ -127,7 +128,7 @@ public class EntityImageState extends AbstractEntityImage {
final double widthTotal = dimTotal.getWidth();
final double heightTotal = dimTotal.getHeight();
final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
rect.setDeltaShadow(4);
}
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java b/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java
index 147cde9..3508e73 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageState2.java
@@ -87,7 +87,7 @@ public class EntityImageState2 extends AbstractEntityImage {
final HtmlColor forecolor = SkinParamUtils.getColor(getSkinParam(), symbol.getColorParamBorder(), getStereo());
final SymbolContext ctx = new SymbolContext(backcolor, forecolor).withStroke(new UStroke(1.5)).withShadow(
- getSkinParam().shadowing());
+ getSkinParam().shadowing(getEntity().getStereotype()));
this.url = entity.getUrl99();
TextBlock stereo = TextBlockUtils.empty(0, 0);
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java b/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java
index 8963dec..c7b0bfe 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageStateEmptyDescription.java
@@ -43,6 +43,7 @@ import net.sourceforge.plantuml.FontParam;
import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.SkinParamUtils;
import net.sourceforge.plantuml.Url;
+import net.sourceforge.plantuml.creole.CreoleMode;
import net.sourceforge.plantuml.cucadiagram.Display;
import net.sourceforge.plantuml.cucadiagram.IEntity;
import net.sourceforge.plantuml.cucadiagram.Member;
@@ -76,7 +77,7 @@ public class EntityImageStateEmptyDescription extends AbstractEntityImage {
final Stereotype stereotype = entity.getStereotype();
this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype),
- HorizontalAlignment.CENTER, skinParam);
+ HorizontalAlignment.CENTER, skinParam, CreoleMode.FULL, skinParam.wrapWidth());
Display list = Display.empty();
for (Member att : entity.getBodier().getFieldsToDisplay()) {
@@ -104,7 +105,7 @@ public class EntityImageStateEmptyDescription extends AbstractEntityImage {
final double widthTotal = dimTotal.getWidth();
final double heightTotal = dimTotal.getHeight();
final Shadowable rect = new URectangle(widthTotal, heightTotal, CORNER, CORNER);
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
rect.setDeltaShadow(4);
}
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java b/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java
index d9a5192..0c3540e 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageSynchroBar.java
@@ -68,7 +68,7 @@ public class EntityImageSynchroBar extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final Dimension2D dim = calculateDimension(ug.getStringBounder());
final Shadowable rect = new URectangle(dim.getWidth(), dim.getHeight());
- if (getSkinParam().shadowing()) {
+ if (getSkinParam().shadowing(getEntity().getStereotype())) {
rect.setDeltaShadow(4);
}
ug.apply(new UChangeColor(null))
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java b/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java
index 86b1c90..c92ba4b 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageTips.java
@@ -163,7 +163,7 @@ public class EntityImageTips extends AbstractEntityImage {
// final UFont fontNote = skinParam.getFont(FontParam.NOTE, null, false);
final TextBlock textBlock = new BodyEnhanced2(display, FontParam.NOTE, skinParam, HorizontalAlignment.LEFT,
new FontConfiguration(skinParam, FontParam.NOTE, null), LineBreakStrategy.NONE);
- final Opale opale = new Opale(borderColor, noteBackgroundColor, textBlock, skinParam.shadowing(), true);
+ final Opale opale = new Opale(borderColor, noteBackgroundColor, textBlock, skinParam.shadowing(getEntity().getStereotype()), true);
return opale;
}
diff --git a/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java b/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java
index ace200d..fb4a6a7 100644
--- a/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java
+++ b/src/net/sourceforge/plantuml/svek/image/EntityImageUseCase.java
@@ -112,7 +112,7 @@ public class EntityImageUseCase extends AbstractEntityImage {
final public void drawU(UGraphic ug) {
final StringBounder stringBounder = ug.getStringBounder();
final TextBlockInEllipse ellipse = new TextBlockInEllipse(desc, stringBounder);
- if (getSkinParam().shadowing2(SkinParameter.USECASE)) {
+ if (getSkinParam().shadowing2(getEntity().getStereotype(), SkinParameter.USECASE)) {
ellipse.setDeltaShadow(3);
}
diff --git a/src/net/sourceforge/plantuml/svg/SvgGraphics.java b/src/net/sourceforge/plantuml/svg/SvgGraphics.java
index 6005be7..0d76a2a 100644
--- a/src/net/sourceforge/plantuml/svg/SvgGraphics.java
+++ b/src/net/sourceforge/plantuml/svg/SvgGraphics.java
@@ -58,6 +58,7 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import net.sourceforge.plantuml.Log;
+import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.StringUtils;
import net.sourceforge.plantuml.SvgString;
import net.sourceforge.plantuml.code.Base64Coder;
@@ -315,6 +316,9 @@ public class SvgGraphics {
if (url == null) {
throw new IllegalArgumentException();
}
+ if (OptionFlags.ALLOW_INCLUDE == false && url.toLowerCase().startsWith("javascript")) {
+ return;
+ }
if (pendingAction.size() > 0) {
closeLink();
diff --git a/src/net/sourceforge/plantuml/swing/LicenseWindow.java b/src/net/sourceforge/plantuml/swing/LicenseWindow.java
index f00d44c..257a47b 100644
--- a/src/net/sourceforge/plantuml/swing/LicenseWindow.java
+++ b/src/net/sourceforge/plantuml/swing/LicenseWindow.java
@@ -71,7 +71,7 @@ class LicenseWindow extends JFrame {
this.setTitle("Licence PlantUML (" + Version.versionString() + ")");
getContentPane().add(getNorthLabel(), BorderLayout.NORTH);
- final List<String> list = new ArrayList<String>(License.getCurrent().getText());
+ final List<String> list = new ArrayList<String>(License.getCurrent().getText(false));
getContentPane().add(getJComponent(list), BorderLayout.CENTER);
getContentPane().add(getSouthLabel(), BorderLayout.SOUTH);
diff --git a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java
index eacb667..a15ff6f 100644
--- a/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java
+++ b/src/net/sourceforge/plantuml/syntax/LanguageDescriptor.java
@@ -80,6 +80,7 @@ public class LanguageDescriptor {
type.add("package");
type.add("queue");
type.add("archimate");
+ type.add("diamond");
keyword.add("@startuml");
keyword.add("@enduml");
@@ -151,6 +152,9 @@ public class LanguageDescriptor {
keyword.add("again");
keyword.add("kill");
keyword.add("order");
+ keyword.add("allow_mixing");
+ keyword.add("allowmixing");
+ keyword.add("mainframe");
preproc.add("!exit");
preproc.add("!include");
diff --git a/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java b/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java
index f970fd2..e2c1059 100644
--- a/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java
+++ b/src/net/sourceforge/plantuml/syntax/SyntaxChecker.java
@@ -68,7 +68,7 @@ public class SyntaxChecker {
if (source.startsWith("@startuml\n") == false) {
result.setError(true);
- result.setLineLocation(new LineLocationImpl(null, null).oneLineRead());
+ result.setLineLocation(new LineLocationImpl("", null).oneLineRead());
// result.setErrorLinePosition(0);
result.addErrorText("No @startuml found");
// result.setSuggest(Arrays.asList("Did you mean:", "@startuml"));
@@ -161,7 +161,7 @@ public class SyntaxChecker {
}
private static LineLocation lastLineNumber2(String source) {
- LineLocationImpl result = new LineLocationImpl(null, null).oneLineRead();
+ LineLocationImpl result = new LineLocationImpl("", null).oneLineRead();
for (int i = 0; i < source.length(); i++) {
if (source.charAt(i) == '\n') {
result = result.oneLineRead();
diff --git a/src/net/sourceforge/plantuml/tikz/TikzGraphics.java b/src/net/sourceforge/plantuml/tikz/TikzGraphics.java
index 750e55b..d6cd0d6 100644
--- a/src/net/sourceforge/plantuml/tikz/TikzGraphics.java
+++ b/src/net/sourceforge/plantuml/tikz/TikzGraphics.java
@@ -318,6 +318,17 @@ public class TikzGraphics {
addCommand(sb);
}
+ public void appendRaw(double x, double y, String formula) {
+ final StringBuilder sb = new StringBuilder("\\node at " + couple(x, y));
+ sb.append("[below right");
+ sb.append("]{");
+ sb.append("{");
+ sb.append(formula);
+ sb.append("}");
+ sb.append("};");
+ addCommand(sb);
+ }
+
private void appendPendingUrl(final StringBuilder sb) {
if (Url.isLatex(pendingUrl)) {
sb.append("\\hyperref[");
diff --git a/src/net/sourceforge/plantuml/timingdiagram/Histogram.java b/src/net/sourceforge/plantuml/timingdiagram/Histogram.java
index 98c1cc0..f8c679d 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/Histogram.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/Histogram.java
@@ -231,7 +231,7 @@ public class Histogram implements TimeDrawing {
}
private FontConfiguration getFontConfiguration() {
- return new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
+ return new FontConfiguration(skinParam, FontParam.TIMING, null);
}
private TextBlock getTextBlock(String value) {
diff --git a/src/net/sourceforge/plantuml/timingdiagram/Player.java b/src/net/sourceforge/plantuml/timingdiagram/Player.java
index 85f189e..21e095c 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/Player.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/Player.java
@@ -85,7 +85,7 @@ public class Player implements TextBlock, TimeProjected {
}
private FontConfiguration getFontConfiguration() {
- return new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
+ return new FontConfiguration(skinParam, FontParam.TIMING, null);
}
public void drawU(UGraphic ug) {
diff --git a/src/net/sourceforge/plantuml/timingdiagram/Ribbon.java b/src/net/sourceforge/plantuml/timingdiagram/Ribbon.java
index 0eb61eb..2ec7f7c 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/Ribbon.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/Ribbon.java
@@ -93,7 +93,7 @@ public class Ribbon implements TimeDrawing {
}
private FontConfiguration getFontConfiguration() {
- return new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
+ return new FontConfiguration(skinParam, FontParam.TIMING, null);
}
private TextBlock createTextBlock(String value) {
diff --git a/src/net/sourceforge/plantuml/timingdiagram/RibbonNew.java b/src/net/sourceforge/plantuml/timingdiagram/RibbonNew.java
index 7e0b3c9..6443479 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/RibbonNew.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/RibbonNew.java
@@ -92,7 +92,7 @@ public class RibbonNew implements TimeDrawing {
}
private FontConfiguration getFontConfiguration() {
- return new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
+ return new FontConfiguration(skinParam, FontParam.TIMING, null);
}
private TextBlock createTextBlock(String value) {
diff --git a/src/net/sourceforge/plantuml/timingdiagram/RibbonOld.java b/src/net/sourceforge/plantuml/timingdiagram/RibbonOld.java
index a0123ed..c643eb3 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/RibbonOld.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/RibbonOld.java
@@ -90,7 +90,7 @@ public class RibbonOld implements TimeDrawing {
}
private FontConfiguration getFontConfiguration() {
- return new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
+ return new FontConfiguration(skinParam, FontParam.TIMING, null);
}
private TextBlock getTextBlock(String value) {
diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java
index 1c46d67..0987100 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagram.java
@@ -96,7 +96,7 @@ public class TimingDiagram extends UmlDiagram implements Clock {
TextBlock result = getTextBlock();
final ISkinParam skinParam = getSkinParam();
- result = new AnnotatedWorker(this, skinParam).addAdd(result);
+ result = new AnnotatedWorker(this, skinParam, fileFormatOption.getDefaultStringBounder()).addAdd(result);
imageBuilder.setUDrawable(result);
return imageBuilder.writeImageTOBEMOVED(fileFormatOption, seed(), os);
diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java
index 4112fa5..54fc1ae 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/TimingDiagramFactory.java
@@ -39,6 +39,7 @@ import java.util.ArrayList;
import java.util.List;
import net.sourceforge.plantuml.command.Command;
+import net.sourceforge.plantuml.command.CommandFootboxIgnored;
import net.sourceforge.plantuml.command.UmlDiagramFactory;
public class TimingDiagramFactory extends UmlDiagramFactory {
@@ -54,7 +55,7 @@ public class TimingDiagramFactory extends UmlDiagramFactory {
final List<Command> cmds = new ArrayList<Command>();
addCommonCommands(cmds);
-
+ cmds.add(new CommandFootboxIgnored());
cmds.add(new CommandLifeLine());
cmds.add(new CommandDefineStateShort());
cmds.add(new CommandDefineStateLong());
diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java b/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java
index 3186436..9ce432b 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/TimingNote.java
@@ -84,7 +84,7 @@ public class TimingNote {
final Sheet sheet = new CreoleParser(fc, skinParam.getDefaultTextAlignment(HorizontalAlignment.LEFT),
skinParam, CreoleMode.FULL).createSheet(note);
final SheetBlock1 sheet1 = new SheetBlock1(sheet, LineBreakStrategy.NONE, skinParam.getPadding());
- final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet1, skinParam.shadowing(), false);
+ final Opale opale = new Opale(borderColor, noteBackgroundColor, sheet1, skinParam.shadowing(null), false);
return opale;
}
diff --git a/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java b/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java
index 7e2b63a..a01ddb0 100644
--- a/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java
+++ b/src/net/sourceforge/plantuml/timingdiagram/TimingRuler.java
@@ -115,7 +115,7 @@ public class TimingRuler {
}
private FontConfiguration getFontConfiguration() {
- return new FontConfiguration(skinParam, FontParam.ACTIVITY, null);
+ return new FontConfiguration(skinParam, FontParam.TIMING, null);
}
private TextBlock getTimeTextBlock(long time) {
diff --git a/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphicHorizontalLine.java b/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphicHorizontalLine.java
index c3a1334..c66b620 100644
--- a/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphicHorizontalLine.java
+++ b/src/net/sourceforge/plantuml/ugraphic/AbstractUGraphicHorizontalLine.java
@@ -46,6 +46,10 @@ public abstract class AbstractUGraphicHorizontalLine extends UGraphicDelegator {
if (change instanceof UTranslate) {
result = copy(getUg());
result.translate = this.translate.compose((UTranslate) change);
+ } else if (change instanceof UClip) {
+ final UClip clip = ((UClip) change).translate(translate);
+ result = copy(getUg().apply(clip));
+ result.translate = this.translate;
} else {
result = copy(getUg().apply(change));
result.translate = this.translate;
diff --git a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java
index e0ee57a..78ebeed 100644
--- a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java
+++ b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java
@@ -111,7 +111,7 @@ public class ImageBuilder {
private UStroke borderStroke;
private HtmlColor borderColor;
private double borderCorner;
-
+
private boolean svgDimensionStyle;
public ImageBuilder(ColorMapper colorMapper, double dpiFactor, HtmlColor mybackcolor, String metadata,
@@ -394,8 +394,8 @@ public class ImageBuilder {
}
}
- private UGraphic2 createUGraphicSVG(ColorMapper colorMapper, double scale,
- Dimension2D dim, HtmlColor mybackcolor, String svgLinkTarget, String hover, long seed) {
+ private UGraphic2 createUGraphicSVG(ColorMapper colorMapper, double scale, Dimension2D dim, HtmlColor mybackcolor,
+ String svgLinkTarget, String hover, long seed) {
Color backColor = Color.WHITE;
if (mybackcolor instanceof HtmlColorSimple) {
backColor = colorMapper.getMappedColor(mybackcolor);
@@ -438,7 +438,8 @@ public class ImageBuilder {
ug.setBufferedImage(builder.getBufferedImage());
final BufferedImage im = ((UGraphicG2d) ug).getBufferedImage();
if (mybackcolor instanceof HtmlColorGradient) {
- ug.apply(new UChangeBackColor(mybackcolor)).draw(new URectangle(im.getWidth(), im.getHeight()));
+ ug.apply(new UChangeBackColor(mybackcolor)).draw(
+ new URectangle(im.getWidth() / dpiFactor, im.getHeight() / dpiFactor));
}
return ug;
diff --git a/src/net/sourceforge/plantuml/ugraphic/MinMax.java b/src/net/sourceforge/plantuml/ugraphic/MinMax.java
index 59fd594..1ee58e3 100644
--- a/src/net/sourceforge/plantuml/ugraphic/MinMax.java
+++ b/src/net/sourceforge/plantuml/ugraphic/MinMax.java
@@ -142,7 +142,10 @@ public class MinMax {
}
public void drawGrey(UGraphic ug) {
- final HtmlColor color = HtmlColorUtils.GRAY;
+ draw(ug, HtmlColorUtils.GRAY);
+ }
+
+ public void draw(UGraphic ug, HtmlColor color) {
ug = ug.apply(new UChangeColor(color)).apply(new UChangeBackColor(color));
ug = ug.apply(new UTranslate(minX, minY));
ug.draw(new URectangle(getWidth(), getHeight()));
diff --git a/src/net/sourceforge/plantuml/ugraphic/UGraphic.java b/src/net/sourceforge/plantuml/ugraphic/UGraphic.java
index e87b2fd..cec9a04 100644
--- a/src/net/sourceforge/plantuml/ugraphic/UGraphic.java
+++ b/src/net/sourceforge/plantuml/ugraphic/UGraphic.java
@@ -58,5 +58,4 @@ public interface UGraphic {
public boolean matchesProperty(String propertyName);
- public double dpiFactor();
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/UImage.java b/src/net/sourceforge/plantuml/ugraphic/UImage.java
index 41d3564..1a7e7bf 100644
--- a/src/net/sourceforge/plantuml/ugraphic/UImage.java
+++ b/src/net/sourceforge/plantuml/ugraphic/UImage.java
@@ -42,9 +42,15 @@ import java.awt.image.BufferedImage;
public class UImage implements UShape {
private final BufferedImage image;
+ private final String formula;
public UImage(BufferedImage image) {
+ this(image, null);
+ }
+
+ public UImage(BufferedImage image, String formula) {
this.image = image;
+ this.formula = formula;
}
public UImage scale(double scale) {
@@ -65,7 +71,7 @@ public class UImage implements UShape {
final AffineTransform at = new AffineTransform();
at.scale(scale, scale);
final AffineTransformOp scaleOp = new AffineTransformOp(at, type);
- return new UImage(scaleOp.filter(image, after));
+ return new UImage(scaleOp.filter(image, after), formula);
}
public final BufferedImage getImage() {
@@ -80,4 +86,7 @@ public class UImage implements UShape {
return image.getHeight() - 1;
}
+ public final String getFormula() {
+ return formula;
+ }
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java b/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java
index 56e2d96..c811acf 100644
--- a/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java
+++ b/src/net/sourceforge/plantuml/ugraphic/crossing/UGraphicCrossing.java
@@ -61,11 +61,6 @@ public class UGraphicCrossing implements UGraphic {
private final List<Pending> lines;
private final UTranslate translate;
- public double dpiFactor() {
- return ug.dpiFactor();
- }
-
-
static class Pending {
final UGraphic ug;
final LineSegmentDouble segment;
diff --git a/src/net/sourceforge/plantuml/ugraphic/g2d/DriverImageG2d.java b/src/net/sourceforge/plantuml/ugraphic/g2d/DriverImageG2d.java
index e8ff789..b268aef 100644
--- a/src/net/sourceforge/plantuml/ugraphic/g2d/DriverImageG2d.java
+++ b/src/net/sourceforge/plantuml/ugraphic/g2d/DriverImageG2d.java
@@ -36,7 +36,6 @@
package net.sourceforge.plantuml.ugraphic.g2d;
import java.awt.Graphics2D;
-import java.awt.geom.AffineTransform;
import net.sourceforge.plantuml.EnsureVisible;
import net.sourceforge.plantuml.ugraphic.ColorMapper;
@@ -49,11 +48,12 @@ import net.sourceforge.plantuml.ugraphic.UShape;
public class DriverImageG2d implements UDriver<Graphics2D> {
private final EnsureVisible visible;
- private final double dpiFactor;
+
+ // private final double dpiFactor;
public DriverImageG2d(double dpiFactor, EnsureVisible visible) {
this.visible = visible;
- this.dpiFactor = dpiFactor;
+ // this.dpiFactor = dpiFactor;
}
public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, Graphics2D g2d) {
@@ -63,10 +63,11 @@ public class DriverImageG2d implements UDriver<Graphics2D> {
final UImage shape = ((UImage) ushape);
visible.ensureVisible(x, y);
visible.ensureVisible(x + shape.getWidth(), y + shape.getHeight());
- final AffineTransform back = g2d.getTransform();
- g2d.scale(1 / dpiFactor, 1 / dpiFactor);
- g2d.drawImage(shape.getImage(), (int) (x * dpiFactor), (int) (y * dpiFactor), null);
- g2d.setTransform(back);
+ // final AffineTransform back = g2d.getTransform();
+ // System.err.println("dpiFactor=" + dpiFactor);
+ // g2d.scale(1 / dpiFactor, 1 / dpiFactor);
+ g2d.drawImage(shape.getImage(), (int) (x), (int) (y), null);
+ // g2d.setTransform(back);
}
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/HandJiggle.java b/src/net/sourceforge/plantuml/ugraphic/hand/HandJiggle.java
index 0f01c9b..494bd5d 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/HandJiggle.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/HandJiggle.java
@@ -38,6 +38,7 @@ import java.awt.geom.CubicCurve2D;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Random;
import net.sourceforge.plantuml.ugraphic.UPath;
import net.sourceforge.plantuml.ugraphic.UPolygon;
@@ -48,16 +49,22 @@ public class HandJiggle {
private double startX;
private double startY;
private final double defaultVariation;
+ private final Random rnd;
- public HandJiggle(double startX, double startY, double defaultVariation) {
+ private double randomMe() {
+ return rnd.nextDouble();
+ }
+
+ public HandJiggle(double startX, double startY, double defaultVariation, Random rnd) {
this.startX = startX;
this.startY = startY;
this.defaultVariation = defaultVariation;
+ this.rnd = rnd;
points.add(new Point2D.Double(startX, startY));
}
- public HandJiggle(Point2D start, double defaultVariation) {
- this(start.getX(), start.getY(), defaultVariation);
+ public HandJiggle(Point2D start, double defaultVariation, Random rnd) {
+ this(start.getX(), start.getY(), defaultVariation, rnd);
}
public void lineTo(Point2D end) {
@@ -102,7 +109,7 @@ public class HandJiggle {
double x = stepX * s + startX;
double y = stepY * s + startY;
- final double offset = (Math.random() - 0.5) * variation;
+ final double offset = (randomMe() - 0.5) * variation;
points.add(new Point2D.Double(x - offset * fy, y - offset * fx));
}
points.add(new Point2D.Double(endX, endY));
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/UDotPathHand.java b/src/net/sourceforge/plantuml/ugraphic/hand/UDotPathHand.java
index bfe5cac..046541e 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/UDotPathHand.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/UDotPathHand.java
@@ -35,6 +35,7 @@
package net.sourceforge.plantuml.ugraphic.hand;
import java.awt.geom.CubicCurve2D;
+import java.util.Random;
import net.sourceforge.plantuml.posimo.DotPath;
import net.sourceforge.plantuml.ugraphic.UPath;
@@ -43,9 +44,9 @@ public class UDotPathHand {
private final UPath path;
- public UDotPathHand(DotPath source) {
+ public UDotPathHand(DotPath source, Random rnd) {
- final HandJiggle jiggle = new HandJiggle(source.getStartPoint(), 2.0);
+ final HandJiggle jiggle = new HandJiggle(source.getStartPoint(), 2.0, rnd);
for (CubicCurve2D curve : source.getBeziers()) {
jiggle.curveTo(curve);
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/UEllipseHand.java b/src/net/sourceforge/plantuml/ugraphic/hand/UEllipseHand.java
index 228b1a0..0cf11e2 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/UEllipseHand.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/UEllipseHand.java
@@ -35,6 +35,7 @@
package net.sourceforge.plantuml.ugraphic.hand;
import java.awt.geom.Point2D;
+import java.util.Random;
import net.sourceforge.plantuml.ugraphic.Shadowable;
import net.sourceforge.plantuml.ugraphic.UEllipse;
@@ -43,9 +44,14 @@ import net.sourceforge.plantuml.ugraphic.UPolygon;
public class UEllipseHand {
private Shadowable poly;
+ private final Random rnd;
- public UEllipseHand(UEllipse source) {
+ private double randomMe() {
+ return rnd.nextDouble();
+ }
+ public UEllipseHand(UEllipse source, Random rnd) {
+ this.rnd = rnd;
if (source.getStart() != 0 || source.getExtend() != 0) {
this.poly = source;
return;
@@ -56,8 +62,8 @@ public class UEllipseHand {
double angle = 0;
if (width == height) {
while (angle < Math.PI * 2) {
- angle += (10 + Math.random() * 10) * Math.PI / 180;
- final double variation = 1 + (Math.random() - 0.5) / 8;
+ angle += (10 + randomMe() * 10) * Math.PI / 180;
+ final double variation = 1 + (randomMe() - 0.5) / 8;
final double x = width / 2 + Math.cos(angle) * width * variation / 2;
final double y = height / 2 + Math.sin(angle) * height * variation / 2;
// final Point2D.Double p = new Point2D.Double(x, y);
@@ -78,7 +84,7 @@ public class UEllipseHand {
private Point2D getPoint(double width, double height, double angle) {
final double x = width / 2 + Math.cos(angle) * width / 2;
final double y = height / 2 + Math.sin(angle) * height / 2;
- final double variation = (Math.random() - 0.5) / 50;
+ final double variation = (randomMe() - 0.5) / 50;
return new Point2D.Double(x + variation * width, y + variation * height);
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/UGraphicHandwritten.java b/src/net/sourceforge/plantuml/ugraphic/hand/UGraphicHandwritten.java
index 25c18e4..73182b0 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/UGraphicHandwritten.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/UGraphicHandwritten.java
@@ -34,6 +34,8 @@
*/
package net.sourceforge.plantuml.ugraphic.hand;
+import java.util.Random;
+
import net.sourceforge.plantuml.Url;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.posimo.DotPath;
@@ -51,10 +53,7 @@ import net.sourceforge.plantuml.ugraphic.UShape;
public class UGraphicHandwritten implements UGraphic {
private final UGraphic ug;
-
- public double dpiFactor() {
- return ug.dpiFactor();
- }
+ private final Random rnd = new Random(424242L);
public UGraphicHandwritten(UGraphic ug) {
this.ug = ug;
@@ -89,32 +88,32 @@ public class UGraphicHandwritten implements UGraphic {
}
private void drawHand(UPath shape) {
- final UPathHand uline = new UPathHand(shape);
+ final UPathHand uline = new UPathHand(shape, rnd);
ug.draw(uline.getHanddrawn());
}
private void drawHand(DotPath shape) {
- final UDotPathHand uline = new UDotPathHand(shape);
+ final UDotPathHand uline = new UDotPathHand(shape, rnd);
ug.draw(uline.getHanddrawn());
}
private void drawHand(UPolygon shape) {
- final UPolygonHand hand = new UPolygonHand(shape);
+ final UPolygonHand hand = new UPolygonHand(shape, rnd);
ug.draw(hand.getHanddrawn());
}
private void drawHand(URectangle shape) {
- final URectangleHand hand = new URectangleHand(shape);
+ final URectangleHand hand = new URectangleHand(shape, rnd);
ug.draw(hand.getHanddrawn());
}
private void drawHand(ULine shape) {
- final ULineHand uline = new ULineHand(shape);
+ final ULineHand uline = new ULineHand(shape, rnd);
ug.draw(uline.getHanddrawn());
}
private void drawHand(UEllipse shape) {
- final UEllipseHand uline = new UEllipseHand(shape);
+ final UEllipseHand uline = new UEllipseHand(shape, rnd);
ug.draw(uline.getHanddrawn());
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/ULineHand.java b/src/net/sourceforge/plantuml/ugraphic/hand/ULineHand.java
index e546cfa..29fda02 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/ULineHand.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/ULineHand.java
@@ -34,6 +34,8 @@
*/
package net.sourceforge.plantuml.ugraphic.hand;
+import java.util.Random;
+
import net.sourceforge.plantuml.ugraphic.ULine;
import net.sourceforge.plantuml.ugraphic.UPath;
@@ -41,10 +43,10 @@ public class ULineHand {
private UPath path;
- public ULineHand(ULine line) {
+ public ULineHand(ULine line, Random rnd) {
final double endX = line.getDX();
final double endY = line.getDY();
- final HandJiggle jiggle = new HandJiggle(0, 0, 2.0);
+ final HandJiggle jiggle = new HandJiggle(0, 0, 2.0, rnd);
jiggle.lineTo(endX, endY);
this.path = jiggle.toUPath();
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/UPathHand.java b/src/net/sourceforge/plantuml/ugraphic/hand/UPathHand.java
index afad570..b986271 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/UPathHand.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/UPathHand.java
@@ -35,6 +35,7 @@
package net.sourceforge.plantuml.ugraphic.hand;
import java.awt.geom.Point2D;
+import java.util.Random;
import net.sourceforge.plantuml.ugraphic.UPath;
import net.sourceforge.plantuml.ugraphic.USegment;
@@ -45,7 +46,7 @@ public class UPathHand {
private final UPath path;
private final double defaultVariation = 4.0;
- public UPathHand(UPath source) {
+ public UPathHand(UPath source, Random rnd) {
final UPath jigglePath = new UPath();
@@ -62,7 +63,7 @@ public class UPathHand {
} else if (type == USegmentType.SEG_LINETO) {
final double x = segment.getCoord()[0];
final double y = segment.getCoord()[1];
- final HandJiggle jiggle = new HandJiggle(last.getX(), last.getY(), defaultVariation);
+ final HandJiggle jiggle = new HandJiggle(last.getX(), last.getY(), defaultVariation, rnd);
jiggle.lineTo(x, y);
for (USegment seg2 : jiggle.toUPath()) {
if (seg2.getSegmentType() == USegmentType.SEG_LINETO) {
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/UPolygonHand.java b/src/net/sourceforge/plantuml/ugraphic/hand/UPolygonHand.java
index c967fd9..41a6320 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/UPolygonHand.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/UPolygonHand.java
@@ -36,6 +36,7 @@ package net.sourceforge.plantuml.ugraphic.hand;
import java.awt.geom.Point2D;
import java.util.List;
+import java.util.Random;
import net.sourceforge.plantuml.ugraphic.Shadowable;
import net.sourceforge.plantuml.ugraphic.UPolygon;
@@ -44,13 +45,13 @@ public class UPolygonHand {
private final UPolygon poly;
- public UPolygonHand(UPolygon source) {
+ public UPolygonHand(UPolygon source, Random rnd) {
final List<Point2D.Double> pt = source.getPoints();
if (pt.size() == 0) {
poly = new UPolygon();
return;
}
- final HandJiggle jiggle = new HandJiggle(pt.get(0), 1.5);
+ final HandJiggle jiggle = new HandJiggle(pt.get(0), 1.5, rnd);
for (int i = 1; i < pt.size(); i++) {
jiggle.lineTo(pt.get(i));
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/hand/URectangleHand.java b/src/net/sourceforge/plantuml/ugraphic/hand/URectangleHand.java
index 1e43ead..31bb85b 100644
--- a/src/net/sourceforge/plantuml/ugraphic/hand/URectangleHand.java
+++ b/src/net/sourceforge/plantuml/ugraphic/hand/URectangleHand.java
@@ -34,6 +34,8 @@
*/
package net.sourceforge.plantuml.ugraphic.hand;
+import java.util.Random;
+
import net.sourceforge.plantuml.ugraphic.Shadowable;
import net.sourceforge.plantuml.ugraphic.UPolygon;
import net.sourceforge.plantuml.ugraphic.URectangle;
@@ -42,7 +44,7 @@ public class URectangleHand {
final private UPolygon poly;
- public URectangleHand(URectangle rectangle) {
+ public URectangleHand(URectangle rectangle, Random rnd) {
final double width = rectangle.getWidth();
final double height = rectangle.getHeight();
final HandJiggle jiggle;
@@ -50,13 +52,13 @@ public class URectangleHand {
final double ry = Math.min(rectangle.getRy() / 2, height / 2);
// System.err.println("rx=" + rx + " ry=" + ry);
if (rx == 0 && ry == 0) {
- jiggle = new HandJiggle(0, 0, 1.5);
+ jiggle = new HandJiggle(0, 0, 1.5, rnd);
jiggle.lineTo(width, 0);
jiggle.lineTo(width, height);
jiggle.lineTo(0, height);
jiggle.lineTo(0, 0);
} else {
- jiggle = new HandJiggle(rx, 0, 1.5);
+ jiggle = new HandJiggle(rx, 0, 1.5, rnd);
jiggle.lineTo(width - rx, 0);
jiggle.arcTo(-Math.PI / 2, 0, width - rx, ry, rx, ry);
jiggle.lineTo(width, height - ry);
diff --git a/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteMonochrome.java b/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteMonochrome.java
index e1bf77e..3d152bf 100644
--- a/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteMonochrome.java
+++ b/src/net/sourceforge/plantuml/ugraphic/sprite/SpriteMonochrome.java
@@ -45,6 +45,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.HtmlColor;
import net.sourceforge.plantuml.graphic.HtmlColorGradient;
+import net.sourceforge.plantuml.graphic.HtmlColorSimple;
import net.sourceforge.plantuml.graphic.HtmlColorUtils;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
@@ -181,7 +182,6 @@ public class SpriteMonochrome implements Sprite {
}
public UImage toUImage(ColorMapper colorMapper, HtmlColor backcolor, HtmlColor color) {
- final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
if (backcolor == null) {
backcolor = HtmlColorUtils.WHITE;
@@ -189,6 +189,10 @@ public class SpriteMonochrome implements Sprite {
if (color == null) {
color = HtmlColorUtils.BLACK;
}
+ // if (backcolor instanceof HtmlColorGradient) {
+ // return special(colorMapper, (HtmlColorGradient) backcolor, color);
+ // }
+ final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
final HtmlColorGradient gradient = new HtmlColorGradient(backcolor, color, '\0');
for (int col = 0; col < width; col++) {
for (int line = 0; line < height; line++) {
@@ -200,6 +204,21 @@ public class SpriteMonochrome implements Sprite {
return new UImage(im);
}
+ private UImage special(ColorMapper colorMapper, HtmlColorGradient backcolor, HtmlColor color) {
+ final BufferedImage im = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+ for (int col = 0; col < width; col++) {
+ for (int line = 0; line < height; line++) {
+ final HtmlColor backColorLocal = new HtmlColorSimple(backcolor.getColor(colorMapper, 1.0 * line
+ / height), false);
+ final HtmlColorGradient gradient = new HtmlColorGradient(backColorLocal, color, '\0');
+ final double coef = 1.0 * grey[line][col] / (grayLevel - 1);
+ final Color c = gradient.getColor(colorMapper, coef);
+ im.setRGB(col, line, c.getRGB());
+ }
+ }
+ return new UImage(im);
+ }
+
public TextBlock asTextBlock(final HtmlColor color, final double scale) {
return new AbstractTextBlock() {
diff --git a/src/net/sourceforge/plantuml/project2/TaskAttribute.java b/src/net/sourceforge/plantuml/ugraphic/tikz/DriverImageTikz.java
index f9ab05b..06cf9d8 100644
--- a/src/net/sourceforge/plantuml/project2/TaskAttribute.java
+++ b/src/net/sourceforge/plantuml/ugraphic/tikz/DriverImageTikz.java
@@ -30,35 +30,21 @@
*
*
* Original Author: Arnaud Roques
- *
*
*/
-package net.sourceforge.plantuml.project2;
+package net.sourceforge.plantuml.ugraphic.tikz;
-public enum TaskAttribute {
+import net.sourceforge.plantuml.tikz.TikzGraphics;
+import net.sourceforge.plantuml.ugraphic.ColorMapper;
+import net.sourceforge.plantuml.ugraphic.UDriver;
+import net.sourceforge.plantuml.ugraphic.UImage;
+import net.sourceforge.plantuml.ugraphic.UParam;
+import net.sourceforge.plantuml.ugraphic.UShape;
- START, END, COMPLETED, DURATION, LOAD;
+public class DriverImageTikz implements UDriver<TikzGraphics> {
- static public TaskAttribute fromString(String n) {
- if (n.equalsIgnoreCase("begin")) {
- return START;
- }
- if (n.equalsIgnoreCase("start")) {
- return START;
- }
- if (n.equalsIgnoreCase("work")) {
- return LOAD;
- }
- if (n.equalsIgnoreCase("load")) {
- return LOAD;
- }
- if (n.equalsIgnoreCase("duration")) {
- return DURATION;
- }
- if (n.equalsIgnoreCase("completed")) {
- return COMPLETED;
- }
- return null;
+ public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, TikzGraphics tikz) {
+ final UImage shape = (UImage) ushape;
+ tikz.appendRaw(x, y, shape.getFormula());
}
-
}
diff --git a/src/net/sourceforge/plantuml/ugraphic/tikz/UGraphicTikz.java b/src/net/sourceforge/plantuml/ugraphic/tikz/UGraphicTikz.java
index cd85031..8925207 100644
--- a/src/net/sourceforge/plantuml/ugraphic/tikz/UGraphicTikz.java
+++ b/src/net/sourceforge/plantuml/ugraphic/tikz/UGraphicTikz.java
@@ -97,7 +97,7 @@ public class UGraphicTikz extends AbstractUGraphic<TikzGraphics> implements Clip
registerDriver(ULine.class, new DriverLineTikz());
registerDriver(UPolygon.class, new DriverPolygonTikz());
registerDriver(UEllipse.class, new DriverEllipseTikz());
- registerDriver(UImage.class, new DriverNoneTikz());
+ registerDriver(UImage.class, new DriverImageTikz());
registerDriver(UImageSvg.class, new DriverNoneTikz());
registerDriver(UPath.class, new DriverUPathTikz());
registerDriver(DotPath.class, new DriverDotPathTikz());
diff --git a/src/net/sourceforge/plantuml/utils/StartUtils.java b/src/net/sourceforge/plantuml/utils/StartUtils.java
index 979886e..ac296b5 100644
--- a/src/net/sourceforge/plantuml/utils/StartUtils.java
+++ b/src/net/sourceforge/plantuml/utils/StartUtils.java
@@ -80,6 +80,9 @@ public class StartUtils {
public static boolean isArobaseStartDiagram(CharSequence s) {
final String s2 = StringUtils.trinNoTrace(s);
+ if (s2.startsWith("@") == false && s2.startsWith("\\") == false) {
+ return false;
+ }
return DiagramType.getTypeFromArobaseStart(s2) != DiagramType.UNKNOWN;
}
@@ -91,6 +94,14 @@ public class StartUtils {
return tmp.startsWith("@" + value) || tmp.startsWith("\\" + value);
}
+ public static boolean startOrEnd(final CharSequence2 s) {
+ final String s2 = StringUtils.trinNoTrace(s);
+ if (s2.startsWith("@") == false && s2.startsWith("\\") == false) {
+ return false;
+ }
+ return startsWithSymbolAnd("end", s2) || DiagramType.getTypeFromArobaseStart(s2) != DiagramType.UNKNOWN;
+ }
+
public static boolean isArobaseEndDiagram(CharSequence s) {
final String s2 = StringUtils.trinNoTrace(s);
return startsWithSymbolAnd("end", s2);
diff --git a/src/net/sourceforge/plantuml/version/License.java b/src/net/sourceforge/plantuml/version/License.java
index 6d7a0e3..48eabf7 100644
--- a/src/net/sourceforge/plantuml/version/License.java
+++ b/src/net/sourceforge/plantuml/version/License.java
@@ -273,6 +273,7 @@ public enum License {
text.add("PlantUML can occasionally display sponsored or advertising messages. Those");
text.add("messages are usually generated on welcome or error images and never on");
text.add("functional diagrams.");
+ text.add("See http://plantuml.com/professional if you want to remove them");
text.add(" ");
}
text.add("Images (whatever their format : PNG, SVG, EPS...) generated by running PlantUML");
@@ -280,19 +281,23 @@ public enum License {
text.add("textual description in PlantUML language). Those images are not covered by");
}
- private List<String> getHeaderStart(LicenseInfo licenseInfo) {
+ private List<String> getHeaderStart(LicenseInfo licenseInfo, boolean withQrcode) {
final List<String> text = new ArrayList<String>();
if (licenseInfo.isNone()) {
- text.add("========================================================================");
- text.add("PlantUML : a free UML diagram generator");
- text.add("========================================================================");
+ text.add("+=======================================================================");
+ text.add("| ");
+ text.add("| PlantUML : a free UML diagram generator");
+ text.add("| ");
+ text.add("+=======================================================================");
text.add(" ");
} else {
- text.add("========================================================================");
- text.add("This is PlantUML Professional Edition");
- text.add("========================================================================");
+ text.add("+=======================================================================");
+ text.add("| ");
+ text.add("| PlantUML Professional Edition");
+ text.add("| ");
+ text.add("+=======================================================================");
addLicenseInfo(text, licenseInfo);
- text.add("========================================================================");
+ text.add("+=======================================================================");
text.add(" ");
}
text.add("(C) Copyright 2009-2017, Arnaud Roques");
@@ -303,17 +308,32 @@ public enum License {
text.add("If you like this project or if you find it useful, you can support us at:");
text.add(" ");
text.add("http://plantuml.com/patreon (only 1$ per month!)");
+ text.add("http://plantuml.com/liberapay (only 1\u20ac per month!)");
text.add("http://plantuml.com/paypal");
- text.add(" ");
+ if (withQrcode) {
+ text.add("\t<qrcode:http://plantuml.com/patreon>\t\t<qrcode:http://plantuml.com/lp>\t\t<qrcode:http://plantuml.com/paypal>");
+ } else {
+ text.add("");
+ text.add(" ");
+ }
}
return text;
}
public static void addLicenseInfo(final List<String> text, LicenseInfo licenseInfo) {
- text.add("LICENSED TO : " + licenseInfo.getOwner());
- text.add("EXPIRATION DATE : " + DateFormat.getDateInstance().format(licenseInfo.getExpirationDate()));
+ if (licenseInfo.getLicenseType() == LicenseType.NAMED) {
+ text.add("| ");
+ text.add("| LICENSED TO : " + licenseInfo.getOwner());
+ text.add("| EXPIRATION DATE : " + DateFormat.getDateInstance().format(licenseInfo.getExpirationDate()));
+ text.add("| ");
+ } else if (licenseInfo.getLicenseType() == LicenseType.DISTRIBUTOR) {
+ text.add("| ");
+ text.add("| DISTRIBUTED BY : " + licenseInfo.getOwner());
+ text.add("| ");
+ }
if (licenseInfo.hasExpired()) {
- text.add("<i>Warning: Your license has expired.");
+ text.add("| <i>Warning: Your license has expired.");
+ text.add("| ");
}
}
@@ -451,9 +471,9 @@ public enum License {
return Collections.unmodifiableList(h);
}
- public List<String> getText() {
- final LicenseInfo licenseInfo = LicenseInfo.retrieveSlow();
- final List<String> text = getHeaderStart(licenseInfo);
+ public List<String> getText(boolean withQrcode) {
+ final LicenseInfo licenseInfo = LicenseInfo.retrieveQuick();
+ final List<String> text = getHeaderStart(licenseInfo, withQrcode);
if (this == License.GPL) {
addGpl(licenseInfo, text);
} else if (this == License.GPLV2) {
diff --git a/src/net/sourceforge/plantuml/version/LicenseInfo.java b/src/net/sourceforge/plantuml/version/LicenseInfo.java
index 1f842c4..83ed2cb 100644
--- a/src/net/sourceforge/plantuml/version/LicenseInfo.java
+++ b/src/net/sourceforge/plantuml/version/LicenseInfo.java
@@ -38,8 +38,12 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
import java.util.Collection;
import java.util.Date;
import java.util.Set;
@@ -48,6 +52,7 @@ import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
import net.sourceforge.plantuml.Log;
+import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.SignatureUtils;
import net.sourceforge.plantuml.dedication.Dedication;
import net.sourceforge.plantuml.dedication.QBlock;
@@ -55,34 +60,51 @@ import net.sourceforge.plantuml.dedication.QBlock;
public class LicenseInfo {
private final static Preferences prefs = Preferences.userNodeForPackage(LicenseInfo.class);
- private final static LicenseInfo NONE = new LicenseInfo();
+ private final static LicenseInfo NONE = new LicenseInfo(LicenseType.NONE, 0, 0, null, null);
public static final int POS_TYPE = 2;
+ public static final int POS_CONTEXT = 4;
public static final int POS_SIGNATURE = 10;
public static final int POS_GENERATION = 100;
public static final int POS_EXPIRATION = 108;
public static final int POS_OWNER = 128;
+ private final LicenseType type;
private final long generationDate;
private final long expirationDate;
private final String owner;
+ private final String context;
- private LicenseInfo() {
- this.expirationDate = 0;
- this.generationDate = 0;
- this.owner = null;
+ private LicenseInfo(LicenseType type, long generationDate, long expirationDate, String owner, String context) {
+ this.type = type;
+ this.generationDate = generationDate;
+ this.expirationDate = expirationDate;
+ this.owner = owner;
+ this.context = context;
}
- private LicenseInfo(Magic magic) throws NoSuchAlgorithmException, IOException {
+ private static LicenseInfo buildNamed(Magic magic, boolean doCheck) throws NoSuchAlgorithmException, IOException {
final String signature = SignatureUtils.toHexString(magic.get(LicenseInfo.POS_SIGNATURE, 64));
- final String local = SignatureUtils.toHexString(Magic.signature());
- if (local.equals(signature) == false) {
- throw new IOException();
+ if (doCheck) {
+ final String local = SignatureUtils.toHexString(Magic.signature());
+ if (local.equals(signature) == false) {
+ throw new IOException();
+ }
}
- final int type = magic.getByte(Magic.signature(), LicenseInfo.POS_TYPE);
- this.generationDate = bytesToLong(magic.get(LicenseInfo.POS_GENERATION, 8));
- this.expirationDate = bytesToLong(magic.get(LicenseInfo.POS_EXPIRATION, 8));
- this.owner = magic.getString(LicenseInfo.POS_OWNER);
+ final LicenseType type = LicenseType.fromInt(magic.getByte(Magic.signature(), LicenseInfo.POS_TYPE));
+ final long generation = bytesToLong(magic.get(LicenseInfo.POS_GENERATION, 8));
+ final long expiration = bytesToLong(magic.get(LicenseInfo.POS_EXPIRATION, 8));
+ final String owner = magic.getString(LicenseInfo.POS_OWNER);
+ return new LicenseInfo(type, generation, expiration, owner, null);
+ }
+
+ private static LicenseInfo buildDistributor(Magic magic) throws IOException, NoSuchAlgorithmException {
+ final LicenseType type = LicenseType.fromInt(magic.getByte(LicenseInfo.POS_TYPE));
+ final long generation = bytesToLong(magic.get(LicenseInfo.POS_GENERATION, 8));
+ final long expiration = bytesToLong(magic.get(LicenseInfo.POS_EXPIRATION, 8));
+ final String owner = magic.getString(LicenseInfo.POS_OWNER);
+ final String context = magic.getString(LicenseInfo.POS_CONTEXT);
+ return new LicenseInfo(type, generation, expiration, owner, context);
}
public static long bytesToLong(byte[] b) {
@@ -103,16 +125,26 @@ public class LicenseInfo {
public static synchronized LicenseInfo retrieveQuick() {
if (cache == null) {
- return retrieveSlow();
+ cache = retrieveDistributor();
+ }
+ if (cache == null) {
+ cache = retrieveNamedSlow();
}
return cache;
}
- public static synchronized LicenseInfo retrieveSlow() {
+ public static boolean retrieveNamedOrDistributorQuickIsValid() {
+ return retrieveQuick().isValid();
+ }
+
+ public static synchronized LicenseInfo retrieveNamedSlow() {
cache = LicenseInfo.NONE;
+ if (OptionFlags.ALLOW_INCLUDE == false) {
+ return cache;
+ }
final String key = prefs.get("license", "");
if (key.length() > 0) {
- cache = setIfValid(retrieve(key), cache);
+ cache = setIfValid(retrieveNamed(key), cache);
if (cache.isValid()) {
return cache;
}
@@ -134,41 +166,57 @@ public class LicenseInfo {
return cache;
}
- private static LicenseInfo setIfValid(LicenseInfo value, LicenseInfo def) {
- if (value.isValid() || def.isNone()) {
- return value;
+ public static LicenseInfo retrieveNamed(final String key) {
+ if (key.length() > 99 && key.matches("^[0-9a-z]+$")) {
+ try {
+ final String sig = SignatureUtils.toHexString(Magic.signature());
+ return retrieveNamed(sig, key, true);
+ } catch (Exception e) {
+ // e.printStackTrace();
+ Log.info("Error retrieving license info" + e);
+ }
}
- return def;
+ return LicenseInfo.NONE;
}
- private static LicenseInfo retrieve(File f) throws IOException {
- final BufferedReader br = new BufferedReader(new FileReader(f));
- final String s = br.readLine();
- br.close();
- final LicenseInfo result = retrieve(s);
- if (result != null) {
- Log.info("Reading license from " + f.getAbsolutePath());
- }
- return result;
+ public static LicenseInfo retrieveNamed(final String sig, final String key, boolean doCheck)
+ throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeySpecException, IOException {
+ final BigInteger lu = new BigInteger(key, 36);
+ final QBlock qb2 = new QBlock(lu);
+ final QBlock qb3 = qb2.change(Dedication.E, Dedication.N);
+ final Magic magic = qb3.toMagic();
+
+ magic.xor(SignatureUtils.getSHA512raw(SignatureUtils.salting(sig, Magic.getSalt(sig))));
+ return LicenseInfo.buildNamed(magic, doCheck);
}
- public static LicenseInfo retrieve(final String key) {
- if (key.matches("^[0-9a-z]+$")) {
- try {
- final BigInteger lu = new BigInteger(key, 36);
- final QBlock qb2 = new QBlock(lu);
- final QBlock qb3 = qb2.change(Dedication.E, Dedication.N);
- final Magic magic = qb3.toMagic();
+ public static LicenseInfo retrieveDistributor() {
+ final InputStream dis = PSystemVersion.class.getResourceAsStream("/distributor.txt");
+ if (dis == null) {
+ return null;
+ }
+ try {
+ final BufferedReader br = new BufferedReader(new InputStreamReader(dis));
+ final String licenseString = br.readLine();
+ br.close();
+ final BigInteger lu = new BigInteger(licenseString, 36);
+ final QBlock qb2 = new QBlock(lu);
+ final QBlock qb3 = qb2.change(Dedication.E, Dedication.N);
+ final Magic magic = qb3.toMagic();
+ final LicenseInfo result = LicenseInfo.buildDistributor(magic);
- final String sig = SignatureUtils.toHexString(Magic.signature());
- magic.xor(SignatureUtils.getSHA512raw(SignatureUtils.salting(sig, Magic.getSalt(sig))));
- return new LicenseInfo(magic);
- } catch (Exception e) {
- // e.printStackTrace();
- Log.info("Error " + e);
+ final Throwable creationPoint = new Throwable();
+ creationPoint.fillInStackTrace();
+ for (StackTraceElement ste : creationPoint.getStackTrace()) {
+ if (ste.toString().contains(result.context)) {
+ return result;
+ }
}
+ return null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
}
- return LicenseInfo.NONE;
}
public static Collection<File> fileCandidates() {
@@ -180,15 +228,35 @@ public class LicenseInfo {
if (dir.isFile()) {
dir = dir.getParentFile();
}
- if (dir.isDirectory()) {
+ if (dir != null && dir.isDirectory()) {
result.add(new File(dir, "license.txt"));
}
}
return result;
}
+
+ private static LicenseInfo setIfValid(LicenseInfo value, LicenseInfo def) {
+ if (value.isValid() || def.isNone()) {
+ return value;
+ }
+ return def;
+ }
+
+ private static LicenseInfo retrieve(File f) throws IOException {
+ final BufferedReader br = new BufferedReader(new FileReader(f));
+ final String s = br.readLine();
+ br.close();
+ final LicenseInfo result = retrieveNamed(s);
+ if (result != null) {
+ Log.info("Reading license from " + f.getAbsolutePath());
+ }
+ return result;
+ }
+
+
public static void main(String[] args) {
- LicenseInfo info = retrieveSlow();
+ LicenseInfo info = retrieveNamedSlow();
System.err.println("valid=" + info.isValid());
System.err.println("info=" + info.owner);
@@ -218,4 +286,12 @@ public class LicenseInfo {
return owner != null && System.currentTimeMillis() > this.expirationDate;
}
+ public final LicenseType getLicenseType() {
+ return type;
+ }
+
+ public final String getContext() {
+ return context;
+ }
+
}
diff --git a/src/net/sourceforge/plantuml/project2/Task.java b/src/net/sourceforge/plantuml/version/LicenseType.java
index 8a9b879..2288596 100644
--- a/src/net/sourceforge/plantuml/project2/Task.java
+++ b/src/net/sourceforge/plantuml/version/LicenseType.java
@@ -30,23 +30,25 @@
*
*
* Original Author: Arnaud Roques
- *
*
*/
-package net.sourceforge.plantuml.project2;
-
-public interface Task {
-
- public String getCode();
-
- public String getName();
-
- public long getLoad();
-
- public TimeElement getStart();
-
- public TimeElement getEnd();
-
- public TimeElement getCompleted();
+package net.sourceforge.plantuml.version;
+
+public enum LicenseType {
+
+ NONE, NAMED, DISTRIBUTOR, UNKNOWN;
+
+ public static LicenseType fromInt(int type) {
+ if (type == -1) {
+ return NONE;
+ }
+ if (type == 0) {
+ return NAMED;
+ }
+ if (type == 2) {
+ return DISTRIBUTOR;
+ }
+ return UNKNOWN;
+ }
}
diff --git a/src/net/sourceforge/plantuml/version/Magic.java b/src/net/sourceforge/plantuml/version/Magic.java
index a5e7d2c..abf1275 100644
--- a/src/net/sourceforge/plantuml/version/Magic.java
+++ b/src/net/sourceforge/plantuml/version/Magic.java
@@ -83,6 +83,10 @@ public class Magic {
return buffer;
}
+ public void setByte(int pos, int data) {
+ buffer[pos] = (byte) (0xFF & data);
+ }
+
public void setByte(byte[] shrink, int pos, int data) {
buffer[pos] = (byte) (0xFF & (data ^ shrink(shrink)));
}
@@ -91,6 +95,10 @@ public class Magic {
return buffer[pos] ^ shrink(shrink);
}
+ public int getByte(int pos) {
+ return buffer[pos];
+ }
+
public void set(int pos, byte[] data) {
for (int i = 0; i < data.length; i++) {
buffer[pos + i] = data[i];
diff --git a/src/net/sourceforge/plantuml/version/PSystemKeycheck.java b/src/net/sourceforge/plantuml/version/PSystemKeycheck.java
new file mode 100644
index 0000000..17bad33
--- /dev/null
+++ b/src/net/sourceforge/plantuml/version/PSystemKeycheck.java
@@ -0,0 +1,154 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of PlantUML.
+ *
+ * PlantUML 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.
+ *
+ * PlantUML 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ * USA.
+ *
+ *
+ * Original Author: Arnaud Roques
+ *
+ */
+package net.sourceforge.plantuml.version;
+
+import java.awt.Color;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.security.NoSuchAlgorithmException;
+import java.security.spec.InvalidKeySpecException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.prefs.BackingStoreException;
+
+import net.sourceforge.plantuml.AbstractPSystem;
+import net.sourceforge.plantuml.FileFormatOption;
+import net.sourceforge.plantuml.OptionFlags;
+import net.sourceforge.plantuml.SignatureUtils;
+import net.sourceforge.plantuml.core.DiagramDescription;
+import net.sourceforge.plantuml.core.ImageData;
+import net.sourceforge.plantuml.flashcode.FlashCodeFactory;
+import net.sourceforge.plantuml.flashcode.FlashCodeUtils;
+import net.sourceforge.plantuml.graphic.GraphicStrings;
+import net.sourceforge.plantuml.graphic.HtmlColorUtils;
+import net.sourceforge.plantuml.graphic.TextBlock;
+import net.sourceforge.plantuml.graphic.UDrawable;
+import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
+import net.sourceforge.plantuml.ugraphic.ImageBuilder;
+import net.sourceforge.plantuml.ugraphic.UGraphic;
+import net.sourceforge.plantuml.ugraphic.UImage;
+import net.sourceforge.plantuml.ugraphic.UTranslate;
+
+public class PSystemKeycheck extends AbstractPSystem {
+
+ final private String key;
+ final private String sig;
+
+ public PSystemKeycheck(String sig, String key) {
+ this.sig = sig;
+ this.key = key;
+ }
+
+ @Override
+ final protected ImageData exportDiagramNow(OutputStream os, int num, FileFormatOption fileFormat, long seed)
+ throws IOException {
+ final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE,
+ getMetadata(), null, 0, 0, null, false);
+
+ imageBuilder.setUDrawable(new UDrawable() {
+ public void drawU(UGraphic ug) {
+ try {
+ drawInternal(ug);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ });
+ return imageBuilder.writeImageTOBEMOVED(fileFormat, seed, os);
+ }
+
+ public DiagramDescription getDescription() {
+ return new DiagramDescription("(Key)");
+ }
+
+ private void drawInternal(UGraphic ug) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException {
+ final List<String> strings = header();
+ try {
+ final LicenseInfo info = LicenseInfo.retrieveNamed(sig, key, false);
+ strings.add("<u>Provided license information</u>:");
+ License.addLicenseInfo(strings, info);
+ strings.add(" ");
+ } catch (Exception e) {
+ e.printStackTrace();
+ strings.add("<i>Error:</i> " + e);
+ }
+
+ final TextBlock disp = GraphicStrings.createBlackOnWhite(strings);
+ disp.drawU(ug);
+ }
+
+ private ArrayList<String> header() {
+ final ArrayList<String> strings = new ArrayList<String>();
+ strings.add("<b>PlantUML version " + Version.versionString() + "</b> (" + Version.compileTimeString() + ")");
+ strings.add("(" + License.getCurrent() + " source distribution)");
+ if (OptionFlags.ALLOW_INCLUDE) {
+ strings.add("Loaded from " + Version.getJarPath());
+ }
+ strings.add(" ");
+ return strings;
+ }
+
+ private void drawFlash(UGraphic ug, LicenseInfo info) throws IOException {
+ final List<String> strings = header();
+ strings.add("To get your <i>Professional Edition License</i>,");
+ strings.add("please send this qrcode to <b>plantuml@gmail.com</b> :");
+
+ TextBlock disp = GraphicStrings.createBlackOnWhite(strings);
+ disp.drawU(ug);
+
+ ug = ug.apply(new UTranslate(0, disp.calculateDimension(ug.getStringBounder()).getHeight()));
+ final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
+ final BufferedImage im = utils.exportFlashcode(
+ Version.versionString() + "\n" + SignatureUtils.toHexString(Magic.signature()), Color.BLACK,
+ Color.WHITE);
+ if (im != null) {
+ final UImage flash = new UImage(im).scaleNearestNeighbor(4);
+ ug.draw(flash);
+ ug = ug.apply(new UTranslate(0, flash.getHeight()));
+ }
+
+ if (info.isNone() == false) {
+ strings.clear();
+ strings.add("<u>Installed license</u>:");
+ License.addLicenseInfo(strings, info);
+ strings.add(" ");
+ disp = GraphicStrings.createBlackOnWhite(strings);
+ disp.drawU(ug);
+ }
+
+ }
+}
diff --git a/src/net/sourceforge/plantuml/version/PSystemKeygen.java b/src/net/sourceforge/plantuml/version/PSystemKeygen.java
index 2693ac8..15a422e 100644
--- a/src/net/sourceforge/plantuml/version/PSystemKeygen.java
+++ b/src/net/sourceforge/plantuml/version/PSystemKeygen.java
@@ -34,6 +34,7 @@
*/
package net.sourceforge.plantuml.version;
+import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
@@ -44,6 +45,7 @@ import java.util.prefs.BackingStoreException;
import net.sourceforge.plantuml.AbstractPSystem;
import net.sourceforge.plantuml.FileFormatOption;
+import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.SignatureUtils;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
@@ -86,17 +88,18 @@ public class PSystemKeygen extends AbstractPSystem {
}
public DiagramDescription getDescription() {
- return new DiagramDescription("(Genkey)");
+ return new DiagramDescription("(Key)");
}
private void drawInternal(UGraphic ug) throws IOException {
+ final LicenseInfo installed = LicenseInfo.retrieveNamedSlow();
if (key.length() == 0) {
- drawFlash(ug);
+ drawFlash(ug, installed);
return;
}
- final LicenseInfo info = LicenseInfo.retrieve(key);
+ final LicenseInfo info = LicenseInfo.retrieveNamed(key);
if (info.isNone()) {
- drawFlash(ug);
+ drawFlash(ug, installed);
return;
}
final List<String> strings = header();
@@ -110,7 +113,6 @@ public class PSystemKeygen extends AbstractPSystem {
strings.add("<i>Error: Cannot store license key.</i>");
}
- final LicenseInfo installed = LicenseInfo.retrieveSlow();
if (installed.isNone()) {
strings.add("No license currently installed.");
strings.add(" ");
@@ -133,29 +135,31 @@ public class PSystemKeygen extends AbstractPSystem {
final ArrayList<String> strings = new ArrayList<String>();
strings.add("<b>PlantUML version " + Version.versionString() + "</b> (" + Version.compileTimeString() + ")");
strings.add("(" + License.getCurrent() + " source distribution)");
- strings.add("Loaded from " + Version.getJarPath());
+ if (OptionFlags.ALLOW_INCLUDE) {
+ strings.add("Loaded from " + Version.getJarPath());
+ }
strings.add(" ");
return strings;
}
- public void drawFlash(UGraphic ug) throws IOException {
+ private void drawFlash(UGraphic ug, LicenseInfo info) throws IOException {
final List<String> strings = header();
strings.add("To get your <i>Professional Edition License</i>,");
- strings.add("please send this flashcode to <b>plantuml@gmail.com</b> :");
+ strings.add("please send this qrcode to <b>plantuml@gmail.com</b> :");
TextBlock disp = GraphicStrings.createBlackOnWhite(strings);
disp.drawU(ug);
ug = ug.apply(new UTranslate(0, disp.calculateDimension(ug.getStringBounder()).getHeight()));
final FlashCodeUtils utils = FlashCodeFactory.getFlashCodeUtils();
- final BufferedImage im = utils.exportFlashcode(Version.versionString() + "\n"
- + SignatureUtils.toHexString(Magic.signature()));
- final UImage flash = new UImage(im).scaleNearestNeighbor(4);
- ug.draw(flash);
-
- ug = ug.apply(new UTranslate(0, flash.getHeight()));
+ final BufferedImage im = utils.exportFlashcode(
+ Version.versionString() + "\n" + SignatureUtils.toHexString(Magic.signature()), Color.BLACK, Color.WHITE);
+ if (im != null) {
+ final UImage flash = new UImage(im).scaleNearestNeighbor(4);
+ ug.draw(flash);
+ ug = ug.apply(new UTranslate(0, flash.getHeight()));
+ }
- final LicenseInfo info = LicenseInfo.retrieveSlow();
if (info.isNone() == false) {
strings.clear();
strings.add("<u>Installed license</u>:");
diff --git a/src/net/sourceforge/plantuml/version/PSystemLicense.java b/src/net/sourceforge/plantuml/version/PSystemLicense.java
index fb145ec..6896245 100644
--- a/src/net/sourceforge/plantuml/version/PSystemLicense.java
+++ b/src/net/sourceforge/plantuml/version/PSystemLicense.java
@@ -53,7 +53,7 @@ public class PSystemLicense extends AbstractPSystem {
private final List<String> strings = new ArrayList<String>();
PSystemLicense() throws IOException {
- strings.addAll(License.getCurrent().getText());
+ strings.addAll(License.getCurrent().getText(true));
}
@Override
diff --git a/src/net/sourceforge/plantuml/version/PSystemVersion.java b/src/net/sourceforge/plantuml/version/PSystemVersion.java
index 967bf93..207d10c 100644
--- a/src/net/sourceforge/plantuml/version/PSystemVersion.java
+++ b/src/net/sourceforge/plantuml/version/PSystemVersion.java
@@ -36,6 +36,7 @@ package net.sourceforge.plantuml.version;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -52,7 +53,6 @@ import javax.imageio.ImageIO;
import net.sourceforge.plantuml.AbstractPSystem;
import net.sourceforge.plantuml.FileFormatOption;
-import net.sourceforge.plantuml.FileSystem;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.OptionPrint;
@@ -60,10 +60,12 @@ import net.sourceforge.plantuml.Run;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
+import net.sourceforge.plantuml.dedication.Dedication;
import net.sourceforge.plantuml.graphic.GraphicPosition;
import net.sourceforge.plantuml.graphic.GraphicStrings;
-import net.sourceforge.plantuml.preproc.PreprocessorInclude;
+import net.sourceforge.plantuml.preproc.ImportedFiles;
import net.sourceforge.plantuml.preproc.Stdlib;
+import net.sourceforge.plantuml.preproc2.PreprocessorInclude3;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.ColorMapperIdentity;
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
@@ -81,32 +83,36 @@ public class PSystemVersion extends AbstractPSystem {
}
public static BufferedImage getPlantumlImage() {
- try {
- final InputStream is = PSystemVersion.class.getResourceAsStream("logo.png");
- final BufferedImage image = ImageIO.read(is);
- is.close();
- return image;
- } catch (IOException e) {
- e.printStackTrace();
- }
- return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ return getImage("logo.png");
}
public static BufferedImage getCharlieImage() {
- try {
- final InputStream is = PSystemVersion.class.getResourceAsStream("charlie.png");
- final BufferedImage image = ImageIO.read(is);
- is.close();
- return image;
- } catch (IOException e) {
- e.printStackTrace();
- }
- return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
+ return getImage("charlie.png");
+ }
+
+ public static BufferedImage getTime01() {
+ return getImage("time01.png");
+ }
+
+ public static BufferedImage getTime15() {
+ return getImage("time15.png");
+ }
+
+ public static BufferedImage getPlantumlSmallIcon() {
+ return getImage("favicon.png");
+ }
+
+ public static BufferedImage getArecibo() {
+ return getImage("arecibo.png");
}
- public static BufferedImage getTime() {
+ public static BufferedImage getApple2Image() {
+ return getImageWebp("apple2.png");
+ }
+
+ private static BufferedImage getImage(final String name) {
try {
- final InputStream is = PSystemVersion.class.getResourceAsStream("time00.png");
+ final InputStream is = PSystemVersion.class.getResourceAsStream(name);
final BufferedImage image = ImageIO.read(is);
is.close();
return image;
@@ -116,10 +122,10 @@ public class PSystemVersion extends AbstractPSystem {
return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
}
- public static BufferedImage getPlantumlSmallIcon() {
+ private static BufferedImage getImageWebp(final String name) {
try {
- final InputStream is = PSystemVersion.class.getResourceAsStream("favicon.png");
- final BufferedImage image = ImageIO.read(is);
+ final InputStream is = PSystemVersion.class.getResourceAsStream(name);
+ final BufferedImage image = Dedication.getBufferedImage(is);
is.close();
return image;
} catch (IOException e) {
@@ -165,17 +171,19 @@ public class PSystemVersion extends AbstractPSystem {
final List<String> strings = new ArrayList<String>();
strings.add("<b>PlantUML version " + Version.versionString() + "</b> (" + Version.compileTimeString() + ")");
strings.add("(" + License.getCurrent() + " source distribution)");
- strings.add("Loaded from " + Version.getJarPath());
- if (OptionFlags.getInstance().isWord()) {
- strings.add("Word Mode");
- strings.add("Command Line: " + Run.getCommandLine());
- strings.add("Current Dir: " + FileSystem.getInstance().getCurrentDir().getAbsolutePath());
- strings.add("plantuml.include.path: " + PreprocessorInclude.getenv("plantuml.include.path"));
+ if (OptionFlags.ALLOW_INCLUDE) {
+ strings.add("Loaded from " + Version.getJarPath());
+ if (OptionFlags.getInstance().isWord()) {
+ strings.add("Word Mode");
+ strings.add("Command Line: " + Run.getCommandLine());
+ strings.add("Current Dir: " + new File(".").getAbsolutePath());
+ strings.add("plantuml.include.path: " + PreprocessorInclude3.getenv("plantuml.include.path"));
+ }
}
strings.add(" ");
- strings.add("<b>Stdlib:");
- Stdlib.addInfoVersion(strings, false);
- strings.add(" ");
+ // strings.add("<b>Stdlib:");
+ // Stdlib.addInfoVersion(strings, false);
+ // strings.add(" ");
strings.addAll(GraphvizUtils.getTestDotStrings(true));
strings.add(" ");
@@ -316,6 +324,42 @@ public class PSystemVersion extends AbstractPSystem {
return new PSystemVersion(false, strings);
}
+ public static PSystemVersion createDumpStackTrace() throws IOException {
+ final List<String> strings = new ArrayList<String>();
+ final Throwable creationPoint = new Throwable();
+ creationPoint.fillInStackTrace();
+ for (StackTraceElement ste : creationPoint.getStackTrace()) {
+ strings.add(ste.toString());
+ }
+ return new PSystemVersion(false, strings);
+ }
+
+ public static PSystemVersion createKeyDistributor() throws IOException {
+ final LicenseInfo license = LicenseInfo.retrieveDistributor();
+
+ final List<String> strings = new ArrayList<String>();
+ if (license == null) {
+ strings.add("No license found");
+ } else {
+ strings.add(license.getOwner());
+ strings.add(license.getContext());
+ strings.add(license.getGenerationDate().toString());
+ strings.add(license.getExpirationDate().toString());
+ }
+ return new PSystemVersion(false, strings);
+ }
+
+ public static PSystemVersion createPath() throws IOException {
+ final List<String> strings = new ArrayList<String>();
+ strings.add("<u>Current Dir</u>: " + new File(".").getAbsolutePath());
+ strings.add(" ");
+ strings.add("<u>Default path</u>:");
+ for (File f : ImportedFiles.createImportedFiles(null).getPath()) {
+ strings.add(f.getAbsolutePath());
+ }
+ return new PSystemVersion(true, strings);
+ }
+
public DiagramDescription getDescription() {
return new DiagramDescription("(Version)");
}
diff --git a/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java b/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java
index a492e4f..229848c 100644
--- a/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java
+++ b/src/net/sourceforge/plantuml/version/PSystemVersionFactory.java
@@ -56,17 +56,34 @@ public class PSystemVersionFactory extends PSystemSingleLineFactory {
if (line.matches("(?i)^stdlib\\s*$")) {
return PSystemVersion.createStdLib();
}
+ if (line.matches("(?i)^path\\s*$")) {
+ return PSystemVersion.createPath();
+ }
if (line.matches("(?i)^testdot\\s*$")) {
return PSystemVersion.createTestDot();
}
+ if (line.matches("(?i)^dumpstacktrace\\s*$")) {
+ return PSystemVersion.createDumpStackTrace();
+ }
+ if (line.matches("(?i)^keydistributor\\s*$")) {
+ return PSystemVersion.createKeyDistributor();
+ }
if (line.matches("(?i)^checkversion\\s*$")) {
return PSystemVersion.createCheckVersions(null, null);
}
- if (line.matches("(?i)^keygen(\\s+[0-9a-z]+)?\\s*$")) {
+ if (line.matches("(?i)^(keygen|keyimport)(\\s+[0-9a-z]+)?\\s*$")) {
line = line.trim();
- final String key = line.substring("keygen".length()).trim();
+ final String key = line.startsWith("keygen") ? line.substring("keygen".length()).trim() : line
+ .substring("keyimport".length()).trim();
return new PSystemKeygen(key);
}
+ if (line.matches("(?i)^keycheck\\s+([0-9a-z]+)\\s+([0-9a-z]+)\\s*$")) {
+ final Pattern p = Pattern.compile("(?i)^keycheck\\s+([0-9a-z]+)\\s+([0-9a-z]+)\\s*$");
+ final Matcher m = p.matcher(line);
+ if (m.find()) {
+ return new PSystemKeycheck(m.group(1), m.group(2));
+ }
+ }
final Pattern p1 = Pattern.compile("(?i)^checkversion\\(proxy=([\\w.]+),port=(\\d+)\\)$");
final Matcher m1 = p1.matcher(line);
if (m1.matches()) {
diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java
index 8bc63d1..155df2d 100644
--- a/src/net/sourceforge/plantuml/version/Version.java
+++ b/src/net/sourceforge/plantuml/version/Version.java
@@ -43,7 +43,7 @@ public class Version {
private static final int MAJOR_SEPARATOR = 1000000;
public static int version() {
- return 1201809;
+ return 1201813;
}
public static int versionPatched() {
@@ -88,7 +88,7 @@ public class Version {
}
public static long compileTime() {
- return 1532710698423L;
+ return 1543252311095L;
}
public static String compileTimeString() {
diff --git a/src/net/sourceforge/plantuml/version/apple2.png b/src/net/sourceforge/plantuml/version/apple2.png
new file mode 100644
index 0000000..69c3c75
--- /dev/null
+++ b/src/net/sourceforge/plantuml/version/apple2.png
Binary files differ
diff --git a/src/net/sourceforge/plantuml/version/arecibo.png b/src/net/sourceforge/plantuml/version/arecibo.png
new file mode 100644
index 0000000..d509fce
--- /dev/null
+++ b/src/net/sourceforge/plantuml/version/arecibo.png
Binary files differ
diff --git a/src/net/sourceforge/plantuml/version/time01.png b/src/net/sourceforge/plantuml/version/time01.png
new file mode 100644
index 0000000..2035907
--- /dev/null
+++ b/src/net/sourceforge/plantuml/version/time01.png
Binary files differ
diff --git a/src/net/sourceforge/plantuml/version/time15.png b/src/net/sourceforge/plantuml/version/time15.png
new file mode 100644
index 0000000..8f4a6a0
--- /dev/null
+++ b/src/net/sourceforge/plantuml/version/time15.png
Binary files differ
diff --git a/src/smetana/core/AllH.java b/src/smetana/core/AllH.java
index 5128503..e44bfe9 100644
--- a/src/smetana/core/AllH.java
+++ b/src/smetana/core/AllH.java
@@ -36,16 +36,6 @@
package smetana.core;
-import h.*;
-
-public interface AllH extends Agraph_s, Agobj_s, Agrec_s, Agdesc_s, Agmemdisc_s, Agclos_s, Agiddisc_s, _dtmethod_s,
- _dtdisc_s, _dt_s, _dtdata_s, refstr_t, _dtlink_s, Agdatadict_s, Agattr_s, Agsubnode_s, Agnode_s, Agtag_s,
- Agedge_s, Agedgepair_s, Agsym_s, GVC_s, gvlayout_features_t, gvlayout_engine_s, gvplugin_installed_t, pointf,
- pack_info, aspect_t, fontinfo, shape_functions, polygon_t, shape_desc, textlabel_t, IMapEntry_t, textspan_t,
- textfont_t, point, port, elist, Dtmemory_f, nlist_t, nodequeue, Agnodeinfo_t, Agedgeinfo_t, spline_info_t,
- splineInfo, path, pathend_t, boxf, Ppoly_t, pointnlink_t, deque_t, triangle_t, tna_t, Pedge_t, splines, bezier,
- inside_t, arrowdir_t, arrowtype_t, label_params_t, object_t, xlabel_t, adjmatrix_t, _Node_t___, RTree,
- HDict_t, XLabels_t
- {
+public interface AllH extends __ptr__ {
}
diff --git a/src/smetana/core/CFunction.java b/src/smetana/core/CFunction.java
index d1aa508..dd0680b 100644
--- a/src/smetana/core/CFunction.java
+++ b/src/smetana/core/CFunction.java
@@ -36,7 +36,9 @@
package smetana.core;
-import h.*;
+import h.Dtcompar_f;
+import h.Dtmemory_f;
+import h.Dtsearch_f;
public interface CFunction extends __ptr__, Dtmemory_f, Dtcompar_f, Dtsearch_f {
diff --git a/src/smetana/core/CString.java b/src/smetana/core/CString.java
index a250ef2..16197e0 100644
--- a/src/smetana/core/CString.java
+++ b/src/smetana/core/CString.java
@@ -36,20 +36,21 @@
package smetana.core;
+import h.ST_refstr_t;
+
import java.util.ArrayList;
import java.util.List;
import smetana.core.amiga.Area;
-import smetana.core.amiga.StarStruct;
public class CString extends UnsupportedC implements __ptr__, Area {
private static int UID = 100;
-
+
private final Throwable creation = new Throwable();
private final List<Character> data2;
private final int currentStart;
- private final List<__ptr__> fathers = new ArrayList<__ptr__>();
+
private final int uid;
public boolean isSameThan(CString other) {
@@ -101,34 +102,53 @@ public class CString extends UnsupportedC implements __ptr__, Area {
this.data2 = data2;
this.currentStart = currentStart;
this.uid = UID;
- UID+=2;
+ UID += 2;
creation.fillInStackTrace();
}
public __ptr__ addVirtualBytes(int bytes) {
JUtils.LOG("CString::addVirtualBytes " + bytes);
JUtils.LOG("AM " + this);
- if (bytes < 0) {
- OFFSET offset = OFFSET.fromInt(-bytes);
- JUtils.LOG("offset=" + offset);
- for (__ptr__ f : fathers) {
- JUtils.LOG("f=" + f);
- if (f instanceof StarStruct && ((StarStruct) f).getRealClass() == offset.getTheClass()) {
- JUtils.LOG("FOUND1!!");
- if (f.getPtr(offset.getField()).equals(this)) {
- JUtils.LOG("FOUND2!!");
- return f;
- }
- }
- }
- } else {
- JUtils.LOG("father=" + fathers);
- JUtils.LOG("CString created on the following place:");
- creation.printStackTrace();
+ // if (bytes < 0) {
+ // OFFSET offset = OFFSET.fromInt(-bytes);
+ // JUtils.LOG("offset=" + offset);
+ // for (__ptr__ f : fathers) {
+ // JUtils.LOG("f=" + f);
+ // if (f instanceof StarStruct && ((StarStruct) f).getRealClass() == offset.getTheClass()) {
+ // JUtils.LOG("FOUND1!!");
+ // if (f.getPtr(offset.getField()).equals(this)) {
+ // JUtils.LOG("FOUND2!!");
+ // return f;
+ // }
+ // }
+ // }
+ // } else {
+ // JUtils.LOG("father=" + fathers);
+ // JUtils.LOG("CString created on the following place:");
+ // creation.printStackTrace();
+ // }
+ throw new UnsupportedOperationException();
+ }
+
+ private ST_refstr_t parent;
+
+ public ST_refstr_t getParent() {
+ if (parent != null) {
+ return parent;
}
throw new UnsupportedOperationException();
}
+ public void setParent(ST_refstr_t struct) {
+// if (parent != null && parent != struct) {
+// throw new IllegalStateException();
+// }
+ if (struct == null) {
+ throw new IllegalStateException();
+ }
+ this.parent = struct;
+ }
+
@Override
public CString plus(int pointerMove) {
return new CString(data2, currentStart + pointerMove);
@@ -197,7 +217,7 @@ public class CString extends UnsupportedC implements __ptr__, Area {
}
public int compareTo(CString other, int num) {
- for (int i = 0; i < data2.size() - currentStart && i<num; i++) {
+ for (int i = 0; i < data2.size() - currentStart && i < num; i++) {
final int diff = this.charAt(i) - other.charAt(i);
if (this.charAt(i) == '\0' || diff != 0) {
return diff;
@@ -225,13 +245,6 @@ public class CString extends UnsupportedC implements __ptr__, Area {
return getContent().equals(other.getContent());
}
- public void setMyFather(__ptr__ struct) {
- if (this.toString().equals("black(0)")) {
- JUtils.LOG("CString::setMyFather " + this + " " + fathers.size());
- }
- this.fathers.add(struct);
- }
-
public int getUid() {
return uid;
}
diff --git a/src/smetana/core/CType.java b/src/smetana/core/CType.java
index b9e2c02..78e29b1 100644
--- a/src/smetana/core/CType.java
+++ b/src/smetana/core/CType.java
@@ -36,9 +36,9 @@
package smetana.core;
-import h.Ppoly_t;
+import h.ST_Ppoly_t;
+import h.ST_pointf;
import h.htmllabel_t;
-import h.pointf;
import java.lang.reflect.Field;
import java.util.List;
@@ -113,8 +113,11 @@ public class CType {
if (isPrimitive()) {
return null;
}
+ if (type.equals("ST_Ppolyline_t")) {
+ return ST_Ppoly_t.class;
+ }
if (type.equals("Ppolyline_t")) {
- return Ppoly_t.class;
+ return ST_Ppoly_t.class;
}
return getClassFrom(type);
}
@@ -124,10 +127,10 @@ public class CType {
throw new IllegalArgumentException();
}
if (type.equals("h.pointf_s")) {
- return pointf.class;
+ return ST_pointf.class;
}
if (type.equals("pointf_s")) {
- return pointf.class;
+ return ST_pointf.class;
}
if (type.endsWith("htmllabel_t")) {
return htmllabel_t.class;
diff --git a/src/smetana/core/JUtils.java b/src/smetana/core/JUtils.java
index 44477b5..6825759 100644
--- a/src/smetana/core/JUtils.java
+++ b/src/smetana/core/JUtils.java
@@ -36,17 +36,91 @@
package smetana.core;
-import h.*;
+import h.Agcbstack_s;
+import h.Agdstate_s;
+import h.Agiodisc_s;
+import h.GVCOMMON_t;
+import h.LeafList_t;
+import h.ST_Agattr_s;
+import h.ST_Agcbstack_s;
+import h.ST_Agclos_s;
+import h.ST_Agdatadict_s;
+import h.ST_Agdesc_s;
+import h.ST_Agdisc_s;
+import h.ST_Agdstate_s;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agedgepair_s;
+import h.ST_Agiddisc_s;
+import h.ST_Agiodisc_s;
+import h.ST_Agmemdisc_s;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
+import h.ST_Agraphinfo_t;
+import h.ST_Agrec_s;
+import h.ST_Agsubnode_s;
+import h.ST_Agsym_s;
+import h.ST_GVCOMMON_t;
+import h.ST_GVC_s;
+import h.ST_HDict_t;
+import h.ST_IMapEntry_t;
+import h.ST_LeafList_t;
+import h.ST_Node_t___;
+import h.ST_Pedge_t;
+import h.ST_Ppoly_t;
+import h.ST_RTree;
+import h.ST_XLabels_t;
+import h.ST_arrowtype_t;
+import h.ST_aspect_t;
+import h.ST_bezier;
+import h.ST_boxf;
+import h.ST_cinfo_t;
+import h.ST_dt_s;
+import h.ST_dtdata_s;
+import h.ST_dtdisc_s;
+import h.ST_dthold_s;
+import h.ST_dtlink_s;
+import h.ST_dtmethod_s;
+import h.ST_elist;
+import h.ST_fontinfo;
+import h.ST_label_params_t;
+import h.ST_layout_t;
+import h.ST_nlist_t;
+import h.ST_nodequeue;
+import h.ST_object_t;
+import h.ST_pack_info;
+import h.ST_path;
+import h.ST_pathend_t;
+import h.ST_pointf;
+import h.ST_pointnlink_t;
+import h.ST_polygon_t;
+import h.ST_port;
+import h.ST_rank_t;
+import h.ST_refstr_t;
+import h.ST_shape_desc;
+import h.ST_shape_functions;
+import h.ST_splineInfo;
+import h.ST_spline_info_t;
+import h.ST_splines;
+import h.ST_tedge_t;
+import h.ST_textfont_t;
+import h.ST_textlabel_t;
+import h.ST_textspan_t;
+import h.ST_tna_t;
+import h.ST_triangle_t;
+import h.ST_xlabel_t;
+import h.ST_dthold_s;
+import h.layout_t;
+import h.rank_t;
+import h.tedge_t;
import java.util.LinkedHashSet;
import java.util.Set;
import smetana.core.amiga.StarArrayOfInteger;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarArrayOfStruct;
-import smetana.core.amiga.StarStar;
import smetana.core.amiga.StarStruct;
-import smetana.core.amiga.StarStructImpl;
// http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.7.4
// http://www.jbox.dk/sanos/source/lib/string.c.html
@@ -59,10 +133,6 @@ public class JUtils {
return new size_t_struct(cl);
}
- public static size_t sizeof(__ptr__ element) {
- return new size_t_of_element(element);
- }
-
public static size_t sizeof(String name, int sz) {
if (name.equals("char*")) {
return new size_t_array_of_charstars(sz);
@@ -70,74 +140,10 @@ public class JUtils {
throw new UnsupportedOperationException();
}
- public static size_t sizeof(Class cl, int nb) {
- if (cl == pointf.class) {
- return ST_pointf.sizeof(nb);
- }
- if (cl == boxf.class) {
- return ST_boxf.sizeof(nb);
- }
- if (cl == pointnlink_t.class) {
- return ST_pointnlink_t.sizeof(nb);
- }
- if (cl == textspan_t.class) {
- return ST_textspan_t.sizeof(nb);
- }
- // if (UmlDiagram.SMETANA_BETA) {
- if (cl == Agraph_s.class) {
- return ST_Agraph_s.sizeof(nb);
- }
- if (cl == rank_t.class) {
- return ST_rank_t.sizeof(nb);
- }
- if (cl == Agnode_s.class) {
- return ST_Agnode_s.sizeof(nb);
- }
- if (cl == bezier.class) {
- return ST_bezier.sizeof(nb);
- }
- if (cl == triangle_t.class) {
- return ST_triangle_t.sizeof(nb);
- }
- if (cl == Pedge_t.class) {
- return ST_Pedge_t.sizeof(nb);
- }
- if (cl == tna_t.class) {
- return ST_tna_t.sizeof(nb);
- }
- if (cl == object_t.class) {
- return ST_object_t.sizeof(nb);
- }
- if (cl == xlabel_t.class) {
- return ST_xlabel_t.sizeof(nb);
- }
- // }
- if (from(cl) instanceof __struct_impl__ == false) {
- throw new IllegalArgumentException(cl.getName());
- }
- return new size_t_array_of_something(cl, nb);
- }
-
public static size_t size_t_array_of_integer(int nb) {
return new size_t_array_of_integer(nb);
}
- public static size_t sizeof_starstar_empty(Class cl, int nb) {
- if (cl == Agedge_s.class) {
- return ST_Agedge_s.sizeof_starstar_empty(nb);
- }
- if (cl == Agnode_s.class) {
- return ST_Agnode_s.sizeof_starstar_empty(nb);
- }
- if (cl == pointnlink_t.class) {
- return ST_pointnlink_t.sizeof_starstar_empty(nb);
- }
- if (from(cl) instanceof __struct_impl__ == false) {
- throw new IllegalArgumentException(cl.getName());
- }
- return new size_t_array_of_array_of_something_empty(cl, nb);
- }
-
public static int strcmp(CString s1, CString s2) {
return s1.compareTo(s2);
}
@@ -251,6 +257,18 @@ public class JUtils {
}
public static boolean EQ(Object o1, Object o2) {
+ final boolean result = EQ_(o1, o2);
+ if (o1 instanceof UnsupportedStarStruct && o2 instanceof UnsupportedStarStruct) {
+ UnsupportedStarStruct ooo1 = (UnsupportedStarStruct) o1;
+ UnsupportedStarStruct ooo2 = (UnsupportedStarStruct) o2;
+ if ((ooo1.UID == ooo2.UID) != result) {
+ // throw new UnsupportedOperationException();
+ }
+ }
+ return result;
+ }
+
+ private static boolean EQ_(Object o1, Object o2) {
if (o1 == o2) {
return true;
}
@@ -263,57 +281,31 @@ public class JUtils {
// if (o1 instanceof AreaArray && o2 instanceof AreaArray) {
// return ((AreaArray) o1).isSameThan((AreaArray) o2);
// }
+ if (o1 instanceof ST_pointnlink_t && o2 instanceof ST_pointnlink_t) {
+ return ((ST_pointnlink_t) o1).isSameThan((ST_pointnlink_t) o2);
+ }
+ if (o1 instanceof ST_object_t && o2 instanceof ST_object_t) {
+ return ((ST_object_t) o1).isSameThan((ST_object_t) o2);
+ }
if (o1 instanceof StarStruct && o2 instanceof StarStruct) {
+ // System.err.println("o1="+o1.getClass());
+ // System.err.println("o2="+o2.getClass());
return ((StarStruct) o1).isSameThan((StarStruct) o2);
}
if (o1 instanceof CString && o2 instanceof CString) {
return ((CString) o1).isSameThan((CString) o2);
}
- if (o1 instanceof StarArrayOfPtr && o2 instanceof StarArrayOfPtr) {
- return ((StarArrayOfPtr) o1).isSameThan((StarArrayOfPtr) o2);
- }
- if (o1 instanceof StarStar && o2 instanceof StarStruct) {
- __ptr__ o1b = ((StarStar) o1).getPtr();
- if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1b, o2);
- }
- if (o1 instanceof StarStruct && o2 instanceof StarArrayOfPtr) {
- __ptr__ o2b = ((StarArrayOfPtr) o2).getPtrForEquality();
- if (((StarStruct) o1).getRealClass() != ((StarStruct) o2b).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1, o2b);
- }
- if (o1 instanceof StarStruct && o2 instanceof StarArrayOfStruct) {
- __ptr__ o2b = ((StarArrayOfStruct) o2).getPtrForEquality();
- if (((StarStruct) o1).getRealClass() != ((StarStruct) o2b).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1, o2b);
- }
- if (o1 instanceof StarStar && o2 instanceof StarArrayOfPtr) {
- __ptr__ o1b = ((StarStar) o1).getPtr();
- __ptr__ o2b = ((StarArrayOfPtr) o2).getPtr();
- if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2b).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1b, o2b);
- }
- if (o1 instanceof StarArrayOfStruct && o2 instanceof StarArrayOfStruct) {
- StarArrayOfStruct oo1 = (StarArrayOfStruct) o1;
- StarArrayOfStruct oo2 = (StarArrayOfStruct) o2;
- return oo1.isSameThan(oo2);
- }
- if (o1 instanceof StarArrayOfPtr && o2 instanceof StarArrayOfStruct) {
- StarArrayOfPtr oo1 = (StarArrayOfPtr) o1;
- StarArrayOfStruct oo2 = (StarArrayOfStruct) o2;
- __struct__ s1 = oo1.getStruct();
- __struct__ s2 = oo2.getStruct();
- boolean result = s1.getInternalData().isSameThan(s2.getInternalData());
- return result;
+ if (o1 instanceof ST_Agnode_s.ArrayOfStar && o2 instanceof ST_Agnode_s.ArrayOfStar) {
+ return ((ST_Agnode_s.ArrayOfStar) o1).isSameThan2((ST_Agnode_s.ArrayOfStar) o2);
}
+ // if (o1 instanceof StarStar && o2 instanceof StarArrayOfPtr) {
+ // __ptr__ o1b = ((StarStar) o1).getPtr();
+ // __ptr__ o2b = ((StarArrayOfPtr) o2).getPtr();
+ // if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2b).getRealClass()) {
+ // throw new UnsupportedOperationException();
+ // }
+ // return EQ(o1b, o2b);
+ // }
System.err.println("o1=" + o1.getClass() + " " + o1);
System.err.println("o2=" + o2.getClass() + " " + o2);
throw new UnsupportedOperationException();
@@ -323,13 +315,12 @@ public class JUtils {
return EQ(o1, o2) == false;
}
- public static void qsort(__ptr__ array, int nb, size_t size, CFunction compare) {
+ public static void qsort(__ptr__ array, int nb, CFunction compare) {
if (nb <= 1) {
return;
}
JUtils.LOG("array=" + array);
JUtils.LOG("nb=" + nb);
- JUtils.LOG("size=" + size);
JUtils.LOG("compare=" + compare);
boolean change;
do {
@@ -343,10 +334,15 @@ public class JUtils {
change = true;
if (array instanceof StarArrayOfInteger) {
((StarArrayOfInteger) array).swap(i, i + 1);
- } else if (array instanceof STStarArrayOfPointer) {
- ((STStarArrayOfPointer) array).swap(i, i + 1);
+ // } else if (array instanceof STStarArrayOfPointer) {
+ // ((STStarArrayOfPointer) array).swap(i, i + 1);
+ } else if (array instanceof ST_Agnode_s.ArrayOfStar) {
+ ((ST_Agnode_s.ArrayOfStar) array).swap(i, i + 1);
+ } else if (array instanceof ST_Agedge_s.ArrayOfStar) {
+ ((ST_Agedge_s.ArrayOfStar) array).swap(i, i + 1);
} else {
- ((StarStar) array).swap(i, i + 1);
+ throw new UnsupportedOperationException();
+ // ((StarStar) array).swap(i, i + 1);
}
}
}
@@ -374,145 +370,135 @@ public class JUtils {
// DEBUG
- public static void printDebugEdge(Agedge_s e) {
+ public static void printDebugEdge(ST_Agedge_s e) {
System.err.println("*********** PRINT EDGE ********** ");
- final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(e).castTo(Agedgeinfo_t.class);
- final splines splines = (splines) data.getPtr("spl");
- __struct__<boxf> bb = splines.getStruct("bb");
- final bezier list = (bezier) splines.getPtr("list");
- System.err.println("splines.size=" + splines.getInt("size"));
- System.err.println("bb.LL=" + pointftoString(bb.getStruct("LL")));
- System.err.println("bb.UR=" + pointftoString(bb.getStruct("UR")));
- printDebugBezier((bezier) splines.getPtr("list").getPtr());
+ final ST_Agedgeinfo_t data = (ST_Agedgeinfo_t) Macro.AGDATA(e).castTo(ST_Agedgeinfo_t.class);
+ final ST_splines splines = (ST_splines) data.spl;
+ // ST_boxf bb = (ST_boxf) splines.bb;
+ final ST_bezier list = splines.list.getPtr();
+ System.err.println("splines.size=" + splines.size);
+ //System.err.println("bb.LL=" + pointftoString(bb.LL));
+ //System.err.println("bb.UR=" + pointftoString(bb.UR));
+ printDebugBezier((ST_bezier) splines.list.getPtr());
}
- private static String pointftoString(__struct__<pointf> point) {
+ private static String pointftoString(ST_pointf point) {
final StringBuilder sb = new StringBuilder();
sb.append("(");
- sb.append(point.getDouble("x"));
+ sb.append(point.x);
sb.append(" ; ");
- sb.append(point.getDouble("y"));
+ sb.append(point.y);
sb.append(")");
return sb.toString();
}
- private static void printDebugBezier(bezier bezier) {
- System.err.println("bezier.size=" + bezier.getInt("size"));
- System.err.println("bezier.sflag=" + bezier.getInt("sflag"));
- System.err.println("splines.eflag=" + bezier.getInt("eflag"));
- System.err.println("bezier.sp=" + pointftoString(bezier.getStruct("sp")));
- System.err.println("bezier.ep=" + pointftoString(bezier.getStruct("ep")));
- for (int i = 0; i < bezier.getInt("size"); i++) {
- final __ptr__ pt = bezier.getPtr("list").plus(i).getPtr();
+ private static void printDebugBezier(ST_bezier bezier) {
+ System.err.println("bezier.size=" + bezier.size);
+ System.err.println("bezier.sflag=" + bezier.sflag);
+ System.err.println("splines.eflag=" + bezier.eflag);
+ System.err.println("bezier.sp=" + pointftoString(bezier.sp));
+ System.err.println("bezier.ep=" + pointftoString(bezier.ep));
+ for (int i = 0; i < bezier.size; i++) {
+ final ST_pointf pt = bezier.list.get(i);
System.err.println("pt=" + pointftoString(pt));
}
}
- private static String pointftoString(__ptr__ point) {
- final StringBuilder sb = new StringBuilder();
- sb.append("(");
- sb.append(point.getDouble("x"));
- sb.append(" ; ");
- sb.append(point.getDouble("y"));
- sb.append(")");
- return sb.toString();
- }
-
public static <C extends __ptr__> __struct__<C> from(Class<C> theClass) {
- if (theClass == _dtmethod_s.class) {
+ if (theClass == ST_dtmethod_s.class) {
return new ST_dtmethod_s();
}
- if (theClass == _dtdisc_s.class) {
+ if (theClass == ST_dtdisc_s.class) {
return new ST_dtdisc_s();
}
- if (theClass == Agdesc_s.class) {
+ if (theClass == ST_Agdesc_s.class) {
return new ST_Agdesc_s();
}
- if (theClass == Agtag_s.class) {
- return new ST_Agtag_s();
- }
- if (theClass == Agiddisc_s.class) {
+ // if (theClass == Agtag_s.class) {
+ // return new ST_Agtag_s();
+ // }
+ if (theClass == ST_Agiddisc_s.class) {
return new ST_Agiddisc_s();
}
- if (theClass == Agmemdisc_s.class) {
+ if (theClass == ST_Agmemdisc_s.class) {
return new ST_Agmemdisc_s();
}
- if (theClass == nlist_t.class) {
+ if (theClass == ST_nlist_t.class) {
return new ST_nlist_t();
}
- if (theClass == arrowname_t.class) {
- return new ST_arrowname_t();
- }
- if (theClass == arrowtype_t.class) {
+ if (theClass == ST_arrowtype_t.class) {
return new ST_arrowtype_t();
}
- if (theClass == elist.class) {
+ if (theClass == ST_elist.class) {
return new ST_elist();
}
- if (theClass == pointf.class) {
+ if (theClass == ST_pointf.class) {
return new ST_pointf();
}
- if (theClass == boxf.class) {
+ if (theClass == ST_boxf.class) {
return new ST_boxf();
}
- if (theClass == port.class) {
+ if (theClass == ST_port.class) {
return new ST_port();
}
- if (theClass == polygon_t.class) {
+ if (theClass == ST_polygon_t.class) {
return new ST_polygon_t();
}
- if (theClass == shape_functions.class) {
+ if (theClass == ST_shape_functions.class) {
return new ST_shape_functions();
}
- if (theClass == shape_desc.class) {
+ if (theClass == ST_shape_desc.class) {
return new ST_shape_desc();
}
- if (theClass == deque_t.class) {
- return new ST_deque_t();
- }
- if (theClass == pointnlink_t.class) {
- return new ST_pointnlink_t();
- }
- if (theClass == Ppoly_t.class) {
+ // if (theClass == deque_t.class) {
+ // return new ST_deque_t();
+ // }
+ // if (theClass == pointnlink_t.class) {
+ // return new ST_pointnlink_t();
+ // }
+ if (theClass == ST_Ppoly_t.class) {
return new ST_Ppoly_t();
}
- if (theClass == splineInfo.class) {
+ if (theClass == ST_splineInfo.class) {
return new ST_splineInfo();
}
- if (theClass == textfont_t.class) {
+ if (theClass == ST_textfont_t.class) {
return new ST_textfont_t();
}
//
// if (UmlDiagram.SMETANA_BETA) {
- if (theClass == Agsubnode_s.class) {
+ if (theClass == ST_Agsubnode_s.class) {
return new ST_Agsubnode_s();
}
- if (theClass == _dtlink_s.class) {
+ if (theClass == ST_dtlink_s.class) {
return new ST_dtlink_s();
}
- if (theClass == refstr_t.class) {
+ if (theClass == ST_refstr_t.class) {
+ return new ST_refstr_t();
+ }
+ if (theClass == ST_refstr_t.class) {
return new ST_refstr_t();
}
- if (theClass == Agsym_s.class) {
+ if (theClass == ST_Agsym_s.class) {
return new ST_Agsym_s();
}
- if (theClass == Agedge_s.class) {
+ if (theClass == ST_Agedge_s.class) {
return new ST_Agedge_s();
}
- if (theClass == Agobj_s.class) {
+ if (theClass == ST_Agobj_s.class) {
return new ST_Agobj_s();
}
- if (theClass == Agrec_s.class) {
+ if (theClass == ST_Agrec_s.class) {
return new ST_Agrec_s();
}
- if (theClass == Agraph_s.class) {
+ if (theClass == ST_Agraph_s.class) {
return new ST_Agraph_s();
}
- if (theClass == Agclos_s.class) {
+ if (theClass == ST_Agclos_s.class) {
return new ST_Agclos_s();
}
- if (theClass == Agdisc_s.class) {
+ if (theClass == ST_Agdisc_s.class) {
return new ST_Agdisc_s();
}
if (theClass == Agdstate_s.class) {
@@ -521,388 +507,382 @@ public class JUtils {
if (theClass == Agiodisc_s.class) {
return new ST_Agiodisc_s();
}
- if (theClass == _dt_s.class) {
+ if (theClass == ST_dt_s.class) {
return new ST_dt_s();
}
- if (theClass == _dtdata_s.class) {
+ if (theClass == ST_dtdata_s.class) {
return new ST_dtdata_s();
}
- if (theClass == Agdatadict_s.class) {
+ if (theClass == ST_Agdatadict_s.class) {
return new ST_Agdatadict_s();
}
- if (theClass == Agattr_s.class) {
+ if (theClass == ST_Agattr_s.class) {
return new ST_Agattr_s();
}
if (theClass == Agcbstack_s.class) {
return new ST_Agcbstack_s();
}
- if (theClass == Agnode_s.class) {
+ if (theClass == ST_Agnode_s.class) {
return new ST_Agnode_s();
}
- if (theClass == Agedgepair_s.class) {
+ if (theClass == ST_Agedgepair_s.class) {
return new ST_Agedgepair_s();
}
- if (theClass == Agraphinfo_t.class) {
+ if (theClass == ST_Agraphinfo_t.class) {
return new ST_Agraphinfo_t();
}
- if (theClass == GVC_s.class) {
+ if (theClass == ST_GVC_s.class) {
return new ST_GVC_s();
}
if (theClass == GVCOMMON_t.class) {
return new ST_GVCOMMON_t();
}
- if (theClass == gvlayout_engine_s.class) {
- return new ST_gvlayout_engine_s();
- }
- if (theClass == gvlayout_features_t.class) {
- return new ST_gvlayout_features_t();
- }
- if (theClass == gvplugin_active_layout_t.class) {
- return new ST_gvplugin_active_layout_t();
- }
- if (theClass == gvplugin_installed_t.class) {
- return new ST_gvplugin_installed_t();
- }
+ // if (theClass == ST_gvlayout_engine_s.class) {
+ // return new ST_gvlayout_engine_s();
+ // }
+ // if (theClass == gvlayout_features_t.class) {
+ // return new ST_gvlayout_features_t();
+ // }
+ // if (theClass == gvplugin_active_layout_t.class) {
+ // return new ST_gvplugin_active_layout_t();
+ // }
+ // if (theClass == gvplugin_installed_t.class) {
+ // return new ST_gvplugin_installed_t();
+ // }
if (theClass == layout_t.class) {
return new ST_layout_t();
}
- if (theClass == Agnodeinfo_t.class) {
+ if (theClass == ST_Agnodeinfo_t.class) {
return new ST_Agnodeinfo_t();
}
- if (theClass == textlabel_t.class) {
+ if (theClass == ST_textlabel_t.class) {
return new ST_textlabel_t();
}
- if (theClass == textspan_t.class) {
+ if (theClass == ST_textspan_t.class) {
return new ST_textspan_t();
}
if (theClass == rank_t.class) {
return new ST_rank_t();
}
- if (theClass == adjmatrix_t.class) {
- return new ST_adjmatrix_t();
- }
- if (theClass == Agedgeinfo_t.class) {
+ // if (theClass == adjmatrix_t.class) {
+ // return new ST_adjmatrix_t();
+ // }
+ if (theClass == ST_Agedgeinfo_t.class) {
return new ST_Agedgeinfo_t();
}
- if (theClass == splines.class) {
+ if (theClass == ST_splines.class) {
return new ST_splines();
}
- if (theClass == bezier.class) {
+ if (theClass == ST_bezier.class) {
return new ST_bezier();
}
- if (theClass == _dthold_s.class) {
+ if (theClass == ST_dthold_s.class) {
return new ST_dthold_s();
}
//
- if (theClass == pack_info.class) {
+ if (theClass == ST_pack_info.class) {
return new ST_pack_info();
}
- if (theClass == aspect_t.class) {
+ if (theClass == ST_aspect_t.class) {
return new ST_aspect_t();
}
- if (theClass == fontinfo.class) {
+ if (theClass == ST_fontinfo.class) {
return new ST_fontinfo();
}
- if (theClass == IMapEntry_t.class) {
+ if (theClass == ST_IMapEntry_t.class) {
return new ST_IMapEntry_t();
}
- if (theClass == point.class) {
- return new ST_point();
- }
- if (theClass == nodequeue.class) {
+ // if (theClass == point.class) {
+ // return new ST_point();
+ // }
+ if (theClass == ST_nodequeue.class) {
return new ST_nodequeue();
}
- if (theClass == spline_info_t.class) {
+ if (theClass == ST_spline_info_t.class) {
return new ST_spline_info_t();
}
- if (theClass == path.class) {
+ if (theClass == ST_path.class) {
return new ST_path();
}
- if (theClass == pathend_t.class) {
+ if (theClass == ST_pathend_t.class) {
return new ST_pathend_t();
}
- if (theClass == inside_t.class) {
- return new ST_inside_t();
- }
- if (theClass == triangle_t.class) {
+ // if (theClass == inside_t.class) {
+ // return new ST_inside_t();
+ // }
+ if (theClass == ST_triangle_t.class) {
return new ST_triangle_t();
}
if (theClass == tedge_t.class) {
return new ST_tedge_t();
}
- if (theClass == Pedge_t.class) {
+ if (theClass == ST_Pedge_t.class) {
return new ST_Pedge_t();
}
- if (theClass == tna_t.class) {
+ if (theClass == ST_tna_t.class) {
return new ST_tna_t();
}
- if (theClass == label_params_t.class) {
+ if (theClass == ST_label_params_t.class) {
return new ST_label_params_t();
}
- if (theClass == object_t.class) {
+ if (theClass == ST_object_t.class) {
return new ST_object_t();
}
- if (theClass == xlabel_t.class) {
+ if (theClass == ST_xlabel_t.class) {
return new ST_xlabel_t();
}
- if (theClass == XLabels_t.class) {
+ if (theClass == ST_XLabels_t.class) {
return new ST_XLabels_t();
}
- if (theClass == HDict_t.class) {
+ if (theClass == ST_HDict_t.class) {
return new ST_HDict_t();
}
- if (theClass == RTree.class) {
+ if (theClass == ST_RTree.class) {
return new ST_RTree();
}
- if (theClass == _Node_t___.class) {
+ if (theClass == ST_Node_t___.class) {
return new ST_Node_t___();
}
+ if (theClass == ST_cinfo_t.class) {
+ return new ST_cinfo_t();
+ }
// }
notFound(theClass);
- return new __struct_impl__<C>(theClass);
+ throw new UnsupportedOperationException();
}
public static StarStruct create(Class theClass, StarStruct parent) {
- if (theClass == _dtmethod_s.class) {
+ if (theClass == ST_dtmethod_s.class) {
throw new IllegalArgumentException(theClass.toString());
}
- if (theClass == _dtdisc_s.class) {
+ if (theClass == ST_dtdisc_s.class) {
return new ST_dtdisc_s(parent);
}
- if (theClass == Agdesc_s.class) {
+ if (theClass == ST_Agdesc_s.class) {
return new ST_Agdesc_s(parent);
}
- if (theClass == Agtag_s.class) {
- return new ST_Agtag_s(parent);
- }
- if (theClass == Agiddisc_s.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == Agmemdisc_s.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == nlist_t.class) {
+ if (theClass == ST_nlist_t.class) {
return new ST_nlist_t(parent);
}
- if (theClass == arrowname_t.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == arrowtype_t.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == elist.class) {
+ if (theClass == ST_elist.class) {
return new ST_elist(parent);
}
- if (theClass == pointf.class) {
+ if (theClass == ST_pointf.class) {
return new ST_pointf(parent);
}
- if (theClass == boxf.class) {
+ if (theClass == ST_boxf.class) {
return new ST_boxf(parent);
}
- if (theClass == port.class) {
+ if (theClass == ST_port.class) {
return new ST_port(parent);
}
- if (theClass == polygon_t.class) {
+ if (theClass == ST_polygon_t.class) {
return new ST_polygon_t(parent);
}
- if (theClass == shape_functions.class) {
+ if (theClass == ST_shape_functions.class) {
return new ST_shape_functions(parent);
}
- if (theClass == shape_desc.class) {
+ if (theClass == ST_shape_desc.class) {
return new ST_shape_desc(parent);
}
- if (theClass == deque_t.class) {
- return new ST_deque_t(parent);
- }
- if (theClass == pointnlink_t.class) {
- return new ST_pointnlink_t(parent);
- }
- if (theClass == Ppoly_t.class) {
+ // if (theClass == deque_t.class) {
+ // return new ST_deque_t(parent);
+ // }
+ // if (theClass == pointnlink_t.class) {
+ // return new ST_pointnlink_t(parent);
+ // }
+ if (theClass == ST_Ppoly_t.class) {
return new ST_Ppoly_t(parent);
}
- if (theClass == splineInfo.class) {
+ if (theClass == ST_splineInfo.class) {
return new ST_splineInfo(parent);
}
- if (theClass == textfont_t.class) {
+ if (theClass == ST_textfont_t.class) {
return new ST_textfont_t(parent);
}
//
// if (UmlDiagram.SMETANA_BETA) {
- if (theClass == Agsubnode_s.class) {
+ if (theClass == ST_Agsubnode_s.class) {
return new ST_Agsubnode_s(parent);
}
- if (theClass == _dtlink_s.class) {
+ if (theClass == ST_dtlink_s.class) {
return new ST_dtlink_s(parent);
}
- if (theClass == refstr_t.class) {
- return new ST_refstr_t(parent);
+ if (theClass == ST_refstr_t.class) {
+ return new ST_refstr_t();
+ }
+ if (theClass == ST_refstr_t.class) {
+ return new ST_refstr_t();
}
- if (theClass == Agsym_s.class) {
+ if (theClass == ST_Agsym_s.class) {
return new ST_Agsym_s(parent);
}
- if (theClass == Agedge_s.class) {
+ if (theClass == ST_Agedge_s.class) {
return new ST_Agedge_s(parent);
}
- if (theClass == Agobj_s.class) {
+ if (theClass == ST_Agobj_s.class) {
return new ST_Agobj_s(parent);
}
- if (theClass == Agrec_s.class) {
+ if (theClass == ST_Agrec_s.class) {
return new ST_Agrec_s(parent);
}
- if (theClass == Agraph_s.class) {
+ if (theClass == ST_Agraph_s.class) {
return new ST_Agraph_s(parent);
}
- if (theClass == Agclos_s.class) {
+ if (theClass == ST_Agclos_s.class) {
return new ST_Agclos_s(parent);
}
- if (theClass == Agdisc_s.class) {
+ if (theClass == ST_Agdisc_s.class) {
return new ST_Agdisc_s(parent);
}
if (theClass == Agdstate_s.class) {
return new ST_Agdstate_s(parent);
}
- if (theClass == _dt_s.class) {
+ if (theClass == ST_dt_s.class) {
return new ST_dt_s(parent);
}
- if (theClass == _dtdata_s.class) {
+ if (theClass == ST_dtdata_s.class) {
return new ST_dtdata_s(parent);
}
- if (theClass == Agdatadict_s.class) {
+ if (theClass == ST_Agdatadict_s.class) {
return new ST_Agdatadict_s(parent);
}
- if (theClass == Agattr_s.class) {
+ if (theClass == ST_Agattr_s.class) {
return new ST_Agattr_s(parent);
}
if (theClass == Agcbstack_s.class) {
return new ST_Agcbstack_s(parent);
}
- if (theClass == Agnode_s.class) {
+ if (theClass == ST_Agnode_s.class) {
return new ST_Agnode_s(parent);
}
- if (theClass == Agedgepair_s.class) {
+ if (theClass == ST_Agedgepair_s.class) {
return new ST_Agedgepair_s(parent);
}
- if (theClass == Agraphinfo_t.class) {
+ if (theClass == ST_Agraphinfo_t.class) {
return new ST_Agraphinfo_t(parent);
}
- if (theClass == GVC_s.class) {
+ if (theClass == ST_GVC_s.class) {
return new ST_GVC_s(parent);
}
if (theClass == GVCOMMON_t.class) {
return new ST_GVCOMMON_t(parent);
}
- if (theClass == gvlayout_engine_s.class) {
- throw new UnsupportedOperationException();
- // return new ST_gvlayout_engine_s(parent);
- }
- if (theClass == gvlayout_features_t.class) {
- throw new UnsupportedOperationException();
- // return new ST_gvlayout_features_t(parent);
- }
- if (theClass == gvplugin_active_layout_t.class) {
- throw new UnsupportedOperationException();
- // return new ST_gvplugin_active_layout_t(parent);
- }
- if (theClass == gvplugin_installed_t.class) {
- return new ST_gvplugin_installed_t(parent);
- }
+ // if (theClass == ST_gvlayout_engine_s.class) {
+ // throw new UnsupportedOperationException();
+ // // return new ST_gvlayout_engine_s(parent);
+ // }
+ // if (theClass == gvlayout_features_t.class) {
+ // throw new UnsupportedOperationException();
+ // // return new ST_gvlayout_features_t(parent);
+ // }
+ // if (theClass == gvplugin_active_layout_t.class) {
+ // throw new UnsupportedOperationException();
+ // // return new ST_gvplugin_active_layout_t(parent);
+ // }
+ // if (theClass == gvplugin_installed_t.class) {
+ // return new ST_gvplugin_installed_t(parent);
+ // }
if (theClass == layout_t.class) {
return new ST_layout_t(parent);
}
- if (theClass == Agnodeinfo_t.class) {
+ if (theClass == ST_Agnodeinfo_t.class) {
return new ST_Agnodeinfo_t(parent);
}
- if (theClass == textlabel_t.class) {
+ if (theClass == ST_textlabel_t.class) {
return new ST_textlabel_t(parent);
}
- if (theClass == textspan_t.class) {
+ if (theClass == ST_textspan_t.class) {
return new ST_textspan_t(parent);
}
if (theClass == rank_t.class) {
return new ST_rank_t(parent);
}
- if (theClass == adjmatrix_t.class) {
- return new ST_adjmatrix_t(parent);
- }
- if (theClass == Agedgeinfo_t.class) {
+ // if (theClass == adjmatrix_t.class) {
+ // return new ST_adjmatrix_t(parent);
+ // }
+ if (theClass == ST_Agedgeinfo_t.class) {
return new ST_Agedgeinfo_t(parent);
}
- if (theClass == splines.class) {
+ if (theClass == ST_splines.class) {
return new ST_splines(parent);
}
- if (theClass == bezier.class) {
+ if (theClass == ST_bezier.class) {
return new ST_bezier(parent);
}
- if (theClass == _dthold_s.class) {
+ if (theClass == ST_dthold_s.class) {
return new ST_dthold_s(parent);
}
//
- if (theClass == pack_info.class) {
+ if (theClass == ST_pack_info.class) {
return new ST_pack_info(parent);
}
- if (theClass == aspect_t.class) {
+ if (theClass == ST_aspect_t.class) {
return new ST_aspect_t(parent);
}
- if (theClass == fontinfo.class) {
+ if (theClass == ST_fontinfo.class) {
return new ST_fontinfo(parent);
}
- if (theClass == IMapEntry_t.class) {
+ if (theClass == ST_IMapEntry_t.class) {
return new ST_IMapEntry_t(parent);
}
- if (theClass == point.class) {
- return new ST_point(parent);
- }
- if (theClass == nodequeue.class) {
+ // if (theClass == point.class) {
+ // return new ST_point(parent);
+ // }
+ if (theClass == ST_nodequeue.class) {
return new ST_nodequeue(parent);
}
- if (theClass == spline_info_t.class) {
+ if (theClass == ST_spline_info_t.class) {
return new ST_spline_info_t(parent);
}
- if (theClass == path.class) {
+ if (theClass == ST_path.class) {
return new ST_path(parent);
}
- if (theClass == pathend_t.class) {
+ if (theClass == ST_pathend_t.class) {
return new ST_pathend_t(parent);
}
- if (theClass == inside_t.class) {
- return new ST_inside_t(parent);
- }
- if (theClass == triangle_t.class) {
+ // if (theClass == inside_t.class) {
+ // return new ST_inside_t(parent);
+ // }
+ if (theClass == ST_triangle_t.class) {
return new ST_triangle_t(parent);
}
if (theClass == tedge_t.class) {
return new ST_tedge_t(parent);
}
- if (theClass == Pedge_t.class) {
+ if (theClass == ST_Pedge_t.class) {
return new ST_Pedge_t(parent);
}
- if (theClass == tna_t.class) {
+ if (theClass == ST_tna_t.class) {
return new ST_tna_t(parent);
}
- if (theClass == label_params_t.class) {
+ if (theClass == ST_label_params_t.class) {
return new ST_label_params_t(parent);
}
- if (theClass == object_t.class) {
+ if (theClass == ST_object_t.class) {
return new ST_object_t(parent);
}
- if (theClass == xlabel_t.class) {
+ if (theClass == ST_xlabel_t.class) {
return new ST_xlabel_t(parent);
}
- if (theClass == XLabels_t.class) {
+ if (theClass == ST_XLabels_t.class) {
return new ST_XLabels_t(parent);
}
- if (theClass == HDict_t.class) {
+ if (theClass == ST_HDict_t.class) {
return new ST_HDict_t(parent);
}
- if (theClass == RTree.class) {
+ if (theClass == ST_RTree.class) {
return new ST_RTree(parent);
}
- if (theClass == _Node_t___.class) {
+ if (theClass == ST_Node_t___.class) {
return new ST_Node_t___(parent);
}
+ if (theClass == ST_cinfo_t.class) {
+ return new ST_cinfo_t(parent);
+ }
// }
notFound(theClass);
- return new StarStructImpl(theClass, parent);
+ throw new UnsupportedOperationException();
}
private static final Set<String> todo = new LinkedHashSet<String>();
diff --git a/src/smetana/core/JUtilsDebug.java b/src/smetana/core/JUtilsDebug.java
index da63afd..0d997ba 100644
--- a/src/smetana/core/JUtilsDebug.java
+++ b/src/smetana/core/JUtilsDebug.java
@@ -40,14 +40,26 @@ import smetana.core.debug.Debug;
public class JUtilsDebug {
- private final static Debug debug = new Debug();
+ private final static Debug debug = null; //new Debug();
static public void ENTERING(String signature, String methodName) {
- debug.entering(signature, methodName);
+ if (debug != null)
+ debug.entering(signature, methodName);
}
static public void LEAVING(String signature, String methodName) {
- debug.leaving(signature, methodName);
+ if (debug != null)
+ debug.leaving(signature, methodName);
+ }
+
+ public static void reset() {
+ if (debug != null)
+ debug.reset();
+ }
+
+ public static void printMe() {
+ if (debug != null)
+ debug.printMe();
}
}
diff --git a/src/smetana/core/JUtilsOk1.java b/src/smetana/core/JUtilsOk1.java
deleted file mode 100644
index c9a5966..0000000
--- a/src/smetana/core/JUtilsOk1.java
+++ /dev/null
@@ -1,652 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import h.Agclos_s;
-import h.Agdesc_s;
-import h.Agdisc_s;
-import h.Agdstate_s;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agiddisc_s;
-import h.Agiodisc_s;
-import h.Agmemdisc_s;
-import h.Agobj_s;
-import h.Agraph_s;
-import h.Agrec_s;
-import h.Agsubnode_s;
-import h.Agsym_s;
-import h.Agtag_s;
-import h.Ppoly_t;
-import h.ST_Agclos_s;
-import h.ST_Agdesc_s;
-import h.ST_Agdisc_s;
-import h.ST_Agdstate_s;
-import h.ST_Agedge_s;
-import h.ST_Agiddisc_s;
-import h.ST_Agiodisc_s;
-import h.ST_Agmemdisc_s;
-import h.ST_Agobj_s;
-import h.ST_Agraph_s;
-import h.ST_Agrec_s;
-import h.ST_Agsubnode_s;
-import h.ST_Agsym_s;
-import h.ST_Agtag_s;
-import h.ST_Ppoly_t;
-import h.ST_arrowname_t;
-import h.ST_arrowtype_t;
-import h.ST_boxf;
-import h.ST_deque_t;
-import h.ST_dtdisc_s;
-import h.ST_dtlink_s;
-import h.ST_dtmethod_s;
-import h.ST_elist;
-import h.ST_nlist_t;
-import h.ST_pointf;
-import h.ST_pointnlink_t;
-import h.ST_polygon_t;
-import h.ST_port;
-import h.ST_refstr_t;
-import h.ST_shape_desc;
-import h.ST_shape_functions;
-import h.ST_splineInfo;
-import h.ST_textfont_t;
-import h._dtdisc_s;
-import h._dtlink_s;
-import h._dtmethod_s;
-import h.arrowname_t;
-import h.arrowtype_t;
-import h.bezier;
-import h.boxf;
-import h.deque_t;
-import h.elist;
-import h.nlist_t;
-import h.pointf;
-import h.pointnlink_t;
-import h.polygon_t;
-import h.port;
-import h.refstr_t;
-import h.shape_desc;
-import h.shape_functions;
-import h.splineInfo;
-import h.splines;
-import h.textfont_t;
-import smetana.core.amiga.StarArrayOfInteger;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarArrayOfStruct;
-import smetana.core.amiga.StarStar;
-import smetana.core.amiga.StarStruct;
-import smetana.core.amiga.StarStructImpl;
-
-// http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.7.4
-// http://www.jbox.dk/sanos/source/lib/string.c.html
-
-public class JUtilsOk1 {
-
- public static int USHRT_MAX = 65535;
-
- public static size_t sizeof(Class cl) {
- return new size_t_struct(cl);
- }
-
- public static size_t sizeof(__ptr__ element) {
- return new size_t_of_element(element);
- }
-
- public static size_t sizeof(String name, int sz) {
- if (name.equals("char*")) {
- return new size_t_array_of_charstars(sz);
- }
- throw new UnsupportedOperationException();
- }
-
- public static size_t sizeof(Class cl, int nb) {
- if (cl == pointf.class) {
- return ST_pointf.sizeof(nb);
- }
- if (cl == boxf.class) {
- return ST_boxf.sizeof(nb);
- }
- if (cl == pointnlink_t.class) {
- return ST_pointnlink_t.sizeof(nb);
- }
- if (from(cl) instanceof __struct_impl__ == false) {
- throw new IllegalArgumentException(cl.getName());
- }
- return new size_t_array_of_something(cl, nb);
- }
-
- public static size_t size_t_array_of_integer(int nb) {
- return new size_t_array_of_integer(nb);
- }
-
- public static size_t sizeof_starstar_empty(Class cl, int nb) {
- if (cl == pointnlink_t.class) {
- return ST_pointnlink_t.sizeof_starstar_empty(nb);
- }
- if (from(cl) instanceof __struct_impl__ == false) {
- throw new IllegalArgumentException(cl.getName());
- }
- return new size_t_array_of_array_of_something_empty(cl, nb);
- }
-
- public static int strcmp(CString s1, CString s2) {
- return s1.compareTo(s2);
- }
-
- public static int strncmp(CString s1, CString s2, int n) {
- return s1.compareTo(s2, n);
- }
-
- public static CString strstr(CString s1, CString s2) {
- throw new UnsupportedOperationException("s1=" + s1 + " s2=" + s2);
- }
-
- public static void strncpy(CString destination, CString source, int nb) {
- destination.copyFrom(source, nb);
- }
-
- public static CString strchr(CString str, char c) {
- return str.strchr(c);
- }
-
- public static int strtol(CString str, CString[] endptr, int base) {
- if (base != 10) {
- throw new IllegalArgumentException();
- }
- CString end = str;
- int result = Integer.parseInt(end.getContent());
- endptr[0] = end.plus(("" + result).length());
- return result;
- }
-
- public static double strtod(CString str, CString[] endptr) {
- final double result = Double.parseDouble(str.getContent());
- return result;
- }
-
- public static double atof(CString str) {
- return Double.parseDouble(str.getContent());
- }
-
- public static int memcmp(__ptr__ s1, __ptr__ s2, int sz) {
- throw new UnsupportedOperationException("s1=" + s1 + " s2=" + s2 + " sz=" + sz);
- }
-
- public static void memset(__ptr__ obj, int value, size_t nbytes) {
- if (value != 0) {
- throw new UnsupportedOperationException();
- }
- }
-
- public static int strlen(CString s) {
- return s.length();
- }
-
- public static double abs(double x) {
- return Math.abs(x);
- }
-
- public static double cos(double x) {
- return Math.cos(x);
- }
-
- public static double sin(double x) {
- return Math.sin(x);
- }
-
- public static double sqrt(double x) {
- return Math.sqrt(x);
- }
-
- public static double atan2(double a, double b) {
- return Math.atan2(a, b);
- }
-
- public static double pow(double a, double b) {
- return Math.pow(a, b);
- }
-
- public static boolean isdigit(char c) {
- return Character.isDigit(c);
- }
-
- public static int atoi(CString s) {
- return Integer.parseInt(s.getContent());
- }
-
- public static char tolower(char c) {
- return Character.toLowerCase(c);
- }
-
- public static CFunction function(Class codingClass, String name) {
- return CFunctionImpl.create(codingClass, name);
- }
-
- public static int enumAsInt(Class enumClass, String name) {
- CEnumInterpretor interpretor = new CEnumInterpretor(enumClass);
- final int result = interpretor.valueOf(name);
- JUtilsOk1.LOG("result for " + name + " is " + result);
- return result;
- }
-
- public static CString getenv(CString var) {
- return null;
- }
-
- public static void LOG(String s) {
- // System.err.println(s);
- }
-
- public static void LOG2(String s) {
- // System.err.println(s);
- }
-
- public static boolean EQ(Object o1, Object o2) {
- if (o1 == o2) {
- return true;
- }
- if (o1 == null && o2 != null) {
- return false;
- }
- if (o2 == null && o1 != null) {
- return false;
- }
- // if (o1 instanceof AreaArray && o2 instanceof AreaArray) {
- // return ((AreaArray) o1).isSameThan((AreaArray) o2);
- // }
- if (o1 instanceof StarStruct && o2 instanceof StarStruct) {
- return ((StarStruct) o1).isSameThan((StarStruct) o2);
- }
- if (o1 instanceof CString && o2 instanceof CString) {
- return ((CString) o1).isSameThan((CString) o2);
- }
- if (o1 instanceof StarArrayOfPtr && o2 instanceof StarArrayOfPtr) {
- return ((StarArrayOfPtr) o1).isSameThan((StarArrayOfPtr) o2);
- }
- if (o1 instanceof StarStar && o2 instanceof StarStruct) {
- __ptr__ o1b = ((StarStar) o1).getPtr();
- if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1b, o2);
- }
- if (o1 instanceof StarStruct && o2 instanceof StarArrayOfPtr) {
- __ptr__ o2b = ((StarArrayOfPtr) o2).getPtrForEquality();
- if (((StarStruct) o1).getRealClass() != ((StarStruct) o2b).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1, o2b);
- }
- if (o1 instanceof StarStruct && o2 instanceof StarArrayOfStruct) {
- __ptr__ o2b = ((StarArrayOfStruct) o2).getPtrForEquality();
- if (((StarStruct) o1).getRealClass() != ((StarStruct) o2b).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1, o2b);
- }
- if (o1 instanceof StarStar && o2 instanceof StarArrayOfPtr) {
- __ptr__ o1b = ((StarStar) o1).getPtr();
- __ptr__ o2b = ((StarArrayOfPtr) o2).getPtr();
- if (((StarStruct) o1b).getRealClass() != ((StarStruct) o2b).getRealClass()) {
- throw new UnsupportedOperationException();
- }
- return EQ(o1b, o2b);
- }
- if (o1 instanceof StarArrayOfStruct && o2 instanceof StarArrayOfStruct) {
- StarArrayOfStruct oo1 = (StarArrayOfStruct) o1;
- StarArrayOfStruct oo2 = (StarArrayOfStruct) o2;
- return oo1.isSameThan(oo2);
- }
- if (o1 instanceof StarArrayOfPtr && o2 instanceof StarArrayOfStruct) {
- StarArrayOfPtr oo1 = (StarArrayOfPtr) o1;
- StarArrayOfStruct oo2 = (StarArrayOfStruct) o2;
- __struct__ s1 = oo1.getStruct();
- __struct__ s2 = oo2.getStruct();
- boolean result = s1.getInternalData().isSameThan(s2.getInternalData());
- return result;
- }
- System.err.println("o1=" + o1.getClass() + " " + o1);
- System.err.println("o2=" + o2.getClass() + " " + o2);
- throw new UnsupportedOperationException();
- }
-
- public static boolean NEQ(Object o1, Object o2) {
- return EQ(o1, o2) == false;
- }
-
- public static void qsort(__ptr__ array, int nb, size_t size, CFunction compare) {
- if (nb <= 1) {
- return;
- }
- JUtilsOk1.LOG("array=" + array);
- JUtilsOk1.LOG("nb=" + nb);
- JUtilsOk1.LOG("size=" + size);
- JUtilsOk1.LOG("compare=" + compare);
- boolean change;
- do {
- change = false;
- for (int i = 0; i < nb - 1; i++) {
- __ptr__ element1 = array.plus(i);
- __ptr__ element2 = array.plus(i + 1);
- Integer cmp = (Integer) compare.exe(element1, element2);
- JUtilsOk1.LOG("cmp=" + cmp);
- if (cmp.intValue() > 0) {
- change = true;
- if (array instanceof StarArrayOfInteger) {
- ((StarArrayOfInteger) array).swap(i, i + 1);
- } else {
- ((StarStar) array).swap(i, i + 1);
- }
- }
- }
- } while (change);
- for (int i = 0; i < nb - 1; i++) {
- __ptr__ element1 = array.plus(i);
- __ptr__ element2 = array.plus(i + 1);
- JUtilsOk1.LOG("element1=" + element1);
- JUtilsOk1.LOG("element2=" + element2);
- Integer cmp = (Integer) compare.exe(element1, element2);
- JUtilsOk1.LOG("cmp=" + cmp);
- if (cmp.intValue() > 0) {
- throw new IllegalStateException();
- }
- }
- }
-
- static public int setjmp(jmp_buf jmp) {
- // if (jmp.hasBeenCalled()) {
- // throw new UnsupportedOperationException();
- // }
- jmp.saveCallingEnvironment();
- return 0;
- }
-
- // DEBUG
-
- public static void printDebugEdge(Agedge_s e) {
- System.err.println("*********** PRINT EDGE ********** ");
- final Agedgeinfo_t data = (Agedgeinfo_t) Macro.AGDATA(e).castTo(Agedgeinfo_t.class);
- final splines splines = (splines) data.getPtr("spl");
- __struct__<boxf> bb = splines.getStruct("bb");
- final bezier list = (bezier) splines.getPtr("list");
- System.err.println("splines.size=" + splines.getInt("size"));
- System.err.println("bb.LL=" + pointftoString(bb.getStruct("LL")));
- System.err.println("bb.UR=" + pointftoString(bb.getStruct("UR")));
- printDebugBezier((bezier) splines.getPtr("list").getPtr());
-
- }
-
- private static String pointftoString(__struct__<pointf> point) {
- final StringBuilder sb = new StringBuilder();
- sb.append("(");
- sb.append(point.getDouble("x"));
- sb.append(" ; ");
- sb.append(point.getDouble("y"));
- sb.append(")");
- return sb.toString();
- }
-
- private static void printDebugBezier(bezier bezier) {
- System.err.println("bezier.size=" + bezier.getInt("size"));
- System.err.println("bezier.sflag=" + bezier.getInt("sflag"));
- System.err.println("splines.eflag=" + bezier.getInt("eflag"));
- System.err.println("bezier.sp=" + pointftoString(bezier.getStruct("sp")));
- System.err.println("bezier.ep=" + pointftoString(bezier.getStruct("ep")));
- for (int i = 0; i < bezier.getInt("size"); i++) {
- final __ptr__ pt = bezier.getPtr("list").plus(i).getPtr();
- System.err.println("pt=" + pointftoString(pt));
- }
- }
-
- private static String pointftoString(__ptr__ point) {
- final StringBuilder sb = new StringBuilder();
- sb.append("(");
- sb.append(point.getDouble("x"));
- sb.append(" ; ");
- sb.append(point.getDouble("y"));
- sb.append(")");
- return sb.toString();
- }
-
- public static <C extends __ptr__> __struct__<C> from(Class<C> theClass) {
- if (theClass == _dtmethod_s.class) {
- return new ST_dtmethod_s();
- }
- if (theClass == _dtdisc_s.class) {
- return new ST_dtdisc_s();
- }
- if (theClass == Agdesc_s.class) {
- return new ST_Agdesc_s();
- }
- if (theClass == Agtag_s.class) {
- return new ST_Agtag_s();
- }
- if (theClass == Agiddisc_s.class) {
- return new ST_Agiddisc_s();
- }
- if (theClass == Agmemdisc_s.class) {
- return new ST_Agmemdisc_s();
- }
- if (theClass == nlist_t.class) {
- return new ST_nlist_t();
- }
- if (theClass == arrowname_t.class) {
- return new ST_arrowname_t();
- }
- if (theClass == arrowtype_t.class) {
- return new ST_arrowtype_t();
- }
- if (theClass == elist.class) {
- return new ST_elist();
- }
- if (theClass == pointf.class) {
- return new ST_pointf();
- }
- if (theClass == boxf.class) {
- return new ST_boxf();
- }
- if (theClass == port.class) {
- return new ST_port();
- }
- if (theClass == polygon_t.class) {
- return new ST_polygon_t();
- }
- if (theClass == shape_functions.class) {
- return new ST_shape_functions();
- }
- if (theClass == shape_desc.class) {
- return new ST_shape_desc();
- }
- if (theClass == deque_t.class) {
- return new ST_deque_t();
- }
- if (theClass == pointnlink_t.class) {
- return new ST_pointnlink_t();
- }
- if (theClass == Ppoly_t.class) {
- return new ST_Ppoly_t();
- }
- if (theClass == splineInfo.class) {
- return new ST_splineInfo();
- }
- if (theClass == textfont_t.class) {
- return new ST_textfont_t();
- }
- //
-// if (theClass == Agsubnode_s.class) {
-// return new ST_Agsubnode_s();
-// }
-// if (theClass == _dtlink_s.class) {
-// return new ST_dtlink_s();
-// }
-// if (theClass == refstr_t.class) {
-// return new ST_refstr_t();
-// }
-// if (theClass == Agsym_s.class) {
-// return new ST_Agsym_s();
-// }
-// if (theClass == Agedge_s.class) {
-// return new ST_Agedge_s();
-// }
-// if (theClass == Agobj_s.class) {
-// return new ST_Agobj_s();
-// }
-// if (theClass == Agrec_s.class) {
-// return new ST_Agrec_s();
-// }
-// if (theClass == Agraph_s.class) {
-// return new ST_Agraph_s();
-// }
-// if (theClass == Agclos_s.class) {
-// return new ST_Agclos_s();
-// }
-// if (theClass == Agdisc_s.class) {
-// return new ST_Agdisc_s();
-// }
-// if (theClass == Agdstate_s.class) {
-// return new ST_Agdstate_s();
-// }
-// if (theClass == Agiodisc_s.class) {
-// return new ST_Agiodisc_s();
-// }
-
- return new __struct_impl__<C>(theClass);
- }
-
- public static StarStruct create(Class theClass, StarStruct parent) {
- if (theClass == _dtmethod_s.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == _dtdisc_s.class) {
- return new ST_dtdisc_s(parent);
- }
- if (theClass == Agdesc_s.class) {
- return new ST_Agdesc_s(parent);
- }
- if (theClass == Agtag_s.class) {
- return new ST_Agtag_s(parent);
- }
- if (theClass == Agiddisc_s.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == Agmemdisc_s.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == nlist_t.class) {
- return new ST_nlist_t(parent);
- }
- if (theClass == arrowname_t.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == arrowtype_t.class) {
- throw new IllegalArgumentException(theClass.toString());
- }
- if (theClass == elist.class) {
- return new ST_elist(parent);
- }
- if (theClass == pointf.class) {
- return new ST_pointf(parent);
- }
- if (theClass == boxf.class) {
- return new ST_boxf(parent);
- }
- if (theClass == port.class) {
- return new ST_port(parent);
- }
- if (theClass == polygon_t.class) {
- return new ST_polygon_t(parent);
- }
- if (theClass == shape_functions.class) {
- return new ST_shape_functions(parent);
- }
- if (theClass == shape_desc.class) {
- return new ST_shape_desc(parent);
- }
- if (theClass == deque_t.class) {
- return new ST_deque_t(parent);
- }
- if (theClass == pointnlink_t.class) {
- return new ST_pointnlink_t(parent);
- }
- if (theClass == Ppoly_t.class) {
- return new ST_Ppoly_t(parent);
- }
- if (theClass == splineInfo.class) {
- return new ST_splineInfo(parent);
- }
- if (theClass == textfont_t.class) {
- return new ST_textfont_t(parent);
- }
- //
-// if (theClass == Agsubnode_s.class) {
-// return new ST_Agsubnode_s(parent);
-// }
-// if (theClass == _dtlink_s.class) {
-// return new ST_dtlink_s(parent);
-// }
-// if (theClass == refstr_t.class) {
-// return new ST_refstr_t(parent);
-// }
-// if (theClass == Agsym_s.class) {
-// return new ST_Agsym_s(parent);
-// }
-// if (theClass == Agedge_s.class) {
-// return new ST_Agedge_s(parent);
-// }
-// if (theClass == Agobj_s.class) {
-// return new ST_Agobj_s(parent);
-// }
-// if (theClass == Agrec_s.class) {
-// return new ST_Agrec_s(parent);
-// }
-// if (theClass == Agraph_s.class) {
-// return new ST_Agraph_s(parent);
-// }
-// if (theClass == Agclos_s.class) {
-// return new ST_Agclos_s(parent);
-// }
-// if (theClass == Agdisc_s.class) {
-// return new ST_Agdisc_s(parent);
-// }
-// if (theClass == Agdstate_s.class) {
-// return new ST_Agdstate_s(parent);
-// }
- return new StarStructImpl(theClass, parent);
- }
-
-}
diff --git a/src/smetana/core/Macro.java b/src/smetana/core/Macro.java
index e01cb47..59e5107 100644
--- a/src/smetana/core/Macro.java
+++ b/src/smetana/core/Macro.java
@@ -36,27 +36,29 @@
package smetana.core;
-import h.Agedge_s;
-import h.Agedgeinfo_t;
-import h.Agnode_s;
-import h.Agnodeinfo_t;
-import h.Agobj_s;
-import h.Agraph_s;
-import h.Agraphinfo_t;
-import h.GVC_s;
+import h.ST_Agedge_s;
+import h.ST_Agedgeinfo_t;
+import h.ST_Agnode_s;
+import h.ST_Agnodeinfo_t;
+import h.ST_Agobj_s;
+import h.ST_Agraph_s;
+import h.ST_Agraphinfo_t;
+import h.ST_Agrec_s;
import h.ST_Agtag_s;
+import h.ST_GVC_s;
+import h.ST_Pedge_t;
+import h.ST_bezier;
import h.ST_boxf;
import h.ST_elist;
+import h.ST_layout_t;
import h.ST_nlist_t;
import h.ST_pointf;
import h.ST_port;
-import h.elist;
-// http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.7.4
-// http://www.jbox.dk/sanos/source/lib/string.c.html
-import h.pointf;
-import h.port;
-import h.splines;
-import h.textlabel_t;
+import h.ST_rank_t;
+import h.ST_shape_desc;
+import h.ST_splines;
+import h.ST_textlabel_t;
+import h.ST_textspan_t;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -97,6 +99,10 @@ public class Macro {
return v == false;
}
+ public static int NOTI(boolean v) {
+ return v ? 0 : 1;
+ }
+
public static boolean NOT(int i) {
return i == 0;
}
@@ -136,7 +142,7 @@ public class Macro {
// #define AGTAG(obj) (((Agobj_t*)(obj))->tag)
public static ST_Agtag_s AGTAG(__ptr__ obj) {
- return (ST_Agtag_s) obj.castTo(Agobj_s.class).getStruct("tag");
+ return (ST_Agtag_s) ((ST_Agobj_s) obj.castTo(ST_Agobj_s.class)).tag;
}
// #define AGTYPE(obj) (AGTAG(obj).objtype)
@@ -168,12 +174,12 @@ public class Macro {
// #define AGATTRWF(obj) (AGTAG(obj).attrwf)
// #define AGDATA(obj) (((Agobj_t*)(obj))->data)
- public static __ptr__ AGDATA(__ptr__ obj) {
- return obj.castTo(Agobj_s.class).getPtr("data");
+ public static ST_Agrec_s AGDATA(__ptr__ obj) {
+ return ((ST_Agobj_s) obj.castTo(ST_Agobj_s.class)).data;
}
public static void AGDATA(__ptr__ obj, __ptr__ v) {
- obj.castTo(Agobj_s.class).setPtr("data", v);
+ obj.castTo(ST_Agobj_s.class).setPtr("data", v);
}
// #define AGIN2OUT(e) ((e)-1)
@@ -187,43 +193,43 @@ public class Macro {
}
// #define AGOPP(e) ((AGTYPE(e)==AGINEDGE)?AGIN2OUT(e):AGOUT2IN(e))
- public static Agedge_s AGOPP(Agedge_s e) {
- return (Agedge_s) (AGTYPE(e) == AGINEDGE ? AGIN2OUT(e) : AGOUT2IN(e));
+ public static ST_Agedge_s AGOPP(ST_Agedge_s e) {
+ return (ST_Agedge_s) (AGTYPE(e) == AGINEDGE ? AGIN2OUT(e) : AGOUT2IN(e));
}
// #define AGMKOUT(e) (AGTYPE(e) == AGOUTEDGE? (e): AGIN2OUT(e))
- public static Agedge_s AGMKOUT(__ptr__ e) {
- return (Agedge_s) (AGTYPE(e) == AGOUTEDGE ? (e) : AGIN2OUT(e));
+ public static ST_Agedge_s AGMKOUT(__ptr__ e) {
+ return (ST_Agedge_s) (AGTYPE(e) == AGOUTEDGE ? (e) : AGIN2OUT(e));
}
// #define AGMKIN(e) (AGTYPE(e) == AGINEDGE? (e): AGOUT2IN(e))
- public static Agedge_s AGMKIN(__ptr__ e) {
- return (Agedge_s) (AGTYPE(e) == AGINEDGE ? (e) : AGOUT2IN(e));
+ public static ST_Agedge_s AGMKIN(__ptr__ e) {
+ return (ST_Agedge_s) (AGTYPE(e) == AGINEDGE ? (e) : AGOUT2IN(e));
}
// #define AGTAIL(e) (AGMKIN(e)->node)
- public static Agnode_s AGTAIL(__ptr__ e) {
- return (Agnode_s) AGMKIN(e).getPtr("node");
+ public static ST_Agnode_s AGTAIL(__ptr__ e) {
+ return (ST_Agnode_s) AGMKIN(e).node;
}
- public static Agnode_s agtail(__ptr__ e) {
- return (Agnode_s) AGMKIN(e).getPtr("node");
+ public static ST_Agnode_s agtail(__ptr__ e) {
+ return (ST_Agnode_s) AGMKIN(e).node;
}
- public static void agtail(Agedge_s e, __ptr__ v) {
+ public static void agtail(ST_Agedge_s e, __ptr__ v) {
AGMKIN(e).setPtr("node", v);
}
// #define AGHEAD(e) (AGMKOUT(e)->node)
- public static Agnode_s AGHEAD(__ptr__ e) {
- return (Agnode_s) AGMKOUT(e).getPtr("node");
+ public static ST_Agnode_s AGHEAD(__ptr__ e) {
+ return (ST_Agnode_s) AGMKOUT(e).node;
}
- private static Agnode_s aghead(Agedge_s e) {
- return (Agnode_s) AGMKOUT(e).getPtr("node");
+ private static ST_Agnode_s aghead(ST_Agedge_s e) {
+ return (ST_Agnode_s) AGMKOUT(e).node;
}
- public static void aghead(Agedge_s e, __ptr__ v) {
+ public static void aghead(ST_Agedge_s e, __ptr__ v) {
AGMKOUT(e).setPtr("node", v);
}
@@ -259,12 +265,12 @@ public class Macro {
// ((Dthold_t*)(rep))->obj)
// #define LENGTH(e) (ND_rank(aghead(e)) - ND_rank(agtail(e)))
- public static int LENGTH(Agedge_s e) {
+ public static int LENGTH(ST_Agedge_s e) {
return ND_rank(aghead(e)) - ND_rank(agtail(e));
}
// #define SLACK(e) (LENGTH(e) - ED_minlen(e))
- public static int SLACK(Agedge_s e) {
+ public static int SLACK(ST_Agedge_s e) {
return LENGTH(e) - ED_minlen(e);
}
@@ -274,342 +280,354 @@ public class Macro {
}
// #define TREE_EDGE(e) (ED_tree_index(e) >= 0)
- public static boolean TREE_EDGE(Agedge_s e) {
+ public static boolean TREE_EDGE(ST_Agedge_s e) {
return ED_tree_index(e) >= 0;
}
// #define GD_parent(g) (((Agraphinfo_t*)AGDATA(g))->parent)
- public static __ptr__ GD_parent(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("parent");
+ public static __ptr__ GD_parent(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).parent;
}
- public static void GD_parent(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("parent", v);
+
+ public static void GD_parent(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("parent", v);
}
-
+
// #define GD_level(g) (((Agraphinfo_t*)AGDATA(g))->level)
// #define GD_drawing(g) (((Agraphinfo_t*)AGDATA(g))->drawing)
- public static __ptr__ GD_drawing(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("drawing");
+ public static ST_layout_t GD_drawing(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).drawing;
}
- public static void GD_drawing(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("drawing", v);
+ public static void GD_drawing(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("drawing", v);
}
// #define GD_bb(g) (((Agraphinfo_t*)AGDATA(g))->bb)
public static ST_boxf GD_bb(__ptr__ g) {
- return (ST_boxf) AGDATA(g).castTo(Agraphinfo_t.class).getStruct("bb");
+ return (ST_boxf) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).bb;
}
// #define GD_gvc(g) (((Agraphinfo_t*)AGDATA(g))->gvc)
- public static GVC_s GD_gvc(Agraph_s g) {
- return (GVC_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("gvc");
+ public static ST_GVC_s GD_gvc(ST_Agraph_s g) {
+ return (ST_GVC_s) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).gvc;
}
- public static void GD_gvc(Agraph_s g, GVC_s v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("gvc", v);
+ public static void GD_gvc(ST_Agraph_s g, ST_GVC_s v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("gvc", v);
}
// #define GD_cleanup(g) (((Agraphinfo_t*)AGDATA(g))->cleanup)
- public static __ptr__ GD_cleanup(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("cleanup");
+ public static __ptr__ GD_cleanup(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).cleanup;
}
// #define GD_dist(g) (((Agraphinfo_t*)AGDATA(g))->dist)
// #define GD_alg(g) (((Agraphinfo_t*)AGDATA(g))->alg)
// #define GD_border(g) (((Agraphinfo_t*)AGDATA(g))->border)
- public static __array_of_struct__ GD_border(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getArrayOfStruct("border");
+ public static ST_pointf[] GD_border(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t) AGDATA(g).castTo(ST_Agraphinfo_t.class)).border;
}
// #define GD_cl_cnt(g) (((Agraphinfo_t*)AGDATA(g))->cl_nt)
// #define GD_clust(g) (((Agraphinfo_t*)AGDATA(g))->clust)
- public static __ptr__ GD_clust(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("clust");
+ public static ST_Agraph_s.Array GD_clust(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).clust;
}
- public static void GD_clust(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("clust", v);
+
+ public static void GD_clust(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("clust", v);
}
// #define GD_dotroot(g) (((Agraphinfo_t*)AGDATA(g))->dotroot)
- public static Agraph_s GD_dotroot(Agraph_s g) {
- return (Agraph_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("dotroot");
+ public static ST_Agraph_s GD_dotroot(ST_Agraph_s g) {
+ return (ST_Agraph_s) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).dotroot;
}
- public static void GD_dotroot(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("dotroot", v);
+ public static void GD_dotroot(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("dotroot", v);
}
// #define GD_comp(g) (((Agraphinfo_t*)AGDATA(g))->comp)
- public static ST_nlist_t GD_comp(Agraph_s g) {
- return (ST_nlist_t) AGDATA(g).castTo(Agraphinfo_t.class).getStruct("comp");
+ public static ST_nlist_t GD_comp(ST_Agraph_s g) {
+ return (ST_nlist_t) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).comp;
}
// #define GD_exact_ranksep(g) (((Agraphinfo_t*)AGDATA(g))->exact_ranksep)
- public static int GD_exact_ranksep(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("exact_ranksep");
+ public static int GD_exact_ranksep(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).exact_ranksep;
}
- public static void GD_exact_ranksep(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("exact_ranksep", v);
+ public static void GD_exact_ranksep(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("exact_ranksep", v);
}
// #define GD_expanded(g) (((Agraphinfo_t*)AGDATA(g))->expanded)
- public static boolean GD_expanded(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getBoolean("expanded");
+ public static boolean GD_expanded(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).expanded;
}
- public static void GD_expanded(Agraph_s g, boolean v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setBoolean("expanded", v);
+
+ public static void GD_expanded(ST_Agraph_s g, boolean v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).expanded = v;
}
-
+
// #define GD_flags(g) (((Agraphinfo_t*)AGDATA(g))->flags)
- public static int GD_flags(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("flags");
+ public static int GD_flags(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).flags;
}
- public static void GD_flags(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("flags", v);
+ public static void GD_flags(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("flags", v);
}
// #define GD_gui_state(g) (((Agraphinfo_t*)AGDATA(g))->gui_state)
// #define GD_charset(g) (((Agraphinfo_t*)AGDATA(g))->charset)
- public static int GD_charset(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("charset");
+ public static int GD_charset(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).charset;
}
- public static void GD_charset(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("charset", v);
+ public static void GD_charset(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("charset", v);
}
// #define GD_has_labels(g) (((Agraphinfo_t*)AGDATA(g))->has_labels)
public static int GD_has_labels(__ptr__ g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("has_labels");
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).has_labels;
}
public static void GD_has_labels(__ptr__ g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("has_labels", v);
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("has_labels", v);
}
// #define GD_has_images(g) (((Agraphinfo_t*)AGDATA(g))->has_images)
// #define GD_has_flat_edges(g) (((Agraphinfo_t*)AGDATA(g))->has_flat_edges)
- public static int GD_has_flat_edges(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("has_flat_edges");
+ public static int GD_has_flat_edges(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).has_flat_edges;
}
- public static void GD_has_flat_edges(Agraph_s g, boolean v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setBoolean("has_flat_edges", v);
+
+ public static void GD_has_flat_edges(ST_Agraph_s g, boolean v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).has_flat_edges = v?1:0;
}
// #define GD_has_sourcerank(g) (((Agraphinfo_t*)AGDATA(g))->has_sourcerank)
// #define GD_has_sinkrank(g) (((Agraphinfo_t*)AGDATA(g))->has_sinkrank)
// #define GD_ht1(g) (((Agraphinfo_t*)AGDATA(g))->ht1)
- public static double GD_ht1(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getDouble("ht1");
+ public static double GD_ht1(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).ht1;
}
- public static void GD_ht1(Agraph_s g, double v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setDouble("ht1", v);
+ public static void GD_ht1(ST_Agraph_s g, double v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setDouble("ht1", v);
}
// #define GD_ht2(g) (((Agraphinfo_t*)AGDATA(g))->ht2)
- public static double GD_ht2(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getDouble("ht2");
+ public static double GD_ht2(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).ht2;
}
- public static void GD_ht2(Agraph_s g, double v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setDouble("ht2", v);
+ public static void GD_ht2(ST_Agraph_s g, double v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setDouble("ht2", v);
}
// #define GD_inleaf(g) (((Agraphinfo_t*)AGDATA(g))->inleaf)
// #define GD_installed(g) (((Agraphinfo_t*)AGDATA(g))->installed)
- public static int GD_installed(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("installed");
+ public static int GD_installed(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).installed;
}
- public static void GD_installed(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("installed", v);
+
+ public static void GD_installed(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("installed", v);
}
// #define GD_label(g) (((Agraphinfo_t*)AGDATA(g))->label)
- public static textlabel_t GD_label(__ptr__ g) {
- return (textlabel_t) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("label");
+ public static ST_textlabel_t GD_label(__ptr__ g) {
+ return (ST_textlabel_t) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).label;
}
+
public static void GD_label(__ptr__ g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("label", v);
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("label", v);
}
// #define GD_leader(g) (((Agraphinfo_t*)AGDATA(g))->leader)
- public static Agnode_s GD_leader(Agraph_s g) {
- return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("leader");
+ public static ST_Agnode_s GD_leader(ST_Agraph_s g) {
+ return (ST_Agnode_s) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).leader;
}
- public static void GD_leader(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("leader", v);
+
+ public static void GD_leader(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("leader", v);
}
-
+
// #define GD_rankdir2(g) (((Agraphinfo_t*)AGDATA(g))->rankdir)
- public static int GD_rankdir2(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("rankdir");
+ public static int GD_rankdir2(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).rankdir;
}
- public static void GD_rankdir2(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("rankdir", v);
+ public static void GD_rankdir2(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("rankdir", v);
}
// #define GD_rankdir(g) (((Agraphinfo_t*)AGDATA(g))->rankdir & 0x3)
- public static int GD_rankdir(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("rankdir") & 0x3;
+ public static int GD_rankdir(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).rankdir & 0x3;
}
// #define GD_flip(g) (GD_rankdir(g) & 1)
- public static int GD_flip(Agraph_s g) {
+ public static int GD_flip(ST_Agraph_s g) {
return GD_rankdir(g) & 1;
}
// #define GD_realrankdir(g) ((((Agraphinfo_t*)AGDATA(g))->rankdir) >> 2)
// #define GD_realflip(g) (GD_realrankdir(g) & 1)
// #define GD_ln(g) (((Agraphinfo_t*)AGDATA(g))->ln)
- public static Agnode_s GD_ln(Agraph_s g) {
- return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("ln");
+ public static ST_Agnode_s GD_ln(ST_Agraph_s g) {
+ return (ST_Agnode_s) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).ln;
}
- public static void GD_ln(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("ln", v);
+
+ public static void GD_ln(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("ln", v);
}
-
+
// #define GD_maxrank(g) (((Agraphinfo_t*)AGDATA(g))->maxrank)
- public static int GD_maxrank(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("maxrank");
+ public static int GD_maxrank(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).maxrank;
}
- public static void GD_maxrank(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("maxrank", v);
+ public static void GD_maxrank(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("maxrank", v);
}
// #define GD_maxset(g) (((Agraphinfo_t*)AGDATA(g))->maxset)
- public static __ptr__ GD_maxset(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("maxset");
+ public static __ptr__ GD_maxset(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).maxset;
}
// #define GD_minrank(g) (((Agraphinfo_t*)AGDATA(g))->minrank)
- public static int GD_minrank(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("minrank");
+ public static int GD_minrank(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).minrank;
}
- public static void GD_minrank(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("minrank", v);
+ public static void GD_minrank(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("minrank", v);
}
// #define GD_minset(g) (((Agraphinfo_t*)AGDATA(g))->minset)
- public static __ptr__ GD_minset(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("minset");
+ public static __ptr__ GD_minset(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).minset;
}
// #define GD_minrep(g) (((Agraphinfo_t*)AGDATA(g))->minrep)
// #define GD_maxrep(g) (((Agraphinfo_t*)AGDATA(g))->maxrep)
// #define GD_move(g) (((Agraphinfo_t*)AGDATA(g))->move)
// #define GD_n_cluster(g) (((Agraphinfo_t*)AGDATA(g))->n_cluster)
- public static int GD_n_cluster(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("n_cluster");
+ public static int GD_n_cluster(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).n_cluster;
}
- public static void GD_n_cluster(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("n_cluster", v);
+
+ public static void GD_n_cluster(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("n_cluster", v);
}
// #define GD_n_nodes(g) (((Agraphinfo_t*)AGDATA(g))->n_nodes)
- public static int GD_n_nodes(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("n_nodes");
+ public static int GD_n_nodes(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).n_nodes;
}
- public static void GD_n_nodes(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("n_nodes", v);
+ public static void GD_n_nodes(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("n_nodes", v);
}
// #define GD_ndim(g) (((Agraphinfo_t*)AGDATA(g))->ndim)
// #define GD_odim(g) (((Agraphinfo_t*)AGDATA(g))->odim)
// #define GD_neato_nlist(g) (((Agraphinfo_t*)AGDATA(g))->neato_nlist)
// #define GD_nlist(g) (((Agraphinfo_t*)AGDATA(g))->nlist)
- public static Agnode_s GD_nlist(Agraph_s g) {
- return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("nlist");
+ public static ST_Agnode_s GD_nlist(ST_Agraph_s g) {
+ return (ST_Agnode_s) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).nlist;
}
- public static void GD_nlist(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("nlist", v);
+ public static void GD_nlist(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("nlist", v);
}
// #define GD_nodesep(g) (((Agraphinfo_t*)AGDATA(g))->nodesep)
- public static int GD_nodesep(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("nodesep");
+ public static int GD_nodesep(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).nodesep;
}
- public static void GD_nodesep(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("nodesep", v);
+ public static void GD_nodesep(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("nodesep", v);
}
// #define GD_outleaf(g) (((Agraphinfo_t*)AGDATA(g))->outleaf)
// #define GD_rank(g) (((Agraphinfo_t*)AGDATA(g))->rank)
- public static __ptr__ GD_rank(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("rank");
+ public static ST_rank_t.Array2 GD_rank(ST_Agraph_s g) {
+ return (ST_rank_t.Array2) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).rank;
}
- public static void GD_rank(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("rank", v);
+ public static void GD_rank(ST_Agraph_s g, ST_rank_t.Array2 v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("rank", v);
}
// #define GD_rankleader(g) (((Agraphinfo_t*)AGDATA(g))->rankleader)
- public static __ptr__ GD_rankleader(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getPtr("rankleader");
+ public static ST_Agnode_s.Array GD_rankleader(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).rankleader;
}
- public static void GD_rankleader(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("rankleader", v);
+
+ public static void GD_rankleader(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("rankleader", v);
}
// #define GD_ranksep(g) (((Agraphinfo_t*)AGDATA(g))->ranksep)
- public static int GD_ranksep(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("ranksep");
+ public static int GD_ranksep(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).ranksep;
}
- public static void GD_ranksep(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("ranksep", v);
+ public static void GD_ranksep(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("ranksep", v);
}
// #define GD_rn(g) (((Agraphinfo_t*)AGDATA(g))->rn)
- public static Agnode_s GD_rn(Agraph_s g) {
- return (Agnode_s) AGDATA(g).castTo(Agraphinfo_t.class).getPtr("rn");
+ public static ST_Agnode_s GD_rn(ST_Agraph_s g) {
+ return (ST_Agnode_s) ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).rn;
}
- public static void GD_rn(Agraph_s g, __ptr__ v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setPtr("rn", v);
+
+ public static void GD_rn(ST_Agraph_s g, __ptr__ v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setPtr("rn", v);
}
// #define GD_set_type(g) (((Agraphinfo_t*)AGDATA(g))->set_type)
- public static int GD_set_type(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("set_type");
+ public static int GD_set_type(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).set_type;
}
- public static void GD_set_type(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("set_type", v);
+
+ public static void GD_set_type(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("set_type", v);
}
-
-
+
// #define GD_label_pos(g) (((Agraphinfo_t*)AGDATA(g))->label_pos)
- public static int GD_label_pos(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("label_pos");
+ public static int GD_label_pos(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).label_pos;
}
- public static void GD_label_pos(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("label_pos", v);
+
+ public static void GD_label_pos(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("label_pos", v);
}
-
+
// #define GD_showboxes(g) (((Agraphinfo_t*)AGDATA(g))->showboxes)
- public static int GD_showboxes(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("showboxes");
+ public static int GD_showboxes(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).showboxes;
}
- public static void GD_showboxes(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("showboxes", v);
+ public static void GD_showboxes(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("showboxes", v);
}
// #define GD_fontnames(g) (((Agraphinfo_t*)AGDATA(g))->fontnames)
- public static int GD_fontnames(Agraph_s g) {
- return AGDATA(g).castTo(Agraphinfo_t.class).getInt("fontnames");
+ public static int GD_fontnames(ST_Agraph_s g) {
+ return ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).fontnames;
}
- public static void GD_fontnames(Agraph_s g, int v) {
- AGDATA(g).castTo(Agraphinfo_t.class).setInt("fontnames", v);
+ public static void GD_fontnames(ST_Agraph_s g, int v) {
+ ((ST_Agraphinfo_t)AGDATA(g).castTo(ST_Agraphinfo_t.class)).setInt("fontnames", v);
}
// #define GD_spring(g) (((Agraphinfo_t*)AGDATA(g))->spring)
@@ -617,331 +635,354 @@ public class Macro {
// #define GD_t(g) (((Agraphinfo_t*)AGDATA(g))->t)
// #define ND_id(n) (((Agnodeinfo_t*)AGDATA(n))->id)
- public static int ND_id(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("id");
+ public static int ND_id(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).id;
}
-
+
// #define ND_alg(n) (((Agnodeinfo_t*)AGDATA(n))->alg)
- public static __ptr__ ND_alg(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("alg");
+ public static __ptr__ ND_alg(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).alg;
}
- public static void ND_alg(Agnode_s n, __ptr__ value) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("alg", value);
+
+ public static void ND_alg(ST_Agnode_s n, __ptr__ value) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("alg", value);
}
// #define ND_UF_parent(n) (((Agnodeinfo_t*)AGDATA(n))->UF_parent)
- public static Agnode_s ND_UF_parent(__ptr__ n) {
- return (Agnode_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("UF_parent");
+ public static ST_Agnode_s ND_UF_parent(__ptr__ n) {
+ return (ST_Agnode_s) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).UF_parent;
}
+
public static void ND_UF_parent(__ptr__ n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("UF_parent", v);
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("UF_parent", v);
}
// #define ND_set(n) (((Agnodeinfo_t*)AGDATA(n))->set)
// #define ND_UF_size(n) (((Agnodeinfo_t*)AGDATA(n))->UF_size)
- public static int ND_UF_size(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("UF_size");
+ public static int ND_UF_size(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).UF_size;
}
- public static void ND_UF_size(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("UF_size", v);
+
+ public static void ND_UF_size(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("UF_size", v);
}
// #define ND_bb(n) (((Agnodeinfo_t*)AGDATA(n))->bb)
// #define ND_clust(n) (((Agnodeinfo_t*)AGDATA(n))->clust)
- public static Agraph_s ND_clust(__ptr__ n) {
- return (Agraph_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("clust");
+ public static ST_Agraph_s ND_clust(__ptr__ n) {
+ return (ST_Agraph_s) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).clust;
}
- public static void ND_clust(Agnode_s n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("clust", v);
+ public static void ND_clust(ST_Agnode_s n, __ptr__ v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("clust", v);
}
// #define ND_coord(n) (((Agnodeinfo_t*)AGDATA(n))->coord)
public static ST_pointf ND_coord(__ptr__ n) {
- return (ST_pointf) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("coord");
+ return (ST_pointf) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).coord;
}
// #define ND_dist(n) (((Agnodeinfo_t*)AGDATA(n))->dist)
// #define ND_flat_in(n) (((Agnodeinfo_t*)AGDATA(n))->flat_in)
- public static ST_elist ND_flat_in(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("flat_in");
+ public static ST_elist ND_flat_in(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).flat_in;
}
// #define ND_flat_out(n) (((Agnodeinfo_t*)AGDATA(n))->flat_out)
- public static ST_elist ND_flat_out(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("flat_out");
+ public static ST_elist ND_flat_out(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).flat_out;
}
// #define ND_gui_state(n) (((Agnodeinfo_t*)AGDATA(n))->gui_state)
// #define ND_has_port(n) (((Agnodeinfo_t*)AGDATA(n))->has_port)
- public static boolean ND_has_port(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getBoolean("has_port");
+ public static boolean ND_has_port(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).has_port;
}
// #define ND_rep(n) (((Agnodeinfo_t*)AGDATA(n))->rep)
// #define ND_heapindex(n) (((Agnodeinfo_t*)AGDATA(n))->heapindex)
// #define ND_height(n) (((Agnodeinfo_t*)AGDATA(n))->height)
public static double ND_height(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("height");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).height;
}
- public static void ND_height(Agnode_s n, double v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("height", v);
+ public static void ND_height(ST_Agnode_s n, double v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setDouble("height", v);
}
// #define ND_hops(n) (((Agnodeinfo_t*)AGDATA(n))->hops)
// #define ND_ht(n) (((Agnodeinfo_t*)AGDATA(n))->ht)
public static double ND_ht(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("ht");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).ht;
}
- public static void ND_ht(Agnode_s n, double v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("ht", v);
+ public static void ND_ht(ST_Agnode_s n, double v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setDouble("ht", v);
}
// #define ND_in(n) (((Agnodeinfo_t*)AGDATA(n))->in)
- public static ST_elist ND_in(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("in");
+ public static ST_elist ND_in(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t) AGDATA(n).castTo(ST_Agnodeinfo_t.class)).in;
}
- public static void ND_in(__ptr__ n, __struct__<elist> v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("in", v);
+ public static void ND_in(__ptr__ n, __struct__<ST_elist> v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setStruct("in", v);
}
// #define ND_inleaf(n) (((Agnodeinfo_t*)AGDATA(n))->inleaf)
- public static __ptr__ ND_inleaf(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("inleaf");
+ public static __ptr__ ND_inleaf(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).inleaf;
}
// #define ND_label(n) (((Agnodeinfo_t*)AGDATA(n))->label)
- public static textlabel_t ND_label(Agnode_s n) {
- return (textlabel_t) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("label");
+ public static ST_textlabel_t ND_label(ST_Agnode_s n) {
+ return (ST_textlabel_t) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).label;
}
- public static void ND_label(Agnode_s n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("label", v);
+ public static void ND_label(ST_Agnode_s n, __ptr__ v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("label", v);
}
// #define ND_xlabel(n) (((Agnodeinfo_t*)AGDATA(n))->xlabel)
- public static textlabel_t ND_xlabel(Agnode_s n) {
- return (textlabel_t) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("xlabel");
+ public static ST_textlabel_t ND_xlabel(ST_Agnode_s n) {
+ return (ST_textlabel_t) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).xlabel;
}
// #define ND_lim(n) (((Agnodeinfo_t*)AGDATA(n))->lim)
- public static int ND_lim(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("lim");
+ public static int ND_lim(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).lim;
}
- public static void ND_lim(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("lim", v);
+ public static void ND_lim(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("lim", v);
}
// #define ND_low(n) (((Agnodeinfo_t*)AGDATA(n))->low)
- public static int ND_low(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("low");
+ public static int ND_low(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).low;
}
- public static void ND_low(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("low", v);
+ public static void ND_low(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("low", v);
}
// #define ND_lw(n) (((Agnodeinfo_t*)AGDATA(n))->lw)
public static double ND_lw(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("lw");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).lw;
}
- public static void ND_lw(Agnode_s n, double v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("lw", v);
+ public static void ND_lw(ST_Agnode_s n, double v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setDouble("lw", v);
}
// #define ND_mark(n) (((Agnodeinfo_t*)AGDATA(n))->mark)
public static int ND_mark(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("mark");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).mark;
}
+
public static void ND_mark(__ptr__ n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("mark", v);
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("mark", v);
}
+
public static void ND_mark(__ptr__ n, boolean v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setBoolean("mark", v);
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).mark = v?1:0;
}
// #define ND_mval(n) (((Agnodeinfo_t*)AGDATA(n))->mval)
public static double ND_mval(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("mval");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).mval;
}
- public static void ND_mval(Agnode_s n, double v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("mval", v);
+
+ public static void ND_mval(ST_Agnode_s n, double v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setDouble("mval", v);
}
// #define ND_n_cluster(n) (((Agnodeinfo_t*)AGDATA(n))->n_cluster)
// #define ND_next(n) (((Agnodeinfo_t*)AGDATA(n))->next)
- public static Agnode_s ND_next(Agnode_s n) {
- return (Agnode_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("next");
+ public static ST_Agnode_s ND_next(ST_Agnode_s n) {
+ return (ST_Agnode_s) ((ST_Agnodeinfo_t) AGDATA(n).castTo(ST_Agnodeinfo_t.class)).next;
}
+
public static void ND_next(__ptr__ n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("next", v);
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("next", v);
}
// #define ND_node_type(n) (((Agnodeinfo_t*)AGDATA(n))->node_type)
- public static int ND_node_type(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("node_type");
+ public static int ND_node_type(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).node_type;
}
- public static void ND_node_type(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("node_type", v);
+
+ public static void ND_node_type(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("node_type", v);
}
// #define ND_onstack(n) (((Agnodeinfo_t*)AGDATA(n))->onstack)
- public static boolean ND_onstack(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getBoolean("onstack");
+ public static boolean ND_onstack(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).onstack!=0;
}
- public static void ND_onstack(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("onstack", v);
+
+ public static void ND_onstack(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("onstack", v);
}
- public static void ND_onstack(Agnode_s n, boolean v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setBoolean("onstack", v);
+
+ public static void ND_onstack(ST_Agnode_s n, boolean v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).onstack = v?1:0;
}
// #define ND_order(n) (((Agnodeinfo_t*)AGDATA(n))->order)
public static int ND_order(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("order");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).order;
}
+
public static void ND_order(__ptr__ n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("order", v);
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("order", v);
}
// #define ND_other(n) (((Agnodeinfo_t*)AGDATA(n))->other)
- public static ST_elist ND_other(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("other");
+ public static ST_elist ND_other(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).other;
}
// #define ND_out(n) (((Agnodeinfo_t*)AGDATA(n))->out)
public static ST_elist ND_out(__ptr__ n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("out");
+ return ((ST_Agnodeinfo_t) AGDATA(n).castTo(ST_Agnodeinfo_t.class)).out;
}
- public static void ND_out(__ptr__ n, __struct__<elist> v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("out", v);
+
+ public static void ND_out(__ptr__ n, __struct__<ST_elist> v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setStruct("out", v);
}
// #define ND_outleaf(n) (((Agnodeinfo_t*)AGDATA(n))->outleaf)
- public static __ptr__ ND_outleaf(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("outleaf");
+ public static __ptr__ ND_outleaf(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).outleaf;
}
// #define ND_par(n) (((Agnodeinfo_t*)AGDATA(n))->par)
- public static Agedge_s ND_par(Agnode_s n) {
- return (Agedge_s) AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("par");
+ public static ST_Agedge_s ND_par(ST_Agnode_s n) {
+ return (ST_Agedge_s) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).par;
}
- public static void ND_par(Agnode_s n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("par", v);
+
+ public static void ND_par(ST_Agnode_s n, __ptr__ v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("par", v);
}
// #define ND_pinned(n) (((Agnodeinfo_t*)AGDATA(n))->pinned)
// #define ND_pos(n) (((Agnodeinfo_t*)AGDATA(n))->pos)
// #define ND_prev(n) (((Agnodeinfo_t*)AGDATA(n))->prev)
- public static __ptr__ ND_prev(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("prev");
+ public static __ptr__ ND_prev(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).prev;
}
- public static void ND_prev(Agnode_s n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("prev", v);
+
+ public static void ND_prev(ST_Agnode_s n, __ptr__ v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("prev", v);
}
// #define ND_priority(n) (((Agnodeinfo_t*)AGDATA(n))->priority)
- public static int ND_priority(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("priority");
+ public static int ND_priority(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).priority;
}
- public static void ND_priority(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("priority", v);
+
+ public static void ND_priority(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("priority", v);
}
// #define ND_rank(n) (((Agnodeinfo_t*)AGDATA(n))->rank)
public static int ND_rank(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("rank");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).rank;
}
+
public static void ND_rank(__ptr__ n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("rank", v);
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("rank", v);
}
// #define ND_ranktype(n) (((Agnodeinfo_t*)AGDATA(n))->ranktype)
- public static int ND_ranktype(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("ranktype");
+ public static int ND_ranktype(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).ranktype;
}
- public static void ND_ranktype(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("ranktype", v);
+
+ public static void ND_ranktype(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("ranktype", v);
}
// #define ND_rw(n) (((Agnodeinfo_t*)AGDATA(n))->rw)
public static double ND_rw(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("rw");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).rw;
}
- public static void ND_rw(Agnode_s n, double v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("rw", v);
+
+ public static void ND_rw(ST_Agnode_s n, double v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setDouble("rw", v);
}
// #define ND_save_in(n) (((Agnodeinfo_t*)AGDATA(n))->save_in)
- public static ST_elist ND_save_in(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("save_in");
+ public static ST_elist ND_save_in(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).save_in;
}
- public static void ND_save_in(Agnode_s n, __struct__<elist> v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("save_in", v);
+ public static void ND_save_in(ST_Agnode_s n, __struct__<ST_elist> v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setStruct("save_in", v);
}
// #define ND_save_out(n) (((Agnodeinfo_t*)AGDATA(n))->save_out)
- public static ST_elist ND_save_out(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("save_out");
+ public static ST_elist ND_save_out(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).save_out;
}
- public static void ND_save_out(Agnode_s n, __struct__<elist> v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setStruct("save_out", v);
+
+ public static void ND_save_out(ST_Agnode_s n, __struct__<ST_elist> v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setStruct("save_out", v);
}
// #define ND_shape(n) (((Agnodeinfo_t*)AGDATA(n))->shape)
- public static __ptr__ ND_shape(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("shape");
+ public static ST_shape_desc ND_shape(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t) AGDATA(n).castTo(ST_Agnodeinfo_t.class)).shape;
}
- public static void ND_shape(Agnode_s n, __ptr__ v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setPtr("shape", v);
+
+ public static void ND_shape(ST_Agnode_s n, __ptr__ v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setPtr("shape", v);
}
// #define ND_shape_info(n) (((Agnodeinfo_t*)AGDATA(n))->shape_info)
public static __ptr__ ND_shape_info(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getPtr("shape_info");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).shape_info;
}
// #define ND_showboxes(n) (((Agnodeinfo_t*)AGDATA(n))->showboxes)
- public static int ND_showboxes(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("showboxes");
+ public static int ND_showboxes(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).showboxes;
}
- public static void ND_showboxes(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("showboxes", v);
+
+ public static void ND_showboxes(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("showboxes", v);
}
// #define ND_state(n) (((Agnodeinfo_t*)AGDATA(n))->state)
// #define ND_clustnode(n) (((Agnodeinfo_t*)AGDATA(n))->clustnode)
// #define ND_tree_in(n) (((Agnodeinfo_t*)AGDATA(n))->tree_in)
- public static ST_elist ND_tree_in(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("tree_in");
+ public static ST_elist ND_tree_in(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).tree_in;
}
// #define ND_tree_out(n) (((Agnodeinfo_t*)AGDATA(n))->tree_out)
- public static ST_elist ND_tree_out(Agnode_s n) {
- return (ST_elist) AGDATA(n).castTo(Agnodeinfo_t.class).getStruct("tree_out");
+ public static ST_elist ND_tree_out(ST_Agnode_s n) {
+ return (ST_elist) ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).tree_out;
}
// #define ND_weight_class(n) (((Agnodeinfo_t*)AGDATA(n))->weight_class)
- public static int ND_weight_class(Agnode_s n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getInt("weight_class");
+ public static int ND_weight_class(ST_Agnode_s n) {
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).weight_class;
}
- public static void ND_weight_class(Agnode_s n, int v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setInt("weight_class", v);
+
+ public static void ND_weight_class(ST_Agnode_s n, int v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setInt("weight_class", v);
}
// #define ND_width(n) (((Agnodeinfo_t*)AGDATA(n))->width)
public static double ND_width(__ptr__ n) {
- return AGDATA(n).castTo(Agnodeinfo_t.class).getDouble("width");
+ return ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).width;
}
- public static void ND_width(Agnode_s n, double v) {
- AGDATA(n).castTo(Agnodeinfo_t.class).setDouble("width", v);
+
+ public static void ND_width(ST_Agnode_s n, double v) {
+ ((ST_Agnodeinfo_t)AGDATA(n).castTo(ST_Agnodeinfo_t.class)).setDouble("width", v);
}
// #define ND_xsize(n) (ND_lw(n)+ND_rw(n))
@@ -949,161 +990,183 @@ public class Macro {
// #define ED_alg(e) (((Agedgeinfo_t*)AGDATA(e))->alg)
// #define ED_conc_opp_flag(e) (((Agedgeinfo_t*)AGDATA(e))->conc_opp_flag)
- public static boolean ED_conc_opp_flag(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getBoolean("conc_opp_flag");
+ public static boolean ED_conc_opp_flag(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).conc_opp_flag;
}
- public static void ED_conc_opp_flag(Agedge_s e, boolean v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("conc_opp_flag", v ? 1 : 0);
+
+ public static void ED_conc_opp_flag(ST_Agedge_s e, boolean v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("conc_opp_flag", v ? 1 : 0);
}
// #define ED_count(e) (((Agedgeinfo_t*)AGDATA(e))->count)
public static int ED_count(__ptr__ e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("count");
+ return ((ST_Agedgeinfo_t) AGDATA(e).castTo(ST_Agedgeinfo_t.class)).count;
}
+
public static void ED_count(__ptr__ e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("count", v);
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("count", v);
}
// #define ED_cutvalue(e) (((Agedgeinfo_t*)AGDATA(e))->cutvalue)
- public static int ED_cutvalue(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("cutvalue");
+ public static int ED_cutvalue(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).cutvalue;
}
- public static void ED_cutvalue(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("cutvalue", v);
+
+ public static void ED_cutvalue(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("cutvalue", v);
}
// #define ED_edge_type(e) (((Agedgeinfo_t*)AGDATA(e))->edge_type)
// #define ED_adjacent(e) (((Agedgeinfo_t*)AGDATA(e))->adjacent)
public static int ED_adjacent(__ptr__ e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("adjacent");
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).adjacent;
}
- public static void ED_adjacent(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("adjacent", v);
+
+ public static void ED_adjacent(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("adjacent", v);
}
// #define ED_factor(e) (((Agedgeinfo_t*)AGDATA(e))->factor)
// #define ED_gui_state(e) (((Agedgeinfo_t*)AGDATA(e))->gui_state)
// #define ED_head_label(e) (((Agedgeinfo_t*)AGDATA(e))->head_label)
- public static textlabel_t ED_head_label(Agedge_s e) {
- return (textlabel_t) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("head_label");
+ public static ST_textlabel_t ED_head_label(ST_Agedge_s e) {
+ return (ST_textlabel_t) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).head_label;
}
- public static void ED_head_label(Agedge_s e, __ptr__ v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("head_label", v);
+
+ public static void ED_head_label(ST_Agedge_s e, __ptr__ v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setPtr("head_label", v);
}
// #define ED_head_port(e) (((Agedgeinfo_t*)AGDATA(e))->head_port)
public static ST_port ED_head_port(__ptr__ e) {
- return (ST_port) AGDATA(e).castTo(Agedgeinfo_t.class).getStruct("head_port");
+ return (ST_port) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).head_port;
}
- public static void ED_head_port(Agedge_s e, __struct__<port> v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setStruct("head_port", v);
+
+ public static void ED_head_port(ST_Agedge_s e, ST_port v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setStruct("head_port", v);
}
// #define ED_label(e) (((Agedgeinfo_t*)AGDATA(e))->label)
- public static textlabel_t ED_label(__ptr__ e) {
- return (textlabel_t) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("label");
+ public static ST_textlabel_t ED_label(__ptr__ e) {
+ return (ST_textlabel_t) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).label;
}
- public static void ED_label(Agedge_s e, __ptr__ v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("label", v);
+
+ public static void ED_label(ST_Agedge_s e, __ptr__ v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setPtr("label", v);
}
// #define ED_xlabel(e) (((Agedgeinfo_t*)AGDATA(e))->xlabel)
- public static textlabel_t ED_xlabel(Agedge_s e) {
- return (textlabel_t) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("xlabel");
+ public static ST_textlabel_t ED_xlabel(ST_Agedge_s e) {
+ return (ST_textlabel_t) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).xlabel;
}
// #define ED_label_ontop(e) (((Agedgeinfo_t*)AGDATA(e))->label_ontop)
- public static boolean ED_label_ontop(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getBoolean("label_ontop");
+ public static boolean ED_label_ontop(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).label_ontop;
}
- public static void ED_label_ontop(Agedge_s e, boolean v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setBoolean("label_ontop", v);
+
+ public static void ED_label_ontop(ST_Agedge_s e, boolean v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).label_ontop = v;
}
// #define ED_minlen(e) (((Agedgeinfo_t*)AGDATA(e))->minlen)
- public static int ED_minlen(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("minlen");
+ public static int ED_minlen(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).minlen;
}
- public static void ED_minlen(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("minlen", v);
+
+ public static void ED_minlen(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("minlen", v);
}
// #define ED_path(e) (((Agedgeinfo_t*)AGDATA(e))->path)
// #define ED_showboxes(e) (((Agedgeinfo_t*)AGDATA(e))->showboxes)
- public static int ED_showboxes(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("showboxes");
+ public static int ED_showboxes(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).showboxes;
}
- public static void ED_showboxes(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("showboxes", v);
+
+ public static void ED_showboxes(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("showboxes", v);
}
// #define ED_spl(e) (((Agedgeinfo_t*)AGDATA(e))->spl)
- public static splines ED_spl(Agedge_s e) {
- return (splines) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("spl");
+ public static ST_splines ED_spl(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t) AGDATA(e).castTo(ST_Agedgeinfo_t.class)).spl;
}
- public static void ED_spl(Agedge_s e, __ptr__ v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("spl", v);
+
+ public static void ED_spl(ST_Agedge_s e, ST_splines v) {
+ ((ST_Agedgeinfo_t) AGDATA(e).castTo(ST_Agedgeinfo_t.class)).spl = v;
}
// #define ED_tail_label(e) (((Agedgeinfo_t*)AGDATA(e))->tail_label)
- public static textlabel_t ED_tail_label(Agedge_s e) {
- return (textlabel_t) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("tail_label");
+ public static ST_textlabel_t ED_tail_label(ST_Agedge_s e) {
+ return (ST_textlabel_t) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).tail_label;
+ }
+
+ public static void ED_tail_label(ST_Agedge_s e, __ptr__ v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setPtr("tail_label", v);
}
// #define ED_tail_port(e) (((Agedgeinfo_t*)AGDATA(e))->tail_port)
public static ST_port ED_tail_port(__ptr__ e) {
- return (ST_port) AGDATA(e).castTo(Agedgeinfo_t.class).getStruct("tail_port");
+ return (ST_port) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).tail_port;
}
- public static void ED_tail_port(Agedge_s e, ST_port v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setStruct("tail_port", v);
+
+ public static void ED_tail_port(ST_Agedge_s e, ST_port v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setStruct("tail_port", v);
}
// #define ED_to_orig(e) (((Agedgeinfo_t*)AGDATA(e))->to_orig)
- public static Agedge_s ED_to_orig(__ptr__ e) {
- return (Agedge_s) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("to_orig");
+ public static ST_Agedge_s ED_to_orig(__ptr__ e) {
+ return (ST_Agedge_s) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).to_orig;
}
- public static void ED_to_orig(Agedge_s e, __ptr__ v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("to_orig", v);
+
+ public static void ED_to_orig(ST_Agedge_s e, __ptr__ v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setPtr("to_orig", v);
}
// #define ED_to_virt(e) (((Agedgeinfo_t*)AGDATA(e))->to_virt)
- public static Agedge_s ED_to_virt(Agedge_s e) {
- return (Agedge_s) AGDATA(e).castTo(Agedgeinfo_t.class).getPtr("to_virt");
+ public static ST_Agedge_s ED_to_virt(ST_Agedge_s e) {
+ return (ST_Agedge_s) ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).to_virt;
}
- public static void ED_to_virt(Agedge_s e, __ptr__ v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setPtr("to_virt", v);
+
+ public static void ED_to_virt(ST_Agedge_s e, __ptr__ v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setPtr("to_virt", v);
}
// #define ED_tree_index(e) (((Agedgeinfo_t*)AGDATA(e))->tree_index)
public static int ED_tree_index(__ptr__ e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("tree_index");
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).tree_index;
}
+
public static void ED_tree_index(__ptr__ e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("tree_index", v);
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("tree_index", v);
}
// #define ED_xpenalty(e) (((Agedgeinfo_t*)AGDATA(e))->xpenalty)
public static int ED_xpenalty(__ptr__ e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("xpenalty");
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).xpenalty;
}
- public static void ED_xpenalty(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("xpenalty", v);
+
+ public static void ED_xpenalty(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("xpenalty", v);
}
// #define ED_dist(e) (((Agedgeinfo_t*)AGDATA(e))->dist)
- public static double ED_dist(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getDouble("dist");
+ public static double ED_dist(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).dist;
}
- public static void ED_dist(Agedge_s e, double v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setDouble("dist", v);
+
+ public static void ED_dist(ST_Agedge_s e, double v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setDouble("dist", v);
}
// #define ED_weight(e) (((Agedgeinfo_t*)AGDATA(e))->weight)
- public static int ED_weight(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("weight");
+ public static int ED_weight(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).weight;
}
- public static void ED_weight(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("weight", v);
+
+ public static void ED_weight(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("weight", v);
}
//
@@ -1112,11 +1175,12 @@ public class Macro {
// #define ED_count(e) (((Agedgeinfo_t*)AGDATA(e))->count)
// #define ED_cutvalue(e) (((Agedgeinfo_t*)AGDATA(e))->cutvalue)
// #define ED_edge_type(e) (((Agedgeinfo_t*)AGDATA(e))->edge_type)
- public static int ED_edge_type(Agedge_s e) {
- return AGDATA(e).castTo(Agedgeinfo_t.class).getInt("edge_type");
+ public static int ED_edge_type(ST_Agedge_s e) {
+ return ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).edge_type;
}
- public static void ED_edge_type(Agedge_s e, int v) {
- AGDATA(e).castTo(Agedgeinfo_t.class).setInt("edge_type", v);
+
+ public static void ED_edge_type(ST_Agedge_s e, int v) {
+ ((ST_Agedgeinfo_t)AGDATA(e).castTo(ST_Agedgeinfo_t.class)).setInt("edge_type", v);
}
// #define ED_adjacent(e) (((Agedgeinfo_t*)AGDATA(e))->adjacent)
@@ -1143,13 +1207,21 @@ public class Macro {
// #define elist_fastapp(item,L) do {L.list[L.size++] = item; L.list[L.size] = NULL;} while(0)
// #define ALLOC(size,ptr,type) (ptr? (type*)realloc(ptr,(size)*sizeof(type)):(type*)malloc((size)*sizeof(type)))
- public static __ptr__ ALLOC_empty(int size, __ptr__ ptr, Class type) {
- return (__ptr__) (ptr != null ? JUtils.sizeof_starstar_empty(type, size).realloc(ptr) : JUtils
- .sizeof_starstar_empty(type, size).malloc());
+
+ public static ST_Agedge_s.ArrayOfStar ALLOC_allocated_ST_Agedge_s(ST_Agedge_s.ArrayOfStar old, int size) {
+ return old != null ? old.reallocJ(size) : new ST_Agedge_s.ArrayOfStar(size);
+ }
+
+ public static ST_Agnode_s.ArrayOfStar ALLOC_allocated_ST_Agnode_s(ST_Agnode_s.ArrayOfStar old, int size) {
+ return old != null ? old.reallocJ(size) : new ST_Agnode_s.ArrayOfStar(size);
}
- public static __ptr__ ALLOC_allocated2(int size, __ptr__ ptr, Class type) {
- return (__ptr__) (ptr != null ? JUtils.sizeof(type, size).realloc(ptr) : JUtils.sizeof(type, size).malloc());
+ public static ST_pointf.Array ALLOC_allocated_ST_pointf(ST_pointf.Array old, int size) {
+ return old != null ? old.reallocJ(size) : new ST_pointf.Array(size);
+ }
+
+ public static ST_Pedge_t.Array ALLOC_allocated_ST_Pedge_t(ST_Pedge_t.Array old, int size) {
+ return old != null ? old.reallocJ(size) : new ST_Pedge_t.Array(size);
}
public static __ptr__ ALLOC_INT(int size, __ptr__ ptr) {
@@ -1162,17 +1234,31 @@ public class Macro {
throw new UnsupportedOperationException();
}
- public static __ptr__ ALLOC(int nb, __ptr__ ptr, Class type) {
- if (ptr == null) {
- return (__ptr__) JUtils.sizeof(type, nb).malloc();
+ public static ST_Agnode_s.ArrayOfStar ALLOC_Agnode_s(int nb, ST_Agnode_s.ArrayOfStar old) {
+ if (old == null) {
+ return new ST_Agnode_s.ArrayOfStar(nb);
+ }
+ return old.reallocJ(nb);
+ }
+
+ public static ST_bezier.Array2 ALLOC_ST_bezier(int nb, ST_bezier.Array2 old) {
+ if (old == null) {
+ return new ST_bezier.Array2(nb);
}
- return (__ptr__) JUtils.sizeof(type, nb).realloc(ptr);
+ return old.reallocJ(nb);
+ }
+
+ public static ST_rank_t.Array2 ALLOC_ST_rank_t(int nb, ST_rank_t.Array2 old) {
+ if (old == null) {
+ return new ST_rank_t.Array2(nb);
+ }
+ return old.reallocJ(nb);
}
// #define elist_append(item,L) do {L.list = ALLOC(L.size + 2,L.list,edge_t*); L.list[L.size++] = item;
// L.list[L.size] = NULL;} while(0)
public static void elist_append(__ptr__ item, ST_elist L) {
-// L.setPtr("list", ALLOC_empty(L.getInt("size") + 2, L.getPtr("list"), Agedge_s.class));
+ // L.setPtr("list", ALLOC_empty(L.size + 2, L.getPtr("list"), Agedge_s.class));
L.realloc(L.size + 2);
L.setInList(L.size, item);
L.size = 1 + L.size;
@@ -1180,9 +1266,9 @@ public class Macro {
}
// #define alloc_elist(n,L) do {L.size = 0; L.list = N_NEW(n + 1,edge_t*); } while (0)
- public static void alloc_elist(int n, ST_elist L, Class cl) {
+ public static void alloc_elist(int n, ST_elist L) {
L.size = 0;
- L.mallocEmpty(cl, n + 1);
+ L.mallocEmpty(n + 1);
// L.setPtr("list", (__ptr__) JUtils.sizeof_starstar_empty(cl, n + 1).malloc());
}
@@ -1190,7 +1276,7 @@ public class Macro {
public static void free_list(ST_elist L) {
if (L.listNotNull())
L.free();
- // Memory.free(L.getPtr("list"));
+ // Memory.free(L.getPtr("list"));
}
public static double ABS(double a) {
@@ -1246,14 +1332,14 @@ public class Macro {
// ED_edge_type(newp) = VIRTUAL; \
// ED_to_orig(newp) = old; \
- public static void MAKEFWDEDGE(__ptr__ new_, __ptr__ old) {
- Agedge_s newp;
- Agedgeinfo_t info;
- newp = (Agedge_s) new_;
- info = (Agedgeinfo_t) newp.getStruct("base").getPtr("data");
- info.copyDataFrom(old.getStruct("base").getPtr("data").castTo(Agedgeinfo_t.class).getStruct());
- newp.copyDataFrom(old);
- newp.getStruct("base").setPtr("data", info);
+ public static void MAKEFWDEDGE(ST_Agedge_s new_, ST_Agedge_s old) {
+ ST_Agedge_s newp;
+ ST_Agedgeinfo_t info;
+ newp = (ST_Agedge_s) new_.getPtr();
+ info = (ST_Agedgeinfo_t) newp.base.data.castTo(ST_Agedgeinfo_t.class);
+ info.copyDataFrom(old.base.data.castTo(ST_Agedgeinfo_t.class).getStruct());
+ newp.copyDataFrom((__ptr__)old);
+ newp.base.setPtr("data", info);
agtail(newp, AGHEAD(old));
aghead(newp, AGTAIL(old));
ED_tail_port(newp, ED_head_port(old));
@@ -1267,11 +1353,13 @@ public class Macro {
// #define ZALLOC(size,ptr,type,osize) (ptr?
// (type*)zrealloc(ptr,size,sizeof(type),osize):(type*)zmalloc((size)*sizeof(type)))
- public static __ptr__ ZALLOC(int size, __ptr__ ptr, Class type, int osize) {
- if (ptr != null) {
- return Memory.realloc(ptr, JUtils.sizeof(type, size));
- }
- return (__ptr__) JUtils.sizeof(type, size).malloc();
+
+ public static ST_textspan_t.Array ZALLOC_ST_textspan_t(ST_textspan_t.Array old, int size) {
+ return old != null ? old.reallocJ(size) : new ST_textspan_t.Array(size);
+ }
+
+ public static ST_Agraph_s.Array ZALLOC_ST_Agraph_s(ST_Agraph_s.Array old, int size) {
+ return old != null ? old.reallocJ(size) : new ST_Agraph_s.Array(size);
}
public static final int MAXSHORT = 0x7fff;
@@ -1312,7 +1400,7 @@ public class Macro {
public static double MICROPOINT = .000001;
// #define APPROXEQPT(p,q,tol) (DIST2((p),(q)) < SQR(tol))
- public static boolean APPROXEQPT(__ptr__ p, __ptr__ q, double tol) {
+ public static boolean APPROXEQPT(ST_pointf p, ST_pointf q, double tol) {
return (DIST2((p), (q)) < SQR(tol));
}
@@ -1328,20 +1416,15 @@ public class Macro {
//
// #define DIST2(p,q) (LEN2(((p).x - (q).x),((p).y - (q).y)))
- public static double DIST2(__ptr__ p, __ptr__ q) {
- return (LEN2(((p).getDouble("x") - (q).getDouble("x")), ((p).getDouble("y") - (q).getDouble("y"))));
- }
-
- public static double DIST2(__struct__ p, __ptr__ q) {
- return (LEN2(((p).getDouble("x") - (q).getDouble("x")), ((p).getDouble("y") - (q).getDouble("y"))));
+ public static double DIST2(ST_pointf p, ST_pointf q) {
+ return (LEN2(((p).x - (q).x), ((p).y - (q).y)));
}
// #define DIST(p,q) (sqrt(DIST2((p),(q))))
// #define INSIDE(p,b) (BETWEEN((b).LL.x,(p).x,(b).UR.x) && BETWEEN((b).LL.y,(p).y,(b).UR.y))
- public static boolean INSIDE(__struct__ b, __struct__ p) {
- return (BETWEEN(b.getStruct("LL").getDouble("x"), p.getDouble("x"), b.getStruct("UR").getDouble("x")) && BETWEEN(
- b.getStruct("LL").getDouble("y"), p.getDouble("y"), b.getStruct("UR").getDouble("y")));
+ public static boolean INSIDE(ST_pointf p, ST_boxf b) {
+ return (BETWEEN(b.LL.x, p.x, b.UR.x) && BETWEEN(b.LL.y, p.y, b.UR.y));
}
public static final double M_PI = Math.PI;
@@ -1357,12 +1440,12 @@ public class Macro {
// (((a).x - (b).x) * ((a).x - (b).x)) + (((a).y - (b).y) * ((a).y - (b).y)) \
// )
- public static double DISTSQ(__struct__ a, __struct__ b) {
- return (((a).getDouble("x") - (b).getDouble("x")) * ((a).getDouble("x") - (b).getDouble("x")))
- + (((a).getDouble("y") - (b).getDouble("y")) * ((a).getDouble("y") - (b).getDouble("y")));
+ public static double DISTSQ(ST_pointf a, ST_pointf b) {
+ return (((a).x - (b).x) * ((a).x - (b).x))
+ + (((a).y - (b).y) * ((a).y - (b).y));
}
- public static void hackInitDimensionFromLabel(__struct__<pointf> size, String label) {
+ public static void hackInitDimensionFromLabel(ST_pointf size, String label) {
if (label.matches("_dim_\\d+_\\d+_")) {
Pattern p = Pattern.compile("_dim_(\\d+)_(\\d+)_");
Matcher m = p.matcher(label);
@@ -1376,7 +1459,7 @@ public class Macro {
JUtils.LOG2("Hacking dimension to width=" + ww + " height=" + hh);
}
}
-
+
public static CString createHackInitDimensionFromLabel(int width, int height) {
return new CString("_dim_" + width + "_" + height + "_");
}
diff --git a/src/smetana/core/Memory.java b/src/smetana/core/Memory.java
index c2aaf34..7d43fcd 100644
--- a/src/smetana/core/Memory.java
+++ b/src/smetana/core/Memory.java
@@ -35,18 +35,6 @@
*/
package smetana.core;
-import h.Agdesc_s;
-import h.Agiddisc_s;
-import h.Agmemdisc_s;
-import h.Agtag_s;
-import h.STStarArrayOfPointer;
-import h.ST_Agtag_s;
-import h._dtdisc_s;
-import h._dtmethod_s;
-import h.nlist_t;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarStar;
-
public class Memory {
public static __ptr__ malloc(Class theClass) {
@@ -59,20 +47,6 @@ public class Memory {
}
public static __ptr__ realloc(__ptr__ old, size_t size) {
- if (old instanceof StarArrayOfPtr) {
- // System.err.println("size="+size);
- // ((StarArrayOfPtr) old).realloc(((size_t_array_of_something) size).getNb());
- ((StarArrayOfPtr) old).realloc(size);
- return old;
- }
- if (old instanceof StarStar) {
- ((StarStar) old).realloc(((size_t_array_of_array_of_something_empty) size).getNb());
- return old;
- }
- if (old instanceof STStarArrayOfPointer) {
- ((STStarArrayOfPointer) old).realloc(size.getInternalNb());
- return old;
- }
throw new UnsupportedOperationException("" + old.getClass());
}
diff --git a/src/smetana/core/UnsupportedArrayOfPtr.java b/src/smetana/core/UnsupportedArrayOfPtr.java
index fb3b4fb..8d95b34 100644
--- a/src/smetana/core/UnsupportedArrayOfPtr.java
+++ b/src/smetana/core/UnsupportedArrayOfPtr.java
@@ -105,62 +105,14 @@ public class UnsupportedArrayOfPtr implements __array_of_ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public void setBoolean(String fieldName, boolean data) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public void setDouble(String fieldName, double data) {
throw new UnsupportedOperationException(getClass().toString());
}
- public int getInt(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public double getDouble(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public boolean getBoolean(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public CString getCString(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __struct__ getStruct(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __ptr__ getPtr(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public void setStruct(String fieldName, __struct__ newData) {
throw new UnsupportedOperationException(getClass().toString());
}
- public void setCString(String fieldName, CString newData) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -181,10 +133,6 @@ public class UnsupportedArrayOfPtr implements __array_of_ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public Object call(String fieldName, Object... args) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public __ptr__ castTo(Class dest) {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -225,14 +173,6 @@ public class UnsupportedArrayOfPtr implements __array_of_ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public CString getCString() {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public void setCString(CString value) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public __array_of_ptr__ plus(int delta) {
throw new UnsupportedOperationException(getClass().toString());
}
diff --git a/src/smetana/core/UnsupportedArrayOfStruct.java b/src/smetana/core/UnsupportedArrayOfStruct.java
index 0ea2f74..68d4e31 100644
--- a/src/smetana/core/UnsupportedArrayOfStruct.java
+++ b/src/smetana/core/UnsupportedArrayOfStruct.java
@@ -38,7 +38,7 @@ package smetana.core;
import smetana.core.amiga.Area;
-public class UnsupportedArrayOfStruct implements __array_of_struct__ {
+public class UnsupportedArrayOfStruct {
public String getUID36() {
throw new UnsupportedOperationException(getClass().toString());
@@ -56,18 +56,6 @@ public class UnsupportedArrayOfStruct implements __array_of_struct__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public int comparePointerInternal(__array_of_struct__ other) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_struct__ move(int delta) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_struct__ plus(int delta) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public Area getInternal(int idx) {
throw new UnsupportedOperationException(getClass().toString());
}
diff --git a/src/smetana/core/UnsupportedArrayOfStruct2.java b/src/smetana/core/UnsupportedArrayOfStruct2.java
new file mode 100644
index 0000000..8cf8636
--- /dev/null
+++ b/src/smetana/core/UnsupportedArrayOfStruct2.java
@@ -0,0 +1,153 @@
+/* ========================================================================
+ * PlantUML : a free UML diagram generator
+ * ========================================================================
+ *
+ * Project Info: http://plantuml.com
+ *
+ * If you like this project or if you find it useful, you can support us at:
+ *
+ * http://plantuml.com/patreon (only 1$ per month!)
+ * http://plantuml.com/paypal
+ *
+ * This file is part of Smetana.
+ * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
+ *
+ * (C) Copyright 2009-2017, Arnaud Roques
+ *
+ * This translation is distributed under the same Licence as the original C program.
+ *
+ * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
+ * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
+ *
+ * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
+ * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ *
+ * You may obtain a copy of the License at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package smetana.core;
+
+import smetana.core.amiga.Area;
+
+public abstract class UnsupportedArrayOfStruct2 {
+
+ public String getUID36() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void swap(int i, int j) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void realloc(int nb) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public __ptr__ asPtr() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public Area getInternal(int idx) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setInternalByIndex(int idx, Area value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void memcopyFrom(Area source) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public __ptr__ getPtr() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public __struct__ getStruct() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setStruct(__struct__ value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setDouble(String fieldName, double value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int getInt() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setInt(int value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
+ public int minus(__ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public double getDouble() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setDouble(double value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setPtr(__ptr__ value) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public __ptr__ setPtr(String fieldName, __ptr__ data) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setStruct(String fieldName, __struct__ data) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void setInt(String fieldName, int data) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public __ptr__ castTo(Class dest) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public Object addVirtualBytes(int bytes) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ final public __ptr__ unsupported() {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public int comparePointer(__ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public String getDebug(String fieldName) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void copyDataFrom(__ptr__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+ public void copyDataFrom(__struct__ other) {
+ throw new UnsupportedOperationException(getClass().toString());
+ }
+
+
+}
diff --git a/src/smetana/core/UnsupportedC.java b/src/smetana/core/UnsupportedC.java
index 2d508f5..68e293c 100644
--- a/src/smetana/core/UnsupportedC.java
+++ b/src/smetana/core/UnsupportedC.java
@@ -46,10 +46,6 @@ public class UnsupportedC implements __ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public void setCString(String fieldName, CString value) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public int minus(__ptr__ other) {
throw new UnsupportedOperationException(getClass().toString());
@@ -71,10 +67,6 @@ public class UnsupportedC implements __ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public __ptr__ getPtr(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public __struct__ getStruct() {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -83,46 +75,6 @@ public class UnsupportedC implements __ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- // public __array__ getArray(String fieldName) {
- // throw new UnsupportedOperationException(getClass().toString());
- // }
-
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __struct__ getStruct(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public boolean getBoolean(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public double getDouble(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public CString getCString(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public int getInt(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public __ptr__ setPtr(String fieldName, __ptr__ data) {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -135,10 +87,6 @@ public class UnsupportedC implements __ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public void setBoolean(String fieldName, boolean data) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public void setDouble(String fieldName, double data) {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -147,9 +95,6 @@ public class UnsupportedC implements __ptr__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public Object call(String name, Object... args) {
- throw new UnsupportedOperationException(getClass().toString());
- }
public Object addVirtualBytes(int bytes) {
throw new UnsupportedOperationException(getClass().toString());
diff --git a/src/smetana/core/UnsupportedSize_t.java b/src/smetana/core/UnsupportedSize_t.java
deleted file mode 100644
index eba48a6..0000000
--- a/src/smetana/core/UnsupportedSize_t.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-public class UnsupportedSize_t implements size_t {
-
- private final int size;
-
- public UnsupportedSize_t(int size) {
- this.size = size;
- }
-
- public Object malloc() {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
- public Object realloc(Object old) {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
- public size_t negate() {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
- public size_t plus(int length) {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
- public boolean isStrictPositive() {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
- public boolean isStrictNegative() {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
- final public boolean isZero() {
- return size == 0;
- }
-
- public int getInternalNb() {
- throw new UnsupportedOperationException(getClass().getName());
- }
-
-
-}
diff --git a/src/smetana/core/UnsupportedStarStruct.java b/src/smetana/core/UnsupportedStarStruct.java
index 0ec7b20..9c84eda 100644
--- a/src/smetana/core/UnsupportedStarStruct.java
+++ b/src/smetana/core/UnsupportedStarStruct.java
@@ -41,6 +41,13 @@ import smetana.core.amiga.StarStruct;
public class UnsupportedStarStruct implements StarStruct {
+ private static int CPT = 0;
+ public final int UID;
+
+ public UnsupportedStarStruct() {
+ this.UID = CPT++;
+ }
+
public __ptr__ unsupported() {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -105,66 +112,18 @@ public class UnsupportedStarStruct implements StarStruct {
throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
}
- public void setBoolean(String fieldName, boolean data) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public void setDouble(String fieldName, double data) {
throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
}
- public int getInt(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public double getDouble(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public boolean getBoolean(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public __ptr__ plus(int pointerMove) {
throw new UnsupportedOperationException(getClass().toString());
}
- public CString getCString(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public __struct__ getStruct(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
- public __ptr__ getPtr(String fieldName) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public void setStruct(String fieldName, __struct__ newData) {
throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
}
- public void setCString(String fieldName, CString newData) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
}
@@ -185,11 +144,8 @@ public class UnsupportedStarStruct implements StarStruct {
throw new UnsupportedOperationException(getClass().toString());
}
- public Object call(String fieldName, Object... args) {
- throw new UnsupportedOperationException(fieldName + " " + getClass().toString());
- }
-
public __ptr__ castTo(Class dest) {
+ System.err.println("I am " + toString() + " " + UID);
throw new UnsupportedOperationException(dest + " " + getClass().toString());
}
diff --git a/src/smetana/core/UnsupportedStruct.java b/src/smetana/core/UnsupportedStruct.java
index 45df65f..fa5ef3c 100644
--- a/src/smetana/core/UnsupportedStruct.java
+++ b/src/smetana/core/UnsupportedStruct.java
@@ -41,38 +41,10 @@ import smetana.core.amiga.StarStruct;
public class UnsupportedStruct implements __struct__ {
- public __ptr__ getPtr(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __struct__ getStruct(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public boolean getBoolean(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public double getDouble(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public CString getCString(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public int getInt(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public __ptr__ setPtr(String fieldName, __ptr__ value) {
throw new UnsupportedOperationException(getClass().toString());
}
- public void setCString(String fieldName, CString value) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public void setStruct(String fieldName, __struct__ value) {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -81,30 +53,10 @@ public class UnsupportedStruct implements __struct__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public void setBoolean(String fieldName, boolean value) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public void setDouble(String fieldName, double value) {
throw new UnsupportedOperationException(getClass().toString());
}
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
public void memcopyFrom(Area source) {
throw new UnsupportedOperationException(getClass().toString());
}
@@ -129,9 +81,5 @@ public class UnsupportedStruct implements __struct__ {
throw new UnsupportedOperationException(getClass().toString());
}
- public Object call(String name, Object... args) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
}
diff --git a/src/smetana/core/Z.java b/src/smetana/core/Z.java
index 78e67ef..85361c9 100644
--- a/src/smetana/core/Z.java
+++ b/src/smetana/core/Z.java
@@ -49,38 +49,37 @@ import gen.lib.common.arrows__c;
import gen.lib.common.shapes__c;
import gen.lib.dotgen.dotsplines__c;
import gen.lib.label.xlabels__c;
-import h.Agedge_s;
-import h.Agnode_s;
-import h.Agraph_s;
-import h.Agsubnode_s;
-import h.Agsym_s;
-import h.Agtag_s;
-import h.HDict_t;
import h.ST_Agdesc_s;
+import h.ST_Agedge_s;
import h.ST_Agiddisc_s;
import h.ST_Agmemdisc_s;
+import h.ST_Agnode_s;
+import h.ST_Agraph_s;
+import h.ST_Agsubnode_s;
+import h.ST_Agsym_s;
+import h.ST_Agtag_s;
+import h.ST_HDict_t;
+import h.ST_Pedge_t;
import h.ST_arrowname_t;
import h.ST_arrowtype_t;
+import h.ST_boxf;
+import h.ST_deque_t;
+import h.ST_dt_s;
import h.ST_dtdisc_s;
import h.ST_dtmethod_s;
import h.ST_elist;
import h.ST_nlist_t;
import h.ST_pointf;
+import h.ST_pointnlink_t;
+import h.ST_polygon_t;
import h.ST_port;
-import h._dt_s;
-import h._dtmethod_s;
-import h.arrowname_t;
-import h.arrowtype_t;
-import h.boxf;
-import h.deque_t;
-import h.pointf;
-import h.pointnlink_t;
-import h.polygon_t;
-import h.refstr_t;
-import h.shape_desc;
-import h.shape_functions;
-import h.splineInfo;
-import h.textfont_t;
+import h.ST_refstr_t;
+import h.ST_shape_desc;
+import h.ST_shape_functions;
+import h.ST_splineInfo;
+import h.ST_textfont_t;
+import h.ST_tna_t;
+import h.ST_triangle_t;
import java.util.HashMap;
import java.util.LinkedList;
@@ -93,18 +92,18 @@ public class Z {
public final Map<Integer, CString> all = new HashMap<Integer, CString>();
public final ST_dtmethod_s _Dttree = new ST_dtmethod_s();
- public final _dtmethod_s Dttree = _Dttree.amp();
+ public final ST_dtmethod_s Dttree = _Dttree;
public final ST_dtmethod_s _Dtobag = new ST_dtmethod_s();
- public final _dtmethod_s Dtobag = _Dtobag.amp();
+ public final ST_dtmethod_s Dtobag = _Dtobag;
public final ST_dtdisc_s AgDataDictDisc = new ST_dtdisc_s();
public final ST_Agdesc_s ProtoDesc = new ST_Agdesc_s();
- public Agraph_s ProtoGraph;
+ public ST_Agraph_s ProtoGraph;
- public final __struct__<Agtag_s> Tag = JUtils.from(Agtag_s.class);
+ public final ST_Agtag_s Tag = new ST_Agtag_s();
public final ST_dtdisc_s Ag_mainedge_seq_disc = new ST_dtdisc_s();
@@ -130,17 +129,17 @@ public class Z {
public final ST_dtdisc_s Hdisc = new ST_dtdisc_s();
- public _dt_s Refdict_default;
+ public ST_dt_s Refdict_default;
- public Agraph_s Ag_dictop_G;
+ public ST_Agraph_s Ag_dictop_G;
- public final __array_of_struct__ Arrowsynonyms = __array_of_struct_impl__.malloc(arrowname_t.class, 1);
+ public final ST_arrowname_t Arrowsynonyms[] = new ST_arrowname_t[] { new ST_arrowname_t() };
- public final __array_of_struct__ Arrownames = __array_of_struct_impl__.malloc(arrowname_t.class, 3);
+ public final ST_arrowname_t Arrownames[] = new ST_arrowname_t[] { new ST_arrowname_t(), new ST_arrowname_t(), new ST_arrowname_t() };
- public final __array_of_struct__ Arrowmods = __array_of_struct_impl__.malloc(arrowname_t.class, 1);
+ public final ST_arrowname_t Arrowmods[] = new ST_arrowname_t[] { new ST_arrowname_t() };
- public final __array_of_struct__ Arrowtypes = __array_of_struct_impl__.malloc(arrowtype_t.class, 9);
+ public final ST_arrowtype_t Arrowtypes[] = new ST_arrowtype_t[] { new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t(), new ST_arrowtype_t() };
public __ptr__ Show_boxes;
@@ -156,17 +155,17 @@ public class Z {
public double Initial_dist;
- public Agsym_s G_activepencolor, G_activefillcolor, G_selectedpencolor, G_selectedfillcolor, G_visitedpencolor,
+ public ST_Agsym_s G_activepencolor, G_activefillcolor, G_selectedpencolor, G_selectedfillcolor, G_visitedpencolor,
G_visitedfillcolor, G_deletedpencolor, G_deletedfillcolor, G_ordering, G_peripheries, G_penwidth,
G_gradientangle, G_margin;
- public Agsym_s N_height, N_width, N_shape, N_color, N_fillcolor, N_activepencolor, N_activefillcolor,
+ public ST_Agsym_s N_height, N_width, N_shape, N_color, N_fillcolor, N_activepencolor, N_activefillcolor,
N_selectedpencolor, N_selectedfillcolor, N_visitedpencolor, N_visitedfillcolor, N_deletedpencolor,
N_deletedfillcolor, N_fontsize, N_fontname, N_fontcolor, N_margin, N_label, N_xlabel, N_nojustify, N_style,
N_showboxes, N_sides, N_peripheries, N_ordering, N_orientation, N_skew, N_distortion, N_fixed,
N_imagescale, N_layer, N_group, N_comment, N_vertices, N_z, N_penwidth, N_gradientangle;
- public Agsym_s E_weight, E_minlen, E_color, E_fillcolor, E_activepencolor, E_activefillcolor, E_selectedpencolor,
+ public ST_Agsym_s E_weight, E_minlen, E_color, E_fillcolor, E_activepencolor, E_activefillcolor, E_selectedpencolor,
E_selectedfillcolor, E_visitedpencolor, E_visitedfillcolor, E_deletedpencolor, E_deletedfillcolor,
E_fontsize, E_fontname, E_fontcolor, E_label, E_xlabel, E_dir, E_style, E_decorate, E_showboxes, E_arrowsz,
E_constr, E_layer, E_comment, E_label_float, E_samehead, E_sametail, E_arrowhead, E_arrowtail, E_headlabel,
@@ -185,7 +184,7 @@ public class Z {
public final ST_elist Tree_edge = new ST_elist();
- public Agedge_s Enter;
+ public ST_Agedge_s Enter;
public int Low, Lim, Slack;
@@ -199,81 +198,81 @@ public class Z {
public int routeinit;
- public __ptr__ ps;
+ public ST_pointf.Array ps;
public int maxpn;
- public __ptr__ polypoints;
+ public ST_pointf.Array polypoints;
public int polypointn;
- public __ptr__ edges;
+ public ST_Pedge_t.Array edges;
public int edgen;
- public __array_of_struct__ boxes = __array_of_struct_impl__.malloc(boxf.class, 1000);
+ public final ST_boxf[] boxes = ST_boxf.malloc(1000);
public int MinQuit;
public double Convergence;
- public Agraph_s Root;
+ public ST_Agraph_s Root;
public int GlobalMinRank, GlobalMaxRank;
public boolean ReMincross;
- public __ptr__ TE_list;
+ public ST_Agedge_s.ArrayOfStar TE_list;
public __ptr__ TI_list;
- public Agnode_s Last_node_decomp;
- public Agnode_s Last_node_rank;
+ public ST_Agnode_s Last_node_decomp;
+ public ST_Agnode_s Last_node_rank;
public char Cmark;
public int trin, tril;
- public __ptr__ tris;
+ public ST_triangle_t.Array tris;
public int pnln, pnll;
- public pointnlink_t pnls;
- public __ptr__ pnlps;
+ public ST_pointnlink_t pnls[];
+ public ST_pointnlink_t pnlps[];
public final ST_port Center = new ST_port();
- public final __struct__<polygon_t> p_ellipse = JUtils.from(polygon_t.class);
+ public final ST_polygon_t p_ellipse = new ST_polygon_t();
- public final __struct__<polygon_t> p_box = JUtils.from(polygon_t.class);
+ public final ST_polygon_t p_box = new ST_polygon_t();
- public final __struct__<shape_functions> poly_fns = JUtils.from(shape_functions.class);
+ public final ST_shape_functions poly_fns = new ST_shape_functions();
- public __ptr__ tnas;
+ public ST_tna_t.Array tnas;
public int tnan;
- public final shape_desc Shapes[] = { __Shapes__("box", poly_fns.amp(), p_box.amp()),
- __Shapes__("ellipse", poly_fns.amp(), p_ellipse.amp()), __Shapes__(null, null, null) };
+ public final ST_shape_desc Shapes[] = { __Shapes__("box", poly_fns, p_box),
+ __Shapes__("ellipse", poly_fns, p_ellipse), __Shapes__(null, null, null) };
public final ST_dtdisc_s Ag_mainedge_id_disc = new ST_dtdisc_s();
- public final __struct__<deque_t> dq = JUtils.from(deque_t.class);
+ public final ST_deque_t dq = new ST_deque_t();
public final ST_Agdesc_s Agdirected = new ST_Agdesc_s();
- public final __struct__<splineInfo> sinfo = JUtils.from(splineInfo.class);
+ public final ST_splineInfo sinfo = new ST_splineInfo();
- public Agnode_s lastn; /* last node argument */
- public polygon_t poly;
+ public ST_Agnode_s lastn; /* last node argument */
+ public ST_polygon_t poly;
public int last, outp, sides;
- public final __struct__<pointf> O = JUtils.from(pointf.class); /* point (0,0) */
- public pointf vertex;
+ public final ST_pointf O = new ST_pointf(); /* point (0,0) */
+ public ST_pointf.Array vertex;
public double xsize, ysize, scalex, scaley, box_URx, box_URy;
- public final __struct__<textfont_t> tf = JUtils.from(textfont_t.class);
+ public final ST_textfont_t tf = new ST_textfont_t();
- public __ptr__ pointfs;
- public __ptr__ pointfs2;
+ public ST_pointf.Array pointfs;
+ public ST_pointf.Array pointfs2;
public int numpts;
public int numpts2;
@@ -282,19 +281,19 @@ public class Z {
public int ctr = 1;
- public __struct__<Agsubnode_s> template = JUtils.from(Agsubnode_s.class);
- public __struct__<Agnode_s> dummy = JUtils.from(Agnode_s.class);
+ public final ST_Agsubnode_s template = new ST_Agsubnode_s();
+ public final ST_Agnode_s dummy = new ST_Agnode_s();
- public Agraph_s G_ns;
- public Agraph_s G_decomp;
+ public ST_Agraph_s G_ns;
+ public ST_Agraph_s G_decomp;
public int opl;
public int opn_route;
public int opn_shortest;
- public __ptr__ ops_route;
- public __ptr__ ops_shortest;
+ public ST_pointf.Array ops_route;
+ public ST_pointf.Array ops_shortest;
public static Z z() {
return instances2.get().peekFirst();
@@ -313,8 +312,8 @@ public class Z {
instances2.get().removeFirst();
}
- private shape_desc __Shapes__(String s, shape_functions shape_functions, polygon_t polygon) {
- shape_desc result = (shape_desc) Memory.malloc(shape_desc.class);
+ private ST_shape_desc __Shapes__(String s, ST_shape_functions shape_functions, ST_polygon_t polygon) {
+ ST_shape_desc result = new ST_shape_desc();
result.setPtr("name", s == null ? null : new CString(s));
result.setPtr("fns", shape_functions);
result.setPtr("polygon", polygon);
@@ -344,9 +343,9 @@ public class Z {
_Dtobag.searchf = function(dttree__c.class, "dttree");
_Dtobag.type = 0000010;
- AgDataDictDisc.key = OFFSET.create(Agsym_s.class, "name").toInt();
+ AgDataDictDisc.key = OFFSET.create(ST_Agsym_s.class, "name").toInt();
AgDataDictDisc.size = -1;
- AgDataDictDisc.link = OFFSET.create(Agsym_s.class, "link").toInt();
+ AgDataDictDisc.link = OFFSET.create(ST_Agsym_s.class, "link").toInt();
AgDataDictDisc.makef = null;
AgDataDictDisc.freef = function(attr__c.class, "freesym");
AgDataDictDisc.comparf = null;
@@ -361,7 +360,7 @@ public class Z {
Ag_mainedge_seq_disc.key = 0;
Ag_mainedge_seq_disc.size = 0;
- Ag_mainedge_seq_disc.link = OFFSET.create(Agedge_s.class, "seq_link").toInt(); // seq_link is the third
+ Ag_mainedge_seq_disc.link = OFFSET.create(ST_Agedge_s.class, "seq_link").toInt(); // seq_link is the third
// field in Agedge_t
Ag_mainedge_seq_disc.makef = null;
Ag_mainedge_seq_disc.freef = null;
@@ -392,7 +391,7 @@ public class Z {
Ag_subgraph_id_disc.key = 0;
Ag_subgraph_id_disc.size = 0;
- Ag_subgraph_id_disc.link = OFFSET.create(Agraph_s.class, "link").toInt(); // link is the third field in
+ Ag_subgraph_id_disc.link = OFFSET.create(ST_Agraph_s.class, "link").toInt(); // link is the third field in
// Agraph_t
Ag_subgraph_id_disc.makef = null;
Ag_subgraph_id_disc.freef = null;
@@ -417,7 +416,7 @@ public class Z {
Ag_subnode_id_disc.key = 0;
Ag_subnode_id_disc.size = 0;
- Ag_subnode_id_disc.link = OFFSET.create(Agsubnode_s.class, "id_link").toInt(); // id_link is the second
+ Ag_subnode_id_disc.link = OFFSET.create(ST_Agsubnode_s.class, "id_link").toInt(); // id_link is the second
// field in Agsubnode_t
Ag_subnode_id_disc.makef = null;
Ag_subnode_id_disc.freef = null;
@@ -428,7 +427,7 @@ public class Z {
Ag_subnode_seq_disc.key = 0;
Ag_subnode_seq_disc.size = 0;
- Ag_subnode_seq_disc.link = OFFSET.create(Agsubnode_s.class, "seq_link").toInt(); // link is the first
+ Ag_subnode_seq_disc.link = OFFSET.create(ST_Agsubnode_s.class, "seq_link").toInt(); // link is the first
// field in
// Agsubnode_t
Ag_subnode_seq_disc.makef = null;
@@ -438,7 +437,7 @@ public class Z {
Ag_subnode_seq_disc.memoryf = function(utils__c.class, "agdictobjmem");
Ag_subnode_seq_disc.eventf = null;
- Refstrdisc.key = OFFSET.create(refstr_t.class, "s").toInt(); // *s is the third field in refstr_t
+ Refstrdisc.key = OFFSET.create(ST_refstr_t.class, "s").toInt(); // *s is the third field in refstr_t
Refstrdisc.size = -1;
Refstrdisc.link = 0;
Refstrdisc.makef = null;
@@ -448,7 +447,7 @@ public class Z {
Refstrdisc.memoryf = function(utils__c.class, "agdictobjmem");
Refstrdisc.eventf = null;
- Hdisc.key = OFFSET.create(HDict_t.class, "key").toInt();
+ Hdisc.key = OFFSET.create(ST_HDict_t.class, "key").toInt();
Hdisc.size = 4;
Hdisc.link = -1;
Hdisc.makef = null;
@@ -458,23 +457,23 @@ public class Z {
Hdisc.memoryf = null;
Hdisc.eventf = null;
- Arrowsynonyms.plus(0).setStruct(create_arrowname_t(null, 0));
+ Arrowsynonyms[0].___(create_arrowname_t(null, 0));
- Arrownames.plus(0).setStruct(create_arrowname_t("normal", 1));
- Arrownames.plus(1).setStruct(create_arrowname_t("none", 8));
- Arrownames.plus(2).setStruct(create_arrowname_t(null, 0));
+ Arrownames[0].___(create_arrowname_t("normal", 1));
+ Arrownames[1].___(create_arrowname_t("none", 8));
+ Arrownames[2].___(create_arrowname_t(null, 0));
- Arrowmods.plus(0).setStruct(create_arrowname_t(null, 0));
+ Arrowmods[0].___(create_arrowname_t(null, 0));
- Arrowtypes.plus(0).setStruct(createArrowtypes(1, 1.0, function(arrows__c.class, "arrow_type_normal")));
- Arrowtypes.plus(1).setStruct(createArrowtypes(2, 1.0, function(arrows__c.class, "arrow_type_crow")));
- Arrowtypes.plus(2).setStruct(createArrowtypes(3, 0.5, function(arrows__c.class, "arrow_type_tee")));
- Arrowtypes.plus(3).setStruct(createArrowtypes(4, 1.0, function(arrows__c.class, "arrow_type_box")));
- Arrowtypes.plus(4).setStruct(createArrowtypes(5, 1.2, function(arrows__c.class, "arrow_type_diamond")));
- Arrowtypes.plus(5).setStruct(createArrowtypes(6, 0.8, function(arrows__c.class, "arrow_type_dot")));
- Arrowtypes.plus(6).setStruct(createArrowtypes(7, 1.0, function(arrows__c.class, "arrow_type_curve")));
- Arrowtypes.plus(7).setStruct(createArrowtypes(8, 0.5, function(arrows__c.class, "arrow_type_gap")));
- Arrowtypes.plus(8).setStruct(createArrowtypes(0, 0.0, null));
+ Arrowtypes[0].___(createArrowtypes(1, 1.0, function(arrows__c.class, "arrow_type_normal")));
+ Arrowtypes[1].___(createArrowtypes(2, 1.0, function(arrows__c.class, "arrow_type_crow")));
+ Arrowtypes[2].___(createArrowtypes(3, 0.5, function(arrows__c.class, "arrow_type_tee")));
+ Arrowtypes[3].___(createArrowtypes(4, 1.0, function(arrows__c.class, "arrow_type_box")));
+ Arrowtypes[4].___(createArrowtypes(5, 1.2, function(arrows__c.class, "arrow_type_diamond")));
+ Arrowtypes[5].___(createArrowtypes(6, 0.8, function(arrows__c.class, "arrow_type_dot")));
+ Arrowtypes[6].___(createArrowtypes(7, 1.0, function(arrows__c.class, "arrow_type_curve")));
+ Arrowtypes[7].___(createArrowtypes(8, 0.5, function(arrows__c.class, "arrow_type_gap")));
+ Arrowtypes[8].___(createArrowtypes(0, 0.0, null));
Center.p.x = 0;
Center.p.y = 0;
@@ -510,7 +509,7 @@ public class Z {
Ag_mainedge_id_disc.key = 0;
Ag_mainedge_id_disc.size = 0;
- Ag_mainedge_id_disc.link = OFFSET.create(Agedge_s.class, "id_link").toInt(); // id_link is the second
+ Ag_mainedge_id_disc.link = OFFSET.create(ST_Agedge_s.class, "id_link").toInt(); // id_link is the second
// field in Agedge_t
Ag_mainedge_id_disc.makef = null;
Ag_mainedge_id_disc.freef = null;
diff --git a/src/smetana/core/__array_of_cstring__.java b/src/smetana/core/__array_of_cstring__.java
index 17e0142..d14c465 100644
--- a/src/smetana/core/__array_of_cstring__.java
+++ b/src/smetana/core/__array_of_cstring__.java
@@ -58,8 +58,5 @@ public interface __array_of_cstring__ extends Area {
public void memcopyFrom(Area source);
- public CString getCString();
-
- public void setCString(CString value);
}
diff --git a/src/smetana/core/__array_of_cstring_impl__.java b/src/smetana/core/__array_of_cstring_impl__.java
index 1ce5497..095ca5d 100644
--- a/src/smetana/core/__array_of_cstring_impl__.java
+++ b/src/smetana/core/__array_of_cstring_impl__.java
@@ -41,14 +41,14 @@ import java.util.List;
import smetana.core.amiga.Area;
import smetana.core.amiga.BuilderArea;
-import smetana.core.amiga.StarStructImpl;
+import smetana.core.amiga.Counter;
public class __array_of_cstring_impl__ implements __array_of_cstring__ {
private final List<Area> data;
private final int currentPos;
- private final int UID = StarStructImpl.CPT++;
+ private final int UID = Counter.CPT++;
public String getUID36() {
return Integer.toString(UID, 36);
@@ -145,12 +145,4 @@ public class __array_of_cstring_impl__ implements __array_of_cstring__ {
//
- public CString getCString() {
- return (CString) getInternal(0);
- }
-
- public void setCString(CString value) {
- setInternalByIndex(0, value);
- }
-
}
diff --git a/src/smetana/core/__array_of_double__.java b/src/smetana/core/__array_of_double__.java
index 36ff9ff..0afe8ed 100644
--- a/src/smetana/core/__array_of_double__.java
+++ b/src/smetana/core/__array_of_double__.java
@@ -42,15 +42,14 @@ import java.util.List;
import smetana.core.amiga.Area;
import smetana.core.amiga.AreaInt;
import smetana.core.amiga.BuilderArea;
-import smetana.core.amiga.StarStruct;
-import smetana.core.amiga.StarStructImpl;
+import smetana.core.amiga.Counter;
public class __array_of_double__ implements Area {
private final List<Area> data;
private final int currentPos;
- private final int UID = StarStructImpl.CPT++;
+ private final int UID = Counter.CPT++;
public String getUID36() {
return Integer.toString(UID, 36);
diff --git a/src/smetana/core/__array_of_integer_impl__.java b/src/smetana/core/__array_of_integer_impl__.java
index 1d9a762..29ebc39 100644
--- a/src/smetana/core/__array_of_integer_impl__.java
+++ b/src/smetana/core/__array_of_integer_impl__.java
@@ -42,14 +42,14 @@ import java.util.List;
import smetana.core.amiga.Area;
import smetana.core.amiga.AreaInt;
import smetana.core.amiga.BuilderArea;
-import smetana.core.amiga.StarStructImpl;
+import smetana.core.amiga.Counter;
public class __array_of_integer_impl__ implements __array_of_integer__ {
private final List<Area> data;
private final int currentPos;
- private final int UID = StarStructImpl.CPT++;
+ private final int UID = Counter.CPT++;
public String getUID36() {
return Integer.toString(UID, 36);
diff --git a/src/smetana/core/__array_of_ptr__.java b/src/smetana/core/__array_of_ptr__.java
index dd7db2b..d2b227f 100644
--- a/src/smetana/core/__array_of_ptr__.java
+++ b/src/smetana/core/__array_of_ptr__.java
@@ -64,24 +64,16 @@ public interface __array_of_ptr__ extends Area {
public int getInt();
- public CString getCString();
-
public __ptr__ getPtr();
public __struct__ getStruct();
public void setInt(int value);
- public void setCString(CString value);
-
public void setPtr(__ptr__ value);
public void setStruct(__struct__ value);
- public double getDouble(String fieldName);
-
public void setDouble(String fieldName, double value);
- public __struct__ getStruct(String fieldName);
-
}
diff --git a/src/smetana/core/__array_of_ptr_impl__.java b/src/smetana/core/__array_of_ptr_impl__.java
deleted file mode 100644
index 3c562de..0000000
--- a/src/smetana/core/__array_of_ptr_impl__.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import h.ST_boxf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import smetana.core.amiga.Area;
-import smetana.core.amiga.AreaInt;
-import smetana.core.amiga.BuilderArea;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarStruct;
-import smetana.core.amiga.StarStructImpl;
-
-public class __array_of_ptr_impl__ implements __array_of_ptr__ {
-
- private final List<Area> data;
- private final int currentPos;
- private final BuilderArea builder;
-
- private final int UID = StarStructImpl.CPT++;
-
- public String getUID36() {
- return Integer.toString(UID, 36);
- }
-
- public void memcopyFrom(Area source) {
- __array_of_ptr_impl__ other = (__array_of_ptr_impl__) source;
- System.err.println("sizeMe=" + this.data.size());
- System.err.println("sizeOt=" + other.data.size());
-
- throw new UnsupportedOperationException();
- }
-
- public void swap(int i, int j) {
- Area e1 = data.get(i);
- Area e2 = data.get(j);
- data.set(i, e2);
- data.set(j, e1);
- }
-
- @Override
- public String toString() {
- if (data.get(0) != null) {
- return "__array__ " + getUID36() + " " + currentPos + "/" + data.size() + " " + data.get(0).toString();
- }
- return "__array__ " + getUID36() + " " + currentPos + "/" + data.size();
- }
-
- public void realloc(int nb) {
- while (data.size() < nb + currentPos) {
- data.add(builder.createArea());
- }
- }
-
- public void realloc(size_t nb) {
- // ((StarArrayOfPtr) old).realloc(((size_t_array_of_something) size).getNb());
- if (nb instanceof size_t_array_of_something) {
- this.realloc(((size_t_array_of_something) nb).getNb());
- return;
- }
- throw new UnsupportedOperationException();
- }
-
- public __ptr__ asPtr() {
- return new StarArrayOfPtr(this);
- }
-
- public int comparePointerInternal(__array_of_ptr__ other2) {
- final __array_of_ptr_impl__ other = (__array_of_ptr_impl__) other2;
- if (this.data != other.data) {
- throw new IllegalArgumentException();
- }
- return this.currentPos - other.currentPos;
- }
-
- public static __array_of_ptr__ malloc_allocated(final Class cl, int nb) {
- return new __array_of_ptr_impl__(nb, new BuilderArea() {
- public Area createArea() {
- return JUtils.create(cl, null);
- }
- });
- }
-
- public static __array_of_ptr__ malloc_empty(int nb) {
- return new __array_of_ptr_impl__(nb, new BuilderArea() {
- public Area createArea() {
- return null;
- }
- });
- }
-
- private __array_of_ptr_impl__(List<Area> data, int currentPos, BuilderArea builderArea) {
- this.data = data;
- this.currentPos = currentPos;
- this.builder = builderArea;
- check();
- }
-
- private __array_of_ptr_impl__(int size, BuilderArea builder) {
- this.data = new ArrayList<Area>();
- this.builder = builder;
- this.currentPos = 0;
- for (int i = 0; i < size; i++) {
- data.add(builder.createArea());
- }
- check();
- }
-
- private void check() {
- if (getUID36().equals("194")) {
- JUtils.LOG("It's me");
- }
- }
-
- public __array_of_ptr_impl__ move(int delta) {
- return new __array_of_ptr_impl__(data, currentPos + delta, builder);
- }
-
- public __array_of_ptr_impl__ plus(int delta) {
- return move(delta);
- }
-
- public Area getInternal(int idx) {
- return data.get(idx + currentPos);
- }
-
- public void setInternalByIndex(int idx, Area value) {
- if (value == this) {
- throw new IllegalArgumentException();
- }
- if (value instanceof __array_of_ptr_impl__) {
- throw new IllegalArgumentException();
- }
- data.set(idx + currentPos, value);
- }
-
- //
-
- public int getInt() {
- return ((AreaInt) getInternal(0)).getInternal();
- }
-
- public CString getCString() {
- return (CString) getInternal(0);
- }
-
- public __ptr__ getPtr() {
- if (getInternal(0) instanceof __struct__) {
- return ((__struct__) getInternal(0)).amp();
- }
- return (__ptr__) getInternal(0);
- }
-
- public __struct__ getStruct() {
- if (getInternal(0) instanceof __ptr__) {
- return getPtr().getStruct();
- }
- return (__struct__) getInternal(0);
- }
-
- public void setInt(int value) {
- ((AreaInt) getInternal(0)).setInternal(value);
- }
-
- public void setCString(CString value) {
- setInternalByIndex(0, value);
- }
-
- public void setPtr(__ptr__ value) {
- setInternalByIndex(0, (Area) value);
- }
-
- public void setStruct(__struct__ value) {
- final Area area = getInternal(0);
- if (area instanceof StarStruct) {
- ((StarStruct) area).copyDataFrom(value);
- } else if (area instanceof StarArrayOfPtr) {
- ((StarArrayOfPtr) area).copyDataFrom(value);
- } else {
- ((__struct__) area).___(value);
- }
- }
-
- public double getDouble(String fieldName) {
- final Area tmp1 = getInternal(0);
- return ((StarStruct) tmp1).getDouble(fieldName);
- }
-
- public void setDouble(String fieldName, double value) {
- final Area tmp1 = getInternal(0);
- if (tmp1 instanceof __struct__) {
- ((__struct__) tmp1).setDouble(fieldName, value);
- return;
- }
- ((StarStruct) tmp1).setDouble(fieldName, value);
- }
-
- public __struct__ getStruct(String fieldName) {
- final StarStruct TMP = (StarStruct) getInternal(0);
- if (TMP instanceof ST_boxf) {
- return ((ST_boxf) TMP).getStructInternal(fieldName);
- }
- return TMP.getStruct(fieldName);
- }
-
-}
diff --git a/src/smetana/core/__array_of_struct__.java b/src/smetana/core/__array_of_struct__.java
deleted file mode 100644
index ab4d1dc..0000000
--- a/src/smetana/core/__array_of_struct__.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import smetana.core.amiga.Area;
-
-public interface __array_of_struct__ extends Area {
-
- public String getUID36();
-
- public void swap(int i, int j);
-
- public void realloc(int nb);
-
- public __ptr__ asPtr();
-
- public int comparePointerInternal(__array_of_struct__ other);
-
- public __array_of_struct__ move(int delta);
-
- public __array_of_struct__ plus(int delta);
-
- public Area getInternal(int idx);
-
- public void setInternalByIndex(int idx, Area value);
-
- public void memcopyFrom(Area source);
-
- public __ptr__ getPtr();
-
- public __struct__ getStruct();
-
- public void setStruct(__struct__ value);
-
- public double getDouble(String fieldName);
-
- public void setDouble(String fieldName, double value);
-
- public __struct__ getStruct(String fieldName);
-
-}
diff --git a/src/smetana/core/__array_of_struct_impl__.java b/src/smetana/core/__array_of_struct_impl__.java
deleted file mode 100644
index 50f82b6..0000000
--- a/src/smetana/core/__array_of_struct_impl__.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import smetana.core.amiga.Area;
-import smetana.core.amiga.BuilderArea;
-import smetana.core.amiga.StarArrayOfStruct;
-import smetana.core.amiga.StarStruct;
-import smetana.core.amiga.StarStructImpl;
-
-public class __array_of_struct_impl__ implements __array_of_struct__ {
-
- private final List<Area> data;
- private final int currentPos;
-
- private final int UID = StarStructImpl.CPT++;
-
- public String getUID36() {
- return Integer.toString(UID, 36);
- }
-
- public void swap(int i, int j) {
- Area e1 = data.get(i);
- Area e2 = data.get(j);
- data.set(i, e2);
- data.set(j, e1);
- }
-
- @Override
- public String toString() {
- if (data.get(0) != null) {
- return "__array_of_struct__ " + getUID36() + " " + currentPos + "/" + data.size() + " "
- + data.get(0).toString();
- }
- return "__array_of_struct__ " + getUID36() + " " + currentPos + "/" + data.size();
- }
-
- public void realloc(int nb) {
- while (data.size() < nb + currentPos) {
- data.add(null);
- }
- }
-
- public __ptr__ asPtr() {
- return new StarArrayOfStruct(this);
- }
-
- public int comparePointerInternal(__array_of_struct__ other) {
- if (this.data != ((__array_of_struct_impl__) other).data) {
- throw new IllegalArgumentException();
- }
- return this.currentPos - ((__array_of_struct_impl__) other).currentPos;
- }
-
- public static __array_of_struct_impl__ malloc(final Class cl, int nb) {
- return new __array_of_struct_impl__(nb, new BuilderArea() {
- public Area createArea() {
- return JUtils.from(cl);
- }
- });
- }
-
- private __array_of_struct_impl__(List<Area> data, int currentPos) {
- this.data = data;
- this.currentPos = currentPos;
- check();
- }
-
- public __array_of_struct_impl__(int size, BuilderArea builder) {
- this.data = new ArrayList<Area>();
- this.currentPos = 0;
- for (int i = 0; i < size; i++) {
- final Area tmp = builder.createArea();
- data.add(tmp);
- }
- check();
- }
-
- private void check() {
- if (getUID36().equals("194")) {
- JUtils.LOG("It's me");
- }
- }
-
- public __array_of_struct_impl__ move(int delta) {
- return new __array_of_struct_impl__(data, currentPos + delta);
- }
-
- public __array_of_struct_impl__ plus(int delta) {
- return move(delta);
- }
-
- public Area getInternal(int idx) {
- return data.get(idx + currentPos);
- }
-
- public void setInternalByIndex(int idx, Area value) {
- if (value == this) {
- throw new IllegalArgumentException();
- }
- if (value instanceof __array_of_struct_impl__) {
- throw new IllegalArgumentException();
- }
- data.set(idx + currentPos, value);
- }
-
- public void memcopyFrom(Area source) {
- throw new UnsupportedOperationException();
- }
-
- //
-
- public __ptr__ getPtr() {
- return ((__struct__) getInternal(0)).amp();
- }
-
- public __struct__ getStruct() {
- return (__struct__) getInternal(0);
- }
-
- public void setStruct(__struct__ value) {
- final Area area = getInternal(0);
- ((__struct__) area).___(value);
- }
-
- public double getDouble(String fieldName) {
- final Area tmp1 = getInternal(0);
- return ((__struct__) tmp1).getDouble(fieldName);
- }
-
- public void setDouble(String fieldName, double value) {
- final Area tmp1 = getInternal(0);
- ((__struct__) tmp1).setDouble(fieldName, value);
- }
-
- public __struct__ getStruct(String fieldName) {
- return ((StarStruct) getInternal(0)).getStruct(fieldName);
- }
-
-}
diff --git a/src/smetana/core/__c__fields.java b/src/smetana/core/__c__fields.java
index 1db9d65..1b7856f 100644
--- a/src/smetana/core/__c__fields.java
+++ b/src/smetana/core/__c__fields.java
@@ -40,25 +40,11 @@ package smetana.core;
public interface __c__fields {
- public __ptr__ getPtr(String fieldName);
- public __struct__ getStruct(String fieldName);
- public boolean getBoolean(String fieldName);
- public double getDouble(String fieldName);
- public CString getCString(String fieldName);
- public int getInt(String fieldName);
-
public __ptr__ setPtr(String fieldName, __ptr__ value);
- public void setCString(String fieldName, CString value);
+
public void setStruct(String fieldName, __struct__ value);
public void setInt(String fieldName, int value);
- public void setBoolean(String fieldName, boolean value);
public void setDouble(String fieldName, double value);
- // public __array__ getArray(String fieldName);
- public __array_of_integer__ getArrayOfInteger(String fieldName);
- public __array_of_struct__ getArrayOfStruct(String fieldName);
- public __array_of_ptr__ getArrayOfPtr(String fieldName);
- public __array_of_cstring__ getArrayOfCString(String fieldName);
-
}
diff --git a/src/smetana/core/__ptr__.java b/src/smetana/core/__ptr__.java
index f6b0b76..e172a68 100644
--- a/src/smetana/core/__ptr__.java
+++ b/src/smetana/core/__ptr__.java
@@ -61,7 +61,5 @@ public interface __ptr__ extends __c__fields {
public __struct__ getStruct();
public void setStruct(__struct__ value);
- public Object call(String name, Object... args);
-
}
diff --git a/src/smetana/core/__struct__.java b/src/smetana/core/__struct__.java
index 5ce2d4b..8fa991f 100644
--- a/src/smetana/core/__struct__.java
+++ b/src/smetana/core/__struct__.java
@@ -51,6 +51,4 @@ public interface __struct__<C extends __ptr__> extends __c__fields, Area {
public StarStruct getInternalData();
- public Object call(String name, Object... args);
-
}
diff --git a/src/smetana/core/__struct_impl__.java b/src/smetana/core/__struct_impl__.java
deleted file mode 100644
index 1f6c598..0000000
--- a/src/smetana/core/__struct_impl__.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import smetana.core.amiga.Area;
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarArrayOfStruct;
-import smetana.core.amiga.StarStruct;
-
-public class __struct_impl__<C extends __ptr__> implements __struct__<C> {
-
- final private StarStruct data;
-
- public __struct_impl__(Class<C> cl) {
- this.data = (StarStruct) Memory.malloc(cl);
- }
-
- @Override
- public String toString() {
- return super.toString() + " " + data.getUID36();
- }
-
- public __struct_impl__(StarStruct data) {
- this.data = data;
- }
-
- public __struct_impl__<C> copy() {
- final __struct_impl__<C> result = new __struct_impl__(data.getRealClass());
- if (result.data.getRealClass() != this.data.getRealClass()) {
- throw new IllegalStateException();
- }
- result.___(this);
- return result;
- }
-
- public void ___(__struct__<C> other) {
- data.copyDataFrom(other);
- }
-
- public void ____(__ptr__ other) {
- if (other instanceof StarArrayOfPtr) {
- ___(((StarArrayOfPtr) other).getStruct());
- return;
- }
- if (other instanceof StarStruct) {
- memcopyFrom((StarStruct) other);
- return;
- }
- if (other instanceof StarArrayOfStruct) {
- StarArrayOfStruct array = (StarArrayOfStruct) other;
- memcopyFrom(array.getStruct());
- return;
- }
- throw new UnsupportedOperationException();
- }
-
- public void memcopyFrom(Area source) {
- data.memcopyFrom(source);
- }
-
- public StarStruct amp() {
- return data;
- }
-
- public StarStruct getInternalData() {
- return data;
- }
-
- public __ptr__ getPtr(String fieldName) {
- return data.getPtr(fieldName);
- }
-
- public __struct__ getStruct(String fieldName) {
- return data.getStruct(fieldName);
- }
-
- public boolean getBoolean(String fieldName) {
- return data.getBoolean(fieldName);
- }
-
- public double getDouble(String fieldName) {
- return data.getDouble(fieldName);
- }
-
- public void setCString(String fieldName, CString value) {
- data.setCString(fieldName, value);
- }
-
-
- public CString getCString(String fieldName) {
- return data.getCString(fieldName);
- }
-
- public int getInt(String fieldName) {
- return data.getInt(fieldName);
- }
-
- public __ptr__ setPtr(String fieldName, __ptr__ value) {
- return data.setPtr(fieldName, value);
- }
-
- public void setStruct(String fieldName, __struct__ value) {
- data.setStruct(fieldName, value);
- }
-
- public void setDouble(String fieldName, double value) {
- data.setDouble(fieldName, value);
- }
-
- public void setInt(String fieldName, int value) {
- data.setInt(fieldName, value);
- }
-
- public void setBoolean(String fieldName, boolean value) {
- data.setBoolean(fieldName, value);
- }
-
- public Object call(String name, Object... args) {
- return data.call(name, args);
- }
-
-// public __array__ getArray(String fieldName) {
-// return data.getArray(fieldName);
-// }
-
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- throw new UnsupportedOperationException();
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- return data.getArrayOfStruct(fieldName);
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- return data.getArrayOfPtr(fieldName);
- }
-
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- throw new UnsupportedOperationException();
- }
-
-
-}
diff --git a/src/smetana/core/amiga/AreaInt.java b/src/smetana/core/amiga/AreaInt.java
index 9224e1e..fd0f387 100644
--- a/src/smetana/core/amiga/AreaInt.java
+++ b/src/smetana/core/amiga/AreaInt.java
@@ -40,7 +40,7 @@ public class AreaInt implements Area {
private int data = 0;
- private final int UID = StarStructImpl.CPT++;
+ private final int UID = Counter.CPT++;
private String getUID36() {
return Integer.toString(UID, 36);
diff --git a/src/smetana/core/amiga/BucketToAreaFactory.java b/src/smetana/core/amiga/BucketToAreaFactory.java
index e381116..508aa64 100644
--- a/src/smetana/core/amiga/BucketToAreaFactory.java
+++ b/src/smetana/core/amiga/BucketToAreaFactory.java
@@ -37,124 +37,11 @@
package smetana.core.amiga;
import smetana.core.Bucket;
-import smetana.core.CType;
-import smetana.core.JUtils;
-import smetana.core.__array_of_double__;
-import smetana.core.__array_of_integer_impl__;
-import smetana.core.__array_of_ptr_impl__;
-import smetana.core.__array_of_struct_impl__;
public class BucketToAreaFactory {
public static Area createArea(Bucket bucket, StarStruct parent) {
- if (bucket.ctype.getArrayLength() != 0) {
- return createAreaArray(bucket, bucket.ctype.getArrayLength());
- }
- if (bucket.ctype.functionPointer()) {
- // return PointerToNull.nullPointerTo();
- // return new AreaFunctionPointer();
- return null;
- }
- if (bucket.ctype.isIntStar()) {
- return null;
- }
- if (bucket.ctype.isDoubleStar()) {
- return null;
- }
- if (bucket.ctype.isVoidStar()) {
- return null;
- // return PointerToNull.nullPointerTo();
- // return new AreaVoidStar();
- }
- if (bucket.ctype.containsStar()) {
- final String type = bucket.ctype.getType();
- if (type.matches("\\w+\\*")) {
- final Class theClass = CType.getClassFrom(type.substring(0, type.length() - 1));
- JUtils.LOG("theClass=" + theClass);
- // return PointerToNull.nullPointerTo();
- return null;
- }
- throw new UnsupportedOperationException(bucket.toString());
- }
- if (bucket.ctype.isEnum()) {
- return new AreaInt();
- }
- if (bucket.ctype.isPrimitive()) {
- if (bucket.ctype.isInteger()) {
- return new AreaInt();
- }
- if (bucket.ctype.isChar()) {
- return new AreaInt();
- }
- if (bucket.ctype.isShort()) {
- return new AreaInt();
- }
- if (bucket.ctype.isLong()) {
- return new AreaInt();
- }
- if (bucket.ctype.isBoolean()) {
- return new AreaInt();
- }
- if (bucket.ctype.isDoubleOrFloat()) {
- return new AreaDouble();
- }
- throw new UnsupportedOperationException();
- }
- if (bucket.inlineStruct()) {
- final Class theClass = bucket.ctype.getTypeClass();
- return JUtils.create(theClass, parent);
- }
- if (bucket.ctype.isArrayOfCString()) {
- return null;
- }
- if (bucket.ctype.isCString()) {
- // return new AreaCString();
- // return PointerToNull.nullPointerTo();
- return null;
- }
- final Class theClass = bucket.ctype.getTypeClass();
- if (theClass != null) {
- return null;
- // return PointerToNull.nullPointerTo();
- }
- JUtils.LOG("BucketToAreaFactory:: theClass = " + theClass);
- JUtils.LOG("BucketToAreaFactory:: bucket=" + bucket);
- JUtils.LOG("BucketToAreaFactory:: bucket.ctype=" + bucket.ctype);
throw new UnsupportedOperationException();
}
- private static Area createAreaArray(Bucket bucket, int arrayLength) {
- JUtils.LOG("BucketToAreaFactory:createAreaArray: bucket=" + bucket);
- JUtils.LOG("BucketToAreaFactory:createAreaArray: arrayLength=" + arrayLength);
- JUtils.LOG("BucketToAreaFactory:createAreaArray: type=" + bucket.ctype);
- if (bucket.ctype.getType().matches("char \\w+\\[\\d+\\]")) {
- // Array of char
- return __array_of_integer_impl__.mallocInteger(arrayLength);
- }
- if (bucket.ctype.getType().matches("int \\w+\\[\\d+\\]")) {
- // Array of int
- return __array_of_integer_impl__.mallocInteger(arrayLength);
- }
- if (bucket.ctype.getType().matches("double \\w+\\[\\d+\\]")) {
- // Array of double
- return __array_of_double__.mallocDouble(arrayLength);
- }
- if (bucket.ctype.getType().matches("\\w+ \\*\\w+\\[\\d+\\]")) {
- // Array of pointer
- final String element = bucket.ctype.getType().split(" ")[0];
- JUtils.LOG("element=" + element);
- final Class theClass = CType.getClassFrom(element);
- JUtils.LOG("theClass=" + theClass);
- return __array_of_ptr_impl__.malloc_empty(arrayLength);
- }
- if (bucket.ctype.getType().matches("\\w+ \\w+\\[\\d+\\]")) {
- // Array of Struct
- final String element = bucket.ctype.getType().split(" ")[0];
- JUtils.LOG("element=" + element);
- final Class theClass = CType.getClassFrom(element);
- JUtils.LOG("theClass=" + theClass);
- return __array_of_struct_impl__.malloc(theClass, arrayLength);
- }
- throw new UnsupportedOperationException();
- }
}
diff --git a/src/smetana/core/Ppolyline_t.java b/src/smetana/core/amiga/Counter.java
index de5fe6c..95c29bc 100644
--- a/src/smetana/core/Ppolyline_t.java
+++ b/src/smetana/core/amiga/Counter.java
@@ -34,10 +34,10 @@
*
*/
-package smetana.core;
+package smetana.core.amiga;
-import h.Ppoly_t;
+public class Counter {
-public interface Ppolyline_t extends Ppoly_t {
+ public static int CPT = 0;
}
diff --git a/src/smetana/core/amiga/StarArrayOfInteger.java b/src/smetana/core/amiga/StarArrayOfInteger.java
index a52beab..84f2625 100644
--- a/src/smetana/core/amiga/StarArrayOfInteger.java
+++ b/src/smetana/core/amiga/StarArrayOfInteger.java
@@ -39,7 +39,6 @@ package smetana.core.amiga;
import smetana.core.AllH;
import smetana.core.UnsupportedC;
import smetana.core.__array_of_integer__;
-import smetana.core.__array_of_ptr__;
import smetana.core.__ptr__;
public class StarArrayOfInteger extends UnsupportedC implements Area, AllH {
diff --git a/src/smetana/core/amiga/StarArrayOfPtr.java b/src/smetana/core/amiga/StarArrayOfPtr.java
deleted file mode 100644
index 66f10c3..0000000
--- a/src/smetana/core/amiga/StarArrayOfPtr.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core.amiga;
-
-import h.ST_boxf;
-import smetana.core.AllH;
-import smetana.core.UnsupportedC;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__array_of_struct__;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.size_t;
-
-public class StarArrayOfPtr extends UnsupportedC implements Area, AllH {
-
- private final __array_of_ptr__ array;
-
- public StarArrayOfPtr(__array_of_ptr__ array) {
- this.array = array;
- }
-
- public void realloc(int nb) {
- array.realloc(nb);
- }
-
- public void realloc(size_t nb) {
- array.realloc(nb);
- }
-
- public String getUID36() {
- return array.getUID36();
- }
-
- public void memcopyFrom(Area source) {
- ((StarStruct) array.getInternal(0)).memcopyFrom(source);
- }
-
- public final __array_of_ptr__ getInternalArray() {
- return array;
- }
-
- public __ptr__ plus(int pointerMove) {
- return new StarArrayOfPtr(array.move(pointerMove));
- }
-
- public void setInt(int value) {
- array.setInt(value);
- }
-
- public int getInt() {
- return array.getInt();
- }
-
- public __struct__ getStruct() {
- return array.getStruct();
- }
-
- public void copyDataFrom(__struct__ other) {
- ((StarStruct) array.getInternal(0)).copyDataFrom(other);
- }
-
- public void setPtr(__ptr__ value) {
- array.setPtr(value);
- }
-
- public int minus(__ptr__ other) {
- StarArrayOfPtr other2 = (StarArrayOfPtr) other;
- int res = array.comparePointerInternal(other2.array);
- return res;
- }
-
- public void setStruct(__struct__ value) {
- array.setStruct(value);
- }
-
- public __ptr__ getPtr() {
- return array.getPtr();
- }
-
- public __ptr__ getPtrForEquality() {
- return array.getStruct().amp();
- }
-
- public int comparePointer(__ptr__ other) {
- return array.comparePointerInternal(((StarArrayOfPtr) other).array);
- }
-
- public boolean isSameThan(StarArrayOfPtr other) {
- return array.comparePointerInternal(other.array) == 0;
- }
-
- // Fieldname
- public void setStruct(String fieldName, __struct__ data) {
- ((__ptr__) array.getInternal(0)).setStruct(fieldName, data);
- }
-
- public __ptr__ setPtr(String fieldName, __ptr__ data) {
- final Area tmp1 = array.getInternal(0);
- if (tmp1 instanceof __struct__) {
- return ((__struct__) tmp1).setPtr(fieldName, data);
- }
- return ((__ptr__) tmp1).setPtr(fieldName, data);
- }
-
- public void setInt(String fieldName, int data) {
- ((__ptr__) array.getInternal(0)).setInt(fieldName, data);
- }
-
- public __ptr__ getPtr(String fieldName) {
- final Area tmp1 = array.getInternal(0);
- if (tmp1 instanceof __struct__) {
- return ((__struct__) tmp1).getPtr(fieldName);
- }
- return ((__ptr__) tmp1).getPtr(fieldName);
- }
-
- public __struct__ getStruct(String fieldName) {
- __ptr__ TMP = (__ptr__) array.getInternal(0);
- if (TMP instanceof ST_boxf) {
- return ((ST_boxf) TMP).getStructInternal(fieldName);
- }
- return TMP.getStruct(fieldName);
- }
-
- public void setDouble(String fieldName, double data) {
- ((__ptr__) array.getInternal(0)).setDouble(fieldName, data);
- }
-
- public int getInt(String fieldName) {
- final Area tmp1 = array.getInternal(0);
- if (tmp1 instanceof __struct__) {
- return ((__struct__) tmp1).getInt(fieldName);
- }
- return ((__ptr__) tmp1).getInt(fieldName);
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- return ((__ptr__) array.getInternal(0)).getArrayOfStruct(fieldName);
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- return ((__ptr__) array.getInternal(0)).getArrayOfPtr(fieldName);
- }
-
- public boolean getBoolean(String fieldName) {
- return ((__ptr__) array.getInternal(0)).getBoolean(fieldName);
- }
-
- public void setBoolean(String fieldName, boolean value) {
- ((__ptr__) array.getInternal(0)).setBoolean(fieldName, value);
- }
-
-
- public __ptr__ castTo(Class dest) {
- return ((__ptr__) array.getInternal(0)).castTo(dest);
- }
-
-
- public double getDouble(String fieldName) {
- final Area tmp1 = array.getInternal(0);
- if (tmp1 instanceof __struct__) {
- return ((__struct__) tmp1).getDouble(fieldName);
- }
- return ((__ptr__) tmp1).getDouble(fieldName);
- }
-
-}
diff --git a/src/smetana/core/amiga/StarArrayOfStruct.java b/src/smetana/core/amiga/StarArrayOfStruct.java
deleted file mode 100644
index df33023..0000000
--- a/src/smetana/core/amiga/StarArrayOfStruct.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core.amiga;
-
-import smetana.core.AllH;
-import smetana.core.UnsupportedC;
-import smetana.core.__array_of_struct__;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
-
-public class StarArrayOfStruct extends UnsupportedC implements Area, AllH {
-
- private final __array_of_struct__ array;
-
- public StarArrayOfStruct(__array_of_struct__ array) {
- this.array = array;
- }
-
- public void realloc(int nb) {
- array.realloc(nb);
- }
-
- public String getUID36() {
- return array.getUID36();
- }
-
- public void memcopyFrom(Area source) {
- throw new UnsupportedOperationException();
- }
-
- public final __array_of_struct__ getInternalArray() {
- return array;
- }
-
- public __ptr__ plus(int pointerMove) {
- return new StarArrayOfStruct(array.move(pointerMove));
- }
-
- public __struct__ getStruct() {
- return array.getStruct();
- }
-
- public __ptr__ getPtr() {
- return array.getPtr();
- }
-
- public int minus(__ptr__ other) {
- StarArrayOfStruct other2 = (StarArrayOfStruct) other;
- int res = array.comparePointerInternal(other2.array);
- return res;
- }
-
- public void setStruct(__struct__ value) {
- array.setStruct(value);
- }
-
- public __ptr__ getPtrForEquality() {
- return array.getStruct().amp();
- }
-
- public int comparePointer(__ptr__ other) {
- return array.comparePointerInternal(((StarArrayOfStruct) other).array);
- }
-
- public boolean isSameThan(StarArrayOfStruct other) {
- return array.comparePointerInternal(other.array) == 0;
- }
-
- // Fieldname
-
- public __ptr__ setPtr(String fieldName, __ptr__ data) {
- final Area tmp1 = array.getInternal(0);
- return ((__struct__) tmp1).setPtr(fieldName, data);
- }
-
- public __ptr__ getPtr(String fieldName) {
- final Area tmp1 = array.getInternal(0);
- return ((__struct__) tmp1).getPtr(fieldName);
- }
-
- public int getInt(String fieldName) {
- final Area tmp1 = array.getInternal(0);
- return ((__struct__) tmp1).getInt(fieldName);
- }
-
- public double getDouble(String fieldName) {
- final Area tmp1 = array.getInternal(0);
- return ((__struct__) tmp1).getDouble(fieldName);
- }
-
- public void setDouble(String fieldName, double data) {
- final Area tmp1 = array.getInternal(0);
- ((__struct__) tmp1).setDouble(fieldName, data);
- }
-
-}
diff --git a/src/smetana/core/amiga/StarStar.java b/src/smetana/core/amiga/StarStar.java
deleted file mode 100644
index 1b1448f..0000000
--- a/src/smetana/core/amiga/StarStar.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core.amiga;
-
-import smetana.core.UnsupportedC;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__array_of_ptr_impl__;
-import smetana.core.__ptr__;
-
-public class StarStar extends UnsupportedC implements Area {
-
- private Area area;
-
- StarStar(Area area) {
- this.area = area;
- }
-
- public static StarStar array_of_array_of_something_empty(final Class cl, int nb) {
- return new StarStar(__array_of_ptr_impl__.malloc_empty(nb));
- }
-
- public String toString() {
- return "->" + area;
- }
-
- Area getArea() {
- return area;
- }
-
- public void swap(int i, int j) {
- ((__array_of_ptr__) area).swap(i, j);
-
- }
-
- public void memcopyFrom(Area source) {
- StarStar other = (StarStar) source;
- this.area = other.area;
- }
-
- // public __ptr__ getBracket(int idx) {
- // return ((AreaArray) area).getBracket(idx);
- // }
- //
- public void realloc(int nb) {
- ((__array_of_ptr__) area).realloc(nb);
- }
-
- //
- // // __c__
- // public void setBracket(int idx, Object data) {
- // ((AreaArray) area).setBracket(idx, data);
- // }
- //
- // public __ptr__ plus(int pointerMove) {
- // return ((AreaArray) area).plus(pointerMove);
- // }
-
- public __ptr__ plus(int pointerMove) {
- return new StarStar(((__array_of_ptr__) area).move(pointerMove));
- }
-
- public __ptr__ getPtr(String fieldName) {
- return ((__array_of_ptr__) area).asPtr().getPtr(fieldName);
- }
-
- public __ptr__ getPtr() {
- return (__ptr__) ((__array_of_ptr__) area).getInternal(0);
- }
-
- public void setPtr(__ptr__ value) {
- ((__array_of_ptr__) area).setInternalByIndex(0, (Area) value);
- }
-
- public void setDouble(String fieldName, double data) {
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public int comparePointer(__ptr__ other) {
- return ((__array_of_ptr__) area).comparePointerInternal(((__array_of_ptr__) ((StarStar) other).area));
- }
-
-}
diff --git a/src/smetana/core/amiga/StarStruct.java b/src/smetana/core/amiga/StarStruct.java
index b9b16d3..2ce069a 100644
--- a/src/smetana/core/amiga/StarStruct.java
+++ b/src/smetana/core/amiga/StarStruct.java
@@ -37,11 +37,6 @@
package smetana.core.amiga;
import smetana.core.AllH;
-import smetana.core.CString;
-import smetana.core.__array_of_cstring__;
-import smetana.core.__array_of_integer__;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__array_of_struct__;
import smetana.core.__ptr__;
import smetana.core.__struct__;
@@ -59,36 +54,12 @@ public interface StarStruct extends Area, AllH, InternalData {
public void setInt(String fieldName, int data);
- public void setBoolean(String fieldName, boolean data);
-
public void setDouble(String fieldName, double data);
- public int getInt(String fieldName);
-
- public double getDouble(String fieldName);
-
- public boolean getBoolean(String fieldName);
-
public __ptr__ plus(int pointerMove);
- public CString getCString(String fieldName);
-
- public __array_of_struct__ getArrayOfStruct(String fieldName);
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName);
-
- public __array_of_cstring__ getArrayOfCString(String fieldName);
-
- public __array_of_integer__ getArrayOfInteger(String fieldName);
-
- public __struct__ getStruct(String fieldName);
-
- public __ptr__ getPtr(String fieldName);
-
public void setStruct(String fieldName, __struct__ newData);
- public void setCString(String fieldName, CString newData);
-
public __ptr__ setPtr(String fieldName, __ptr__ newData);
public void memcopyFrom(Area source);
@@ -99,8 +70,6 @@ public interface StarStruct extends Area, AllH, InternalData {
public void copyDataFrom(__ptr__ arg);
- public Object call(String fieldName, Object... args);
-
public __ptr__ castTo(Class dest);
public Object addVirtualBytes(int virtualBytes);
diff --git a/src/smetana/core/amiga/StarStructImpl.java b/src/smetana/core/amiga/StarStructImpl.java
deleted file mode 100644
index 3cd8438..0000000
--- a/src/smetana/core/amiga/StarStructImpl.java
+++ /dev/null
@@ -1,544 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core.amiga;
-
-import h.WithParent;
-
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-
-import smetana.core.Bucket;
-import smetana.core.CFunction;
-import smetana.core.CFunctionImpl;
-import smetana.core.CString;
-import smetana.core.HardcodedStruct;
-import smetana.core.JUtils;
-import smetana.core.MutableDoublePtr;
-import smetana.core.OFFSET;
-import smetana.core.StructureDefinition;
-import smetana.core.UnsupportedC;
-import smetana.core.__array_of_cstring__;
-import smetana.core.__array_of_integer__;
-import smetana.core.__array_of_ptr__;
-import smetana.core.__array_of_struct__;
-import smetana.core.__ptr__;
-import smetana.core.__struct__;
-import smetana.core.__struct_impl__;
-
-public class StarStructImpl extends UnsupportedC implements StarStruct {
-
- public static int CPT = 0;
-
- private final int UID = CPT++;
- private final Map<String, Area> fields;
- private final Set<String> inlineFields = new HashSet<String>();
- private final StarStruct parent;
- private final Class theClass;
-
- public boolean isSameThan(StarStruct other) {
- return this.UID == ((StarStructImpl) other).UID;
- }
-
- @Override
- public String toString() {
- return "StarStruct " + getUID36() + " " + theClass + " " + fields.keySet() + " {parent=" + parent + "}";
- }
-
- public Class getRealClass() {
- return theClass;
- }
-
- private int getIndexOf(Area searched) {
- int i = 0;
- for (Area a : fields.values()) {
- if (a == searched) {
- return i;
- }
- i++;
- }
- throw new IllegalArgumentException();
- }
-
- private Area getAreaByIndex(int idx) {
- int i = 0;
- for (Area a : fields.values()) {
- if (i == idx) {
- return a;
- }
- i++;
- }
- throw new IllegalArgumentException();
- }
-
- public __struct__ getStruct() {
- return new __struct_impl__(this);
- }
-
- public StarStructImpl(Class theClass, StarStruct parent) {
- this.parent = parent;
- this.theClass = theClass;
- this.fields = new LinkedHashMap<String, Area>();
- JUtils.LOG("Creation Struct " + getUID36());
- if (getUID36().equals("1tq")) {
- JUtils.LOG("It's me");
- }
- final StructureDefinition structureDefinition = StructureDefinition.from(theClass);
- final Map<String, Bucket> bucketsMap = structureDefinition.getBucketsMap();
-
- JUtils.LOG("FIELDS = " + theClass + " " + bucketsMap.keySet());
- for (Map.Entry<String, Bucket> ent : bucketsMap.entrySet()) {
- // JUtils.LOG("AreaStruct entrie=" + ent.getKey());
- final Bucket bucket = ent.getValue();
- fields.put(bucket.name, BucketToAreaFactory.createArea(bucket, this));
- if (bucket.inlineStruct() && bucket.functionPointer() == false) {
- inlineFields.add(bucket.name);
- }
- }
- }
-
- public Area getArea(String name) {
- if (fields.containsKey(name) == false) {
- System.err.println("fields=" + fields.keySet());
- throw new IllegalArgumentException("No such field " + name);
- }
- final Area result = fields.get(name);
- return result;
- }
-
- public String getUID36() {
- return Integer.toString(UID, 36);
- }
-
- // __c__
-
- public String getDebug(String fieldName) {
- throw new UnsupportedOperationException();
- }
-
- public void setInt(String fieldName, int data) {
- final AreaInt area = (AreaInt) getArea(fieldName);
- area.setInternal(data);
- }
-
- public void setBoolean(String fieldName, boolean data) {
- final AreaInt area = (AreaInt) getArea(fieldName);
- area.setInternal(data ? 1 : 0);
- }
-
- public void setDouble(String fieldName, double data) {
- // if (fieldName.equals("x") && Math.round(data) == 54) {
- // System.err.println("setDoubleTrace 54!!");
- // }
- final AreaDouble area = (AreaDouble) getArea(fieldName);
- area.setInternal(data);
- }
-
- public int getInt(String fieldName) {
- final AreaInt area = (AreaInt) getArea(fieldName);
- return area.getInternal();
- }
-
- public double getDouble(String fieldName) {
- final AreaDouble area = (AreaDouble) getArea(fieldName);
- return area.getInternal();
- }
-
- public boolean getBoolean(String fieldName) {
- final AreaInt area = (AreaInt) getArea(fieldName);
- if (area == null) {
- return false;
- }
- return area.getInternal() != 0;
- }
-
- public __ptr__ plus(int pointerMove) {
- JUtils.LOG("******************* plus =" + pointerMove);
- JUtils.LOG("me=" + this);
- if (parent != null) {
- int idx = ((StarStructImpl) parent).getIndexOf(this);
- JUtils.LOG("idx=" + idx);
- idx += pointerMove;
- final Area result = ((StarStructImpl) parent).getAreaByIndex(idx);
- JUtils.LOG("result=" + result);
- return (__ptr__) result;
- }
- throw new UnsupportedOperationException(getClass().toString());
- }
-
- public CString getCString(String fieldName) {
- return (CString) getArea(fieldName);
- }
-
- public __array_of_struct__ getArrayOfStruct(String fieldName) {
- Area area = getArea(fieldName);
- if (area instanceof StarArrayOfStruct) {
- return ((StarArrayOfStruct) area).getInternalArray();
- }
- return (__array_of_struct__) area;
- }
-
- public __array_of_ptr__ getArrayOfPtr(String fieldName) {
- Area area = getArea(fieldName);
- if (area instanceof StarStar) {
- return (__array_of_ptr__) ((StarStar) area).getArea();
- }
- if (area instanceof StarArrayOfPtr) {
- return (__array_of_ptr__) ((StarArrayOfPtr) area).getInternalArray();
- }
- return (__array_of_ptr__) area;
- }
-
- public __array_of_cstring__ getArrayOfCString(String fieldName) {
- Area area = getArea(fieldName);
- if (area instanceof StarArrayOfCString) {
- return ((StarArrayOfCString) area).getInternalArray();
- }
- return (__array_of_cstring__) area;
- }
-
- public __array_of_integer__ getArrayOfInteger(String fieldName) {
- Area area = getArea(fieldName);
- if (area instanceof StarArrayOfInteger) {
- return ((StarArrayOfInteger) area).getInternalArray();
- }
- return (__array_of_integer__) area;
- }
-
- public __struct__ getStruct(String fieldName) {
- // if (getArea(fieldName) instanceof __array__) {
- // return ((__array__) getArea(fieldName)).getStruct(0);
- // }
- if (getArea(fieldName) != null && getArea(fieldName) instanceof __ptr__ == false) {
- throw new IllegalArgumentException("Issue in getStruct with " + fieldName + " "
- + getArea(fieldName).getClass());
- }
- final __ptr__ area = (__ptr__) getArea(fieldName);
- // if (area instanceof StarArray) {
- // final __array__ array = ((StarArray) area).getInternalArray();
- // return new __struct__<__ptr__>((StarStruct) array.getInternal(0));
- // }
- if (area instanceof HardcodedStruct) {
- return (__struct__) area;
- }
- if (area instanceof StarStructImpl == false) {
- throw new IllegalStateException(fieldName + " " + area.getClass().toString());
- }
- if (area instanceof StarStructImpl && this.inlineFields.contains(fieldName) == false) {
- throw new IllegalArgumentException(fieldName + " is NOT inline!");
- }
- return new __struct_impl__<__ptr__>((StarStructImpl) area);
- }
-
- public __ptr__ getPtr(String fieldName) {
- if (getArea(fieldName) != null && getArea(fieldName) instanceof __ptr__ == false) {
- throw new IllegalArgumentException("Issue in getStruct with " + fieldName + " "
- + getArea(fieldName).getClass());
- }
- final __ptr__ area = (__ptr__) getArea(fieldName);
- if (area == null) {
- return null;
- }
- if (area instanceof StarStruct == false && area instanceof CFunctionImpl == false
- && area instanceof CString == false && area instanceof StarStar == false
- && area instanceof StarArrayOfPtr == false && area instanceof StarArrayOfStruct == false
- && area instanceof StarArrayOfInteger == false && area instanceof MutableDoublePtr == false
- /* && area instanceof AreaArray == false */) {
- throw new IllegalStateException(area.getClass().toString());
- }
-
- if (area instanceof StarStructImpl && this.inlineFields.contains(fieldName)) {
- throw new IllegalArgumentException(fieldName + " is inline!");
- }
- return area;
- }
-
- public void setStruct(String fieldName, __struct__ newData) {
- if (newData == null) {
- throw new IllegalArgumentException();
- }
- if (inlineFields.contains(fieldName) == false) {
- throw new UnsupportedOperationException("IMPOSSIBLE2 " + fieldName);
- }
- final Area area = fields.get(fieldName);
- if (area == null) {
- throw new UnsupportedOperationException("IMPOSSIBLE3 " + fieldName);
- }
- if (area instanceof HardcodedStruct) {
- ((HardcodedStruct) area).copyDataFrom(newData);
- } else {
- final StarStructImpl existing = (StarStructImpl) area;
- existing.copyDataFrom(newData);
- }
- }
-
- public void setCString(String fieldName, CString newData) {
- if (newData == null) {
- fields.put(fieldName, null);
- } else {
- fields.put(fieldName, (Area) newData);
- ((CString) newData).setMyFather(this);
- }
- }
-
- public __ptr__ setPtr(String fieldName, __ptr__ newData) {
- if (newData instanceof CFunction) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- if (inlineFields.contains(fieldName)) {
- throw new UnsupportedOperationException("IMPOSSIBLE5 " + fieldName);
- }
- if (newData == null) {
- fields.put(fieldName, null);
- return null;
- }
- if (newData instanceof StarStruct) {
- if (inlineFields.contains(fieldName)) {
- throw new UnsupportedOperationException("IMPOSSIBLE1");
- } else {
- fields.put(fieldName, (Area) newData);
- }
- return newData;
- }
- if (newData instanceof CString) {
- fields.put(fieldName, (Area) newData);
- ((CString) newData).setMyFather(this);
- return newData;
- }
- if (newData instanceof StarArrayOfPtr) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- if (newData instanceof StarArrayOfStruct) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- if (newData instanceof StarStar) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- if (newData instanceof StarArrayOfCString) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- if (newData instanceof MutableDoublePtr) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- if (newData instanceof StarArrayOfInteger) {
- fields.put(fieldName, (Area) newData);
- return newData;
- }
- // if (newData instanceof AreaArray) {
- // fields.put(fieldName, (Area) newData);
- // return newData;
- // }
- throw new UnsupportedOperationException("en cours1 ! " + newData.getClass());
- }
-
- public void memcopyFrom(Area source) {
- if (source instanceof StarArrayOfPtr) {
- final __array_of_ptr__ array = ((StarArrayOfPtr) source).getInternalArray();
- copyDataFrom((StarStructImpl) array.getInternal(0));
- } else if (source instanceof __struct__) {
- copyDataFrom((__struct__) source);
- } else {
- copyDataFrom((StarStructImpl) source);
- }
- }
-
- public void copyDataFrom(__struct__ other) {
- copyDataFrom(other.getInternalData());
- }
-
- public void setStruct(__struct__ value) {
- copyDataFrom(value);
- }
-
- public void copyDataFrom(__ptr__ arg) {
- JUtils.LOG("copyDataFrom I AM " + this);
- JUtils.LOG("other=" + arg);
- JUtils.LOG("FIELDS=" + fields.keySet());
- if (arg instanceof InternalData) {
- copyDataFromInternal((InternalData) arg);
- return;
- }
- if (this.getClass() != arg.getClass()) {
- throw new UnsupportedOperationException(getClass().toString());
- }
- StarStructImpl other = (StarStructImpl) arg;
- if (fields.keySet().equals(other.fields.keySet()) == false) {
- throw new IllegalStateException();
- }
- copyDataFromInternal(other);
- }
-
- private void copyDataFromInternal(InternalData other) {
- for (String fieldName : new TreeSet<String>(fields.keySet())) {
- Area field = fields.get(fieldName);
- final Area otherField = other.getArea(fieldName);
- if (field == null && otherField == null) {
- continue;
- }
- if (field == null) {
- if (otherField instanceof StarStructImpl && inlineFields.contains(fieldName) == false) {
- fields.put(fieldName, otherField);
- } else if (otherField instanceof CString) {
- fields.put(fieldName, otherField);
- } else if (otherField instanceof StarStar) {
- fields.put(fieldName, otherField);
- } else if (otherField instanceof StarArrayOfPtr) {
- fields.put(fieldName, otherField);
- } else if (otherField instanceof CFunction) {
- fields.put(fieldName, otherField);
- } else if (otherField instanceof StarArrayOfStruct) {
- fields.put(fieldName, otherField);
- } else {
- System.err.println("XX otherField = " + otherField);
- throw new UnsupportedOperationException(otherField.getClass().toString());
- }
- } else if (field instanceof AreaInt) {
- field.memcopyFrom(otherField);
- } else if (field instanceof AreaDouble) {
- field.memcopyFrom(otherField);
- } else if (field instanceof CString) {
- field.memcopyFrom(otherField);
- } else if (field instanceof StarStar) {
- if (otherField == null) {
- fields.put(fieldName, null);
- } else {
- field.memcopyFrom(otherField);
- }
- } else if (field instanceof StarStructImpl && inlineFields.contains(fieldName)) {
- field.memcopyFrom(otherField);
- } else if (field instanceof StarStructImpl && inlineFields.contains(fieldName) == false) {
- fields.put(fieldName, otherField);
- } else if (field instanceof StarArrayOfPtr) {
- field.memcopyFrom(otherField);
- } else if (field instanceof HardcodedStruct) {
- field.memcopyFrom(otherField);
- } else {
- System.err.println("fieldName=" + fieldName + " " + field);
- System.err.println("otherField = " + otherField);
- throw new UnsupportedOperationException(field.getClass().toString());
- }
- }
- }
-
- public Object call(String fieldName, Object... args) {
- final CFunction area = (CFunction) getArea(fieldName);
- return area.exe(args);
- }
-
- public __ptr__ castTo(Class dest) {
- JUtils.LOG("******************* castTo =" + dest);
- JUtils.LOG("me=" + this);
- if (theClass == dest) {
- return this;
- }
- if (parent != null && ((StarStructImpl) parent).theClass == dest) {
- JUtils.LOG("IT's my father!");
- return parent;
- }
-
- final Area first = fields.values().iterator().next();
- JUtils.LOG("first=" + first);
- if (first instanceof StarStructImpl) {
- final StarStructImpl first2 = (StarStructImpl) first;
- JUtils.LOG("first.parent=" + first2.parent);
- if (first2.parent != this) {
- throw new IllegalStateException();
- }
- if (dest == first2.theClass) {
- return first2;
- }
- }
- if (first instanceof WithParent) {
- final WithParent first2 = (WithParent) first;
- JUtils.LOG("first.parent=" + first2.getParent());
- if (first2.getParent() != this) {
- throw new IllegalStateException();
- }
- return (__ptr__) first2;
- }
- throw new UnsupportedOperationException("first=" + first.getClass());
- }
-
- public Object addVirtualBytes(int virtualBytes) {
- JUtils.LOG("#### addVirtualBytes " + virtualBytes);
- if (virtualBytes == 0) {
- return this;
- }
- JUtils.LOG("this=" + toString());
- if (virtualBytes < 0) {
- final OFFSET offset = OFFSET.fromInt(-virtualBytes);
- JUtils.LOG("OFFSET1=" + offset);
- if (parent == null) {
- throw new UnsupportedOperationException("No father! How to go back?");
- }
- JUtils.LOG("father=" + parent);
- if (((StarStructImpl) parent).theClass != offset.getTheClass()) {
- throw new UnsupportedOperationException("Bad class matching1!");
- }
- final Object checking = parent.addVirtualBytes(-virtualBytes);
- JUtils.LOG("checking=" + checking);
- if (checking != this) {
- throw new UnsupportedOperationException("Cheking fail!");
- }
- return parent;
- }
- final OFFSET offset = OFFSET.fromInt(virtualBytes);
- JUtils.LOG("OFFSET2=" + offset);
- final String field = offset.getField();
- JUtils.LOG("field=" + field);
- JUtils.LOG("fields=" + fields.keySet());
- final Area result = fields.get(field);
- if (result == null && parent != null) {
- return parent.addVirtualBytes(virtualBytes);
- }
- if (result == null) {
- throw new UnsupportedOperationException();
- }
- return result;
- }
-
- // __c__
-
-}
diff --git a/src/smetana/core/debug/Debug.java b/src/smetana/core/debug/Debug.java
index a738de7..183a4bf 100644
--- a/src/smetana/core/debug/Debug.java
+++ b/src/smetana/core/debug/Debug.java
@@ -34,12 +34,46 @@
*/
package smetana.core.debug;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
public class Debug {
+ private final Map<String, String> methodNames = new HashMap<String, String>();
+ private final Collection<String> called = new LinkedHashSet<String>();
+
public void entering(String signature, String methodName) {
+ methodNames.put(signature, methodName);
+ if (called.contains(signature) == false) {
+ called.add(signature);
+ }
}
public void leaving(String signature, String methodName) {
}
+ public void reset() {
+ methodNames.clear();
+ called.clear();
+ }
+
+ public void printMe() {
+ System.err.println("methodNames=" + methodNames.size());
+ System.err.println("called=" + called.size());
+ final List<String> called2 = new ArrayList<String>(called);
+ for (int i = 0; i < called.size(); i++) {
+ System.err.println("n " + i + " " + methodNames.get(called2.get(i)) + " " + called2.get(i));
+ }
+ final Set<String> called3 = new HashSet<String>(called);
+ for (String s : called3) {
+ System.err.println("p " + s);
+ }
+ }
+
}
diff --git a/src/smetana/core/size_t_array_of_array_of_something_allocated.java b/src/smetana/core/size_t_array_of_array_of_something_allocated.java
deleted file mode 100644
index c9664f5..0000000
--- a/src/smetana/core/size_t_array_of_array_of_something_allocated.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-
-public class size_t_array_of_array_of_something_allocated implements size_t {
-
- final private int nb;
- final private Class cl;
-
- public size_t_array_of_array_of_something_allocated(Class cl, int nb) {
- this.nb = nb;
- this.cl = cl;
- }
-
- public boolean isZero() {
- return nb == 0;
- }
-
- public int getInternalNb() {
- return nb;
- }
-
-
- public __ptr__ realloc(Object old) {
- throw new UnsupportedOperationException();
- }
-
- public __array_of_struct__ malloc() {
- return __array_of_struct_impl__.malloc(cl, nb);
- }
-
- public size_t negate() {
- throw new UnsupportedOperationException();
- }
-
- public size_t plus(int length) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStrictPositive() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStrictNegative() {
- throw new UnsupportedOperationException();
- }
-
-}
diff --git a/src/smetana/core/size_t_array_of_array_of_something_empty.java b/src/smetana/core/size_t_array_of_array_of_something_empty.java
deleted file mode 100644
index 1307f45..0000000
--- a/src/smetana/core/size_t_array_of_array_of_something_empty.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import smetana.core.amiga.StarStar;
-
-public class size_t_array_of_array_of_something_empty implements size_t {
-
- final private int nb;
- final private Class cl;
-
- public size_t_array_of_array_of_something_empty(Class cl, int nb) {
- this.nb = nb;
- this.cl = cl;
- }
-
- public boolean isZero() {
- return nb == 0;
- }
-
- public int getInternalNb() {
- return nb;
- }
-
-
- public __ptr__ realloc(Object old) {
- JUtils.LOG("realloc old1=" + old);
- if (nb == 0) {
- return null;
- }
- final StarStar data = (StarStar) old;
- data.realloc(nb);
- return data;
- }
-
- public __ptr__ malloc() {
- return StarStar.array_of_array_of_something_empty(cl, nb);
- }
-
- public size_t negate() {
- throw new UnsupportedOperationException();
- }
-
- public size_t plus(int length) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStrictPositive() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStrictNegative() {
- throw new UnsupportedOperationException();
- }
-
- public final int getNb() {
- return nb;
- }
-
-}
diff --git a/src/smetana/core/size_t_array_of_charstars.java b/src/smetana/core/size_t_array_of_charstars.java
index 9183256..4c6c54d 100644
--- a/src/smetana/core/size_t_array_of_charstars.java
+++ b/src/smetana/core/size_t_array_of_charstars.java
@@ -79,7 +79,8 @@ public class size_t_array_of_charstars implements size_t {
}
public __ptr__ realloc(Object old) {
- throw new UnsupportedOperationException();
+ ((StarArrayOfCString) old).realloc(size);
+ return (__ptr__) old;
}
}
diff --git a/src/smetana/core/size_t_array_of_something.java b/src/smetana/core/size_t_array_of_something.java
deleted file mode 100644
index 24f095f..0000000
--- a/src/smetana/core/size_t_array_of_something.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/* ========================================================================
- * PlantUML : a free UML diagram generator
- * ========================================================================
- *
- * Project Info: http://plantuml.com
- *
- * If you like this project or if you find it useful, you can support us at:
- *
- * http://plantuml.com/patreon (only 1$ per month!)
- * http://plantuml.com/paypal
- *
- * This file is part of Smetana.
- * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
- *
- * (C) Copyright 2009-2017, Arnaud Roques
- *
- * This translation is distributed under the same Licence as the original C program.
- *
- * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
- * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
- *
- * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
- * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
- *
- * You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package smetana.core;
-
-import smetana.core.amiga.StarArrayOfPtr;
-import smetana.core.amiga.StarStar;
-
-public class size_t_array_of_something implements size_t {
-
- final private int nb;
- final private Class cl;
-
- public size_t_array_of_something(Class cl, int nb) {
- this.nb = nb;
- this.cl = cl;
- }
-
- public boolean isZero() {
- return nb == 0;
- }
-
- public int getInternalNb() {
- return nb;
- }
-
-
- public __ptr__ malloc() {
- return new StarArrayOfPtr(__array_of_ptr_impl__.malloc_allocated(cl, nb));
- }
-
- public size_t negate() {
- throw new UnsupportedOperationException();
- }
-
- public size_t plus(int length) {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStrictPositive() {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStrictNegative() {
- throw new UnsupportedOperationException();
- }
-
- public __ptr__ realloc(Object old) {
- if (old instanceof StarStar) {
- ((StarStar) old).realloc(nb);
- return (__ptr__) old;
- }
- ((StarArrayOfPtr) old).realloc(nb);
- return (__ptr__) old;
- }
-
- public int getNb() {
- return nb;
- }
-
-}
diff --git a/stdlib/aws-dex.repx b/stdlib/aws-dex.repx
index cfb8468..17a06f4 100644
--- a/stdlib/aws-dex.repx
+++ b/stdlib/aws-dex.repx
Binary files differ
diff --git a/stdlib/azure-abx.repx b/stdlib/azure-abx.repx
new file mode 100644
index 0000000..08a7d3e
--- /dev/null
+++ b/stdlib/azure-abx.repx
Binary files differ
diff --git a/stdlib/azure-dex.repx b/stdlib/azure-dex.repx
new file mode 100644
index 0000000..1f03a55
--- /dev/null
+++ b/stdlib/azure-dex.repx
Binary files differ
diff --git a/stdlib/devicons-abx.repx b/stdlib/devicons-abx.repx
deleted file mode 100644
index 0b444fc..0000000
--- a/stdlib/devicons-abx.repx
+++ /dev/null
Binary files differ
diff --git a/stdlib/devicons-dex.repx b/stdlib/devicons-dex.repx
deleted file mode 100644
index 85a474b..0000000
--- a/stdlib/devicons-dex.repx
+++ /dev/null
Binary files differ
diff --git a/stdlib/font-awesome-abx.repx b/stdlib/font-awesome-abx.repx
deleted file mode 100644
index f965732..0000000
--- a/stdlib/font-awesome-abx.repx
+++ /dev/null
Binary files differ
diff --git a/stdlib/font-awesome-dex.repx b/stdlib/font-awesome-dex.repx
deleted file mode 100644
index 5b6824a..0000000
--- a/stdlib/font-awesome-dex.repx
+++ /dev/null
Binary files differ
diff --git a/stdlib/home.repx b/stdlib/home.repx
index 81206b6..bad780e 100644
--- a/stdlib/home.repx
+++ b/stdlib/home.repx
@@ -1,7 +1,7 @@
+azure
aws
cloudinsight
cloudogu
-devicons
-font-awesome
+tupadr3
material
office
diff --git a/stdlib/tupadr3-abx.repx b/stdlib/tupadr3-abx.repx
new file mode 100644
index 0000000..e9062e4
--- /dev/null
+++ b/stdlib/tupadr3-abx.repx
Binary files differ
diff --git a/stdlib/tupadr3-dex.repx b/stdlib/tupadr3-dex.repx
new file mode 100644
index 0000000..b0d404a
--- /dev/null
+++ b/stdlib/tupadr3-dex.repx
Binary files differ